GDB: Only build for "unix:" connections if AF_LOCAL is supported.
[deliverable/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 GDB_NM_FILE
630 LTLIBBABELTRACE
631 LIBBABELTRACE
632 HAVE_LIBBABELTRACE
633 HAVE_NATIVE_GCORE_HOST
634 NAT_GENERATED_FILES
635 XM_CLIBS
636 MH_CFLAGS
637 LOADLIBES
638 NAT_CDEPS
639 NATDEPFILES
640 NAT_FILE
641 target_subdir
642 CONFIG_UNINSTALL
643 CONFIG_INSTALL
644 CONFIG_CLEAN
645 CONFIG_ALL
646 CONFIG_SRCS
647 CONFIG_DEPS
648 CONFIG_OBS
649 PROFILE_CFLAGS
650 ENABLE_CFLAGS
651 SIM_OBS
652 SIM
653 XMKMF
654 GDBTK_SRC_DIR
655 GDBTK_CFLAGS
656 GDBTKLIBS
657 X_LIBS
658 X_LDFLAGS
659 X_CFLAGS
660 TK_XINCLUDES
661 TK_DEPS
662 TK_LIBRARY
663 TK_INCLUDE
664 TK_STUB_LIB_SPEC
665 TK_STUB_LIB_FLAG
666 TK_STUB_LIB_FILE
667 TK_LIB_SPEC
668 TK_LIB_FLAG
669 TK_LIB_FILE
670 TK_SRC_DIR
671 TK_BIN_DIR
672 TK_VERSION
673 TCL_DEPS
674 TCL_LIBRARY
675 TCL_INCLUDE
676 TCL_STUB_LIB_SPEC
677 TCL_STUB_LIB_FLAG
678 TCL_STUB_LIB_FILE
679 TCL_LIB_SPEC
680 TCL_LIB_FLAG
681 TCL_LIB_FILE
682 TCL_SRC_DIR
683 TCL_BIN_DIR
684 TCL_PATCH_LEVEL
685 TCL_VERSION
686 WIN32LDAPP
687 GUI_CFLAGS_X
688 LIBGUI
689 LTLIBLZMA
690 LIBLZMA
691 HAVE_LIBLZMA
692 WIN32LIBS
693 SER_HARDWIRE
694 WERROR_CFLAGS
695 WARN_CFLAGS
696 SYSTEM_GDBINIT
697 TARGET_SYSTEM_ROOT
698 CONFIG_LDFLAGS
699 RDYNAMIC
700 ALLOCA
701 LTLIBIPT
702 LIBIPT
703 HAVE_LIBIPT
704 HAVE_GUILE_FALSE
705 HAVE_GUILE_TRUE
706 GUILE_LIBS
707 GUILE_CPPFLAGS
708 GUILD_TARGET_FLAG
709 GUILD
710 pkg_config_prog_path
711 HAVE_PYTHON_FALSE
712 HAVE_PYTHON_TRUE
713 PYTHON_LIBS
714 PYTHON_CPPFLAGS
715 PYTHON_CFLAGS
716 python_prog_path
717 LTLIBMPFR
718 LIBMPFR
719 HAVE_LIBMPFR
720 LTLIBEXPAT
721 LIBEXPAT
722 HAVE_LIBEXPAT
723 JIT_READER_DIR
724 TARGET_PTR
725 READLINE_TEXI_INCFLAG
726 READLINE_CFLAGS
727 READLINE_DEPS
728 READLINE
729 LTLIBICONV
730 LIBICONV
731 zlibinc
732 zlibdir
733 MIG
734 WINDRES
735 DLLTOOL
736 AR
737 YFLAGS
738 YACC
739 RANLIB
740 LN_S
741 INSTALL_DATA
742 INSTALL_SCRIPT
743 INSTALL_PROGRAM
744 AWK
745 REPORT_BUGS_TEXI
746 REPORT_BUGS_TO
747 PKGVERSION
748 CODESIGN_CERT
749 HAVE_NATIVE_GCORE_TARGET
750 TARGET_OBS
751 subdirs
752 GDB_DATADIR
753 DEBUGDIR
754 MAKEINFO_EXTRA_FLAGS
755 MAKEINFOFLAGS
756 MAKEINFO
757 PACKAGE
758 GNULIB_STDINT_H
759 CATOBJEXT
760 GENCAT
761 INSTOBJEXT
762 DATADIRNAME
763 CATALOGS
764 POSUB
765 GMSGFMT
766 XGETTEXT
767 INCINTL
768 LIBINTL_DEP
769 LIBINTL
770 USE_NLS
771 CCDEPMODE
772 DEPDIR
773 am__leading_dot
774 CXX_DIALECT
775 HAVE_CXX11
776 INSTALL_STRIP_PROGRAM
777 STRIP
778 install_sh
779 target_os
780 target_vendor
781 target_cpu
782 target
783 host_os
784 host_vendor
785 host_cpu
786 host
787 build_os
788 build_vendor
789 build_cpu
790 build
791 EGREP
792 GREP
793 CPP
794 ac_ct_CXX
795 CXXFLAGS
796 CXX
797 OBJEXT
798 EXEEXT
799 ac_ct_CC
800 CPPFLAGS
801 LDFLAGS
802 CFLAGS
803 CC
804 MAINT
805 MAINTAINER_MODE_FALSE
806 MAINTAINER_MODE_TRUE
807 target_alias
808 host_alias
809 build_alias
810 LIBS
811 ECHO_T
812 ECHO_N
813 ECHO_C
814 DEFS
815 mandir
816 localedir
817 libdir
818 psdir
819 pdfdir
820 dvidir
821 htmldir
822 infodir
823 docdir
824 oldincludedir
825 includedir
826 localstatedir
827 sharedstatedir
828 sysconfdir
829 datadir
830 datarootdir
831 libexecdir
832 sbindir
833 bindir
834 program_transform_name
835 prefix
836 exec_prefix
837 PACKAGE_URL
838 PACKAGE_BUGREPORT
839 PACKAGE_STRING
840 PACKAGE_VERSION
841 PACKAGE_TARNAME
842 PACKAGE_NAME
843 PATH_SEPARATOR
844 SHELL'
845 ac_subst_files='nat_makefile_frag'
846 ac_user_opts='
847 enable_option_checking
848 enable_maintainer_mode
849 enable_plugins
850 enable_largefile
851 with_separate_debug_dir
852 with_gdb_datadir
853 with_relocated_sources
854 with_auto_load_dir
855 with_auto_load_safe_path
856 enable_targets
857 enable_64_bit_bfd
858 enable_gdbmi
859 enable_tui
860 enable_gdbtk
861 with_libunwind_ia64
862 with_curses
863 enable_profiling
864 enable_codesign
865 with_pkgversion
866 with_bugurl
867 with_system_zlib
868 with_gnu_ld
869 enable_rpath
870 with_libiconv_prefix
871 with_iconv_bin
872 with_system_readline
873 with_jit_reader_dir
874 with_expat
875 with_libexpat_prefix
876 with_mpfr
877 with_libmpfr_prefix
878 with_python
879 with_guile
880 enable_libmcheck
881 with_intel_pt
882 with_libipt_prefix
883 with_included_regex
884 with_sysroot
885 with_system_gdbinit
886 enable_werror
887 enable_build_warnings
888 enable_gdb_build_warnings
889 enable_ubsan
890 with_lzma
891 with_liblzma_prefix
892 with_tcl
893 with_tk
894 with_x
895 enable_sim
896 enable_gdbserver
897 with_babeltrace
898 with_libbabeltrace_prefix
899 enable_unit_tests
900 '
901 ac_precious_vars='build_alias
902 host_alias
903 target_alias
904 CC
905 CFLAGS
906 LDFLAGS
907 LIBS
908 CPPFLAGS
909 CXX
910 CXXFLAGS
911 CCC
912 CPP
913 MAKEINFO
914 MAKEINFOFLAGS
915 YACC
916 YFLAGS
917 XMKMF'
918 ac_subdirs_all='testsuite
919 gdbtk
920 gdbserver'
921
922 # Initialize some variables set by options.
923 ac_init_help=
924 ac_init_version=false
925 ac_unrecognized_opts=
926 ac_unrecognized_sep=
927 # The variables have the same names as the options, with
928 # dashes changed to underlines.
929 cache_file=/dev/null
930 exec_prefix=NONE
931 no_create=
932 no_recursion=
933 prefix=NONE
934 program_prefix=NONE
935 program_suffix=NONE
936 program_transform_name=s,x,x,
937 silent=
938 site=
939 srcdir=
940 verbose=
941 x_includes=NONE
942 x_libraries=NONE
943
944 # Installation directory options.
945 # These are left unexpanded so users can "make install exec_prefix=/foo"
946 # and all the variables that are supposed to be based on exec_prefix
947 # by default will actually change.
948 # Use braces instead of parens because sh, perl, etc. also accept them.
949 # (The list follows the same order as the GNU Coding Standards.)
950 bindir='${exec_prefix}/bin'
951 sbindir='${exec_prefix}/sbin'
952 libexecdir='${exec_prefix}/libexec'
953 datarootdir='${prefix}/share'
954 datadir='${datarootdir}'
955 sysconfdir='${prefix}/etc'
956 sharedstatedir='${prefix}/com'
957 localstatedir='${prefix}/var'
958 includedir='${prefix}/include'
959 oldincludedir='/usr/include'
960 docdir='${datarootdir}/doc/${PACKAGE}'
961 infodir='${datarootdir}/info'
962 htmldir='${docdir}'
963 dvidir='${docdir}'
964 pdfdir='${docdir}'
965 psdir='${docdir}'
966 libdir='${exec_prefix}/lib'
967 localedir='${datarootdir}/locale'
968 mandir='${datarootdir}/man'
969
970 ac_prev=
971 ac_dashdash=
972 for ac_option
973 do
974 # If the previous option needs an argument, assign it.
975 if test -n "$ac_prev"; then
976 eval $ac_prev=\$ac_option
977 ac_prev=
978 continue
979 fi
980
981 case $ac_option in
982 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
983 *=) ac_optarg= ;;
984 *) ac_optarg=yes ;;
985 esac
986
987 # Accept the important Cygnus configure options, so we can diagnose typos.
988
989 case $ac_dashdash$ac_option in
990 --)
991 ac_dashdash=yes ;;
992
993 -bindir | --bindir | --bindi | --bind | --bin | --bi)
994 ac_prev=bindir ;;
995 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
996 bindir=$ac_optarg ;;
997
998 -build | --build | --buil | --bui | --bu)
999 ac_prev=build_alias ;;
1000 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1001 build_alias=$ac_optarg ;;
1002
1003 -cache-file | --cache-file | --cache-fil | --cache-fi \
1004 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1005 ac_prev=cache_file ;;
1006 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1007 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1008 cache_file=$ac_optarg ;;
1009
1010 --config-cache | -C)
1011 cache_file=config.cache ;;
1012
1013 -datadir | --datadir | --datadi | --datad)
1014 ac_prev=datadir ;;
1015 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1016 datadir=$ac_optarg ;;
1017
1018 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1019 | --dataroo | --dataro | --datar)
1020 ac_prev=datarootdir ;;
1021 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1022 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1023 datarootdir=$ac_optarg ;;
1024
1025 -disable-* | --disable-*)
1026 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1027 # Reject names that are not valid shell variable names.
1028 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1029 as_fn_error $? "invalid feature name: $ac_useropt"
1030 ac_useropt_orig=$ac_useropt
1031 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1032 case $ac_user_opts in
1033 *"
1034 "enable_$ac_useropt"
1035 "*) ;;
1036 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1037 ac_unrecognized_sep=', ';;
1038 esac
1039 eval enable_$ac_useropt=no ;;
1040
1041 -docdir | --docdir | --docdi | --doc | --do)
1042 ac_prev=docdir ;;
1043 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1044 docdir=$ac_optarg ;;
1045
1046 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1047 ac_prev=dvidir ;;
1048 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1049 dvidir=$ac_optarg ;;
1050
1051 -enable-* | --enable-*)
1052 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1053 # Reject names that are not valid shell variable names.
1054 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1055 as_fn_error $? "invalid feature name: $ac_useropt"
1056 ac_useropt_orig=$ac_useropt
1057 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1058 case $ac_user_opts in
1059 *"
1060 "enable_$ac_useropt"
1061 "*) ;;
1062 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1063 ac_unrecognized_sep=', ';;
1064 esac
1065 eval enable_$ac_useropt=\$ac_optarg ;;
1066
1067 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1068 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1069 | --exec | --exe | --ex)
1070 ac_prev=exec_prefix ;;
1071 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1072 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1073 | --exec=* | --exe=* | --ex=*)
1074 exec_prefix=$ac_optarg ;;
1075
1076 -gas | --gas | --ga | --g)
1077 # Obsolete; use --with-gas.
1078 with_gas=yes ;;
1079
1080 -help | --help | --hel | --he | -h)
1081 ac_init_help=long ;;
1082 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1083 ac_init_help=recursive ;;
1084 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1085 ac_init_help=short ;;
1086
1087 -host | --host | --hos | --ho)
1088 ac_prev=host_alias ;;
1089 -host=* | --host=* | --hos=* | --ho=*)
1090 host_alias=$ac_optarg ;;
1091
1092 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1093 ac_prev=htmldir ;;
1094 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1095 | --ht=*)
1096 htmldir=$ac_optarg ;;
1097
1098 -includedir | --includedir | --includedi | --included | --include \
1099 | --includ | --inclu | --incl | --inc)
1100 ac_prev=includedir ;;
1101 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1102 | --includ=* | --inclu=* | --incl=* | --inc=*)
1103 includedir=$ac_optarg ;;
1104
1105 -infodir | --infodir | --infodi | --infod | --info | --inf)
1106 ac_prev=infodir ;;
1107 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1108 infodir=$ac_optarg ;;
1109
1110 -libdir | --libdir | --libdi | --libd)
1111 ac_prev=libdir ;;
1112 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1113 libdir=$ac_optarg ;;
1114
1115 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1116 | --libexe | --libex | --libe)
1117 ac_prev=libexecdir ;;
1118 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1119 | --libexe=* | --libex=* | --libe=*)
1120 libexecdir=$ac_optarg ;;
1121
1122 -localedir | --localedir | --localedi | --localed | --locale)
1123 ac_prev=localedir ;;
1124 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1125 localedir=$ac_optarg ;;
1126
1127 -localstatedir | --localstatedir | --localstatedi | --localstated \
1128 | --localstate | --localstat | --localsta | --localst | --locals)
1129 ac_prev=localstatedir ;;
1130 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1131 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1132 localstatedir=$ac_optarg ;;
1133
1134 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1135 ac_prev=mandir ;;
1136 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1137 mandir=$ac_optarg ;;
1138
1139 -nfp | --nfp | --nf)
1140 # Obsolete; use --without-fp.
1141 with_fp=no ;;
1142
1143 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1144 | --no-cr | --no-c | -n)
1145 no_create=yes ;;
1146
1147 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1148 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1149 no_recursion=yes ;;
1150
1151 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1152 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1153 | --oldin | --oldi | --old | --ol | --o)
1154 ac_prev=oldincludedir ;;
1155 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1156 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1157 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1158 oldincludedir=$ac_optarg ;;
1159
1160 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1161 ac_prev=prefix ;;
1162 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1163 prefix=$ac_optarg ;;
1164
1165 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1166 | --program-pre | --program-pr | --program-p)
1167 ac_prev=program_prefix ;;
1168 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1169 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1170 program_prefix=$ac_optarg ;;
1171
1172 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1173 | --program-suf | --program-su | --program-s)
1174 ac_prev=program_suffix ;;
1175 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1176 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1177 program_suffix=$ac_optarg ;;
1178
1179 -program-transform-name | --program-transform-name \
1180 | --program-transform-nam | --program-transform-na \
1181 | --program-transform-n | --program-transform- \
1182 | --program-transform | --program-transfor \
1183 | --program-transfo | --program-transf \
1184 | --program-trans | --program-tran \
1185 | --progr-tra | --program-tr | --program-t)
1186 ac_prev=program_transform_name ;;
1187 -program-transform-name=* | --program-transform-name=* \
1188 | --program-transform-nam=* | --program-transform-na=* \
1189 | --program-transform-n=* | --program-transform-=* \
1190 | --program-transform=* | --program-transfor=* \
1191 | --program-transfo=* | --program-transf=* \
1192 | --program-trans=* | --program-tran=* \
1193 | --progr-tra=* | --program-tr=* | --program-t=*)
1194 program_transform_name=$ac_optarg ;;
1195
1196 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1197 ac_prev=pdfdir ;;
1198 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1199 pdfdir=$ac_optarg ;;
1200
1201 -psdir | --psdir | --psdi | --psd | --ps)
1202 ac_prev=psdir ;;
1203 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1204 psdir=$ac_optarg ;;
1205
1206 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1207 | -silent | --silent | --silen | --sile | --sil)
1208 silent=yes ;;
1209
1210 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1211 ac_prev=sbindir ;;
1212 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1213 | --sbi=* | --sb=*)
1214 sbindir=$ac_optarg ;;
1215
1216 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1217 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1218 | --sharedst | --shareds | --shared | --share | --shar \
1219 | --sha | --sh)
1220 ac_prev=sharedstatedir ;;
1221 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1222 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1223 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1224 | --sha=* | --sh=*)
1225 sharedstatedir=$ac_optarg ;;
1226
1227 -site | --site | --sit)
1228 ac_prev=site ;;
1229 -site=* | --site=* | --sit=*)
1230 site=$ac_optarg ;;
1231
1232 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1233 ac_prev=srcdir ;;
1234 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1235 srcdir=$ac_optarg ;;
1236
1237 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1238 | --syscon | --sysco | --sysc | --sys | --sy)
1239 ac_prev=sysconfdir ;;
1240 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1241 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1242 sysconfdir=$ac_optarg ;;
1243
1244 -target | --target | --targe | --targ | --tar | --ta | --t)
1245 ac_prev=target_alias ;;
1246 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1247 target_alias=$ac_optarg ;;
1248
1249 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1250 verbose=yes ;;
1251
1252 -version | --version | --versio | --versi | --vers | -V)
1253 ac_init_version=: ;;
1254
1255 -with-* | --with-*)
1256 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1257 # Reject names that are not valid shell variable names.
1258 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1259 as_fn_error $? "invalid package name: $ac_useropt"
1260 ac_useropt_orig=$ac_useropt
1261 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1262 case $ac_user_opts in
1263 *"
1264 "with_$ac_useropt"
1265 "*) ;;
1266 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1267 ac_unrecognized_sep=', ';;
1268 esac
1269 eval with_$ac_useropt=\$ac_optarg ;;
1270
1271 -without-* | --without-*)
1272 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1273 # Reject names that are not valid shell variable names.
1274 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1275 as_fn_error $? "invalid package name: $ac_useropt"
1276 ac_useropt_orig=$ac_useropt
1277 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1278 case $ac_user_opts in
1279 *"
1280 "with_$ac_useropt"
1281 "*) ;;
1282 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1283 ac_unrecognized_sep=', ';;
1284 esac
1285 eval with_$ac_useropt=no ;;
1286
1287 --x)
1288 # Obsolete; use --with-x.
1289 with_x=yes ;;
1290
1291 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1292 | --x-incl | --x-inc | --x-in | --x-i)
1293 ac_prev=x_includes ;;
1294 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1295 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1296 x_includes=$ac_optarg ;;
1297
1298 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1299 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1300 ac_prev=x_libraries ;;
1301 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1302 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1303 x_libraries=$ac_optarg ;;
1304
1305 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1306 Try \`$0 --help' for more information"
1307 ;;
1308
1309 *=*)
1310 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1311 # Reject names that are not valid shell variable names.
1312 case $ac_envvar in #(
1313 '' | [0-9]* | *[!_$as_cr_alnum]* )
1314 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1315 esac
1316 eval $ac_envvar=\$ac_optarg
1317 export $ac_envvar ;;
1318
1319 *)
1320 # FIXME: should be removed in autoconf 3.0.
1321 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1322 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1323 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1324 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1325 ;;
1326
1327 esac
1328 done
1329
1330 if test -n "$ac_prev"; then
1331 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1332 as_fn_error $? "missing argument to $ac_option"
1333 fi
1334
1335 if test -n "$ac_unrecognized_opts"; then
1336 case $enable_option_checking in
1337 no) ;;
1338 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1339 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1340 esac
1341 fi
1342
1343 # Check all directory arguments for consistency.
1344 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1345 datadir sysconfdir sharedstatedir localstatedir includedir \
1346 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1347 libdir localedir mandir
1348 do
1349 eval ac_val=\$$ac_var
1350 # Remove trailing slashes.
1351 case $ac_val in
1352 */ )
1353 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1354 eval $ac_var=\$ac_val;;
1355 esac
1356 # Be sure to have absolute directory names.
1357 case $ac_val in
1358 [\\/$]* | ?:[\\/]* ) continue;;
1359 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1360 esac
1361 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1362 done
1363
1364 # There might be people who depend on the old broken behavior: `$host'
1365 # used to hold the argument of --host etc.
1366 # FIXME: To remove some day.
1367 build=$build_alias
1368 host=$host_alias
1369 target=$target_alias
1370
1371 # FIXME: To remove some day.
1372 if test "x$host_alias" != x; then
1373 if test "x$build_alias" = x; then
1374 cross_compiling=maybe
1375 elif test "x$build_alias" != "x$host_alias"; then
1376 cross_compiling=yes
1377 fi
1378 fi
1379
1380 ac_tool_prefix=
1381 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1382
1383 test "$silent" = yes && exec 6>/dev/null
1384
1385
1386 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1387 ac_ls_di=`ls -di .` &&
1388 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1389 as_fn_error $? "working directory cannot be determined"
1390 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1391 as_fn_error $? "pwd does not report name of working directory"
1392
1393
1394 # Find the source files, if location was not specified.
1395 if test -z "$srcdir"; then
1396 ac_srcdir_defaulted=yes
1397 # Try the directory containing this script, then the parent directory.
1398 ac_confdir=`$as_dirname -- "$as_myself" ||
1399 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1400 X"$as_myself" : 'X\(//\)[^/]' \| \
1401 X"$as_myself" : 'X\(//\)$' \| \
1402 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1403 $as_echo X"$as_myself" |
1404 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1405 s//\1/
1406 q
1407 }
1408 /^X\(\/\/\)[^/].*/{
1409 s//\1/
1410 q
1411 }
1412 /^X\(\/\/\)$/{
1413 s//\1/
1414 q
1415 }
1416 /^X\(\/\).*/{
1417 s//\1/
1418 q
1419 }
1420 s/.*/./; q'`
1421 srcdir=$ac_confdir
1422 if test ! -r "$srcdir/$ac_unique_file"; then
1423 srcdir=..
1424 fi
1425 else
1426 ac_srcdir_defaulted=no
1427 fi
1428 if test ! -r "$srcdir/$ac_unique_file"; then
1429 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1430 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1431 fi
1432 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1433 ac_abs_confdir=`(
1434 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1435 pwd)`
1436 # When building in place, set srcdir=.
1437 if test "$ac_abs_confdir" = "$ac_pwd"; then
1438 srcdir=.
1439 fi
1440 # Remove unnecessary trailing slashes from srcdir.
1441 # Double slashes in file names in object file debugging info
1442 # mess up M-x gdb in Emacs.
1443 case $srcdir in
1444 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1445 esac
1446 for ac_var in $ac_precious_vars; do
1447 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1448 eval ac_env_${ac_var}_value=\$${ac_var}
1449 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1450 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1451 done
1452
1453 #
1454 # Report the --help message.
1455 #
1456 if test "$ac_init_help" = "long"; then
1457 # Omit some internal or obsolete options to make the list less imposing.
1458 # This message is too long to be a string in the A/UX 3.1 sh.
1459 cat <<_ACEOF
1460 \`configure' configures this package to adapt to many kinds of systems.
1461
1462 Usage: $0 [OPTION]... [VAR=VALUE]...
1463
1464 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1465 VAR=VALUE. See below for descriptions of some of the useful variables.
1466
1467 Defaults for the options are specified in brackets.
1468
1469 Configuration:
1470 -h, --help display this help and exit
1471 --help=short display options specific to this package
1472 --help=recursive display the short help of all the included packages
1473 -V, --version display version information and exit
1474 -q, --quiet, --silent do not print \`checking ...' messages
1475 --cache-file=FILE cache test results in FILE [disabled]
1476 -C, --config-cache alias for \`--cache-file=config.cache'
1477 -n, --no-create do not create output files
1478 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1479
1480 Installation directories:
1481 --prefix=PREFIX install architecture-independent files in PREFIX
1482 [$ac_default_prefix]
1483 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1484 [PREFIX]
1485
1486 By default, \`make install' will install all the files in
1487 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1488 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1489 for instance \`--prefix=\$HOME'.
1490
1491 For better control, use the options below.
1492
1493 Fine tuning of the installation directories:
1494 --bindir=DIR user executables [EPREFIX/bin]
1495 --sbindir=DIR system admin executables [EPREFIX/sbin]
1496 --libexecdir=DIR program executables [EPREFIX/libexec]
1497 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1498 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1499 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1500 --libdir=DIR object code libraries [EPREFIX/lib]
1501 --includedir=DIR C header files [PREFIX/include]
1502 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1503 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1504 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1505 --infodir=DIR info documentation [DATAROOTDIR/info]
1506 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1507 --mandir=DIR man documentation [DATAROOTDIR/man]
1508 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1509 --htmldir=DIR html documentation [DOCDIR]
1510 --dvidir=DIR dvi documentation [DOCDIR]
1511 --pdfdir=DIR pdf documentation [DOCDIR]
1512 --psdir=DIR ps documentation [DOCDIR]
1513 _ACEOF
1514
1515 cat <<\_ACEOF
1516
1517 Program names:
1518 --program-prefix=PREFIX prepend PREFIX to installed program names
1519 --program-suffix=SUFFIX append SUFFIX to installed program names
1520 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1521
1522 X features:
1523 --x-includes=DIR X include files are in DIR
1524 --x-libraries=DIR X library files are in DIR
1525
1526 System types:
1527 --build=BUILD configure for building on BUILD [guessed]
1528 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1529 --target=TARGET configure for building compilers for TARGET [HOST]
1530 _ACEOF
1531 fi
1532
1533 if test -n "$ac_init_help"; then
1534
1535 cat <<\_ACEOF
1536
1537 Optional Features:
1538 --disable-option-checking ignore unrecognized --enable/--with options
1539 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1540 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1541 --enable-maintainer-mode
1542 enable make rules and dependencies not useful (and
1543 sometimes confusing) to the casual installer
1544 --enable-plugins Enable support for plugins
1545 --disable-largefile omit support for large files
1546 --enable-targets=TARGETS
1547 alternative target configurations
1548 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
1549 --disable-gdbmi disable machine-interface (MI)
1550 --enable-tui enable full-screen terminal user interface (TUI)
1551 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1552 --enable-profiling enable profiling of GDB
1553 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
1554 --disable-rpath do not hardcode runtime library paths
1555 --enable-libmcheck Try linking with -lmcheck if available
1556 --enable-werror treat compile warnings as errors
1557 --enable-build-warnings enable build-time compiler warnings if gcc is used
1558 --enable-gdb-build-warnings
1559 enable GDB specific build-time compiler warnings if
1560 gcc is used
1561 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
1562 --enable-sim link gdb with simulator
1563 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1564 is auto)
1565 --enable-unit-tests Enable the inclusion of unit tests when compiling
1566 GDB
1567
1568 Optional Packages:
1569 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1570 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1571 --with-separate-debug-dir=PATH
1572 look for global separate debug info in this path
1573 [LIBDIR/debug]
1574 --with-gdb-datadir=PATH look for global separate data files in this path
1575 [DATADIR/gdb]
1576 --with-relocated-sources=PATH
1577 automatically relocate this path for source files
1578 --with-auto-load-dir=PATH
1579 directories from which to load auto-loaded scripts
1580 [$debugdir:$datadir/auto-load]
1581 --with-auto-load-safe-path=PATH
1582 directories safe to hold auto-loaded files
1583 [--with-auto-load-dir]
1584 --without-auto-load-safe-path
1585 do not restrict auto-loaded files locations
1586 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
1587 --with-curses use the curses library instead of the termcap
1588 library
1589 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1590 --with-bugurl=URL Direct users to URL to report a bug
1591 --with-system-zlib use installed libz
1592 --with-gnu-ld assume the C compiler uses GNU ld default=no
1593 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1594 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1595 --with-iconv-bin=PATH specify where to find the iconv program
1596 --with-system-readline use installed readline library
1597 --with-jit-reader-dir=PATH
1598 directory to load the JIT readers from
1599 --with-expat include expat support (auto/yes/no)
1600 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1601 --without-libexpat-prefix don't search for libexpat in includedir and libdir
1602 --with-mpfr include MPFR support (auto/yes/no)
1603 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1604 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
1605 --with-python[=PYTHON] include python support
1606 (auto/yes/no/<python-program>)
1607 --with-guile[=GUILE] include guile support
1608 (auto/yes/no/<guile-version>/<pkg-config-program>)
1609 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1610 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1611 --without-libipt-prefix don't search for libipt in includedir and libdir
1612 --without-included-regex
1613 don't use included regex; this is the default on
1614 systems with version 2 of the GNU C library (use
1615 with caution on other system)
1616 --with-sysroot[=DIR] search for usr/lib et al within DIR
1617 --with-system-gdbinit=PATH
1618 automatically load a system-wide gdbinit file
1619 --with-lzma support lzma compression (auto/yes/no)
1620 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1621 --without-liblzma-prefix don't search for liblzma in includedir and libdir
1622 --with-tcl directory containing tcl configuration (tclConfig.sh)
1623 --with-tk directory containing tk configuration (tkConfig.sh)
1624 --with-x use the X Window System
1625 --with-babeltrace include babeltrace support (auto/yes/no)
1626 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1627 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
1628
1629 Some influential environment variables:
1630 CC C compiler command
1631 CFLAGS C compiler flags
1632 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1633 nonstandard directory <lib dir>
1634 LIBS libraries to pass to the linker, e.g. -l<library>
1635 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1636 you have headers in a nonstandard directory <include dir>
1637 CXX C++ compiler command
1638 CXXFLAGS C++ compiler flags
1639 CPP C preprocessor
1640 MAKEINFO Parent configure detects if it is of sufficient version.
1641 MAKEINFOFLAGS
1642 Parameters for MAKEINFO.
1643 YACC The `Yet Another Compiler Compiler' implementation to use.
1644 Defaults to the first program found out of: `bison -y', `byacc',
1645 `yacc'.
1646 YFLAGS The list of arguments that will be passed by default to $YACC.
1647 This script will default YFLAGS to the empty string to avoid a
1648 default value of `-d' given by some make applications.
1649 XMKMF Path to xmkmf, Makefile generator for X Window System
1650
1651 Use these variables to override the choices made by `configure' or to help
1652 it to find libraries and programs with nonstandard names/locations.
1653
1654 Report bugs to the package provider.
1655 _ACEOF
1656 ac_status=$?
1657 fi
1658
1659 if test "$ac_init_help" = "recursive"; then
1660 # If there are subdirs, report their specific --help.
1661 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1662 test -d "$ac_dir" ||
1663 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1664 continue
1665 ac_builddir=.
1666
1667 case "$ac_dir" in
1668 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1669 *)
1670 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1671 # A ".." for each directory in $ac_dir_suffix.
1672 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1673 case $ac_top_builddir_sub in
1674 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1675 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1676 esac ;;
1677 esac
1678 ac_abs_top_builddir=$ac_pwd
1679 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1680 # for backward compatibility:
1681 ac_top_builddir=$ac_top_build_prefix
1682
1683 case $srcdir in
1684 .) # We are building in place.
1685 ac_srcdir=.
1686 ac_top_srcdir=$ac_top_builddir_sub
1687 ac_abs_top_srcdir=$ac_pwd ;;
1688 [\\/]* | ?:[\\/]* ) # Absolute name.
1689 ac_srcdir=$srcdir$ac_dir_suffix;
1690 ac_top_srcdir=$srcdir
1691 ac_abs_top_srcdir=$srcdir ;;
1692 *) # Relative name.
1693 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1694 ac_top_srcdir=$ac_top_build_prefix$srcdir
1695 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1696 esac
1697 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1698
1699 cd "$ac_dir" || { ac_status=$?; continue; }
1700 # Check for guested configure.
1701 if test -f "$ac_srcdir/configure.gnu"; then
1702 echo &&
1703 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1704 elif test -f "$ac_srcdir/configure"; then
1705 echo &&
1706 $SHELL "$ac_srcdir/configure" --help=recursive
1707 else
1708 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1709 fi || ac_status=$?
1710 cd "$ac_pwd" || { ac_status=$?; break; }
1711 done
1712 fi
1713
1714 test -n "$ac_init_help" && exit $ac_status
1715 if $ac_init_version; then
1716 cat <<\_ACEOF
1717 configure
1718 generated by GNU Autoconf 2.69
1719
1720 Copyright (C) 2012 Free Software Foundation, Inc.
1721 This configure script is free software; the Free Software Foundation
1722 gives unlimited permission to copy, distribute and modify it.
1723 _ACEOF
1724 exit
1725 fi
1726
1727 ## ------------------------ ##
1728 ## Autoconf initialization. ##
1729 ## ------------------------ ##
1730
1731 # ac_fn_c_try_compile LINENO
1732 # --------------------------
1733 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1734 ac_fn_c_try_compile ()
1735 {
1736 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1737 rm -f conftest.$ac_objext
1738 if { { ac_try="$ac_compile"
1739 case "(($ac_try" in
1740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1741 *) ac_try_echo=$ac_try;;
1742 esac
1743 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1744 $as_echo "$ac_try_echo"; } >&5
1745 (eval "$ac_compile") 2>conftest.err
1746 ac_status=$?
1747 if test -s conftest.err; then
1748 grep -v '^ *+' conftest.err >conftest.er1
1749 cat conftest.er1 >&5
1750 mv -f conftest.er1 conftest.err
1751 fi
1752 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1753 test $ac_status = 0; } && {
1754 test -z "$ac_c_werror_flag" ||
1755 test ! -s conftest.err
1756 } && test -s conftest.$ac_objext; then :
1757 ac_retval=0
1758 else
1759 $as_echo "$as_me: failed program was:" >&5
1760 sed 's/^/| /' conftest.$ac_ext >&5
1761
1762 ac_retval=1
1763 fi
1764 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1765 as_fn_set_status $ac_retval
1766
1767 } # ac_fn_c_try_compile
1768
1769 # ac_fn_cxx_try_compile LINENO
1770 # ----------------------------
1771 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1772 ac_fn_cxx_try_compile ()
1773 {
1774 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1775 rm -f conftest.$ac_objext
1776 if { { ac_try="$ac_compile"
1777 case "(($ac_try" in
1778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1779 *) ac_try_echo=$ac_try;;
1780 esac
1781 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1782 $as_echo "$ac_try_echo"; } >&5
1783 (eval "$ac_compile") 2>conftest.err
1784 ac_status=$?
1785 if test -s conftest.err; then
1786 grep -v '^ *+' conftest.err >conftest.er1
1787 cat conftest.er1 >&5
1788 mv -f conftest.er1 conftest.err
1789 fi
1790 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1791 test $ac_status = 0; } && {
1792 test -z "$ac_cxx_werror_flag" ||
1793 test ! -s conftest.err
1794 } && test -s conftest.$ac_objext; then :
1795 ac_retval=0
1796 else
1797 $as_echo "$as_me: failed program was:" >&5
1798 sed 's/^/| /' conftest.$ac_ext >&5
1799
1800 ac_retval=1
1801 fi
1802 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1803 as_fn_set_status $ac_retval
1804
1805 } # ac_fn_cxx_try_compile
1806
1807 # ac_fn_c_try_cpp LINENO
1808 # ----------------------
1809 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1810 ac_fn_c_try_cpp ()
1811 {
1812 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1813 if { { ac_try="$ac_cpp conftest.$ac_ext"
1814 case "(($ac_try" in
1815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1816 *) ac_try_echo=$ac_try;;
1817 esac
1818 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1819 $as_echo "$ac_try_echo"; } >&5
1820 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1821 ac_status=$?
1822 if test -s conftest.err; then
1823 grep -v '^ *+' conftest.err >conftest.er1
1824 cat conftest.er1 >&5
1825 mv -f conftest.er1 conftest.err
1826 fi
1827 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1828 test $ac_status = 0; } > conftest.i && {
1829 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1830 test ! -s conftest.err
1831 }; then :
1832 ac_retval=0
1833 else
1834 $as_echo "$as_me: failed program was:" >&5
1835 sed 's/^/| /' conftest.$ac_ext >&5
1836
1837 ac_retval=1
1838 fi
1839 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1840 as_fn_set_status $ac_retval
1841
1842 } # ac_fn_c_try_cpp
1843
1844 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1845 # -------------------------------------------------------
1846 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1847 # the include files in INCLUDES and setting the cache variable VAR
1848 # accordingly.
1849 ac_fn_c_check_header_mongrel ()
1850 {
1851 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1852 if eval \${$3+:} false; then :
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1854 $as_echo_n "checking for $2... " >&6; }
1855 if eval \${$3+:} false; then :
1856 $as_echo_n "(cached) " >&6
1857 fi
1858 eval ac_res=\$$3
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1860 $as_echo "$ac_res" >&6; }
1861 else
1862 # Is the header compilable?
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1864 $as_echo_n "checking $2 usability... " >&6; }
1865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1866 /* end confdefs.h. */
1867 $4
1868 #include <$2>
1869 _ACEOF
1870 if ac_fn_c_try_compile "$LINENO"; then :
1871 ac_header_compiler=yes
1872 else
1873 ac_header_compiler=no
1874 fi
1875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1877 $as_echo "$ac_header_compiler" >&6; }
1878
1879 # Is the header present?
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1881 $as_echo_n "checking $2 presence... " >&6; }
1882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883 /* end confdefs.h. */
1884 #include <$2>
1885 _ACEOF
1886 if ac_fn_c_try_cpp "$LINENO"; then :
1887 ac_header_preproc=yes
1888 else
1889 ac_header_preproc=no
1890 fi
1891 rm -f conftest.err conftest.i conftest.$ac_ext
1892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1893 $as_echo "$ac_header_preproc" >&6; }
1894
1895 # So? What about this header?
1896 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1897 yes:no: )
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1899 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1901 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1902 ;;
1903 no:yes:* )
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1905 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1907 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1909 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1911 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1913 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1914 ;;
1915 esac
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1917 $as_echo_n "checking for $2... " >&6; }
1918 if eval \${$3+:} false; then :
1919 $as_echo_n "(cached) " >&6
1920 else
1921 eval "$3=\$ac_header_compiler"
1922 fi
1923 eval ac_res=\$$3
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1925 $as_echo "$ac_res" >&6; }
1926 fi
1927 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1928
1929 } # ac_fn_c_check_header_mongrel
1930
1931 # ac_fn_c_try_run LINENO
1932 # ----------------------
1933 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1934 # that executables *can* be run.
1935 ac_fn_c_try_run ()
1936 {
1937 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1938 if { { ac_try="$ac_link"
1939 case "(($ac_try" in
1940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1941 *) ac_try_echo=$ac_try;;
1942 esac
1943 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1944 $as_echo "$ac_try_echo"; } >&5
1945 (eval "$ac_link") 2>&5
1946 ac_status=$?
1947 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1948 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1949 { { case "(($ac_try" in
1950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1951 *) ac_try_echo=$ac_try;;
1952 esac
1953 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1954 $as_echo "$ac_try_echo"; } >&5
1955 (eval "$ac_try") 2>&5
1956 ac_status=$?
1957 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1958 test $ac_status = 0; }; }; then :
1959 ac_retval=0
1960 else
1961 $as_echo "$as_me: program exited with status $ac_status" >&5
1962 $as_echo "$as_me: failed program was:" >&5
1963 sed 's/^/| /' conftest.$ac_ext >&5
1964
1965 ac_retval=$ac_status
1966 fi
1967 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1968 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1969 as_fn_set_status $ac_retval
1970
1971 } # ac_fn_c_try_run
1972
1973 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1974 # -------------------------------------------------------
1975 # Tests whether HEADER exists and can be compiled using the include files in
1976 # INCLUDES, setting the cache variable VAR accordingly.
1977 ac_fn_c_check_header_compile ()
1978 {
1979 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1981 $as_echo_n "checking for $2... " >&6; }
1982 if eval \${$3+:} false; then :
1983 $as_echo_n "(cached) " >&6
1984 else
1985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1986 /* end confdefs.h. */
1987 $4
1988 #include <$2>
1989 _ACEOF
1990 if ac_fn_c_try_compile "$LINENO"; then :
1991 eval "$3=yes"
1992 else
1993 eval "$3=no"
1994 fi
1995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1996 fi
1997 eval ac_res=\$$3
1998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1999 $as_echo "$ac_res" >&6; }
2000 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2001
2002 } # ac_fn_c_check_header_compile
2003
2004 # ac_fn_c_try_link LINENO
2005 # -----------------------
2006 # Try to link conftest.$ac_ext, and return whether this succeeded.
2007 ac_fn_c_try_link ()
2008 {
2009 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010 rm -f conftest.$ac_objext conftest$ac_exeext
2011 if { { ac_try="$ac_link"
2012 case "(($ac_try" in
2013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2014 *) ac_try_echo=$ac_try;;
2015 esac
2016 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2017 $as_echo "$ac_try_echo"; } >&5
2018 (eval "$ac_link") 2>conftest.err
2019 ac_status=$?
2020 if test -s conftest.err; then
2021 grep -v '^ *+' conftest.err >conftest.er1
2022 cat conftest.er1 >&5
2023 mv -f conftest.er1 conftest.err
2024 fi
2025 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2026 test $ac_status = 0; } && {
2027 test -z "$ac_c_werror_flag" ||
2028 test ! -s conftest.err
2029 } && test -s conftest$ac_exeext && {
2030 test "$cross_compiling" = yes ||
2031 test -x conftest$ac_exeext
2032 }; then :
2033 ac_retval=0
2034 else
2035 $as_echo "$as_me: failed program was:" >&5
2036 sed 's/^/| /' conftest.$ac_ext >&5
2037
2038 ac_retval=1
2039 fi
2040 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2041 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2042 # interfere with the next link command; also delete a directory that is
2043 # left behind by Apple's compiler. We do this before executing the actions.
2044 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2045 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2046 as_fn_set_status $ac_retval
2047
2048 } # ac_fn_c_try_link
2049
2050 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2051 # --------------------------------------------
2052 # Tries to find the compile-time value of EXPR in a program that includes
2053 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2054 # computed
2055 ac_fn_c_compute_int ()
2056 {
2057 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2058 if test "$cross_compiling" = yes; then
2059 # Depending upon the size, compute the lo and hi bounds.
2060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061 /* end confdefs.h. */
2062 $4
2063 int
2064 main ()
2065 {
2066 static int test_array [1 - 2 * !(($2) >= 0)];
2067 test_array [0] = 0;
2068 return test_array [0];
2069
2070 ;
2071 return 0;
2072 }
2073 _ACEOF
2074 if ac_fn_c_try_compile "$LINENO"; then :
2075 ac_lo=0 ac_mid=0
2076 while :; do
2077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2078 /* end confdefs.h. */
2079 $4
2080 int
2081 main ()
2082 {
2083 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2084 test_array [0] = 0;
2085 return test_array [0];
2086
2087 ;
2088 return 0;
2089 }
2090 _ACEOF
2091 if ac_fn_c_try_compile "$LINENO"; then :
2092 ac_hi=$ac_mid; break
2093 else
2094 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2095 if test $ac_lo -le $ac_mid; then
2096 ac_lo= ac_hi=
2097 break
2098 fi
2099 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2100 fi
2101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102 done
2103 else
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105 /* end confdefs.h. */
2106 $4
2107 int
2108 main ()
2109 {
2110 static int test_array [1 - 2 * !(($2) < 0)];
2111 test_array [0] = 0;
2112 return test_array [0];
2113
2114 ;
2115 return 0;
2116 }
2117 _ACEOF
2118 if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_hi=-1 ac_mid=-1
2120 while :; do
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122 /* end confdefs.h. */
2123 $4
2124 int
2125 main ()
2126 {
2127 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2128 test_array [0] = 0;
2129 return test_array [0];
2130
2131 ;
2132 return 0;
2133 }
2134 _ACEOF
2135 if ac_fn_c_try_compile "$LINENO"; then :
2136 ac_lo=$ac_mid; break
2137 else
2138 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2139 if test $ac_mid -le $ac_hi; then
2140 ac_lo= ac_hi=
2141 break
2142 fi
2143 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2144 fi
2145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2146 done
2147 else
2148 ac_lo= ac_hi=
2149 fi
2150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2151 fi
2152 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2153 # Binary search between lo and hi bounds.
2154 while test "x$ac_lo" != "x$ac_hi"; do
2155 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157 /* end confdefs.h. */
2158 $4
2159 int
2160 main ()
2161 {
2162 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2163 test_array [0] = 0;
2164 return test_array [0];
2165
2166 ;
2167 return 0;
2168 }
2169 _ACEOF
2170 if ac_fn_c_try_compile "$LINENO"; then :
2171 ac_hi=$ac_mid
2172 else
2173 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2174 fi
2175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2176 done
2177 case $ac_lo in #((
2178 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2179 '') ac_retval=1 ;;
2180 esac
2181 else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183 /* end confdefs.h. */
2184 $4
2185 static long int longval () { return $2; }
2186 static unsigned long int ulongval () { return $2; }
2187 #include <stdio.h>
2188 #include <stdlib.h>
2189 int
2190 main ()
2191 {
2192
2193 FILE *f = fopen ("conftest.val", "w");
2194 if (! f)
2195 return 1;
2196 if (($2) < 0)
2197 {
2198 long int i = longval ();
2199 if (i != ($2))
2200 return 1;
2201 fprintf (f, "%ld", i);
2202 }
2203 else
2204 {
2205 unsigned long int i = ulongval ();
2206 if (i != ($2))
2207 return 1;
2208 fprintf (f, "%lu", i);
2209 }
2210 /* Do not output a trailing newline, as this causes \r\n confusion
2211 on some platforms. */
2212 return ferror (f) || fclose (f) != 0;
2213
2214 ;
2215 return 0;
2216 }
2217 _ACEOF
2218 if ac_fn_c_try_run "$LINENO"; then :
2219 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2220 else
2221 ac_retval=1
2222 fi
2223 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2224 conftest.$ac_objext conftest.beam conftest.$ac_ext
2225 rm -f conftest.val
2226
2227 fi
2228 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2229 as_fn_set_status $ac_retval
2230
2231 } # ac_fn_c_compute_int
2232
2233 # ac_fn_c_check_func LINENO FUNC VAR
2234 # ----------------------------------
2235 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2236 ac_fn_c_check_func ()
2237 {
2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2240 $as_echo_n "checking for $2... " >&6; }
2241 if eval \${$3+:} false; then :
2242 $as_echo_n "(cached) " >&6
2243 else
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245 /* end confdefs.h. */
2246 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2247 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2248 #define $2 innocuous_$2
2249
2250 /* System header to define __stub macros and hopefully few prototypes,
2251 which can conflict with char $2 (); below.
2252 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2253 <limits.h> exists even on freestanding compilers. */
2254
2255 #ifdef __STDC__
2256 # include <limits.h>
2257 #else
2258 # include <assert.h>
2259 #endif
2260
2261 #undef $2
2262
2263 /* Override any GCC internal prototype to avoid an error.
2264 Use char because int might match the return type of a GCC
2265 builtin and then its argument prototype would still apply. */
2266 #ifdef __cplusplus
2267 extern "C"
2268 #endif
2269 char $2 ();
2270 /* The GNU C library defines this for functions which it implements
2271 to always fail with ENOSYS. Some functions are actually named
2272 something starting with __ and the normal name is an alias. */
2273 #if defined __stub_$2 || defined __stub___$2
2274 choke me
2275 #endif
2276
2277 int
2278 main ()
2279 {
2280 return $2 ();
2281 ;
2282 return 0;
2283 }
2284 _ACEOF
2285 if ac_fn_c_try_link "$LINENO"; then :
2286 eval "$3=yes"
2287 else
2288 eval "$3=no"
2289 fi
2290 rm -f core conftest.err conftest.$ac_objext \
2291 conftest$ac_exeext conftest.$ac_ext
2292 fi
2293 eval ac_res=\$$3
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2295 $as_echo "$ac_res" >&6; }
2296 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2297
2298 } # ac_fn_c_check_func
2299
2300 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2301 # ----------------------------------------------------
2302 # Tries to find if the field MEMBER exists in type AGGR, after including
2303 # INCLUDES, setting cache variable VAR accordingly.
2304 ac_fn_c_check_member ()
2305 {
2306 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2308 $as_echo_n "checking for $2.$3... " >&6; }
2309 if eval \${$4+:} false; then :
2310 $as_echo_n "(cached) " >&6
2311 else
2312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2313 /* end confdefs.h. */
2314 $5
2315 int
2316 main ()
2317 {
2318 static $2 ac_aggr;
2319 if (ac_aggr.$3)
2320 return 0;
2321 ;
2322 return 0;
2323 }
2324 _ACEOF
2325 if ac_fn_c_try_compile "$LINENO"; then :
2326 eval "$4=yes"
2327 else
2328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329 /* end confdefs.h. */
2330 $5
2331 int
2332 main ()
2333 {
2334 static $2 ac_aggr;
2335 if (sizeof ac_aggr.$3)
2336 return 0;
2337 ;
2338 return 0;
2339 }
2340 _ACEOF
2341 if ac_fn_c_try_compile "$LINENO"; then :
2342 eval "$4=yes"
2343 else
2344 eval "$4=no"
2345 fi
2346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2347 fi
2348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2349 fi
2350 eval ac_res=\$$4
2351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2352 $as_echo "$ac_res" >&6; }
2353 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2354
2355 } # ac_fn_c_check_member
2356
2357 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2358 # -------------------------------------------
2359 # Tests whether TYPE exists after having included INCLUDES, setting cache
2360 # variable VAR accordingly.
2361 ac_fn_c_check_type ()
2362 {
2363 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2365 $as_echo_n "checking for $2... " >&6; }
2366 if eval \${$3+:} false; then :
2367 $as_echo_n "(cached) " >&6
2368 else
2369 eval "$3=no"
2370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2371 /* end confdefs.h. */
2372 $4
2373 int
2374 main ()
2375 {
2376 if (sizeof ($2))
2377 return 0;
2378 ;
2379 return 0;
2380 }
2381 _ACEOF
2382 if ac_fn_c_try_compile "$LINENO"; then :
2383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2384 /* end confdefs.h. */
2385 $4
2386 int
2387 main ()
2388 {
2389 if (sizeof (($2)))
2390 return 0;
2391 ;
2392 return 0;
2393 }
2394 _ACEOF
2395 if ac_fn_c_try_compile "$LINENO"; then :
2396
2397 else
2398 eval "$3=yes"
2399 fi
2400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2401 fi
2402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2403 fi
2404 eval ac_res=\$$3
2405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2406 $as_echo "$ac_res" >&6; }
2407 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2408
2409 } # ac_fn_c_check_type
2410
2411 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2412 # ---------------------------------------------
2413 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2414 # accordingly.
2415 ac_fn_c_check_decl ()
2416 {
2417 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2418 as_decl_name=`echo $2|sed 's/ *(.*//'`
2419 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2421 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2422 if eval \${$3+:} false; then :
2423 $as_echo_n "(cached) " >&6
2424 else
2425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2426 /* end confdefs.h. */
2427 $4
2428 int
2429 main ()
2430 {
2431 #ifndef $as_decl_name
2432 #ifdef __cplusplus
2433 (void) $as_decl_use;
2434 #else
2435 (void) $as_decl_name;
2436 #endif
2437 #endif
2438
2439 ;
2440 return 0;
2441 }
2442 _ACEOF
2443 if ac_fn_c_try_compile "$LINENO"; then :
2444 eval "$3=yes"
2445 else
2446 eval "$3=no"
2447 fi
2448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2449 fi
2450 eval ac_res=\$$3
2451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2452 $as_echo "$ac_res" >&6; }
2453 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2454
2455 } # ac_fn_c_check_decl
2456
2457 # ac_fn_cxx_try_link LINENO
2458 # -------------------------
2459 # Try to link conftest.$ac_ext, and return whether this succeeded.
2460 ac_fn_cxx_try_link ()
2461 {
2462 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2463 rm -f conftest.$ac_objext conftest$ac_exeext
2464 if { { ac_try="$ac_link"
2465 case "(($ac_try" in
2466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2467 *) ac_try_echo=$ac_try;;
2468 esac
2469 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2470 $as_echo "$ac_try_echo"; } >&5
2471 (eval "$ac_link") 2>conftest.err
2472 ac_status=$?
2473 if test -s conftest.err; then
2474 grep -v '^ *+' conftest.err >conftest.er1
2475 cat conftest.er1 >&5
2476 mv -f conftest.er1 conftest.err
2477 fi
2478 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2479 test $ac_status = 0; } && {
2480 test -z "$ac_cxx_werror_flag" ||
2481 test ! -s conftest.err
2482 } && test -s conftest$ac_exeext && {
2483 test "$cross_compiling" = yes ||
2484 test -x conftest$ac_exeext
2485 }; then :
2486 ac_retval=0
2487 else
2488 $as_echo "$as_me: failed program was:" >&5
2489 sed 's/^/| /' conftest.$ac_ext >&5
2490
2491 ac_retval=1
2492 fi
2493 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2494 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2495 # interfere with the next link command; also delete a directory that is
2496 # left behind by Apple's compiler. We do this before executing the actions.
2497 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2498 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2499 as_fn_set_status $ac_retval
2500
2501 } # ac_fn_cxx_try_link
2502 cat >config.log <<_ACEOF
2503 This file contains any messages produced by compilers while
2504 running configure, to aid debugging if configure makes a mistake.
2505
2506 It was created by $as_me, which was
2507 generated by GNU Autoconf 2.69. Invocation command line was
2508
2509 $ $0 $@
2510
2511 _ACEOF
2512 exec 5>>config.log
2513 {
2514 cat <<_ASUNAME
2515 ## --------- ##
2516 ## Platform. ##
2517 ## --------- ##
2518
2519 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2520 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2521 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2522 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2523 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2524
2525 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2526 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2527
2528 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2529 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2530 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2531 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2532 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2533 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2534 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2535
2536 _ASUNAME
2537
2538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2539 for as_dir in $PATH
2540 do
2541 IFS=$as_save_IFS
2542 test -z "$as_dir" && as_dir=.
2543 $as_echo "PATH: $as_dir"
2544 done
2545 IFS=$as_save_IFS
2546
2547 } >&5
2548
2549 cat >&5 <<_ACEOF
2550
2551
2552 ## ----------- ##
2553 ## Core tests. ##
2554 ## ----------- ##
2555
2556 _ACEOF
2557
2558
2559 # Keep a trace of the command line.
2560 # Strip out --no-create and --no-recursion so they do not pile up.
2561 # Strip out --silent because we don't want to record it for future runs.
2562 # Also quote any args containing shell meta-characters.
2563 # Make two passes to allow for proper duplicate-argument suppression.
2564 ac_configure_args=
2565 ac_configure_args0=
2566 ac_configure_args1=
2567 ac_must_keep_next=false
2568 for ac_pass in 1 2
2569 do
2570 for ac_arg
2571 do
2572 case $ac_arg in
2573 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2574 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2575 | -silent | --silent | --silen | --sile | --sil)
2576 continue ;;
2577 *\'*)
2578 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2579 esac
2580 case $ac_pass in
2581 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2582 2)
2583 as_fn_append ac_configure_args1 " '$ac_arg'"
2584 if test $ac_must_keep_next = true; then
2585 ac_must_keep_next=false # Got value, back to normal.
2586 else
2587 case $ac_arg in
2588 *=* | --config-cache | -C | -disable-* | --disable-* \
2589 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2590 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2591 | -with-* | --with-* | -without-* | --without-* | --x)
2592 case "$ac_configure_args0 " in
2593 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2594 esac
2595 ;;
2596 -* ) ac_must_keep_next=true ;;
2597 esac
2598 fi
2599 as_fn_append ac_configure_args " '$ac_arg'"
2600 ;;
2601 esac
2602 done
2603 done
2604 { ac_configure_args0=; unset ac_configure_args0;}
2605 { ac_configure_args1=; unset ac_configure_args1;}
2606
2607 # When interrupted or exit'd, cleanup temporary files, and complete
2608 # config.log. We remove comments because anyway the quotes in there
2609 # would cause problems or look ugly.
2610 # WARNING: Use '\'' to represent an apostrophe within the trap.
2611 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2612 trap 'exit_status=$?
2613 # Save into config.log some information that might help in debugging.
2614 {
2615 echo
2616
2617 $as_echo "## ---------------- ##
2618 ## Cache variables. ##
2619 ## ---------------- ##"
2620 echo
2621 # The following way of writing the cache mishandles newlines in values,
2622 (
2623 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2624 eval ac_val=\$$ac_var
2625 case $ac_val in #(
2626 *${as_nl}*)
2627 case $ac_var in #(
2628 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2629 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2630 esac
2631 case $ac_var in #(
2632 _ | IFS | as_nl) ;; #(
2633 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2634 *) { eval $ac_var=; unset $ac_var;} ;;
2635 esac ;;
2636 esac
2637 done
2638 (set) 2>&1 |
2639 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2640 *${as_nl}ac_space=\ *)
2641 sed -n \
2642 "s/'\''/'\''\\\\'\'''\''/g;
2643 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2644 ;; #(
2645 *)
2646 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2647 ;;
2648 esac |
2649 sort
2650 )
2651 echo
2652
2653 $as_echo "## ----------------- ##
2654 ## Output variables. ##
2655 ## ----------------- ##"
2656 echo
2657 for ac_var in $ac_subst_vars
2658 do
2659 eval ac_val=\$$ac_var
2660 case $ac_val in
2661 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2662 esac
2663 $as_echo "$ac_var='\''$ac_val'\''"
2664 done | sort
2665 echo
2666
2667 if test -n "$ac_subst_files"; then
2668 $as_echo "## ------------------- ##
2669 ## File substitutions. ##
2670 ## ------------------- ##"
2671 echo
2672 for ac_var in $ac_subst_files
2673 do
2674 eval ac_val=\$$ac_var
2675 case $ac_val in
2676 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2677 esac
2678 $as_echo "$ac_var='\''$ac_val'\''"
2679 done | sort
2680 echo
2681 fi
2682
2683 if test -s confdefs.h; then
2684 $as_echo "## ----------- ##
2685 ## confdefs.h. ##
2686 ## ----------- ##"
2687 echo
2688 cat confdefs.h
2689 echo
2690 fi
2691 test "$ac_signal" != 0 &&
2692 $as_echo "$as_me: caught signal $ac_signal"
2693 $as_echo "$as_me: exit $exit_status"
2694 } >&5
2695 rm -f core *.core core.conftest.* &&
2696 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2697 exit $exit_status
2698 ' 0
2699 for ac_signal in 1 2 13 15; do
2700 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2701 done
2702 ac_signal=0
2703
2704 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2705 rm -f -r conftest* confdefs.h
2706
2707 $as_echo "/* confdefs.h */" > confdefs.h
2708
2709 # Predefined preprocessor variables.
2710
2711 cat >>confdefs.h <<_ACEOF
2712 #define PACKAGE_NAME "$PACKAGE_NAME"
2713 _ACEOF
2714
2715 cat >>confdefs.h <<_ACEOF
2716 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2717 _ACEOF
2718
2719 cat >>confdefs.h <<_ACEOF
2720 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2721 _ACEOF
2722
2723 cat >>confdefs.h <<_ACEOF
2724 #define PACKAGE_STRING "$PACKAGE_STRING"
2725 _ACEOF
2726
2727 cat >>confdefs.h <<_ACEOF
2728 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2729 _ACEOF
2730
2731 cat >>confdefs.h <<_ACEOF
2732 #define PACKAGE_URL "$PACKAGE_URL"
2733 _ACEOF
2734
2735
2736 # Let the site file select an alternate cache file if it wants to.
2737 # Prefer an explicitly selected file to automatically selected ones.
2738 ac_site_file1=NONE
2739 ac_site_file2=NONE
2740 if test -n "$CONFIG_SITE"; then
2741 # We do not want a PATH search for config.site.
2742 case $CONFIG_SITE in #((
2743 -*) ac_site_file1=./$CONFIG_SITE;;
2744 */*) ac_site_file1=$CONFIG_SITE;;
2745 *) ac_site_file1=./$CONFIG_SITE;;
2746 esac
2747 elif test "x$prefix" != xNONE; then
2748 ac_site_file1=$prefix/share/config.site
2749 ac_site_file2=$prefix/etc/config.site
2750 else
2751 ac_site_file1=$ac_default_prefix/share/config.site
2752 ac_site_file2=$ac_default_prefix/etc/config.site
2753 fi
2754 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2755 do
2756 test "x$ac_site_file" = xNONE && continue
2757 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2758 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2759 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2760 sed 's/^/| /' "$ac_site_file" >&5
2761 . "$ac_site_file" \
2762 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2763 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2764 as_fn_error $? "failed to load site script $ac_site_file
2765 See \`config.log' for more details" "$LINENO" 5; }
2766 fi
2767 done
2768
2769 if test -r "$cache_file"; then
2770 # Some versions of bash will fail to source /dev/null (special files
2771 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2772 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2773 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2774 $as_echo "$as_me: loading cache $cache_file" >&6;}
2775 case $cache_file in
2776 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2777 *) . "./$cache_file";;
2778 esac
2779 fi
2780 else
2781 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2782 $as_echo "$as_me: creating cache $cache_file" >&6;}
2783 >$cache_file
2784 fi
2785
2786 as_fn_append ac_header_list " stdlib.h"
2787 as_fn_append ac_header_list " unistd.h"
2788 as_fn_append ac_header_list " sys/param.h"
2789 # Check that the precious variables saved in the cache have kept the same
2790 # value.
2791 ac_cache_corrupted=false
2792 for ac_var in $ac_precious_vars; do
2793 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2794 eval ac_new_set=\$ac_env_${ac_var}_set
2795 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2796 eval ac_new_val=\$ac_env_${ac_var}_value
2797 case $ac_old_set,$ac_new_set in
2798 set,)
2799 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2800 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2801 ac_cache_corrupted=: ;;
2802 ,set)
2803 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2804 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2805 ac_cache_corrupted=: ;;
2806 ,);;
2807 *)
2808 if test "x$ac_old_val" != "x$ac_new_val"; then
2809 # differences in whitespace do not lead to failure.
2810 ac_old_val_w=`echo x $ac_old_val`
2811 ac_new_val_w=`echo x $ac_new_val`
2812 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2813 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2814 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2815 ac_cache_corrupted=:
2816 else
2817 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2818 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2819 eval $ac_var=\$ac_old_val
2820 fi
2821 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2822 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2823 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2824 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2825 fi;;
2826 esac
2827 # Pass precious variables to config.status.
2828 if test "$ac_new_set" = set; then
2829 case $ac_new_val in
2830 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2831 *) ac_arg=$ac_var=$ac_new_val ;;
2832 esac
2833 case " $ac_configure_args " in
2834 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2835 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2836 esac
2837 fi
2838 done
2839 if $ac_cache_corrupted; then
2840 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2841 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2842 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2843 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2844 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2845 fi
2846 ## -------------------- ##
2847 ## Main body of script. ##
2848 ## -------------------- ##
2849
2850 ac_ext=c
2851 ac_cpp='$CPP $CPPFLAGS'
2852 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2853 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2854 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2855
2856
2857
2858
2859
2860 ac_config_headers="$ac_config_headers config.h:config.in"
2861
2862
2863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2864 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2865 # Check whether --enable-maintainer-mode was given.
2866 if test "${enable_maintainer_mode+set}" = set; then :
2867 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2868 else
2869 USE_MAINTAINER_MODE=no
2870 fi
2871
2872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2873 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2874 if test $USE_MAINTAINER_MODE = yes; then
2875 MAINTAINER_MODE_TRUE=
2876 MAINTAINER_MODE_FALSE='#'
2877 else
2878 MAINTAINER_MODE_TRUE='#'
2879 MAINTAINER_MODE_FALSE=
2880 fi
2881
2882 MAINT=$MAINTAINER_MODE_TRUE
2883
2884
2885
2886 # Set the 'development' global.
2887 . $srcdir/../bfd/development.sh
2888
2889 ac_ext=c
2890 ac_cpp='$CPP $CPPFLAGS'
2891 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2892 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2893 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2894 if test -n "$ac_tool_prefix"; then
2895 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2896 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2898 $as_echo_n "checking for $ac_word... " >&6; }
2899 if ${ac_cv_prog_CC+:} false; then :
2900 $as_echo_n "(cached) " >&6
2901 else
2902 if test -n "$CC"; then
2903 ac_cv_prog_CC="$CC" # Let the user override the test.
2904 else
2905 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2906 for as_dir in $PATH
2907 do
2908 IFS=$as_save_IFS
2909 test -z "$as_dir" && as_dir=.
2910 for ac_exec_ext in '' $ac_executable_extensions; do
2911 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2912 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2913 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2914 break 2
2915 fi
2916 done
2917 done
2918 IFS=$as_save_IFS
2919
2920 fi
2921 fi
2922 CC=$ac_cv_prog_CC
2923 if test -n "$CC"; then
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2925 $as_echo "$CC" >&6; }
2926 else
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2928 $as_echo "no" >&6; }
2929 fi
2930
2931
2932 fi
2933 if test -z "$ac_cv_prog_CC"; then
2934 ac_ct_CC=$CC
2935 # Extract the first word of "gcc", so it can be a program name with args.
2936 set dummy gcc; ac_word=$2
2937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2938 $as_echo_n "checking for $ac_word... " >&6; }
2939 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2940 $as_echo_n "(cached) " >&6
2941 else
2942 if test -n "$ac_ct_CC"; then
2943 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2944 else
2945 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2946 for as_dir in $PATH
2947 do
2948 IFS=$as_save_IFS
2949 test -z "$as_dir" && as_dir=.
2950 for ac_exec_ext in '' $ac_executable_extensions; do
2951 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2952 ac_cv_prog_ac_ct_CC="gcc"
2953 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2954 break 2
2955 fi
2956 done
2957 done
2958 IFS=$as_save_IFS
2959
2960 fi
2961 fi
2962 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2963 if test -n "$ac_ct_CC"; then
2964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2965 $as_echo "$ac_ct_CC" >&6; }
2966 else
2967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2968 $as_echo "no" >&6; }
2969 fi
2970
2971 if test "x$ac_ct_CC" = x; then
2972 CC=""
2973 else
2974 case $cross_compiling:$ac_tool_warned in
2975 yes:)
2976 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2977 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2978 ac_tool_warned=yes ;;
2979 esac
2980 CC=$ac_ct_CC
2981 fi
2982 else
2983 CC="$ac_cv_prog_CC"
2984 fi
2985
2986 if test -z "$CC"; then
2987 if test -n "$ac_tool_prefix"; then
2988 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2989 set dummy ${ac_tool_prefix}cc; ac_word=$2
2990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2991 $as_echo_n "checking for $ac_word... " >&6; }
2992 if ${ac_cv_prog_CC+:} false; then :
2993 $as_echo_n "(cached) " >&6
2994 else
2995 if test -n "$CC"; then
2996 ac_cv_prog_CC="$CC" # Let the user override the test.
2997 else
2998 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2999 for as_dir in $PATH
3000 do
3001 IFS=$as_save_IFS
3002 test -z "$as_dir" && as_dir=.
3003 for ac_exec_ext in '' $ac_executable_extensions; do
3004 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3005 ac_cv_prog_CC="${ac_tool_prefix}cc"
3006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3007 break 2
3008 fi
3009 done
3010 done
3011 IFS=$as_save_IFS
3012
3013 fi
3014 fi
3015 CC=$ac_cv_prog_CC
3016 if test -n "$CC"; then
3017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3018 $as_echo "$CC" >&6; }
3019 else
3020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3021 $as_echo "no" >&6; }
3022 fi
3023
3024
3025 fi
3026 fi
3027 if test -z "$CC"; then
3028 # Extract the first word of "cc", so it can be a program name with args.
3029 set dummy cc; ac_word=$2
3030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3031 $as_echo_n "checking for $ac_word... " >&6; }
3032 if ${ac_cv_prog_CC+:} false; then :
3033 $as_echo_n "(cached) " >&6
3034 else
3035 if test -n "$CC"; then
3036 ac_cv_prog_CC="$CC" # Let the user override the test.
3037 else
3038 ac_prog_rejected=no
3039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3040 for as_dir in $PATH
3041 do
3042 IFS=$as_save_IFS
3043 test -z "$as_dir" && as_dir=.
3044 for ac_exec_ext in '' $ac_executable_extensions; do
3045 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3046 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3047 ac_prog_rejected=yes
3048 continue
3049 fi
3050 ac_cv_prog_CC="cc"
3051 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3052 break 2
3053 fi
3054 done
3055 done
3056 IFS=$as_save_IFS
3057
3058 if test $ac_prog_rejected = yes; then
3059 # We found a bogon in the path, so make sure we never use it.
3060 set dummy $ac_cv_prog_CC
3061 shift
3062 if test $# != 0; then
3063 # We chose a different compiler from the bogus one.
3064 # However, it has the same basename, so the bogon will be chosen
3065 # first if we set CC to just the basename; use the full file name.
3066 shift
3067 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3068 fi
3069 fi
3070 fi
3071 fi
3072 CC=$ac_cv_prog_CC
3073 if test -n "$CC"; then
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3075 $as_echo "$CC" >&6; }
3076 else
3077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3078 $as_echo "no" >&6; }
3079 fi
3080
3081
3082 fi
3083 if test -z "$CC"; then
3084 if test -n "$ac_tool_prefix"; then
3085 for ac_prog in cl.exe
3086 do
3087 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3088 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3090 $as_echo_n "checking for $ac_word... " >&6; }
3091 if ${ac_cv_prog_CC+:} false; then :
3092 $as_echo_n "(cached) " >&6
3093 else
3094 if test -n "$CC"; then
3095 ac_cv_prog_CC="$CC" # Let the user override the test.
3096 else
3097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3098 for as_dir in $PATH
3099 do
3100 IFS=$as_save_IFS
3101 test -z "$as_dir" && as_dir=.
3102 for ac_exec_ext in '' $ac_executable_extensions; do
3103 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3104 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3106 break 2
3107 fi
3108 done
3109 done
3110 IFS=$as_save_IFS
3111
3112 fi
3113 fi
3114 CC=$ac_cv_prog_CC
3115 if test -n "$CC"; then
3116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3117 $as_echo "$CC" >&6; }
3118 else
3119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3120 $as_echo "no" >&6; }
3121 fi
3122
3123
3124 test -n "$CC" && break
3125 done
3126 fi
3127 if test -z "$CC"; then
3128 ac_ct_CC=$CC
3129 for ac_prog in cl.exe
3130 do
3131 # Extract the first word of "$ac_prog", so it can be a program name with args.
3132 set dummy $ac_prog; ac_word=$2
3133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3134 $as_echo_n "checking for $ac_word... " >&6; }
3135 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3136 $as_echo_n "(cached) " >&6
3137 else
3138 if test -n "$ac_ct_CC"; then
3139 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3140 else
3141 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3142 for as_dir in $PATH
3143 do
3144 IFS=$as_save_IFS
3145 test -z "$as_dir" && as_dir=.
3146 for ac_exec_ext in '' $ac_executable_extensions; do
3147 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3148 ac_cv_prog_ac_ct_CC="$ac_prog"
3149 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3150 break 2
3151 fi
3152 done
3153 done
3154 IFS=$as_save_IFS
3155
3156 fi
3157 fi
3158 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3159 if test -n "$ac_ct_CC"; then
3160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3161 $as_echo "$ac_ct_CC" >&6; }
3162 else
3163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3164 $as_echo "no" >&6; }
3165 fi
3166
3167
3168 test -n "$ac_ct_CC" && break
3169 done
3170
3171 if test "x$ac_ct_CC" = x; then
3172 CC=""
3173 else
3174 case $cross_compiling:$ac_tool_warned in
3175 yes:)
3176 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3177 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3178 ac_tool_warned=yes ;;
3179 esac
3180 CC=$ac_ct_CC
3181 fi
3182 fi
3183
3184 fi
3185
3186
3187 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3188 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3189 as_fn_error $? "no acceptable C compiler found in \$PATH
3190 See \`config.log' for more details" "$LINENO" 5; }
3191
3192 # Provide some information about the compiler.
3193 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3194 set X $ac_compile
3195 ac_compiler=$2
3196 for ac_option in --version -v -V -qversion; do
3197 { { ac_try="$ac_compiler $ac_option >&5"
3198 case "(($ac_try" in
3199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3200 *) ac_try_echo=$ac_try;;
3201 esac
3202 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3203 $as_echo "$ac_try_echo"; } >&5
3204 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3205 ac_status=$?
3206 if test -s conftest.err; then
3207 sed '10a\
3208 ... rest of stderr output deleted ...
3209 10q' conftest.err >conftest.er1
3210 cat conftest.er1 >&5
3211 fi
3212 rm -f conftest.er1 conftest.err
3213 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3214 test $ac_status = 0; }
3215 done
3216
3217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3218 /* end confdefs.h. */
3219
3220 int
3221 main ()
3222 {
3223
3224 ;
3225 return 0;
3226 }
3227 _ACEOF
3228 ac_clean_files_save=$ac_clean_files
3229 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3230 # Try to create an executable without -o first, disregard a.out.
3231 # It will help us diagnose broken compilers, and finding out an intuition
3232 # of exeext.
3233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3234 $as_echo_n "checking whether the C compiler works... " >&6; }
3235 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3236
3237 # The possible output files:
3238 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3239
3240 ac_rmfiles=
3241 for ac_file in $ac_files
3242 do
3243 case $ac_file in
3244 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3245 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3246 esac
3247 done
3248 rm -f $ac_rmfiles
3249
3250 if { { ac_try="$ac_link_default"
3251 case "(($ac_try" in
3252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3253 *) ac_try_echo=$ac_try;;
3254 esac
3255 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3256 $as_echo "$ac_try_echo"; } >&5
3257 (eval "$ac_link_default") 2>&5
3258 ac_status=$?
3259 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3260 test $ac_status = 0; }; then :
3261 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3262 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3263 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3264 # so that the user can short-circuit this test for compilers unknown to
3265 # Autoconf.
3266 for ac_file in $ac_files ''
3267 do
3268 test -f "$ac_file" || continue
3269 case $ac_file in
3270 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3271 ;;
3272 [ab].out )
3273 # We found the default executable, but exeext='' is most
3274 # certainly right.
3275 break;;
3276 *.* )
3277 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3278 then :; else
3279 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3280 fi
3281 # We set ac_cv_exeext here because the later test for it is not
3282 # safe: cross compilers may not add the suffix if given an `-o'
3283 # argument, so we may need to know it at that point already.
3284 # Even if this section looks crufty: it has the advantage of
3285 # actually working.
3286 break;;
3287 * )
3288 break;;
3289 esac
3290 done
3291 test "$ac_cv_exeext" = no && ac_cv_exeext=
3292
3293 else
3294 ac_file=''
3295 fi
3296 if test -z "$ac_file"; then :
3297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3298 $as_echo "no" >&6; }
3299 $as_echo "$as_me: failed program was:" >&5
3300 sed 's/^/| /' conftest.$ac_ext >&5
3301
3302 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3303 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3304 as_fn_error 77 "C compiler cannot create executables
3305 See \`config.log' for more details" "$LINENO" 5; }
3306 else
3307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3308 $as_echo "yes" >&6; }
3309 fi
3310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3311 $as_echo_n "checking for C compiler default output file name... " >&6; }
3312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3313 $as_echo "$ac_file" >&6; }
3314 ac_exeext=$ac_cv_exeext
3315
3316 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3317 ac_clean_files=$ac_clean_files_save
3318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3319 $as_echo_n "checking for suffix of executables... " >&6; }
3320 if { { ac_try="$ac_link"
3321 case "(($ac_try" in
3322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3323 *) ac_try_echo=$ac_try;;
3324 esac
3325 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3326 $as_echo "$ac_try_echo"; } >&5
3327 (eval "$ac_link") 2>&5
3328 ac_status=$?
3329 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3330 test $ac_status = 0; }; then :
3331 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3332 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3333 # work properly (i.e., refer to `conftest.exe'), while it won't with
3334 # `rm'.
3335 for ac_file in conftest.exe conftest conftest.*; do
3336 test -f "$ac_file" || continue
3337 case $ac_file in
3338 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3339 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3340 break;;
3341 * ) break;;
3342 esac
3343 done
3344 else
3345 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3346 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3347 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3348 See \`config.log' for more details" "$LINENO" 5; }
3349 fi
3350 rm -f conftest conftest$ac_cv_exeext
3351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3352 $as_echo "$ac_cv_exeext" >&6; }
3353
3354 rm -f conftest.$ac_ext
3355 EXEEXT=$ac_cv_exeext
3356 ac_exeext=$EXEEXT
3357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3358 /* end confdefs.h. */
3359 #include <stdio.h>
3360 int
3361 main ()
3362 {
3363 FILE *f = fopen ("conftest.out", "w");
3364 return ferror (f) || fclose (f) != 0;
3365
3366 ;
3367 return 0;
3368 }
3369 _ACEOF
3370 ac_clean_files="$ac_clean_files conftest.out"
3371 # Check that the compiler produces executables we can run. If not, either
3372 # the compiler is broken, or we cross compile.
3373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3374 $as_echo_n "checking whether we are cross compiling... " >&6; }
3375 if test "$cross_compiling" != yes; then
3376 { { ac_try="$ac_link"
3377 case "(($ac_try" in
3378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3379 *) ac_try_echo=$ac_try;;
3380 esac
3381 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3382 $as_echo "$ac_try_echo"; } >&5
3383 (eval "$ac_link") 2>&5
3384 ac_status=$?
3385 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3386 test $ac_status = 0; }
3387 if { ac_try='./conftest$ac_cv_exeext'
3388 { { case "(($ac_try" in
3389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3390 *) ac_try_echo=$ac_try;;
3391 esac
3392 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3393 $as_echo "$ac_try_echo"; } >&5
3394 (eval "$ac_try") 2>&5
3395 ac_status=$?
3396 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3397 test $ac_status = 0; }; }; then
3398 cross_compiling=no
3399 else
3400 if test "$cross_compiling" = maybe; then
3401 cross_compiling=yes
3402 else
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 $? "cannot run C compiled programs.
3406 If you meant to cross compile, use \`--host'.
3407 See \`config.log' for more details" "$LINENO" 5; }
3408 fi
3409 fi
3410 fi
3411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3412 $as_echo "$cross_compiling" >&6; }
3413
3414 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3415 ac_clean_files=$ac_clean_files_save
3416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3417 $as_echo_n "checking for suffix of object files... " >&6; }
3418 if ${ac_cv_objext+:} false; then :
3419 $as_echo_n "(cached) " >&6
3420 else
3421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3422 /* end confdefs.h. */
3423
3424 int
3425 main ()
3426 {
3427
3428 ;
3429 return 0;
3430 }
3431 _ACEOF
3432 rm -f conftest.o conftest.obj
3433 if { { ac_try="$ac_compile"
3434 case "(($ac_try" in
3435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3436 *) ac_try_echo=$ac_try;;
3437 esac
3438 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3439 $as_echo "$ac_try_echo"; } >&5
3440 (eval "$ac_compile") 2>&5
3441 ac_status=$?
3442 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3443 test $ac_status = 0; }; then :
3444 for ac_file in conftest.o conftest.obj conftest.*; do
3445 test -f "$ac_file" || continue;
3446 case $ac_file in
3447 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3448 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3449 break;;
3450 esac
3451 done
3452 else
3453 $as_echo "$as_me: failed program was:" >&5
3454 sed 's/^/| /' conftest.$ac_ext >&5
3455
3456 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3457 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3458 as_fn_error $? "cannot compute suffix of object files: cannot compile
3459 See \`config.log' for more details" "$LINENO" 5; }
3460 fi
3461 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3462 fi
3463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3464 $as_echo "$ac_cv_objext" >&6; }
3465 OBJEXT=$ac_cv_objext
3466 ac_objext=$OBJEXT
3467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3468 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3469 if ${ac_cv_c_compiler_gnu+:} false; then :
3470 $as_echo_n "(cached) " >&6
3471 else
3472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3473 /* end confdefs.h. */
3474
3475 int
3476 main ()
3477 {
3478 #ifndef __GNUC__
3479 choke me
3480 #endif
3481
3482 ;
3483 return 0;
3484 }
3485 _ACEOF
3486 if ac_fn_c_try_compile "$LINENO"; then :
3487 ac_compiler_gnu=yes
3488 else
3489 ac_compiler_gnu=no
3490 fi
3491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3492 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3493
3494 fi
3495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3496 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3497 if test $ac_compiler_gnu = yes; then
3498 GCC=yes
3499 else
3500 GCC=
3501 fi
3502 ac_test_CFLAGS=${CFLAGS+set}
3503 ac_save_CFLAGS=$CFLAGS
3504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3505 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3506 if ${ac_cv_prog_cc_g+:} false; then :
3507 $as_echo_n "(cached) " >&6
3508 else
3509 ac_save_c_werror_flag=$ac_c_werror_flag
3510 ac_c_werror_flag=yes
3511 ac_cv_prog_cc_g=no
3512 CFLAGS="-g"
3513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3514 /* end confdefs.h. */
3515
3516 int
3517 main ()
3518 {
3519
3520 ;
3521 return 0;
3522 }
3523 _ACEOF
3524 if ac_fn_c_try_compile "$LINENO"; then :
3525 ac_cv_prog_cc_g=yes
3526 else
3527 CFLAGS=""
3528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3529 /* end confdefs.h. */
3530
3531 int
3532 main ()
3533 {
3534
3535 ;
3536 return 0;
3537 }
3538 _ACEOF
3539 if ac_fn_c_try_compile "$LINENO"; then :
3540
3541 else
3542 ac_c_werror_flag=$ac_save_c_werror_flag
3543 CFLAGS="-g"
3544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3545 /* end confdefs.h. */
3546
3547 int
3548 main ()
3549 {
3550
3551 ;
3552 return 0;
3553 }
3554 _ACEOF
3555 if ac_fn_c_try_compile "$LINENO"; then :
3556 ac_cv_prog_cc_g=yes
3557 fi
3558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3559 fi
3560 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3561 fi
3562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3563 ac_c_werror_flag=$ac_save_c_werror_flag
3564 fi
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3566 $as_echo "$ac_cv_prog_cc_g" >&6; }
3567 if test "$ac_test_CFLAGS" = set; then
3568 CFLAGS=$ac_save_CFLAGS
3569 elif test $ac_cv_prog_cc_g = yes; then
3570 if test "$GCC" = yes; then
3571 CFLAGS="-g -O2"
3572 else
3573 CFLAGS="-g"
3574 fi
3575 else
3576 if test "$GCC" = yes; then
3577 CFLAGS="-O2"
3578 else
3579 CFLAGS=
3580 fi
3581 fi
3582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3583 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3584 if ${ac_cv_prog_cc_c89+:} false; then :
3585 $as_echo_n "(cached) " >&6
3586 else
3587 ac_cv_prog_cc_c89=no
3588 ac_save_CC=$CC
3589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3590 /* end confdefs.h. */
3591 #include <stdarg.h>
3592 #include <stdio.h>
3593 struct stat;
3594 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3595 struct buf { int x; };
3596 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3597 static char *e (p, i)
3598 char **p;
3599 int i;
3600 {
3601 return p[i];
3602 }
3603 static char *f (char * (*g) (char **, int), char **p, ...)
3604 {
3605 char *s;
3606 va_list v;
3607 va_start (v,p);
3608 s = g (p, va_arg (v,int));
3609 va_end (v);
3610 return s;
3611 }
3612
3613 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3614 function prototypes and stuff, but not '\xHH' hex character constants.
3615 These don't provoke an error unfortunately, instead are silently treated
3616 as 'x'. The following induces an error, until -std is added to get
3617 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3618 array size at least. It's necessary to write '\x00'==0 to get something
3619 that's true only with -std. */
3620 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3621
3622 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3623 inside strings and character constants. */
3624 #define FOO(x) 'x'
3625 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3626
3627 int test (int i, double x);
3628 struct s1 {int (*f) (int a);};
3629 struct s2 {int (*f) (double a);};
3630 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3631 int argc;
3632 char **argv;
3633 int
3634 main ()
3635 {
3636 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3637 ;
3638 return 0;
3639 }
3640 _ACEOF
3641 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3642 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3643 do
3644 CC="$ac_save_CC $ac_arg"
3645 if ac_fn_c_try_compile "$LINENO"; then :
3646 ac_cv_prog_cc_c89=$ac_arg
3647 fi
3648 rm -f core conftest.err conftest.$ac_objext
3649 test "x$ac_cv_prog_cc_c89" != "xno" && break
3650 done
3651 rm -f conftest.$ac_ext
3652 CC=$ac_save_CC
3653
3654 fi
3655 # AC_CACHE_VAL
3656 case "x$ac_cv_prog_cc_c89" in
3657 x)
3658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3659 $as_echo "none needed" >&6; } ;;
3660 xno)
3661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3662 $as_echo "unsupported" >&6; } ;;
3663 *)
3664 CC="$CC $ac_cv_prog_cc_c89"
3665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3666 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3667 esac
3668 if test "x$ac_cv_prog_cc_c89" != xno; then :
3669
3670 fi
3671
3672 ac_ext=c
3673 ac_cpp='$CPP $CPPFLAGS'
3674 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3675 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3676 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3677
3678 ac_ext=cpp
3679 ac_cpp='$CXXCPP $CPPFLAGS'
3680 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3681 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3682 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3683 if test -z "$CXX"; then
3684 if test -n "$CCC"; then
3685 CXX=$CCC
3686 else
3687 if test -n "$ac_tool_prefix"; then
3688 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3689 do
3690 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3691 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3693 $as_echo_n "checking for $ac_word... " >&6; }
3694 if ${ac_cv_prog_CXX+:} false; then :
3695 $as_echo_n "(cached) " >&6
3696 else
3697 if test -n "$CXX"; then
3698 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3699 else
3700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3701 for as_dir in $PATH
3702 do
3703 IFS=$as_save_IFS
3704 test -z "$as_dir" && as_dir=.
3705 for ac_exec_ext in '' $ac_executable_extensions; do
3706 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3707 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3709 break 2
3710 fi
3711 done
3712 done
3713 IFS=$as_save_IFS
3714
3715 fi
3716 fi
3717 CXX=$ac_cv_prog_CXX
3718 if test -n "$CXX"; then
3719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3720 $as_echo "$CXX" >&6; }
3721 else
3722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3723 $as_echo "no" >&6; }
3724 fi
3725
3726
3727 test -n "$CXX" && break
3728 done
3729 fi
3730 if test -z "$CXX"; then
3731 ac_ct_CXX=$CXX
3732 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3733 do
3734 # Extract the first word of "$ac_prog", so it can be a program name with args.
3735 set dummy $ac_prog; ac_word=$2
3736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3737 $as_echo_n "checking for $ac_word... " >&6; }
3738 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3739 $as_echo_n "(cached) " >&6
3740 else
3741 if test -n "$ac_ct_CXX"; then
3742 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3743 else
3744 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3745 for as_dir in $PATH
3746 do
3747 IFS=$as_save_IFS
3748 test -z "$as_dir" && as_dir=.
3749 for ac_exec_ext in '' $ac_executable_extensions; do
3750 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3751 ac_cv_prog_ac_ct_CXX="$ac_prog"
3752 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3753 break 2
3754 fi
3755 done
3756 done
3757 IFS=$as_save_IFS
3758
3759 fi
3760 fi
3761 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3762 if test -n "$ac_ct_CXX"; then
3763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3764 $as_echo "$ac_ct_CXX" >&6; }
3765 else
3766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3767 $as_echo "no" >&6; }
3768 fi
3769
3770
3771 test -n "$ac_ct_CXX" && break
3772 done
3773
3774 if test "x$ac_ct_CXX" = x; then
3775 CXX="g++"
3776 else
3777 case $cross_compiling:$ac_tool_warned in
3778 yes:)
3779 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3780 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3781 ac_tool_warned=yes ;;
3782 esac
3783 CXX=$ac_ct_CXX
3784 fi
3785 fi
3786
3787 fi
3788 fi
3789 # Provide some information about the compiler.
3790 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3791 set X $ac_compile
3792 ac_compiler=$2
3793 for ac_option in --version -v -V -qversion; do
3794 { { ac_try="$ac_compiler $ac_option >&5"
3795 case "(($ac_try" in
3796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3797 *) ac_try_echo=$ac_try;;
3798 esac
3799 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3800 $as_echo "$ac_try_echo"; } >&5
3801 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3802 ac_status=$?
3803 if test -s conftest.err; then
3804 sed '10a\
3805 ... rest of stderr output deleted ...
3806 10q' conftest.err >conftest.er1
3807 cat conftest.er1 >&5
3808 fi
3809 rm -f conftest.er1 conftest.err
3810 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3811 test $ac_status = 0; }
3812 done
3813
3814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3815 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3816 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3817 $as_echo_n "(cached) " >&6
3818 else
3819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3820 /* end confdefs.h. */
3821
3822 int
3823 main ()
3824 {
3825 #ifndef __GNUC__
3826 choke me
3827 #endif
3828
3829 ;
3830 return 0;
3831 }
3832 _ACEOF
3833 if ac_fn_cxx_try_compile "$LINENO"; then :
3834 ac_compiler_gnu=yes
3835 else
3836 ac_compiler_gnu=no
3837 fi
3838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3839 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3840
3841 fi
3842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3843 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3844 if test $ac_compiler_gnu = yes; then
3845 GXX=yes
3846 else
3847 GXX=
3848 fi
3849 ac_test_CXXFLAGS=${CXXFLAGS+set}
3850 ac_save_CXXFLAGS=$CXXFLAGS
3851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3852 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3853 if ${ac_cv_prog_cxx_g+:} false; then :
3854 $as_echo_n "(cached) " >&6
3855 else
3856 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3857 ac_cxx_werror_flag=yes
3858 ac_cv_prog_cxx_g=no
3859 CXXFLAGS="-g"
3860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3861 /* end confdefs.h. */
3862
3863 int
3864 main ()
3865 {
3866
3867 ;
3868 return 0;
3869 }
3870 _ACEOF
3871 if ac_fn_cxx_try_compile "$LINENO"; then :
3872 ac_cv_prog_cxx_g=yes
3873 else
3874 CXXFLAGS=""
3875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3876 /* end confdefs.h. */
3877
3878 int
3879 main ()
3880 {
3881
3882 ;
3883 return 0;
3884 }
3885 _ACEOF
3886 if ac_fn_cxx_try_compile "$LINENO"; then :
3887
3888 else
3889 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3890 CXXFLAGS="-g"
3891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3892 /* end confdefs.h. */
3893
3894 int
3895 main ()
3896 {
3897
3898 ;
3899 return 0;
3900 }
3901 _ACEOF
3902 if ac_fn_cxx_try_compile "$LINENO"; then :
3903 ac_cv_prog_cxx_g=yes
3904 fi
3905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3906 fi
3907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3908 fi
3909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3910 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3911 fi
3912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3913 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3914 if test "$ac_test_CXXFLAGS" = set; then
3915 CXXFLAGS=$ac_save_CXXFLAGS
3916 elif test $ac_cv_prog_cxx_g = yes; then
3917 if test "$GXX" = yes; then
3918 CXXFLAGS="-g -O2"
3919 else
3920 CXXFLAGS="-g"
3921 fi
3922 else
3923 if test "$GXX" = yes; then
3924 CXXFLAGS="-O2"
3925 else
3926 CXXFLAGS=
3927 fi
3928 fi
3929 ac_ext=c
3930 ac_cpp='$CPP $CPPFLAGS'
3931 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3932 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3933 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3934
3935
3936
3937 ac_ext=c
3938 ac_cpp='$CPP $CPPFLAGS'
3939 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3940 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3941 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3943 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3944 # On Suns, sometimes $CPP names a directory.
3945 if test -n "$CPP" && test -d "$CPP"; then
3946 CPP=
3947 fi
3948 if test -z "$CPP"; then
3949 if ${ac_cv_prog_CPP+:} false; then :
3950 $as_echo_n "(cached) " >&6
3951 else
3952 # Double quotes because CPP needs to be expanded
3953 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3954 do
3955 ac_preproc_ok=false
3956 for ac_c_preproc_warn_flag in '' yes
3957 do
3958 # Use a header file that comes with gcc, so configuring glibc
3959 # with a fresh cross-compiler works.
3960 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3961 # <limits.h> exists even on freestanding compilers.
3962 # On the NeXT, cc -E runs the code through the compiler's parser,
3963 # not just through cpp. "Syntax error" is here to catch this case.
3964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3965 /* end confdefs.h. */
3966 #ifdef __STDC__
3967 # include <limits.h>
3968 #else
3969 # include <assert.h>
3970 #endif
3971 Syntax error
3972 _ACEOF
3973 if ac_fn_c_try_cpp "$LINENO"; then :
3974
3975 else
3976 # Broken: fails on valid input.
3977 continue
3978 fi
3979 rm -f conftest.err conftest.i conftest.$ac_ext
3980
3981 # OK, works on sane cases. Now check whether nonexistent headers
3982 # can be detected and how.
3983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3984 /* end confdefs.h. */
3985 #include <ac_nonexistent.h>
3986 _ACEOF
3987 if ac_fn_c_try_cpp "$LINENO"; then :
3988 # Broken: success on invalid input.
3989 continue
3990 else
3991 # Passes both tests.
3992 ac_preproc_ok=:
3993 break
3994 fi
3995 rm -f conftest.err conftest.i conftest.$ac_ext
3996
3997 done
3998 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3999 rm -f conftest.i conftest.err conftest.$ac_ext
4000 if $ac_preproc_ok; then :
4001 break
4002 fi
4003
4004 done
4005 ac_cv_prog_CPP=$CPP
4006
4007 fi
4008 CPP=$ac_cv_prog_CPP
4009 else
4010 ac_cv_prog_CPP=$CPP
4011 fi
4012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4013 $as_echo "$CPP" >&6; }
4014 ac_preproc_ok=false
4015 for ac_c_preproc_warn_flag in '' yes
4016 do
4017 # Use a header file that comes with gcc, so configuring glibc
4018 # with a fresh cross-compiler works.
4019 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4020 # <limits.h> exists even on freestanding compilers.
4021 # On the NeXT, cc -E runs the code through the compiler's parser,
4022 # not just through cpp. "Syntax error" is here to catch this case.
4023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4024 /* end confdefs.h. */
4025 #ifdef __STDC__
4026 # include <limits.h>
4027 #else
4028 # include <assert.h>
4029 #endif
4030 Syntax error
4031 _ACEOF
4032 if ac_fn_c_try_cpp "$LINENO"; then :
4033
4034 else
4035 # Broken: fails on valid input.
4036 continue
4037 fi
4038 rm -f conftest.err conftest.i conftest.$ac_ext
4039
4040 # OK, works on sane cases. Now check whether nonexistent headers
4041 # can be detected and how.
4042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4043 /* end confdefs.h. */
4044 #include <ac_nonexistent.h>
4045 _ACEOF
4046 if ac_fn_c_try_cpp "$LINENO"; then :
4047 # Broken: success on invalid input.
4048 continue
4049 else
4050 # Passes both tests.
4051 ac_preproc_ok=:
4052 break
4053 fi
4054 rm -f conftest.err conftest.i conftest.$ac_ext
4055
4056 done
4057 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4058 rm -f conftest.i conftest.err conftest.$ac_ext
4059 if $ac_preproc_ok; then :
4060
4061 else
4062 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4063 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4064 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4065 See \`config.log' for more details" "$LINENO" 5; }
4066 fi
4067
4068 ac_ext=c
4069 ac_cpp='$CPP $CPPFLAGS'
4070 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4071 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4072 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4073
4074
4075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4076 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4077 if ${ac_cv_path_GREP+:} false; then :
4078 $as_echo_n "(cached) " >&6
4079 else
4080 if test -z "$GREP"; then
4081 ac_path_GREP_found=false
4082 # Loop through the user's path and test for each of PROGNAME-LIST
4083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4084 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4085 do
4086 IFS=$as_save_IFS
4087 test -z "$as_dir" && as_dir=.
4088 for ac_prog in grep ggrep; do
4089 for ac_exec_ext in '' $ac_executable_extensions; do
4090 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4091 as_fn_executable_p "$ac_path_GREP" || continue
4092 # Check for GNU ac_path_GREP and select it if it is found.
4093 # Check for GNU $ac_path_GREP
4094 case `"$ac_path_GREP" --version 2>&1` in
4095 *GNU*)
4096 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4097 *)
4098 ac_count=0
4099 $as_echo_n 0123456789 >"conftest.in"
4100 while :
4101 do
4102 cat "conftest.in" "conftest.in" >"conftest.tmp"
4103 mv "conftest.tmp" "conftest.in"
4104 cp "conftest.in" "conftest.nl"
4105 $as_echo 'GREP' >> "conftest.nl"
4106 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4107 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4108 as_fn_arith $ac_count + 1 && ac_count=$as_val
4109 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4110 # Best one so far, save it but keep looking for a better one
4111 ac_cv_path_GREP="$ac_path_GREP"
4112 ac_path_GREP_max=$ac_count
4113 fi
4114 # 10*(2^10) chars as input seems more than enough
4115 test $ac_count -gt 10 && break
4116 done
4117 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4118 esac
4119
4120 $ac_path_GREP_found && break 3
4121 done
4122 done
4123 done
4124 IFS=$as_save_IFS
4125 if test -z "$ac_cv_path_GREP"; then
4126 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4127 fi
4128 else
4129 ac_cv_path_GREP=$GREP
4130 fi
4131
4132 fi
4133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4134 $as_echo "$ac_cv_path_GREP" >&6; }
4135 GREP="$ac_cv_path_GREP"
4136
4137
4138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4139 $as_echo_n "checking for egrep... " >&6; }
4140 if ${ac_cv_path_EGREP+:} false; then :
4141 $as_echo_n "(cached) " >&6
4142 else
4143 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4144 then ac_cv_path_EGREP="$GREP -E"
4145 else
4146 if test -z "$EGREP"; then
4147 ac_path_EGREP_found=false
4148 # Loop through the user's path and test for each of PROGNAME-LIST
4149 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4150 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4151 do
4152 IFS=$as_save_IFS
4153 test -z "$as_dir" && as_dir=.
4154 for ac_prog in egrep; do
4155 for ac_exec_ext in '' $ac_executable_extensions; do
4156 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4157 as_fn_executable_p "$ac_path_EGREP" || continue
4158 # Check for GNU ac_path_EGREP and select it if it is found.
4159 # Check for GNU $ac_path_EGREP
4160 case `"$ac_path_EGREP" --version 2>&1` in
4161 *GNU*)
4162 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4163 *)
4164 ac_count=0
4165 $as_echo_n 0123456789 >"conftest.in"
4166 while :
4167 do
4168 cat "conftest.in" "conftest.in" >"conftest.tmp"
4169 mv "conftest.tmp" "conftest.in"
4170 cp "conftest.in" "conftest.nl"
4171 $as_echo 'EGREP' >> "conftest.nl"
4172 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4173 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4174 as_fn_arith $ac_count + 1 && ac_count=$as_val
4175 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4176 # Best one so far, save it but keep looking for a better one
4177 ac_cv_path_EGREP="$ac_path_EGREP"
4178 ac_path_EGREP_max=$ac_count
4179 fi
4180 # 10*(2^10) chars as input seems more than enough
4181 test $ac_count -gt 10 && break
4182 done
4183 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4184 esac
4185
4186 $ac_path_EGREP_found && break 3
4187 done
4188 done
4189 done
4190 IFS=$as_save_IFS
4191 if test -z "$ac_cv_path_EGREP"; then
4192 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4193 fi
4194 else
4195 ac_cv_path_EGREP=$EGREP
4196 fi
4197
4198 fi
4199 fi
4200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4201 $as_echo "$ac_cv_path_EGREP" >&6; }
4202 EGREP="$ac_cv_path_EGREP"
4203
4204
4205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4206 $as_echo_n "checking for ANSI C header files... " >&6; }
4207 if ${ac_cv_header_stdc+:} false; then :
4208 $as_echo_n "(cached) " >&6
4209 else
4210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4211 /* end confdefs.h. */
4212 #include <stdlib.h>
4213 #include <stdarg.h>
4214 #include <string.h>
4215 #include <float.h>
4216
4217 int
4218 main ()
4219 {
4220
4221 ;
4222 return 0;
4223 }
4224 _ACEOF
4225 if ac_fn_c_try_compile "$LINENO"; then :
4226 ac_cv_header_stdc=yes
4227 else
4228 ac_cv_header_stdc=no
4229 fi
4230 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4231
4232 if test $ac_cv_header_stdc = yes; then
4233 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4235 /* end confdefs.h. */
4236 #include <string.h>
4237
4238 _ACEOF
4239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4240 $EGREP "memchr" >/dev/null 2>&1; then :
4241
4242 else
4243 ac_cv_header_stdc=no
4244 fi
4245 rm -f conftest*
4246
4247 fi
4248
4249 if test $ac_cv_header_stdc = yes; then
4250 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4252 /* end confdefs.h. */
4253 #include <stdlib.h>
4254
4255 _ACEOF
4256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4257 $EGREP "free" >/dev/null 2>&1; then :
4258
4259 else
4260 ac_cv_header_stdc=no
4261 fi
4262 rm -f conftest*
4263
4264 fi
4265
4266 if test $ac_cv_header_stdc = yes; then
4267 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4268 if test "$cross_compiling" = yes; then :
4269 :
4270 else
4271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4272 /* end confdefs.h. */
4273 #include <ctype.h>
4274 #include <stdlib.h>
4275 #if ((' ' & 0x0FF) == 0x020)
4276 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4277 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4278 #else
4279 # define ISLOWER(c) \
4280 (('a' <= (c) && (c) <= 'i') \
4281 || ('j' <= (c) && (c) <= 'r') \
4282 || ('s' <= (c) && (c) <= 'z'))
4283 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4284 #endif
4285
4286 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4287 int
4288 main ()
4289 {
4290 int i;
4291 for (i = 0; i < 256; i++)
4292 if (XOR (islower (i), ISLOWER (i))
4293 || toupper (i) != TOUPPER (i))
4294 return 2;
4295 return 0;
4296 }
4297 _ACEOF
4298 if ac_fn_c_try_run "$LINENO"; then :
4299
4300 else
4301 ac_cv_header_stdc=no
4302 fi
4303 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4304 conftest.$ac_objext conftest.beam conftest.$ac_ext
4305 fi
4306
4307 fi
4308 fi
4309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4310 $as_echo "$ac_cv_header_stdc" >&6; }
4311 if test $ac_cv_header_stdc = yes; then
4312
4313 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4314
4315 fi
4316
4317 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4318 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4319 inttypes.h stdint.h unistd.h
4320 do :
4321 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4322 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4323 "
4324 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4325 cat >>confdefs.h <<_ACEOF
4326 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4327 _ACEOF
4328
4329 fi
4330
4331 done
4332
4333
4334
4335 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4336 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4337 MINIX=yes
4338 else
4339 MINIX=
4340 fi
4341
4342
4343 if test "$MINIX" = yes; then
4344
4345 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4346
4347
4348 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4349
4350
4351 $as_echo "#define _MINIX 1" >>confdefs.h
4352
4353 fi
4354
4355
4356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4357 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4358 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4359 $as_echo_n "(cached) " >&6
4360 else
4361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4362 /* end confdefs.h. */
4363
4364 # define __EXTENSIONS__ 1
4365 $ac_includes_default
4366 int
4367 main ()
4368 {
4369
4370 ;
4371 return 0;
4372 }
4373 _ACEOF
4374 if ac_fn_c_try_compile "$LINENO"; then :
4375 ac_cv_safe_to_define___extensions__=yes
4376 else
4377 ac_cv_safe_to_define___extensions__=no
4378 fi
4379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4380 fi
4381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4382 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4383 test $ac_cv_safe_to_define___extensions__ = yes &&
4384 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4385
4386 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4387
4388 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4389
4390 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4391
4392 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4393
4394
4395 ac_aux_dir=
4396 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4397 if test -f "$ac_dir/install-sh"; then
4398 ac_aux_dir=$ac_dir
4399 ac_install_sh="$ac_aux_dir/install-sh -c"
4400 break
4401 elif test -f "$ac_dir/install.sh"; then
4402 ac_aux_dir=$ac_dir
4403 ac_install_sh="$ac_aux_dir/install.sh -c"
4404 break
4405 elif test -f "$ac_dir/shtool"; then
4406 ac_aux_dir=$ac_dir
4407 ac_install_sh="$ac_aux_dir/shtool install -c"
4408 break
4409 fi
4410 done
4411 if test -z "$ac_aux_dir"; then
4412 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4413 fi
4414
4415 # These three variables are undocumented and unsupported,
4416 # and are intended to be withdrawn in a future Autoconf release.
4417 # They can cause serious problems if a builder's source tree is in a directory
4418 # whose full name contains unusual characters.
4419 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4420 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4421 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4422
4423
4424 # Make sure we can run config.sub.
4425 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4426 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4427
4428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4429 $as_echo_n "checking build system type... " >&6; }
4430 if ${ac_cv_build+:} false; then :
4431 $as_echo_n "(cached) " >&6
4432 else
4433 ac_build_alias=$build_alias
4434 test "x$ac_build_alias" = x &&
4435 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4436 test "x$ac_build_alias" = x &&
4437 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4438 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4439 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4440
4441 fi
4442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4443 $as_echo "$ac_cv_build" >&6; }
4444 case $ac_cv_build in
4445 *-*-*) ;;
4446 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4447 esac
4448 build=$ac_cv_build
4449 ac_save_IFS=$IFS; IFS='-'
4450 set x $ac_cv_build
4451 shift
4452 build_cpu=$1
4453 build_vendor=$2
4454 shift; shift
4455 # Remember, the first character of IFS is used to create $*,
4456 # except with old shells:
4457 build_os=$*
4458 IFS=$ac_save_IFS
4459 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4460
4461
4462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4463 $as_echo_n "checking host system type... " >&6; }
4464 if ${ac_cv_host+:} false; then :
4465 $as_echo_n "(cached) " >&6
4466 else
4467 if test "x$host_alias" = x; then
4468 ac_cv_host=$ac_cv_build
4469 else
4470 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4471 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4472 fi
4473
4474 fi
4475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4476 $as_echo "$ac_cv_host" >&6; }
4477 case $ac_cv_host in
4478 *-*-*) ;;
4479 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4480 esac
4481 host=$ac_cv_host
4482 ac_save_IFS=$IFS; IFS='-'
4483 set x $ac_cv_host
4484 shift
4485 host_cpu=$1
4486 host_vendor=$2
4487 shift; shift
4488 # Remember, the first character of IFS is used to create $*,
4489 # except with old shells:
4490 host_os=$*
4491 IFS=$ac_save_IFS
4492 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4493
4494
4495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4496 $as_echo_n "checking target system type... " >&6; }
4497 if ${ac_cv_target+:} false; then :
4498 $as_echo_n "(cached) " >&6
4499 else
4500 if test "x$target_alias" = x; then
4501 ac_cv_target=$ac_cv_host
4502 else
4503 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4504 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4505 fi
4506
4507 fi
4508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4509 $as_echo "$ac_cv_target" >&6; }
4510 case $ac_cv_target in
4511 *-*-*) ;;
4512 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4513 esac
4514 target=$ac_cv_target
4515 ac_save_IFS=$IFS; IFS='-'
4516 set x $ac_cv_target
4517 shift
4518 target_cpu=$1
4519 target_vendor=$2
4520 shift; shift
4521 # Remember, the first character of IFS is used to create $*,
4522 # except with old shells:
4523 target_os=$*
4524 IFS=$ac_save_IFS
4525 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4526
4527
4528 # The aliases save the names the user supplied, while $host etc.
4529 # will get canonicalized.
4530 test -n "$target_alias" &&
4531 test "$program_prefix$program_suffix$program_transform_name" = \
4532 NONENONEs,x,x, &&
4533 program_prefix=${target_alias}-
4534
4535 # The tests for host and target for $enable_largefile require
4536 # canonical names.
4537
4538
4539
4540 # As the $enable_largefile decision depends on --enable-plugins we must set it
4541 # even in directories otherwise not depending on the $plugins option.
4542
4543
4544 maybe_plugins=no
4545 for ac_header in dlfcn.h
4546 do :
4547 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4548 "
4549 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
4550 cat >>confdefs.h <<_ACEOF
4551 #define HAVE_DLFCN_H 1
4552 _ACEOF
4553 maybe_plugins=yes
4554 fi
4555
4556 done
4557
4558 for ac_header in windows.h
4559 do :
4560 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4561 "
4562 if test "x$ac_cv_header_windows_h" = xyes; then :
4563 cat >>confdefs.h <<_ACEOF
4564 #define HAVE_WINDOWS_H 1
4565 _ACEOF
4566 maybe_plugins=yes
4567 fi
4568
4569 done
4570
4571
4572 # Check whether --enable-plugins was given.
4573 if test "${enable_plugins+set}" = set; then :
4574 enableval=$enable_plugins; case "${enableval}" in
4575 no) plugins=no ;;
4576 *) plugins=yes
4577 if test "$maybe_plugins" != "yes" ; then
4578 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4579 fi ;;
4580 esac
4581 else
4582 plugins=$maybe_plugins
4583
4584 fi
4585
4586 if test "$plugins" = "yes"; then
4587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4588 $as_echo_n "checking for library containing dlsym... " >&6; }
4589 if ${ac_cv_search_dlsym+:} false; then :
4590 $as_echo_n "(cached) " >&6
4591 else
4592 ac_func_search_save_LIBS=$LIBS
4593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4594 /* end confdefs.h. */
4595
4596 /* Override any GCC internal prototype to avoid an error.
4597 Use char because int might match the return type of a GCC
4598 builtin and then its argument prototype would still apply. */
4599 #ifdef __cplusplus
4600 extern "C"
4601 #endif
4602 char dlsym ();
4603 int
4604 main ()
4605 {
4606 return dlsym ();
4607 ;
4608 return 0;
4609 }
4610 _ACEOF
4611 for ac_lib in '' dl; do
4612 if test -z "$ac_lib"; then
4613 ac_res="none required"
4614 else
4615 ac_res=-l$ac_lib
4616 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4617 fi
4618 if ac_fn_c_try_link "$LINENO"; then :
4619 ac_cv_search_dlsym=$ac_res
4620 fi
4621 rm -f core conftest.err conftest.$ac_objext \
4622 conftest$ac_exeext
4623 if ${ac_cv_search_dlsym+:} false; then :
4624 break
4625 fi
4626 done
4627 if ${ac_cv_search_dlsym+:} false; then :
4628
4629 else
4630 ac_cv_search_dlsym=no
4631 fi
4632 rm conftest.$ac_ext
4633 LIBS=$ac_func_search_save_LIBS
4634 fi
4635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4636 $as_echo "$ac_cv_search_dlsym" >&6; }
4637 ac_res=$ac_cv_search_dlsym
4638 if test "$ac_res" != no; then :
4639 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4640
4641 fi
4642
4643 fi
4644
4645
4646 case "${host}" in
4647 sparc-*-solaris*|i[3-7]86-*-solaris*)
4648 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4649 # are mutually exclusive; and without procfs support, the bfd/ elf module
4650 # cannot provide certain routines such as elfcore_write_prpsinfo
4651 # or elfcore_write_prstatus. So unless the user explicitly requested
4652 # large-file support through the --enable-largefile switch, disable
4653 # large-file support in favor of procfs support.
4654 test "${target}" = "${host}" -a "x$plugins" = xno \
4655 && : ${enable_largefile="no"}
4656 ;;
4657 esac
4658
4659 # Check whether --enable-largefile was given.
4660 if test "${enable_largefile+set}" = set; then :
4661 enableval=$enable_largefile;
4662 fi
4663
4664 if test "$enable_largefile" != no; then
4665
4666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4667 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4668 if ${ac_cv_sys_largefile_CC+:} false; then :
4669 $as_echo_n "(cached) " >&6
4670 else
4671 ac_cv_sys_largefile_CC=no
4672 if test "$GCC" != yes; then
4673 ac_save_CC=$CC
4674 while :; do
4675 # IRIX 6.2 and later do not support large files by default,
4676 # so use the C compiler's -n32 option if that helps.
4677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4678 /* end confdefs.h. */
4679 #include <sys/types.h>
4680 /* Check that off_t can represent 2**63 - 1 correctly.
4681 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4682 since some C++ compilers masquerading as C compilers
4683 incorrectly reject 9223372036854775807. */
4684 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4685 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4686 && LARGE_OFF_T % 2147483647 == 1)
4687 ? 1 : -1];
4688 int
4689 main ()
4690 {
4691
4692 ;
4693 return 0;
4694 }
4695 _ACEOF
4696 if ac_fn_c_try_compile "$LINENO"; then :
4697 break
4698 fi
4699 rm -f core conftest.err conftest.$ac_objext
4700 CC="$CC -n32"
4701 if ac_fn_c_try_compile "$LINENO"; then :
4702 ac_cv_sys_largefile_CC=' -n32'; break
4703 fi
4704 rm -f core conftest.err conftest.$ac_objext
4705 break
4706 done
4707 CC=$ac_save_CC
4708 rm -f conftest.$ac_ext
4709 fi
4710 fi
4711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4712 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4713 if test "$ac_cv_sys_largefile_CC" != no; then
4714 CC=$CC$ac_cv_sys_largefile_CC
4715 fi
4716
4717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4718 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4719 if ${ac_cv_sys_file_offset_bits+:} false; then :
4720 $as_echo_n "(cached) " >&6
4721 else
4722 while :; do
4723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4724 /* end confdefs.h. */
4725 #include <sys/types.h>
4726 /* Check that off_t can represent 2**63 - 1 correctly.
4727 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4728 since some C++ compilers masquerading as C compilers
4729 incorrectly reject 9223372036854775807. */
4730 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4731 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4732 && LARGE_OFF_T % 2147483647 == 1)
4733 ? 1 : -1];
4734 int
4735 main ()
4736 {
4737
4738 ;
4739 return 0;
4740 }
4741 _ACEOF
4742 if ac_fn_c_try_compile "$LINENO"; then :
4743 ac_cv_sys_file_offset_bits=no; break
4744 fi
4745 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4747 /* end confdefs.h. */
4748 #define _FILE_OFFSET_BITS 64
4749 #include <sys/types.h>
4750 /* Check that off_t can represent 2**63 - 1 correctly.
4751 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4752 since some C++ compilers masquerading as C compilers
4753 incorrectly reject 9223372036854775807. */
4754 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4755 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4756 && LARGE_OFF_T % 2147483647 == 1)
4757 ? 1 : -1];
4758 int
4759 main ()
4760 {
4761
4762 ;
4763 return 0;
4764 }
4765 _ACEOF
4766 if ac_fn_c_try_compile "$LINENO"; then :
4767 ac_cv_sys_file_offset_bits=64; break
4768 fi
4769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4770 ac_cv_sys_file_offset_bits=unknown
4771 break
4772 done
4773 fi
4774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4775 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4776 case $ac_cv_sys_file_offset_bits in #(
4777 no | unknown) ;;
4778 *)
4779 cat >>confdefs.h <<_ACEOF
4780 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4781 _ACEOF
4782 ;;
4783 esac
4784 rm -rf conftest*
4785 if test $ac_cv_sys_file_offset_bits = unknown; then
4786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4787 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4788 if ${ac_cv_sys_large_files+:} false; then :
4789 $as_echo_n "(cached) " >&6
4790 else
4791 while :; do
4792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4793 /* end confdefs.h. */
4794 #include <sys/types.h>
4795 /* Check that off_t can represent 2**63 - 1 correctly.
4796 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4797 since some C++ compilers masquerading as C compilers
4798 incorrectly reject 9223372036854775807. */
4799 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4800 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4801 && LARGE_OFF_T % 2147483647 == 1)
4802 ? 1 : -1];
4803 int
4804 main ()
4805 {
4806
4807 ;
4808 return 0;
4809 }
4810 _ACEOF
4811 if ac_fn_c_try_compile "$LINENO"; then :
4812 ac_cv_sys_large_files=no; break
4813 fi
4814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4816 /* end confdefs.h. */
4817 #define _LARGE_FILES 1
4818 #include <sys/types.h>
4819 /* Check that off_t can represent 2**63 - 1 correctly.
4820 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4821 since some C++ compilers masquerading as C compilers
4822 incorrectly reject 9223372036854775807. */
4823 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4824 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4825 && LARGE_OFF_T % 2147483647 == 1)
4826 ? 1 : -1];
4827 int
4828 main ()
4829 {
4830
4831 ;
4832 return 0;
4833 }
4834 _ACEOF
4835 if ac_fn_c_try_compile "$LINENO"; then :
4836 ac_cv_sys_large_files=1; break
4837 fi
4838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4839 ac_cv_sys_large_files=unknown
4840 break
4841 done
4842 fi
4843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4844 $as_echo "$ac_cv_sys_large_files" >&6; }
4845 case $ac_cv_sys_large_files in #(
4846 no | unknown) ;;
4847 *)
4848 cat >>confdefs.h <<_ACEOF
4849 #define _LARGE_FILES $ac_cv_sys_large_files
4850 _ACEOF
4851 ;;
4852 esac
4853 rm -rf conftest*
4854 fi
4855
4856
4857 fi
4858
4859
4860
4861
4862
4863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4864 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4865 if ${am_cv_prog_cc_stdc+:} false; then :
4866 $as_echo_n "(cached) " >&6
4867 else
4868 am_cv_prog_cc_stdc=no
4869 ac_save_CC="$CC"
4870 # Don't try gcc -ansi; that turns off useful extensions and
4871 # breaks some systems' header files.
4872 # AIX -qlanglvl=ansi
4873 # Ultrix and OSF/1 -std1
4874 # HP-UX 10.20 and later -Ae
4875 # HP-UX older versions -Aa -D_HPUX_SOURCE
4876 # SVR4 -Xc -D__EXTENSIONS__
4877 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4878 do
4879 CC="$ac_save_CC $ac_arg"
4880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4881 /* end confdefs.h. */
4882 #include <stdarg.h>
4883 #include <stdio.h>
4884 #include <sys/types.h>
4885 #include <sys/stat.h>
4886 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4887 struct buf { int x; };
4888 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4889 static char *e (p, i)
4890 char **p;
4891 int i;
4892 {
4893 return p[i];
4894 }
4895 static char *f (char * (*g) (char **, int), char **p, ...)
4896 {
4897 char *s;
4898 va_list v;
4899 va_start (v,p);
4900 s = g (p, va_arg (v,int));
4901 va_end (v);
4902 return s;
4903 }
4904 int test (int i, double x);
4905 struct s1 {int (*f) (int a);};
4906 struct s2 {int (*f) (double a);};
4907 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4908 int argc;
4909 char **argv;
4910
4911 int
4912 main ()
4913 {
4914
4915 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4916
4917 ;
4918 return 0;
4919 }
4920 _ACEOF
4921 if ac_fn_c_try_compile "$LINENO"; then :
4922 am_cv_prog_cc_stdc="$ac_arg"; break
4923 fi
4924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4925 done
4926 CC="$ac_save_CC"
4927
4928 fi
4929
4930 if test -z "$am_cv_prog_cc_stdc"; then
4931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4932 $as_echo "none needed" >&6; }
4933 else
4934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4935 $as_echo "$am_cv_prog_cc_stdc" >&6; }
4936 fi
4937 case "x$am_cv_prog_cc_stdc" in
4938 x|xno) ;;
4939 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4940 esac
4941
4942 # Expand $ac_aux_dir to an absolute path.
4943 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4944
4945 if test x"${install_sh+set}" != xset; then
4946 case $am_aux_dir in
4947 *\ * | *\ *)
4948 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4949 *)
4950 install_sh="\${SHELL} $am_aux_dir/install-sh"
4951 esac
4952 fi
4953
4954 # Installed binaries are usually stripped using 'strip' when the user
4955 # run "make install-strip". However 'strip' might not be the right
4956 # tool to use in cross-compilation environments, therefore Automake
4957 # will honor the 'STRIP' environment variable to overrule this program.
4958 if test "$cross_compiling" != no; then
4959 if test -n "$ac_tool_prefix"; then
4960 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4961 set dummy ${ac_tool_prefix}strip; ac_word=$2
4962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4963 $as_echo_n "checking for $ac_word... " >&6; }
4964 if ${ac_cv_prog_STRIP+:} false; then :
4965 $as_echo_n "(cached) " >&6
4966 else
4967 if test -n "$STRIP"; then
4968 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4969 else
4970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4971 for as_dir in $PATH
4972 do
4973 IFS=$as_save_IFS
4974 test -z "$as_dir" && as_dir=.
4975 for ac_exec_ext in '' $ac_executable_extensions; do
4976 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4977 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4978 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4979 break 2
4980 fi
4981 done
4982 done
4983 IFS=$as_save_IFS
4984
4985 fi
4986 fi
4987 STRIP=$ac_cv_prog_STRIP
4988 if test -n "$STRIP"; then
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4990 $as_echo "$STRIP" >&6; }
4991 else
4992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4993 $as_echo "no" >&6; }
4994 fi
4995
4996
4997 fi
4998 if test -z "$ac_cv_prog_STRIP"; then
4999 ac_ct_STRIP=$STRIP
5000 # Extract the first word of "strip", so it can be a program name with args.
5001 set dummy strip; ac_word=$2
5002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5003 $as_echo_n "checking for $ac_word... " >&6; }
5004 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
5005 $as_echo_n "(cached) " >&6
5006 else
5007 if test -n "$ac_ct_STRIP"; then
5008 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5009 else
5010 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5011 for as_dir in $PATH
5012 do
5013 IFS=$as_save_IFS
5014 test -z "$as_dir" && as_dir=.
5015 for ac_exec_ext in '' $ac_executable_extensions; do
5016 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5017 ac_cv_prog_ac_ct_STRIP="strip"
5018 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5019 break 2
5020 fi
5021 done
5022 done
5023 IFS=$as_save_IFS
5024
5025 fi
5026 fi
5027 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5028 if test -n "$ac_ct_STRIP"; then
5029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5030 $as_echo "$ac_ct_STRIP" >&6; }
5031 else
5032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5033 $as_echo "no" >&6; }
5034 fi
5035
5036 if test "x$ac_ct_STRIP" = x; then
5037 STRIP=":"
5038 else
5039 case $cross_compiling:$ac_tool_warned in
5040 yes:)
5041 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5042 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5043 ac_tool_warned=yes ;;
5044 esac
5045 STRIP=$ac_ct_STRIP
5046 fi
5047 else
5048 STRIP="$ac_cv_prog_STRIP"
5049 fi
5050
5051 fi
5052 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5053
5054
5055 ac_aux_dir=
5056 for ac_dir in .. "$srcdir"/..; do
5057 if test -f "$ac_dir/install-sh"; then
5058 ac_aux_dir=$ac_dir
5059 ac_install_sh="$ac_aux_dir/install-sh -c"
5060 break
5061 elif test -f "$ac_dir/install.sh"; then
5062 ac_aux_dir=$ac_dir
5063 ac_install_sh="$ac_aux_dir/install.sh -c"
5064 break
5065 elif test -f "$ac_dir/shtool"; then
5066 ac_aux_dir=$ac_dir
5067 ac_install_sh="$ac_aux_dir/shtool install -c"
5068 break
5069 fi
5070 done
5071 if test -z "$ac_aux_dir"; then
5072 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
5073 fi
5074
5075 # These three variables are undocumented and unsupported,
5076 # and are intended to be withdrawn in a future Autoconf release.
5077 # They can cause serious problems if a builder's source tree is in a directory
5078 # whose full name contains unusual characters.
5079 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5080 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5081 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5082
5083
5084
5085 test "$program_prefix" != NONE &&
5086 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5087 # Use a double $ so make ignores it.
5088 test "$program_suffix" != NONE &&
5089 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5090 # Double any \ or $.
5091 # By default was `s,x,x', remove it if useless.
5092 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5093 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5094
5095
5096 # We require a C++11 compiler. Check if one is available, and if
5097 # necessary, set CXX_DIALECT to some -std=xxx switch.
5098
5099 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
5100 ac_ext=cpp
5101 ac_cpp='$CXXCPP $CPPFLAGS'
5102 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5103 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5104 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5105 CXX_DIALECT=""
5106 ac_success=no
5107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5108 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5109 if ${ax_cv_cxx_compile_cxx11+:} false; then :
5110 $as_echo_n "(cached) " >&6
5111 else
5112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5113 /* end confdefs.h. */
5114
5115
5116 // If the compiler admits that it is not ready for C++11, why torture it?
5117 // Hopefully, this will speed up the test.
5118
5119 #ifndef __cplusplus
5120
5121 #error "This is not a C++ compiler"
5122
5123 #elif __cplusplus < 201103L
5124
5125 #error "This is not a C++11 compiler"
5126
5127 #else
5128
5129 namespace cxx11
5130 {
5131
5132 namespace test_static_assert
5133 {
5134
5135 template <typename T>
5136 struct check
5137 {
5138 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5139 };
5140
5141 }
5142
5143 namespace test_final_override
5144 {
5145
5146 struct Base
5147 {
5148 virtual void f() {}
5149 };
5150
5151 struct Derived : public Base
5152 {
5153 virtual void f() override {}
5154 };
5155
5156 }
5157
5158 namespace test_double_right_angle_brackets
5159 {
5160
5161 template < typename T >
5162 struct check {};
5163
5164 typedef check<void> single_type;
5165 typedef check<check<void>> double_type;
5166 typedef check<check<check<void>>> triple_type;
5167 typedef check<check<check<check<void>>>> quadruple_type;
5168
5169 }
5170
5171 namespace test_decltype
5172 {
5173
5174 int
5175 f()
5176 {
5177 int a = 1;
5178 decltype(a) b = 2;
5179 return a + b;
5180 }
5181
5182 }
5183
5184 namespace test_type_deduction
5185 {
5186
5187 template < typename T1, typename T2 >
5188 struct is_same
5189 {
5190 static const bool value = false;
5191 };
5192
5193 template < typename T >
5194 struct is_same<T, T>
5195 {
5196 static const bool value = true;
5197 };
5198
5199 template < typename T1, typename T2 >
5200 auto
5201 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5202 {
5203 return a1 + a2;
5204 }
5205
5206 int
5207 test(const int c, volatile int v)
5208 {
5209 static_assert(is_same<int, decltype(0)>::value == true, "");
5210 static_assert(is_same<int, decltype(c)>::value == false, "");
5211 static_assert(is_same<int, decltype(v)>::value == false, "");
5212 auto ac = c;
5213 auto av = v;
5214 auto sumi = ac + av + 'x';
5215 auto sumf = ac + av + 1.0;
5216 static_assert(is_same<int, decltype(ac)>::value == true, "");
5217 static_assert(is_same<int, decltype(av)>::value == true, "");
5218 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5219 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5220 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5221 return (sumf > 0.0) ? sumi : add(c, v);
5222 }
5223
5224 }
5225
5226 namespace test_noexcept
5227 {
5228
5229 int f() { return 0; }
5230 int g() noexcept { return 0; }
5231
5232 static_assert(noexcept(f()) == false, "");
5233 static_assert(noexcept(g()) == true, "");
5234
5235 }
5236
5237 namespace test_constexpr
5238 {
5239
5240 template < typename CharT >
5241 unsigned long constexpr
5242 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5243 {
5244 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5245 }
5246
5247 template < typename CharT >
5248 unsigned long constexpr
5249 strlen_c(const CharT *const s) noexcept
5250 {
5251 return strlen_c_r(s, 0UL);
5252 }
5253
5254 static_assert(strlen_c("") == 0UL, "");
5255 static_assert(strlen_c("1") == 1UL, "");
5256 static_assert(strlen_c("example") == 7UL, "");
5257 static_assert(strlen_c("another\0example") == 7UL, "");
5258
5259 }
5260
5261 namespace test_rvalue_references
5262 {
5263
5264 template < int N >
5265 struct answer
5266 {
5267 static constexpr int value = N;
5268 };
5269
5270 answer<1> f(int&) { return answer<1>(); }
5271 answer<2> f(const int&) { return answer<2>(); }
5272 answer<3> f(int&&) { return answer<3>(); }
5273
5274 void
5275 test()
5276 {
5277 int i = 0;
5278 const int c = 0;
5279 static_assert(decltype(f(i))::value == 1, "");
5280 static_assert(decltype(f(c))::value == 2, "");
5281 static_assert(decltype(f(0))::value == 3, "");
5282 }
5283
5284 }
5285
5286 namespace test_uniform_initialization
5287 {
5288
5289 struct test
5290 {
5291 static const int zero {};
5292 static const int one {1};
5293 };
5294
5295 static_assert(test::zero == 0, "");
5296 static_assert(test::one == 1, "");
5297
5298 }
5299
5300 namespace test_lambdas
5301 {
5302
5303 void
5304 test1()
5305 {
5306 auto lambda1 = [](){};
5307 auto lambda2 = lambda1;
5308 lambda1();
5309 lambda2();
5310 }
5311
5312 int
5313 test2()
5314 {
5315 auto a = [](int i, int j){ return i + j; }(1, 2);
5316 auto b = []() -> int { return '0'; }();
5317 auto c = [=](){ return a + b; }();
5318 auto d = [&](){ return c; }();
5319 auto e = [a, &b](int x) mutable {
5320 const auto identity = [](int y){ return y; };
5321 for (auto i = 0; i < a; ++i)
5322 a += b--;
5323 return x + identity(a + b);
5324 }(0);
5325 return a + b + c + d + e;
5326 }
5327
5328 int
5329 test3()
5330 {
5331 const auto nullary = [](){ return 0; };
5332 const auto unary = [](int x){ return x; };
5333 using nullary_t = decltype(nullary);
5334 using unary_t = decltype(unary);
5335 const auto higher1st = [](nullary_t f){ return f(); };
5336 const auto higher2nd = [unary](nullary_t f1){
5337 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5338 };
5339 return higher1st(nullary) + higher2nd(nullary)(unary);
5340 }
5341
5342 }
5343
5344 namespace test_variadic_templates
5345 {
5346
5347 template <int...>
5348 struct sum;
5349
5350 template <int N0, int... N1toN>
5351 struct sum<N0, N1toN...>
5352 {
5353 static constexpr auto value = N0 + sum<N1toN...>::value;
5354 };
5355
5356 template <>
5357 struct sum<>
5358 {
5359 static constexpr auto value = 0;
5360 };
5361
5362 static_assert(sum<>::value == 0, "");
5363 static_assert(sum<1>::value == 1, "");
5364 static_assert(sum<23>::value == 23, "");
5365 static_assert(sum<1, 2>::value == 3, "");
5366 static_assert(sum<5, 5, 11>::value == 21, "");
5367 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5368
5369 }
5370
5371 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5372 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5373 // because of this.
5374 namespace test_template_alias_sfinae
5375 {
5376
5377 struct foo {};
5378
5379 template<typename T>
5380 using member = typename T::member_type;
5381
5382 template<typename T>
5383 void func(...) {}
5384
5385 template<typename T>
5386 void func(member<T>*) {}
5387
5388 void test();
5389
5390 void test() { func<foo>(0); }
5391
5392 }
5393
5394 } // namespace cxx11
5395
5396 #endif // __cplusplus >= 201103L
5397
5398
5399
5400 _ACEOF
5401 if ac_fn_cxx_try_compile "$LINENO"; then :
5402 ax_cv_cxx_compile_cxx11=yes
5403 else
5404 ax_cv_cxx_compile_cxx11=no
5405 fi
5406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5407 fi
5408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5409 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5410 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5411 ac_success=yes
5412 fi
5413
5414 if test x$ac_success = xno; then
5415 for alternative in ${ax_cxx_compile_alternatives}; do
5416 switch="-std=gnu++${alternative}"
5417 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5419 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5420 if eval \${$cachevar+:} false; then :
5421 $as_echo_n "(cached) " >&6
5422 else
5423 ac_save_CXX="$CXX"
5424 CXX="$CXX $switch"
5425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5426 /* end confdefs.h. */
5427
5428
5429 // If the compiler admits that it is not ready for C++11, why torture it?
5430 // Hopefully, this will speed up the test.
5431
5432 #ifndef __cplusplus
5433
5434 #error "This is not a C++ compiler"
5435
5436 #elif __cplusplus < 201103L
5437
5438 #error "This is not a C++11 compiler"
5439
5440 #else
5441
5442 namespace cxx11
5443 {
5444
5445 namespace test_static_assert
5446 {
5447
5448 template <typename T>
5449 struct check
5450 {
5451 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5452 };
5453
5454 }
5455
5456 namespace test_final_override
5457 {
5458
5459 struct Base
5460 {
5461 virtual void f() {}
5462 };
5463
5464 struct Derived : public Base
5465 {
5466 virtual void f() override {}
5467 };
5468
5469 }
5470
5471 namespace test_double_right_angle_brackets
5472 {
5473
5474 template < typename T >
5475 struct check {};
5476
5477 typedef check<void> single_type;
5478 typedef check<check<void>> double_type;
5479 typedef check<check<check<void>>> triple_type;
5480 typedef check<check<check<check<void>>>> quadruple_type;
5481
5482 }
5483
5484 namespace test_decltype
5485 {
5486
5487 int
5488 f()
5489 {
5490 int a = 1;
5491 decltype(a) b = 2;
5492 return a + b;
5493 }
5494
5495 }
5496
5497 namespace test_type_deduction
5498 {
5499
5500 template < typename T1, typename T2 >
5501 struct is_same
5502 {
5503 static const bool value = false;
5504 };
5505
5506 template < typename T >
5507 struct is_same<T, T>
5508 {
5509 static const bool value = true;
5510 };
5511
5512 template < typename T1, typename T2 >
5513 auto
5514 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5515 {
5516 return a1 + a2;
5517 }
5518
5519 int
5520 test(const int c, volatile int v)
5521 {
5522 static_assert(is_same<int, decltype(0)>::value == true, "");
5523 static_assert(is_same<int, decltype(c)>::value == false, "");
5524 static_assert(is_same<int, decltype(v)>::value == false, "");
5525 auto ac = c;
5526 auto av = v;
5527 auto sumi = ac + av + 'x';
5528 auto sumf = ac + av + 1.0;
5529 static_assert(is_same<int, decltype(ac)>::value == true, "");
5530 static_assert(is_same<int, decltype(av)>::value == true, "");
5531 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5532 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5533 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5534 return (sumf > 0.0) ? sumi : add(c, v);
5535 }
5536
5537 }
5538
5539 namespace test_noexcept
5540 {
5541
5542 int f() { return 0; }
5543 int g() noexcept { return 0; }
5544
5545 static_assert(noexcept(f()) == false, "");
5546 static_assert(noexcept(g()) == true, "");
5547
5548 }
5549
5550 namespace test_constexpr
5551 {
5552
5553 template < typename CharT >
5554 unsigned long constexpr
5555 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5556 {
5557 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5558 }
5559
5560 template < typename CharT >
5561 unsigned long constexpr
5562 strlen_c(const CharT *const s) noexcept
5563 {
5564 return strlen_c_r(s, 0UL);
5565 }
5566
5567 static_assert(strlen_c("") == 0UL, "");
5568 static_assert(strlen_c("1") == 1UL, "");
5569 static_assert(strlen_c("example") == 7UL, "");
5570 static_assert(strlen_c("another\0example") == 7UL, "");
5571
5572 }
5573
5574 namespace test_rvalue_references
5575 {
5576
5577 template < int N >
5578 struct answer
5579 {
5580 static constexpr int value = N;
5581 };
5582
5583 answer<1> f(int&) { return answer<1>(); }
5584 answer<2> f(const int&) { return answer<2>(); }
5585 answer<3> f(int&&) { return answer<3>(); }
5586
5587 void
5588 test()
5589 {
5590 int i = 0;
5591 const int c = 0;
5592 static_assert(decltype(f(i))::value == 1, "");
5593 static_assert(decltype(f(c))::value == 2, "");
5594 static_assert(decltype(f(0))::value == 3, "");
5595 }
5596
5597 }
5598
5599 namespace test_uniform_initialization
5600 {
5601
5602 struct test
5603 {
5604 static const int zero {};
5605 static const int one {1};
5606 };
5607
5608 static_assert(test::zero == 0, "");
5609 static_assert(test::one == 1, "");
5610
5611 }
5612
5613 namespace test_lambdas
5614 {
5615
5616 void
5617 test1()
5618 {
5619 auto lambda1 = [](){};
5620 auto lambda2 = lambda1;
5621 lambda1();
5622 lambda2();
5623 }
5624
5625 int
5626 test2()
5627 {
5628 auto a = [](int i, int j){ return i + j; }(1, 2);
5629 auto b = []() -> int { return '0'; }();
5630 auto c = [=](){ return a + b; }();
5631 auto d = [&](){ return c; }();
5632 auto e = [a, &b](int x) mutable {
5633 const auto identity = [](int y){ return y; };
5634 for (auto i = 0; i < a; ++i)
5635 a += b--;
5636 return x + identity(a + b);
5637 }(0);
5638 return a + b + c + d + e;
5639 }
5640
5641 int
5642 test3()
5643 {
5644 const auto nullary = [](){ return 0; };
5645 const auto unary = [](int x){ return x; };
5646 using nullary_t = decltype(nullary);
5647 using unary_t = decltype(unary);
5648 const auto higher1st = [](nullary_t f){ return f(); };
5649 const auto higher2nd = [unary](nullary_t f1){
5650 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5651 };
5652 return higher1st(nullary) + higher2nd(nullary)(unary);
5653 }
5654
5655 }
5656
5657 namespace test_variadic_templates
5658 {
5659
5660 template <int...>
5661 struct sum;
5662
5663 template <int N0, int... N1toN>
5664 struct sum<N0, N1toN...>
5665 {
5666 static constexpr auto value = N0 + sum<N1toN...>::value;
5667 };
5668
5669 template <>
5670 struct sum<>
5671 {
5672 static constexpr auto value = 0;
5673 };
5674
5675 static_assert(sum<>::value == 0, "");
5676 static_assert(sum<1>::value == 1, "");
5677 static_assert(sum<23>::value == 23, "");
5678 static_assert(sum<1, 2>::value == 3, "");
5679 static_assert(sum<5, 5, 11>::value == 21, "");
5680 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5681
5682 }
5683
5684 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5685 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5686 // because of this.
5687 namespace test_template_alias_sfinae
5688 {
5689
5690 struct foo {};
5691
5692 template<typename T>
5693 using member = typename T::member_type;
5694
5695 template<typename T>
5696 void func(...) {}
5697
5698 template<typename T>
5699 void func(member<T>*) {}
5700
5701 void test();
5702
5703 void test() { func<foo>(0); }
5704
5705 }
5706
5707 } // namespace cxx11
5708
5709 #endif // __cplusplus >= 201103L
5710
5711
5712
5713 _ACEOF
5714 if ac_fn_cxx_try_compile "$LINENO"; then :
5715 eval $cachevar=yes
5716 else
5717 eval $cachevar=no
5718 fi
5719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5720 CXX="$ac_save_CXX"
5721 fi
5722 eval ac_res=\$$cachevar
5723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5724 $as_echo "$ac_res" >&6; }
5725 if eval test x\$$cachevar = xyes; then
5726 CXX_DIALECT="$switch"
5727 ac_success=yes
5728 break
5729 fi
5730 done
5731 fi
5732
5733 if test x$ac_success = xno; then
5734 for alternative in ${ax_cxx_compile_alternatives}; do
5735 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5736 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5738 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5739 if eval \${$cachevar+:} false; then :
5740 $as_echo_n "(cached) " >&6
5741 else
5742 ac_save_CXX="$CXX"
5743 CXX="$CXX $switch"
5744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5745 /* end confdefs.h. */
5746
5747
5748 // If the compiler admits that it is not ready for C++11, why torture it?
5749 // Hopefully, this will speed up the test.
5750
5751 #ifndef __cplusplus
5752
5753 #error "This is not a C++ compiler"
5754
5755 #elif __cplusplus < 201103L
5756
5757 #error "This is not a C++11 compiler"
5758
5759 #else
5760
5761 namespace cxx11
5762 {
5763
5764 namespace test_static_assert
5765 {
5766
5767 template <typename T>
5768 struct check
5769 {
5770 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5771 };
5772
5773 }
5774
5775 namespace test_final_override
5776 {
5777
5778 struct Base
5779 {
5780 virtual void f() {}
5781 };
5782
5783 struct Derived : public Base
5784 {
5785 virtual void f() override {}
5786 };
5787
5788 }
5789
5790 namespace test_double_right_angle_brackets
5791 {
5792
5793 template < typename T >
5794 struct check {};
5795
5796 typedef check<void> single_type;
5797 typedef check<check<void>> double_type;
5798 typedef check<check<check<void>>> triple_type;
5799 typedef check<check<check<check<void>>>> quadruple_type;
5800
5801 }
5802
5803 namespace test_decltype
5804 {
5805
5806 int
5807 f()
5808 {
5809 int a = 1;
5810 decltype(a) b = 2;
5811 return a + b;
5812 }
5813
5814 }
5815
5816 namespace test_type_deduction
5817 {
5818
5819 template < typename T1, typename T2 >
5820 struct is_same
5821 {
5822 static const bool value = false;
5823 };
5824
5825 template < typename T >
5826 struct is_same<T, T>
5827 {
5828 static const bool value = true;
5829 };
5830
5831 template < typename T1, typename T2 >
5832 auto
5833 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5834 {
5835 return a1 + a2;
5836 }
5837
5838 int
5839 test(const int c, volatile int v)
5840 {
5841 static_assert(is_same<int, decltype(0)>::value == true, "");
5842 static_assert(is_same<int, decltype(c)>::value == false, "");
5843 static_assert(is_same<int, decltype(v)>::value == false, "");
5844 auto ac = c;
5845 auto av = v;
5846 auto sumi = ac + av + 'x';
5847 auto sumf = ac + av + 1.0;
5848 static_assert(is_same<int, decltype(ac)>::value == true, "");
5849 static_assert(is_same<int, decltype(av)>::value == true, "");
5850 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5851 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5852 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5853 return (sumf > 0.0) ? sumi : add(c, v);
5854 }
5855
5856 }
5857
5858 namespace test_noexcept
5859 {
5860
5861 int f() { return 0; }
5862 int g() noexcept { return 0; }
5863
5864 static_assert(noexcept(f()) == false, "");
5865 static_assert(noexcept(g()) == true, "");
5866
5867 }
5868
5869 namespace test_constexpr
5870 {
5871
5872 template < typename CharT >
5873 unsigned long constexpr
5874 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5875 {
5876 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5877 }
5878
5879 template < typename CharT >
5880 unsigned long constexpr
5881 strlen_c(const CharT *const s) noexcept
5882 {
5883 return strlen_c_r(s, 0UL);
5884 }
5885
5886 static_assert(strlen_c("") == 0UL, "");
5887 static_assert(strlen_c("1") == 1UL, "");
5888 static_assert(strlen_c("example") == 7UL, "");
5889 static_assert(strlen_c("another\0example") == 7UL, "");
5890
5891 }
5892
5893 namespace test_rvalue_references
5894 {
5895
5896 template < int N >
5897 struct answer
5898 {
5899 static constexpr int value = N;
5900 };
5901
5902 answer<1> f(int&) { return answer<1>(); }
5903 answer<2> f(const int&) { return answer<2>(); }
5904 answer<3> f(int&&) { return answer<3>(); }
5905
5906 void
5907 test()
5908 {
5909 int i = 0;
5910 const int c = 0;
5911 static_assert(decltype(f(i))::value == 1, "");
5912 static_assert(decltype(f(c))::value == 2, "");
5913 static_assert(decltype(f(0))::value == 3, "");
5914 }
5915
5916 }
5917
5918 namespace test_uniform_initialization
5919 {
5920
5921 struct test
5922 {
5923 static const int zero {};
5924 static const int one {1};
5925 };
5926
5927 static_assert(test::zero == 0, "");
5928 static_assert(test::one == 1, "");
5929
5930 }
5931
5932 namespace test_lambdas
5933 {
5934
5935 void
5936 test1()
5937 {
5938 auto lambda1 = [](){};
5939 auto lambda2 = lambda1;
5940 lambda1();
5941 lambda2();
5942 }
5943
5944 int
5945 test2()
5946 {
5947 auto a = [](int i, int j){ return i + j; }(1, 2);
5948 auto b = []() -> int { return '0'; }();
5949 auto c = [=](){ return a + b; }();
5950 auto d = [&](){ return c; }();
5951 auto e = [a, &b](int x) mutable {
5952 const auto identity = [](int y){ return y; };
5953 for (auto i = 0; i < a; ++i)
5954 a += b--;
5955 return x + identity(a + b);
5956 }(0);
5957 return a + b + c + d + e;
5958 }
5959
5960 int
5961 test3()
5962 {
5963 const auto nullary = [](){ return 0; };
5964 const auto unary = [](int x){ return x; };
5965 using nullary_t = decltype(nullary);
5966 using unary_t = decltype(unary);
5967 const auto higher1st = [](nullary_t f){ return f(); };
5968 const auto higher2nd = [unary](nullary_t f1){
5969 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5970 };
5971 return higher1st(nullary) + higher2nd(nullary)(unary);
5972 }
5973
5974 }
5975
5976 namespace test_variadic_templates
5977 {
5978
5979 template <int...>
5980 struct sum;
5981
5982 template <int N0, int... N1toN>
5983 struct sum<N0, N1toN...>
5984 {
5985 static constexpr auto value = N0 + sum<N1toN...>::value;
5986 };
5987
5988 template <>
5989 struct sum<>
5990 {
5991 static constexpr auto value = 0;
5992 };
5993
5994 static_assert(sum<>::value == 0, "");
5995 static_assert(sum<1>::value == 1, "");
5996 static_assert(sum<23>::value == 23, "");
5997 static_assert(sum<1, 2>::value == 3, "");
5998 static_assert(sum<5, 5, 11>::value == 21, "");
5999 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6000
6001 }
6002
6003 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6004 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6005 // because of this.
6006 namespace test_template_alias_sfinae
6007 {
6008
6009 struct foo {};
6010
6011 template<typename T>
6012 using member = typename T::member_type;
6013
6014 template<typename T>
6015 void func(...) {}
6016
6017 template<typename T>
6018 void func(member<T>*) {}
6019
6020 void test();
6021
6022 void test() { func<foo>(0); }
6023
6024 }
6025
6026 } // namespace cxx11
6027
6028 #endif // __cplusplus >= 201103L
6029
6030
6031
6032 _ACEOF
6033 if ac_fn_cxx_try_compile "$LINENO"; then :
6034 eval $cachevar=yes
6035 else
6036 eval $cachevar=no
6037 fi
6038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6039 CXX="$ac_save_CXX"
6040 fi
6041 eval ac_res=\$$cachevar
6042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6043 $as_echo "$ac_res" >&6; }
6044 if eval test x\$$cachevar = xyes; then
6045 CXX_DIALECT="$switch"
6046 ac_success=yes
6047 break
6048 fi
6049 done
6050 if test x$ac_success = xyes; then
6051 break
6052 fi
6053 done
6054 fi
6055 ac_ext=c
6056 ac_cpp='$CPP $CPPFLAGS'
6057 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6058 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6059 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6060
6061 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6062 if test x$ac_success = xno; then
6063 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6064 fi
6065 fi
6066 if test x$ac_success = xno; then
6067 HAVE_CXX11=0
6068 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6069 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6070 else
6071 HAVE_CXX11=1
6072
6073 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
6074
6075 fi
6076
6077
6078
6079
6080 # Dependency checking.
6081 rm -rf .tst 2>/dev/null
6082 mkdir .tst 2>/dev/null
6083 if test -d .tst; then
6084 am__leading_dot=.
6085 else
6086 am__leading_dot=_
6087 fi
6088 rmdir .tst 2>/dev/null
6089
6090 DEPDIR="${am__leading_dot}deps"
6091
6092 ac_config_commands="$ac_config_commands depdir"
6093
6094
6095 depcc="$CC" am_compiler_list=
6096
6097 am_depcomp=$ac_aux_dir/depcomp
6098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6099 $as_echo_n "checking dependency style of $depcc... " >&6; }
6100 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6101 $as_echo_n "(cached) " >&6
6102 else
6103 if test -f "$am_depcomp"; then
6104 # We make a subdir and do the tests there. Otherwise we can end up
6105 # making bogus files that we don't know about and never remove. For
6106 # instance it was reported that on HP-UX the gcc test will end up
6107 # making a dummy file named `D' -- because `-MD' means `put the output
6108 # in D'.
6109 mkdir conftest.dir
6110 # Copy depcomp to subdir because otherwise we won't find it if we're
6111 # using a relative directory.
6112 cp "$am_depcomp" conftest.dir
6113 cd conftest.dir
6114 # We will build objects and dependencies in a subdirectory because
6115 # it helps to detect inapplicable dependency modes. For instance
6116 # both Tru64's cc and ICC support -MD to output dependencies as a
6117 # side effect of compilation, but ICC will put the dependencies in
6118 # the current directory while Tru64 will put them in the object
6119 # directory.
6120 mkdir sub
6121
6122 am_cv_CC_dependencies_compiler_type=none
6123 if test "$am_compiler_list" = ""; then
6124 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6125 fi
6126 for depmode in $am_compiler_list; do
6127 if test $depmode = none; then break; fi
6128
6129 $as_echo "$as_me:$LINENO: trying $depmode" >&5
6130 # Setup a source with many dependencies, because some compilers
6131 # like to wrap large dependency lists on column 80 (with \), and
6132 # we should not choose a depcomp mode which is confused by this.
6133 #
6134 # We need to recreate these files for each test, as the compiler may
6135 # overwrite some of them when testing with obscure command lines.
6136 # This happens at least with the AIX C compiler.
6137 : > sub/conftest.c
6138 for i in 1 2 3 4 5 6; do
6139 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6140 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6141 # Solaris 8's {/usr,}/bin/sh.
6142 touch sub/conftst$i.h
6143 done
6144 echo "include sub/conftest.Po" > confmf
6145
6146 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6147 # mode. It turns out that the SunPro C++ compiler does not properly
6148 # handle `-M -o', and we need to detect this.
6149 depcmd="depmode=$depmode \
6150 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6151 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6152 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6153 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6154 if env $depcmd > conftest.err 2>&1 &&
6155 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6156 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6157 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6158 # icc doesn't choke on unknown options, it will just issue warnings
6159 # or remarks (even with -Werror). So we grep stderr for any message
6160 # that says an option was ignored or not supported.
6161 # When given -MP, icc 7.0 and 7.1 complain thusly:
6162 # icc: Command line warning: ignoring option '-M'; no argument required
6163 # The diagnosis changed in icc 8.0:
6164 # icc: Command line remark: option '-MP' not supported
6165 if (grep 'ignoring option' conftest.err ||
6166 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6167 am_cv_CC_dependencies_compiler_type=$depmode
6168 $as_echo "$as_me:$LINENO: success" >&5
6169 break
6170 fi
6171 fi
6172 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6173 sed -e 's/^/| /' < conftest.err >&5
6174 done
6175
6176 cd ..
6177 rm -rf conftest.dir
6178 else
6179 am_cv_CC_dependencies_compiler_type=none
6180 fi
6181
6182 fi
6183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6184 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6185 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6186 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
6187 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6188
6189 fi
6190
6191
6192 gnulib_extra_configure_args=
6193 # If large-file support is disabled, make sure gnulib does the same.
6194 if test "$enable_largefile" = no; then
6195 gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6196 fi
6197
6198 # Configure gnulib. We need to build gnulib under some other
6199 # directory not "gnulib", to avoid the problem of both GDB and
6200 # GDBserver wanting to build it in the same directory, when building
6201 # in the source dir.
6202
6203 in_src="gnulib"
6204 in_build="build-gnulib"
6205 in_extra_args="$gnulib_extra_configure_args"
6206
6207 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6208 # so they do not pile up.
6209 ac_sub_configure_args=
6210 ac_prev=
6211 eval "set x $ac_configure_args"
6212 shift
6213 for ac_arg
6214 do
6215 if test -n "$ac_prev"; then
6216 ac_prev=
6217 continue
6218 fi
6219 case $ac_arg in
6220 -cache-file | --cache-file | --cache-fil | --cache-fi \
6221 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6222 ac_prev=cache_file ;;
6223 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6224 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6225 | --c=*)
6226 ;;
6227 --config-cache | -C)
6228 ;;
6229 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6230 ac_prev=srcdir ;;
6231 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6232 ;;
6233 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6234 ac_prev=prefix ;;
6235 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6236 ;;
6237 --disable-option-checking)
6238 ;;
6239 *)
6240 case $ac_arg in
6241 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6242 esac
6243 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6244 esac
6245 done
6246
6247 # Always prepend --prefix to ensure using the same prefix
6248 # in subdir configurations.
6249 ac_arg="--prefix=$prefix"
6250 case $ac_arg in
6251 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6252 esac
6253 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6254
6255 # Pass --silent
6256 if test "$silent" = yes; then
6257 ac_sub_configure_args="--silent $ac_sub_configure_args"
6258 fi
6259
6260 # Always prepend --disable-option-checking to silence warnings, since
6261 # different subdirs can have different --enable and --with options.
6262 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6263
6264 ac_popdir=`pwd`
6265 ac_dir=$in_build
6266
6267 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6268 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6269 $as_echo "$ac_msg" >&6
6270 as_dir="$ac_dir"; as_fn_mkdir_p
6271
6272 case $srcdir in
6273 [\\/]* | ?:[\\/]* )
6274 ac_srcdir=$srcdir/$in_src ;;
6275 *) # Relative name.
6276 ac_srcdir=../$srcdir/$in_src ;;
6277 esac
6278
6279 cd "$ac_dir"
6280
6281 ac_sub_configure=$ac_srcdir/configure
6282
6283 # Make the cache file name correct relative to the subdirectory.
6284 case $cache_file in
6285 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6286 *) # Relative name.
6287 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6288 esac
6289
6290 if test -n "$in_extra_args"; then
6291 # Add the extra args at the end.
6292 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6293 fi
6294
6295 { $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
6296 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6297 # The eval makes quoting arguments work.
6298 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6299 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
6300 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
6301
6302 cd "$ac_popdir"
6303
6304
6305
6306 CONFIG_OBS=
6307 CONFIG_DEPS=
6308 CONFIG_SRCS=
6309 ENABLE_CFLAGS=
6310
6311 CONFIG_ALL=
6312 CONFIG_CLEAN=
6313 CONFIG_INSTALL=
6314 CONFIG_UNINSTALL=
6315
6316 # If we haven't got the data from the intl directory,
6317 # assume NLS is disabled.
6318 USE_NLS=no
6319 LIBINTL=
6320 LIBINTL_DEP=
6321 INCINTL=
6322 XGETTEXT=
6323 GMSGFMT=
6324 POSUB=
6325
6326 if test -f ../intl/config.intl; then
6327 . ../intl/config.intl
6328 fi
6329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6330 $as_echo_n "checking whether NLS is requested... " >&6; }
6331 if test x"$USE_NLS" != xyes; then
6332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6333 $as_echo "no" >&6; }
6334 else
6335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6336 $as_echo "yes" >&6; }
6337
6338 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6339
6340
6341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6342 $as_echo_n "checking for catalogs to be installed... " >&6; }
6343 # Look for .po and .gmo files in the source directory.
6344 CATALOGS=
6345 XLINGUAS=
6346 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6347 # If there aren't any .gmo files the shell will give us the
6348 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6349 # weeded out.
6350 case "$cat" in *\**)
6351 continue;;
6352 esac
6353 # The quadruple backslash is collapsed to a double backslash
6354 # by the backticks, then collapsed again by the double quotes,
6355 # leaving us with one backslash in the sed expression (right
6356 # before the dot that mustn't act as a wildcard).
6357 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6358 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6359 # The user is allowed to set LINGUAS to a list of languages to
6360 # install catalogs for. If it's empty that means "all of them."
6361 if test "x$LINGUAS" = x; then
6362 CATALOGS="$CATALOGS $cat"
6363 XLINGUAS="$XLINGUAS $lang"
6364 else
6365 case "$LINGUAS" in *$lang*)
6366 CATALOGS="$CATALOGS $cat"
6367 XLINGUAS="$XLINGUAS $lang"
6368 ;;
6369 esac
6370 fi
6371 done
6372 LINGUAS="$XLINGUAS"
6373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6374 $as_echo "$LINGUAS" >&6; }
6375
6376
6377 DATADIRNAME=share
6378
6379 INSTOBJEXT=.mo
6380
6381 GENCAT=gencat
6382
6383 CATOBJEXT=.gmo
6384
6385 fi
6386
6387 localedir='${datadir}/locale'
6388
6389
6390 if test x"$USE_NLS" = xyes; then
6391 CONFIG_ALL="$CONFIG_ALL all-po"
6392 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6393 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6394 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6395 fi
6396
6397 GNULIB=build-gnulib/import
6398
6399 # For Makefile dependencies.
6400 GNULIB_STDINT_H=
6401 if test x"$STDINT_H" != x; then
6402 GNULIB_STDINT_H=$GNULIB/$STDINT_H
6403 fi
6404
6405
6406 PACKAGE=gdb
6407
6408 cat >>confdefs.h <<_ACEOF
6409 #define PACKAGE "$PACKAGE"
6410 _ACEOF
6411
6412
6413
6414 # We never need to detect it in this sub-configure.
6415 # But preserve it for config.status --recheck.
6416
6417
6418
6419 MAKEINFO_EXTRA_FLAGS=""
6420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6421 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6422 if ${gdb_cv_have_makeinfo_click+:} false; then :
6423 $as_echo_n "(cached) " >&6
6424 else
6425 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6426 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6427 gdb_cv_have_makeinfo_click=yes
6428 else
6429 gdb_cv_have_makeinfo_click=no
6430 fi
6431 fi
6432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6433 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6434 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6435 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6436 fi
6437
6438
6439
6440
6441 # Check whether --with-separate-debug-dir was given.
6442 if test "${with_separate_debug_dir+set}" = set; then :
6443 withval=$with_separate_debug_dir;
6444 DEBUGDIR=$withval
6445 else
6446 DEBUGDIR=${libdir}/debug
6447 fi
6448
6449
6450 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6451 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6452 ac_define_dir=`eval echo $DEBUGDIR`
6453 ac_define_dir=`eval echo $ac_define_dir`
6454
6455 cat >>confdefs.h <<_ACEOF
6456 #define DEBUGDIR "$ac_define_dir"
6457 _ACEOF
6458
6459
6460
6461
6462 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6463 if test "x$prefix" = xNONE; then
6464 test_prefix=/usr/local
6465 else
6466 test_prefix=$prefix
6467 fi
6468 else
6469 test_prefix=$exec_prefix
6470 fi
6471 value=0
6472 case ${ac_define_dir} in
6473 "${test_prefix}"|"${test_prefix}/"*|\
6474 '${exec_prefix}'|'${exec_prefix}/'*)
6475 value=1
6476 ;;
6477 esac
6478
6479 cat >>confdefs.h <<_ACEOF
6480 #define DEBUGDIR_RELOCATABLE $value
6481 _ACEOF
6482
6483
6484
6485
6486 # We can't pass paths as command line arguments.
6487 # Mingw32 tries to be clever and will convert the paths for us.
6488 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6489 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6490 # This breaks GDB's relocatable path conversions since paths passed in
6491 # config.h would not get so translated, the path prefixes no longer match.
6492
6493 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6494 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6495 ac_define_dir=`eval echo $bindir`
6496 ac_define_dir=`eval echo $ac_define_dir`
6497
6498 cat >>confdefs.h <<_ACEOF
6499 #define BINDIR "$ac_define_dir"
6500 _ACEOF
6501
6502
6503
6504 # GDB's datadir relocation
6505
6506
6507
6508 # Check whether --with-gdb-datadir was given.
6509 if test "${with_gdb_datadir+set}" = set; then :
6510 withval=$with_gdb_datadir;
6511 GDB_DATADIR=$withval
6512 else
6513 GDB_DATADIR=${datadir}/gdb
6514 fi
6515
6516
6517 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6518 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6519 ac_define_dir=`eval echo $GDB_DATADIR`
6520 ac_define_dir=`eval echo $ac_define_dir`
6521
6522 cat >>confdefs.h <<_ACEOF
6523 #define GDB_DATADIR "$ac_define_dir"
6524 _ACEOF
6525
6526
6527
6528
6529 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6530 if test "x$prefix" = xNONE; then
6531 test_prefix=/usr/local
6532 else
6533 test_prefix=$prefix
6534 fi
6535 else
6536 test_prefix=$exec_prefix
6537 fi
6538 value=0
6539 case ${ac_define_dir} in
6540 "${test_prefix}"|"${test_prefix}/"*|\
6541 '${exec_prefix}'|'${exec_prefix}/'*)
6542 value=1
6543 ;;
6544 esac
6545
6546 cat >>confdefs.h <<_ACEOF
6547 #define GDB_DATADIR_RELOCATABLE $value
6548 _ACEOF
6549
6550
6551
6552
6553
6554 # Check whether --with-relocated-sources was given.
6555 if test "${with_relocated_sources+set}" = set; then :
6556 withval=$with_relocated_sources; reloc_srcdir="${withval}"
6557
6558 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6559 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6560 ac_define_dir=`eval echo $reloc_srcdir`
6561 ac_define_dir=`eval echo $ac_define_dir`
6562
6563 cat >>confdefs.h <<_ACEOF
6564 #define RELOC_SRCDIR "$ac_define_dir"
6565 _ACEOF
6566
6567
6568
6569 fi
6570
6571
6572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6573 $as_echo_n "checking for default auto-load directory... " >&6; }
6574
6575 # Check whether --with-auto-load-dir was given.
6576 if test "${with_auto_load_dir+set}" = set; then :
6577 withval=$with_auto_load_dir;
6578 else
6579 with_auto_load_dir='$debugdir:$datadir/auto-load'
6580 fi
6581
6582 escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
6583
6584 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6585 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6586 ac_define_dir=`eval echo $escape_dir`
6587 ac_define_dir=`eval echo $ac_define_dir`
6588
6589 cat >>confdefs.h <<_ACEOF
6590 #define AUTO_LOAD_DIR "$ac_define_dir"
6591 _ACEOF
6592
6593
6594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6595 $as_echo "$with_auto_load_dir" >&6; }
6596
6597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6598 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6599
6600 # Check whether --with-auto-load-safe-path was given.
6601 if test "${with_auto_load_safe_path+set}" = set; then :
6602 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6603 with_auto_load_safe_path="/"
6604 fi
6605 else
6606 with_auto_load_safe_path="$with_auto_load_dir"
6607 fi
6608
6609 escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
6610
6611 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6612 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6613 ac_define_dir=`eval echo $escape_dir`
6614 ac_define_dir=`eval echo $ac_define_dir`
6615
6616 cat >>confdefs.h <<_ACEOF
6617 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6618 _ACEOF
6619
6620
6621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6622 $as_echo "$with_auto_load_safe_path" >&6; }
6623
6624
6625
6626 subdirs="$subdirs testsuite"
6627
6628
6629 # Check whether to support alternative target configurations
6630 # Check whether --enable-targets was given.
6631 if test "${enable_targets+set}" = set; then :
6632 enableval=$enable_targets; case "${enableval}" in
6633 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6634 ;;
6635 no) enable_targets= ;;
6636 *) enable_targets=$enableval ;;
6637 esac
6638 fi
6639
6640
6641 # Check whether to enable 64-bit support on 32-bit hosts
6642 # Check whether --enable-64-bit-bfd was given.
6643 if test "${enable_64_bit_bfd+set}" = set; then :
6644 enableval=$enable_64_bit_bfd; case "${enableval}" in
6645 yes) want64=true ;;
6646 no) want64=false ;;
6647 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6648 esac
6649 else
6650 want64=false
6651 fi
6652
6653 # Provide defaults for some variables set by the per-host and per-target
6654 # configuration.
6655 gdb_host_obs=posix-hdep.o
6656
6657 if test "${target}" = "${host}"; then
6658 gdb_native=yes
6659 else
6660 gdb_native=no
6661 fi
6662
6663 . $srcdir/configure.host
6664
6665 # Add in the common host objects.
6666 . $srcdir/common/common.host
6667 gdb_host_obs="$gdb_host_obs $common_host_obs"
6668
6669 # Accumulate some settings from configure.tgt over all enabled targets
6670
6671 TARGET_OBS=
6672 all_targets=
6673 HAVE_NATIVE_GCORE_TARGET=
6674
6675 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6676 do
6677 if test "$targ_alias" = "all"; then
6678 all_targets=true
6679 else
6680 # Canonicalize the secondary target names.
6681 result=`$ac_config_sub $targ_alias 2>/dev/null`
6682 if test -n "$result"; then
6683 targ=$result
6684 else
6685 targ=$targ_alias
6686 fi
6687
6688 . ${srcdir}/configure.tgt
6689
6690 if test -z "${gdb_target_obs}"; then :
6691 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6692 fi
6693
6694 # Target-specific object files
6695 for i in ${gdb_target_obs}; do
6696 case " $TARGET_OBS " in
6697 *" ${i} "*) ;;
6698 *)
6699 TARGET_OBS="$TARGET_OBS ${i}"
6700 ;;
6701 esac
6702 done
6703
6704 # Check whether this target needs 64-bit CORE_ADDR
6705 if test x${want64} = xfalse; then
6706 . ${srcdir}/../bfd/config.bfd
6707 fi
6708
6709 # Check whether this target is native and supports gcore.
6710 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6711 && $gdb_have_gcore; then
6712 HAVE_NATIVE_GCORE_TARGET=1
6713 fi
6714 fi
6715 done
6716
6717 if test x${all_targets} = xtrue; then
6718
6719 # We want all 64-bit targets if we either:
6720 # - run on a 64-bit host or
6721 # - already require 64-bit support for some other target or
6722 # - the --enable-64-bit-bfd option was supplied
6723 # Otherwise we only support all 32-bit targets.
6724 #
6725 # NOTE: This test must be in sync with the corresponding
6726 # tests in BFD!
6727
6728 if test x${want64} = xfalse; then
6729 # The cast to long int works around a bug in the HP C Compiler
6730 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6731 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6732 # This bug is HP SR number 8606223364.
6733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6734 $as_echo_n "checking size of long... " >&6; }
6735 if ${ac_cv_sizeof_long+:} false; then :
6736 $as_echo_n "(cached) " >&6
6737 else
6738 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
6739
6740 else
6741 if test "$ac_cv_type_long" = yes; then
6742 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6743 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6744 as_fn_error 77 "cannot compute sizeof (long)
6745 See \`config.log' for more details" "$LINENO" 5; }
6746 else
6747 ac_cv_sizeof_long=0
6748 fi
6749 fi
6750
6751 fi
6752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6753 $as_echo "$ac_cv_sizeof_long" >&6; }
6754
6755
6756
6757 cat >>confdefs.h <<_ACEOF
6758 #define SIZEOF_LONG $ac_cv_sizeof_long
6759 _ACEOF
6760
6761
6762 if test "x${ac_cv_sizeof_long}" = "x8"; then
6763 want64=true
6764 fi
6765 fi
6766 if test x${want64} = xtrue; then
6767 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6768 else
6769 TARGET_OBS='$(ALL_TARGET_OBS)'
6770 fi
6771 fi
6772
6773
6774
6775
6776 # For other settings, only the main target counts.
6777 gdb_sim=
6778 gdb_osabi=
6779 build_gdbserver=
6780 targ=$target; . ${srcdir}/configure.tgt
6781
6782 # Fetch the default architecture and default target vector from BFD.
6783 targ=$target; . $srcdir/../bfd/config.bfd
6784
6785 # We only want the first architecture, so strip off the others if
6786 # there is more than one.
6787 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6788
6789 if test "x$targ_archs" != x; then
6790
6791 cat >>confdefs.h <<_ACEOF
6792 #define DEFAULT_BFD_ARCH $targ_archs
6793 _ACEOF
6794
6795 fi
6796 if test "x$targ_defvec" != x; then
6797
6798 cat >>confdefs.h <<_ACEOF
6799 #define DEFAULT_BFD_VEC $targ_defvec
6800 _ACEOF
6801
6802 fi
6803
6804 # Enable MI.
6805 # Check whether --enable-gdbmi was given.
6806 if test "${enable_gdbmi+set}" = set; then :
6807 enableval=$enable_gdbmi; case $enableval in
6808 yes | no)
6809 ;;
6810 *)
6811 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6812 esac
6813 else
6814 enable_gdbmi=yes
6815 fi
6816
6817 if test x"$enable_gdbmi" = xyes; then
6818 if test -d $srcdir/mi; then
6819 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6820 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6821 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6822 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6823 fi
6824 fi
6825
6826 # Enable TUI.
6827 # Check whether --enable-tui was given.
6828 if test "${enable_tui+set}" = set; then :
6829 enableval=$enable_tui; case $enableval in
6830 yes | no | auto)
6831 ;;
6832 *)
6833 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6834 esac
6835 else
6836 enable_tui=auto
6837 fi
6838
6839
6840 # Enable gdbtk.
6841 # Check whether --enable-gdbtk was given.
6842 if test "${enable_gdbtk+set}" = set; then :
6843 enableval=$enable_gdbtk; case $enableval in
6844 yes | no)
6845 ;;
6846 *)
6847 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6848 esac
6849 else
6850 if test -d $srcdir/gdbtk; then
6851 enable_gdbtk=yes
6852 else
6853 enable_gdbtk=no
6854 fi
6855 fi
6856
6857 # We unconditionally disable gdbtk tests on selected platforms.
6858 case $host_os in
6859 go32* | windows*)
6860 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6861 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6862 enable_gdbtk=no ;;
6863 esac
6864
6865 # Libunwind support for ia64.
6866
6867
6868 # Check whether --with-libunwind-ia64 was given.
6869 if test "${with_libunwind_ia64+set}" = set; then :
6870 withval=$with_libunwind_ia64;
6871 else
6872 with_libunwind_ia64=auto
6873 fi
6874
6875
6876 # Backward compatibility option.
6877 if test "${with_libunwind+set}" = set; then
6878 if test x"$with_libunwind_ia64" != xauto; then
6879 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6880 fi
6881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6882 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6883 with_libunwind_ia64="$with_libunwind"
6884 fi
6885
6886 case "$with_libunwind_ia64" in
6887 yes | no)
6888 ;;
6889 auto)
6890 for ac_header in libunwind-ia64.h
6891 do :
6892 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6893 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6894 cat >>confdefs.h <<_ACEOF
6895 #define HAVE_LIBUNWIND_IA64_H 1
6896 _ACEOF
6897
6898 fi
6899
6900 done
6901
6902 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6903 ;;
6904 *)
6905 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6906 ;;
6907 esac
6908
6909 if test x"$with_libunwind_ia64" = xyes; then
6910 for ac_header in libunwind-ia64.h
6911 do :
6912 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6913 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6914 cat >>confdefs.h <<_ACEOF
6915 #define HAVE_LIBUNWIND_IA64_H 1
6916 _ACEOF
6917
6918 fi
6919
6920 done
6921
6922 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6923 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6924 fi
6925 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6926 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6927 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
6928 fi
6929
6930 opt_curses=no
6931
6932 # Check whether --with-curses was given.
6933 if test "${with_curses+set}" = set; then :
6934 withval=$with_curses; opt_curses=$withval
6935 fi
6936
6937
6938 prefer_curses=no
6939 if test "$opt_curses" = "yes"; then
6940 prefer_curses=yes
6941 fi
6942
6943 # Profiling support.
6944 # Check whether --enable-profiling was given.
6945 if test "${enable_profiling+set}" = set; then :
6946 enableval=$enable_profiling; case $enableval in
6947 yes | no)
6948 ;;
6949 *)
6950 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
6951 esac
6952 else
6953 enable_profiling=no
6954 fi
6955
6956
6957 for ac_func in monstartup _mcleanup
6958 do :
6959 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6960 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6961 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6962 cat >>confdefs.h <<_ACEOF
6963 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6964 _ACEOF
6965
6966 fi
6967 done
6968
6969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6970 $as_echo_n "checking for _etext... " >&6; }
6971 if ${ac_cv_var__etext+:} false; then :
6972 $as_echo_n "(cached) " >&6
6973 else
6974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6975 /* end confdefs.h. */
6976 #include <stdlib.h>
6977 extern char _etext;
6978
6979 int
6980 main ()
6981 {
6982 free (&_etext);
6983 ;
6984 return 0;
6985 }
6986 _ACEOF
6987 if ac_fn_c_try_link "$LINENO"; then :
6988 ac_cv_var__etext=yes
6989 else
6990 ac_cv_var__etext=no
6991 fi
6992 rm -f core conftest.err conftest.$ac_objext \
6993 conftest$ac_exeext conftest.$ac_ext
6994 fi
6995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6996 $as_echo "$ac_cv_var__etext" >&6; }
6997 if test $ac_cv_var__etext = yes; then
6998
6999 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
7000
7001 fi
7002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7003 $as_echo_n "checking for etext... " >&6; }
7004 if ${ac_cv_var_etext+:} false; then :
7005 $as_echo_n "(cached) " >&6
7006 else
7007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7008 /* end confdefs.h. */
7009 #include <stdlib.h>
7010 extern char etext;
7011
7012 int
7013 main ()
7014 {
7015 free (&etext);
7016 ;
7017 return 0;
7018 }
7019 _ACEOF
7020 if ac_fn_c_try_link "$LINENO"; then :
7021 ac_cv_var_etext=yes
7022 else
7023 ac_cv_var_etext=no
7024 fi
7025 rm -f core conftest.err conftest.$ac_objext \
7026 conftest$ac_exeext conftest.$ac_ext
7027 fi
7028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7029 $as_echo "$ac_cv_var_etext" >&6; }
7030 if test $ac_cv_var_etext = yes; then
7031
7032 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
7033
7034 fi
7035 if test "$enable_profiling" = yes ; then
7036 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
7037 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
7038 fi
7039 PROFILE_CFLAGS=-pg
7040 OLD_CFLAGS="$CFLAGS"
7041 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
7042
7043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7044 $as_echo_n "checking whether $CC supports -pg... " >&6; }
7045 if ${ac_cv_cc_supports_pg+:} false; then :
7046 $as_echo_n "(cached) " >&6
7047 else
7048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7049 /* end confdefs.h. */
7050
7051 int
7052 main ()
7053 {
7054 int x;
7055 ;
7056 return 0;
7057 }
7058 _ACEOF
7059 if ac_fn_c_try_compile "$LINENO"; then :
7060 ac_cv_cc_supports_pg=yes
7061 else
7062 ac_cv_cc_supports_pg=no
7063 fi
7064 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7065 fi
7066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7067 $as_echo "$ac_cv_cc_supports_pg" >&6; }
7068
7069 if test $ac_cv_cc_supports_pg = no; then
7070 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7071 fi
7072
7073 CFLAGS="$OLD_CFLAGS"
7074 fi
7075
7076 CODESIGN_CERT=
7077 # Check whether --enable-codesign was given.
7078 if test "${enable_codesign+set}" = set; then :
7079 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7080 fi
7081
7082
7083
7084
7085
7086 # Check whether --with-pkgversion was given.
7087 if test "${with_pkgversion+set}" = set; then :
7088 withval=$with_pkgversion; case "$withval" in
7089 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
7090 no) PKGVERSION= ;;
7091 *) PKGVERSION="($withval) " ;;
7092 esac
7093 else
7094 PKGVERSION="(GDB) "
7095
7096 fi
7097
7098
7099
7100
7101
7102 # Check whether --with-bugurl was given.
7103 if test "${with_bugurl+set}" = set; then :
7104 withval=$with_bugurl; case "$withval" in
7105 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
7106 no) BUGURL=
7107 ;;
7108 *) BUGURL="$withval"
7109 ;;
7110 esac
7111 else
7112 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7113
7114 fi
7115
7116 case ${BUGURL} in
7117 "")
7118 REPORT_BUGS_TO=
7119 REPORT_BUGS_TEXI=
7120 ;;
7121 *)
7122 REPORT_BUGS_TO="<$BUGURL>"
7123 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7124 ;;
7125 esac;
7126
7127
7128
7129
7130 cat >>confdefs.h <<_ACEOF
7131 #define PKGVERSION "$PKGVERSION"
7132 _ACEOF
7133
7134
7135 cat >>confdefs.h <<_ACEOF
7136 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7137 _ACEOF
7138
7139
7140 # --------------------- #
7141 # Checks for programs. #
7142 # --------------------- #
7143
7144 for ac_prog in gawk mawk nawk awk
7145 do
7146 # Extract the first word of "$ac_prog", so it can be a program name with args.
7147 set dummy $ac_prog; ac_word=$2
7148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7149 $as_echo_n "checking for $ac_word... " >&6; }
7150 if ${ac_cv_prog_AWK+:} false; then :
7151 $as_echo_n "(cached) " >&6
7152 else
7153 if test -n "$AWK"; then
7154 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7155 else
7156 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7157 for as_dir in $PATH
7158 do
7159 IFS=$as_save_IFS
7160 test -z "$as_dir" && as_dir=.
7161 for ac_exec_ext in '' $ac_executable_extensions; do
7162 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7163 ac_cv_prog_AWK="$ac_prog"
7164 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7165 break 2
7166 fi
7167 done
7168 done
7169 IFS=$as_save_IFS
7170
7171 fi
7172 fi
7173 AWK=$ac_cv_prog_AWK
7174 if test -n "$AWK"; then
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7176 $as_echo "$AWK" >&6; }
7177 else
7178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7179 $as_echo "no" >&6; }
7180 fi
7181
7182
7183 test -n "$AWK" && break
7184 done
7185
7186 # Find a good install program. We prefer a C program (faster),
7187 # so one script is as good as another. But avoid the broken or
7188 # incompatible versions:
7189 # SysV /etc/install, /usr/sbin/install
7190 # SunOS /usr/etc/install
7191 # IRIX /sbin/install
7192 # AIX /bin/install
7193 # AmigaOS /C/install, which installs bootblocks on floppy discs
7194 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7195 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7196 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7197 # OS/2's system install, which has a completely different semantic
7198 # ./install, which can be erroneously created by make from ./install.sh.
7199 # Reject install programs that cannot install multiple files.
7200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7201 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7202 if test -z "$INSTALL"; then
7203 if ${ac_cv_path_install+:} false; then :
7204 $as_echo_n "(cached) " >&6
7205 else
7206 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7207 for as_dir in $PATH
7208 do
7209 IFS=$as_save_IFS
7210 test -z "$as_dir" && as_dir=.
7211 # Account for people who put trailing slashes in PATH elements.
7212 case $as_dir/ in #((
7213 ./ | .// | /[cC]/* | \
7214 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7215 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7216 /usr/ucb/* ) ;;
7217 *)
7218 # OSF1 and SCO ODT 3.0 have their own names for install.
7219 # Don't use installbsd from OSF since it installs stuff as root
7220 # by default.
7221 for ac_prog in ginstall scoinst install; do
7222 for ac_exec_ext in '' $ac_executable_extensions; do
7223 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7224 if test $ac_prog = install &&
7225 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7226 # AIX install. It has an incompatible calling convention.
7227 :
7228 elif test $ac_prog = install &&
7229 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7230 # program-specific install script used by HP pwplus--don't use.
7231 :
7232 else
7233 rm -rf conftest.one conftest.two conftest.dir
7234 echo one > conftest.one
7235 echo two > conftest.two
7236 mkdir conftest.dir
7237 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7238 test -s conftest.one && test -s conftest.two &&
7239 test -s conftest.dir/conftest.one &&
7240 test -s conftest.dir/conftest.two
7241 then
7242 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7243 break 3
7244 fi
7245 fi
7246 fi
7247 done
7248 done
7249 ;;
7250 esac
7251
7252 done
7253 IFS=$as_save_IFS
7254
7255 rm -rf conftest.one conftest.two conftest.dir
7256
7257 fi
7258 if test "${ac_cv_path_install+set}" = set; then
7259 INSTALL=$ac_cv_path_install
7260 else
7261 # As a last resort, use the slow shell script. Don't cache a
7262 # value for INSTALL within a source directory, because that will
7263 # break other packages using the cache if that directory is
7264 # removed, or if the value is a relative name.
7265 INSTALL=$ac_install_sh
7266 fi
7267 fi
7268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7269 $as_echo "$INSTALL" >&6; }
7270
7271 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7272 # It thinks the first close brace ends the variable substitution.
7273 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7274
7275 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7276
7277 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7278
7279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7280 $as_echo_n "checking whether ln -s works... " >&6; }
7281 LN_S=$as_ln_s
7282 if test "$LN_S" = "ln -s"; then
7283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7284 $as_echo "yes" >&6; }
7285 else
7286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7287 $as_echo "no, using $LN_S" >&6; }
7288 fi
7289
7290 if test -n "$ac_tool_prefix"; then
7291 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7292 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7294 $as_echo_n "checking for $ac_word... " >&6; }
7295 if ${ac_cv_prog_RANLIB+:} false; then :
7296 $as_echo_n "(cached) " >&6
7297 else
7298 if test -n "$RANLIB"; then
7299 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7300 else
7301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7302 for as_dir in $PATH
7303 do
7304 IFS=$as_save_IFS
7305 test -z "$as_dir" && as_dir=.
7306 for ac_exec_ext in '' $ac_executable_extensions; do
7307 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7308 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7309 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7310 break 2
7311 fi
7312 done
7313 done
7314 IFS=$as_save_IFS
7315
7316 fi
7317 fi
7318 RANLIB=$ac_cv_prog_RANLIB
7319 if test -n "$RANLIB"; then
7320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7321 $as_echo "$RANLIB" >&6; }
7322 else
7323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7324 $as_echo "no" >&6; }
7325 fi
7326
7327
7328 fi
7329 if test -z "$ac_cv_prog_RANLIB"; then
7330 ac_ct_RANLIB=$RANLIB
7331 # Extract the first word of "ranlib", so it can be a program name with args.
7332 set dummy ranlib; ac_word=$2
7333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7334 $as_echo_n "checking for $ac_word... " >&6; }
7335 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7336 $as_echo_n "(cached) " >&6
7337 else
7338 if test -n "$ac_ct_RANLIB"; then
7339 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7340 else
7341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7342 for as_dir in $PATH
7343 do
7344 IFS=$as_save_IFS
7345 test -z "$as_dir" && as_dir=.
7346 for ac_exec_ext in '' $ac_executable_extensions; do
7347 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7348 ac_cv_prog_ac_ct_RANLIB="ranlib"
7349 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7350 break 2
7351 fi
7352 done
7353 done
7354 IFS=$as_save_IFS
7355
7356 fi
7357 fi
7358 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7359 if test -n "$ac_ct_RANLIB"; then
7360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7361 $as_echo "$ac_ct_RANLIB" >&6; }
7362 else
7363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7364 $as_echo "no" >&6; }
7365 fi
7366
7367 if test "x$ac_ct_RANLIB" = x; then
7368 RANLIB=":"
7369 else
7370 case $cross_compiling:$ac_tool_warned in
7371 yes:)
7372 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7373 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7374 ac_tool_warned=yes ;;
7375 esac
7376 RANLIB=$ac_ct_RANLIB
7377 fi
7378 else
7379 RANLIB="$ac_cv_prog_RANLIB"
7380 fi
7381
7382 for ac_prog in 'bison -y' byacc
7383 do
7384 # Extract the first word of "$ac_prog", so it can be a program name with args.
7385 set dummy $ac_prog; ac_word=$2
7386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7387 $as_echo_n "checking for $ac_word... " >&6; }
7388 if ${ac_cv_prog_YACC+:} false; then :
7389 $as_echo_n "(cached) " >&6
7390 else
7391 if test -n "$YACC"; then
7392 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7393 else
7394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7395 for as_dir in $PATH
7396 do
7397 IFS=$as_save_IFS
7398 test -z "$as_dir" && as_dir=.
7399 for ac_exec_ext in '' $ac_executable_extensions; do
7400 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7401 ac_cv_prog_YACC="$ac_prog"
7402 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7403 break 2
7404 fi
7405 done
7406 done
7407 IFS=$as_save_IFS
7408
7409 fi
7410 fi
7411 YACC=$ac_cv_prog_YACC
7412 if test -n "$YACC"; then
7413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7414 $as_echo "$YACC" >&6; }
7415 else
7416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7417 $as_echo "no" >&6; }
7418 fi
7419
7420
7421 test -n "$YACC" && break
7422 done
7423 test -n "$YACC" || YACC="yacc"
7424
7425
7426 if test -n "$ac_tool_prefix"; then
7427 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7428 set dummy ${ac_tool_prefix}ar; ac_word=$2
7429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7430 $as_echo_n "checking for $ac_word... " >&6; }
7431 if ${ac_cv_prog_AR+:} false; then :
7432 $as_echo_n "(cached) " >&6
7433 else
7434 if test -n "$AR"; then
7435 ac_cv_prog_AR="$AR" # Let the user override the test.
7436 else
7437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7438 for as_dir in $PATH
7439 do
7440 IFS=$as_save_IFS
7441 test -z "$as_dir" && as_dir=.
7442 for ac_exec_ext in '' $ac_executable_extensions; do
7443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7444 ac_cv_prog_AR="${ac_tool_prefix}ar"
7445 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7446 break 2
7447 fi
7448 done
7449 done
7450 IFS=$as_save_IFS
7451
7452 fi
7453 fi
7454 AR=$ac_cv_prog_AR
7455 if test -n "$AR"; then
7456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7457 $as_echo "$AR" >&6; }
7458 else
7459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7460 $as_echo "no" >&6; }
7461 fi
7462
7463
7464 fi
7465 if test -z "$ac_cv_prog_AR"; then
7466 ac_ct_AR=$AR
7467 # Extract the first word of "ar", so it can be a program name with args.
7468 set dummy ar; ac_word=$2
7469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7470 $as_echo_n "checking for $ac_word... " >&6; }
7471 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7472 $as_echo_n "(cached) " >&6
7473 else
7474 if test -n "$ac_ct_AR"; then
7475 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7476 else
7477 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7478 for as_dir in $PATH
7479 do
7480 IFS=$as_save_IFS
7481 test -z "$as_dir" && as_dir=.
7482 for ac_exec_ext in '' $ac_executable_extensions; do
7483 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7484 ac_cv_prog_ac_ct_AR="ar"
7485 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7486 break 2
7487 fi
7488 done
7489 done
7490 IFS=$as_save_IFS
7491
7492 fi
7493 fi
7494 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7495 if test -n "$ac_ct_AR"; then
7496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7497 $as_echo "$ac_ct_AR" >&6; }
7498 else
7499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7500 $as_echo "no" >&6; }
7501 fi
7502
7503 if test "x$ac_ct_AR" = x; then
7504 AR=""
7505 else
7506 case $cross_compiling:$ac_tool_warned in
7507 yes:)
7508 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7509 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7510 ac_tool_warned=yes ;;
7511 esac
7512 AR=$ac_ct_AR
7513 fi
7514 else
7515 AR="$ac_cv_prog_AR"
7516 fi
7517
7518 if test -n "$ac_tool_prefix"; then
7519 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7520 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7522 $as_echo_n "checking for $ac_word... " >&6; }
7523 if ${ac_cv_prog_DLLTOOL+:} false; then :
7524 $as_echo_n "(cached) " >&6
7525 else
7526 if test -n "$DLLTOOL"; then
7527 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7528 else
7529 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7530 for as_dir in $PATH
7531 do
7532 IFS=$as_save_IFS
7533 test -z "$as_dir" && as_dir=.
7534 for ac_exec_ext in '' $ac_executable_extensions; do
7535 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7536 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7537 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7538 break 2
7539 fi
7540 done
7541 done
7542 IFS=$as_save_IFS
7543
7544 fi
7545 fi
7546 DLLTOOL=$ac_cv_prog_DLLTOOL
7547 if test -n "$DLLTOOL"; then
7548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7549 $as_echo "$DLLTOOL" >&6; }
7550 else
7551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7552 $as_echo "no" >&6; }
7553 fi
7554
7555
7556 fi
7557 if test -z "$ac_cv_prog_DLLTOOL"; then
7558 ac_ct_DLLTOOL=$DLLTOOL
7559 # Extract the first word of "dlltool", so it can be a program name with args.
7560 set dummy dlltool; ac_word=$2
7561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7562 $as_echo_n "checking for $ac_word... " >&6; }
7563 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7564 $as_echo_n "(cached) " >&6
7565 else
7566 if test -n "$ac_ct_DLLTOOL"; then
7567 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7568 else
7569 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7570 for as_dir in $PATH
7571 do
7572 IFS=$as_save_IFS
7573 test -z "$as_dir" && as_dir=.
7574 for ac_exec_ext in '' $ac_executable_extensions; do
7575 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7576 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7577 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7578 break 2
7579 fi
7580 done
7581 done
7582 IFS=$as_save_IFS
7583
7584 fi
7585 fi
7586 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7587 if test -n "$ac_ct_DLLTOOL"; then
7588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7589 $as_echo "$ac_ct_DLLTOOL" >&6; }
7590 else
7591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7592 $as_echo "no" >&6; }
7593 fi
7594
7595 if test "x$ac_ct_DLLTOOL" = x; then
7596 DLLTOOL=""
7597 else
7598 case $cross_compiling:$ac_tool_warned in
7599 yes:)
7600 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7601 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7602 ac_tool_warned=yes ;;
7603 esac
7604 DLLTOOL=$ac_ct_DLLTOOL
7605 fi
7606 else
7607 DLLTOOL="$ac_cv_prog_DLLTOOL"
7608 fi
7609
7610 if test -n "$ac_tool_prefix"; then
7611 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7612 set dummy ${ac_tool_prefix}windres; ac_word=$2
7613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7614 $as_echo_n "checking for $ac_word... " >&6; }
7615 if ${ac_cv_prog_WINDRES+:} false; then :
7616 $as_echo_n "(cached) " >&6
7617 else
7618 if test -n "$WINDRES"; then
7619 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7620 else
7621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7622 for as_dir in $PATH
7623 do
7624 IFS=$as_save_IFS
7625 test -z "$as_dir" && as_dir=.
7626 for ac_exec_ext in '' $ac_executable_extensions; do
7627 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7628 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7629 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7630 break 2
7631 fi
7632 done
7633 done
7634 IFS=$as_save_IFS
7635
7636 fi
7637 fi
7638 WINDRES=$ac_cv_prog_WINDRES
7639 if test -n "$WINDRES"; then
7640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7641 $as_echo "$WINDRES" >&6; }
7642 else
7643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7644 $as_echo "no" >&6; }
7645 fi
7646
7647
7648 fi
7649 if test -z "$ac_cv_prog_WINDRES"; then
7650 ac_ct_WINDRES=$WINDRES
7651 # Extract the first word of "windres", so it can be a program name with args.
7652 set dummy windres; ac_word=$2
7653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7654 $as_echo_n "checking for $ac_word... " >&6; }
7655 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7656 $as_echo_n "(cached) " >&6
7657 else
7658 if test -n "$ac_ct_WINDRES"; then
7659 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7660 else
7661 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7662 for as_dir in $PATH
7663 do
7664 IFS=$as_save_IFS
7665 test -z "$as_dir" && as_dir=.
7666 for ac_exec_ext in '' $ac_executable_extensions; do
7667 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7668 ac_cv_prog_ac_ct_WINDRES="windres"
7669 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7670 break 2
7671 fi
7672 done
7673 done
7674 IFS=$as_save_IFS
7675
7676 fi
7677 fi
7678 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7679 if test -n "$ac_ct_WINDRES"; then
7680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7681 $as_echo "$ac_ct_WINDRES" >&6; }
7682 else
7683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7684 $as_echo "no" >&6; }
7685 fi
7686
7687 if test "x$ac_ct_WINDRES" = x; then
7688 WINDRES=""
7689 else
7690 case $cross_compiling:$ac_tool_warned in
7691 yes:)
7692 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7693 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7694 ac_tool_warned=yes ;;
7695 esac
7696 WINDRES=$ac_ct_WINDRES
7697 fi
7698 else
7699 WINDRES="$ac_cv_prog_WINDRES"
7700 fi
7701
7702
7703 case $host_os in
7704 gnu*)
7705 # Needed for GNU Hurd hosts.
7706 if test -n "$ac_tool_prefix"; then
7707 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7708 set dummy ${ac_tool_prefix}mig; ac_word=$2
7709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7710 $as_echo_n "checking for $ac_word... " >&6; }
7711 if ${ac_cv_prog_MIG+:} false; then :
7712 $as_echo_n "(cached) " >&6
7713 else
7714 if test -n "$MIG"; then
7715 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7716 else
7717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7718 for as_dir in $PATH
7719 do
7720 IFS=$as_save_IFS
7721 test -z "$as_dir" && as_dir=.
7722 for ac_exec_ext in '' $ac_executable_extensions; do
7723 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7724 ac_cv_prog_MIG="${ac_tool_prefix}mig"
7725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7726 break 2
7727 fi
7728 done
7729 done
7730 IFS=$as_save_IFS
7731
7732 fi
7733 fi
7734 MIG=$ac_cv_prog_MIG
7735 if test -n "$MIG"; then
7736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7737 $as_echo "$MIG" >&6; }
7738 else
7739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7740 $as_echo "no" >&6; }
7741 fi
7742
7743
7744 fi
7745 if test -z "$ac_cv_prog_MIG"; then
7746 ac_ct_MIG=$MIG
7747 # Extract the first word of "mig", so it can be a program name with args.
7748 set dummy mig; ac_word=$2
7749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7750 $as_echo_n "checking for $ac_word... " >&6; }
7751 if ${ac_cv_prog_ac_ct_MIG+:} false; then :
7752 $as_echo_n "(cached) " >&6
7753 else
7754 if test -n "$ac_ct_MIG"; then
7755 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7756 else
7757 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7758 for as_dir in $PATH
7759 do
7760 IFS=$as_save_IFS
7761 test -z "$as_dir" && as_dir=.
7762 for ac_exec_ext in '' $ac_executable_extensions; do
7763 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7764 ac_cv_prog_ac_ct_MIG="mig"
7765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7766 break 2
7767 fi
7768 done
7769 done
7770 IFS=$as_save_IFS
7771
7772 fi
7773 fi
7774 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7775 if test -n "$ac_ct_MIG"; then
7776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7777 $as_echo "$ac_ct_MIG" >&6; }
7778 else
7779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7780 $as_echo "no" >&6; }
7781 fi
7782
7783 if test "x$ac_ct_MIG" = x; then
7784 MIG=""
7785 else
7786 case $cross_compiling:$ac_tool_warned in
7787 yes:)
7788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7789 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7790 ac_tool_warned=yes ;;
7791 esac
7792 MIG=$ac_ct_MIG
7793 fi
7794 else
7795 MIG="$ac_cv_prog_MIG"
7796 fi
7797
7798 if test x"$MIG" = x; then
7799 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
7800 fi
7801 ;;
7802 esac
7803
7804 # ---------------------- #
7805 # Checks for libraries. #
7806 # ---------------------- #
7807
7808 # We might need to link with -lm; most simulators need it.
7809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7810 $as_echo_n "checking for main in -lm... " >&6; }
7811 if ${ac_cv_lib_m_main+:} false; then :
7812 $as_echo_n "(cached) " >&6
7813 else
7814 ac_check_lib_save_LIBS=$LIBS
7815 LIBS="-lm $LIBS"
7816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7817 /* end confdefs.h. */
7818
7819
7820 int
7821 main ()
7822 {
7823 return main ();
7824 ;
7825 return 0;
7826 }
7827 _ACEOF
7828 if ac_fn_c_try_link "$LINENO"; then :
7829 ac_cv_lib_m_main=yes
7830 else
7831 ac_cv_lib_m_main=no
7832 fi
7833 rm -f core conftest.err conftest.$ac_objext \
7834 conftest$ac_exeext conftest.$ac_ext
7835 LIBS=$ac_check_lib_save_LIBS
7836 fi
7837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7838 $as_echo "$ac_cv_lib_m_main" >&6; }
7839 if test "x$ac_cv_lib_m_main" = xyes; then :
7840 cat >>confdefs.h <<_ACEOF
7841 #define HAVE_LIBM 1
7842 _ACEOF
7843
7844 LIBS="-lm $LIBS"
7845
7846 fi
7847
7848
7849 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
7850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7851 $as_echo_n "checking for library containing gethostbyname... " >&6; }
7852 if ${ac_cv_search_gethostbyname+:} false; then :
7853 $as_echo_n "(cached) " >&6
7854 else
7855 ac_func_search_save_LIBS=$LIBS
7856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7857 /* end confdefs.h. */
7858
7859 /* Override any GCC internal prototype to avoid an error.
7860 Use char because int might match the return type of a GCC
7861 builtin and then its argument prototype would still apply. */
7862 #ifdef __cplusplus
7863 extern "C"
7864 #endif
7865 char gethostbyname ();
7866 int
7867 main ()
7868 {
7869 return gethostbyname ();
7870 ;
7871 return 0;
7872 }
7873 _ACEOF
7874 for ac_lib in '' nsl; do
7875 if test -z "$ac_lib"; then
7876 ac_res="none required"
7877 else
7878 ac_res=-l$ac_lib
7879 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7880 fi
7881 if ac_fn_c_try_link "$LINENO"; then :
7882 ac_cv_search_gethostbyname=$ac_res
7883 fi
7884 rm -f core conftest.err conftest.$ac_objext \
7885 conftest$ac_exeext
7886 if ${ac_cv_search_gethostbyname+:} false; then :
7887 break
7888 fi
7889 done
7890 if ${ac_cv_search_gethostbyname+:} false; then :
7891
7892 else
7893 ac_cv_search_gethostbyname=no
7894 fi
7895 rm conftest.$ac_ext
7896 LIBS=$ac_func_search_save_LIBS
7897 fi
7898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7899 $as_echo "$ac_cv_search_gethostbyname" >&6; }
7900 ac_res=$ac_cv_search_gethostbyname
7901 if test "$ac_res" != no; then :
7902 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7903
7904 fi
7905
7906
7907 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
7908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7909 $as_echo_n "checking for library containing socketpair... " >&6; }
7910 if ${ac_cv_search_socketpair+:} false; then :
7911 $as_echo_n "(cached) " >&6
7912 else
7913 ac_func_search_save_LIBS=$LIBS
7914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7915 /* end confdefs.h. */
7916
7917 /* Override any GCC internal prototype to avoid an error.
7918 Use char because int might match the return type of a GCC
7919 builtin and then its argument prototype would still apply. */
7920 #ifdef __cplusplus
7921 extern "C"
7922 #endif
7923 char socketpair ();
7924 int
7925 main ()
7926 {
7927 return socketpair ();
7928 ;
7929 return 0;
7930 }
7931 _ACEOF
7932 for ac_lib in '' socket; do
7933 if test -z "$ac_lib"; then
7934 ac_res="none required"
7935 else
7936 ac_res=-l$ac_lib
7937 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7938 fi
7939 if ac_fn_c_try_link "$LINENO"; then :
7940 ac_cv_search_socketpair=$ac_res
7941 fi
7942 rm -f core conftest.err conftest.$ac_objext \
7943 conftest$ac_exeext
7944 if ${ac_cv_search_socketpair+:} false; then :
7945 break
7946 fi
7947 done
7948 if ${ac_cv_search_socketpair+:} false; then :
7949
7950 else
7951 ac_cv_search_socketpair=no
7952 fi
7953 rm conftest.$ac_ext
7954 LIBS=$ac_func_search_save_LIBS
7955 fi
7956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7957 $as_echo "$ac_cv_search_socketpair" >&6; }
7958 ac_res=$ac_cv_search_socketpair
7959 if test "$ac_res" != no; then :
7960 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7961
7962 fi
7963
7964
7965 # Link in zlib if we can. This allows us to read compressed debug sections.
7966
7967 # Use the system's zlib library.
7968 zlibdir="-L\$(top_builddir)/../zlib"
7969 zlibinc="-I\$(top_srcdir)/../zlib"
7970
7971 # Check whether --with-system-zlib was given.
7972 if test "${with_system_zlib+set}" = set; then :
7973 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7974 zlibdir=
7975 zlibinc=
7976 fi
7977
7978 fi
7979
7980
7981
7982
7983
7984 # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7985 # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
7986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7987 $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7988 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7989 $as_echo_n "(cached) " >&6
7990 else
7991 ac_func_search_save_LIBS=$LIBS
7992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7993 /* end confdefs.h. */
7994
7995 /* Override any GCC internal prototype to avoid an error.
7996 Use char because int might match the return type of a GCC
7997 builtin and then its argument prototype would still apply. */
7998 #ifdef __cplusplus
7999 extern "C"
8000 #endif
8001 char kinfo_getvmmap ();
8002 int
8003 main ()
8004 {
8005 return kinfo_getvmmap ();
8006 ;
8007 return 0;
8008 }
8009 _ACEOF
8010 for ac_lib in '' util util-freebsd; do
8011 if test -z "$ac_lib"; then
8012 ac_res="none required"
8013 else
8014 ac_res=-l$ac_lib
8015 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8016 fi
8017 if ac_fn_c_try_link "$LINENO"; then :
8018 ac_cv_search_kinfo_getvmmap=$ac_res
8019 fi
8020 rm -f core conftest.err conftest.$ac_objext \
8021 conftest$ac_exeext
8022 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
8023 break
8024 fi
8025 done
8026 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
8027
8028 else
8029 ac_cv_search_kinfo_getvmmap=no
8030 fi
8031 rm conftest.$ac_ext
8032 LIBS=$ac_func_search_save_LIBS
8033 fi
8034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8035 $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8036 ac_res=$ac_cv_search_kinfo_getvmmap
8037 if test "$ac_res" != no; then :
8038 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8039
8040 $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8041
8042 fi
8043
8044
8045 # fbsd-nat.c can also use kinfo_getfile.
8046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
8047 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
8048 if ${ac_cv_search_kinfo_getfile+:} false; then :
8049 $as_echo_n "(cached) " >&6
8050 else
8051 ac_func_search_save_LIBS=$LIBS
8052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8053 /* end confdefs.h. */
8054
8055 /* Override any GCC internal prototype to avoid an error.
8056 Use char because int might match the return type of a GCC
8057 builtin and then its argument prototype would still apply. */
8058 #ifdef __cplusplus
8059 extern "C"
8060 #endif
8061 char kinfo_getfile ();
8062 int
8063 main ()
8064 {
8065 return kinfo_getfile ();
8066 ;
8067 return 0;
8068 }
8069 _ACEOF
8070 for ac_lib in '' util util-freebsd; do
8071 if test -z "$ac_lib"; then
8072 ac_res="none required"
8073 else
8074 ac_res=-l$ac_lib
8075 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8076 fi
8077 if ac_fn_c_try_link "$LINENO"; then :
8078 ac_cv_search_kinfo_getfile=$ac_res
8079 fi
8080 rm -f core conftest.err conftest.$ac_objext \
8081 conftest$ac_exeext
8082 if ${ac_cv_search_kinfo_getfile+:} false; then :
8083 break
8084 fi
8085 done
8086 if ${ac_cv_search_kinfo_getfile+:} false; then :
8087
8088 else
8089 ac_cv_search_kinfo_getfile=no
8090 fi
8091 rm conftest.$ac_ext
8092 LIBS=$ac_func_search_save_LIBS
8093 fi
8094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
8095 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
8096 ac_res=$ac_cv_search_kinfo_getfile
8097 if test "$ac_res" != no; then :
8098 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8099
8100 $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
8101
8102 fi
8103
8104
8105
8106 if test "X$prefix" = "XNONE"; then
8107 acl_final_prefix="$ac_default_prefix"
8108 else
8109 acl_final_prefix="$prefix"
8110 fi
8111 if test "X$exec_prefix" = "XNONE"; then
8112 acl_final_exec_prefix='${prefix}'
8113 else
8114 acl_final_exec_prefix="$exec_prefix"
8115 fi
8116 acl_save_prefix="$prefix"
8117 prefix="$acl_final_prefix"
8118 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8119 prefix="$acl_save_prefix"
8120
8121
8122 # Check whether --with-gnu-ld was given.
8123 if test "${with_gnu_ld+set}" = set; then :
8124 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8125 else
8126 with_gnu_ld=no
8127 fi
8128
8129 # Prepare PATH_SEPARATOR.
8130 # The user is always right.
8131 if test "${PATH_SEPARATOR+set}" != set; then
8132 echo "#! /bin/sh" >conf$$.sh
8133 echo "exit 0" >>conf$$.sh
8134 chmod +x conf$$.sh
8135 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8136 PATH_SEPARATOR=';'
8137 else
8138 PATH_SEPARATOR=:
8139 fi
8140 rm -f conf$$.sh
8141 fi
8142 ac_prog=ld
8143 if test "$GCC" = yes; then
8144 # Check if gcc -print-prog-name=ld gives a path.
8145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8146 $as_echo_n "checking for ld used by GCC... " >&6; }
8147 case $host in
8148 *-*-mingw*)
8149 # gcc leaves a trailing carriage return which upsets mingw
8150 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8151 *)
8152 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8153 esac
8154 case $ac_prog in
8155 # Accept absolute paths.
8156 [\\/]* | [A-Za-z]:[\\/]*)
8157 re_direlt='/[^/][^/]*/\.\./'
8158 # Canonicalize the path of ld
8159 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8160 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8161 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8162 done
8163 test -z "$LD" && LD="$ac_prog"
8164 ;;
8165 "")
8166 # If it fails, then pretend we aren't using GCC.
8167 ac_prog=ld
8168 ;;
8169 *)
8170 # If it is relative, then search for the first ld in PATH.
8171 with_gnu_ld=unknown
8172 ;;
8173 esac
8174 elif test "$with_gnu_ld" = yes; then
8175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8176 $as_echo_n "checking for GNU ld... " >&6; }
8177 else
8178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8179 $as_echo_n "checking for non-GNU ld... " >&6; }
8180 fi
8181 if ${acl_cv_path_LD+:} false; then :
8182 $as_echo_n "(cached) " >&6
8183 else
8184 if test -z "$LD"; then
8185 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8186 for ac_dir in $PATH; do
8187 test -z "$ac_dir" && ac_dir=.
8188 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8189 acl_cv_path_LD="$ac_dir/$ac_prog"
8190 # Check to see if the program is GNU ld. I'd rather use --version,
8191 # but apparently some GNU ld's only accept -v.
8192 # Break only if it was the GNU/non-GNU ld that we prefer.
8193 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8194 test "$with_gnu_ld" != no && break
8195 else
8196 test "$with_gnu_ld" != yes && break
8197 fi
8198 fi
8199 done
8200 IFS="$ac_save_ifs"
8201 else
8202 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8203 fi
8204 fi
8205
8206 LD="$acl_cv_path_LD"
8207 if test -n "$LD"; then
8208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8209 $as_echo "$LD" >&6; }
8210 else
8211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8212 $as_echo "no" >&6; }
8213 fi
8214 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8216 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8217 if ${acl_cv_prog_gnu_ld+:} false; then :
8218 $as_echo_n "(cached) " >&6
8219 else
8220 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8221 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8222 acl_cv_prog_gnu_ld=yes
8223 else
8224 acl_cv_prog_gnu_ld=no
8225 fi
8226 fi
8227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8228 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8229 with_gnu_ld=$acl_cv_prog_gnu_ld
8230
8231
8232
8233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8234 $as_echo_n "checking for shared library run path origin... " >&6; }
8235 if ${acl_cv_rpath+:} false; then :
8236 $as_echo_n "(cached) " >&6
8237 else
8238
8239 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8240 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8241 . ./conftest.sh
8242 rm -f ./conftest.sh
8243 acl_cv_rpath=done
8244
8245 fi
8246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8247 $as_echo "$acl_cv_rpath" >&6; }
8248 wl="$acl_cv_wl"
8249 libext="$acl_cv_libext"
8250 shlibext="$acl_cv_shlibext"
8251 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8252 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8253 hardcode_direct="$acl_cv_hardcode_direct"
8254 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8255 # Check whether --enable-rpath was given.
8256 if test "${enable_rpath+set}" = set; then :
8257 enableval=$enable_rpath; :
8258 else
8259 enable_rpath=yes
8260 fi
8261
8262
8263
8264
8265
8266
8267
8268
8269 use_additional=yes
8270
8271 acl_save_prefix="$prefix"
8272 prefix="$acl_final_prefix"
8273 acl_save_exec_prefix="$exec_prefix"
8274 exec_prefix="$acl_final_exec_prefix"
8275
8276 eval additional_includedir=\"$includedir\"
8277 eval additional_libdir=\"$libdir\"
8278
8279 exec_prefix="$acl_save_exec_prefix"
8280 prefix="$acl_save_prefix"
8281
8282
8283 # Check whether --with-libiconv-prefix was given.
8284 if test "${with_libiconv_prefix+set}" = set; then :
8285 withval=$with_libiconv_prefix;
8286 if test "X$withval" = "Xno"; then
8287 use_additional=no
8288 else
8289 if test "X$withval" = "X"; then
8290
8291 acl_save_prefix="$prefix"
8292 prefix="$acl_final_prefix"
8293 acl_save_exec_prefix="$exec_prefix"
8294 exec_prefix="$acl_final_exec_prefix"
8295
8296 eval additional_includedir=\"$includedir\"
8297 eval additional_libdir=\"$libdir\"
8298
8299 exec_prefix="$acl_save_exec_prefix"
8300 prefix="$acl_save_prefix"
8301
8302 else
8303 additional_includedir="$withval/include"
8304 additional_libdir="$withval/lib"
8305 fi
8306 fi
8307
8308 fi
8309
8310 LIBICONV=
8311 LTLIBICONV=
8312 INCICONV=
8313 rpathdirs=
8314 ltrpathdirs=
8315 names_already_handled=
8316 names_next_round='iconv '
8317 while test -n "$names_next_round"; do
8318 names_this_round="$names_next_round"
8319 names_next_round=
8320 for name in $names_this_round; do
8321 already_handled=
8322 for n in $names_already_handled; do
8323 if test "$n" = "$name"; then
8324 already_handled=yes
8325 break
8326 fi
8327 done
8328 if test -z "$already_handled"; then
8329 names_already_handled="$names_already_handled $name"
8330 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8331 eval value=\"\$HAVE_LIB$uppername\"
8332 if test -n "$value"; then
8333 if test "$value" = yes; then
8334 eval value=\"\$LIB$uppername\"
8335 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8336 eval value=\"\$LTLIB$uppername\"
8337 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8338 else
8339 :
8340 fi
8341 else
8342 found_dir=
8343 found_la=
8344 found_so=
8345 found_a=
8346 if test $use_additional = yes; then
8347 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8348 found_dir="$additional_libdir"
8349 found_so="$additional_libdir/lib$name.$shlibext"
8350 if test -f "$additional_libdir/lib$name.la"; then
8351 found_la="$additional_libdir/lib$name.la"
8352 fi
8353 else
8354 if test -f "$additional_libdir/lib$name.$libext"; then
8355 found_dir="$additional_libdir"
8356 found_a="$additional_libdir/lib$name.$libext"
8357 if test -f "$additional_libdir/lib$name.la"; then
8358 found_la="$additional_libdir/lib$name.la"
8359 fi
8360 fi
8361 fi
8362 fi
8363 if test "X$found_dir" = "X"; then
8364 for x in $LDFLAGS $LTLIBICONV; do
8365
8366 acl_save_prefix="$prefix"
8367 prefix="$acl_final_prefix"
8368 acl_save_exec_prefix="$exec_prefix"
8369 exec_prefix="$acl_final_exec_prefix"
8370 eval x=\"$x\"
8371 exec_prefix="$acl_save_exec_prefix"
8372 prefix="$acl_save_prefix"
8373
8374 case "$x" in
8375 -L*)
8376 dir=`echo "X$x" | sed -e 's/^X-L//'`
8377 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8378 found_dir="$dir"
8379 found_so="$dir/lib$name.$shlibext"
8380 if test -f "$dir/lib$name.la"; then
8381 found_la="$dir/lib$name.la"
8382 fi
8383 else
8384 if test -f "$dir/lib$name.$libext"; then
8385 found_dir="$dir"
8386 found_a="$dir/lib$name.$libext"
8387 if test -f "$dir/lib$name.la"; then
8388 found_la="$dir/lib$name.la"
8389 fi
8390 fi
8391 fi
8392 ;;
8393 esac
8394 if test "X$found_dir" != "X"; then
8395 break
8396 fi
8397 done
8398 fi
8399 if test "X$found_dir" != "X"; then
8400 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8401 if test "X$found_so" != "X"; then
8402 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8403 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8404 else
8405 haveit=
8406 for x in $ltrpathdirs; do
8407 if test "X$x" = "X$found_dir"; then
8408 haveit=yes
8409 break
8410 fi
8411 done
8412 if test -z "$haveit"; then
8413 ltrpathdirs="$ltrpathdirs $found_dir"
8414 fi
8415 if test "$hardcode_direct" = yes; then
8416 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8417 else
8418 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8419 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8420 haveit=
8421 for x in $rpathdirs; do
8422 if test "X$x" = "X$found_dir"; then
8423 haveit=yes
8424 break
8425 fi
8426 done
8427 if test -z "$haveit"; then
8428 rpathdirs="$rpathdirs $found_dir"
8429 fi
8430 else
8431 haveit=
8432 for x in $LDFLAGS $LIBICONV; do
8433
8434 acl_save_prefix="$prefix"
8435 prefix="$acl_final_prefix"
8436 acl_save_exec_prefix="$exec_prefix"
8437 exec_prefix="$acl_final_exec_prefix"
8438 eval x=\"$x\"
8439 exec_prefix="$acl_save_exec_prefix"
8440 prefix="$acl_save_prefix"
8441
8442 if test "X$x" = "X-L$found_dir"; then
8443 haveit=yes
8444 break
8445 fi
8446 done
8447 if test -z "$haveit"; then
8448 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8449 fi
8450 if test "$hardcode_minus_L" != no; then
8451 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8452 else
8453 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8454 fi
8455 fi
8456 fi
8457 fi
8458 else
8459 if test "X$found_a" != "X"; then
8460 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8461 else
8462 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8463 fi
8464 fi
8465 additional_includedir=
8466 case "$found_dir" in
8467 */lib | */lib/)
8468 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8469 additional_includedir="$basedir/include"
8470 ;;
8471 esac
8472 if test "X$additional_includedir" != "X"; then
8473 if test "X$additional_includedir" != "X/usr/include"; then
8474 haveit=
8475 if test "X$additional_includedir" = "X/usr/local/include"; then
8476 if test -n "$GCC"; then
8477 case $host_os in
8478 linux*) haveit=yes;;
8479 esac
8480 fi
8481 fi
8482 if test -z "$haveit"; then
8483 for x in $CPPFLAGS $INCICONV; do
8484
8485 acl_save_prefix="$prefix"
8486 prefix="$acl_final_prefix"
8487 acl_save_exec_prefix="$exec_prefix"
8488 exec_prefix="$acl_final_exec_prefix"
8489 eval x=\"$x\"
8490 exec_prefix="$acl_save_exec_prefix"
8491 prefix="$acl_save_prefix"
8492
8493 if test "X$x" = "X-I$additional_includedir"; then
8494 haveit=yes
8495 break
8496 fi
8497 done
8498 if test -z "$haveit"; then
8499 if test -d "$additional_includedir"; then
8500 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8501 fi
8502 fi
8503 fi
8504 fi
8505 fi
8506 if test -n "$found_la"; then
8507 save_libdir="$libdir"
8508 case "$found_la" in
8509 */* | *\\*) . "$found_la" ;;
8510 *) . "./$found_la" ;;
8511 esac
8512 libdir="$save_libdir"
8513 for dep in $dependency_libs; do
8514 case "$dep" in
8515 -L*)
8516 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8517 if test "X$additional_libdir" != "X/usr/lib"; then
8518 haveit=
8519 if test "X$additional_libdir" = "X/usr/local/lib"; then
8520 if test -n "$GCC"; then
8521 case $host_os in
8522 linux*) haveit=yes;;
8523 esac
8524 fi
8525 fi
8526 if test -z "$haveit"; then
8527 haveit=
8528 for x in $LDFLAGS $LIBICONV; do
8529
8530 acl_save_prefix="$prefix"
8531 prefix="$acl_final_prefix"
8532 acl_save_exec_prefix="$exec_prefix"
8533 exec_prefix="$acl_final_exec_prefix"
8534 eval x=\"$x\"
8535 exec_prefix="$acl_save_exec_prefix"
8536 prefix="$acl_save_prefix"
8537
8538 if test "X$x" = "X-L$additional_libdir"; then
8539 haveit=yes
8540 break
8541 fi
8542 done
8543 if test -z "$haveit"; then
8544 if test -d "$additional_libdir"; then
8545 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8546 fi
8547 fi
8548 haveit=
8549 for x in $LDFLAGS $LTLIBICONV; do
8550
8551 acl_save_prefix="$prefix"
8552 prefix="$acl_final_prefix"
8553 acl_save_exec_prefix="$exec_prefix"
8554 exec_prefix="$acl_final_exec_prefix"
8555 eval x=\"$x\"
8556 exec_prefix="$acl_save_exec_prefix"
8557 prefix="$acl_save_prefix"
8558
8559 if test "X$x" = "X-L$additional_libdir"; then
8560 haveit=yes
8561 break
8562 fi
8563 done
8564 if test -z "$haveit"; then
8565 if test -d "$additional_libdir"; then
8566 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8567 fi
8568 fi
8569 fi
8570 fi
8571 ;;
8572 -R*)
8573 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8574 if test "$enable_rpath" != no; then
8575 haveit=
8576 for x in $rpathdirs; do
8577 if test "X$x" = "X$dir"; then
8578 haveit=yes
8579 break
8580 fi
8581 done
8582 if test -z "$haveit"; then
8583 rpathdirs="$rpathdirs $dir"
8584 fi
8585 haveit=
8586 for x in $ltrpathdirs; do
8587 if test "X$x" = "X$dir"; then
8588 haveit=yes
8589 break
8590 fi
8591 done
8592 if test -z "$haveit"; then
8593 ltrpathdirs="$ltrpathdirs $dir"
8594 fi
8595 fi
8596 ;;
8597 -l*)
8598 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8599 ;;
8600 *.la)
8601 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8602 ;;
8603 *)
8604 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8605 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8606 ;;
8607 esac
8608 done
8609 fi
8610 else
8611 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8612 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8613 fi
8614 fi
8615 fi
8616 done
8617 done
8618 if test "X$rpathdirs" != "X"; then
8619 if test -n "$hardcode_libdir_separator"; then
8620 alldirs=
8621 for found_dir in $rpathdirs; do
8622 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8623 done
8624 acl_save_libdir="$libdir"
8625 libdir="$alldirs"
8626 eval flag=\"$hardcode_libdir_flag_spec\"
8627 libdir="$acl_save_libdir"
8628 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8629 else
8630 for found_dir in $rpathdirs; do
8631 acl_save_libdir="$libdir"
8632 libdir="$found_dir"
8633 eval flag=\"$hardcode_libdir_flag_spec\"
8634 libdir="$acl_save_libdir"
8635 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8636 done
8637 fi
8638 fi
8639 if test "X$ltrpathdirs" != "X"; then
8640 for found_dir in $ltrpathdirs; do
8641 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8642 done
8643 fi
8644
8645
8646
8647
8648
8649
8650
8651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8652 $as_echo_n "checking for iconv... " >&6; }
8653 if ${am_cv_func_iconv+:} false; then :
8654 $as_echo_n "(cached) " >&6
8655 else
8656
8657 am_cv_func_iconv="no, consider installing GNU libiconv"
8658 am_cv_lib_iconv=no
8659 am_save_CPPFLAGS="$CPPFLAGS"
8660 CPPFLAGS="$CPPFLAGS $INCICONV"
8661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8662 /* end confdefs.h. */
8663 #include <stdlib.h>
8664 #include <iconv.h>
8665 int
8666 main ()
8667 {
8668 iconv_t cd = iconv_open("","");
8669 iconv(cd,NULL,NULL,NULL,NULL);
8670 iconv_close(cd);
8671 ;
8672 return 0;
8673 }
8674 _ACEOF
8675 if ac_fn_c_try_link "$LINENO"; then :
8676 am_cv_func_iconv=yes
8677 fi
8678 rm -f core conftest.err conftest.$ac_objext \
8679 conftest$ac_exeext conftest.$ac_ext
8680 CPPFLAGS="$am_save_CPPFLAGS"
8681
8682 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8683 for _libs in .libs _libs; do
8684 am_save_CPPFLAGS="$CPPFLAGS"
8685 am_save_LIBS="$LIBS"
8686 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8687 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8689 /* end confdefs.h. */
8690 #include <stdlib.h>
8691 #include <iconv.h>
8692 int
8693 main ()
8694 {
8695 iconv_t cd = iconv_open("","");
8696 iconv(cd,NULL,NULL,NULL,NULL);
8697 iconv_close(cd);
8698 ;
8699 return 0;
8700 }
8701 _ACEOF
8702 if ac_fn_c_try_link "$LINENO"; then :
8703 INCICONV="-I../libiconv/include"
8704 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8705 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8706 am_cv_lib_iconv=yes
8707 am_cv_func_iconv=yes
8708 fi
8709 rm -f core conftest.err conftest.$ac_objext \
8710 conftest$ac_exeext conftest.$ac_ext
8711 CPPFLAGS="$am_save_CPPFLAGS"
8712 LIBS="$am_save_LIBS"
8713 if test "$am_cv_func_iconv" = "yes"; then
8714 break
8715 fi
8716 done
8717 fi
8718
8719 if test "$am_cv_func_iconv" != yes; then
8720 am_save_CPPFLAGS="$CPPFLAGS"
8721 am_save_LIBS="$LIBS"
8722 CPPFLAGS="$LIBS $INCICONV"
8723 LIBS="$LIBS $LIBICONV"
8724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8725 /* end confdefs.h. */
8726 #include <stdlib.h>
8727 #include <iconv.h>
8728 int
8729 main ()
8730 {
8731 iconv_t cd = iconv_open("","");
8732 iconv(cd,NULL,NULL,NULL,NULL);
8733 iconv_close(cd);
8734 ;
8735 return 0;
8736 }
8737 _ACEOF
8738 if ac_fn_c_try_link "$LINENO"; then :
8739 am_cv_lib_iconv=yes
8740 am_cv_func_iconv=yes
8741 fi
8742 rm -f core conftest.err conftest.$ac_objext \
8743 conftest$ac_exeext conftest.$ac_ext
8744 CPPFLAGS="$am_save_CPPFLAGS"
8745 LIBS="$am_save_LIBS"
8746 fi
8747
8748 fi
8749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8750 $as_echo "$am_cv_func_iconv" >&6; }
8751 if test "$am_cv_func_iconv" = yes; then
8752
8753 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8754
8755 fi
8756 if test "$am_cv_lib_iconv" = yes; then
8757
8758 for element in $INCICONV; do
8759 haveit=
8760 for x in $CPPFLAGS; do
8761
8762 acl_save_prefix="$prefix"
8763 prefix="$acl_final_prefix"
8764 acl_save_exec_prefix="$exec_prefix"
8765 exec_prefix="$acl_final_exec_prefix"
8766 eval x=\"$x\"
8767 exec_prefix="$acl_save_exec_prefix"
8768 prefix="$acl_save_prefix"
8769
8770 if test "X$x" = "X$element"; then
8771 haveit=yes
8772 break
8773 fi
8774 done
8775 if test -z "$haveit"; then
8776 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8777 fi
8778 done
8779
8780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8781 $as_echo_n "checking how to link with libiconv... " >&6; }
8782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8783 $as_echo "$LIBICONV" >&6; }
8784 else
8785 LIBICONV=
8786 LTLIBICONV=
8787 fi
8788
8789
8790
8791 if test "$am_cv_func_iconv" = yes; then
8792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8793 $as_echo_n "checking for iconv declaration... " >&6; }
8794 if ${am_cv_proto_iconv+:} false; then :
8795 $as_echo_n "(cached) " >&6
8796 else
8797
8798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8799 /* end confdefs.h. */
8800
8801 #include <stdlib.h>
8802 #include <iconv.h>
8803 extern
8804 #ifdef __cplusplus
8805 "C"
8806 #endif
8807 #if defined(__STDC__) || defined(__cplusplus)
8808 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8809 #else
8810 size_t iconv();
8811 #endif
8812
8813 int
8814 main ()
8815 {
8816
8817 ;
8818 return 0;
8819 }
8820 _ACEOF
8821 if ac_fn_c_try_compile "$LINENO"; then :
8822 am_cv_proto_iconv_arg1=""
8823 else
8824 am_cv_proto_iconv_arg1="const"
8825 fi
8826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8827 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);"
8828 fi
8829
8830 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
8832 }$am_cv_proto_iconv" >&5
8833 $as_echo "${ac_t:-
8834 }$am_cv_proto_iconv" >&6; }
8835
8836 cat >>confdefs.h <<_ACEOF
8837 #define ICONV_CONST $am_cv_proto_iconv_arg1
8838 _ACEOF
8839
8840 fi
8841
8842
8843 # GDB may fork/exec the iconv program to get the list of supported character
8844 # sets. Allow the user to specify where to find it.
8845 # There are several factors affecting the choice of option name:
8846 # - There is already --with-libiconv-prefix but we can't use it, it specifies
8847 # the build-time location of libiconv files.
8848 # - The program we need to find is iconv, which comes with glibc. The user
8849 # doesn't necessarily have libiconv installed. Therefore naming this
8850 # --with-libiconv-foo feels wrong.
8851 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8852 # defined to work on directories not files (though it really doesn't know
8853 # the difference).
8854 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
8855 # with --with-libiconv-prefix.
8856 # Putting these together is why the option name is --with-iconv-bin.
8857
8858
8859 # Check whether --with-iconv-bin was given.
8860 if test "${with_iconv_bin+set}" = set; then :
8861 withval=$with_iconv_bin; iconv_bin="${withval}"
8862
8863 cat >>confdefs.h <<_ACEOF
8864 #define ICONV_BIN "${iconv_bin}"
8865 _ACEOF
8866
8867
8868 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8869 if test "x$prefix" = xNONE; then
8870 test_prefix=/usr/local
8871 else
8872 test_prefix=$prefix
8873 fi
8874 else
8875 test_prefix=$exec_prefix
8876 fi
8877 value=0
8878 case ${iconv_bin} in
8879 "${test_prefix}"|"${test_prefix}/"*|\
8880 '${exec_prefix}'|'${exec_prefix}/'*)
8881 value=1
8882 ;;
8883 esac
8884
8885 cat >>confdefs.h <<_ACEOF
8886 #define ICONV_BIN_RELOCATABLE $value
8887 _ACEOF
8888
8889
8890
8891 fi
8892
8893
8894 # For the TUI, we need enhanced curses functionality.
8895 if test x"$enable_tui" != xno; then
8896 prefer_curses=yes
8897 fi
8898
8899 curses_found=no
8900 if test x"$prefer_curses" = xyes; then
8901 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8902 # curses library because the latter might not provide all the
8903 # functionality we need. However, this leads to problems on systems
8904 # where the linker searches /usr/local/lib, but the compiler doesn't
8905 # search /usr/local/include, if ncurses is installed in /usr/local. A
8906 # default installation of ncurses on alpha*-dec-osf* will lead to such
8907 # a situation.
8908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8909 $as_echo_n "checking for library containing waddstr... " >&6; }
8910 if ${ac_cv_search_waddstr+:} false; then :
8911 $as_echo_n "(cached) " >&6
8912 else
8913 ac_func_search_save_LIBS=$LIBS
8914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8915 /* end confdefs.h. */
8916
8917 /* Override any GCC internal prototype to avoid an error.
8918 Use char because int might match the return type of a GCC
8919 builtin and then its argument prototype would still apply. */
8920 #ifdef __cplusplus
8921 extern "C"
8922 #endif
8923 char waddstr ();
8924 int
8925 main ()
8926 {
8927 return waddstr ();
8928 ;
8929 return 0;
8930 }
8931 _ACEOF
8932 for ac_lib in '' ncursesw ncurses cursesX curses; do
8933 if test -z "$ac_lib"; then
8934 ac_res="none required"
8935 else
8936 ac_res=-l$ac_lib
8937 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8938 fi
8939 if ac_fn_c_try_link "$LINENO"; then :
8940 ac_cv_search_waddstr=$ac_res
8941 fi
8942 rm -f core conftest.err conftest.$ac_objext \
8943 conftest$ac_exeext
8944 if ${ac_cv_search_waddstr+:} false; then :
8945 break
8946 fi
8947 done
8948 if ${ac_cv_search_waddstr+:} false; then :
8949
8950 else
8951 ac_cv_search_waddstr=no
8952 fi
8953 rm conftest.$ac_ext
8954 LIBS=$ac_func_search_save_LIBS
8955 fi
8956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8957 $as_echo "$ac_cv_search_waddstr" >&6; }
8958 ac_res=$ac_cv_search_waddstr
8959 if test "$ac_res" != no; then :
8960 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8961
8962 fi
8963
8964
8965 if test "$ac_cv_search_waddstr" != no; then
8966 curses_found=yes
8967 fi
8968 fi
8969
8970 # Check whether we should enable the TUI, but only do so if we really
8971 # can.
8972 if test x"$enable_tui" != xno; then
8973 if test -d $srcdir/tui; then
8974 if test "$curses_found" != no; then
8975 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8976 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8977 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8978 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
8979 else
8980 if test x"$enable_tui" = xyes; then
8981 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
8982 else
8983 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8984 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
8985 fi
8986 fi
8987 fi
8988 fi
8989
8990 # Since GDB uses Readline, we need termcap functionality. In many
8991 # cases this will be provided by the curses library, but some systems
8992 # have a separate termcap library, or no curses library at all.
8993
8994 case $host_os in
8995 cygwin*)
8996 if test -d $srcdir/libtermcap; then
8997 LIBS="../libtermcap/libtermcap.a $LIBS"
8998 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8999 fi ;;
9000 go32* | *djgpp*)
9001 ac_cv_search_tgetent="none required"
9002 ;;
9003 esac
9004
9005 # These are the libraries checked by Readline.
9006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9007 $as_echo_n "checking for library containing tgetent... " >&6; }
9008 if ${ac_cv_search_tgetent+:} false; then :
9009 $as_echo_n "(cached) " >&6
9010 else
9011 ac_func_search_save_LIBS=$LIBS
9012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9013 /* end confdefs.h. */
9014
9015 /* Override any GCC internal prototype to avoid an error.
9016 Use char because int might match the return type of a GCC
9017 builtin and then its argument prototype would still apply. */
9018 #ifdef __cplusplus
9019 extern "C"
9020 #endif
9021 char tgetent ();
9022 int
9023 main ()
9024 {
9025 return tgetent ();
9026 ;
9027 return 0;
9028 }
9029 _ACEOF
9030 for ac_lib in '' termcap tinfo curses ncursesw ncurses; do
9031 if test -z "$ac_lib"; then
9032 ac_res="none required"
9033 else
9034 ac_res=-l$ac_lib
9035 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9036 fi
9037 if ac_fn_c_try_link "$LINENO"; then :
9038 ac_cv_search_tgetent=$ac_res
9039 fi
9040 rm -f core conftest.err conftest.$ac_objext \
9041 conftest$ac_exeext
9042 if ${ac_cv_search_tgetent+:} false; then :
9043 break
9044 fi
9045 done
9046 if ${ac_cv_search_tgetent+:} false; then :
9047
9048 else
9049 ac_cv_search_tgetent=no
9050 fi
9051 rm conftest.$ac_ext
9052 LIBS=$ac_func_search_save_LIBS
9053 fi
9054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9055 $as_echo "$ac_cv_search_tgetent" >&6; }
9056 ac_res=$ac_cv_search_tgetent
9057 if test "$ac_res" != no; then :
9058 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9059
9060 fi
9061
9062
9063 if test "$ac_cv_search_tgetent" = no; then
9064 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
9065 fi
9066
9067
9068 # Check whether --with-system-readline was given.
9069 if test "${with_system_readline+set}" = set; then :
9070 withval=$with_system_readline;
9071 fi
9072
9073
9074 if test "$with_system_readline" = yes; then
9075 READLINE=-lreadline
9076 READLINE_DEPS=
9077 READLINE_CFLAGS=
9078 READLINE_TEXI_INCFLAG=
9079 else
9080 READLINE='$(READLINE_DIR)/libreadline.a'
9081 READLINE_DEPS='$(READLINE)'
9082 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9083 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9084 fi
9085
9086
9087
9088
9089
9090 # Generate jit-reader.h
9091
9092 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9093 TARGET_PTR=
9094
9095 # The cast to long int works around a bug in the HP C Compiler
9096 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9097 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9098 # This bug is HP SR number 8606223364.
9099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9100 $as_echo_n "checking size of unsigned long long... " >&6; }
9101 if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9102 $as_echo_n "(cached) " >&6
9103 else
9104 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9105
9106 else
9107 if test "$ac_cv_type_unsigned_long_long" = yes; then
9108 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9109 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9110 as_fn_error 77 "cannot compute sizeof (unsigned long long)
9111 See \`config.log' for more details" "$LINENO" 5; }
9112 else
9113 ac_cv_sizeof_unsigned_long_long=0
9114 fi
9115 fi
9116
9117 fi
9118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9119 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9120
9121
9122
9123 cat >>confdefs.h <<_ACEOF
9124 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9125 _ACEOF
9126
9127
9128 # The cast to long int works around a bug in the HP C Compiler
9129 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9130 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9131 # This bug is HP SR number 8606223364.
9132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9133 $as_echo_n "checking size of unsigned long... " >&6; }
9134 if ${ac_cv_sizeof_unsigned_long+:} false; then :
9135 $as_echo_n "(cached) " >&6
9136 else
9137 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9138
9139 else
9140 if test "$ac_cv_type_unsigned_long" = yes; then
9141 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9142 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9143 as_fn_error 77 "cannot compute sizeof (unsigned long)
9144 See \`config.log' for more details" "$LINENO" 5; }
9145 else
9146 ac_cv_sizeof_unsigned_long=0
9147 fi
9148 fi
9149
9150 fi
9151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9152 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9153
9154
9155
9156 cat >>confdefs.h <<_ACEOF
9157 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9158 _ACEOF
9159
9160
9161 # The cast to long int works around a bug in the HP C Compiler
9162 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9163 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9164 # This bug is HP SR number 8606223364.
9165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9166 $as_echo_n "checking size of unsigned __int128... " >&6; }
9167 if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9168 $as_echo_n "(cached) " >&6
9169 else
9170 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9171
9172 else
9173 if test "$ac_cv_type_unsigned___int128" = yes; then
9174 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9175 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9176 as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9177 See \`config.log' for more details" "$LINENO" 5; }
9178 else
9179 ac_cv_sizeof_unsigned___int128=0
9180 fi
9181 fi
9182
9183 fi
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9185 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9186
9187
9188
9189 cat >>confdefs.h <<_ACEOF
9190 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9191 _ACEOF
9192
9193
9194
9195 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9196 TARGET_PTR="unsigned long"
9197 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9198 TARGET_PTR="unsigned long long"
9199 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9200 TARGET_PTR="unsigned __int128"
9201 else
9202 TARGET_PTR="unsigned long"
9203 fi
9204
9205
9206 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9207
9208
9209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9210 $as_echo_n "checking for library containing dlopen... " >&6; }
9211 if ${ac_cv_search_dlopen+:} false; then :
9212 $as_echo_n "(cached) " >&6
9213 else
9214 ac_func_search_save_LIBS=$LIBS
9215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9216 /* end confdefs.h. */
9217
9218 /* Override any GCC internal prototype to avoid an error.
9219 Use char because int might match the return type of a GCC
9220 builtin and then its argument prototype would still apply. */
9221 #ifdef __cplusplus
9222 extern "C"
9223 #endif
9224 char dlopen ();
9225 int
9226 main ()
9227 {
9228 return dlopen ();
9229 ;
9230 return 0;
9231 }
9232 _ACEOF
9233 for ac_lib in '' dl; do
9234 if test -z "$ac_lib"; then
9235 ac_res="none required"
9236 else
9237 ac_res=-l$ac_lib
9238 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9239 fi
9240 if ac_fn_c_try_link "$LINENO"; then :
9241 ac_cv_search_dlopen=$ac_res
9242 fi
9243 rm -f core conftest.err conftest.$ac_objext \
9244 conftest$ac_exeext
9245 if ${ac_cv_search_dlopen+:} false; then :
9246 break
9247 fi
9248 done
9249 if ${ac_cv_search_dlopen+:} false; then :
9250
9251 else
9252 ac_cv_search_dlopen=no
9253 fi
9254 rm conftest.$ac_ext
9255 LIBS=$ac_func_search_save_LIBS
9256 fi
9257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9258 $as_echo "$ac_cv_search_dlopen" >&6; }
9259 ac_res=$ac_cv_search_dlopen
9260 if test "$ac_res" != no; then :
9261 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9262
9263 fi
9264
9265
9266
9267
9268 # Check whether --with-jit-reader-dir was given.
9269 if test "${with_jit_reader_dir+set}" = set; then :
9270 withval=$with_jit_reader_dir;
9271 JIT_READER_DIR=$withval
9272 else
9273 JIT_READER_DIR=${libdir}/gdb
9274 fi
9275
9276
9277 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9278 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9279 ac_define_dir=`eval echo $JIT_READER_DIR`
9280 ac_define_dir=`eval echo $ac_define_dir`
9281
9282 cat >>confdefs.h <<_ACEOF
9283 #define JIT_READER_DIR "$ac_define_dir"
9284 _ACEOF
9285
9286
9287
9288
9289 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9290 if test "x$prefix" = xNONE; then
9291 test_prefix=/usr/local
9292 else
9293 test_prefix=$prefix
9294 fi
9295 else
9296 test_prefix=$exec_prefix
9297 fi
9298 value=0
9299 case ${ac_define_dir} in
9300 "${test_prefix}"|"${test_prefix}/"*|\
9301 '${exec_prefix}'|'${exec_prefix}/'*)
9302 value=1
9303 ;;
9304 esac
9305
9306 cat >>confdefs.h <<_ACEOF
9307 #define JIT_READER_DIR_RELOCATABLE $value
9308 _ACEOF
9309
9310
9311
9312
9313
9314 # Check whether --with-expat was given.
9315 if test "${with_expat+set}" = set; then :
9316 withval=$with_expat;
9317 else
9318 with_expat=auto
9319 fi
9320
9321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9322 $as_echo_n "checking whether to use expat... " >&6; }
9323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9324 $as_echo "$with_expat" >&6; }
9325
9326 if test "${with_expat}" = no; then
9327 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9328 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9329 HAVE_LIBEXPAT=no
9330 else
9331
9332
9333
9334
9335
9336
9337
9338
9339 use_additional=yes
9340
9341 acl_save_prefix="$prefix"
9342 prefix="$acl_final_prefix"
9343 acl_save_exec_prefix="$exec_prefix"
9344 exec_prefix="$acl_final_exec_prefix"
9345
9346 eval additional_includedir=\"$includedir\"
9347 eval additional_libdir=\"$libdir\"
9348
9349 exec_prefix="$acl_save_exec_prefix"
9350 prefix="$acl_save_prefix"
9351
9352
9353 # Check whether --with-libexpat-prefix was given.
9354 if test "${with_libexpat_prefix+set}" = set; then :
9355 withval=$with_libexpat_prefix;
9356 if test "X$withval" = "Xno"; then
9357 use_additional=no
9358 else
9359 if test "X$withval" = "X"; then
9360
9361 acl_save_prefix="$prefix"
9362 prefix="$acl_final_prefix"
9363 acl_save_exec_prefix="$exec_prefix"
9364 exec_prefix="$acl_final_exec_prefix"
9365
9366 eval additional_includedir=\"$includedir\"
9367 eval additional_libdir=\"$libdir\"
9368
9369 exec_prefix="$acl_save_exec_prefix"
9370 prefix="$acl_save_prefix"
9371
9372 else
9373 additional_includedir="$withval/include"
9374 additional_libdir="$withval/lib"
9375 fi
9376 fi
9377
9378 fi
9379
9380 LIBEXPAT=
9381 LTLIBEXPAT=
9382 INCEXPAT=
9383 rpathdirs=
9384 ltrpathdirs=
9385 names_already_handled=
9386 names_next_round='expat '
9387 while test -n "$names_next_round"; do
9388 names_this_round="$names_next_round"
9389 names_next_round=
9390 for name in $names_this_round; do
9391 already_handled=
9392 for n in $names_already_handled; do
9393 if test "$n" = "$name"; then
9394 already_handled=yes
9395 break
9396 fi
9397 done
9398 if test -z "$already_handled"; then
9399 names_already_handled="$names_already_handled $name"
9400 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9401 eval value=\"\$HAVE_LIB$uppername\"
9402 if test -n "$value"; then
9403 if test "$value" = yes; then
9404 eval value=\"\$LIB$uppername\"
9405 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9406 eval value=\"\$LTLIB$uppername\"
9407 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9408 else
9409 :
9410 fi
9411 else
9412 found_dir=
9413 found_la=
9414 found_so=
9415 found_a=
9416 if test $use_additional = yes; then
9417 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9418 found_dir="$additional_libdir"
9419 found_so="$additional_libdir/lib$name.$shlibext"
9420 if test -f "$additional_libdir/lib$name.la"; then
9421 found_la="$additional_libdir/lib$name.la"
9422 fi
9423 else
9424 if test -f "$additional_libdir/lib$name.$libext"; then
9425 found_dir="$additional_libdir"
9426 found_a="$additional_libdir/lib$name.$libext"
9427 if test -f "$additional_libdir/lib$name.la"; then
9428 found_la="$additional_libdir/lib$name.la"
9429 fi
9430 fi
9431 fi
9432 fi
9433 if test "X$found_dir" = "X"; then
9434 for x in $LDFLAGS $LTLIBEXPAT; do
9435
9436 acl_save_prefix="$prefix"
9437 prefix="$acl_final_prefix"
9438 acl_save_exec_prefix="$exec_prefix"
9439 exec_prefix="$acl_final_exec_prefix"
9440 eval x=\"$x\"
9441 exec_prefix="$acl_save_exec_prefix"
9442 prefix="$acl_save_prefix"
9443
9444 case "$x" in
9445 -L*)
9446 dir=`echo "X$x" | sed -e 's/^X-L//'`
9447 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9448 found_dir="$dir"
9449 found_so="$dir/lib$name.$shlibext"
9450 if test -f "$dir/lib$name.la"; then
9451 found_la="$dir/lib$name.la"
9452 fi
9453 else
9454 if test -f "$dir/lib$name.$libext"; then
9455 found_dir="$dir"
9456 found_a="$dir/lib$name.$libext"
9457 if test -f "$dir/lib$name.la"; then
9458 found_la="$dir/lib$name.la"
9459 fi
9460 fi
9461 fi
9462 ;;
9463 esac
9464 if test "X$found_dir" != "X"; then
9465 break
9466 fi
9467 done
9468 fi
9469 if test "X$found_dir" != "X"; then
9470 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9471 if test "X$found_so" != "X"; then
9472 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9473 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9474 else
9475 haveit=
9476 for x in $ltrpathdirs; do
9477 if test "X$x" = "X$found_dir"; then
9478 haveit=yes
9479 break
9480 fi
9481 done
9482 if test -z "$haveit"; then
9483 ltrpathdirs="$ltrpathdirs $found_dir"
9484 fi
9485 if test "$hardcode_direct" = yes; then
9486 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9487 else
9488 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9489 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9490 haveit=
9491 for x in $rpathdirs; do
9492 if test "X$x" = "X$found_dir"; then
9493 haveit=yes
9494 break
9495 fi
9496 done
9497 if test -z "$haveit"; then
9498 rpathdirs="$rpathdirs $found_dir"
9499 fi
9500 else
9501 haveit=
9502 for x in $LDFLAGS $LIBEXPAT; do
9503
9504 acl_save_prefix="$prefix"
9505 prefix="$acl_final_prefix"
9506 acl_save_exec_prefix="$exec_prefix"
9507 exec_prefix="$acl_final_exec_prefix"
9508 eval x=\"$x\"
9509 exec_prefix="$acl_save_exec_prefix"
9510 prefix="$acl_save_prefix"
9511
9512 if test "X$x" = "X-L$found_dir"; then
9513 haveit=yes
9514 break
9515 fi
9516 done
9517 if test -z "$haveit"; then
9518 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9519 fi
9520 if test "$hardcode_minus_L" != no; then
9521 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9522 else
9523 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9524 fi
9525 fi
9526 fi
9527 fi
9528 else
9529 if test "X$found_a" != "X"; then
9530 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9531 else
9532 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9533 fi
9534 fi
9535 additional_includedir=
9536 case "$found_dir" in
9537 */lib | */lib/)
9538 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9539 additional_includedir="$basedir/include"
9540 ;;
9541 esac
9542 if test "X$additional_includedir" != "X"; then
9543 if test "X$additional_includedir" != "X/usr/include"; then
9544 haveit=
9545 if test "X$additional_includedir" = "X/usr/local/include"; then
9546 if test -n "$GCC"; then
9547 case $host_os in
9548 linux*) haveit=yes;;
9549 esac
9550 fi
9551 fi
9552 if test -z "$haveit"; then
9553 for x in $CPPFLAGS $INCEXPAT; do
9554
9555 acl_save_prefix="$prefix"
9556 prefix="$acl_final_prefix"
9557 acl_save_exec_prefix="$exec_prefix"
9558 exec_prefix="$acl_final_exec_prefix"
9559 eval x=\"$x\"
9560 exec_prefix="$acl_save_exec_prefix"
9561 prefix="$acl_save_prefix"
9562
9563 if test "X$x" = "X-I$additional_includedir"; then
9564 haveit=yes
9565 break
9566 fi
9567 done
9568 if test -z "$haveit"; then
9569 if test -d "$additional_includedir"; then
9570 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9571 fi
9572 fi
9573 fi
9574 fi
9575 fi
9576 if test -n "$found_la"; then
9577 save_libdir="$libdir"
9578 case "$found_la" in
9579 */* | *\\*) . "$found_la" ;;
9580 *) . "./$found_la" ;;
9581 esac
9582 libdir="$save_libdir"
9583 for dep in $dependency_libs; do
9584 case "$dep" in
9585 -L*)
9586 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9587 if test "X$additional_libdir" != "X/usr/lib"; then
9588 haveit=
9589 if test "X$additional_libdir" = "X/usr/local/lib"; then
9590 if test -n "$GCC"; then
9591 case $host_os in
9592 linux*) haveit=yes;;
9593 esac
9594 fi
9595 fi
9596 if test -z "$haveit"; then
9597 haveit=
9598 for x in $LDFLAGS $LIBEXPAT; do
9599
9600 acl_save_prefix="$prefix"
9601 prefix="$acl_final_prefix"
9602 acl_save_exec_prefix="$exec_prefix"
9603 exec_prefix="$acl_final_exec_prefix"
9604 eval x=\"$x\"
9605 exec_prefix="$acl_save_exec_prefix"
9606 prefix="$acl_save_prefix"
9607
9608 if test "X$x" = "X-L$additional_libdir"; then
9609 haveit=yes
9610 break
9611 fi
9612 done
9613 if test -z "$haveit"; then
9614 if test -d "$additional_libdir"; then
9615 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9616 fi
9617 fi
9618 haveit=
9619 for x in $LDFLAGS $LTLIBEXPAT; do
9620
9621 acl_save_prefix="$prefix"
9622 prefix="$acl_final_prefix"
9623 acl_save_exec_prefix="$exec_prefix"
9624 exec_prefix="$acl_final_exec_prefix"
9625 eval x=\"$x\"
9626 exec_prefix="$acl_save_exec_prefix"
9627 prefix="$acl_save_prefix"
9628
9629 if test "X$x" = "X-L$additional_libdir"; then
9630 haveit=yes
9631 break
9632 fi
9633 done
9634 if test -z "$haveit"; then
9635 if test -d "$additional_libdir"; then
9636 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9637 fi
9638 fi
9639 fi
9640 fi
9641 ;;
9642 -R*)
9643 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9644 if test "$enable_rpath" != no; then
9645 haveit=
9646 for x in $rpathdirs; do
9647 if test "X$x" = "X$dir"; then
9648 haveit=yes
9649 break
9650 fi
9651 done
9652 if test -z "$haveit"; then
9653 rpathdirs="$rpathdirs $dir"
9654 fi
9655 haveit=
9656 for x in $ltrpathdirs; do
9657 if test "X$x" = "X$dir"; then
9658 haveit=yes
9659 break
9660 fi
9661 done
9662 if test -z "$haveit"; then
9663 ltrpathdirs="$ltrpathdirs $dir"
9664 fi
9665 fi
9666 ;;
9667 -l*)
9668 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9669 ;;
9670 *.la)
9671 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9672 ;;
9673 *)
9674 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9675 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9676 ;;
9677 esac
9678 done
9679 fi
9680 else
9681 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9682 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9683 fi
9684 fi
9685 fi
9686 done
9687 done
9688 if test "X$rpathdirs" != "X"; then
9689 if test -n "$hardcode_libdir_separator"; then
9690 alldirs=
9691 for found_dir in $rpathdirs; do
9692 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9693 done
9694 acl_save_libdir="$libdir"
9695 libdir="$alldirs"
9696 eval flag=\"$hardcode_libdir_flag_spec\"
9697 libdir="$acl_save_libdir"
9698 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9699 else
9700 for found_dir in $rpathdirs; do
9701 acl_save_libdir="$libdir"
9702 libdir="$found_dir"
9703 eval flag=\"$hardcode_libdir_flag_spec\"
9704 libdir="$acl_save_libdir"
9705 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9706 done
9707 fi
9708 fi
9709 if test "X$ltrpathdirs" != "X"; then
9710 for found_dir in $ltrpathdirs; do
9711 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9712 done
9713 fi
9714
9715
9716 ac_save_CPPFLAGS="$CPPFLAGS"
9717
9718 for element in $INCEXPAT; do
9719 haveit=
9720 for x in $CPPFLAGS; do
9721
9722 acl_save_prefix="$prefix"
9723 prefix="$acl_final_prefix"
9724 acl_save_exec_prefix="$exec_prefix"
9725 exec_prefix="$acl_final_exec_prefix"
9726 eval x=\"$x\"
9727 exec_prefix="$acl_save_exec_prefix"
9728 prefix="$acl_save_prefix"
9729
9730 if test "X$x" = "X$element"; then
9731 haveit=yes
9732 break
9733 fi
9734 done
9735 if test -z "$haveit"; then
9736 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9737 fi
9738 done
9739
9740
9741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9742 $as_echo_n "checking for libexpat... " >&6; }
9743 if ${ac_cv_libexpat+:} false; then :
9744 $as_echo_n "(cached) " >&6
9745 else
9746
9747 ac_save_LIBS="$LIBS"
9748 LIBS="$LIBS $LIBEXPAT"
9749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9750 /* end confdefs.h. */
9751 #include "expat.h"
9752 int
9753 main ()
9754 {
9755 XML_Parser p = XML_ParserCreate (0);
9756 ;
9757 return 0;
9758 }
9759 _ACEOF
9760 if ac_fn_c_try_link "$LINENO"; then :
9761 ac_cv_libexpat=yes
9762 else
9763 ac_cv_libexpat=no
9764 fi
9765 rm -f core conftest.err conftest.$ac_objext \
9766 conftest$ac_exeext conftest.$ac_ext
9767 LIBS="$ac_save_LIBS"
9768
9769 fi
9770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9771 $as_echo "$ac_cv_libexpat" >&6; }
9772 if test "$ac_cv_libexpat" = yes; then
9773 HAVE_LIBEXPAT=yes
9774
9775 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
9776
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9778 $as_echo_n "checking how to link with libexpat... " >&6; }
9779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9780 $as_echo "$LIBEXPAT" >&6; }
9781 else
9782 HAVE_LIBEXPAT=no
9783 CPPFLAGS="$ac_save_CPPFLAGS"
9784 LIBEXPAT=
9785 LTLIBEXPAT=
9786 fi
9787
9788
9789
9790
9791
9792
9793 if test "$HAVE_LIBEXPAT" != yes; then
9794 if test "$with_expat" = yes; then
9795 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
9796 else
9797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9798 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9799 fi
9800 else
9801 save_LIBS=$LIBS
9802 LIBS="$LIBS $LIBEXPAT"
9803 for ac_func in XML_StopParser
9804 do :
9805 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9806 if test "x$ac_cv_func_XML_StopParser" = xyes; then :
9807 cat >>confdefs.h <<_ACEOF
9808 #define HAVE_XML_STOPPARSER 1
9809 _ACEOF
9810
9811 fi
9812 done
9813
9814 LIBS=$save_LIBS
9815 fi
9816 fi
9817
9818
9819 # Check whether --with-mpfr was given.
9820 if test "${with_mpfr+set}" = set; then :
9821 withval=$with_mpfr;
9822 else
9823 with_mpfr=auto
9824 fi
9825
9826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9827 $as_echo_n "checking whether to use MPFR... " >&6; }
9828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9829 $as_echo "$with_mpfr" >&6; }
9830
9831 if test "${with_mpfr}" = no; then
9832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9833 $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9834 HAVE_LIBMPFR=no
9835 else
9836
9837
9838
9839
9840
9841
9842
9843
9844 use_additional=yes
9845
9846 acl_save_prefix="$prefix"
9847 prefix="$acl_final_prefix"
9848 acl_save_exec_prefix="$exec_prefix"
9849 exec_prefix="$acl_final_exec_prefix"
9850
9851 eval additional_includedir=\"$includedir\"
9852 eval additional_libdir=\"$libdir\"
9853
9854 exec_prefix="$acl_save_exec_prefix"
9855 prefix="$acl_save_prefix"
9856
9857
9858 # Check whether --with-libmpfr-prefix was given.
9859 if test "${with_libmpfr_prefix+set}" = set; then :
9860 withval=$with_libmpfr_prefix;
9861 if test "X$withval" = "Xno"; then
9862 use_additional=no
9863 else
9864 if test "X$withval" = "X"; then
9865
9866 acl_save_prefix="$prefix"
9867 prefix="$acl_final_prefix"
9868 acl_save_exec_prefix="$exec_prefix"
9869 exec_prefix="$acl_final_exec_prefix"
9870
9871 eval additional_includedir=\"$includedir\"
9872 eval additional_libdir=\"$libdir\"
9873
9874 exec_prefix="$acl_save_exec_prefix"
9875 prefix="$acl_save_prefix"
9876
9877 else
9878 additional_includedir="$withval/include"
9879 additional_libdir="$withval/lib"
9880 fi
9881 fi
9882
9883 fi
9884
9885 LIBMPFR=
9886 LTLIBMPFR=
9887 INCMPFR=
9888 rpathdirs=
9889 ltrpathdirs=
9890 names_already_handled=
9891 names_next_round='mpfr gmp'
9892 while test -n "$names_next_round"; do
9893 names_this_round="$names_next_round"
9894 names_next_round=
9895 for name in $names_this_round; do
9896 already_handled=
9897 for n in $names_already_handled; do
9898 if test "$n" = "$name"; then
9899 already_handled=yes
9900 break
9901 fi
9902 done
9903 if test -z "$already_handled"; then
9904 names_already_handled="$names_already_handled $name"
9905 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9906 eval value=\"\$HAVE_LIB$uppername\"
9907 if test -n "$value"; then
9908 if test "$value" = yes; then
9909 eval value=\"\$LIB$uppername\"
9910 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9911 eval value=\"\$LTLIB$uppername\"
9912 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9913 else
9914 :
9915 fi
9916 else
9917 found_dir=
9918 found_la=
9919 found_so=
9920 found_a=
9921 if test $use_additional = yes; then
9922 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9923 found_dir="$additional_libdir"
9924 found_so="$additional_libdir/lib$name.$shlibext"
9925 if test -f "$additional_libdir/lib$name.la"; then
9926 found_la="$additional_libdir/lib$name.la"
9927 fi
9928 else
9929 if test -f "$additional_libdir/lib$name.$libext"; then
9930 found_dir="$additional_libdir"
9931 found_a="$additional_libdir/lib$name.$libext"
9932 if test -f "$additional_libdir/lib$name.la"; then
9933 found_la="$additional_libdir/lib$name.la"
9934 fi
9935 fi
9936 fi
9937 fi
9938 if test "X$found_dir" = "X"; then
9939 for x in $LDFLAGS $LTLIBMPFR; do
9940
9941 acl_save_prefix="$prefix"
9942 prefix="$acl_final_prefix"
9943 acl_save_exec_prefix="$exec_prefix"
9944 exec_prefix="$acl_final_exec_prefix"
9945 eval x=\"$x\"
9946 exec_prefix="$acl_save_exec_prefix"
9947 prefix="$acl_save_prefix"
9948
9949 case "$x" in
9950 -L*)
9951 dir=`echo "X$x" | sed -e 's/^X-L//'`
9952 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9953 found_dir="$dir"
9954 found_so="$dir/lib$name.$shlibext"
9955 if test -f "$dir/lib$name.la"; then
9956 found_la="$dir/lib$name.la"
9957 fi
9958 else
9959 if test -f "$dir/lib$name.$libext"; then
9960 found_dir="$dir"
9961 found_a="$dir/lib$name.$libext"
9962 if test -f "$dir/lib$name.la"; then
9963 found_la="$dir/lib$name.la"
9964 fi
9965 fi
9966 fi
9967 ;;
9968 esac
9969 if test "X$found_dir" != "X"; then
9970 break
9971 fi
9972 done
9973 fi
9974 if test "X$found_dir" != "X"; then
9975 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9976 if test "X$found_so" != "X"; then
9977 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9978 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9979 else
9980 haveit=
9981 for x in $ltrpathdirs; do
9982 if test "X$x" = "X$found_dir"; then
9983 haveit=yes
9984 break
9985 fi
9986 done
9987 if test -z "$haveit"; then
9988 ltrpathdirs="$ltrpathdirs $found_dir"
9989 fi
9990 if test "$hardcode_direct" = yes; then
9991 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9992 else
9993 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9994 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9995 haveit=
9996 for x in $rpathdirs; do
9997 if test "X$x" = "X$found_dir"; then
9998 haveit=yes
9999 break
10000 fi
10001 done
10002 if test -z "$haveit"; then
10003 rpathdirs="$rpathdirs $found_dir"
10004 fi
10005 else
10006 haveit=
10007 for x in $LDFLAGS $LIBMPFR; do
10008
10009 acl_save_prefix="$prefix"
10010 prefix="$acl_final_prefix"
10011 acl_save_exec_prefix="$exec_prefix"
10012 exec_prefix="$acl_final_exec_prefix"
10013 eval x=\"$x\"
10014 exec_prefix="$acl_save_exec_prefix"
10015 prefix="$acl_save_prefix"
10016
10017 if test "X$x" = "X-L$found_dir"; then
10018 haveit=yes
10019 break
10020 fi
10021 done
10022 if test -z "$haveit"; then
10023 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10024 fi
10025 if test "$hardcode_minus_L" != no; then
10026 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10027 else
10028 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10029 fi
10030 fi
10031 fi
10032 fi
10033 else
10034 if test "X$found_a" != "X"; then
10035 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10036 else
10037 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10038 fi
10039 fi
10040 additional_includedir=
10041 case "$found_dir" in
10042 */lib | */lib/)
10043 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10044 additional_includedir="$basedir/include"
10045 ;;
10046 esac
10047 if test "X$additional_includedir" != "X"; then
10048 if test "X$additional_includedir" != "X/usr/include"; then
10049 haveit=
10050 if test "X$additional_includedir" = "X/usr/local/include"; then
10051 if test -n "$GCC"; then
10052 case $host_os in
10053 linux*) haveit=yes;;
10054 esac
10055 fi
10056 fi
10057 if test -z "$haveit"; then
10058 for x in $CPPFLAGS $INCMPFR; do
10059
10060 acl_save_prefix="$prefix"
10061 prefix="$acl_final_prefix"
10062 acl_save_exec_prefix="$exec_prefix"
10063 exec_prefix="$acl_final_exec_prefix"
10064 eval x=\"$x\"
10065 exec_prefix="$acl_save_exec_prefix"
10066 prefix="$acl_save_prefix"
10067
10068 if test "X$x" = "X-I$additional_includedir"; then
10069 haveit=yes
10070 break
10071 fi
10072 done
10073 if test -z "$haveit"; then
10074 if test -d "$additional_includedir"; then
10075 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10076 fi
10077 fi
10078 fi
10079 fi
10080 fi
10081 if test -n "$found_la"; then
10082 save_libdir="$libdir"
10083 case "$found_la" in
10084 */* | *\\*) . "$found_la" ;;
10085 *) . "./$found_la" ;;
10086 esac
10087 libdir="$save_libdir"
10088 for dep in $dependency_libs; do
10089 case "$dep" in
10090 -L*)
10091 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10092 if test "X$additional_libdir" != "X/usr/lib"; then
10093 haveit=
10094 if test "X$additional_libdir" = "X/usr/local/lib"; then
10095 if test -n "$GCC"; then
10096 case $host_os in
10097 linux*) haveit=yes;;
10098 esac
10099 fi
10100 fi
10101 if test -z "$haveit"; then
10102 haveit=
10103 for x in $LDFLAGS $LIBMPFR; do
10104
10105 acl_save_prefix="$prefix"
10106 prefix="$acl_final_prefix"
10107 acl_save_exec_prefix="$exec_prefix"
10108 exec_prefix="$acl_final_exec_prefix"
10109 eval x=\"$x\"
10110 exec_prefix="$acl_save_exec_prefix"
10111 prefix="$acl_save_prefix"
10112
10113 if test "X$x" = "X-L$additional_libdir"; then
10114 haveit=yes
10115 break
10116 fi
10117 done
10118 if test -z "$haveit"; then
10119 if test -d "$additional_libdir"; then
10120 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10121 fi
10122 fi
10123 haveit=
10124 for x in $LDFLAGS $LTLIBMPFR; do
10125
10126 acl_save_prefix="$prefix"
10127 prefix="$acl_final_prefix"
10128 acl_save_exec_prefix="$exec_prefix"
10129 exec_prefix="$acl_final_exec_prefix"
10130 eval x=\"$x\"
10131 exec_prefix="$acl_save_exec_prefix"
10132 prefix="$acl_save_prefix"
10133
10134 if test "X$x" = "X-L$additional_libdir"; then
10135 haveit=yes
10136 break
10137 fi
10138 done
10139 if test -z "$haveit"; then
10140 if test -d "$additional_libdir"; then
10141 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10142 fi
10143 fi
10144 fi
10145 fi
10146 ;;
10147 -R*)
10148 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10149 if test "$enable_rpath" != no; then
10150 haveit=
10151 for x in $rpathdirs; do
10152 if test "X$x" = "X$dir"; then
10153 haveit=yes
10154 break
10155 fi
10156 done
10157 if test -z "$haveit"; then
10158 rpathdirs="$rpathdirs $dir"
10159 fi
10160 haveit=
10161 for x in $ltrpathdirs; do
10162 if test "X$x" = "X$dir"; then
10163 haveit=yes
10164 break
10165 fi
10166 done
10167 if test -z "$haveit"; then
10168 ltrpathdirs="$ltrpathdirs $dir"
10169 fi
10170 fi
10171 ;;
10172 -l*)
10173 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10174 ;;
10175 *.la)
10176 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10177 ;;
10178 *)
10179 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10180 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10181 ;;
10182 esac
10183 done
10184 fi
10185 else
10186 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10187 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10188 fi
10189 fi
10190 fi
10191 done
10192 done
10193 if test "X$rpathdirs" != "X"; then
10194 if test -n "$hardcode_libdir_separator"; then
10195 alldirs=
10196 for found_dir in $rpathdirs; do
10197 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10198 done
10199 acl_save_libdir="$libdir"
10200 libdir="$alldirs"
10201 eval flag=\"$hardcode_libdir_flag_spec\"
10202 libdir="$acl_save_libdir"
10203 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10204 else
10205 for found_dir in $rpathdirs; do
10206 acl_save_libdir="$libdir"
10207 libdir="$found_dir"
10208 eval flag=\"$hardcode_libdir_flag_spec\"
10209 libdir="$acl_save_libdir"
10210 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10211 done
10212 fi
10213 fi
10214 if test "X$ltrpathdirs" != "X"; then
10215 for found_dir in $ltrpathdirs; do
10216 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10217 done
10218 fi
10219
10220
10221 ac_save_CPPFLAGS="$CPPFLAGS"
10222
10223 for element in $INCMPFR; do
10224 haveit=
10225 for x in $CPPFLAGS; do
10226
10227 acl_save_prefix="$prefix"
10228 prefix="$acl_final_prefix"
10229 acl_save_exec_prefix="$exec_prefix"
10230 exec_prefix="$acl_final_exec_prefix"
10231 eval x=\"$x\"
10232 exec_prefix="$acl_save_exec_prefix"
10233 prefix="$acl_save_prefix"
10234
10235 if test "X$x" = "X$element"; then
10236 haveit=yes
10237 break
10238 fi
10239 done
10240 if test -z "$haveit"; then
10241 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10242 fi
10243 done
10244
10245
10246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10247 $as_echo_n "checking for libmpfr... " >&6; }
10248 if ${ac_cv_libmpfr+:} false; then :
10249 $as_echo_n "(cached) " >&6
10250 else
10251
10252 ac_save_LIBS="$LIBS"
10253 LIBS="$LIBS $LIBMPFR"
10254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10255 /* end confdefs.h. */
10256 #include <mpfr.h>
10257 int
10258 main ()
10259 {
10260 mpfr_exp_t exp; mpfr_t x;
10261 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10262 ;
10263 return 0;
10264 }
10265 _ACEOF
10266 if ac_fn_c_try_link "$LINENO"; then :
10267 ac_cv_libmpfr=yes
10268 else
10269 ac_cv_libmpfr=no
10270 fi
10271 rm -f core conftest.err conftest.$ac_objext \
10272 conftest$ac_exeext conftest.$ac_ext
10273 LIBS="$ac_save_LIBS"
10274
10275 fi
10276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10277 $as_echo "$ac_cv_libmpfr" >&6; }
10278 if test "$ac_cv_libmpfr" = yes; then
10279 HAVE_LIBMPFR=yes
10280
10281 $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10282
10283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10284 $as_echo_n "checking how to link with libmpfr... " >&6; }
10285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10286 $as_echo "$LIBMPFR" >&6; }
10287 else
10288 HAVE_LIBMPFR=no
10289 CPPFLAGS="$ac_save_CPPFLAGS"
10290 LIBMPFR=
10291 LTLIBMPFR=
10292 fi
10293
10294
10295
10296
10297
10298
10299 if test "$HAVE_LIBMPFR" != yes; then
10300 if test "$with_mpfr" = yes; then
10301 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
10302 else
10303 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10304 $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10305 fi
10306 fi
10307 fi
10308
10309 # --------------------- #
10310 # Check for libpython. #
10311 # --------------------- #
10312
10313
10314
10315
10316
10317
10318 # Check whether --with-python was given.
10319 if test "${with_python+set}" = set; then :
10320 withval=$with_python;
10321 else
10322 with_python=auto
10323 fi
10324
10325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10326 $as_echo_n "checking whether to use python... " >&6; }
10327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10328 $as_echo "$with_python" >&6; }
10329
10330 if test "${with_python}" = no; then
10331 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10332 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10333 have_libpython=no
10334 else
10335 case "${with_python}" in
10336 [\\/]* | ?:[\\/]*)
10337 if test -d ${with_python}; then
10338 # Assume the python binary is ${with_python}/bin/python.
10339 python_prog="${with_python}/bin/python"
10340 python_prefix=
10341 # If python does not exit ${with_python}/bin, then try in
10342 # ${with_python}. On Windows/MinGW, this is where the Python
10343 # executable is.
10344 if test ! -x "${python_prog}"; then
10345 python_prog="${with_python}/python"
10346 python_prefix=
10347 fi
10348 if test ! -x "${python_prog}"; then
10349 # Fall back to gdb 7.0/7.1 behaviour.
10350 python_prog=missing
10351 python_prefix=${with_python}
10352 fi
10353 elif test -x "${with_python}"; then
10354 # While we can't run python compiled for $host (unless host == build),
10355 # the user could write a script that provides the needed information,
10356 # so we support that.
10357 python_prog=${with_python}
10358 python_prefix=
10359 else
10360 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10361 fi
10362 ;;
10363 */*)
10364 # Disallow --with-python=foo/bar.
10365 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10366 ;;
10367 *)
10368 # The user has either specified auto, yes, or the name of the python
10369 # program assumed to be in $PATH.
10370 python_prefix=
10371 case "${with_python}" in
10372 yes | auto)
10373 if test ${build} = ${host}; then
10374 # Extract the first word of "python", so it can be a program name with args.
10375 set dummy python; ac_word=$2
10376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10377 $as_echo_n "checking for $ac_word... " >&6; }
10378 if ${ac_cv_path_python_prog_path+:} false; then :
10379 $as_echo_n "(cached) " >&6
10380 else
10381 case $python_prog_path in
10382 [\\/]* | ?:[\\/]*)
10383 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10384 ;;
10385 *)
10386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10387 for as_dir in $PATH
10388 do
10389 IFS=$as_save_IFS
10390 test -z "$as_dir" && as_dir=.
10391 for ac_exec_ext in '' $ac_executable_extensions; do
10392 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10393 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10394 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10395 break 2
10396 fi
10397 done
10398 done
10399 IFS=$as_save_IFS
10400
10401 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10402 ;;
10403 esac
10404 fi
10405 python_prog_path=$ac_cv_path_python_prog_path
10406 if test -n "$python_prog_path"; then
10407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10408 $as_echo "$python_prog_path" >&6; }
10409 else
10410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10411 $as_echo "no" >&6; }
10412 fi
10413
10414
10415 if test "${python_prog_path}" = missing; then
10416 python_prog=missing
10417 else
10418 python_prog=${python_prog_path}
10419 fi
10420 else
10421 # Not much we can do except assume the cross-compiler will find the
10422 # right files.
10423 python_prog=missing
10424 fi
10425 ;;
10426 *)
10427 # While we can't run python compiled for $host (unless host == build),
10428 # the user could write a script that provides the needed information,
10429 # so we support that.
10430 python_prog="${with_python}"
10431 # Extract the first word of "${python_prog}", so it can be a program name with args.
10432 set dummy ${python_prog}; ac_word=$2
10433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10434 $as_echo_n "checking for $ac_word... " >&6; }
10435 if ${ac_cv_path_python_prog_path+:} false; then :
10436 $as_echo_n "(cached) " >&6
10437 else
10438 case $python_prog_path in
10439 [\\/]* | ?:[\\/]*)
10440 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10441 ;;
10442 *)
10443 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10444 for as_dir in $PATH
10445 do
10446 IFS=$as_save_IFS
10447 test -z "$as_dir" && as_dir=.
10448 for ac_exec_ext in '' $ac_executable_extensions; do
10449 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10450 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10451 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10452 break 2
10453 fi
10454 done
10455 done
10456 IFS=$as_save_IFS
10457
10458 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10459 ;;
10460 esac
10461 fi
10462 python_prog_path=$ac_cv_path_python_prog_path
10463 if test -n "$python_prog_path"; then
10464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10465 $as_echo "$python_prog_path" >&6; }
10466 else
10467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10468 $as_echo "no" >&6; }
10469 fi
10470
10471
10472 if test "${python_prog_path}" = missing; then
10473 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
10474 fi
10475 ;;
10476 esac
10477 esac
10478
10479 if test "${python_prog}" != missing; then
10480 # We have a python program to use, but it may be too old.
10481 # Don't flag an error for --with-python=auto (the default).
10482 have_python_config=yes
10483 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10484 if test $? != 0; then
10485 have_python_config=failed
10486 if test "${with_python}" != auto; then
10487 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
10488 fi
10489 fi
10490 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10491 if test $? != 0; then
10492 have_python_config=failed
10493 if test "${with_python}" != auto; then
10494 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
10495 fi
10496 fi
10497 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10498 if test $? != 0; then
10499 have_python_config=failed
10500 if test "${with_python}" != auto; then
10501 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
10502 fi
10503 fi
10504 else
10505 # We do not have a python executable we can use to determine where
10506 # to find the Python headers and libs. We cannot guess the include
10507 # path from the python_prefix either, because that include path
10508 # depends on the Python version. So, there is nothing much we can
10509 # do except assume that the compiler will be able to find those files.
10510 python_includes=
10511 python_libs=
10512 have_python_config=no
10513 fi
10514
10515 # If we have python-config, only try the configuration it provides.
10516 # Otherwise fallback on the old way of trying different versions of
10517 # python in turn.
10518
10519 have_libpython=no
10520 if test "${have_python_config}" = yes; then
10521 # Determine the Python version by extracting "-lpython<version>"
10522 # part of the python_libs. <version> is usually X.Y with X and Y
10523 # being decimal numbers, but can also be XY (seen on Windows).
10524 #
10525 # The extraction is performed using sed with a regular expression.
10526 # Initially, the regexp used was using the '?' quantifier to make
10527 # the dot in the version number optional. Unfortunately, this
10528 # does not work with non-GNU versions of sed because, because of
10529 # what looks like a limitation (the '?' quantifier does not work
10530 # with back-references). We work around this limitation by using
10531 # the '*' quantifier instead. It means that, in theory, we might
10532 # match unexpected version strings such as "-lpython2..7", but
10533 # this seems unlikely in practice. And even if that happens,
10534 # an error will be triggered later on, when checking that version
10535 # number.
10536 python_version=`echo " ${python_libs} " \
10537 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
10538 case "${python_version}" in
10539 python*)
10540
10541 version=${python_version}
10542
10543 new_CPPFLAGS=${python_includes}
10544 new_LIBS=${python_libs}
10545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10546 $as_echo_n "checking for ${version}... " >&6; }
10547 save_CPPFLAGS=$CPPFLAGS
10548 save_LIBS=$LIBS
10549 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10550 LIBS="$new_LIBS $LIBS"
10551 found_usable_python=no
10552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10553 /* end confdefs.h. */
10554 #include "Python.h"
10555 int
10556 main ()
10557 {
10558 Py_Initialize ();
10559 ;
10560 return 0;
10561 }
10562 _ACEOF
10563 if ac_fn_c_try_link "$LINENO"; then :
10564 have_libpython=${version}
10565 found_usable_python=yes
10566 PYTHON_CPPFLAGS=$new_CPPFLAGS
10567 PYTHON_LIBS=$new_LIBS
10568 fi
10569 rm -f core conftest.err conftest.$ac_objext \
10570 conftest$ac_exeext conftest.$ac_ext
10571 CPPFLAGS=$save_CPPFLAGS
10572 LIBS=$save_LIBS
10573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10574 $as_echo "${found_usable_python}" >&6; }
10575
10576 ;;
10577 *)
10578 as_fn_error $? "unable to determine python version from ${python_libs}" "$LINENO" 5
10579 ;;
10580 esac
10581 elif test "${have_python_config}" != failed; then
10582 if test "${have_libpython}" = no; then
10583
10584 version=python2.7
10585
10586 new_CPPFLAGS=${python_includes}
10587 new_LIBS="-lpython2.7 ${python_libs}"
10588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10589 $as_echo_n "checking for ${version}... " >&6; }
10590 save_CPPFLAGS=$CPPFLAGS
10591 save_LIBS=$LIBS
10592 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10593 LIBS="$new_LIBS $LIBS"
10594 found_usable_python=no
10595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10596 /* end confdefs.h. */
10597 #include "Python.h"
10598 int
10599 main ()
10600 {
10601 Py_Initialize ();
10602 ;
10603 return 0;
10604 }
10605 _ACEOF
10606 if ac_fn_c_try_link "$LINENO"; then :
10607 have_libpython=${version}
10608 found_usable_python=yes
10609 PYTHON_CPPFLAGS=$new_CPPFLAGS
10610 PYTHON_LIBS=$new_LIBS
10611 fi
10612 rm -f core conftest.err conftest.$ac_objext \
10613 conftest$ac_exeext conftest.$ac_ext
10614 CPPFLAGS=$save_CPPFLAGS
10615 LIBS=$save_LIBS
10616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10617 $as_echo "${found_usable_python}" >&6; }
10618
10619 fi
10620 if test "${have_libpython}" = no; then
10621
10622 version=python2.6
10623
10624 new_CPPFLAGS=${python_includes}
10625 new_LIBS="-lpython2.6 ${python_libs}"
10626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10627 $as_echo_n "checking for ${version}... " >&6; }
10628 save_CPPFLAGS=$CPPFLAGS
10629 save_LIBS=$LIBS
10630 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10631 LIBS="$new_LIBS $LIBS"
10632 found_usable_python=no
10633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10634 /* end confdefs.h. */
10635 #include "Python.h"
10636 int
10637 main ()
10638 {
10639 Py_Initialize ();
10640 ;
10641 return 0;
10642 }
10643 _ACEOF
10644 if ac_fn_c_try_link "$LINENO"; then :
10645 have_libpython=${version}
10646 found_usable_python=yes
10647 PYTHON_CPPFLAGS=$new_CPPFLAGS
10648 PYTHON_LIBS=$new_LIBS
10649 fi
10650 rm -f core conftest.err conftest.$ac_objext \
10651 conftest$ac_exeext conftest.$ac_ext
10652 CPPFLAGS=$save_CPPFLAGS
10653 LIBS=$save_LIBS
10654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10655 $as_echo "${found_usable_python}" >&6; }
10656
10657 fi
10658 if test ${have_libpython} = no; then
10659
10660 version=python2.5
10661
10662 new_CPPFLAGS=${python_includes}
10663 new_LIBS="-lpython2.5 ${python_libs}"
10664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10665 $as_echo_n "checking for ${version}... " >&6; }
10666 save_CPPFLAGS=$CPPFLAGS
10667 save_LIBS=$LIBS
10668 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10669 LIBS="$new_LIBS $LIBS"
10670 found_usable_python=no
10671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10672 /* end confdefs.h. */
10673 #include "Python.h"
10674 int
10675 main ()
10676 {
10677 Py_Initialize ();
10678 ;
10679 return 0;
10680 }
10681 _ACEOF
10682 if ac_fn_c_try_link "$LINENO"; then :
10683 have_libpython=${version}
10684 found_usable_python=yes
10685 PYTHON_CPPFLAGS=$new_CPPFLAGS
10686 PYTHON_LIBS=$new_LIBS
10687 fi
10688 rm -f core conftest.err conftest.$ac_objext \
10689 conftest$ac_exeext conftest.$ac_ext
10690 CPPFLAGS=$save_CPPFLAGS
10691 LIBS=$save_LIBS
10692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10693 $as_echo "${found_usable_python}" >&6; }
10694
10695 fi
10696 if test ${have_libpython} = no; then
10697
10698 version=python2.4
10699
10700 new_CPPFLAGS=${python_includes}
10701 new_LIBS="-lpython2.4 ${python_libs}"
10702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10703 $as_echo_n "checking for ${version}... " >&6; }
10704 save_CPPFLAGS=$CPPFLAGS
10705 save_LIBS=$LIBS
10706 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10707 LIBS="$new_LIBS $LIBS"
10708 found_usable_python=no
10709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10710 /* end confdefs.h. */
10711 #include "Python.h"
10712 int
10713 main ()
10714 {
10715 Py_Initialize ();
10716 ;
10717 return 0;
10718 }
10719 _ACEOF
10720 if ac_fn_c_try_link "$LINENO"; then :
10721 have_libpython=${version}
10722 found_usable_python=yes
10723 PYTHON_CPPFLAGS=$new_CPPFLAGS
10724 PYTHON_LIBS=$new_LIBS
10725 fi
10726 rm -f core conftest.err conftest.$ac_objext \
10727 conftest$ac_exeext conftest.$ac_ext
10728 CPPFLAGS=$save_CPPFLAGS
10729 LIBS=$save_LIBS
10730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10731 $as_echo "${found_usable_python}" >&6; }
10732
10733 fi
10734 fi
10735 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
10736
10737 $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10738
10739 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
10740
10741 $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10742
10743 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
10744
10745 $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10746
10747 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
10748
10749 $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10750
10751 fi
10752
10753 if test "${have_libpython}" = no; then
10754 case "${with_python}" in
10755 yes)
10756 as_fn_error $? "python is missing or unusable" "$LINENO" 5
10757 ;;
10758 auto)
10759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10760 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10761 ;;
10762 *)
10763 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
10764 ;;
10765 esac
10766 else
10767 if test -n "${python_prefix}"; then
10768
10769 cat >>confdefs.h <<_ACEOF
10770 #define WITH_PYTHON_PATH "${python_prefix}"
10771 _ACEOF
10772
10773
10774 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10775 if test "x$prefix" = xNONE; then
10776 test_prefix=/usr/local
10777 else
10778 test_prefix=$prefix
10779 fi
10780 else
10781 test_prefix=$exec_prefix
10782 fi
10783 value=0
10784 case ${python_prefix} in
10785 "${test_prefix}"|"${test_prefix}/"*|\
10786 '${exec_prefix}'|'${exec_prefix}/'*)
10787 value=1
10788 ;;
10789 esac
10790
10791 cat >>confdefs.h <<_ACEOF
10792 #define PYTHON_PATH_RELOCATABLE $value
10793 _ACEOF
10794
10795
10796 fi
10797 fi
10798 fi
10799
10800 if test "${have_libpython}" != no; then
10801
10802 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
10803
10804 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10805 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10806 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
10807 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
10808 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
10809
10810 # Flags needed to compile Python code (taken from python-config --cflags).
10811 # We cannot call python-config directly because it will output whatever was
10812 # used when compiling the Python interpreter itself, including flags which
10813 # would make the python-related objects be compiled differently from the
10814 # rest of GDB (e.g., -O2 and -fPIC).
10815 if test "${GCC}" = yes; then
10816 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10817 # Python headers recommend -DNDEBUG, but it's unclear if that just
10818 # refers to building Python itself. In release mode, though, it
10819 # doesn't hurt for the Python code in gdb to follow.
10820 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
10821 fi
10822
10823 if test "x${tentative_python_cflags}" != x; then
10824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10825 $as_echo_n "checking compiler flags for python code... " >&6; }
10826 for flag in ${tentative_python_cflags}; do
10827 # Check that the compiler accepts it
10828 saved_CFLAGS="$CFLAGS"
10829 CFLAGS="$CFLAGS $flag"
10830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10831 /* end confdefs.h. */
10832
10833 int
10834 main ()
10835 {
10836
10837 ;
10838 return 0;
10839 }
10840 _ACEOF
10841 if ac_fn_c_try_compile "$LINENO"; then :
10842 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
10843 fi
10844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10845 CFLAGS="$saved_CFLAGS"
10846 done
10847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10848 $as_echo "${PYTHON_CFLAGS}" >&6; }
10849 fi
10850
10851 # On x64 Windows, Python's include headers, and pyconfig.h in
10852 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10853 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10854 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10855 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10856 # The issue was reported to the Python community, but still isn't
10857 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10858
10859 case "$gdb_host" in
10860 mingw64)
10861 if test "${GCC}" = yes; then
10862 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10863 fi
10864 ;;
10865 esac
10866
10867 # Note that "python -m threading" cannot be used to check for
10868 # threading support due to a bug in Python 2.7.3
10869 # (http://bugs.python.org/issue15567).
10870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10871 $as_echo_n "checking whether python supports threads... " >&6; }
10872 saved_CPPFLAGS="${CPPFLAGS}"
10873 CPPFLAGS="${PYTHON_CPPFLAGS}"
10874 # Note that the test is reversed so that python_has_threads=yes on
10875 # unexpected failures.
10876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10877 /* end confdefs.h. */
10878
10879 #include <Python.h>
10880 #ifdef WITH_THREAD
10881 # error
10882 #endif
10883
10884 _ACEOF
10885 if ac_fn_c_try_cpp "$LINENO"; then :
10886 python_has_threads=no
10887 else
10888 python_has_threads=yes
10889 fi
10890 rm -f conftest.err conftest.i conftest.$ac_ext
10891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10892 $as_echo "${python_has_threads}" >&6; }
10893 CPPFLAGS="${saved_CPPFLAGS}"
10894 else
10895 # Even if Python support is not compiled in, we need to have this file
10896 # included so that the "python" command, et.al., still exists.
10897 CONFIG_OBS="$CONFIG_OBS python/python.o"
10898 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
10899 fi
10900
10901 # Work around Python http://bugs.python.org/issue10112. See also
10902 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10903 # no effect. Note that the only test after this that uses Python is
10904 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10905 # run without -export-dynamic too.
10906 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10907
10908
10909
10910
10911 if test "${have_libpython}" != no; then
10912 HAVE_PYTHON_TRUE=
10913 HAVE_PYTHON_FALSE='#'
10914 else
10915 HAVE_PYTHON_TRUE='#'
10916 HAVE_PYTHON_FALSE=
10917 fi
10918
10919
10920 # -------------------- #
10921 # Check for libguile. #
10922 # -------------------- #
10923
10924
10925
10926
10927
10928
10929 # Check whether --with-guile was given.
10930 if test "${with_guile+set}" = set; then :
10931 withval=$with_guile;
10932 else
10933 with_guile=auto
10934 fi
10935
10936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10937 $as_echo_n "checking whether to use guile... " >&6; }
10938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10939 $as_echo "$with_guile" >&6; }
10940
10941 # Extract the first word of "pkg-config", so it can be a program name with args.
10942 set dummy pkg-config; ac_word=$2
10943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10944 $as_echo_n "checking for $ac_word... " >&6; }
10945 if ${ac_cv_path_pkg_config_prog_path+:} false; then :
10946 $as_echo_n "(cached) " >&6
10947 else
10948 case $pkg_config_prog_path in
10949 [\\/]* | ?:[\\/]*)
10950 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10951 ;;
10952 *)
10953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10954 for as_dir in $PATH
10955 do
10956 IFS=$as_save_IFS
10957 test -z "$as_dir" && as_dir=.
10958 for ac_exec_ext in '' $ac_executable_extensions; do
10959 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10960 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10961 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10962 break 2
10963 fi
10964 done
10965 done
10966 IFS=$as_save_IFS
10967
10968 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10969 ;;
10970 esac
10971 fi
10972 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10973 if test -n "$pkg_config_prog_path"; then
10974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10975 $as_echo "$pkg_config_prog_path" >&6; }
10976 else
10977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10978 $as_echo "no" >&6; }
10979 fi
10980
10981
10982
10983 try_guile_versions="guile-2.0"
10984 have_libguile=no
10985 case "${with_guile}" in
10986 no)
10987 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10988 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10989 ;;
10990 auto)
10991 if test "${pkg_config_prog_path}" = "missing"; then
10992 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10993 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10994 else
10995
10996 pkg_config=${pkg_config_prog_path}
10997 guile_version_list=${try_guile_versions}
10998 flag_errors=no
10999
11000 found_usable_guile=checking
11001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11002 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11003 for guile_version in ${guile_version_list}; do
11004 ${pkg_config} --exists ${guile_version} 2>/dev/null
11005 if test $? != 0; then
11006 continue
11007 fi
11008 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11009 if test $? != 0; then
11010 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11011 fi
11012 new_LIBS=`${pkg_config} --libs ${guile_version}`
11013 if test $? != 0; then
11014 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11015 fi
11016 found_usable_guile=${guile_version}
11017 break
11018 done
11019 if test "${found_usable_guile}" = "checking"; then
11020 if test "${flag_errors}" = "yes"; then
11021 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11022 else
11023 found_usable_guile=no
11024 fi
11025 fi
11026 if test "${found_usable_guile}" != no; then
11027 save_CPPFLAGS=$CPPFLAGS
11028 save_LIBS=$LIBS
11029 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11030 LIBS="$LIBS $new_LIBS"
11031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11032 /* end confdefs.h. */
11033 #include "libguile.h"
11034 int
11035 main ()
11036 {
11037 scm_init_guile ();
11038 ;
11039 return 0;
11040 }
11041 _ACEOF
11042 if ac_fn_c_try_link "$LINENO"; then :
11043 have_libguile=yes
11044 GUILE_CPPFLAGS=$new_CPPFLAGS
11045 GUILE_LIBS=$new_LIBS
11046 else
11047 found_usable_guile=no
11048 fi
11049 rm -f core conftest.err conftest.$ac_objext \
11050 conftest$ac_exeext conftest.$ac_ext
11051 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11052 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11053
11054 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11055
11056
11057 fi
11058
11059 CPPFLAGS=$save_CPPFLAGS
11060 LIBS=$save_LIBS
11061 if test "${found_usable_guile}" = no; then
11062 if test "${flag_errors}" = yes; then
11063 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11064 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11065 as_fn_error $? "linking guile version ${guile_version} test program failed
11066 See \`config.log' for more details" "$LINENO" 5; }
11067 fi
11068 fi
11069 fi
11070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11071 $as_echo "${found_usable_guile}" >&6; }
11072
11073 fi
11074 ;;
11075 yes)
11076 if test "${pkg_config_prog_path}" = "missing"; then
11077 as_fn_error $? "pkg-config not found" "$LINENO" 5
11078 fi
11079
11080 pkg_config=${pkg_config_prog_path}
11081 guile_version_list=${try_guile_versions}
11082 flag_errors=yes
11083
11084 found_usable_guile=checking
11085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11086 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11087 for guile_version in ${guile_version_list}; do
11088 ${pkg_config} --exists ${guile_version} 2>/dev/null
11089 if test $? != 0; then
11090 continue
11091 fi
11092 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11093 if test $? != 0; then
11094 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11095 fi
11096 new_LIBS=`${pkg_config} --libs ${guile_version}`
11097 if test $? != 0; then
11098 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11099 fi
11100 found_usable_guile=${guile_version}
11101 break
11102 done
11103 if test "${found_usable_guile}" = "checking"; then
11104 if test "${flag_errors}" = "yes"; then
11105 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11106 else
11107 found_usable_guile=no
11108 fi
11109 fi
11110 if test "${found_usable_guile}" != no; then
11111 save_CPPFLAGS=$CPPFLAGS
11112 save_LIBS=$LIBS
11113 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11114 LIBS="$LIBS $new_LIBS"
11115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11116 /* end confdefs.h. */
11117 #include "libguile.h"
11118 int
11119 main ()
11120 {
11121 scm_init_guile ();
11122 ;
11123 return 0;
11124 }
11125 _ACEOF
11126 if ac_fn_c_try_link "$LINENO"; then :
11127 have_libguile=yes
11128 GUILE_CPPFLAGS=$new_CPPFLAGS
11129 GUILE_LIBS=$new_LIBS
11130 else
11131 found_usable_guile=no
11132 fi
11133 rm -f core conftest.err conftest.$ac_objext \
11134 conftest$ac_exeext conftest.$ac_ext
11135 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11136 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11137
11138 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11139
11140
11141 fi
11142
11143 CPPFLAGS=$save_CPPFLAGS
11144 LIBS=$save_LIBS
11145 if test "${found_usable_guile}" = no; then
11146 if test "${flag_errors}" = yes; then
11147 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11148 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11149 as_fn_error $? "linking guile version ${guile_version} test program failed
11150 See \`config.log' for more details" "$LINENO" 5; }
11151 fi
11152 fi
11153 fi
11154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11155 $as_echo "${found_usable_guile}" >&6; }
11156
11157 ;;
11158 [\\/]* | ?:[\\/]*)
11159 if test -x "${with_guile}"; then
11160
11161 pkg_config=${with_guile}
11162 guile_version_list=${try_guile_versions}
11163 flag_errors=yes
11164
11165 found_usable_guile=checking
11166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11167 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11168 for guile_version in ${guile_version_list}; do
11169 ${pkg_config} --exists ${guile_version} 2>/dev/null
11170 if test $? != 0; then
11171 continue
11172 fi
11173 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11174 if test $? != 0; then
11175 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11176 fi
11177 new_LIBS=`${pkg_config} --libs ${guile_version}`
11178 if test $? != 0; then
11179 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11180 fi
11181 found_usable_guile=${guile_version}
11182 break
11183 done
11184 if test "${found_usable_guile}" = "checking"; then
11185 if test "${flag_errors}" = "yes"; then
11186 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11187 else
11188 found_usable_guile=no
11189 fi
11190 fi
11191 if test "${found_usable_guile}" != no; then
11192 save_CPPFLAGS=$CPPFLAGS
11193 save_LIBS=$LIBS
11194 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11195 LIBS="$LIBS $new_LIBS"
11196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11197 /* end confdefs.h. */
11198 #include "libguile.h"
11199 int
11200 main ()
11201 {
11202 scm_init_guile ();
11203 ;
11204 return 0;
11205 }
11206 _ACEOF
11207 if ac_fn_c_try_link "$LINENO"; then :
11208 have_libguile=yes
11209 GUILE_CPPFLAGS=$new_CPPFLAGS
11210 GUILE_LIBS=$new_LIBS
11211 else
11212 found_usable_guile=no
11213 fi
11214 rm -f core conftest.err conftest.$ac_objext \
11215 conftest$ac_exeext conftest.$ac_ext
11216 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11217 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11218
11219 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11220
11221
11222 fi
11223
11224 CPPFLAGS=$save_CPPFLAGS
11225 LIBS=$save_LIBS
11226 if test "${found_usable_guile}" = no; then
11227 if test "${flag_errors}" = yes; then
11228 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11229 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11230 as_fn_error $? "linking guile version ${guile_version} test program failed
11231 See \`config.log' for more details" "$LINENO" 5; }
11232 fi
11233 fi
11234 fi
11235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11236 $as_echo "${found_usable_guile}" >&6; }
11237
11238 else
11239 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11240 fi
11241 ;;
11242 "" | */*)
11243 # Disallow --with=guile="" and --with-guile=foo/bar.
11244 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11245 ;;
11246 *)
11247 # A space separate list of guile versions to try, in order.
11248 if test "${pkg_config_prog_path}" = "missing"; then
11249 as_fn_error $? "pkg-config not found" "$LINENO" 5
11250 fi
11251
11252 pkg_config=${pkg_config_prog_path}
11253 guile_version_list=${with_guile}
11254 flag_errors=yes
11255
11256 found_usable_guile=checking
11257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11258 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11259 for guile_version in ${guile_version_list}; do
11260 ${pkg_config} --exists ${guile_version} 2>/dev/null
11261 if test $? != 0; then
11262 continue
11263 fi
11264 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11265 if test $? != 0; then
11266 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11267 fi
11268 new_LIBS=`${pkg_config} --libs ${guile_version}`
11269 if test $? != 0; then
11270 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11271 fi
11272 found_usable_guile=${guile_version}
11273 break
11274 done
11275 if test "${found_usable_guile}" = "checking"; then
11276 if test "${flag_errors}" = "yes"; then
11277 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11278 else
11279 found_usable_guile=no
11280 fi
11281 fi
11282 if test "${found_usable_guile}" != no; then
11283 save_CPPFLAGS=$CPPFLAGS
11284 save_LIBS=$LIBS
11285 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11286 LIBS="$LIBS $new_LIBS"
11287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11288 /* end confdefs.h. */
11289 #include "libguile.h"
11290 int
11291 main ()
11292 {
11293 scm_init_guile ();
11294 ;
11295 return 0;
11296 }
11297 _ACEOF
11298 if ac_fn_c_try_link "$LINENO"; then :
11299 have_libguile=yes
11300 GUILE_CPPFLAGS=$new_CPPFLAGS
11301 GUILE_LIBS=$new_LIBS
11302 else
11303 found_usable_guile=no
11304 fi
11305 rm -f core conftest.err conftest.$ac_objext \
11306 conftest$ac_exeext conftest.$ac_ext
11307 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11308 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11309
11310 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11311
11312
11313 fi
11314
11315 CPPFLAGS=$save_CPPFLAGS
11316 LIBS=$save_LIBS
11317 if test "${found_usable_guile}" = no; then
11318 if test "${flag_errors}" = yes; then
11319 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11320 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11321 as_fn_error $? "linking guile version ${guile_version} test program failed
11322 See \`config.log' for more details" "$LINENO" 5; }
11323 fi
11324 fi
11325 fi
11326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11327 $as_echo "${found_usable_guile}" >&6; }
11328
11329 ;;
11330 esac
11331
11332 if test "${have_libguile}" != no; then
11333 case "${with_guile}" in
11334 [\\/]* | ?:[\\/]*)
11335
11336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11337 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11338 if ${ac_cv_guild_program_name+:} false; then :
11339 $as_echo_n "(cached) " >&6
11340 else
11341 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
11342
11343 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11344 # the 'guild' and 'bindir' variables. In that case, try to guess
11345 # what the program name is, at the risk of getting it wrong if
11346 # Guile was configured with '--program-suffix' or similar.
11347 if test "x$ac_cv_guild_program_name" = "x"; then
11348 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
11349 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11350 fi
11351
11352 fi
11353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11354 $as_echo "$ac_cv_guild_program_name" >&6; }
11355
11356 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11357 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11358 fi
11359
11360 GUILD="$ac_cv_guild_program_name"
11361
11362
11363 ;;
11364 *)
11365
11366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11367 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11368 if ${ac_cv_guild_program_name+:} false; then :
11369 $as_echo_n "(cached) " >&6
11370 else
11371 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11372
11373 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11374 # the 'guild' and 'bindir' variables. In that case, try to guess
11375 # what the program name is, at the risk of getting it wrong if
11376 # Guile was configured with '--program-suffix' or similar.
11377 if test "x$ac_cv_guild_program_name" = "x"; then
11378 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11379 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11380 fi
11381
11382 fi
11383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11384 $as_echo "$ac_cv_guild_program_name" >&6; }
11385
11386 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11387 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11388 fi
11389
11390 GUILD="$ac_cv_guild_program_name"
11391
11392
11393 ;;
11394 esac
11395
11396
11397 if test "$cross_compiling" = no; then
11398 GUILD_TARGET_FLAG=
11399 else
11400 GUILD_TARGET_FLAG="--target=$host"
11401 fi
11402
11403
11404
11405
11406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11407 $as_echo_n "checking whether guild supports this host... " >&6; }
11408 if ${ac_cv_guild_ok+:} false; then :
11409 $as_echo_n "(cached) " >&6
11410 else
11411 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11412 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11413 ac_cv_guild_ok=yes
11414 else
11415 ac_cv_guild_ok=no
11416 fi
11417 fi
11418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11419 $as_echo "$ac_cv_guild_ok" >&6; }
11420
11421 if test "$ac_cv_guild_ok" = no; then
11422 have_libguile=no
11423 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11424 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
11425 fi
11426 fi
11427
11428 if test "${have_libguile}" != no; then
11429
11430 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
11431
11432 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11433 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11434 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11435 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11436 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
11437
11438 save_LIBS="$LIBS"
11439 save_CPPFLAGS="$CPPFLAGS"
11440 LIBS="$GUILE_LIBS"
11441 CPPFLAGS="$GUILE_CPPFLAGS"
11442 for ac_func in scm_new_smob
11443 do :
11444 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
11445 if test "x$ac_cv_func_scm_new_smob" = xyes; then :
11446 cat >>confdefs.h <<_ACEOF
11447 #define HAVE_SCM_NEW_SMOB 1
11448 _ACEOF
11449
11450 fi
11451 done
11452
11453 LIBS="$save_LIBS"
11454 CPPFLAGS="$save_CPPFLAGS"
11455 else
11456 # Even if Guile support is not compiled in, we need to have these files
11457 # included.
11458 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
11459 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11460 fi
11461
11462
11463 if test "${have_libguile}" != no; then
11464 HAVE_GUILE_TRUE=
11465 HAVE_GUILE_FALSE='#'
11466 else
11467 HAVE_GUILE_TRUE='#'
11468 HAVE_GUILE_FALSE=
11469 fi
11470
11471
11472 # --------------------- #
11473 # Check for libmcheck. #
11474 # --------------------- #
11475
11476 # Enable -lmcheck by default (it provides cheap-enough memory mangling),
11477 # but turn it off if Python is enabled with threads, since -lmcheck is
11478 # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
11479 # and for releases.
11480 if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
11481 && $development; then
11482 libmcheck_default=yes
11483 else
11484 libmcheck_default=no
11485 fi
11486
11487 # Check whether --enable-libmcheck was given.
11488 if test "${enable_libmcheck+set}" = set; then :
11489 enableval=$enable_libmcheck; case "${enableval}" in
11490 yes | y) ENABLE_LIBMCHECK="yes" ;;
11491 no | n) ENABLE_LIBMCHECK="no" ;;
11492 *) as_fn_error $? "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
11493 esac
11494 fi
11495
11496
11497 if test -z "${ENABLE_LIBMCHECK}"; then
11498 ENABLE_LIBMCHECK=${libmcheck_default}
11499 fi
11500
11501 if test "$ENABLE_LIBMCHECK" = "yes" ; then
11502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
11503 $as_echo_n "checking for main in -lmcheck... " >&6; }
11504 if ${ac_cv_lib_mcheck_main+:} false; then :
11505 $as_echo_n "(cached) " >&6
11506 else
11507 ac_check_lib_save_LIBS=$LIBS
11508 LIBS="-lmcheck $LIBS"
11509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11510 /* end confdefs.h. */
11511
11512
11513 int
11514 main ()
11515 {
11516 return main ();
11517 ;
11518 return 0;
11519 }
11520 _ACEOF
11521 if ac_fn_c_try_link "$LINENO"; then :
11522 ac_cv_lib_mcheck_main=yes
11523 else
11524 ac_cv_lib_mcheck_main=no
11525 fi
11526 rm -f core conftest.err conftest.$ac_objext \
11527 conftest$ac_exeext conftest.$ac_ext
11528 LIBS=$ac_check_lib_save_LIBS
11529 fi
11530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
11531 $as_echo "$ac_cv_lib_mcheck_main" >&6; }
11532 if test "x$ac_cv_lib_mcheck_main" = xyes; then :
11533 cat >>confdefs.h <<_ACEOF
11534 #define HAVE_LIBMCHECK 1
11535 _ACEOF
11536
11537 LIBS="-lmcheck $LIBS"
11538
11539 fi
11540
11541 fi
11542
11543
11544 if test "$ENABLE_LIBMCHECK" = "yes" \
11545 -a "${have_libpython}" != "no" \
11546 -a "${python_has_threads}" = "yes" ; then
11547 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
11548 $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
11549 fi
11550
11551
11552 # Check whether --with-intel_pt was given.
11553 if test "${with_intel_pt+set}" = set; then :
11554 withval=$with_intel_pt;
11555 else
11556 with_intel_pt=auto
11557 fi
11558
11559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11560 $as_echo_n "checking whether to use intel pt... " >&6; }
11561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11562 $as_echo "$with_intel_pt" >&6; }
11563
11564 if test "${with_intel_pt}" = no; then
11565 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11566 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
11567 HAVE_LIBIPT=no
11568 else
11569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11570 /* end confdefs.h. */
11571
11572 #include <linux/perf_event.h>
11573 #ifndef PERF_ATTR_SIZE_VER5
11574 # error
11575 #endif
11576
11577 _ACEOF
11578 if ac_fn_c_try_cpp "$LINENO"; then :
11579 perf_event=yes
11580 else
11581 perf_event=no
11582 fi
11583 rm -f conftest.err conftest.i conftest.$ac_ext
11584 if test "$perf_event" != yes; then
11585 if test "$with_intel_pt" = yes; then
11586 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
11587 else
11588 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11589 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11590 fi
11591 fi
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601 use_additional=yes
11602
11603 acl_save_prefix="$prefix"
11604 prefix="$acl_final_prefix"
11605 acl_save_exec_prefix="$exec_prefix"
11606 exec_prefix="$acl_final_exec_prefix"
11607
11608 eval additional_includedir=\"$includedir\"
11609 eval additional_libdir=\"$libdir\"
11610
11611 exec_prefix="$acl_save_exec_prefix"
11612 prefix="$acl_save_prefix"
11613
11614
11615 # Check whether --with-libipt-prefix was given.
11616 if test "${with_libipt_prefix+set}" = set; then :
11617 withval=$with_libipt_prefix;
11618 if test "X$withval" = "Xno"; then
11619 use_additional=no
11620 else
11621 if test "X$withval" = "X"; then
11622
11623 acl_save_prefix="$prefix"
11624 prefix="$acl_final_prefix"
11625 acl_save_exec_prefix="$exec_prefix"
11626 exec_prefix="$acl_final_exec_prefix"
11627
11628 eval additional_includedir=\"$includedir\"
11629 eval additional_libdir=\"$libdir\"
11630
11631 exec_prefix="$acl_save_exec_prefix"
11632 prefix="$acl_save_prefix"
11633
11634 else
11635 additional_includedir="$withval/include"
11636 additional_libdir="$withval/lib"
11637 fi
11638 fi
11639
11640 fi
11641
11642 LIBIPT=
11643 LTLIBIPT=
11644 INCIPT=
11645 rpathdirs=
11646 ltrpathdirs=
11647 names_already_handled=
11648 names_next_round='ipt '
11649 while test -n "$names_next_round"; do
11650 names_this_round="$names_next_round"
11651 names_next_round=
11652 for name in $names_this_round; do
11653 already_handled=
11654 for n in $names_already_handled; do
11655 if test "$n" = "$name"; then
11656 already_handled=yes
11657 break
11658 fi
11659 done
11660 if test -z "$already_handled"; then
11661 names_already_handled="$names_already_handled $name"
11662 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11663 eval value=\"\$HAVE_LIB$uppername\"
11664 if test -n "$value"; then
11665 if test "$value" = yes; then
11666 eval value=\"\$LIB$uppername\"
11667 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11668 eval value=\"\$LTLIB$uppername\"
11669 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11670 else
11671 :
11672 fi
11673 else
11674 found_dir=
11675 found_la=
11676 found_so=
11677 found_a=
11678 if test $use_additional = yes; then
11679 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11680 found_dir="$additional_libdir"
11681 found_so="$additional_libdir/lib$name.$shlibext"
11682 if test -f "$additional_libdir/lib$name.la"; then
11683 found_la="$additional_libdir/lib$name.la"
11684 fi
11685 else
11686 if test -f "$additional_libdir/lib$name.$libext"; then
11687 found_dir="$additional_libdir"
11688 found_a="$additional_libdir/lib$name.$libext"
11689 if test -f "$additional_libdir/lib$name.la"; then
11690 found_la="$additional_libdir/lib$name.la"
11691 fi
11692 fi
11693 fi
11694 fi
11695 if test "X$found_dir" = "X"; then
11696 for x in $LDFLAGS $LTLIBIPT; do
11697
11698 acl_save_prefix="$prefix"
11699 prefix="$acl_final_prefix"
11700 acl_save_exec_prefix="$exec_prefix"
11701 exec_prefix="$acl_final_exec_prefix"
11702 eval x=\"$x\"
11703 exec_prefix="$acl_save_exec_prefix"
11704 prefix="$acl_save_prefix"
11705
11706 case "$x" in
11707 -L*)
11708 dir=`echo "X$x" | sed -e 's/^X-L//'`
11709 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11710 found_dir="$dir"
11711 found_so="$dir/lib$name.$shlibext"
11712 if test -f "$dir/lib$name.la"; then
11713 found_la="$dir/lib$name.la"
11714 fi
11715 else
11716 if test -f "$dir/lib$name.$libext"; then
11717 found_dir="$dir"
11718 found_a="$dir/lib$name.$libext"
11719 if test -f "$dir/lib$name.la"; then
11720 found_la="$dir/lib$name.la"
11721 fi
11722 fi
11723 fi
11724 ;;
11725 esac
11726 if test "X$found_dir" != "X"; then
11727 break
11728 fi
11729 done
11730 fi
11731 if test "X$found_dir" != "X"; then
11732 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11733 if test "X$found_so" != "X"; then
11734 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11735 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11736 else
11737 haveit=
11738 for x in $ltrpathdirs; do
11739 if test "X$x" = "X$found_dir"; then
11740 haveit=yes
11741 break
11742 fi
11743 done
11744 if test -z "$haveit"; then
11745 ltrpathdirs="$ltrpathdirs $found_dir"
11746 fi
11747 if test "$hardcode_direct" = yes; then
11748 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11749 else
11750 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11751 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11752 haveit=
11753 for x in $rpathdirs; do
11754 if test "X$x" = "X$found_dir"; then
11755 haveit=yes
11756 break
11757 fi
11758 done
11759 if test -z "$haveit"; then
11760 rpathdirs="$rpathdirs $found_dir"
11761 fi
11762 else
11763 haveit=
11764 for x in $LDFLAGS $LIBIPT; do
11765
11766 acl_save_prefix="$prefix"
11767 prefix="$acl_final_prefix"
11768 acl_save_exec_prefix="$exec_prefix"
11769 exec_prefix="$acl_final_exec_prefix"
11770 eval x=\"$x\"
11771 exec_prefix="$acl_save_exec_prefix"
11772 prefix="$acl_save_prefix"
11773
11774 if test "X$x" = "X-L$found_dir"; then
11775 haveit=yes
11776 break
11777 fi
11778 done
11779 if test -z "$haveit"; then
11780 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11781 fi
11782 if test "$hardcode_minus_L" != no; then
11783 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11784 else
11785 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11786 fi
11787 fi
11788 fi
11789 fi
11790 else
11791 if test "X$found_a" != "X"; then
11792 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11793 else
11794 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11795 fi
11796 fi
11797 additional_includedir=
11798 case "$found_dir" in
11799 */lib | */lib/)
11800 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11801 additional_includedir="$basedir/include"
11802 ;;
11803 esac
11804 if test "X$additional_includedir" != "X"; then
11805 if test "X$additional_includedir" != "X/usr/include"; then
11806 haveit=
11807 if test "X$additional_includedir" = "X/usr/local/include"; then
11808 if test -n "$GCC"; then
11809 case $host_os in
11810 linux*) haveit=yes;;
11811 esac
11812 fi
11813 fi
11814 if test -z "$haveit"; then
11815 for x in $CPPFLAGS $INCIPT; do
11816
11817 acl_save_prefix="$prefix"
11818 prefix="$acl_final_prefix"
11819 acl_save_exec_prefix="$exec_prefix"
11820 exec_prefix="$acl_final_exec_prefix"
11821 eval x=\"$x\"
11822 exec_prefix="$acl_save_exec_prefix"
11823 prefix="$acl_save_prefix"
11824
11825 if test "X$x" = "X-I$additional_includedir"; then
11826 haveit=yes
11827 break
11828 fi
11829 done
11830 if test -z "$haveit"; then
11831 if test -d "$additional_includedir"; then
11832 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11833 fi
11834 fi
11835 fi
11836 fi
11837 fi
11838 if test -n "$found_la"; then
11839 save_libdir="$libdir"
11840 case "$found_la" in
11841 */* | *\\*) . "$found_la" ;;
11842 *) . "./$found_la" ;;
11843 esac
11844 libdir="$save_libdir"
11845 for dep in $dependency_libs; do
11846 case "$dep" in
11847 -L*)
11848 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11849 if test "X$additional_libdir" != "X/usr/lib"; then
11850 haveit=
11851 if test "X$additional_libdir" = "X/usr/local/lib"; then
11852 if test -n "$GCC"; then
11853 case $host_os in
11854 linux*) haveit=yes;;
11855 esac
11856 fi
11857 fi
11858 if test -z "$haveit"; then
11859 haveit=
11860 for x in $LDFLAGS $LIBIPT; do
11861
11862 acl_save_prefix="$prefix"
11863 prefix="$acl_final_prefix"
11864 acl_save_exec_prefix="$exec_prefix"
11865 exec_prefix="$acl_final_exec_prefix"
11866 eval x=\"$x\"
11867 exec_prefix="$acl_save_exec_prefix"
11868 prefix="$acl_save_prefix"
11869
11870 if test "X$x" = "X-L$additional_libdir"; then
11871 haveit=yes
11872 break
11873 fi
11874 done
11875 if test -z "$haveit"; then
11876 if test -d "$additional_libdir"; then
11877 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11878 fi
11879 fi
11880 haveit=
11881 for x in $LDFLAGS $LTLIBIPT; do
11882
11883 acl_save_prefix="$prefix"
11884 prefix="$acl_final_prefix"
11885 acl_save_exec_prefix="$exec_prefix"
11886 exec_prefix="$acl_final_exec_prefix"
11887 eval x=\"$x\"
11888 exec_prefix="$acl_save_exec_prefix"
11889 prefix="$acl_save_prefix"
11890
11891 if test "X$x" = "X-L$additional_libdir"; then
11892 haveit=yes
11893 break
11894 fi
11895 done
11896 if test -z "$haveit"; then
11897 if test -d "$additional_libdir"; then
11898 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11899 fi
11900 fi
11901 fi
11902 fi
11903 ;;
11904 -R*)
11905 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11906 if test "$enable_rpath" != no; then
11907 haveit=
11908 for x in $rpathdirs; do
11909 if test "X$x" = "X$dir"; then
11910 haveit=yes
11911 break
11912 fi
11913 done
11914 if test -z "$haveit"; then
11915 rpathdirs="$rpathdirs $dir"
11916 fi
11917 haveit=
11918 for x in $ltrpathdirs; do
11919 if test "X$x" = "X$dir"; then
11920 haveit=yes
11921 break
11922 fi
11923 done
11924 if test -z "$haveit"; then
11925 ltrpathdirs="$ltrpathdirs $dir"
11926 fi
11927 fi
11928 ;;
11929 -l*)
11930 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11931 ;;
11932 *.la)
11933 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11934 ;;
11935 *)
11936 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11937 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11938 ;;
11939 esac
11940 done
11941 fi
11942 else
11943 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11944 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11945 fi
11946 fi
11947 fi
11948 done
11949 done
11950 if test "X$rpathdirs" != "X"; then
11951 if test -n "$hardcode_libdir_separator"; then
11952 alldirs=
11953 for found_dir in $rpathdirs; do
11954 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11955 done
11956 acl_save_libdir="$libdir"
11957 libdir="$alldirs"
11958 eval flag=\"$hardcode_libdir_flag_spec\"
11959 libdir="$acl_save_libdir"
11960 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11961 else
11962 for found_dir in $rpathdirs; do
11963 acl_save_libdir="$libdir"
11964 libdir="$found_dir"
11965 eval flag=\"$hardcode_libdir_flag_spec\"
11966 libdir="$acl_save_libdir"
11967 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11968 done
11969 fi
11970 fi
11971 if test "X$ltrpathdirs" != "X"; then
11972 for found_dir in $ltrpathdirs; do
11973 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11974 done
11975 fi
11976
11977
11978 ac_save_CPPFLAGS="$CPPFLAGS"
11979
11980 for element in $INCIPT; do
11981 haveit=
11982 for x in $CPPFLAGS; do
11983
11984 acl_save_prefix="$prefix"
11985 prefix="$acl_final_prefix"
11986 acl_save_exec_prefix="$exec_prefix"
11987 exec_prefix="$acl_final_exec_prefix"
11988 eval x=\"$x\"
11989 exec_prefix="$acl_save_exec_prefix"
11990 prefix="$acl_save_prefix"
11991
11992 if test "X$x" = "X$element"; then
11993 haveit=yes
11994 break
11995 fi
11996 done
11997 if test -z "$haveit"; then
11998 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11999 fi
12000 done
12001
12002
12003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
12004 $as_echo_n "checking for libipt... " >&6; }
12005 if ${ac_cv_libipt+:} false; then :
12006 $as_echo_n "(cached) " >&6
12007 else
12008
12009 ac_save_LIBS="$LIBS"
12010 LIBS="$LIBS $LIBIPT"
12011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12012 /* end confdefs.h. */
12013 #include "intel-pt.h"
12014 int
12015 main ()
12016 {
12017 pt_insn_alloc_decoder (0);
12018 ;
12019 return 0;
12020 }
12021 _ACEOF
12022 if ac_fn_c_try_link "$LINENO"; then :
12023 ac_cv_libipt=yes
12024 else
12025 ac_cv_libipt=no
12026 fi
12027 rm -f core conftest.err conftest.$ac_objext \
12028 conftest$ac_exeext conftest.$ac_ext
12029 LIBS="$ac_save_LIBS"
12030
12031 fi
12032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
12033 $as_echo "$ac_cv_libipt" >&6; }
12034 if test "$ac_cv_libipt" = yes; then
12035 HAVE_LIBIPT=yes
12036
12037 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
12038
12039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
12040 $as_echo_n "checking how to link with libipt... " >&6; }
12041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
12042 $as_echo "$LIBIPT" >&6; }
12043 else
12044 HAVE_LIBIPT=no
12045 CPPFLAGS="$ac_save_CPPFLAGS"
12046 LIBIPT=
12047 LTLIBIPT=
12048 fi
12049
12050
12051
12052
12053
12054
12055 if test "$HAVE_LIBIPT" != yes; then
12056 if test "$with_intel_pt" = yes; then
12057 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
12058 else
12059 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
12060 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
12061 fi
12062 else
12063 save_LIBS=$LIBS
12064 LIBS="$LIBS $LIBIPT"
12065 for ac_func in pt_insn_event
12066 do :
12067 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
12068 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
12069 cat >>confdefs.h <<_ACEOF
12070 #define HAVE_PT_INSN_EVENT 1
12071 _ACEOF
12072
12073 fi
12074 done
12075
12076 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
12077 "
12078 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
12079
12080 cat >>confdefs.h <<_ACEOF
12081 #define HAVE_STRUCT_PT_INSN_ENABLED 1
12082 _ACEOF
12083
12084
12085 fi
12086 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
12087 "
12088 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
12089
12090 cat >>confdefs.h <<_ACEOF
12091 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
12092 _ACEOF
12093
12094
12095 fi
12096
12097 LIBS=$save_LIBS
12098 fi
12099 fi
12100
12101 # ------------------------- #
12102 # Checks for header files. #
12103 # ------------------------- #
12104
12105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12106 $as_echo_n "checking for ANSI C header files... " >&6; }
12107 if ${ac_cv_header_stdc+:} false; then :
12108 $as_echo_n "(cached) " >&6
12109 else
12110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12111 /* end confdefs.h. */
12112 #include <stdlib.h>
12113 #include <stdarg.h>
12114 #include <string.h>
12115 #include <float.h>
12116
12117 int
12118 main ()
12119 {
12120
12121 ;
12122 return 0;
12123 }
12124 _ACEOF
12125 if ac_fn_c_try_compile "$LINENO"; then :
12126 ac_cv_header_stdc=yes
12127 else
12128 ac_cv_header_stdc=no
12129 fi
12130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12131
12132 if test $ac_cv_header_stdc = yes; then
12133 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12135 /* end confdefs.h. */
12136 #include <string.h>
12137
12138 _ACEOF
12139 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12140 $EGREP "memchr" >/dev/null 2>&1; then :
12141
12142 else
12143 ac_cv_header_stdc=no
12144 fi
12145 rm -f conftest*
12146
12147 fi
12148
12149 if test $ac_cv_header_stdc = yes; then
12150 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12152 /* end confdefs.h. */
12153 #include <stdlib.h>
12154
12155 _ACEOF
12156 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12157 $EGREP "free" >/dev/null 2>&1; then :
12158
12159 else
12160 ac_cv_header_stdc=no
12161 fi
12162 rm -f conftest*
12163
12164 fi
12165
12166 if test $ac_cv_header_stdc = yes; then
12167 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12168 if test "$cross_compiling" = yes; then :
12169 :
12170 else
12171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12172 /* end confdefs.h. */
12173 #include <ctype.h>
12174 #include <stdlib.h>
12175 #if ((' ' & 0x0FF) == 0x020)
12176 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12177 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12178 #else
12179 # define ISLOWER(c) \
12180 (('a' <= (c) && (c) <= 'i') \
12181 || ('j' <= (c) && (c) <= 'r') \
12182 || ('s' <= (c) && (c) <= 'z'))
12183 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12184 #endif
12185
12186 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12187 int
12188 main ()
12189 {
12190 int i;
12191 for (i = 0; i < 256; i++)
12192 if (XOR (islower (i), ISLOWER (i))
12193 || toupper (i) != TOUPPER (i))
12194 return 2;
12195 return 0;
12196 }
12197 _ACEOF
12198 if ac_fn_c_try_run "$LINENO"; then :
12199
12200 else
12201 ac_cv_header_stdc=no
12202 fi
12203 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12204 conftest.$ac_objext conftest.beam conftest.$ac_ext
12205 fi
12206
12207 fi
12208 fi
12209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12210 $as_echo "$ac_cv_header_stdc" >&6; }
12211 if test $ac_cv_header_stdc = yes; then
12212
12213 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12214
12215 fi
12216
12217 # elf_hp.h is for HP/UX 64-bit shared library support.
12218 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
12219 thread_db.h linux/elf.h \
12220 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12221 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
12222 sys/reg.h sys/debugreg.h sys/select.h \
12223 termios.h elf_hp.h \
12224 dlfcn.h
12225 do :
12226 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12227 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12228 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12229 cat >>confdefs.h <<_ACEOF
12230 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12231 _ACEOF
12232
12233 fi
12234
12235 done
12236
12237 for ac_header in sys/user.h
12238 do :
12239 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12240 # include <sys/param.h>
12241 #endif
12242
12243 "
12244 if test "x$ac_cv_header_sys_user_h" = xyes; then :
12245 cat >>confdefs.h <<_ACEOF
12246 #define HAVE_SYS_USER_H 1
12247 _ACEOF
12248
12249 fi
12250
12251 done
12252
12253
12254 for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
12255 do :
12256 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12257 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12258 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12259 cat >>confdefs.h <<_ACEOF
12260 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12261 _ACEOF
12262
12263 fi
12264
12265 done
12266
12267 for ac_header in term.h
12268 do :
12269 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12270 # include <curses.h>
12271 #endif
12272
12273 "
12274 if test "x$ac_cv_header_term_h" = xyes; then :
12275 cat >>confdefs.h <<_ACEOF
12276 #define HAVE_TERM_H 1
12277 _ACEOF
12278
12279 fi
12280
12281 done
12282
12283
12284 # ------------------------- #
12285 # Checks for declarations. #
12286 # ------------------------- #
12287
12288
12289 # Check for presence and size of long long.
12290 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
12291 if test "x$ac_cv_type_long_long" = xyes; then :
12292
12293 cat >>confdefs.h <<_ACEOF
12294 #define HAVE_LONG_LONG 1
12295 _ACEOF
12296
12297 # The cast to long int works around a bug in the HP C Compiler
12298 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12299 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12300 # This bug is HP SR number 8606223364.
12301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12302 $as_echo_n "checking size of long long... " >&6; }
12303 if ${ac_cv_sizeof_long_long+:} false; then :
12304 $as_echo_n "(cached) " >&6
12305 else
12306 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12307
12308 else
12309 if test "$ac_cv_type_long_long" = yes; then
12310 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12311 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12312 as_fn_error 77 "cannot compute sizeof (long long)
12313 See \`config.log' for more details" "$LINENO" 5; }
12314 else
12315 ac_cv_sizeof_long_long=0
12316 fi
12317 fi
12318
12319 fi
12320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12321 $as_echo "$ac_cv_sizeof_long_long" >&6; }
12322
12323
12324
12325 cat >>confdefs.h <<_ACEOF
12326 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12327 _ACEOF
12328
12329
12330 fi
12331
12332
12333 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12334 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12335 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
12336 ac_have_decl=1
12337 else
12338 ac_have_decl=0
12339 fi
12340
12341 cat >>confdefs.h <<_ACEOF
12342 #define HAVE_DECL_BASENAME $ac_have_decl
12343 _ACEOF
12344 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
12345 if test "x$ac_cv_have_decl_ffs" = xyes; then :
12346 ac_have_decl=1
12347 else
12348 ac_have_decl=0
12349 fi
12350
12351 cat >>confdefs.h <<_ACEOF
12352 #define HAVE_DECL_FFS $ac_have_decl
12353 _ACEOF
12354 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
12355 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
12356 ac_have_decl=1
12357 else
12358 ac_have_decl=0
12359 fi
12360
12361 cat >>confdefs.h <<_ACEOF
12362 #define HAVE_DECL_ASPRINTF $ac_have_decl
12363 _ACEOF
12364 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
12365 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
12366 ac_have_decl=1
12367 else
12368 ac_have_decl=0
12369 fi
12370
12371 cat >>confdefs.h <<_ACEOF
12372 #define HAVE_DECL_VASPRINTF $ac_have_decl
12373 _ACEOF
12374 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12375 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12376 ac_have_decl=1
12377 else
12378 ac_have_decl=0
12379 fi
12380
12381 cat >>confdefs.h <<_ACEOF
12382 #define HAVE_DECL_SNPRINTF $ac_have_decl
12383 _ACEOF
12384 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12385 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
12386 ac_have_decl=1
12387 else
12388 ac_have_decl=0
12389 fi
12390
12391 cat >>confdefs.h <<_ACEOF
12392 #define HAVE_DECL_VSNPRINTF $ac_have_decl
12393 _ACEOF
12394
12395 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
12396 if test "x$ac_cv_have_decl_strtol" = xyes; then :
12397 ac_have_decl=1
12398 else
12399 ac_have_decl=0
12400 fi
12401
12402 cat >>confdefs.h <<_ACEOF
12403 #define HAVE_DECL_STRTOL $ac_have_decl
12404 _ACEOF
12405 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
12406 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
12407 ac_have_decl=1
12408 else
12409 ac_have_decl=0
12410 fi
12411
12412 cat >>confdefs.h <<_ACEOF
12413 #define HAVE_DECL_STRTOUL $ac_have_decl
12414 _ACEOF
12415 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
12416 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
12417 ac_have_decl=1
12418 else
12419 ac_have_decl=0
12420 fi
12421
12422 cat >>confdefs.h <<_ACEOF
12423 #define HAVE_DECL_STRTOLL $ac_have_decl
12424 _ACEOF
12425 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
12426 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
12427 ac_have_decl=1
12428 else
12429 ac_have_decl=0
12430 fi
12431
12432 cat >>confdefs.h <<_ACEOF
12433 #define HAVE_DECL_STRTOULL $ac_have_decl
12434 _ACEOF
12435
12436 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12437 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
12438 ac_have_decl=1
12439 else
12440 ac_have_decl=0
12441 fi
12442
12443 cat >>confdefs.h <<_ACEOF
12444 #define HAVE_DECL_STRVERSCMP $ac_have_decl
12445 _ACEOF
12446
12447
12448
12449 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12450 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12451 ac_have_decl=1
12452 else
12453 ac_have_decl=0
12454 fi
12455
12456 cat >>confdefs.h <<_ACEOF
12457 #define HAVE_DECL_SNPRINTF $ac_have_decl
12458 _ACEOF
12459
12460
12461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12462 $as_echo_n "checking for LC_MESSAGES... " >&6; }
12463 if ${am_cv_val_LC_MESSAGES+:} false; then :
12464 $as_echo_n "(cached) " >&6
12465 else
12466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12467 /* end confdefs.h. */
12468 #include <locale.h>
12469 int
12470 main ()
12471 {
12472 return LC_MESSAGES
12473 ;
12474 return 0;
12475 }
12476 _ACEOF
12477 if ac_fn_c_try_link "$LINENO"; then :
12478 am_cv_val_LC_MESSAGES=yes
12479 else
12480 am_cv_val_LC_MESSAGES=no
12481 fi
12482 rm -f core conftest.err conftest.$ac_objext \
12483 conftest$ac_exeext conftest.$ac_ext
12484 fi
12485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12486 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12487 if test $am_cv_val_LC_MESSAGES = yes; then
12488
12489 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12490
12491 fi
12492
12493
12494 # ----------------------- #
12495 # Checks for structures. #
12496 # ----------------------- #
12497
12498 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
12499 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
12500
12501 cat >>confdefs.h <<_ACEOF
12502 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
12503 _ACEOF
12504
12505
12506 fi
12507 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
12508 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
12509
12510 cat >>confdefs.h <<_ACEOF
12511 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12512 _ACEOF
12513
12514
12515 fi
12516
12517
12518 # ------------------ #
12519 # Checks for types. #
12520 # ------------------ #
12521
12522 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
12523 #include <sys/socket.h>
12524
12525 "
12526 if test "x$ac_cv_type_socklen_t" = xyes; then :
12527
12528 cat >>confdefs.h <<_ACEOF
12529 #define HAVE_SOCKLEN_T 1
12530 _ACEOF
12531
12532
12533 fi
12534
12535
12536 # ------------------------------------- #
12537 # Checks for compiler characteristics. #
12538 # ------------------------------------- #
12539
12540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12541 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12542 if ${ac_cv_c_const+:} false; then :
12543 $as_echo_n "(cached) " >&6
12544 else
12545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12546 /* end confdefs.h. */
12547
12548 int
12549 main ()
12550 {
12551
12552 #ifndef __cplusplus
12553 /* Ultrix mips cc rejects this sort of thing. */
12554 typedef int charset[2];
12555 const charset cs = { 0, 0 };
12556 /* SunOS 4.1.1 cc rejects this. */
12557 char const *const *pcpcc;
12558 char **ppc;
12559 /* NEC SVR4.0.2 mips cc rejects this. */
12560 struct point {int x, y;};
12561 static struct point const zero = {0,0};
12562 /* AIX XL C 1.02.0.0 rejects this.
12563 It does not let you subtract one const X* pointer from another in
12564 an arm of an if-expression whose if-part is not a constant
12565 expression */
12566 const char *g = "string";
12567 pcpcc = &g + (g ? g-g : 0);
12568 /* HPUX 7.0 cc rejects these. */
12569 ++pcpcc;
12570 ppc = (char**) pcpcc;
12571 pcpcc = (char const *const *) ppc;
12572 { /* SCO 3.2v4 cc rejects this sort of thing. */
12573 char tx;
12574 char *t = &tx;
12575 char const *s = 0 ? (char *) 0 : (char const *) 0;
12576
12577 *t++ = 0;
12578 if (s) return 0;
12579 }
12580 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12581 int x[] = {25, 17};
12582 const int *foo = &x[0];
12583 ++foo;
12584 }
12585 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12586 typedef const int *iptr;
12587 iptr p = 0;
12588 ++p;
12589 }
12590 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12591 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12592 struct s { int j; const int *ap[3]; } bx;
12593 struct s *b = &bx; b->j = 5;
12594 }
12595 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12596 const int foo = 10;
12597 if (!foo) return 0;
12598 }
12599 return !cs[0] && !zero.x;
12600 #endif
12601
12602 ;
12603 return 0;
12604 }
12605 _ACEOF
12606 if ac_fn_c_try_compile "$LINENO"; then :
12607 ac_cv_c_const=yes
12608 else
12609 ac_cv_c_const=no
12610 fi
12611 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12612 fi
12613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12614 $as_echo "$ac_cv_c_const" >&6; }
12615 if test $ac_cv_c_const = no; then
12616
12617 $as_echo "#define const /**/" >>confdefs.h
12618
12619 fi
12620
12621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12622 $as_echo_n "checking for inline... " >&6; }
12623 if ${ac_cv_c_inline+:} false; then :
12624 $as_echo_n "(cached) " >&6
12625 else
12626 ac_cv_c_inline=no
12627 for ac_kw in inline __inline__ __inline; do
12628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12629 /* end confdefs.h. */
12630 #ifndef __cplusplus
12631 typedef int foo_t;
12632 static $ac_kw foo_t static_foo () {return 0; }
12633 $ac_kw foo_t foo () {return 0; }
12634 #endif
12635
12636 _ACEOF
12637 if ac_fn_c_try_compile "$LINENO"; then :
12638 ac_cv_c_inline=$ac_kw
12639 fi
12640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12641 test "$ac_cv_c_inline" != no && break
12642 done
12643
12644 fi
12645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12646 $as_echo "$ac_cv_c_inline" >&6; }
12647
12648 case $ac_cv_c_inline in
12649 inline | yes) ;;
12650 *)
12651 case $ac_cv_c_inline in
12652 no) ac_val=;;
12653 *) ac_val=$ac_cv_c_inline;;
12654 esac
12655 cat >>confdefs.h <<_ACEOF
12656 #ifndef __cplusplus
12657 #define inline $ac_val
12658 #endif
12659 _ACEOF
12660 ;;
12661 esac
12662
12663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12664 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12665 if ${ac_cv_c_bigendian+:} false; then :
12666 $as_echo_n "(cached) " >&6
12667 else
12668 ac_cv_c_bigendian=unknown
12669 # See if we're dealing with a universal compiler.
12670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12671 /* end confdefs.h. */
12672 #ifndef __APPLE_CC__
12673 not a universal capable compiler
12674 #endif
12675 typedef int dummy;
12676
12677 _ACEOF
12678 if ac_fn_c_try_compile "$LINENO"; then :
12679
12680 # Check for potential -arch flags. It is not universal unless
12681 # there are at least two -arch flags with different values.
12682 ac_arch=
12683 ac_prev=
12684 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12685 if test -n "$ac_prev"; then
12686 case $ac_word in
12687 i?86 | x86_64 | ppc | ppc64)
12688 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12689 ac_arch=$ac_word
12690 else
12691 ac_cv_c_bigendian=universal
12692 break
12693 fi
12694 ;;
12695 esac
12696 ac_prev=
12697 elif test "x$ac_word" = "x-arch"; then
12698 ac_prev=arch
12699 fi
12700 done
12701 fi
12702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12703 if test $ac_cv_c_bigendian = unknown; then
12704 # See if sys/param.h defines the BYTE_ORDER macro.
12705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12706 /* end confdefs.h. */
12707 #include <sys/types.h>
12708 #include <sys/param.h>
12709
12710 int
12711 main ()
12712 {
12713 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12714 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12715 && LITTLE_ENDIAN)
12716 bogus endian macros
12717 #endif
12718
12719 ;
12720 return 0;
12721 }
12722 _ACEOF
12723 if ac_fn_c_try_compile "$LINENO"; then :
12724 # It does; now see whether it defined to BIG_ENDIAN or not.
12725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12726 /* end confdefs.h. */
12727 #include <sys/types.h>
12728 #include <sys/param.h>
12729
12730 int
12731 main ()
12732 {
12733 #if BYTE_ORDER != BIG_ENDIAN
12734 not big endian
12735 #endif
12736
12737 ;
12738 return 0;
12739 }
12740 _ACEOF
12741 if ac_fn_c_try_compile "$LINENO"; then :
12742 ac_cv_c_bigendian=yes
12743 else
12744 ac_cv_c_bigendian=no
12745 fi
12746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12747 fi
12748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12749 fi
12750 if test $ac_cv_c_bigendian = unknown; then
12751 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12753 /* end confdefs.h. */
12754 #include <limits.h>
12755
12756 int
12757 main ()
12758 {
12759 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12760 bogus endian macros
12761 #endif
12762
12763 ;
12764 return 0;
12765 }
12766 _ACEOF
12767 if ac_fn_c_try_compile "$LINENO"; then :
12768 # It does; now see whether it defined to _BIG_ENDIAN or not.
12769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12770 /* end confdefs.h. */
12771 #include <limits.h>
12772
12773 int
12774 main ()
12775 {
12776 #ifndef _BIG_ENDIAN
12777 not big endian
12778 #endif
12779
12780 ;
12781 return 0;
12782 }
12783 _ACEOF
12784 if ac_fn_c_try_compile "$LINENO"; then :
12785 ac_cv_c_bigendian=yes
12786 else
12787 ac_cv_c_bigendian=no
12788 fi
12789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12790 fi
12791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12792 fi
12793 if test $ac_cv_c_bigendian = unknown; then
12794 # Compile a test program.
12795 if test "$cross_compiling" = yes; then :
12796 # Try to guess by grepping values from an object file.
12797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12798 /* end confdefs.h. */
12799 short int ascii_mm[] =
12800 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12801 short int ascii_ii[] =
12802 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12803 int use_ascii (int i) {
12804 return ascii_mm[i] + ascii_ii[i];
12805 }
12806 short int ebcdic_ii[] =
12807 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12808 short int ebcdic_mm[] =
12809 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12810 int use_ebcdic (int i) {
12811 return ebcdic_mm[i] + ebcdic_ii[i];
12812 }
12813 extern int foo;
12814
12815 int
12816 main ()
12817 {
12818 return use_ascii (foo) == use_ebcdic (foo);
12819 ;
12820 return 0;
12821 }
12822 _ACEOF
12823 if ac_fn_c_try_compile "$LINENO"; then :
12824 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12825 ac_cv_c_bigendian=yes
12826 fi
12827 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12828 if test "$ac_cv_c_bigendian" = unknown; then
12829 ac_cv_c_bigendian=no
12830 else
12831 # finding both strings is unlikely to happen, but who knows?
12832 ac_cv_c_bigendian=unknown
12833 fi
12834 fi
12835 fi
12836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12837 else
12838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12839 /* end confdefs.h. */
12840 $ac_includes_default
12841 int
12842 main ()
12843 {
12844
12845 /* Are we little or big endian? From Harbison&Steele. */
12846 union
12847 {
12848 long int l;
12849 char c[sizeof (long int)];
12850 } u;
12851 u.l = 1;
12852 return u.c[sizeof (long int) - 1] == 1;
12853
12854 ;
12855 return 0;
12856 }
12857 _ACEOF
12858 if ac_fn_c_try_run "$LINENO"; then :
12859 ac_cv_c_bigendian=no
12860 else
12861 ac_cv_c_bigendian=yes
12862 fi
12863 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12864 conftest.$ac_objext conftest.beam conftest.$ac_ext
12865 fi
12866
12867 fi
12868 fi
12869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12870 $as_echo "$ac_cv_c_bigendian" >&6; }
12871 case $ac_cv_c_bigendian in #(
12872 yes)
12873 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12874 ;; #(
12875 no)
12876 ;; #(
12877 universal)
12878
12879 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12880
12881 ;; #(
12882 *)
12883 as_fn_error $? "unknown endianness
12884 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12885 esac
12886
12887
12888 # ------------------------------ #
12889 # Checks for library functions. #
12890 # ------------------------------ #
12891
12892
12893
12894
12895 for ac_header in $ac_header_list
12896 do :
12897 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12898 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12899 "
12900 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12901 cat >>confdefs.h <<_ACEOF
12902 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12903 _ACEOF
12904
12905 fi
12906
12907 done
12908
12909
12910
12911
12912
12913
12914
12915
12916 for ac_func in getpagesize
12917 do :
12918 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12919 if test "x$ac_cv_func_getpagesize" = xyes; then :
12920 cat >>confdefs.h <<_ACEOF
12921 #define HAVE_GETPAGESIZE 1
12922 _ACEOF
12923
12924 fi
12925 done
12926
12927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12928 $as_echo_n "checking for working mmap... " >&6; }
12929 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
12930 $as_echo_n "(cached) " >&6
12931 else
12932 if test "$cross_compiling" = yes; then :
12933 ac_cv_func_mmap_fixed_mapped=no
12934 else
12935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12936 /* end confdefs.h. */
12937 $ac_includes_default
12938 /* malloc might have been renamed as rpl_malloc. */
12939 #undef malloc
12940
12941 /* Thanks to Mike Haertel and Jim Avera for this test.
12942 Here is a matrix of mmap possibilities:
12943 mmap private not fixed
12944 mmap private fixed at somewhere currently unmapped
12945 mmap private fixed at somewhere already mapped
12946 mmap shared not fixed
12947 mmap shared fixed at somewhere currently unmapped
12948 mmap shared fixed at somewhere already mapped
12949 For private mappings, we should verify that changes cannot be read()
12950 back from the file, nor mmap's back from the file at a different
12951 address. (There have been systems where private was not correctly
12952 implemented like the infamous i386 svr4.0, and systems where the
12953 VM page cache was not coherent with the file system buffer cache
12954 like early versions of FreeBSD and possibly contemporary NetBSD.)
12955 For shared mappings, we should conversely verify that changes get
12956 propagated back to all the places they're supposed to be.
12957
12958 Grep wants private fixed already mapped.
12959 The main things grep needs to know about mmap are:
12960 * does it exist and is it safe to write into the mmap'd area
12961 * how to use it (BSD variants) */
12962
12963 #include <fcntl.h>
12964 #include <sys/mman.h>
12965
12966 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
12967 char *malloc ();
12968 #endif
12969
12970 /* This mess was copied from the GNU getpagesize.h. */
12971 #ifndef HAVE_GETPAGESIZE
12972 # ifdef _SC_PAGESIZE
12973 # define getpagesize() sysconf(_SC_PAGESIZE)
12974 # else /* no _SC_PAGESIZE */
12975 # ifdef HAVE_SYS_PARAM_H
12976 # include <sys/param.h>
12977 # ifdef EXEC_PAGESIZE
12978 # define getpagesize() EXEC_PAGESIZE
12979 # else /* no EXEC_PAGESIZE */
12980 # ifdef NBPG
12981 # define getpagesize() NBPG * CLSIZE
12982 # ifndef CLSIZE
12983 # define CLSIZE 1
12984 # endif /* no CLSIZE */
12985 # else /* no NBPG */
12986 # ifdef NBPC
12987 # define getpagesize() NBPC
12988 # else /* no NBPC */
12989 # ifdef PAGESIZE
12990 # define getpagesize() PAGESIZE
12991 # endif /* PAGESIZE */
12992 # endif /* no NBPC */
12993 # endif /* no NBPG */
12994 # endif /* no EXEC_PAGESIZE */
12995 # else /* no HAVE_SYS_PARAM_H */
12996 # define getpagesize() 8192 /* punt totally */
12997 # endif /* no HAVE_SYS_PARAM_H */
12998 # endif /* no _SC_PAGESIZE */
12999
13000 #endif /* no HAVE_GETPAGESIZE */
13001
13002 int
13003 main ()
13004 {
13005 char *data, *data2, *data3;
13006 const char *cdata2;
13007 int i, pagesize;
13008 int fd, fd2;
13009
13010 pagesize = getpagesize ();
13011
13012 /* First, make a file with some known garbage in it. */
13013 data = (char *) malloc (pagesize);
13014 if (!data)
13015 return 1;
13016 for (i = 0; i < pagesize; ++i)
13017 *(data + i) = rand ();
13018 umask (0);
13019 fd = creat ("conftest.mmap", 0600);
13020 if (fd < 0)
13021 return 2;
13022 if (write (fd, data, pagesize) != pagesize)
13023 return 3;
13024 close (fd);
13025
13026 /* Next, check that the tail of a page is zero-filled. File must have
13027 non-zero length, otherwise we risk SIGBUS for entire page. */
13028 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13029 if (fd2 < 0)
13030 return 4;
13031 cdata2 = "";
13032 if (write (fd2, cdata2, 1) != 1)
13033 return 5;
13034 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13035 if (data2 == MAP_FAILED)
13036 return 6;
13037 for (i = 0; i < pagesize; ++i)
13038 if (*(data2 + i))
13039 return 7;
13040 close (fd2);
13041 if (munmap (data2, pagesize))
13042 return 8;
13043
13044 /* Next, try to mmap the file at a fixed address which already has
13045 something else allocated at it. If we can, also make sure that
13046 we see the same garbage. */
13047 fd = open ("conftest.mmap", O_RDWR);
13048 if (fd < 0)
13049 return 9;
13050 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13051 MAP_PRIVATE | MAP_FIXED, fd, 0L))
13052 return 10;
13053 for (i = 0; i < pagesize; ++i)
13054 if (*(data + i) != *(data2 + i))
13055 return 11;
13056
13057 /* Finally, make sure that changes to the mapped area do not
13058 percolate back to the file as seen by read(). (This is a bug on
13059 some variants of i386 svr4.0.) */
13060 for (i = 0; i < pagesize; ++i)
13061 *(data2 + i) = *(data2 + i) + 1;
13062 data3 = (char *) malloc (pagesize);
13063 if (!data3)
13064 return 12;
13065 if (read (fd, data3, pagesize) != pagesize)
13066 return 13;
13067 for (i = 0; i < pagesize; ++i)
13068 if (*(data + i) != *(data3 + i))
13069 return 14;
13070 close (fd);
13071 return 0;
13072 }
13073 _ACEOF
13074 if ac_fn_c_try_run "$LINENO"; then :
13075 ac_cv_func_mmap_fixed_mapped=yes
13076 else
13077 ac_cv_func_mmap_fixed_mapped=no
13078 fi
13079 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13080 conftest.$ac_objext conftest.beam conftest.$ac_ext
13081 fi
13082
13083 fi
13084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13085 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
13086 if test $ac_cv_func_mmap_fixed_mapped = yes; then
13087
13088 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
13089
13090 fi
13091 rm -f conftest.mmap conftest.txt
13092
13093 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
13094 if test "x$ac_cv_type_pid_t" = xyes; then :
13095
13096 else
13097
13098 cat >>confdefs.h <<_ACEOF
13099 #define pid_t int
13100 _ACEOF
13101
13102 fi
13103
13104 for ac_header in vfork.h
13105 do :
13106 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13107 if test "x$ac_cv_header_vfork_h" = xyes; then :
13108 cat >>confdefs.h <<_ACEOF
13109 #define HAVE_VFORK_H 1
13110 _ACEOF
13111
13112 fi
13113
13114 done
13115
13116 for ac_func in fork vfork
13117 do :
13118 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13119 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13120 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13121 cat >>confdefs.h <<_ACEOF
13122 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13123 _ACEOF
13124
13125 fi
13126 done
13127
13128 if test "x$ac_cv_func_fork" = xyes; then
13129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13130 $as_echo_n "checking for working fork... " >&6; }
13131 if ${ac_cv_func_fork_works+:} false; then :
13132 $as_echo_n "(cached) " >&6
13133 else
13134 if test "$cross_compiling" = yes; then :
13135 ac_cv_func_fork_works=cross
13136 else
13137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13138 /* end confdefs.h. */
13139 $ac_includes_default
13140 int
13141 main ()
13142 {
13143
13144 /* By Ruediger Kuhlmann. */
13145 return fork () < 0;
13146
13147 ;
13148 return 0;
13149 }
13150 _ACEOF
13151 if ac_fn_c_try_run "$LINENO"; then :
13152 ac_cv_func_fork_works=yes
13153 else
13154 ac_cv_func_fork_works=no
13155 fi
13156 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13157 conftest.$ac_objext conftest.beam conftest.$ac_ext
13158 fi
13159
13160 fi
13161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13162 $as_echo "$ac_cv_func_fork_works" >&6; }
13163
13164 else
13165 ac_cv_func_fork_works=$ac_cv_func_fork
13166 fi
13167 if test "x$ac_cv_func_fork_works" = xcross; then
13168 case $host in
13169 *-*-amigaos* | *-*-msdosdjgpp*)
13170 # Override, as these systems have only a dummy fork() stub
13171 ac_cv_func_fork_works=no
13172 ;;
13173 *)
13174 ac_cv_func_fork_works=yes
13175 ;;
13176 esac
13177 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13178 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
13179 fi
13180 ac_cv_func_vfork_works=$ac_cv_func_vfork
13181 if test "x$ac_cv_func_vfork" = xyes; then
13182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13183 $as_echo_n "checking for working vfork... " >&6; }
13184 if ${ac_cv_func_vfork_works+:} false; then :
13185 $as_echo_n "(cached) " >&6
13186 else
13187 if test "$cross_compiling" = yes; then :
13188 ac_cv_func_vfork_works=cross
13189 else
13190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13191 /* end confdefs.h. */
13192 /* Thanks to Paul Eggert for this test. */
13193 $ac_includes_default
13194 #include <sys/wait.h>
13195 #ifdef HAVE_VFORK_H
13196 # include <vfork.h>
13197 #endif
13198 /* On some sparc systems, changes by the child to local and incoming
13199 argument registers are propagated back to the parent. The compiler
13200 is told about this with #include <vfork.h>, but some compilers
13201 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13202 static variable whose address is put into a register that is
13203 clobbered by the vfork. */
13204 static void
13205 #ifdef __cplusplus
13206 sparc_address_test (int arg)
13207 # else
13208 sparc_address_test (arg) int arg;
13209 #endif
13210 {
13211 static pid_t child;
13212 if (!child) {
13213 child = vfork ();
13214 if (child < 0) {
13215 perror ("vfork");
13216 _exit(2);
13217 }
13218 if (!child) {
13219 arg = getpid();
13220 write(-1, "", 0);
13221 _exit (arg);
13222 }
13223 }
13224 }
13225
13226 int
13227 main ()
13228 {
13229 pid_t parent = getpid ();
13230 pid_t child;
13231
13232 sparc_address_test (0);
13233
13234 child = vfork ();
13235
13236 if (child == 0) {
13237 /* Here is another test for sparc vfork register problems. This
13238 test uses lots of local variables, at least as many local
13239 variables as main has allocated so far including compiler
13240 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13241 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13242 reuse the register of parent for one of the local variables,
13243 since it will think that parent can't possibly be used any more
13244 in this routine. Assigning to the local variable will thus
13245 munge parent in the parent process. */
13246 pid_t
13247 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13248 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13249 /* Convince the compiler that p..p7 are live; otherwise, it might
13250 use the same hardware register for all 8 local variables. */
13251 if (p != p1 || p != p2 || p != p3 || p != p4
13252 || p != p5 || p != p6 || p != p7)
13253 _exit(1);
13254
13255 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13256 from child file descriptors. If the child closes a descriptor
13257 before it execs or exits, this munges the parent's descriptor
13258 as well. Test for this by closing stdout in the child. */
13259 _exit(close(fileno(stdout)) != 0);
13260 } else {
13261 int status;
13262 struct stat st;
13263
13264 while (wait(&status) != child)
13265 ;
13266 return (
13267 /* Was there some problem with vforking? */
13268 child < 0
13269
13270 /* Did the child fail? (This shouldn't happen.) */
13271 || status
13272
13273 /* Did the vfork/compiler bug occur? */
13274 || parent != getpid()
13275
13276 /* Did the file descriptor bug occur? */
13277 || fstat(fileno(stdout), &st) != 0
13278 );
13279 }
13280 }
13281 _ACEOF
13282 if ac_fn_c_try_run "$LINENO"; then :
13283 ac_cv_func_vfork_works=yes
13284 else
13285 ac_cv_func_vfork_works=no
13286 fi
13287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13288 conftest.$ac_objext conftest.beam conftest.$ac_ext
13289 fi
13290
13291 fi
13292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13293 $as_echo "$ac_cv_func_vfork_works" >&6; }
13294
13295 fi;
13296 if test "x$ac_cv_func_fork_works" = xcross; then
13297 ac_cv_func_vfork_works=$ac_cv_func_vfork
13298 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13299 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13300 fi
13301
13302 if test "x$ac_cv_func_vfork_works" = xyes; then
13303
13304 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13305
13306 else
13307
13308 $as_echo "#define vfork fork" >>confdefs.h
13309
13310 fi
13311 if test "x$ac_cv_func_fork_works" = xyes; then
13312
13313 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13314
13315 fi
13316
13317 for ac_func in getauxval getrusage getuid getgid \
13318 pipe poll pread pread64 pwrite resize_term \
13319 sbrk getpgid setpgid setpgrp setsid \
13320 sigaction sigprocmask sigsetmask socketpair \
13321 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
13322 setrlimit getrlimit posix_madvise waitpid \
13323 ptrace64 sigaltstack mkdtemp setns
13324 do :
13325 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13326 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13327 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13328 cat >>confdefs.h <<_ACEOF
13329 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13330 _ACEOF
13331
13332 fi
13333 done
13334
13335
13336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13337 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13338 if ${am_cv_langinfo_codeset+:} false; then :
13339 $as_echo_n "(cached) " >&6
13340 else
13341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13342 /* end confdefs.h. */
13343 #include <langinfo.h>
13344 int
13345 main ()
13346 {
13347 char* cs = nl_langinfo(CODESET);
13348 ;
13349 return 0;
13350 }
13351 _ACEOF
13352 if ac_fn_c_try_link "$LINENO"; then :
13353 am_cv_langinfo_codeset=yes
13354 else
13355 am_cv_langinfo_codeset=no
13356 fi
13357 rm -f core conftest.err conftest.$ac_objext \
13358 conftest$ac_exeext conftest.$ac_ext
13359
13360 fi
13361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13362 $as_echo "$am_cv_langinfo_codeset" >&6; }
13363 if test $am_cv_langinfo_codeset = yes; then
13364
13365 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13366
13367 fi
13368
13369 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13370 if test "x$ac_cv_type_size_t" = xyes; then :
13371
13372 else
13373
13374 cat >>confdefs.h <<_ACEOF
13375 #define size_t unsigned int
13376 _ACEOF
13377
13378 fi
13379
13380
13381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13382 $as_echo_n "checking for ANSI C header files... " >&6; }
13383 if ${ac_cv_header_stdc+:} false; then :
13384 $as_echo_n "(cached) " >&6
13385 else
13386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13387 /* end confdefs.h. */
13388 #include <stdlib.h>
13389 #include <stdarg.h>
13390 #include <string.h>
13391 #include <float.h>
13392
13393 int
13394 main ()
13395 {
13396
13397 ;
13398 return 0;
13399 }
13400 _ACEOF
13401 if ac_fn_c_try_compile "$LINENO"; then :
13402 ac_cv_header_stdc=yes
13403 else
13404 ac_cv_header_stdc=no
13405 fi
13406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13407
13408 if test $ac_cv_header_stdc = yes; then
13409 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13411 /* end confdefs.h. */
13412 #include <string.h>
13413
13414 _ACEOF
13415 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13416 $EGREP "memchr" >/dev/null 2>&1; then :
13417
13418 else
13419 ac_cv_header_stdc=no
13420 fi
13421 rm -f conftest*
13422
13423 fi
13424
13425 if test $ac_cv_header_stdc = yes; then
13426 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13428 /* end confdefs.h. */
13429 #include <stdlib.h>
13430
13431 _ACEOF
13432 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13433 $EGREP "free" >/dev/null 2>&1; then :
13434
13435 else
13436 ac_cv_header_stdc=no
13437 fi
13438 rm -f conftest*
13439
13440 fi
13441
13442 if test $ac_cv_header_stdc = yes; then
13443 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13444 if test "$cross_compiling" = yes; then :
13445 :
13446 else
13447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13448 /* end confdefs.h. */
13449 #include <ctype.h>
13450 #include <stdlib.h>
13451 #if ((' ' & 0x0FF) == 0x020)
13452 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13453 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13454 #else
13455 # define ISLOWER(c) \
13456 (('a' <= (c) && (c) <= 'i') \
13457 || ('j' <= (c) && (c) <= 'r') \
13458 || ('s' <= (c) && (c) <= 'z'))
13459 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13460 #endif
13461
13462 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13463 int
13464 main ()
13465 {
13466 int i;
13467 for (i = 0; i < 256; i++)
13468 if (XOR (islower (i), ISLOWER (i))
13469 || toupper (i) != TOUPPER (i))
13470 return 2;
13471 return 0;
13472 }
13473 _ACEOF
13474 if ac_fn_c_try_run "$LINENO"; then :
13475
13476 else
13477 ac_cv_header_stdc=no
13478 fi
13479 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13480 conftest.$ac_objext conftest.beam conftest.$ac_ext
13481 fi
13482
13483 fi
13484 fi
13485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13486 $as_echo "$ac_cv_header_stdc" >&6; }
13487 if test $ac_cv_header_stdc = yes; then
13488
13489 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
13490
13491 fi
13492
13493 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13494 # for constant arguments. Useless!
13495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13496 $as_echo_n "checking for working alloca.h... " >&6; }
13497 if ${ac_cv_working_alloca_h+:} false; then :
13498 $as_echo_n "(cached) " >&6
13499 else
13500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13501 /* end confdefs.h. */
13502 #include <alloca.h>
13503 int
13504 main ()
13505 {
13506 char *p = (char *) alloca (2 * sizeof (int));
13507 if (p) return 0;
13508 ;
13509 return 0;
13510 }
13511 _ACEOF
13512 if ac_fn_c_try_link "$LINENO"; then :
13513 ac_cv_working_alloca_h=yes
13514 else
13515 ac_cv_working_alloca_h=no
13516 fi
13517 rm -f core conftest.err conftest.$ac_objext \
13518 conftest$ac_exeext conftest.$ac_ext
13519 fi
13520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13521 $as_echo "$ac_cv_working_alloca_h" >&6; }
13522 if test $ac_cv_working_alloca_h = yes; then
13523
13524 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13525
13526 fi
13527
13528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13529 $as_echo_n "checking for alloca... " >&6; }
13530 if ${ac_cv_func_alloca_works+:} false; then :
13531 $as_echo_n "(cached) " >&6
13532 else
13533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13534 /* end confdefs.h. */
13535 #ifdef __GNUC__
13536 # define alloca __builtin_alloca
13537 #else
13538 # ifdef _MSC_VER
13539 # include <malloc.h>
13540 # define alloca _alloca
13541 # else
13542 # ifdef HAVE_ALLOCA_H
13543 # include <alloca.h>
13544 # else
13545 # ifdef _AIX
13546 #pragma alloca
13547 # else
13548 # ifndef alloca /* predefined by HP cc +Olibcalls */
13549 void *alloca (size_t);
13550 # endif
13551 # endif
13552 # endif
13553 # endif
13554 #endif
13555
13556 int
13557 main ()
13558 {
13559 char *p = (char *) alloca (1);
13560 if (p) return 0;
13561 ;
13562 return 0;
13563 }
13564 _ACEOF
13565 if ac_fn_c_try_link "$LINENO"; then :
13566 ac_cv_func_alloca_works=yes
13567 else
13568 ac_cv_func_alloca_works=no
13569 fi
13570 rm -f core conftest.err conftest.$ac_objext \
13571 conftest$ac_exeext conftest.$ac_ext
13572 fi
13573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13574 $as_echo "$ac_cv_func_alloca_works" >&6; }
13575
13576 if test $ac_cv_func_alloca_works = yes; then
13577
13578 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13579
13580 else
13581 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13582 # that cause trouble. Some versions do not even contain alloca or
13583 # contain a buggy version. If you still want to use their alloca,
13584 # use ar to extract alloca.o from them instead of compiling alloca.c.
13585
13586 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13587
13588 $as_echo "#define C_ALLOCA 1" >>confdefs.h
13589
13590
13591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13592 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13593 if ${ac_cv_os_cray+:} false; then :
13594 $as_echo_n "(cached) " >&6
13595 else
13596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13597 /* end confdefs.h. */
13598 #if defined CRAY && ! defined CRAY2
13599 webecray
13600 #else
13601 wenotbecray
13602 #endif
13603
13604 _ACEOF
13605 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13606 $EGREP "webecray" >/dev/null 2>&1; then :
13607 ac_cv_os_cray=yes
13608 else
13609 ac_cv_os_cray=no
13610 fi
13611 rm -f conftest*
13612
13613 fi
13614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13615 $as_echo "$ac_cv_os_cray" >&6; }
13616 if test $ac_cv_os_cray = yes; then
13617 for ac_func in _getb67 GETB67 getb67; do
13618 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13619 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13620 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13621
13622 cat >>confdefs.h <<_ACEOF
13623 #define CRAY_STACKSEG_END $ac_func
13624 _ACEOF
13625
13626 break
13627 fi
13628
13629 done
13630 fi
13631
13632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13633 $as_echo_n "checking stack direction for C alloca... " >&6; }
13634 if ${ac_cv_c_stack_direction+:} false; then :
13635 $as_echo_n "(cached) " >&6
13636 else
13637 if test "$cross_compiling" = yes; then :
13638 ac_cv_c_stack_direction=0
13639 else
13640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13641 /* end confdefs.h. */
13642 $ac_includes_default
13643 int
13644 find_stack_direction (int *addr, int depth)
13645 {
13646 int dir, dummy = 0;
13647 if (! addr)
13648 addr = &dummy;
13649 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13650 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13651 return dir + dummy;
13652 }
13653
13654 int
13655 main (int argc, char **argv)
13656 {
13657 return find_stack_direction (0, argc + !argv + 20) < 0;
13658 }
13659 _ACEOF
13660 if ac_fn_c_try_run "$LINENO"; then :
13661 ac_cv_c_stack_direction=1
13662 else
13663 ac_cv_c_stack_direction=-1
13664 fi
13665 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13666 conftest.$ac_objext conftest.beam conftest.$ac_ext
13667 fi
13668
13669 fi
13670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13671 $as_echo "$ac_cv_c_stack_direction" >&6; }
13672 cat >>confdefs.h <<_ACEOF
13673 #define STACK_DIRECTION $ac_cv_c_stack_direction
13674 _ACEOF
13675
13676
13677 fi
13678
13679
13680
13681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13682 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13683 if ${am_cv_langinfo_codeset+:} false; then :
13684 $as_echo_n "(cached) " >&6
13685 else
13686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13687 /* end confdefs.h. */
13688 #include <langinfo.h>
13689 int
13690 main ()
13691 {
13692 char* cs = nl_langinfo(CODESET);
13693 ;
13694 return 0;
13695 }
13696 _ACEOF
13697 if ac_fn_c_try_link "$LINENO"; then :
13698 am_cv_langinfo_codeset=yes
13699 else
13700 am_cv_langinfo_codeset=no
13701 fi
13702 rm -f core conftest.err conftest.$ac_objext \
13703 conftest$ac_exeext conftest.$ac_ext
13704
13705 fi
13706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13707 $as_echo "$am_cv_langinfo_codeset" >&6; }
13708 if test $am_cv_langinfo_codeset = yes; then
13709
13710 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13711
13712 fi
13713
13714
13715 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
13716 do :
13717 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13718 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13719 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13720 cat >>confdefs.h <<_ACEOF
13721 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13722 _ACEOF
13723
13724 fi
13725
13726 done
13727
13728
13729 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
13730 do :
13731 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13732 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13733 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13734 cat >>confdefs.h <<_ACEOF
13735 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13736 _ACEOF
13737
13738 fi
13739 done
13740
13741
13742 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
13743 if test "x$ac_cv_have_decl_strerror" = xyes; then :
13744 ac_have_decl=1
13745 else
13746 ac_have_decl=0
13747 fi
13748
13749 cat >>confdefs.h <<_ACEOF
13750 #define HAVE_DECL_STRERROR $ac_have_decl
13751 _ACEOF
13752 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13753 if test "x$ac_cv_have_decl_strstr" = xyes; then :
13754 ac_have_decl=1
13755 else
13756 ac_have_decl=0
13757 fi
13758
13759 cat >>confdefs.h <<_ACEOF
13760 #define HAVE_DECL_STRSTR $ac_have_decl
13761 _ACEOF
13762
13763
13764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13765 $as_echo_n "checking for sigsetjmp... " >&6; }
13766 if ${gdb_cv_func_sigsetjmp+:} false; then :
13767 $as_echo_n "(cached) " >&6
13768 else
13769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13770 /* end confdefs.h. */
13771
13772 #include <setjmp.h>
13773
13774 int
13775 main ()
13776 {
13777 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13778 ;
13779 return 0;
13780 }
13781 _ACEOF
13782 if ac_fn_c_try_compile "$LINENO"; then :
13783 gdb_cv_func_sigsetjmp=yes
13784 else
13785 gdb_cv_func_sigsetjmp=no
13786 fi
13787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13788 fi
13789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13790 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13791 if test $gdb_cv_func_sigsetjmp = yes; then
13792
13793 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13794
13795 fi
13796
13797
13798 # Check the return and argument types of ptrace.
13799
13800
13801 for ac_header in sys/ptrace.h ptrace.h
13802 do :
13803 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13804 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13805 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13806 cat >>confdefs.h <<_ACEOF
13807 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13808 _ACEOF
13809
13810 fi
13811
13812 done
13813
13814
13815 gdb_ptrace_headers='
13816 #include <sys/types.h>
13817 #if HAVE_SYS_PTRACE_H
13818 # include <sys/ptrace.h>
13819 #endif
13820 #if HAVE_UNISTD_H
13821 # include <unistd.h>
13822 #endif
13823 '
13824 # There is no point in checking if we don't have a prototype.
13825 ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
13826 "
13827 if test "x$ac_cv_have_decl_ptrace" = xyes; then :
13828 ac_have_decl=1
13829 else
13830 ac_have_decl=0
13831 fi
13832
13833 cat >>confdefs.h <<_ACEOF
13834 #define HAVE_DECL_PTRACE $ac_have_decl
13835 _ACEOF
13836 if test $ac_have_decl = 1; then :
13837
13838 else
13839
13840 : ${gdb_cv_func_ptrace_ret='int'}
13841 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13842
13843 fi
13844
13845 # Check return type. Varargs (used on GNU/Linux) conflict with the
13846 # empty argument list, so check for that explicitly.
13847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13848 $as_echo_n "checking return type of ptrace... " >&6; }
13849 if ${gdb_cv_func_ptrace_ret+:} false; then :
13850 $as_echo_n "(cached) " >&6
13851 else
13852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13853 /* end confdefs.h. */
13854 $gdb_ptrace_headers
13855 int
13856 main ()
13857 {
13858 extern long ptrace (enum __ptrace_request, ...);
13859 ;
13860 return 0;
13861 }
13862 _ACEOF
13863 if ac_fn_c_try_compile "$LINENO"; then :
13864 gdb_cv_func_ptrace_ret='long'
13865 else
13866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13867 /* end confdefs.h. */
13868 $gdb_ptrace_headers
13869 int
13870 main ()
13871 {
13872 extern int ptrace ();
13873 ;
13874 return 0;
13875 }
13876 _ACEOF
13877 if ac_fn_c_try_compile "$LINENO"; then :
13878 gdb_cv_func_ptrace_ret='int'
13879 else
13880 gdb_cv_func_ptrace_ret='long'
13881 fi
13882 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13883 fi
13884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13885 fi
13886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13887 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
13888
13889 cat >>confdefs.h <<_ACEOF
13890 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
13891 _ACEOF
13892
13893 # Check argument types.
13894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13895 $as_echo_n "checking types of arguments for ptrace... " >&6; }
13896 if ${gdb_cv_func_ptrace_args+:} false; then :
13897 $as_echo_n "(cached) " >&6
13898 else
13899
13900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13901 /* end confdefs.h. */
13902 $gdb_ptrace_headers
13903 int
13904 main ()
13905 {
13906 extern long ptrace (enum __ptrace_request, ...);
13907 ;
13908 return 0;
13909 }
13910 _ACEOF
13911 if ac_fn_c_try_compile "$LINENO"; then :
13912 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
13913 else
13914
13915 for gdb_arg1 in 'int' 'long'; do
13916 for gdb_arg2 in 'pid_t' 'int' 'long'; do
13917 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
13918 for gdb_arg4 in 'int' 'long' 'void *'; do
13919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13920 /* end confdefs.h. */
13921 $gdb_ptrace_headers
13922 int
13923 main ()
13924 {
13925
13926 extern $gdb_cv_func_ptrace_ret
13927 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13928
13929 ;
13930 return 0;
13931 }
13932 _ACEOF
13933 if ac_fn_c_try_compile "$LINENO"; then :
13934 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13935 break 4;
13936 fi
13937 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13938 for gdb_arg5 in 'int *' 'int' 'long'; do
13939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13940 /* end confdefs.h. */
13941 $gdb_ptrace_headers
13942 int
13943 main ()
13944 {
13945
13946 extern $gdb_cv_func_ptrace_ret
13947 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13948
13949 ;
13950 return 0;
13951 }
13952 _ACEOF
13953 if ac_fn_c_try_compile "$LINENO"; then :
13954
13955 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13956 break 5;
13957 fi
13958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13959 done
13960 done
13961 done
13962 done
13963 done
13964 # Provide a safe default value.
13965 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13966
13967 fi
13968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13969 fi
13970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13971 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
13972 ac_save_IFS=$IFS; IFS=','
13973 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13974 IFS=$ac_save_IFS
13975 shift
13976
13977 cat >>confdefs.h <<_ACEOF
13978 #define PTRACE_TYPE_ARG1 $1
13979 _ACEOF
13980
13981
13982 cat >>confdefs.h <<_ACEOF
13983 #define PTRACE_TYPE_ARG3 $3
13984 _ACEOF
13985
13986
13987 cat >>confdefs.h <<_ACEOF
13988 #define PTRACE_TYPE_ARG4 $4
13989 _ACEOF
13990
13991 if test -n "$5"; then
13992
13993 cat >>confdefs.h <<_ACEOF
13994 #define PTRACE_TYPE_ARG5 $5
13995 _ACEOF
13996
13997 fi
13998
13999
14000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14001 /* end confdefs.h. */
14002
14003 #include <sys/socket.h>
14004
14005 int
14006 main ()
14007 {
14008 int x = AF_LOCAL
14009 ;
14010 return 0;
14011 }
14012 _ACEOF
14013 if ac_fn_c_try_compile "$LINENO"; then :
14014
14015 $as_echo "#define HAVE_AF_LOCAL 1" >>confdefs.h
14016
14017 fi
14018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14019
14020
14021 if test "$cross_compiling" = no; then
14022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14023 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
14024 if ${ac_cv_func_setpgrp_void+:} false; then :
14025 $as_echo_n "(cached) " >&6
14026 else
14027 if test "$cross_compiling" = yes; then :
14028 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
14029 else
14030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14031 /* end confdefs.h. */
14032 $ac_includes_default
14033 int
14034 main ()
14035 {
14036 /* If this system has a BSD-style setpgrp which takes arguments,
14037 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
14038 exit successfully. */
14039 return setpgrp (1,1) != -1;
14040 ;
14041 return 0;
14042 }
14043 _ACEOF
14044 if ac_fn_c_try_run "$LINENO"; then :
14045 ac_cv_func_setpgrp_void=no
14046 else
14047 ac_cv_func_setpgrp_void=yes
14048 fi
14049 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14050 conftest.$ac_objext conftest.beam conftest.$ac_ext
14051 fi
14052
14053 fi
14054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14055 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
14056 if test $ac_cv_func_setpgrp_void = yes; then
14057
14058 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
14059
14060 fi
14061
14062 else
14063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14064 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
14065 if ${ac_cv_func_setpgrp_void+:} false; then :
14066 $as_echo_n "(cached) " >&6
14067 else
14068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14069 /* end confdefs.h. */
14070
14071 #include <unistd.h>
14072
14073 int
14074 main ()
14075 {
14076
14077 if (setpgrp(1,1) == -1)
14078 exit (0);
14079 else
14080 exit (1);
14081
14082 ;
14083 return 0;
14084 }
14085 _ACEOF
14086 if ac_fn_c_try_compile "$LINENO"; then :
14087 ac_cv_func_setpgrp_void=no
14088 else
14089 ac_cv_func_setpgrp_void=yes
14090 fi
14091 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14092 fi
14093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14094 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
14095 if test $ac_cv_func_setpgrp_void = yes; then
14096 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
14097
14098 fi
14099 fi
14100
14101 # Assume we'll default to using the included libiberty regex.
14102 gdb_use_included_regex=yes
14103
14104 # However, if the system regex is GNU regex, then default to *not*
14105 # using the included regex.
14106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
14107 $as_echo_n "checking for GNU regex... " >&6; }
14108 if ${gdb_cv_have_gnu_regex+:} false; then :
14109 $as_echo_n "(cached) " >&6
14110 else
14111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14112 /* end confdefs.h. */
14113 #include <gnu-versions.h>
14114 int
14115 main ()
14116 {
14117 #define REGEX_INTERFACE_VERSION 1
14118 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
14119 # error "Version mismatch"
14120 #endif
14121 ;
14122 return 0;
14123 }
14124 _ACEOF
14125 if ac_fn_c_try_compile "$LINENO"; then :
14126 gdb_cv_have_gnu_regex=yes
14127 else
14128 gdb_cv_have_gnu_regex=no
14129 fi
14130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14131 fi
14132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
14133 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
14134 if test $gdb_cv_have_gnu_regex = yes; then
14135 gdb_use_included_regex=no
14136 fi
14137
14138
14139 # Check whether --with-included-regex was given.
14140 if test "${with_included_regex+set}" = set; then :
14141 withval=$with_included_regex; gdb_with_regex=$withval
14142 else
14143 gdb_with_regex=$gdb_use_included_regex
14144 fi
14145
14146 if test "$gdb_with_regex" = yes; then
14147
14148 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
14149
14150 fi
14151
14152 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
14153 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
14154 #include <sys/proc.h>
14155
14156 "
14157 if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
14158
14159 cat >>confdefs.h <<_ACEOF
14160 #define HAVE_STRUCT_THREAD_TD_PCB 1
14161 _ACEOF
14162
14163
14164 fi
14165
14166
14167 # See if <sys/lwp.h> defines `struct lwp`.
14168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
14169 $as_echo_n "checking for struct lwp... " >&6; }
14170 if ${gdb_cv_struct_lwp+:} false; then :
14171 $as_echo_n "(cached) " >&6
14172 else
14173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14174 /* end confdefs.h. */
14175 #include <sys/param.h>
14176 #define _KMEMUSER
14177 #include <sys/lwp.h>
14178 int
14179 main ()
14180 {
14181 struct lwp l;
14182 ;
14183 return 0;
14184 }
14185 _ACEOF
14186 if ac_fn_c_try_compile "$LINENO"; then :
14187 gdb_cv_struct_lwp=yes
14188 else
14189 gdb_cv_struct_lwp=no
14190 fi
14191 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14192 fi
14193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
14194 $as_echo "$gdb_cv_struct_lwp" >&6; }
14195 if test $gdb_cv_struct_lwp = yes; then
14196
14197 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
14198
14199 fi
14200
14201 # See if <machine/reg.h> degines `struct reg'.
14202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
14203 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
14204 if ${gdb_cv_struct_reg+:} false; then :
14205 $as_echo_n "(cached) " >&6
14206 else
14207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14208 /* end confdefs.h. */
14209 #include <sys/types.h>
14210 #include <machine/reg.h>
14211 int
14212 main ()
14213 {
14214 struct reg r;
14215 ;
14216 return 0;
14217 }
14218 _ACEOF
14219 if ac_fn_c_try_compile "$LINENO"; then :
14220 gdb_cv_struct_reg=yes
14221 else
14222 gdb_cv_struct_reg=no
14223 fi
14224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14225 fi
14226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14227 $as_echo "$gdb_cv_struct_reg" >&6; }
14228 if test $gdb_cv_struct_reg = yes; then
14229
14230 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
14231
14232 fi
14233
14234 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14235 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
14236 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14237 #include <machine/reg.h>
14238 "
14239 if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
14240
14241 cat >>confdefs.h <<_ACEOF
14242 #define HAVE_STRUCT_REG_R_FS 1
14243 _ACEOF
14244
14245
14246 fi
14247 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14248 #include <machine/reg.h>
14249 "
14250 if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
14251
14252 cat >>confdefs.h <<_ACEOF
14253 #define HAVE_STRUCT_REG_R_GS 1
14254 _ACEOF
14255
14256
14257 fi
14258
14259
14260 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14261 # Older amd64 Linux's don't have the fs_base and gs_base members of
14262 # `struct user_regs_struct'.
14263 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>
14264 #include <sys/user.h>
14265 "
14266 if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
14267
14268 cat >>confdefs.h <<_ACEOF
14269 #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14270 _ACEOF
14271
14272
14273 fi
14274 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>
14275 #include <sys/user.h>
14276 "
14277 if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
14278
14279 cat >>confdefs.h <<_ACEOF
14280 #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14281 _ACEOF
14282
14283
14284 fi
14285
14286
14287 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
14288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14289 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
14290 if ${gdb_cv_have_ptrace_getregs+:} false; then :
14291 $as_echo_n "(cached) " >&6
14292 else
14293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14294 /* end confdefs.h. */
14295 #include <sys/ptrace.h>
14296 int
14297 main ()
14298 {
14299 PTRACE_GETREGS;
14300 ;
14301 return 0;
14302 }
14303 _ACEOF
14304 if ac_fn_c_try_compile "$LINENO"; then :
14305 gdb_cv_have_ptrace_getregs=yes
14306 else
14307 gdb_cv_have_ptrace_getregs=no
14308 fi
14309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14310 fi
14311
14312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14313 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
14314 if test $gdb_cv_have_ptrace_getregs = yes; then
14315
14316 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
14317
14318 fi
14319
14320 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
14321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14322 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
14323 if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
14324 $as_echo_n "(cached) " >&6
14325 else
14326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14327 /* end confdefs.h. */
14328 #include <sys/ptrace.h>
14329 int
14330 main ()
14331 {
14332 PTRACE_GETFPXREGS;
14333 ;
14334 return 0;
14335 }
14336 _ACEOF
14337 if ac_fn_c_try_compile "$LINENO"; then :
14338 gdb_cv_have_ptrace_getfpxregs=yes
14339 else
14340 gdb_cv_have_ptrace_getfpxregs=no
14341 fi
14342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14343 fi
14344
14345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14346 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
14347 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
14348
14349 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
14350
14351 fi
14352
14353 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
14354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14355 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
14356 if ${gdb_cv_have_pt_getdbregs+:} false; then :
14357 $as_echo_n "(cached) " >&6
14358 else
14359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14360 /* end confdefs.h. */
14361 #include <sys/types.h>
14362 #include <sys/ptrace.h>
14363 int
14364 main ()
14365 {
14366 PT_GETDBREGS;
14367 ;
14368 return 0;
14369 }
14370 _ACEOF
14371 if ac_fn_c_try_compile "$LINENO"; then :
14372 gdb_cv_have_pt_getdbregs=yes
14373 else
14374 gdb_cv_have_pt_getdbregs=no
14375 fi
14376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14377 fi
14378
14379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14380 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
14381 if test $gdb_cv_have_pt_getdbregs = yes; then
14382
14383 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
14384
14385 fi
14386
14387 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
14388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14389 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
14390 if ${gdb_cv_have_pt_getxmmregs+:} false; then :
14391 $as_echo_n "(cached) " >&6
14392 else
14393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14394 /* end confdefs.h. */
14395 #include <sys/types.h>
14396 #include <sys/ptrace.h>
14397 int
14398 main ()
14399 {
14400 PT_GETXMMREGS;
14401 ;
14402 return 0;
14403 }
14404 _ACEOF
14405 if ac_fn_c_try_compile "$LINENO"; then :
14406 gdb_cv_have_pt_getxmmregs=yes
14407 else
14408 gdb_cv_have_pt_getxmmregs=no
14409 fi
14410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14411 fi
14412
14413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14414 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
14415 if test $gdb_cv_have_pt_getxmmregs = yes; then
14416
14417 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
14418
14419 fi
14420
14421 # See if <sys/ptrace.h> supports LWP names on FreeBSD
14422 # Older FreeBSD versions don't have the pl_tdname member of
14423 # `struct ptrace_lwpinfo'.
14424 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14425 "
14426 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
14427
14428 cat >>confdefs.h <<_ACEOF
14429 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14430 _ACEOF
14431
14432
14433 fi
14434
14435
14436 # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
14437 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14438 # FreeBSD 10.3.
14439 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>
14440 "
14441 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
14442
14443 cat >>confdefs.h <<_ACEOF
14444 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14445 _ACEOF
14446
14447
14448 fi
14449
14450
14451 if test "$ac_cv_header_sys_procfs_h" = yes; then
14452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14453 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14454 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
14455 $as_echo_n "(cached) " >&6
14456 else
14457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14458 /* end confdefs.h. */
14459
14460 #define _SYSCALL32
14461 /* Needed for new procfs interface on sparc-solaris. */
14462 #define _STRUCTURED_PROC 1
14463 #include <sys/procfs.h>
14464 int
14465 main ()
14466 {
14467 gregset_t avar
14468 ;
14469 return 0;
14470 }
14471 _ACEOF
14472 if ac_fn_c_try_compile "$LINENO"; then :
14473 bfd_cv_have_sys_procfs_type_gregset_t=yes
14474 else
14475 bfd_cv_have_sys_procfs_type_gregset_t=no
14476
14477 fi
14478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14479 fi
14480
14481 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
14482
14483 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
14484
14485 fi
14486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14487 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14488
14489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14490 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14491 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
14492 $as_echo_n "(cached) " >&6
14493 else
14494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14495 /* end confdefs.h. */
14496
14497 #define _SYSCALL32
14498 /* Needed for new procfs interface on sparc-solaris. */
14499 #define _STRUCTURED_PROC 1
14500 #include <sys/procfs.h>
14501 int
14502 main ()
14503 {
14504 fpregset_t avar
14505 ;
14506 return 0;
14507 }
14508 _ACEOF
14509 if ac_fn_c_try_compile "$LINENO"; then :
14510 bfd_cv_have_sys_procfs_type_fpregset_t=yes
14511 else
14512 bfd_cv_have_sys_procfs_type_fpregset_t=no
14513
14514 fi
14515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14516 fi
14517
14518 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14519
14520 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14521
14522 fi
14523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14524 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14525
14526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14527 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14528 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14529 $as_echo_n "(cached) " >&6
14530 else
14531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14532 /* end confdefs.h. */
14533
14534 #define _SYSCALL32
14535 /* Needed for new procfs interface on sparc-solaris. */
14536 #define _STRUCTURED_PROC 1
14537 #include <sys/procfs.h>
14538 int
14539 main ()
14540 {
14541 prgregset_t avar
14542 ;
14543 return 0;
14544 }
14545 _ACEOF
14546 if ac_fn_c_try_compile "$LINENO"; then :
14547 bfd_cv_have_sys_procfs_type_prgregset_t=yes
14548 else
14549 bfd_cv_have_sys_procfs_type_prgregset_t=no
14550
14551 fi
14552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14553 fi
14554
14555 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
14556
14557 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14558
14559 fi
14560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14561 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
14562
14563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14564 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14565 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
14566 $as_echo_n "(cached) " >&6
14567 else
14568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14569 /* end confdefs.h. */
14570
14571 #define _SYSCALL32
14572 /* Needed for new procfs interface on sparc-solaris. */
14573 #define _STRUCTURED_PROC 1
14574 #include <sys/procfs.h>
14575 int
14576 main ()
14577 {
14578 prfpregset_t avar
14579 ;
14580 return 0;
14581 }
14582 _ACEOF
14583 if ac_fn_c_try_compile "$LINENO"; then :
14584 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
14585 else
14586 bfd_cv_have_sys_procfs_type_prfpregset_t=no
14587
14588 fi
14589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14590 fi
14591
14592 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14593
14594 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14595
14596 fi
14597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14598 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14599
14600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14601 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14602 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
14603 $as_echo_n "(cached) " >&6
14604 else
14605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14606 /* end confdefs.h. */
14607
14608 #define _SYSCALL32
14609 /* Needed for new procfs interface on sparc-solaris. */
14610 #define _STRUCTURED_PROC 1
14611 #include <sys/procfs.h>
14612 int
14613 main ()
14614 {
14615 prgregset32_t avar
14616 ;
14617 return 0;
14618 }
14619 _ACEOF
14620 if ac_fn_c_try_compile "$LINENO"; then :
14621 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
14622 else
14623 bfd_cv_have_sys_procfs_type_prgregset32_t=no
14624
14625 fi
14626 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14627 fi
14628
14629 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
14630
14631 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
14632
14633 fi
14634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14635 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
14636
14637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14638 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14639 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
14640 $as_echo_n "(cached) " >&6
14641 else
14642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14643 /* end confdefs.h. */
14644
14645 #define _SYSCALL32
14646 /* Needed for new procfs interface on sparc-solaris. */
14647 #define _STRUCTURED_PROC 1
14648 #include <sys/procfs.h>
14649 int
14650 main ()
14651 {
14652 lwpid_t avar
14653 ;
14654 return 0;
14655 }
14656 _ACEOF
14657 if ac_fn_c_try_compile "$LINENO"; then :
14658 bfd_cv_have_sys_procfs_type_lwpid_t=yes
14659 else
14660 bfd_cv_have_sys_procfs_type_lwpid_t=no
14661
14662 fi
14663 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14664 fi
14665
14666 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
14667
14668 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
14669
14670 fi
14671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14672 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
14673
14674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14675 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14676 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
14677 $as_echo_n "(cached) " >&6
14678 else
14679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14680 /* end confdefs.h. */
14681
14682 #define _SYSCALL32
14683 /* Needed for new procfs interface on sparc-solaris. */
14684 #define _STRUCTURED_PROC 1
14685 #include <sys/procfs.h>
14686 int
14687 main ()
14688 {
14689 psaddr_t avar
14690 ;
14691 return 0;
14692 }
14693 _ACEOF
14694 if ac_fn_c_try_compile "$LINENO"; then :
14695 bfd_cv_have_sys_procfs_type_psaddr_t=yes
14696 else
14697 bfd_cv_have_sys_procfs_type_psaddr_t=no
14698
14699 fi
14700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14701 fi
14702
14703 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
14704
14705 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
14706
14707 fi
14708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14709 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
14710
14711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14712 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14713 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
14714 $as_echo_n "(cached) " >&6
14715 else
14716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14717 /* end confdefs.h. */
14718
14719 #define _SYSCALL32
14720 /* Needed for new procfs interface on sparc-solaris. */
14721 #define _STRUCTURED_PROC 1
14722 #include <sys/procfs.h>
14723 int
14724 main ()
14725 {
14726 elf_fpregset_t avar
14727 ;
14728 return 0;
14729 }
14730 _ACEOF
14731 if ac_fn_c_try_compile "$LINENO"; then :
14732 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
14733 else
14734 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14735
14736 fi
14737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14738 fi
14739
14740 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
14741
14742 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
14743
14744 fi
14745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14746 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
14747
14748 fi
14749
14750 # Check if the compiler supports the `long long' type.
14751
14752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14753 $as_echo_n "checking for long long support in compiler... " >&6; }
14754 if ${gdb_cv_c_long_long+:} false; then :
14755 $as_echo_n "(cached) " >&6
14756 else
14757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14758 /* end confdefs.h. */
14759 extern long long foo;
14760 int
14761 main ()
14762 {
14763 switch (foo & 2) { case 0: return 1; }
14764 ;
14765 return 0;
14766 }
14767 _ACEOF
14768 if ac_fn_c_try_compile "$LINENO"; then :
14769 gdb_cv_c_long_long=yes
14770 else
14771 gdb_cv_c_long_long=no
14772 fi
14773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14774 fi
14775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14776 $as_echo "$gdb_cv_c_long_long" >&6; }
14777 if test $gdb_cv_c_long_long != yes; then
14778 # libdecnumber requires long long.
14779 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
14780 fi
14781
14782 # Check if the compiler and runtime support printing long longs.
14783
14784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14785 $as_echo_n "checking for long long support in printf... " >&6; }
14786 if ${gdb_cv_printf_has_long_long+:} false; then :
14787 $as_echo_n "(cached) " >&6
14788 else
14789 if test "$cross_compiling" = yes; then :
14790 gdb_cv_printf_has_long_long=no
14791 else
14792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14793 /* end confdefs.h. */
14794 $ac_includes_default
14795 int
14796 main ()
14797 {
14798 char buf[32];
14799 long long l = 0;
14800 l = (l << 16) + 0x0123;
14801 l = (l << 16) + 0x4567;
14802 l = (l << 16) + 0x89ab;
14803 l = (l << 16) + 0xcdef;
14804 sprintf (buf, "0x%016llx", l);
14805 return (strcmp ("0x0123456789abcdef", buf));
14806 ;
14807 return 0;
14808 }
14809 _ACEOF
14810 if ac_fn_c_try_run "$LINENO"; then :
14811 gdb_cv_printf_has_long_long=yes
14812 else
14813 gdb_cv_printf_has_long_long=no
14814 fi
14815 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14816 conftest.$ac_objext conftest.beam conftest.$ac_ext
14817 fi
14818
14819 fi
14820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14821 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
14822 if test $gdb_cv_printf_has_long_long = yes; then
14823
14824 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
14825
14826 fi
14827
14828 # Check if the compiler and runtime support printing decfloats.
14829
14830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14831 $as_echo_n "checking for decfloat support in printf... " >&6; }
14832 if ${gdb_cv_printf_has_decfloat+:} false; then :
14833 $as_echo_n "(cached) " >&6
14834 else
14835 if test "$cross_compiling" = yes; then :
14836 gdb_cv_printf_has_decfloat=no
14837 else
14838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14839 /* end confdefs.h. */
14840 $ac_includes_default
14841 int
14842 main ()
14843 {
14844 char buf[64];
14845 _Decimal32 d32 = 1.2345df;
14846 _Decimal64 d64 = 1.2345dd;
14847 _Decimal128 d128 = 1.2345dl;
14848 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14849 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14850 ;
14851 return 0;
14852 }
14853 _ACEOF
14854 if ac_fn_c_try_run "$LINENO"; then :
14855 gdb_cv_printf_has_decfloat=yes
14856 else
14857 gdb_cv_printf_has_decfloat=no
14858 fi
14859 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14860 conftest.$ac_objext conftest.beam conftest.$ac_ext
14861 fi
14862
14863 fi
14864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14865 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
14866 if test $gdb_cv_printf_has_decfloat = yes; then
14867
14868 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
14869
14870 fi
14871
14872 # Check if the compiler supports the `long double' type. We can't use
14873 # AC_C_LONG_DOUBLE because that one does additional checks on the
14874 # constants defined in <float.h> that fail on some systems,
14875 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
14876
14877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14878 $as_echo_n "checking for long double support in compiler... " >&6; }
14879 if ${gdb_cv_c_long_double+:} false; then :
14880 $as_echo_n "(cached) " >&6
14881 else
14882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14883 /* end confdefs.h. */
14884 long double foo;
14885 _ACEOF
14886 if ac_fn_c_try_compile "$LINENO"; then :
14887 gdb_cv_c_long_double=yes
14888 else
14889 gdb_cv_c_long_double=no
14890 fi
14891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14892 fi
14893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14894 $as_echo "$gdb_cv_c_long_double" >&6; }
14895 if test $gdb_cv_c_long_double = yes; then
14896
14897 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
14898
14899 fi
14900
14901 # Check if the compiler and runtime support printing long doubles.
14902
14903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14904 $as_echo_n "checking for long double support in printf... " >&6; }
14905 if ${gdb_cv_printf_has_long_double+:} false; then :
14906 $as_echo_n "(cached) " >&6
14907 else
14908 if test "$cross_compiling" = yes; then :
14909 gdb_cv_printf_has_long_double=no
14910 else
14911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14912 /* end confdefs.h. */
14913 $ac_includes_default
14914 int
14915 main ()
14916 {
14917 char buf[16];
14918 long double f = 3.141592653;
14919 sprintf (buf, "%Lg", f);
14920 return (strncmp ("3.14159", buf, 7));
14921 ;
14922 return 0;
14923 }
14924 _ACEOF
14925 if ac_fn_c_try_run "$LINENO"; then :
14926 gdb_cv_printf_has_long_double=yes
14927 else
14928 gdb_cv_printf_has_long_double=no
14929 fi
14930 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14931 conftest.$ac_objext conftest.beam conftest.$ac_ext
14932 fi
14933
14934 fi
14935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14936 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
14937 if test $gdb_cv_printf_has_long_double = yes; then
14938
14939 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
14940
14941 fi
14942
14943 # Check if the compiler and runtime support scanning long doubles.
14944
14945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14946 $as_echo_n "checking for long double support in scanf... " >&6; }
14947 if ${gdb_cv_scanf_has_long_double+:} false; then :
14948 $as_echo_n "(cached) " >&6
14949 else
14950 if test "$cross_compiling" = yes; then :
14951 gdb_cv_scanf_has_long_double=no
14952 else
14953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14954 /* end confdefs.h. */
14955 #include <stdio.h>
14956 int
14957 main ()
14958 {
14959 char *buf = "3.141592653";
14960 long double f = 0;
14961 sscanf (buf, "%Lg", &f);
14962 return !(f > 3.14159 && f < 3.14160);
14963 ;
14964 return 0;
14965 }
14966 _ACEOF
14967 if ac_fn_c_try_run "$LINENO"; then :
14968 gdb_cv_scanf_has_long_double=yes
14969 else
14970 gdb_cv_scanf_has_long_double=no
14971 fi
14972 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14973 conftest.$ac_objext conftest.beam conftest.$ac_ext
14974 fi
14975
14976 fi
14977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14978 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
14979 if test $gdb_cv_scanf_has_long_double = yes; then
14980
14981 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
14982
14983 fi
14984
14985 case ${host_os} in
14986 aix*)
14987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14988 $as_echo_n "checking for -bbigtoc option... " >&6; }
14989 if ${gdb_cv_bigtoc+:} false; then :
14990 $as_echo_n "(cached) " >&6
14991 else
14992
14993 SAVE_LDFLAGS=$LDFLAGS
14994
14995 case $GCC in
14996 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14997 *) gdb_cv_bigtoc=-bbigtoc ;;
14998 esac
14999
15000 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
15001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15002 /* end confdefs.h. */
15003
15004 int
15005 main ()
15006 {
15007 int i;
15008 ;
15009 return 0;
15010 }
15011 _ACEOF
15012 if ac_fn_c_try_link "$LINENO"; then :
15013
15014 else
15015 gdb_cv_bigtoc=
15016 fi
15017 rm -f core conftest.err conftest.$ac_objext \
15018 conftest$ac_exeext conftest.$ac_ext
15019 LDFLAGS="${SAVE_LDFLAGS}"
15020
15021 fi
15022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15023 $as_echo "$gdb_cv_bigtoc" >&6; }
15024 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15025 ;;
15026 esac
15027
15028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
15029 $as_echo_n "checking for the dynamic export flag... " >&6; }
15030 dynamic_list=false
15031 if test "${gdb_native}" = yes; then
15032 # The dynamically loaded libthread_db needs access to symbols in the gdb
15033 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15034 # may not be supported there.
15035 old_LDFLAGS="$LDFLAGS"
15036 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15037 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15038 LDFLAGS="$LDFLAGS $RDYNAMIC"
15039 if test "${have_libpython}" = no; then
15040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15041 /* end confdefs.h. */
15042
15043 int
15044 main ()
15045 {
15046
15047 ;
15048 return 0;
15049 }
15050 _ACEOF
15051 if ac_fn_c_try_link "$LINENO"; then :
15052 dynamic_list=true
15053 fi
15054 rm -f core conftest.err conftest.$ac_objext \
15055 conftest$ac_exeext conftest.$ac_ext
15056 else
15057 # Workaround http://bugs.python.org/issue4434 where static
15058 # libpythonX.Y.a would get its symbols required for
15059 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15060 # Problem does not happen for the recommended libpythonX.Y.so linkage.
15061
15062 # Note the workaround for Python
15063 # http://bugs.python.org/issue10112 earlier has removed
15064 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
15065 # here too, as otherwise it'd make this -Wl,--dynamic-list test
15066 # always pass.
15067 old_CFLAGS="$CFLAGS"
15068 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
15069 old_LIBS="$LIBS"
15070 LIBS="$LIBS $PYTHON_LIBS"
15071 old_CPPFLAGS="$CPPFLAGS"
15072 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
15073 if test "$cross_compiling" = yes; then :
15074 true
15075 else
15076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15077 /* end confdefs.h. */
15078 #include "Python.h"
15079 int
15080 main ()
15081 {
15082 int err;
15083 Py_Initialize ();
15084 err = PyRun_SimpleString ("import itertools\n");
15085 Py_Finalize ();
15086 return err == 0 ? 0 : 1;
15087 ;
15088 return 0;
15089 }
15090 _ACEOF
15091 if ac_fn_c_try_run "$LINENO"; then :
15092 dynamic_list=true
15093 fi
15094 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15095 conftest.$ac_objext conftest.beam conftest.$ac_ext
15096 fi
15097
15098 LIBS="$old_LIBS"
15099 CFLAGS="$old_CFLAGS"
15100 CPPFLAGS="$old_CPPFLAGS"
15101 fi
15102 LDFLAGS="$old_LDFLAGS"
15103 fi
15104 if $dynamic_list; then
15105 found="-Wl,--dynamic-list"
15106 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
15107 else
15108 found="-rdynamic"
15109 RDYNAMIC="-rdynamic"
15110 fi
15111
15112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
15113 $as_echo "$found" >&6; }
15114
15115
15116 if test ${build} = ${host} -a ${host} = ${target} ; then
15117 case ${host_os} in
15118 aix*)
15119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15120 $as_echo_n "checking for AiX thread debugging library... " >&6; }
15121 if ${gdb_cv_have_aix_thread_debug+:} false; then :
15122 $as_echo_n "(cached) " >&6
15123 else
15124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15125 /* end confdefs.h. */
15126 #include <sys/pthdebug.h>
15127 int
15128 main ()
15129 {
15130 #ifndef PTHDB_VERSION_3
15131 #error
15132 #endif
15133 ;
15134 return 0;
15135 }
15136 _ACEOF
15137 if ac_fn_c_try_compile "$LINENO"; then :
15138 gdb_cv_have_aix_thread_debug=yes
15139 else
15140 gdb_cv_have_aix_thread_debug=no
15141 fi
15142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15143 fi
15144
15145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15146 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
15147 if test $gdb_cv_have_aix_thread_debug = yes; then
15148 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
15149 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
15150 LIBS="$LIBS -lpthdebug"
15151
15152 # Older versions of AIX do not provide the declaration for
15153 # the getthrds function (it appears that it was introduced
15154 # with AIX 6.x).
15155 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15156 "
15157 if test "x$ac_cv_have_decl_getthrds" = xyes; then :
15158 ac_have_decl=1
15159 else
15160 ac_have_decl=0
15161 fi
15162
15163 cat >>confdefs.h <<_ACEOF
15164 #define HAVE_DECL_GETTHRDS $ac_have_decl
15165 _ACEOF
15166
15167 fi
15168 ;;
15169 esac
15170
15171 fi
15172
15173 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
15174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15175 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
15176 if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
15177 $as_echo_n "(cached) " >&6
15178 else
15179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15180 /* end confdefs.h. */
15181 #include <thread_db.h>
15182 int
15183 main ()
15184 {
15185 int i = TD_NOTALLOC;
15186 ;
15187 return 0;
15188 }
15189 _ACEOF
15190 if ac_fn_c_try_compile "$LINENO"; then :
15191 gdb_cv_thread_db_h_has_td_notalloc=yes
15192 else
15193 gdb_cv_thread_db_h_has_td_notalloc=no
15194
15195 fi
15196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15197
15198 fi
15199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15200 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15202 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
15203 if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
15204 $as_echo_n "(cached) " >&6
15205 else
15206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15207 /* end confdefs.h. */
15208 #include <thread_db.h>
15209 int
15210 main ()
15211 {
15212 int i = TD_VERSION;
15213 ;
15214 return 0;
15215 }
15216 _ACEOF
15217 if ac_fn_c_try_compile "$LINENO"; then :
15218 gdb_cv_thread_db_h_has_td_version=yes
15219 else
15220 gdb_cv_thread_db_h_has_td_version=no
15221
15222 fi
15223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15224
15225 fi
15226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15227 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15229 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
15230 if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
15231 $as_echo_n "(cached) " >&6
15232 else
15233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15234 /* end confdefs.h. */
15235 #include <thread_db.h>
15236 int
15237 main ()
15238 {
15239 int i = TD_NOTLS;
15240 ;
15241 return 0;
15242 }
15243 _ACEOF
15244 if ac_fn_c_try_compile "$LINENO"; then :
15245 gdb_cv_thread_db_h_has_td_notls=yes
15246 else
15247 gdb_cv_thread_db_h_has_td_notls=no
15248
15249 fi
15250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15251
15252 fi
15253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15254 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
15255 fi
15256 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
15257
15258 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
15259
15260 fi
15261 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15262
15263 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
15264
15265 fi
15266 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15267
15268 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
15269
15270 fi
15271
15272 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15273 "
15274 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
15275 ac_have_decl=1
15276 else
15277 ac_have_decl=0
15278 fi
15279
15280 cat >>confdefs.h <<_ACEOF
15281 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
15282 _ACEOF
15283
15284
15285 if test "$cross_compiling" = yes; then :
15286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15287 /* end confdefs.h. */
15288 #include <sys/personality.h>
15289 int
15290 main ()
15291 {
15292
15293 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
15294 # define ADDR_NO_RANDOMIZE 0x0040000
15295 # endif
15296 /* Test the flag could be set and stays set. */
15297 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15298 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15299 return 1
15300 ;
15301 return 0;
15302 }
15303 _ACEOF
15304 if ac_fn_c_try_link "$LINENO"; then :
15305 have_personality=true
15306 else
15307 have_personality=false
15308 fi
15309 rm -f core conftest.err conftest.$ac_objext \
15310 conftest$ac_exeext conftest.$ac_ext
15311 else
15312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15313 /* end confdefs.h. */
15314 #include <sys/personality.h>
15315 int
15316 main ()
15317 {
15318
15319 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
15320 # define ADDR_NO_RANDOMIZE 0x0040000
15321 # endif
15322 /* Test the flag could be set and stays set. */
15323 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15324 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15325 return 1
15326 ;
15327 return 0;
15328 }
15329 _ACEOF
15330 if ac_fn_c_try_run "$LINENO"; then :
15331 have_personality=true
15332 else
15333 have_personality=false
15334 fi
15335 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15336 conftest.$ac_objext conftest.beam conftest.$ac_ext
15337 fi
15338
15339 if $have_personality
15340 then
15341
15342 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
15343
15344 fi
15345
15346 case $host_os in
15347 go32* | *djgpp*)
15348 gdbinit=gdb.ini
15349 ;;
15350 *)
15351 gdbinit=.gdbinit
15352 ;;
15353 esac
15354
15355 cat >>confdefs.h <<_ACEOF
15356 #define GDBINIT "$gdbinit"
15357 _ACEOF
15358
15359
15360
15361 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15362 # except that the argument to --with-sysroot is optional.
15363 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15364 if test "x$with_sysroot" = xyes; then
15365 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15366 fi
15367
15368 # Check whether --with-sysroot was given.
15369 if test "${with_sysroot+set}" = set; then :
15370 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15371 else
15372 TARGET_SYSTEM_ROOT=
15373 fi
15374
15375
15376 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15377 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15378 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15379 ac_define_dir=`eval echo $ac_define_dir`
15380
15381 cat >>confdefs.h <<_ACEOF
15382 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
15383 _ACEOF
15384
15385
15386
15387
15388 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15389 if test "x$prefix" = xNONE; then
15390 test_prefix=/usr/local
15391 else
15392 test_prefix=$prefix
15393 fi
15394 else
15395 test_prefix=$exec_prefix
15396 fi
15397 value=0
15398 case ${ac_define_dir} in
15399 "${test_prefix}"|"${test_prefix}/"*|\
15400 '${exec_prefix}'|'${exec_prefix}/'*)
15401 value=1
15402 ;;
15403 esac
15404
15405 cat >>confdefs.h <<_ACEOF
15406 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15407 _ACEOF
15408
15409
15410
15411
15412
15413 # Check whether --with-system-gdbinit was given.
15414 if test "${with_system_gdbinit+set}" = set; then :
15415 withval=$with_system_gdbinit;
15416 SYSTEM_GDBINIT=$withval
15417 else
15418 SYSTEM_GDBINIT=
15419 fi
15420
15421
15422 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15423 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15424 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
15425 ac_define_dir=`eval echo $ac_define_dir`
15426
15427 cat >>confdefs.h <<_ACEOF
15428 #define SYSTEM_GDBINIT "$ac_define_dir"
15429 _ACEOF
15430
15431
15432
15433
15434 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15435 if test "x$prefix" = xNONE; then
15436 test_prefix=/usr/local
15437 else
15438 test_prefix=$prefix
15439 fi
15440 else
15441 test_prefix=$exec_prefix
15442 fi
15443 value=0
15444 case ${ac_define_dir} in
15445 "${test_prefix}"|"${test_prefix}/"*|\
15446 '${exec_prefix}'|'${exec_prefix}/'*)
15447 value=1
15448 ;;
15449 esac
15450
15451 cat >>confdefs.h <<_ACEOF
15452 #define SYSTEM_GDBINIT_RELOCATABLE $value
15453 _ACEOF
15454
15455
15456
15457
15458
15459 # Check whether --enable-werror was given.
15460 if test "${enable_werror+set}" = set; then :
15461 enableval=$enable_werror; case "${enableval}" in
15462 yes | y) ERROR_ON_WARNING="yes" ;;
15463 no | n) ERROR_ON_WARNING="no" ;;
15464 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
15465 esac
15466 fi
15467
15468
15469 # Enable -Werror by default when using gcc. Turn it off for releases.
15470 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
15471 ERROR_ON_WARNING=yes
15472 fi
15473
15474 WERROR_CFLAGS=""
15475 if test "${ERROR_ON_WARNING}" = yes ; then
15476 WERROR_CFLAGS="-Werror"
15477 fi
15478
15479 # The options we'll try to enable.
15480 build_warnings="-Wall -Wpointer-arith \
15481 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
15482 -Wno-switch -Wno-char-subscripts \
15483 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
15484 -Wno-sign-compare -Wno-error=maybe-uninitialized \
15485 -Wno-mismatched-tags \
15486 -Wno-error=deprecated-register \
15487 -Wsuggest-override \
15488 -Wimplicit-fallthrough=3 \
15489 -Wduplicated-cond \
15490 -Wshadow=local"
15491
15492 case "${host}" in
15493 *-*-mingw32*)
15494 # Enable -Wno-format by default when using gcc on mingw since many
15495 # GCC versions complain about %I64.
15496 build_warnings="$build_warnings -Wno-format" ;;
15497 *-*-solaris*)
15498 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15499 # doesn't understand.
15500 build_warnings="$build_warnings -Wno-unknown-pragmas"
15501 # Solaris 11 <unistd.h> marks vfork deprecated.
15502 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
15503 *)
15504 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
15505 # but there's a special case for this below.
15506 build_warnings="$build_warnings -Wformat-nonliteral" ;;
15507 esac
15508
15509 # Check whether --enable-build-warnings was given.
15510 if test "${enable_build_warnings+set}" = set; then :
15511 enableval=$enable_build_warnings; case "${enableval}" in
15512 yes) ;;
15513 no) build_warnings="-w";;
15514 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15515 build_warnings="${build_warnings} ${t}";;
15516 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15517 build_warnings="${t} ${build_warnings}";;
15518 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15519 esac
15520 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15521 echo "Setting compiler warning flags = $build_warnings" 6>&1
15522 fi
15523 fi
15524 # Check whether --enable-gdb-build-warnings was given.
15525 if test "${enable_gdb_build_warnings+set}" = set; then :
15526 enableval=$enable_gdb_build_warnings; case "${enableval}" in
15527 yes) ;;
15528 no) build_warnings="-w";;
15529 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15530 build_warnings="${build_warnings} ${t}";;
15531 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15532 build_warnings="${t} ${build_warnings}";;
15533 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15534 esac
15535 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15536 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15537 fi
15538 fi
15539
15540 # The set of warnings supported by a C++ compiler is not the same as
15541 # of the C compiler.
15542 ac_ext=cpp
15543 ac_cpp='$CXXCPP $CPPFLAGS'
15544 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15545 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15546 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15547
15548
15549 WARN_CFLAGS=""
15550 if test "x${build_warnings}" != x -a "x$GCC" = xyes
15551 then
15552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15553 $as_echo_n "checking compiler warning flags... " >&6; }
15554 # Separate out the -Werror flag as some files just cannot be
15555 # compiled with it enabled.
15556 for w in ${build_warnings}; do
15557 # GCC does not complain about -Wno-unknown-warning. Invert
15558 # and test -Wunknown-warning instead.
15559 case $w in
15560 -Wno-*)
15561 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
15562 -Wformat-nonliteral)
15563 # gcc requires -Wformat before -Wformat-nonliteral
15564 # will work, so stick them together.
15565 w="-Wformat $w"
15566 wtest="$w"
15567 ;;
15568 *)
15569 wtest=$w ;;
15570 esac
15571
15572 case $w in
15573 -Werr*) WERROR_CFLAGS=-Werror ;;
15574 *)
15575 # Check whether GCC accepts it.
15576 saved_CFLAGS="$CFLAGS"
15577 CFLAGS="$CFLAGS -Werror $wtest"
15578 saved_CXXFLAGS="$CXXFLAGS"
15579 CXXFLAGS="$CXXFLAGS -Werror $wtest"
15580 if test "x$w" = "x-Wunused-variable"; then
15581 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
15582 # fixed in GCC 4.9. This test is derived from the gdb
15583 # source code that triggered this bug in GCC.
15584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15585 /* end confdefs.h. */
15586 struct scoped_restore_base {};
15587 struct scoped_restore_tmpl : public scoped_restore_base {
15588 ~scoped_restore_tmpl() {}
15589 };
15590 int
15591 main ()
15592 {
15593 const scoped_restore_base &b = scoped_restore_tmpl();
15594 ;
15595 return 0;
15596 }
15597 _ACEOF
15598 if ac_fn_cxx_try_compile "$LINENO"; then :
15599 WARN_CFLAGS="${WARN_CFLAGS} $w"
15600 fi
15601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15602 else
15603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15604 /* end confdefs.h. */
15605
15606 int
15607 main ()
15608 {
15609
15610 ;
15611 return 0;
15612 }
15613 _ACEOF
15614 if ac_fn_cxx_try_compile "$LINENO"; then :
15615 WARN_CFLAGS="${WARN_CFLAGS} $w"
15616 fi
15617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15618 fi
15619 CFLAGS="$saved_CFLAGS"
15620 CXXFLAGS="$saved_CXXFLAGS"
15621 esac
15622 done
15623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15624 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
15625 fi
15626
15627
15628
15629 ac_ext=c
15630 ac_cpp='$CPP $CPPFLAGS'
15631 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15632 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15633 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15634
15635
15636
15637 # Check whether --enable-ubsan was given.
15638 if test "${enable_ubsan+set}" = set; then :
15639 enableval=$enable_ubsan;
15640 else
15641 enable_ubsan=no
15642 fi
15643
15644 if test "x$enable_ubsan" = xauto; then
15645 if $development; then
15646 enable_ubsan=yes
15647 fi
15648 fi
15649 ac_ext=cpp
15650 ac_cpp='$CXXCPP $CPPFLAGS'
15651 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15652 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15653 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15654
15655 if test "x$enable_ubsan" = xyes; then
15656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
15657 $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
15658 saved_CXXFLAGS="$CXXFLAGS"
15659 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15661 /* end confdefs.h. */
15662
15663 int
15664 main ()
15665 {
15666
15667 ;
15668 return 0;
15669 }
15670 _ACEOF
15671 if ac_fn_cxx_try_link "$LINENO"; then :
15672 enable_ubsan=yes
15673 else
15674 enable_ubsan=no
15675 fi
15676 rm -f core conftest.err conftest.$ac_objext \
15677 conftest$ac_exeext conftest.$ac_ext
15678 CXXFLAGS="$saved_CXXFLAGS"
15679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
15680 $as_echo "$enable_ubsan" >&6; }
15681 if test "x$enable_ubsan" = xyes; then
15682 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
15683 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
15684 fi
15685 fi
15686 ac_ext=c
15687 ac_cpp='$CPP $CPPFLAGS'
15688 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15689 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15690 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15691
15692
15693
15694 # In the Cygwin environment, we need some additional flags.
15695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15696 $as_echo_n "checking for cygwin... " >&6; }
15697 if ${gdb_cv_os_cygwin+:} false; then :
15698 $as_echo_n "(cached) " >&6
15699 else
15700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15701 /* end confdefs.h. */
15702
15703 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
15704 lose
15705 #endif
15706 _ACEOF
15707 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15708 $EGREP "^lose$" >/dev/null 2>&1; then :
15709 gdb_cv_os_cygwin=yes
15710 else
15711 gdb_cv_os_cygwin=no
15712 fi
15713 rm -f conftest*
15714
15715 fi
15716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15717 $as_echo "$gdb_cv_os_cygwin" >&6; }
15718
15719
15720 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
15721 case ${host} in
15722 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15723 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
15724 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
15725 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
15726 esac
15727
15728
15729 # libreadline needs libuser32.a in a cygwin environment
15730 WIN32LIBS=
15731 if test x$gdb_cv_os_cygwin = xyes; then
15732 WIN32LIBS="-luser32"
15733 case "${target}" in
15734 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15735 ;;
15736 esac
15737 fi
15738
15739 # The ser-tcp.c module requires sockets.
15740 case ${host} in
15741 *mingw32*)
15742
15743 $as_echo "#define USE_WIN32API 1" >>confdefs.h
15744
15745 WIN32LIBS="$WIN32LIBS -lws2_32"
15746 ;;
15747 esac
15748
15749
15750 # Add ELF support to GDB, but only if BFD includes ELF support.
15751
15752 OLD_CFLAGS=$CFLAGS
15753 OLD_LDFLAGS=$LDFLAGS
15754 OLD_LIBS=$LIBS
15755 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15756 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15757 # always want our bfd.
15758 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
15759 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15760 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
15761 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
15762 LIBS="-lbfd -liberty -lz $intl $LIBS"
15763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
15764 $as_echo_n "checking for ELF support in BFD... " >&6; }
15765 if ${gdb_cv_var_elf+:} false; then :
15766 $as_echo_n "(cached) " >&6
15767 else
15768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15769 /* end confdefs.h. */
15770 #include <stdlib.h>
15771 #include "bfd.h"
15772 #include "elf-bfd.h"
15773
15774 int
15775 main ()
15776 {
15777 return bfd_get_elf_phdr_upper_bound (NULL);
15778 ;
15779 return 0;
15780 }
15781 _ACEOF
15782 if ac_fn_c_try_link "$LINENO"; then :
15783 gdb_cv_var_elf=yes
15784 else
15785 gdb_cv_var_elf=no
15786 fi
15787 rm -f core conftest.err conftest.$ac_objext \
15788 conftest$ac_exeext conftest.$ac_ext
15789 fi
15790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15791 $as_echo "$gdb_cv_var_elf" >&6; }
15792 CFLAGS=$OLD_CFLAGS
15793 LDFLAGS=$OLD_LDFLAGS
15794 LIBS=$OLD_LIBS
15795 if test $gdb_cv_var_elf = yes; then
15796 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
15797
15798 $as_echo "#define HAVE_ELF 1" >>confdefs.h
15799
15800 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15801 if test "$plugins" = "yes"; then
15802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15803 $as_echo_n "checking for library containing dlopen... " >&6; }
15804 if ${ac_cv_search_dlopen+:} false; then :
15805 $as_echo_n "(cached) " >&6
15806 else
15807 ac_func_search_save_LIBS=$LIBS
15808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15809 /* end confdefs.h. */
15810
15811 /* Override any GCC internal prototype to avoid an error.
15812 Use char because int might match the return type of a GCC
15813 builtin and then its argument prototype would still apply. */
15814 #ifdef __cplusplus
15815 extern "C"
15816 #endif
15817 char dlopen ();
15818 int
15819 main ()
15820 {
15821 return dlopen ();
15822 ;
15823 return 0;
15824 }
15825 _ACEOF
15826 for ac_lib in '' dl; do
15827 if test -z "$ac_lib"; then
15828 ac_res="none required"
15829 else
15830 ac_res=-l$ac_lib
15831 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15832 fi
15833 if ac_fn_c_try_link "$LINENO"; then :
15834 ac_cv_search_dlopen=$ac_res
15835 fi
15836 rm -f core conftest.err conftest.$ac_objext \
15837 conftest$ac_exeext
15838 if ${ac_cv_search_dlopen+:} false; then :
15839 break
15840 fi
15841 done
15842 if ${ac_cv_search_dlopen+:} false; then :
15843
15844 else
15845 ac_cv_search_dlopen=no
15846 fi
15847 rm conftest.$ac_ext
15848 LIBS=$ac_func_search_save_LIBS
15849 fi
15850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15851 $as_echo "$ac_cv_search_dlopen" >&6; }
15852 ac_res=$ac_cv_search_dlopen
15853 if test "$ac_res" != no; then :
15854 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15855
15856 fi
15857
15858 fi
15859 fi
15860
15861 # Add macho support to GDB, but only if BFD includes it.
15862
15863 OLD_CFLAGS=$CFLAGS
15864 OLD_LDFLAGS=$LDFLAGS
15865 OLD_LIBS=$LIBS
15866 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15867 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15868 # always want our bfd.
15869 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
15870 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15871 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
15872 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
15873 LIBS="-lbfd -liberty -lz $intl $LIBS"
15874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15875 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
15876 if ${gdb_cv_var_macho+:} false; then :
15877 $as_echo_n "(cached) " >&6
15878 else
15879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15880 /* end confdefs.h. */
15881 #include <stdlib.h>
15882 #include "bfd.h"
15883 #include "mach-o.h"
15884
15885 int
15886 main ()
15887 {
15888 return bfd_mach_o_lookup_command (NULL, 0, NULL);
15889 ;
15890 return 0;
15891 }
15892 _ACEOF
15893 if ac_fn_c_try_link "$LINENO"; then :
15894 gdb_cv_var_macho=yes
15895 else
15896 gdb_cv_var_macho=no
15897 fi
15898 rm -f core conftest.err conftest.$ac_objext \
15899 conftest$ac_exeext conftest.$ac_ext
15900 fi
15901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15902 $as_echo "$gdb_cv_var_macho" >&6; }
15903 CFLAGS=$OLD_CFLAGS
15904 LDFLAGS=$OLD_LDFLAGS
15905 LIBS=$OLD_LIBS
15906 if test $gdb_cv_var_macho = yes; then
15907 CONFIG_OBS="$CONFIG_OBS machoread.o"
15908 fi
15909
15910 # Add any host-specific objects to GDB.
15911 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15912
15913 # If building on ELF, look for lzma support for embedded compressed debug info.
15914 if test $gdb_cv_var_elf = yes; then
15915
15916 # Check whether --with-lzma was given.
15917 if test "${with_lzma+set}" = set; then :
15918 withval=$with_lzma;
15919 else
15920 with_lzma=auto
15921 fi
15922
15923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15924 $as_echo_n "checking whether to use lzma... " >&6; }
15925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15926 $as_echo "$with_lzma" >&6; }
15927
15928 if test "${with_lzma}" != no; then
15929
15930
15931
15932
15933
15934
15935
15936
15937 use_additional=yes
15938
15939 acl_save_prefix="$prefix"
15940 prefix="$acl_final_prefix"
15941 acl_save_exec_prefix="$exec_prefix"
15942 exec_prefix="$acl_final_exec_prefix"
15943
15944 eval additional_includedir=\"$includedir\"
15945 eval additional_libdir=\"$libdir\"
15946
15947 exec_prefix="$acl_save_exec_prefix"
15948 prefix="$acl_save_prefix"
15949
15950
15951 # Check whether --with-liblzma-prefix was given.
15952 if test "${with_liblzma_prefix+set}" = set; then :
15953 withval=$with_liblzma_prefix;
15954 if test "X$withval" = "Xno"; then
15955 use_additional=no
15956 else
15957 if test "X$withval" = "X"; then
15958
15959 acl_save_prefix="$prefix"
15960 prefix="$acl_final_prefix"
15961 acl_save_exec_prefix="$exec_prefix"
15962 exec_prefix="$acl_final_exec_prefix"
15963
15964 eval additional_includedir=\"$includedir\"
15965 eval additional_libdir=\"$libdir\"
15966
15967 exec_prefix="$acl_save_exec_prefix"
15968 prefix="$acl_save_prefix"
15969
15970 else
15971 additional_includedir="$withval/include"
15972 additional_libdir="$withval/lib"
15973 fi
15974 fi
15975
15976 fi
15977
15978 LIBLZMA=
15979 LTLIBLZMA=
15980 INCLZMA=
15981 rpathdirs=
15982 ltrpathdirs=
15983 names_already_handled=
15984 names_next_round='lzma '
15985 while test -n "$names_next_round"; do
15986 names_this_round="$names_next_round"
15987 names_next_round=
15988 for name in $names_this_round; do
15989 already_handled=
15990 for n in $names_already_handled; do
15991 if test "$n" = "$name"; then
15992 already_handled=yes
15993 break
15994 fi
15995 done
15996 if test -z "$already_handled"; then
15997 names_already_handled="$names_already_handled $name"
15998 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15999 eval value=\"\$HAVE_LIB$uppername\"
16000 if test -n "$value"; then
16001 if test "$value" = yes; then
16002 eval value=\"\$LIB$uppername\"
16003 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
16004 eval value=\"\$LTLIB$uppername\"
16005 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
16006 else
16007 :
16008 fi
16009 else
16010 found_dir=
16011 found_la=
16012 found_so=
16013 found_a=
16014 if test $use_additional = yes; then
16015 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16016 found_dir="$additional_libdir"
16017 found_so="$additional_libdir/lib$name.$shlibext"
16018 if test -f "$additional_libdir/lib$name.la"; then
16019 found_la="$additional_libdir/lib$name.la"
16020 fi
16021 else
16022 if test -f "$additional_libdir/lib$name.$libext"; then
16023 found_dir="$additional_libdir"
16024 found_a="$additional_libdir/lib$name.$libext"
16025 if test -f "$additional_libdir/lib$name.la"; then
16026 found_la="$additional_libdir/lib$name.la"
16027 fi
16028 fi
16029 fi
16030 fi
16031 if test "X$found_dir" = "X"; then
16032 for x in $LDFLAGS $LTLIBLZMA; do
16033
16034 acl_save_prefix="$prefix"
16035 prefix="$acl_final_prefix"
16036 acl_save_exec_prefix="$exec_prefix"
16037 exec_prefix="$acl_final_exec_prefix"
16038 eval x=\"$x\"
16039 exec_prefix="$acl_save_exec_prefix"
16040 prefix="$acl_save_prefix"
16041
16042 case "$x" in
16043 -L*)
16044 dir=`echo "X$x" | sed -e 's/^X-L//'`
16045 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16046 found_dir="$dir"
16047 found_so="$dir/lib$name.$shlibext"
16048 if test -f "$dir/lib$name.la"; then
16049 found_la="$dir/lib$name.la"
16050 fi
16051 else
16052 if test -f "$dir/lib$name.$libext"; then
16053 found_dir="$dir"
16054 found_a="$dir/lib$name.$libext"
16055 if test -f "$dir/lib$name.la"; then
16056 found_la="$dir/lib$name.la"
16057 fi
16058 fi
16059 fi
16060 ;;
16061 esac
16062 if test "X$found_dir" != "X"; then
16063 break
16064 fi
16065 done
16066 fi
16067 if test "X$found_dir" != "X"; then
16068 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
16069 if test "X$found_so" != "X"; then
16070 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16071 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16072 else
16073 haveit=
16074 for x in $ltrpathdirs; do
16075 if test "X$x" = "X$found_dir"; then
16076 haveit=yes
16077 break
16078 fi
16079 done
16080 if test -z "$haveit"; then
16081 ltrpathdirs="$ltrpathdirs $found_dir"
16082 fi
16083 if test "$hardcode_direct" = yes; then
16084 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16085 else
16086 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16087 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16088 haveit=
16089 for x in $rpathdirs; do
16090 if test "X$x" = "X$found_dir"; then
16091 haveit=yes
16092 break
16093 fi
16094 done
16095 if test -z "$haveit"; then
16096 rpathdirs="$rpathdirs $found_dir"
16097 fi
16098 else
16099 haveit=
16100 for x in $LDFLAGS $LIBLZMA; do
16101
16102 acl_save_prefix="$prefix"
16103 prefix="$acl_final_prefix"
16104 acl_save_exec_prefix="$exec_prefix"
16105 exec_prefix="$acl_final_exec_prefix"
16106 eval x=\"$x\"
16107 exec_prefix="$acl_save_exec_prefix"
16108 prefix="$acl_save_prefix"
16109
16110 if test "X$x" = "X-L$found_dir"; then
16111 haveit=yes
16112 break
16113 fi
16114 done
16115 if test -z "$haveit"; then
16116 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16117 fi
16118 if test "$hardcode_minus_L" != no; then
16119 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16120 else
16121 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16122 fi
16123 fi
16124 fi
16125 fi
16126 else
16127 if test "X$found_a" != "X"; then
16128 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16129 else
16130 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16131 fi
16132 fi
16133 additional_includedir=
16134 case "$found_dir" in
16135 */lib | */lib/)
16136 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16137 additional_includedir="$basedir/include"
16138 ;;
16139 esac
16140 if test "X$additional_includedir" != "X"; then
16141 if test "X$additional_includedir" != "X/usr/include"; then
16142 haveit=
16143 if test "X$additional_includedir" = "X/usr/local/include"; then
16144 if test -n "$GCC"; then
16145 case $host_os in
16146 linux*) haveit=yes;;
16147 esac
16148 fi
16149 fi
16150 if test -z "$haveit"; then
16151 for x in $CPPFLAGS $INCLZMA; do
16152
16153 acl_save_prefix="$prefix"
16154 prefix="$acl_final_prefix"
16155 acl_save_exec_prefix="$exec_prefix"
16156 exec_prefix="$acl_final_exec_prefix"
16157 eval x=\"$x\"
16158 exec_prefix="$acl_save_exec_prefix"
16159 prefix="$acl_save_prefix"
16160
16161 if test "X$x" = "X-I$additional_includedir"; then
16162 haveit=yes
16163 break
16164 fi
16165 done
16166 if test -z "$haveit"; then
16167 if test -d "$additional_includedir"; then
16168 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16169 fi
16170 fi
16171 fi
16172 fi
16173 fi
16174 if test -n "$found_la"; then
16175 save_libdir="$libdir"
16176 case "$found_la" in
16177 */* | *\\*) . "$found_la" ;;
16178 *) . "./$found_la" ;;
16179 esac
16180 libdir="$save_libdir"
16181 for dep in $dependency_libs; do
16182 case "$dep" in
16183 -L*)
16184 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16185 if test "X$additional_libdir" != "X/usr/lib"; then
16186 haveit=
16187 if test "X$additional_libdir" = "X/usr/local/lib"; then
16188 if test -n "$GCC"; then
16189 case $host_os in
16190 linux*) haveit=yes;;
16191 esac
16192 fi
16193 fi
16194 if test -z "$haveit"; then
16195 haveit=
16196 for x in $LDFLAGS $LIBLZMA; do
16197
16198 acl_save_prefix="$prefix"
16199 prefix="$acl_final_prefix"
16200 acl_save_exec_prefix="$exec_prefix"
16201 exec_prefix="$acl_final_exec_prefix"
16202 eval x=\"$x\"
16203 exec_prefix="$acl_save_exec_prefix"
16204 prefix="$acl_save_prefix"
16205
16206 if test "X$x" = "X-L$additional_libdir"; then
16207 haveit=yes
16208 break
16209 fi
16210 done
16211 if test -z "$haveit"; then
16212 if test -d "$additional_libdir"; then
16213 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16214 fi
16215 fi
16216 haveit=
16217 for x in $LDFLAGS $LTLIBLZMA; do
16218
16219 acl_save_prefix="$prefix"
16220 prefix="$acl_final_prefix"
16221 acl_save_exec_prefix="$exec_prefix"
16222 exec_prefix="$acl_final_exec_prefix"
16223 eval x=\"$x\"
16224 exec_prefix="$acl_save_exec_prefix"
16225 prefix="$acl_save_prefix"
16226
16227 if test "X$x" = "X-L$additional_libdir"; then
16228 haveit=yes
16229 break
16230 fi
16231 done
16232 if test -z "$haveit"; then
16233 if test -d "$additional_libdir"; then
16234 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16235 fi
16236 fi
16237 fi
16238 fi
16239 ;;
16240 -R*)
16241 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16242 if test "$enable_rpath" != no; then
16243 haveit=
16244 for x in $rpathdirs; do
16245 if test "X$x" = "X$dir"; then
16246 haveit=yes
16247 break
16248 fi
16249 done
16250 if test -z "$haveit"; then
16251 rpathdirs="$rpathdirs $dir"
16252 fi
16253 haveit=
16254 for x in $ltrpathdirs; do
16255 if test "X$x" = "X$dir"; then
16256 haveit=yes
16257 break
16258 fi
16259 done
16260 if test -z "$haveit"; then
16261 ltrpathdirs="$ltrpathdirs $dir"
16262 fi
16263 fi
16264 ;;
16265 -l*)
16266 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16267 ;;
16268 *.la)
16269 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16270 ;;
16271 *)
16272 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16273 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16274 ;;
16275 esac
16276 done
16277 fi
16278 else
16279 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16280 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16281 fi
16282 fi
16283 fi
16284 done
16285 done
16286 if test "X$rpathdirs" != "X"; then
16287 if test -n "$hardcode_libdir_separator"; then
16288 alldirs=
16289 for found_dir in $rpathdirs; do
16290 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16291 done
16292 acl_save_libdir="$libdir"
16293 libdir="$alldirs"
16294 eval flag=\"$hardcode_libdir_flag_spec\"
16295 libdir="$acl_save_libdir"
16296 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16297 else
16298 for found_dir in $rpathdirs; do
16299 acl_save_libdir="$libdir"
16300 libdir="$found_dir"
16301 eval flag=\"$hardcode_libdir_flag_spec\"
16302 libdir="$acl_save_libdir"
16303 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16304 done
16305 fi
16306 fi
16307 if test "X$ltrpathdirs" != "X"; then
16308 for found_dir in $ltrpathdirs; do
16309 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16310 done
16311 fi
16312
16313
16314 ac_save_CPPFLAGS="$CPPFLAGS"
16315
16316 for element in $INCLZMA; do
16317 haveit=
16318 for x in $CPPFLAGS; do
16319
16320 acl_save_prefix="$prefix"
16321 prefix="$acl_final_prefix"
16322 acl_save_exec_prefix="$exec_prefix"
16323 exec_prefix="$acl_final_exec_prefix"
16324 eval x=\"$x\"
16325 exec_prefix="$acl_save_exec_prefix"
16326 prefix="$acl_save_prefix"
16327
16328 if test "X$x" = "X$element"; then
16329 haveit=yes
16330 break
16331 fi
16332 done
16333 if test -z "$haveit"; then
16334 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16335 fi
16336 done
16337
16338
16339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16340 $as_echo_n "checking for liblzma... " >&6; }
16341 if ${ac_cv_liblzma+:} false; then :
16342 $as_echo_n "(cached) " >&6
16343 else
16344
16345 ac_save_LIBS="$LIBS"
16346 LIBS="$LIBS $LIBLZMA"
16347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16348 /* end confdefs.h. */
16349 #include "lzma.h"
16350 int
16351 main ()
16352 {
16353 lzma_index_iter iter;
16354 lzma_index_iter_init (&iter, 0);
16355 lzma_mf_is_supported (LZMA_MF_HC3);
16356 ;
16357 return 0;
16358 }
16359 _ACEOF
16360 if ac_fn_c_try_link "$LINENO"; then :
16361 ac_cv_liblzma=yes
16362 else
16363 ac_cv_liblzma=no
16364 fi
16365 rm -f core conftest.err conftest.$ac_objext \
16366 conftest$ac_exeext conftest.$ac_ext
16367 LIBS="$ac_save_LIBS"
16368
16369 fi
16370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16371 $as_echo "$ac_cv_liblzma" >&6; }
16372 if test "$ac_cv_liblzma" = yes; then
16373 HAVE_LIBLZMA=yes
16374
16375 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16376
16377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16378 $as_echo_n "checking how to link with liblzma... " >&6; }
16379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16380 $as_echo "$LIBLZMA" >&6; }
16381 else
16382 HAVE_LIBLZMA=no
16383 CPPFLAGS="$ac_save_CPPFLAGS"
16384 LIBLZMA=
16385 LTLIBLZMA=
16386 fi
16387
16388
16389
16390
16391
16392
16393 if test "$HAVE_LIBLZMA" != yes; then
16394 if test "$with_lzma" = yes; then
16395 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
16396 fi
16397 fi
16398 fi
16399 fi
16400
16401 LIBGUI="../libgui/src/libgui.a"
16402 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16403
16404
16405
16406 WIN32LDAPP=
16407
16408
16409
16410 case "${host}" in
16411 *-*-cygwin* | *-*-mingw* )
16412 configdir="win"
16413 ;;
16414 *)
16415 configdir="unix"
16416 ;;
16417 esac
16418
16419 GDBTKLIBS=
16420 if test "${enable_gdbtk}" = "yes"; then
16421
16422 # Gdbtk must have an absolute path to srcdir in order to run
16423 # properly when not installed.
16424 here=`pwd`
16425 cd ${srcdir}
16426 GDBTK_SRC_DIR=`pwd`
16427 cd $here
16428
16429
16430 #
16431 # Ok, lets find the tcl configuration
16432 # First, look for one uninstalled.
16433 # the alternative search directory is invoked by --with-tcl
16434 #
16435
16436 if test x"${no_tcl}" = x ; then
16437 # we reset no_tcl in case something fails here
16438 no_tcl=true
16439
16440 # Check whether --with-tcl was given.
16441 if test "${with_tcl+set}" = set; then :
16442 withval=$with_tcl; with_tclconfig=${withval}
16443 fi
16444
16445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16446 $as_echo_n "checking for Tcl configuration... " >&6; }
16447 if ${ac_cv_c_tclconfig+:} false; then :
16448 $as_echo_n "(cached) " >&6
16449 else
16450
16451
16452 # First check to see if --with-tcl was specified.
16453 case "${host}" in
16454 *-*-cygwin*) platDir="win" ;;
16455 *) platDir="unix" ;;
16456 esac
16457 if test x"${with_tclconfig}" != x ; then
16458 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16459 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16460 else
16461 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
16462 fi
16463 fi
16464
16465 # then check for a private Tcl installation
16466 if test x"${ac_cv_c_tclconfig}" = x ; then
16467 for i in \
16468 ../tcl \
16469 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16470 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16471 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16472 ../../tcl \
16473 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16474 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16475 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16476 ../../../tcl \
16477 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16478 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16479 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16480 if test -f "$i/$platDir/tclConfig.sh" ; then
16481 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16482 break
16483 fi
16484 done
16485 fi
16486
16487 # on Darwin, check in Framework installation locations
16488 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16489 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16490 `ls -d /Library/Frameworks 2>/dev/null` \
16491 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16492 `ls -d /System/Library/Frameworks 2>/dev/null` \
16493 ; do
16494 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16495 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16496 break
16497 fi
16498 done
16499 fi
16500
16501 # check in a few common install locations
16502 if test x"${ac_cv_c_tclconfig}" = x ; then
16503 for i in `ls -d ${libdir} 2>/dev/null` \
16504 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16505 `ls -d ${prefix}/lib 2>/dev/null` \
16506 `ls -d /usr/local/lib 2>/dev/null` \
16507 `ls -d /usr/contrib/lib 2>/dev/null` \
16508 `ls -d /usr/lib 2>/dev/null` \
16509 ; do
16510 if test -f "$i/tclConfig.sh" ; then
16511 ac_cv_c_tclconfig=`(cd $i; pwd)`
16512 break
16513 fi
16514 done
16515 fi
16516
16517 # check in a few other private locations
16518 if test x"${ac_cv_c_tclconfig}" = x ; then
16519 for i in \
16520 ${srcdir}/../tcl \
16521 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16522 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16523 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16524 if test -f "$i/$platDir/tclConfig.sh" ; then
16525 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16526 break
16527 fi
16528 done
16529 fi
16530
16531 fi
16532
16533
16534 if test x"${ac_cv_c_tclconfig}" = x ; then
16535 TCL_BIN_DIR="# no Tcl configs found"
16536 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16537 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
16538 else
16539 no_tcl=
16540 TCL_BIN_DIR=${ac_cv_c_tclconfig}
16541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16542 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
16543 fi
16544 fi
16545
16546
16547 # If $no_tk is nonempty, then we can't do Tk, and there is no
16548 # point to doing Tcl.
16549
16550 #
16551 # Ok, lets find the tk configuration
16552 # First, look for one uninstalled.
16553 # the alternative search directory is invoked by --with-tk
16554 #
16555
16556 if test x"${no_tk}" = x ; then
16557 # we reset no_tk in case something fails here
16558 no_tk=true
16559
16560 # Check whether --with-tk was given.
16561 if test "${with_tk+set}" = set; then :
16562 withval=$with_tk; with_tkconfig=${withval}
16563 fi
16564
16565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16566 $as_echo_n "checking for Tk configuration... " >&6; }
16567 if ${ac_cv_c_tkconfig+:} false; then :
16568 $as_echo_n "(cached) " >&6
16569 else
16570
16571
16572 # First check to see if --with-tkconfig was specified.
16573 if test x"${with_tkconfig}" != x ; then
16574 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16575 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16576 else
16577 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
16578 fi
16579 fi
16580
16581 # then check for a private Tk library
16582 case "${host}" in
16583 *-*-cygwin*) platDir="win" ;;
16584 *) platDir="unix" ;;
16585 esac
16586 if test x"${ac_cv_c_tkconfig}" = x ; then
16587 for i in \
16588 ../tk \
16589 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16590 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16591 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16592 ../../tk \
16593 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16594 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16595 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16596 ../../../tk \
16597 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16598 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16599 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16600 if test -f "$i/$platDir/tkConfig.sh" ; then
16601 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16602 break
16603 fi
16604 done
16605 fi
16606
16607 # on Darwin, check in Framework installation locations
16608 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16609 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16610 `ls -d /Library/Frameworks 2>/dev/null` \
16611 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16612 `ls -d /System/Library/Frameworks 2>/dev/null` \
16613 ; do
16614 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16615 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16616 break
16617 fi
16618 done
16619 fi
16620
16621 # check in a few common install locations
16622 if test x"${ac_cv_c_tkconfig}" = x ; then
16623 for i in `ls -d ${libdir} 2>/dev/null` \
16624 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16625 `ls -d ${prefix}/lib 2>/dev/null` \
16626 `ls -d /usr/local/lib 2>/dev/null` \
16627 `ls -d /usr/contrib/lib 2>/dev/null` \
16628 `ls -d /usr/lib 2>/dev/null` \
16629 ; do
16630 if test -f "$i/tkConfig.sh" ; then
16631 ac_cv_c_tkconfig=`(cd $i; pwd)`
16632 break
16633 fi
16634 done
16635 fi
16636 # check in a few other private locations
16637 if test x"${ac_cv_c_tkconfig}" = x ; then
16638 for i in \
16639 ${srcdir}/../tk \
16640 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16641 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16642 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16643 if test -f "$i/$platDir/tkConfig.sh" ; then
16644 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16645 break
16646 fi
16647 done
16648 fi
16649
16650 fi
16651
16652
16653 if test x"${ac_cv_c_tkconfig}" = x ; then
16654 TK_BIN_DIR="# no Tk configs found"
16655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16656 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
16657 else
16658 no_tk=
16659 TK_BIN_DIR=${ac_cv_c_tkconfig}
16660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16661 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
16662 fi
16663 fi
16664
16665
16666 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16667
16668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16669 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
16670
16671 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
16672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16673 $as_echo "loading" >&6; }
16674 . ${TCL_BIN_DIR}/tclConfig.sh
16675 else
16676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16677 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
16678 fi
16679
16680 # eval is required to do the TCL_DBGX substitution
16681 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16682 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16683
16684 # If the TCL_BIN_DIR is the build directory (not the install directory),
16685 # then set the common variable name to the value of the build variables.
16686 # For example, the variable TCL_LIB_SPEC will be set to the value
16687 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16688 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16689 # installed and uninstalled version of Tcl.
16690 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16691 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16692 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16693 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16694 elif test "`uname -s`" = "Darwin"; then
16695 # If Tcl was built as a framework, attempt to use the libraries
16696 # from the framework at the given location so that linking works
16697 # against Tcl.framework installed in an arbitrary location.
16698 case ${TCL_DEFS} in
16699 *TCL_FRAMEWORK*)
16700 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16701 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16702 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16703 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16704 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16705 break
16706 fi
16707 done
16708 fi
16709 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16710 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16711 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16712 fi
16713 ;;
16714 esac
16715 fi
16716
16717 # eval is required to do the TCL_DBGX substitution
16718 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16719 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16720 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16721 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737 # Check for in-tree tcl
16738 here=`pwd`
16739 cd ${srcdir}/..
16740 topdir=`pwd`
16741 cd ${here}
16742
16743 intree="no"
16744 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16745 intree="yes"
16746 fi
16747
16748 # Find Tcl private headers
16749 if test x"${intree}" = xno; then
16750
16751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16752 $as_echo_n "checking for Tcl private headers... " >&6; }
16753 private_dir=""
16754 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16755 if test -f ${dir}/tclInt.h ; then
16756 private_dir=${dir}
16757 fi
16758
16759 if test x"${private_dir}" = x; then
16760 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
16761 else
16762 TCL_PRIVATE_INCLUDE="-I${private_dir}"
16763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16764 $as_echo "${private_dir}" >&6; }
16765 fi
16766
16767 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16768 TCL_LIBRARY="${TCL_LIB_SPEC}"
16769 TCL_DEPS=""
16770 else
16771 # If building tcl in the same src tree, private headers
16772 # are not needed, but we need to be sure to use the right
16773 # headers library
16774 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16775 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16776 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16777 fi
16778
16779
16780
16781
16782
16783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16784 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
16785
16786 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
16787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16788 $as_echo "loading" >&6; }
16789 . ${TK_BIN_DIR}/tkConfig.sh
16790 else
16791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16792 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
16793 fi
16794
16795 # eval is required to do the TK_DBGX substitution
16796 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16797 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16798
16799 # If the TK_BIN_DIR is the build directory (not the install directory),
16800 # then set the common variable name to the value of the build variables.
16801 # For example, the variable TK_LIB_SPEC will be set to the value
16802 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16803 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16804 # installed and uninstalled version of Tcl.
16805 if test -f "${TK_BIN_DIR}/Makefile" ; then
16806 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16807 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16808 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16809 elif test "`uname -s`" = "Darwin"; then
16810 # If Tk was built as a framework, attempt to use the libraries
16811 # from the framework at the given location so that linking works
16812 # against Tk.framework installed in an arbitrary location.
16813 case ${TK_DEFS} in
16814 *TK_FRAMEWORK*)
16815 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
16816 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16817 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16818 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16819 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16820 break
16821 fi
16822 done
16823 fi
16824 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
16825 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16826 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16827 fi
16828 ;;
16829 esac
16830 fi
16831
16832 # eval is required to do the TK_DBGX substitution
16833 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16834 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16835 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16836 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851 # Check for in-tree Tk
16852 intree="no"
16853 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16854 intree="yes"
16855 fi
16856
16857 # Find Tk private headers
16858 if test x"${intree}" = xno; then
16859
16860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16861 $as_echo_n "checking for Tk private headers... " >&6; }
16862 private_dir=""
16863 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16864 if test -f ${dir}/tkInt.h; then
16865 private_dir=${dir}
16866 fi
16867
16868 if test x"${private_dir}" = x; then
16869 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
16870 else
16871 TK_PRIVATE_INCLUDE="-I${private_dir}"
16872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16873 $as_echo "${private_dir}" >&6; }
16874 fi
16875
16876 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16877 TK_LIBRARY=${TK_LIB_SPEC}
16878 TK_DEPS=""
16879 else
16880 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16881 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16882 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16883 fi
16884
16885
16886
16887
16888
16889 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
16890
16891 # Include some libraries that Tcl and Tk want.
16892 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16893 # Yes, the ordering seems wrong here. But it isn't.
16894 # TK_LIBS is the list of libraries that need to be linked
16895 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16896 # were in LIBS then any link tests after this point would
16897 # try to include things like `$(LIBGUI)', which wouldn't work.
16898 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
16899
16900 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16901 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16902 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16903 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16904 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16905 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16906 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
16907
16908 if test x$gdb_cv_os_cygwin = xyes; then
16909 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16910 WIN32LDAPP="-Wl,--subsystem,console"
16911 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
16912 fi
16913
16914 subdirs="$subdirs gdbtk"
16915
16916 fi
16917 fi
16918
16919
16920
16921
16922
16923
16924
16925
16926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16927 $as_echo_n "checking for X... " >&6; }
16928
16929
16930 # Check whether --with-x was given.
16931 if test "${with_x+set}" = set; then :
16932 withval=$with_x;
16933 fi
16934
16935 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16936 if test "x$with_x" = xno; then
16937 # The user explicitly disabled X.
16938 have_x=disabled
16939 else
16940 case $x_includes,$x_libraries in #(
16941 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
16942 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
16943 $as_echo_n "(cached) " >&6
16944 else
16945 # One or both of the vars are not set, and there is no cached value.
16946 ac_x_includes=no ac_x_libraries=no
16947 rm -f -r conftest.dir
16948 if mkdir conftest.dir; then
16949 cd conftest.dir
16950 cat >Imakefile <<'_ACEOF'
16951 incroot:
16952 @echo incroot='${INCROOT}'
16953 usrlibdir:
16954 @echo usrlibdir='${USRLIBDIR}'
16955 libdir:
16956 @echo libdir='${LIBDIR}'
16957 _ACEOF
16958 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
16959 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
16960 for ac_var in incroot usrlibdir libdir; do
16961 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16962 done
16963 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
16964 for ac_extension in a so sl dylib la dll; do
16965 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16966 test -f "$ac_im_libdir/libX11.$ac_extension"; then
16967 ac_im_usrlibdir=$ac_im_libdir; break
16968 fi
16969 done
16970 # Screen out bogus values from the imake configuration. They are
16971 # bogus both because they are the default anyway, and because
16972 # using them would break gcc on systems where it needs fixed includes.
16973 case $ac_im_incroot in
16974 /usr/include) ac_x_includes= ;;
16975 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
16976 esac
16977 case $ac_im_usrlibdir in
16978 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
16979 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
16980 esac
16981 fi
16982 cd ..
16983 rm -f -r conftest.dir
16984 fi
16985
16986 # Standard set of common directories for X headers.
16987 # Check X11 before X11Rn because it is often a symlink to the current release.
16988 ac_x_header_dirs='
16989 /usr/X11/include
16990 /usr/X11R7/include
16991 /usr/X11R6/include
16992 /usr/X11R5/include
16993 /usr/X11R4/include
16994
16995 /usr/include/X11
16996 /usr/include/X11R7
16997 /usr/include/X11R6
16998 /usr/include/X11R5
16999 /usr/include/X11R4
17000
17001 /usr/local/X11/include
17002 /usr/local/X11R7/include
17003 /usr/local/X11R6/include
17004 /usr/local/X11R5/include
17005 /usr/local/X11R4/include
17006
17007 /usr/local/include/X11
17008 /usr/local/include/X11R7
17009 /usr/local/include/X11R6
17010 /usr/local/include/X11R5
17011 /usr/local/include/X11R4
17012
17013 /usr/X386/include
17014 /usr/x386/include
17015 /usr/XFree86/include/X11
17016
17017 /usr/include
17018 /usr/local/include
17019 /usr/unsupported/include
17020 /usr/athena/include
17021 /usr/local/x11r5/include
17022 /usr/lpp/Xamples/include
17023
17024 /usr/openwin/include
17025 /usr/openwin/share/include'
17026
17027 if test "$ac_x_includes" = no; then
17028 # Guess where to find include files, by looking for Xlib.h.
17029 # First, try using that file with no special directory specified.
17030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17031 /* end confdefs.h. */
17032 #include <X11/Xlib.h>
17033 _ACEOF
17034 if ac_fn_c_try_cpp "$LINENO"; then :
17035 # We can compile using X headers with no special include directory.
17036 ac_x_includes=
17037 else
17038 for ac_dir in $ac_x_header_dirs; do
17039 if test -r "$ac_dir/X11/Xlib.h"; then
17040 ac_x_includes=$ac_dir
17041 break
17042 fi
17043 done
17044 fi
17045 rm -f conftest.err conftest.i conftest.$ac_ext
17046 fi # $ac_x_includes = no
17047
17048 if test "$ac_x_libraries" = no; then
17049 # Check for the libraries.
17050 # See if we find them without any special options.
17051 # Don't add to $LIBS permanently.
17052 ac_save_LIBS=$LIBS
17053 LIBS="-lX11 $LIBS"
17054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17055 /* end confdefs.h. */
17056 #include <X11/Xlib.h>
17057 int
17058 main ()
17059 {
17060 XrmInitialize ()
17061 ;
17062 return 0;
17063 }
17064 _ACEOF
17065 if ac_fn_c_try_link "$LINENO"; then :
17066 LIBS=$ac_save_LIBS
17067 # We can link X programs with no special library path.
17068 ac_x_libraries=
17069 else
17070 LIBS=$ac_save_LIBS
17071 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
17072 do
17073 # Don't even attempt the hair of trying to link an X program!
17074 for ac_extension in a so sl dylib la dll; do
17075 if test -r "$ac_dir/libX11.$ac_extension"; then
17076 ac_x_libraries=$ac_dir
17077 break 2
17078 fi
17079 done
17080 done
17081 fi
17082 rm -f core conftest.err conftest.$ac_objext \
17083 conftest$ac_exeext conftest.$ac_ext
17084 fi # $ac_x_libraries = no
17085
17086 case $ac_x_includes,$ac_x_libraries in #(
17087 no,* | *,no | *\'*)
17088 # Didn't find X, or a directory has "'" in its name.
17089 ac_cv_have_x="have_x=no";; #(
17090 *)
17091 # Record where we found X for the cache.
17092 ac_cv_have_x="have_x=yes\
17093 ac_x_includes='$ac_x_includes'\
17094 ac_x_libraries='$ac_x_libraries'"
17095 esac
17096 fi
17097 ;; #(
17098 *) have_x=yes;;
17099 esac
17100 eval "$ac_cv_have_x"
17101 fi # $with_x != no
17102
17103 if test "$have_x" != yes; then
17104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17105 $as_echo "$have_x" >&6; }
17106 no_x=yes
17107 else
17108 # If each of the values was on the command line, it overrides each guess.
17109 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17110 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17111 # Update the cache value to reflect the command line values.
17112 ac_cv_have_x="have_x=yes\
17113 ac_x_includes='$x_includes'\
17114 ac_x_libraries='$x_libraries'"
17115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17116 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
17117 fi
17118
17119
17120 # Unlike the sim directory, whether a simulator is linked is controlled by
17121 # presence of a gdb_sim definition in the target configure.tgt entry.
17122 # This code just checks for a few cases where we'd like to ignore those
17123 # definitions, even when they're present in the '.mt' file. These cases
17124 # are when --disable-sim is specified, or if the simulator directory is
17125 # not part of the source tree.
17126 #
17127 # Check whether --enable-sim was given.
17128 if test "${enable_sim+set}" = set; then :
17129 enableval=$enable_sim; echo "enable_sim = $enable_sim";
17130 echo "enableval = ${enableval}";
17131 case "${enableval}" in
17132 yes) ignore_sim=false ;;
17133 no) ignore_sim=true ;;
17134 *) ignore_sim=false ;;
17135 esac
17136 else
17137 ignore_sim=false
17138 fi
17139
17140
17141 if test ! -d "${srcdir}/../sim"; then
17142 ignore_sim=true
17143 fi
17144
17145 SIM=
17146 SIM_OBS=
17147 if test "${ignore_sim}" = "false"; then
17148 if test x"${gdb_sim}" != x ; then
17149 SIM="${gdb_sim}"
17150 SIM_OBS="remote-sim.o"
17151
17152 $as_echo "#define WITH_SIM 1" >>confdefs.h
17153
17154
17155 # Some tdep code should only be compiled in when the ppc sim is
17156 # built. PR sim/13418.
17157 case $target in
17158 powerpc*-*-*)
17159
17160 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17161
17162 ;;
17163 esac
17164 fi
17165 fi
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180 # List of host floatformats.
17181
17182 cat >>confdefs.h <<_ACEOF
17183 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
17184 _ACEOF
17185
17186
17187 cat >>confdefs.h <<_ACEOF
17188 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
17189 _ACEOF
17190
17191
17192 cat >>confdefs.h <<_ACEOF
17193 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
17194 _ACEOF
17195
17196
17197 # target_subdir is used by the testsuite to find the target libraries.
17198 target_subdir=
17199 if test "${host}" != "${target}"; then
17200 target_subdir="${target_alias}/"
17201 fi
17202
17203
17204 # Import nat definitions.
17205 nat_makefile_frag=/dev/null
17206 if test "${gdb_native}" = "yes"; then
17207 . ${srcdir}/configure.nat
17208 nativefile=$NAT_FILE
17209 fi
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221 if test x"${gdb_osabi}" != x ; then
17222
17223 cat >>confdefs.h <<_ACEOF
17224 #define GDB_OSABI_DEFAULT $gdb_osabi
17225 _ACEOF
17226
17227 fi
17228
17229 # Check whether --enable-gdbserver was given.
17230 if test "${enable_gdbserver+set}" = set; then :
17231 enableval=$enable_gdbserver; case "${enableval}" in
17232 yes| no|auto) ;;
17233 *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
17234 esac
17235 else
17236 enable_gdbserver=auto
17237 fi
17238
17239
17240 # We only build gdbserver automatically in a native configuration, and
17241 # only if the user did not explicitly disable its build.
17242 if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
17243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17244 $as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
17245 if test "x$build_gdbserver" = xyes; then
17246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17247 $as_echo "yes" >&6; }
17248 subdirs="$subdirs gdbserver"
17249
17250 gdbserver_build_enabled=yes
17251 else
17252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17253 $as_echo "no" >&6; }
17254 fi
17255 fi
17256
17257 # If the user explicitly request the gdbserver to be built, verify that
17258 # we were in fact able to enable it.
17259 if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
17260 as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
17261 fi
17262
17263 # Check for babeltrace and babeltrace-ctf
17264
17265 # Check whether --with-babeltrace was given.
17266 if test "${with_babeltrace+set}" = set; then :
17267 withval=$with_babeltrace;
17268 else
17269 with_babeltrace=auto
17270 fi
17271
17272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17273 $as_echo_n "checking whether to use babeltrace... " >&6; }
17274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17275 $as_echo "$with_babeltrace" >&6; }
17276
17277 if test "x$with_babeltrace" = "xno"; then
17278 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17279 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17280 else
17281 # Append -Werror to CFLAGS so that configure can catch the warning
17282 # "assignment from incompatible pointer type", which is related to
17283 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17284 # in GDB, while babeltrace 1.0.3 is broken.
17285 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17286 # safe to save and restore CFLAGS here.
17287 saved_CFLAGS=$CFLAGS
17288 CFLAGS="$CFLAGS -Werror"
17289
17290
17291
17292
17293
17294
17295
17296
17297 use_additional=yes
17298
17299 acl_save_prefix="$prefix"
17300 prefix="$acl_final_prefix"
17301 acl_save_exec_prefix="$exec_prefix"
17302 exec_prefix="$acl_final_exec_prefix"
17303
17304 eval additional_includedir=\"$includedir\"
17305 eval additional_libdir=\"$libdir\"
17306
17307 exec_prefix="$acl_save_exec_prefix"
17308 prefix="$acl_save_prefix"
17309
17310
17311 # Check whether --with-libbabeltrace-prefix was given.
17312 if test "${with_libbabeltrace_prefix+set}" = set; then :
17313 withval=$with_libbabeltrace_prefix;
17314 if test "X$withval" = "Xno"; then
17315 use_additional=no
17316 else
17317 if test "X$withval" = "X"; then
17318
17319 acl_save_prefix="$prefix"
17320 prefix="$acl_final_prefix"
17321 acl_save_exec_prefix="$exec_prefix"
17322 exec_prefix="$acl_final_exec_prefix"
17323
17324 eval additional_includedir=\"$includedir\"
17325 eval additional_libdir=\"$libdir\"
17326
17327 exec_prefix="$acl_save_exec_prefix"
17328 prefix="$acl_save_prefix"
17329
17330 else
17331 additional_includedir="$withval/include"
17332 additional_libdir="$withval/lib"
17333 fi
17334 fi
17335
17336 fi
17337
17338 LIBBABELTRACE=
17339 LTLIBBABELTRACE=
17340 INCBABELTRACE=
17341 rpathdirs=
17342 ltrpathdirs=
17343 names_already_handled=
17344 names_next_round='babeltrace babeltrace-ctf'
17345 while test -n "$names_next_round"; do
17346 names_this_round="$names_next_round"
17347 names_next_round=
17348 for name in $names_this_round; do
17349 already_handled=
17350 for n in $names_already_handled; do
17351 if test "$n" = "$name"; then
17352 already_handled=yes
17353 break
17354 fi
17355 done
17356 if test -z "$already_handled"; then
17357 names_already_handled="$names_already_handled $name"
17358 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17359 eval value=\"\$HAVE_LIB$uppername\"
17360 if test -n "$value"; then
17361 if test "$value" = yes; then
17362 eval value=\"\$LIB$uppername\"
17363 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17364 eval value=\"\$LTLIB$uppername\"
17365 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17366 else
17367 :
17368 fi
17369 else
17370 found_dir=
17371 found_la=
17372 found_so=
17373 found_a=
17374 if test $use_additional = yes; then
17375 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17376 found_dir="$additional_libdir"
17377 found_so="$additional_libdir/lib$name.$shlibext"
17378 if test -f "$additional_libdir/lib$name.la"; then
17379 found_la="$additional_libdir/lib$name.la"
17380 fi
17381 else
17382 if test -f "$additional_libdir/lib$name.$libext"; then
17383 found_dir="$additional_libdir"
17384 found_a="$additional_libdir/lib$name.$libext"
17385 if test -f "$additional_libdir/lib$name.la"; then
17386 found_la="$additional_libdir/lib$name.la"
17387 fi
17388 fi
17389 fi
17390 fi
17391 if test "X$found_dir" = "X"; then
17392 for x in $LDFLAGS $LTLIBBABELTRACE; do
17393
17394 acl_save_prefix="$prefix"
17395 prefix="$acl_final_prefix"
17396 acl_save_exec_prefix="$exec_prefix"
17397 exec_prefix="$acl_final_exec_prefix"
17398 eval x=\"$x\"
17399 exec_prefix="$acl_save_exec_prefix"
17400 prefix="$acl_save_prefix"
17401
17402 case "$x" in
17403 -L*)
17404 dir=`echo "X$x" | sed -e 's/^X-L//'`
17405 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17406 found_dir="$dir"
17407 found_so="$dir/lib$name.$shlibext"
17408 if test -f "$dir/lib$name.la"; then
17409 found_la="$dir/lib$name.la"
17410 fi
17411 else
17412 if test -f "$dir/lib$name.$libext"; then
17413 found_dir="$dir"
17414 found_a="$dir/lib$name.$libext"
17415 if test -f "$dir/lib$name.la"; then
17416 found_la="$dir/lib$name.la"
17417 fi
17418 fi
17419 fi
17420 ;;
17421 esac
17422 if test "X$found_dir" != "X"; then
17423 break
17424 fi
17425 done
17426 fi
17427 if test "X$found_dir" != "X"; then
17428 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17429 if test "X$found_so" != "X"; then
17430 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17431 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17432 else
17433 haveit=
17434 for x in $ltrpathdirs; do
17435 if test "X$x" = "X$found_dir"; then
17436 haveit=yes
17437 break
17438 fi
17439 done
17440 if test -z "$haveit"; then
17441 ltrpathdirs="$ltrpathdirs $found_dir"
17442 fi
17443 if test "$hardcode_direct" = yes; then
17444 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17445 else
17446 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17447 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17448 haveit=
17449 for x in $rpathdirs; do
17450 if test "X$x" = "X$found_dir"; then
17451 haveit=yes
17452 break
17453 fi
17454 done
17455 if test -z "$haveit"; then
17456 rpathdirs="$rpathdirs $found_dir"
17457 fi
17458 else
17459 haveit=
17460 for x in $LDFLAGS $LIBBABELTRACE; do
17461
17462 acl_save_prefix="$prefix"
17463 prefix="$acl_final_prefix"
17464 acl_save_exec_prefix="$exec_prefix"
17465 exec_prefix="$acl_final_exec_prefix"
17466 eval x=\"$x\"
17467 exec_prefix="$acl_save_exec_prefix"
17468 prefix="$acl_save_prefix"
17469
17470 if test "X$x" = "X-L$found_dir"; then
17471 haveit=yes
17472 break
17473 fi
17474 done
17475 if test -z "$haveit"; then
17476 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17477 fi
17478 if test "$hardcode_minus_L" != no; then
17479 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17480 else
17481 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17482 fi
17483 fi
17484 fi
17485 fi
17486 else
17487 if test "X$found_a" != "X"; then
17488 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17489 else
17490 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17491 fi
17492 fi
17493 additional_includedir=
17494 case "$found_dir" in
17495 */lib | */lib/)
17496 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17497 additional_includedir="$basedir/include"
17498 ;;
17499 esac
17500 if test "X$additional_includedir" != "X"; then
17501 if test "X$additional_includedir" != "X/usr/include"; then
17502 haveit=
17503 if test "X$additional_includedir" = "X/usr/local/include"; then
17504 if test -n "$GCC"; then
17505 case $host_os in
17506 linux*) haveit=yes;;
17507 esac
17508 fi
17509 fi
17510 if test -z "$haveit"; then
17511 for x in $CPPFLAGS $INCBABELTRACE; do
17512
17513 acl_save_prefix="$prefix"
17514 prefix="$acl_final_prefix"
17515 acl_save_exec_prefix="$exec_prefix"
17516 exec_prefix="$acl_final_exec_prefix"
17517 eval x=\"$x\"
17518 exec_prefix="$acl_save_exec_prefix"
17519 prefix="$acl_save_prefix"
17520
17521 if test "X$x" = "X-I$additional_includedir"; then
17522 haveit=yes
17523 break
17524 fi
17525 done
17526 if test -z "$haveit"; then
17527 if test -d "$additional_includedir"; then
17528 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17529 fi
17530 fi
17531 fi
17532 fi
17533 fi
17534 if test -n "$found_la"; then
17535 save_libdir="$libdir"
17536 case "$found_la" in
17537 */* | *\\*) . "$found_la" ;;
17538 *) . "./$found_la" ;;
17539 esac
17540 libdir="$save_libdir"
17541 for dep in $dependency_libs; do
17542 case "$dep" in
17543 -L*)
17544 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17545 if test "X$additional_libdir" != "X/usr/lib"; then
17546 haveit=
17547 if test "X$additional_libdir" = "X/usr/local/lib"; then
17548 if test -n "$GCC"; then
17549 case $host_os in
17550 linux*) haveit=yes;;
17551 esac
17552 fi
17553 fi
17554 if test -z "$haveit"; then
17555 haveit=
17556 for x in $LDFLAGS $LIBBABELTRACE; do
17557
17558 acl_save_prefix="$prefix"
17559 prefix="$acl_final_prefix"
17560 acl_save_exec_prefix="$exec_prefix"
17561 exec_prefix="$acl_final_exec_prefix"
17562 eval x=\"$x\"
17563 exec_prefix="$acl_save_exec_prefix"
17564 prefix="$acl_save_prefix"
17565
17566 if test "X$x" = "X-L$additional_libdir"; then
17567 haveit=yes
17568 break
17569 fi
17570 done
17571 if test -z "$haveit"; then
17572 if test -d "$additional_libdir"; then
17573 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17574 fi
17575 fi
17576 haveit=
17577 for x in $LDFLAGS $LTLIBBABELTRACE; do
17578
17579 acl_save_prefix="$prefix"
17580 prefix="$acl_final_prefix"
17581 acl_save_exec_prefix="$exec_prefix"
17582 exec_prefix="$acl_final_exec_prefix"
17583 eval x=\"$x\"
17584 exec_prefix="$acl_save_exec_prefix"
17585 prefix="$acl_save_prefix"
17586
17587 if test "X$x" = "X-L$additional_libdir"; then
17588 haveit=yes
17589 break
17590 fi
17591 done
17592 if test -z "$haveit"; then
17593 if test -d "$additional_libdir"; then
17594 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17595 fi
17596 fi
17597 fi
17598 fi
17599 ;;
17600 -R*)
17601 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17602 if test "$enable_rpath" != no; then
17603 haveit=
17604 for x in $rpathdirs; do
17605 if test "X$x" = "X$dir"; then
17606 haveit=yes
17607 break
17608 fi
17609 done
17610 if test -z "$haveit"; then
17611 rpathdirs="$rpathdirs $dir"
17612 fi
17613 haveit=
17614 for x in $ltrpathdirs; do
17615 if test "X$x" = "X$dir"; then
17616 haveit=yes
17617 break
17618 fi
17619 done
17620 if test -z "$haveit"; then
17621 ltrpathdirs="$ltrpathdirs $dir"
17622 fi
17623 fi
17624 ;;
17625 -l*)
17626 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17627 ;;
17628 *.la)
17629 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17630 ;;
17631 *)
17632 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17633 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17634 ;;
17635 esac
17636 done
17637 fi
17638 else
17639 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17640 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17641 fi
17642 fi
17643 fi
17644 done
17645 done
17646 if test "X$rpathdirs" != "X"; then
17647 if test -n "$hardcode_libdir_separator"; then
17648 alldirs=
17649 for found_dir in $rpathdirs; do
17650 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17651 done
17652 acl_save_libdir="$libdir"
17653 libdir="$alldirs"
17654 eval flag=\"$hardcode_libdir_flag_spec\"
17655 libdir="$acl_save_libdir"
17656 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17657 else
17658 for found_dir in $rpathdirs; do
17659 acl_save_libdir="$libdir"
17660 libdir="$found_dir"
17661 eval flag=\"$hardcode_libdir_flag_spec\"
17662 libdir="$acl_save_libdir"
17663 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17664 done
17665 fi
17666 fi
17667 if test "X$ltrpathdirs" != "X"; then
17668 for found_dir in $ltrpathdirs; do
17669 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17670 done
17671 fi
17672
17673
17674 ac_save_CPPFLAGS="$CPPFLAGS"
17675
17676 for element in $INCBABELTRACE; do
17677 haveit=
17678 for x in $CPPFLAGS; do
17679
17680 acl_save_prefix="$prefix"
17681 prefix="$acl_final_prefix"
17682 acl_save_exec_prefix="$exec_prefix"
17683 exec_prefix="$acl_final_exec_prefix"
17684 eval x=\"$x\"
17685 exec_prefix="$acl_save_exec_prefix"
17686 prefix="$acl_save_prefix"
17687
17688 if test "X$x" = "X$element"; then
17689 haveit=yes
17690 break
17691 fi
17692 done
17693 if test -z "$haveit"; then
17694 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17695 fi
17696 done
17697
17698
17699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17700 $as_echo_n "checking for libbabeltrace... " >&6; }
17701 if ${ac_cv_libbabeltrace+:} false; then :
17702 $as_echo_n "(cached) " >&6
17703 else
17704
17705 ac_save_LIBS="$LIBS"
17706 LIBS="$LIBS $LIBBABELTRACE"
17707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17708 /* end confdefs.h. */
17709 #include <babeltrace/babeltrace.h>
17710 #include <babeltrace/ctf/events.h>
17711 #include <babeltrace/ctf/iterator.h>
17712 int
17713 main ()
17714 {
17715 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17716 struct bt_ctf_event *event = NULL;
17717 const struct bt_definition *scope;
17718
17719 pos->type = BT_SEEK_BEGIN;
17720 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
17721 scope = bt_ctf_get_top_level_scope (event,
17722 BT_STREAM_EVENT_HEADER);
17723 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17724
17725 ;
17726 return 0;
17727 }
17728 _ACEOF
17729 if ac_fn_c_try_link "$LINENO"; then :
17730 ac_cv_libbabeltrace=yes
17731 else
17732 ac_cv_libbabeltrace=no
17733 fi
17734 rm -f core conftest.err conftest.$ac_objext \
17735 conftest$ac_exeext conftest.$ac_ext
17736 LIBS="$ac_save_LIBS"
17737
17738 fi
17739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17740 $as_echo "$ac_cv_libbabeltrace" >&6; }
17741 if test "$ac_cv_libbabeltrace" = yes; then
17742 HAVE_LIBBABELTRACE=yes
17743
17744 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17745
17746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17747 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
17748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17749 $as_echo "$LIBBABELTRACE" >&6; }
17750 else
17751 HAVE_LIBBABELTRACE=no
17752 CPPFLAGS="$ac_save_CPPFLAGS"
17753 LIBBABELTRACE=
17754 LTLIBBABELTRACE=
17755 fi
17756
17757
17758
17759
17760
17761
17762 CFLAGS=$saved_CFLAGS
17763
17764 if test "$HAVE_LIBBABELTRACE" != yes; then
17765 if test "$with_babeltrace" = yes; then
17766 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
17767 else
17768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17769 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17770 fi
17771 fi
17772 fi
17773
17774 # If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17775 # empty version.
17776
17777 files=
17778 links=
17779
17780 rm -f nm.h
17781 if test "${nativefile}" != ""; then
17782 case "${nativefile}" in
17783 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17784 * ) GDB_NM_FILE="${nativefile}"
17785 esac
17786 files="${files} ${GDB_NM_FILE}"
17787 links="${links} nm.h"
17788
17789 cat >>confdefs.h <<_ACEOF
17790 #define GDB_NM_FILE "${GDB_NM_FILE}"
17791 _ACEOF
17792
17793 fi
17794
17795
17796 for ac_prog in xsltproc
17797 do
17798 # Extract the first word of "$ac_prog", so it can be a program name with args.
17799 set dummy $ac_prog; ac_word=$2
17800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17801 $as_echo_n "checking for $ac_word... " >&6; }
17802 if ${ac_cv_path_XSLTPROC+:} false; then :
17803 $as_echo_n "(cached) " >&6
17804 else
17805 case $XSLTPROC in
17806 [\\/]* | ?:[\\/]*)
17807 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17808 ;;
17809 *)
17810 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17811 for as_dir in $PATH
17812 do
17813 IFS=$as_save_IFS
17814 test -z "$as_dir" && as_dir=.
17815 for ac_exec_ext in '' $ac_executable_extensions; do
17816 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17817 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17818 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17819 break 2
17820 fi
17821 done
17822 done
17823 IFS=$as_save_IFS
17824
17825 ;;
17826 esac
17827 fi
17828 XSLTPROC=$ac_cv_path_XSLTPROC
17829 if test -n "$XSLTPROC"; then
17830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17831 $as_echo "$XSLTPROC" >&6; }
17832 else
17833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17834 $as_echo "no" >&6; }
17835 fi
17836
17837
17838 test -n "$XSLTPROC" && break
17839 done
17840 test -n "$XSLTPROC" || XSLTPROC="missing"
17841
17842 if test "x$USE_MAINTAINER_MODE" = xyes; then
17843 if test "${XSLTPROC}" = missing; then
17844 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
17845 fi
17846 fi
17847
17848
17849 ac_sources="$files"
17850 ac_dests="$links"
17851 while test -n "$ac_sources"; do
17852 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17853 set $ac_sources; ac_source=$1; shift; ac_sources=$*
17854 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17855 done
17856 ac_config_links="$ac_config_links $ac_config_links_1"
17857
17858
17859
17860
17861
17862 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
17863
17864
17865
17866 # Check whether we will enable the inclusion of unit tests when
17867 # compiling GDB.
17868 #
17869 # The default value of this option changes depending whether we're on
17870 # development mode (in which case it's "true") or not (in which case
17871 # it's "false").
17872 # Check whether --enable-unit-tests was given.
17873 if test "${enable_unit_tests+set}" = set; then :
17874 enableval=$enable_unit_tests; case "${enableval}" in
17875 yes) enable_unittests=true ;;
17876 no) enable_unittests=false ;;
17877 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
17878 esac
17879 else
17880 enable_unittests=$development
17881 fi
17882
17883
17884 if $enable_unittests; then
17885
17886 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17887
17888
17889 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) common/selftest.o selftest-arch.o"
17890 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) common/selftest.c selftest-arch.c"
17891
17892 fi
17893
17894
17895
17896 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17897 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17898 if test "x$GDB_TRANSFORM_NAME" = x; then
17899 GDB_TRANSFORM_NAME=gdb
17900 fi
17901
17902
17903
17904 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17905 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17906 if test "x$GCORE_TRANSFORM_NAME" = x; then
17907 GCORE_TRANSFORM_NAME=gcore
17908 fi
17909
17910
17911 ac_config_files="$ac_config_files gcore"
17912
17913 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
17914
17915
17916 cat >confcache <<\_ACEOF
17917 # This file is a shell script that caches the results of configure
17918 # tests run on this system so they can be shared between configure
17919 # scripts and configure runs, see configure's option --config-cache.
17920 # It is not useful on other systems. If it contains results you don't
17921 # want to keep, you may remove or edit it.
17922 #
17923 # config.status only pays attention to the cache file if you give it
17924 # the --recheck option to rerun configure.
17925 #
17926 # `ac_cv_env_foo' variables (set or unset) will be overridden when
17927 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17928 # following values.
17929
17930 _ACEOF
17931
17932 # The following way of writing the cache mishandles newlines in values,
17933 # but we know of no workaround that is simple, portable, and efficient.
17934 # So, we kill variables containing newlines.
17935 # Ultrix sh set writes to stderr and can't be redirected directly,
17936 # and sets the high bit in the cache file unless we assign to the vars.
17937 (
17938 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17939 eval ac_val=\$$ac_var
17940 case $ac_val in #(
17941 *${as_nl}*)
17942 case $ac_var in #(
17943 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17944 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17945 esac
17946 case $ac_var in #(
17947 _ | IFS | as_nl) ;; #(
17948 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17949 *) { eval $ac_var=; unset $ac_var;} ;;
17950 esac ;;
17951 esac
17952 done
17953
17954 (set) 2>&1 |
17955 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17956 *${as_nl}ac_space=\ *)
17957 # `set' does not quote correctly, so add quotes: double-quote
17958 # substitution turns \\\\ into \\, and sed turns \\ into \.
17959 sed -n \
17960 "s/'/'\\\\''/g;
17961 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17962 ;; #(
17963 *)
17964 # `set' quotes correctly as required by POSIX, so do not add quotes.
17965 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
17966 ;;
17967 esac |
17968 sort
17969 ) |
17970 sed '
17971 /^ac_cv_env_/b end
17972 t clear
17973 :clear
17974 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17975 t end
17976 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17977 :end' >>confcache
17978 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17979 if test -w "$cache_file"; then
17980 if test "x$cache_file" != "x/dev/null"; then
17981 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17982 $as_echo "$as_me: updating cache $cache_file" >&6;}
17983 if test ! -f "$cache_file" || test -h "$cache_file"; then
17984 cat confcache >"$cache_file"
17985 else
17986 case $cache_file in #(
17987 */* | ?:*)
17988 mv -f confcache "$cache_file"$$ &&
17989 mv -f "$cache_file"$$ "$cache_file" ;; #(
17990 *)
17991 mv -f confcache "$cache_file" ;;
17992 esac
17993 fi
17994 fi
17995 else
17996 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17997 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
17998 fi
17999 fi
18000 rm -f confcache
18001
18002 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18003 # Let make expand exec_prefix.
18004 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18005
18006 DEFS=-DHAVE_CONFIG_H
18007
18008 ac_libobjs=
18009 ac_ltlibobjs=
18010 U=
18011 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18012 # 1. Remove the extension, and $U if already installed.
18013 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
18014 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
18015 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
18016 # will be set to the directory where LIBOBJS objects are built.
18017 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18018 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
18019 done
18020 LIBOBJS=$ac_libobjs
18021
18022 LTLIBOBJS=$ac_ltlibobjs
18023
18024
18025 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
18026 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
18027 Usually this means the macro was only invoked conditionally." "$LINENO" 5
18028 fi
18029 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
18030 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
18031 Usually this means the macro was only invoked conditionally." "$LINENO" 5
18032 fi
18033 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
18034 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
18035 Usually this means the macro was only invoked conditionally." "$LINENO" 5
18036 fi
18037
18038
18039 : "${CONFIG_STATUS=./config.status}"
18040 ac_write_fail=0
18041 ac_clean_files_save=$ac_clean_files
18042 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18043 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18044 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
18045 as_write_fail=0
18046 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
18047 #! $SHELL
18048 # Generated by $as_me.
18049 # Run this file to recreate the current configuration.
18050 # Compiler output produced by configure, useful for debugging
18051 # configure, is in config.log if it exists.
18052
18053 debug=false
18054 ac_cs_recheck=false
18055 ac_cs_silent=false
18056
18057 SHELL=\${CONFIG_SHELL-$SHELL}
18058 export SHELL
18059 _ASEOF
18060 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18061 ## -------------------- ##
18062 ## M4sh Initialization. ##
18063 ## -------------------- ##
18064
18065 # Be more Bourne compatible
18066 DUALCASE=1; export DUALCASE # for MKS sh
18067 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18068 emulate sh
18069 NULLCMD=:
18070 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
18071 # is contrary to our usage. Disable this feature.
18072 alias -g '${1+"$@"}'='"$@"'
18073 setopt NO_GLOB_SUBST
18074 else
18075 case `(set -o) 2>/dev/null` in #(
18076 *posix*) :
18077 set -o posix ;; #(
18078 *) :
18079 ;;
18080 esac
18081 fi
18082
18083
18084 as_nl='
18085 '
18086 export as_nl
18087 # Printing a long string crashes Solaris 7 /usr/bin/printf.
18088 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18089 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18090 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18091 # Prefer a ksh shell builtin over an external printf program on Solaris,
18092 # but without wasting forks for bash or zsh.
18093 if test -z "$BASH_VERSION$ZSH_VERSION" \
18094 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18095 as_echo='print -r --'
18096 as_echo_n='print -rn --'
18097 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18098 as_echo='printf %s\n'
18099 as_echo_n='printf %s'
18100 else
18101 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18102 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18103 as_echo_n='/usr/ucb/echo -n'
18104 else
18105 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18106 as_echo_n_body='eval
18107 arg=$1;
18108 case $arg in #(
18109 *"$as_nl"*)
18110 expr "X$arg" : "X\\(.*\\)$as_nl";
18111 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18112 esac;
18113 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18114 '
18115 export as_echo_n_body
18116 as_echo_n='sh -c $as_echo_n_body as_echo'
18117 fi
18118 export as_echo_body
18119 as_echo='sh -c $as_echo_body as_echo'
18120 fi
18121
18122 # The user is always right.
18123 if test "${PATH_SEPARATOR+set}" != set; then
18124 PATH_SEPARATOR=:
18125 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18126 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18127 PATH_SEPARATOR=';'
18128 }
18129 fi
18130
18131
18132 # IFS
18133 # We need space, tab and new line, in precisely that order. Quoting is
18134 # there to prevent editors from complaining about space-tab.
18135 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
18136 # splitting by setting IFS to empty value.)
18137 IFS=" "" $as_nl"
18138
18139 # Find who we are. Look in the path if we contain no directory separator.
18140 as_myself=
18141 case $0 in #((
18142 *[\\/]* ) as_myself=$0 ;;
18143 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18144 for as_dir in $PATH
18145 do
18146 IFS=$as_save_IFS
18147 test -z "$as_dir" && as_dir=.
18148 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18149 done
18150 IFS=$as_save_IFS
18151
18152 ;;
18153 esac
18154 # We did not find ourselves, most probably we were run as `sh COMMAND'
18155 # in which case we are not to be found in the path.
18156 if test "x$as_myself" = x; then
18157 as_myself=$0
18158 fi
18159 if test ! -f "$as_myself"; then
18160 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18161 exit 1
18162 fi
18163
18164 # Unset variables that we do not need and which cause bugs (e.g. in
18165 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18166 # suppresses any "Segmentation fault" message there. '((' could
18167 # trigger a bug in pdksh 5.2.14.
18168 for as_var in BASH_ENV ENV MAIL MAILPATH
18169 do eval test x\${$as_var+set} = xset \
18170 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18171 done
18172 PS1='$ '
18173 PS2='> '
18174 PS4='+ '
18175
18176 # NLS nuisances.
18177 LC_ALL=C
18178 export LC_ALL
18179 LANGUAGE=C
18180 export LANGUAGE
18181
18182 # CDPATH.
18183 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18184
18185
18186 # as_fn_error STATUS ERROR [LINENO LOG_FD]
18187 # ----------------------------------------
18188 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18189 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
18190 # script with STATUS, using 1 if that was 0.
18191 as_fn_error ()
18192 {
18193 as_status=$1; test $as_status -eq 0 && as_status=1
18194 if test "$4"; then
18195 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18196 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
18197 fi
18198 $as_echo "$as_me: error: $2" >&2
18199 as_fn_exit $as_status
18200 } # as_fn_error
18201
18202
18203 # as_fn_set_status STATUS
18204 # -----------------------
18205 # Set $? to STATUS, without forking.
18206 as_fn_set_status ()
18207 {
18208 return $1
18209 } # as_fn_set_status
18210
18211 # as_fn_exit STATUS
18212 # -----------------
18213 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18214 as_fn_exit ()
18215 {
18216 set +e
18217 as_fn_set_status $1
18218 exit $1
18219 } # as_fn_exit
18220
18221 # as_fn_unset VAR
18222 # ---------------
18223 # Portably unset VAR.
18224 as_fn_unset ()
18225 {
18226 { eval $1=; unset $1;}
18227 }
18228 as_unset=as_fn_unset
18229 # as_fn_append VAR VALUE
18230 # ----------------------
18231 # Append the text in VALUE to the end of the definition contained in VAR. Take
18232 # advantage of any shell optimizations that allow amortized linear growth over
18233 # repeated appends, instead of the typical quadratic growth present in naive
18234 # implementations.
18235 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18236 eval 'as_fn_append ()
18237 {
18238 eval $1+=\$2
18239 }'
18240 else
18241 as_fn_append ()
18242 {
18243 eval $1=\$$1\$2
18244 }
18245 fi # as_fn_append
18246
18247 # as_fn_arith ARG...
18248 # ------------------
18249 # Perform arithmetic evaluation on the ARGs, and store the result in the
18250 # global $as_val. Take advantage of shells that can avoid forks. The arguments
18251 # must be portable across $(()) and expr.
18252 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18253 eval 'as_fn_arith ()
18254 {
18255 as_val=$(( $* ))
18256 }'
18257 else
18258 as_fn_arith ()
18259 {
18260 as_val=`expr "$@" || test $? -eq 1`
18261 }
18262 fi # as_fn_arith
18263
18264
18265 if expr a : '\(a\)' >/dev/null 2>&1 &&
18266 test "X`expr 00001 : '.*\(...\)'`" = X001; then
18267 as_expr=expr
18268 else
18269 as_expr=false
18270 fi
18271
18272 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18273 as_basename=basename
18274 else
18275 as_basename=false
18276 fi
18277
18278 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18279 as_dirname=dirname
18280 else
18281 as_dirname=false
18282 fi
18283
18284 as_me=`$as_basename -- "$0" ||
18285 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18286 X"$0" : 'X\(//\)$' \| \
18287 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18288 $as_echo X/"$0" |
18289 sed '/^.*\/\([^/][^/]*\)\/*$/{
18290 s//\1/
18291 q
18292 }
18293 /^X\/\(\/\/\)$/{
18294 s//\1/
18295 q
18296 }
18297 /^X\/\(\/\).*/{
18298 s//\1/
18299 q
18300 }
18301 s/.*/./; q'`
18302
18303 # Avoid depending upon Character Ranges.
18304 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18305 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18306 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18307 as_cr_digits='0123456789'
18308 as_cr_alnum=$as_cr_Letters$as_cr_digits
18309
18310 ECHO_C= ECHO_N= ECHO_T=
18311 case `echo -n x` in #(((((
18312 -n*)
18313 case `echo 'xy\c'` in
18314 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18315 xy) ECHO_C='\c';;
18316 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18317 ECHO_T=' ';;
18318 esac;;
18319 *)
18320 ECHO_N='-n';;
18321 esac
18322
18323 rm -f conf$$ conf$$.exe conf$$.file
18324 if test -d conf$$.dir; then
18325 rm -f conf$$.dir/conf$$.file
18326 else
18327 rm -f conf$$.dir
18328 mkdir conf$$.dir 2>/dev/null
18329 fi
18330 if (echo >conf$$.file) 2>/dev/null; then
18331 if ln -s conf$$.file conf$$ 2>/dev/null; then
18332 as_ln_s='ln -s'
18333 # ... but there are two gotchas:
18334 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18335 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
18336 # In both cases, we have to default to `cp -pR'.
18337 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
18338 as_ln_s='cp -pR'
18339 elif ln conf$$.file conf$$ 2>/dev/null; then
18340 as_ln_s=ln
18341 else
18342 as_ln_s='cp -pR'
18343 fi
18344 else
18345 as_ln_s='cp -pR'
18346 fi
18347 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18348 rmdir conf$$.dir 2>/dev/null
18349
18350
18351 # as_fn_mkdir_p
18352 # -------------
18353 # Create "$as_dir" as a directory, including parents if necessary.
18354 as_fn_mkdir_p ()
18355 {
18356
18357 case $as_dir in #(
18358 -*) as_dir=./$as_dir;;
18359 esac
18360 test -d "$as_dir" || eval $as_mkdir_p || {
18361 as_dirs=
18362 while :; do
18363 case $as_dir in #(
18364 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18365 *) as_qdir=$as_dir;;
18366 esac
18367 as_dirs="'$as_qdir' $as_dirs"
18368 as_dir=`$as_dirname -- "$as_dir" ||
18369 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18370 X"$as_dir" : 'X\(//\)[^/]' \| \
18371 X"$as_dir" : 'X\(//\)$' \| \
18372 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18373 $as_echo X"$as_dir" |
18374 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18375 s//\1/
18376 q
18377 }
18378 /^X\(\/\/\)[^/].*/{
18379 s//\1/
18380 q
18381 }
18382 /^X\(\/\/\)$/{
18383 s//\1/
18384 q
18385 }
18386 /^X\(\/\).*/{
18387 s//\1/
18388 q
18389 }
18390 s/.*/./; q'`
18391 test -d "$as_dir" && break
18392 done
18393 test -z "$as_dirs" || eval "mkdir $as_dirs"
18394 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
18395
18396
18397 } # as_fn_mkdir_p
18398 if mkdir -p . 2>/dev/null; then
18399 as_mkdir_p='mkdir -p "$as_dir"'
18400 else
18401 test -d ./-p && rmdir ./-p
18402 as_mkdir_p=false
18403 fi
18404
18405
18406 # as_fn_executable_p FILE
18407 # -----------------------
18408 # Test if FILE is an executable regular file.
18409 as_fn_executable_p ()
18410 {
18411 test -f "$1" && test -x "$1"
18412 } # as_fn_executable_p
18413 as_test_x='test -x'
18414 as_executable_p=as_fn_executable_p
18415
18416 # Sed expression to map a string onto a valid CPP name.
18417 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18418
18419 # Sed expression to map a string onto a valid variable name.
18420 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18421
18422
18423 exec 6>&1
18424 ## ----------------------------------- ##
18425 ## Main body of $CONFIG_STATUS script. ##
18426 ## ----------------------------------- ##
18427 _ASEOF
18428 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18429
18430 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18431 # Save the log message, to keep $0 and so on meaningful, and to
18432 # report actual input values of CONFIG_FILES etc. instead of their
18433 # values after options handling.
18434 ac_log="
18435 This file was extended by $as_me, which was
18436 generated by GNU Autoconf 2.69. Invocation command line was
18437
18438 CONFIG_FILES = $CONFIG_FILES
18439 CONFIG_HEADERS = $CONFIG_HEADERS
18440 CONFIG_LINKS = $CONFIG_LINKS
18441 CONFIG_COMMANDS = $CONFIG_COMMANDS
18442 $ $0 $@
18443
18444 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18445 "
18446
18447 _ACEOF
18448
18449 case $ac_config_files in *"
18450 "*) set x $ac_config_files; shift; ac_config_files=$*;;
18451 esac
18452
18453 case $ac_config_headers in *"
18454 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18455 esac
18456
18457
18458 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18459 # Files that config.status was made for.
18460 config_files="$ac_config_files"
18461 config_headers="$ac_config_headers"
18462 config_links="$ac_config_links"
18463 config_commands="$ac_config_commands"
18464
18465 _ACEOF
18466
18467 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18468 ac_cs_usage="\
18469 \`$as_me' instantiates files and other configuration actions
18470 from templates according to the current configuration. Unless the files
18471 and actions are specified as TAGs, all are instantiated by default.
18472
18473 Usage: $0 [OPTION]... [TAG]...
18474
18475 -h, --help print this help, then exit
18476 -V, --version print version number and configuration settings, then exit
18477 --config print configuration, then exit
18478 -q, --quiet, --silent
18479 do not print progress messages
18480 -d, --debug don't remove temporary files
18481 --recheck update $as_me by reconfiguring in the same conditions
18482 --file=FILE[:TEMPLATE]
18483 instantiate the configuration file FILE
18484 --header=FILE[:TEMPLATE]
18485 instantiate the configuration header FILE
18486
18487 Configuration files:
18488 $config_files
18489
18490 Configuration headers:
18491 $config_headers
18492
18493 Configuration links:
18494 $config_links
18495
18496 Configuration commands:
18497 $config_commands
18498
18499 Report bugs to the package provider."
18500
18501 _ACEOF
18502 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18503 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
18504 ac_cs_version="\\
18505 config.status
18506 configured by $0, generated by GNU Autoconf 2.69,
18507 with options \\"\$ac_cs_config\\"
18508
18509 Copyright (C) 2012 Free Software Foundation, Inc.
18510 This config.status script is free software; the Free Software Foundation
18511 gives unlimited permission to copy, distribute and modify it."
18512
18513 ac_pwd='$ac_pwd'
18514 srcdir='$srcdir'
18515 INSTALL='$INSTALL'
18516 AWK='$AWK'
18517 test -n "\$AWK" || AWK=awk
18518 _ACEOF
18519
18520 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18521 # The default lists apply if the user does not specify any file.
18522 ac_need_defaults=:
18523 while test $# != 0
18524 do
18525 case $1 in
18526 --*=?*)
18527 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18528 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
18529 ac_shift=:
18530 ;;
18531 --*=)
18532 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18533 ac_optarg=
18534 ac_shift=:
18535 ;;
18536 *)
18537 ac_option=$1
18538 ac_optarg=$2
18539 ac_shift=shift
18540 ;;
18541 esac
18542
18543 case $ac_option in
18544 # Handling of the options.
18545 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18546 ac_cs_recheck=: ;;
18547 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18548 $as_echo "$ac_cs_version"; exit ;;
18549 --config | --confi | --conf | --con | --co | --c )
18550 $as_echo "$ac_cs_config"; exit ;;
18551 --debug | --debu | --deb | --de | --d | -d )
18552 debug=: ;;
18553 --file | --fil | --fi | --f )
18554 $ac_shift
18555 case $ac_optarg in
18556 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18557 '') as_fn_error $? "missing file argument" ;;
18558 esac
18559 as_fn_append CONFIG_FILES " '$ac_optarg'"
18560 ac_need_defaults=false;;
18561 --header | --heade | --head | --hea )
18562 $ac_shift
18563 case $ac_optarg in
18564 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18565 esac
18566 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
18567 ac_need_defaults=false;;
18568 --he | --h)
18569 # Conflict between --help and --header
18570 as_fn_error $? "ambiguous option: \`$1'
18571 Try \`$0 --help' for more information.";;
18572 --help | --hel | -h )
18573 $as_echo "$ac_cs_usage"; exit ;;
18574 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18575 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18576 ac_cs_silent=: ;;
18577
18578 # This is an error.
18579 -*) as_fn_error $? "unrecognized option: \`$1'
18580 Try \`$0 --help' for more information." ;;
18581
18582 *) as_fn_append ac_config_targets " $1"
18583 ac_need_defaults=false ;;
18584
18585 esac
18586 shift
18587 done
18588
18589 ac_configure_extra_args=
18590
18591 if $ac_cs_silent; then
18592 exec 6>/dev/null
18593 ac_configure_extra_args="$ac_configure_extra_args --silent"
18594 fi
18595
18596 _ACEOF
18597 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18598 if \$ac_cs_recheck; then
18599 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18600 shift
18601 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18602 CONFIG_SHELL='$SHELL'
18603 export CONFIG_SHELL
18604 exec "\$@"
18605 fi
18606
18607 _ACEOF
18608 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18609 exec 5>>config.log
18610 {
18611 echo
18612 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18613 ## Running $as_me. ##
18614 _ASBOX
18615 $as_echo "$ac_log"
18616 } >&5
18617
18618 _ACEOF
18619 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18620 #
18621 # INIT-COMMANDS
18622 #
18623 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
18624
18625 _ACEOF
18626
18627 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18628
18629 # Handling of arguments.
18630 for ac_config_target in $ac_config_targets
18631 do
18632 case $ac_config_target in
18633 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18634 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
18635 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
18636 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
18637 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
18638 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18639 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
18640 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
18641 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
18642 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
18643
18644 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
18645 esac
18646 done
18647
18648
18649 # If the user did not use the arguments to specify the items to instantiate,
18650 # then the envvar interface is used. Set only those that are not.
18651 # We use the long form for the default assignment because of an extremely
18652 # bizarre bug on SunOS 4.1.3.
18653 if $ac_need_defaults; then
18654 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18655 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18656 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18657 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18658 fi
18659
18660 # Have a temporary directory for convenience. Make it in the build tree
18661 # simply because there is no reason against having it here, and in addition,
18662 # creating and moving files from /tmp can sometimes cause problems.
18663 # Hook for its removal unless debugging.
18664 # Note that there is a small window in which the directory will not be cleaned:
18665 # after its creation but before its name has been assigned to `$tmp'.
18666 $debug ||
18667 {
18668 tmp= ac_tmp=
18669 trap 'exit_status=$?
18670 : "${ac_tmp:=$tmp}"
18671 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
18672 ' 0
18673 trap 'as_fn_exit 1' 1 2 13 15
18674 }
18675 # Create a (secure) tmp directory for tmp files.
18676
18677 {
18678 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
18679 test -d "$tmp"
18680 } ||
18681 {
18682 tmp=./conf$$-$RANDOM
18683 (umask 077 && mkdir "$tmp")
18684 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18685 ac_tmp=$tmp
18686
18687 # Set up the scripts for CONFIG_FILES section.
18688 # No need to generate them if there are no CONFIG_FILES.
18689 # This happens for instance with `./config.status config.h'.
18690 if test -n "$CONFIG_FILES"; then
18691
18692 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18693 ac_cs_awk_getline=:
18694 ac_cs_awk_pipe_init=
18695 ac_cs_awk_read_file='
18696 while ((getline aline < (F[key])) > 0)
18697 print(aline)
18698 close(F[key])'
18699 ac_cs_awk_pipe_fini=
18700 else
18701 ac_cs_awk_getline=false
18702 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18703 ac_cs_awk_read_file='
18704 print "|#_!!_#|"
18705 print "cat " F[key] " &&"
18706 '$ac_cs_awk_pipe_init
18707 # The final `:' finishes the AND list.
18708 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18709 fi
18710 ac_cr=`echo X | tr X '\015'`
18711 # On cygwin, bash can eat \r inside `` if the user requested igncr.
18712 # But we know of no other shell where ac_cr would be empty at this
18713 # point, so we can use a bashism as a fallback.
18714 if test "x$ac_cr" = x; then
18715 eval ac_cr=\$\'\\r\'
18716 fi
18717 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18718 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
18719 ac_cs_awk_cr='\\r'
18720 else
18721 ac_cs_awk_cr=$ac_cr
18722 fi
18723
18724 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
18725 _ACEOF
18726
18727 # Create commands to substitute file output variables.
18728 {
18729 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
18730 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
18731 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18732 echo "_ACAWK" &&
18733 echo "_ACEOF"
18734 } >conf$$files.sh &&
18735 . ./conf$$files.sh ||
18736 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18737 rm -f conf$$files.sh
18738
18739 {
18740 echo "cat >conf$$subs.awk <<_ACEOF" &&
18741 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18742 echo "_ACEOF"
18743 } >conf$$subs.sh ||
18744 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18745 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
18746 ac_delim='%!_!# '
18747 for ac_last_try in false false false false false :; do
18748 . ./conf$$subs.sh ||
18749 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18750
18751 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18752 if test $ac_delim_n = $ac_delim_num; then
18753 break
18754 elif $ac_last_try; then
18755 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18756 else
18757 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18758 fi
18759 done
18760 rm -f conf$$subs.sh
18761
18762 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18763 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
18764 _ACEOF
18765 sed -n '
18766 h
18767 s/^/S["/; s/!.*/"]=/
18768 p
18769 g
18770 s/^[^!]*!//
18771 :repl
18772 t repl
18773 s/'"$ac_delim"'$//
18774 t delim
18775 :nl
18776 h
18777 s/\(.\{148\}\)..*/\1/
18778 t more1
18779 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18780 p
18781 n
18782 b repl
18783 :more1
18784 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18785 p
18786 g
18787 s/.\{148\}//
18788 t nl
18789 :delim
18790 h
18791 s/\(.\{148\}\)..*/\1/
18792 t more2
18793 s/["\\]/\\&/g; s/^/"/; s/$/"/
18794 p
18795 b
18796 :more2
18797 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18798 p
18799 g
18800 s/.\{148\}//
18801 t delim
18802 ' <conf$$subs.awk | sed '
18803 /^[^""]/{
18804 N
18805 s/\n//
18806 }
18807 ' >>$CONFIG_STATUS || ac_write_fail=1
18808 rm -f conf$$subs.awk
18809 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18810 _ACAWK
18811 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
18812 for (key in S) S_is_set[key] = 1
18813 FS = "\a"
18814 \$ac_cs_awk_pipe_init
18815 }
18816 {
18817 line = $ 0
18818 nfields = split(line, field, "@")
18819 substed = 0
18820 len = length(field[1])
18821 for (i = 2; i < nfields; i++) {
18822 key = field[i]
18823 keylen = length(key)
18824 if (S_is_set[key]) {
18825 value = S[key]
18826 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18827 len += length(value) + length(field[++i])
18828 substed = 1
18829 } else
18830 len += 1 + keylen
18831 }
18832 if (nfields == 3 && !substed) {
18833 key = field[2]
18834 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18835 \$ac_cs_awk_read_file
18836 next
18837 }
18838 }
18839 print line
18840 }
18841 \$ac_cs_awk_pipe_fini
18842 _ACAWK
18843 _ACEOF
18844 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18845 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18846 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18847 else
18848 cat
18849 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18850 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
18851 _ACEOF
18852
18853 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18854 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
18855 # trailing colons and then remove the whole line if VPATH becomes empty
18856 # (actually we leave an empty line to preserve line numbers).
18857 if test "x$srcdir" = x.; then
18858 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18859 h
18860 s///
18861 s/^/:/
18862 s/[ ]*$/:/
18863 s/:\$(srcdir):/:/g
18864 s/:\${srcdir}:/:/g
18865 s/:@srcdir@:/:/g
18866 s/^:*//
18867 s/:*$//
18868 x
18869 s/\(=[ ]*\).*/\1/
18870 G
18871 s/\n//
18872 s/^[^=]*=[ ]*$//
18873 }'
18874 fi
18875
18876 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18877 fi # test -n "$CONFIG_FILES"
18878
18879 # Set up the scripts for CONFIG_HEADERS section.
18880 # No need to generate them if there are no CONFIG_HEADERS.
18881 # This happens for instance with `./config.status Makefile'.
18882 if test -n "$CONFIG_HEADERS"; then
18883 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
18884 BEGIN {
18885 _ACEOF
18886
18887 # Transform confdefs.h into an awk script `defines.awk', embedded as
18888 # here-document in config.status, that substitutes the proper values into
18889 # config.h.in to produce config.h.
18890
18891 # Create a delimiter string that does not exist in confdefs.h, to ease
18892 # handling of long lines.
18893 ac_delim='%!_!# '
18894 for ac_last_try in false false :; do
18895 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18896 if test -z "$ac_tt"; then
18897 break
18898 elif $ac_last_try; then
18899 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
18900 else
18901 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18902 fi
18903 done
18904
18905 # For the awk script, D is an array of macro values keyed by name,
18906 # likewise P contains macro parameters if any. Preserve backslash
18907 # newline sequences.
18908
18909 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18910 sed -n '
18911 s/.\{148\}/&'"$ac_delim"'/g
18912 t rset
18913 :rset
18914 s/^[ ]*#[ ]*define[ ][ ]*/ /
18915 t def
18916 d
18917 :def
18918 s/\\$//
18919 t bsnl
18920 s/["\\]/\\&/g
18921 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18922 D["\1"]=" \3"/p
18923 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18924 d
18925 :bsnl
18926 s/["\\]/\\&/g
18927 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18928 D["\1"]=" \3\\\\\\n"\\/p
18929 t cont
18930 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18931 t cont
18932 d
18933 :cont
18934 n
18935 s/.\{148\}/&'"$ac_delim"'/g
18936 t clear
18937 :clear
18938 s/\\$//
18939 t bsnlc
18940 s/["\\]/\\&/g; s/^/"/; s/$/"/p
18941 d
18942 :bsnlc
18943 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18944 b cont
18945 ' <confdefs.h | sed '
18946 s/'"$ac_delim"'/"\\\
18947 "/g' >>$CONFIG_STATUS || ac_write_fail=1
18948
18949 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18950 for (key in D) D_is_set[key] = 1
18951 FS = "\a"
18952 }
18953 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18954 line = \$ 0
18955 split(line, arg, " ")
18956 if (arg[1] == "#") {
18957 defundef = arg[2]
18958 mac1 = arg[3]
18959 } else {
18960 defundef = substr(arg[1], 2)
18961 mac1 = arg[2]
18962 }
18963 split(mac1, mac2, "(") #)
18964 macro = mac2[1]
18965 prefix = substr(line, 1, index(line, defundef) - 1)
18966 if (D_is_set[macro]) {
18967 # Preserve the white space surrounding the "#".
18968 print prefix "define", macro P[macro] D[macro]
18969 next
18970 } else {
18971 # Replace #undef with comments. This is necessary, for example,
18972 # in the case of _POSIX_SOURCE, which is predefined and required
18973 # on some systems where configure will not decide to define it.
18974 if (defundef == "undef") {
18975 print "/*", prefix defundef, macro, "*/"
18976 next
18977 }
18978 }
18979 }
18980 { print }
18981 _ACAWK
18982 _ACEOF
18983 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18984 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
18985 fi # test -n "$CONFIG_HEADERS"
18986
18987
18988 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18989 shift
18990 for ac_tag
18991 do
18992 case $ac_tag in
18993 :[FHLC]) ac_mode=$ac_tag; continue;;
18994 esac
18995 case $ac_mode$ac_tag in
18996 :[FHL]*:*);;
18997 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
18998 :[FH]-) ac_tag=-:-;;
18999 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
19000 esac
19001 ac_save_IFS=$IFS
19002 IFS=:
19003 set x $ac_tag
19004 IFS=$ac_save_IFS
19005 shift
19006 ac_file=$1
19007 shift
19008
19009 case $ac_mode in
19010 :L) ac_source=$1;;
19011 :[FH])
19012 ac_file_inputs=
19013 for ac_f
19014 do
19015 case $ac_f in
19016 -) ac_f="$ac_tmp/stdin";;
19017 *) # Look for the file first in the build tree, then in the source tree
19018 # (if the path is not absolute). The absolute path cannot be DOS-style,
19019 # because $ac_f cannot contain `:'.
19020 test -f "$ac_f" ||
19021 case $ac_f in
19022 [\\/$]*) false;;
19023 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19024 esac ||
19025 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
19026 esac
19027 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
19028 as_fn_append ac_file_inputs " '$ac_f'"
19029 done
19030
19031 # Let's still pretend it is `configure' which instantiates (i.e., don't
19032 # use $as_me), people would be surprised to read:
19033 # /* config.h. Generated by config.status. */
19034 configure_input='Generated from '`
19035 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
19036 `' by configure.'
19037 if test x"$ac_file" != x-; then
19038 configure_input="$ac_file. $configure_input"
19039 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
19040 $as_echo "$as_me: creating $ac_file" >&6;}
19041 fi
19042 # Neutralize special characters interpreted by sed in replacement strings.
19043 case $configure_input in #(
19044 *\&* | *\|* | *\\* )
19045 ac_sed_conf_input=`$as_echo "$configure_input" |
19046 sed 's/[\\\\&|]/\\\\&/g'`;; #(
19047 *) ac_sed_conf_input=$configure_input;;
19048 esac
19049
19050 case $ac_tag in
19051 *:-:* | *:-) cat >"$ac_tmp/stdin" \
19052 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
19053 esac
19054 ;;
19055 esac
19056
19057 ac_dir=`$as_dirname -- "$ac_file" ||
19058 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19059 X"$ac_file" : 'X\(//\)[^/]' \| \
19060 X"$ac_file" : 'X\(//\)$' \| \
19061 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19062 $as_echo X"$ac_file" |
19063 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19064 s//\1/
19065 q
19066 }
19067 /^X\(\/\/\)[^/].*/{
19068 s//\1/
19069 q
19070 }
19071 /^X\(\/\/\)$/{
19072 s//\1/
19073 q
19074 }
19075 /^X\(\/\).*/{
19076 s//\1/
19077 q
19078 }
19079 s/.*/./; q'`
19080 as_dir="$ac_dir"; as_fn_mkdir_p
19081 ac_builddir=.
19082
19083 case "$ac_dir" in
19084 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19085 *)
19086 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19087 # A ".." for each directory in $ac_dir_suffix.
19088 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19089 case $ac_top_builddir_sub in
19090 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19091 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19092 esac ;;
19093 esac
19094 ac_abs_top_builddir=$ac_pwd
19095 ac_abs_builddir=$ac_pwd$ac_dir_suffix
19096 # for backward compatibility:
19097 ac_top_builddir=$ac_top_build_prefix
19098
19099 case $srcdir in
19100 .) # We are building in place.
19101 ac_srcdir=.
19102 ac_top_srcdir=$ac_top_builddir_sub
19103 ac_abs_top_srcdir=$ac_pwd ;;
19104 [\\/]* | ?:[\\/]* ) # Absolute name.
19105 ac_srcdir=$srcdir$ac_dir_suffix;
19106 ac_top_srcdir=$srcdir
19107 ac_abs_top_srcdir=$srcdir ;;
19108 *) # Relative name.
19109 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19110 ac_top_srcdir=$ac_top_build_prefix$srcdir
19111 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19112 esac
19113 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19114
19115
19116 case $ac_mode in
19117 :F)
19118 #
19119 # CONFIG_FILE
19120 #
19121
19122 case $INSTALL in
19123 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19124 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
19125 esac
19126 _ACEOF
19127
19128 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19129 # If the template does not know about datarootdir, expand it.
19130 # FIXME: This hack should be removed a few years after 2.60.
19131 ac_datarootdir_hack=; ac_datarootdir_seen=
19132 ac_sed_dataroot='
19133 /datarootdir/ {
19134 p
19135 q
19136 }
19137 /@datadir@/p
19138 /@docdir@/p
19139 /@infodir@/p
19140 /@localedir@/p
19141 /@mandir@/p'
19142 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19143 *datarootdir*) ac_datarootdir_seen=yes;;
19144 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19145 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19146 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19147 _ACEOF
19148 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19149 ac_datarootdir_hack='
19150 s&@datadir@&$datadir&g
19151 s&@docdir@&$docdir&g
19152 s&@infodir@&$infodir&g
19153 s&@localedir@&$localedir&g
19154 s&@mandir@&$mandir&g
19155 s&\\\${datarootdir}&$datarootdir&g' ;;
19156 esac
19157 _ACEOF
19158
19159 # Neutralize VPATH when `$srcdir' = `.'.
19160 # Shell code in configure.ac might set extrasub.
19161 # FIXME: do we really want to maintain this feature?
19162 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19163 ac_sed_extra="$ac_vpsub
19164 $extrasub
19165 _ACEOF
19166 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19167 :t
19168 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19169 s|@configure_input@|$ac_sed_conf_input|;t t
19170 s&@top_builddir@&$ac_top_builddir_sub&;t t
19171 s&@top_build_prefix@&$ac_top_build_prefix&;t t
19172 s&@srcdir@&$ac_srcdir&;t t
19173 s&@abs_srcdir@&$ac_abs_srcdir&;t t
19174 s&@top_srcdir@&$ac_top_srcdir&;t t
19175 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19176 s&@builddir@&$ac_builddir&;t t
19177 s&@abs_builddir@&$ac_abs_builddir&;t t
19178 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19179 s&@INSTALL@&$ac_INSTALL&;t t
19180 $ac_datarootdir_hack
19181 "
19182 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
19183 if $ac_cs_awk_getline; then
19184 $AWK -f "$ac_tmp/subs.awk"
19185 else
19186 $AWK -f "$ac_tmp/subs.awk" | $SHELL
19187 fi \
19188 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19189
19190 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
19191 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19192 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19193 "$ac_tmp/out"`; test -z "$ac_out"; } &&
19194 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19195 which seems to be undefined. Please make sure it is defined" >&5
19196 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19197 which seems to be undefined. Please make sure it is defined" >&2;}
19198
19199 rm -f "$ac_tmp/stdin"
19200 case $ac_file in
19201 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19202 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
19203 esac \
19204 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19205 ;;
19206 :H)
19207 #
19208 # CONFIG_HEADER
19209 #
19210 if test x"$ac_file" != x-; then
19211 {
19212 $as_echo "/* $configure_input */" \
19213 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19214 } >"$ac_tmp/config.h" \
19215 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19216 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
19217 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19218 $as_echo "$as_me: $ac_file is unchanged" >&6;}
19219 else
19220 rm -f "$ac_file"
19221 mv "$ac_tmp/config.h" "$ac_file" \
19222 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19223 fi
19224 else
19225 $as_echo "/* $configure_input */" \
19226 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
19227 || as_fn_error $? "could not create -" "$LINENO" 5
19228 fi
19229 ;;
19230 :L)
19231 #
19232 # CONFIG_LINK
19233 #
19234
19235 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
19236 :
19237 else
19238 # Prefer the file from the source tree if names are identical.
19239 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
19240 ac_source=$srcdir/$ac_source
19241 fi
19242
19243 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
19244 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
19245
19246 if test ! -r "$ac_source"; then
19247 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
19248 fi
19249 rm -f "$ac_file"
19250
19251 # Try a relative symlink, then a hard link, then a copy.
19252 case $ac_source in
19253 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19254 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19255 esac
19256 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19257 ln "$ac_source" "$ac_file" 2>/dev/null ||
19258 cp -p "$ac_source" "$ac_file" ||
19259 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
19260 fi
19261 ;;
19262 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19263 $as_echo "$as_me: executing $ac_file commands" >&6;}
19264 ;;
19265 esac
19266
19267
19268 case $ac_file$ac_mode in
19269 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
19270 "gcore":F) chmod +x gcore ;;
19271 "Makefile":F)
19272 case x$CONFIG_HEADERS in
19273 xconfig.h:config.in)
19274 echo > stamp-h ;;
19275 esac
19276 ;;
19277 "gdb-gdb.gdb":F)
19278 case x$CONFIG_HEADERS in
19279 xconfig.h:config.in)
19280 echo > stamp-h ;;
19281 esac
19282 ;;
19283 "gdb-gdb.py":F)
19284 case x$CONFIG_HEADERS in
19285 xconfig.h:config.in)
19286 echo > stamp-h ;;
19287 esac
19288 ;;
19289 "doc/Makefile":F)
19290 case x$CONFIG_HEADERS in
19291 xconfig.h:config.in)
19292 echo > stamp-h ;;
19293 esac
19294 ;;
19295 "data-directory/Makefile":F)
19296 case x$CONFIG_HEADERS in
19297 xconfig.h:config.in)
19298 echo > stamp-h ;;
19299 esac
19300 ;;
19301
19302 esac
19303 done # for ac_tag
19304
19305
19306 as_fn_exit 0
19307 _ACEOF
19308 ac_clean_files=$ac_clean_files_save
19309
19310 test $ac_write_fail = 0 ||
19311 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
19312
19313
19314 # configure is writing to config.log, and then calls config.status.
19315 # config.status does its own redirection, appending to config.log.
19316 # Unfortunately, on DOS this fails, as config.log is still kept open
19317 # by configure, so config.status won't be able to write to it; its
19318 # output is simply discarded. So we exec the FD to /dev/null,
19319 # effectively closing config.log, so it can be properly (re)opened and
19320 # appended to by config.status. When coming back to configure, we
19321 # need to make the FD available again.
19322 if test "$no_create" != yes; then
19323 ac_cs_success=:
19324 ac_config_status_args=
19325 test "$silent" = yes &&
19326 ac_config_status_args="$ac_config_status_args --quiet"
19327 exec 5>/dev/null
19328 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19329 exec 5>>config.log
19330 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19331 # would make configure fail if this is the last instruction.
19332 $ac_cs_success || as_fn_exit 1
19333 fi
19334
19335 #
19336 # CONFIG_SUBDIRS section.
19337 #
19338 if test "$no_recursion" != yes; then
19339
19340 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19341 # so they do not pile up.
19342 ac_sub_configure_args=
19343 ac_prev=
19344 eval "set x $ac_configure_args"
19345 shift
19346 for ac_arg
19347 do
19348 if test -n "$ac_prev"; then
19349 ac_prev=
19350 continue
19351 fi
19352 case $ac_arg in
19353 -cache-file | --cache-file | --cache-fil | --cache-fi \
19354 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19355 ac_prev=cache_file ;;
19356 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
19357 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19358 | --c=*)
19359 ;;
19360 --config-cache | -C)
19361 ;;
19362 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19363 ac_prev=srcdir ;;
19364 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19365 ;;
19366 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19367 ac_prev=prefix ;;
19368 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19369 ;;
19370 --disable-option-checking)
19371 ;;
19372 *)
19373 case $ac_arg in
19374 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
19375 esac
19376 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
19377 esac
19378 done
19379
19380 # Always prepend --prefix to ensure using the same prefix
19381 # in subdir configurations.
19382 ac_arg="--prefix=$prefix"
19383 case $ac_arg in
19384 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
19385 esac
19386 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19387
19388 # Pass --silent
19389 if test "$silent" = yes; then
19390 ac_sub_configure_args="--silent $ac_sub_configure_args"
19391 fi
19392
19393 # Always prepend --disable-option-checking to silence warnings, since
19394 # different subdirs can have different --enable and --with options.
19395 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
19396
19397 ac_popdir=`pwd`
19398 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
19399
19400 # Do not complain, so a configure script can configure whichever
19401 # parts of a large source tree are present.
19402 test -d "$srcdir/$ac_dir" || continue
19403
19404 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19405 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19406 $as_echo "$ac_msg" >&6
19407 as_dir="$ac_dir"; as_fn_mkdir_p
19408 ac_builddir=.
19409
19410 case "$ac_dir" in
19411 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19412 *)
19413 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19414 # A ".." for each directory in $ac_dir_suffix.
19415 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19416 case $ac_top_builddir_sub in
19417 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19418 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19419 esac ;;
19420 esac
19421 ac_abs_top_builddir=$ac_pwd
19422 ac_abs_builddir=$ac_pwd$ac_dir_suffix
19423 # for backward compatibility:
19424 ac_top_builddir=$ac_top_build_prefix
19425
19426 case $srcdir in
19427 .) # We are building in place.
19428 ac_srcdir=.
19429 ac_top_srcdir=$ac_top_builddir_sub
19430 ac_abs_top_srcdir=$ac_pwd ;;
19431 [\\/]* | ?:[\\/]* ) # Absolute name.
19432 ac_srcdir=$srcdir$ac_dir_suffix;
19433 ac_top_srcdir=$srcdir
19434 ac_abs_top_srcdir=$srcdir ;;
19435 *) # Relative name.
19436 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19437 ac_top_srcdir=$ac_top_build_prefix$srcdir
19438 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19439 esac
19440 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19441
19442
19443 cd "$ac_dir"
19444
19445 # Check for guested configure; otherwise get Cygnus style configure.
19446 if test -f "$ac_srcdir/configure.gnu"; then
19447 ac_sub_configure=$ac_srcdir/configure.gnu
19448 elif test -f "$ac_srcdir/configure"; then
19449 ac_sub_configure=$ac_srcdir/configure
19450 elif test -f "$ac_srcdir/configure.in"; then
19451 # This should be Cygnus configure.
19452 ac_sub_configure=$ac_aux_dir/configure
19453 else
19454 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19455 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
19456 ac_sub_configure=
19457 fi
19458
19459 # The recursion is here.
19460 if test -n "$ac_sub_configure"; then
19461 # Make the cache file name correct relative to the subdirectory.
19462 case $cache_file in
19463 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
19464 *) # Relative name.
19465 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
19466 esac
19467
19468 { $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
19469 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
19470 # The eval makes quoting arguments work.
19471 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19472 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
19473 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
19474 fi
19475
19476 cd "$ac_popdir"
19477 done
19478 fi
19479 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19480 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19481 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19482 fi
19483
This page took 0.492497 seconds and 5 git commands to generate.