]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/configure
Bump to autoconf 2.69 and automake 1.15.1
[thirdparty/binutils-gdb.git] / gdb / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24 else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50 else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order. Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" "" $as_nl"
88
89 # Find who we are. Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100 IFS=$as_save_IFS
101
102 ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107 as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there. '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168 else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174 esac
175 fi
176 "
177 as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191 exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202 else
203 as_have_required=no
204 fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225 fi
226 fi
227 done;;
228 esac
229 as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271 fi
272 exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290 { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299 return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365 test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378 else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395 else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422 else
423 as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434 else
435 as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509 *)
510 ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516 else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534 else
535 as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542 else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME=
579 PACKAGE_TARNAME=
580 PACKAGE_VERSION=
581 PACKAGE_STRING=
582 PACKAGE_BUGREPORT=
583 PACKAGE_URL=
584
585 ac_unique_file="main.c"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 # include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 # include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 enable_option_checking=no
623 ac_header_list=
624 ac_subst_vars='LTLIBOBJS
625 LIBOBJS
626 GCORE_TRANSFORM_NAME
627 GDB_TRANSFORM_NAME
628 XSLTPROC
629 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 HAVE_NATIVE_GCORE_TARGET
749 TARGET_OBS
750 subdirs
751 GDB_DATADIR
752 DEBUGDIR
753 MAKEINFO_EXTRA_FLAGS
754 MAKEINFOFLAGS
755 MAKEINFO
756 PACKAGE
757 GNULIB_STDINT_H
758 CATOBJEXT
759 GENCAT
760 INSTOBJEXT
761 DATADIRNAME
762 CATALOGS
763 POSUB
764 GMSGFMT
765 XGETTEXT
766 INCINTL
767 LIBINTL_DEP
768 LIBINTL
769 USE_NLS
770 CCDEPMODE
771 DEPDIR
772 am__leading_dot
773 CXX_DIALECT
774 HAVE_CXX11
775 INSTALL_STRIP_PROGRAM
776 STRIP
777 install_sh
778 target_os
779 target_vendor
780 target_cpu
781 target
782 host_os
783 host_vendor
784 host_cpu
785 host
786 build_os
787 build_vendor
788 build_cpu
789 build
790 EGREP
791 GREP
792 CPP
793 ac_ct_CXX
794 CXXFLAGS
795 CXX
796 OBJEXT
797 EXEEXT
798 ac_ct_CC
799 CPPFLAGS
800 LDFLAGS
801 CFLAGS
802 CC
803 MAINT
804 MAINTAINER_MODE_FALSE
805 MAINTAINER_MODE_TRUE
806 target_alias
807 host_alias
808 build_alias
809 LIBS
810 ECHO_T
811 ECHO_N
812 ECHO_C
813 DEFS
814 mandir
815 localedir
816 libdir
817 psdir
818 pdfdir
819 dvidir
820 htmldir
821 infodir
822 docdir
823 oldincludedir
824 includedir
825 localstatedir
826 sharedstatedir
827 sysconfdir
828 datadir
829 datarootdir
830 libexecdir
831 sbindir
832 bindir
833 program_transform_name
834 prefix
835 exec_prefix
836 PACKAGE_URL
837 PACKAGE_BUGREPORT
838 PACKAGE_STRING
839 PACKAGE_VERSION
840 PACKAGE_TARNAME
841 PACKAGE_NAME
842 PATH_SEPARATOR
843 SHELL'
844 ac_subst_files='nat_makefile_frag'
845 ac_user_opts='
846 enable_option_checking
847 enable_maintainer_mode
848 enable_plugins
849 enable_largefile
850 with_separate_debug_dir
851 with_gdb_datadir
852 with_relocated_sources
853 with_auto_load_dir
854 with_auto_load_safe_path
855 enable_targets
856 enable_64_bit_bfd
857 enable_gdbcli
858 enable_gdbmi
859 enable_tui
860 enable_gdbtk
861 with_libunwind_ia64
862 with_curses
863 enable_profiling
864 with_pkgversion
865 with_bugurl
866 with_system_zlib
867 with_gnu_ld
868 enable_rpath
869 with_libiconv_prefix
870 with_iconv_bin
871 with_system_readline
872 with_jit_reader_dir
873 with_expat
874 with_libexpat_prefix
875 with_mpfr
876 with_libmpfr_prefix
877 with_python
878 with_guile
879 enable_libmcheck
880 with_intel_pt
881 with_libipt_prefix
882 with_included_regex
883 with_sysroot
884 with_system_gdbinit
885 enable_werror
886 enable_build_warnings
887 enable_gdb_build_warnings
888 with_lzma
889 with_liblzma_prefix
890 with_tcl
891 with_tk
892 with_x
893 enable_sim
894 enable_multi_ice
895 enable_gdbserver
896 with_babeltrace
897 with_libbabeltrace_prefix
898 '
899 ac_precious_vars='build_alias
900 host_alias
901 target_alias
902 CC
903 CFLAGS
904 LDFLAGS
905 LIBS
906 CPPFLAGS
907 CXX
908 CXXFLAGS
909 CCC
910 CPP
911 MAKEINFO
912 MAKEINFOFLAGS
913 YACC
914 YFLAGS
915 XMKMF'
916 ac_subdirs_all='testsuite
917 gdbtk
918 multi-ice
919 gdbserver'
920
921 # Initialize some variables set by options.
922 ac_init_help=
923 ac_init_version=false
924 ac_unrecognized_opts=
925 ac_unrecognized_sep=
926 # The variables have the same names as the options, with
927 # dashes changed to underlines.
928 cache_file=/dev/null
929 exec_prefix=NONE
930 no_create=
931 no_recursion=
932 prefix=NONE
933 program_prefix=NONE
934 program_suffix=NONE
935 program_transform_name=s,x,x,
936 silent=
937 site=
938 srcdir=
939 verbose=
940 x_includes=NONE
941 x_libraries=NONE
942
943 # Installation directory options.
944 # These are left unexpanded so users can "make install exec_prefix=/foo"
945 # and all the variables that are supposed to be based on exec_prefix
946 # by default will actually change.
947 # Use braces instead of parens because sh, perl, etc. also accept them.
948 # (The list follows the same order as the GNU Coding Standards.)
949 bindir='${exec_prefix}/bin'
950 sbindir='${exec_prefix}/sbin'
951 libexecdir='${exec_prefix}/libexec'
952 datarootdir='${prefix}/share'
953 datadir='${datarootdir}'
954 sysconfdir='${prefix}/etc'
955 sharedstatedir='${prefix}/com'
956 localstatedir='${prefix}/var'
957 includedir='${prefix}/include'
958 oldincludedir='/usr/include'
959 docdir='${datarootdir}/doc/${PACKAGE}'
960 infodir='${datarootdir}/info'
961 htmldir='${docdir}'
962 dvidir='${docdir}'
963 pdfdir='${docdir}'
964 psdir='${docdir}'
965 libdir='${exec_prefix}/lib'
966 localedir='${datarootdir}/locale'
967 mandir='${datarootdir}/man'
968
969 ac_prev=
970 ac_dashdash=
971 for ac_option
972 do
973 # If the previous option needs an argument, assign it.
974 if test -n "$ac_prev"; then
975 eval $ac_prev=\$ac_option
976 ac_prev=
977 continue
978 fi
979
980 case $ac_option in
981 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
982 *=) ac_optarg= ;;
983 *) ac_optarg=yes ;;
984 esac
985
986 # Accept the important Cygnus configure options, so we can diagnose typos.
987
988 case $ac_dashdash$ac_option in
989 --)
990 ac_dashdash=yes ;;
991
992 -bindir | --bindir | --bindi | --bind | --bin | --bi)
993 ac_prev=bindir ;;
994 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
995 bindir=$ac_optarg ;;
996
997 -build | --build | --buil | --bui | --bu)
998 ac_prev=build_alias ;;
999 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1000 build_alias=$ac_optarg ;;
1001
1002 -cache-file | --cache-file | --cache-fil | --cache-fi \
1003 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1004 ac_prev=cache_file ;;
1005 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1006 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1007 cache_file=$ac_optarg ;;
1008
1009 --config-cache | -C)
1010 cache_file=config.cache ;;
1011
1012 -datadir | --datadir | --datadi | --datad)
1013 ac_prev=datadir ;;
1014 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1015 datadir=$ac_optarg ;;
1016
1017 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1018 | --dataroo | --dataro | --datar)
1019 ac_prev=datarootdir ;;
1020 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1021 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1022 datarootdir=$ac_optarg ;;
1023
1024 -disable-* | --disable-*)
1025 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1026 # Reject names that are not valid shell variable names.
1027 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1028 as_fn_error $? "invalid feature name: $ac_useropt"
1029 ac_useropt_orig=$ac_useropt
1030 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1031 case $ac_user_opts in
1032 *"
1033 "enable_$ac_useropt"
1034 "*) ;;
1035 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1036 ac_unrecognized_sep=', ';;
1037 esac
1038 eval enable_$ac_useropt=no ;;
1039
1040 -docdir | --docdir | --docdi | --doc | --do)
1041 ac_prev=docdir ;;
1042 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1043 docdir=$ac_optarg ;;
1044
1045 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1046 ac_prev=dvidir ;;
1047 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1048 dvidir=$ac_optarg ;;
1049
1050 -enable-* | --enable-*)
1051 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1052 # Reject names that are not valid shell variable names.
1053 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1054 as_fn_error $? "invalid feature name: $ac_useropt"
1055 ac_useropt_orig=$ac_useropt
1056 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1057 case $ac_user_opts in
1058 *"
1059 "enable_$ac_useropt"
1060 "*) ;;
1061 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1062 ac_unrecognized_sep=', ';;
1063 esac
1064 eval enable_$ac_useropt=\$ac_optarg ;;
1065
1066 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1067 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1068 | --exec | --exe | --ex)
1069 ac_prev=exec_prefix ;;
1070 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1071 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1072 | --exec=* | --exe=* | --ex=*)
1073 exec_prefix=$ac_optarg ;;
1074
1075 -gas | --gas | --ga | --g)
1076 # Obsolete; use --with-gas.
1077 with_gas=yes ;;
1078
1079 -help | --help | --hel | --he | -h)
1080 ac_init_help=long ;;
1081 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1082 ac_init_help=recursive ;;
1083 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1084 ac_init_help=short ;;
1085
1086 -host | --host | --hos | --ho)
1087 ac_prev=host_alias ;;
1088 -host=* | --host=* | --hos=* | --ho=*)
1089 host_alias=$ac_optarg ;;
1090
1091 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1092 ac_prev=htmldir ;;
1093 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1094 | --ht=*)
1095 htmldir=$ac_optarg ;;
1096
1097 -includedir | --includedir | --includedi | --included | --include \
1098 | --includ | --inclu | --incl | --inc)
1099 ac_prev=includedir ;;
1100 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1101 | --includ=* | --inclu=* | --incl=* | --inc=*)
1102 includedir=$ac_optarg ;;
1103
1104 -infodir | --infodir | --infodi | --infod | --info | --inf)
1105 ac_prev=infodir ;;
1106 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1107 infodir=$ac_optarg ;;
1108
1109 -libdir | --libdir | --libdi | --libd)
1110 ac_prev=libdir ;;
1111 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1112 libdir=$ac_optarg ;;
1113
1114 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1115 | --libexe | --libex | --libe)
1116 ac_prev=libexecdir ;;
1117 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1118 | --libexe=* | --libex=* | --libe=*)
1119 libexecdir=$ac_optarg ;;
1120
1121 -localedir | --localedir | --localedi | --localed | --locale)
1122 ac_prev=localedir ;;
1123 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1124 localedir=$ac_optarg ;;
1125
1126 -localstatedir | --localstatedir | --localstatedi | --localstated \
1127 | --localstate | --localstat | --localsta | --localst | --locals)
1128 ac_prev=localstatedir ;;
1129 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1130 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1131 localstatedir=$ac_optarg ;;
1132
1133 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1134 ac_prev=mandir ;;
1135 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1136 mandir=$ac_optarg ;;
1137
1138 -nfp | --nfp | --nf)
1139 # Obsolete; use --without-fp.
1140 with_fp=no ;;
1141
1142 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1143 | --no-cr | --no-c | -n)
1144 no_create=yes ;;
1145
1146 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1147 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1148 no_recursion=yes ;;
1149
1150 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1151 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1152 | --oldin | --oldi | --old | --ol | --o)
1153 ac_prev=oldincludedir ;;
1154 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1155 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1156 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1157 oldincludedir=$ac_optarg ;;
1158
1159 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1160 ac_prev=prefix ;;
1161 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1162 prefix=$ac_optarg ;;
1163
1164 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1165 | --program-pre | --program-pr | --program-p)
1166 ac_prev=program_prefix ;;
1167 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1168 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1169 program_prefix=$ac_optarg ;;
1170
1171 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1172 | --program-suf | --program-su | --program-s)
1173 ac_prev=program_suffix ;;
1174 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1175 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1176 program_suffix=$ac_optarg ;;
1177
1178 -program-transform-name | --program-transform-name \
1179 | --program-transform-nam | --program-transform-na \
1180 | --program-transform-n | --program-transform- \
1181 | --program-transform | --program-transfor \
1182 | --program-transfo | --program-transf \
1183 | --program-trans | --program-tran \
1184 | --progr-tra | --program-tr | --program-t)
1185 ac_prev=program_transform_name ;;
1186 -program-transform-name=* | --program-transform-name=* \
1187 | --program-transform-nam=* | --program-transform-na=* \
1188 | --program-transform-n=* | --program-transform-=* \
1189 | --program-transform=* | --program-transfor=* \
1190 | --program-transfo=* | --program-transf=* \
1191 | --program-trans=* | --program-tran=* \
1192 | --progr-tra=* | --program-tr=* | --program-t=*)
1193 program_transform_name=$ac_optarg ;;
1194
1195 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1196 ac_prev=pdfdir ;;
1197 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1198 pdfdir=$ac_optarg ;;
1199
1200 -psdir | --psdir | --psdi | --psd | --ps)
1201 ac_prev=psdir ;;
1202 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1203 psdir=$ac_optarg ;;
1204
1205 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1206 | -silent | --silent | --silen | --sile | --sil)
1207 silent=yes ;;
1208
1209 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1210 ac_prev=sbindir ;;
1211 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1212 | --sbi=* | --sb=*)
1213 sbindir=$ac_optarg ;;
1214
1215 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1216 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1217 | --sharedst | --shareds | --shared | --share | --shar \
1218 | --sha | --sh)
1219 ac_prev=sharedstatedir ;;
1220 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1221 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1222 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1223 | --sha=* | --sh=*)
1224 sharedstatedir=$ac_optarg ;;
1225
1226 -site | --site | --sit)
1227 ac_prev=site ;;
1228 -site=* | --site=* | --sit=*)
1229 site=$ac_optarg ;;
1230
1231 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1232 ac_prev=srcdir ;;
1233 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1234 srcdir=$ac_optarg ;;
1235
1236 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1237 | --syscon | --sysco | --sysc | --sys | --sy)
1238 ac_prev=sysconfdir ;;
1239 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1240 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1241 sysconfdir=$ac_optarg ;;
1242
1243 -target | --target | --targe | --targ | --tar | --ta | --t)
1244 ac_prev=target_alias ;;
1245 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1246 target_alias=$ac_optarg ;;
1247
1248 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1249 verbose=yes ;;
1250
1251 -version | --version | --versio | --versi | --vers | -V)
1252 ac_init_version=: ;;
1253
1254 -with-* | --with-*)
1255 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1256 # Reject names that are not valid shell variable names.
1257 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1258 as_fn_error $? "invalid package name: $ac_useropt"
1259 ac_useropt_orig=$ac_useropt
1260 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1261 case $ac_user_opts in
1262 *"
1263 "with_$ac_useropt"
1264 "*) ;;
1265 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1266 ac_unrecognized_sep=', ';;
1267 esac
1268 eval with_$ac_useropt=\$ac_optarg ;;
1269
1270 -without-* | --without-*)
1271 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1272 # Reject names that are not valid shell variable names.
1273 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1274 as_fn_error $? "invalid package name: $ac_useropt"
1275 ac_useropt_orig=$ac_useropt
1276 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1277 case $ac_user_opts in
1278 *"
1279 "with_$ac_useropt"
1280 "*) ;;
1281 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1282 ac_unrecognized_sep=', ';;
1283 esac
1284 eval with_$ac_useropt=no ;;
1285
1286 --x)
1287 # Obsolete; use --with-x.
1288 with_x=yes ;;
1289
1290 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1291 | --x-incl | --x-inc | --x-in | --x-i)
1292 ac_prev=x_includes ;;
1293 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1294 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1295 x_includes=$ac_optarg ;;
1296
1297 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1298 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1299 ac_prev=x_libraries ;;
1300 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1301 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1302 x_libraries=$ac_optarg ;;
1303
1304 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1305 Try \`$0 --help' for more information"
1306 ;;
1307
1308 *=*)
1309 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1310 # Reject names that are not valid shell variable names.
1311 case $ac_envvar in #(
1312 '' | [0-9]* | *[!_$as_cr_alnum]* )
1313 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1314 esac
1315 eval $ac_envvar=\$ac_optarg
1316 export $ac_envvar ;;
1317
1318 *)
1319 # FIXME: should be removed in autoconf 3.0.
1320 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1321 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1322 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1323 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1324 ;;
1325
1326 esac
1327 done
1328
1329 if test -n "$ac_prev"; then
1330 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1331 as_fn_error $? "missing argument to $ac_option"
1332 fi
1333
1334 if test -n "$ac_unrecognized_opts"; then
1335 case $enable_option_checking in
1336 no) ;;
1337 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1338 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1339 esac
1340 fi
1341
1342 # Check all directory arguments for consistency.
1343 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1344 datadir sysconfdir sharedstatedir localstatedir includedir \
1345 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1346 libdir localedir mandir
1347 do
1348 eval ac_val=\$$ac_var
1349 # Remove trailing slashes.
1350 case $ac_val in
1351 */ )
1352 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1353 eval $ac_var=\$ac_val;;
1354 esac
1355 # Be sure to have absolute directory names.
1356 case $ac_val in
1357 [\\/$]* | ?:[\\/]* ) continue;;
1358 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1359 esac
1360 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1361 done
1362
1363 # There might be people who depend on the old broken behavior: `$host'
1364 # used to hold the argument of --host etc.
1365 # FIXME: To remove some day.
1366 build=$build_alias
1367 host=$host_alias
1368 target=$target_alias
1369
1370 # FIXME: To remove some day.
1371 if test "x$host_alias" != x; then
1372 if test "x$build_alias" = x; then
1373 cross_compiling=maybe
1374 elif test "x$build_alias" != "x$host_alias"; then
1375 cross_compiling=yes
1376 fi
1377 fi
1378
1379 ac_tool_prefix=
1380 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1381
1382 test "$silent" = yes && exec 6>/dev/null
1383
1384
1385 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1386 ac_ls_di=`ls -di .` &&
1387 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1388 as_fn_error $? "working directory cannot be determined"
1389 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1390 as_fn_error $? "pwd does not report name of working directory"
1391
1392
1393 # Find the source files, if location was not specified.
1394 if test -z "$srcdir"; then
1395 ac_srcdir_defaulted=yes
1396 # Try the directory containing this script, then the parent directory.
1397 ac_confdir=`$as_dirname -- "$as_myself" ||
1398 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1399 X"$as_myself" : 'X\(//\)[^/]' \| \
1400 X"$as_myself" : 'X\(//\)$' \| \
1401 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1402 $as_echo X"$as_myself" |
1403 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1404 s//\1/
1405 q
1406 }
1407 /^X\(\/\/\)[^/].*/{
1408 s//\1/
1409 q
1410 }
1411 /^X\(\/\/\)$/{
1412 s//\1/
1413 q
1414 }
1415 /^X\(\/\).*/{
1416 s//\1/
1417 q
1418 }
1419 s/.*/./; q'`
1420 srcdir=$ac_confdir
1421 if test ! -r "$srcdir/$ac_unique_file"; then
1422 srcdir=..
1423 fi
1424 else
1425 ac_srcdir_defaulted=no
1426 fi
1427 if test ! -r "$srcdir/$ac_unique_file"; then
1428 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1429 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1430 fi
1431 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1432 ac_abs_confdir=`(
1433 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1434 pwd)`
1435 # When building in place, set srcdir=.
1436 if test "$ac_abs_confdir" = "$ac_pwd"; then
1437 srcdir=.
1438 fi
1439 # Remove unnecessary trailing slashes from srcdir.
1440 # Double slashes in file names in object file debugging info
1441 # mess up M-x gdb in Emacs.
1442 case $srcdir in
1443 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1444 esac
1445 for ac_var in $ac_precious_vars; do
1446 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1447 eval ac_env_${ac_var}_value=\$${ac_var}
1448 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1449 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1450 done
1451
1452 #
1453 # Report the --help message.
1454 #
1455 if test "$ac_init_help" = "long"; then
1456 # Omit some internal or obsolete options to make the list less imposing.
1457 # This message is too long to be a string in the A/UX 3.1 sh.
1458 cat <<_ACEOF
1459 \`configure' configures this package to adapt to many kinds of systems.
1460
1461 Usage: $0 [OPTION]... [VAR=VALUE]...
1462
1463 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1464 VAR=VALUE. See below for descriptions of some of the useful variables.
1465
1466 Defaults for the options are specified in brackets.
1467
1468 Configuration:
1469 -h, --help display this help and exit
1470 --help=short display options specific to this package
1471 --help=recursive display the short help of all the included packages
1472 -V, --version display version information and exit
1473 -q, --quiet, --silent do not print \`checking ...' messages
1474 --cache-file=FILE cache test results in FILE [disabled]
1475 -C, --config-cache alias for \`--cache-file=config.cache'
1476 -n, --no-create do not create output files
1477 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1478
1479 Installation directories:
1480 --prefix=PREFIX install architecture-independent files in PREFIX
1481 [$ac_default_prefix]
1482 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1483 [PREFIX]
1484
1485 By default, \`make install' will install all the files in
1486 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1487 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1488 for instance \`--prefix=\$HOME'.
1489
1490 For better control, use the options below.
1491
1492 Fine tuning of the installation directories:
1493 --bindir=DIR user executables [EPREFIX/bin]
1494 --sbindir=DIR system admin executables [EPREFIX/sbin]
1495 --libexecdir=DIR program executables [EPREFIX/libexec]
1496 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1497 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1498 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1499 --libdir=DIR object code libraries [EPREFIX/lib]
1500 --includedir=DIR C header files [PREFIX/include]
1501 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1502 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1503 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1504 --infodir=DIR info documentation [DATAROOTDIR/info]
1505 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1506 --mandir=DIR man documentation [DATAROOTDIR/man]
1507 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1508 --htmldir=DIR html documentation [DOCDIR]
1509 --dvidir=DIR dvi documentation [DOCDIR]
1510 --pdfdir=DIR pdf documentation [DOCDIR]
1511 --psdir=DIR ps documentation [DOCDIR]
1512 _ACEOF
1513
1514 cat <<\_ACEOF
1515
1516 Program names:
1517 --program-prefix=PREFIX prepend PREFIX to installed program names
1518 --program-suffix=SUFFIX append SUFFIX to installed program names
1519 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1520
1521 X features:
1522 --x-includes=DIR X include files are in DIR
1523 --x-libraries=DIR X library files are in DIR
1524
1525 System types:
1526 --build=BUILD configure for building on BUILD [guessed]
1527 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1528 --target=TARGET configure for building compilers for TARGET [HOST]
1529 _ACEOF
1530 fi
1531
1532 if test -n "$ac_init_help"; then
1533
1534 cat <<\_ACEOF
1535
1536 Optional Features:
1537 --disable-option-checking ignore unrecognized --enable/--with options
1538 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1539 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1540 --enable-maintainer-mode
1541 enable make rules and dependencies not useful (and
1542 sometimes confusing) to the casual installer
1543 --enable-plugins Enable support for plugins
1544 --disable-largefile omit support for large files
1545 --enable-targets=TARGETS
1546 alternative target configurations
1547 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
1548 --disable-gdbcli disable command-line interface (CLI)
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 --disable-rpath do not hardcode runtime library paths
1554 --enable-libmcheck Try linking with -lmcheck if available
1555 --enable-werror treat compile warnings as errors
1556 --enable-build-warnings enable build-time compiler warnings if gcc is used
1557 --enable-gdb-build-warnings
1558 enable GDB specific build-time compiler warnings if
1559 gcc is used
1560 --enable-sim link gdb with simulator
1561 --enable-multi-ice build the multi-ice-gdb-server
1562 --enable-gdbserver automatically build gdbserver (yes/no/auto, default
1563 is auto)
1564
1565 Optional Packages:
1566 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1567 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1568 --with-separate-debug-dir=PATH
1569 look for global separate debug info in this path
1570 [LIBDIR/debug]
1571 --with-gdb-datadir=PATH look for global separate data files in this path
1572 [DATADIR/gdb]
1573 --with-relocated-sources=PATH
1574 automatically relocate this path for source files
1575 --with-auto-load-dir=PATH
1576 directories from which to load auto-loaded scripts
1577 [$debugdir:$datadir/auto-load]
1578 --with-auto-load-safe-path=PATH
1579 directories safe to hold auto-loaded files
1580 [--with-auto-load-dir]
1581 --without-auto-load-safe-path
1582 do not restrict auto-loaded files locations
1583 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
1584 --with-curses use the curses library instead of the termcap
1585 library
1586 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1587 --with-bugurl=URL Direct users to URL to report a bug
1588 --with-system-zlib use installed libz
1589 --with-gnu-ld assume the C compiler uses GNU ld default=no
1590 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1591 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1592 --with-iconv-bin=PATH specify where to find the iconv program
1593 --with-system-readline use installed readline library
1594 --with-jit-reader-dir=PATH
1595 directory to load the JIT readers from
1596 --with-expat include expat support (auto/yes/no)
1597 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1598 --without-libexpat-prefix don't search for libexpat in includedir and libdir
1599 --with-mpfr include MPFR support (auto/yes/no)
1600 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1601 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
1602 --with-python[=PYTHON] include python support
1603 (auto/yes/no/<python-program>)
1604 --with-guile[=GUILE] include guile support
1605 (auto/yes/no/<guile-version>/<pkg-config-program>)
1606 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1607 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1608 --without-libipt-prefix don't search for libipt in includedir and libdir
1609 --without-included-regex
1610 don't use included regex; this is the default on
1611 systems with version 2 of the GNU C library (use
1612 with caution on other system)
1613 --with-sysroot[=DIR] search for usr/lib et al within DIR
1614 --with-system-gdbinit=PATH
1615 automatically load a system-wide gdbinit file
1616 --with-lzma support lzma compression (auto/yes/no)
1617 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1618 --without-liblzma-prefix don't search for liblzma in includedir and libdir
1619 --with-tcl directory containing tcl configuration (tclConfig.sh)
1620 --with-tk directory containing tk configuration (tkConfig.sh)
1621 --with-x use the X Window System
1622 --with-babeltrace include babeltrace support (auto/yes/no)
1623 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1624 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
1625
1626 Some influential environment variables:
1627 CC C compiler command
1628 CFLAGS C compiler flags
1629 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1630 nonstandard directory <lib dir>
1631 LIBS libraries to pass to the linker, e.g. -l<library>
1632 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1633 you have headers in a nonstandard directory <include dir>
1634 CXX C++ compiler command
1635 CXXFLAGS C++ compiler flags
1636 CPP C preprocessor
1637 MAKEINFO Parent configure detects if it is of sufficient version.
1638 MAKEINFOFLAGS
1639 Parameters for MAKEINFO.
1640 YACC The `Yet Another Compiler Compiler' implementation to use.
1641 Defaults to the first program found out of: `bison -y', `byacc',
1642 `yacc'.
1643 YFLAGS The list of arguments that will be passed by default to $YACC.
1644 This script will default YFLAGS to the empty string to avoid a
1645 default value of `-d' given by some make applications.
1646 XMKMF Path to xmkmf, Makefile generator for X Window System
1647
1648 Use these variables to override the choices made by `configure' or to help
1649 it to find libraries and programs with nonstandard names/locations.
1650
1651 Report bugs to the package provider.
1652 _ACEOF
1653 ac_status=$?
1654 fi
1655
1656 if test "$ac_init_help" = "recursive"; then
1657 # If there are subdirs, report their specific --help.
1658 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1659 test -d "$ac_dir" ||
1660 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1661 continue
1662 ac_builddir=.
1663
1664 case "$ac_dir" in
1665 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1666 *)
1667 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1668 # A ".." for each directory in $ac_dir_suffix.
1669 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1670 case $ac_top_builddir_sub in
1671 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1672 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1673 esac ;;
1674 esac
1675 ac_abs_top_builddir=$ac_pwd
1676 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1677 # for backward compatibility:
1678 ac_top_builddir=$ac_top_build_prefix
1679
1680 case $srcdir in
1681 .) # We are building in place.
1682 ac_srcdir=.
1683 ac_top_srcdir=$ac_top_builddir_sub
1684 ac_abs_top_srcdir=$ac_pwd ;;
1685 [\\/]* | ?:[\\/]* ) # Absolute name.
1686 ac_srcdir=$srcdir$ac_dir_suffix;
1687 ac_top_srcdir=$srcdir
1688 ac_abs_top_srcdir=$srcdir ;;
1689 *) # Relative name.
1690 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1691 ac_top_srcdir=$ac_top_build_prefix$srcdir
1692 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1693 esac
1694 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1695
1696 cd "$ac_dir" || { ac_status=$?; continue; }
1697 # Check for guested configure.
1698 if test -f "$ac_srcdir/configure.gnu"; then
1699 echo &&
1700 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1701 elif test -f "$ac_srcdir/configure"; then
1702 echo &&
1703 $SHELL "$ac_srcdir/configure" --help=recursive
1704 else
1705 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1706 fi || ac_status=$?
1707 cd "$ac_pwd" || { ac_status=$?; break; }
1708 done
1709 fi
1710
1711 test -n "$ac_init_help" && exit $ac_status
1712 if $ac_init_version; then
1713 cat <<\_ACEOF
1714 configure
1715 generated by GNU Autoconf 2.69
1716
1717 Copyright (C) 2012 Free Software Foundation, Inc.
1718 This configure script is free software; the Free Software Foundation
1719 gives unlimited permission to copy, distribute and modify it.
1720 _ACEOF
1721 exit
1722 fi
1723
1724 ## ------------------------ ##
1725 ## Autoconf initialization. ##
1726 ## ------------------------ ##
1727
1728 # ac_fn_c_try_compile LINENO
1729 # --------------------------
1730 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1731 ac_fn_c_try_compile ()
1732 {
1733 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1734 rm -f conftest.$ac_objext
1735 if { { ac_try="$ac_compile"
1736 case "(($ac_try" in
1737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1738 *) ac_try_echo=$ac_try;;
1739 esac
1740 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1741 $as_echo "$ac_try_echo"; } >&5
1742 (eval "$ac_compile") 2>conftest.err
1743 ac_status=$?
1744 if test -s conftest.err; then
1745 grep -v '^ *+' conftest.err >conftest.er1
1746 cat conftest.er1 >&5
1747 mv -f conftest.er1 conftest.err
1748 fi
1749 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1750 test $ac_status = 0; } && {
1751 test -z "$ac_c_werror_flag" ||
1752 test ! -s conftest.err
1753 } && test -s conftest.$ac_objext; then :
1754 ac_retval=0
1755 else
1756 $as_echo "$as_me: failed program was:" >&5
1757 sed 's/^/| /' conftest.$ac_ext >&5
1758
1759 ac_retval=1
1760 fi
1761 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1762 as_fn_set_status $ac_retval
1763
1764 } # ac_fn_c_try_compile
1765
1766 # ac_fn_cxx_try_compile LINENO
1767 # ----------------------------
1768 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1769 ac_fn_cxx_try_compile ()
1770 {
1771 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1772 rm -f conftest.$ac_objext
1773 if { { ac_try="$ac_compile"
1774 case "(($ac_try" in
1775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1776 *) ac_try_echo=$ac_try;;
1777 esac
1778 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1779 $as_echo "$ac_try_echo"; } >&5
1780 (eval "$ac_compile") 2>conftest.err
1781 ac_status=$?
1782 if test -s conftest.err; then
1783 grep -v '^ *+' conftest.err >conftest.er1
1784 cat conftest.er1 >&5
1785 mv -f conftest.er1 conftest.err
1786 fi
1787 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1788 test $ac_status = 0; } && {
1789 test -z "$ac_cxx_werror_flag" ||
1790 test ! -s conftest.err
1791 } && test -s conftest.$ac_objext; then :
1792 ac_retval=0
1793 else
1794 $as_echo "$as_me: failed program was:" >&5
1795 sed 's/^/| /' conftest.$ac_ext >&5
1796
1797 ac_retval=1
1798 fi
1799 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1800 as_fn_set_status $ac_retval
1801
1802 } # ac_fn_cxx_try_compile
1803
1804 # ac_fn_c_try_cpp LINENO
1805 # ----------------------
1806 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1807 ac_fn_c_try_cpp ()
1808 {
1809 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1810 if { { ac_try="$ac_cpp conftest.$ac_ext"
1811 case "(($ac_try" in
1812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1813 *) ac_try_echo=$ac_try;;
1814 esac
1815 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1816 $as_echo "$ac_try_echo"; } >&5
1817 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1818 ac_status=$?
1819 if test -s conftest.err; then
1820 grep -v '^ *+' conftest.err >conftest.er1
1821 cat conftest.er1 >&5
1822 mv -f conftest.er1 conftest.err
1823 fi
1824 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1825 test $ac_status = 0; } > conftest.i && {
1826 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1827 test ! -s conftest.err
1828 }; then :
1829 ac_retval=0
1830 else
1831 $as_echo "$as_me: failed program was:" >&5
1832 sed 's/^/| /' conftest.$ac_ext >&5
1833
1834 ac_retval=1
1835 fi
1836 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1837 as_fn_set_status $ac_retval
1838
1839 } # ac_fn_c_try_cpp
1840
1841 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1842 # -------------------------------------------------------
1843 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1844 # the include files in INCLUDES and setting the cache variable VAR
1845 # accordingly.
1846 ac_fn_c_check_header_mongrel ()
1847 {
1848 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1849 if eval \${$3+:} false; then :
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1851 $as_echo_n "checking for $2... " >&6; }
1852 if eval \${$3+:} false; then :
1853 $as_echo_n "(cached) " >&6
1854 fi
1855 eval ac_res=\$$3
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1857 $as_echo "$ac_res" >&6; }
1858 else
1859 # Is the header compilable?
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1861 $as_echo_n "checking $2 usability... " >&6; }
1862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1863 /* end confdefs.h. */
1864 $4
1865 #include <$2>
1866 _ACEOF
1867 if ac_fn_c_try_compile "$LINENO"; then :
1868 ac_header_compiler=yes
1869 else
1870 ac_header_compiler=no
1871 fi
1872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1874 $as_echo "$ac_header_compiler" >&6; }
1875
1876 # Is the header present?
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1878 $as_echo_n "checking $2 presence... " >&6; }
1879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1880 /* end confdefs.h. */
1881 #include <$2>
1882 _ACEOF
1883 if ac_fn_c_try_cpp "$LINENO"; then :
1884 ac_header_preproc=yes
1885 else
1886 ac_header_preproc=no
1887 fi
1888 rm -f conftest.err conftest.i conftest.$ac_ext
1889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1890 $as_echo "$ac_header_preproc" >&6; }
1891
1892 # So? What about this header?
1893 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1894 yes:no: )
1895 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1896 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1897 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1898 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1899 ;;
1900 no:yes:* )
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1902 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1903 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1904 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1906 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1908 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1910 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1911 ;;
1912 esac
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1914 $as_echo_n "checking for $2... " >&6; }
1915 if eval \${$3+:} false; then :
1916 $as_echo_n "(cached) " >&6
1917 else
1918 eval "$3=\$ac_header_compiler"
1919 fi
1920 eval ac_res=\$$3
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1922 $as_echo "$ac_res" >&6; }
1923 fi
1924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1925
1926 } # ac_fn_c_check_header_mongrel
1927
1928 # ac_fn_c_try_run LINENO
1929 # ----------------------
1930 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1931 # that executables *can* be run.
1932 ac_fn_c_try_run ()
1933 {
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 if { { ac_try="$ac_link"
1936 case "(($ac_try" in
1937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1938 *) ac_try_echo=$ac_try;;
1939 esac
1940 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1941 $as_echo "$ac_try_echo"; } >&5
1942 (eval "$ac_link") 2>&5
1943 ac_status=$?
1944 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1945 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1946 { { case "(($ac_try" in
1947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1948 *) ac_try_echo=$ac_try;;
1949 esac
1950 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1951 $as_echo "$ac_try_echo"; } >&5
1952 (eval "$ac_try") 2>&5
1953 ac_status=$?
1954 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1955 test $ac_status = 0; }; }; then :
1956 ac_retval=0
1957 else
1958 $as_echo "$as_me: program exited with status $ac_status" >&5
1959 $as_echo "$as_me: failed program was:" >&5
1960 sed 's/^/| /' conftest.$ac_ext >&5
1961
1962 ac_retval=$ac_status
1963 fi
1964 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1965 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1966 as_fn_set_status $ac_retval
1967
1968 } # ac_fn_c_try_run
1969
1970 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1971 # -------------------------------------------------------
1972 # Tests whether HEADER exists and can be compiled using the include files in
1973 # INCLUDES, setting the cache variable VAR accordingly.
1974 ac_fn_c_check_header_compile ()
1975 {
1976 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1978 $as_echo_n "checking for $2... " >&6; }
1979 if eval \${$3+:} false; then :
1980 $as_echo_n "(cached) " >&6
1981 else
1982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1983 /* end confdefs.h. */
1984 $4
1985 #include <$2>
1986 _ACEOF
1987 if ac_fn_c_try_compile "$LINENO"; then :
1988 eval "$3=yes"
1989 else
1990 eval "$3=no"
1991 fi
1992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1993 fi
1994 eval ac_res=\$$3
1995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1996 $as_echo "$ac_res" >&6; }
1997 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1998
1999 } # ac_fn_c_check_header_compile
2000
2001 # ac_fn_c_try_link LINENO
2002 # -----------------------
2003 # Try to link conftest.$ac_ext, and return whether this succeeded.
2004 ac_fn_c_try_link ()
2005 {
2006 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2007 rm -f conftest.$ac_objext conftest$ac_exeext
2008 if { { ac_try="$ac_link"
2009 case "(($ac_try" in
2010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2011 *) ac_try_echo=$ac_try;;
2012 esac
2013 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2014 $as_echo "$ac_try_echo"; } >&5
2015 (eval "$ac_link") 2>conftest.err
2016 ac_status=$?
2017 if test -s conftest.err; then
2018 grep -v '^ *+' conftest.err >conftest.er1
2019 cat conftest.er1 >&5
2020 mv -f conftest.er1 conftest.err
2021 fi
2022 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2023 test $ac_status = 0; } && {
2024 test -z "$ac_c_werror_flag" ||
2025 test ! -s conftest.err
2026 } && test -s conftest$ac_exeext && {
2027 test "$cross_compiling" = yes ||
2028 test -x conftest$ac_exeext
2029 }; then :
2030 ac_retval=0
2031 else
2032 $as_echo "$as_me: failed program was:" >&5
2033 sed 's/^/| /' conftest.$ac_ext >&5
2034
2035 ac_retval=1
2036 fi
2037 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2038 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2039 # interfere with the next link command; also delete a directory that is
2040 # left behind by Apple's compiler. We do this before executing the actions.
2041 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2042 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2043 as_fn_set_status $ac_retval
2044
2045 } # ac_fn_c_try_link
2046
2047 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2048 # --------------------------------------------
2049 # Tries to find the compile-time value of EXPR in a program that includes
2050 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2051 # computed
2052 ac_fn_c_compute_int ()
2053 {
2054 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2055 if test "$cross_compiling" = yes; then
2056 # Depending upon the size, compute the lo and hi bounds.
2057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058 /* end confdefs.h. */
2059 $4
2060 int
2061 main ()
2062 {
2063 static int test_array [1 - 2 * !(($2) >= 0)];
2064 test_array [0] = 0;
2065 return test_array [0];
2066
2067 ;
2068 return 0;
2069 }
2070 _ACEOF
2071 if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_lo=0 ac_mid=0
2073 while :; do
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075 /* end confdefs.h. */
2076 $4
2077 int
2078 main ()
2079 {
2080 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2081 test_array [0] = 0;
2082 return test_array [0];
2083
2084 ;
2085 return 0;
2086 }
2087 _ACEOF
2088 if ac_fn_c_try_compile "$LINENO"; then :
2089 ac_hi=$ac_mid; break
2090 else
2091 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2092 if test $ac_lo -le $ac_mid; then
2093 ac_lo= ac_hi=
2094 break
2095 fi
2096 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2097 fi
2098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099 done
2100 else
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102 /* end confdefs.h. */
2103 $4
2104 int
2105 main ()
2106 {
2107 static int test_array [1 - 2 * !(($2) < 0)];
2108 test_array [0] = 0;
2109 return test_array [0];
2110
2111 ;
2112 return 0;
2113 }
2114 _ACEOF
2115 if ac_fn_c_try_compile "$LINENO"; then :
2116 ac_hi=-1 ac_mid=-1
2117 while :; do
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119 /* end confdefs.h. */
2120 $4
2121 int
2122 main ()
2123 {
2124 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2125 test_array [0] = 0;
2126 return test_array [0];
2127
2128 ;
2129 return 0;
2130 }
2131 _ACEOF
2132 if ac_fn_c_try_compile "$LINENO"; then :
2133 ac_lo=$ac_mid; break
2134 else
2135 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2136 if test $ac_mid -le $ac_hi; then
2137 ac_lo= ac_hi=
2138 break
2139 fi
2140 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2141 fi
2142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143 done
2144 else
2145 ac_lo= ac_hi=
2146 fi
2147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2148 fi
2149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150 # Binary search between lo and hi bounds.
2151 while test "x$ac_lo" != "x$ac_hi"; do
2152 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2154 /* end confdefs.h. */
2155 $4
2156 int
2157 main ()
2158 {
2159 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2160 test_array [0] = 0;
2161 return test_array [0];
2162
2163 ;
2164 return 0;
2165 }
2166 _ACEOF
2167 if ac_fn_c_try_compile "$LINENO"; then :
2168 ac_hi=$ac_mid
2169 else
2170 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2171 fi
2172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2173 done
2174 case $ac_lo in #((
2175 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2176 '') ac_retval=1 ;;
2177 esac
2178 else
2179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2180 /* end confdefs.h. */
2181 $4
2182 static long int longval () { return $2; }
2183 static unsigned long int ulongval () { return $2; }
2184 #include <stdio.h>
2185 #include <stdlib.h>
2186 int
2187 main ()
2188 {
2189
2190 FILE *f = fopen ("conftest.val", "w");
2191 if (! f)
2192 return 1;
2193 if (($2) < 0)
2194 {
2195 long int i = longval ();
2196 if (i != ($2))
2197 return 1;
2198 fprintf (f, "%ld", i);
2199 }
2200 else
2201 {
2202 unsigned long int i = ulongval ();
2203 if (i != ($2))
2204 return 1;
2205 fprintf (f, "%lu", i);
2206 }
2207 /* Do not output a trailing newline, as this causes \r\n confusion
2208 on some platforms. */
2209 return ferror (f) || fclose (f) != 0;
2210
2211 ;
2212 return 0;
2213 }
2214 _ACEOF
2215 if ac_fn_c_try_run "$LINENO"; then :
2216 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2217 else
2218 ac_retval=1
2219 fi
2220 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2221 conftest.$ac_objext conftest.beam conftest.$ac_ext
2222 rm -f conftest.val
2223
2224 fi
2225 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2226 as_fn_set_status $ac_retval
2227
2228 } # ac_fn_c_compute_int
2229
2230 # ac_fn_c_check_func LINENO FUNC VAR
2231 # ----------------------------------
2232 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2233 ac_fn_c_check_func ()
2234 {
2235 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2237 $as_echo_n "checking for $2... " >&6; }
2238 if eval \${$3+:} false; then :
2239 $as_echo_n "(cached) " >&6
2240 else
2241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242 /* end confdefs.h. */
2243 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2244 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2245 #define $2 innocuous_$2
2246
2247 /* System header to define __stub macros and hopefully few prototypes,
2248 which can conflict with char $2 (); below.
2249 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2250 <limits.h> exists even on freestanding compilers. */
2251
2252 #ifdef __STDC__
2253 # include <limits.h>
2254 #else
2255 # include <assert.h>
2256 #endif
2257
2258 #undef $2
2259
2260 /* Override any GCC internal prototype to avoid an error.
2261 Use char because int might match the return type of a GCC
2262 builtin and then its argument prototype would still apply. */
2263 #ifdef __cplusplus
2264 extern "C"
2265 #endif
2266 char $2 ();
2267 /* The GNU C library defines this for functions which it implements
2268 to always fail with ENOSYS. Some functions are actually named
2269 something starting with __ and the normal name is an alias. */
2270 #if defined __stub_$2 || defined __stub___$2
2271 choke me
2272 #endif
2273
2274 int
2275 main ()
2276 {
2277 return $2 ();
2278 ;
2279 return 0;
2280 }
2281 _ACEOF
2282 if ac_fn_c_try_link "$LINENO"; then :
2283 eval "$3=yes"
2284 else
2285 eval "$3=no"
2286 fi
2287 rm -f core conftest.err conftest.$ac_objext \
2288 conftest$ac_exeext conftest.$ac_ext
2289 fi
2290 eval ac_res=\$$3
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2292 $as_echo "$ac_res" >&6; }
2293 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2294
2295 } # ac_fn_c_check_func
2296
2297 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2298 # ----------------------------------------------------
2299 # Tries to find if the field MEMBER exists in type AGGR, after including
2300 # INCLUDES, setting cache variable VAR accordingly.
2301 ac_fn_c_check_member ()
2302 {
2303 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2305 $as_echo_n "checking for $2.$3... " >&6; }
2306 if eval \${$4+:} false; then :
2307 $as_echo_n "(cached) " >&6
2308 else
2309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310 /* end confdefs.h. */
2311 $5
2312 int
2313 main ()
2314 {
2315 static $2 ac_aggr;
2316 if (ac_aggr.$3)
2317 return 0;
2318 ;
2319 return 0;
2320 }
2321 _ACEOF
2322 if ac_fn_c_try_compile "$LINENO"; then :
2323 eval "$4=yes"
2324 else
2325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2326 /* end confdefs.h. */
2327 $5
2328 int
2329 main ()
2330 {
2331 static $2 ac_aggr;
2332 if (sizeof ac_aggr.$3)
2333 return 0;
2334 ;
2335 return 0;
2336 }
2337 _ACEOF
2338 if ac_fn_c_try_compile "$LINENO"; then :
2339 eval "$4=yes"
2340 else
2341 eval "$4=no"
2342 fi
2343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2344 fi
2345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346 fi
2347 eval ac_res=\$$4
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2349 $as_echo "$ac_res" >&6; }
2350 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2351
2352 } # ac_fn_c_check_member
2353
2354 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2355 # -------------------------------------------
2356 # Tests whether TYPE exists after having included INCLUDES, setting cache
2357 # variable VAR accordingly.
2358 ac_fn_c_check_type ()
2359 {
2360 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2362 $as_echo_n "checking for $2... " >&6; }
2363 if eval \${$3+:} false; then :
2364 $as_echo_n "(cached) " >&6
2365 else
2366 eval "$3=no"
2367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2368 /* end confdefs.h. */
2369 $4
2370 int
2371 main ()
2372 {
2373 if (sizeof ($2))
2374 return 0;
2375 ;
2376 return 0;
2377 }
2378 _ACEOF
2379 if ac_fn_c_try_compile "$LINENO"; then :
2380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2381 /* end confdefs.h. */
2382 $4
2383 int
2384 main ()
2385 {
2386 if (sizeof (($2)))
2387 return 0;
2388 ;
2389 return 0;
2390 }
2391 _ACEOF
2392 if ac_fn_c_try_compile "$LINENO"; then :
2393
2394 else
2395 eval "$3=yes"
2396 fi
2397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2398 fi
2399 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2400 fi
2401 eval ac_res=\$$3
2402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2403 $as_echo "$ac_res" >&6; }
2404 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2405
2406 } # ac_fn_c_check_type
2407
2408 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2409 # ---------------------------------------------
2410 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2411 # accordingly.
2412 ac_fn_c_check_decl ()
2413 {
2414 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2415 as_decl_name=`echo $2|sed 's/ *(.*//'`
2416 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2418 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2419 if eval \${$3+:} false; then :
2420 $as_echo_n "(cached) " >&6
2421 else
2422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2423 /* end confdefs.h. */
2424 $4
2425 int
2426 main ()
2427 {
2428 #ifndef $as_decl_name
2429 #ifdef __cplusplus
2430 (void) $as_decl_use;
2431 #else
2432 (void) $as_decl_name;
2433 #endif
2434 #endif
2435
2436 ;
2437 return 0;
2438 }
2439 _ACEOF
2440 if ac_fn_c_try_compile "$LINENO"; then :
2441 eval "$3=yes"
2442 else
2443 eval "$3=no"
2444 fi
2445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2446 fi
2447 eval ac_res=\$$3
2448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2449 $as_echo "$ac_res" >&6; }
2450 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2451
2452 } # ac_fn_c_check_decl
2453 cat >config.log <<_ACEOF
2454 This file contains any messages produced by compilers while
2455 running configure, to aid debugging if configure makes a mistake.
2456
2457 It was created by $as_me, which was
2458 generated by GNU Autoconf 2.69. Invocation command line was
2459
2460 $ $0 $@
2461
2462 _ACEOF
2463 exec 5>>config.log
2464 {
2465 cat <<_ASUNAME
2466 ## --------- ##
2467 ## Platform. ##
2468 ## --------- ##
2469
2470 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2471 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2472 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2473 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2474 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2475
2476 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2477 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2478
2479 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2480 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2481 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2482 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2483 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2484 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2485 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2486
2487 _ASUNAME
2488
2489 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2490 for as_dir in $PATH
2491 do
2492 IFS=$as_save_IFS
2493 test -z "$as_dir" && as_dir=.
2494 $as_echo "PATH: $as_dir"
2495 done
2496 IFS=$as_save_IFS
2497
2498 } >&5
2499
2500 cat >&5 <<_ACEOF
2501
2502
2503 ## ----------- ##
2504 ## Core tests. ##
2505 ## ----------- ##
2506
2507 _ACEOF
2508
2509
2510 # Keep a trace of the command line.
2511 # Strip out --no-create and --no-recursion so they do not pile up.
2512 # Strip out --silent because we don't want to record it for future runs.
2513 # Also quote any args containing shell meta-characters.
2514 # Make two passes to allow for proper duplicate-argument suppression.
2515 ac_configure_args=
2516 ac_configure_args0=
2517 ac_configure_args1=
2518 ac_must_keep_next=false
2519 for ac_pass in 1 2
2520 do
2521 for ac_arg
2522 do
2523 case $ac_arg in
2524 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2525 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2526 | -silent | --silent | --silen | --sile | --sil)
2527 continue ;;
2528 *\'*)
2529 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2530 esac
2531 case $ac_pass in
2532 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2533 2)
2534 as_fn_append ac_configure_args1 " '$ac_arg'"
2535 if test $ac_must_keep_next = true; then
2536 ac_must_keep_next=false # Got value, back to normal.
2537 else
2538 case $ac_arg in
2539 *=* | --config-cache | -C | -disable-* | --disable-* \
2540 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2541 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2542 | -with-* | --with-* | -without-* | --without-* | --x)
2543 case "$ac_configure_args0 " in
2544 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2545 esac
2546 ;;
2547 -* ) ac_must_keep_next=true ;;
2548 esac
2549 fi
2550 as_fn_append ac_configure_args " '$ac_arg'"
2551 ;;
2552 esac
2553 done
2554 done
2555 { ac_configure_args0=; unset ac_configure_args0;}
2556 { ac_configure_args1=; unset ac_configure_args1;}
2557
2558 # When interrupted or exit'd, cleanup temporary files, and complete
2559 # config.log. We remove comments because anyway the quotes in there
2560 # would cause problems or look ugly.
2561 # WARNING: Use '\'' to represent an apostrophe within the trap.
2562 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2563 trap 'exit_status=$?
2564 # Save into config.log some information that might help in debugging.
2565 {
2566 echo
2567
2568 $as_echo "## ---------------- ##
2569 ## Cache variables. ##
2570 ## ---------------- ##"
2571 echo
2572 # The following way of writing the cache mishandles newlines in values,
2573 (
2574 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2575 eval ac_val=\$$ac_var
2576 case $ac_val in #(
2577 *${as_nl}*)
2578 case $ac_var in #(
2579 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2580 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2581 esac
2582 case $ac_var in #(
2583 _ | IFS | as_nl) ;; #(
2584 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2585 *) { eval $ac_var=; unset $ac_var;} ;;
2586 esac ;;
2587 esac
2588 done
2589 (set) 2>&1 |
2590 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2591 *${as_nl}ac_space=\ *)
2592 sed -n \
2593 "s/'\''/'\''\\\\'\'''\''/g;
2594 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2595 ;; #(
2596 *)
2597 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2598 ;;
2599 esac |
2600 sort
2601 )
2602 echo
2603
2604 $as_echo "## ----------------- ##
2605 ## Output variables. ##
2606 ## ----------------- ##"
2607 echo
2608 for ac_var in $ac_subst_vars
2609 do
2610 eval ac_val=\$$ac_var
2611 case $ac_val in
2612 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2613 esac
2614 $as_echo "$ac_var='\''$ac_val'\''"
2615 done | sort
2616 echo
2617
2618 if test -n "$ac_subst_files"; then
2619 $as_echo "## ------------------- ##
2620 ## File substitutions. ##
2621 ## ------------------- ##"
2622 echo
2623 for ac_var in $ac_subst_files
2624 do
2625 eval ac_val=\$$ac_var
2626 case $ac_val in
2627 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2628 esac
2629 $as_echo "$ac_var='\''$ac_val'\''"
2630 done | sort
2631 echo
2632 fi
2633
2634 if test -s confdefs.h; then
2635 $as_echo "## ----------- ##
2636 ## confdefs.h. ##
2637 ## ----------- ##"
2638 echo
2639 cat confdefs.h
2640 echo
2641 fi
2642 test "$ac_signal" != 0 &&
2643 $as_echo "$as_me: caught signal $ac_signal"
2644 $as_echo "$as_me: exit $exit_status"
2645 } >&5
2646 rm -f core *.core core.conftest.* &&
2647 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2648 exit $exit_status
2649 ' 0
2650 for ac_signal in 1 2 13 15; do
2651 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2652 done
2653 ac_signal=0
2654
2655 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2656 rm -f -r conftest* confdefs.h
2657
2658 $as_echo "/* confdefs.h */" > confdefs.h
2659
2660 # Predefined preprocessor variables.
2661
2662 cat >>confdefs.h <<_ACEOF
2663 #define PACKAGE_NAME "$PACKAGE_NAME"
2664 _ACEOF
2665
2666 cat >>confdefs.h <<_ACEOF
2667 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2668 _ACEOF
2669
2670 cat >>confdefs.h <<_ACEOF
2671 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2672 _ACEOF
2673
2674 cat >>confdefs.h <<_ACEOF
2675 #define PACKAGE_STRING "$PACKAGE_STRING"
2676 _ACEOF
2677
2678 cat >>confdefs.h <<_ACEOF
2679 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2680 _ACEOF
2681
2682 cat >>confdefs.h <<_ACEOF
2683 #define PACKAGE_URL "$PACKAGE_URL"
2684 _ACEOF
2685
2686
2687 # Let the site file select an alternate cache file if it wants to.
2688 # Prefer an explicitly selected file to automatically selected ones.
2689 ac_site_file1=NONE
2690 ac_site_file2=NONE
2691 if test -n "$CONFIG_SITE"; then
2692 # We do not want a PATH search for config.site.
2693 case $CONFIG_SITE in #((
2694 -*) ac_site_file1=./$CONFIG_SITE;;
2695 */*) ac_site_file1=$CONFIG_SITE;;
2696 *) ac_site_file1=./$CONFIG_SITE;;
2697 esac
2698 elif test "x$prefix" != xNONE; then
2699 ac_site_file1=$prefix/share/config.site
2700 ac_site_file2=$prefix/etc/config.site
2701 else
2702 ac_site_file1=$ac_default_prefix/share/config.site
2703 ac_site_file2=$ac_default_prefix/etc/config.site
2704 fi
2705 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2706 do
2707 test "x$ac_site_file" = xNONE && continue
2708 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2709 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2710 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2711 sed 's/^/| /' "$ac_site_file" >&5
2712 . "$ac_site_file" \
2713 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2714 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2715 as_fn_error $? "failed to load site script $ac_site_file
2716 See \`config.log' for more details" "$LINENO" 5; }
2717 fi
2718 done
2719
2720 if test -r "$cache_file"; then
2721 # Some versions of bash will fail to source /dev/null (special files
2722 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2723 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2724 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2725 $as_echo "$as_me: loading cache $cache_file" >&6;}
2726 case $cache_file in
2727 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2728 *) . "./$cache_file";;
2729 esac
2730 fi
2731 else
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2733 $as_echo "$as_me: creating cache $cache_file" >&6;}
2734 >$cache_file
2735 fi
2736
2737 as_fn_append ac_header_list " stdlib.h"
2738 as_fn_append ac_header_list " unistd.h"
2739 as_fn_append ac_header_list " sys/param.h"
2740 # Check that the precious variables saved in the cache have kept the same
2741 # value.
2742 ac_cache_corrupted=false
2743 for ac_var in $ac_precious_vars; do
2744 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2745 eval ac_new_set=\$ac_env_${ac_var}_set
2746 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2747 eval ac_new_val=\$ac_env_${ac_var}_value
2748 case $ac_old_set,$ac_new_set in
2749 set,)
2750 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2751 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2752 ac_cache_corrupted=: ;;
2753 ,set)
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2755 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2756 ac_cache_corrupted=: ;;
2757 ,);;
2758 *)
2759 if test "x$ac_old_val" != "x$ac_new_val"; then
2760 # differences in whitespace do not lead to failure.
2761 ac_old_val_w=`echo x $ac_old_val`
2762 ac_new_val_w=`echo x $ac_new_val`
2763 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2765 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2766 ac_cache_corrupted=:
2767 else
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2769 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2770 eval $ac_var=\$ac_old_val
2771 fi
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2773 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2774 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2775 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2776 fi;;
2777 esac
2778 # Pass precious variables to config.status.
2779 if test "$ac_new_set" = set; then
2780 case $ac_new_val in
2781 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2782 *) ac_arg=$ac_var=$ac_new_val ;;
2783 esac
2784 case " $ac_configure_args " in
2785 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2786 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2787 esac
2788 fi
2789 done
2790 if $ac_cache_corrupted; then
2791 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2792 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2793 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2794 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2795 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2796 fi
2797 ## -------------------- ##
2798 ## Main body of script. ##
2799 ## -------------------- ##
2800
2801 ac_ext=c
2802 ac_cpp='$CPP $CPPFLAGS'
2803 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2804 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2805 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2806
2807
2808
2809
2810
2811 ac_config_headers="$ac_config_headers config.h:config.in"
2812
2813
2814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2815 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2816 # Check whether --enable-maintainer-mode was given.
2817 if test "${enable_maintainer_mode+set}" = set; then :
2818 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2819 else
2820 USE_MAINTAINER_MODE=no
2821 fi
2822
2823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2824 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2825 if test $USE_MAINTAINER_MODE = yes; then
2826 MAINTAINER_MODE_TRUE=
2827 MAINTAINER_MODE_FALSE='#'
2828 else
2829 MAINTAINER_MODE_TRUE='#'
2830 MAINTAINER_MODE_FALSE=
2831 fi
2832
2833 MAINT=$MAINTAINER_MODE_TRUE
2834
2835
2836
2837 # Set the 'development' global.
2838 . $srcdir/../bfd/development.sh
2839
2840 ac_ext=c
2841 ac_cpp='$CPP $CPPFLAGS'
2842 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2843 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2844 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2845 if test -n "$ac_tool_prefix"; then
2846 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2847 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2849 $as_echo_n "checking for $ac_word... " >&6; }
2850 if ${ac_cv_prog_CC+:} false; then :
2851 $as_echo_n "(cached) " >&6
2852 else
2853 if test -n "$CC"; then
2854 ac_cv_prog_CC="$CC" # Let the user override the test.
2855 else
2856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2857 for as_dir in $PATH
2858 do
2859 IFS=$as_save_IFS
2860 test -z "$as_dir" && as_dir=.
2861 for ac_exec_ext in '' $ac_executable_extensions; do
2862 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2863 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2864 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2865 break 2
2866 fi
2867 done
2868 done
2869 IFS=$as_save_IFS
2870
2871 fi
2872 fi
2873 CC=$ac_cv_prog_CC
2874 if test -n "$CC"; then
2875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2876 $as_echo "$CC" >&6; }
2877 else
2878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2879 $as_echo "no" >&6; }
2880 fi
2881
2882
2883 fi
2884 if test -z "$ac_cv_prog_CC"; then
2885 ac_ct_CC=$CC
2886 # Extract the first word of "gcc", so it can be a program name with args.
2887 set dummy gcc; ac_word=$2
2888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2889 $as_echo_n "checking for $ac_word... " >&6; }
2890 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2891 $as_echo_n "(cached) " >&6
2892 else
2893 if test -n "$ac_ct_CC"; then
2894 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2895 else
2896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2897 for as_dir in $PATH
2898 do
2899 IFS=$as_save_IFS
2900 test -z "$as_dir" && as_dir=.
2901 for ac_exec_ext in '' $ac_executable_extensions; do
2902 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2903 ac_cv_prog_ac_ct_CC="gcc"
2904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2905 break 2
2906 fi
2907 done
2908 done
2909 IFS=$as_save_IFS
2910
2911 fi
2912 fi
2913 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2914 if test -n "$ac_ct_CC"; then
2915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2916 $as_echo "$ac_ct_CC" >&6; }
2917 else
2918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2919 $as_echo "no" >&6; }
2920 fi
2921
2922 if test "x$ac_ct_CC" = x; then
2923 CC=""
2924 else
2925 case $cross_compiling:$ac_tool_warned in
2926 yes:)
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2928 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2929 ac_tool_warned=yes ;;
2930 esac
2931 CC=$ac_ct_CC
2932 fi
2933 else
2934 CC="$ac_cv_prog_CC"
2935 fi
2936
2937 if test -z "$CC"; then
2938 if test -n "$ac_tool_prefix"; then
2939 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2940 set dummy ${ac_tool_prefix}cc; ac_word=$2
2941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2942 $as_echo_n "checking for $ac_word... " >&6; }
2943 if ${ac_cv_prog_CC+:} false; then :
2944 $as_echo_n "(cached) " >&6
2945 else
2946 if test -n "$CC"; then
2947 ac_cv_prog_CC="$CC" # Let the user override the test.
2948 else
2949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2950 for as_dir in $PATH
2951 do
2952 IFS=$as_save_IFS
2953 test -z "$as_dir" && as_dir=.
2954 for ac_exec_ext in '' $ac_executable_extensions; do
2955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2956 ac_cv_prog_CC="${ac_tool_prefix}cc"
2957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2958 break 2
2959 fi
2960 done
2961 done
2962 IFS=$as_save_IFS
2963
2964 fi
2965 fi
2966 CC=$ac_cv_prog_CC
2967 if test -n "$CC"; then
2968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2969 $as_echo "$CC" >&6; }
2970 else
2971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2972 $as_echo "no" >&6; }
2973 fi
2974
2975
2976 fi
2977 fi
2978 if test -z "$CC"; then
2979 # Extract the first word of "cc", so it can be a program name with args.
2980 set dummy cc; ac_word=$2
2981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2982 $as_echo_n "checking for $ac_word... " >&6; }
2983 if ${ac_cv_prog_CC+:} false; then :
2984 $as_echo_n "(cached) " >&6
2985 else
2986 if test -n "$CC"; then
2987 ac_cv_prog_CC="$CC" # Let the user override the test.
2988 else
2989 ac_prog_rejected=no
2990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2991 for as_dir in $PATH
2992 do
2993 IFS=$as_save_IFS
2994 test -z "$as_dir" && as_dir=.
2995 for ac_exec_ext in '' $ac_executable_extensions; do
2996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2997 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2998 ac_prog_rejected=yes
2999 continue
3000 fi
3001 ac_cv_prog_CC="cc"
3002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3003 break 2
3004 fi
3005 done
3006 done
3007 IFS=$as_save_IFS
3008
3009 if test $ac_prog_rejected = yes; then
3010 # We found a bogon in the path, so make sure we never use it.
3011 set dummy $ac_cv_prog_CC
3012 shift
3013 if test $# != 0; then
3014 # We chose a different compiler from the bogus one.
3015 # However, it has the same basename, so the bogon will be chosen
3016 # first if we set CC to just the basename; use the full file name.
3017 shift
3018 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3019 fi
3020 fi
3021 fi
3022 fi
3023 CC=$ac_cv_prog_CC
3024 if test -n "$CC"; then
3025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3026 $as_echo "$CC" >&6; }
3027 else
3028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3029 $as_echo "no" >&6; }
3030 fi
3031
3032
3033 fi
3034 if test -z "$CC"; then
3035 if test -n "$ac_tool_prefix"; then
3036 for ac_prog in cl.exe
3037 do
3038 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3039 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3041 $as_echo_n "checking for $ac_word... " >&6; }
3042 if ${ac_cv_prog_CC+:} false; then :
3043 $as_echo_n "(cached) " >&6
3044 else
3045 if test -n "$CC"; then
3046 ac_cv_prog_CC="$CC" # Let the user override the test.
3047 else
3048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3049 for as_dir in $PATH
3050 do
3051 IFS=$as_save_IFS
3052 test -z "$as_dir" && as_dir=.
3053 for ac_exec_ext in '' $ac_executable_extensions; do
3054 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3055 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3057 break 2
3058 fi
3059 done
3060 done
3061 IFS=$as_save_IFS
3062
3063 fi
3064 fi
3065 CC=$ac_cv_prog_CC
3066 if test -n "$CC"; then
3067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3068 $as_echo "$CC" >&6; }
3069 else
3070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3071 $as_echo "no" >&6; }
3072 fi
3073
3074
3075 test -n "$CC" && break
3076 done
3077 fi
3078 if test -z "$CC"; then
3079 ac_ct_CC=$CC
3080 for ac_prog in cl.exe
3081 do
3082 # Extract the first word of "$ac_prog", so it can be a program name with args.
3083 set dummy $ac_prog; ac_word=$2
3084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3085 $as_echo_n "checking for $ac_word... " >&6; }
3086 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3087 $as_echo_n "(cached) " >&6
3088 else
3089 if test -n "$ac_ct_CC"; then
3090 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3091 else
3092 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3093 for as_dir in $PATH
3094 do
3095 IFS=$as_save_IFS
3096 test -z "$as_dir" && as_dir=.
3097 for ac_exec_ext in '' $ac_executable_extensions; do
3098 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3099 ac_cv_prog_ac_ct_CC="$ac_prog"
3100 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3101 break 2
3102 fi
3103 done
3104 done
3105 IFS=$as_save_IFS
3106
3107 fi
3108 fi
3109 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3110 if test -n "$ac_ct_CC"; then
3111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3112 $as_echo "$ac_ct_CC" >&6; }
3113 else
3114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3115 $as_echo "no" >&6; }
3116 fi
3117
3118
3119 test -n "$ac_ct_CC" && break
3120 done
3121
3122 if test "x$ac_ct_CC" = x; then
3123 CC=""
3124 else
3125 case $cross_compiling:$ac_tool_warned in
3126 yes:)
3127 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3128 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3129 ac_tool_warned=yes ;;
3130 esac
3131 CC=$ac_ct_CC
3132 fi
3133 fi
3134
3135 fi
3136
3137
3138 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3139 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3140 as_fn_error $? "no acceptable C compiler found in \$PATH
3141 See \`config.log' for more details" "$LINENO" 5; }
3142
3143 # Provide some information about the compiler.
3144 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3145 set X $ac_compile
3146 ac_compiler=$2
3147 for ac_option in --version -v -V -qversion; do
3148 { { ac_try="$ac_compiler $ac_option >&5"
3149 case "(($ac_try" in
3150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3151 *) ac_try_echo=$ac_try;;
3152 esac
3153 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3154 $as_echo "$ac_try_echo"; } >&5
3155 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3156 ac_status=$?
3157 if test -s conftest.err; then
3158 sed '10a\
3159 ... rest of stderr output deleted ...
3160 10q' conftest.err >conftest.er1
3161 cat conftest.er1 >&5
3162 fi
3163 rm -f conftest.er1 conftest.err
3164 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3165 test $ac_status = 0; }
3166 done
3167
3168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3169 /* end confdefs.h. */
3170
3171 int
3172 main ()
3173 {
3174
3175 ;
3176 return 0;
3177 }
3178 _ACEOF
3179 ac_clean_files_save=$ac_clean_files
3180 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3181 # Try to create an executable without -o first, disregard a.out.
3182 # It will help us diagnose broken compilers, and finding out an intuition
3183 # of exeext.
3184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3185 $as_echo_n "checking whether the C compiler works... " >&6; }
3186 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3187
3188 # The possible output files:
3189 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3190
3191 ac_rmfiles=
3192 for ac_file in $ac_files
3193 do
3194 case $ac_file in
3195 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3196 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3197 esac
3198 done
3199 rm -f $ac_rmfiles
3200
3201 if { { ac_try="$ac_link_default"
3202 case "(($ac_try" in
3203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3204 *) ac_try_echo=$ac_try;;
3205 esac
3206 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3207 $as_echo "$ac_try_echo"; } >&5
3208 (eval "$ac_link_default") 2>&5
3209 ac_status=$?
3210 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3211 test $ac_status = 0; }; then :
3212 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3213 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3214 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3215 # so that the user can short-circuit this test for compilers unknown to
3216 # Autoconf.
3217 for ac_file in $ac_files ''
3218 do
3219 test -f "$ac_file" || continue
3220 case $ac_file in
3221 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3222 ;;
3223 [ab].out )
3224 # We found the default executable, but exeext='' is most
3225 # certainly right.
3226 break;;
3227 *.* )
3228 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3229 then :; else
3230 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3231 fi
3232 # We set ac_cv_exeext here because the later test for it is not
3233 # safe: cross compilers may not add the suffix if given an `-o'
3234 # argument, so we may need to know it at that point already.
3235 # Even if this section looks crufty: it has the advantage of
3236 # actually working.
3237 break;;
3238 * )
3239 break;;
3240 esac
3241 done
3242 test "$ac_cv_exeext" = no && ac_cv_exeext=
3243
3244 else
3245 ac_file=''
3246 fi
3247 if test -z "$ac_file"; then :
3248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3249 $as_echo "no" >&6; }
3250 $as_echo "$as_me: failed program was:" >&5
3251 sed 's/^/| /' conftest.$ac_ext >&5
3252
3253 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3254 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3255 as_fn_error 77 "C compiler cannot create executables
3256 See \`config.log' for more details" "$LINENO" 5; }
3257 else
3258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3259 $as_echo "yes" >&6; }
3260 fi
3261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3262 $as_echo_n "checking for C compiler default output file name... " >&6; }
3263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3264 $as_echo "$ac_file" >&6; }
3265 ac_exeext=$ac_cv_exeext
3266
3267 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3268 ac_clean_files=$ac_clean_files_save
3269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3270 $as_echo_n "checking for suffix of executables... " >&6; }
3271 if { { ac_try="$ac_link"
3272 case "(($ac_try" in
3273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3274 *) ac_try_echo=$ac_try;;
3275 esac
3276 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3277 $as_echo "$ac_try_echo"; } >&5
3278 (eval "$ac_link") 2>&5
3279 ac_status=$?
3280 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3281 test $ac_status = 0; }; then :
3282 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3283 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3284 # work properly (i.e., refer to `conftest.exe'), while it won't with
3285 # `rm'.
3286 for ac_file in conftest.exe conftest conftest.*; do
3287 test -f "$ac_file" || continue
3288 case $ac_file in
3289 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3290 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3291 break;;
3292 * ) break;;
3293 esac
3294 done
3295 else
3296 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3297 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3298 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3299 See \`config.log' for more details" "$LINENO" 5; }
3300 fi
3301 rm -f conftest conftest$ac_cv_exeext
3302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3303 $as_echo "$ac_cv_exeext" >&6; }
3304
3305 rm -f conftest.$ac_ext
3306 EXEEXT=$ac_cv_exeext
3307 ac_exeext=$EXEEXT
3308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3309 /* end confdefs.h. */
3310 #include <stdio.h>
3311 int
3312 main ()
3313 {
3314 FILE *f = fopen ("conftest.out", "w");
3315 return ferror (f) || fclose (f) != 0;
3316
3317 ;
3318 return 0;
3319 }
3320 _ACEOF
3321 ac_clean_files="$ac_clean_files conftest.out"
3322 # Check that the compiler produces executables we can run. If not, either
3323 # the compiler is broken, or we cross compile.
3324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3325 $as_echo_n "checking whether we are cross compiling... " >&6; }
3326 if test "$cross_compiling" != yes; then
3327 { { ac_try="$ac_link"
3328 case "(($ac_try" in
3329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3330 *) ac_try_echo=$ac_try;;
3331 esac
3332 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3333 $as_echo "$ac_try_echo"; } >&5
3334 (eval "$ac_link") 2>&5
3335 ac_status=$?
3336 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3337 test $ac_status = 0; }
3338 if { ac_try='./conftest$ac_cv_exeext'
3339 { { case "(($ac_try" in
3340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3341 *) ac_try_echo=$ac_try;;
3342 esac
3343 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3344 $as_echo "$ac_try_echo"; } >&5
3345 (eval "$ac_try") 2>&5
3346 ac_status=$?
3347 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3348 test $ac_status = 0; }; }; then
3349 cross_compiling=no
3350 else
3351 if test "$cross_compiling" = maybe; then
3352 cross_compiling=yes
3353 else
3354 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3355 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3356 as_fn_error $? "cannot run C compiled programs.
3357 If you meant to cross compile, use \`--host'.
3358 See \`config.log' for more details" "$LINENO" 5; }
3359 fi
3360 fi
3361 fi
3362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3363 $as_echo "$cross_compiling" >&6; }
3364
3365 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3366 ac_clean_files=$ac_clean_files_save
3367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3368 $as_echo_n "checking for suffix of object files... " >&6; }
3369 if ${ac_cv_objext+:} false; then :
3370 $as_echo_n "(cached) " >&6
3371 else
3372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3373 /* end confdefs.h. */
3374
3375 int
3376 main ()
3377 {
3378
3379 ;
3380 return 0;
3381 }
3382 _ACEOF
3383 rm -f conftest.o conftest.obj
3384 if { { ac_try="$ac_compile"
3385 case "(($ac_try" in
3386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3387 *) ac_try_echo=$ac_try;;
3388 esac
3389 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3390 $as_echo "$ac_try_echo"; } >&5
3391 (eval "$ac_compile") 2>&5
3392 ac_status=$?
3393 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3394 test $ac_status = 0; }; then :
3395 for ac_file in conftest.o conftest.obj conftest.*; do
3396 test -f "$ac_file" || continue;
3397 case $ac_file in
3398 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3399 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3400 break;;
3401 esac
3402 done
3403 else
3404 $as_echo "$as_me: failed program was:" >&5
3405 sed 's/^/| /' conftest.$ac_ext >&5
3406
3407 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3408 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3409 as_fn_error $? "cannot compute suffix of object files: cannot compile
3410 See \`config.log' for more details" "$LINENO" 5; }
3411 fi
3412 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3413 fi
3414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3415 $as_echo "$ac_cv_objext" >&6; }
3416 OBJEXT=$ac_cv_objext
3417 ac_objext=$OBJEXT
3418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3419 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3420 if ${ac_cv_c_compiler_gnu+:} false; then :
3421 $as_echo_n "(cached) " >&6
3422 else
3423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3424 /* end confdefs.h. */
3425
3426 int
3427 main ()
3428 {
3429 #ifndef __GNUC__
3430 choke me
3431 #endif
3432
3433 ;
3434 return 0;
3435 }
3436 _ACEOF
3437 if ac_fn_c_try_compile "$LINENO"; then :
3438 ac_compiler_gnu=yes
3439 else
3440 ac_compiler_gnu=no
3441 fi
3442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3443 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3444
3445 fi
3446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3447 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3448 if test $ac_compiler_gnu = yes; then
3449 GCC=yes
3450 else
3451 GCC=
3452 fi
3453 ac_test_CFLAGS=${CFLAGS+set}
3454 ac_save_CFLAGS=$CFLAGS
3455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3456 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3457 if ${ac_cv_prog_cc_g+:} false; then :
3458 $as_echo_n "(cached) " >&6
3459 else
3460 ac_save_c_werror_flag=$ac_c_werror_flag
3461 ac_c_werror_flag=yes
3462 ac_cv_prog_cc_g=no
3463 CFLAGS="-g"
3464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3465 /* end confdefs.h. */
3466
3467 int
3468 main ()
3469 {
3470
3471 ;
3472 return 0;
3473 }
3474 _ACEOF
3475 if ac_fn_c_try_compile "$LINENO"; then :
3476 ac_cv_prog_cc_g=yes
3477 else
3478 CFLAGS=""
3479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3480 /* end confdefs.h. */
3481
3482 int
3483 main ()
3484 {
3485
3486 ;
3487 return 0;
3488 }
3489 _ACEOF
3490 if ac_fn_c_try_compile "$LINENO"; then :
3491
3492 else
3493 ac_c_werror_flag=$ac_save_c_werror_flag
3494 CFLAGS="-g"
3495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3496 /* end confdefs.h. */
3497
3498 int
3499 main ()
3500 {
3501
3502 ;
3503 return 0;
3504 }
3505 _ACEOF
3506 if ac_fn_c_try_compile "$LINENO"; then :
3507 ac_cv_prog_cc_g=yes
3508 fi
3509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3510 fi
3511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3512 fi
3513 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3514 ac_c_werror_flag=$ac_save_c_werror_flag
3515 fi
3516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3517 $as_echo "$ac_cv_prog_cc_g" >&6; }
3518 if test "$ac_test_CFLAGS" = set; then
3519 CFLAGS=$ac_save_CFLAGS
3520 elif test $ac_cv_prog_cc_g = yes; then
3521 if test "$GCC" = yes; then
3522 CFLAGS="-g -O2"
3523 else
3524 CFLAGS="-g"
3525 fi
3526 else
3527 if test "$GCC" = yes; then
3528 CFLAGS="-O2"
3529 else
3530 CFLAGS=
3531 fi
3532 fi
3533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3534 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3535 if ${ac_cv_prog_cc_c89+:} false; then :
3536 $as_echo_n "(cached) " >&6
3537 else
3538 ac_cv_prog_cc_c89=no
3539 ac_save_CC=$CC
3540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3541 /* end confdefs.h. */
3542 #include <stdarg.h>
3543 #include <stdio.h>
3544 struct stat;
3545 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3546 struct buf { int x; };
3547 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3548 static char *e (p, i)
3549 char **p;
3550 int i;
3551 {
3552 return p[i];
3553 }
3554 static char *f (char * (*g) (char **, int), char **p, ...)
3555 {
3556 char *s;
3557 va_list v;
3558 va_start (v,p);
3559 s = g (p, va_arg (v,int));
3560 va_end (v);
3561 return s;
3562 }
3563
3564 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3565 function prototypes and stuff, but not '\xHH' hex character constants.
3566 These don't provoke an error unfortunately, instead are silently treated
3567 as 'x'. The following induces an error, until -std is added to get
3568 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3569 array size at least. It's necessary to write '\x00'==0 to get something
3570 that's true only with -std. */
3571 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3572
3573 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3574 inside strings and character constants. */
3575 #define FOO(x) 'x'
3576 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3577
3578 int test (int i, double x);
3579 struct s1 {int (*f) (int a);};
3580 struct s2 {int (*f) (double a);};
3581 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3582 int argc;
3583 char **argv;
3584 int
3585 main ()
3586 {
3587 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3588 ;
3589 return 0;
3590 }
3591 _ACEOF
3592 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3593 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3594 do
3595 CC="$ac_save_CC $ac_arg"
3596 if ac_fn_c_try_compile "$LINENO"; then :
3597 ac_cv_prog_cc_c89=$ac_arg
3598 fi
3599 rm -f core conftest.err conftest.$ac_objext
3600 test "x$ac_cv_prog_cc_c89" != "xno" && break
3601 done
3602 rm -f conftest.$ac_ext
3603 CC=$ac_save_CC
3604
3605 fi
3606 # AC_CACHE_VAL
3607 case "x$ac_cv_prog_cc_c89" in
3608 x)
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3610 $as_echo "none needed" >&6; } ;;
3611 xno)
3612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3613 $as_echo "unsupported" >&6; } ;;
3614 *)
3615 CC="$CC $ac_cv_prog_cc_c89"
3616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3617 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3618 esac
3619 if test "x$ac_cv_prog_cc_c89" != xno; then :
3620
3621 fi
3622
3623 ac_ext=c
3624 ac_cpp='$CPP $CPPFLAGS'
3625 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3626 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3627 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3628
3629 ac_ext=cpp
3630 ac_cpp='$CXXCPP $CPPFLAGS'
3631 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3632 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3633 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3634 if test -z "$CXX"; then
3635 if test -n "$CCC"; then
3636 CXX=$CCC
3637 else
3638 if test -n "$ac_tool_prefix"; then
3639 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3640 do
3641 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3642 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3644 $as_echo_n "checking for $ac_word... " >&6; }
3645 if ${ac_cv_prog_CXX+:} false; then :
3646 $as_echo_n "(cached) " >&6
3647 else
3648 if test -n "$CXX"; then
3649 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3650 else
3651 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3652 for as_dir in $PATH
3653 do
3654 IFS=$as_save_IFS
3655 test -z "$as_dir" && as_dir=.
3656 for ac_exec_ext in '' $ac_executable_extensions; do
3657 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3658 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3659 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3660 break 2
3661 fi
3662 done
3663 done
3664 IFS=$as_save_IFS
3665
3666 fi
3667 fi
3668 CXX=$ac_cv_prog_CXX
3669 if test -n "$CXX"; then
3670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3671 $as_echo "$CXX" >&6; }
3672 else
3673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3674 $as_echo "no" >&6; }
3675 fi
3676
3677
3678 test -n "$CXX" && break
3679 done
3680 fi
3681 if test -z "$CXX"; then
3682 ac_ct_CXX=$CXX
3683 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3684 do
3685 # Extract the first word of "$ac_prog", so it can be a program name with args.
3686 set dummy $ac_prog; ac_word=$2
3687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3688 $as_echo_n "checking for $ac_word... " >&6; }
3689 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3690 $as_echo_n "(cached) " >&6
3691 else
3692 if test -n "$ac_ct_CXX"; then
3693 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3694 else
3695 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3696 for as_dir in $PATH
3697 do
3698 IFS=$as_save_IFS
3699 test -z "$as_dir" && as_dir=.
3700 for ac_exec_ext in '' $ac_executable_extensions; do
3701 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3702 ac_cv_prog_ac_ct_CXX="$ac_prog"
3703 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3704 break 2
3705 fi
3706 done
3707 done
3708 IFS=$as_save_IFS
3709
3710 fi
3711 fi
3712 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3713 if test -n "$ac_ct_CXX"; then
3714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3715 $as_echo "$ac_ct_CXX" >&6; }
3716 else
3717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3718 $as_echo "no" >&6; }
3719 fi
3720
3721
3722 test -n "$ac_ct_CXX" && break
3723 done
3724
3725 if test "x$ac_ct_CXX" = x; then
3726 CXX="g++"
3727 else
3728 case $cross_compiling:$ac_tool_warned in
3729 yes:)
3730 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3731 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3732 ac_tool_warned=yes ;;
3733 esac
3734 CXX=$ac_ct_CXX
3735 fi
3736 fi
3737
3738 fi
3739 fi
3740 # Provide some information about the compiler.
3741 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3742 set X $ac_compile
3743 ac_compiler=$2
3744 for ac_option in --version -v -V -qversion; do
3745 { { ac_try="$ac_compiler $ac_option >&5"
3746 case "(($ac_try" in
3747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3748 *) ac_try_echo=$ac_try;;
3749 esac
3750 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3751 $as_echo "$ac_try_echo"; } >&5
3752 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3753 ac_status=$?
3754 if test -s conftest.err; then
3755 sed '10a\
3756 ... rest of stderr output deleted ...
3757 10q' conftest.err >conftest.er1
3758 cat conftest.er1 >&5
3759 fi
3760 rm -f conftest.er1 conftest.err
3761 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3762 test $ac_status = 0; }
3763 done
3764
3765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3766 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3767 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3768 $as_echo_n "(cached) " >&6
3769 else
3770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3771 /* end confdefs.h. */
3772
3773 int
3774 main ()
3775 {
3776 #ifndef __GNUC__
3777 choke me
3778 #endif
3779
3780 ;
3781 return 0;
3782 }
3783 _ACEOF
3784 if ac_fn_cxx_try_compile "$LINENO"; then :
3785 ac_compiler_gnu=yes
3786 else
3787 ac_compiler_gnu=no
3788 fi
3789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3790 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3791
3792 fi
3793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3794 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3795 if test $ac_compiler_gnu = yes; then
3796 GXX=yes
3797 else
3798 GXX=
3799 fi
3800 ac_test_CXXFLAGS=${CXXFLAGS+set}
3801 ac_save_CXXFLAGS=$CXXFLAGS
3802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3803 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3804 if ${ac_cv_prog_cxx_g+:} false; then :
3805 $as_echo_n "(cached) " >&6
3806 else
3807 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3808 ac_cxx_werror_flag=yes
3809 ac_cv_prog_cxx_g=no
3810 CXXFLAGS="-g"
3811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3812 /* end confdefs.h. */
3813
3814 int
3815 main ()
3816 {
3817
3818 ;
3819 return 0;
3820 }
3821 _ACEOF
3822 if ac_fn_cxx_try_compile "$LINENO"; then :
3823 ac_cv_prog_cxx_g=yes
3824 else
3825 CXXFLAGS=""
3826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3827 /* end confdefs.h. */
3828
3829 int
3830 main ()
3831 {
3832
3833 ;
3834 return 0;
3835 }
3836 _ACEOF
3837 if ac_fn_cxx_try_compile "$LINENO"; then :
3838
3839 else
3840 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3841 CXXFLAGS="-g"
3842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3843 /* end confdefs.h. */
3844
3845 int
3846 main ()
3847 {
3848
3849 ;
3850 return 0;
3851 }
3852 _ACEOF
3853 if ac_fn_cxx_try_compile "$LINENO"; then :
3854 ac_cv_prog_cxx_g=yes
3855 fi
3856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3857 fi
3858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3859 fi
3860 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3861 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3862 fi
3863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3864 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3865 if test "$ac_test_CXXFLAGS" = set; then
3866 CXXFLAGS=$ac_save_CXXFLAGS
3867 elif test $ac_cv_prog_cxx_g = yes; then
3868 if test "$GXX" = yes; then
3869 CXXFLAGS="-g -O2"
3870 else
3871 CXXFLAGS="-g"
3872 fi
3873 else
3874 if test "$GXX" = yes; then
3875 CXXFLAGS="-O2"
3876 else
3877 CXXFLAGS=
3878 fi
3879 fi
3880 ac_ext=c
3881 ac_cpp='$CPP $CPPFLAGS'
3882 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3883 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3884 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3885
3886
3887
3888 ac_ext=c
3889 ac_cpp='$CPP $CPPFLAGS'
3890 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3891 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3892 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3894 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3895 # On Suns, sometimes $CPP names a directory.
3896 if test -n "$CPP" && test -d "$CPP"; then
3897 CPP=
3898 fi
3899 if test -z "$CPP"; then
3900 if ${ac_cv_prog_CPP+:} false; then :
3901 $as_echo_n "(cached) " >&6
3902 else
3903 # Double quotes because CPP needs to be expanded
3904 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3905 do
3906 ac_preproc_ok=false
3907 for ac_c_preproc_warn_flag in '' yes
3908 do
3909 # Use a header file that comes with gcc, so configuring glibc
3910 # with a fresh cross-compiler works.
3911 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3912 # <limits.h> exists even on freestanding compilers.
3913 # On the NeXT, cc -E runs the code through the compiler's parser,
3914 # not just through cpp. "Syntax error" is here to catch this case.
3915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3916 /* end confdefs.h. */
3917 #ifdef __STDC__
3918 # include <limits.h>
3919 #else
3920 # include <assert.h>
3921 #endif
3922 Syntax error
3923 _ACEOF
3924 if ac_fn_c_try_cpp "$LINENO"; then :
3925
3926 else
3927 # Broken: fails on valid input.
3928 continue
3929 fi
3930 rm -f conftest.err conftest.i conftest.$ac_ext
3931
3932 # OK, works on sane cases. Now check whether nonexistent headers
3933 # can be detected and how.
3934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3935 /* end confdefs.h. */
3936 #include <ac_nonexistent.h>
3937 _ACEOF
3938 if ac_fn_c_try_cpp "$LINENO"; then :
3939 # Broken: success on invalid input.
3940 continue
3941 else
3942 # Passes both tests.
3943 ac_preproc_ok=:
3944 break
3945 fi
3946 rm -f conftest.err conftest.i conftest.$ac_ext
3947
3948 done
3949 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3950 rm -f conftest.i conftest.err conftest.$ac_ext
3951 if $ac_preproc_ok; then :
3952 break
3953 fi
3954
3955 done
3956 ac_cv_prog_CPP=$CPP
3957
3958 fi
3959 CPP=$ac_cv_prog_CPP
3960 else
3961 ac_cv_prog_CPP=$CPP
3962 fi
3963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3964 $as_echo "$CPP" >&6; }
3965 ac_preproc_ok=false
3966 for ac_c_preproc_warn_flag in '' yes
3967 do
3968 # Use a header file that comes with gcc, so configuring glibc
3969 # with a fresh cross-compiler works.
3970 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3971 # <limits.h> exists even on freestanding compilers.
3972 # On the NeXT, cc -E runs the code through the compiler's parser,
3973 # not just through cpp. "Syntax error" is here to catch this case.
3974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3975 /* end confdefs.h. */
3976 #ifdef __STDC__
3977 # include <limits.h>
3978 #else
3979 # include <assert.h>
3980 #endif
3981 Syntax error
3982 _ACEOF
3983 if ac_fn_c_try_cpp "$LINENO"; then :
3984
3985 else
3986 # Broken: fails on valid input.
3987 continue
3988 fi
3989 rm -f conftest.err conftest.i conftest.$ac_ext
3990
3991 # OK, works on sane cases. Now check whether nonexistent headers
3992 # can be detected and how.
3993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3994 /* end confdefs.h. */
3995 #include <ac_nonexistent.h>
3996 _ACEOF
3997 if ac_fn_c_try_cpp "$LINENO"; then :
3998 # Broken: success on invalid input.
3999 continue
4000 else
4001 # Passes both tests.
4002 ac_preproc_ok=:
4003 break
4004 fi
4005 rm -f conftest.err conftest.i conftest.$ac_ext
4006
4007 done
4008 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4009 rm -f conftest.i conftest.err conftest.$ac_ext
4010 if $ac_preproc_ok; then :
4011
4012 else
4013 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4014 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4015 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4016 See \`config.log' for more details" "$LINENO" 5; }
4017 fi
4018
4019 ac_ext=c
4020 ac_cpp='$CPP $CPPFLAGS'
4021 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4022 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4023 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4024
4025
4026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4027 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4028 if ${ac_cv_path_GREP+:} false; then :
4029 $as_echo_n "(cached) " >&6
4030 else
4031 if test -z "$GREP"; then
4032 ac_path_GREP_found=false
4033 # Loop through the user's path and test for each of PROGNAME-LIST
4034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4035 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4036 do
4037 IFS=$as_save_IFS
4038 test -z "$as_dir" && as_dir=.
4039 for ac_prog in grep ggrep; do
4040 for ac_exec_ext in '' $ac_executable_extensions; do
4041 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4042 as_fn_executable_p "$ac_path_GREP" || continue
4043 # Check for GNU ac_path_GREP and select it if it is found.
4044 # Check for GNU $ac_path_GREP
4045 case `"$ac_path_GREP" --version 2>&1` in
4046 *GNU*)
4047 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4048 *)
4049 ac_count=0
4050 $as_echo_n 0123456789 >"conftest.in"
4051 while :
4052 do
4053 cat "conftest.in" "conftest.in" >"conftest.tmp"
4054 mv "conftest.tmp" "conftest.in"
4055 cp "conftest.in" "conftest.nl"
4056 $as_echo 'GREP' >> "conftest.nl"
4057 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4058 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4059 as_fn_arith $ac_count + 1 && ac_count=$as_val
4060 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4061 # Best one so far, save it but keep looking for a better one
4062 ac_cv_path_GREP="$ac_path_GREP"
4063 ac_path_GREP_max=$ac_count
4064 fi
4065 # 10*(2^10) chars as input seems more than enough
4066 test $ac_count -gt 10 && break
4067 done
4068 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4069 esac
4070
4071 $ac_path_GREP_found && break 3
4072 done
4073 done
4074 done
4075 IFS=$as_save_IFS
4076 if test -z "$ac_cv_path_GREP"; then
4077 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4078 fi
4079 else
4080 ac_cv_path_GREP=$GREP
4081 fi
4082
4083 fi
4084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4085 $as_echo "$ac_cv_path_GREP" >&6; }
4086 GREP="$ac_cv_path_GREP"
4087
4088
4089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4090 $as_echo_n "checking for egrep... " >&6; }
4091 if ${ac_cv_path_EGREP+:} false; then :
4092 $as_echo_n "(cached) " >&6
4093 else
4094 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4095 then ac_cv_path_EGREP="$GREP -E"
4096 else
4097 if test -z "$EGREP"; then
4098 ac_path_EGREP_found=false
4099 # Loop through the user's path and test for each of PROGNAME-LIST
4100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4101 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4102 do
4103 IFS=$as_save_IFS
4104 test -z "$as_dir" && as_dir=.
4105 for ac_prog in egrep; do
4106 for ac_exec_ext in '' $ac_executable_extensions; do
4107 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4108 as_fn_executable_p "$ac_path_EGREP" || continue
4109 # Check for GNU ac_path_EGREP and select it if it is found.
4110 # Check for GNU $ac_path_EGREP
4111 case `"$ac_path_EGREP" --version 2>&1` in
4112 *GNU*)
4113 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4114 *)
4115 ac_count=0
4116 $as_echo_n 0123456789 >"conftest.in"
4117 while :
4118 do
4119 cat "conftest.in" "conftest.in" >"conftest.tmp"
4120 mv "conftest.tmp" "conftest.in"
4121 cp "conftest.in" "conftest.nl"
4122 $as_echo 'EGREP' >> "conftest.nl"
4123 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4124 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4125 as_fn_arith $ac_count + 1 && ac_count=$as_val
4126 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4127 # Best one so far, save it but keep looking for a better one
4128 ac_cv_path_EGREP="$ac_path_EGREP"
4129 ac_path_EGREP_max=$ac_count
4130 fi
4131 # 10*(2^10) chars as input seems more than enough
4132 test $ac_count -gt 10 && break
4133 done
4134 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4135 esac
4136
4137 $ac_path_EGREP_found && break 3
4138 done
4139 done
4140 done
4141 IFS=$as_save_IFS
4142 if test -z "$ac_cv_path_EGREP"; then
4143 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4144 fi
4145 else
4146 ac_cv_path_EGREP=$EGREP
4147 fi
4148
4149 fi
4150 fi
4151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4152 $as_echo "$ac_cv_path_EGREP" >&6; }
4153 EGREP="$ac_cv_path_EGREP"
4154
4155
4156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4157 $as_echo_n "checking for ANSI C header files... " >&6; }
4158 if ${ac_cv_header_stdc+:} false; then :
4159 $as_echo_n "(cached) " >&6
4160 else
4161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4162 /* end confdefs.h. */
4163 #include <stdlib.h>
4164 #include <stdarg.h>
4165 #include <string.h>
4166 #include <float.h>
4167
4168 int
4169 main ()
4170 {
4171
4172 ;
4173 return 0;
4174 }
4175 _ACEOF
4176 if ac_fn_c_try_compile "$LINENO"; then :
4177 ac_cv_header_stdc=yes
4178 else
4179 ac_cv_header_stdc=no
4180 fi
4181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4182
4183 if test $ac_cv_header_stdc = yes; then
4184 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4186 /* end confdefs.h. */
4187 #include <string.h>
4188
4189 _ACEOF
4190 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4191 $EGREP "memchr" >/dev/null 2>&1; then :
4192
4193 else
4194 ac_cv_header_stdc=no
4195 fi
4196 rm -f conftest*
4197
4198 fi
4199
4200 if test $ac_cv_header_stdc = yes; then
4201 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4203 /* end confdefs.h. */
4204 #include <stdlib.h>
4205
4206 _ACEOF
4207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4208 $EGREP "free" >/dev/null 2>&1; then :
4209
4210 else
4211 ac_cv_header_stdc=no
4212 fi
4213 rm -f conftest*
4214
4215 fi
4216
4217 if test $ac_cv_header_stdc = yes; then
4218 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4219 if test "$cross_compiling" = yes; then :
4220 :
4221 else
4222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4223 /* end confdefs.h. */
4224 #include <ctype.h>
4225 #include <stdlib.h>
4226 #if ((' ' & 0x0FF) == 0x020)
4227 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4228 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4229 #else
4230 # define ISLOWER(c) \
4231 (('a' <= (c) && (c) <= 'i') \
4232 || ('j' <= (c) && (c) <= 'r') \
4233 || ('s' <= (c) && (c) <= 'z'))
4234 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4235 #endif
4236
4237 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4238 int
4239 main ()
4240 {
4241 int i;
4242 for (i = 0; i < 256; i++)
4243 if (XOR (islower (i), ISLOWER (i))
4244 || toupper (i) != TOUPPER (i))
4245 return 2;
4246 return 0;
4247 }
4248 _ACEOF
4249 if ac_fn_c_try_run "$LINENO"; then :
4250
4251 else
4252 ac_cv_header_stdc=no
4253 fi
4254 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4255 conftest.$ac_objext conftest.beam conftest.$ac_ext
4256 fi
4257
4258 fi
4259 fi
4260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4261 $as_echo "$ac_cv_header_stdc" >&6; }
4262 if test $ac_cv_header_stdc = yes; then
4263
4264 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4265
4266 fi
4267
4268 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4269 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4270 inttypes.h stdint.h unistd.h
4271 do :
4272 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4273 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4274 "
4275 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4276 cat >>confdefs.h <<_ACEOF
4277 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4278 _ACEOF
4279
4280 fi
4281
4282 done
4283
4284
4285
4286 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4287 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4288 MINIX=yes
4289 else
4290 MINIX=
4291 fi
4292
4293
4294 if test "$MINIX" = yes; then
4295
4296 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4297
4298
4299 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4300
4301
4302 $as_echo "#define _MINIX 1" >>confdefs.h
4303
4304 fi
4305
4306
4307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4308 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4309 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4310 $as_echo_n "(cached) " >&6
4311 else
4312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4313 /* end confdefs.h. */
4314
4315 # define __EXTENSIONS__ 1
4316 $ac_includes_default
4317 int
4318 main ()
4319 {
4320
4321 ;
4322 return 0;
4323 }
4324 _ACEOF
4325 if ac_fn_c_try_compile "$LINENO"; then :
4326 ac_cv_safe_to_define___extensions__=yes
4327 else
4328 ac_cv_safe_to_define___extensions__=no
4329 fi
4330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4331 fi
4332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4333 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4334 test $ac_cv_safe_to_define___extensions__ = yes &&
4335 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4336
4337 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4338
4339 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4340
4341 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4342
4343 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4344
4345
4346 ac_aux_dir=
4347 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4348 if test -f "$ac_dir/install-sh"; then
4349 ac_aux_dir=$ac_dir
4350 ac_install_sh="$ac_aux_dir/install-sh -c"
4351 break
4352 elif test -f "$ac_dir/install.sh"; then
4353 ac_aux_dir=$ac_dir
4354 ac_install_sh="$ac_aux_dir/install.sh -c"
4355 break
4356 elif test -f "$ac_dir/shtool"; then
4357 ac_aux_dir=$ac_dir
4358 ac_install_sh="$ac_aux_dir/shtool install -c"
4359 break
4360 fi
4361 done
4362 if test -z "$ac_aux_dir"; then
4363 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4364 fi
4365
4366 # These three variables are undocumented and unsupported,
4367 # and are intended to be withdrawn in a future Autoconf release.
4368 # They can cause serious problems if a builder's source tree is in a directory
4369 # whose full name contains unusual characters.
4370 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4371 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4372 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4373
4374
4375 # Make sure we can run config.sub.
4376 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4377 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4378
4379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4380 $as_echo_n "checking build system type... " >&6; }
4381 if ${ac_cv_build+:} false; then :
4382 $as_echo_n "(cached) " >&6
4383 else
4384 ac_build_alias=$build_alias
4385 test "x$ac_build_alias" = x &&
4386 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4387 test "x$ac_build_alias" = x &&
4388 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4389 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4390 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4391
4392 fi
4393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4394 $as_echo "$ac_cv_build" >&6; }
4395 case $ac_cv_build in
4396 *-*-*) ;;
4397 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4398 esac
4399 build=$ac_cv_build
4400 ac_save_IFS=$IFS; IFS='-'
4401 set x $ac_cv_build
4402 shift
4403 build_cpu=$1
4404 build_vendor=$2
4405 shift; shift
4406 # Remember, the first character of IFS is used to create $*,
4407 # except with old shells:
4408 build_os=$*
4409 IFS=$ac_save_IFS
4410 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4411
4412
4413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4414 $as_echo_n "checking host system type... " >&6; }
4415 if ${ac_cv_host+:} false; then :
4416 $as_echo_n "(cached) " >&6
4417 else
4418 if test "x$host_alias" = x; then
4419 ac_cv_host=$ac_cv_build
4420 else
4421 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4422 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4423 fi
4424
4425 fi
4426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4427 $as_echo "$ac_cv_host" >&6; }
4428 case $ac_cv_host in
4429 *-*-*) ;;
4430 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4431 esac
4432 host=$ac_cv_host
4433 ac_save_IFS=$IFS; IFS='-'
4434 set x $ac_cv_host
4435 shift
4436 host_cpu=$1
4437 host_vendor=$2
4438 shift; shift
4439 # Remember, the first character of IFS is used to create $*,
4440 # except with old shells:
4441 host_os=$*
4442 IFS=$ac_save_IFS
4443 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4444
4445
4446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4447 $as_echo_n "checking target system type... " >&6; }
4448 if ${ac_cv_target+:} false; then :
4449 $as_echo_n "(cached) " >&6
4450 else
4451 if test "x$target_alias" = x; then
4452 ac_cv_target=$ac_cv_host
4453 else
4454 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4455 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4456 fi
4457
4458 fi
4459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4460 $as_echo "$ac_cv_target" >&6; }
4461 case $ac_cv_target in
4462 *-*-*) ;;
4463 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4464 esac
4465 target=$ac_cv_target
4466 ac_save_IFS=$IFS; IFS='-'
4467 set x $ac_cv_target
4468 shift
4469 target_cpu=$1
4470 target_vendor=$2
4471 shift; shift
4472 # Remember, the first character of IFS is used to create $*,
4473 # except with old shells:
4474 target_os=$*
4475 IFS=$ac_save_IFS
4476 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4477
4478
4479 # The aliases save the names the user supplied, while $host etc.
4480 # will get canonicalized.
4481 test -n "$target_alias" &&
4482 test "$program_prefix$program_suffix$program_transform_name" = \
4483 NONENONEs,x,x, &&
4484 program_prefix=${target_alias}-
4485
4486 # The tests for host and target for $enable_largefile require
4487 # canonical names.
4488
4489
4490
4491 # As the $enable_largefile decision depends on --enable-plugins we must set it
4492 # even in directories otherwise not depending on the $plugins option.
4493
4494
4495 maybe_plugins=no
4496 for ac_header in dlfcn.h
4497 do :
4498 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4499 "
4500 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
4501 cat >>confdefs.h <<_ACEOF
4502 #define HAVE_DLFCN_H 1
4503 _ACEOF
4504 maybe_plugins=yes
4505 fi
4506
4507 done
4508
4509 for ac_header in windows.h
4510 do :
4511 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4512 "
4513 if test "x$ac_cv_header_windows_h" = xyes; then :
4514 cat >>confdefs.h <<_ACEOF
4515 #define HAVE_WINDOWS_H 1
4516 _ACEOF
4517 maybe_plugins=yes
4518 fi
4519
4520 done
4521
4522
4523 # Check whether --enable-plugins was given.
4524 if test "${enable_plugins+set}" = set; then :
4525 enableval=$enable_plugins; case "${enableval}" in
4526 no) plugins=no ;;
4527 *) plugins=yes
4528 if test "$maybe_plugins" != "yes" ; then
4529 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4530 fi ;;
4531 esac
4532 else
4533 plugins=$maybe_plugins
4534
4535 fi
4536
4537 if test "$plugins" = "yes"; then
4538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4539 $as_echo_n "checking for library containing dlsym... " >&6; }
4540 if ${ac_cv_search_dlsym+:} false; then :
4541 $as_echo_n "(cached) " >&6
4542 else
4543 ac_func_search_save_LIBS=$LIBS
4544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4545 /* end confdefs.h. */
4546
4547 /* Override any GCC internal prototype to avoid an error.
4548 Use char because int might match the return type of a GCC
4549 builtin and then its argument prototype would still apply. */
4550 #ifdef __cplusplus
4551 extern "C"
4552 #endif
4553 char dlsym ();
4554 int
4555 main ()
4556 {
4557 return dlsym ();
4558 ;
4559 return 0;
4560 }
4561 _ACEOF
4562 for ac_lib in '' dl; do
4563 if test -z "$ac_lib"; then
4564 ac_res="none required"
4565 else
4566 ac_res=-l$ac_lib
4567 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4568 fi
4569 if ac_fn_c_try_link "$LINENO"; then :
4570 ac_cv_search_dlsym=$ac_res
4571 fi
4572 rm -f core conftest.err conftest.$ac_objext \
4573 conftest$ac_exeext
4574 if ${ac_cv_search_dlsym+:} false; then :
4575 break
4576 fi
4577 done
4578 if ${ac_cv_search_dlsym+:} false; then :
4579
4580 else
4581 ac_cv_search_dlsym=no
4582 fi
4583 rm conftest.$ac_ext
4584 LIBS=$ac_func_search_save_LIBS
4585 fi
4586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4587 $as_echo "$ac_cv_search_dlsym" >&6; }
4588 ac_res=$ac_cv_search_dlsym
4589 if test "$ac_res" != no; then :
4590 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4591
4592 fi
4593
4594 fi
4595
4596
4597 case "${host}" in
4598 sparc-*-solaris*|i[3-7]86-*-solaris*)
4599 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4600 # are mutually exclusive; and without procfs support, the bfd/ elf module
4601 # cannot provide certain routines such as elfcore_write_prpsinfo
4602 # or elfcore_write_prstatus. So unless the user explicitly requested
4603 # large-file support through the --enable-largefile switch, disable
4604 # large-file support in favor of procfs support.
4605 test "${target}" = "${host}" -a "x$plugins" = xno \
4606 && : ${enable_largefile="no"}
4607 ;;
4608 esac
4609
4610 # Check whether --enable-largefile was given.
4611 if test "${enable_largefile+set}" = set; then :
4612 enableval=$enable_largefile;
4613 fi
4614
4615 if test "$enable_largefile" != no; then
4616
4617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4618 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4619 if ${ac_cv_sys_largefile_CC+:} false; then :
4620 $as_echo_n "(cached) " >&6
4621 else
4622 ac_cv_sys_largefile_CC=no
4623 if test "$GCC" != yes; then
4624 ac_save_CC=$CC
4625 while :; do
4626 # IRIX 6.2 and later do not support large files by default,
4627 # so use the C compiler's -n32 option if that helps.
4628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4629 /* end confdefs.h. */
4630 #include <sys/types.h>
4631 /* Check that off_t can represent 2**63 - 1 correctly.
4632 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4633 since some C++ compilers masquerading as C compilers
4634 incorrectly reject 9223372036854775807. */
4635 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4636 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4637 && LARGE_OFF_T % 2147483647 == 1)
4638 ? 1 : -1];
4639 int
4640 main ()
4641 {
4642
4643 ;
4644 return 0;
4645 }
4646 _ACEOF
4647 if ac_fn_c_try_compile "$LINENO"; then :
4648 break
4649 fi
4650 rm -f core conftest.err conftest.$ac_objext
4651 CC="$CC -n32"
4652 if ac_fn_c_try_compile "$LINENO"; then :
4653 ac_cv_sys_largefile_CC=' -n32'; break
4654 fi
4655 rm -f core conftest.err conftest.$ac_objext
4656 break
4657 done
4658 CC=$ac_save_CC
4659 rm -f conftest.$ac_ext
4660 fi
4661 fi
4662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4663 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4664 if test "$ac_cv_sys_largefile_CC" != no; then
4665 CC=$CC$ac_cv_sys_largefile_CC
4666 fi
4667
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4669 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4670 if ${ac_cv_sys_file_offset_bits+:} false; then :
4671 $as_echo_n "(cached) " >&6
4672 else
4673 while :; do
4674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4675 /* end confdefs.h. */
4676 #include <sys/types.h>
4677 /* Check that off_t can represent 2**63 - 1 correctly.
4678 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4679 since some C++ compilers masquerading as C compilers
4680 incorrectly reject 9223372036854775807. */
4681 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4682 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4683 && LARGE_OFF_T % 2147483647 == 1)
4684 ? 1 : -1];
4685 int
4686 main ()
4687 {
4688
4689 ;
4690 return 0;
4691 }
4692 _ACEOF
4693 if ac_fn_c_try_compile "$LINENO"; then :
4694 ac_cv_sys_file_offset_bits=no; break
4695 fi
4696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4698 /* end confdefs.h. */
4699 #define _FILE_OFFSET_BITS 64
4700 #include <sys/types.h>
4701 /* Check that off_t can represent 2**63 - 1 correctly.
4702 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4703 since some C++ compilers masquerading as C compilers
4704 incorrectly reject 9223372036854775807. */
4705 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4706 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4707 && LARGE_OFF_T % 2147483647 == 1)
4708 ? 1 : -1];
4709 int
4710 main ()
4711 {
4712
4713 ;
4714 return 0;
4715 }
4716 _ACEOF
4717 if ac_fn_c_try_compile "$LINENO"; then :
4718 ac_cv_sys_file_offset_bits=64; break
4719 fi
4720 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4721 ac_cv_sys_file_offset_bits=unknown
4722 break
4723 done
4724 fi
4725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4726 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4727 case $ac_cv_sys_file_offset_bits in #(
4728 no | unknown) ;;
4729 *)
4730 cat >>confdefs.h <<_ACEOF
4731 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4732 _ACEOF
4733 ;;
4734 esac
4735 rm -rf conftest*
4736 if test $ac_cv_sys_file_offset_bits = unknown; then
4737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4738 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4739 if ${ac_cv_sys_large_files+:} false; then :
4740 $as_echo_n "(cached) " >&6
4741 else
4742 while :; do
4743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4744 /* end confdefs.h. */
4745 #include <sys/types.h>
4746 /* Check that off_t can represent 2**63 - 1 correctly.
4747 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4748 since some C++ compilers masquerading as C compilers
4749 incorrectly reject 9223372036854775807. */
4750 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4751 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4752 && LARGE_OFF_T % 2147483647 == 1)
4753 ? 1 : -1];
4754 int
4755 main ()
4756 {
4757
4758 ;
4759 return 0;
4760 }
4761 _ACEOF
4762 if ac_fn_c_try_compile "$LINENO"; then :
4763 ac_cv_sys_large_files=no; break
4764 fi
4765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4767 /* end confdefs.h. */
4768 #define _LARGE_FILES 1
4769 #include <sys/types.h>
4770 /* Check that off_t can represent 2**63 - 1 correctly.
4771 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4772 since some C++ compilers masquerading as C compilers
4773 incorrectly reject 9223372036854775807. */
4774 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4775 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4776 && LARGE_OFF_T % 2147483647 == 1)
4777 ? 1 : -1];
4778 int
4779 main ()
4780 {
4781
4782 ;
4783 return 0;
4784 }
4785 _ACEOF
4786 if ac_fn_c_try_compile "$LINENO"; then :
4787 ac_cv_sys_large_files=1; break
4788 fi
4789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4790 ac_cv_sys_large_files=unknown
4791 break
4792 done
4793 fi
4794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4795 $as_echo "$ac_cv_sys_large_files" >&6; }
4796 case $ac_cv_sys_large_files in #(
4797 no | unknown) ;;
4798 *)
4799 cat >>confdefs.h <<_ACEOF
4800 #define _LARGE_FILES $ac_cv_sys_large_files
4801 _ACEOF
4802 ;;
4803 esac
4804 rm -rf conftest*
4805 fi
4806
4807
4808 fi
4809
4810
4811
4812
4813
4814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4815 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4816 if ${am_cv_prog_cc_stdc+:} false; then :
4817 $as_echo_n "(cached) " >&6
4818 else
4819 am_cv_prog_cc_stdc=no
4820 ac_save_CC="$CC"
4821 # Don't try gcc -ansi; that turns off useful extensions and
4822 # breaks some systems' header files.
4823 # AIX -qlanglvl=ansi
4824 # Ultrix and OSF/1 -std1
4825 # HP-UX 10.20 and later -Ae
4826 # HP-UX older versions -Aa -D_HPUX_SOURCE
4827 # SVR4 -Xc -D__EXTENSIONS__
4828 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4829 do
4830 CC="$ac_save_CC $ac_arg"
4831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4832 /* end confdefs.h. */
4833 #include <stdarg.h>
4834 #include <stdio.h>
4835 #include <sys/types.h>
4836 #include <sys/stat.h>
4837 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4838 struct buf { int x; };
4839 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4840 static char *e (p, i)
4841 char **p;
4842 int i;
4843 {
4844 return p[i];
4845 }
4846 static char *f (char * (*g) (char **, int), char **p, ...)
4847 {
4848 char *s;
4849 va_list v;
4850 va_start (v,p);
4851 s = g (p, va_arg (v,int));
4852 va_end (v);
4853 return s;
4854 }
4855 int test (int i, double x);
4856 struct s1 {int (*f) (int a);};
4857 struct s2 {int (*f) (double a);};
4858 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4859 int argc;
4860 char **argv;
4861
4862 int
4863 main ()
4864 {
4865
4866 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4867
4868 ;
4869 return 0;
4870 }
4871 _ACEOF
4872 if ac_fn_c_try_compile "$LINENO"; then :
4873 am_cv_prog_cc_stdc="$ac_arg"; break
4874 fi
4875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4876 done
4877 CC="$ac_save_CC"
4878
4879 fi
4880
4881 if test -z "$am_cv_prog_cc_stdc"; then
4882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4883 $as_echo "none needed" >&6; }
4884 else
4885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
4886 $as_echo "$am_cv_prog_cc_stdc" >&6; }
4887 fi
4888 case "x$am_cv_prog_cc_stdc" in
4889 x|xno) ;;
4890 *) CC="$CC $am_cv_prog_cc_stdc" ;;
4891 esac
4892
4893 # Expand $ac_aux_dir to an absolute path.
4894 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4895
4896 if test x"${install_sh+set}" != xset; then
4897 case $am_aux_dir in
4898 *\ * | *\ *)
4899 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4900 *)
4901 install_sh="\${SHELL} $am_aux_dir/install-sh"
4902 esac
4903 fi
4904
4905 # Installed binaries are usually stripped using 'strip' when the user
4906 # run "make install-strip". However 'strip' might not be the right
4907 # tool to use in cross-compilation environments, therefore Automake
4908 # will honor the 'STRIP' environment variable to overrule this program.
4909 if test "$cross_compiling" != no; then
4910 if test -n "$ac_tool_prefix"; then
4911 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4912 set dummy ${ac_tool_prefix}strip; ac_word=$2
4913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4914 $as_echo_n "checking for $ac_word... " >&6; }
4915 if ${ac_cv_prog_STRIP+:} false; then :
4916 $as_echo_n "(cached) " >&6
4917 else
4918 if test -n "$STRIP"; then
4919 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4920 else
4921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4922 for as_dir in $PATH
4923 do
4924 IFS=$as_save_IFS
4925 test -z "$as_dir" && as_dir=.
4926 for ac_exec_ext in '' $ac_executable_extensions; do
4927 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4928 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4930 break 2
4931 fi
4932 done
4933 done
4934 IFS=$as_save_IFS
4935
4936 fi
4937 fi
4938 STRIP=$ac_cv_prog_STRIP
4939 if test -n "$STRIP"; then
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4941 $as_echo "$STRIP" >&6; }
4942 else
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4944 $as_echo "no" >&6; }
4945 fi
4946
4947
4948 fi
4949 if test -z "$ac_cv_prog_STRIP"; then
4950 ac_ct_STRIP=$STRIP
4951 # Extract the first word of "strip", so it can be a program name with args.
4952 set dummy strip; ac_word=$2
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4954 $as_echo_n "checking for $ac_word... " >&6; }
4955 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4956 $as_echo_n "(cached) " >&6
4957 else
4958 if test -n "$ac_ct_STRIP"; then
4959 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4960 else
4961 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4962 for as_dir in $PATH
4963 do
4964 IFS=$as_save_IFS
4965 test -z "$as_dir" && as_dir=.
4966 for ac_exec_ext in '' $ac_executable_extensions; do
4967 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4968 ac_cv_prog_ac_ct_STRIP="strip"
4969 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4970 break 2
4971 fi
4972 done
4973 done
4974 IFS=$as_save_IFS
4975
4976 fi
4977 fi
4978 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4979 if test -n "$ac_ct_STRIP"; then
4980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4981 $as_echo "$ac_ct_STRIP" >&6; }
4982 else
4983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4984 $as_echo "no" >&6; }
4985 fi
4986
4987 if test "x$ac_ct_STRIP" = x; then
4988 STRIP=":"
4989 else
4990 case $cross_compiling:$ac_tool_warned in
4991 yes:)
4992 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4993 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4994 ac_tool_warned=yes ;;
4995 esac
4996 STRIP=$ac_ct_STRIP
4997 fi
4998 else
4999 STRIP="$ac_cv_prog_STRIP"
5000 fi
5001
5002 fi
5003 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5004
5005
5006 ac_aux_dir=
5007 for ac_dir in .. "$srcdir"/..; do
5008 if test -f "$ac_dir/install-sh"; then
5009 ac_aux_dir=$ac_dir
5010 ac_install_sh="$ac_aux_dir/install-sh -c"
5011 break
5012 elif test -f "$ac_dir/install.sh"; then
5013 ac_aux_dir=$ac_dir
5014 ac_install_sh="$ac_aux_dir/install.sh -c"
5015 break
5016 elif test -f "$ac_dir/shtool"; then
5017 ac_aux_dir=$ac_dir
5018 ac_install_sh="$ac_aux_dir/shtool install -c"
5019 break
5020 fi
5021 done
5022 if test -z "$ac_aux_dir"; then
5023 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
5024 fi
5025
5026 # These three variables are undocumented and unsupported,
5027 # and are intended to be withdrawn in a future Autoconf release.
5028 # They can cause serious problems if a builder's source tree is in a directory
5029 # whose full name contains unusual characters.
5030 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5031 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5032 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5033
5034
5035
5036 test "$program_prefix" != NONE &&
5037 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5038 # Use a double $ so make ignores it.
5039 test "$program_suffix" != NONE &&
5040 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5041 # Double any \ or $.
5042 # By default was `s,x,x', remove it if useless.
5043 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5044 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5045
5046
5047 # We require a C++11 compiler. Check if one is available, and if
5048 # necessary, set CXX_DIALECT to some -std=xxx switch.
5049
5050 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
5051 ac_ext=cpp
5052 ac_cpp='$CXXCPP $CPPFLAGS'
5053 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5054 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5055 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5056 CXX_DIALECT=""
5057 ac_success=no
5058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5059 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5060 if ${ax_cv_cxx_compile_cxx11+:} false; then :
5061 $as_echo_n "(cached) " >&6
5062 else
5063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5064 /* end confdefs.h. */
5065
5066
5067 // If the compiler admits that it is not ready for C++11, why torture it?
5068 // Hopefully, this will speed up the test.
5069
5070 #ifndef __cplusplus
5071
5072 #error "This is not a C++ compiler"
5073
5074 #elif __cplusplus < 201103L
5075
5076 #error "This is not a C++11 compiler"
5077
5078 #else
5079
5080 namespace cxx11
5081 {
5082
5083 namespace test_static_assert
5084 {
5085
5086 template <typename T>
5087 struct check
5088 {
5089 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5090 };
5091
5092 }
5093
5094 namespace test_final_override
5095 {
5096
5097 struct Base
5098 {
5099 virtual void f() {}
5100 };
5101
5102 struct Derived : public Base
5103 {
5104 virtual void f() override {}
5105 };
5106
5107 }
5108
5109 namespace test_double_right_angle_brackets
5110 {
5111
5112 template < typename T >
5113 struct check {};
5114
5115 typedef check<void> single_type;
5116 typedef check<check<void>> double_type;
5117 typedef check<check<check<void>>> triple_type;
5118 typedef check<check<check<check<void>>>> quadruple_type;
5119
5120 }
5121
5122 namespace test_decltype
5123 {
5124
5125 int
5126 f()
5127 {
5128 int a = 1;
5129 decltype(a) b = 2;
5130 return a + b;
5131 }
5132
5133 }
5134
5135 namespace test_type_deduction
5136 {
5137
5138 template < typename T1, typename T2 >
5139 struct is_same
5140 {
5141 static const bool value = false;
5142 };
5143
5144 template < typename T >
5145 struct is_same<T, T>
5146 {
5147 static const bool value = true;
5148 };
5149
5150 template < typename T1, typename T2 >
5151 auto
5152 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5153 {
5154 return a1 + a2;
5155 }
5156
5157 int
5158 test(const int c, volatile int v)
5159 {
5160 static_assert(is_same<int, decltype(0)>::value == true, "");
5161 static_assert(is_same<int, decltype(c)>::value == false, "");
5162 static_assert(is_same<int, decltype(v)>::value == false, "");
5163 auto ac = c;
5164 auto av = v;
5165 auto sumi = ac + av + 'x';
5166 auto sumf = ac + av + 1.0;
5167 static_assert(is_same<int, decltype(ac)>::value == true, "");
5168 static_assert(is_same<int, decltype(av)>::value == true, "");
5169 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5170 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5171 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5172 return (sumf > 0.0) ? sumi : add(c, v);
5173 }
5174
5175 }
5176
5177 namespace test_noexcept
5178 {
5179
5180 int f() { return 0; }
5181 int g() noexcept { return 0; }
5182
5183 static_assert(noexcept(f()) == false, "");
5184 static_assert(noexcept(g()) == true, "");
5185
5186 }
5187
5188 namespace test_constexpr
5189 {
5190
5191 template < typename CharT >
5192 unsigned long constexpr
5193 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5194 {
5195 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5196 }
5197
5198 template < typename CharT >
5199 unsigned long constexpr
5200 strlen_c(const CharT *const s) noexcept
5201 {
5202 return strlen_c_r(s, 0UL);
5203 }
5204
5205 static_assert(strlen_c("") == 0UL, "");
5206 static_assert(strlen_c("1") == 1UL, "");
5207 static_assert(strlen_c("example") == 7UL, "");
5208 static_assert(strlen_c("another\0example") == 7UL, "");
5209
5210 }
5211
5212 namespace test_rvalue_references
5213 {
5214
5215 template < int N >
5216 struct answer
5217 {
5218 static constexpr int value = N;
5219 };
5220
5221 answer<1> f(int&) { return answer<1>(); }
5222 answer<2> f(const int&) { return answer<2>(); }
5223 answer<3> f(int&&) { return answer<3>(); }
5224
5225 void
5226 test()
5227 {
5228 int i = 0;
5229 const int c = 0;
5230 static_assert(decltype(f(i))::value == 1, "");
5231 static_assert(decltype(f(c))::value == 2, "");
5232 static_assert(decltype(f(0))::value == 3, "");
5233 }
5234
5235 }
5236
5237 namespace test_uniform_initialization
5238 {
5239
5240 struct test
5241 {
5242 static const int zero {};
5243 static const int one {1};
5244 };
5245
5246 static_assert(test::zero == 0, "");
5247 static_assert(test::one == 1, "");
5248
5249 }
5250
5251 namespace test_lambdas
5252 {
5253
5254 void
5255 test1()
5256 {
5257 auto lambda1 = [](){};
5258 auto lambda2 = lambda1;
5259 lambda1();
5260 lambda2();
5261 }
5262
5263 int
5264 test2()
5265 {
5266 auto a = [](int i, int j){ return i + j; }(1, 2);
5267 auto b = []() -> int { return '0'; }();
5268 auto c = [=](){ return a + b; }();
5269 auto d = [&](){ return c; }();
5270 auto e = [a, &b](int x) mutable {
5271 const auto identity = [](int y){ return y; };
5272 for (auto i = 0; i < a; ++i)
5273 a += b--;
5274 return x + identity(a + b);
5275 }(0);
5276 return a + b + c + d + e;
5277 }
5278
5279 int
5280 test3()
5281 {
5282 const auto nullary = [](){ return 0; };
5283 const auto unary = [](int x){ return x; };
5284 using nullary_t = decltype(nullary);
5285 using unary_t = decltype(unary);
5286 const auto higher1st = [](nullary_t f){ return f(); };
5287 const auto higher2nd = [unary](nullary_t f1){
5288 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5289 };
5290 return higher1st(nullary) + higher2nd(nullary)(unary);
5291 }
5292
5293 }
5294
5295 namespace test_variadic_templates
5296 {
5297
5298 template <int...>
5299 struct sum;
5300
5301 template <int N0, int... N1toN>
5302 struct sum<N0, N1toN...>
5303 {
5304 static constexpr auto value = N0 + sum<N1toN...>::value;
5305 };
5306
5307 template <>
5308 struct sum<>
5309 {
5310 static constexpr auto value = 0;
5311 };
5312
5313 static_assert(sum<>::value == 0, "");
5314 static_assert(sum<1>::value == 1, "");
5315 static_assert(sum<23>::value == 23, "");
5316 static_assert(sum<1, 2>::value == 3, "");
5317 static_assert(sum<5, 5, 11>::value == 21, "");
5318 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5319
5320 }
5321
5322 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5323 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5324 // because of this.
5325 namespace test_template_alias_sfinae
5326 {
5327
5328 struct foo {};
5329
5330 template<typename T>
5331 using member = typename T::member_type;
5332
5333 template<typename T>
5334 void func(...) {}
5335
5336 template<typename T>
5337 void func(member<T>*) {}
5338
5339 void test();
5340
5341 void test() { func<foo>(0); }
5342
5343 }
5344
5345 } // namespace cxx11
5346
5347 #endif // __cplusplus >= 201103L
5348
5349
5350
5351 _ACEOF
5352 if ac_fn_cxx_try_compile "$LINENO"; then :
5353 ax_cv_cxx_compile_cxx11=yes
5354 else
5355 ax_cv_cxx_compile_cxx11=no
5356 fi
5357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5358 fi
5359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5360 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5361 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5362 ac_success=yes
5363 fi
5364
5365 if test x$ac_success = xno; then
5366 for alternative in ${ax_cxx_compile_alternatives}; do
5367 switch="-std=gnu++${alternative}"
5368 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5370 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5371 if eval \${$cachevar+:} false; then :
5372 $as_echo_n "(cached) " >&6
5373 else
5374 ac_save_CXX="$CXX"
5375 CXX="$CXX $switch"
5376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5377 /* end confdefs.h. */
5378
5379
5380 // If the compiler admits that it is not ready for C++11, why torture it?
5381 // Hopefully, this will speed up the test.
5382
5383 #ifndef __cplusplus
5384
5385 #error "This is not a C++ compiler"
5386
5387 #elif __cplusplus < 201103L
5388
5389 #error "This is not a C++11 compiler"
5390
5391 #else
5392
5393 namespace cxx11
5394 {
5395
5396 namespace test_static_assert
5397 {
5398
5399 template <typename T>
5400 struct check
5401 {
5402 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5403 };
5404
5405 }
5406
5407 namespace test_final_override
5408 {
5409
5410 struct Base
5411 {
5412 virtual void f() {}
5413 };
5414
5415 struct Derived : public Base
5416 {
5417 virtual void f() override {}
5418 };
5419
5420 }
5421
5422 namespace test_double_right_angle_brackets
5423 {
5424
5425 template < typename T >
5426 struct check {};
5427
5428 typedef check<void> single_type;
5429 typedef check<check<void>> double_type;
5430 typedef check<check<check<void>>> triple_type;
5431 typedef check<check<check<check<void>>>> quadruple_type;
5432
5433 }
5434
5435 namespace test_decltype
5436 {
5437
5438 int
5439 f()
5440 {
5441 int a = 1;
5442 decltype(a) b = 2;
5443 return a + b;
5444 }
5445
5446 }
5447
5448 namespace test_type_deduction
5449 {
5450
5451 template < typename T1, typename T2 >
5452 struct is_same
5453 {
5454 static const bool value = false;
5455 };
5456
5457 template < typename T >
5458 struct is_same<T, T>
5459 {
5460 static const bool value = true;
5461 };
5462
5463 template < typename T1, typename T2 >
5464 auto
5465 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5466 {
5467 return a1 + a2;
5468 }
5469
5470 int
5471 test(const int c, volatile int v)
5472 {
5473 static_assert(is_same<int, decltype(0)>::value == true, "");
5474 static_assert(is_same<int, decltype(c)>::value == false, "");
5475 static_assert(is_same<int, decltype(v)>::value == false, "");
5476 auto ac = c;
5477 auto av = v;
5478 auto sumi = ac + av + 'x';
5479 auto sumf = ac + av + 1.0;
5480 static_assert(is_same<int, decltype(ac)>::value == true, "");
5481 static_assert(is_same<int, decltype(av)>::value == true, "");
5482 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5483 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5484 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5485 return (sumf > 0.0) ? sumi : add(c, v);
5486 }
5487
5488 }
5489
5490 namespace test_noexcept
5491 {
5492
5493 int f() { return 0; }
5494 int g() noexcept { return 0; }
5495
5496 static_assert(noexcept(f()) == false, "");
5497 static_assert(noexcept(g()) == true, "");
5498
5499 }
5500
5501 namespace test_constexpr
5502 {
5503
5504 template < typename CharT >
5505 unsigned long constexpr
5506 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5507 {
5508 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5509 }
5510
5511 template < typename CharT >
5512 unsigned long constexpr
5513 strlen_c(const CharT *const s) noexcept
5514 {
5515 return strlen_c_r(s, 0UL);
5516 }
5517
5518 static_assert(strlen_c("") == 0UL, "");
5519 static_assert(strlen_c("1") == 1UL, "");
5520 static_assert(strlen_c("example") == 7UL, "");
5521 static_assert(strlen_c("another\0example") == 7UL, "");
5522
5523 }
5524
5525 namespace test_rvalue_references
5526 {
5527
5528 template < int N >
5529 struct answer
5530 {
5531 static constexpr int value = N;
5532 };
5533
5534 answer<1> f(int&) { return answer<1>(); }
5535 answer<2> f(const int&) { return answer<2>(); }
5536 answer<3> f(int&&) { return answer<3>(); }
5537
5538 void
5539 test()
5540 {
5541 int i = 0;
5542 const int c = 0;
5543 static_assert(decltype(f(i))::value == 1, "");
5544 static_assert(decltype(f(c))::value == 2, "");
5545 static_assert(decltype(f(0))::value == 3, "");
5546 }
5547
5548 }
5549
5550 namespace test_uniform_initialization
5551 {
5552
5553 struct test
5554 {
5555 static const int zero {};
5556 static const int one {1};
5557 };
5558
5559 static_assert(test::zero == 0, "");
5560 static_assert(test::one == 1, "");
5561
5562 }
5563
5564 namespace test_lambdas
5565 {
5566
5567 void
5568 test1()
5569 {
5570 auto lambda1 = [](){};
5571 auto lambda2 = lambda1;
5572 lambda1();
5573 lambda2();
5574 }
5575
5576 int
5577 test2()
5578 {
5579 auto a = [](int i, int j){ return i + j; }(1, 2);
5580 auto b = []() -> int { return '0'; }();
5581 auto c = [=](){ return a + b; }();
5582 auto d = [&](){ return c; }();
5583 auto e = [a, &b](int x) mutable {
5584 const auto identity = [](int y){ return y; };
5585 for (auto i = 0; i < a; ++i)
5586 a += b--;
5587 return x + identity(a + b);
5588 }(0);
5589 return a + b + c + d + e;
5590 }
5591
5592 int
5593 test3()
5594 {
5595 const auto nullary = [](){ return 0; };
5596 const auto unary = [](int x){ return x; };
5597 using nullary_t = decltype(nullary);
5598 using unary_t = decltype(unary);
5599 const auto higher1st = [](nullary_t f){ return f(); };
5600 const auto higher2nd = [unary](nullary_t f1){
5601 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5602 };
5603 return higher1st(nullary) + higher2nd(nullary)(unary);
5604 }
5605
5606 }
5607
5608 namespace test_variadic_templates
5609 {
5610
5611 template <int...>
5612 struct sum;
5613
5614 template <int N0, int... N1toN>
5615 struct sum<N0, N1toN...>
5616 {
5617 static constexpr auto value = N0 + sum<N1toN...>::value;
5618 };
5619
5620 template <>
5621 struct sum<>
5622 {
5623 static constexpr auto value = 0;
5624 };
5625
5626 static_assert(sum<>::value == 0, "");
5627 static_assert(sum<1>::value == 1, "");
5628 static_assert(sum<23>::value == 23, "");
5629 static_assert(sum<1, 2>::value == 3, "");
5630 static_assert(sum<5, 5, 11>::value == 21, "");
5631 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5632
5633 }
5634
5635 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5636 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5637 // because of this.
5638 namespace test_template_alias_sfinae
5639 {
5640
5641 struct foo {};
5642
5643 template<typename T>
5644 using member = typename T::member_type;
5645
5646 template<typename T>
5647 void func(...) {}
5648
5649 template<typename T>
5650 void func(member<T>*) {}
5651
5652 void test();
5653
5654 void test() { func<foo>(0); }
5655
5656 }
5657
5658 } // namespace cxx11
5659
5660 #endif // __cplusplus >= 201103L
5661
5662
5663
5664 _ACEOF
5665 if ac_fn_cxx_try_compile "$LINENO"; then :
5666 eval $cachevar=yes
5667 else
5668 eval $cachevar=no
5669 fi
5670 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5671 CXX="$ac_save_CXX"
5672 fi
5673 eval ac_res=\$$cachevar
5674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5675 $as_echo "$ac_res" >&6; }
5676 if eval test x\$$cachevar = xyes; then
5677 CXX_DIALECT="$switch"
5678 ac_success=yes
5679 break
5680 fi
5681 done
5682 fi
5683
5684 if test x$ac_success = xno; then
5685 for alternative in ${ax_cxx_compile_alternatives}; do
5686 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5687 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5689 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5690 if eval \${$cachevar+:} false; then :
5691 $as_echo_n "(cached) " >&6
5692 else
5693 ac_save_CXX="$CXX"
5694 CXX="$CXX $switch"
5695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5696 /* end confdefs.h. */
5697
5698
5699 // If the compiler admits that it is not ready for C++11, why torture it?
5700 // Hopefully, this will speed up the test.
5701
5702 #ifndef __cplusplus
5703
5704 #error "This is not a C++ compiler"
5705
5706 #elif __cplusplus < 201103L
5707
5708 #error "This is not a C++11 compiler"
5709
5710 #else
5711
5712 namespace cxx11
5713 {
5714
5715 namespace test_static_assert
5716 {
5717
5718 template <typename T>
5719 struct check
5720 {
5721 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5722 };
5723
5724 }
5725
5726 namespace test_final_override
5727 {
5728
5729 struct Base
5730 {
5731 virtual void f() {}
5732 };
5733
5734 struct Derived : public Base
5735 {
5736 virtual void f() override {}
5737 };
5738
5739 }
5740
5741 namespace test_double_right_angle_brackets
5742 {
5743
5744 template < typename T >
5745 struct check {};
5746
5747 typedef check<void> single_type;
5748 typedef check<check<void>> double_type;
5749 typedef check<check<check<void>>> triple_type;
5750 typedef check<check<check<check<void>>>> quadruple_type;
5751
5752 }
5753
5754 namespace test_decltype
5755 {
5756
5757 int
5758 f()
5759 {
5760 int a = 1;
5761 decltype(a) b = 2;
5762 return a + b;
5763 }
5764
5765 }
5766
5767 namespace test_type_deduction
5768 {
5769
5770 template < typename T1, typename T2 >
5771 struct is_same
5772 {
5773 static const bool value = false;
5774 };
5775
5776 template < typename T >
5777 struct is_same<T, T>
5778 {
5779 static const bool value = true;
5780 };
5781
5782 template < typename T1, typename T2 >
5783 auto
5784 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5785 {
5786 return a1 + a2;
5787 }
5788
5789 int
5790 test(const int c, volatile int v)
5791 {
5792 static_assert(is_same<int, decltype(0)>::value == true, "");
5793 static_assert(is_same<int, decltype(c)>::value == false, "");
5794 static_assert(is_same<int, decltype(v)>::value == false, "");
5795 auto ac = c;
5796 auto av = v;
5797 auto sumi = ac + av + 'x';
5798 auto sumf = ac + av + 1.0;
5799 static_assert(is_same<int, decltype(ac)>::value == true, "");
5800 static_assert(is_same<int, decltype(av)>::value == true, "");
5801 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5802 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5803 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5804 return (sumf > 0.0) ? sumi : add(c, v);
5805 }
5806
5807 }
5808
5809 namespace test_noexcept
5810 {
5811
5812 int f() { return 0; }
5813 int g() noexcept { return 0; }
5814
5815 static_assert(noexcept(f()) == false, "");
5816 static_assert(noexcept(g()) == true, "");
5817
5818 }
5819
5820 namespace test_constexpr
5821 {
5822
5823 template < typename CharT >
5824 unsigned long constexpr
5825 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5826 {
5827 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5828 }
5829
5830 template < typename CharT >
5831 unsigned long constexpr
5832 strlen_c(const CharT *const s) noexcept
5833 {
5834 return strlen_c_r(s, 0UL);
5835 }
5836
5837 static_assert(strlen_c("") == 0UL, "");
5838 static_assert(strlen_c("1") == 1UL, "");
5839 static_assert(strlen_c("example") == 7UL, "");
5840 static_assert(strlen_c("another\0example") == 7UL, "");
5841
5842 }
5843
5844 namespace test_rvalue_references
5845 {
5846
5847 template < int N >
5848 struct answer
5849 {
5850 static constexpr int value = N;
5851 };
5852
5853 answer<1> f(int&) { return answer<1>(); }
5854 answer<2> f(const int&) { return answer<2>(); }
5855 answer<3> f(int&&) { return answer<3>(); }
5856
5857 void
5858 test()
5859 {
5860 int i = 0;
5861 const int c = 0;
5862 static_assert(decltype(f(i))::value == 1, "");
5863 static_assert(decltype(f(c))::value == 2, "");
5864 static_assert(decltype(f(0))::value == 3, "");
5865 }
5866
5867 }
5868
5869 namespace test_uniform_initialization
5870 {
5871
5872 struct test
5873 {
5874 static const int zero {};
5875 static const int one {1};
5876 };
5877
5878 static_assert(test::zero == 0, "");
5879 static_assert(test::one == 1, "");
5880
5881 }
5882
5883 namespace test_lambdas
5884 {
5885
5886 void
5887 test1()
5888 {
5889 auto lambda1 = [](){};
5890 auto lambda2 = lambda1;
5891 lambda1();
5892 lambda2();
5893 }
5894
5895 int
5896 test2()
5897 {
5898 auto a = [](int i, int j){ return i + j; }(1, 2);
5899 auto b = []() -> int { return '0'; }();
5900 auto c = [=](){ return a + b; }();
5901 auto d = [&](){ return c; }();
5902 auto e = [a, &b](int x) mutable {
5903 const auto identity = [](int y){ return y; };
5904 for (auto i = 0; i < a; ++i)
5905 a += b--;
5906 return x + identity(a + b);
5907 }(0);
5908 return a + b + c + d + e;
5909 }
5910
5911 int
5912 test3()
5913 {
5914 const auto nullary = [](){ return 0; };
5915 const auto unary = [](int x){ return x; };
5916 using nullary_t = decltype(nullary);
5917 using unary_t = decltype(unary);
5918 const auto higher1st = [](nullary_t f){ return f(); };
5919 const auto higher2nd = [unary](nullary_t f1){
5920 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5921 };
5922 return higher1st(nullary) + higher2nd(nullary)(unary);
5923 }
5924
5925 }
5926
5927 namespace test_variadic_templates
5928 {
5929
5930 template <int...>
5931 struct sum;
5932
5933 template <int N0, int... N1toN>
5934 struct sum<N0, N1toN...>
5935 {
5936 static constexpr auto value = N0 + sum<N1toN...>::value;
5937 };
5938
5939 template <>
5940 struct sum<>
5941 {
5942 static constexpr auto value = 0;
5943 };
5944
5945 static_assert(sum<>::value == 0, "");
5946 static_assert(sum<1>::value == 1, "");
5947 static_assert(sum<23>::value == 23, "");
5948 static_assert(sum<1, 2>::value == 3, "");
5949 static_assert(sum<5, 5, 11>::value == 21, "");
5950 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5951
5952 }
5953
5954 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5955 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5956 // because of this.
5957 namespace test_template_alias_sfinae
5958 {
5959
5960 struct foo {};
5961
5962 template<typename T>
5963 using member = typename T::member_type;
5964
5965 template<typename T>
5966 void func(...) {}
5967
5968 template<typename T>
5969 void func(member<T>*) {}
5970
5971 void test();
5972
5973 void test() { func<foo>(0); }
5974
5975 }
5976
5977 } // namespace cxx11
5978
5979 #endif // __cplusplus >= 201103L
5980
5981
5982
5983 _ACEOF
5984 if ac_fn_cxx_try_compile "$LINENO"; then :
5985 eval $cachevar=yes
5986 else
5987 eval $cachevar=no
5988 fi
5989 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5990 CXX="$ac_save_CXX"
5991 fi
5992 eval ac_res=\$$cachevar
5993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5994 $as_echo "$ac_res" >&6; }
5995 if eval test x\$$cachevar = xyes; then
5996 CXX_DIALECT="$switch"
5997 ac_success=yes
5998 break
5999 fi
6000 done
6001 if test x$ac_success = xyes; then
6002 break
6003 fi
6004 done
6005 fi
6006 ac_ext=c
6007 ac_cpp='$CPP $CPPFLAGS'
6008 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6009 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6010 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6011
6012 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6013 if test x$ac_success = xno; then
6014 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6015 fi
6016 fi
6017 if test x$ac_success = xno; then
6018 HAVE_CXX11=0
6019 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6020 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6021 else
6022 HAVE_CXX11=1
6023
6024 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
6025
6026 fi
6027
6028
6029
6030
6031 # Dependency checking.
6032 rm -rf .tst 2>/dev/null
6033 mkdir .tst 2>/dev/null
6034 if test -d .tst; then
6035 am__leading_dot=.
6036 else
6037 am__leading_dot=_
6038 fi
6039 rmdir .tst 2>/dev/null
6040
6041 DEPDIR="${am__leading_dot}deps"
6042
6043 ac_config_commands="$ac_config_commands depdir"
6044
6045
6046 depcc="$CC" am_compiler_list=
6047
6048 am_depcomp=$ac_aux_dir/depcomp
6049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6050 $as_echo_n "checking dependency style of $depcc... " >&6; }
6051 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6052 $as_echo_n "(cached) " >&6
6053 else
6054 if test -f "$am_depcomp"; then
6055 # We make a subdir and do the tests there. Otherwise we can end up
6056 # making bogus files that we don't know about and never remove. For
6057 # instance it was reported that on HP-UX the gcc test will end up
6058 # making a dummy file named `D' -- because `-MD' means `put the output
6059 # in D'.
6060 mkdir conftest.dir
6061 # Copy depcomp to subdir because otherwise we won't find it if we're
6062 # using a relative directory.
6063 cp "$am_depcomp" conftest.dir
6064 cd conftest.dir
6065 # We will build objects and dependencies in a subdirectory because
6066 # it helps to detect inapplicable dependency modes. For instance
6067 # both Tru64's cc and ICC support -MD to output dependencies as a
6068 # side effect of compilation, but ICC will put the dependencies in
6069 # the current directory while Tru64 will put them in the object
6070 # directory.
6071 mkdir sub
6072
6073 am_cv_CC_dependencies_compiler_type=none
6074 if test "$am_compiler_list" = ""; then
6075 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6076 fi
6077 for depmode in $am_compiler_list; do
6078 if test $depmode = none; then break; fi
6079
6080 $as_echo "$as_me:$LINENO: trying $depmode" >&5
6081 # Setup a source with many dependencies, because some compilers
6082 # like to wrap large dependency lists on column 80 (with \), and
6083 # we should not choose a depcomp mode which is confused by this.
6084 #
6085 # We need to recreate these files for each test, as the compiler may
6086 # overwrite some of them when testing with obscure command lines.
6087 # This happens at least with the AIX C compiler.
6088 : > sub/conftest.c
6089 for i in 1 2 3 4 5 6; do
6090 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6091 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6092 # Solaris 8's {/usr,}/bin/sh.
6093 touch sub/conftst$i.h
6094 done
6095 echo "include sub/conftest.Po" > confmf
6096
6097 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6098 # mode. It turns out that the SunPro C++ compiler does not properly
6099 # handle `-M -o', and we need to detect this.
6100 depcmd="depmode=$depmode \
6101 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6102 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6103 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6104 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6105 if env $depcmd > conftest.err 2>&1 &&
6106 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6107 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6108 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6109 # icc doesn't choke on unknown options, it will just issue warnings
6110 # or remarks (even with -Werror). So we grep stderr for any message
6111 # that says an option was ignored or not supported.
6112 # When given -MP, icc 7.0 and 7.1 complain thusly:
6113 # icc: Command line warning: ignoring option '-M'; no argument required
6114 # The diagnosis changed in icc 8.0:
6115 # icc: Command line remark: option '-MP' not supported
6116 if (grep 'ignoring option' conftest.err ||
6117 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6118 am_cv_CC_dependencies_compiler_type=$depmode
6119 $as_echo "$as_me:$LINENO: success" >&5
6120 break
6121 fi
6122 fi
6123 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6124 sed -e 's/^/| /' < conftest.err >&5
6125 done
6126
6127 cd ..
6128 rm -rf conftest.dir
6129 else
6130 am_cv_CC_dependencies_compiler_type=none
6131 fi
6132
6133 fi
6134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6135 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6136 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6137 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
6138 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6139
6140 fi
6141
6142
6143 gnulib_extra_configure_args=
6144 # If large-file support is disabled, make sure gnulib does the same.
6145 if test "$enable_largefile" = no; then
6146 gnulib_extra_configure_args="$gnulib_extra_configure_args --disable-largefile"
6147 fi
6148
6149 # Configure gnulib. We need to build gnulib under some other
6150 # directory not "gnulib", to avoid the problem of both GDB and
6151 # GDBserver wanting to build it in the same directory, when building
6152 # in the source dir.
6153
6154 in_src="gnulib"
6155 in_build="build-gnulib"
6156 in_extra_args="$gnulib_extra_configure_args"
6157
6158 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
6159 # so they do not pile up.
6160 ac_sub_configure_args=
6161 ac_prev=
6162 eval "set x $ac_configure_args"
6163 shift
6164 for ac_arg
6165 do
6166 if test -n "$ac_prev"; then
6167 ac_prev=
6168 continue
6169 fi
6170 case $ac_arg in
6171 -cache-file | --cache-file | --cache-fil | --cache-fi \
6172 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6173 ac_prev=cache_file ;;
6174 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6175 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
6176 | --c=*)
6177 ;;
6178 --config-cache | -C)
6179 ;;
6180 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6181 ac_prev=srcdir ;;
6182 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6183 ;;
6184 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
6185 ac_prev=prefix ;;
6186 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6187 ;;
6188 --disable-option-checking)
6189 ;;
6190 *)
6191 case $ac_arg in
6192 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6193 esac
6194 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
6195 esac
6196 done
6197
6198 # Always prepend --prefix to ensure using the same prefix
6199 # in subdir configurations.
6200 ac_arg="--prefix=$prefix"
6201 case $ac_arg in
6202 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
6203 esac
6204 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
6205
6206 # Pass --silent
6207 if test "$silent" = yes; then
6208 ac_sub_configure_args="--silent $ac_sub_configure_args"
6209 fi
6210
6211 # Always prepend --disable-option-checking to silence warnings, since
6212 # different subdirs can have different --enable and --with options.
6213 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
6214
6215 ac_popdir=`pwd`
6216 ac_dir=$in_build
6217
6218 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
6219 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
6220 $as_echo "$ac_msg" >&6
6221 as_dir="$ac_dir"; as_fn_mkdir_p
6222
6223 case $srcdir in
6224 [\\/]* | ?:[\\/]* )
6225 ac_srcdir=$srcdir/$in_src ;;
6226 *) # Relative name.
6227 ac_srcdir=../$srcdir/$in_src ;;
6228 esac
6229
6230 cd "$ac_dir"
6231
6232 ac_sub_configure=$ac_srcdir/configure
6233
6234 # Make the cache file name correct relative to the subdirectory.
6235 case $cache_file in
6236 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
6237 *) # Relative name.
6238 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
6239 esac
6240
6241 if test -n "$in_extra_args"; then
6242 # Add the extra args at the end.
6243 ac_sub_configure_args="$ac_sub_configure_args $in_extra_args"
6244 fi
6245
6246 { $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
6247 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
6248 # The eval makes quoting arguments work.
6249 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
6250 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
6251 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
6252
6253 cd "$ac_popdir"
6254
6255
6256
6257 CONFIG_OBS=
6258 CONFIG_DEPS=
6259 CONFIG_SRCS=
6260 ENABLE_CFLAGS=
6261
6262 CONFIG_ALL=
6263 CONFIG_CLEAN=
6264 CONFIG_INSTALL=
6265 CONFIG_UNINSTALL=
6266
6267 # If we haven't got the data from the intl directory,
6268 # assume NLS is disabled.
6269 USE_NLS=no
6270 LIBINTL=
6271 LIBINTL_DEP=
6272 INCINTL=
6273 XGETTEXT=
6274 GMSGFMT=
6275 POSUB=
6276
6277 if test -f ../intl/config.intl; then
6278 . ../intl/config.intl
6279 fi
6280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6281 $as_echo_n "checking whether NLS is requested... " >&6; }
6282 if test x"$USE_NLS" != xyes; then
6283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6284 $as_echo "no" >&6; }
6285 else
6286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6287 $as_echo "yes" >&6; }
6288
6289 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6290
6291
6292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6293 $as_echo_n "checking for catalogs to be installed... " >&6; }
6294 # Look for .po and .gmo files in the source directory.
6295 CATALOGS=
6296 XLINGUAS=
6297 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6298 # If there aren't any .gmo files the shell will give us the
6299 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6300 # weeded out.
6301 case "$cat" in *\**)
6302 continue;;
6303 esac
6304 # The quadruple backslash is collapsed to a double backslash
6305 # by the backticks, then collapsed again by the double quotes,
6306 # leaving us with one backslash in the sed expression (right
6307 # before the dot that mustn't act as a wildcard).
6308 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6309 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6310 # The user is allowed to set LINGUAS to a list of languages to
6311 # install catalogs for. If it's empty that means "all of them."
6312 if test "x$LINGUAS" = x; then
6313 CATALOGS="$CATALOGS $cat"
6314 XLINGUAS="$XLINGUAS $lang"
6315 else
6316 case "$LINGUAS" in *$lang*)
6317 CATALOGS="$CATALOGS $cat"
6318 XLINGUAS="$XLINGUAS $lang"
6319 ;;
6320 esac
6321 fi
6322 done
6323 LINGUAS="$XLINGUAS"
6324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6325 $as_echo "$LINGUAS" >&6; }
6326
6327
6328 DATADIRNAME=share
6329
6330 INSTOBJEXT=.mo
6331
6332 GENCAT=gencat
6333
6334 CATOBJEXT=.gmo
6335
6336 fi
6337
6338 localedir='${datadir}/locale'
6339
6340
6341 if test x"$USE_NLS" = xyes; then
6342 CONFIG_ALL="$CONFIG_ALL all-po"
6343 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6344 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6345 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6346 fi
6347
6348 GNULIB=build-gnulib/import
6349
6350 # For Makefile dependencies.
6351 GNULIB_STDINT_H=
6352 if test x"$STDINT_H" != x; then
6353 GNULIB_STDINT_H=$GNULIB/$STDINT_H
6354 fi
6355
6356
6357 PACKAGE=gdb
6358
6359 cat >>confdefs.h <<_ACEOF
6360 #define PACKAGE "$PACKAGE"
6361 _ACEOF
6362
6363
6364
6365 # We never need to detect it in this sub-configure.
6366 # But preserve it for config.status --recheck.
6367
6368
6369
6370 MAKEINFO_EXTRA_FLAGS=""
6371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6372 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6373 if ${gdb_cv_have_makeinfo_click+:} false; then :
6374 $as_echo_n "(cached) " >&6
6375 else
6376 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6377 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6378 gdb_cv_have_makeinfo_click=yes
6379 else
6380 gdb_cv_have_makeinfo_click=no
6381 fi
6382 fi
6383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6384 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6385 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6386 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6387 fi
6388
6389
6390
6391
6392 # Check whether --with-separate-debug-dir was given.
6393 if test "${with_separate_debug_dir+set}" = set; then :
6394 withval=$with_separate_debug_dir;
6395 DEBUGDIR=$withval
6396 else
6397 DEBUGDIR=${libdir}/debug
6398 fi
6399
6400
6401 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6402 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6403 ac_define_dir=`eval echo $DEBUGDIR`
6404 ac_define_dir=`eval echo $ac_define_dir`
6405
6406 cat >>confdefs.h <<_ACEOF
6407 #define DEBUGDIR "$ac_define_dir"
6408 _ACEOF
6409
6410
6411
6412
6413 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6414 if test "x$prefix" = xNONE; then
6415 test_prefix=/usr/local
6416 else
6417 test_prefix=$prefix
6418 fi
6419 else
6420 test_prefix=$exec_prefix
6421 fi
6422 value=0
6423 case ${ac_define_dir} in
6424 "${test_prefix}"|"${test_prefix}/"*|\
6425 '${exec_prefix}'|'${exec_prefix}/'*)
6426 value=1
6427 ;;
6428 esac
6429
6430 cat >>confdefs.h <<_ACEOF
6431 #define DEBUGDIR_RELOCATABLE $value
6432 _ACEOF
6433
6434
6435
6436
6437 # We can't pass paths as command line arguments.
6438 # Mingw32 tries to be clever and will convert the paths for us.
6439 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6440 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6441 # This breaks GDB's relocatable path conversions since paths passed in
6442 # config.h would not get so translated, the path prefixes no longer match.
6443
6444 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6445 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6446 ac_define_dir=`eval echo $bindir`
6447 ac_define_dir=`eval echo $ac_define_dir`
6448
6449 cat >>confdefs.h <<_ACEOF
6450 #define BINDIR "$ac_define_dir"
6451 _ACEOF
6452
6453
6454
6455 # GDB's datadir relocation
6456
6457
6458
6459 # Check whether --with-gdb-datadir was given.
6460 if test "${with_gdb_datadir+set}" = set; then :
6461 withval=$with_gdb_datadir;
6462 GDB_DATADIR=$withval
6463 else
6464 GDB_DATADIR=${datadir}/gdb
6465 fi
6466
6467
6468 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6469 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6470 ac_define_dir=`eval echo $GDB_DATADIR`
6471 ac_define_dir=`eval echo $ac_define_dir`
6472
6473 cat >>confdefs.h <<_ACEOF
6474 #define GDB_DATADIR "$ac_define_dir"
6475 _ACEOF
6476
6477
6478
6479
6480 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6481 if test "x$prefix" = xNONE; then
6482 test_prefix=/usr/local
6483 else
6484 test_prefix=$prefix
6485 fi
6486 else
6487 test_prefix=$exec_prefix
6488 fi
6489 value=0
6490 case ${ac_define_dir} in
6491 "${test_prefix}"|"${test_prefix}/"*|\
6492 '${exec_prefix}'|'${exec_prefix}/'*)
6493 value=1
6494 ;;
6495 esac
6496
6497 cat >>confdefs.h <<_ACEOF
6498 #define GDB_DATADIR_RELOCATABLE $value
6499 _ACEOF
6500
6501
6502
6503
6504
6505 # Check whether --with-relocated-sources was given.
6506 if test "${with_relocated_sources+set}" = set; then :
6507 withval=$with_relocated_sources; reloc_srcdir="${withval}"
6508
6509 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6510 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6511 ac_define_dir=`eval echo $reloc_srcdir`
6512 ac_define_dir=`eval echo $ac_define_dir`
6513
6514 cat >>confdefs.h <<_ACEOF
6515 #define RELOC_SRCDIR "$ac_define_dir"
6516 _ACEOF
6517
6518
6519
6520 fi
6521
6522
6523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6524 $as_echo_n "checking for default auto-load directory... " >&6; }
6525
6526 # Check whether --with-auto-load-dir was given.
6527 if test "${with_auto_load_dir+set}" = set; then :
6528 withval=$with_auto_load_dir;
6529 else
6530 with_auto_load_dir='$debugdir:$datadir/auto-load'
6531 fi
6532
6533 escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
6534
6535 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6536 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6537 ac_define_dir=`eval echo $escape_dir`
6538 ac_define_dir=`eval echo $ac_define_dir`
6539
6540 cat >>confdefs.h <<_ACEOF
6541 #define AUTO_LOAD_DIR "$ac_define_dir"
6542 _ACEOF
6543
6544
6545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6546 $as_echo "$with_auto_load_dir" >&6; }
6547
6548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6549 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6550
6551 # Check whether --with-auto-load-safe-path was given.
6552 if test "${with_auto_load_safe_path+set}" = set; then :
6553 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6554 with_auto_load_safe_path="/"
6555 fi
6556 else
6557 with_auto_load_safe_path="$with_auto_load_dir"
6558 fi
6559
6560 escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'`
6561
6562 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6563 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6564 ac_define_dir=`eval echo $escape_dir`
6565 ac_define_dir=`eval echo $ac_define_dir`
6566
6567 cat >>confdefs.h <<_ACEOF
6568 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6569 _ACEOF
6570
6571
6572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6573 $as_echo "$with_auto_load_safe_path" >&6; }
6574
6575
6576
6577 subdirs="$subdirs testsuite"
6578
6579
6580 # Check whether to support alternative target configurations
6581 # Check whether --enable-targets was given.
6582 if test "${enable_targets+set}" = set; then :
6583 enableval=$enable_targets; case "${enableval}" in
6584 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6585 ;;
6586 no) enable_targets= ;;
6587 *) enable_targets=$enableval ;;
6588 esac
6589 fi
6590
6591
6592 # Check whether to enable 64-bit support on 32-bit hosts
6593 # Check whether --enable-64-bit-bfd was given.
6594 if test "${enable_64_bit_bfd+set}" = set; then :
6595 enableval=$enable_64_bit_bfd; case "${enableval}" in
6596 yes) want64=true ;;
6597 no) want64=false ;;
6598 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6599 esac
6600 else
6601 want64=false
6602 fi
6603
6604 # Provide defaults for some variables set by the per-host and per-target
6605 # configuration.
6606 gdb_host_obs=posix-hdep.o
6607
6608 if test "${target}" = "${host}"; then
6609 gdb_native=yes
6610 else
6611 gdb_native=no
6612 fi
6613
6614 . $srcdir/configure.host
6615
6616 # Add in the common host objects.
6617 . $srcdir/common/common.host
6618 gdb_host_obs="$gdb_host_obs $common_host_obs"
6619
6620 # Accumulate some settings from configure.tgt over all enabled targets
6621
6622 TARGET_OBS=
6623 all_targets=
6624 HAVE_NATIVE_GCORE_TARGET=
6625
6626 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6627 do
6628 if test "$targ_alias" = "all"; then
6629 all_targets=true
6630 else
6631 # Canonicalize the secondary target names.
6632 result=`$ac_config_sub $targ_alias 2>/dev/null`
6633 if test -n "$result"; then
6634 targ=$result
6635 else
6636 targ=$targ_alias
6637 fi
6638
6639 . ${srcdir}/configure.tgt
6640
6641 if test -z "${gdb_target_obs}"; then :
6642 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6643 fi
6644
6645 # Target-specific object files
6646 for i in ${gdb_target_obs}; do
6647 case " $TARGET_OBS " in
6648 *" ${i} "*) ;;
6649 *)
6650 TARGET_OBS="$TARGET_OBS ${i}"
6651 ;;
6652 esac
6653 done
6654
6655 # Check whether this target needs 64-bit CORE_ADDR
6656 if test x${want64} = xfalse; then
6657 . ${srcdir}/../bfd/config.bfd
6658 fi
6659
6660 # Check whether this target is native and supports gcore.
6661 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6662 && $gdb_have_gcore; then
6663 HAVE_NATIVE_GCORE_TARGET=1
6664 fi
6665 fi
6666 done
6667
6668 if test x${all_targets} = xtrue; then
6669
6670 # We want all 64-bit targets if we either:
6671 # - run on a 64-bit host or
6672 # - already require 64-bit support for some other target or
6673 # - the --enable-64-bit-bfd option was supplied
6674 # Otherwise we only support all 32-bit targets.
6675 #
6676 # NOTE: This test must be in sync with the corresponding
6677 # tests in BFD!
6678
6679 if test x${want64} = xfalse; then
6680 # The cast to long int works around a bug in the HP C Compiler
6681 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6682 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6683 # This bug is HP SR number 8606223364.
6684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6685 $as_echo_n "checking size of long... " >&6; }
6686 if ${ac_cv_sizeof_long+:} false; then :
6687 $as_echo_n "(cached) " >&6
6688 else
6689 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
6690
6691 else
6692 if test "$ac_cv_type_long" = yes; then
6693 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6694 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6695 as_fn_error 77 "cannot compute sizeof (long)
6696 See \`config.log' for more details" "$LINENO" 5; }
6697 else
6698 ac_cv_sizeof_long=0
6699 fi
6700 fi
6701
6702 fi
6703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6704 $as_echo "$ac_cv_sizeof_long" >&6; }
6705
6706
6707
6708 cat >>confdefs.h <<_ACEOF
6709 #define SIZEOF_LONG $ac_cv_sizeof_long
6710 _ACEOF
6711
6712
6713 if test "x${ac_cv_sizeof_long}" = "x8"; then
6714 want64=true
6715 fi
6716 fi
6717 if test x${want64} = xtrue; then
6718 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6719 else
6720 TARGET_OBS='$(ALL_TARGET_OBS)'
6721 fi
6722 fi
6723
6724
6725
6726
6727 # For other settings, only the main target counts.
6728 gdb_sim=
6729 gdb_osabi=
6730 build_gdbserver=
6731 targ=$target; . ${srcdir}/configure.tgt
6732
6733 # Fetch the default architecture and default target vector from BFD.
6734 targ=$target; . $srcdir/../bfd/config.bfd
6735
6736 # We only want the first architecture, so strip off the others if
6737 # there is more than one.
6738 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6739
6740 if test "x$targ_archs" != x; then
6741
6742 cat >>confdefs.h <<_ACEOF
6743 #define DEFAULT_BFD_ARCH $targ_archs
6744 _ACEOF
6745
6746 fi
6747 if test "x$targ_defvec" != x; then
6748
6749 cat >>confdefs.h <<_ACEOF
6750 #define DEFAULT_BFD_VEC $targ_defvec
6751 _ACEOF
6752
6753 fi
6754
6755 # The CLI cannot be disabled yet, but may be in the future.
6756
6757 # Enable CLI.
6758 # Check whether --enable-gdbcli was given.
6759 if test "${enable_gdbcli+set}" = set; then :
6760 enableval=$enable_gdbcli; case $enableval in
6761 yes)
6762 ;;
6763 no)
6764 as_fn_error $? "the command-line interface cannot be disabled yet" "$LINENO" 5 ;;
6765 *)
6766 as_fn_error $? "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;;
6767 esac
6768 else
6769 enable_gdbcli=yes
6770 fi
6771
6772 if test x"$enable_gdbcli" = xyes; then
6773 if test -d $srcdir/cli; then
6774 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
6775 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
6776 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
6777 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
6778 fi
6779 fi
6780
6781 # Enable MI.
6782 # Check whether --enable-gdbmi was given.
6783 if test "${enable_gdbmi+set}" = set; then :
6784 enableval=$enable_gdbmi; case $enableval in
6785 yes | no)
6786 ;;
6787 *)
6788 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6789 esac
6790 else
6791 enable_gdbmi=yes
6792 fi
6793
6794 if test x"$enable_gdbmi" = xyes; then
6795 if test -d $srcdir/mi; then
6796 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6797 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6798 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6799 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6800 fi
6801 fi
6802
6803 # Enable TUI.
6804 # Check whether --enable-tui was given.
6805 if test "${enable_tui+set}" = set; then :
6806 enableval=$enable_tui; case $enableval in
6807 yes | no | auto)
6808 ;;
6809 *)
6810 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6811 esac
6812 else
6813 enable_tui=auto
6814 fi
6815
6816
6817 # Enable gdbtk.
6818 # Check whether --enable-gdbtk was given.
6819 if test "${enable_gdbtk+set}" = set; then :
6820 enableval=$enable_gdbtk; case $enableval in
6821 yes | no)
6822 ;;
6823 *)
6824 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6825 esac
6826 else
6827 if test -d $srcdir/gdbtk; then
6828 enable_gdbtk=yes
6829 else
6830 enable_gdbtk=no
6831 fi
6832 fi
6833
6834 # We unconditionally disable gdbtk tests on selected platforms.
6835 case $host_os in
6836 go32* | windows*)
6837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6838 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6839 enable_gdbtk=no ;;
6840 esac
6841
6842 # Libunwind support for ia64.
6843
6844
6845 # Check whether --with-libunwind-ia64 was given.
6846 if test "${with_libunwind_ia64+set}" = set; then :
6847 withval=$with_libunwind_ia64;
6848 else
6849 with_libunwind_ia64=auto
6850 fi
6851
6852
6853 # Backward compatibility option.
6854 if test "${with_libunwind+set}" = set; then
6855 if test x"$with_libunwind_ia64" != xauto; then
6856 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6857 fi
6858 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6859 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6860 with_libunwind_ia64="$with_libunwind"
6861 fi
6862
6863 case "$with_libunwind_ia64" in
6864 yes | no)
6865 ;;
6866 auto)
6867 for ac_header in libunwind-ia64.h
6868 do :
6869 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6870 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6871 cat >>confdefs.h <<_ACEOF
6872 #define HAVE_LIBUNWIND_IA64_H 1
6873 _ACEOF
6874
6875 fi
6876
6877 done
6878
6879 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6880 ;;
6881 *)
6882 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6883 ;;
6884 esac
6885
6886 if test x"$with_libunwind_ia64" = xyes; then
6887 for ac_header in libunwind-ia64.h
6888 do :
6889 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6890 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6891 cat >>confdefs.h <<_ACEOF
6892 #define HAVE_LIBUNWIND_IA64_H 1
6893 _ACEOF
6894
6895 fi
6896
6897 done
6898
6899 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6900 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6901 fi
6902 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6903 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6904 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
6905 fi
6906
6907 opt_curses=no
6908
6909 # Check whether --with-curses was given.
6910 if test "${with_curses+set}" = set; then :
6911 withval=$with_curses; opt_curses=$withval
6912 fi
6913
6914
6915 prefer_curses=no
6916 if test "$opt_curses" = "yes"; then
6917 prefer_curses=yes
6918 fi
6919
6920 # Profiling support.
6921 # Check whether --enable-profiling was given.
6922 if test "${enable_profiling+set}" = set; then :
6923 enableval=$enable_profiling; case $enableval in
6924 yes | no)
6925 ;;
6926 *)
6927 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
6928 esac
6929 else
6930 enable_profiling=no
6931 fi
6932
6933
6934 for ac_func in monstartup _mcleanup
6935 do :
6936 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6937 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6938 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6939 cat >>confdefs.h <<_ACEOF
6940 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6941 _ACEOF
6942
6943 fi
6944 done
6945
6946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6947 $as_echo_n "checking for _etext... " >&6; }
6948 if ${ac_cv_var__etext+:} false; then :
6949 $as_echo_n "(cached) " >&6
6950 else
6951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6952 /* end confdefs.h. */
6953 #include <stdlib.h>
6954 extern char _etext;
6955
6956 int
6957 main ()
6958 {
6959 free (&_etext);
6960 ;
6961 return 0;
6962 }
6963 _ACEOF
6964 if ac_fn_c_try_link "$LINENO"; then :
6965 ac_cv_var__etext=yes
6966 else
6967 ac_cv_var__etext=no
6968 fi
6969 rm -f core conftest.err conftest.$ac_objext \
6970 conftest$ac_exeext conftest.$ac_ext
6971 fi
6972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6973 $as_echo "$ac_cv_var__etext" >&6; }
6974 if test $ac_cv_var__etext = yes; then
6975
6976 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
6977
6978 fi
6979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6980 $as_echo_n "checking for etext... " >&6; }
6981 if ${ac_cv_var_etext+:} false; then :
6982 $as_echo_n "(cached) " >&6
6983 else
6984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6985 /* end confdefs.h. */
6986 #include <stdlib.h>
6987 extern char etext;
6988
6989 int
6990 main ()
6991 {
6992 free (&etext);
6993 ;
6994 return 0;
6995 }
6996 _ACEOF
6997 if ac_fn_c_try_link "$LINENO"; then :
6998 ac_cv_var_etext=yes
6999 else
7000 ac_cv_var_etext=no
7001 fi
7002 rm -f core conftest.err conftest.$ac_objext \
7003 conftest$ac_exeext conftest.$ac_ext
7004 fi
7005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7006 $as_echo "$ac_cv_var_etext" >&6; }
7007 if test $ac_cv_var_etext = yes; then
7008
7009 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
7010
7011 fi
7012 if test "$enable_profiling" = yes ; then
7013 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
7014 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
7015 fi
7016 PROFILE_CFLAGS=-pg
7017 OLD_CFLAGS="$CFLAGS"
7018 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
7019
7020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7021 $as_echo_n "checking whether $CC supports -pg... " >&6; }
7022 if ${ac_cv_cc_supports_pg+:} false; then :
7023 $as_echo_n "(cached) " >&6
7024 else
7025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7026 /* end confdefs.h. */
7027
7028 int
7029 main ()
7030 {
7031 int x;
7032 ;
7033 return 0;
7034 }
7035 _ACEOF
7036 if ac_fn_c_try_compile "$LINENO"; then :
7037 ac_cv_cc_supports_pg=yes
7038 else
7039 ac_cv_cc_supports_pg=no
7040 fi
7041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7042 fi
7043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7044 $as_echo "$ac_cv_cc_supports_pg" >&6; }
7045
7046 if test $ac_cv_cc_supports_pg = no; then
7047 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7048 fi
7049
7050 CFLAGS="$OLD_CFLAGS"
7051 fi
7052
7053
7054
7055 # Check whether --with-pkgversion was given.
7056 if test "${with_pkgversion+set}" = set; then :
7057 withval=$with_pkgversion; case "$withval" in
7058 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
7059 no) PKGVERSION= ;;
7060 *) PKGVERSION="($withval) " ;;
7061 esac
7062 else
7063 PKGVERSION="(GDB) "
7064
7065 fi
7066
7067
7068
7069
7070
7071 # Check whether --with-bugurl was given.
7072 if test "${with_bugurl+set}" = set; then :
7073 withval=$with_bugurl; case "$withval" in
7074 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
7075 no) BUGURL=
7076 ;;
7077 *) BUGURL="$withval"
7078 ;;
7079 esac
7080 else
7081 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7082
7083 fi
7084
7085 case ${BUGURL} in
7086 "")
7087 REPORT_BUGS_TO=
7088 REPORT_BUGS_TEXI=
7089 ;;
7090 *)
7091 REPORT_BUGS_TO="<$BUGURL>"
7092 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7093 ;;
7094 esac;
7095
7096
7097
7098
7099 cat >>confdefs.h <<_ACEOF
7100 #define PKGVERSION "$PKGVERSION"
7101 _ACEOF
7102
7103
7104 cat >>confdefs.h <<_ACEOF
7105 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7106 _ACEOF
7107
7108
7109 # --------------------- #
7110 # Checks for programs. #
7111 # --------------------- #
7112
7113 for ac_prog in gawk mawk nawk awk
7114 do
7115 # Extract the first word of "$ac_prog", so it can be a program name with args.
7116 set dummy $ac_prog; ac_word=$2
7117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7118 $as_echo_n "checking for $ac_word... " >&6; }
7119 if ${ac_cv_prog_AWK+:} false; then :
7120 $as_echo_n "(cached) " >&6
7121 else
7122 if test -n "$AWK"; then
7123 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7124 else
7125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7126 for as_dir in $PATH
7127 do
7128 IFS=$as_save_IFS
7129 test -z "$as_dir" && as_dir=.
7130 for ac_exec_ext in '' $ac_executable_extensions; do
7131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7132 ac_cv_prog_AWK="$ac_prog"
7133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7134 break 2
7135 fi
7136 done
7137 done
7138 IFS=$as_save_IFS
7139
7140 fi
7141 fi
7142 AWK=$ac_cv_prog_AWK
7143 if test -n "$AWK"; then
7144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7145 $as_echo "$AWK" >&6; }
7146 else
7147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7148 $as_echo "no" >&6; }
7149 fi
7150
7151
7152 test -n "$AWK" && break
7153 done
7154
7155 # Find a good install program. We prefer a C program (faster),
7156 # so one script is as good as another. But avoid the broken or
7157 # incompatible versions:
7158 # SysV /etc/install, /usr/sbin/install
7159 # SunOS /usr/etc/install
7160 # IRIX /sbin/install
7161 # AIX /bin/install
7162 # AmigaOS /C/install, which installs bootblocks on floppy discs
7163 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7164 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7165 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7166 # OS/2's system install, which has a completely different semantic
7167 # ./install, which can be erroneously created by make from ./install.sh.
7168 # Reject install programs that cannot install multiple files.
7169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7170 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7171 if test -z "$INSTALL"; then
7172 if ${ac_cv_path_install+:} false; then :
7173 $as_echo_n "(cached) " >&6
7174 else
7175 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7176 for as_dir in $PATH
7177 do
7178 IFS=$as_save_IFS
7179 test -z "$as_dir" && as_dir=.
7180 # Account for people who put trailing slashes in PATH elements.
7181 case $as_dir/ in #((
7182 ./ | .// | /[cC]/* | \
7183 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7184 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7185 /usr/ucb/* ) ;;
7186 *)
7187 # OSF1 and SCO ODT 3.0 have their own names for install.
7188 # Don't use installbsd from OSF since it installs stuff as root
7189 # by default.
7190 for ac_prog in ginstall scoinst install; do
7191 for ac_exec_ext in '' $ac_executable_extensions; do
7192 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7193 if test $ac_prog = install &&
7194 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7195 # AIX install. It has an incompatible calling convention.
7196 :
7197 elif test $ac_prog = install &&
7198 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7199 # program-specific install script used by HP pwplus--don't use.
7200 :
7201 else
7202 rm -rf conftest.one conftest.two conftest.dir
7203 echo one > conftest.one
7204 echo two > conftest.two
7205 mkdir conftest.dir
7206 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7207 test -s conftest.one && test -s conftest.two &&
7208 test -s conftest.dir/conftest.one &&
7209 test -s conftest.dir/conftest.two
7210 then
7211 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7212 break 3
7213 fi
7214 fi
7215 fi
7216 done
7217 done
7218 ;;
7219 esac
7220
7221 done
7222 IFS=$as_save_IFS
7223
7224 rm -rf conftest.one conftest.two conftest.dir
7225
7226 fi
7227 if test "${ac_cv_path_install+set}" = set; then
7228 INSTALL=$ac_cv_path_install
7229 else
7230 # As a last resort, use the slow shell script. Don't cache a
7231 # value for INSTALL within a source directory, because that will
7232 # break other packages using the cache if that directory is
7233 # removed, or if the value is a relative name.
7234 INSTALL=$ac_install_sh
7235 fi
7236 fi
7237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7238 $as_echo "$INSTALL" >&6; }
7239
7240 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7241 # It thinks the first close brace ends the variable substitution.
7242 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7243
7244 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7245
7246 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7247
7248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7249 $as_echo_n "checking whether ln -s works... " >&6; }
7250 LN_S=$as_ln_s
7251 if test "$LN_S" = "ln -s"; then
7252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7253 $as_echo "yes" >&6; }
7254 else
7255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7256 $as_echo "no, using $LN_S" >&6; }
7257 fi
7258
7259 if test -n "$ac_tool_prefix"; then
7260 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7261 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7263 $as_echo_n "checking for $ac_word... " >&6; }
7264 if ${ac_cv_prog_RANLIB+:} false; then :
7265 $as_echo_n "(cached) " >&6
7266 else
7267 if test -n "$RANLIB"; then
7268 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7269 else
7270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7271 for as_dir in $PATH
7272 do
7273 IFS=$as_save_IFS
7274 test -z "$as_dir" && as_dir=.
7275 for ac_exec_ext in '' $ac_executable_extensions; do
7276 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7277 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7278 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7279 break 2
7280 fi
7281 done
7282 done
7283 IFS=$as_save_IFS
7284
7285 fi
7286 fi
7287 RANLIB=$ac_cv_prog_RANLIB
7288 if test -n "$RANLIB"; then
7289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7290 $as_echo "$RANLIB" >&6; }
7291 else
7292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7293 $as_echo "no" >&6; }
7294 fi
7295
7296
7297 fi
7298 if test -z "$ac_cv_prog_RANLIB"; then
7299 ac_ct_RANLIB=$RANLIB
7300 # Extract the first word of "ranlib", so it can be a program name with args.
7301 set dummy ranlib; ac_word=$2
7302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7303 $as_echo_n "checking for $ac_word... " >&6; }
7304 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7305 $as_echo_n "(cached) " >&6
7306 else
7307 if test -n "$ac_ct_RANLIB"; then
7308 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7309 else
7310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7311 for as_dir in $PATH
7312 do
7313 IFS=$as_save_IFS
7314 test -z "$as_dir" && as_dir=.
7315 for ac_exec_ext in '' $ac_executable_extensions; do
7316 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7317 ac_cv_prog_ac_ct_RANLIB="ranlib"
7318 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7319 break 2
7320 fi
7321 done
7322 done
7323 IFS=$as_save_IFS
7324
7325 fi
7326 fi
7327 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7328 if test -n "$ac_ct_RANLIB"; then
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7330 $as_echo "$ac_ct_RANLIB" >&6; }
7331 else
7332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7333 $as_echo "no" >&6; }
7334 fi
7335
7336 if test "x$ac_ct_RANLIB" = x; then
7337 RANLIB=":"
7338 else
7339 case $cross_compiling:$ac_tool_warned in
7340 yes:)
7341 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7342 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7343 ac_tool_warned=yes ;;
7344 esac
7345 RANLIB=$ac_ct_RANLIB
7346 fi
7347 else
7348 RANLIB="$ac_cv_prog_RANLIB"
7349 fi
7350
7351 for ac_prog in 'bison -y' byacc
7352 do
7353 # Extract the first word of "$ac_prog", so it can be a program name with args.
7354 set dummy $ac_prog; ac_word=$2
7355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7356 $as_echo_n "checking for $ac_word... " >&6; }
7357 if ${ac_cv_prog_YACC+:} false; then :
7358 $as_echo_n "(cached) " >&6
7359 else
7360 if test -n "$YACC"; then
7361 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7362 else
7363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7364 for as_dir in $PATH
7365 do
7366 IFS=$as_save_IFS
7367 test -z "$as_dir" && as_dir=.
7368 for ac_exec_ext in '' $ac_executable_extensions; do
7369 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7370 ac_cv_prog_YACC="$ac_prog"
7371 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7372 break 2
7373 fi
7374 done
7375 done
7376 IFS=$as_save_IFS
7377
7378 fi
7379 fi
7380 YACC=$ac_cv_prog_YACC
7381 if test -n "$YACC"; then
7382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7383 $as_echo "$YACC" >&6; }
7384 else
7385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7386 $as_echo "no" >&6; }
7387 fi
7388
7389
7390 test -n "$YACC" && break
7391 done
7392 test -n "$YACC" || YACC="yacc"
7393
7394
7395 if test -n "$ac_tool_prefix"; then
7396 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7397 set dummy ${ac_tool_prefix}ar; ac_word=$2
7398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7399 $as_echo_n "checking for $ac_word... " >&6; }
7400 if ${ac_cv_prog_AR+:} false; then :
7401 $as_echo_n "(cached) " >&6
7402 else
7403 if test -n "$AR"; then
7404 ac_cv_prog_AR="$AR" # Let the user override the test.
7405 else
7406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7407 for as_dir in $PATH
7408 do
7409 IFS=$as_save_IFS
7410 test -z "$as_dir" && as_dir=.
7411 for ac_exec_ext in '' $ac_executable_extensions; do
7412 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7413 ac_cv_prog_AR="${ac_tool_prefix}ar"
7414 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7415 break 2
7416 fi
7417 done
7418 done
7419 IFS=$as_save_IFS
7420
7421 fi
7422 fi
7423 AR=$ac_cv_prog_AR
7424 if test -n "$AR"; then
7425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7426 $as_echo "$AR" >&6; }
7427 else
7428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7429 $as_echo "no" >&6; }
7430 fi
7431
7432
7433 fi
7434 if test -z "$ac_cv_prog_AR"; then
7435 ac_ct_AR=$AR
7436 # Extract the first word of "ar", so it can be a program name with args.
7437 set dummy ar; ac_word=$2
7438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7439 $as_echo_n "checking for $ac_word... " >&6; }
7440 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7441 $as_echo_n "(cached) " >&6
7442 else
7443 if test -n "$ac_ct_AR"; then
7444 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7445 else
7446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7447 for as_dir in $PATH
7448 do
7449 IFS=$as_save_IFS
7450 test -z "$as_dir" && as_dir=.
7451 for ac_exec_ext in '' $ac_executable_extensions; do
7452 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7453 ac_cv_prog_ac_ct_AR="ar"
7454 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7455 break 2
7456 fi
7457 done
7458 done
7459 IFS=$as_save_IFS
7460
7461 fi
7462 fi
7463 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7464 if test -n "$ac_ct_AR"; then
7465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7466 $as_echo "$ac_ct_AR" >&6; }
7467 else
7468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7469 $as_echo "no" >&6; }
7470 fi
7471
7472 if test "x$ac_ct_AR" = x; then
7473 AR=""
7474 else
7475 case $cross_compiling:$ac_tool_warned in
7476 yes:)
7477 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7478 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7479 ac_tool_warned=yes ;;
7480 esac
7481 AR=$ac_ct_AR
7482 fi
7483 else
7484 AR="$ac_cv_prog_AR"
7485 fi
7486
7487 if test -n "$ac_tool_prefix"; then
7488 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7489 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7491 $as_echo_n "checking for $ac_word... " >&6; }
7492 if ${ac_cv_prog_DLLTOOL+:} false; then :
7493 $as_echo_n "(cached) " >&6
7494 else
7495 if test -n "$DLLTOOL"; then
7496 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7497 else
7498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7499 for as_dir in $PATH
7500 do
7501 IFS=$as_save_IFS
7502 test -z "$as_dir" && as_dir=.
7503 for ac_exec_ext in '' $ac_executable_extensions; do
7504 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7505 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7506 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7507 break 2
7508 fi
7509 done
7510 done
7511 IFS=$as_save_IFS
7512
7513 fi
7514 fi
7515 DLLTOOL=$ac_cv_prog_DLLTOOL
7516 if test -n "$DLLTOOL"; then
7517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7518 $as_echo "$DLLTOOL" >&6; }
7519 else
7520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7521 $as_echo "no" >&6; }
7522 fi
7523
7524
7525 fi
7526 if test -z "$ac_cv_prog_DLLTOOL"; then
7527 ac_ct_DLLTOOL=$DLLTOOL
7528 # Extract the first word of "dlltool", so it can be a program name with args.
7529 set dummy dlltool; ac_word=$2
7530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7531 $as_echo_n "checking for $ac_word... " >&6; }
7532 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7533 $as_echo_n "(cached) " >&6
7534 else
7535 if test -n "$ac_ct_DLLTOOL"; then
7536 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7537 else
7538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7539 for as_dir in $PATH
7540 do
7541 IFS=$as_save_IFS
7542 test -z "$as_dir" && as_dir=.
7543 for ac_exec_ext in '' $ac_executable_extensions; do
7544 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7545 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7546 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7547 break 2
7548 fi
7549 done
7550 done
7551 IFS=$as_save_IFS
7552
7553 fi
7554 fi
7555 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7556 if test -n "$ac_ct_DLLTOOL"; then
7557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7558 $as_echo "$ac_ct_DLLTOOL" >&6; }
7559 else
7560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7561 $as_echo "no" >&6; }
7562 fi
7563
7564 if test "x$ac_ct_DLLTOOL" = x; then
7565 DLLTOOL=""
7566 else
7567 case $cross_compiling:$ac_tool_warned in
7568 yes:)
7569 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7570 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7571 ac_tool_warned=yes ;;
7572 esac
7573 DLLTOOL=$ac_ct_DLLTOOL
7574 fi
7575 else
7576 DLLTOOL="$ac_cv_prog_DLLTOOL"
7577 fi
7578
7579 if test -n "$ac_tool_prefix"; then
7580 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7581 set dummy ${ac_tool_prefix}windres; ac_word=$2
7582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7583 $as_echo_n "checking for $ac_word... " >&6; }
7584 if ${ac_cv_prog_WINDRES+:} false; then :
7585 $as_echo_n "(cached) " >&6
7586 else
7587 if test -n "$WINDRES"; then
7588 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7589 else
7590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7591 for as_dir in $PATH
7592 do
7593 IFS=$as_save_IFS
7594 test -z "$as_dir" && as_dir=.
7595 for ac_exec_ext in '' $ac_executable_extensions; do
7596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7597 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7599 break 2
7600 fi
7601 done
7602 done
7603 IFS=$as_save_IFS
7604
7605 fi
7606 fi
7607 WINDRES=$ac_cv_prog_WINDRES
7608 if test -n "$WINDRES"; then
7609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7610 $as_echo "$WINDRES" >&6; }
7611 else
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7613 $as_echo "no" >&6; }
7614 fi
7615
7616
7617 fi
7618 if test -z "$ac_cv_prog_WINDRES"; then
7619 ac_ct_WINDRES=$WINDRES
7620 # Extract the first word of "windres", so it can be a program name with args.
7621 set dummy windres; ac_word=$2
7622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7623 $as_echo_n "checking for $ac_word... " >&6; }
7624 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7625 $as_echo_n "(cached) " >&6
7626 else
7627 if test -n "$ac_ct_WINDRES"; then
7628 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7629 else
7630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7631 for as_dir in $PATH
7632 do
7633 IFS=$as_save_IFS
7634 test -z "$as_dir" && as_dir=.
7635 for ac_exec_ext in '' $ac_executable_extensions; do
7636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7637 ac_cv_prog_ac_ct_WINDRES="windres"
7638 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7639 break 2
7640 fi
7641 done
7642 done
7643 IFS=$as_save_IFS
7644
7645 fi
7646 fi
7647 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7648 if test -n "$ac_ct_WINDRES"; then
7649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7650 $as_echo "$ac_ct_WINDRES" >&6; }
7651 else
7652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7653 $as_echo "no" >&6; }
7654 fi
7655
7656 if test "x$ac_ct_WINDRES" = x; then
7657 WINDRES=""
7658 else
7659 case $cross_compiling:$ac_tool_warned in
7660 yes:)
7661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7662 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7663 ac_tool_warned=yes ;;
7664 esac
7665 WINDRES=$ac_ct_WINDRES
7666 fi
7667 else
7668 WINDRES="$ac_cv_prog_WINDRES"
7669 fi
7670
7671
7672 case $host_os in
7673 gnu*)
7674 # Needed for GNU Hurd hosts.
7675 if test -n "$ac_tool_prefix"; then
7676 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7677 set dummy ${ac_tool_prefix}mig; ac_word=$2
7678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7679 $as_echo_n "checking for $ac_word... " >&6; }
7680 if ${ac_cv_prog_MIG+:} false; then :
7681 $as_echo_n "(cached) " >&6
7682 else
7683 if test -n "$MIG"; then
7684 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7685 else
7686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7687 for as_dir in $PATH
7688 do
7689 IFS=$as_save_IFS
7690 test -z "$as_dir" && as_dir=.
7691 for ac_exec_ext in '' $ac_executable_extensions; do
7692 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7693 ac_cv_prog_MIG="${ac_tool_prefix}mig"
7694 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7695 break 2
7696 fi
7697 done
7698 done
7699 IFS=$as_save_IFS
7700
7701 fi
7702 fi
7703 MIG=$ac_cv_prog_MIG
7704 if test -n "$MIG"; then
7705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7706 $as_echo "$MIG" >&6; }
7707 else
7708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7709 $as_echo "no" >&6; }
7710 fi
7711
7712
7713 fi
7714 if test -z "$ac_cv_prog_MIG"; then
7715 ac_ct_MIG=$MIG
7716 # Extract the first word of "mig", so it can be a program name with args.
7717 set dummy mig; ac_word=$2
7718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7719 $as_echo_n "checking for $ac_word... " >&6; }
7720 if ${ac_cv_prog_ac_ct_MIG+:} false; then :
7721 $as_echo_n "(cached) " >&6
7722 else
7723 if test -n "$ac_ct_MIG"; then
7724 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7725 else
7726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7727 for as_dir in $PATH
7728 do
7729 IFS=$as_save_IFS
7730 test -z "$as_dir" && as_dir=.
7731 for ac_exec_ext in '' $ac_executable_extensions; do
7732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7733 ac_cv_prog_ac_ct_MIG="mig"
7734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7735 break 2
7736 fi
7737 done
7738 done
7739 IFS=$as_save_IFS
7740
7741 fi
7742 fi
7743 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7744 if test -n "$ac_ct_MIG"; then
7745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7746 $as_echo "$ac_ct_MIG" >&6; }
7747 else
7748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7749 $as_echo "no" >&6; }
7750 fi
7751
7752 if test "x$ac_ct_MIG" = x; then
7753 MIG=""
7754 else
7755 case $cross_compiling:$ac_tool_warned in
7756 yes:)
7757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7758 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7759 ac_tool_warned=yes ;;
7760 esac
7761 MIG=$ac_ct_MIG
7762 fi
7763 else
7764 MIG="$ac_cv_prog_MIG"
7765 fi
7766
7767 if test x"$MIG" = x; then
7768 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
7769 fi
7770 ;;
7771 esac
7772
7773 # ---------------------- #
7774 # Checks for libraries. #
7775 # ---------------------- #
7776
7777 # We might need to link with -lm; most simulators need it.
7778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7779 $as_echo_n "checking for main in -lm... " >&6; }
7780 if ${ac_cv_lib_m_main+:} false; then :
7781 $as_echo_n "(cached) " >&6
7782 else
7783 ac_check_lib_save_LIBS=$LIBS
7784 LIBS="-lm $LIBS"
7785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7786 /* end confdefs.h. */
7787
7788
7789 int
7790 main ()
7791 {
7792 return main ();
7793 ;
7794 return 0;
7795 }
7796 _ACEOF
7797 if ac_fn_c_try_link "$LINENO"; then :
7798 ac_cv_lib_m_main=yes
7799 else
7800 ac_cv_lib_m_main=no
7801 fi
7802 rm -f core conftest.err conftest.$ac_objext \
7803 conftest$ac_exeext conftest.$ac_ext
7804 LIBS=$ac_check_lib_save_LIBS
7805 fi
7806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7807 $as_echo "$ac_cv_lib_m_main" >&6; }
7808 if test "x$ac_cv_lib_m_main" = xyes; then :
7809 cat >>confdefs.h <<_ACEOF
7810 #define HAVE_LIBM 1
7811 _ACEOF
7812
7813 LIBS="-lm $LIBS"
7814
7815 fi
7816
7817
7818 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
7819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7820 $as_echo_n "checking for library containing gethostbyname... " >&6; }
7821 if ${ac_cv_search_gethostbyname+:} false; then :
7822 $as_echo_n "(cached) " >&6
7823 else
7824 ac_func_search_save_LIBS=$LIBS
7825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7826 /* end confdefs.h. */
7827
7828 /* Override any GCC internal prototype to avoid an error.
7829 Use char because int might match the return type of a GCC
7830 builtin and then its argument prototype would still apply. */
7831 #ifdef __cplusplus
7832 extern "C"
7833 #endif
7834 char gethostbyname ();
7835 int
7836 main ()
7837 {
7838 return gethostbyname ();
7839 ;
7840 return 0;
7841 }
7842 _ACEOF
7843 for ac_lib in '' nsl; do
7844 if test -z "$ac_lib"; then
7845 ac_res="none required"
7846 else
7847 ac_res=-l$ac_lib
7848 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7849 fi
7850 if ac_fn_c_try_link "$LINENO"; then :
7851 ac_cv_search_gethostbyname=$ac_res
7852 fi
7853 rm -f core conftest.err conftest.$ac_objext \
7854 conftest$ac_exeext
7855 if ${ac_cv_search_gethostbyname+:} false; then :
7856 break
7857 fi
7858 done
7859 if ${ac_cv_search_gethostbyname+:} false; then :
7860
7861 else
7862 ac_cv_search_gethostbyname=no
7863 fi
7864 rm conftest.$ac_ext
7865 LIBS=$ac_func_search_save_LIBS
7866 fi
7867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7868 $as_echo "$ac_cv_search_gethostbyname" >&6; }
7869 ac_res=$ac_cv_search_gethostbyname
7870 if test "$ac_res" != no; then :
7871 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7872
7873 fi
7874
7875
7876 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
7877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7878 $as_echo_n "checking for library containing socketpair... " >&6; }
7879 if ${ac_cv_search_socketpair+:} false; then :
7880 $as_echo_n "(cached) " >&6
7881 else
7882 ac_func_search_save_LIBS=$LIBS
7883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7884 /* end confdefs.h. */
7885
7886 /* Override any GCC internal prototype to avoid an error.
7887 Use char because int might match the return type of a GCC
7888 builtin and then its argument prototype would still apply. */
7889 #ifdef __cplusplus
7890 extern "C"
7891 #endif
7892 char socketpair ();
7893 int
7894 main ()
7895 {
7896 return socketpair ();
7897 ;
7898 return 0;
7899 }
7900 _ACEOF
7901 for ac_lib in '' socket; do
7902 if test -z "$ac_lib"; then
7903 ac_res="none required"
7904 else
7905 ac_res=-l$ac_lib
7906 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7907 fi
7908 if ac_fn_c_try_link "$LINENO"; then :
7909 ac_cv_search_socketpair=$ac_res
7910 fi
7911 rm -f core conftest.err conftest.$ac_objext \
7912 conftest$ac_exeext
7913 if ${ac_cv_search_socketpair+:} false; then :
7914 break
7915 fi
7916 done
7917 if ${ac_cv_search_socketpair+:} false; then :
7918
7919 else
7920 ac_cv_search_socketpair=no
7921 fi
7922 rm conftest.$ac_ext
7923 LIBS=$ac_func_search_save_LIBS
7924 fi
7925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7926 $as_echo "$ac_cv_search_socketpair" >&6; }
7927 ac_res=$ac_cv_search_socketpair
7928 if test "$ac_res" != no; then :
7929 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7930
7931 fi
7932
7933
7934 # Link in zlib if we can. This allows us to read compressed debug sections.
7935
7936 # Use the system's zlib library.
7937 zlibdir="-L\$(top_builddir)/../zlib"
7938 zlibinc="-I\$(top_srcdir)/../zlib"
7939
7940 # Check whether --with-system-zlib was given.
7941 if test "${with_system_zlib+set}" = set; then :
7942 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7943 zlibdir=
7944 zlibinc=
7945 fi
7946
7947 fi
7948
7949
7950
7951
7952
7953 # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7954 # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
7955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7956 $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7957 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7958 $as_echo_n "(cached) " >&6
7959 else
7960 ac_func_search_save_LIBS=$LIBS
7961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7962 /* end confdefs.h. */
7963
7964 /* Override any GCC internal prototype to avoid an error.
7965 Use char because int might match the return type of a GCC
7966 builtin and then its argument prototype would still apply. */
7967 #ifdef __cplusplus
7968 extern "C"
7969 #endif
7970 char kinfo_getvmmap ();
7971 int
7972 main ()
7973 {
7974 return kinfo_getvmmap ();
7975 ;
7976 return 0;
7977 }
7978 _ACEOF
7979 for ac_lib in '' util util-freebsd; do
7980 if test -z "$ac_lib"; then
7981 ac_res="none required"
7982 else
7983 ac_res=-l$ac_lib
7984 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7985 fi
7986 if ac_fn_c_try_link "$LINENO"; then :
7987 ac_cv_search_kinfo_getvmmap=$ac_res
7988 fi
7989 rm -f core conftest.err conftest.$ac_objext \
7990 conftest$ac_exeext
7991 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7992 break
7993 fi
7994 done
7995 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7996
7997 else
7998 ac_cv_search_kinfo_getvmmap=no
7999 fi
8000 rm conftest.$ac_ext
8001 LIBS=$ac_func_search_save_LIBS
8002 fi
8003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8004 $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8005 ac_res=$ac_cv_search_kinfo_getvmmap
8006 if test "$ac_res" != no; then :
8007 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8008
8009 $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8010
8011 fi
8012
8013
8014 # fbsd-nat.c can also use kinfo_getfile.
8015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
8016 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
8017 if ${ac_cv_search_kinfo_getfile+:} false; then :
8018 $as_echo_n "(cached) " >&6
8019 else
8020 ac_func_search_save_LIBS=$LIBS
8021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8022 /* end confdefs.h. */
8023
8024 /* Override any GCC internal prototype to avoid an error.
8025 Use char because int might match the return type of a GCC
8026 builtin and then its argument prototype would still apply. */
8027 #ifdef __cplusplus
8028 extern "C"
8029 #endif
8030 char kinfo_getfile ();
8031 int
8032 main ()
8033 {
8034 return kinfo_getfile ();
8035 ;
8036 return 0;
8037 }
8038 _ACEOF
8039 for ac_lib in '' util util-freebsd; do
8040 if test -z "$ac_lib"; then
8041 ac_res="none required"
8042 else
8043 ac_res=-l$ac_lib
8044 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8045 fi
8046 if ac_fn_c_try_link "$LINENO"; then :
8047 ac_cv_search_kinfo_getfile=$ac_res
8048 fi
8049 rm -f core conftest.err conftest.$ac_objext \
8050 conftest$ac_exeext
8051 if ${ac_cv_search_kinfo_getfile+:} false; then :
8052 break
8053 fi
8054 done
8055 if ${ac_cv_search_kinfo_getfile+:} false; then :
8056
8057 else
8058 ac_cv_search_kinfo_getfile=no
8059 fi
8060 rm conftest.$ac_ext
8061 LIBS=$ac_func_search_save_LIBS
8062 fi
8063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
8064 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
8065 ac_res=$ac_cv_search_kinfo_getfile
8066 if test "$ac_res" != no; then :
8067 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8068
8069 $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
8070
8071 fi
8072
8073
8074
8075 if test "X$prefix" = "XNONE"; then
8076 acl_final_prefix="$ac_default_prefix"
8077 else
8078 acl_final_prefix="$prefix"
8079 fi
8080 if test "X$exec_prefix" = "XNONE"; then
8081 acl_final_exec_prefix='${prefix}'
8082 else
8083 acl_final_exec_prefix="$exec_prefix"
8084 fi
8085 acl_save_prefix="$prefix"
8086 prefix="$acl_final_prefix"
8087 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8088 prefix="$acl_save_prefix"
8089
8090
8091 # Check whether --with-gnu-ld was given.
8092 if test "${with_gnu_ld+set}" = set; then :
8093 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8094 else
8095 with_gnu_ld=no
8096 fi
8097
8098 # Prepare PATH_SEPARATOR.
8099 # The user is always right.
8100 if test "${PATH_SEPARATOR+set}" != set; then
8101 echo "#! /bin/sh" >conf$$.sh
8102 echo "exit 0" >>conf$$.sh
8103 chmod +x conf$$.sh
8104 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8105 PATH_SEPARATOR=';'
8106 else
8107 PATH_SEPARATOR=:
8108 fi
8109 rm -f conf$$.sh
8110 fi
8111 ac_prog=ld
8112 if test "$GCC" = yes; then
8113 # Check if gcc -print-prog-name=ld gives a path.
8114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8115 $as_echo_n "checking for ld used by GCC... " >&6; }
8116 case $host in
8117 *-*-mingw*)
8118 # gcc leaves a trailing carriage return which upsets mingw
8119 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8120 *)
8121 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8122 esac
8123 case $ac_prog in
8124 # Accept absolute paths.
8125 [\\/]* | [A-Za-z]:[\\/]*)
8126 re_direlt='/[^/][^/]*/\.\./'
8127 # Canonicalize the path of ld
8128 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8129 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8130 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8131 done
8132 test -z "$LD" && LD="$ac_prog"
8133 ;;
8134 "")
8135 # If it fails, then pretend we aren't using GCC.
8136 ac_prog=ld
8137 ;;
8138 *)
8139 # If it is relative, then search for the first ld in PATH.
8140 with_gnu_ld=unknown
8141 ;;
8142 esac
8143 elif test "$with_gnu_ld" = yes; then
8144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8145 $as_echo_n "checking for GNU ld... " >&6; }
8146 else
8147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8148 $as_echo_n "checking for non-GNU ld... " >&6; }
8149 fi
8150 if ${acl_cv_path_LD+:} false; then :
8151 $as_echo_n "(cached) " >&6
8152 else
8153 if test -z "$LD"; then
8154 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8155 for ac_dir in $PATH; do
8156 test -z "$ac_dir" && ac_dir=.
8157 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8158 acl_cv_path_LD="$ac_dir/$ac_prog"
8159 # Check to see if the program is GNU ld. I'd rather use --version,
8160 # but apparently some GNU ld's only accept -v.
8161 # Break only if it was the GNU/non-GNU ld that we prefer.
8162 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8163 test "$with_gnu_ld" != no && break
8164 else
8165 test "$with_gnu_ld" != yes && break
8166 fi
8167 fi
8168 done
8169 IFS="$ac_save_ifs"
8170 else
8171 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8172 fi
8173 fi
8174
8175 LD="$acl_cv_path_LD"
8176 if test -n "$LD"; then
8177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8178 $as_echo "$LD" >&6; }
8179 else
8180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8181 $as_echo "no" >&6; }
8182 fi
8183 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8185 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8186 if ${acl_cv_prog_gnu_ld+:} false; then :
8187 $as_echo_n "(cached) " >&6
8188 else
8189 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8190 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8191 acl_cv_prog_gnu_ld=yes
8192 else
8193 acl_cv_prog_gnu_ld=no
8194 fi
8195 fi
8196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8197 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8198 with_gnu_ld=$acl_cv_prog_gnu_ld
8199
8200
8201
8202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8203 $as_echo_n "checking for shared library run path origin... " >&6; }
8204 if ${acl_cv_rpath+:} false; then :
8205 $as_echo_n "(cached) " >&6
8206 else
8207
8208 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8209 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8210 . ./conftest.sh
8211 rm -f ./conftest.sh
8212 acl_cv_rpath=done
8213
8214 fi
8215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8216 $as_echo "$acl_cv_rpath" >&6; }
8217 wl="$acl_cv_wl"
8218 libext="$acl_cv_libext"
8219 shlibext="$acl_cv_shlibext"
8220 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8221 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8222 hardcode_direct="$acl_cv_hardcode_direct"
8223 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8224 # Check whether --enable-rpath was given.
8225 if test "${enable_rpath+set}" = set; then :
8226 enableval=$enable_rpath; :
8227 else
8228 enable_rpath=yes
8229 fi
8230
8231
8232
8233
8234
8235
8236
8237
8238 use_additional=yes
8239
8240 acl_save_prefix="$prefix"
8241 prefix="$acl_final_prefix"
8242 acl_save_exec_prefix="$exec_prefix"
8243 exec_prefix="$acl_final_exec_prefix"
8244
8245 eval additional_includedir=\"$includedir\"
8246 eval additional_libdir=\"$libdir\"
8247
8248 exec_prefix="$acl_save_exec_prefix"
8249 prefix="$acl_save_prefix"
8250
8251
8252 # Check whether --with-libiconv-prefix was given.
8253 if test "${with_libiconv_prefix+set}" = set; then :
8254 withval=$with_libiconv_prefix;
8255 if test "X$withval" = "Xno"; then
8256 use_additional=no
8257 else
8258 if test "X$withval" = "X"; then
8259
8260 acl_save_prefix="$prefix"
8261 prefix="$acl_final_prefix"
8262 acl_save_exec_prefix="$exec_prefix"
8263 exec_prefix="$acl_final_exec_prefix"
8264
8265 eval additional_includedir=\"$includedir\"
8266 eval additional_libdir=\"$libdir\"
8267
8268 exec_prefix="$acl_save_exec_prefix"
8269 prefix="$acl_save_prefix"
8270
8271 else
8272 additional_includedir="$withval/include"
8273 additional_libdir="$withval/lib"
8274 fi
8275 fi
8276
8277 fi
8278
8279 LIBICONV=
8280 LTLIBICONV=
8281 INCICONV=
8282 rpathdirs=
8283 ltrpathdirs=
8284 names_already_handled=
8285 names_next_round='iconv '
8286 while test -n "$names_next_round"; do
8287 names_this_round="$names_next_round"
8288 names_next_round=
8289 for name in $names_this_round; do
8290 already_handled=
8291 for n in $names_already_handled; do
8292 if test "$n" = "$name"; then
8293 already_handled=yes
8294 break
8295 fi
8296 done
8297 if test -z "$already_handled"; then
8298 names_already_handled="$names_already_handled $name"
8299 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8300 eval value=\"\$HAVE_LIB$uppername\"
8301 if test -n "$value"; then
8302 if test "$value" = yes; then
8303 eval value=\"\$LIB$uppername\"
8304 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8305 eval value=\"\$LTLIB$uppername\"
8306 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8307 else
8308 :
8309 fi
8310 else
8311 found_dir=
8312 found_la=
8313 found_so=
8314 found_a=
8315 if test $use_additional = yes; then
8316 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8317 found_dir="$additional_libdir"
8318 found_so="$additional_libdir/lib$name.$shlibext"
8319 if test -f "$additional_libdir/lib$name.la"; then
8320 found_la="$additional_libdir/lib$name.la"
8321 fi
8322 else
8323 if test -f "$additional_libdir/lib$name.$libext"; then
8324 found_dir="$additional_libdir"
8325 found_a="$additional_libdir/lib$name.$libext"
8326 if test -f "$additional_libdir/lib$name.la"; then
8327 found_la="$additional_libdir/lib$name.la"
8328 fi
8329 fi
8330 fi
8331 fi
8332 if test "X$found_dir" = "X"; then
8333 for x in $LDFLAGS $LTLIBICONV; do
8334
8335 acl_save_prefix="$prefix"
8336 prefix="$acl_final_prefix"
8337 acl_save_exec_prefix="$exec_prefix"
8338 exec_prefix="$acl_final_exec_prefix"
8339 eval x=\"$x\"
8340 exec_prefix="$acl_save_exec_prefix"
8341 prefix="$acl_save_prefix"
8342
8343 case "$x" in
8344 -L*)
8345 dir=`echo "X$x" | sed -e 's/^X-L//'`
8346 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8347 found_dir="$dir"
8348 found_so="$dir/lib$name.$shlibext"
8349 if test -f "$dir/lib$name.la"; then
8350 found_la="$dir/lib$name.la"
8351 fi
8352 else
8353 if test -f "$dir/lib$name.$libext"; then
8354 found_dir="$dir"
8355 found_a="$dir/lib$name.$libext"
8356 if test -f "$dir/lib$name.la"; then
8357 found_la="$dir/lib$name.la"
8358 fi
8359 fi
8360 fi
8361 ;;
8362 esac
8363 if test "X$found_dir" != "X"; then
8364 break
8365 fi
8366 done
8367 fi
8368 if test "X$found_dir" != "X"; then
8369 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8370 if test "X$found_so" != "X"; then
8371 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8372 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8373 else
8374 haveit=
8375 for x in $ltrpathdirs; do
8376 if test "X$x" = "X$found_dir"; then
8377 haveit=yes
8378 break
8379 fi
8380 done
8381 if test -z "$haveit"; then
8382 ltrpathdirs="$ltrpathdirs $found_dir"
8383 fi
8384 if test "$hardcode_direct" = yes; then
8385 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8386 else
8387 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8388 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8389 haveit=
8390 for x in $rpathdirs; do
8391 if test "X$x" = "X$found_dir"; then
8392 haveit=yes
8393 break
8394 fi
8395 done
8396 if test -z "$haveit"; then
8397 rpathdirs="$rpathdirs $found_dir"
8398 fi
8399 else
8400 haveit=
8401 for x in $LDFLAGS $LIBICONV; do
8402
8403 acl_save_prefix="$prefix"
8404 prefix="$acl_final_prefix"
8405 acl_save_exec_prefix="$exec_prefix"
8406 exec_prefix="$acl_final_exec_prefix"
8407 eval x=\"$x\"
8408 exec_prefix="$acl_save_exec_prefix"
8409 prefix="$acl_save_prefix"
8410
8411 if test "X$x" = "X-L$found_dir"; then
8412 haveit=yes
8413 break
8414 fi
8415 done
8416 if test -z "$haveit"; then
8417 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8418 fi
8419 if test "$hardcode_minus_L" != no; then
8420 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8421 else
8422 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8423 fi
8424 fi
8425 fi
8426 fi
8427 else
8428 if test "X$found_a" != "X"; then
8429 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8430 else
8431 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8432 fi
8433 fi
8434 additional_includedir=
8435 case "$found_dir" in
8436 */lib | */lib/)
8437 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8438 additional_includedir="$basedir/include"
8439 ;;
8440 esac
8441 if test "X$additional_includedir" != "X"; then
8442 if test "X$additional_includedir" != "X/usr/include"; then
8443 haveit=
8444 if test "X$additional_includedir" = "X/usr/local/include"; then
8445 if test -n "$GCC"; then
8446 case $host_os in
8447 linux*) haveit=yes;;
8448 esac
8449 fi
8450 fi
8451 if test -z "$haveit"; then
8452 for x in $CPPFLAGS $INCICONV; do
8453
8454 acl_save_prefix="$prefix"
8455 prefix="$acl_final_prefix"
8456 acl_save_exec_prefix="$exec_prefix"
8457 exec_prefix="$acl_final_exec_prefix"
8458 eval x=\"$x\"
8459 exec_prefix="$acl_save_exec_prefix"
8460 prefix="$acl_save_prefix"
8461
8462 if test "X$x" = "X-I$additional_includedir"; then
8463 haveit=yes
8464 break
8465 fi
8466 done
8467 if test -z "$haveit"; then
8468 if test -d "$additional_includedir"; then
8469 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8470 fi
8471 fi
8472 fi
8473 fi
8474 fi
8475 if test -n "$found_la"; then
8476 save_libdir="$libdir"
8477 case "$found_la" in
8478 */* | *\\*) . "$found_la" ;;
8479 *) . "./$found_la" ;;
8480 esac
8481 libdir="$save_libdir"
8482 for dep in $dependency_libs; do
8483 case "$dep" in
8484 -L*)
8485 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8486 if test "X$additional_libdir" != "X/usr/lib"; then
8487 haveit=
8488 if test "X$additional_libdir" = "X/usr/local/lib"; then
8489 if test -n "$GCC"; then
8490 case $host_os in
8491 linux*) haveit=yes;;
8492 esac
8493 fi
8494 fi
8495 if test -z "$haveit"; then
8496 haveit=
8497 for x in $LDFLAGS $LIBICONV; do
8498
8499 acl_save_prefix="$prefix"
8500 prefix="$acl_final_prefix"
8501 acl_save_exec_prefix="$exec_prefix"
8502 exec_prefix="$acl_final_exec_prefix"
8503 eval x=\"$x\"
8504 exec_prefix="$acl_save_exec_prefix"
8505 prefix="$acl_save_prefix"
8506
8507 if test "X$x" = "X-L$additional_libdir"; then
8508 haveit=yes
8509 break
8510 fi
8511 done
8512 if test -z "$haveit"; then
8513 if test -d "$additional_libdir"; then
8514 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8515 fi
8516 fi
8517 haveit=
8518 for x in $LDFLAGS $LTLIBICONV; do
8519
8520 acl_save_prefix="$prefix"
8521 prefix="$acl_final_prefix"
8522 acl_save_exec_prefix="$exec_prefix"
8523 exec_prefix="$acl_final_exec_prefix"
8524 eval x=\"$x\"
8525 exec_prefix="$acl_save_exec_prefix"
8526 prefix="$acl_save_prefix"
8527
8528 if test "X$x" = "X-L$additional_libdir"; then
8529 haveit=yes
8530 break
8531 fi
8532 done
8533 if test -z "$haveit"; then
8534 if test -d "$additional_libdir"; then
8535 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8536 fi
8537 fi
8538 fi
8539 fi
8540 ;;
8541 -R*)
8542 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8543 if test "$enable_rpath" != no; then
8544 haveit=
8545 for x in $rpathdirs; do
8546 if test "X$x" = "X$dir"; then
8547 haveit=yes
8548 break
8549 fi
8550 done
8551 if test -z "$haveit"; then
8552 rpathdirs="$rpathdirs $dir"
8553 fi
8554 haveit=
8555 for x in $ltrpathdirs; do
8556 if test "X$x" = "X$dir"; then
8557 haveit=yes
8558 break
8559 fi
8560 done
8561 if test -z "$haveit"; then
8562 ltrpathdirs="$ltrpathdirs $dir"
8563 fi
8564 fi
8565 ;;
8566 -l*)
8567 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8568 ;;
8569 *.la)
8570 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8571 ;;
8572 *)
8573 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8574 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8575 ;;
8576 esac
8577 done
8578 fi
8579 else
8580 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8581 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8582 fi
8583 fi
8584 fi
8585 done
8586 done
8587 if test "X$rpathdirs" != "X"; then
8588 if test -n "$hardcode_libdir_separator"; then
8589 alldirs=
8590 for found_dir in $rpathdirs; do
8591 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8592 done
8593 acl_save_libdir="$libdir"
8594 libdir="$alldirs"
8595 eval flag=\"$hardcode_libdir_flag_spec\"
8596 libdir="$acl_save_libdir"
8597 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8598 else
8599 for found_dir in $rpathdirs; do
8600 acl_save_libdir="$libdir"
8601 libdir="$found_dir"
8602 eval flag=\"$hardcode_libdir_flag_spec\"
8603 libdir="$acl_save_libdir"
8604 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8605 done
8606 fi
8607 fi
8608 if test "X$ltrpathdirs" != "X"; then
8609 for found_dir in $ltrpathdirs; do
8610 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8611 done
8612 fi
8613
8614
8615
8616
8617
8618
8619
8620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8621 $as_echo_n "checking for iconv... " >&6; }
8622 if ${am_cv_func_iconv+:} false; then :
8623 $as_echo_n "(cached) " >&6
8624 else
8625
8626 am_cv_func_iconv="no, consider installing GNU libiconv"
8627 am_cv_lib_iconv=no
8628 am_save_CPPFLAGS="$CPPFLAGS"
8629 CPPFLAGS="$CPPFLAGS $INCICONV"
8630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8631 /* end confdefs.h. */
8632 #include <stdlib.h>
8633 #include <iconv.h>
8634 int
8635 main ()
8636 {
8637 iconv_t cd = iconv_open("","");
8638 iconv(cd,NULL,NULL,NULL,NULL);
8639 iconv_close(cd);
8640 ;
8641 return 0;
8642 }
8643 _ACEOF
8644 if ac_fn_c_try_link "$LINENO"; then :
8645 am_cv_func_iconv=yes
8646 fi
8647 rm -f core conftest.err conftest.$ac_objext \
8648 conftest$ac_exeext conftest.$ac_ext
8649 CPPFLAGS="$am_save_CPPFLAGS"
8650
8651 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8652 for _libs in .libs _libs; do
8653 am_save_CPPFLAGS="$CPPFLAGS"
8654 am_save_LIBS="$LIBS"
8655 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8656 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8658 /* end confdefs.h. */
8659 #include <stdlib.h>
8660 #include <iconv.h>
8661 int
8662 main ()
8663 {
8664 iconv_t cd = iconv_open("","");
8665 iconv(cd,NULL,NULL,NULL,NULL);
8666 iconv_close(cd);
8667 ;
8668 return 0;
8669 }
8670 _ACEOF
8671 if ac_fn_c_try_link "$LINENO"; then :
8672 INCICONV="-I../libiconv/include"
8673 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8674 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8675 am_cv_lib_iconv=yes
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 LIBS="$am_save_LIBS"
8682 if test "$am_cv_func_iconv" = "yes"; then
8683 break
8684 fi
8685 done
8686 fi
8687
8688 if test "$am_cv_func_iconv" != yes; then
8689 am_save_CPPFLAGS="$CPPFLAGS"
8690 am_save_LIBS="$LIBS"
8691 CPPFLAGS="$LIBS $INCICONV"
8692 LIBS="$LIBS $LIBICONV"
8693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8694 /* end confdefs.h. */
8695 #include <stdlib.h>
8696 #include <iconv.h>
8697 int
8698 main ()
8699 {
8700 iconv_t cd = iconv_open("","");
8701 iconv(cd,NULL,NULL,NULL,NULL);
8702 iconv_close(cd);
8703 ;
8704 return 0;
8705 }
8706 _ACEOF
8707 if ac_fn_c_try_link "$LINENO"; then :
8708 am_cv_lib_iconv=yes
8709 am_cv_func_iconv=yes
8710 fi
8711 rm -f core conftest.err conftest.$ac_objext \
8712 conftest$ac_exeext conftest.$ac_ext
8713 CPPFLAGS="$am_save_CPPFLAGS"
8714 LIBS="$am_save_LIBS"
8715 fi
8716
8717 fi
8718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8719 $as_echo "$am_cv_func_iconv" >&6; }
8720 if test "$am_cv_func_iconv" = yes; then
8721
8722 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8723
8724 fi
8725 if test "$am_cv_lib_iconv" = yes; then
8726
8727 for element in $INCICONV; do
8728 haveit=
8729 for x in $CPPFLAGS; do
8730
8731 acl_save_prefix="$prefix"
8732 prefix="$acl_final_prefix"
8733 acl_save_exec_prefix="$exec_prefix"
8734 exec_prefix="$acl_final_exec_prefix"
8735 eval x=\"$x\"
8736 exec_prefix="$acl_save_exec_prefix"
8737 prefix="$acl_save_prefix"
8738
8739 if test "X$x" = "X$element"; then
8740 haveit=yes
8741 break
8742 fi
8743 done
8744 if test -z "$haveit"; then
8745 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8746 fi
8747 done
8748
8749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8750 $as_echo_n "checking how to link with libiconv... " >&6; }
8751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8752 $as_echo "$LIBICONV" >&6; }
8753 else
8754 LIBICONV=
8755 LTLIBICONV=
8756 fi
8757
8758
8759
8760 if test "$am_cv_func_iconv" = yes; then
8761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8762 $as_echo_n "checking for iconv declaration... " >&6; }
8763 if ${am_cv_proto_iconv+:} false; then :
8764 $as_echo_n "(cached) " >&6
8765 else
8766
8767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8768 /* end confdefs.h. */
8769
8770 #include <stdlib.h>
8771 #include <iconv.h>
8772 extern
8773 #ifdef __cplusplus
8774 "C"
8775 #endif
8776 #if defined(__STDC__) || defined(__cplusplus)
8777 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8778 #else
8779 size_t iconv();
8780 #endif
8781
8782 int
8783 main ()
8784 {
8785
8786 ;
8787 return 0;
8788 }
8789 _ACEOF
8790 if ac_fn_c_try_compile "$LINENO"; then :
8791 am_cv_proto_iconv_arg1=""
8792 else
8793 am_cv_proto_iconv_arg1="const"
8794 fi
8795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8796 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);"
8797 fi
8798
8799 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
8801 }$am_cv_proto_iconv" >&5
8802 $as_echo "${ac_t:-
8803 }$am_cv_proto_iconv" >&6; }
8804
8805 cat >>confdefs.h <<_ACEOF
8806 #define ICONV_CONST $am_cv_proto_iconv_arg1
8807 _ACEOF
8808
8809 fi
8810
8811
8812 # GDB may fork/exec the iconv program to get the list of supported character
8813 # sets. Allow the user to specify where to find it.
8814 # There are several factors affecting the choice of option name:
8815 # - There is already --with-libiconv-prefix but we can't use it, it specifies
8816 # the build-time location of libiconv files.
8817 # - The program we need to find is iconv, which comes with glibc. The user
8818 # doesn't necessarily have libiconv installed. Therefore naming this
8819 # --with-libiconv-foo feels wrong.
8820 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8821 # defined to work on directories not files (though it really doesn't know
8822 # the difference).
8823 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
8824 # with --with-libiconv-prefix.
8825 # Putting these together is why the option name is --with-iconv-bin.
8826
8827
8828 # Check whether --with-iconv-bin was given.
8829 if test "${with_iconv_bin+set}" = set; then :
8830 withval=$with_iconv_bin; iconv_bin="${withval}"
8831
8832 cat >>confdefs.h <<_ACEOF
8833 #define ICONV_BIN "${iconv_bin}"
8834 _ACEOF
8835
8836
8837 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8838 if test "x$prefix" = xNONE; then
8839 test_prefix=/usr/local
8840 else
8841 test_prefix=$prefix
8842 fi
8843 else
8844 test_prefix=$exec_prefix
8845 fi
8846 value=0
8847 case ${iconv_bin} in
8848 "${test_prefix}"|"${test_prefix}/"*|\
8849 '${exec_prefix}'|'${exec_prefix}/'*)
8850 value=1
8851 ;;
8852 esac
8853
8854 cat >>confdefs.h <<_ACEOF
8855 #define ICONV_BIN_RELOCATABLE $value
8856 _ACEOF
8857
8858
8859
8860 fi
8861
8862
8863 # For the TUI, we need enhanced curses functionality.
8864 if test x"$enable_tui" != xno; then
8865 prefer_curses=yes
8866 fi
8867
8868 curses_found=no
8869 if test x"$prefer_curses" = xyes; then
8870 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8871 # curses library because the latter might not provide all the
8872 # functionality we need. However, this leads to problems on systems
8873 # where the linker searches /usr/local/lib, but the compiler doesn't
8874 # search /usr/local/include, if ncurses is installed in /usr/local. A
8875 # default installation of ncurses on alpha*-dec-osf* will lead to such
8876 # a situation.
8877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8878 $as_echo_n "checking for library containing waddstr... " >&6; }
8879 if ${ac_cv_search_waddstr+:} false; then :
8880 $as_echo_n "(cached) " >&6
8881 else
8882 ac_func_search_save_LIBS=$LIBS
8883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8884 /* end confdefs.h. */
8885
8886 /* Override any GCC internal prototype to avoid an error.
8887 Use char because int might match the return type of a GCC
8888 builtin and then its argument prototype would still apply. */
8889 #ifdef __cplusplus
8890 extern "C"
8891 #endif
8892 char waddstr ();
8893 int
8894 main ()
8895 {
8896 return waddstr ();
8897 ;
8898 return 0;
8899 }
8900 _ACEOF
8901 for ac_lib in '' ncursesw ncurses cursesX curses; do
8902 if test -z "$ac_lib"; then
8903 ac_res="none required"
8904 else
8905 ac_res=-l$ac_lib
8906 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8907 fi
8908 if ac_fn_c_try_link "$LINENO"; then :
8909 ac_cv_search_waddstr=$ac_res
8910 fi
8911 rm -f core conftest.err conftest.$ac_objext \
8912 conftest$ac_exeext
8913 if ${ac_cv_search_waddstr+:} false; then :
8914 break
8915 fi
8916 done
8917 if ${ac_cv_search_waddstr+:} false; then :
8918
8919 else
8920 ac_cv_search_waddstr=no
8921 fi
8922 rm conftest.$ac_ext
8923 LIBS=$ac_func_search_save_LIBS
8924 fi
8925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8926 $as_echo "$ac_cv_search_waddstr" >&6; }
8927 ac_res=$ac_cv_search_waddstr
8928 if test "$ac_res" != no; then :
8929 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8930
8931 fi
8932
8933
8934 if test "$ac_cv_search_waddstr" != no; then
8935 curses_found=yes
8936 fi
8937 fi
8938
8939 # Check whether we should enable the TUI, but only do so if we really
8940 # can.
8941 if test x"$enable_tui" != xno; then
8942 if test -d $srcdir/tui; then
8943 if test "$curses_found" != no; then
8944 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8945 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8946 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8947 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
8948 else
8949 if test x"$enable_tui" = xyes; then
8950 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
8951 else
8952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8953 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
8954 fi
8955 fi
8956 fi
8957 fi
8958
8959 # Since GDB uses Readline, we need termcap functionality. In many
8960 # cases this will be provided by the curses library, but some systems
8961 # have a separate termcap library, or no curses library at all.
8962
8963 case $host_os in
8964 cygwin*)
8965 if test -d $srcdir/libtermcap; then
8966 LIBS="../libtermcap/libtermcap.a $LIBS"
8967 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8968 fi ;;
8969 go32* | *djgpp*)
8970 ac_cv_search_tgetent="none required"
8971 ;;
8972 esac
8973
8974 # These are the libraries checked by Readline.
8975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8976 $as_echo_n "checking for library containing tgetent... " >&6; }
8977 if ${ac_cv_search_tgetent+:} false; then :
8978 $as_echo_n "(cached) " >&6
8979 else
8980 ac_func_search_save_LIBS=$LIBS
8981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8982 /* end confdefs.h. */
8983
8984 /* Override any GCC internal prototype to avoid an error.
8985 Use char because int might match the return type of a GCC
8986 builtin and then its argument prototype would still apply. */
8987 #ifdef __cplusplus
8988 extern "C"
8989 #endif
8990 char tgetent ();
8991 int
8992 main ()
8993 {
8994 return tgetent ();
8995 ;
8996 return 0;
8997 }
8998 _ACEOF
8999 for ac_lib in '' termcap tinfo curses ncursesw ncurses; do
9000 if test -z "$ac_lib"; then
9001 ac_res="none required"
9002 else
9003 ac_res=-l$ac_lib
9004 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9005 fi
9006 if ac_fn_c_try_link "$LINENO"; then :
9007 ac_cv_search_tgetent=$ac_res
9008 fi
9009 rm -f core conftest.err conftest.$ac_objext \
9010 conftest$ac_exeext
9011 if ${ac_cv_search_tgetent+:} false; then :
9012 break
9013 fi
9014 done
9015 if ${ac_cv_search_tgetent+:} false; then :
9016
9017 else
9018 ac_cv_search_tgetent=no
9019 fi
9020 rm conftest.$ac_ext
9021 LIBS=$ac_func_search_save_LIBS
9022 fi
9023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9024 $as_echo "$ac_cv_search_tgetent" >&6; }
9025 ac_res=$ac_cv_search_tgetent
9026 if test "$ac_res" != no; then :
9027 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9028
9029 fi
9030
9031
9032 if test "$ac_cv_search_tgetent" = no; then
9033 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
9034 fi
9035
9036
9037 # Check whether --with-system-readline was given.
9038 if test "${with_system_readline+set}" = set; then :
9039 withval=$with_system_readline;
9040 fi
9041
9042
9043 if test "$with_system_readline" = yes; then
9044 READLINE=-lreadline
9045 READLINE_DEPS=
9046 READLINE_CFLAGS=
9047 READLINE_TEXI_INCFLAG=
9048 else
9049 READLINE='$(READLINE_DIR)/libreadline.a'
9050 READLINE_DEPS='$(READLINE)'
9051 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9052 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9053 fi
9054
9055
9056
9057
9058
9059 # Generate jit-reader.h
9060
9061 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9062 TARGET_PTR=
9063
9064 # The cast to long int works around a bug in the HP C Compiler
9065 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9066 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9067 # This bug is HP SR number 8606223364.
9068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9069 $as_echo_n "checking size of unsigned long long... " >&6; }
9070 if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9071 $as_echo_n "(cached) " >&6
9072 else
9073 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9074
9075 else
9076 if test "$ac_cv_type_unsigned_long_long" = yes; then
9077 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9078 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9079 as_fn_error 77 "cannot compute sizeof (unsigned long long)
9080 See \`config.log' for more details" "$LINENO" 5; }
9081 else
9082 ac_cv_sizeof_unsigned_long_long=0
9083 fi
9084 fi
9085
9086 fi
9087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9088 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9089
9090
9091
9092 cat >>confdefs.h <<_ACEOF
9093 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9094 _ACEOF
9095
9096
9097 # The cast to long int works around a bug in the HP C Compiler
9098 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9099 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9100 # This bug is HP SR number 8606223364.
9101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9102 $as_echo_n "checking size of unsigned long... " >&6; }
9103 if ${ac_cv_sizeof_unsigned_long+:} false; then :
9104 $as_echo_n "(cached) " >&6
9105 else
9106 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9107
9108 else
9109 if test "$ac_cv_type_unsigned_long" = yes; then
9110 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9111 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9112 as_fn_error 77 "cannot compute sizeof (unsigned long)
9113 See \`config.log' for more details" "$LINENO" 5; }
9114 else
9115 ac_cv_sizeof_unsigned_long=0
9116 fi
9117 fi
9118
9119 fi
9120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9121 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9122
9123
9124
9125 cat >>confdefs.h <<_ACEOF
9126 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9127 _ACEOF
9128
9129
9130 # The cast to long int works around a bug in the HP C Compiler
9131 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9132 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9133 # This bug is HP SR number 8606223364.
9134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9135 $as_echo_n "checking size of unsigned __int128... " >&6; }
9136 if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9137 $as_echo_n "(cached) " >&6
9138 else
9139 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9140
9141 else
9142 if test "$ac_cv_type_unsigned___int128" = yes; then
9143 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9144 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9145 as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9146 See \`config.log' for more details" "$LINENO" 5; }
9147 else
9148 ac_cv_sizeof_unsigned___int128=0
9149 fi
9150 fi
9151
9152 fi
9153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9154 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9155
9156
9157
9158 cat >>confdefs.h <<_ACEOF
9159 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9160 _ACEOF
9161
9162
9163
9164 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9165 TARGET_PTR="unsigned long"
9166 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9167 TARGET_PTR="unsigned long long"
9168 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9169 TARGET_PTR="unsigned __int128"
9170 else
9171 TARGET_PTR="unsigned long"
9172 fi
9173
9174
9175 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9176
9177
9178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9179 $as_echo_n "checking for library containing dlopen... " >&6; }
9180 if ${ac_cv_search_dlopen+:} false; then :
9181 $as_echo_n "(cached) " >&6
9182 else
9183 ac_func_search_save_LIBS=$LIBS
9184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9185 /* end confdefs.h. */
9186
9187 /* Override any GCC internal prototype to avoid an error.
9188 Use char because int might match the return type of a GCC
9189 builtin and then its argument prototype would still apply. */
9190 #ifdef __cplusplus
9191 extern "C"
9192 #endif
9193 char dlopen ();
9194 int
9195 main ()
9196 {
9197 return dlopen ();
9198 ;
9199 return 0;
9200 }
9201 _ACEOF
9202 for ac_lib in '' dl; do
9203 if test -z "$ac_lib"; then
9204 ac_res="none required"
9205 else
9206 ac_res=-l$ac_lib
9207 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9208 fi
9209 if ac_fn_c_try_link "$LINENO"; then :
9210 ac_cv_search_dlopen=$ac_res
9211 fi
9212 rm -f core conftest.err conftest.$ac_objext \
9213 conftest$ac_exeext
9214 if ${ac_cv_search_dlopen+:} false; then :
9215 break
9216 fi
9217 done
9218 if ${ac_cv_search_dlopen+:} false; then :
9219
9220 else
9221 ac_cv_search_dlopen=no
9222 fi
9223 rm conftest.$ac_ext
9224 LIBS=$ac_func_search_save_LIBS
9225 fi
9226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9227 $as_echo "$ac_cv_search_dlopen" >&6; }
9228 ac_res=$ac_cv_search_dlopen
9229 if test "$ac_res" != no; then :
9230 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9231
9232 fi
9233
9234
9235
9236
9237 # Check whether --with-jit-reader-dir was given.
9238 if test "${with_jit_reader_dir+set}" = set; then :
9239 withval=$with_jit_reader_dir;
9240 JIT_READER_DIR=$withval
9241 else
9242 JIT_READER_DIR=${libdir}/gdb
9243 fi
9244
9245
9246 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9247 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9248 ac_define_dir=`eval echo $JIT_READER_DIR`
9249 ac_define_dir=`eval echo $ac_define_dir`
9250
9251 cat >>confdefs.h <<_ACEOF
9252 #define JIT_READER_DIR "$ac_define_dir"
9253 _ACEOF
9254
9255
9256
9257
9258 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9259 if test "x$prefix" = xNONE; then
9260 test_prefix=/usr/local
9261 else
9262 test_prefix=$prefix
9263 fi
9264 else
9265 test_prefix=$exec_prefix
9266 fi
9267 value=0
9268 case ${ac_define_dir} in
9269 "${test_prefix}"|"${test_prefix}/"*|\
9270 '${exec_prefix}'|'${exec_prefix}/'*)
9271 value=1
9272 ;;
9273 esac
9274
9275 cat >>confdefs.h <<_ACEOF
9276 #define JIT_READER_DIR_RELOCATABLE $value
9277 _ACEOF
9278
9279
9280
9281
9282
9283 # Check whether --with-expat was given.
9284 if test "${with_expat+set}" = set; then :
9285 withval=$with_expat;
9286 else
9287 with_expat=auto
9288 fi
9289
9290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9291 $as_echo_n "checking whether to use expat... " >&6; }
9292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9293 $as_echo "$with_expat" >&6; }
9294
9295 if test "${with_expat}" = no; then
9296 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9297 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9298 HAVE_LIBEXPAT=no
9299 else
9300
9301
9302
9303
9304
9305
9306
9307
9308 use_additional=yes
9309
9310 acl_save_prefix="$prefix"
9311 prefix="$acl_final_prefix"
9312 acl_save_exec_prefix="$exec_prefix"
9313 exec_prefix="$acl_final_exec_prefix"
9314
9315 eval additional_includedir=\"$includedir\"
9316 eval additional_libdir=\"$libdir\"
9317
9318 exec_prefix="$acl_save_exec_prefix"
9319 prefix="$acl_save_prefix"
9320
9321
9322 # Check whether --with-libexpat-prefix was given.
9323 if test "${with_libexpat_prefix+set}" = set; then :
9324 withval=$with_libexpat_prefix;
9325 if test "X$withval" = "Xno"; then
9326 use_additional=no
9327 else
9328 if test "X$withval" = "X"; then
9329
9330 acl_save_prefix="$prefix"
9331 prefix="$acl_final_prefix"
9332 acl_save_exec_prefix="$exec_prefix"
9333 exec_prefix="$acl_final_exec_prefix"
9334
9335 eval additional_includedir=\"$includedir\"
9336 eval additional_libdir=\"$libdir\"
9337
9338 exec_prefix="$acl_save_exec_prefix"
9339 prefix="$acl_save_prefix"
9340
9341 else
9342 additional_includedir="$withval/include"
9343 additional_libdir="$withval/lib"
9344 fi
9345 fi
9346
9347 fi
9348
9349 LIBEXPAT=
9350 LTLIBEXPAT=
9351 INCEXPAT=
9352 rpathdirs=
9353 ltrpathdirs=
9354 names_already_handled=
9355 names_next_round='expat '
9356 while test -n "$names_next_round"; do
9357 names_this_round="$names_next_round"
9358 names_next_round=
9359 for name in $names_this_round; do
9360 already_handled=
9361 for n in $names_already_handled; do
9362 if test "$n" = "$name"; then
9363 already_handled=yes
9364 break
9365 fi
9366 done
9367 if test -z "$already_handled"; then
9368 names_already_handled="$names_already_handled $name"
9369 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9370 eval value=\"\$HAVE_LIB$uppername\"
9371 if test -n "$value"; then
9372 if test "$value" = yes; then
9373 eval value=\"\$LIB$uppername\"
9374 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9375 eval value=\"\$LTLIB$uppername\"
9376 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9377 else
9378 :
9379 fi
9380 else
9381 found_dir=
9382 found_la=
9383 found_so=
9384 found_a=
9385 if test $use_additional = yes; then
9386 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9387 found_dir="$additional_libdir"
9388 found_so="$additional_libdir/lib$name.$shlibext"
9389 if test -f "$additional_libdir/lib$name.la"; then
9390 found_la="$additional_libdir/lib$name.la"
9391 fi
9392 else
9393 if test -f "$additional_libdir/lib$name.$libext"; then
9394 found_dir="$additional_libdir"
9395 found_a="$additional_libdir/lib$name.$libext"
9396 if test -f "$additional_libdir/lib$name.la"; then
9397 found_la="$additional_libdir/lib$name.la"
9398 fi
9399 fi
9400 fi
9401 fi
9402 if test "X$found_dir" = "X"; then
9403 for x in $LDFLAGS $LTLIBEXPAT; do
9404
9405 acl_save_prefix="$prefix"
9406 prefix="$acl_final_prefix"
9407 acl_save_exec_prefix="$exec_prefix"
9408 exec_prefix="$acl_final_exec_prefix"
9409 eval x=\"$x\"
9410 exec_prefix="$acl_save_exec_prefix"
9411 prefix="$acl_save_prefix"
9412
9413 case "$x" in
9414 -L*)
9415 dir=`echo "X$x" | sed -e 's/^X-L//'`
9416 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9417 found_dir="$dir"
9418 found_so="$dir/lib$name.$shlibext"
9419 if test -f "$dir/lib$name.la"; then
9420 found_la="$dir/lib$name.la"
9421 fi
9422 else
9423 if test -f "$dir/lib$name.$libext"; then
9424 found_dir="$dir"
9425 found_a="$dir/lib$name.$libext"
9426 if test -f "$dir/lib$name.la"; then
9427 found_la="$dir/lib$name.la"
9428 fi
9429 fi
9430 fi
9431 ;;
9432 esac
9433 if test "X$found_dir" != "X"; then
9434 break
9435 fi
9436 done
9437 fi
9438 if test "X$found_dir" != "X"; then
9439 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9440 if test "X$found_so" != "X"; then
9441 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9442 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9443 else
9444 haveit=
9445 for x in $ltrpathdirs; do
9446 if test "X$x" = "X$found_dir"; then
9447 haveit=yes
9448 break
9449 fi
9450 done
9451 if test -z "$haveit"; then
9452 ltrpathdirs="$ltrpathdirs $found_dir"
9453 fi
9454 if test "$hardcode_direct" = yes; then
9455 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9456 else
9457 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9458 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9459 haveit=
9460 for x in $rpathdirs; do
9461 if test "X$x" = "X$found_dir"; then
9462 haveit=yes
9463 break
9464 fi
9465 done
9466 if test -z "$haveit"; then
9467 rpathdirs="$rpathdirs $found_dir"
9468 fi
9469 else
9470 haveit=
9471 for x in $LDFLAGS $LIBEXPAT; do
9472
9473 acl_save_prefix="$prefix"
9474 prefix="$acl_final_prefix"
9475 acl_save_exec_prefix="$exec_prefix"
9476 exec_prefix="$acl_final_exec_prefix"
9477 eval x=\"$x\"
9478 exec_prefix="$acl_save_exec_prefix"
9479 prefix="$acl_save_prefix"
9480
9481 if test "X$x" = "X-L$found_dir"; then
9482 haveit=yes
9483 break
9484 fi
9485 done
9486 if test -z "$haveit"; then
9487 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9488 fi
9489 if test "$hardcode_minus_L" != no; then
9490 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9491 else
9492 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9493 fi
9494 fi
9495 fi
9496 fi
9497 else
9498 if test "X$found_a" != "X"; then
9499 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9500 else
9501 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9502 fi
9503 fi
9504 additional_includedir=
9505 case "$found_dir" in
9506 */lib | */lib/)
9507 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9508 additional_includedir="$basedir/include"
9509 ;;
9510 esac
9511 if test "X$additional_includedir" != "X"; then
9512 if test "X$additional_includedir" != "X/usr/include"; then
9513 haveit=
9514 if test "X$additional_includedir" = "X/usr/local/include"; then
9515 if test -n "$GCC"; then
9516 case $host_os in
9517 linux*) haveit=yes;;
9518 esac
9519 fi
9520 fi
9521 if test -z "$haveit"; then
9522 for x in $CPPFLAGS $INCEXPAT; do
9523
9524 acl_save_prefix="$prefix"
9525 prefix="$acl_final_prefix"
9526 acl_save_exec_prefix="$exec_prefix"
9527 exec_prefix="$acl_final_exec_prefix"
9528 eval x=\"$x\"
9529 exec_prefix="$acl_save_exec_prefix"
9530 prefix="$acl_save_prefix"
9531
9532 if test "X$x" = "X-I$additional_includedir"; then
9533 haveit=yes
9534 break
9535 fi
9536 done
9537 if test -z "$haveit"; then
9538 if test -d "$additional_includedir"; then
9539 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9540 fi
9541 fi
9542 fi
9543 fi
9544 fi
9545 if test -n "$found_la"; then
9546 save_libdir="$libdir"
9547 case "$found_la" in
9548 */* | *\\*) . "$found_la" ;;
9549 *) . "./$found_la" ;;
9550 esac
9551 libdir="$save_libdir"
9552 for dep in $dependency_libs; do
9553 case "$dep" in
9554 -L*)
9555 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9556 if test "X$additional_libdir" != "X/usr/lib"; then
9557 haveit=
9558 if test "X$additional_libdir" = "X/usr/local/lib"; then
9559 if test -n "$GCC"; then
9560 case $host_os in
9561 linux*) haveit=yes;;
9562 esac
9563 fi
9564 fi
9565 if test -z "$haveit"; then
9566 haveit=
9567 for x in $LDFLAGS $LIBEXPAT; do
9568
9569 acl_save_prefix="$prefix"
9570 prefix="$acl_final_prefix"
9571 acl_save_exec_prefix="$exec_prefix"
9572 exec_prefix="$acl_final_exec_prefix"
9573 eval x=\"$x\"
9574 exec_prefix="$acl_save_exec_prefix"
9575 prefix="$acl_save_prefix"
9576
9577 if test "X$x" = "X-L$additional_libdir"; then
9578 haveit=yes
9579 break
9580 fi
9581 done
9582 if test -z "$haveit"; then
9583 if test -d "$additional_libdir"; then
9584 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9585 fi
9586 fi
9587 haveit=
9588 for x in $LDFLAGS $LTLIBEXPAT; do
9589
9590 acl_save_prefix="$prefix"
9591 prefix="$acl_final_prefix"
9592 acl_save_exec_prefix="$exec_prefix"
9593 exec_prefix="$acl_final_exec_prefix"
9594 eval x=\"$x\"
9595 exec_prefix="$acl_save_exec_prefix"
9596 prefix="$acl_save_prefix"
9597
9598 if test "X$x" = "X-L$additional_libdir"; then
9599 haveit=yes
9600 break
9601 fi
9602 done
9603 if test -z "$haveit"; then
9604 if test -d "$additional_libdir"; then
9605 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9606 fi
9607 fi
9608 fi
9609 fi
9610 ;;
9611 -R*)
9612 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9613 if test "$enable_rpath" != no; then
9614 haveit=
9615 for x in $rpathdirs; do
9616 if test "X$x" = "X$dir"; then
9617 haveit=yes
9618 break
9619 fi
9620 done
9621 if test -z "$haveit"; then
9622 rpathdirs="$rpathdirs $dir"
9623 fi
9624 haveit=
9625 for x in $ltrpathdirs; do
9626 if test "X$x" = "X$dir"; then
9627 haveit=yes
9628 break
9629 fi
9630 done
9631 if test -z "$haveit"; then
9632 ltrpathdirs="$ltrpathdirs $dir"
9633 fi
9634 fi
9635 ;;
9636 -l*)
9637 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9638 ;;
9639 *.la)
9640 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9641 ;;
9642 *)
9643 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9644 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9645 ;;
9646 esac
9647 done
9648 fi
9649 else
9650 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9651 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9652 fi
9653 fi
9654 fi
9655 done
9656 done
9657 if test "X$rpathdirs" != "X"; then
9658 if test -n "$hardcode_libdir_separator"; then
9659 alldirs=
9660 for found_dir in $rpathdirs; do
9661 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9662 done
9663 acl_save_libdir="$libdir"
9664 libdir="$alldirs"
9665 eval flag=\"$hardcode_libdir_flag_spec\"
9666 libdir="$acl_save_libdir"
9667 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9668 else
9669 for found_dir in $rpathdirs; do
9670 acl_save_libdir="$libdir"
9671 libdir="$found_dir"
9672 eval flag=\"$hardcode_libdir_flag_spec\"
9673 libdir="$acl_save_libdir"
9674 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9675 done
9676 fi
9677 fi
9678 if test "X$ltrpathdirs" != "X"; then
9679 for found_dir in $ltrpathdirs; do
9680 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9681 done
9682 fi
9683
9684
9685 ac_save_CPPFLAGS="$CPPFLAGS"
9686
9687 for element in $INCEXPAT; do
9688 haveit=
9689 for x in $CPPFLAGS; do
9690
9691 acl_save_prefix="$prefix"
9692 prefix="$acl_final_prefix"
9693 acl_save_exec_prefix="$exec_prefix"
9694 exec_prefix="$acl_final_exec_prefix"
9695 eval x=\"$x\"
9696 exec_prefix="$acl_save_exec_prefix"
9697 prefix="$acl_save_prefix"
9698
9699 if test "X$x" = "X$element"; then
9700 haveit=yes
9701 break
9702 fi
9703 done
9704 if test -z "$haveit"; then
9705 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9706 fi
9707 done
9708
9709
9710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9711 $as_echo_n "checking for libexpat... " >&6; }
9712 if ${ac_cv_libexpat+:} false; then :
9713 $as_echo_n "(cached) " >&6
9714 else
9715
9716 ac_save_LIBS="$LIBS"
9717 LIBS="$LIBS $LIBEXPAT"
9718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9719 /* end confdefs.h. */
9720 #include "expat.h"
9721 int
9722 main ()
9723 {
9724 XML_Parser p = XML_ParserCreate (0);
9725 ;
9726 return 0;
9727 }
9728 _ACEOF
9729 if ac_fn_c_try_link "$LINENO"; then :
9730 ac_cv_libexpat=yes
9731 else
9732 ac_cv_libexpat=no
9733 fi
9734 rm -f core conftest.err conftest.$ac_objext \
9735 conftest$ac_exeext conftest.$ac_ext
9736 LIBS="$ac_save_LIBS"
9737
9738 fi
9739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9740 $as_echo "$ac_cv_libexpat" >&6; }
9741 if test "$ac_cv_libexpat" = yes; then
9742 HAVE_LIBEXPAT=yes
9743
9744 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
9745
9746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9747 $as_echo_n "checking how to link with libexpat... " >&6; }
9748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9749 $as_echo "$LIBEXPAT" >&6; }
9750 else
9751 HAVE_LIBEXPAT=no
9752 CPPFLAGS="$ac_save_CPPFLAGS"
9753 LIBEXPAT=
9754 LTLIBEXPAT=
9755 fi
9756
9757
9758
9759
9760
9761
9762 if test "$HAVE_LIBEXPAT" != yes; then
9763 if test "$with_expat" = yes; then
9764 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
9765 else
9766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9767 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9768 fi
9769 else
9770 save_LIBS=$LIBS
9771 LIBS="$LIBS $LIBEXPAT"
9772 for ac_func in XML_StopParser
9773 do :
9774 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9775 if test "x$ac_cv_func_XML_StopParser" = xyes; then :
9776 cat >>confdefs.h <<_ACEOF
9777 #define HAVE_XML_STOPPARSER 1
9778 _ACEOF
9779
9780 fi
9781 done
9782
9783 LIBS=$save_LIBS
9784 fi
9785 fi
9786
9787
9788 # Check whether --with-mpfr was given.
9789 if test "${with_mpfr+set}" = set; then :
9790 withval=$with_mpfr;
9791 else
9792 with_mpfr=auto
9793 fi
9794
9795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9796 $as_echo_n "checking whether to use MPFR... " >&6; }
9797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9798 $as_echo "$with_mpfr" >&6; }
9799
9800 if test "${with_mpfr}" = no; then
9801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9802 $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9803 HAVE_LIBMPFR=no
9804 else
9805
9806
9807
9808
9809
9810
9811
9812
9813 use_additional=yes
9814
9815 acl_save_prefix="$prefix"
9816 prefix="$acl_final_prefix"
9817 acl_save_exec_prefix="$exec_prefix"
9818 exec_prefix="$acl_final_exec_prefix"
9819
9820 eval additional_includedir=\"$includedir\"
9821 eval additional_libdir=\"$libdir\"
9822
9823 exec_prefix="$acl_save_exec_prefix"
9824 prefix="$acl_save_prefix"
9825
9826
9827 # Check whether --with-libmpfr-prefix was given.
9828 if test "${with_libmpfr_prefix+set}" = set; then :
9829 withval=$with_libmpfr_prefix;
9830 if test "X$withval" = "Xno"; then
9831 use_additional=no
9832 else
9833 if test "X$withval" = "X"; then
9834
9835 acl_save_prefix="$prefix"
9836 prefix="$acl_final_prefix"
9837 acl_save_exec_prefix="$exec_prefix"
9838 exec_prefix="$acl_final_exec_prefix"
9839
9840 eval additional_includedir=\"$includedir\"
9841 eval additional_libdir=\"$libdir\"
9842
9843 exec_prefix="$acl_save_exec_prefix"
9844 prefix="$acl_save_prefix"
9845
9846 else
9847 additional_includedir="$withval/include"
9848 additional_libdir="$withval/lib"
9849 fi
9850 fi
9851
9852 fi
9853
9854 LIBMPFR=
9855 LTLIBMPFR=
9856 INCMPFR=
9857 rpathdirs=
9858 ltrpathdirs=
9859 names_already_handled=
9860 names_next_round='mpfr '
9861 while test -n "$names_next_round"; do
9862 names_this_round="$names_next_round"
9863 names_next_round=
9864 for name in $names_this_round; do
9865 already_handled=
9866 for n in $names_already_handled; do
9867 if test "$n" = "$name"; then
9868 already_handled=yes
9869 break
9870 fi
9871 done
9872 if test -z "$already_handled"; then
9873 names_already_handled="$names_already_handled $name"
9874 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9875 eval value=\"\$HAVE_LIB$uppername\"
9876 if test -n "$value"; then
9877 if test "$value" = yes; then
9878 eval value=\"\$LIB$uppername\"
9879 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9880 eval value=\"\$LTLIB$uppername\"
9881 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9882 else
9883 :
9884 fi
9885 else
9886 found_dir=
9887 found_la=
9888 found_so=
9889 found_a=
9890 if test $use_additional = yes; then
9891 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9892 found_dir="$additional_libdir"
9893 found_so="$additional_libdir/lib$name.$shlibext"
9894 if test -f "$additional_libdir/lib$name.la"; then
9895 found_la="$additional_libdir/lib$name.la"
9896 fi
9897 else
9898 if test -f "$additional_libdir/lib$name.$libext"; then
9899 found_dir="$additional_libdir"
9900 found_a="$additional_libdir/lib$name.$libext"
9901 if test -f "$additional_libdir/lib$name.la"; then
9902 found_la="$additional_libdir/lib$name.la"
9903 fi
9904 fi
9905 fi
9906 fi
9907 if test "X$found_dir" = "X"; then
9908 for x in $LDFLAGS $LTLIBMPFR; do
9909
9910 acl_save_prefix="$prefix"
9911 prefix="$acl_final_prefix"
9912 acl_save_exec_prefix="$exec_prefix"
9913 exec_prefix="$acl_final_exec_prefix"
9914 eval x=\"$x\"
9915 exec_prefix="$acl_save_exec_prefix"
9916 prefix="$acl_save_prefix"
9917
9918 case "$x" in
9919 -L*)
9920 dir=`echo "X$x" | sed -e 's/^X-L//'`
9921 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9922 found_dir="$dir"
9923 found_so="$dir/lib$name.$shlibext"
9924 if test -f "$dir/lib$name.la"; then
9925 found_la="$dir/lib$name.la"
9926 fi
9927 else
9928 if test -f "$dir/lib$name.$libext"; then
9929 found_dir="$dir"
9930 found_a="$dir/lib$name.$libext"
9931 if test -f "$dir/lib$name.la"; then
9932 found_la="$dir/lib$name.la"
9933 fi
9934 fi
9935 fi
9936 ;;
9937 esac
9938 if test "X$found_dir" != "X"; then
9939 break
9940 fi
9941 done
9942 fi
9943 if test "X$found_dir" != "X"; then
9944 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9945 if test "X$found_so" != "X"; then
9946 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9947 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9948 else
9949 haveit=
9950 for x in $ltrpathdirs; do
9951 if test "X$x" = "X$found_dir"; then
9952 haveit=yes
9953 break
9954 fi
9955 done
9956 if test -z "$haveit"; then
9957 ltrpathdirs="$ltrpathdirs $found_dir"
9958 fi
9959 if test "$hardcode_direct" = yes; then
9960 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9961 else
9962 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9963 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9964 haveit=
9965 for x in $rpathdirs; do
9966 if test "X$x" = "X$found_dir"; then
9967 haveit=yes
9968 break
9969 fi
9970 done
9971 if test -z "$haveit"; then
9972 rpathdirs="$rpathdirs $found_dir"
9973 fi
9974 else
9975 haveit=
9976 for x in $LDFLAGS $LIBMPFR; do
9977
9978 acl_save_prefix="$prefix"
9979 prefix="$acl_final_prefix"
9980 acl_save_exec_prefix="$exec_prefix"
9981 exec_prefix="$acl_final_exec_prefix"
9982 eval x=\"$x\"
9983 exec_prefix="$acl_save_exec_prefix"
9984 prefix="$acl_save_prefix"
9985
9986 if test "X$x" = "X-L$found_dir"; then
9987 haveit=yes
9988 break
9989 fi
9990 done
9991 if test -z "$haveit"; then
9992 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
9993 fi
9994 if test "$hardcode_minus_L" != no; then
9995 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9996 else
9997 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
9998 fi
9999 fi
10000 fi
10001 fi
10002 else
10003 if test "X$found_a" != "X"; then
10004 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10005 else
10006 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10007 fi
10008 fi
10009 additional_includedir=
10010 case "$found_dir" in
10011 */lib | */lib/)
10012 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10013 additional_includedir="$basedir/include"
10014 ;;
10015 esac
10016 if test "X$additional_includedir" != "X"; then
10017 if test "X$additional_includedir" != "X/usr/include"; then
10018 haveit=
10019 if test "X$additional_includedir" = "X/usr/local/include"; then
10020 if test -n "$GCC"; then
10021 case $host_os in
10022 linux*) haveit=yes;;
10023 esac
10024 fi
10025 fi
10026 if test -z "$haveit"; then
10027 for x in $CPPFLAGS $INCMPFR; do
10028
10029 acl_save_prefix="$prefix"
10030 prefix="$acl_final_prefix"
10031 acl_save_exec_prefix="$exec_prefix"
10032 exec_prefix="$acl_final_exec_prefix"
10033 eval x=\"$x\"
10034 exec_prefix="$acl_save_exec_prefix"
10035 prefix="$acl_save_prefix"
10036
10037 if test "X$x" = "X-I$additional_includedir"; then
10038 haveit=yes
10039 break
10040 fi
10041 done
10042 if test -z "$haveit"; then
10043 if test -d "$additional_includedir"; then
10044 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10045 fi
10046 fi
10047 fi
10048 fi
10049 fi
10050 if test -n "$found_la"; then
10051 save_libdir="$libdir"
10052 case "$found_la" in
10053 */* | *\\*) . "$found_la" ;;
10054 *) . "./$found_la" ;;
10055 esac
10056 libdir="$save_libdir"
10057 for dep in $dependency_libs; do
10058 case "$dep" in
10059 -L*)
10060 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10061 if test "X$additional_libdir" != "X/usr/lib"; then
10062 haveit=
10063 if test "X$additional_libdir" = "X/usr/local/lib"; then
10064 if test -n "$GCC"; then
10065 case $host_os in
10066 linux*) haveit=yes;;
10067 esac
10068 fi
10069 fi
10070 if test -z "$haveit"; then
10071 haveit=
10072 for x in $LDFLAGS $LIBMPFR; do
10073
10074 acl_save_prefix="$prefix"
10075 prefix="$acl_final_prefix"
10076 acl_save_exec_prefix="$exec_prefix"
10077 exec_prefix="$acl_final_exec_prefix"
10078 eval x=\"$x\"
10079 exec_prefix="$acl_save_exec_prefix"
10080 prefix="$acl_save_prefix"
10081
10082 if test "X$x" = "X-L$additional_libdir"; then
10083 haveit=yes
10084 break
10085 fi
10086 done
10087 if test -z "$haveit"; then
10088 if test -d "$additional_libdir"; then
10089 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10090 fi
10091 fi
10092 haveit=
10093 for x in $LDFLAGS $LTLIBMPFR; do
10094
10095 acl_save_prefix="$prefix"
10096 prefix="$acl_final_prefix"
10097 acl_save_exec_prefix="$exec_prefix"
10098 exec_prefix="$acl_final_exec_prefix"
10099 eval x=\"$x\"
10100 exec_prefix="$acl_save_exec_prefix"
10101 prefix="$acl_save_prefix"
10102
10103 if test "X$x" = "X-L$additional_libdir"; then
10104 haveit=yes
10105 break
10106 fi
10107 done
10108 if test -z "$haveit"; then
10109 if test -d "$additional_libdir"; then
10110 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10111 fi
10112 fi
10113 fi
10114 fi
10115 ;;
10116 -R*)
10117 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10118 if test "$enable_rpath" != no; then
10119 haveit=
10120 for x in $rpathdirs; do
10121 if test "X$x" = "X$dir"; then
10122 haveit=yes
10123 break
10124 fi
10125 done
10126 if test -z "$haveit"; then
10127 rpathdirs="$rpathdirs $dir"
10128 fi
10129 haveit=
10130 for x in $ltrpathdirs; do
10131 if test "X$x" = "X$dir"; then
10132 haveit=yes
10133 break
10134 fi
10135 done
10136 if test -z "$haveit"; then
10137 ltrpathdirs="$ltrpathdirs $dir"
10138 fi
10139 fi
10140 ;;
10141 -l*)
10142 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10143 ;;
10144 *.la)
10145 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10146 ;;
10147 *)
10148 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10149 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10150 ;;
10151 esac
10152 done
10153 fi
10154 else
10155 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10156 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10157 fi
10158 fi
10159 fi
10160 done
10161 done
10162 if test "X$rpathdirs" != "X"; then
10163 if test -n "$hardcode_libdir_separator"; then
10164 alldirs=
10165 for found_dir in $rpathdirs; do
10166 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10167 done
10168 acl_save_libdir="$libdir"
10169 libdir="$alldirs"
10170 eval flag=\"$hardcode_libdir_flag_spec\"
10171 libdir="$acl_save_libdir"
10172 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10173 else
10174 for found_dir in $rpathdirs; do
10175 acl_save_libdir="$libdir"
10176 libdir="$found_dir"
10177 eval flag=\"$hardcode_libdir_flag_spec\"
10178 libdir="$acl_save_libdir"
10179 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10180 done
10181 fi
10182 fi
10183 if test "X$ltrpathdirs" != "X"; then
10184 for found_dir in $ltrpathdirs; do
10185 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10186 done
10187 fi
10188
10189
10190 ac_save_CPPFLAGS="$CPPFLAGS"
10191
10192 for element in $INCMPFR; do
10193 haveit=
10194 for x in $CPPFLAGS; do
10195
10196 acl_save_prefix="$prefix"
10197 prefix="$acl_final_prefix"
10198 acl_save_exec_prefix="$exec_prefix"
10199 exec_prefix="$acl_final_exec_prefix"
10200 eval x=\"$x\"
10201 exec_prefix="$acl_save_exec_prefix"
10202 prefix="$acl_save_prefix"
10203
10204 if test "X$x" = "X$element"; then
10205 haveit=yes
10206 break
10207 fi
10208 done
10209 if test -z "$haveit"; then
10210 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10211 fi
10212 done
10213
10214
10215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10216 $as_echo_n "checking for libmpfr... " >&6; }
10217 if ${ac_cv_libmpfr+:} false; then :
10218 $as_echo_n "(cached) " >&6
10219 else
10220
10221 ac_save_LIBS="$LIBS"
10222 LIBS="$LIBS $LIBMPFR"
10223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10224 /* end confdefs.h. */
10225 #include <mpfr.h>
10226 int
10227 main ()
10228 {
10229 mpfr_exp_t exp; mpfr_t x;
10230 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10231 ;
10232 return 0;
10233 }
10234 _ACEOF
10235 if ac_fn_c_try_link "$LINENO"; then :
10236 ac_cv_libmpfr=yes
10237 else
10238 ac_cv_libmpfr=no
10239 fi
10240 rm -f core conftest.err conftest.$ac_objext \
10241 conftest$ac_exeext conftest.$ac_ext
10242 LIBS="$ac_save_LIBS"
10243
10244 fi
10245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10246 $as_echo "$ac_cv_libmpfr" >&6; }
10247 if test "$ac_cv_libmpfr" = yes; then
10248 HAVE_LIBMPFR=yes
10249
10250 $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10251
10252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10253 $as_echo_n "checking how to link with libmpfr... " >&6; }
10254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10255 $as_echo "$LIBMPFR" >&6; }
10256 else
10257 HAVE_LIBMPFR=no
10258 CPPFLAGS="$ac_save_CPPFLAGS"
10259 LIBMPFR=
10260 LTLIBMPFR=
10261 fi
10262
10263
10264
10265
10266
10267
10268 if test "$HAVE_LIBMPFR" != yes; then
10269 if test "$with_mpfr" = yes; then
10270 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
10271 else
10272 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10273 $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10274 fi
10275 fi
10276 fi
10277
10278 # --------------------- #
10279 # Check for libpython. #
10280 # --------------------- #
10281
10282
10283
10284
10285
10286
10287 # Check whether --with-python was given.
10288 if test "${with_python+set}" = set; then :
10289 withval=$with_python;
10290 else
10291 with_python=auto
10292 fi
10293
10294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10295 $as_echo_n "checking whether to use python... " >&6; }
10296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10297 $as_echo "$with_python" >&6; }
10298
10299 if test "${with_python}" = no; then
10300 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10301 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10302 have_libpython=no
10303 else
10304 case "${with_python}" in
10305 [\\/]* | ?:[\\/]*)
10306 if test -d ${with_python}; then
10307 # Assume the python binary is ${with_python}/bin/python.
10308 python_prog="${with_python}/bin/python"
10309 python_prefix=
10310 # If python does not exit ${with_python}/bin, then try in
10311 # ${with_python}. On Windows/MinGW, this is where the Python
10312 # executable is.
10313 if test ! -x "${python_prog}"; then
10314 python_prog="${with_python}/python"
10315 python_prefix=
10316 fi
10317 if test ! -x "${python_prog}"; then
10318 # Fall back to gdb 7.0/7.1 behaviour.
10319 python_prog=missing
10320 python_prefix=${with_python}
10321 fi
10322 elif test -x "${with_python}"; then
10323 # While we can't run python compiled for $host (unless host == build),
10324 # the user could write a script that provides the needed information,
10325 # so we support that.
10326 python_prog=${with_python}
10327 python_prefix=
10328 else
10329 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10330 fi
10331 ;;
10332 */*)
10333 # Disallow --with-python=foo/bar.
10334 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10335 ;;
10336 *)
10337 # The user has either specified auto, yes, or the name of the python
10338 # program assumed to be in $PATH.
10339 python_prefix=
10340 case "${with_python}" in
10341 yes | auto)
10342 if test ${build} = ${host}; then
10343 # Extract the first word of "python", so it can be a program name with args.
10344 set dummy python; ac_word=$2
10345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10346 $as_echo_n "checking for $ac_word... " >&6; }
10347 if ${ac_cv_path_python_prog_path+:} false; then :
10348 $as_echo_n "(cached) " >&6
10349 else
10350 case $python_prog_path in
10351 [\\/]* | ?:[\\/]*)
10352 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10353 ;;
10354 *)
10355 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10356 for as_dir in $PATH
10357 do
10358 IFS=$as_save_IFS
10359 test -z "$as_dir" && as_dir=.
10360 for ac_exec_ext in '' $ac_executable_extensions; do
10361 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10362 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10363 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10364 break 2
10365 fi
10366 done
10367 done
10368 IFS=$as_save_IFS
10369
10370 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10371 ;;
10372 esac
10373 fi
10374 python_prog_path=$ac_cv_path_python_prog_path
10375 if test -n "$python_prog_path"; then
10376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10377 $as_echo "$python_prog_path" >&6; }
10378 else
10379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10380 $as_echo "no" >&6; }
10381 fi
10382
10383
10384 if test "${python_prog_path}" = missing; then
10385 python_prog=missing
10386 else
10387 python_prog=${python_prog_path}
10388 fi
10389 else
10390 # Not much we can do except assume the cross-compiler will find the
10391 # right files.
10392 python_prog=missing
10393 fi
10394 ;;
10395 *)
10396 # While we can't run python compiled for $host (unless host == build),
10397 # the user could write a script that provides the needed information,
10398 # so we support that.
10399 python_prog="${with_python}"
10400 # Extract the first word of "${python_prog}", so it can be a program name with args.
10401 set dummy ${python_prog}; ac_word=$2
10402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10403 $as_echo_n "checking for $ac_word... " >&6; }
10404 if ${ac_cv_path_python_prog_path+:} false; then :
10405 $as_echo_n "(cached) " >&6
10406 else
10407 case $python_prog_path in
10408 [\\/]* | ?:[\\/]*)
10409 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10410 ;;
10411 *)
10412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10413 for as_dir in $PATH
10414 do
10415 IFS=$as_save_IFS
10416 test -z "$as_dir" && as_dir=.
10417 for ac_exec_ext in '' $ac_executable_extensions; do
10418 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10419 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10420 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10421 break 2
10422 fi
10423 done
10424 done
10425 IFS=$as_save_IFS
10426
10427 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10428 ;;
10429 esac
10430 fi
10431 python_prog_path=$ac_cv_path_python_prog_path
10432 if test -n "$python_prog_path"; then
10433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10434 $as_echo "$python_prog_path" >&6; }
10435 else
10436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10437 $as_echo "no" >&6; }
10438 fi
10439
10440
10441 if test "${python_prog_path}" = missing; then
10442 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
10443 fi
10444 ;;
10445 esac
10446 esac
10447
10448 if test "${python_prog}" != missing; then
10449 # We have a python program to use, but it may be too old.
10450 # Don't flag an error for --with-python=auto (the default).
10451 have_python_config=yes
10452 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10453 if test $? != 0; then
10454 have_python_config=failed
10455 if test "${with_python}" != auto; then
10456 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
10457 fi
10458 fi
10459 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10460 if test $? != 0; then
10461 have_python_config=failed
10462 if test "${with_python}" != auto; then
10463 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
10464 fi
10465 fi
10466 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10467 if test $? != 0; then
10468 have_python_config=failed
10469 if test "${with_python}" != auto; then
10470 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
10471 fi
10472 fi
10473 else
10474 # We do not have a python executable we can use to determine where
10475 # to find the Python headers and libs. We cannot guess the include
10476 # path from the python_prefix either, because that include path
10477 # depends on the Python version. So, there is nothing much we can
10478 # do except assume that the compiler will be able to find those files.
10479 python_includes=
10480 python_libs=
10481 have_python_config=no
10482 fi
10483
10484 # If we have python-config, only try the configuration it provides.
10485 # Otherwise fallback on the old way of trying different versions of
10486 # python in turn.
10487
10488 have_libpython=no
10489 if test "${have_python_config}" = yes; then
10490 # Determine the Python version by extracting "-lpython<version>"
10491 # part of the python_libs. <version> is usually X.Y with X and Y
10492 # being decimal numbers, but can also be XY (seen on Windows).
10493 #
10494 # The extraction is performed using sed with a regular expression.
10495 # Initially, the regexp used was using the '?' quantifier to make
10496 # the dot in the version number optional. Unfortunately, this
10497 # does not work with non-GNU versions of sed because, because of
10498 # what looks like a limitation (the '?' quantifier does not work
10499 # with back-references). We work around this limitation by using
10500 # the '*' quantifier instead. It means that, in theory, we might
10501 # match unexpected version strings such as "-lpython2..7", but
10502 # this seems unlikely in practice. And even if that happens,
10503 # an error will be triggered later on, when checking that version
10504 # number.
10505 python_version=`echo " ${python_libs} " \
10506 | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'`
10507 case "${python_version}" in
10508 python*)
10509
10510 version=${python_version}
10511
10512 new_CPPFLAGS=${python_includes}
10513 new_LIBS=${python_libs}
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10515 $as_echo_n "checking for ${version}... " >&6; }
10516 save_CPPFLAGS=$CPPFLAGS
10517 save_LIBS=$LIBS
10518 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10519 LIBS="$new_LIBS $LIBS"
10520 found_usable_python=no
10521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10522 /* end confdefs.h. */
10523 #include "Python.h"
10524 int
10525 main ()
10526 {
10527 Py_Initialize ();
10528 ;
10529 return 0;
10530 }
10531 _ACEOF
10532 if ac_fn_c_try_link "$LINENO"; then :
10533 have_libpython=${version}
10534 found_usable_python=yes
10535 PYTHON_CPPFLAGS=$new_CPPFLAGS
10536 PYTHON_LIBS=$new_LIBS
10537 fi
10538 rm -f core conftest.err conftest.$ac_objext \
10539 conftest$ac_exeext conftest.$ac_ext
10540 CPPFLAGS=$save_CPPFLAGS
10541 LIBS=$save_LIBS
10542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10543 $as_echo "${found_usable_python}" >&6; }
10544
10545 ;;
10546 *)
10547 as_fn_error $? "unable to determine python version from ${python_libs}" "$LINENO" 5
10548 ;;
10549 esac
10550 elif test "${have_python_config}" != failed; then
10551 if test "${have_libpython}" = no; then
10552
10553 version=python2.7
10554
10555 new_CPPFLAGS=${python_includes}
10556 new_LIBS="-lpython2.7 ${python_libs}"
10557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10558 $as_echo_n "checking for ${version}... " >&6; }
10559 save_CPPFLAGS=$CPPFLAGS
10560 save_LIBS=$LIBS
10561 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10562 LIBS="$new_LIBS $LIBS"
10563 found_usable_python=no
10564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10565 /* end confdefs.h. */
10566 #include "Python.h"
10567 int
10568 main ()
10569 {
10570 Py_Initialize ();
10571 ;
10572 return 0;
10573 }
10574 _ACEOF
10575 if ac_fn_c_try_link "$LINENO"; then :
10576 have_libpython=${version}
10577 found_usable_python=yes
10578 PYTHON_CPPFLAGS=$new_CPPFLAGS
10579 PYTHON_LIBS=$new_LIBS
10580 fi
10581 rm -f core conftest.err conftest.$ac_objext \
10582 conftest$ac_exeext conftest.$ac_ext
10583 CPPFLAGS=$save_CPPFLAGS
10584 LIBS=$save_LIBS
10585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10586 $as_echo "${found_usable_python}" >&6; }
10587
10588 fi
10589 if test "${have_libpython}" = no; then
10590
10591 version=python2.6
10592
10593 new_CPPFLAGS=${python_includes}
10594 new_LIBS="-lpython2.6 ${python_libs}"
10595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10596 $as_echo_n "checking for ${version}... " >&6; }
10597 save_CPPFLAGS=$CPPFLAGS
10598 save_LIBS=$LIBS
10599 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10600 LIBS="$new_LIBS $LIBS"
10601 found_usable_python=no
10602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10603 /* end confdefs.h. */
10604 #include "Python.h"
10605 int
10606 main ()
10607 {
10608 Py_Initialize ();
10609 ;
10610 return 0;
10611 }
10612 _ACEOF
10613 if ac_fn_c_try_link "$LINENO"; then :
10614 have_libpython=${version}
10615 found_usable_python=yes
10616 PYTHON_CPPFLAGS=$new_CPPFLAGS
10617 PYTHON_LIBS=$new_LIBS
10618 fi
10619 rm -f core conftest.err conftest.$ac_objext \
10620 conftest$ac_exeext conftest.$ac_ext
10621 CPPFLAGS=$save_CPPFLAGS
10622 LIBS=$save_LIBS
10623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10624 $as_echo "${found_usable_python}" >&6; }
10625
10626 fi
10627 if test ${have_libpython} = no; then
10628
10629 version=python2.5
10630
10631 new_CPPFLAGS=${python_includes}
10632 new_LIBS="-lpython2.5 ${python_libs}"
10633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10634 $as_echo_n "checking for ${version}... " >&6; }
10635 save_CPPFLAGS=$CPPFLAGS
10636 save_LIBS=$LIBS
10637 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10638 LIBS="$new_LIBS $LIBS"
10639 found_usable_python=no
10640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10641 /* end confdefs.h. */
10642 #include "Python.h"
10643 int
10644 main ()
10645 {
10646 Py_Initialize ();
10647 ;
10648 return 0;
10649 }
10650 _ACEOF
10651 if ac_fn_c_try_link "$LINENO"; then :
10652 have_libpython=${version}
10653 found_usable_python=yes
10654 PYTHON_CPPFLAGS=$new_CPPFLAGS
10655 PYTHON_LIBS=$new_LIBS
10656 fi
10657 rm -f core conftest.err conftest.$ac_objext \
10658 conftest$ac_exeext conftest.$ac_ext
10659 CPPFLAGS=$save_CPPFLAGS
10660 LIBS=$save_LIBS
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10662 $as_echo "${found_usable_python}" >&6; }
10663
10664 fi
10665 if test ${have_libpython} = no; then
10666
10667 version=python2.4
10668
10669 new_CPPFLAGS=${python_includes}
10670 new_LIBS="-lpython2.4 ${python_libs}"
10671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
10672 $as_echo_n "checking for ${version}... " >&6; }
10673 save_CPPFLAGS=$CPPFLAGS
10674 save_LIBS=$LIBS
10675 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10676 LIBS="$new_LIBS $LIBS"
10677 found_usable_python=no
10678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10679 /* end confdefs.h. */
10680 #include "Python.h"
10681 int
10682 main ()
10683 {
10684 Py_Initialize ();
10685 ;
10686 return 0;
10687 }
10688 _ACEOF
10689 if ac_fn_c_try_link "$LINENO"; then :
10690 have_libpython=${version}
10691 found_usable_python=yes
10692 PYTHON_CPPFLAGS=$new_CPPFLAGS
10693 PYTHON_LIBS=$new_LIBS
10694 fi
10695 rm -f core conftest.err conftest.$ac_objext \
10696 conftest$ac_exeext conftest.$ac_ext
10697 CPPFLAGS=$save_CPPFLAGS
10698 LIBS=$save_LIBS
10699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10700 $as_echo "${found_usable_python}" >&6; }
10701
10702 fi
10703 fi
10704 if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then
10705
10706 $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h
10707
10708 elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then
10709
10710 $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h
10711
10712 elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then
10713
10714 $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h
10715
10716 elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then
10717
10718 $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h
10719
10720 fi
10721
10722 if test "${have_libpython}" = no; then
10723 case "${with_python}" in
10724 yes)
10725 as_fn_error $? "python is missing or unusable" "$LINENO" 5
10726 ;;
10727 auto)
10728 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10729 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10730 ;;
10731 *)
10732 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
10733 ;;
10734 esac
10735 else
10736 if test -n "${python_prefix}"; then
10737
10738 cat >>confdefs.h <<_ACEOF
10739 #define WITH_PYTHON_PATH "${python_prefix}"
10740 _ACEOF
10741
10742
10743 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10744 if test "x$prefix" = xNONE; then
10745 test_prefix=/usr/local
10746 else
10747 test_prefix=$prefix
10748 fi
10749 else
10750 test_prefix=$exec_prefix
10751 fi
10752 value=0
10753 case ${python_prefix} in
10754 "${test_prefix}"|"${test_prefix}/"*|\
10755 '${exec_prefix}'|'${exec_prefix}/'*)
10756 value=1
10757 ;;
10758 esac
10759
10760 cat >>confdefs.h <<_ACEOF
10761 #define PYTHON_PATH_RELOCATABLE $value
10762 _ACEOF
10763
10764
10765 fi
10766 fi
10767 fi
10768
10769 if test "${have_libpython}" != no; then
10770
10771 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
10772
10773 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10774 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10775 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
10776 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
10777 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
10778
10779 # Flags needed to compile Python code (taken from python-config --cflags).
10780 # We cannot call python-config directly because it will output whatever was
10781 # used when compiling the Python interpreter itself, including flags which
10782 # would make the python-related objects be compiled differently from the
10783 # rest of GDB (e.g., -O2 and -fPIC).
10784 if test "${GCC}" = yes; then
10785 tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
10786 fi
10787
10788 if test "x${tentative_python_cflags}" != x; then
10789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10790 $as_echo_n "checking compiler flags for python code... " >&6; }
10791 for flag in ${tentative_python_cflags}; do
10792 # Check that the compiler accepts it
10793 saved_CFLAGS="$CFLAGS"
10794 CFLAGS="$CFLAGS $flag"
10795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10796 /* end confdefs.h. */
10797
10798 int
10799 main ()
10800 {
10801
10802 ;
10803 return 0;
10804 }
10805 _ACEOF
10806 if ac_fn_c_try_compile "$LINENO"; then :
10807 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
10808 fi
10809 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10810 CFLAGS="$saved_CFLAGS"
10811 done
10812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10813 $as_echo "${PYTHON_CFLAGS}" >&6; }
10814 fi
10815
10816 # On x64 Windows, Python's include headers, and pyconfig.h in
10817 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10818 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10819 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10820 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10821 # The issue was reported to the Python community, but still isn't
10822 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10823
10824 case "$gdb_host" in
10825 mingw64)
10826 if test "${GCC}" = yes; then
10827 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10828 fi
10829 ;;
10830 esac
10831
10832 # Note that "python -m threading" cannot be used to check for
10833 # threading support due to a bug in Python 2.7.3
10834 # (http://bugs.python.org/issue15567).
10835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5
10836 $as_echo_n "checking whether python supports threads... " >&6; }
10837 saved_CPPFLAGS="${CPPFLAGS}"
10838 CPPFLAGS="${PYTHON_CPPFLAGS}"
10839 # Note that the test is reversed so that python_has_threads=yes on
10840 # unexpected failures.
10841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10842 /* end confdefs.h. */
10843
10844 #include <Python.h>
10845 #ifdef WITH_THREAD
10846 # error
10847 #endif
10848
10849 _ACEOF
10850 if ac_fn_c_try_cpp "$LINENO"; then :
10851 python_has_threads=no
10852 else
10853 python_has_threads=yes
10854 fi
10855 rm -f conftest.err conftest.i conftest.$ac_ext
10856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5
10857 $as_echo "${python_has_threads}" >&6; }
10858 CPPFLAGS="${saved_CPPFLAGS}"
10859 else
10860 # Even if Python support is not compiled in, we need to have this file
10861 # included so that the "python" command, et.al., still exists.
10862 CONFIG_OBS="$CONFIG_OBS python/python.o"
10863 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
10864 fi
10865
10866 # Work around Python http://bugs.python.org/issue10112. See also
10867 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10868 # no effect. Note that the only test after this that uses Python is
10869 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10870 # run without -export-dynamic too.
10871 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10872
10873
10874
10875
10876 if test "${have_libpython}" != no; then
10877 HAVE_PYTHON_TRUE=
10878 HAVE_PYTHON_FALSE='#'
10879 else
10880 HAVE_PYTHON_TRUE='#'
10881 HAVE_PYTHON_FALSE=
10882 fi
10883
10884
10885 # -------------------- #
10886 # Check for libguile. #
10887 # -------------------- #
10888
10889
10890
10891
10892
10893
10894 # Check whether --with-guile was given.
10895 if test "${with_guile+set}" = set; then :
10896 withval=$with_guile;
10897 else
10898 with_guile=auto
10899 fi
10900
10901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10902 $as_echo_n "checking whether to use guile... " >&6; }
10903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10904 $as_echo "$with_guile" >&6; }
10905
10906 # Extract the first word of "pkg-config", so it can be a program name with args.
10907 set dummy pkg-config; ac_word=$2
10908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10909 $as_echo_n "checking for $ac_word... " >&6; }
10910 if ${ac_cv_path_pkg_config_prog_path+:} false; then :
10911 $as_echo_n "(cached) " >&6
10912 else
10913 case $pkg_config_prog_path in
10914 [\\/]* | ?:[\\/]*)
10915 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10916 ;;
10917 *)
10918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10919 for as_dir in $PATH
10920 do
10921 IFS=$as_save_IFS
10922 test -z "$as_dir" && as_dir=.
10923 for ac_exec_ext in '' $ac_executable_extensions; do
10924 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10925 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10927 break 2
10928 fi
10929 done
10930 done
10931 IFS=$as_save_IFS
10932
10933 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10934 ;;
10935 esac
10936 fi
10937 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10938 if test -n "$pkg_config_prog_path"; then
10939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10940 $as_echo "$pkg_config_prog_path" >&6; }
10941 else
10942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10943 $as_echo "no" >&6; }
10944 fi
10945
10946
10947
10948 try_guile_versions="guile-2.0"
10949 have_libguile=no
10950 case "${with_guile}" in
10951 no)
10952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10953 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10954 ;;
10955 auto)
10956 if test "${pkg_config_prog_path}" = "missing"; then
10957 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10958 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10959 else
10960
10961 pkg_config=${pkg_config_prog_path}
10962 guile_version_list=${try_guile_versions}
10963 flag_errors=no
10964
10965 found_usable_guile=checking
10966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10967 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10968 for guile_version in ${guile_version_list}; do
10969 ${pkg_config} --exists ${guile_version} 2>/dev/null
10970 if test $? != 0; then
10971 continue
10972 fi
10973 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10974 if test $? != 0; then
10975 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10976 fi
10977 new_LIBS=`${pkg_config} --libs ${guile_version}`
10978 if test $? != 0; then
10979 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10980 fi
10981 found_usable_guile=${guile_version}
10982 break
10983 done
10984 if test "${found_usable_guile}" = "checking"; then
10985 if test "${flag_errors}" = "yes"; then
10986 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10987 else
10988 found_usable_guile=no
10989 fi
10990 fi
10991 if test "${found_usable_guile}" != no; then
10992 save_CPPFLAGS=$CPPFLAGS
10993 save_LIBS=$LIBS
10994 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10995 LIBS="$LIBS $new_LIBS"
10996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10997 /* end confdefs.h. */
10998 #include "libguile.h"
10999 int
11000 main ()
11001 {
11002 scm_init_guile ();
11003 ;
11004 return 0;
11005 }
11006 _ACEOF
11007 if ac_fn_c_try_link "$LINENO"; then :
11008 have_libguile=yes
11009 GUILE_CPPFLAGS=$new_CPPFLAGS
11010 GUILE_LIBS=$new_LIBS
11011 else
11012 found_usable_guile=no
11013 fi
11014 rm -f core conftest.err conftest.$ac_objext \
11015 conftest$ac_exeext conftest.$ac_ext
11016 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11017 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11018
11019 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11020
11021
11022 fi
11023
11024 CPPFLAGS=$save_CPPFLAGS
11025 LIBS=$save_LIBS
11026 if test "${found_usable_guile}" = no; then
11027 if test "${flag_errors}" = yes; then
11028 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11029 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11030 as_fn_error $? "linking guile version ${guile_version} test program failed
11031 See \`config.log' for more details" "$LINENO" 5; }
11032 fi
11033 fi
11034 fi
11035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11036 $as_echo "${found_usable_guile}" >&6; }
11037
11038 fi
11039 ;;
11040 yes)
11041 if test "${pkg_config_prog_path}" = "missing"; then
11042 as_fn_error $? "pkg-config not found" "$LINENO" 5
11043 fi
11044
11045 pkg_config=${pkg_config_prog_path}
11046 guile_version_list=${try_guile_versions}
11047 flag_errors=yes
11048
11049 found_usable_guile=checking
11050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11051 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11052 for guile_version in ${guile_version_list}; do
11053 ${pkg_config} --exists ${guile_version} 2>/dev/null
11054 if test $? != 0; then
11055 continue
11056 fi
11057 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11058 if test $? != 0; then
11059 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11060 fi
11061 new_LIBS=`${pkg_config} --libs ${guile_version}`
11062 if test $? != 0; then
11063 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11064 fi
11065 found_usable_guile=${guile_version}
11066 break
11067 done
11068 if test "${found_usable_guile}" = "checking"; then
11069 if test "${flag_errors}" = "yes"; then
11070 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11071 else
11072 found_usable_guile=no
11073 fi
11074 fi
11075 if test "${found_usable_guile}" != no; then
11076 save_CPPFLAGS=$CPPFLAGS
11077 save_LIBS=$LIBS
11078 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11079 LIBS="$LIBS $new_LIBS"
11080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11081 /* end confdefs.h. */
11082 #include "libguile.h"
11083 int
11084 main ()
11085 {
11086 scm_init_guile ();
11087 ;
11088 return 0;
11089 }
11090 _ACEOF
11091 if ac_fn_c_try_link "$LINENO"; then :
11092 have_libguile=yes
11093 GUILE_CPPFLAGS=$new_CPPFLAGS
11094 GUILE_LIBS=$new_LIBS
11095 else
11096 found_usable_guile=no
11097 fi
11098 rm -f core conftest.err conftest.$ac_objext \
11099 conftest$ac_exeext conftest.$ac_ext
11100 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11101 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11102
11103 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11104
11105
11106 fi
11107
11108 CPPFLAGS=$save_CPPFLAGS
11109 LIBS=$save_LIBS
11110 if test "${found_usable_guile}" = no; then
11111 if test "${flag_errors}" = yes; then
11112 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11113 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11114 as_fn_error $? "linking guile version ${guile_version} test program failed
11115 See \`config.log' for more details" "$LINENO" 5; }
11116 fi
11117 fi
11118 fi
11119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11120 $as_echo "${found_usable_guile}" >&6; }
11121
11122 ;;
11123 [\\/]* | ?:[\\/]*)
11124 if test -x "${with_guile}"; then
11125
11126 pkg_config=${with_guile}
11127 guile_version_list=${try_guile_versions}
11128 flag_errors=yes
11129
11130 found_usable_guile=checking
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11132 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11133 for guile_version in ${guile_version_list}; do
11134 ${pkg_config} --exists ${guile_version} 2>/dev/null
11135 if test $? != 0; then
11136 continue
11137 fi
11138 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11139 if test $? != 0; then
11140 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11141 fi
11142 new_LIBS=`${pkg_config} --libs ${guile_version}`
11143 if test $? != 0; then
11144 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11145 fi
11146 found_usable_guile=${guile_version}
11147 break
11148 done
11149 if test "${found_usable_guile}" = "checking"; then
11150 if test "${flag_errors}" = "yes"; then
11151 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11152 else
11153 found_usable_guile=no
11154 fi
11155 fi
11156 if test "${found_usable_guile}" != no; then
11157 save_CPPFLAGS=$CPPFLAGS
11158 save_LIBS=$LIBS
11159 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11160 LIBS="$LIBS $new_LIBS"
11161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11162 /* end confdefs.h. */
11163 #include "libguile.h"
11164 int
11165 main ()
11166 {
11167 scm_init_guile ();
11168 ;
11169 return 0;
11170 }
11171 _ACEOF
11172 if ac_fn_c_try_link "$LINENO"; then :
11173 have_libguile=yes
11174 GUILE_CPPFLAGS=$new_CPPFLAGS
11175 GUILE_LIBS=$new_LIBS
11176 else
11177 found_usable_guile=no
11178 fi
11179 rm -f core conftest.err conftest.$ac_objext \
11180 conftest$ac_exeext conftest.$ac_ext
11181 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11182 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11183
11184 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11185
11186
11187 fi
11188
11189 CPPFLAGS=$save_CPPFLAGS
11190 LIBS=$save_LIBS
11191 if test "${found_usable_guile}" = no; then
11192 if test "${flag_errors}" = yes; then
11193 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11194 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11195 as_fn_error $? "linking guile version ${guile_version} test program failed
11196 See \`config.log' for more details" "$LINENO" 5; }
11197 fi
11198 fi
11199 fi
11200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11201 $as_echo "${found_usable_guile}" >&6; }
11202
11203 else
11204 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11205 fi
11206 ;;
11207 "" | */*)
11208 # Disallow --with=guile="" and --with-guile=foo/bar.
11209 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11210 ;;
11211 *)
11212 # A space separate list of guile versions to try, in order.
11213 if test "${pkg_config_prog_path}" = "missing"; then
11214 as_fn_error $? "pkg-config not found" "$LINENO" 5
11215 fi
11216
11217 pkg_config=${pkg_config_prog_path}
11218 guile_version_list=${with_guile}
11219 flag_errors=yes
11220
11221 found_usable_guile=checking
11222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11223 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11224 for guile_version in ${guile_version_list}; do
11225 ${pkg_config} --exists ${guile_version} 2>/dev/null
11226 if test $? != 0; then
11227 continue
11228 fi
11229 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11230 if test $? != 0; then
11231 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11232 fi
11233 new_LIBS=`${pkg_config} --libs ${guile_version}`
11234 if test $? != 0; then
11235 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11236 fi
11237 found_usable_guile=${guile_version}
11238 break
11239 done
11240 if test "${found_usable_guile}" = "checking"; then
11241 if test "${flag_errors}" = "yes"; then
11242 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11243 else
11244 found_usable_guile=no
11245 fi
11246 fi
11247 if test "${found_usable_guile}" != no; then
11248 save_CPPFLAGS=$CPPFLAGS
11249 save_LIBS=$LIBS
11250 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11251 LIBS="$LIBS $new_LIBS"
11252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11253 /* end confdefs.h. */
11254 #include "libguile.h"
11255 int
11256 main ()
11257 {
11258 scm_init_guile ();
11259 ;
11260 return 0;
11261 }
11262 _ACEOF
11263 if ac_fn_c_try_link "$LINENO"; then :
11264 have_libguile=yes
11265 GUILE_CPPFLAGS=$new_CPPFLAGS
11266 GUILE_LIBS=$new_LIBS
11267 else
11268 found_usable_guile=no
11269 fi
11270 rm -f core conftest.err conftest.$ac_objext \
11271 conftest$ac_exeext conftest.$ac_ext
11272 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11273 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11274
11275 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11276
11277
11278 fi
11279
11280 CPPFLAGS=$save_CPPFLAGS
11281 LIBS=$save_LIBS
11282 if test "${found_usable_guile}" = no; then
11283 if test "${flag_errors}" = yes; then
11284 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11285 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11286 as_fn_error $? "linking guile version ${guile_version} test program failed
11287 See \`config.log' for more details" "$LINENO" 5; }
11288 fi
11289 fi
11290 fi
11291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11292 $as_echo "${found_usable_guile}" >&6; }
11293
11294 ;;
11295 esac
11296
11297 if test "${have_libguile}" != no; then
11298 case "${with_guile}" in
11299 [\\/]* | ?:[\\/]*)
11300
11301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11302 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11303 if ${ac_cv_guild_program_name+:} false; then :
11304 $as_echo_n "(cached) " >&6
11305 else
11306 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
11307
11308 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11309 # the 'guild' and 'bindir' variables. In that case, try to guess
11310 # what the program name is, at the risk of getting it wrong if
11311 # Guile was configured with '--program-suffix' or similar.
11312 if test "x$ac_cv_guild_program_name" = "x"; then
11313 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
11314 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11315 fi
11316
11317 fi
11318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11319 $as_echo "$ac_cv_guild_program_name" >&6; }
11320
11321 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11322 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11323 fi
11324
11325 GUILD="$ac_cv_guild_program_name"
11326
11327
11328 ;;
11329 *)
11330
11331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11332 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11333 if ${ac_cv_guild_program_name+:} false; then :
11334 $as_echo_n "(cached) " >&6
11335 else
11336 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11337
11338 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11339 # the 'guild' and 'bindir' variables. In that case, try to guess
11340 # what the program name is, at the risk of getting it wrong if
11341 # Guile was configured with '--program-suffix' or similar.
11342 if test "x$ac_cv_guild_program_name" = "x"; then
11343 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11344 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11345 fi
11346
11347 fi
11348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11349 $as_echo "$ac_cv_guild_program_name" >&6; }
11350
11351 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11352 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11353 fi
11354
11355 GUILD="$ac_cv_guild_program_name"
11356
11357
11358 ;;
11359 esac
11360
11361
11362 if test "$cross_compiling" = no; then
11363 GUILD_TARGET_FLAG=
11364 else
11365 GUILD_TARGET_FLAG="--target=$host"
11366 fi
11367
11368
11369
11370
11371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11372 $as_echo_n "checking whether guild supports this host... " >&6; }
11373 if ${ac_cv_guild_ok+:} false; then :
11374 $as_echo_n "(cached) " >&6
11375 else
11376 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11377 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11378 ac_cv_guild_ok=yes
11379 else
11380 ac_cv_guild_ok=no
11381 fi
11382 fi
11383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11384 $as_echo "$ac_cv_guild_ok" >&6; }
11385
11386 if test "$ac_cv_guild_ok" = no; then
11387 have_libguile=no
11388 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11389 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
11390 fi
11391 fi
11392
11393 if test "${have_libguile}" != no; then
11394
11395 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
11396
11397 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11398 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11399 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11400 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11401 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
11402
11403 save_LIBS="$LIBS"
11404 save_CPPFLAGS="$CPPFLAGS"
11405 LIBS="$GUILE_LIBS"
11406 CPPFLAGS="$GUILE_CPPFLAGS"
11407 for ac_func in scm_new_smob
11408 do :
11409 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
11410 if test "x$ac_cv_func_scm_new_smob" = xyes; then :
11411 cat >>confdefs.h <<_ACEOF
11412 #define HAVE_SCM_NEW_SMOB 1
11413 _ACEOF
11414
11415 fi
11416 done
11417
11418 LIBS="$save_LIBS"
11419 CPPFLAGS="$save_CPPFLAGS"
11420 else
11421 # Even if Guile support is not compiled in, we need to have these files
11422 # included.
11423 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
11424 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11425 fi
11426
11427
11428 if test "${have_libguile}" != no; then
11429 HAVE_GUILE_TRUE=
11430 HAVE_GUILE_FALSE='#'
11431 else
11432 HAVE_GUILE_TRUE='#'
11433 HAVE_GUILE_FALSE=
11434 fi
11435
11436
11437 # --------------------- #
11438 # Check for libmcheck. #
11439 # --------------------- #
11440
11441 # Enable -lmcheck by default (it provides cheap-enough memory mangling),
11442 # but turn it off if Python is enabled with threads, since -lmcheck is
11443 # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
11444 # and for releases.
11445 if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
11446 && $development; then
11447 libmcheck_default=yes
11448 else
11449 libmcheck_default=no
11450 fi
11451
11452 # Check whether --enable-libmcheck was given.
11453 if test "${enable_libmcheck+set}" = set; then :
11454 enableval=$enable_libmcheck; case "${enableval}" in
11455 yes | y) ENABLE_LIBMCHECK="yes" ;;
11456 no | n) ENABLE_LIBMCHECK="no" ;;
11457 *) as_fn_error $? "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;;
11458 esac
11459 fi
11460
11461
11462 if test -z "${ENABLE_LIBMCHECK}"; then
11463 ENABLE_LIBMCHECK=${libmcheck_default}
11464 fi
11465
11466 if test "$ENABLE_LIBMCHECK" = "yes" ; then
11467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5
11468 $as_echo_n "checking for main in -lmcheck... " >&6; }
11469 if ${ac_cv_lib_mcheck_main+:} false; then :
11470 $as_echo_n "(cached) " >&6
11471 else
11472 ac_check_lib_save_LIBS=$LIBS
11473 LIBS="-lmcheck $LIBS"
11474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11475 /* end confdefs.h. */
11476
11477
11478 int
11479 main ()
11480 {
11481 return main ();
11482 ;
11483 return 0;
11484 }
11485 _ACEOF
11486 if ac_fn_c_try_link "$LINENO"; then :
11487 ac_cv_lib_mcheck_main=yes
11488 else
11489 ac_cv_lib_mcheck_main=no
11490 fi
11491 rm -f core conftest.err conftest.$ac_objext \
11492 conftest$ac_exeext conftest.$ac_ext
11493 LIBS=$ac_check_lib_save_LIBS
11494 fi
11495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5
11496 $as_echo "$ac_cv_lib_mcheck_main" >&6; }
11497 if test "x$ac_cv_lib_mcheck_main" = xyes; then :
11498 cat >>confdefs.h <<_ACEOF
11499 #define HAVE_LIBMCHECK 1
11500 _ACEOF
11501
11502 LIBS="-lmcheck $LIBS"
11503
11504 fi
11505
11506 fi
11507
11508
11509 if test "$ENABLE_LIBMCHECK" = "yes" \
11510 -a "${have_libpython}" != "no" \
11511 -a "${python_has_threads}" = "yes" ; then
11512 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5
11513 $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;}
11514 fi
11515
11516
11517 # Check whether --with-intel_pt was given.
11518 if test "${with_intel_pt+set}" = set; then :
11519 withval=$with_intel_pt;
11520 else
11521 with_intel_pt=auto
11522 fi
11523
11524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
11525 $as_echo_n "checking whether to use intel pt... " >&6; }
11526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
11527 $as_echo "$with_intel_pt" >&6; }
11528
11529 if test "${with_intel_pt}" = no; then
11530 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
11531 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
11532 HAVE_LIBIPT=no
11533 else
11534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11535 /* end confdefs.h. */
11536
11537 #include <linux/perf_event.h>
11538 #ifndef PERF_ATTR_SIZE_VER5
11539 # error
11540 #endif
11541
11542 _ACEOF
11543 if ac_fn_c_try_cpp "$LINENO"; then :
11544 perf_event=yes
11545 else
11546 perf_event=no
11547 fi
11548 rm -f conftest.err conftest.i conftest.$ac_ext
11549 if test "$perf_event" != yes; then
11550 if test "$with_intel_pt" = yes; then
11551 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
11552 else
11553 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
11554 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
11555 fi
11556 fi
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566 use_additional=yes
11567
11568 acl_save_prefix="$prefix"
11569 prefix="$acl_final_prefix"
11570 acl_save_exec_prefix="$exec_prefix"
11571 exec_prefix="$acl_final_exec_prefix"
11572
11573 eval additional_includedir=\"$includedir\"
11574 eval additional_libdir=\"$libdir\"
11575
11576 exec_prefix="$acl_save_exec_prefix"
11577 prefix="$acl_save_prefix"
11578
11579
11580 # Check whether --with-libipt-prefix was given.
11581 if test "${with_libipt_prefix+set}" = set; then :
11582 withval=$with_libipt_prefix;
11583 if test "X$withval" = "Xno"; then
11584 use_additional=no
11585 else
11586 if test "X$withval" = "X"; then
11587
11588 acl_save_prefix="$prefix"
11589 prefix="$acl_final_prefix"
11590 acl_save_exec_prefix="$exec_prefix"
11591 exec_prefix="$acl_final_exec_prefix"
11592
11593 eval additional_includedir=\"$includedir\"
11594 eval additional_libdir=\"$libdir\"
11595
11596 exec_prefix="$acl_save_exec_prefix"
11597 prefix="$acl_save_prefix"
11598
11599 else
11600 additional_includedir="$withval/include"
11601 additional_libdir="$withval/lib"
11602 fi
11603 fi
11604
11605 fi
11606
11607 LIBIPT=
11608 LTLIBIPT=
11609 INCIPT=
11610 rpathdirs=
11611 ltrpathdirs=
11612 names_already_handled=
11613 names_next_round='ipt '
11614 while test -n "$names_next_round"; do
11615 names_this_round="$names_next_round"
11616 names_next_round=
11617 for name in $names_this_round; do
11618 already_handled=
11619 for n in $names_already_handled; do
11620 if test "$n" = "$name"; then
11621 already_handled=yes
11622 break
11623 fi
11624 done
11625 if test -z "$already_handled"; then
11626 names_already_handled="$names_already_handled $name"
11627 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11628 eval value=\"\$HAVE_LIB$uppername\"
11629 if test -n "$value"; then
11630 if test "$value" = yes; then
11631 eval value=\"\$LIB$uppername\"
11632 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
11633 eval value=\"\$LTLIB$uppername\"
11634 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
11635 else
11636 :
11637 fi
11638 else
11639 found_dir=
11640 found_la=
11641 found_so=
11642 found_a=
11643 if test $use_additional = yes; then
11644 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11645 found_dir="$additional_libdir"
11646 found_so="$additional_libdir/lib$name.$shlibext"
11647 if test -f "$additional_libdir/lib$name.la"; then
11648 found_la="$additional_libdir/lib$name.la"
11649 fi
11650 else
11651 if test -f "$additional_libdir/lib$name.$libext"; then
11652 found_dir="$additional_libdir"
11653 found_a="$additional_libdir/lib$name.$libext"
11654 if test -f "$additional_libdir/lib$name.la"; then
11655 found_la="$additional_libdir/lib$name.la"
11656 fi
11657 fi
11658 fi
11659 fi
11660 if test "X$found_dir" = "X"; then
11661 for x in $LDFLAGS $LTLIBIPT; do
11662
11663 acl_save_prefix="$prefix"
11664 prefix="$acl_final_prefix"
11665 acl_save_exec_prefix="$exec_prefix"
11666 exec_prefix="$acl_final_exec_prefix"
11667 eval x=\"$x\"
11668 exec_prefix="$acl_save_exec_prefix"
11669 prefix="$acl_save_prefix"
11670
11671 case "$x" in
11672 -L*)
11673 dir=`echo "X$x" | sed -e 's/^X-L//'`
11674 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11675 found_dir="$dir"
11676 found_so="$dir/lib$name.$shlibext"
11677 if test -f "$dir/lib$name.la"; then
11678 found_la="$dir/lib$name.la"
11679 fi
11680 else
11681 if test -f "$dir/lib$name.$libext"; then
11682 found_dir="$dir"
11683 found_a="$dir/lib$name.$libext"
11684 if test -f "$dir/lib$name.la"; then
11685 found_la="$dir/lib$name.la"
11686 fi
11687 fi
11688 fi
11689 ;;
11690 esac
11691 if test "X$found_dir" != "X"; then
11692 break
11693 fi
11694 done
11695 fi
11696 if test "X$found_dir" != "X"; then
11697 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
11698 if test "X$found_so" != "X"; then
11699 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11700 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11701 else
11702 haveit=
11703 for x in $ltrpathdirs; do
11704 if test "X$x" = "X$found_dir"; then
11705 haveit=yes
11706 break
11707 fi
11708 done
11709 if test -z "$haveit"; then
11710 ltrpathdirs="$ltrpathdirs $found_dir"
11711 fi
11712 if test "$hardcode_direct" = yes; then
11713 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11714 else
11715 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11716 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11717 haveit=
11718 for x in $rpathdirs; do
11719 if test "X$x" = "X$found_dir"; then
11720 haveit=yes
11721 break
11722 fi
11723 done
11724 if test -z "$haveit"; then
11725 rpathdirs="$rpathdirs $found_dir"
11726 fi
11727 else
11728 haveit=
11729 for x in $LDFLAGS $LIBIPT; do
11730
11731 acl_save_prefix="$prefix"
11732 prefix="$acl_final_prefix"
11733 acl_save_exec_prefix="$exec_prefix"
11734 exec_prefix="$acl_final_exec_prefix"
11735 eval x=\"$x\"
11736 exec_prefix="$acl_save_exec_prefix"
11737 prefix="$acl_save_prefix"
11738
11739 if test "X$x" = "X-L$found_dir"; then
11740 haveit=yes
11741 break
11742 fi
11743 done
11744 if test -z "$haveit"; then
11745 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
11746 fi
11747 if test "$hardcode_minus_L" != no; then
11748 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
11749 else
11750 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11751 fi
11752 fi
11753 fi
11754 fi
11755 else
11756 if test "X$found_a" != "X"; then
11757 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
11758 else
11759 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
11760 fi
11761 fi
11762 additional_includedir=
11763 case "$found_dir" in
11764 */lib | */lib/)
11765 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11766 additional_includedir="$basedir/include"
11767 ;;
11768 esac
11769 if test "X$additional_includedir" != "X"; then
11770 if test "X$additional_includedir" != "X/usr/include"; then
11771 haveit=
11772 if test "X$additional_includedir" = "X/usr/local/include"; then
11773 if test -n "$GCC"; then
11774 case $host_os in
11775 linux*) haveit=yes;;
11776 esac
11777 fi
11778 fi
11779 if test -z "$haveit"; then
11780 for x in $CPPFLAGS $INCIPT; do
11781
11782 acl_save_prefix="$prefix"
11783 prefix="$acl_final_prefix"
11784 acl_save_exec_prefix="$exec_prefix"
11785 exec_prefix="$acl_final_exec_prefix"
11786 eval x=\"$x\"
11787 exec_prefix="$acl_save_exec_prefix"
11788 prefix="$acl_save_prefix"
11789
11790 if test "X$x" = "X-I$additional_includedir"; then
11791 haveit=yes
11792 break
11793 fi
11794 done
11795 if test -z "$haveit"; then
11796 if test -d "$additional_includedir"; then
11797 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
11798 fi
11799 fi
11800 fi
11801 fi
11802 fi
11803 if test -n "$found_la"; then
11804 save_libdir="$libdir"
11805 case "$found_la" in
11806 */* | *\\*) . "$found_la" ;;
11807 *) . "./$found_la" ;;
11808 esac
11809 libdir="$save_libdir"
11810 for dep in $dependency_libs; do
11811 case "$dep" in
11812 -L*)
11813 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11814 if test "X$additional_libdir" != "X/usr/lib"; then
11815 haveit=
11816 if test "X$additional_libdir" = "X/usr/local/lib"; then
11817 if test -n "$GCC"; then
11818 case $host_os in
11819 linux*) haveit=yes;;
11820 esac
11821 fi
11822 fi
11823 if test -z "$haveit"; then
11824 haveit=
11825 for x in $LDFLAGS $LIBIPT; do
11826
11827 acl_save_prefix="$prefix"
11828 prefix="$acl_final_prefix"
11829 acl_save_exec_prefix="$exec_prefix"
11830 exec_prefix="$acl_final_exec_prefix"
11831 eval x=\"$x\"
11832 exec_prefix="$acl_save_exec_prefix"
11833 prefix="$acl_save_prefix"
11834
11835 if test "X$x" = "X-L$additional_libdir"; then
11836 haveit=yes
11837 break
11838 fi
11839 done
11840 if test -z "$haveit"; then
11841 if test -d "$additional_libdir"; then
11842 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
11843 fi
11844 fi
11845 haveit=
11846 for x in $LDFLAGS $LTLIBIPT; do
11847
11848 acl_save_prefix="$prefix"
11849 prefix="$acl_final_prefix"
11850 acl_save_exec_prefix="$exec_prefix"
11851 exec_prefix="$acl_final_exec_prefix"
11852 eval x=\"$x\"
11853 exec_prefix="$acl_save_exec_prefix"
11854 prefix="$acl_save_prefix"
11855
11856 if test "X$x" = "X-L$additional_libdir"; then
11857 haveit=yes
11858 break
11859 fi
11860 done
11861 if test -z "$haveit"; then
11862 if test -d "$additional_libdir"; then
11863 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
11864 fi
11865 fi
11866 fi
11867 fi
11868 ;;
11869 -R*)
11870 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11871 if test "$enable_rpath" != no; then
11872 haveit=
11873 for x in $rpathdirs; do
11874 if test "X$x" = "X$dir"; then
11875 haveit=yes
11876 break
11877 fi
11878 done
11879 if test -z "$haveit"; then
11880 rpathdirs="$rpathdirs $dir"
11881 fi
11882 haveit=
11883 for x in $ltrpathdirs; do
11884 if test "X$x" = "X$dir"; then
11885 haveit=yes
11886 break
11887 fi
11888 done
11889 if test -z "$haveit"; then
11890 ltrpathdirs="$ltrpathdirs $dir"
11891 fi
11892 fi
11893 ;;
11894 -l*)
11895 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11896 ;;
11897 *.la)
11898 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11899 ;;
11900 *)
11901 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
11902 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
11903 ;;
11904 esac
11905 done
11906 fi
11907 else
11908 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
11909 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
11910 fi
11911 fi
11912 fi
11913 done
11914 done
11915 if test "X$rpathdirs" != "X"; then
11916 if test -n "$hardcode_libdir_separator"; then
11917 alldirs=
11918 for found_dir in $rpathdirs; do
11919 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11920 done
11921 acl_save_libdir="$libdir"
11922 libdir="$alldirs"
11923 eval flag=\"$hardcode_libdir_flag_spec\"
11924 libdir="$acl_save_libdir"
11925 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11926 else
11927 for found_dir in $rpathdirs; do
11928 acl_save_libdir="$libdir"
11929 libdir="$found_dir"
11930 eval flag=\"$hardcode_libdir_flag_spec\"
11931 libdir="$acl_save_libdir"
11932 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
11933 done
11934 fi
11935 fi
11936 if test "X$ltrpathdirs" != "X"; then
11937 for found_dir in $ltrpathdirs; do
11938 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
11939 done
11940 fi
11941
11942
11943 ac_save_CPPFLAGS="$CPPFLAGS"
11944
11945 for element in $INCIPT; do
11946 haveit=
11947 for x in $CPPFLAGS; do
11948
11949 acl_save_prefix="$prefix"
11950 prefix="$acl_final_prefix"
11951 acl_save_exec_prefix="$exec_prefix"
11952 exec_prefix="$acl_final_exec_prefix"
11953 eval x=\"$x\"
11954 exec_prefix="$acl_save_exec_prefix"
11955 prefix="$acl_save_prefix"
11956
11957 if test "X$x" = "X$element"; then
11958 haveit=yes
11959 break
11960 fi
11961 done
11962 if test -z "$haveit"; then
11963 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11964 fi
11965 done
11966
11967
11968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
11969 $as_echo_n "checking for libipt... " >&6; }
11970 if ${ac_cv_libipt+:} false; then :
11971 $as_echo_n "(cached) " >&6
11972 else
11973
11974 ac_save_LIBS="$LIBS"
11975 LIBS="$LIBS $LIBIPT"
11976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11977 /* end confdefs.h. */
11978 #include "intel-pt.h"
11979 int
11980 main ()
11981 {
11982 pt_insn_alloc_decoder (0);
11983 ;
11984 return 0;
11985 }
11986 _ACEOF
11987 if ac_fn_c_try_link "$LINENO"; then :
11988 ac_cv_libipt=yes
11989 else
11990 ac_cv_libipt=no
11991 fi
11992 rm -f core conftest.err conftest.$ac_objext \
11993 conftest$ac_exeext conftest.$ac_ext
11994 LIBS="$ac_save_LIBS"
11995
11996 fi
11997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
11998 $as_echo "$ac_cv_libipt" >&6; }
11999 if test "$ac_cv_libipt" = yes; then
12000 HAVE_LIBIPT=yes
12001
12002 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
12003
12004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
12005 $as_echo_n "checking how to link with libipt... " >&6; }
12006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
12007 $as_echo "$LIBIPT" >&6; }
12008 else
12009 HAVE_LIBIPT=no
12010 CPPFLAGS="$ac_save_CPPFLAGS"
12011 LIBIPT=
12012 LTLIBIPT=
12013 fi
12014
12015
12016
12017
12018
12019
12020 if test "$HAVE_LIBIPT" != yes; then
12021 if test "$with_intel_pt" = yes; then
12022 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
12023 else
12024 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
12025 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
12026 fi
12027 else
12028 save_LIBS=$LIBS
12029 LIBS="$LIBS $LIBIPT"
12030 for ac_func in pt_insn_event
12031 do :
12032 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
12033 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
12034 cat >>confdefs.h <<_ACEOF
12035 #define HAVE_PT_INSN_EVENT 1
12036 _ACEOF
12037
12038 fi
12039 done
12040
12041 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
12042 "
12043 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
12044
12045 cat >>confdefs.h <<_ACEOF
12046 #define HAVE_STRUCT_PT_INSN_ENABLED 1
12047 _ACEOF
12048
12049
12050 fi
12051 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
12052 "
12053 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
12054
12055 cat >>confdefs.h <<_ACEOF
12056 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
12057 _ACEOF
12058
12059
12060 fi
12061
12062 LIBS=$save_LIBS
12063 fi
12064 fi
12065
12066 # ------------------------- #
12067 # Checks for header files. #
12068 # ------------------------- #
12069
12070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12071 $as_echo_n "checking for ANSI C header files... " >&6; }
12072 if ${ac_cv_header_stdc+:} false; then :
12073 $as_echo_n "(cached) " >&6
12074 else
12075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12076 /* end confdefs.h. */
12077 #include <stdlib.h>
12078 #include <stdarg.h>
12079 #include <string.h>
12080 #include <float.h>
12081
12082 int
12083 main ()
12084 {
12085
12086 ;
12087 return 0;
12088 }
12089 _ACEOF
12090 if ac_fn_c_try_compile "$LINENO"; then :
12091 ac_cv_header_stdc=yes
12092 else
12093 ac_cv_header_stdc=no
12094 fi
12095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12096
12097 if test $ac_cv_header_stdc = yes; then
12098 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12100 /* end confdefs.h. */
12101 #include <string.h>
12102
12103 _ACEOF
12104 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12105 $EGREP "memchr" >/dev/null 2>&1; then :
12106
12107 else
12108 ac_cv_header_stdc=no
12109 fi
12110 rm -f conftest*
12111
12112 fi
12113
12114 if test $ac_cv_header_stdc = yes; then
12115 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12117 /* end confdefs.h. */
12118 #include <stdlib.h>
12119
12120 _ACEOF
12121 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12122 $EGREP "free" >/dev/null 2>&1; then :
12123
12124 else
12125 ac_cv_header_stdc=no
12126 fi
12127 rm -f conftest*
12128
12129 fi
12130
12131 if test $ac_cv_header_stdc = yes; then
12132 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12133 if test "$cross_compiling" = yes; then :
12134 :
12135 else
12136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12137 /* end confdefs.h. */
12138 #include <ctype.h>
12139 #include <stdlib.h>
12140 #if ((' ' & 0x0FF) == 0x020)
12141 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12142 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12143 #else
12144 # define ISLOWER(c) \
12145 (('a' <= (c) && (c) <= 'i') \
12146 || ('j' <= (c) && (c) <= 'r') \
12147 || ('s' <= (c) && (c) <= 'z'))
12148 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12149 #endif
12150
12151 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12152 int
12153 main ()
12154 {
12155 int i;
12156 for (i = 0; i < 256; i++)
12157 if (XOR (islower (i), ISLOWER (i))
12158 || toupper (i) != TOUPPER (i))
12159 return 2;
12160 return 0;
12161 }
12162 _ACEOF
12163 if ac_fn_c_try_run "$LINENO"; then :
12164
12165 else
12166 ac_cv_header_stdc=no
12167 fi
12168 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12169 conftest.$ac_objext conftest.beam conftest.$ac_ext
12170 fi
12171
12172 fi
12173 fi
12174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12175 $as_echo "$ac_cv_header_stdc" >&6; }
12176 if test $ac_cv_header_stdc = yes; then
12177
12178 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12179
12180 fi
12181
12182 # elf_hp.h is for HP/UX 64-bit shared library support.
12183 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
12184 thread_db.h \
12185 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12186 sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
12187 sys/reg.h sys/debugreg.h sys/select.h \
12188 termios.h elf_hp.h \
12189 dlfcn.h
12190 do :
12191 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12192 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12193 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12194 cat >>confdefs.h <<_ACEOF
12195 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12196 _ACEOF
12197
12198 fi
12199
12200 done
12201
12202 for ac_header in sys/user.h
12203 do :
12204 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12205 # include <sys/param.h>
12206 #endif
12207
12208 "
12209 if test "x$ac_cv_header_sys_user_h" = xyes; then :
12210 cat >>confdefs.h <<_ACEOF
12211 #define HAVE_SYS_USER_H 1
12212 _ACEOF
12213
12214 fi
12215
12216 done
12217
12218
12219 for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
12220 do :
12221 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12222 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12223 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12224 cat >>confdefs.h <<_ACEOF
12225 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12226 _ACEOF
12227
12228 fi
12229
12230 done
12231
12232 for ac_header in term.h
12233 do :
12234 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12235 # include <curses.h>
12236 #endif
12237
12238 "
12239 if test "x$ac_cv_header_term_h" = xyes; then :
12240 cat >>confdefs.h <<_ACEOF
12241 #define HAVE_TERM_H 1
12242 _ACEOF
12243
12244 fi
12245
12246 done
12247
12248
12249 # ------------------------- #
12250 # Checks for declarations. #
12251 # ------------------------- #
12252
12253
12254 # Check for presence and size of long long.
12255 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
12256 if test "x$ac_cv_type_long_long" = xyes; then :
12257
12258 cat >>confdefs.h <<_ACEOF
12259 #define HAVE_LONG_LONG 1
12260 _ACEOF
12261
12262 # The cast to long int works around a bug in the HP C Compiler
12263 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12264 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12265 # This bug is HP SR number 8606223364.
12266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12267 $as_echo_n "checking size of long long... " >&6; }
12268 if ${ac_cv_sizeof_long_long+:} false; then :
12269 $as_echo_n "(cached) " >&6
12270 else
12271 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12272
12273 else
12274 if test "$ac_cv_type_long_long" = yes; then
12275 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12276 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12277 as_fn_error 77 "cannot compute sizeof (long long)
12278 See \`config.log' for more details" "$LINENO" 5; }
12279 else
12280 ac_cv_sizeof_long_long=0
12281 fi
12282 fi
12283
12284 fi
12285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12286 $as_echo "$ac_cv_sizeof_long_long" >&6; }
12287
12288
12289
12290 cat >>confdefs.h <<_ACEOF
12291 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12292 _ACEOF
12293
12294
12295 fi
12296
12297
12298 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12299 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12300 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
12301 ac_have_decl=1
12302 else
12303 ac_have_decl=0
12304 fi
12305
12306 cat >>confdefs.h <<_ACEOF
12307 #define HAVE_DECL_BASENAME $ac_have_decl
12308 _ACEOF
12309 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
12310 if test "x$ac_cv_have_decl_ffs" = xyes; then :
12311 ac_have_decl=1
12312 else
12313 ac_have_decl=0
12314 fi
12315
12316 cat >>confdefs.h <<_ACEOF
12317 #define HAVE_DECL_FFS $ac_have_decl
12318 _ACEOF
12319 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
12320 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
12321 ac_have_decl=1
12322 else
12323 ac_have_decl=0
12324 fi
12325
12326 cat >>confdefs.h <<_ACEOF
12327 #define HAVE_DECL_ASPRINTF $ac_have_decl
12328 _ACEOF
12329 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
12330 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
12331 ac_have_decl=1
12332 else
12333 ac_have_decl=0
12334 fi
12335
12336 cat >>confdefs.h <<_ACEOF
12337 #define HAVE_DECL_VASPRINTF $ac_have_decl
12338 _ACEOF
12339 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12340 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12341 ac_have_decl=1
12342 else
12343 ac_have_decl=0
12344 fi
12345
12346 cat >>confdefs.h <<_ACEOF
12347 #define HAVE_DECL_SNPRINTF $ac_have_decl
12348 _ACEOF
12349 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12350 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
12351 ac_have_decl=1
12352 else
12353 ac_have_decl=0
12354 fi
12355
12356 cat >>confdefs.h <<_ACEOF
12357 #define HAVE_DECL_VSNPRINTF $ac_have_decl
12358 _ACEOF
12359
12360 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
12361 if test "x$ac_cv_have_decl_strtol" = xyes; then :
12362 ac_have_decl=1
12363 else
12364 ac_have_decl=0
12365 fi
12366
12367 cat >>confdefs.h <<_ACEOF
12368 #define HAVE_DECL_STRTOL $ac_have_decl
12369 _ACEOF
12370 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
12371 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
12372 ac_have_decl=1
12373 else
12374 ac_have_decl=0
12375 fi
12376
12377 cat >>confdefs.h <<_ACEOF
12378 #define HAVE_DECL_STRTOUL $ac_have_decl
12379 _ACEOF
12380 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
12381 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
12382 ac_have_decl=1
12383 else
12384 ac_have_decl=0
12385 fi
12386
12387 cat >>confdefs.h <<_ACEOF
12388 #define HAVE_DECL_STRTOLL $ac_have_decl
12389 _ACEOF
12390 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
12391 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
12392 ac_have_decl=1
12393 else
12394 ac_have_decl=0
12395 fi
12396
12397 cat >>confdefs.h <<_ACEOF
12398 #define HAVE_DECL_STRTOULL $ac_have_decl
12399 _ACEOF
12400
12401 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12402 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
12403 ac_have_decl=1
12404 else
12405 ac_have_decl=0
12406 fi
12407
12408 cat >>confdefs.h <<_ACEOF
12409 #define HAVE_DECL_STRVERSCMP $ac_have_decl
12410 _ACEOF
12411
12412
12413
12414 ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
12415 if test "x$ac_cv_have_decl_free" = xyes; then :
12416 ac_have_decl=1
12417 else
12418 ac_have_decl=0
12419 fi
12420
12421 cat >>confdefs.h <<_ACEOF
12422 #define HAVE_DECL_FREE $ac_have_decl
12423 _ACEOF
12424 ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
12425 if test "x$ac_cv_have_decl_malloc" = xyes; then :
12426 ac_have_decl=1
12427 else
12428 ac_have_decl=0
12429 fi
12430
12431 cat >>confdefs.h <<_ACEOF
12432 #define HAVE_DECL_MALLOC $ac_have_decl
12433 _ACEOF
12434 ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
12435 if test "x$ac_cv_have_decl_realloc" = xyes; then :
12436 ac_have_decl=1
12437 else
12438 ac_have_decl=0
12439 fi
12440
12441 cat >>confdefs.h <<_ACEOF
12442 #define HAVE_DECL_REALLOC $ac_have_decl
12443 _ACEOF
12444 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12445 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12446 ac_have_decl=1
12447 else
12448 ac_have_decl=0
12449 fi
12450
12451 cat >>confdefs.h <<_ACEOF
12452 #define HAVE_DECL_SNPRINTF $ac_have_decl
12453 _ACEOF
12454
12455
12456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12457 $as_echo_n "checking for LC_MESSAGES... " >&6; }
12458 if ${am_cv_val_LC_MESSAGES+:} false; then :
12459 $as_echo_n "(cached) " >&6
12460 else
12461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12462 /* end confdefs.h. */
12463 #include <locale.h>
12464 int
12465 main ()
12466 {
12467 return LC_MESSAGES
12468 ;
12469 return 0;
12470 }
12471 _ACEOF
12472 if ac_fn_c_try_link "$LINENO"; then :
12473 am_cv_val_LC_MESSAGES=yes
12474 else
12475 am_cv_val_LC_MESSAGES=no
12476 fi
12477 rm -f core conftest.err conftest.$ac_objext \
12478 conftest$ac_exeext conftest.$ac_ext
12479 fi
12480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12481 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12482 if test $am_cv_val_LC_MESSAGES = yes; then
12483
12484 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12485
12486 fi
12487
12488
12489 # ----------------------- #
12490 # Checks for structures. #
12491 # ----------------------- #
12492
12493 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
12494 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
12495
12496 cat >>confdefs.h <<_ACEOF
12497 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
12498 _ACEOF
12499
12500
12501 fi
12502 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
12503 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
12504
12505 cat >>confdefs.h <<_ACEOF
12506 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12507 _ACEOF
12508
12509
12510 fi
12511
12512
12513 # ------------------ #
12514 # Checks for types. #
12515 # ------------------ #
12516
12517 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
12518 #include <sys/socket.h>
12519
12520 "
12521 if test "x$ac_cv_type_socklen_t" = xyes; then :
12522
12523 cat >>confdefs.h <<_ACEOF
12524 #define HAVE_SOCKLEN_T 1
12525 _ACEOF
12526
12527
12528 fi
12529
12530
12531 # ------------------------------------- #
12532 # Checks for compiler characteristics. #
12533 # ------------------------------------- #
12534
12535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12536 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12537 if ${ac_cv_c_const+:} false; then :
12538 $as_echo_n "(cached) " >&6
12539 else
12540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12541 /* end confdefs.h. */
12542
12543 int
12544 main ()
12545 {
12546
12547 #ifndef __cplusplus
12548 /* Ultrix mips cc rejects this sort of thing. */
12549 typedef int charset[2];
12550 const charset cs = { 0, 0 };
12551 /* SunOS 4.1.1 cc rejects this. */
12552 char const *const *pcpcc;
12553 char **ppc;
12554 /* NEC SVR4.0.2 mips cc rejects this. */
12555 struct point {int x, y;};
12556 static struct point const zero = {0,0};
12557 /* AIX XL C 1.02.0.0 rejects this.
12558 It does not let you subtract one const X* pointer from another in
12559 an arm of an if-expression whose if-part is not a constant
12560 expression */
12561 const char *g = "string";
12562 pcpcc = &g + (g ? g-g : 0);
12563 /* HPUX 7.0 cc rejects these. */
12564 ++pcpcc;
12565 ppc = (char**) pcpcc;
12566 pcpcc = (char const *const *) ppc;
12567 { /* SCO 3.2v4 cc rejects this sort of thing. */
12568 char tx;
12569 char *t = &tx;
12570 char const *s = 0 ? (char *) 0 : (char const *) 0;
12571
12572 *t++ = 0;
12573 if (s) return 0;
12574 }
12575 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12576 int x[] = {25, 17};
12577 const int *foo = &x[0];
12578 ++foo;
12579 }
12580 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12581 typedef const int *iptr;
12582 iptr p = 0;
12583 ++p;
12584 }
12585 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12586 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12587 struct s { int j; const int *ap[3]; } bx;
12588 struct s *b = &bx; b->j = 5;
12589 }
12590 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12591 const int foo = 10;
12592 if (!foo) return 0;
12593 }
12594 return !cs[0] && !zero.x;
12595 #endif
12596
12597 ;
12598 return 0;
12599 }
12600 _ACEOF
12601 if ac_fn_c_try_compile "$LINENO"; then :
12602 ac_cv_c_const=yes
12603 else
12604 ac_cv_c_const=no
12605 fi
12606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12607 fi
12608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12609 $as_echo "$ac_cv_c_const" >&6; }
12610 if test $ac_cv_c_const = no; then
12611
12612 $as_echo "#define const /**/" >>confdefs.h
12613
12614 fi
12615
12616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12617 $as_echo_n "checking for inline... " >&6; }
12618 if ${ac_cv_c_inline+:} false; then :
12619 $as_echo_n "(cached) " >&6
12620 else
12621 ac_cv_c_inline=no
12622 for ac_kw in inline __inline__ __inline; do
12623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12624 /* end confdefs.h. */
12625 #ifndef __cplusplus
12626 typedef int foo_t;
12627 static $ac_kw foo_t static_foo () {return 0; }
12628 $ac_kw foo_t foo () {return 0; }
12629 #endif
12630
12631 _ACEOF
12632 if ac_fn_c_try_compile "$LINENO"; then :
12633 ac_cv_c_inline=$ac_kw
12634 fi
12635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12636 test "$ac_cv_c_inline" != no && break
12637 done
12638
12639 fi
12640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12641 $as_echo "$ac_cv_c_inline" >&6; }
12642
12643 case $ac_cv_c_inline in
12644 inline | yes) ;;
12645 *)
12646 case $ac_cv_c_inline in
12647 no) ac_val=;;
12648 *) ac_val=$ac_cv_c_inline;;
12649 esac
12650 cat >>confdefs.h <<_ACEOF
12651 #ifndef __cplusplus
12652 #define inline $ac_val
12653 #endif
12654 _ACEOF
12655 ;;
12656 esac
12657
12658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12659 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12660 if ${ac_cv_c_bigendian+:} false; then :
12661 $as_echo_n "(cached) " >&6
12662 else
12663 ac_cv_c_bigendian=unknown
12664 # See if we're dealing with a universal compiler.
12665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12666 /* end confdefs.h. */
12667 #ifndef __APPLE_CC__
12668 not a universal capable compiler
12669 #endif
12670 typedef int dummy;
12671
12672 _ACEOF
12673 if ac_fn_c_try_compile "$LINENO"; then :
12674
12675 # Check for potential -arch flags. It is not universal unless
12676 # there are at least two -arch flags with different values.
12677 ac_arch=
12678 ac_prev=
12679 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12680 if test -n "$ac_prev"; then
12681 case $ac_word in
12682 i?86 | x86_64 | ppc | ppc64)
12683 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12684 ac_arch=$ac_word
12685 else
12686 ac_cv_c_bigendian=universal
12687 break
12688 fi
12689 ;;
12690 esac
12691 ac_prev=
12692 elif test "x$ac_word" = "x-arch"; then
12693 ac_prev=arch
12694 fi
12695 done
12696 fi
12697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12698 if test $ac_cv_c_bigendian = unknown; then
12699 # See if sys/param.h defines the BYTE_ORDER macro.
12700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12701 /* end confdefs.h. */
12702 #include <sys/types.h>
12703 #include <sys/param.h>
12704
12705 int
12706 main ()
12707 {
12708 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12709 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12710 && LITTLE_ENDIAN)
12711 bogus endian macros
12712 #endif
12713
12714 ;
12715 return 0;
12716 }
12717 _ACEOF
12718 if ac_fn_c_try_compile "$LINENO"; then :
12719 # It does; now see whether it defined to BIG_ENDIAN or not.
12720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12721 /* end confdefs.h. */
12722 #include <sys/types.h>
12723 #include <sys/param.h>
12724
12725 int
12726 main ()
12727 {
12728 #if BYTE_ORDER != BIG_ENDIAN
12729 not big endian
12730 #endif
12731
12732 ;
12733 return 0;
12734 }
12735 _ACEOF
12736 if ac_fn_c_try_compile "$LINENO"; then :
12737 ac_cv_c_bigendian=yes
12738 else
12739 ac_cv_c_bigendian=no
12740 fi
12741 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12742 fi
12743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12744 fi
12745 if test $ac_cv_c_bigendian = unknown; then
12746 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12748 /* end confdefs.h. */
12749 #include <limits.h>
12750
12751 int
12752 main ()
12753 {
12754 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12755 bogus endian macros
12756 #endif
12757
12758 ;
12759 return 0;
12760 }
12761 _ACEOF
12762 if ac_fn_c_try_compile "$LINENO"; then :
12763 # It does; now see whether it defined to _BIG_ENDIAN or not.
12764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12765 /* end confdefs.h. */
12766 #include <limits.h>
12767
12768 int
12769 main ()
12770 {
12771 #ifndef _BIG_ENDIAN
12772 not big endian
12773 #endif
12774
12775 ;
12776 return 0;
12777 }
12778 _ACEOF
12779 if ac_fn_c_try_compile "$LINENO"; then :
12780 ac_cv_c_bigendian=yes
12781 else
12782 ac_cv_c_bigendian=no
12783 fi
12784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12785 fi
12786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12787 fi
12788 if test $ac_cv_c_bigendian = unknown; then
12789 # Compile a test program.
12790 if test "$cross_compiling" = yes; then :
12791 # Try to guess by grepping values from an object file.
12792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12793 /* end confdefs.h. */
12794 short int ascii_mm[] =
12795 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12796 short int ascii_ii[] =
12797 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12798 int use_ascii (int i) {
12799 return ascii_mm[i] + ascii_ii[i];
12800 }
12801 short int ebcdic_ii[] =
12802 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12803 short int ebcdic_mm[] =
12804 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12805 int use_ebcdic (int i) {
12806 return ebcdic_mm[i] + ebcdic_ii[i];
12807 }
12808 extern int foo;
12809
12810 int
12811 main ()
12812 {
12813 return use_ascii (foo) == use_ebcdic (foo);
12814 ;
12815 return 0;
12816 }
12817 _ACEOF
12818 if ac_fn_c_try_compile "$LINENO"; then :
12819 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12820 ac_cv_c_bigendian=yes
12821 fi
12822 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12823 if test "$ac_cv_c_bigendian" = unknown; then
12824 ac_cv_c_bigendian=no
12825 else
12826 # finding both strings is unlikely to happen, but who knows?
12827 ac_cv_c_bigendian=unknown
12828 fi
12829 fi
12830 fi
12831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12832 else
12833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12834 /* end confdefs.h. */
12835 $ac_includes_default
12836 int
12837 main ()
12838 {
12839
12840 /* Are we little or big endian? From Harbison&Steele. */
12841 union
12842 {
12843 long int l;
12844 char c[sizeof (long int)];
12845 } u;
12846 u.l = 1;
12847 return u.c[sizeof (long int) - 1] == 1;
12848
12849 ;
12850 return 0;
12851 }
12852 _ACEOF
12853 if ac_fn_c_try_run "$LINENO"; then :
12854 ac_cv_c_bigendian=no
12855 else
12856 ac_cv_c_bigendian=yes
12857 fi
12858 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12859 conftest.$ac_objext conftest.beam conftest.$ac_ext
12860 fi
12861
12862 fi
12863 fi
12864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12865 $as_echo "$ac_cv_c_bigendian" >&6; }
12866 case $ac_cv_c_bigendian in #(
12867 yes)
12868 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12869 ;; #(
12870 no)
12871 ;; #(
12872 universal)
12873
12874 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12875
12876 ;; #(
12877 *)
12878 as_fn_error $? "unknown endianness
12879 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12880 esac
12881
12882
12883 # ------------------------------ #
12884 # Checks for library functions. #
12885 # ------------------------------ #
12886
12887
12888
12889
12890 for ac_header in $ac_header_list
12891 do :
12892 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12893 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12894 "
12895 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12896 cat >>confdefs.h <<_ACEOF
12897 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12898 _ACEOF
12899
12900 fi
12901
12902 done
12903
12904
12905
12906
12907
12908
12909
12910
12911 for ac_func in getpagesize
12912 do :
12913 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12914 if test "x$ac_cv_func_getpagesize" = xyes; then :
12915 cat >>confdefs.h <<_ACEOF
12916 #define HAVE_GETPAGESIZE 1
12917 _ACEOF
12918
12919 fi
12920 done
12921
12922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12923 $as_echo_n "checking for working mmap... " >&6; }
12924 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
12925 $as_echo_n "(cached) " >&6
12926 else
12927 if test "$cross_compiling" = yes; then :
12928 ac_cv_func_mmap_fixed_mapped=no
12929 else
12930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12931 /* end confdefs.h. */
12932 $ac_includes_default
12933 /* malloc might have been renamed as rpl_malloc. */
12934 #undef malloc
12935
12936 /* Thanks to Mike Haertel and Jim Avera for this test.
12937 Here is a matrix of mmap possibilities:
12938 mmap private not fixed
12939 mmap private fixed at somewhere currently unmapped
12940 mmap private fixed at somewhere already mapped
12941 mmap shared not fixed
12942 mmap shared fixed at somewhere currently unmapped
12943 mmap shared fixed at somewhere already mapped
12944 For private mappings, we should verify that changes cannot be read()
12945 back from the file, nor mmap's back from the file at a different
12946 address. (There have been systems where private was not correctly
12947 implemented like the infamous i386 svr4.0, and systems where the
12948 VM page cache was not coherent with the file system buffer cache
12949 like early versions of FreeBSD and possibly contemporary NetBSD.)
12950 For shared mappings, we should conversely verify that changes get
12951 propagated back to all the places they're supposed to be.
12952
12953 Grep wants private fixed already mapped.
12954 The main things grep needs to know about mmap are:
12955 * does it exist and is it safe to write into the mmap'd area
12956 * how to use it (BSD variants) */
12957
12958 #include <fcntl.h>
12959 #include <sys/mman.h>
12960
12961 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
12962 char *malloc ();
12963 #endif
12964
12965 /* This mess was copied from the GNU getpagesize.h. */
12966 #ifndef HAVE_GETPAGESIZE
12967 # ifdef _SC_PAGESIZE
12968 # define getpagesize() sysconf(_SC_PAGESIZE)
12969 # else /* no _SC_PAGESIZE */
12970 # ifdef HAVE_SYS_PARAM_H
12971 # include <sys/param.h>
12972 # ifdef EXEC_PAGESIZE
12973 # define getpagesize() EXEC_PAGESIZE
12974 # else /* no EXEC_PAGESIZE */
12975 # ifdef NBPG
12976 # define getpagesize() NBPG * CLSIZE
12977 # ifndef CLSIZE
12978 # define CLSIZE 1
12979 # endif /* no CLSIZE */
12980 # else /* no NBPG */
12981 # ifdef NBPC
12982 # define getpagesize() NBPC
12983 # else /* no NBPC */
12984 # ifdef PAGESIZE
12985 # define getpagesize() PAGESIZE
12986 # endif /* PAGESIZE */
12987 # endif /* no NBPC */
12988 # endif /* no NBPG */
12989 # endif /* no EXEC_PAGESIZE */
12990 # else /* no HAVE_SYS_PARAM_H */
12991 # define getpagesize() 8192 /* punt totally */
12992 # endif /* no HAVE_SYS_PARAM_H */
12993 # endif /* no _SC_PAGESIZE */
12994
12995 #endif /* no HAVE_GETPAGESIZE */
12996
12997 int
12998 main ()
12999 {
13000 char *data, *data2, *data3;
13001 const char *cdata2;
13002 int i, pagesize;
13003 int fd, fd2;
13004
13005 pagesize = getpagesize ();
13006
13007 /* First, make a file with some known garbage in it. */
13008 data = (char *) malloc (pagesize);
13009 if (!data)
13010 return 1;
13011 for (i = 0; i < pagesize; ++i)
13012 *(data + i) = rand ();
13013 umask (0);
13014 fd = creat ("conftest.mmap", 0600);
13015 if (fd < 0)
13016 return 2;
13017 if (write (fd, data, pagesize) != pagesize)
13018 return 3;
13019 close (fd);
13020
13021 /* Next, check that the tail of a page is zero-filled. File must have
13022 non-zero length, otherwise we risk SIGBUS for entire page. */
13023 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13024 if (fd2 < 0)
13025 return 4;
13026 cdata2 = "";
13027 if (write (fd2, cdata2, 1) != 1)
13028 return 5;
13029 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13030 if (data2 == MAP_FAILED)
13031 return 6;
13032 for (i = 0; i < pagesize; ++i)
13033 if (*(data2 + i))
13034 return 7;
13035 close (fd2);
13036 if (munmap (data2, pagesize))
13037 return 8;
13038
13039 /* Next, try to mmap the file at a fixed address which already has
13040 something else allocated at it. If we can, also make sure that
13041 we see the same garbage. */
13042 fd = open ("conftest.mmap", O_RDWR);
13043 if (fd < 0)
13044 return 9;
13045 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13046 MAP_PRIVATE | MAP_FIXED, fd, 0L))
13047 return 10;
13048 for (i = 0; i < pagesize; ++i)
13049 if (*(data + i) != *(data2 + i))
13050 return 11;
13051
13052 /* Finally, make sure that changes to the mapped area do not
13053 percolate back to the file as seen by read(). (This is a bug on
13054 some variants of i386 svr4.0.) */
13055 for (i = 0; i < pagesize; ++i)
13056 *(data2 + i) = *(data2 + i) + 1;
13057 data3 = (char *) malloc (pagesize);
13058 if (!data3)
13059 return 12;
13060 if (read (fd, data3, pagesize) != pagesize)
13061 return 13;
13062 for (i = 0; i < pagesize; ++i)
13063 if (*(data + i) != *(data3 + i))
13064 return 14;
13065 close (fd);
13066 return 0;
13067 }
13068 _ACEOF
13069 if ac_fn_c_try_run "$LINENO"; then :
13070 ac_cv_func_mmap_fixed_mapped=yes
13071 else
13072 ac_cv_func_mmap_fixed_mapped=no
13073 fi
13074 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13075 conftest.$ac_objext conftest.beam conftest.$ac_ext
13076 fi
13077
13078 fi
13079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13080 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
13081 if test $ac_cv_func_mmap_fixed_mapped = yes; then
13082
13083 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
13084
13085 fi
13086 rm -f conftest.mmap conftest.txt
13087
13088 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
13089 if test "x$ac_cv_type_pid_t" = xyes; then :
13090
13091 else
13092
13093 cat >>confdefs.h <<_ACEOF
13094 #define pid_t int
13095 _ACEOF
13096
13097 fi
13098
13099 for ac_header in vfork.h
13100 do :
13101 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13102 if test "x$ac_cv_header_vfork_h" = xyes; then :
13103 cat >>confdefs.h <<_ACEOF
13104 #define HAVE_VFORK_H 1
13105 _ACEOF
13106
13107 fi
13108
13109 done
13110
13111 for ac_func in fork vfork
13112 do :
13113 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13114 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13115 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13116 cat >>confdefs.h <<_ACEOF
13117 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13118 _ACEOF
13119
13120 fi
13121 done
13122
13123 if test "x$ac_cv_func_fork" = xyes; then
13124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13125 $as_echo_n "checking for working fork... " >&6; }
13126 if ${ac_cv_func_fork_works+:} false; then :
13127 $as_echo_n "(cached) " >&6
13128 else
13129 if test "$cross_compiling" = yes; then :
13130 ac_cv_func_fork_works=cross
13131 else
13132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13133 /* end confdefs.h. */
13134 $ac_includes_default
13135 int
13136 main ()
13137 {
13138
13139 /* By Ruediger Kuhlmann. */
13140 return fork () < 0;
13141
13142 ;
13143 return 0;
13144 }
13145 _ACEOF
13146 if ac_fn_c_try_run "$LINENO"; then :
13147 ac_cv_func_fork_works=yes
13148 else
13149 ac_cv_func_fork_works=no
13150 fi
13151 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13152 conftest.$ac_objext conftest.beam conftest.$ac_ext
13153 fi
13154
13155 fi
13156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13157 $as_echo "$ac_cv_func_fork_works" >&6; }
13158
13159 else
13160 ac_cv_func_fork_works=$ac_cv_func_fork
13161 fi
13162 if test "x$ac_cv_func_fork_works" = xcross; then
13163 case $host in
13164 *-*-amigaos* | *-*-msdosdjgpp*)
13165 # Override, as these systems have only a dummy fork() stub
13166 ac_cv_func_fork_works=no
13167 ;;
13168 *)
13169 ac_cv_func_fork_works=yes
13170 ;;
13171 esac
13172 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13173 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
13174 fi
13175 ac_cv_func_vfork_works=$ac_cv_func_vfork
13176 if test "x$ac_cv_func_vfork" = xyes; then
13177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13178 $as_echo_n "checking for working vfork... " >&6; }
13179 if ${ac_cv_func_vfork_works+:} false; then :
13180 $as_echo_n "(cached) " >&6
13181 else
13182 if test "$cross_compiling" = yes; then :
13183 ac_cv_func_vfork_works=cross
13184 else
13185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13186 /* end confdefs.h. */
13187 /* Thanks to Paul Eggert for this test. */
13188 $ac_includes_default
13189 #include <sys/wait.h>
13190 #ifdef HAVE_VFORK_H
13191 # include <vfork.h>
13192 #endif
13193 /* On some sparc systems, changes by the child to local and incoming
13194 argument registers are propagated back to the parent. The compiler
13195 is told about this with #include <vfork.h>, but some compilers
13196 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13197 static variable whose address is put into a register that is
13198 clobbered by the vfork. */
13199 static void
13200 #ifdef __cplusplus
13201 sparc_address_test (int arg)
13202 # else
13203 sparc_address_test (arg) int arg;
13204 #endif
13205 {
13206 static pid_t child;
13207 if (!child) {
13208 child = vfork ();
13209 if (child < 0) {
13210 perror ("vfork");
13211 _exit(2);
13212 }
13213 if (!child) {
13214 arg = getpid();
13215 write(-1, "", 0);
13216 _exit (arg);
13217 }
13218 }
13219 }
13220
13221 int
13222 main ()
13223 {
13224 pid_t parent = getpid ();
13225 pid_t child;
13226
13227 sparc_address_test (0);
13228
13229 child = vfork ();
13230
13231 if (child == 0) {
13232 /* Here is another test for sparc vfork register problems. This
13233 test uses lots of local variables, at least as many local
13234 variables as main has allocated so far including compiler
13235 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13236 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13237 reuse the register of parent for one of the local variables,
13238 since it will think that parent can't possibly be used any more
13239 in this routine. Assigning to the local variable will thus
13240 munge parent in the parent process. */
13241 pid_t
13242 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13243 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13244 /* Convince the compiler that p..p7 are live; otherwise, it might
13245 use the same hardware register for all 8 local variables. */
13246 if (p != p1 || p != p2 || p != p3 || p != p4
13247 || p != p5 || p != p6 || p != p7)
13248 _exit(1);
13249
13250 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13251 from child file descriptors. If the child closes a descriptor
13252 before it execs or exits, this munges the parent's descriptor
13253 as well. Test for this by closing stdout in the child. */
13254 _exit(close(fileno(stdout)) != 0);
13255 } else {
13256 int status;
13257 struct stat st;
13258
13259 while (wait(&status) != child)
13260 ;
13261 return (
13262 /* Was there some problem with vforking? */
13263 child < 0
13264
13265 /* Did the child fail? (This shouldn't happen.) */
13266 || status
13267
13268 /* Did the vfork/compiler bug occur? */
13269 || parent != getpid()
13270
13271 /* Did the file descriptor bug occur? */
13272 || fstat(fileno(stdout), &st) != 0
13273 );
13274 }
13275 }
13276 _ACEOF
13277 if ac_fn_c_try_run "$LINENO"; then :
13278 ac_cv_func_vfork_works=yes
13279 else
13280 ac_cv_func_vfork_works=no
13281 fi
13282 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13283 conftest.$ac_objext conftest.beam conftest.$ac_ext
13284 fi
13285
13286 fi
13287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13288 $as_echo "$ac_cv_func_vfork_works" >&6; }
13289
13290 fi;
13291 if test "x$ac_cv_func_fork_works" = xcross; then
13292 ac_cv_func_vfork_works=$ac_cv_func_vfork
13293 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13294 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13295 fi
13296
13297 if test "x$ac_cv_func_vfork_works" = xyes; then
13298
13299 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13300
13301 else
13302
13303 $as_echo "#define vfork fork" >>confdefs.h
13304
13305 fi
13306 if test "x$ac_cv_func_fork_works" = xyes; then
13307
13308 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13309
13310 fi
13311
13312 for ac_func in getauxval getrusage getuid getgid \
13313 pipe poll pread pread64 pwrite resize_term \
13314 sbrk getpgid setpgid setpgrp setsid \
13315 sigaction sigprocmask sigsetmask socketpair \
13316 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
13317 setrlimit getrlimit posix_madvise waitpid \
13318 ptrace64 sigaltstack mkdtemp setns
13319 do :
13320 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13321 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13322 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13323 cat >>confdefs.h <<_ACEOF
13324 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13325 _ACEOF
13326
13327 fi
13328 done
13329
13330
13331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13332 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13333 if ${am_cv_langinfo_codeset+:} false; then :
13334 $as_echo_n "(cached) " >&6
13335 else
13336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13337 /* end confdefs.h. */
13338 #include <langinfo.h>
13339 int
13340 main ()
13341 {
13342 char* cs = nl_langinfo(CODESET);
13343 ;
13344 return 0;
13345 }
13346 _ACEOF
13347 if ac_fn_c_try_link "$LINENO"; then :
13348 am_cv_langinfo_codeset=yes
13349 else
13350 am_cv_langinfo_codeset=no
13351 fi
13352 rm -f core conftest.err conftest.$ac_objext \
13353 conftest$ac_exeext conftest.$ac_ext
13354
13355 fi
13356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13357 $as_echo "$am_cv_langinfo_codeset" >&6; }
13358 if test $am_cv_langinfo_codeset = yes; then
13359
13360 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13361
13362 fi
13363
13364 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13365 if test "x$ac_cv_type_size_t" = xyes; then :
13366
13367 else
13368
13369 cat >>confdefs.h <<_ACEOF
13370 #define size_t unsigned int
13371 _ACEOF
13372
13373 fi
13374
13375
13376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13377 $as_echo_n "checking for ANSI C header files... " >&6; }
13378 if ${ac_cv_header_stdc+:} false; then :
13379 $as_echo_n "(cached) " >&6
13380 else
13381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13382 /* end confdefs.h. */
13383 #include <stdlib.h>
13384 #include <stdarg.h>
13385 #include <string.h>
13386 #include <float.h>
13387
13388 int
13389 main ()
13390 {
13391
13392 ;
13393 return 0;
13394 }
13395 _ACEOF
13396 if ac_fn_c_try_compile "$LINENO"; then :
13397 ac_cv_header_stdc=yes
13398 else
13399 ac_cv_header_stdc=no
13400 fi
13401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13402
13403 if test $ac_cv_header_stdc = yes; then
13404 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13406 /* end confdefs.h. */
13407 #include <string.h>
13408
13409 _ACEOF
13410 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13411 $EGREP "memchr" >/dev/null 2>&1; then :
13412
13413 else
13414 ac_cv_header_stdc=no
13415 fi
13416 rm -f conftest*
13417
13418 fi
13419
13420 if test $ac_cv_header_stdc = yes; then
13421 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13423 /* end confdefs.h. */
13424 #include <stdlib.h>
13425
13426 _ACEOF
13427 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13428 $EGREP "free" >/dev/null 2>&1; then :
13429
13430 else
13431 ac_cv_header_stdc=no
13432 fi
13433 rm -f conftest*
13434
13435 fi
13436
13437 if test $ac_cv_header_stdc = yes; then
13438 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13439 if test "$cross_compiling" = yes; then :
13440 :
13441 else
13442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13443 /* end confdefs.h. */
13444 #include <ctype.h>
13445 #include <stdlib.h>
13446 #if ((' ' & 0x0FF) == 0x020)
13447 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13448 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13449 #else
13450 # define ISLOWER(c) \
13451 (('a' <= (c) && (c) <= 'i') \
13452 || ('j' <= (c) && (c) <= 'r') \
13453 || ('s' <= (c) && (c) <= 'z'))
13454 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13455 #endif
13456
13457 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13458 int
13459 main ()
13460 {
13461 int i;
13462 for (i = 0; i < 256; i++)
13463 if (XOR (islower (i), ISLOWER (i))
13464 || toupper (i) != TOUPPER (i))
13465 return 2;
13466 return 0;
13467 }
13468 _ACEOF
13469 if ac_fn_c_try_run "$LINENO"; then :
13470
13471 else
13472 ac_cv_header_stdc=no
13473 fi
13474 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13475 conftest.$ac_objext conftest.beam conftest.$ac_ext
13476 fi
13477
13478 fi
13479 fi
13480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13481 $as_echo "$ac_cv_header_stdc" >&6; }
13482 if test $ac_cv_header_stdc = yes; then
13483
13484 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
13485
13486 fi
13487
13488 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13489 # for constant arguments. Useless!
13490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13491 $as_echo_n "checking for working alloca.h... " >&6; }
13492 if ${ac_cv_working_alloca_h+:} false; then :
13493 $as_echo_n "(cached) " >&6
13494 else
13495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13496 /* end confdefs.h. */
13497 #include <alloca.h>
13498 int
13499 main ()
13500 {
13501 char *p = (char *) alloca (2 * sizeof (int));
13502 if (p) return 0;
13503 ;
13504 return 0;
13505 }
13506 _ACEOF
13507 if ac_fn_c_try_link "$LINENO"; then :
13508 ac_cv_working_alloca_h=yes
13509 else
13510 ac_cv_working_alloca_h=no
13511 fi
13512 rm -f core conftest.err conftest.$ac_objext \
13513 conftest$ac_exeext conftest.$ac_ext
13514 fi
13515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13516 $as_echo "$ac_cv_working_alloca_h" >&6; }
13517 if test $ac_cv_working_alloca_h = yes; then
13518
13519 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13520
13521 fi
13522
13523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13524 $as_echo_n "checking for alloca... " >&6; }
13525 if ${ac_cv_func_alloca_works+:} false; then :
13526 $as_echo_n "(cached) " >&6
13527 else
13528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13529 /* end confdefs.h. */
13530 #ifdef __GNUC__
13531 # define alloca __builtin_alloca
13532 #else
13533 # ifdef _MSC_VER
13534 # include <malloc.h>
13535 # define alloca _alloca
13536 # else
13537 # ifdef HAVE_ALLOCA_H
13538 # include <alloca.h>
13539 # else
13540 # ifdef _AIX
13541 #pragma alloca
13542 # else
13543 # ifndef alloca /* predefined by HP cc +Olibcalls */
13544 void *alloca (size_t);
13545 # endif
13546 # endif
13547 # endif
13548 # endif
13549 #endif
13550
13551 int
13552 main ()
13553 {
13554 char *p = (char *) alloca (1);
13555 if (p) return 0;
13556 ;
13557 return 0;
13558 }
13559 _ACEOF
13560 if ac_fn_c_try_link "$LINENO"; then :
13561 ac_cv_func_alloca_works=yes
13562 else
13563 ac_cv_func_alloca_works=no
13564 fi
13565 rm -f core conftest.err conftest.$ac_objext \
13566 conftest$ac_exeext conftest.$ac_ext
13567 fi
13568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13569 $as_echo "$ac_cv_func_alloca_works" >&6; }
13570
13571 if test $ac_cv_func_alloca_works = yes; then
13572
13573 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13574
13575 else
13576 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13577 # that cause trouble. Some versions do not even contain alloca or
13578 # contain a buggy version. If you still want to use their alloca,
13579 # use ar to extract alloca.o from them instead of compiling alloca.c.
13580
13581 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13582
13583 $as_echo "#define C_ALLOCA 1" >>confdefs.h
13584
13585
13586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13587 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13588 if ${ac_cv_os_cray+:} false; then :
13589 $as_echo_n "(cached) " >&6
13590 else
13591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13592 /* end confdefs.h. */
13593 #if defined CRAY && ! defined CRAY2
13594 webecray
13595 #else
13596 wenotbecray
13597 #endif
13598
13599 _ACEOF
13600 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13601 $EGREP "webecray" >/dev/null 2>&1; then :
13602 ac_cv_os_cray=yes
13603 else
13604 ac_cv_os_cray=no
13605 fi
13606 rm -f conftest*
13607
13608 fi
13609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13610 $as_echo "$ac_cv_os_cray" >&6; }
13611 if test $ac_cv_os_cray = yes; then
13612 for ac_func in _getb67 GETB67 getb67; do
13613 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13614 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13615 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13616
13617 cat >>confdefs.h <<_ACEOF
13618 #define CRAY_STACKSEG_END $ac_func
13619 _ACEOF
13620
13621 break
13622 fi
13623
13624 done
13625 fi
13626
13627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13628 $as_echo_n "checking stack direction for C alloca... " >&6; }
13629 if ${ac_cv_c_stack_direction+:} false; then :
13630 $as_echo_n "(cached) " >&6
13631 else
13632 if test "$cross_compiling" = yes; then :
13633 ac_cv_c_stack_direction=0
13634 else
13635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13636 /* end confdefs.h. */
13637 $ac_includes_default
13638 int
13639 find_stack_direction (int *addr, int depth)
13640 {
13641 int dir, dummy = 0;
13642 if (! addr)
13643 addr = &dummy;
13644 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13645 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13646 return dir + dummy;
13647 }
13648
13649 int
13650 main (int argc, char **argv)
13651 {
13652 return find_stack_direction (0, argc + !argv + 20) < 0;
13653 }
13654 _ACEOF
13655 if ac_fn_c_try_run "$LINENO"; then :
13656 ac_cv_c_stack_direction=1
13657 else
13658 ac_cv_c_stack_direction=-1
13659 fi
13660 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13661 conftest.$ac_objext conftest.beam conftest.$ac_ext
13662 fi
13663
13664 fi
13665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13666 $as_echo "$ac_cv_c_stack_direction" >&6; }
13667 cat >>confdefs.h <<_ACEOF
13668 #define STACK_DIRECTION $ac_cv_c_stack_direction
13669 _ACEOF
13670
13671
13672 fi
13673
13674
13675
13676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13677 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13678 if ${am_cv_langinfo_codeset+:} false; then :
13679 $as_echo_n "(cached) " >&6
13680 else
13681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13682 /* end confdefs.h. */
13683 #include <langinfo.h>
13684 int
13685 main ()
13686 {
13687 char* cs = nl_langinfo(CODESET);
13688 ;
13689 return 0;
13690 }
13691 _ACEOF
13692 if ac_fn_c_try_link "$LINENO"; then :
13693 am_cv_langinfo_codeset=yes
13694 else
13695 am_cv_langinfo_codeset=no
13696 fi
13697 rm -f core conftest.err conftest.$ac_objext \
13698 conftest$ac_exeext conftest.$ac_ext
13699
13700 fi
13701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13702 $as_echo "$am_cv_langinfo_codeset" >&6; }
13703 if test $am_cv_langinfo_codeset = yes; then
13704
13705 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13706
13707 fi
13708
13709
13710 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
13711 do :
13712 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13713 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13714 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13715 cat >>confdefs.h <<_ACEOF
13716 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13717 _ACEOF
13718
13719 fi
13720
13721 done
13722
13723
13724 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
13725 do :
13726 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13727 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13728 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13729 cat >>confdefs.h <<_ACEOF
13730 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13731 _ACEOF
13732
13733 fi
13734 done
13735
13736
13737 ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
13738 if test "x$ac_cv_have_decl_strerror" = xyes; then :
13739 ac_have_decl=1
13740 else
13741 ac_have_decl=0
13742 fi
13743
13744 cat >>confdefs.h <<_ACEOF
13745 #define HAVE_DECL_STRERROR $ac_have_decl
13746 _ACEOF
13747 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13748 if test "x$ac_cv_have_decl_strstr" = xyes; then :
13749 ac_have_decl=1
13750 else
13751 ac_have_decl=0
13752 fi
13753
13754 cat >>confdefs.h <<_ACEOF
13755 #define HAVE_DECL_STRSTR $ac_have_decl
13756 _ACEOF
13757
13758
13759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13760 $as_echo_n "checking for sigsetjmp... " >&6; }
13761 if ${gdb_cv_func_sigsetjmp+:} false; then :
13762 $as_echo_n "(cached) " >&6
13763 else
13764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13765 /* end confdefs.h. */
13766
13767 #include <setjmp.h>
13768
13769 int
13770 main ()
13771 {
13772 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13773 ;
13774 return 0;
13775 }
13776 _ACEOF
13777 if ac_fn_c_try_compile "$LINENO"; then :
13778 gdb_cv_func_sigsetjmp=yes
13779 else
13780 gdb_cv_func_sigsetjmp=no
13781 fi
13782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13783 fi
13784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13785 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13786 if test $gdb_cv_func_sigsetjmp = yes; then
13787
13788 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13789
13790 fi
13791
13792
13793 # Check the return and argument types of ptrace.
13794
13795
13796 for ac_header in sys/ptrace.h ptrace.h
13797 do :
13798 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13799 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13800 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13801 cat >>confdefs.h <<_ACEOF
13802 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13803 _ACEOF
13804
13805 fi
13806
13807 done
13808
13809
13810 gdb_ptrace_headers='
13811 #include <sys/types.h>
13812 #if HAVE_SYS_PTRACE_H
13813 # include <sys/ptrace.h>
13814 #endif
13815 #if HAVE_UNISTD_H
13816 # include <unistd.h>
13817 #endif
13818 '
13819 # There is no point in checking if we don't have a prototype.
13820 ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
13821 "
13822 if test "x$ac_cv_have_decl_ptrace" = xyes; then :
13823 ac_have_decl=1
13824 else
13825 ac_have_decl=0
13826 fi
13827
13828 cat >>confdefs.h <<_ACEOF
13829 #define HAVE_DECL_PTRACE $ac_have_decl
13830 _ACEOF
13831 if test $ac_have_decl = 1; then :
13832
13833 else
13834
13835 : ${gdb_cv_func_ptrace_ret='int'}
13836 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13837
13838 fi
13839
13840 # Check return type. Varargs (used on GNU/Linux) conflict with the
13841 # empty argument list, so check for that explicitly.
13842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
13843 $as_echo_n "checking return type of ptrace... " >&6; }
13844 if ${gdb_cv_func_ptrace_ret+:} false; then :
13845 $as_echo_n "(cached) " >&6
13846 else
13847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13848 /* end confdefs.h. */
13849 $gdb_ptrace_headers
13850 int
13851 main ()
13852 {
13853 extern long ptrace (enum __ptrace_request, ...);
13854 ;
13855 return 0;
13856 }
13857 _ACEOF
13858 if ac_fn_c_try_compile "$LINENO"; then :
13859 gdb_cv_func_ptrace_ret='long'
13860 else
13861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13862 /* end confdefs.h. */
13863 $gdb_ptrace_headers
13864 int
13865 main ()
13866 {
13867 extern int ptrace ();
13868 ;
13869 return 0;
13870 }
13871 _ACEOF
13872 if ac_fn_c_try_compile "$LINENO"; then :
13873 gdb_cv_func_ptrace_ret='int'
13874 else
13875 gdb_cv_func_ptrace_ret='long'
13876 fi
13877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13878 fi
13879 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13880 fi
13881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
13882 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
13883
13884 cat >>confdefs.h <<_ACEOF
13885 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
13886 _ACEOF
13887
13888 # Check argument types.
13889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
13890 $as_echo_n "checking types of arguments for ptrace... " >&6; }
13891 if ${gdb_cv_func_ptrace_args+:} false; then :
13892 $as_echo_n "(cached) " >&6
13893 else
13894
13895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13896 /* end confdefs.h. */
13897 $gdb_ptrace_headers
13898 int
13899 main ()
13900 {
13901 extern long ptrace (enum __ptrace_request, ...);
13902 ;
13903 return 0;
13904 }
13905 _ACEOF
13906 if ac_fn_c_try_compile "$LINENO"; then :
13907 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
13908 else
13909
13910 for gdb_arg1 in 'int' 'long'; do
13911 for gdb_arg2 in 'pid_t' 'int' 'long'; do
13912 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
13913 for gdb_arg4 in 'int' 'long' 'void *'; do
13914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13915 /* end confdefs.h. */
13916 $gdb_ptrace_headers
13917 int
13918 main ()
13919 {
13920
13921 extern $gdb_cv_func_ptrace_ret
13922 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
13923
13924 ;
13925 return 0;
13926 }
13927 _ACEOF
13928 if ac_fn_c_try_compile "$LINENO"; then :
13929 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
13930 break 4;
13931 fi
13932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13933 for gdb_arg5 in 'int *' 'int' 'long'; do
13934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13935 /* end confdefs.h. */
13936 $gdb_ptrace_headers
13937 int
13938 main ()
13939 {
13940
13941 extern $gdb_cv_func_ptrace_ret
13942 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
13943
13944 ;
13945 return 0;
13946 }
13947 _ACEOF
13948 if ac_fn_c_try_compile "$LINENO"; then :
13949
13950 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
13951 break 5;
13952 fi
13953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13954 done
13955 done
13956 done
13957 done
13958 done
13959 # Provide a safe default value.
13960 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
13961
13962 fi
13963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13964 fi
13965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
13966 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
13967 ac_save_IFS=$IFS; IFS=','
13968 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
13969 IFS=$ac_save_IFS
13970 shift
13971
13972 cat >>confdefs.h <<_ACEOF
13973 #define PTRACE_TYPE_ARG1 $1
13974 _ACEOF
13975
13976
13977 cat >>confdefs.h <<_ACEOF
13978 #define PTRACE_TYPE_ARG3 $3
13979 _ACEOF
13980
13981
13982 cat >>confdefs.h <<_ACEOF
13983 #define PTRACE_TYPE_ARG4 $4
13984 _ACEOF
13985
13986 if test -n "$5"; then
13987
13988 cat >>confdefs.h <<_ACEOF
13989 #define PTRACE_TYPE_ARG5 $5
13990 _ACEOF
13991
13992 fi
13993
13994
13995 if test "$cross_compiling" = no; then
13996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
13997 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
13998 if ${ac_cv_func_setpgrp_void+:} false; then :
13999 $as_echo_n "(cached) " >&6
14000 else
14001 if test "$cross_compiling" = yes; then :
14002 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
14003 else
14004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14005 /* end confdefs.h. */
14006 $ac_includes_default
14007 int
14008 main ()
14009 {
14010 /* If this system has a BSD-style setpgrp which takes arguments,
14011 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
14012 exit successfully. */
14013 return setpgrp (1,1) != -1;
14014 ;
14015 return 0;
14016 }
14017 _ACEOF
14018 if ac_fn_c_try_run "$LINENO"; then :
14019 ac_cv_func_setpgrp_void=no
14020 else
14021 ac_cv_func_setpgrp_void=yes
14022 fi
14023 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14024 conftest.$ac_objext conftest.beam conftest.$ac_ext
14025 fi
14026
14027 fi
14028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14029 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
14030 if test $ac_cv_func_setpgrp_void = yes; then
14031
14032 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
14033
14034 fi
14035
14036 else
14037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14038 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
14039 if ${ac_cv_func_setpgrp_void+:} false; then :
14040 $as_echo_n "(cached) " >&6
14041 else
14042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14043 /* end confdefs.h. */
14044
14045 #include <unistd.h>
14046
14047 int
14048 main ()
14049 {
14050
14051 if (setpgrp(1,1) == -1)
14052 exit (0);
14053 else
14054 exit (1);
14055
14056 ;
14057 return 0;
14058 }
14059 _ACEOF
14060 if ac_fn_c_try_compile "$LINENO"; then :
14061 ac_cv_func_setpgrp_void=no
14062 else
14063 ac_cv_func_setpgrp_void=yes
14064 fi
14065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14066 fi
14067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
14068 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
14069 if test $ac_cv_func_setpgrp_void = yes; then
14070 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
14071
14072 fi
14073 fi
14074
14075 # Assume we'll default to using the included libiberty regex.
14076 gdb_use_included_regex=yes
14077
14078 # However, if the system regex is GNU regex, then default to *not*
14079 # using the included regex.
14080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
14081 $as_echo_n "checking for GNU regex... " >&6; }
14082 if ${gdb_cv_have_gnu_regex+:} false; then :
14083 $as_echo_n "(cached) " >&6
14084 else
14085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14086 /* end confdefs.h. */
14087 #include <gnu-versions.h>
14088 int
14089 main ()
14090 {
14091 #define REGEX_INTERFACE_VERSION 1
14092 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
14093 # error "Version mismatch"
14094 #endif
14095 ;
14096 return 0;
14097 }
14098 _ACEOF
14099 if ac_fn_c_try_compile "$LINENO"; then :
14100 gdb_cv_have_gnu_regex=yes
14101 else
14102 gdb_cv_have_gnu_regex=no
14103 fi
14104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14105 fi
14106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
14107 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
14108 if test $gdb_cv_have_gnu_regex = yes; then
14109 gdb_use_included_regex=no
14110 fi
14111
14112
14113 # Check whether --with-included-regex was given.
14114 if test "${with_included_regex+set}" = set; then :
14115 withval=$with_included_regex; gdb_with_regex=$withval
14116 else
14117 gdb_with_regex=$gdb_use_included_regex
14118 fi
14119
14120 if test "$gdb_with_regex" = yes; then
14121
14122 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
14123
14124 fi
14125
14126 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
14127 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
14128 #include <sys/proc.h>
14129
14130 "
14131 if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
14132
14133 cat >>confdefs.h <<_ACEOF
14134 #define HAVE_STRUCT_THREAD_TD_PCB 1
14135 _ACEOF
14136
14137
14138 fi
14139
14140
14141 # See if <sys/lwp.h> defines `struct lwp`.
14142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
14143 $as_echo_n "checking for struct lwp... " >&6; }
14144 if ${gdb_cv_struct_lwp+:} false; then :
14145 $as_echo_n "(cached) " >&6
14146 else
14147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14148 /* end confdefs.h. */
14149 #include <sys/param.h>
14150 #define _KMEMUSER
14151 #include <sys/lwp.h>
14152 int
14153 main ()
14154 {
14155 struct lwp l;
14156 ;
14157 return 0;
14158 }
14159 _ACEOF
14160 if ac_fn_c_try_compile "$LINENO"; then :
14161 gdb_cv_struct_lwp=yes
14162 else
14163 gdb_cv_struct_lwp=no
14164 fi
14165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14166 fi
14167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
14168 $as_echo "$gdb_cv_struct_lwp" >&6; }
14169 if test $gdb_cv_struct_lwp = yes; then
14170
14171 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
14172
14173 fi
14174
14175 # See if <machine/reg.h> degines `struct reg'.
14176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
14177 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
14178 if ${gdb_cv_struct_reg+:} false; then :
14179 $as_echo_n "(cached) " >&6
14180 else
14181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14182 /* end confdefs.h. */
14183 #include <sys/types.h>
14184 #include <machine/reg.h>
14185 int
14186 main ()
14187 {
14188 struct reg r;
14189 ;
14190 return 0;
14191 }
14192 _ACEOF
14193 if ac_fn_c_try_compile "$LINENO"; then :
14194 gdb_cv_struct_reg=yes
14195 else
14196 gdb_cv_struct_reg=no
14197 fi
14198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14199 fi
14200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
14201 $as_echo "$gdb_cv_struct_reg" >&6; }
14202 if test $gdb_cv_struct_reg = yes; then
14203
14204 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
14205
14206 fi
14207
14208 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
14209 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
14210 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
14211 #include <machine/reg.h>
14212 "
14213 if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
14214
14215 cat >>confdefs.h <<_ACEOF
14216 #define HAVE_STRUCT_REG_R_FS 1
14217 _ACEOF
14218
14219
14220 fi
14221 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
14222 #include <machine/reg.h>
14223 "
14224 if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
14225
14226 cat >>confdefs.h <<_ACEOF
14227 #define HAVE_STRUCT_REG_R_GS 1
14228 _ACEOF
14229
14230
14231 fi
14232
14233
14234 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
14235 # Older amd64 Linux's don't have the fs_base and gs_base members of
14236 # `struct user_regs_struct'.
14237 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>
14238 #include <sys/user.h>
14239 "
14240 if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
14241
14242 cat >>confdefs.h <<_ACEOF
14243 #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
14244 _ACEOF
14245
14246
14247 fi
14248 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>
14249 #include <sys/user.h>
14250 "
14251 if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
14252
14253 cat >>confdefs.h <<_ACEOF
14254 #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
14255 _ACEOF
14256
14257
14258 fi
14259
14260
14261 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
14262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
14263 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
14264 if ${gdb_cv_have_ptrace_getregs+:} false; then :
14265 $as_echo_n "(cached) " >&6
14266 else
14267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14268 /* end confdefs.h. */
14269 #include <sys/ptrace.h>
14270 int
14271 main ()
14272 {
14273 PTRACE_GETREGS;
14274 ;
14275 return 0;
14276 }
14277 _ACEOF
14278 if ac_fn_c_try_compile "$LINENO"; then :
14279 gdb_cv_have_ptrace_getregs=yes
14280 else
14281 gdb_cv_have_ptrace_getregs=no
14282 fi
14283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14284 fi
14285
14286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
14287 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
14288 if test $gdb_cv_have_ptrace_getregs = yes; then
14289
14290 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
14291
14292 fi
14293
14294 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
14295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
14296 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
14297 if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
14298 $as_echo_n "(cached) " >&6
14299 else
14300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14301 /* end confdefs.h. */
14302 #include <sys/ptrace.h>
14303 int
14304 main ()
14305 {
14306 PTRACE_GETFPXREGS;
14307 ;
14308 return 0;
14309 }
14310 _ACEOF
14311 if ac_fn_c_try_compile "$LINENO"; then :
14312 gdb_cv_have_ptrace_getfpxregs=yes
14313 else
14314 gdb_cv_have_ptrace_getfpxregs=no
14315 fi
14316 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14317 fi
14318
14319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
14320 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
14321 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
14322
14323 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
14324
14325 fi
14326
14327 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
14328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
14329 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
14330 if ${gdb_cv_have_pt_getdbregs+:} false; then :
14331 $as_echo_n "(cached) " >&6
14332 else
14333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14334 /* end confdefs.h. */
14335 #include <sys/types.h>
14336 #include <sys/ptrace.h>
14337 int
14338 main ()
14339 {
14340 PT_GETDBREGS;
14341 ;
14342 return 0;
14343 }
14344 _ACEOF
14345 if ac_fn_c_try_compile "$LINENO"; then :
14346 gdb_cv_have_pt_getdbregs=yes
14347 else
14348 gdb_cv_have_pt_getdbregs=no
14349 fi
14350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14351 fi
14352
14353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
14354 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
14355 if test $gdb_cv_have_pt_getdbregs = yes; then
14356
14357 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
14358
14359 fi
14360
14361 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
14362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
14363 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
14364 if ${gdb_cv_have_pt_getxmmregs+:} false; then :
14365 $as_echo_n "(cached) " >&6
14366 else
14367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14368 /* end confdefs.h. */
14369 #include <sys/types.h>
14370 #include <sys/ptrace.h>
14371 int
14372 main ()
14373 {
14374 PT_GETXMMREGS;
14375 ;
14376 return 0;
14377 }
14378 _ACEOF
14379 if ac_fn_c_try_compile "$LINENO"; then :
14380 gdb_cv_have_pt_getxmmregs=yes
14381 else
14382 gdb_cv_have_pt_getxmmregs=no
14383 fi
14384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14385 fi
14386
14387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
14388 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
14389 if test $gdb_cv_have_pt_getxmmregs = yes; then
14390
14391 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
14392
14393 fi
14394
14395 # See if <sys/ptrace.h> supports LWP names on FreeBSD
14396 # Older FreeBSD versions don't have the pl_tdname member of
14397 # `struct ptrace_lwpinfo'.
14398 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
14399 "
14400 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
14401
14402 cat >>confdefs.h <<_ACEOF
14403 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
14404 _ACEOF
14405
14406
14407 fi
14408
14409
14410 # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
14411 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
14412 # FreeBSD 10.3.
14413 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>
14414 "
14415 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
14416
14417 cat >>confdefs.h <<_ACEOF
14418 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
14419 _ACEOF
14420
14421
14422 fi
14423
14424
14425 if test "$ac_cv_header_sys_procfs_h" = yes; then
14426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14427 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14428 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
14429 $as_echo_n "(cached) " >&6
14430 else
14431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14432 /* end confdefs.h. */
14433
14434 #define _SYSCALL32
14435 /* Needed for new procfs interface on sparc-solaris. */
14436 #define _STRUCTURED_PROC 1
14437 #include <sys/procfs.h>
14438 int
14439 main ()
14440 {
14441 gregset_t avar
14442 ;
14443 return 0;
14444 }
14445 _ACEOF
14446 if ac_fn_c_try_compile "$LINENO"; then :
14447 bfd_cv_have_sys_procfs_type_gregset_t=yes
14448 else
14449 bfd_cv_have_sys_procfs_type_gregset_t=no
14450
14451 fi
14452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14453 fi
14454
14455 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
14456
14457 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
14458
14459 fi
14460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14461 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14462
14463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14464 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14465 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
14466 $as_echo_n "(cached) " >&6
14467 else
14468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14469 /* end confdefs.h. */
14470
14471 #define _SYSCALL32
14472 /* Needed for new procfs interface on sparc-solaris. */
14473 #define _STRUCTURED_PROC 1
14474 #include <sys/procfs.h>
14475 int
14476 main ()
14477 {
14478 fpregset_t avar
14479 ;
14480 return 0;
14481 }
14482 _ACEOF
14483 if ac_fn_c_try_compile "$LINENO"; then :
14484 bfd_cv_have_sys_procfs_type_fpregset_t=yes
14485 else
14486 bfd_cv_have_sys_procfs_type_fpregset_t=no
14487
14488 fi
14489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14490 fi
14491
14492 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14493
14494 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14495
14496 fi
14497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14498 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14499
14500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14501 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14502 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14503 $as_echo_n "(cached) " >&6
14504 else
14505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14506 /* end confdefs.h. */
14507
14508 #define _SYSCALL32
14509 /* Needed for new procfs interface on sparc-solaris. */
14510 #define _STRUCTURED_PROC 1
14511 #include <sys/procfs.h>
14512 int
14513 main ()
14514 {
14515 prgregset_t avar
14516 ;
14517 return 0;
14518 }
14519 _ACEOF
14520 if ac_fn_c_try_compile "$LINENO"; then :
14521 bfd_cv_have_sys_procfs_type_prgregset_t=yes
14522 else
14523 bfd_cv_have_sys_procfs_type_prgregset_t=no
14524
14525 fi
14526 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14527 fi
14528
14529 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
14530
14531 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14532
14533 fi
14534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14535 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
14536
14537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14538 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14539 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
14540 $as_echo_n "(cached) " >&6
14541 else
14542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14543 /* end confdefs.h. */
14544
14545 #define _SYSCALL32
14546 /* Needed for new procfs interface on sparc-solaris. */
14547 #define _STRUCTURED_PROC 1
14548 #include <sys/procfs.h>
14549 int
14550 main ()
14551 {
14552 prfpregset_t avar
14553 ;
14554 return 0;
14555 }
14556 _ACEOF
14557 if ac_fn_c_try_compile "$LINENO"; then :
14558 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
14559 else
14560 bfd_cv_have_sys_procfs_type_prfpregset_t=no
14561
14562 fi
14563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14564 fi
14565
14566 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14567
14568 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14569
14570 fi
14571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14572 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14573
14574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14575 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14576 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
14577 $as_echo_n "(cached) " >&6
14578 else
14579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14580 /* end confdefs.h. */
14581
14582 #define _SYSCALL32
14583 /* Needed for new procfs interface on sparc-solaris. */
14584 #define _STRUCTURED_PROC 1
14585 #include <sys/procfs.h>
14586 int
14587 main ()
14588 {
14589 prgregset32_t avar
14590 ;
14591 return 0;
14592 }
14593 _ACEOF
14594 if ac_fn_c_try_compile "$LINENO"; then :
14595 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
14596 else
14597 bfd_cv_have_sys_procfs_type_prgregset32_t=no
14598
14599 fi
14600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14601 fi
14602
14603 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
14604
14605 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
14606
14607 fi
14608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14609 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
14610
14611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14612 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14613 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
14614 $as_echo_n "(cached) " >&6
14615 else
14616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14617 /* end confdefs.h. */
14618
14619 #define _SYSCALL32
14620 /* Needed for new procfs interface on sparc-solaris. */
14621 #define _STRUCTURED_PROC 1
14622 #include <sys/procfs.h>
14623 int
14624 main ()
14625 {
14626 lwpid_t avar
14627 ;
14628 return 0;
14629 }
14630 _ACEOF
14631 if ac_fn_c_try_compile "$LINENO"; then :
14632 bfd_cv_have_sys_procfs_type_lwpid_t=yes
14633 else
14634 bfd_cv_have_sys_procfs_type_lwpid_t=no
14635
14636 fi
14637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14638 fi
14639
14640 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
14641
14642 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
14643
14644 fi
14645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14646 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
14647
14648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14649 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14650 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
14651 $as_echo_n "(cached) " >&6
14652 else
14653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14654 /* end confdefs.h. */
14655
14656 #define _SYSCALL32
14657 /* Needed for new procfs interface on sparc-solaris. */
14658 #define _STRUCTURED_PROC 1
14659 #include <sys/procfs.h>
14660 int
14661 main ()
14662 {
14663 psaddr_t avar
14664 ;
14665 return 0;
14666 }
14667 _ACEOF
14668 if ac_fn_c_try_compile "$LINENO"; then :
14669 bfd_cv_have_sys_procfs_type_psaddr_t=yes
14670 else
14671 bfd_cv_have_sys_procfs_type_psaddr_t=no
14672
14673 fi
14674 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14675 fi
14676
14677 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
14678
14679 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
14680
14681 fi
14682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14683 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
14684
14685
14686
14687
14688 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5
14690 $as_echo_n "checking whether prfpregset_t type is broken... " >&6; }
14691 if ${gdb_cv_prfpregset_t_broken+:} false; then :
14692 $as_echo_n "(cached) " >&6
14693 else
14694 if test "$cross_compiling" = yes; then :
14695 gdb_cv_prfpregset_t_broken=yes
14696 else
14697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14698 /* end confdefs.h. */
14699 #include <sys/procfs.h>
14700 int main ()
14701 {
14702 if (sizeof (prfpregset_t) == sizeof (void *))
14703 return 1;
14704 return 0;
14705 }
14706 _ACEOF
14707 if ac_fn_c_try_run "$LINENO"; then :
14708 gdb_cv_prfpregset_t_broken=no
14709 else
14710 gdb_cv_prfpregset_t_broken=yes
14711 fi
14712 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14713 conftest.$ac_objext conftest.beam conftest.$ac_ext
14714 fi
14715
14716 fi
14717
14718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5
14719 $as_echo "$gdb_cv_prfpregset_t_broken" >&6; }
14720 if test $gdb_cv_prfpregset_t_broken = yes; then
14721
14722 $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h
14723
14724 fi
14725 fi
14726 fi
14727
14728 # Check if the compiler supports the `long long' type.
14729
14730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
14731 $as_echo_n "checking for long long support in compiler... " >&6; }
14732 if ${gdb_cv_c_long_long+:} false; then :
14733 $as_echo_n "(cached) " >&6
14734 else
14735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14736 /* end confdefs.h. */
14737 extern long long foo;
14738 int
14739 main ()
14740 {
14741 switch (foo & 2) { case 0: return 1; }
14742 ;
14743 return 0;
14744 }
14745 _ACEOF
14746 if ac_fn_c_try_compile "$LINENO"; then :
14747 gdb_cv_c_long_long=yes
14748 else
14749 gdb_cv_c_long_long=no
14750 fi
14751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14752 fi
14753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
14754 $as_echo "$gdb_cv_c_long_long" >&6; }
14755 if test $gdb_cv_c_long_long != yes; then
14756 # libdecnumber requires long long.
14757 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
14758 fi
14759
14760 # Check if the compiler and runtime support printing long longs.
14761
14762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
14763 $as_echo_n "checking for long long support in printf... " >&6; }
14764 if ${gdb_cv_printf_has_long_long+:} false; then :
14765 $as_echo_n "(cached) " >&6
14766 else
14767 if test "$cross_compiling" = yes; then :
14768 gdb_cv_printf_has_long_long=no
14769 else
14770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14771 /* end confdefs.h. */
14772 $ac_includes_default
14773 int
14774 main ()
14775 {
14776 char buf[32];
14777 long long l = 0;
14778 l = (l << 16) + 0x0123;
14779 l = (l << 16) + 0x4567;
14780 l = (l << 16) + 0x89ab;
14781 l = (l << 16) + 0xcdef;
14782 sprintf (buf, "0x%016llx", l);
14783 return (strcmp ("0x0123456789abcdef", buf));
14784 ;
14785 return 0;
14786 }
14787 _ACEOF
14788 if ac_fn_c_try_run "$LINENO"; then :
14789 gdb_cv_printf_has_long_long=yes
14790 else
14791 gdb_cv_printf_has_long_long=no
14792 fi
14793 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14794 conftest.$ac_objext conftest.beam conftest.$ac_ext
14795 fi
14796
14797 fi
14798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
14799 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
14800 if test $gdb_cv_printf_has_long_long = yes; then
14801
14802 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
14803
14804 fi
14805
14806 # Check if the compiler and runtime support printing decfloats.
14807
14808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
14809 $as_echo_n "checking for decfloat support in printf... " >&6; }
14810 if ${gdb_cv_printf_has_decfloat+:} false; then :
14811 $as_echo_n "(cached) " >&6
14812 else
14813 if test "$cross_compiling" = yes; then :
14814 gdb_cv_printf_has_decfloat=no
14815 else
14816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14817 /* end confdefs.h. */
14818 $ac_includes_default
14819 int
14820 main ()
14821 {
14822 char buf[64];
14823 _Decimal32 d32 = 1.2345df;
14824 _Decimal64 d64 = 1.2345dd;
14825 _Decimal128 d128 = 1.2345dl;
14826 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
14827 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
14828 ;
14829 return 0;
14830 }
14831 _ACEOF
14832 if ac_fn_c_try_run "$LINENO"; then :
14833 gdb_cv_printf_has_decfloat=yes
14834 else
14835 gdb_cv_printf_has_decfloat=no
14836 fi
14837 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14838 conftest.$ac_objext conftest.beam conftest.$ac_ext
14839 fi
14840
14841 fi
14842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
14843 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
14844 if test $gdb_cv_printf_has_decfloat = yes; then
14845
14846 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
14847
14848 fi
14849
14850 # Check if the compiler supports the `long double' type. We can't use
14851 # AC_C_LONG_DOUBLE because that one does additional checks on the
14852 # constants defined in <float.h> that fail on some systems,
14853 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
14854
14855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
14856 $as_echo_n "checking for long double support in compiler... " >&6; }
14857 if ${gdb_cv_c_long_double+:} false; then :
14858 $as_echo_n "(cached) " >&6
14859 else
14860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14861 /* end confdefs.h. */
14862 long double foo;
14863 _ACEOF
14864 if ac_fn_c_try_compile "$LINENO"; then :
14865 gdb_cv_c_long_double=yes
14866 else
14867 gdb_cv_c_long_double=no
14868 fi
14869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14870 fi
14871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
14872 $as_echo "$gdb_cv_c_long_double" >&6; }
14873 if test $gdb_cv_c_long_double = yes; then
14874
14875 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
14876
14877 fi
14878
14879 # Check if the compiler and runtime support printing long doubles.
14880
14881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
14882 $as_echo_n "checking for long double support in printf... " >&6; }
14883 if ${gdb_cv_printf_has_long_double+:} false; then :
14884 $as_echo_n "(cached) " >&6
14885 else
14886 if test "$cross_compiling" = yes; then :
14887 gdb_cv_printf_has_long_double=no
14888 else
14889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14890 /* end confdefs.h. */
14891 $ac_includes_default
14892 int
14893 main ()
14894 {
14895 char buf[16];
14896 long double f = 3.141592653;
14897 sprintf (buf, "%Lg", f);
14898 return (strncmp ("3.14159", buf, 7));
14899 ;
14900 return 0;
14901 }
14902 _ACEOF
14903 if ac_fn_c_try_run "$LINENO"; then :
14904 gdb_cv_printf_has_long_double=yes
14905 else
14906 gdb_cv_printf_has_long_double=no
14907 fi
14908 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14909 conftest.$ac_objext conftest.beam conftest.$ac_ext
14910 fi
14911
14912 fi
14913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
14914 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
14915 if test $gdb_cv_printf_has_long_double = yes; then
14916
14917 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
14918
14919 fi
14920
14921 # Check if the compiler and runtime support scanning long doubles.
14922
14923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
14924 $as_echo_n "checking for long double support in scanf... " >&6; }
14925 if ${gdb_cv_scanf_has_long_double+:} false; then :
14926 $as_echo_n "(cached) " >&6
14927 else
14928 if test "$cross_compiling" = yes; then :
14929 gdb_cv_scanf_has_long_double=no
14930 else
14931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14932 /* end confdefs.h. */
14933 #include <stdio.h>
14934 int
14935 main ()
14936 {
14937 char *buf = "3.141592653";
14938 long double f = 0;
14939 sscanf (buf, "%Lg", &f);
14940 return !(f > 3.14159 && f < 3.14160);
14941 ;
14942 return 0;
14943 }
14944 _ACEOF
14945 if ac_fn_c_try_run "$LINENO"; then :
14946 gdb_cv_scanf_has_long_double=yes
14947 else
14948 gdb_cv_scanf_has_long_double=no
14949 fi
14950 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14951 conftest.$ac_objext conftest.beam conftest.$ac_ext
14952 fi
14953
14954 fi
14955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
14956 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
14957 if test $gdb_cv_scanf_has_long_double = yes; then
14958
14959 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
14960
14961 fi
14962
14963 case ${host_os} in
14964 aix*)
14965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
14966 $as_echo_n "checking for -bbigtoc option... " >&6; }
14967 if ${gdb_cv_bigtoc+:} false; then :
14968 $as_echo_n "(cached) " >&6
14969 else
14970
14971 SAVE_LDFLAGS=$LDFLAGS
14972
14973 case $GCC in
14974 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
14975 *) gdb_cv_bigtoc=-bbigtoc ;;
14976 esac
14977
14978 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
14979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14980 /* end confdefs.h. */
14981
14982 int
14983 main ()
14984 {
14985 int i;
14986 ;
14987 return 0;
14988 }
14989 _ACEOF
14990 if ac_fn_c_try_link "$LINENO"; then :
14991
14992 else
14993 gdb_cv_bigtoc=
14994 fi
14995 rm -f core conftest.err conftest.$ac_objext \
14996 conftest$ac_exeext conftest.$ac_ext
14997 LDFLAGS="${SAVE_LDFLAGS}"
14998
14999 fi
15000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15001 $as_echo "$gdb_cv_bigtoc" >&6; }
15002 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15003 ;;
15004 esac
15005
15006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
15007 $as_echo_n "checking for the dynamic export flag... " >&6; }
15008 dynamic_list=false
15009 if test "${gdb_native}" = yes; then
15010 # The dynamically loaded libthread_db needs access to symbols in the gdb
15011 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15012 # may not be supported there.
15013 old_LDFLAGS="$LDFLAGS"
15014 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15015 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15016 LDFLAGS="$LDFLAGS $RDYNAMIC"
15017 if test "${have_libpython}" = no; then
15018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15019 /* end confdefs.h. */
15020
15021 int
15022 main ()
15023 {
15024
15025 ;
15026 return 0;
15027 }
15028 _ACEOF
15029 if ac_fn_c_try_link "$LINENO"; then :
15030 dynamic_list=true
15031 fi
15032 rm -f core conftest.err conftest.$ac_objext \
15033 conftest$ac_exeext conftest.$ac_ext
15034 else
15035 # Workaround http://bugs.python.org/issue4434 where static
15036 # libpythonX.Y.a would get its symbols required for
15037 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15038 # Problem does not happen for the recommended libpythonX.Y.so linkage.
15039
15040 # Note the workaround for Python
15041 # http://bugs.python.org/issue10112 earlier has removed
15042 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
15043 # here too, as otherwise it'd make this -Wl,--dynamic-list test
15044 # always pass.
15045 old_CFLAGS="$CFLAGS"
15046 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
15047 old_LIBS="$LIBS"
15048 LIBS="$LIBS $PYTHON_LIBS"
15049 old_CPPFLAGS="$CPPFLAGS"
15050 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
15051 if test "$cross_compiling" = yes; then :
15052 true
15053 else
15054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15055 /* end confdefs.h. */
15056 #include "Python.h"
15057 int
15058 main ()
15059 {
15060 int err;
15061 Py_Initialize ();
15062 err = PyRun_SimpleString ("import itertools\n");
15063 Py_Finalize ();
15064 return err == 0 ? 0 : 1;
15065 ;
15066 return 0;
15067 }
15068 _ACEOF
15069 if ac_fn_c_try_run "$LINENO"; then :
15070 dynamic_list=true
15071 fi
15072 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15073 conftest.$ac_objext conftest.beam conftest.$ac_ext
15074 fi
15075
15076 LIBS="$old_LIBS"
15077 CFLAGS="$old_CFLAGS"
15078 CPPFLAGS="$old_CPPFLAGS"
15079 fi
15080 LDFLAGS="$old_LDFLAGS"
15081 fi
15082 if $dynamic_list; then
15083 found="-Wl,--dynamic-list"
15084 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
15085 else
15086 found="-rdynamic"
15087 RDYNAMIC="-rdynamic"
15088 fi
15089
15090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
15091 $as_echo "$found" >&6; }
15092
15093
15094 if test ${build} = ${host} -a ${host} = ${target} ; then
15095 case ${host_os} in
15096 aix*)
15097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15098 $as_echo_n "checking for AiX thread debugging library... " >&6; }
15099 if ${gdb_cv_have_aix_thread_debug+:} false; then :
15100 $as_echo_n "(cached) " >&6
15101 else
15102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15103 /* end confdefs.h. */
15104 #include <sys/pthdebug.h>
15105 int
15106 main ()
15107 {
15108 #ifndef PTHDB_VERSION_3
15109 #error
15110 #endif
15111 ;
15112 return 0;
15113 }
15114 _ACEOF
15115 if ac_fn_c_try_compile "$LINENO"; then :
15116 gdb_cv_have_aix_thread_debug=yes
15117 else
15118 gdb_cv_have_aix_thread_debug=no
15119 fi
15120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15121 fi
15122
15123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15124 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
15125 if test $gdb_cv_have_aix_thread_debug = yes; then
15126 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
15127 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
15128 LIBS="$LIBS -lpthdebug"
15129
15130 # Older versions of AIX do not provide the declaration for
15131 # the getthrds function (it appears that it was introduced
15132 # with AIX 6.x).
15133 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15134 "
15135 if test "x$ac_cv_have_decl_getthrds" = xyes; then :
15136 ac_have_decl=1
15137 else
15138 ac_have_decl=0
15139 fi
15140
15141 cat >>confdefs.h <<_ACEOF
15142 #define HAVE_DECL_GETTHRDS $ac_have_decl
15143 _ACEOF
15144
15145 fi
15146 ;;
15147 esac
15148
15149 fi
15150
15151 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
15152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15153 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
15154 if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
15155 $as_echo_n "(cached) " >&6
15156 else
15157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15158 /* end confdefs.h. */
15159 #include <thread_db.h>
15160 int
15161 main ()
15162 {
15163 int i = TD_NOTALLOC;
15164 ;
15165 return 0;
15166 }
15167 _ACEOF
15168 if ac_fn_c_try_compile "$LINENO"; then :
15169 gdb_cv_thread_db_h_has_td_notalloc=yes
15170 else
15171 gdb_cv_thread_db_h_has_td_notalloc=no
15172
15173 fi
15174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15175
15176 fi
15177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15178 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15180 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
15181 if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
15182 $as_echo_n "(cached) " >&6
15183 else
15184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15185 /* end confdefs.h. */
15186 #include <thread_db.h>
15187 int
15188 main ()
15189 {
15190 int i = TD_VERSION;
15191 ;
15192 return 0;
15193 }
15194 _ACEOF
15195 if ac_fn_c_try_compile "$LINENO"; then :
15196 gdb_cv_thread_db_h_has_td_version=yes
15197 else
15198 gdb_cv_thread_db_h_has_td_version=no
15199
15200 fi
15201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15202
15203 fi
15204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15205 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15207 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
15208 if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
15209 $as_echo_n "(cached) " >&6
15210 else
15211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15212 /* end confdefs.h. */
15213 #include <thread_db.h>
15214 int
15215 main ()
15216 {
15217 int i = TD_NOTLS;
15218 ;
15219 return 0;
15220 }
15221 _ACEOF
15222 if ac_fn_c_try_compile "$LINENO"; then :
15223 gdb_cv_thread_db_h_has_td_notls=yes
15224 else
15225 gdb_cv_thread_db_h_has_td_notls=no
15226
15227 fi
15228 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15229
15230 fi
15231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15232 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
15233 fi
15234 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
15235
15236 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
15237
15238 fi
15239 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15240
15241 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
15242
15243 fi
15244 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15245
15246 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
15247
15248 fi
15249
15250 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
15251 "
15252 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
15253 ac_have_decl=1
15254 else
15255 ac_have_decl=0
15256 fi
15257
15258 cat >>confdefs.h <<_ACEOF
15259 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
15260 _ACEOF
15261
15262
15263 if test "$cross_compiling" = yes; then :
15264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15265 /* end confdefs.h. */
15266 #include <sys/personality.h>
15267 int
15268 main ()
15269 {
15270
15271 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
15272 # define ADDR_NO_RANDOMIZE 0x0040000
15273 # endif
15274 /* Test the flag could be set and stays set. */
15275 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15276 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15277 return 1
15278 ;
15279 return 0;
15280 }
15281 _ACEOF
15282 if ac_fn_c_try_link "$LINENO"; then :
15283 have_personality=true
15284 else
15285 have_personality=false
15286 fi
15287 rm -f core conftest.err conftest.$ac_objext \
15288 conftest$ac_exeext conftest.$ac_ext
15289 else
15290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15291 /* end confdefs.h. */
15292 #include <sys/personality.h>
15293 int
15294 main ()
15295 {
15296
15297 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
15298 # define ADDR_NO_RANDOMIZE 0x0040000
15299 # endif
15300 /* Test the flag could be set and stays set. */
15301 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
15302 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
15303 return 1
15304 ;
15305 return 0;
15306 }
15307 _ACEOF
15308 if ac_fn_c_try_run "$LINENO"; then :
15309 have_personality=true
15310 else
15311 have_personality=false
15312 fi
15313 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15314 conftest.$ac_objext conftest.beam conftest.$ac_ext
15315 fi
15316
15317 if $have_personality
15318 then
15319
15320 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
15321
15322 fi
15323
15324 case $host_os in
15325 go32* | *djgpp*)
15326 gdbinit=gdb.ini
15327 ;;
15328 *)
15329 gdbinit=.gdbinit
15330 ;;
15331 esac
15332
15333 cat >>confdefs.h <<_ACEOF
15334 #define GDBINIT "$gdbinit"
15335 _ACEOF
15336
15337
15338
15339 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15340 # except that the argument to --with-sysroot is optional.
15341 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15342 if test "x$with_sysroot" = xyes; then
15343 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15344 fi
15345
15346 # Check whether --with-sysroot was given.
15347 if test "${with_sysroot+set}" = set; then :
15348 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15349 else
15350 TARGET_SYSTEM_ROOT=
15351 fi
15352
15353
15354 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15355 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15356 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15357 ac_define_dir=`eval echo $ac_define_dir`
15358
15359 cat >>confdefs.h <<_ACEOF
15360 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
15361 _ACEOF
15362
15363
15364
15365
15366 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15367 if test "x$prefix" = xNONE; then
15368 test_prefix=/usr/local
15369 else
15370 test_prefix=$prefix
15371 fi
15372 else
15373 test_prefix=$exec_prefix
15374 fi
15375 value=0
15376 case ${ac_define_dir} in
15377 "${test_prefix}"|"${test_prefix}/"*|\
15378 '${exec_prefix}'|'${exec_prefix}/'*)
15379 value=1
15380 ;;
15381 esac
15382
15383 cat >>confdefs.h <<_ACEOF
15384 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15385 _ACEOF
15386
15387
15388
15389
15390
15391 # Check whether --with-system-gdbinit was given.
15392 if test "${with_system_gdbinit+set}" = set; then :
15393 withval=$with_system_gdbinit;
15394 SYSTEM_GDBINIT=$withval
15395 else
15396 SYSTEM_GDBINIT=
15397 fi
15398
15399
15400 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15401 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15402 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
15403 ac_define_dir=`eval echo $ac_define_dir`
15404
15405 cat >>confdefs.h <<_ACEOF
15406 #define SYSTEM_GDBINIT "$ac_define_dir"
15407 _ACEOF
15408
15409
15410
15411
15412 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15413 if test "x$prefix" = xNONE; then
15414 test_prefix=/usr/local
15415 else
15416 test_prefix=$prefix
15417 fi
15418 else
15419 test_prefix=$exec_prefix
15420 fi
15421 value=0
15422 case ${ac_define_dir} in
15423 "${test_prefix}"|"${test_prefix}/"*|\
15424 '${exec_prefix}'|'${exec_prefix}/'*)
15425 value=1
15426 ;;
15427 esac
15428
15429 cat >>confdefs.h <<_ACEOF
15430 #define SYSTEM_GDBINIT_RELOCATABLE $value
15431 _ACEOF
15432
15433
15434
15435
15436
15437 # Check whether --enable-werror was given.
15438 if test "${enable_werror+set}" = set; then :
15439 enableval=$enable_werror; case "${enableval}" in
15440 yes | y) ERROR_ON_WARNING="yes" ;;
15441 no | n) ERROR_ON_WARNING="no" ;;
15442 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
15443 esac
15444 fi
15445
15446
15447 # Enable -Werror by default when using gcc. Turn it off for releases.
15448 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
15449 ERROR_ON_WARNING=yes
15450 fi
15451
15452 WERROR_CFLAGS=""
15453 if test "${ERROR_ON_WARNING}" = yes ; then
15454 WERROR_CFLAGS="-Werror"
15455 fi
15456
15457 # The options we'll try to enable.
15458 build_warnings="-Wall -Wpointer-arith \
15459 -Wno-unused -Wunused-value -Wunused-function \
15460 -Wno-switch -Wno-char-subscripts \
15461 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
15462 -Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \
15463 -Wno-mismatched-tags \
15464 -Wno-error=deprecated-register \
15465 -Wsuggest-override \
15466 -Wimplicit-fallthrough=3 \
15467 -Wduplicated-cond"
15468
15469 case "${host}" in
15470 *-*-mingw32*)
15471 # Enable -Wno-format by default when using gcc on mingw since many
15472 # GCC versions complain about %I64.
15473 build_warnings="$build_warnings -Wno-format" ;;
15474 *-*-solaris*)
15475 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
15476 # doesn't understand.
15477 build_warnings="$build_warnings -Wno-unknown-pragmas"
15478 # Solaris 11 <unistd.h> marks vfork deprecated.
15479 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
15480 *) build_warnings="$build_warnings -Wformat-nonliteral" ;;
15481 esac
15482
15483 # Check whether --enable-build-warnings was given.
15484 if test "${enable_build_warnings+set}" = set; then :
15485 enableval=$enable_build_warnings; case "${enableval}" in
15486 yes) ;;
15487 no) build_warnings="-w";;
15488 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15489 build_warnings="${build_warnings} ${t}";;
15490 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15491 build_warnings="${t} ${build_warnings}";;
15492 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15493 esac
15494 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15495 echo "Setting compiler warning flags = $build_warnings" 6>&1
15496 fi
15497 fi
15498 # Check whether --enable-gdb-build-warnings was given.
15499 if test "${enable_gdb_build_warnings+set}" = set; then :
15500 enableval=$enable_gdb_build_warnings; case "${enableval}" in
15501 yes) ;;
15502 no) build_warnings="-w";;
15503 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15504 build_warnings="${build_warnings} ${t}";;
15505 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
15506 build_warnings="${t} ${build_warnings}";;
15507 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
15508 esac
15509 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
15510 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
15511 fi
15512 fi
15513
15514 # The set of warnings supported by a C++ compiler is not the same as
15515 # of the C compiler.
15516 ac_ext=cpp
15517 ac_cpp='$CXXCPP $CPPFLAGS'
15518 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15519 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15520 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15521
15522
15523 WARN_CFLAGS=""
15524 if test "x${build_warnings}" != x -a "x$GCC" = xyes
15525 then
15526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
15527 $as_echo_n "checking compiler warning flags... " >&6; }
15528 # Separate out the -Werror flag as some files just cannot be
15529 # compiled with it enabled.
15530 for w in ${build_warnings}; do
15531 # GCC does not complain about -Wno-unknown-warning. Invert
15532 # and test -Wunknown-warning instead.
15533 case $w in
15534 -Wno-*)
15535 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
15536 *)
15537 wtest=$w ;;
15538 esac
15539
15540 case $w in
15541 -Werr*) WERROR_CFLAGS=-Werror ;;
15542 *)
15543 # Check whether GCC accepts it.
15544 saved_CFLAGS="$CFLAGS"
15545 CFLAGS="$CFLAGS -Werror $wtest"
15546 saved_CXXFLAGS="$CXXFLAGS"
15547 CXXFLAGS="$CXXFLAGS -Werror $wtest"
15548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15549 /* end confdefs.h. */
15550
15551 int
15552 main ()
15553 {
15554
15555 ;
15556 return 0;
15557 }
15558 _ACEOF
15559 if ac_fn_cxx_try_compile "$LINENO"; then :
15560 WARN_CFLAGS="${WARN_CFLAGS} $w"
15561 fi
15562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15563 CFLAGS="$saved_CFLAGS"
15564 CXXFLAGS="$saved_CXXFLAGS"
15565 esac
15566 done
15567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
15568 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
15569 fi
15570
15571
15572
15573 ac_ext=c
15574 ac_cpp='$CPP $CPPFLAGS'
15575 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15576 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15577 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15578
15579
15580
15581 # In the Cygwin environment, we need some additional flags.
15582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
15583 $as_echo_n "checking for cygwin... " >&6; }
15584 if ${gdb_cv_os_cygwin+:} false; then :
15585 $as_echo_n "(cached) " >&6
15586 else
15587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15588 /* end confdefs.h. */
15589
15590 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
15591 lose
15592 #endif
15593 _ACEOF
15594 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15595 $EGREP "^lose$" >/dev/null 2>&1; then :
15596 gdb_cv_os_cygwin=yes
15597 else
15598 gdb_cv_os_cygwin=no
15599 fi
15600 rm -f conftest*
15601
15602 fi
15603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
15604 $as_echo "$gdb_cv_os_cygwin" >&6; }
15605
15606
15607 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
15608 case ${host} in
15609 *go32* ) SER_HARDWIRE=ser-go32.o ;;
15610 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
15611 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
15612 esac
15613
15614
15615 # libreadline needs libuser32.a in a cygwin environment
15616 WIN32LIBS=
15617 if test x$gdb_cv_os_cygwin = xyes; then
15618 WIN32LIBS="-luser32"
15619 case "${target}" in
15620 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
15621 ;;
15622 esac
15623 fi
15624
15625 # The ser-tcp.c module requires sockets.
15626 case ${host} in
15627 *mingw32*)
15628
15629 $as_echo "#define USE_WIN32API 1" >>confdefs.h
15630
15631 WIN32LIBS="$WIN32LIBS -lws2_32"
15632 ;;
15633 esac
15634
15635
15636 # Add ELF support to GDB, but only if BFD includes ELF support.
15637
15638 OLD_CFLAGS=$CFLAGS
15639 OLD_LDFLAGS=$LDFLAGS
15640 OLD_LIBS=$LIBS
15641 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15642 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15643 # always want our bfd.
15644 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
15645 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15646 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
15647 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
15648 LIBS="-lbfd -liberty -lz $intl $LIBS"
15649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
15650 $as_echo_n "checking for ELF support in BFD... " >&6; }
15651 if ${gdb_cv_var_elf+:} false; then :
15652 $as_echo_n "(cached) " >&6
15653 else
15654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15655 /* end confdefs.h. */
15656 #include <stdlib.h>
15657 #include "bfd.h"
15658 #include "elf-bfd.h"
15659
15660 int
15661 main ()
15662 {
15663 return bfd_get_elf_phdr_upper_bound (NULL);
15664 ;
15665 return 0;
15666 }
15667 _ACEOF
15668 if ac_fn_c_try_link "$LINENO"; then :
15669 gdb_cv_var_elf=yes
15670 else
15671 gdb_cv_var_elf=no
15672 fi
15673 rm -f core conftest.err conftest.$ac_objext \
15674 conftest$ac_exeext conftest.$ac_ext
15675 fi
15676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
15677 $as_echo "$gdb_cv_var_elf" >&6; }
15678 CFLAGS=$OLD_CFLAGS
15679 LDFLAGS=$OLD_LDFLAGS
15680 LIBS=$OLD_LIBS
15681 if test $gdb_cv_var_elf = yes; then
15682 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
15683
15684 $as_echo "#define HAVE_ELF 1" >>confdefs.h
15685
15686 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
15687 if test "$plugins" = "yes"; then
15688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
15689 $as_echo_n "checking for library containing dlopen... " >&6; }
15690 if ${ac_cv_search_dlopen+:} false; then :
15691 $as_echo_n "(cached) " >&6
15692 else
15693 ac_func_search_save_LIBS=$LIBS
15694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15695 /* end confdefs.h. */
15696
15697 /* Override any GCC internal prototype to avoid an error.
15698 Use char because int might match the return type of a GCC
15699 builtin and then its argument prototype would still apply. */
15700 #ifdef __cplusplus
15701 extern "C"
15702 #endif
15703 char dlopen ();
15704 int
15705 main ()
15706 {
15707 return dlopen ();
15708 ;
15709 return 0;
15710 }
15711 _ACEOF
15712 for ac_lib in '' dl; do
15713 if test -z "$ac_lib"; then
15714 ac_res="none required"
15715 else
15716 ac_res=-l$ac_lib
15717 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15718 fi
15719 if ac_fn_c_try_link "$LINENO"; then :
15720 ac_cv_search_dlopen=$ac_res
15721 fi
15722 rm -f core conftest.err conftest.$ac_objext \
15723 conftest$ac_exeext
15724 if ${ac_cv_search_dlopen+:} false; then :
15725 break
15726 fi
15727 done
15728 if ${ac_cv_search_dlopen+:} false; then :
15729
15730 else
15731 ac_cv_search_dlopen=no
15732 fi
15733 rm conftest.$ac_ext
15734 LIBS=$ac_func_search_save_LIBS
15735 fi
15736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
15737 $as_echo "$ac_cv_search_dlopen" >&6; }
15738 ac_res=$ac_cv_search_dlopen
15739 if test "$ac_res" != no; then :
15740 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15741
15742 fi
15743
15744 fi
15745 fi
15746
15747 # Add macho support to GDB, but only if BFD includes it.
15748
15749 OLD_CFLAGS=$CFLAGS
15750 OLD_LDFLAGS=$LDFLAGS
15751 OLD_LIBS=$LIBS
15752 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
15753 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
15754 # always want our bfd.
15755 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
15756 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
15757 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
15758 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
15759 LIBS="-lbfd -liberty -lz $intl $LIBS"
15760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
15761 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
15762 if ${gdb_cv_var_macho+:} false; then :
15763 $as_echo_n "(cached) " >&6
15764 else
15765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15766 /* end confdefs.h. */
15767 #include <stdlib.h>
15768 #include "bfd.h"
15769 #include "mach-o.h"
15770
15771 int
15772 main ()
15773 {
15774 return bfd_mach_o_lookup_command (NULL, 0, NULL);
15775 ;
15776 return 0;
15777 }
15778 _ACEOF
15779 if ac_fn_c_try_link "$LINENO"; then :
15780 gdb_cv_var_macho=yes
15781 else
15782 gdb_cv_var_macho=no
15783 fi
15784 rm -f core conftest.err conftest.$ac_objext \
15785 conftest$ac_exeext conftest.$ac_ext
15786 fi
15787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
15788 $as_echo "$gdb_cv_var_macho" >&6; }
15789 CFLAGS=$OLD_CFLAGS
15790 LDFLAGS=$OLD_LDFLAGS
15791 LIBS=$OLD_LIBS
15792 if test $gdb_cv_var_macho = yes; then
15793 CONFIG_OBS="$CONFIG_OBS machoread.o"
15794 fi
15795
15796 # Add any host-specific objects to GDB.
15797 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
15798
15799 # If building on ELF, look for lzma support for embedded compressed debug info.
15800 if test $gdb_cv_var_elf = yes; then
15801
15802 # Check whether --with-lzma was given.
15803 if test "${with_lzma+set}" = set; then :
15804 withval=$with_lzma;
15805 else
15806 with_lzma=auto
15807 fi
15808
15809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
15810 $as_echo_n "checking whether to use lzma... " >&6; }
15811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
15812 $as_echo "$with_lzma" >&6; }
15813
15814 if test "${with_lzma}" != no; then
15815
15816
15817
15818
15819
15820
15821
15822
15823 use_additional=yes
15824
15825 acl_save_prefix="$prefix"
15826 prefix="$acl_final_prefix"
15827 acl_save_exec_prefix="$exec_prefix"
15828 exec_prefix="$acl_final_exec_prefix"
15829
15830 eval additional_includedir=\"$includedir\"
15831 eval additional_libdir=\"$libdir\"
15832
15833 exec_prefix="$acl_save_exec_prefix"
15834 prefix="$acl_save_prefix"
15835
15836
15837 # Check whether --with-liblzma-prefix was given.
15838 if test "${with_liblzma_prefix+set}" = set; then :
15839 withval=$with_liblzma_prefix;
15840 if test "X$withval" = "Xno"; then
15841 use_additional=no
15842 else
15843 if test "X$withval" = "X"; then
15844
15845 acl_save_prefix="$prefix"
15846 prefix="$acl_final_prefix"
15847 acl_save_exec_prefix="$exec_prefix"
15848 exec_prefix="$acl_final_exec_prefix"
15849
15850 eval additional_includedir=\"$includedir\"
15851 eval additional_libdir=\"$libdir\"
15852
15853 exec_prefix="$acl_save_exec_prefix"
15854 prefix="$acl_save_prefix"
15855
15856 else
15857 additional_includedir="$withval/include"
15858 additional_libdir="$withval/lib"
15859 fi
15860 fi
15861
15862 fi
15863
15864 LIBLZMA=
15865 LTLIBLZMA=
15866 INCLZMA=
15867 rpathdirs=
15868 ltrpathdirs=
15869 names_already_handled=
15870 names_next_round='lzma '
15871 while test -n "$names_next_round"; do
15872 names_this_round="$names_next_round"
15873 names_next_round=
15874 for name in $names_this_round; do
15875 already_handled=
15876 for n in $names_already_handled; do
15877 if test "$n" = "$name"; then
15878 already_handled=yes
15879 break
15880 fi
15881 done
15882 if test -z "$already_handled"; then
15883 names_already_handled="$names_already_handled $name"
15884 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
15885 eval value=\"\$HAVE_LIB$uppername\"
15886 if test -n "$value"; then
15887 if test "$value" = yes; then
15888 eval value=\"\$LIB$uppername\"
15889 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
15890 eval value=\"\$LTLIB$uppername\"
15891 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
15892 else
15893 :
15894 fi
15895 else
15896 found_dir=
15897 found_la=
15898 found_so=
15899 found_a=
15900 if test $use_additional = yes; then
15901 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
15902 found_dir="$additional_libdir"
15903 found_so="$additional_libdir/lib$name.$shlibext"
15904 if test -f "$additional_libdir/lib$name.la"; then
15905 found_la="$additional_libdir/lib$name.la"
15906 fi
15907 else
15908 if test -f "$additional_libdir/lib$name.$libext"; then
15909 found_dir="$additional_libdir"
15910 found_a="$additional_libdir/lib$name.$libext"
15911 if test -f "$additional_libdir/lib$name.la"; then
15912 found_la="$additional_libdir/lib$name.la"
15913 fi
15914 fi
15915 fi
15916 fi
15917 if test "X$found_dir" = "X"; then
15918 for x in $LDFLAGS $LTLIBLZMA; do
15919
15920 acl_save_prefix="$prefix"
15921 prefix="$acl_final_prefix"
15922 acl_save_exec_prefix="$exec_prefix"
15923 exec_prefix="$acl_final_exec_prefix"
15924 eval x=\"$x\"
15925 exec_prefix="$acl_save_exec_prefix"
15926 prefix="$acl_save_prefix"
15927
15928 case "$x" in
15929 -L*)
15930 dir=`echo "X$x" | sed -e 's/^X-L//'`
15931 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
15932 found_dir="$dir"
15933 found_so="$dir/lib$name.$shlibext"
15934 if test -f "$dir/lib$name.la"; then
15935 found_la="$dir/lib$name.la"
15936 fi
15937 else
15938 if test -f "$dir/lib$name.$libext"; then
15939 found_dir="$dir"
15940 found_a="$dir/lib$name.$libext"
15941 if test -f "$dir/lib$name.la"; then
15942 found_la="$dir/lib$name.la"
15943 fi
15944 fi
15945 fi
15946 ;;
15947 esac
15948 if test "X$found_dir" != "X"; then
15949 break
15950 fi
15951 done
15952 fi
15953 if test "X$found_dir" != "X"; then
15954 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
15955 if test "X$found_so" != "X"; then
15956 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15957 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15958 else
15959 haveit=
15960 for x in $ltrpathdirs; do
15961 if test "X$x" = "X$found_dir"; then
15962 haveit=yes
15963 break
15964 fi
15965 done
15966 if test -z "$haveit"; then
15967 ltrpathdirs="$ltrpathdirs $found_dir"
15968 fi
15969 if test "$hardcode_direct" = yes; then
15970 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15971 else
15972 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15973 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
15974 haveit=
15975 for x in $rpathdirs; do
15976 if test "X$x" = "X$found_dir"; then
15977 haveit=yes
15978 break
15979 fi
15980 done
15981 if test -z "$haveit"; then
15982 rpathdirs="$rpathdirs $found_dir"
15983 fi
15984 else
15985 haveit=
15986 for x in $LDFLAGS $LIBLZMA; do
15987
15988 acl_save_prefix="$prefix"
15989 prefix="$acl_final_prefix"
15990 acl_save_exec_prefix="$exec_prefix"
15991 exec_prefix="$acl_final_exec_prefix"
15992 eval x=\"$x\"
15993 exec_prefix="$acl_save_exec_prefix"
15994 prefix="$acl_save_prefix"
15995
15996 if test "X$x" = "X-L$found_dir"; then
15997 haveit=yes
15998 break
15999 fi
16000 done
16001 if test -z "$haveit"; then
16002 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16003 fi
16004 if test "$hardcode_minus_L" != no; then
16005 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16006 else
16007 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16008 fi
16009 fi
16010 fi
16011 fi
16012 else
16013 if test "X$found_a" != "X"; then
16014 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16015 else
16016 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16017 fi
16018 fi
16019 additional_includedir=
16020 case "$found_dir" in
16021 */lib | */lib/)
16022 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16023 additional_includedir="$basedir/include"
16024 ;;
16025 esac
16026 if test "X$additional_includedir" != "X"; then
16027 if test "X$additional_includedir" != "X/usr/include"; then
16028 haveit=
16029 if test "X$additional_includedir" = "X/usr/local/include"; then
16030 if test -n "$GCC"; then
16031 case $host_os in
16032 linux*) haveit=yes;;
16033 esac
16034 fi
16035 fi
16036 if test -z "$haveit"; then
16037 for x in $CPPFLAGS $INCLZMA; do
16038
16039 acl_save_prefix="$prefix"
16040 prefix="$acl_final_prefix"
16041 acl_save_exec_prefix="$exec_prefix"
16042 exec_prefix="$acl_final_exec_prefix"
16043 eval x=\"$x\"
16044 exec_prefix="$acl_save_exec_prefix"
16045 prefix="$acl_save_prefix"
16046
16047 if test "X$x" = "X-I$additional_includedir"; then
16048 haveit=yes
16049 break
16050 fi
16051 done
16052 if test -z "$haveit"; then
16053 if test -d "$additional_includedir"; then
16054 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16055 fi
16056 fi
16057 fi
16058 fi
16059 fi
16060 if test -n "$found_la"; then
16061 save_libdir="$libdir"
16062 case "$found_la" in
16063 */* | *\\*) . "$found_la" ;;
16064 *) . "./$found_la" ;;
16065 esac
16066 libdir="$save_libdir"
16067 for dep in $dependency_libs; do
16068 case "$dep" in
16069 -L*)
16070 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16071 if test "X$additional_libdir" != "X/usr/lib"; then
16072 haveit=
16073 if test "X$additional_libdir" = "X/usr/local/lib"; then
16074 if test -n "$GCC"; then
16075 case $host_os in
16076 linux*) haveit=yes;;
16077 esac
16078 fi
16079 fi
16080 if test -z "$haveit"; then
16081 haveit=
16082 for x in $LDFLAGS $LIBLZMA; do
16083
16084 acl_save_prefix="$prefix"
16085 prefix="$acl_final_prefix"
16086 acl_save_exec_prefix="$exec_prefix"
16087 exec_prefix="$acl_final_exec_prefix"
16088 eval x=\"$x\"
16089 exec_prefix="$acl_save_exec_prefix"
16090 prefix="$acl_save_prefix"
16091
16092 if test "X$x" = "X-L$additional_libdir"; then
16093 haveit=yes
16094 break
16095 fi
16096 done
16097 if test -z "$haveit"; then
16098 if test -d "$additional_libdir"; then
16099 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16100 fi
16101 fi
16102 haveit=
16103 for x in $LDFLAGS $LTLIBLZMA; do
16104
16105 acl_save_prefix="$prefix"
16106 prefix="$acl_final_prefix"
16107 acl_save_exec_prefix="$exec_prefix"
16108 exec_prefix="$acl_final_exec_prefix"
16109 eval x=\"$x\"
16110 exec_prefix="$acl_save_exec_prefix"
16111 prefix="$acl_save_prefix"
16112
16113 if test "X$x" = "X-L$additional_libdir"; then
16114 haveit=yes
16115 break
16116 fi
16117 done
16118 if test -z "$haveit"; then
16119 if test -d "$additional_libdir"; then
16120 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16121 fi
16122 fi
16123 fi
16124 fi
16125 ;;
16126 -R*)
16127 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16128 if test "$enable_rpath" != no; then
16129 haveit=
16130 for x in $rpathdirs; do
16131 if test "X$x" = "X$dir"; then
16132 haveit=yes
16133 break
16134 fi
16135 done
16136 if test -z "$haveit"; then
16137 rpathdirs="$rpathdirs $dir"
16138 fi
16139 haveit=
16140 for x in $ltrpathdirs; do
16141 if test "X$x" = "X$dir"; then
16142 haveit=yes
16143 break
16144 fi
16145 done
16146 if test -z "$haveit"; then
16147 ltrpathdirs="$ltrpathdirs $dir"
16148 fi
16149 fi
16150 ;;
16151 -l*)
16152 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16153 ;;
16154 *.la)
16155 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16156 ;;
16157 *)
16158 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16159 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16160 ;;
16161 esac
16162 done
16163 fi
16164 else
16165 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16166 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16167 fi
16168 fi
16169 fi
16170 done
16171 done
16172 if test "X$rpathdirs" != "X"; then
16173 if test -n "$hardcode_libdir_separator"; then
16174 alldirs=
16175 for found_dir in $rpathdirs; do
16176 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16177 done
16178 acl_save_libdir="$libdir"
16179 libdir="$alldirs"
16180 eval flag=\"$hardcode_libdir_flag_spec\"
16181 libdir="$acl_save_libdir"
16182 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16183 else
16184 for found_dir in $rpathdirs; do
16185 acl_save_libdir="$libdir"
16186 libdir="$found_dir"
16187 eval flag=\"$hardcode_libdir_flag_spec\"
16188 libdir="$acl_save_libdir"
16189 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16190 done
16191 fi
16192 fi
16193 if test "X$ltrpathdirs" != "X"; then
16194 for found_dir in $ltrpathdirs; do
16195 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16196 done
16197 fi
16198
16199
16200 ac_save_CPPFLAGS="$CPPFLAGS"
16201
16202 for element in $INCLZMA; do
16203 haveit=
16204 for x in $CPPFLAGS; do
16205
16206 acl_save_prefix="$prefix"
16207 prefix="$acl_final_prefix"
16208 acl_save_exec_prefix="$exec_prefix"
16209 exec_prefix="$acl_final_exec_prefix"
16210 eval x=\"$x\"
16211 exec_prefix="$acl_save_exec_prefix"
16212 prefix="$acl_save_prefix"
16213
16214 if test "X$x" = "X$element"; then
16215 haveit=yes
16216 break
16217 fi
16218 done
16219 if test -z "$haveit"; then
16220 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16221 fi
16222 done
16223
16224
16225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16226 $as_echo_n "checking for liblzma... " >&6; }
16227 if ${ac_cv_liblzma+:} false; then :
16228 $as_echo_n "(cached) " >&6
16229 else
16230
16231 ac_save_LIBS="$LIBS"
16232 LIBS="$LIBS $LIBLZMA"
16233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16234 /* end confdefs.h. */
16235 #include "lzma.h"
16236 int
16237 main ()
16238 {
16239 lzma_index_iter iter;
16240 lzma_index_iter_init (&iter, 0);
16241 lzma_mf_is_supported (LZMA_MF_HC3);
16242 ;
16243 return 0;
16244 }
16245 _ACEOF
16246 if ac_fn_c_try_link "$LINENO"; then :
16247 ac_cv_liblzma=yes
16248 else
16249 ac_cv_liblzma=no
16250 fi
16251 rm -f core conftest.err conftest.$ac_objext \
16252 conftest$ac_exeext conftest.$ac_ext
16253 LIBS="$ac_save_LIBS"
16254
16255 fi
16256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16257 $as_echo "$ac_cv_liblzma" >&6; }
16258 if test "$ac_cv_liblzma" = yes; then
16259 HAVE_LIBLZMA=yes
16260
16261 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16262
16263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16264 $as_echo_n "checking how to link with liblzma... " >&6; }
16265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16266 $as_echo "$LIBLZMA" >&6; }
16267 else
16268 HAVE_LIBLZMA=no
16269 CPPFLAGS="$ac_save_CPPFLAGS"
16270 LIBLZMA=
16271 LTLIBLZMA=
16272 fi
16273
16274
16275
16276
16277
16278
16279 if test "$HAVE_LIBLZMA" != yes; then
16280 if test "$with_lzma" = yes; then
16281 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
16282 fi
16283 fi
16284 fi
16285 fi
16286
16287 LIBGUI="../libgui/src/libgui.a"
16288 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
16289
16290
16291
16292 WIN32LDAPP=
16293
16294
16295
16296 case "${host}" in
16297 *-*-cygwin* | *-*-mingw* )
16298 configdir="win"
16299 ;;
16300 *)
16301 configdir="unix"
16302 ;;
16303 esac
16304
16305 GDBTKLIBS=
16306 if test "${enable_gdbtk}" = "yes"; then
16307
16308 # Gdbtk must have an absolute path to srcdir in order to run
16309 # properly when not installed.
16310 here=`pwd`
16311 cd ${srcdir}
16312 GDBTK_SRC_DIR=`pwd`
16313 cd $here
16314
16315
16316 #
16317 # Ok, lets find the tcl configuration
16318 # First, look for one uninstalled.
16319 # the alternative search directory is invoked by --with-tcl
16320 #
16321
16322 if test x"${no_tcl}" = x ; then
16323 # we reset no_tcl in case something fails here
16324 no_tcl=true
16325
16326 # Check whether --with-tcl was given.
16327 if test "${with_tcl+set}" = set; then :
16328 withval=$with_tcl; with_tclconfig=${withval}
16329 fi
16330
16331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
16332 $as_echo_n "checking for Tcl configuration... " >&6; }
16333 if ${ac_cv_c_tclconfig+:} false; then :
16334 $as_echo_n "(cached) " >&6
16335 else
16336
16337
16338 # First check to see if --with-tcl was specified.
16339 case "${host}" in
16340 *-*-cygwin*) platDir="win" ;;
16341 *) platDir="unix" ;;
16342 esac
16343 if test x"${with_tclconfig}" != x ; then
16344 if test -f "${with_tclconfig}/tclConfig.sh" ; then
16345 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
16346 else
16347 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
16348 fi
16349 fi
16350
16351 # then check for a private Tcl installation
16352 if test x"${ac_cv_c_tclconfig}" = x ; then
16353 for i in \
16354 ../tcl \
16355 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16356 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
16357 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
16358 ../../tcl \
16359 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16360 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
16361 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
16362 ../../../tcl \
16363 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16364 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
16365 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
16366 if test -f "$i/$platDir/tclConfig.sh" ; then
16367 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16368 break
16369 fi
16370 done
16371 fi
16372
16373 # on Darwin, check in Framework installation locations
16374 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
16375 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16376 `ls -d /Library/Frameworks 2>/dev/null` \
16377 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16378 `ls -d /System/Library/Frameworks 2>/dev/null` \
16379 ; do
16380 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
16381 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
16382 break
16383 fi
16384 done
16385 fi
16386
16387 # check in a few common install locations
16388 if test x"${ac_cv_c_tclconfig}" = x ; then
16389 for i in `ls -d ${libdir} 2>/dev/null` \
16390 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16391 `ls -d ${prefix}/lib 2>/dev/null` \
16392 `ls -d /usr/local/lib 2>/dev/null` \
16393 `ls -d /usr/contrib/lib 2>/dev/null` \
16394 `ls -d /usr/lib 2>/dev/null` \
16395 ; do
16396 if test -f "$i/tclConfig.sh" ; then
16397 ac_cv_c_tclconfig=`(cd $i; pwd)`
16398 break
16399 fi
16400 done
16401 fi
16402
16403 # check in a few other private locations
16404 if test x"${ac_cv_c_tclconfig}" = x ; then
16405 for i in \
16406 ${srcdir}/../tcl \
16407 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
16408 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
16409 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
16410 if test -f "$i/$platDir/tclConfig.sh" ; then
16411 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
16412 break
16413 fi
16414 done
16415 fi
16416
16417 fi
16418
16419
16420 if test x"${ac_cv_c_tclconfig}" = x ; then
16421 TCL_BIN_DIR="# no Tcl configs found"
16422 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
16423 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
16424 else
16425 no_tcl=
16426 TCL_BIN_DIR=${ac_cv_c_tclconfig}
16427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
16428 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
16429 fi
16430 fi
16431
16432
16433 # If $no_tk is nonempty, then we can't do Tk, and there is no
16434 # point to doing Tcl.
16435
16436 #
16437 # Ok, lets find the tk configuration
16438 # First, look for one uninstalled.
16439 # the alternative search directory is invoked by --with-tk
16440 #
16441
16442 if test x"${no_tk}" = x ; then
16443 # we reset no_tk in case something fails here
16444 no_tk=true
16445
16446 # Check whether --with-tk was given.
16447 if test "${with_tk+set}" = set; then :
16448 withval=$with_tk; with_tkconfig=${withval}
16449 fi
16450
16451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
16452 $as_echo_n "checking for Tk configuration... " >&6; }
16453 if ${ac_cv_c_tkconfig+:} false; then :
16454 $as_echo_n "(cached) " >&6
16455 else
16456
16457
16458 # First check to see if --with-tkconfig was specified.
16459 if test x"${with_tkconfig}" != x ; then
16460 if test -f "${with_tkconfig}/tkConfig.sh" ; then
16461 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
16462 else
16463 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
16464 fi
16465 fi
16466
16467 # then check for a private Tk library
16468 case "${host}" in
16469 *-*-cygwin*) platDir="win" ;;
16470 *) platDir="unix" ;;
16471 esac
16472 if test x"${ac_cv_c_tkconfig}" = x ; then
16473 for i in \
16474 ../tk \
16475 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16476 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
16477 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
16478 ../../tk \
16479 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16480 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
16481 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
16482 ../../../tk \
16483 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16484 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
16485 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
16486 if test -f "$i/$platDir/tkConfig.sh" ; then
16487 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16488 break
16489 fi
16490 done
16491 fi
16492
16493 # on Darwin, check in Framework installation locations
16494 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
16495 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
16496 `ls -d /Library/Frameworks 2>/dev/null` \
16497 `ls -d /Network/Library/Frameworks 2>/dev/null` \
16498 `ls -d /System/Library/Frameworks 2>/dev/null` \
16499 ; do
16500 if test -f "$i/Tk.framework/tkConfig.sh" ; then
16501 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
16502 break
16503 fi
16504 done
16505 fi
16506
16507 # check in a few common install locations
16508 if test x"${ac_cv_c_tkconfig}" = x ; then
16509 for i in `ls -d ${libdir} 2>/dev/null` \
16510 `ls -d ${exec_prefix}/lib 2>/dev/null` \
16511 `ls -d ${prefix}/lib 2>/dev/null` \
16512 `ls -d /usr/local/lib 2>/dev/null` \
16513 `ls -d /usr/contrib/lib 2>/dev/null` \
16514 `ls -d /usr/lib 2>/dev/null` \
16515 ; do
16516 if test -f "$i/tkConfig.sh" ; then
16517 ac_cv_c_tkconfig=`(cd $i; pwd)`
16518 break
16519 fi
16520 done
16521 fi
16522 # check in a few other private locations
16523 if test x"${ac_cv_c_tkconfig}" = x ; then
16524 for i in \
16525 ${srcdir}/../tk \
16526 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
16527 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
16528 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
16529 if test -f "$i/$platDir/tkConfig.sh" ; then
16530 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
16531 break
16532 fi
16533 done
16534 fi
16535
16536 fi
16537
16538
16539 if test x"${ac_cv_c_tkconfig}" = x ; then
16540 TK_BIN_DIR="# no Tk configs found"
16541 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
16542 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
16543 else
16544 no_tk=
16545 TK_BIN_DIR=${ac_cv_c_tkconfig}
16546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
16547 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
16548 fi
16549 fi
16550
16551
16552 if test -z "${no_tcl}" -a -z "${no_tk}"; then
16553
16554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
16555 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
16556
16557 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
16558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16559 $as_echo "loading" >&6; }
16560 . ${TCL_BIN_DIR}/tclConfig.sh
16561 else
16562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
16563 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
16564 fi
16565
16566 # eval is required to do the TCL_DBGX substitution
16567 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
16568 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
16569
16570 # If the TCL_BIN_DIR is the build directory (not the install directory),
16571 # then set the common variable name to the value of the build variables.
16572 # For example, the variable TCL_LIB_SPEC will be set to the value
16573 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
16574 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
16575 # installed and uninstalled version of Tcl.
16576 if test -f "${TCL_BIN_DIR}/Makefile" ; then
16577 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
16578 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
16579 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
16580 elif test "`uname -s`" = "Darwin"; then
16581 # If Tcl was built as a framework, attempt to use the libraries
16582 # from the framework at the given location so that linking works
16583 # against Tcl.framework installed in an arbitrary location.
16584 case ${TCL_DEFS} in
16585 *TCL_FRAMEWORK*)
16586 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
16587 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
16588 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
16589 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
16590 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
16591 break
16592 fi
16593 done
16594 fi
16595 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
16596 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
16597 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
16598 fi
16599 ;;
16600 esac
16601 fi
16602
16603 # eval is required to do the TCL_DBGX substitution
16604 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
16605 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
16606 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
16607 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623 # Check for in-tree tcl
16624 here=`pwd`
16625 cd ${srcdir}/..
16626 topdir=`pwd`
16627 cd ${here}
16628
16629 intree="no"
16630 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
16631 intree="yes"
16632 fi
16633
16634 # Find Tcl private headers
16635 if test x"${intree}" = xno; then
16636
16637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
16638 $as_echo_n "checking for Tcl private headers... " >&6; }
16639 private_dir=""
16640 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
16641 if test -f ${dir}/tclInt.h ; then
16642 private_dir=${dir}
16643 fi
16644
16645 if test x"${private_dir}" = x; then
16646 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
16647 else
16648 TCL_PRIVATE_INCLUDE="-I${private_dir}"
16649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16650 $as_echo "${private_dir}" >&6; }
16651 fi
16652
16653 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
16654 TCL_LIBRARY="${TCL_LIB_SPEC}"
16655 TCL_DEPS=""
16656 else
16657 # If building tcl in the same src tree, private headers
16658 # are not needed, but we need to be sure to use the right
16659 # headers library
16660 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
16661 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
16662 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
16663 fi
16664
16665
16666
16667
16668
16669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
16670 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
16671
16672 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
16673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
16674 $as_echo "loading" >&6; }
16675 . ${TK_BIN_DIR}/tkConfig.sh
16676 else
16677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
16678 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
16679 fi
16680
16681 # eval is required to do the TK_DBGX substitution
16682 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
16683 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
16684
16685 # If the TK_BIN_DIR is the build directory (not the install directory),
16686 # then set the common variable name to the value of the build variables.
16687 # For example, the variable TK_LIB_SPEC will be set to the value
16688 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
16689 # instead of TK_BUILD_LIB_SPEC since it will work with both an
16690 # installed and uninstalled version of Tcl.
16691 if test -f "${TK_BIN_DIR}/Makefile" ; then
16692 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
16693 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
16694 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
16695 elif test "`uname -s`" = "Darwin"; then
16696 # If Tk was built as a framework, attempt to use the libraries
16697 # from the framework at the given location so that linking works
16698 # against Tk.framework installed in an arbitrary location.
16699 case ${TK_DEFS} in
16700 *TK_FRAMEWORK*)
16701 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
16702 for i in "`cd ${TK_BIN_DIR}; pwd`" \
16703 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
16704 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
16705 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
16706 break
16707 fi
16708 done
16709 fi
16710 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
16711 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
16712 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
16713 fi
16714 ;;
16715 esac
16716 fi
16717
16718 # eval is required to do the TK_DBGX substitution
16719 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
16720 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
16721 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
16722 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737 # Check for in-tree Tk
16738 intree="no"
16739 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
16740 intree="yes"
16741 fi
16742
16743 # Find Tk private headers
16744 if test x"${intree}" = xno; then
16745
16746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
16747 $as_echo_n "checking for Tk private headers... " >&6; }
16748 private_dir=""
16749 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
16750 if test -f ${dir}/tkInt.h; then
16751 private_dir=${dir}
16752 fi
16753
16754 if test x"${private_dir}" = x; then
16755 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
16756 else
16757 TK_PRIVATE_INCLUDE="-I${private_dir}"
16758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
16759 $as_echo "${private_dir}" >&6; }
16760 fi
16761
16762 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
16763 TK_LIBRARY=${TK_LIB_SPEC}
16764 TK_DEPS=""
16765 else
16766 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
16767 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
16768 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
16769 fi
16770
16771
16772
16773
16774
16775 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
16776
16777 # Include some libraries that Tcl and Tk want.
16778 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
16779 # Yes, the ordering seems wrong here. But it isn't.
16780 # TK_LIBS is the list of libraries that need to be linked
16781 # after Tcl/Tk. Note that this isn't put into LIBS. If it
16782 # were in LIBS then any link tests after this point would
16783 # try to include things like `$(LIBGUI)', which wouldn't work.
16784 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
16785
16786 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
16787 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
16788 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
16789 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
16790 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
16791 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
16792 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
16793
16794 if test x$gdb_cv_os_cygwin = xyes; then
16795 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
16796 WIN32LDAPP="-Wl,--subsystem,console"
16797 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
16798 fi
16799
16800 subdirs="$subdirs gdbtk"
16801
16802 fi
16803 fi
16804
16805
16806
16807
16808
16809
16810
16811
16812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
16813 $as_echo_n "checking for X... " >&6; }
16814
16815
16816 # Check whether --with-x was given.
16817 if test "${with_x+set}" = set; then :
16818 withval=$with_x;
16819 fi
16820
16821 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
16822 if test "x$with_x" = xno; then
16823 # The user explicitly disabled X.
16824 have_x=disabled
16825 else
16826 case $x_includes,$x_libraries in #(
16827 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
16828 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
16829 $as_echo_n "(cached) " >&6
16830 else
16831 # One or both of the vars are not set, and there is no cached value.
16832 ac_x_includes=no ac_x_libraries=no
16833 rm -f -r conftest.dir
16834 if mkdir conftest.dir; then
16835 cd conftest.dir
16836 cat >Imakefile <<'_ACEOF'
16837 incroot:
16838 @echo incroot='${INCROOT}'
16839 usrlibdir:
16840 @echo usrlibdir='${USRLIBDIR}'
16841 libdir:
16842 @echo libdir='${LIBDIR}'
16843 _ACEOF
16844 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
16845 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
16846 for ac_var in incroot usrlibdir libdir; do
16847 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
16848 done
16849 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
16850 for ac_extension in a so sl dylib la dll; do
16851 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
16852 test -f "$ac_im_libdir/libX11.$ac_extension"; then
16853 ac_im_usrlibdir=$ac_im_libdir; break
16854 fi
16855 done
16856 # Screen out bogus values from the imake configuration. They are
16857 # bogus both because they are the default anyway, and because
16858 # using them would break gcc on systems where it needs fixed includes.
16859 case $ac_im_incroot in
16860 /usr/include) ac_x_includes= ;;
16861 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
16862 esac
16863 case $ac_im_usrlibdir in
16864 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
16865 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
16866 esac
16867 fi
16868 cd ..
16869 rm -f -r conftest.dir
16870 fi
16871
16872 # Standard set of common directories for X headers.
16873 # Check X11 before X11Rn because it is often a symlink to the current release.
16874 ac_x_header_dirs='
16875 /usr/X11/include
16876 /usr/X11R7/include
16877 /usr/X11R6/include
16878 /usr/X11R5/include
16879 /usr/X11R4/include
16880
16881 /usr/include/X11
16882 /usr/include/X11R7
16883 /usr/include/X11R6
16884 /usr/include/X11R5
16885 /usr/include/X11R4
16886
16887 /usr/local/X11/include
16888 /usr/local/X11R7/include
16889 /usr/local/X11R6/include
16890 /usr/local/X11R5/include
16891 /usr/local/X11R4/include
16892
16893 /usr/local/include/X11
16894 /usr/local/include/X11R7
16895 /usr/local/include/X11R6
16896 /usr/local/include/X11R5
16897 /usr/local/include/X11R4
16898
16899 /usr/X386/include
16900 /usr/x386/include
16901 /usr/XFree86/include/X11
16902
16903 /usr/include
16904 /usr/local/include
16905 /usr/unsupported/include
16906 /usr/athena/include
16907 /usr/local/x11r5/include
16908 /usr/lpp/Xamples/include
16909
16910 /usr/openwin/include
16911 /usr/openwin/share/include'
16912
16913 if test "$ac_x_includes" = no; then
16914 # Guess where to find include files, by looking for Xlib.h.
16915 # First, try using that file with no special directory specified.
16916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16917 /* end confdefs.h. */
16918 #include <X11/Xlib.h>
16919 _ACEOF
16920 if ac_fn_c_try_cpp "$LINENO"; then :
16921 # We can compile using X headers with no special include directory.
16922 ac_x_includes=
16923 else
16924 for ac_dir in $ac_x_header_dirs; do
16925 if test -r "$ac_dir/X11/Xlib.h"; then
16926 ac_x_includes=$ac_dir
16927 break
16928 fi
16929 done
16930 fi
16931 rm -f conftest.err conftest.i conftest.$ac_ext
16932 fi # $ac_x_includes = no
16933
16934 if test "$ac_x_libraries" = no; then
16935 # Check for the libraries.
16936 # See if we find them without any special options.
16937 # Don't add to $LIBS permanently.
16938 ac_save_LIBS=$LIBS
16939 LIBS="-lX11 $LIBS"
16940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16941 /* end confdefs.h. */
16942 #include <X11/Xlib.h>
16943 int
16944 main ()
16945 {
16946 XrmInitialize ()
16947 ;
16948 return 0;
16949 }
16950 _ACEOF
16951 if ac_fn_c_try_link "$LINENO"; then :
16952 LIBS=$ac_save_LIBS
16953 # We can link X programs with no special library path.
16954 ac_x_libraries=
16955 else
16956 LIBS=$ac_save_LIBS
16957 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
16958 do
16959 # Don't even attempt the hair of trying to link an X program!
16960 for ac_extension in a so sl dylib la dll; do
16961 if test -r "$ac_dir/libX11.$ac_extension"; then
16962 ac_x_libraries=$ac_dir
16963 break 2
16964 fi
16965 done
16966 done
16967 fi
16968 rm -f core conftest.err conftest.$ac_objext \
16969 conftest$ac_exeext conftest.$ac_ext
16970 fi # $ac_x_libraries = no
16971
16972 case $ac_x_includes,$ac_x_libraries in #(
16973 no,* | *,no | *\'*)
16974 # Didn't find X, or a directory has "'" in its name.
16975 ac_cv_have_x="have_x=no";; #(
16976 *)
16977 # Record where we found X for the cache.
16978 ac_cv_have_x="have_x=yes\
16979 ac_x_includes='$ac_x_includes'\
16980 ac_x_libraries='$ac_x_libraries'"
16981 esac
16982 fi
16983 ;; #(
16984 *) have_x=yes;;
16985 esac
16986 eval "$ac_cv_have_x"
16987 fi # $with_x != no
16988
16989 if test "$have_x" != yes; then
16990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
16991 $as_echo "$have_x" >&6; }
16992 no_x=yes
16993 else
16994 # If each of the values was on the command line, it overrides each guess.
16995 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
16996 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
16997 # Update the cache value to reflect the command line values.
16998 ac_cv_have_x="have_x=yes\
16999 ac_x_includes='$x_includes'\
17000 ac_x_libraries='$x_libraries'"
17001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17002 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
17003 fi
17004
17005
17006 # Unlike the sim directory, whether a simulator is linked is controlled by
17007 # presence of a gdb_sim definition in the target configure.tgt entry.
17008 # This code just checks for a few cases where we'd like to ignore those
17009 # definitions, even when they're present in the '.mt' file. These cases
17010 # are when --disable-sim is specified, or if the simulator directory is
17011 # not part of the source tree.
17012 #
17013 # Check whether --enable-sim was given.
17014 if test "${enable_sim+set}" = set; then :
17015 enableval=$enable_sim; echo "enable_sim = $enable_sim";
17016 echo "enableval = ${enableval}";
17017 case "${enableval}" in
17018 yes) ignore_sim=false ;;
17019 no) ignore_sim=true ;;
17020 *) ignore_sim=false ;;
17021 esac
17022 else
17023 ignore_sim=false
17024 fi
17025
17026
17027 if test ! -d "${srcdir}/../sim"; then
17028 ignore_sim=true
17029 fi
17030
17031 SIM=
17032 SIM_OBS=
17033 if test "${ignore_sim}" = "false"; then
17034 if test x"${gdb_sim}" != x ; then
17035 SIM="${gdb_sim}"
17036 SIM_OBS="remote-sim.o"
17037
17038 $as_echo "#define WITH_SIM 1" >>confdefs.h
17039
17040
17041 # Some tdep code should only be compiled in when the ppc sim is
17042 # built. PR sim/13418.
17043 case $target in
17044 powerpc*-*-*)
17045
17046 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17047
17048 ;;
17049 esac
17050 fi
17051 fi
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066 # List of host floatformats.
17067
17068 cat >>confdefs.h <<_ACEOF
17069 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
17070 _ACEOF
17071
17072
17073 cat >>confdefs.h <<_ACEOF
17074 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
17075 _ACEOF
17076
17077
17078 cat >>confdefs.h <<_ACEOF
17079 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
17080 _ACEOF
17081
17082
17083 # target_subdir is used by the testsuite to find the target libraries.
17084 target_subdir=
17085 if test "${host}" != "${target}"; then
17086 target_subdir="${target_alias}/"
17087 fi
17088
17089
17090 # Import nat definitions.
17091 nat_makefile_frag=/dev/null
17092 if test "${gdb_native}" = "yes"; then
17093 . ${srcdir}/configure.nat
17094 nativefile=$NAT_FILE
17095 fi
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107 if test x"${gdb_osabi}" != x ; then
17108
17109 cat >>confdefs.h <<_ACEOF
17110 #define GDB_OSABI_DEFAULT $gdb_osabi
17111 _ACEOF
17112
17113 fi
17114
17115 # Enable multi-ice-gdb-server.
17116 # Check whether --enable-multi-ice was given.
17117 if test "${enable_multi_ice+set}" = set; then :
17118 enableval=$enable_multi_ice; case $enableval in
17119 yes | no)
17120 ;;
17121 *) as_fn_error $? "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;;
17122 esac
17123 fi
17124
17125 if test "x$enable_multi_ice" = xyes; then
17126 subdirs="$subdirs multi-ice"
17127
17128 fi
17129
17130 # Check whether --enable-gdbserver was given.
17131 if test "${enable_gdbserver+set}" = set; then :
17132 enableval=$enable_gdbserver; case "${enableval}" in
17133 yes| no|auto) ;;
17134 *) as_fn_error $? "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;;
17135 esac
17136 else
17137 enable_gdbserver=auto
17138 fi
17139
17140
17141 # We only build gdbserver automatically in a native configuration, and
17142 # only if the user did not explicitly disable its build.
17143 if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then
17144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5
17145 $as_echo_n "checking whether gdbserver is supported on this host... " >&6; }
17146 if test "x$build_gdbserver" = xyes; then
17147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17148 $as_echo "yes" >&6; }
17149 subdirs="$subdirs gdbserver"
17150
17151 gdbserver_build_enabled=yes
17152 else
17153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17154 $as_echo "no" >&6; }
17155 fi
17156 fi
17157
17158 # If the user explicitly request the gdbserver to be built, verify that
17159 # we were in fact able to enable it.
17160 if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then
17161 as_fn_error $? "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5
17162 fi
17163
17164 # Check for babeltrace and babeltrace-ctf
17165
17166 # Check whether --with-babeltrace was given.
17167 if test "${with_babeltrace+set}" = set; then :
17168 withval=$with_babeltrace;
17169 else
17170 with_babeltrace=auto
17171 fi
17172
17173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17174 $as_echo_n "checking whether to use babeltrace... " >&6; }
17175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17176 $as_echo "$with_babeltrace" >&6; }
17177
17178 if test "x$with_babeltrace" = "xno"; then
17179 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17180 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17181 else
17182 # Append -Werror to CFLAGS so that configure can catch the warning
17183 # "assignment from incompatible pointer type", which is related to
17184 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17185 # in GDB, while babeltrace 1.0.3 is broken.
17186 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17187 # safe to save and restore CFLAGS here.
17188 saved_CFLAGS=$CFLAGS
17189 CFLAGS="$CFLAGS -Werror"
17190
17191
17192
17193
17194
17195
17196
17197
17198 use_additional=yes
17199
17200 acl_save_prefix="$prefix"
17201 prefix="$acl_final_prefix"
17202 acl_save_exec_prefix="$exec_prefix"
17203 exec_prefix="$acl_final_exec_prefix"
17204
17205 eval additional_includedir=\"$includedir\"
17206 eval additional_libdir=\"$libdir\"
17207
17208 exec_prefix="$acl_save_exec_prefix"
17209 prefix="$acl_save_prefix"
17210
17211
17212 # Check whether --with-libbabeltrace-prefix was given.
17213 if test "${with_libbabeltrace_prefix+set}" = set; then :
17214 withval=$with_libbabeltrace_prefix;
17215 if test "X$withval" = "Xno"; then
17216 use_additional=no
17217 else
17218 if test "X$withval" = "X"; then
17219
17220 acl_save_prefix="$prefix"
17221 prefix="$acl_final_prefix"
17222 acl_save_exec_prefix="$exec_prefix"
17223 exec_prefix="$acl_final_exec_prefix"
17224
17225 eval additional_includedir=\"$includedir\"
17226 eval additional_libdir=\"$libdir\"
17227
17228 exec_prefix="$acl_save_exec_prefix"
17229 prefix="$acl_save_prefix"
17230
17231 else
17232 additional_includedir="$withval/include"
17233 additional_libdir="$withval/lib"
17234 fi
17235 fi
17236
17237 fi
17238
17239 LIBBABELTRACE=
17240 LTLIBBABELTRACE=
17241 INCBABELTRACE=
17242 rpathdirs=
17243 ltrpathdirs=
17244 names_already_handled=
17245 names_next_round='babeltrace babeltrace-ctf'
17246 while test -n "$names_next_round"; do
17247 names_this_round="$names_next_round"
17248 names_next_round=
17249 for name in $names_this_round; do
17250 already_handled=
17251 for n in $names_already_handled; do
17252 if test "$n" = "$name"; then
17253 already_handled=yes
17254 break
17255 fi
17256 done
17257 if test -z "$already_handled"; then
17258 names_already_handled="$names_already_handled $name"
17259 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17260 eval value=\"\$HAVE_LIB$uppername\"
17261 if test -n "$value"; then
17262 if test "$value" = yes; then
17263 eval value=\"\$LIB$uppername\"
17264 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17265 eval value=\"\$LTLIB$uppername\"
17266 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17267 else
17268 :
17269 fi
17270 else
17271 found_dir=
17272 found_la=
17273 found_so=
17274 found_a=
17275 if test $use_additional = yes; then
17276 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17277 found_dir="$additional_libdir"
17278 found_so="$additional_libdir/lib$name.$shlibext"
17279 if test -f "$additional_libdir/lib$name.la"; then
17280 found_la="$additional_libdir/lib$name.la"
17281 fi
17282 else
17283 if test -f "$additional_libdir/lib$name.$libext"; then
17284 found_dir="$additional_libdir"
17285 found_a="$additional_libdir/lib$name.$libext"
17286 if test -f "$additional_libdir/lib$name.la"; then
17287 found_la="$additional_libdir/lib$name.la"
17288 fi
17289 fi
17290 fi
17291 fi
17292 if test "X$found_dir" = "X"; then
17293 for x in $LDFLAGS $LTLIBBABELTRACE; do
17294
17295 acl_save_prefix="$prefix"
17296 prefix="$acl_final_prefix"
17297 acl_save_exec_prefix="$exec_prefix"
17298 exec_prefix="$acl_final_exec_prefix"
17299 eval x=\"$x\"
17300 exec_prefix="$acl_save_exec_prefix"
17301 prefix="$acl_save_prefix"
17302
17303 case "$x" in
17304 -L*)
17305 dir=`echo "X$x" | sed -e 's/^X-L//'`
17306 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17307 found_dir="$dir"
17308 found_so="$dir/lib$name.$shlibext"
17309 if test -f "$dir/lib$name.la"; then
17310 found_la="$dir/lib$name.la"
17311 fi
17312 else
17313 if test -f "$dir/lib$name.$libext"; then
17314 found_dir="$dir"
17315 found_a="$dir/lib$name.$libext"
17316 if test -f "$dir/lib$name.la"; then
17317 found_la="$dir/lib$name.la"
17318 fi
17319 fi
17320 fi
17321 ;;
17322 esac
17323 if test "X$found_dir" != "X"; then
17324 break
17325 fi
17326 done
17327 fi
17328 if test "X$found_dir" != "X"; then
17329 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
17330 if test "X$found_so" != "X"; then
17331 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17332 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17333 else
17334 haveit=
17335 for x in $ltrpathdirs; do
17336 if test "X$x" = "X$found_dir"; then
17337 haveit=yes
17338 break
17339 fi
17340 done
17341 if test -z "$haveit"; then
17342 ltrpathdirs="$ltrpathdirs $found_dir"
17343 fi
17344 if test "$hardcode_direct" = yes; then
17345 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17346 else
17347 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17348 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17349 haveit=
17350 for x in $rpathdirs; do
17351 if test "X$x" = "X$found_dir"; then
17352 haveit=yes
17353 break
17354 fi
17355 done
17356 if test -z "$haveit"; then
17357 rpathdirs="$rpathdirs $found_dir"
17358 fi
17359 else
17360 haveit=
17361 for x in $LDFLAGS $LIBBABELTRACE; do
17362
17363 acl_save_prefix="$prefix"
17364 prefix="$acl_final_prefix"
17365 acl_save_exec_prefix="$exec_prefix"
17366 exec_prefix="$acl_final_exec_prefix"
17367 eval x=\"$x\"
17368 exec_prefix="$acl_save_exec_prefix"
17369 prefix="$acl_save_prefix"
17370
17371 if test "X$x" = "X-L$found_dir"; then
17372 haveit=yes
17373 break
17374 fi
17375 done
17376 if test -z "$haveit"; then
17377 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
17378 fi
17379 if test "$hardcode_minus_L" != no; then
17380 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
17381 else
17382 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17383 fi
17384 fi
17385 fi
17386 fi
17387 else
17388 if test "X$found_a" != "X"; then
17389 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
17390 else
17391 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
17392 fi
17393 fi
17394 additional_includedir=
17395 case "$found_dir" in
17396 */lib | */lib/)
17397 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17398 additional_includedir="$basedir/include"
17399 ;;
17400 esac
17401 if test "X$additional_includedir" != "X"; then
17402 if test "X$additional_includedir" != "X/usr/include"; then
17403 haveit=
17404 if test "X$additional_includedir" = "X/usr/local/include"; then
17405 if test -n "$GCC"; then
17406 case $host_os in
17407 linux*) haveit=yes;;
17408 esac
17409 fi
17410 fi
17411 if test -z "$haveit"; then
17412 for x in $CPPFLAGS $INCBABELTRACE; do
17413
17414 acl_save_prefix="$prefix"
17415 prefix="$acl_final_prefix"
17416 acl_save_exec_prefix="$exec_prefix"
17417 exec_prefix="$acl_final_exec_prefix"
17418 eval x=\"$x\"
17419 exec_prefix="$acl_save_exec_prefix"
17420 prefix="$acl_save_prefix"
17421
17422 if test "X$x" = "X-I$additional_includedir"; then
17423 haveit=yes
17424 break
17425 fi
17426 done
17427 if test -z "$haveit"; then
17428 if test -d "$additional_includedir"; then
17429 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
17430 fi
17431 fi
17432 fi
17433 fi
17434 fi
17435 if test -n "$found_la"; then
17436 save_libdir="$libdir"
17437 case "$found_la" in
17438 */* | *\\*) . "$found_la" ;;
17439 *) . "./$found_la" ;;
17440 esac
17441 libdir="$save_libdir"
17442 for dep in $dependency_libs; do
17443 case "$dep" in
17444 -L*)
17445 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17446 if test "X$additional_libdir" != "X/usr/lib"; then
17447 haveit=
17448 if test "X$additional_libdir" = "X/usr/local/lib"; then
17449 if test -n "$GCC"; then
17450 case $host_os in
17451 linux*) haveit=yes;;
17452 esac
17453 fi
17454 fi
17455 if test -z "$haveit"; then
17456 haveit=
17457 for x in $LDFLAGS $LIBBABELTRACE; do
17458
17459 acl_save_prefix="$prefix"
17460 prefix="$acl_final_prefix"
17461 acl_save_exec_prefix="$exec_prefix"
17462 exec_prefix="$acl_final_exec_prefix"
17463 eval x=\"$x\"
17464 exec_prefix="$acl_save_exec_prefix"
17465 prefix="$acl_save_prefix"
17466
17467 if test "X$x" = "X-L$additional_libdir"; then
17468 haveit=yes
17469 break
17470 fi
17471 done
17472 if test -z "$haveit"; then
17473 if test -d "$additional_libdir"; then
17474 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
17475 fi
17476 fi
17477 haveit=
17478 for x in $LDFLAGS $LTLIBBABELTRACE; do
17479
17480 acl_save_prefix="$prefix"
17481 prefix="$acl_final_prefix"
17482 acl_save_exec_prefix="$exec_prefix"
17483 exec_prefix="$acl_final_exec_prefix"
17484 eval x=\"$x\"
17485 exec_prefix="$acl_save_exec_prefix"
17486 prefix="$acl_save_prefix"
17487
17488 if test "X$x" = "X-L$additional_libdir"; then
17489 haveit=yes
17490 break
17491 fi
17492 done
17493 if test -z "$haveit"; then
17494 if test -d "$additional_libdir"; then
17495 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
17496 fi
17497 fi
17498 fi
17499 fi
17500 ;;
17501 -R*)
17502 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17503 if test "$enable_rpath" != no; then
17504 haveit=
17505 for x in $rpathdirs; do
17506 if test "X$x" = "X$dir"; then
17507 haveit=yes
17508 break
17509 fi
17510 done
17511 if test -z "$haveit"; then
17512 rpathdirs="$rpathdirs $dir"
17513 fi
17514 haveit=
17515 for x in $ltrpathdirs; do
17516 if test "X$x" = "X$dir"; then
17517 haveit=yes
17518 break
17519 fi
17520 done
17521 if test -z "$haveit"; then
17522 ltrpathdirs="$ltrpathdirs $dir"
17523 fi
17524 fi
17525 ;;
17526 -l*)
17527 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17528 ;;
17529 *.la)
17530 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17531 ;;
17532 *)
17533 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
17534 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
17535 ;;
17536 esac
17537 done
17538 fi
17539 else
17540 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
17541 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
17542 fi
17543 fi
17544 fi
17545 done
17546 done
17547 if test "X$rpathdirs" != "X"; then
17548 if test -n "$hardcode_libdir_separator"; then
17549 alldirs=
17550 for found_dir in $rpathdirs; do
17551 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17552 done
17553 acl_save_libdir="$libdir"
17554 libdir="$alldirs"
17555 eval flag=\"$hardcode_libdir_flag_spec\"
17556 libdir="$acl_save_libdir"
17557 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17558 else
17559 for found_dir in $rpathdirs; do
17560 acl_save_libdir="$libdir"
17561 libdir="$found_dir"
17562 eval flag=\"$hardcode_libdir_flag_spec\"
17563 libdir="$acl_save_libdir"
17564 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
17565 done
17566 fi
17567 fi
17568 if test "X$ltrpathdirs" != "X"; then
17569 for found_dir in $ltrpathdirs; do
17570 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
17571 done
17572 fi
17573
17574
17575 ac_save_CPPFLAGS="$CPPFLAGS"
17576
17577 for element in $INCBABELTRACE; do
17578 haveit=
17579 for x in $CPPFLAGS; do
17580
17581 acl_save_prefix="$prefix"
17582 prefix="$acl_final_prefix"
17583 acl_save_exec_prefix="$exec_prefix"
17584 exec_prefix="$acl_final_exec_prefix"
17585 eval x=\"$x\"
17586 exec_prefix="$acl_save_exec_prefix"
17587 prefix="$acl_save_prefix"
17588
17589 if test "X$x" = "X$element"; then
17590 haveit=yes
17591 break
17592 fi
17593 done
17594 if test -z "$haveit"; then
17595 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17596 fi
17597 done
17598
17599
17600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
17601 $as_echo_n "checking for libbabeltrace... " >&6; }
17602 if ${ac_cv_libbabeltrace+:} false; then :
17603 $as_echo_n "(cached) " >&6
17604 else
17605
17606 ac_save_LIBS="$LIBS"
17607 LIBS="$LIBS $LIBBABELTRACE"
17608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17609 /* end confdefs.h. */
17610 #include <babeltrace/babeltrace.h>
17611 #include <babeltrace/ctf/events.h>
17612 #include <babeltrace/ctf/iterator.h>
17613 int
17614 main ()
17615 {
17616 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
17617 struct bt_ctf_event *event = NULL;
17618 const struct bt_definition *scope;
17619
17620 pos->type = BT_SEEK_BEGIN;
17621 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
17622 scope = bt_ctf_get_top_level_scope (event,
17623 BT_STREAM_EVENT_HEADER);
17624 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
17625
17626 ;
17627 return 0;
17628 }
17629 _ACEOF
17630 if ac_fn_c_try_link "$LINENO"; then :
17631 ac_cv_libbabeltrace=yes
17632 else
17633 ac_cv_libbabeltrace=no
17634 fi
17635 rm -f core conftest.err conftest.$ac_objext \
17636 conftest$ac_exeext conftest.$ac_ext
17637 LIBS="$ac_save_LIBS"
17638
17639 fi
17640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
17641 $as_echo "$ac_cv_libbabeltrace" >&6; }
17642 if test "$ac_cv_libbabeltrace" = yes; then
17643 HAVE_LIBBABELTRACE=yes
17644
17645 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
17646
17647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
17648 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
17649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
17650 $as_echo "$LIBBABELTRACE" >&6; }
17651 else
17652 HAVE_LIBBABELTRACE=no
17653 CPPFLAGS="$ac_save_CPPFLAGS"
17654 LIBBABELTRACE=
17655 LTLIBBABELTRACE=
17656 fi
17657
17658
17659
17660
17661
17662
17663 CFLAGS=$saved_CFLAGS
17664
17665 if test "$HAVE_LIBBABELTRACE" != yes; then
17666 if test "$with_babeltrace" = yes; then
17667 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
17668 else
17669 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
17670 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
17671 fi
17672 fi
17673 fi
17674
17675 # If nativefile (NAT_FILE) is not set in configure.nat, we link to an
17676 # empty version.
17677
17678 files=
17679 links=
17680
17681 rm -f nm.h
17682 if test "${nativefile}" != ""; then
17683 case "${nativefile}" in
17684 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
17685 * ) GDB_NM_FILE="${nativefile}"
17686 esac
17687 files="${files} ${GDB_NM_FILE}"
17688 links="${links} nm.h"
17689
17690 cat >>confdefs.h <<_ACEOF
17691 #define GDB_NM_FILE "${GDB_NM_FILE}"
17692 _ACEOF
17693
17694 fi
17695
17696
17697 for ac_prog in xsltproc
17698 do
17699 # Extract the first word of "$ac_prog", so it can be a program name with args.
17700 set dummy $ac_prog; ac_word=$2
17701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17702 $as_echo_n "checking for $ac_word... " >&6; }
17703 if ${ac_cv_path_XSLTPROC+:} false; then :
17704 $as_echo_n "(cached) " >&6
17705 else
17706 case $XSLTPROC in
17707 [\\/]* | ?:[\\/]*)
17708 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
17709 ;;
17710 *)
17711 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17712 for as_dir in $PATH
17713 do
17714 IFS=$as_save_IFS
17715 test -z "$as_dir" && as_dir=.
17716 for ac_exec_ext in '' $ac_executable_extensions; do
17717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17718 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
17719 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17720 break 2
17721 fi
17722 done
17723 done
17724 IFS=$as_save_IFS
17725
17726 ;;
17727 esac
17728 fi
17729 XSLTPROC=$ac_cv_path_XSLTPROC
17730 if test -n "$XSLTPROC"; then
17731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
17732 $as_echo "$XSLTPROC" >&6; }
17733 else
17734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17735 $as_echo "no" >&6; }
17736 fi
17737
17738
17739 test -n "$XSLTPROC" && break
17740 done
17741 test -n "$XSLTPROC" || XSLTPROC="missing"
17742
17743 if test "x$USE_MAINTAINER_MODE" = xyes; then
17744 if test "${XSLTPROC}" = missing; then
17745 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
17746 fi
17747 fi
17748
17749
17750 ac_sources="$files"
17751 ac_dests="$links"
17752 while test -n "$ac_sources"; do
17753 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
17754 set $ac_sources; ac_source=$1; shift; ac_sources=$*
17755 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
17756 done
17757 ac_config_links="$ac_config_links $ac_config_links_1"
17758
17759
17760
17761
17762
17763 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
17764
17765
17766 if $development; then
17767
17768 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
17769
17770 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) common/selftest.o selftest-arch.o"
17771 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) common/selftest.c selftest-arch.c"
17772 fi
17773
17774
17775 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17776 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
17777 if test "x$GDB_TRANSFORM_NAME" = x; then
17778 GDB_TRANSFORM_NAME=gdb
17779 fi
17780
17781
17782
17783 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
17784 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
17785 if test "x$GCORE_TRANSFORM_NAME" = x; then
17786 GCORE_TRANSFORM_NAME=gcore
17787 fi
17788
17789
17790 ac_config_files="$ac_config_files gcore"
17791
17792 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile"
17793
17794
17795 cat >confcache <<\_ACEOF
17796 # This file is a shell script that caches the results of configure
17797 # tests run on this system so they can be shared between configure
17798 # scripts and configure runs, see configure's option --config-cache.
17799 # It is not useful on other systems. If it contains results you don't
17800 # want to keep, you may remove or edit it.
17801 #
17802 # config.status only pays attention to the cache file if you give it
17803 # the --recheck option to rerun configure.
17804 #
17805 # `ac_cv_env_foo' variables (set or unset) will be overridden when
17806 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17807 # following values.
17808
17809 _ACEOF
17810
17811 # The following way of writing the cache mishandles newlines in values,
17812 # but we know of no workaround that is simple, portable, and efficient.
17813 # So, we kill variables containing newlines.
17814 # Ultrix sh set writes to stderr and can't be redirected directly,
17815 # and sets the high bit in the cache file unless we assign to the vars.
17816 (
17817 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17818 eval ac_val=\$$ac_var
17819 case $ac_val in #(
17820 *${as_nl}*)
17821 case $ac_var in #(
17822 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17823 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17824 esac
17825 case $ac_var in #(
17826 _ | IFS | as_nl) ;; #(
17827 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17828 *) { eval $ac_var=; unset $ac_var;} ;;
17829 esac ;;
17830 esac
17831 done
17832
17833 (set) 2>&1 |
17834 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17835 *${as_nl}ac_space=\ *)
17836 # `set' does not quote correctly, so add quotes: double-quote
17837 # substitution turns \\\\ into \\, and sed turns \\ into \.
17838 sed -n \
17839 "s/'/'\\\\''/g;
17840 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17841 ;; #(
17842 *)
17843 # `set' quotes correctly as required by POSIX, so do not add quotes.
17844 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
17845 ;;
17846 esac |
17847 sort
17848 ) |
17849 sed '
17850 /^ac_cv_env_/b end
17851 t clear
17852 :clear
17853 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17854 t end
17855 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17856 :end' >>confcache
17857 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17858 if test -w "$cache_file"; then
17859 if test "x$cache_file" != "x/dev/null"; then
17860 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17861 $as_echo "$as_me: updating cache $cache_file" >&6;}
17862 if test ! -f "$cache_file" || test -h "$cache_file"; then
17863 cat confcache >"$cache_file"
17864 else
17865 case $cache_file in #(
17866 */* | ?:*)
17867 mv -f confcache "$cache_file"$$ &&
17868 mv -f "$cache_file"$$ "$cache_file" ;; #(
17869 *)
17870 mv -f confcache "$cache_file" ;;
17871 esac
17872 fi
17873 fi
17874 else
17875 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17876 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
17877 fi
17878 fi
17879 rm -f confcache
17880
17881 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17882 # Let make expand exec_prefix.
17883 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17884
17885 DEFS=-DHAVE_CONFIG_H
17886
17887 ac_libobjs=
17888 ac_ltlibobjs=
17889 U=
17890 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17891 # 1. Remove the extension, and $U if already installed.
17892 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17893 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17894 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17895 # will be set to the directory where LIBOBJS objects are built.
17896 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17897 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
17898 done
17899 LIBOBJS=$ac_libobjs
17900
17901 LTLIBOBJS=$ac_ltlibobjs
17902
17903
17904 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
17905 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
17906 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17907 fi
17908 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
17909 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
17910 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17911 fi
17912 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
17913 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
17914 Usually this means the macro was only invoked conditionally." "$LINENO" 5
17915 fi
17916
17917
17918 : "${CONFIG_STATUS=./config.status}"
17919 ac_write_fail=0
17920 ac_clean_files_save=$ac_clean_files
17921 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17922 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17923 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17924 as_write_fail=0
17925 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
17926 #! $SHELL
17927 # Generated by $as_me.
17928 # Run this file to recreate the current configuration.
17929 # Compiler output produced by configure, useful for debugging
17930 # configure, is in config.log if it exists.
17931
17932 debug=false
17933 ac_cs_recheck=false
17934 ac_cs_silent=false
17935
17936 SHELL=\${CONFIG_SHELL-$SHELL}
17937 export SHELL
17938 _ASEOF
17939 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17940 ## -------------------- ##
17941 ## M4sh Initialization. ##
17942 ## -------------------- ##
17943
17944 # Be more Bourne compatible
17945 DUALCASE=1; export DUALCASE # for MKS sh
17946 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
17947 emulate sh
17948 NULLCMD=:
17949 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
17950 # is contrary to our usage. Disable this feature.
17951 alias -g '${1+"$@"}'='"$@"'
17952 setopt NO_GLOB_SUBST
17953 else
17954 case `(set -o) 2>/dev/null` in #(
17955 *posix*) :
17956 set -o posix ;; #(
17957 *) :
17958 ;;
17959 esac
17960 fi
17961
17962
17963 as_nl='
17964 '
17965 export as_nl
17966 # Printing a long string crashes Solaris 7 /usr/bin/printf.
17967 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17968 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17969 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17970 # Prefer a ksh shell builtin over an external printf program on Solaris,
17971 # but without wasting forks for bash or zsh.
17972 if test -z "$BASH_VERSION$ZSH_VERSION" \
17973 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17974 as_echo='print -r --'
17975 as_echo_n='print -rn --'
17976 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17977 as_echo='printf %s\n'
17978 as_echo_n='printf %s'
17979 else
17980 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17981 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17982 as_echo_n='/usr/ucb/echo -n'
17983 else
17984 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17985 as_echo_n_body='eval
17986 arg=$1;
17987 case $arg in #(
17988 *"$as_nl"*)
17989 expr "X$arg" : "X\\(.*\\)$as_nl";
17990 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17991 esac;
17992 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17993 '
17994 export as_echo_n_body
17995 as_echo_n='sh -c $as_echo_n_body as_echo'
17996 fi
17997 export as_echo_body
17998 as_echo='sh -c $as_echo_body as_echo'
17999 fi
18000
18001 # The user is always right.
18002 if test "${PATH_SEPARATOR+set}" != set; then
18003 PATH_SEPARATOR=:
18004 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18005 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18006 PATH_SEPARATOR=';'
18007 }
18008 fi
18009
18010
18011 # IFS
18012 # We need space, tab and new line, in precisely that order. Quoting is
18013 # there to prevent editors from complaining about space-tab.
18014 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
18015 # splitting by setting IFS to empty value.)
18016 IFS=" "" $as_nl"
18017
18018 # Find who we are. Look in the path if we contain no directory separator.
18019 as_myself=
18020 case $0 in #((
18021 *[\\/]* ) as_myself=$0 ;;
18022 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18023 for as_dir in $PATH
18024 do
18025 IFS=$as_save_IFS
18026 test -z "$as_dir" && as_dir=.
18027 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18028 done
18029 IFS=$as_save_IFS
18030
18031 ;;
18032 esac
18033 # We did not find ourselves, most probably we were run as `sh COMMAND'
18034 # in which case we are not to be found in the path.
18035 if test "x$as_myself" = x; then
18036 as_myself=$0
18037 fi
18038 if test ! -f "$as_myself"; then
18039 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18040 exit 1
18041 fi
18042
18043 # Unset variables that we do not need and which cause bugs (e.g. in
18044 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
18045 # suppresses any "Segmentation fault" message there. '((' could
18046 # trigger a bug in pdksh 5.2.14.
18047 for as_var in BASH_ENV ENV MAIL MAILPATH
18048 do eval test x\${$as_var+set} = xset \
18049 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18050 done
18051 PS1='$ '
18052 PS2='> '
18053 PS4='+ '
18054
18055 # NLS nuisances.
18056 LC_ALL=C
18057 export LC_ALL
18058 LANGUAGE=C
18059 export LANGUAGE
18060
18061 # CDPATH.
18062 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18063
18064
18065 # as_fn_error STATUS ERROR [LINENO LOG_FD]
18066 # ----------------------------------------
18067 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18068 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
18069 # script with STATUS, using 1 if that was 0.
18070 as_fn_error ()
18071 {
18072 as_status=$1; test $as_status -eq 0 && as_status=1
18073 if test "$4"; then
18074 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18075 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
18076 fi
18077 $as_echo "$as_me: error: $2" >&2
18078 as_fn_exit $as_status
18079 } # as_fn_error
18080
18081
18082 # as_fn_set_status STATUS
18083 # -----------------------
18084 # Set $? to STATUS, without forking.
18085 as_fn_set_status ()
18086 {
18087 return $1
18088 } # as_fn_set_status
18089
18090 # as_fn_exit STATUS
18091 # -----------------
18092 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18093 as_fn_exit ()
18094 {
18095 set +e
18096 as_fn_set_status $1
18097 exit $1
18098 } # as_fn_exit
18099
18100 # as_fn_unset VAR
18101 # ---------------
18102 # Portably unset VAR.
18103 as_fn_unset ()
18104 {
18105 { eval $1=; unset $1;}
18106 }
18107 as_unset=as_fn_unset
18108 # as_fn_append VAR VALUE
18109 # ----------------------
18110 # Append the text in VALUE to the end of the definition contained in VAR. Take
18111 # advantage of any shell optimizations that allow amortized linear growth over
18112 # repeated appends, instead of the typical quadratic growth present in naive
18113 # implementations.
18114 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18115 eval 'as_fn_append ()
18116 {
18117 eval $1+=\$2
18118 }'
18119 else
18120 as_fn_append ()
18121 {
18122 eval $1=\$$1\$2
18123 }
18124 fi # as_fn_append
18125
18126 # as_fn_arith ARG...
18127 # ------------------
18128 # Perform arithmetic evaluation on the ARGs, and store the result in the
18129 # global $as_val. Take advantage of shells that can avoid forks. The arguments
18130 # must be portable across $(()) and expr.
18131 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18132 eval 'as_fn_arith ()
18133 {
18134 as_val=$(( $* ))
18135 }'
18136 else
18137 as_fn_arith ()
18138 {
18139 as_val=`expr "$@" || test $? -eq 1`
18140 }
18141 fi # as_fn_arith
18142
18143
18144 if expr a : '\(a\)' >/dev/null 2>&1 &&
18145 test "X`expr 00001 : '.*\(...\)'`" = X001; then
18146 as_expr=expr
18147 else
18148 as_expr=false
18149 fi
18150
18151 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18152 as_basename=basename
18153 else
18154 as_basename=false
18155 fi
18156
18157 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18158 as_dirname=dirname
18159 else
18160 as_dirname=false
18161 fi
18162
18163 as_me=`$as_basename -- "$0" ||
18164 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18165 X"$0" : 'X\(//\)$' \| \
18166 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18167 $as_echo X/"$0" |
18168 sed '/^.*\/\([^/][^/]*\)\/*$/{
18169 s//\1/
18170 q
18171 }
18172 /^X\/\(\/\/\)$/{
18173 s//\1/
18174 q
18175 }
18176 /^X\/\(\/\).*/{
18177 s//\1/
18178 q
18179 }
18180 s/.*/./; q'`
18181
18182 # Avoid depending upon Character Ranges.
18183 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18184 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18185 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18186 as_cr_digits='0123456789'
18187 as_cr_alnum=$as_cr_Letters$as_cr_digits
18188
18189 ECHO_C= ECHO_N= ECHO_T=
18190 case `echo -n x` in #(((((
18191 -n*)
18192 case `echo 'xy\c'` in
18193 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18194 xy) ECHO_C='\c';;
18195 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18196 ECHO_T=' ';;
18197 esac;;
18198 *)
18199 ECHO_N='-n';;
18200 esac
18201
18202 rm -f conf$$ conf$$.exe conf$$.file
18203 if test -d conf$$.dir; then
18204 rm -f conf$$.dir/conf$$.file
18205 else
18206 rm -f conf$$.dir
18207 mkdir conf$$.dir 2>/dev/null
18208 fi
18209 if (echo >conf$$.file) 2>/dev/null; then
18210 if ln -s conf$$.file conf$$ 2>/dev/null; then
18211 as_ln_s='ln -s'
18212 # ... but there are two gotchas:
18213 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18214 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
18215 # In both cases, we have to default to `cp -pR'.
18216 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
18217 as_ln_s='cp -pR'
18218 elif ln conf$$.file conf$$ 2>/dev/null; then
18219 as_ln_s=ln
18220 else
18221 as_ln_s='cp -pR'
18222 fi
18223 else
18224 as_ln_s='cp -pR'
18225 fi
18226 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18227 rmdir conf$$.dir 2>/dev/null
18228
18229
18230 # as_fn_mkdir_p
18231 # -------------
18232 # Create "$as_dir" as a directory, including parents if necessary.
18233 as_fn_mkdir_p ()
18234 {
18235
18236 case $as_dir in #(
18237 -*) as_dir=./$as_dir;;
18238 esac
18239 test -d "$as_dir" || eval $as_mkdir_p || {
18240 as_dirs=
18241 while :; do
18242 case $as_dir in #(
18243 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18244 *) as_qdir=$as_dir;;
18245 esac
18246 as_dirs="'$as_qdir' $as_dirs"
18247 as_dir=`$as_dirname -- "$as_dir" ||
18248 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18249 X"$as_dir" : 'X\(//\)[^/]' \| \
18250 X"$as_dir" : 'X\(//\)$' \| \
18251 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18252 $as_echo X"$as_dir" |
18253 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18254 s//\1/
18255 q
18256 }
18257 /^X\(\/\/\)[^/].*/{
18258 s//\1/
18259 q
18260 }
18261 /^X\(\/\/\)$/{
18262 s//\1/
18263 q
18264 }
18265 /^X\(\/\).*/{
18266 s//\1/
18267 q
18268 }
18269 s/.*/./; q'`
18270 test -d "$as_dir" && break
18271 done
18272 test -z "$as_dirs" || eval "mkdir $as_dirs"
18273 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
18274
18275
18276 } # as_fn_mkdir_p
18277 if mkdir -p . 2>/dev/null; then
18278 as_mkdir_p='mkdir -p "$as_dir"'
18279 else
18280 test -d ./-p && rmdir ./-p
18281 as_mkdir_p=false
18282 fi
18283
18284
18285 # as_fn_executable_p FILE
18286 # -----------------------
18287 # Test if FILE is an executable regular file.
18288 as_fn_executable_p ()
18289 {
18290 test -f "$1" && test -x "$1"
18291 } # as_fn_executable_p
18292 as_test_x='test -x'
18293 as_executable_p=as_fn_executable_p
18294
18295 # Sed expression to map a string onto a valid CPP name.
18296 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18297
18298 # Sed expression to map a string onto a valid variable name.
18299 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18300
18301
18302 exec 6>&1
18303 ## ----------------------------------- ##
18304 ## Main body of $CONFIG_STATUS script. ##
18305 ## ----------------------------------- ##
18306 _ASEOF
18307 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18308
18309 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18310 # Save the log message, to keep $0 and so on meaningful, and to
18311 # report actual input values of CONFIG_FILES etc. instead of their
18312 # values after options handling.
18313 ac_log="
18314 This file was extended by $as_me, which was
18315 generated by GNU Autoconf 2.69. Invocation command line was
18316
18317 CONFIG_FILES = $CONFIG_FILES
18318 CONFIG_HEADERS = $CONFIG_HEADERS
18319 CONFIG_LINKS = $CONFIG_LINKS
18320 CONFIG_COMMANDS = $CONFIG_COMMANDS
18321 $ $0 $@
18322
18323 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18324 "
18325
18326 _ACEOF
18327
18328 case $ac_config_files in *"
18329 "*) set x $ac_config_files; shift; ac_config_files=$*;;
18330 esac
18331
18332 case $ac_config_headers in *"
18333 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18334 esac
18335
18336
18337 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18338 # Files that config.status was made for.
18339 config_files="$ac_config_files"
18340 config_headers="$ac_config_headers"
18341 config_links="$ac_config_links"
18342 config_commands="$ac_config_commands"
18343
18344 _ACEOF
18345
18346 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18347 ac_cs_usage="\
18348 \`$as_me' instantiates files and other configuration actions
18349 from templates according to the current configuration. Unless the files
18350 and actions are specified as TAGs, all are instantiated by default.
18351
18352 Usage: $0 [OPTION]... [TAG]...
18353
18354 -h, --help print this help, then exit
18355 -V, --version print version number and configuration settings, then exit
18356 --config print configuration, then exit
18357 -q, --quiet, --silent
18358 do not print progress messages
18359 -d, --debug don't remove temporary files
18360 --recheck update $as_me by reconfiguring in the same conditions
18361 --file=FILE[:TEMPLATE]
18362 instantiate the configuration file FILE
18363 --header=FILE[:TEMPLATE]
18364 instantiate the configuration header FILE
18365
18366 Configuration files:
18367 $config_files
18368
18369 Configuration headers:
18370 $config_headers
18371
18372 Configuration links:
18373 $config_links
18374
18375 Configuration commands:
18376 $config_commands
18377
18378 Report bugs to the package provider."
18379
18380 _ACEOF
18381 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18382 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
18383 ac_cs_version="\\
18384 config.status
18385 configured by $0, generated by GNU Autoconf 2.69,
18386 with options \\"\$ac_cs_config\\"
18387
18388 Copyright (C) 2012 Free Software Foundation, Inc.
18389 This config.status script is free software; the Free Software Foundation
18390 gives unlimited permission to copy, distribute and modify it."
18391
18392 ac_pwd='$ac_pwd'
18393 srcdir='$srcdir'
18394 INSTALL='$INSTALL'
18395 AWK='$AWK'
18396 test -n "\$AWK" || AWK=awk
18397 _ACEOF
18398
18399 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18400 # The default lists apply if the user does not specify any file.
18401 ac_need_defaults=:
18402 while test $# != 0
18403 do
18404 case $1 in
18405 --*=?*)
18406 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18407 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
18408 ac_shift=:
18409 ;;
18410 --*=)
18411 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18412 ac_optarg=
18413 ac_shift=:
18414 ;;
18415 *)
18416 ac_option=$1
18417 ac_optarg=$2
18418 ac_shift=shift
18419 ;;
18420 esac
18421
18422 case $ac_option in
18423 # Handling of the options.
18424 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18425 ac_cs_recheck=: ;;
18426 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18427 $as_echo "$ac_cs_version"; exit ;;
18428 --config | --confi | --conf | --con | --co | --c )
18429 $as_echo "$ac_cs_config"; exit ;;
18430 --debug | --debu | --deb | --de | --d | -d )
18431 debug=: ;;
18432 --file | --fil | --fi | --f )
18433 $ac_shift
18434 case $ac_optarg in
18435 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18436 '') as_fn_error $? "missing file argument" ;;
18437 esac
18438 as_fn_append CONFIG_FILES " '$ac_optarg'"
18439 ac_need_defaults=false;;
18440 --header | --heade | --head | --hea )
18441 $ac_shift
18442 case $ac_optarg in
18443 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18444 esac
18445 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
18446 ac_need_defaults=false;;
18447 --he | --h)
18448 # Conflict between --help and --header
18449 as_fn_error $? "ambiguous option: \`$1'
18450 Try \`$0 --help' for more information.";;
18451 --help | --hel | -h )
18452 $as_echo "$ac_cs_usage"; exit ;;
18453 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18454 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18455 ac_cs_silent=: ;;
18456
18457 # This is an error.
18458 -*) as_fn_error $? "unrecognized option: \`$1'
18459 Try \`$0 --help' for more information." ;;
18460
18461 *) as_fn_append ac_config_targets " $1"
18462 ac_need_defaults=false ;;
18463
18464 esac
18465 shift
18466 done
18467
18468 ac_configure_extra_args=
18469
18470 if $ac_cs_silent; then
18471 exec 6>/dev/null
18472 ac_configure_extra_args="$ac_configure_extra_args --silent"
18473 fi
18474
18475 _ACEOF
18476 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18477 if \$ac_cs_recheck; then
18478 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18479 shift
18480 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18481 CONFIG_SHELL='$SHELL'
18482 export CONFIG_SHELL
18483 exec "\$@"
18484 fi
18485
18486 _ACEOF
18487 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18488 exec 5>>config.log
18489 {
18490 echo
18491 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18492 ## Running $as_me. ##
18493 _ASBOX
18494 $as_echo "$ac_log"
18495 } >&5
18496
18497 _ACEOF
18498 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18499 #
18500 # INIT-COMMANDS
18501 #
18502 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
18503
18504 _ACEOF
18505
18506 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18507
18508 # Handling of arguments.
18509 for ac_config_target in $ac_config_targets
18510 do
18511 case $ac_config_target in
18512 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
18513 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
18514 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
18515 "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
18516 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
18517 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18518 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
18519 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
18520 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
18521
18522 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
18523 esac
18524 done
18525
18526
18527 # If the user did not use the arguments to specify the items to instantiate,
18528 # then the envvar interface is used. Set only those that are not.
18529 # We use the long form for the default assignment because of an extremely
18530 # bizarre bug on SunOS 4.1.3.
18531 if $ac_need_defaults; then
18532 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18533 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18534 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18535 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18536 fi
18537
18538 # Have a temporary directory for convenience. Make it in the build tree
18539 # simply because there is no reason against having it here, and in addition,
18540 # creating and moving files from /tmp can sometimes cause problems.
18541 # Hook for its removal unless debugging.
18542 # Note that there is a small window in which the directory will not be cleaned:
18543 # after its creation but before its name has been assigned to `$tmp'.
18544 $debug ||
18545 {
18546 tmp= ac_tmp=
18547 trap 'exit_status=$?
18548 : "${ac_tmp:=$tmp}"
18549 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
18550 ' 0
18551 trap 'as_fn_exit 1' 1 2 13 15
18552 }
18553 # Create a (secure) tmp directory for tmp files.
18554
18555 {
18556 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
18557 test -d "$tmp"
18558 } ||
18559 {
18560 tmp=./conf$$-$RANDOM
18561 (umask 077 && mkdir "$tmp")
18562 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18563 ac_tmp=$tmp
18564
18565 # Set up the scripts for CONFIG_FILES section.
18566 # No need to generate them if there are no CONFIG_FILES.
18567 # This happens for instance with `./config.status config.h'.
18568 if test -n "$CONFIG_FILES"; then
18569
18570 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
18571 ac_cs_awk_getline=:
18572 ac_cs_awk_pipe_init=
18573 ac_cs_awk_read_file='
18574 while ((getline aline < (F[key])) > 0)
18575 print(aline)
18576 close(F[key])'
18577 ac_cs_awk_pipe_fini=
18578 else
18579 ac_cs_awk_getline=false
18580 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
18581 ac_cs_awk_read_file='
18582 print "|#_!!_#|"
18583 print "cat " F[key] " &&"
18584 '$ac_cs_awk_pipe_init
18585 # The final `:' finishes the AND list.
18586 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
18587 fi
18588 ac_cr=`echo X | tr X '\015'`
18589 # On cygwin, bash can eat \r inside `` if the user requested igncr.
18590 # But we know of no other shell where ac_cr would be empty at this
18591 # point, so we can use a bashism as a fallback.
18592 if test "x$ac_cr" = x; then
18593 eval ac_cr=\$\'\\r\'
18594 fi
18595 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18596 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
18597 ac_cs_awk_cr='\\r'
18598 else
18599 ac_cs_awk_cr=$ac_cr
18600 fi
18601
18602 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
18603 _ACEOF
18604
18605 # Create commands to substitute file output variables.
18606 {
18607 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
18608 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
18609 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
18610 echo "_ACAWK" &&
18611 echo "_ACEOF"
18612 } >conf$$files.sh &&
18613 . ./conf$$files.sh ||
18614 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18615 rm -f conf$$files.sh
18616
18617 {
18618 echo "cat >conf$$subs.awk <<_ACEOF" &&
18619 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18620 echo "_ACEOF"
18621 } >conf$$subs.sh ||
18622 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18623 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
18624 ac_delim='%!_!# '
18625 for ac_last_try in false false false false false :; do
18626 . ./conf$$subs.sh ||
18627 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18628
18629 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18630 if test $ac_delim_n = $ac_delim_num; then
18631 break
18632 elif $ac_last_try; then
18633 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18634 else
18635 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18636 fi
18637 done
18638 rm -f conf$$subs.sh
18639
18640 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18641 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
18642 _ACEOF
18643 sed -n '
18644 h
18645 s/^/S["/; s/!.*/"]=/
18646 p
18647 g
18648 s/^[^!]*!//
18649 :repl
18650 t repl
18651 s/'"$ac_delim"'$//
18652 t delim
18653 :nl
18654 h
18655 s/\(.\{148\}\)..*/\1/
18656 t more1
18657 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18658 p
18659 n
18660 b repl
18661 :more1
18662 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18663 p
18664 g
18665 s/.\{148\}//
18666 t nl
18667 :delim
18668 h
18669 s/\(.\{148\}\)..*/\1/
18670 t more2
18671 s/["\\]/\\&/g; s/^/"/; s/$/"/
18672 p
18673 b
18674 :more2
18675 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18676 p
18677 g
18678 s/.\{148\}//
18679 t delim
18680 ' <conf$$subs.awk | sed '
18681 /^[^""]/{
18682 N
18683 s/\n//
18684 }
18685 ' >>$CONFIG_STATUS || ac_write_fail=1
18686 rm -f conf$$subs.awk
18687 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18688 _ACAWK
18689 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
18690 for (key in S) S_is_set[key] = 1
18691 FS = "\a"
18692 \$ac_cs_awk_pipe_init
18693 }
18694 {
18695 line = $ 0
18696 nfields = split(line, field, "@")
18697 substed = 0
18698 len = length(field[1])
18699 for (i = 2; i < nfields; i++) {
18700 key = field[i]
18701 keylen = length(key)
18702 if (S_is_set[key]) {
18703 value = S[key]
18704 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18705 len += length(value) + length(field[++i])
18706 substed = 1
18707 } else
18708 len += 1 + keylen
18709 }
18710 if (nfields == 3 && !substed) {
18711 key = field[2]
18712 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18713 \$ac_cs_awk_read_file
18714 next
18715 }
18716 }
18717 print line
18718 }
18719 \$ac_cs_awk_pipe_fini
18720 _ACAWK
18721 _ACEOF
18722 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18723 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18724 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18725 else
18726 cat
18727 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18728 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
18729 _ACEOF
18730
18731 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18732 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
18733 # trailing colons and then remove the whole line if VPATH becomes empty
18734 # (actually we leave an empty line to preserve line numbers).
18735 if test "x$srcdir" = x.; then
18736 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18737 h
18738 s///
18739 s/^/:/
18740 s/[ ]*$/:/
18741 s/:\$(srcdir):/:/g
18742 s/:\${srcdir}:/:/g
18743 s/:@srcdir@:/:/g
18744 s/^:*//
18745 s/:*$//
18746 x
18747 s/\(=[ ]*\).*/\1/
18748 G
18749 s/\n//
18750 s/^[^=]*=[ ]*$//
18751 }'
18752 fi
18753
18754 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18755 fi # test -n "$CONFIG_FILES"
18756
18757 # Set up the scripts for CONFIG_HEADERS section.
18758 # No need to generate them if there are no CONFIG_HEADERS.
18759 # This happens for instance with `./config.status Makefile'.
18760 if test -n "$CONFIG_HEADERS"; then
18761 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
18762 BEGIN {
18763 _ACEOF
18764
18765 # Transform confdefs.h into an awk script `defines.awk', embedded as
18766 # here-document in config.status, that substitutes the proper values into
18767 # config.h.in to produce config.h.
18768
18769 # Create a delimiter string that does not exist in confdefs.h, to ease
18770 # handling of long lines.
18771 ac_delim='%!_!# '
18772 for ac_last_try in false false :; do
18773 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18774 if test -z "$ac_tt"; then
18775 break
18776 elif $ac_last_try; then
18777 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
18778 else
18779 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18780 fi
18781 done
18782
18783 # For the awk script, D is an array of macro values keyed by name,
18784 # likewise P contains macro parameters if any. Preserve backslash
18785 # newline sequences.
18786
18787 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18788 sed -n '
18789 s/.\{148\}/&'"$ac_delim"'/g
18790 t rset
18791 :rset
18792 s/^[ ]*#[ ]*define[ ][ ]*/ /
18793 t def
18794 d
18795 :def
18796 s/\\$//
18797 t bsnl
18798 s/["\\]/\\&/g
18799 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18800 D["\1"]=" \3"/p
18801 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18802 d
18803 :bsnl
18804 s/["\\]/\\&/g
18805 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18806 D["\1"]=" \3\\\\\\n"\\/p
18807 t cont
18808 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18809 t cont
18810 d
18811 :cont
18812 n
18813 s/.\{148\}/&'"$ac_delim"'/g
18814 t clear
18815 :clear
18816 s/\\$//
18817 t bsnlc
18818 s/["\\]/\\&/g; s/^/"/; s/$/"/p
18819 d
18820 :bsnlc
18821 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18822 b cont
18823 ' <confdefs.h | sed '
18824 s/'"$ac_delim"'/"\\\
18825 "/g' >>$CONFIG_STATUS || ac_write_fail=1
18826
18827 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18828 for (key in D) D_is_set[key] = 1
18829 FS = "\a"
18830 }
18831 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18832 line = \$ 0
18833 split(line, arg, " ")
18834 if (arg[1] == "#") {
18835 defundef = arg[2]
18836 mac1 = arg[3]
18837 } else {
18838 defundef = substr(arg[1], 2)
18839 mac1 = arg[2]
18840 }
18841 split(mac1, mac2, "(") #)
18842 macro = mac2[1]
18843 prefix = substr(line, 1, index(line, defundef) - 1)
18844 if (D_is_set[macro]) {
18845 # Preserve the white space surrounding the "#".
18846 print prefix "define", macro P[macro] D[macro]
18847 next
18848 } else {
18849 # Replace #undef with comments. This is necessary, for example,
18850 # in the case of _POSIX_SOURCE, which is predefined and required
18851 # on some systems where configure will not decide to define it.
18852 if (defundef == "undef") {
18853 print "/*", prefix defundef, macro, "*/"
18854 next
18855 }
18856 }
18857 }
18858 { print }
18859 _ACAWK
18860 _ACEOF
18861 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18862 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
18863 fi # test -n "$CONFIG_HEADERS"
18864
18865
18866 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
18867 shift
18868 for ac_tag
18869 do
18870 case $ac_tag in
18871 :[FHLC]) ac_mode=$ac_tag; continue;;
18872 esac
18873 case $ac_mode$ac_tag in
18874 :[FHL]*:*);;
18875 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
18876 :[FH]-) ac_tag=-:-;;
18877 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18878 esac
18879 ac_save_IFS=$IFS
18880 IFS=:
18881 set x $ac_tag
18882 IFS=$ac_save_IFS
18883 shift
18884 ac_file=$1
18885 shift
18886
18887 case $ac_mode in
18888 :L) ac_source=$1;;
18889 :[FH])
18890 ac_file_inputs=
18891 for ac_f
18892 do
18893 case $ac_f in
18894 -) ac_f="$ac_tmp/stdin";;
18895 *) # Look for the file first in the build tree, then in the source tree
18896 # (if the path is not absolute). The absolute path cannot be DOS-style,
18897 # because $ac_f cannot contain `:'.
18898 test -f "$ac_f" ||
18899 case $ac_f in
18900 [\\/$]*) false;;
18901 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18902 esac ||
18903 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
18904 esac
18905 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18906 as_fn_append ac_file_inputs " '$ac_f'"
18907 done
18908
18909 # Let's still pretend it is `configure' which instantiates (i.e., don't
18910 # use $as_me), people would be surprised to read:
18911 # /* config.h. Generated by config.status. */
18912 configure_input='Generated from '`
18913 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18914 `' by configure.'
18915 if test x"$ac_file" != x-; then
18916 configure_input="$ac_file. $configure_input"
18917 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18918 $as_echo "$as_me: creating $ac_file" >&6;}
18919 fi
18920 # Neutralize special characters interpreted by sed in replacement strings.
18921 case $configure_input in #(
18922 *\&* | *\|* | *\\* )
18923 ac_sed_conf_input=`$as_echo "$configure_input" |
18924 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18925 *) ac_sed_conf_input=$configure_input;;
18926 esac
18927
18928 case $ac_tag in
18929 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18930 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
18931 esac
18932 ;;
18933 esac
18934
18935 ac_dir=`$as_dirname -- "$ac_file" ||
18936 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18937 X"$ac_file" : 'X\(//\)[^/]' \| \
18938 X"$ac_file" : 'X\(//\)$' \| \
18939 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18940 $as_echo X"$ac_file" |
18941 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18942 s//\1/
18943 q
18944 }
18945 /^X\(\/\/\)[^/].*/{
18946 s//\1/
18947 q
18948 }
18949 /^X\(\/\/\)$/{
18950 s//\1/
18951 q
18952 }
18953 /^X\(\/\).*/{
18954 s//\1/
18955 q
18956 }
18957 s/.*/./; q'`
18958 as_dir="$ac_dir"; as_fn_mkdir_p
18959 ac_builddir=.
18960
18961 case "$ac_dir" in
18962 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18963 *)
18964 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18965 # A ".." for each directory in $ac_dir_suffix.
18966 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18967 case $ac_top_builddir_sub in
18968 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18969 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18970 esac ;;
18971 esac
18972 ac_abs_top_builddir=$ac_pwd
18973 ac_abs_builddir=$ac_pwd$ac_dir_suffix
18974 # for backward compatibility:
18975 ac_top_builddir=$ac_top_build_prefix
18976
18977 case $srcdir in
18978 .) # We are building in place.
18979 ac_srcdir=.
18980 ac_top_srcdir=$ac_top_builddir_sub
18981 ac_abs_top_srcdir=$ac_pwd ;;
18982 [\\/]* | ?:[\\/]* ) # Absolute name.
18983 ac_srcdir=$srcdir$ac_dir_suffix;
18984 ac_top_srcdir=$srcdir
18985 ac_abs_top_srcdir=$srcdir ;;
18986 *) # Relative name.
18987 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18988 ac_top_srcdir=$ac_top_build_prefix$srcdir
18989 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
18990 esac
18991 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
18992
18993
18994 case $ac_mode in
18995 :F)
18996 #
18997 # CONFIG_FILE
18998 #
18999
19000 case $INSTALL in
19001 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19002 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
19003 esac
19004 _ACEOF
19005
19006 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19007 # If the template does not know about datarootdir, expand it.
19008 # FIXME: This hack should be removed a few years after 2.60.
19009 ac_datarootdir_hack=; ac_datarootdir_seen=
19010 ac_sed_dataroot='
19011 /datarootdir/ {
19012 p
19013 q
19014 }
19015 /@datadir@/p
19016 /@docdir@/p
19017 /@infodir@/p
19018 /@localedir@/p
19019 /@mandir@/p'
19020 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19021 *datarootdir*) ac_datarootdir_seen=yes;;
19022 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19023 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19024 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19025 _ACEOF
19026 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19027 ac_datarootdir_hack='
19028 s&@datadir@&$datadir&g
19029 s&@docdir@&$docdir&g
19030 s&@infodir@&$infodir&g
19031 s&@localedir@&$localedir&g
19032 s&@mandir@&$mandir&g
19033 s&\\\${datarootdir}&$datarootdir&g' ;;
19034 esac
19035 _ACEOF
19036
19037 # Neutralize VPATH when `$srcdir' = `.'.
19038 # Shell code in configure.ac might set extrasub.
19039 # FIXME: do we really want to maintain this feature?
19040 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19041 ac_sed_extra="$ac_vpsub
19042 $extrasub
19043 _ACEOF
19044 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19045 :t
19046 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19047 s|@configure_input@|$ac_sed_conf_input|;t t
19048 s&@top_builddir@&$ac_top_builddir_sub&;t t
19049 s&@top_build_prefix@&$ac_top_build_prefix&;t t
19050 s&@srcdir@&$ac_srcdir&;t t
19051 s&@abs_srcdir@&$ac_abs_srcdir&;t t
19052 s&@top_srcdir@&$ac_top_srcdir&;t t
19053 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19054 s&@builddir@&$ac_builddir&;t t
19055 s&@abs_builddir@&$ac_abs_builddir&;t t
19056 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19057 s&@INSTALL@&$ac_INSTALL&;t t
19058 $ac_datarootdir_hack
19059 "
19060 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
19061 if $ac_cs_awk_getline; then
19062 $AWK -f "$ac_tmp/subs.awk"
19063 else
19064 $AWK -f "$ac_tmp/subs.awk" | $SHELL
19065 fi \
19066 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19067
19068 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
19069 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19070 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
19071 "$ac_tmp/out"`; test -z "$ac_out"; } &&
19072 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19073 which seems to be undefined. Please make sure it is defined" >&5
19074 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19075 which seems to be undefined. Please make sure it is defined" >&2;}
19076
19077 rm -f "$ac_tmp/stdin"
19078 case $ac_file in
19079 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19080 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
19081 esac \
19082 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19083 ;;
19084 :H)
19085 #
19086 # CONFIG_HEADER
19087 #
19088 if test x"$ac_file" != x-; then
19089 {
19090 $as_echo "/* $configure_input */" \
19091 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19092 } >"$ac_tmp/config.h" \
19093 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19094 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
19095 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19096 $as_echo "$as_me: $ac_file is unchanged" >&6;}
19097 else
19098 rm -f "$ac_file"
19099 mv "$ac_tmp/config.h" "$ac_file" \
19100 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19101 fi
19102 else
19103 $as_echo "/* $configure_input */" \
19104 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
19105 || as_fn_error $? "could not create -" "$LINENO" 5
19106 fi
19107 ;;
19108 :L)
19109 #
19110 # CONFIG_LINK
19111 #
19112
19113 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
19114 :
19115 else
19116 # Prefer the file from the source tree if names are identical.
19117 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
19118 ac_source=$srcdir/$ac_source
19119 fi
19120
19121 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
19122 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
19123
19124 if test ! -r "$ac_source"; then
19125 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
19126 fi
19127 rm -f "$ac_file"
19128
19129 # Try a relative symlink, then a hard link, then a copy.
19130 case $ac_source in
19131 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
19132 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
19133 esac
19134 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
19135 ln "$ac_source" "$ac_file" 2>/dev/null ||
19136 cp -p "$ac_source" "$ac_file" ||
19137 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
19138 fi
19139 ;;
19140 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
19141 $as_echo "$as_me: executing $ac_file commands" >&6;}
19142 ;;
19143 esac
19144
19145
19146 case $ac_file$ac_mode in
19147 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
19148 "gcore":F) chmod +x gcore ;;
19149 "Makefile":F)
19150 case x$CONFIG_HEADERS in
19151 xconfig.h:config.in)
19152 echo > stamp-h ;;
19153 esac
19154 ;;
19155 "gdb-gdb.gdb":F)
19156 case x$CONFIG_HEADERS in
19157 xconfig.h:config.in)
19158 echo > stamp-h ;;
19159 esac
19160 ;;
19161 "doc/Makefile":F)
19162 case x$CONFIG_HEADERS in
19163 xconfig.h:config.in)
19164 echo > stamp-h ;;
19165 esac
19166 ;;
19167 "data-directory/Makefile":F)
19168 case x$CONFIG_HEADERS in
19169 xconfig.h:config.in)
19170 echo > stamp-h ;;
19171 esac
19172 ;;
19173
19174 esac
19175 done # for ac_tag
19176
19177
19178 as_fn_exit 0
19179 _ACEOF
19180 ac_clean_files=$ac_clean_files_save
19181
19182 test $ac_write_fail = 0 ||
19183 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
19184
19185
19186 # configure is writing to config.log, and then calls config.status.
19187 # config.status does its own redirection, appending to config.log.
19188 # Unfortunately, on DOS this fails, as config.log is still kept open
19189 # by configure, so config.status won't be able to write to it; its
19190 # output is simply discarded. So we exec the FD to /dev/null,
19191 # effectively closing config.log, so it can be properly (re)opened and
19192 # appended to by config.status. When coming back to configure, we
19193 # need to make the FD available again.
19194 if test "$no_create" != yes; then
19195 ac_cs_success=:
19196 ac_config_status_args=
19197 test "$silent" = yes &&
19198 ac_config_status_args="$ac_config_status_args --quiet"
19199 exec 5>/dev/null
19200 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19201 exec 5>>config.log
19202 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19203 # would make configure fail if this is the last instruction.
19204 $ac_cs_success || as_fn_exit 1
19205 fi
19206
19207 #
19208 # CONFIG_SUBDIRS section.
19209 #
19210 if test "$no_recursion" != yes; then
19211
19212 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
19213 # so they do not pile up.
19214 ac_sub_configure_args=
19215 ac_prev=
19216 eval "set x $ac_configure_args"
19217 shift
19218 for ac_arg
19219 do
19220 if test -n "$ac_prev"; then
19221 ac_prev=
19222 continue
19223 fi
19224 case $ac_arg in
19225 -cache-file | --cache-file | --cache-fil | --cache-fi \
19226 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19227 ac_prev=cache_file ;;
19228 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
19229 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
19230 | --c=*)
19231 ;;
19232 --config-cache | -C)
19233 ;;
19234 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
19235 ac_prev=srcdir ;;
19236 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
19237 ;;
19238 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
19239 ac_prev=prefix ;;
19240 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
19241 ;;
19242 --disable-option-checking)
19243 ;;
19244 *)
19245 case $ac_arg in
19246 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
19247 esac
19248 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
19249 esac
19250 done
19251
19252 # Always prepend --prefix to ensure using the same prefix
19253 # in subdir configurations.
19254 ac_arg="--prefix=$prefix"
19255 case $ac_arg in
19256 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
19257 esac
19258 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
19259
19260 # Pass --silent
19261 if test "$silent" = yes; then
19262 ac_sub_configure_args="--silent $ac_sub_configure_args"
19263 fi
19264
19265 # Always prepend --disable-option-checking to silence warnings, since
19266 # different subdirs can have different --enable and --with options.
19267 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
19268
19269 ac_popdir=`pwd`
19270 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
19271
19272 # Do not complain, so a configure script can configure whichever
19273 # parts of a large source tree are present.
19274 test -d "$srcdir/$ac_dir" || continue
19275
19276 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
19277 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
19278 $as_echo "$ac_msg" >&6
19279 as_dir="$ac_dir"; as_fn_mkdir_p
19280 ac_builddir=.
19281
19282 case "$ac_dir" in
19283 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19284 *)
19285 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19286 # A ".." for each directory in $ac_dir_suffix.
19287 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19288 case $ac_top_builddir_sub in
19289 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19290 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19291 esac ;;
19292 esac
19293 ac_abs_top_builddir=$ac_pwd
19294 ac_abs_builddir=$ac_pwd$ac_dir_suffix
19295 # for backward compatibility:
19296 ac_top_builddir=$ac_top_build_prefix
19297
19298 case $srcdir in
19299 .) # We are building in place.
19300 ac_srcdir=.
19301 ac_top_srcdir=$ac_top_builddir_sub
19302 ac_abs_top_srcdir=$ac_pwd ;;
19303 [\\/]* | ?:[\\/]* ) # Absolute name.
19304 ac_srcdir=$srcdir$ac_dir_suffix;
19305 ac_top_srcdir=$srcdir
19306 ac_abs_top_srcdir=$srcdir ;;
19307 *) # Relative name.
19308 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19309 ac_top_srcdir=$ac_top_build_prefix$srcdir
19310 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19311 esac
19312 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19313
19314
19315 cd "$ac_dir"
19316
19317 # Check for guested configure; otherwise get Cygnus style configure.
19318 if test -f "$ac_srcdir/configure.gnu"; then
19319 ac_sub_configure=$ac_srcdir/configure.gnu
19320 elif test -f "$ac_srcdir/configure"; then
19321 ac_sub_configure=$ac_srcdir/configure
19322 elif test -f "$ac_srcdir/configure.in"; then
19323 # This should be Cygnus configure.
19324 ac_sub_configure=$ac_aux_dir/configure
19325 else
19326 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
19327 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
19328 ac_sub_configure=
19329 fi
19330
19331 # The recursion is here.
19332 if test -n "$ac_sub_configure"; then
19333 # Make the cache file name correct relative to the subdirectory.
19334 case $cache_file in
19335 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
19336 *) # Relative name.
19337 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
19338 esac
19339
19340 { $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
19341 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
19342 # The eval makes quoting arguments work.
19343 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
19344 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
19345 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
19346 fi
19347
19348 cd "$ac_popdir"
19349 done
19350 fi
19351 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19352 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19353 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19354 fi
19355