PKG_CHECK_MODULES: Check if $pkg_cv_[]$1[]_LIBS works
[deliverable/binutils-gdb.git] / gdb / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24 else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50 else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order. Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" "" $as_nl"
88
89 # Find who we are. Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100 IFS=$as_save_IFS
101
102 ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107 as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there. '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168 else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174 esac
175 fi
176 "
177 as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191 exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202 else
203 as_have_required=no
204 fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225 fi
226 fi
227 done;;
228 esac
229 as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271 fi
272 exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290 { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299 return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365 test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378 else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395 else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422 else
423 as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434 else
435 as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509 *)
510 ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516 else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534 else
535 as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542 else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME=
579 PACKAGE_TARNAME=
580 PACKAGE_VERSION=
581 PACKAGE_STRING=
582 PACKAGE_BUGREPORT=
583 PACKAGE_URL=
584
585 ac_unique_file="main.c"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 # include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 # include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 enable_option_checking=no
623 ac_header_list=
624 ac_subst_vars='LTLIBOBJS
625 LIBOBJS
626 GCORE_TRANSFORM_NAME
627 GDB_TRANSFORM_NAME
628 XSLTPROC
629 NM_H
630 GDB_NM_FILE
631 LTLIBXXHASH
632 LIBXXHASH
633 HAVE_LIBXXHASH
634 CTF_DEPS
635 LIBCTF
636 ENABLE_LIBCTF
637 LTLIBBABELTRACE
638 LIBBABELTRACE
639 HAVE_LIBBABELTRACE
640 HAVE_NATIVE_GCORE_HOST
641 NAT_GENERATED_FILES
642 XM_CLIBS
643 MH_CFLAGS
644 LOADLIBES
645 NAT_CDEPS
646 NATDEPFILES
647 NAT_FILE
648 target_subdir
649 CONFIG_UNINSTALL
650 CONFIG_INSTALL
651 CONFIG_CLEAN
652 CONFIG_ALL
653 CONFIG_SRCS
654 CONFIG_DEPS
655 CONFIG_OBS
656 PROFILE_CFLAGS
657 ENABLE_CFLAGS
658 SIM_OBS
659 SIM
660 XMKMF
661 GDBTK_SRC_DIR
662 GDBTK_CFLAGS
663 GDBTKLIBS
664 X_LIBS
665 X_LDFLAGS
666 X_CFLAGS
667 TK_XINCLUDES
668 TK_DEPS
669 TK_LIBRARY
670 TK_INCLUDE
671 TK_STUB_LIB_SPEC
672 TK_STUB_LIB_FLAG
673 TK_STUB_LIB_FILE
674 TK_LIB_SPEC
675 TK_LIB_FLAG
676 TK_LIB_FILE
677 TK_SRC_DIR
678 TK_BIN_DIR
679 TK_VERSION
680 TCL_DEPS
681 TCL_LIBRARY
682 TCL_INCLUDE
683 TCL_STUB_LIB_SPEC
684 TCL_STUB_LIB_FLAG
685 TCL_STUB_LIB_FILE
686 TCL_LIB_SPEC
687 TCL_LIB_FLAG
688 TCL_LIB_FILE
689 TCL_SRC_DIR
690 TCL_BIN_DIR
691 TCL_PATCH_LEVEL
692 TCL_VERSION
693 WIN32LDAPP
694 WIN32LIBS
695 GUI_CFLAGS_X
696 LIBGUI
697 LTLIBLZMA
698 LIBLZMA
699 HAVE_LIBLZMA
700 SER_HARDWIRE
701 WERROR_CFLAGS
702 WARN_CFLAGS
703 SYSTEM_GDBINIT_DIR
704 SYSTEM_GDBINIT
705 TARGET_SYSTEM_ROOT
706 CONFIG_LDFLAGS
707 RDYNAMIC
708 LTLIBIPT
709 LIBIPT
710 HAVE_LIBIPT
711 PTHREAD_CFLAGS
712 PTHREAD_LIBS
713 PTHREAD_CC
714 ax_pthread_config
715 SED
716 ALLOCA
717 SRCHIGH_CFLAGS
718 SRCHIGH_LIBS
719 HAVE_GUILE_FALSE
720 HAVE_GUILE_TRUE
721 GUILE_LIBS
722 GUILE_CPPFLAGS
723 GUILD_TARGET_FLAG
724 GUILD
725 pkg_config_prog_path
726 HAVE_PYTHON_FALSE
727 HAVE_PYTHON_TRUE
728 PYTHON_LIBS
729 PYTHON_CPPFLAGS
730 PYTHON_CFLAGS
731 python_prog_path
732 LTLIBMPFR
733 LIBMPFR
734 HAVE_LIBMPFR
735 LTLIBEXPAT
736 LIBEXPAT
737 HAVE_LIBEXPAT
738 JIT_READER_DIR
739 TARGET_PTR
740 READLINE_TEXI_INCFLAG
741 READLINE_CFLAGS
742 READLINE_DEPS
743 READLINE
744 LTLIBICONV
745 LIBICONV
746 zlibinc
747 zlibdir
748 MIG
749 WINDRES
750 DLLTOOL
751 AR
752 YFLAGS
753 YACC
754 RANLIB
755 LN_S
756 INSTALL_DATA
757 INSTALL_SCRIPT
758 INSTALL_PROGRAM
759 AWK
760 REPORT_BUGS_TEXI
761 REPORT_BUGS_TO
762 PKGVERSION
763 CODESIGN_CERT
764 DEBUGINFOD_LIBS
765 DEBUGINFOD_CFLAGS
766 PKG_CONFIG_LIBDIR
767 PKG_CONFIG_PATH
768 PKG_CONFIG
769 HAVE_NATIVE_GCORE_TARGET
770 TARGET_OBS
771 subdirs
772 GDB_DATADIR
773 DEBUGDIR
774 MAKEINFO_EXTRA_FLAGS
775 MAKEINFOFLAGS
776 MAKEINFO
777 PACKAGE
778 CATOBJEXT
779 GENCAT
780 INSTOBJEXT
781 DATADIRNAME
782 CATALOGS
783 POSUB
784 GMSGFMT
785 XGETTEXT
786 INCINTL
787 LIBINTL_DEP
788 LIBINTL
789 USE_NLS
790 CCDEPMODE
791 DEPDIR
792 am__leading_dot
793 CXX_DIALECT
794 HAVE_CXX11
795 INSTALL_STRIP_PROGRAM
796 STRIP
797 install_sh
798 target_os
799 target_vendor
800 target_cpu
801 target
802 host_os
803 host_vendor
804 host_cpu
805 host
806 build_os
807 build_vendor
808 build_cpu
809 build
810 EGREP
811 GREP
812 CPP
813 ac_ct_CXX
814 CXXFLAGS
815 CXX
816 OBJEXT
817 EXEEXT
818 ac_ct_CC
819 CPPFLAGS
820 LDFLAGS
821 CFLAGS
822 CC
823 MAINT
824 MAINTAINER_MODE_FALSE
825 MAINTAINER_MODE_TRUE
826 target_alias
827 host_alias
828 build_alias
829 LIBS
830 ECHO_T
831 ECHO_N
832 ECHO_C
833 DEFS
834 mandir
835 localedir
836 libdir
837 psdir
838 pdfdir
839 dvidir
840 htmldir
841 infodir
842 docdir
843 oldincludedir
844 includedir
845 localstatedir
846 sharedstatedir
847 sysconfdir
848 datadir
849 datarootdir
850 libexecdir
851 sbindir
852 bindir
853 program_transform_name
854 prefix
855 exec_prefix
856 PACKAGE_URL
857 PACKAGE_BUGREPORT
858 PACKAGE_STRING
859 PACKAGE_VERSION
860 PACKAGE_TARNAME
861 PACKAGE_NAME
862 PATH_SEPARATOR
863 SHELL'
864 ac_subst_files='nat_makefile_frag'
865 ac_user_opts='
866 enable_option_checking
867 enable_maintainer_mode
868 enable_plugins
869 enable_largefile
870 with_separate_debug_dir
871 with_gdb_datadir
872 with_relocated_sources
873 with_auto_load_dir
874 with_auto_load_safe_path
875 enable_targets
876 enable_64_bit_bfd
877 enable_gdbmi
878 enable_tui
879 enable_gdbtk
880 with_debuginfod
881 with_libunwind_ia64
882 with_curses
883 enable_profiling
884 enable_codesign
885 with_pkgversion
886 with_bugurl
887 with_system_zlib
888 with_gnu_ld
889 enable_rpath
890 with_libiconv_prefix
891 with_libiconv_type
892 with_iconv_bin
893 with_system_readline
894 with_jit_reader_dir
895 with_expat
896 with_libexpat_prefix
897 with_libexpat_type
898 with_mpfr
899 with_libmpfr_prefix
900 with_libmpfr_type
901 with_python
902 with_python_libdir
903 with_guile
904 enable_source_highlight
905 with_intel_pt
906 with_libipt_prefix
907 with_libipt_type
908 with_included_regex
909 with_sysroot
910 with_system_gdbinit
911 with_system_gdbinit_dir
912 enable_werror
913 enable_build_warnings
914 enable_gdb_build_warnings
915 enable_ubsan
916 with_lzma
917 with_liblzma_prefix
918 with_liblzma_type
919 with_tcl
920 with_tk
921 with_x
922 enable_sim
923 with_babeltrace
924 with_libbabeltrace_prefix
925 with_libbabeltrace_type
926 with_xxhash
927 enable_libctf
928 with_libxxhash_prefix
929 with_libxxhash_type
930 enable_unit_tests
931 '
932 ac_precious_vars='build_alias
933 host_alias
934 target_alias
935 CC
936 CFLAGS
937 LDFLAGS
938 LIBS
939 CPPFLAGS
940 CXX
941 CXXFLAGS
942 CCC
943 CPP
944 MAKEINFO
945 MAKEINFOFLAGS
946 PKG_CONFIG
947 PKG_CONFIG_PATH
948 PKG_CONFIG_LIBDIR
949 DEBUGINFOD_CFLAGS
950 DEBUGINFOD_LIBS
951 YACC
952 YFLAGS
953 XMKMF'
954 ac_subdirs_all='testsuite
955 gdbtk'
956
957 # Initialize some variables set by options.
958 ac_init_help=
959 ac_init_version=false
960 ac_unrecognized_opts=
961 ac_unrecognized_sep=
962 # The variables have the same names as the options, with
963 # dashes changed to underlines.
964 cache_file=/dev/null
965 exec_prefix=NONE
966 no_create=
967 no_recursion=
968 prefix=NONE
969 program_prefix=NONE
970 program_suffix=NONE
971 program_transform_name=s,x,x,
972 silent=
973 site=
974 srcdir=
975 verbose=
976 x_includes=NONE
977 x_libraries=NONE
978
979 # Installation directory options.
980 # These are left unexpanded so users can "make install exec_prefix=/foo"
981 # and all the variables that are supposed to be based on exec_prefix
982 # by default will actually change.
983 # Use braces instead of parens because sh, perl, etc. also accept them.
984 # (The list follows the same order as the GNU Coding Standards.)
985 bindir='${exec_prefix}/bin'
986 sbindir='${exec_prefix}/sbin'
987 libexecdir='${exec_prefix}/libexec'
988 datarootdir='${prefix}/share'
989 datadir='${datarootdir}'
990 sysconfdir='${prefix}/etc'
991 sharedstatedir='${prefix}/com'
992 localstatedir='${prefix}/var'
993 includedir='${prefix}/include'
994 oldincludedir='/usr/include'
995 docdir='${datarootdir}/doc/${PACKAGE}'
996 infodir='${datarootdir}/info'
997 htmldir='${docdir}'
998 dvidir='${docdir}'
999 pdfdir='${docdir}'
1000 psdir='${docdir}'
1001 libdir='${exec_prefix}/lib'
1002 localedir='${datarootdir}/locale'
1003 mandir='${datarootdir}/man'
1004
1005 ac_prev=
1006 ac_dashdash=
1007 for ac_option
1008 do
1009 # If the previous option needs an argument, assign it.
1010 if test -n "$ac_prev"; then
1011 eval $ac_prev=\$ac_option
1012 ac_prev=
1013 continue
1014 fi
1015
1016 case $ac_option in
1017 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1018 *=) ac_optarg= ;;
1019 *) ac_optarg=yes ;;
1020 esac
1021
1022 # Accept the important Cygnus configure options, so we can diagnose typos.
1023
1024 case $ac_dashdash$ac_option in
1025 --)
1026 ac_dashdash=yes ;;
1027
1028 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1029 ac_prev=bindir ;;
1030 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1031 bindir=$ac_optarg ;;
1032
1033 -build | --build | --buil | --bui | --bu)
1034 ac_prev=build_alias ;;
1035 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1036 build_alias=$ac_optarg ;;
1037
1038 -cache-file | --cache-file | --cache-fil | --cache-fi \
1039 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1040 ac_prev=cache_file ;;
1041 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1042 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1043 cache_file=$ac_optarg ;;
1044
1045 --config-cache | -C)
1046 cache_file=config.cache ;;
1047
1048 -datadir | --datadir | --datadi | --datad)
1049 ac_prev=datadir ;;
1050 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1051 datadir=$ac_optarg ;;
1052
1053 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1054 | --dataroo | --dataro | --datar)
1055 ac_prev=datarootdir ;;
1056 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1057 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1058 datarootdir=$ac_optarg ;;
1059
1060 -disable-* | --disable-*)
1061 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1062 # Reject names that are not valid shell variable names.
1063 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1064 as_fn_error $? "invalid feature name: $ac_useropt"
1065 ac_useropt_orig=$ac_useropt
1066 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1067 case $ac_user_opts in
1068 *"
1069 "enable_$ac_useropt"
1070 "*) ;;
1071 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1072 ac_unrecognized_sep=', ';;
1073 esac
1074 eval enable_$ac_useropt=no ;;
1075
1076 -docdir | --docdir | --docdi | --doc | --do)
1077 ac_prev=docdir ;;
1078 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1079 docdir=$ac_optarg ;;
1080
1081 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1082 ac_prev=dvidir ;;
1083 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1084 dvidir=$ac_optarg ;;
1085
1086 -enable-* | --enable-*)
1087 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1088 # Reject names that are not valid shell variable names.
1089 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1090 as_fn_error $? "invalid feature name: $ac_useropt"
1091 ac_useropt_orig=$ac_useropt
1092 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1093 case $ac_user_opts in
1094 *"
1095 "enable_$ac_useropt"
1096 "*) ;;
1097 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1098 ac_unrecognized_sep=', ';;
1099 esac
1100 eval enable_$ac_useropt=\$ac_optarg ;;
1101
1102 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1103 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1104 | --exec | --exe | --ex)
1105 ac_prev=exec_prefix ;;
1106 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1107 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1108 | --exec=* | --exe=* | --ex=*)
1109 exec_prefix=$ac_optarg ;;
1110
1111 -gas | --gas | --ga | --g)
1112 # Obsolete; use --with-gas.
1113 with_gas=yes ;;
1114
1115 -help | --help | --hel | --he | -h)
1116 ac_init_help=long ;;
1117 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1118 ac_init_help=recursive ;;
1119 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1120 ac_init_help=short ;;
1121
1122 -host | --host | --hos | --ho)
1123 ac_prev=host_alias ;;
1124 -host=* | --host=* | --hos=* | --ho=*)
1125 host_alias=$ac_optarg ;;
1126
1127 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1128 ac_prev=htmldir ;;
1129 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1130 | --ht=*)
1131 htmldir=$ac_optarg ;;
1132
1133 -includedir | --includedir | --includedi | --included | --include \
1134 | --includ | --inclu | --incl | --inc)
1135 ac_prev=includedir ;;
1136 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1137 | --includ=* | --inclu=* | --incl=* | --inc=*)
1138 includedir=$ac_optarg ;;
1139
1140 -infodir | --infodir | --infodi | --infod | --info | --inf)
1141 ac_prev=infodir ;;
1142 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1143 infodir=$ac_optarg ;;
1144
1145 -libdir | --libdir | --libdi | --libd)
1146 ac_prev=libdir ;;
1147 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1148 libdir=$ac_optarg ;;
1149
1150 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1151 | --libexe | --libex | --libe)
1152 ac_prev=libexecdir ;;
1153 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1154 | --libexe=* | --libex=* | --libe=*)
1155 libexecdir=$ac_optarg ;;
1156
1157 -localedir | --localedir | --localedi | --localed | --locale)
1158 ac_prev=localedir ;;
1159 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1160 localedir=$ac_optarg ;;
1161
1162 -localstatedir | --localstatedir | --localstatedi | --localstated \
1163 | --localstate | --localstat | --localsta | --localst | --locals)
1164 ac_prev=localstatedir ;;
1165 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1166 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1167 localstatedir=$ac_optarg ;;
1168
1169 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1170 ac_prev=mandir ;;
1171 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1172 mandir=$ac_optarg ;;
1173
1174 -nfp | --nfp | --nf)
1175 # Obsolete; use --without-fp.
1176 with_fp=no ;;
1177
1178 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1179 | --no-cr | --no-c | -n)
1180 no_create=yes ;;
1181
1182 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1183 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1184 no_recursion=yes ;;
1185
1186 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1187 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1188 | --oldin | --oldi | --old | --ol | --o)
1189 ac_prev=oldincludedir ;;
1190 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1191 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1192 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1193 oldincludedir=$ac_optarg ;;
1194
1195 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1196 ac_prev=prefix ;;
1197 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1198 prefix=$ac_optarg ;;
1199
1200 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1201 | --program-pre | --program-pr | --program-p)
1202 ac_prev=program_prefix ;;
1203 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1204 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1205 program_prefix=$ac_optarg ;;
1206
1207 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1208 | --program-suf | --program-su | --program-s)
1209 ac_prev=program_suffix ;;
1210 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1211 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1212 program_suffix=$ac_optarg ;;
1213
1214 -program-transform-name | --program-transform-name \
1215 | --program-transform-nam | --program-transform-na \
1216 | --program-transform-n | --program-transform- \
1217 | --program-transform | --program-transfor \
1218 | --program-transfo | --program-transf \
1219 | --program-trans | --program-tran \
1220 | --progr-tra | --program-tr | --program-t)
1221 ac_prev=program_transform_name ;;
1222 -program-transform-name=* | --program-transform-name=* \
1223 | --program-transform-nam=* | --program-transform-na=* \
1224 | --program-transform-n=* | --program-transform-=* \
1225 | --program-transform=* | --program-transfor=* \
1226 | --program-transfo=* | --program-transf=* \
1227 | --program-trans=* | --program-tran=* \
1228 | --progr-tra=* | --program-tr=* | --program-t=*)
1229 program_transform_name=$ac_optarg ;;
1230
1231 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1232 ac_prev=pdfdir ;;
1233 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1234 pdfdir=$ac_optarg ;;
1235
1236 -psdir | --psdir | --psdi | --psd | --ps)
1237 ac_prev=psdir ;;
1238 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1239 psdir=$ac_optarg ;;
1240
1241 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1242 | -silent | --silent | --silen | --sile | --sil)
1243 silent=yes ;;
1244
1245 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1246 ac_prev=sbindir ;;
1247 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1248 | --sbi=* | --sb=*)
1249 sbindir=$ac_optarg ;;
1250
1251 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1252 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1253 | --sharedst | --shareds | --shared | --share | --shar \
1254 | --sha | --sh)
1255 ac_prev=sharedstatedir ;;
1256 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1257 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1258 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1259 | --sha=* | --sh=*)
1260 sharedstatedir=$ac_optarg ;;
1261
1262 -site | --site | --sit)
1263 ac_prev=site ;;
1264 -site=* | --site=* | --sit=*)
1265 site=$ac_optarg ;;
1266
1267 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1268 ac_prev=srcdir ;;
1269 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1270 srcdir=$ac_optarg ;;
1271
1272 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1273 | --syscon | --sysco | --sysc | --sys | --sy)
1274 ac_prev=sysconfdir ;;
1275 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1276 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1277 sysconfdir=$ac_optarg ;;
1278
1279 -target | --target | --targe | --targ | --tar | --ta | --t)
1280 ac_prev=target_alias ;;
1281 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1282 target_alias=$ac_optarg ;;
1283
1284 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1285 verbose=yes ;;
1286
1287 -version | --version | --versio | --versi | --vers | -V)
1288 ac_init_version=: ;;
1289
1290 -with-* | --with-*)
1291 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1292 # Reject names that are not valid shell variable names.
1293 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1294 as_fn_error $? "invalid package name: $ac_useropt"
1295 ac_useropt_orig=$ac_useropt
1296 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1297 case $ac_user_opts in
1298 *"
1299 "with_$ac_useropt"
1300 "*) ;;
1301 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1302 ac_unrecognized_sep=', ';;
1303 esac
1304 eval with_$ac_useropt=\$ac_optarg ;;
1305
1306 -without-* | --without-*)
1307 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1308 # Reject names that are not valid shell variable names.
1309 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1310 as_fn_error $? "invalid package name: $ac_useropt"
1311 ac_useropt_orig=$ac_useropt
1312 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1313 case $ac_user_opts in
1314 *"
1315 "with_$ac_useropt"
1316 "*) ;;
1317 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1318 ac_unrecognized_sep=', ';;
1319 esac
1320 eval with_$ac_useropt=no ;;
1321
1322 --x)
1323 # Obsolete; use --with-x.
1324 with_x=yes ;;
1325
1326 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1327 | --x-incl | --x-inc | --x-in | --x-i)
1328 ac_prev=x_includes ;;
1329 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1330 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1331 x_includes=$ac_optarg ;;
1332
1333 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1334 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1335 ac_prev=x_libraries ;;
1336 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1337 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1338 x_libraries=$ac_optarg ;;
1339
1340 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1341 Try \`$0 --help' for more information"
1342 ;;
1343
1344 *=*)
1345 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1346 # Reject names that are not valid shell variable names.
1347 case $ac_envvar in #(
1348 '' | [0-9]* | *[!_$as_cr_alnum]* )
1349 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1350 esac
1351 eval $ac_envvar=\$ac_optarg
1352 export $ac_envvar ;;
1353
1354 *)
1355 # FIXME: should be removed in autoconf 3.0.
1356 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1357 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1358 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1359 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1360 ;;
1361
1362 esac
1363 done
1364
1365 if test -n "$ac_prev"; then
1366 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1367 as_fn_error $? "missing argument to $ac_option"
1368 fi
1369
1370 if test -n "$ac_unrecognized_opts"; then
1371 case $enable_option_checking in
1372 no) ;;
1373 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1374 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1375 esac
1376 fi
1377
1378 # Check all directory arguments for consistency.
1379 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1380 datadir sysconfdir sharedstatedir localstatedir includedir \
1381 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1382 libdir localedir mandir
1383 do
1384 eval ac_val=\$$ac_var
1385 # Remove trailing slashes.
1386 case $ac_val in
1387 */ )
1388 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1389 eval $ac_var=\$ac_val;;
1390 esac
1391 # Be sure to have absolute directory names.
1392 case $ac_val in
1393 [\\/$]* | ?:[\\/]* ) continue;;
1394 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1395 esac
1396 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1397 done
1398
1399 # There might be people who depend on the old broken behavior: `$host'
1400 # used to hold the argument of --host etc.
1401 # FIXME: To remove some day.
1402 build=$build_alias
1403 host=$host_alias
1404 target=$target_alias
1405
1406 # FIXME: To remove some day.
1407 if test "x$host_alias" != x; then
1408 if test "x$build_alias" = x; then
1409 cross_compiling=maybe
1410 elif test "x$build_alias" != "x$host_alias"; then
1411 cross_compiling=yes
1412 fi
1413 fi
1414
1415 ac_tool_prefix=
1416 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1417
1418 test "$silent" = yes && exec 6>/dev/null
1419
1420
1421 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1422 ac_ls_di=`ls -di .` &&
1423 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1424 as_fn_error $? "working directory cannot be determined"
1425 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1426 as_fn_error $? "pwd does not report name of working directory"
1427
1428
1429 # Find the source files, if location was not specified.
1430 if test -z "$srcdir"; then
1431 ac_srcdir_defaulted=yes
1432 # Try the directory containing this script, then the parent directory.
1433 ac_confdir=`$as_dirname -- "$as_myself" ||
1434 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1435 X"$as_myself" : 'X\(//\)[^/]' \| \
1436 X"$as_myself" : 'X\(//\)$' \| \
1437 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1438 $as_echo X"$as_myself" |
1439 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1440 s//\1/
1441 q
1442 }
1443 /^X\(\/\/\)[^/].*/{
1444 s//\1/
1445 q
1446 }
1447 /^X\(\/\/\)$/{
1448 s//\1/
1449 q
1450 }
1451 /^X\(\/\).*/{
1452 s//\1/
1453 q
1454 }
1455 s/.*/./; q'`
1456 srcdir=$ac_confdir
1457 if test ! -r "$srcdir/$ac_unique_file"; then
1458 srcdir=..
1459 fi
1460 else
1461 ac_srcdir_defaulted=no
1462 fi
1463 if test ! -r "$srcdir/$ac_unique_file"; then
1464 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1465 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1466 fi
1467 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1468 ac_abs_confdir=`(
1469 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1470 pwd)`
1471 # When building in place, set srcdir=.
1472 if test "$ac_abs_confdir" = "$ac_pwd"; then
1473 srcdir=.
1474 fi
1475 # Remove unnecessary trailing slashes from srcdir.
1476 # Double slashes in file names in object file debugging info
1477 # mess up M-x gdb in Emacs.
1478 case $srcdir in
1479 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1480 esac
1481 for ac_var in $ac_precious_vars; do
1482 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1483 eval ac_env_${ac_var}_value=\$${ac_var}
1484 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1485 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1486 done
1487
1488 #
1489 # Report the --help message.
1490 #
1491 if test "$ac_init_help" = "long"; then
1492 # Omit some internal or obsolete options to make the list less imposing.
1493 # This message is too long to be a string in the A/UX 3.1 sh.
1494 cat <<_ACEOF
1495 \`configure' configures this package to adapt to many kinds of systems.
1496
1497 Usage: $0 [OPTION]... [VAR=VALUE]...
1498
1499 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1500 VAR=VALUE. See below for descriptions of some of the useful variables.
1501
1502 Defaults for the options are specified in brackets.
1503
1504 Configuration:
1505 -h, --help display this help and exit
1506 --help=short display options specific to this package
1507 --help=recursive display the short help of all the included packages
1508 -V, --version display version information and exit
1509 -q, --quiet, --silent do not print \`checking ...' messages
1510 --cache-file=FILE cache test results in FILE [disabled]
1511 -C, --config-cache alias for \`--cache-file=config.cache'
1512 -n, --no-create do not create output files
1513 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1514
1515 Installation directories:
1516 --prefix=PREFIX install architecture-independent files in PREFIX
1517 [$ac_default_prefix]
1518 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1519 [PREFIX]
1520
1521 By default, \`make install' will install all the files in
1522 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1523 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1524 for instance \`--prefix=\$HOME'.
1525
1526 For better control, use the options below.
1527
1528 Fine tuning of the installation directories:
1529 --bindir=DIR user executables [EPREFIX/bin]
1530 --sbindir=DIR system admin executables [EPREFIX/sbin]
1531 --libexecdir=DIR program executables [EPREFIX/libexec]
1532 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1533 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1534 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1535 --libdir=DIR object code libraries [EPREFIX/lib]
1536 --includedir=DIR C header files [PREFIX/include]
1537 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1538 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1539 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1540 --infodir=DIR info documentation [DATAROOTDIR/info]
1541 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1542 --mandir=DIR man documentation [DATAROOTDIR/man]
1543 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1544 --htmldir=DIR html documentation [DOCDIR]
1545 --dvidir=DIR dvi documentation [DOCDIR]
1546 --pdfdir=DIR pdf documentation [DOCDIR]
1547 --psdir=DIR ps documentation [DOCDIR]
1548 _ACEOF
1549
1550 cat <<\_ACEOF
1551
1552 Program names:
1553 --program-prefix=PREFIX prepend PREFIX to installed program names
1554 --program-suffix=SUFFIX append SUFFIX to installed program names
1555 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1556
1557 X features:
1558 --x-includes=DIR X include files are in DIR
1559 --x-libraries=DIR X library files are in DIR
1560
1561 System types:
1562 --build=BUILD configure for building on BUILD [guessed]
1563 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1564 --target=TARGET configure for building compilers for TARGET [HOST]
1565 _ACEOF
1566 fi
1567
1568 if test -n "$ac_init_help"; then
1569
1570 cat <<\_ACEOF
1571
1572 Optional Features:
1573 --disable-option-checking ignore unrecognized --enable/--with options
1574 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1575 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1576 --enable-maintainer-mode
1577 enable make rules and dependencies not useful (and
1578 sometimes confusing) to the casual installer
1579 --enable-plugins Enable support for plugins
1580 --disable-largefile omit support for large files
1581 --enable-targets=TARGETS
1582 alternative target configurations
1583 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
1584 --disable-gdbmi disable machine-interface (MI)
1585 --enable-tui enable full-screen terminal user interface (TUI)
1586 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1587 --enable-profiling enable profiling of GDB
1588 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
1589 --disable-rpath do not hardcode runtime library paths
1590 --enable-source-highlight
1591 enable source-highlight for source listings
1592 --enable-werror treat compile warnings as errors
1593 --enable-build-warnings enable build-time compiler warnings if gcc is used
1594 --enable-gdb-build-warnings
1595 enable GDB specific build-time compiler warnings if
1596 gcc is used
1597 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
1598 --enable-sim link gdb with simulator
1599 --enable-libctf Handle .ctf type-info sections [default=yes]
1600 --enable-unit-tests Enable the inclusion of unit tests when compiling
1601 GDB
1602
1603 Optional Packages:
1604 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1605 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1606 --with-separate-debug-dir=PATH
1607 look for global separate debug info in this path
1608 [LIBDIR/debug]
1609 --with-gdb-datadir=PATH look for global separate data files in this path
1610 [DATADIR/gdb]
1611 --with-relocated-sources=PATH
1612 automatically relocate this path for source files
1613 --with-auto-load-dir=PATH
1614 directories from which to load auto-loaded scripts
1615 [$debugdir:$datadir/auto-load]
1616 --with-auto-load-safe-path=PATH
1617 directories safe to hold auto-loaded files
1618 [--with-auto-load-dir]
1619 --without-auto-load-safe-path
1620 do not restrict auto-loaded files locations
1621 --with-debuginfod Enable debuginfo lookups with debuginfod
1622 (auto/yes/no)
1623 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
1624 --with-curses use the curses library instead of the termcap
1625 library
1626 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1627 --with-bugurl=URL Direct users to URL to report a bug
1628 --with-system-zlib use installed libz
1629 --with-gnu-ld assume the C compiler uses GNU ld default=no
1630 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1631 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1632 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
1633 --with-iconv-bin=PATH specify where to find the iconv program
1634 --with-system-readline use installed readline library
1635 --with-jit-reader-dir=PATH
1636 directory to load the JIT readers from
1637 --with-expat include expat support (auto/yes/no)
1638 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1639 --without-libexpat-prefix don't search for libexpat in includedir and libdir
1640 --with-libexpat-type=TYPE type of library to search for (auto/static/shared)
1641 --with-mpfr include MPFR support (auto/yes/no)
1642 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1643 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
1644 --with-libmpfr-type=TYPE type of library to search for (auto/static/shared)
1645 --with-python[=PYTHON] include python support
1646 (auto/yes/no/<python-program>)
1647 --with-python-libdir[=DIR]
1648 search for python's libraries in DIR
1649 --with-guile[=GUILE] include guile support
1650 (auto/yes/no/<guile-version>/<pkg-config-program>)
1651 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1652 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1653 --without-libipt-prefix don't search for libipt in includedir and libdir
1654 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
1655 --without-included-regex
1656 don't use included regex; this is the default on
1657 systems with version 2 of the GNU C library (use
1658 with caution on other system)
1659 --with-sysroot[=DIR] search for usr/lib et al within DIR
1660 --with-system-gdbinit=PATH
1661 automatically load a system-wide gdbinit file
1662 --with-system-gdbinit-dir=PATH
1663 automatically load system-wide gdbinit files from
1664 this directory
1665 --with-lzma support lzma compression (auto/yes/no)
1666 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1667 --without-liblzma-prefix don't search for liblzma in includedir and libdir
1668 --with-liblzma-type=TYPE type of library to search for (auto/static/shared)
1669 --with-tcl directory containing tcl configuration (tclConfig.sh)
1670 --with-tk directory containing tk configuration (tkConfig.sh)
1671 --with-x use the X Window System
1672 --with-babeltrace include babeltrace support (auto/yes/no)
1673 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1674 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
1675 --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared)
1676 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1677 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1678 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
1679 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
1680
1681 Some influential environment variables:
1682 CC C compiler command
1683 CFLAGS C compiler flags
1684 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1685 nonstandard directory <lib dir>
1686 LIBS libraries to pass to the linker, e.g. -l<library>
1687 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1688 you have headers in a nonstandard directory <include dir>
1689 CXX C++ compiler command
1690 CXXFLAGS C++ compiler flags
1691 CPP C preprocessor
1692 MAKEINFO Parent configure detects if it is of sufficient version.
1693 MAKEINFOFLAGS
1694 Parameters for MAKEINFO.
1695 PKG_CONFIG path to pkg-config utility
1696 PKG_CONFIG_PATH
1697 directories to add to pkg-config's search path
1698 PKG_CONFIG_LIBDIR
1699 path overriding pkg-config's built-in search path
1700 DEBUGINFOD_CFLAGS
1701 C compiler flags for DEBUGINFOD, overriding pkg-config
1702 DEBUGINFOD_LIBS
1703 linker flags for DEBUGINFOD, overriding pkg-config
1704 YACC The `Yet Another Compiler Compiler' implementation to use.
1705 Defaults to the first program found out of: `bison -y', `byacc',
1706 `yacc'.
1707 YFLAGS The list of arguments that will be passed by default to $YACC.
1708 This script will default YFLAGS to the empty string to avoid a
1709 default value of `-d' given by some make applications.
1710 XMKMF Path to xmkmf, Makefile generator for X Window System
1711
1712 Use these variables to override the choices made by `configure' or to help
1713 it to find libraries and programs with nonstandard names/locations.
1714
1715 Report bugs to the package provider.
1716 _ACEOF
1717 ac_status=$?
1718 fi
1719
1720 if test "$ac_init_help" = "recursive"; then
1721 # If there are subdirs, report their specific --help.
1722 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1723 test -d "$ac_dir" ||
1724 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1725 continue
1726 ac_builddir=.
1727
1728 case "$ac_dir" in
1729 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1730 *)
1731 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1732 # A ".." for each directory in $ac_dir_suffix.
1733 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1734 case $ac_top_builddir_sub in
1735 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1736 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1737 esac ;;
1738 esac
1739 ac_abs_top_builddir=$ac_pwd
1740 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1741 # for backward compatibility:
1742 ac_top_builddir=$ac_top_build_prefix
1743
1744 case $srcdir in
1745 .) # We are building in place.
1746 ac_srcdir=.
1747 ac_top_srcdir=$ac_top_builddir_sub
1748 ac_abs_top_srcdir=$ac_pwd ;;
1749 [\\/]* | ?:[\\/]* ) # Absolute name.
1750 ac_srcdir=$srcdir$ac_dir_suffix;
1751 ac_top_srcdir=$srcdir
1752 ac_abs_top_srcdir=$srcdir ;;
1753 *) # Relative name.
1754 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1755 ac_top_srcdir=$ac_top_build_prefix$srcdir
1756 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1757 esac
1758 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1759
1760 cd "$ac_dir" || { ac_status=$?; continue; }
1761 # Check for guested configure.
1762 if test -f "$ac_srcdir/configure.gnu"; then
1763 echo &&
1764 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1765 elif test -f "$ac_srcdir/configure"; then
1766 echo &&
1767 $SHELL "$ac_srcdir/configure" --help=recursive
1768 else
1769 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1770 fi || ac_status=$?
1771 cd "$ac_pwd" || { ac_status=$?; break; }
1772 done
1773 fi
1774
1775 test -n "$ac_init_help" && exit $ac_status
1776 if $ac_init_version; then
1777 cat <<\_ACEOF
1778 configure
1779 generated by GNU Autoconf 2.69
1780
1781 Copyright (C) 2012 Free Software Foundation, Inc.
1782 This configure script is free software; the Free Software Foundation
1783 gives unlimited permission to copy, distribute and modify it.
1784 _ACEOF
1785 exit
1786 fi
1787
1788 ## ------------------------ ##
1789 ## Autoconf initialization. ##
1790 ## ------------------------ ##
1791
1792 # ac_fn_c_try_compile LINENO
1793 # --------------------------
1794 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1795 ac_fn_c_try_compile ()
1796 {
1797 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1798 rm -f conftest.$ac_objext
1799 if { { ac_try="$ac_compile"
1800 case "(($ac_try" in
1801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1802 *) ac_try_echo=$ac_try;;
1803 esac
1804 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1805 $as_echo "$ac_try_echo"; } >&5
1806 (eval "$ac_compile") 2>conftest.err
1807 ac_status=$?
1808 if test -s conftest.err; then
1809 grep -v '^ *+' conftest.err >conftest.er1
1810 cat conftest.er1 >&5
1811 mv -f conftest.er1 conftest.err
1812 fi
1813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1814 test $ac_status = 0; } && {
1815 test -z "$ac_c_werror_flag" ||
1816 test ! -s conftest.err
1817 } && test -s conftest.$ac_objext; then :
1818 ac_retval=0
1819 else
1820 $as_echo "$as_me: failed program was:" >&5
1821 sed 's/^/| /' conftest.$ac_ext >&5
1822
1823 ac_retval=1
1824 fi
1825 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1826 as_fn_set_status $ac_retval
1827
1828 } # ac_fn_c_try_compile
1829
1830 # ac_fn_cxx_try_compile LINENO
1831 # ----------------------------
1832 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1833 ac_fn_cxx_try_compile ()
1834 {
1835 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1836 rm -f conftest.$ac_objext
1837 if { { ac_try="$ac_compile"
1838 case "(($ac_try" in
1839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1840 *) ac_try_echo=$ac_try;;
1841 esac
1842 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1843 $as_echo "$ac_try_echo"; } >&5
1844 (eval "$ac_compile") 2>conftest.err
1845 ac_status=$?
1846 if test -s conftest.err; then
1847 grep -v '^ *+' conftest.err >conftest.er1
1848 cat conftest.er1 >&5
1849 mv -f conftest.er1 conftest.err
1850 fi
1851 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1852 test $ac_status = 0; } && {
1853 test -z "$ac_cxx_werror_flag" ||
1854 test ! -s conftest.err
1855 } && test -s conftest.$ac_objext; then :
1856 ac_retval=0
1857 else
1858 $as_echo "$as_me: failed program was:" >&5
1859 sed 's/^/| /' conftest.$ac_ext >&5
1860
1861 ac_retval=1
1862 fi
1863 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1864 as_fn_set_status $ac_retval
1865
1866 } # ac_fn_cxx_try_compile
1867
1868 # ac_fn_c_try_cpp LINENO
1869 # ----------------------
1870 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1871 ac_fn_c_try_cpp ()
1872 {
1873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1874 if { { ac_try="$ac_cpp conftest.$ac_ext"
1875 case "(($ac_try" in
1876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1877 *) ac_try_echo=$ac_try;;
1878 esac
1879 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1880 $as_echo "$ac_try_echo"; } >&5
1881 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1882 ac_status=$?
1883 if test -s conftest.err; then
1884 grep -v '^ *+' conftest.err >conftest.er1
1885 cat conftest.er1 >&5
1886 mv -f conftest.er1 conftest.err
1887 fi
1888 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1889 test $ac_status = 0; } > conftest.i && {
1890 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1891 test ! -s conftest.err
1892 }; then :
1893 ac_retval=0
1894 else
1895 $as_echo "$as_me: failed program was:" >&5
1896 sed 's/^/| /' conftest.$ac_ext >&5
1897
1898 ac_retval=1
1899 fi
1900 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1901 as_fn_set_status $ac_retval
1902
1903 } # ac_fn_c_try_cpp
1904
1905 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1906 # -------------------------------------------------------
1907 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1908 # the include files in INCLUDES and setting the cache variable VAR
1909 # accordingly.
1910 ac_fn_c_check_header_mongrel ()
1911 {
1912 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1913 if eval \${$3+:} false; then :
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1915 $as_echo_n "checking for $2... " >&6; }
1916 if eval \${$3+:} false; then :
1917 $as_echo_n "(cached) " >&6
1918 fi
1919 eval ac_res=\$$3
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1921 $as_echo "$ac_res" >&6; }
1922 else
1923 # Is the header compilable?
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1925 $as_echo_n "checking $2 usability... " >&6; }
1926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1927 /* end confdefs.h. */
1928 $4
1929 #include <$2>
1930 _ACEOF
1931 if ac_fn_c_try_compile "$LINENO"; then :
1932 ac_header_compiler=yes
1933 else
1934 ac_header_compiler=no
1935 fi
1936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1938 $as_echo "$ac_header_compiler" >&6; }
1939
1940 # Is the header present?
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1942 $as_echo_n "checking $2 presence... " >&6; }
1943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944 /* end confdefs.h. */
1945 #include <$2>
1946 _ACEOF
1947 if ac_fn_c_try_cpp "$LINENO"; then :
1948 ac_header_preproc=yes
1949 else
1950 ac_header_preproc=no
1951 fi
1952 rm -f conftest.err conftest.i conftest.$ac_ext
1953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1954 $as_echo "$ac_header_preproc" >&6; }
1955
1956 # So? What about this header?
1957 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1958 yes:no: )
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1960 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1961 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1962 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1963 ;;
1964 no:yes:* )
1965 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1966 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1967 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1968 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1969 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1970 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1972 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1973 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1974 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1975 ;;
1976 esac
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 eval "$3=\$ac_header_compiler"
1983 fi
1984 eval ac_res=\$$3
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1986 $as_echo "$ac_res" >&6; }
1987 fi
1988 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1989
1990 } # ac_fn_c_check_header_mongrel
1991
1992 # ac_fn_c_try_run LINENO
1993 # ----------------------
1994 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1995 # that executables *can* be run.
1996 ac_fn_c_try_run ()
1997 {
1998 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1999 if { { ac_try="$ac_link"
2000 case "(($ac_try" in
2001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2002 *) ac_try_echo=$ac_try;;
2003 esac
2004 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2005 $as_echo "$ac_try_echo"; } >&5
2006 (eval "$ac_link") 2>&5
2007 ac_status=$?
2008 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2009 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2010 { { case "(($ac_try" in
2011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2012 *) ac_try_echo=$ac_try;;
2013 esac
2014 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2015 $as_echo "$ac_try_echo"; } >&5
2016 (eval "$ac_try") 2>&5
2017 ac_status=$?
2018 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2019 test $ac_status = 0; }; }; then :
2020 ac_retval=0
2021 else
2022 $as_echo "$as_me: program exited with status $ac_status" >&5
2023 $as_echo "$as_me: failed program was:" >&5
2024 sed 's/^/| /' conftest.$ac_ext >&5
2025
2026 ac_retval=$ac_status
2027 fi
2028 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2029 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2030 as_fn_set_status $ac_retval
2031
2032 } # ac_fn_c_try_run
2033
2034 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2035 # -------------------------------------------------------
2036 # Tests whether HEADER exists and can be compiled using the include files in
2037 # INCLUDES, setting the cache variable VAR accordingly.
2038 ac_fn_c_check_header_compile ()
2039 {
2040 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2042 $as_echo_n "checking for $2... " >&6; }
2043 if eval \${$3+:} false; then :
2044 $as_echo_n "(cached) " >&6
2045 else
2046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047 /* end confdefs.h. */
2048 $4
2049 #include <$2>
2050 _ACEOF
2051 if ac_fn_c_try_compile "$LINENO"; then :
2052 eval "$3=yes"
2053 else
2054 eval "$3=no"
2055 fi
2056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2057 fi
2058 eval ac_res=\$$3
2059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2060 $as_echo "$ac_res" >&6; }
2061 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2062
2063 } # ac_fn_c_check_header_compile
2064
2065 # ac_fn_c_try_link LINENO
2066 # -----------------------
2067 # Try to link conftest.$ac_ext, and return whether this succeeded.
2068 ac_fn_c_try_link ()
2069 {
2070 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2071 rm -f conftest.$ac_objext conftest$ac_exeext
2072 if { { ac_try="$ac_link"
2073 case "(($ac_try" in
2074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2075 *) ac_try_echo=$ac_try;;
2076 esac
2077 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2078 $as_echo "$ac_try_echo"; } >&5
2079 (eval "$ac_link") 2>conftest.err
2080 ac_status=$?
2081 if test -s conftest.err; then
2082 grep -v '^ *+' conftest.err >conftest.er1
2083 cat conftest.er1 >&5
2084 mv -f conftest.er1 conftest.err
2085 fi
2086 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2087 test $ac_status = 0; } && {
2088 test -z "$ac_c_werror_flag" ||
2089 test ! -s conftest.err
2090 } && test -s conftest$ac_exeext && {
2091 test "$cross_compiling" = yes ||
2092 test -x conftest$ac_exeext
2093 }; then :
2094 ac_retval=0
2095 else
2096 $as_echo "$as_me: failed program was:" >&5
2097 sed 's/^/| /' conftest.$ac_ext >&5
2098
2099 ac_retval=1
2100 fi
2101 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2102 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2103 # interfere with the next link command; also delete a directory that is
2104 # left behind by Apple's compiler. We do this before executing the actions.
2105 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2106 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2107 as_fn_set_status $ac_retval
2108
2109 } # ac_fn_c_try_link
2110
2111 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2112 # --------------------------------------------
2113 # Tries to find the compile-time value of EXPR in a program that includes
2114 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2115 # computed
2116 ac_fn_c_compute_int ()
2117 {
2118 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2119 if test "$cross_compiling" = yes; then
2120 # Depending upon the size, compute the lo and hi bounds.
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122 /* end confdefs.h. */
2123 $4
2124 int
2125 main ()
2126 {
2127 static int test_array [1 - 2 * !(($2) >= 0)];
2128 test_array [0] = 0;
2129 return test_array [0];
2130
2131 ;
2132 return 0;
2133 }
2134 _ACEOF
2135 if ac_fn_c_try_compile "$LINENO"; then :
2136 ac_lo=0 ac_mid=0
2137 while :; do
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139 /* end confdefs.h. */
2140 $4
2141 int
2142 main ()
2143 {
2144 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2145 test_array [0] = 0;
2146 return test_array [0];
2147
2148 ;
2149 return 0;
2150 }
2151 _ACEOF
2152 if ac_fn_c_try_compile "$LINENO"; then :
2153 ac_hi=$ac_mid; break
2154 else
2155 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2156 if test $ac_lo -le $ac_mid; then
2157 ac_lo= ac_hi=
2158 break
2159 fi
2160 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2161 fi
2162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2163 done
2164 else
2165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2166 /* end confdefs.h. */
2167 $4
2168 int
2169 main ()
2170 {
2171 static int test_array [1 - 2 * !(($2) < 0)];
2172 test_array [0] = 0;
2173 return test_array [0];
2174
2175 ;
2176 return 0;
2177 }
2178 _ACEOF
2179 if ac_fn_c_try_compile "$LINENO"; then :
2180 ac_hi=-1 ac_mid=-1
2181 while :; do
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183 /* end confdefs.h. */
2184 $4
2185 int
2186 main ()
2187 {
2188 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2189 test_array [0] = 0;
2190 return test_array [0];
2191
2192 ;
2193 return 0;
2194 }
2195 _ACEOF
2196 if ac_fn_c_try_compile "$LINENO"; then :
2197 ac_lo=$ac_mid; break
2198 else
2199 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2200 if test $ac_mid -le $ac_hi; then
2201 ac_lo= ac_hi=
2202 break
2203 fi
2204 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2205 fi
2206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2207 done
2208 else
2209 ac_lo= ac_hi=
2210 fi
2211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2212 fi
2213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2214 # Binary search between lo and hi bounds.
2215 while test "x$ac_lo" != "x$ac_hi"; do
2216 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2218 /* end confdefs.h. */
2219 $4
2220 int
2221 main ()
2222 {
2223 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2224 test_array [0] = 0;
2225 return test_array [0];
2226
2227 ;
2228 return 0;
2229 }
2230 _ACEOF
2231 if ac_fn_c_try_compile "$LINENO"; then :
2232 ac_hi=$ac_mid
2233 else
2234 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2235 fi
2236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2237 done
2238 case $ac_lo in #((
2239 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2240 '') ac_retval=1 ;;
2241 esac
2242 else
2243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2244 /* end confdefs.h. */
2245 $4
2246 static long int longval () { return $2; }
2247 static unsigned long int ulongval () { return $2; }
2248 #include <stdio.h>
2249 #include <stdlib.h>
2250 int
2251 main ()
2252 {
2253
2254 FILE *f = fopen ("conftest.val", "w");
2255 if (! f)
2256 return 1;
2257 if (($2) < 0)
2258 {
2259 long int i = longval ();
2260 if (i != ($2))
2261 return 1;
2262 fprintf (f, "%ld", i);
2263 }
2264 else
2265 {
2266 unsigned long int i = ulongval ();
2267 if (i != ($2))
2268 return 1;
2269 fprintf (f, "%lu", i);
2270 }
2271 /* Do not output a trailing newline, as this causes \r\n confusion
2272 on some platforms. */
2273 return ferror (f) || fclose (f) != 0;
2274
2275 ;
2276 return 0;
2277 }
2278 _ACEOF
2279 if ac_fn_c_try_run "$LINENO"; then :
2280 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2281 else
2282 ac_retval=1
2283 fi
2284 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2285 conftest.$ac_objext conftest.beam conftest.$ac_ext
2286 rm -f conftest.val
2287
2288 fi
2289 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2290 as_fn_set_status $ac_retval
2291
2292 } # ac_fn_c_compute_int
2293
2294 # ac_fn_c_check_func LINENO FUNC VAR
2295 # ----------------------------------
2296 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2297 ac_fn_c_check_func ()
2298 {
2299 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2301 $as_echo_n "checking for $2... " >&6; }
2302 if eval \${$3+:} false; then :
2303 $as_echo_n "(cached) " >&6
2304 else
2305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2306 /* end confdefs.h. */
2307 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2308 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2309 #define $2 innocuous_$2
2310
2311 /* System header to define __stub macros and hopefully few prototypes,
2312 which can conflict with char $2 (); below.
2313 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2314 <limits.h> exists even on freestanding compilers. */
2315
2316 #ifdef __STDC__
2317 # include <limits.h>
2318 #else
2319 # include <assert.h>
2320 #endif
2321
2322 #undef $2
2323
2324 /* Override any GCC internal prototype to avoid an error.
2325 Use char because int might match the return type of a GCC
2326 builtin and then its argument prototype would still apply. */
2327 #ifdef __cplusplus
2328 extern "C"
2329 #endif
2330 char $2 ();
2331 /* The GNU C library defines this for functions which it implements
2332 to always fail with ENOSYS. Some functions are actually named
2333 something starting with __ and the normal name is an alias. */
2334 #if defined __stub_$2 || defined __stub___$2
2335 choke me
2336 #endif
2337
2338 int
2339 main ()
2340 {
2341 return $2 ();
2342 ;
2343 return 0;
2344 }
2345 _ACEOF
2346 if ac_fn_c_try_link "$LINENO"; then :
2347 eval "$3=yes"
2348 else
2349 eval "$3=no"
2350 fi
2351 rm -f core conftest.err conftest.$ac_objext \
2352 conftest$ac_exeext conftest.$ac_ext
2353 fi
2354 eval ac_res=\$$3
2355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2356 $as_echo "$ac_res" >&6; }
2357 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2358
2359 } # ac_fn_c_check_func
2360
2361 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2362 # -------------------------------------------
2363 # Tests whether TYPE exists after having included INCLUDES, setting cache
2364 # variable VAR accordingly.
2365 ac_fn_c_check_type ()
2366 {
2367 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2369 $as_echo_n "checking for $2... " >&6; }
2370 if eval \${$3+:} false; then :
2371 $as_echo_n "(cached) " >&6
2372 else
2373 eval "$3=no"
2374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2375 /* end confdefs.h. */
2376 $4
2377 int
2378 main ()
2379 {
2380 if (sizeof ($2))
2381 return 0;
2382 ;
2383 return 0;
2384 }
2385 _ACEOF
2386 if ac_fn_c_try_compile "$LINENO"; then :
2387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2388 /* end confdefs.h. */
2389 $4
2390 int
2391 main ()
2392 {
2393 if (sizeof (($2)))
2394 return 0;
2395 ;
2396 return 0;
2397 }
2398 _ACEOF
2399 if ac_fn_c_try_compile "$LINENO"; then :
2400
2401 else
2402 eval "$3=yes"
2403 fi
2404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2405 fi
2406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2407 fi
2408 eval ac_res=\$$3
2409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2410 $as_echo "$ac_res" >&6; }
2411 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2412
2413 } # ac_fn_c_check_type
2414
2415 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2416 # ---------------------------------------------
2417 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2418 # accordingly.
2419 ac_fn_c_check_decl ()
2420 {
2421 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2422 as_decl_name=`echo $2|sed 's/ *(.*//'`
2423 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2425 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2426 if eval \${$3+:} false; then :
2427 $as_echo_n "(cached) " >&6
2428 else
2429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2430 /* end confdefs.h. */
2431 $4
2432 int
2433 main ()
2434 {
2435 #ifndef $as_decl_name
2436 #ifdef __cplusplus
2437 (void) $as_decl_use;
2438 #else
2439 (void) $as_decl_name;
2440 #endif
2441 #endif
2442
2443 ;
2444 return 0;
2445 }
2446 _ACEOF
2447 if ac_fn_c_try_compile "$LINENO"; then :
2448 eval "$3=yes"
2449 else
2450 eval "$3=no"
2451 fi
2452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2453 fi
2454 eval ac_res=\$$3
2455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2456 $as_echo "$ac_res" >&6; }
2457 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2458
2459 } # ac_fn_c_check_decl
2460
2461 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2462 # ----------------------------------------------------
2463 # Tries to find if the field MEMBER exists in type AGGR, after including
2464 # INCLUDES, setting cache variable VAR accordingly.
2465 ac_fn_c_check_member ()
2466 {
2467 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2469 $as_echo_n "checking for $2.$3... " >&6; }
2470 if eval \${$4+:} false; then :
2471 $as_echo_n "(cached) " >&6
2472 else
2473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2474 /* end confdefs.h. */
2475 $5
2476 int
2477 main ()
2478 {
2479 static $2 ac_aggr;
2480 if (ac_aggr.$3)
2481 return 0;
2482 ;
2483 return 0;
2484 }
2485 _ACEOF
2486 if ac_fn_c_try_compile "$LINENO"; then :
2487 eval "$4=yes"
2488 else
2489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2490 /* end confdefs.h. */
2491 $5
2492 int
2493 main ()
2494 {
2495 static $2 ac_aggr;
2496 if (sizeof ac_aggr.$3)
2497 return 0;
2498 ;
2499 return 0;
2500 }
2501 _ACEOF
2502 if ac_fn_c_try_compile "$LINENO"; then :
2503 eval "$4=yes"
2504 else
2505 eval "$4=no"
2506 fi
2507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2508 fi
2509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2510 fi
2511 eval ac_res=\$$4
2512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2513 $as_echo "$ac_res" >&6; }
2514 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2515
2516 } # ac_fn_c_check_member
2517
2518 # ac_fn_cxx_try_link LINENO
2519 # -------------------------
2520 # Try to link conftest.$ac_ext, and return whether this succeeded.
2521 ac_fn_cxx_try_link ()
2522 {
2523 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2524 rm -f conftest.$ac_objext conftest$ac_exeext
2525 if { { ac_try="$ac_link"
2526 case "(($ac_try" in
2527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2528 *) ac_try_echo=$ac_try;;
2529 esac
2530 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2531 $as_echo "$ac_try_echo"; } >&5
2532 (eval "$ac_link") 2>conftest.err
2533 ac_status=$?
2534 if test -s conftest.err; then
2535 grep -v '^ *+' conftest.err >conftest.er1
2536 cat conftest.er1 >&5
2537 mv -f conftest.er1 conftest.err
2538 fi
2539 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2540 test $ac_status = 0; } && {
2541 test -z "$ac_cxx_werror_flag" ||
2542 test ! -s conftest.err
2543 } && test -s conftest$ac_exeext && {
2544 test "$cross_compiling" = yes ||
2545 test -x conftest$ac_exeext
2546 }; then :
2547 ac_retval=0
2548 else
2549 $as_echo "$as_me: failed program was:" >&5
2550 sed 's/^/| /' conftest.$ac_ext >&5
2551
2552 ac_retval=1
2553 fi
2554 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2555 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2556 # interfere with the next link command; also delete a directory that is
2557 # left behind by Apple's compiler. We do this before executing the actions.
2558 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2559 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2560 as_fn_set_status $ac_retval
2561
2562 } # ac_fn_cxx_try_link
2563
2564 # ac_fn_cxx_check_func LINENO FUNC VAR
2565 # ------------------------------------
2566 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2567 ac_fn_cxx_check_func ()
2568 {
2569 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2571 $as_echo_n "checking for $2... " >&6; }
2572 if eval \${$3+:} false; then :
2573 $as_echo_n "(cached) " >&6
2574 else
2575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2576 /* end confdefs.h. */
2577 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2578 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2579 #define $2 innocuous_$2
2580
2581 /* System header to define __stub macros and hopefully few prototypes,
2582 which can conflict with char $2 (); below.
2583 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2584 <limits.h> exists even on freestanding compilers. */
2585
2586 #ifdef __STDC__
2587 # include <limits.h>
2588 #else
2589 # include <assert.h>
2590 #endif
2591
2592 #undef $2
2593
2594 /* Override any GCC internal prototype to avoid an error.
2595 Use char because int might match the return type of a GCC
2596 builtin and then its argument prototype would still apply. */
2597 #ifdef __cplusplus
2598 extern "C"
2599 #endif
2600 char $2 ();
2601 /* The GNU C library defines this for functions which it implements
2602 to always fail with ENOSYS. Some functions are actually named
2603 something starting with __ and the normal name is an alias. */
2604 #if defined __stub_$2 || defined __stub___$2
2605 choke me
2606 #endif
2607
2608 int
2609 main ()
2610 {
2611 return $2 ();
2612 ;
2613 return 0;
2614 }
2615 _ACEOF
2616 if ac_fn_cxx_try_link "$LINENO"; then :
2617 eval "$3=yes"
2618 else
2619 eval "$3=no"
2620 fi
2621 rm -f core conftest.err conftest.$ac_objext \
2622 conftest$ac_exeext conftest.$ac_ext
2623 fi
2624 eval ac_res=\$$3
2625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2626 $as_echo "$ac_res" >&6; }
2627 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2628
2629 } # ac_fn_cxx_check_func
2630 cat >config.log <<_ACEOF
2631 This file contains any messages produced by compilers while
2632 running configure, to aid debugging if configure makes a mistake.
2633
2634 It was created by $as_me, which was
2635 generated by GNU Autoconf 2.69. Invocation command line was
2636
2637 $ $0 $@
2638
2639 _ACEOF
2640 exec 5>>config.log
2641 {
2642 cat <<_ASUNAME
2643 ## --------- ##
2644 ## Platform. ##
2645 ## --------- ##
2646
2647 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2648 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2649 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2650 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2651 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2652
2653 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2654 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2655
2656 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2657 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2658 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2659 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2660 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2661 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2662 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2663
2664 _ASUNAME
2665
2666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2667 for as_dir in $PATH
2668 do
2669 IFS=$as_save_IFS
2670 test -z "$as_dir" && as_dir=.
2671 $as_echo "PATH: $as_dir"
2672 done
2673 IFS=$as_save_IFS
2674
2675 } >&5
2676
2677 cat >&5 <<_ACEOF
2678
2679
2680 ## ----------- ##
2681 ## Core tests. ##
2682 ## ----------- ##
2683
2684 _ACEOF
2685
2686
2687 # Keep a trace of the command line.
2688 # Strip out --no-create and --no-recursion so they do not pile up.
2689 # Strip out --silent because we don't want to record it for future runs.
2690 # Also quote any args containing shell meta-characters.
2691 # Make two passes to allow for proper duplicate-argument suppression.
2692 ac_configure_args=
2693 ac_configure_args0=
2694 ac_configure_args1=
2695 ac_must_keep_next=false
2696 for ac_pass in 1 2
2697 do
2698 for ac_arg
2699 do
2700 case $ac_arg in
2701 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2702 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2703 | -silent | --silent | --silen | --sile | --sil)
2704 continue ;;
2705 *\'*)
2706 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2707 esac
2708 case $ac_pass in
2709 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2710 2)
2711 as_fn_append ac_configure_args1 " '$ac_arg'"
2712 if test $ac_must_keep_next = true; then
2713 ac_must_keep_next=false # Got value, back to normal.
2714 else
2715 case $ac_arg in
2716 *=* | --config-cache | -C | -disable-* | --disable-* \
2717 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2718 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2719 | -with-* | --with-* | -without-* | --without-* | --x)
2720 case "$ac_configure_args0 " in
2721 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2722 esac
2723 ;;
2724 -* ) ac_must_keep_next=true ;;
2725 esac
2726 fi
2727 as_fn_append ac_configure_args " '$ac_arg'"
2728 ;;
2729 esac
2730 done
2731 done
2732 { ac_configure_args0=; unset ac_configure_args0;}
2733 { ac_configure_args1=; unset ac_configure_args1;}
2734
2735 # When interrupted or exit'd, cleanup temporary files, and complete
2736 # config.log. We remove comments because anyway the quotes in there
2737 # would cause problems or look ugly.
2738 # WARNING: Use '\'' to represent an apostrophe within the trap.
2739 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2740 trap 'exit_status=$?
2741 # Save into config.log some information that might help in debugging.
2742 {
2743 echo
2744
2745 $as_echo "## ---------------- ##
2746 ## Cache variables. ##
2747 ## ---------------- ##"
2748 echo
2749 # The following way of writing the cache mishandles newlines in values,
2750 (
2751 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2752 eval ac_val=\$$ac_var
2753 case $ac_val in #(
2754 *${as_nl}*)
2755 case $ac_var in #(
2756 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2757 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2758 esac
2759 case $ac_var in #(
2760 _ | IFS | as_nl) ;; #(
2761 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2762 *) { eval $ac_var=; unset $ac_var;} ;;
2763 esac ;;
2764 esac
2765 done
2766 (set) 2>&1 |
2767 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2768 *${as_nl}ac_space=\ *)
2769 sed -n \
2770 "s/'\''/'\''\\\\'\'''\''/g;
2771 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2772 ;; #(
2773 *)
2774 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2775 ;;
2776 esac |
2777 sort
2778 )
2779 echo
2780
2781 $as_echo "## ----------------- ##
2782 ## Output variables. ##
2783 ## ----------------- ##"
2784 echo
2785 for ac_var in $ac_subst_vars
2786 do
2787 eval ac_val=\$$ac_var
2788 case $ac_val in
2789 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2790 esac
2791 $as_echo "$ac_var='\''$ac_val'\''"
2792 done | sort
2793 echo
2794
2795 if test -n "$ac_subst_files"; then
2796 $as_echo "## ------------------- ##
2797 ## File substitutions. ##
2798 ## ------------------- ##"
2799 echo
2800 for ac_var in $ac_subst_files
2801 do
2802 eval ac_val=\$$ac_var
2803 case $ac_val in
2804 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2805 esac
2806 $as_echo "$ac_var='\''$ac_val'\''"
2807 done | sort
2808 echo
2809 fi
2810
2811 if test -s confdefs.h; then
2812 $as_echo "## ----------- ##
2813 ## confdefs.h. ##
2814 ## ----------- ##"
2815 echo
2816 cat confdefs.h
2817 echo
2818 fi
2819 test "$ac_signal" != 0 &&
2820 $as_echo "$as_me: caught signal $ac_signal"
2821 $as_echo "$as_me: exit $exit_status"
2822 } >&5
2823 rm -f core *.core core.conftest.* &&
2824 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2825 exit $exit_status
2826 ' 0
2827 for ac_signal in 1 2 13 15; do
2828 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2829 done
2830 ac_signal=0
2831
2832 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2833 rm -f -r conftest* confdefs.h
2834
2835 $as_echo "/* confdefs.h */" > confdefs.h
2836
2837 # Predefined preprocessor variables.
2838
2839 cat >>confdefs.h <<_ACEOF
2840 #define PACKAGE_NAME "$PACKAGE_NAME"
2841 _ACEOF
2842
2843 cat >>confdefs.h <<_ACEOF
2844 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2845 _ACEOF
2846
2847 cat >>confdefs.h <<_ACEOF
2848 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2849 _ACEOF
2850
2851 cat >>confdefs.h <<_ACEOF
2852 #define PACKAGE_STRING "$PACKAGE_STRING"
2853 _ACEOF
2854
2855 cat >>confdefs.h <<_ACEOF
2856 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2857 _ACEOF
2858
2859 cat >>confdefs.h <<_ACEOF
2860 #define PACKAGE_URL "$PACKAGE_URL"
2861 _ACEOF
2862
2863
2864 # Let the site file select an alternate cache file if it wants to.
2865 # Prefer an explicitly selected file to automatically selected ones.
2866 ac_site_file1=NONE
2867 ac_site_file2=NONE
2868 if test -n "$CONFIG_SITE"; then
2869 # We do not want a PATH search for config.site.
2870 case $CONFIG_SITE in #((
2871 -*) ac_site_file1=./$CONFIG_SITE;;
2872 */*) ac_site_file1=$CONFIG_SITE;;
2873 *) ac_site_file1=./$CONFIG_SITE;;
2874 esac
2875 elif test "x$prefix" != xNONE; then
2876 ac_site_file1=$prefix/share/config.site
2877 ac_site_file2=$prefix/etc/config.site
2878 else
2879 ac_site_file1=$ac_default_prefix/share/config.site
2880 ac_site_file2=$ac_default_prefix/etc/config.site
2881 fi
2882 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2883 do
2884 test "x$ac_site_file" = xNONE && continue
2885 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2886 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2887 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2888 sed 's/^/| /' "$ac_site_file" >&5
2889 . "$ac_site_file" \
2890 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2891 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2892 as_fn_error $? "failed to load site script $ac_site_file
2893 See \`config.log' for more details" "$LINENO" 5; }
2894 fi
2895 done
2896
2897 if test -r "$cache_file"; then
2898 # Some versions of bash will fail to source /dev/null (special files
2899 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2900 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2902 $as_echo "$as_me: loading cache $cache_file" >&6;}
2903 case $cache_file in
2904 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2905 *) . "./$cache_file";;
2906 esac
2907 fi
2908 else
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2910 $as_echo "$as_me: creating cache $cache_file" >&6;}
2911 >$cache_file
2912 fi
2913
2914 as_fn_append ac_header_list " stdlib.h"
2915 as_fn_append ac_header_list " unistd.h"
2916 as_fn_append ac_header_list " sys/param.h"
2917 # Check that the precious variables saved in the cache have kept the same
2918 # value.
2919 ac_cache_corrupted=false
2920 for ac_var in $ac_precious_vars; do
2921 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2922 eval ac_new_set=\$ac_env_${ac_var}_set
2923 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2924 eval ac_new_val=\$ac_env_${ac_var}_value
2925 case $ac_old_set,$ac_new_set in
2926 set,)
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2928 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2929 ac_cache_corrupted=: ;;
2930 ,set)
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2932 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2933 ac_cache_corrupted=: ;;
2934 ,);;
2935 *)
2936 if test "x$ac_old_val" != "x$ac_new_val"; then
2937 # differences in whitespace do not lead to failure.
2938 ac_old_val_w=`echo x $ac_old_val`
2939 ac_new_val_w=`echo x $ac_new_val`
2940 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2941 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2942 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2943 ac_cache_corrupted=:
2944 else
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2946 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2947 eval $ac_var=\$ac_old_val
2948 fi
2949 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2950 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2951 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2952 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2953 fi;;
2954 esac
2955 # Pass precious variables to config.status.
2956 if test "$ac_new_set" = set; then
2957 case $ac_new_val in
2958 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2959 *) ac_arg=$ac_var=$ac_new_val ;;
2960 esac
2961 case " $ac_configure_args " in
2962 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2963 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2964 esac
2965 fi
2966 done
2967 if $ac_cache_corrupted; then
2968 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2969 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2970 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2971 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2972 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2973 fi
2974 ## -------------------- ##
2975 ## Main body of script. ##
2976 ## -------------------- ##
2977
2978 ac_ext=c
2979 ac_cpp='$CPP $CPPFLAGS'
2980 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2981 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2982 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2983
2984
2985
2986
2987
2988 ac_config_headers="$ac_config_headers config.h:config.in"
2989
2990
2991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2992 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2993 # Check whether --enable-maintainer-mode was given.
2994 if test "${enable_maintainer_mode+set}" = set; then :
2995 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2996 else
2997 USE_MAINTAINER_MODE=no
2998 fi
2999
3000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3001 $as_echo "$USE_MAINTAINER_MODE" >&6; }
3002 if test $USE_MAINTAINER_MODE = yes; then
3003 MAINTAINER_MODE_TRUE=
3004 MAINTAINER_MODE_FALSE='#'
3005 else
3006 MAINTAINER_MODE_TRUE='#'
3007 MAINTAINER_MODE_FALSE=
3008 fi
3009
3010 MAINT=$MAINTAINER_MODE_TRUE
3011
3012
3013
3014 ac_ext=c
3015 ac_cpp='$CPP $CPPFLAGS'
3016 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3017 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3018 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3019 if test -n "$ac_tool_prefix"; then
3020 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3021 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3023 $as_echo_n "checking for $ac_word... " >&6; }
3024 if ${ac_cv_prog_CC+:} false; then :
3025 $as_echo_n "(cached) " >&6
3026 else
3027 if test -n "$CC"; then
3028 ac_cv_prog_CC="$CC" # Let the user override the test.
3029 else
3030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3031 for as_dir in $PATH
3032 do
3033 IFS=$as_save_IFS
3034 test -z "$as_dir" && as_dir=.
3035 for ac_exec_ext in '' $ac_executable_extensions; do
3036 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3037 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3039 break 2
3040 fi
3041 done
3042 done
3043 IFS=$as_save_IFS
3044
3045 fi
3046 fi
3047 CC=$ac_cv_prog_CC
3048 if test -n "$CC"; then
3049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3050 $as_echo "$CC" >&6; }
3051 else
3052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3053 $as_echo "no" >&6; }
3054 fi
3055
3056
3057 fi
3058 if test -z "$ac_cv_prog_CC"; then
3059 ac_ct_CC=$CC
3060 # Extract the first word of "gcc", so it can be a program name with args.
3061 set dummy gcc; ac_word=$2
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3063 $as_echo_n "checking for $ac_word... " >&6; }
3064 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3065 $as_echo_n "(cached) " >&6
3066 else
3067 if test -n "$ac_ct_CC"; then
3068 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3069 else
3070 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3071 for as_dir in $PATH
3072 do
3073 IFS=$as_save_IFS
3074 test -z "$as_dir" && as_dir=.
3075 for ac_exec_ext in '' $ac_executable_extensions; do
3076 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3077 ac_cv_prog_ac_ct_CC="gcc"
3078 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3079 break 2
3080 fi
3081 done
3082 done
3083 IFS=$as_save_IFS
3084
3085 fi
3086 fi
3087 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3088 if test -n "$ac_ct_CC"; then
3089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3090 $as_echo "$ac_ct_CC" >&6; }
3091 else
3092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3093 $as_echo "no" >&6; }
3094 fi
3095
3096 if test "x$ac_ct_CC" = x; then
3097 CC=""
3098 else
3099 case $cross_compiling:$ac_tool_warned in
3100 yes:)
3101 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3102 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3103 ac_tool_warned=yes ;;
3104 esac
3105 CC=$ac_ct_CC
3106 fi
3107 else
3108 CC="$ac_cv_prog_CC"
3109 fi
3110
3111 if test -z "$CC"; then
3112 if test -n "$ac_tool_prefix"; then
3113 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3114 set dummy ${ac_tool_prefix}cc; ac_word=$2
3115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3116 $as_echo_n "checking for $ac_word... " >&6; }
3117 if ${ac_cv_prog_CC+:} false; then :
3118 $as_echo_n "(cached) " >&6
3119 else
3120 if test -n "$CC"; then
3121 ac_cv_prog_CC="$CC" # Let the user override the test.
3122 else
3123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3124 for as_dir in $PATH
3125 do
3126 IFS=$as_save_IFS
3127 test -z "$as_dir" && as_dir=.
3128 for ac_exec_ext in '' $ac_executable_extensions; do
3129 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3130 ac_cv_prog_CC="${ac_tool_prefix}cc"
3131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3132 break 2
3133 fi
3134 done
3135 done
3136 IFS=$as_save_IFS
3137
3138 fi
3139 fi
3140 CC=$ac_cv_prog_CC
3141 if test -n "$CC"; then
3142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3143 $as_echo "$CC" >&6; }
3144 else
3145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3146 $as_echo "no" >&6; }
3147 fi
3148
3149
3150 fi
3151 fi
3152 if test -z "$CC"; then
3153 # Extract the first word of "cc", so it can be a program name with args.
3154 set dummy cc; ac_word=$2
3155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3156 $as_echo_n "checking for $ac_word... " >&6; }
3157 if ${ac_cv_prog_CC+:} false; then :
3158 $as_echo_n "(cached) " >&6
3159 else
3160 if test -n "$CC"; then
3161 ac_cv_prog_CC="$CC" # Let the user override the test.
3162 else
3163 ac_prog_rejected=no
3164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3165 for as_dir in $PATH
3166 do
3167 IFS=$as_save_IFS
3168 test -z "$as_dir" && as_dir=.
3169 for ac_exec_ext in '' $ac_executable_extensions; do
3170 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3171 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3172 ac_prog_rejected=yes
3173 continue
3174 fi
3175 ac_cv_prog_CC="cc"
3176 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3177 break 2
3178 fi
3179 done
3180 done
3181 IFS=$as_save_IFS
3182
3183 if test $ac_prog_rejected = yes; then
3184 # We found a bogon in the path, so make sure we never use it.
3185 set dummy $ac_cv_prog_CC
3186 shift
3187 if test $# != 0; then
3188 # We chose a different compiler from the bogus one.
3189 # However, it has the same basename, so the bogon will be chosen
3190 # first if we set CC to just the basename; use the full file name.
3191 shift
3192 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3193 fi
3194 fi
3195 fi
3196 fi
3197 CC=$ac_cv_prog_CC
3198 if test -n "$CC"; then
3199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3200 $as_echo "$CC" >&6; }
3201 else
3202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3203 $as_echo "no" >&6; }
3204 fi
3205
3206
3207 fi
3208 if test -z "$CC"; then
3209 if test -n "$ac_tool_prefix"; then
3210 for ac_prog in cl.exe
3211 do
3212 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3213 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3215 $as_echo_n "checking for $ac_word... " >&6; }
3216 if ${ac_cv_prog_CC+:} false; then :
3217 $as_echo_n "(cached) " >&6
3218 else
3219 if test -n "$CC"; then
3220 ac_cv_prog_CC="$CC" # Let the user override the test.
3221 else
3222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3223 for as_dir in $PATH
3224 do
3225 IFS=$as_save_IFS
3226 test -z "$as_dir" && as_dir=.
3227 for ac_exec_ext in '' $ac_executable_extensions; do
3228 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3229 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3231 break 2
3232 fi
3233 done
3234 done
3235 IFS=$as_save_IFS
3236
3237 fi
3238 fi
3239 CC=$ac_cv_prog_CC
3240 if test -n "$CC"; then
3241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3242 $as_echo "$CC" >&6; }
3243 else
3244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3245 $as_echo "no" >&6; }
3246 fi
3247
3248
3249 test -n "$CC" && break
3250 done
3251 fi
3252 if test -z "$CC"; then
3253 ac_ct_CC=$CC
3254 for ac_prog in cl.exe
3255 do
3256 # Extract the first word of "$ac_prog", so it can be a program name with args.
3257 set dummy $ac_prog; ac_word=$2
3258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3259 $as_echo_n "checking for $ac_word... " >&6; }
3260 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3261 $as_echo_n "(cached) " >&6
3262 else
3263 if test -n "$ac_ct_CC"; then
3264 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3265 else
3266 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3267 for as_dir in $PATH
3268 do
3269 IFS=$as_save_IFS
3270 test -z "$as_dir" && as_dir=.
3271 for ac_exec_ext in '' $ac_executable_extensions; do
3272 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3273 ac_cv_prog_ac_ct_CC="$ac_prog"
3274 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3275 break 2
3276 fi
3277 done
3278 done
3279 IFS=$as_save_IFS
3280
3281 fi
3282 fi
3283 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3284 if test -n "$ac_ct_CC"; then
3285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3286 $as_echo "$ac_ct_CC" >&6; }
3287 else
3288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3289 $as_echo "no" >&6; }
3290 fi
3291
3292
3293 test -n "$ac_ct_CC" && break
3294 done
3295
3296 if test "x$ac_ct_CC" = x; then
3297 CC=""
3298 else
3299 case $cross_compiling:$ac_tool_warned in
3300 yes:)
3301 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3302 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3303 ac_tool_warned=yes ;;
3304 esac
3305 CC=$ac_ct_CC
3306 fi
3307 fi
3308
3309 fi
3310
3311
3312 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3313 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3314 as_fn_error $? "no acceptable C compiler found in \$PATH
3315 See \`config.log' for more details" "$LINENO" 5; }
3316
3317 # Provide some information about the compiler.
3318 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3319 set X $ac_compile
3320 ac_compiler=$2
3321 for ac_option in --version -v -V -qversion; do
3322 { { ac_try="$ac_compiler $ac_option >&5"
3323 case "(($ac_try" in
3324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3325 *) ac_try_echo=$ac_try;;
3326 esac
3327 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3328 $as_echo "$ac_try_echo"; } >&5
3329 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3330 ac_status=$?
3331 if test -s conftest.err; then
3332 sed '10a\
3333 ... rest of stderr output deleted ...
3334 10q' conftest.err >conftest.er1
3335 cat conftest.er1 >&5
3336 fi
3337 rm -f conftest.er1 conftest.err
3338 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3339 test $ac_status = 0; }
3340 done
3341
3342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3343 /* end confdefs.h. */
3344
3345 int
3346 main ()
3347 {
3348
3349 ;
3350 return 0;
3351 }
3352 _ACEOF
3353 ac_clean_files_save=$ac_clean_files
3354 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3355 # Try to create an executable without -o first, disregard a.out.
3356 # It will help us diagnose broken compilers, and finding out an intuition
3357 # of exeext.
3358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3359 $as_echo_n "checking whether the C compiler works... " >&6; }
3360 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3361
3362 # The possible output files:
3363 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3364
3365 ac_rmfiles=
3366 for ac_file in $ac_files
3367 do
3368 case $ac_file in
3369 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3370 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3371 esac
3372 done
3373 rm -f $ac_rmfiles
3374
3375 if { { ac_try="$ac_link_default"
3376 case "(($ac_try" in
3377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3378 *) ac_try_echo=$ac_try;;
3379 esac
3380 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3381 $as_echo "$ac_try_echo"; } >&5
3382 (eval "$ac_link_default") 2>&5
3383 ac_status=$?
3384 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3385 test $ac_status = 0; }; then :
3386 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3387 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3388 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3389 # so that the user can short-circuit this test for compilers unknown to
3390 # Autoconf.
3391 for ac_file in $ac_files ''
3392 do
3393 test -f "$ac_file" || continue
3394 case $ac_file in
3395 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3396 ;;
3397 [ab].out )
3398 # We found the default executable, but exeext='' is most
3399 # certainly right.
3400 break;;
3401 *.* )
3402 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3403 then :; else
3404 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3405 fi
3406 # We set ac_cv_exeext here because the later test for it is not
3407 # safe: cross compilers may not add the suffix if given an `-o'
3408 # argument, so we may need to know it at that point already.
3409 # Even if this section looks crufty: it has the advantage of
3410 # actually working.
3411 break;;
3412 * )
3413 break;;
3414 esac
3415 done
3416 test "$ac_cv_exeext" = no && ac_cv_exeext=
3417
3418 else
3419 ac_file=''
3420 fi
3421 if test -z "$ac_file"; then :
3422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3423 $as_echo "no" >&6; }
3424 $as_echo "$as_me: failed program was:" >&5
3425 sed 's/^/| /' conftest.$ac_ext >&5
3426
3427 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3428 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3429 as_fn_error 77 "C compiler cannot create executables
3430 See \`config.log' for more details" "$LINENO" 5; }
3431 else
3432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3433 $as_echo "yes" >&6; }
3434 fi
3435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3436 $as_echo_n "checking for C compiler default output file name... " >&6; }
3437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3438 $as_echo "$ac_file" >&6; }
3439 ac_exeext=$ac_cv_exeext
3440
3441 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3442 ac_clean_files=$ac_clean_files_save
3443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3444 $as_echo_n "checking for suffix of executables... " >&6; }
3445 if { { ac_try="$ac_link"
3446 case "(($ac_try" in
3447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3448 *) ac_try_echo=$ac_try;;
3449 esac
3450 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3451 $as_echo "$ac_try_echo"; } >&5
3452 (eval "$ac_link") 2>&5
3453 ac_status=$?
3454 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3455 test $ac_status = 0; }; then :
3456 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3457 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3458 # work properly (i.e., refer to `conftest.exe'), while it won't with
3459 # `rm'.
3460 for ac_file in conftest.exe conftest conftest.*; do
3461 test -f "$ac_file" || continue
3462 case $ac_file in
3463 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3464 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3465 break;;
3466 * ) break;;
3467 esac
3468 done
3469 else
3470 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3471 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3472 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3473 See \`config.log' for more details" "$LINENO" 5; }
3474 fi
3475 rm -f conftest conftest$ac_cv_exeext
3476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3477 $as_echo "$ac_cv_exeext" >&6; }
3478
3479 rm -f conftest.$ac_ext
3480 EXEEXT=$ac_cv_exeext
3481 ac_exeext=$EXEEXT
3482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3483 /* end confdefs.h. */
3484 #include <stdio.h>
3485 int
3486 main ()
3487 {
3488 FILE *f = fopen ("conftest.out", "w");
3489 return ferror (f) || fclose (f) != 0;
3490
3491 ;
3492 return 0;
3493 }
3494 _ACEOF
3495 ac_clean_files="$ac_clean_files conftest.out"
3496 # Check that the compiler produces executables we can run. If not, either
3497 # the compiler is broken, or we cross compile.
3498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3499 $as_echo_n "checking whether we are cross compiling... " >&6; }
3500 if test "$cross_compiling" != yes; then
3501 { { ac_try="$ac_link"
3502 case "(($ac_try" in
3503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3504 *) ac_try_echo=$ac_try;;
3505 esac
3506 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3507 $as_echo "$ac_try_echo"; } >&5
3508 (eval "$ac_link") 2>&5
3509 ac_status=$?
3510 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3511 test $ac_status = 0; }
3512 if { ac_try='./conftest$ac_cv_exeext'
3513 { { case "(($ac_try" in
3514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3515 *) ac_try_echo=$ac_try;;
3516 esac
3517 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3518 $as_echo "$ac_try_echo"; } >&5
3519 (eval "$ac_try") 2>&5
3520 ac_status=$?
3521 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3522 test $ac_status = 0; }; }; then
3523 cross_compiling=no
3524 else
3525 if test "$cross_compiling" = maybe; then
3526 cross_compiling=yes
3527 else
3528 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3529 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3530 as_fn_error $? "cannot run C compiled programs.
3531 If you meant to cross compile, use \`--host'.
3532 See \`config.log' for more details" "$LINENO" 5; }
3533 fi
3534 fi
3535 fi
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3537 $as_echo "$cross_compiling" >&6; }
3538
3539 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3540 ac_clean_files=$ac_clean_files_save
3541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3542 $as_echo_n "checking for suffix of object files... " >&6; }
3543 if ${ac_cv_objext+:} false; then :
3544 $as_echo_n "(cached) " >&6
3545 else
3546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3547 /* end confdefs.h. */
3548
3549 int
3550 main ()
3551 {
3552
3553 ;
3554 return 0;
3555 }
3556 _ACEOF
3557 rm -f conftest.o conftest.obj
3558 if { { ac_try="$ac_compile"
3559 case "(($ac_try" in
3560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3561 *) ac_try_echo=$ac_try;;
3562 esac
3563 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3564 $as_echo "$ac_try_echo"; } >&5
3565 (eval "$ac_compile") 2>&5
3566 ac_status=$?
3567 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3568 test $ac_status = 0; }; then :
3569 for ac_file in conftest.o conftest.obj conftest.*; do
3570 test -f "$ac_file" || continue;
3571 case $ac_file in
3572 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3573 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3574 break;;
3575 esac
3576 done
3577 else
3578 $as_echo "$as_me: failed program was:" >&5
3579 sed 's/^/| /' conftest.$ac_ext >&5
3580
3581 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3582 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3583 as_fn_error $? "cannot compute suffix of object files: cannot compile
3584 See \`config.log' for more details" "$LINENO" 5; }
3585 fi
3586 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3587 fi
3588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3589 $as_echo "$ac_cv_objext" >&6; }
3590 OBJEXT=$ac_cv_objext
3591 ac_objext=$OBJEXT
3592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3593 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3594 if ${ac_cv_c_compiler_gnu+:} false; then :
3595 $as_echo_n "(cached) " >&6
3596 else
3597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3598 /* end confdefs.h. */
3599
3600 int
3601 main ()
3602 {
3603 #ifndef __GNUC__
3604 choke me
3605 #endif
3606
3607 ;
3608 return 0;
3609 }
3610 _ACEOF
3611 if ac_fn_c_try_compile "$LINENO"; then :
3612 ac_compiler_gnu=yes
3613 else
3614 ac_compiler_gnu=no
3615 fi
3616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3617 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3618
3619 fi
3620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3621 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3622 if test $ac_compiler_gnu = yes; then
3623 GCC=yes
3624 else
3625 GCC=
3626 fi
3627 ac_test_CFLAGS=${CFLAGS+set}
3628 ac_save_CFLAGS=$CFLAGS
3629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3630 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3631 if ${ac_cv_prog_cc_g+:} false; then :
3632 $as_echo_n "(cached) " >&6
3633 else
3634 ac_save_c_werror_flag=$ac_c_werror_flag
3635 ac_c_werror_flag=yes
3636 ac_cv_prog_cc_g=no
3637 CFLAGS="-g"
3638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3639 /* end confdefs.h. */
3640
3641 int
3642 main ()
3643 {
3644
3645 ;
3646 return 0;
3647 }
3648 _ACEOF
3649 if ac_fn_c_try_compile "$LINENO"; then :
3650 ac_cv_prog_cc_g=yes
3651 else
3652 CFLAGS=""
3653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3654 /* end confdefs.h. */
3655
3656 int
3657 main ()
3658 {
3659
3660 ;
3661 return 0;
3662 }
3663 _ACEOF
3664 if ac_fn_c_try_compile "$LINENO"; then :
3665
3666 else
3667 ac_c_werror_flag=$ac_save_c_werror_flag
3668 CFLAGS="-g"
3669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3670 /* end confdefs.h. */
3671
3672 int
3673 main ()
3674 {
3675
3676 ;
3677 return 0;
3678 }
3679 _ACEOF
3680 if ac_fn_c_try_compile "$LINENO"; then :
3681 ac_cv_prog_cc_g=yes
3682 fi
3683 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3684 fi
3685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3686 fi
3687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3688 ac_c_werror_flag=$ac_save_c_werror_flag
3689 fi
3690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3691 $as_echo "$ac_cv_prog_cc_g" >&6; }
3692 if test "$ac_test_CFLAGS" = set; then
3693 CFLAGS=$ac_save_CFLAGS
3694 elif test $ac_cv_prog_cc_g = yes; then
3695 if test "$GCC" = yes; then
3696 CFLAGS="-g -O2"
3697 else
3698 CFLAGS="-g"
3699 fi
3700 else
3701 if test "$GCC" = yes; then
3702 CFLAGS="-O2"
3703 else
3704 CFLAGS=
3705 fi
3706 fi
3707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3708 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3709 if ${ac_cv_prog_cc_c89+:} false; then :
3710 $as_echo_n "(cached) " >&6
3711 else
3712 ac_cv_prog_cc_c89=no
3713 ac_save_CC=$CC
3714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3715 /* end confdefs.h. */
3716 #include <stdarg.h>
3717 #include <stdio.h>
3718 struct stat;
3719 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3720 struct buf { int x; };
3721 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3722 static char *e (p, i)
3723 char **p;
3724 int i;
3725 {
3726 return p[i];
3727 }
3728 static char *f (char * (*g) (char **, int), char **p, ...)
3729 {
3730 char *s;
3731 va_list v;
3732 va_start (v,p);
3733 s = g (p, va_arg (v,int));
3734 va_end (v);
3735 return s;
3736 }
3737
3738 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3739 function prototypes and stuff, but not '\xHH' hex character constants.
3740 These don't provoke an error unfortunately, instead are silently treated
3741 as 'x'. The following induces an error, until -std is added to get
3742 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3743 array size at least. It's necessary to write '\x00'==0 to get something
3744 that's true only with -std. */
3745 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3746
3747 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3748 inside strings and character constants. */
3749 #define FOO(x) 'x'
3750 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3751
3752 int test (int i, double x);
3753 struct s1 {int (*f) (int a);};
3754 struct s2 {int (*f) (double a);};
3755 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3756 int argc;
3757 char **argv;
3758 int
3759 main ()
3760 {
3761 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3762 ;
3763 return 0;
3764 }
3765 _ACEOF
3766 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3767 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3768 do
3769 CC="$ac_save_CC $ac_arg"
3770 if ac_fn_c_try_compile "$LINENO"; then :
3771 ac_cv_prog_cc_c89=$ac_arg
3772 fi
3773 rm -f core conftest.err conftest.$ac_objext
3774 test "x$ac_cv_prog_cc_c89" != "xno" && break
3775 done
3776 rm -f conftest.$ac_ext
3777 CC=$ac_save_CC
3778
3779 fi
3780 # AC_CACHE_VAL
3781 case "x$ac_cv_prog_cc_c89" in
3782 x)
3783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3784 $as_echo "none needed" >&6; } ;;
3785 xno)
3786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3787 $as_echo "unsupported" >&6; } ;;
3788 *)
3789 CC="$CC $ac_cv_prog_cc_c89"
3790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3791 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3792 esac
3793 if test "x$ac_cv_prog_cc_c89" != xno; then :
3794
3795 fi
3796
3797 ac_ext=c
3798 ac_cpp='$CPP $CPPFLAGS'
3799 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3800 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3801 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3802
3803 ac_ext=cpp
3804 ac_cpp='$CXXCPP $CPPFLAGS'
3805 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3806 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3807 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3808 if test -z "$CXX"; then
3809 if test -n "$CCC"; then
3810 CXX=$CCC
3811 else
3812 if test -n "$ac_tool_prefix"; then
3813 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3814 do
3815 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3816 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3818 $as_echo_n "checking for $ac_word... " >&6; }
3819 if ${ac_cv_prog_CXX+:} false; then :
3820 $as_echo_n "(cached) " >&6
3821 else
3822 if test -n "$CXX"; then
3823 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3824 else
3825 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3826 for as_dir in $PATH
3827 do
3828 IFS=$as_save_IFS
3829 test -z "$as_dir" && as_dir=.
3830 for ac_exec_ext in '' $ac_executable_extensions; do
3831 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3832 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3833 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3834 break 2
3835 fi
3836 done
3837 done
3838 IFS=$as_save_IFS
3839
3840 fi
3841 fi
3842 CXX=$ac_cv_prog_CXX
3843 if test -n "$CXX"; then
3844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3845 $as_echo "$CXX" >&6; }
3846 else
3847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3848 $as_echo "no" >&6; }
3849 fi
3850
3851
3852 test -n "$CXX" && break
3853 done
3854 fi
3855 if test -z "$CXX"; then
3856 ac_ct_CXX=$CXX
3857 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3858 do
3859 # Extract the first word of "$ac_prog", so it can be a program name with args.
3860 set dummy $ac_prog; ac_word=$2
3861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3862 $as_echo_n "checking for $ac_word... " >&6; }
3863 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3864 $as_echo_n "(cached) " >&6
3865 else
3866 if test -n "$ac_ct_CXX"; then
3867 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3868 else
3869 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3870 for as_dir in $PATH
3871 do
3872 IFS=$as_save_IFS
3873 test -z "$as_dir" && as_dir=.
3874 for ac_exec_ext in '' $ac_executable_extensions; do
3875 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3876 ac_cv_prog_ac_ct_CXX="$ac_prog"
3877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3878 break 2
3879 fi
3880 done
3881 done
3882 IFS=$as_save_IFS
3883
3884 fi
3885 fi
3886 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3887 if test -n "$ac_ct_CXX"; then
3888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3889 $as_echo "$ac_ct_CXX" >&6; }
3890 else
3891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3892 $as_echo "no" >&6; }
3893 fi
3894
3895
3896 test -n "$ac_ct_CXX" && break
3897 done
3898
3899 if test "x$ac_ct_CXX" = x; then
3900 CXX="g++"
3901 else
3902 case $cross_compiling:$ac_tool_warned in
3903 yes:)
3904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3905 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3906 ac_tool_warned=yes ;;
3907 esac
3908 CXX=$ac_ct_CXX
3909 fi
3910 fi
3911
3912 fi
3913 fi
3914 # Provide some information about the compiler.
3915 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3916 set X $ac_compile
3917 ac_compiler=$2
3918 for ac_option in --version -v -V -qversion; do
3919 { { ac_try="$ac_compiler $ac_option >&5"
3920 case "(($ac_try" in
3921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3922 *) ac_try_echo=$ac_try;;
3923 esac
3924 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3925 $as_echo "$ac_try_echo"; } >&5
3926 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3927 ac_status=$?
3928 if test -s conftest.err; then
3929 sed '10a\
3930 ... rest of stderr output deleted ...
3931 10q' conftest.err >conftest.er1
3932 cat conftest.er1 >&5
3933 fi
3934 rm -f conftest.er1 conftest.err
3935 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3936 test $ac_status = 0; }
3937 done
3938
3939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3940 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3941 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3942 $as_echo_n "(cached) " >&6
3943 else
3944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3945 /* end confdefs.h. */
3946
3947 int
3948 main ()
3949 {
3950 #ifndef __GNUC__
3951 choke me
3952 #endif
3953
3954 ;
3955 return 0;
3956 }
3957 _ACEOF
3958 if ac_fn_cxx_try_compile "$LINENO"; then :
3959 ac_compiler_gnu=yes
3960 else
3961 ac_compiler_gnu=no
3962 fi
3963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3964 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3965
3966 fi
3967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3968 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3969 if test $ac_compiler_gnu = yes; then
3970 GXX=yes
3971 else
3972 GXX=
3973 fi
3974 ac_test_CXXFLAGS=${CXXFLAGS+set}
3975 ac_save_CXXFLAGS=$CXXFLAGS
3976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3977 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3978 if ${ac_cv_prog_cxx_g+:} false; then :
3979 $as_echo_n "(cached) " >&6
3980 else
3981 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3982 ac_cxx_werror_flag=yes
3983 ac_cv_prog_cxx_g=no
3984 CXXFLAGS="-g"
3985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3986 /* end confdefs.h. */
3987
3988 int
3989 main ()
3990 {
3991
3992 ;
3993 return 0;
3994 }
3995 _ACEOF
3996 if ac_fn_cxx_try_compile "$LINENO"; then :
3997 ac_cv_prog_cxx_g=yes
3998 else
3999 CXXFLAGS=""
4000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4001 /* end confdefs.h. */
4002
4003 int
4004 main ()
4005 {
4006
4007 ;
4008 return 0;
4009 }
4010 _ACEOF
4011 if ac_fn_cxx_try_compile "$LINENO"; then :
4012
4013 else
4014 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4015 CXXFLAGS="-g"
4016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4017 /* end confdefs.h. */
4018
4019 int
4020 main ()
4021 {
4022
4023 ;
4024 return 0;
4025 }
4026 _ACEOF
4027 if ac_fn_cxx_try_compile "$LINENO"; then :
4028 ac_cv_prog_cxx_g=yes
4029 fi
4030 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4031 fi
4032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4033 fi
4034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4035 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4036 fi
4037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4038 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4039 if test "$ac_test_CXXFLAGS" = set; then
4040 CXXFLAGS=$ac_save_CXXFLAGS
4041 elif test $ac_cv_prog_cxx_g = yes; then
4042 if test "$GXX" = yes; then
4043 CXXFLAGS="-g -O2"
4044 else
4045 CXXFLAGS="-g"
4046 fi
4047 else
4048 if test "$GXX" = yes; then
4049 CXXFLAGS="-O2"
4050 else
4051 CXXFLAGS=
4052 fi
4053 fi
4054 ac_ext=c
4055 ac_cpp='$CPP $CPPFLAGS'
4056 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4057 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4058 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4059
4060
4061
4062 ac_ext=c
4063 ac_cpp='$CPP $CPPFLAGS'
4064 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4065 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4066 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4068 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4069 # On Suns, sometimes $CPP names a directory.
4070 if test -n "$CPP" && test -d "$CPP"; then
4071 CPP=
4072 fi
4073 if test -z "$CPP"; then
4074 if ${ac_cv_prog_CPP+:} false; then :
4075 $as_echo_n "(cached) " >&6
4076 else
4077 # Double quotes because CPP needs to be expanded
4078 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4079 do
4080 ac_preproc_ok=false
4081 for ac_c_preproc_warn_flag in '' yes
4082 do
4083 # Use a header file that comes with gcc, so configuring glibc
4084 # with a fresh cross-compiler works.
4085 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4086 # <limits.h> exists even on freestanding compilers.
4087 # On the NeXT, cc -E runs the code through the compiler's parser,
4088 # not just through cpp. "Syntax error" is here to catch this case.
4089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4090 /* end confdefs.h. */
4091 #ifdef __STDC__
4092 # include <limits.h>
4093 #else
4094 # include <assert.h>
4095 #endif
4096 Syntax error
4097 _ACEOF
4098 if ac_fn_c_try_cpp "$LINENO"; then :
4099
4100 else
4101 # Broken: fails on valid input.
4102 continue
4103 fi
4104 rm -f conftest.err conftest.i conftest.$ac_ext
4105
4106 # OK, works on sane cases. Now check whether nonexistent headers
4107 # can be detected and how.
4108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4109 /* end confdefs.h. */
4110 #include <ac_nonexistent.h>
4111 _ACEOF
4112 if ac_fn_c_try_cpp "$LINENO"; then :
4113 # Broken: success on invalid input.
4114 continue
4115 else
4116 # Passes both tests.
4117 ac_preproc_ok=:
4118 break
4119 fi
4120 rm -f conftest.err conftest.i conftest.$ac_ext
4121
4122 done
4123 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4124 rm -f conftest.i conftest.err conftest.$ac_ext
4125 if $ac_preproc_ok; then :
4126 break
4127 fi
4128
4129 done
4130 ac_cv_prog_CPP=$CPP
4131
4132 fi
4133 CPP=$ac_cv_prog_CPP
4134 else
4135 ac_cv_prog_CPP=$CPP
4136 fi
4137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4138 $as_echo "$CPP" >&6; }
4139 ac_preproc_ok=false
4140 for ac_c_preproc_warn_flag in '' yes
4141 do
4142 # Use a header file that comes with gcc, so configuring glibc
4143 # with a fresh cross-compiler works.
4144 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4145 # <limits.h> exists even on freestanding compilers.
4146 # On the NeXT, cc -E runs the code through the compiler's parser,
4147 # not just through cpp. "Syntax error" is here to catch this case.
4148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4149 /* end confdefs.h. */
4150 #ifdef __STDC__
4151 # include <limits.h>
4152 #else
4153 # include <assert.h>
4154 #endif
4155 Syntax error
4156 _ACEOF
4157 if ac_fn_c_try_cpp "$LINENO"; then :
4158
4159 else
4160 # Broken: fails on valid input.
4161 continue
4162 fi
4163 rm -f conftest.err conftest.i conftest.$ac_ext
4164
4165 # OK, works on sane cases. Now check whether nonexistent headers
4166 # can be detected and how.
4167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4168 /* end confdefs.h. */
4169 #include <ac_nonexistent.h>
4170 _ACEOF
4171 if ac_fn_c_try_cpp "$LINENO"; then :
4172 # Broken: success on invalid input.
4173 continue
4174 else
4175 # Passes both tests.
4176 ac_preproc_ok=:
4177 break
4178 fi
4179 rm -f conftest.err conftest.i conftest.$ac_ext
4180
4181 done
4182 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4183 rm -f conftest.i conftest.err conftest.$ac_ext
4184 if $ac_preproc_ok; then :
4185
4186 else
4187 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4188 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4189 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4190 See \`config.log' for more details" "$LINENO" 5; }
4191 fi
4192
4193 ac_ext=c
4194 ac_cpp='$CPP $CPPFLAGS'
4195 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4196 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4197 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4198
4199
4200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4201 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4202 if ${ac_cv_path_GREP+:} false; then :
4203 $as_echo_n "(cached) " >&6
4204 else
4205 if test -z "$GREP"; then
4206 ac_path_GREP_found=false
4207 # Loop through the user's path and test for each of PROGNAME-LIST
4208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4209 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4210 do
4211 IFS=$as_save_IFS
4212 test -z "$as_dir" && as_dir=.
4213 for ac_prog in grep ggrep; do
4214 for ac_exec_ext in '' $ac_executable_extensions; do
4215 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4216 as_fn_executable_p "$ac_path_GREP" || continue
4217 # Check for GNU ac_path_GREP and select it if it is found.
4218 # Check for GNU $ac_path_GREP
4219 case `"$ac_path_GREP" --version 2>&1` in
4220 *GNU*)
4221 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4222 *)
4223 ac_count=0
4224 $as_echo_n 0123456789 >"conftest.in"
4225 while :
4226 do
4227 cat "conftest.in" "conftest.in" >"conftest.tmp"
4228 mv "conftest.tmp" "conftest.in"
4229 cp "conftest.in" "conftest.nl"
4230 $as_echo 'GREP' >> "conftest.nl"
4231 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4232 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4233 as_fn_arith $ac_count + 1 && ac_count=$as_val
4234 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4235 # Best one so far, save it but keep looking for a better one
4236 ac_cv_path_GREP="$ac_path_GREP"
4237 ac_path_GREP_max=$ac_count
4238 fi
4239 # 10*(2^10) chars as input seems more than enough
4240 test $ac_count -gt 10 && break
4241 done
4242 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4243 esac
4244
4245 $ac_path_GREP_found && break 3
4246 done
4247 done
4248 done
4249 IFS=$as_save_IFS
4250 if test -z "$ac_cv_path_GREP"; then
4251 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4252 fi
4253 else
4254 ac_cv_path_GREP=$GREP
4255 fi
4256
4257 fi
4258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4259 $as_echo "$ac_cv_path_GREP" >&6; }
4260 GREP="$ac_cv_path_GREP"
4261
4262
4263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4264 $as_echo_n "checking for egrep... " >&6; }
4265 if ${ac_cv_path_EGREP+:} false; then :
4266 $as_echo_n "(cached) " >&6
4267 else
4268 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4269 then ac_cv_path_EGREP="$GREP -E"
4270 else
4271 if test -z "$EGREP"; then
4272 ac_path_EGREP_found=false
4273 # Loop through the user's path and test for each of PROGNAME-LIST
4274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4275 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4276 do
4277 IFS=$as_save_IFS
4278 test -z "$as_dir" && as_dir=.
4279 for ac_prog in egrep; do
4280 for ac_exec_ext in '' $ac_executable_extensions; do
4281 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4282 as_fn_executable_p "$ac_path_EGREP" || continue
4283 # Check for GNU ac_path_EGREP and select it if it is found.
4284 # Check for GNU $ac_path_EGREP
4285 case `"$ac_path_EGREP" --version 2>&1` in
4286 *GNU*)
4287 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4288 *)
4289 ac_count=0
4290 $as_echo_n 0123456789 >"conftest.in"
4291 while :
4292 do
4293 cat "conftest.in" "conftest.in" >"conftest.tmp"
4294 mv "conftest.tmp" "conftest.in"
4295 cp "conftest.in" "conftest.nl"
4296 $as_echo 'EGREP' >> "conftest.nl"
4297 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4298 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4299 as_fn_arith $ac_count + 1 && ac_count=$as_val
4300 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4301 # Best one so far, save it but keep looking for a better one
4302 ac_cv_path_EGREP="$ac_path_EGREP"
4303 ac_path_EGREP_max=$ac_count
4304 fi
4305 # 10*(2^10) chars as input seems more than enough
4306 test $ac_count -gt 10 && break
4307 done
4308 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4309 esac
4310
4311 $ac_path_EGREP_found && break 3
4312 done
4313 done
4314 done
4315 IFS=$as_save_IFS
4316 if test -z "$ac_cv_path_EGREP"; then
4317 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4318 fi
4319 else
4320 ac_cv_path_EGREP=$EGREP
4321 fi
4322
4323 fi
4324 fi
4325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4326 $as_echo "$ac_cv_path_EGREP" >&6; }
4327 EGREP="$ac_cv_path_EGREP"
4328
4329
4330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4331 $as_echo_n "checking for ANSI C header files... " >&6; }
4332 if ${ac_cv_header_stdc+:} false; then :
4333 $as_echo_n "(cached) " >&6
4334 else
4335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4336 /* end confdefs.h. */
4337 #include <stdlib.h>
4338 #include <stdarg.h>
4339 #include <string.h>
4340 #include <float.h>
4341
4342 int
4343 main ()
4344 {
4345
4346 ;
4347 return 0;
4348 }
4349 _ACEOF
4350 if ac_fn_c_try_compile "$LINENO"; then :
4351 ac_cv_header_stdc=yes
4352 else
4353 ac_cv_header_stdc=no
4354 fi
4355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4356
4357 if test $ac_cv_header_stdc = yes; then
4358 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4360 /* end confdefs.h. */
4361 #include <string.h>
4362
4363 _ACEOF
4364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4365 $EGREP "memchr" >/dev/null 2>&1; then :
4366
4367 else
4368 ac_cv_header_stdc=no
4369 fi
4370 rm -f conftest*
4371
4372 fi
4373
4374 if test $ac_cv_header_stdc = yes; then
4375 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4377 /* end confdefs.h. */
4378 #include <stdlib.h>
4379
4380 _ACEOF
4381 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4382 $EGREP "free" >/dev/null 2>&1; then :
4383
4384 else
4385 ac_cv_header_stdc=no
4386 fi
4387 rm -f conftest*
4388
4389 fi
4390
4391 if test $ac_cv_header_stdc = yes; then
4392 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4393 if test "$cross_compiling" = yes; then :
4394 :
4395 else
4396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4397 /* end confdefs.h. */
4398 #include <ctype.h>
4399 #include <stdlib.h>
4400 #if ((' ' & 0x0FF) == 0x020)
4401 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4402 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4403 #else
4404 # define ISLOWER(c) \
4405 (('a' <= (c) && (c) <= 'i') \
4406 || ('j' <= (c) && (c) <= 'r') \
4407 || ('s' <= (c) && (c) <= 'z'))
4408 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4409 #endif
4410
4411 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4412 int
4413 main ()
4414 {
4415 int i;
4416 for (i = 0; i < 256; i++)
4417 if (XOR (islower (i), ISLOWER (i))
4418 || toupper (i) != TOUPPER (i))
4419 return 2;
4420 return 0;
4421 }
4422 _ACEOF
4423 if ac_fn_c_try_run "$LINENO"; then :
4424
4425 else
4426 ac_cv_header_stdc=no
4427 fi
4428 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4429 conftest.$ac_objext conftest.beam conftest.$ac_ext
4430 fi
4431
4432 fi
4433 fi
4434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4435 $as_echo "$ac_cv_header_stdc" >&6; }
4436 if test $ac_cv_header_stdc = yes; then
4437
4438 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4439
4440 fi
4441
4442 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4443 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4444 inttypes.h stdint.h unistd.h
4445 do :
4446 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4447 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4448 "
4449 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4450 cat >>confdefs.h <<_ACEOF
4451 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4452 _ACEOF
4453
4454 fi
4455
4456 done
4457
4458
4459
4460 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4461 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4462 MINIX=yes
4463 else
4464 MINIX=
4465 fi
4466
4467
4468 if test "$MINIX" = yes; then
4469
4470 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4471
4472
4473 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4474
4475
4476 $as_echo "#define _MINIX 1" >>confdefs.h
4477
4478 fi
4479
4480
4481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4482 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4483 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4484 $as_echo_n "(cached) " >&6
4485 else
4486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4487 /* end confdefs.h. */
4488
4489 # define __EXTENSIONS__ 1
4490 $ac_includes_default
4491 int
4492 main ()
4493 {
4494
4495 ;
4496 return 0;
4497 }
4498 _ACEOF
4499 if ac_fn_c_try_compile "$LINENO"; then :
4500 ac_cv_safe_to_define___extensions__=yes
4501 else
4502 ac_cv_safe_to_define___extensions__=no
4503 fi
4504 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4505 fi
4506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4507 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4508 test $ac_cv_safe_to_define___extensions__ = yes &&
4509 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4510
4511 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4512
4513 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4514
4515 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4516
4517 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4518
4519
4520 ac_aux_dir=
4521 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4522 if test -f "$ac_dir/install-sh"; then
4523 ac_aux_dir=$ac_dir
4524 ac_install_sh="$ac_aux_dir/install-sh -c"
4525 break
4526 elif test -f "$ac_dir/install.sh"; then
4527 ac_aux_dir=$ac_dir
4528 ac_install_sh="$ac_aux_dir/install.sh -c"
4529 break
4530 elif test -f "$ac_dir/shtool"; then
4531 ac_aux_dir=$ac_dir
4532 ac_install_sh="$ac_aux_dir/shtool install -c"
4533 break
4534 fi
4535 done
4536 if test -z "$ac_aux_dir"; then
4537 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4538 fi
4539
4540 # These three variables are undocumented and unsupported,
4541 # and are intended to be withdrawn in a future Autoconf release.
4542 # They can cause serious problems if a builder's source tree is in a directory
4543 # whose full name contains unusual characters.
4544 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4545 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4546 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4547
4548
4549 # Make sure we can run config.sub.
4550 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4551 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4552
4553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4554 $as_echo_n "checking build system type... " >&6; }
4555 if ${ac_cv_build+:} false; then :
4556 $as_echo_n "(cached) " >&6
4557 else
4558 ac_build_alias=$build_alias
4559 test "x$ac_build_alias" = x &&
4560 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4561 test "x$ac_build_alias" = x &&
4562 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4563 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4564 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4565
4566 fi
4567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4568 $as_echo "$ac_cv_build" >&6; }
4569 case $ac_cv_build in
4570 *-*-*) ;;
4571 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4572 esac
4573 build=$ac_cv_build
4574 ac_save_IFS=$IFS; IFS='-'
4575 set x $ac_cv_build
4576 shift
4577 build_cpu=$1
4578 build_vendor=$2
4579 shift; shift
4580 # Remember, the first character of IFS is used to create $*,
4581 # except with old shells:
4582 build_os=$*
4583 IFS=$ac_save_IFS
4584 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4585
4586
4587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4588 $as_echo_n "checking host system type... " >&6; }
4589 if ${ac_cv_host+:} false; then :
4590 $as_echo_n "(cached) " >&6
4591 else
4592 if test "x$host_alias" = x; then
4593 ac_cv_host=$ac_cv_build
4594 else
4595 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4596 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4597 fi
4598
4599 fi
4600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4601 $as_echo "$ac_cv_host" >&6; }
4602 case $ac_cv_host in
4603 *-*-*) ;;
4604 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4605 esac
4606 host=$ac_cv_host
4607 ac_save_IFS=$IFS; IFS='-'
4608 set x $ac_cv_host
4609 shift
4610 host_cpu=$1
4611 host_vendor=$2
4612 shift; shift
4613 # Remember, the first character of IFS is used to create $*,
4614 # except with old shells:
4615 host_os=$*
4616 IFS=$ac_save_IFS
4617 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4618
4619
4620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4621 $as_echo_n "checking target system type... " >&6; }
4622 if ${ac_cv_target+:} false; then :
4623 $as_echo_n "(cached) " >&6
4624 else
4625 if test "x$target_alias" = x; then
4626 ac_cv_target=$ac_cv_host
4627 else
4628 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4629 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4630 fi
4631
4632 fi
4633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4634 $as_echo "$ac_cv_target" >&6; }
4635 case $ac_cv_target in
4636 *-*-*) ;;
4637 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4638 esac
4639 target=$ac_cv_target
4640 ac_save_IFS=$IFS; IFS='-'
4641 set x $ac_cv_target
4642 shift
4643 target_cpu=$1
4644 target_vendor=$2
4645 shift; shift
4646 # Remember, the first character of IFS is used to create $*,
4647 # except with old shells:
4648 target_os=$*
4649 IFS=$ac_save_IFS
4650 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4651
4652
4653 # The aliases save the names the user supplied, while $host etc.
4654 # will get canonicalized.
4655 test -n "$target_alias" &&
4656 test "$program_prefix$program_suffix$program_transform_name" = \
4657 NONENONEs,x,x, &&
4658 program_prefix=${target_alias}-
4659
4660 # The tests for host and target for $enable_largefile require
4661 # canonical names.
4662
4663
4664
4665 # As the $enable_largefile decision depends on --enable-plugins we must set it
4666 # even in directories otherwise not depending on the $plugins option.
4667
4668
4669 maybe_plugins=no
4670 for ac_header in dlfcn.h
4671 do :
4672 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4673 "
4674 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
4675 cat >>confdefs.h <<_ACEOF
4676 #define HAVE_DLFCN_H 1
4677 _ACEOF
4678 maybe_plugins=yes
4679 fi
4680
4681 done
4682
4683 for ac_header in windows.h
4684 do :
4685 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4686 "
4687 if test "x$ac_cv_header_windows_h" = xyes; then :
4688 cat >>confdefs.h <<_ACEOF
4689 #define HAVE_WINDOWS_H 1
4690 _ACEOF
4691 maybe_plugins=yes
4692 fi
4693
4694 done
4695
4696
4697 # Check whether --enable-plugins was given.
4698 if test "${enable_plugins+set}" = set; then :
4699 enableval=$enable_plugins; case "${enableval}" in
4700 no) plugins=no ;;
4701 *) plugins=yes
4702 if test "$maybe_plugins" != "yes" ; then
4703 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4704 fi ;;
4705 esac
4706 else
4707 plugins=$maybe_plugins
4708
4709 fi
4710
4711 if test "$plugins" = "yes"; then
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4713 $as_echo_n "checking for library containing dlsym... " >&6; }
4714 if ${ac_cv_search_dlsym+:} false; then :
4715 $as_echo_n "(cached) " >&6
4716 else
4717 ac_func_search_save_LIBS=$LIBS
4718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4719 /* end confdefs.h. */
4720
4721 /* Override any GCC internal prototype to avoid an error.
4722 Use char because int might match the return type of a GCC
4723 builtin and then its argument prototype would still apply. */
4724 #ifdef __cplusplus
4725 extern "C"
4726 #endif
4727 char dlsym ();
4728 int
4729 main ()
4730 {
4731 return dlsym ();
4732 ;
4733 return 0;
4734 }
4735 _ACEOF
4736 for ac_lib in '' dl; do
4737 if test -z "$ac_lib"; then
4738 ac_res="none required"
4739 else
4740 ac_res=-l$ac_lib
4741 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4742 fi
4743 if ac_fn_c_try_link "$LINENO"; then :
4744 ac_cv_search_dlsym=$ac_res
4745 fi
4746 rm -f core conftest.err conftest.$ac_objext \
4747 conftest$ac_exeext
4748 if ${ac_cv_search_dlsym+:} false; then :
4749 break
4750 fi
4751 done
4752 if ${ac_cv_search_dlsym+:} false; then :
4753
4754 else
4755 ac_cv_search_dlsym=no
4756 fi
4757 rm conftest.$ac_ext
4758 LIBS=$ac_func_search_save_LIBS
4759 fi
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4761 $as_echo "$ac_cv_search_dlsym" >&6; }
4762 ac_res=$ac_cv_search_dlsym
4763 if test "$ac_res" != no; then :
4764 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4765
4766 fi
4767
4768 fi
4769
4770
4771 case "${host}" in
4772 sparc-*-solaris*|i[3-7]86-*-solaris*)
4773 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4774 # are mutually exclusive; and without procfs support, the bfd/ elf module
4775 # cannot provide certain routines such as elfcore_write_prpsinfo
4776 # or elfcore_write_prstatus. So unless the user explicitly requested
4777 # large-file support through the --enable-largefile switch, disable
4778 # large-file support in favor of procfs support.
4779 test "${target}" = "${host}" -a "x$plugins" = xno \
4780 && : ${enable_largefile="no"}
4781 ;;
4782 esac
4783
4784 # Check whether --enable-largefile was given.
4785 if test "${enable_largefile+set}" = set; then :
4786 enableval=$enable_largefile;
4787 fi
4788
4789 if test "$enable_largefile" != no; then
4790
4791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4792 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4793 if ${ac_cv_sys_largefile_CC+:} false; then :
4794 $as_echo_n "(cached) " >&6
4795 else
4796 ac_cv_sys_largefile_CC=no
4797 if test "$GCC" != yes; then
4798 ac_save_CC=$CC
4799 while :; do
4800 # IRIX 6.2 and later do not support large files by default,
4801 # so use the C compiler's -n32 option if that helps.
4802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4803 /* end confdefs.h. */
4804 #include <sys/types.h>
4805 /* Check that off_t can represent 2**63 - 1 correctly.
4806 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4807 since some C++ compilers masquerading as C compilers
4808 incorrectly reject 9223372036854775807. */
4809 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4810 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4811 && LARGE_OFF_T % 2147483647 == 1)
4812 ? 1 : -1];
4813 int
4814 main ()
4815 {
4816
4817 ;
4818 return 0;
4819 }
4820 _ACEOF
4821 if ac_fn_c_try_compile "$LINENO"; then :
4822 break
4823 fi
4824 rm -f core conftest.err conftest.$ac_objext
4825 CC="$CC -n32"
4826 if ac_fn_c_try_compile "$LINENO"; then :
4827 ac_cv_sys_largefile_CC=' -n32'; break
4828 fi
4829 rm -f core conftest.err conftest.$ac_objext
4830 break
4831 done
4832 CC=$ac_save_CC
4833 rm -f conftest.$ac_ext
4834 fi
4835 fi
4836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4837 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4838 if test "$ac_cv_sys_largefile_CC" != no; then
4839 CC=$CC$ac_cv_sys_largefile_CC
4840 fi
4841
4842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4843 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4844 if ${ac_cv_sys_file_offset_bits+:} false; then :
4845 $as_echo_n "(cached) " >&6
4846 else
4847 while :; do
4848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4849 /* end confdefs.h. */
4850 #include <sys/types.h>
4851 /* Check that off_t can represent 2**63 - 1 correctly.
4852 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4853 since some C++ compilers masquerading as C compilers
4854 incorrectly reject 9223372036854775807. */
4855 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4856 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4857 && LARGE_OFF_T % 2147483647 == 1)
4858 ? 1 : -1];
4859 int
4860 main ()
4861 {
4862
4863 ;
4864 return 0;
4865 }
4866 _ACEOF
4867 if ac_fn_c_try_compile "$LINENO"; then :
4868 ac_cv_sys_file_offset_bits=no; break
4869 fi
4870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4872 /* end confdefs.h. */
4873 #define _FILE_OFFSET_BITS 64
4874 #include <sys/types.h>
4875 /* Check that off_t can represent 2**63 - 1 correctly.
4876 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4877 since some C++ compilers masquerading as C compilers
4878 incorrectly reject 9223372036854775807. */
4879 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4880 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4881 && LARGE_OFF_T % 2147483647 == 1)
4882 ? 1 : -1];
4883 int
4884 main ()
4885 {
4886
4887 ;
4888 return 0;
4889 }
4890 _ACEOF
4891 if ac_fn_c_try_compile "$LINENO"; then :
4892 ac_cv_sys_file_offset_bits=64; break
4893 fi
4894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4895 ac_cv_sys_file_offset_bits=unknown
4896 break
4897 done
4898 fi
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4900 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4901 case $ac_cv_sys_file_offset_bits in #(
4902 no | unknown) ;;
4903 *)
4904 cat >>confdefs.h <<_ACEOF
4905 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4906 _ACEOF
4907 ;;
4908 esac
4909 rm -rf conftest*
4910 if test $ac_cv_sys_file_offset_bits = unknown; then
4911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4912 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4913 if ${ac_cv_sys_large_files+:} false; then :
4914 $as_echo_n "(cached) " >&6
4915 else
4916 while :; do
4917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4918 /* end confdefs.h. */
4919 #include <sys/types.h>
4920 /* Check that off_t can represent 2**63 - 1 correctly.
4921 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4922 since some C++ compilers masquerading as C compilers
4923 incorrectly reject 9223372036854775807. */
4924 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4925 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4926 && LARGE_OFF_T % 2147483647 == 1)
4927 ? 1 : -1];
4928 int
4929 main ()
4930 {
4931
4932 ;
4933 return 0;
4934 }
4935 _ACEOF
4936 if ac_fn_c_try_compile "$LINENO"; then :
4937 ac_cv_sys_large_files=no; break
4938 fi
4939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4941 /* end confdefs.h. */
4942 #define _LARGE_FILES 1
4943 #include <sys/types.h>
4944 /* Check that off_t can represent 2**63 - 1 correctly.
4945 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4946 since some C++ compilers masquerading as C compilers
4947 incorrectly reject 9223372036854775807. */
4948 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4949 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4950 && LARGE_OFF_T % 2147483647 == 1)
4951 ? 1 : -1];
4952 int
4953 main ()
4954 {
4955
4956 ;
4957 return 0;
4958 }
4959 _ACEOF
4960 if ac_fn_c_try_compile "$LINENO"; then :
4961 ac_cv_sys_large_files=1; break
4962 fi
4963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4964 ac_cv_sys_large_files=unknown
4965 break
4966 done
4967 fi
4968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4969 $as_echo "$ac_cv_sys_large_files" >&6; }
4970 case $ac_cv_sys_large_files in #(
4971 no | unknown) ;;
4972 *)
4973 cat >>confdefs.h <<_ACEOF
4974 #define _LARGE_FILES $ac_cv_sys_large_files
4975 _ACEOF
4976 ;;
4977 esac
4978 rm -rf conftest*
4979 fi
4980
4981
4982 fi
4983
4984
4985
4986
4987
4988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4989 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4990 if ${am_cv_prog_cc_stdc+:} false; then :
4991 $as_echo_n "(cached) " >&6
4992 else
4993 am_cv_prog_cc_stdc=no
4994 ac_save_CC="$CC"
4995 # Don't try gcc -ansi; that turns off useful extensions and
4996 # breaks some systems' header files.
4997 # AIX -qlanglvl=ansi
4998 # Ultrix and OSF/1 -std1
4999 # HP-UX 10.20 and later -Ae
5000 # HP-UX older versions -Aa -D_HPUX_SOURCE
5001 # SVR4 -Xc -D__EXTENSIONS__
5002 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5003 do
5004 CC="$ac_save_CC $ac_arg"
5005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5006 /* end confdefs.h. */
5007 #include <stdarg.h>
5008 #include <stdio.h>
5009 #include <sys/types.h>
5010 #include <sys/stat.h>
5011 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5012 struct buf { int x; };
5013 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5014 static char *e (p, i)
5015 char **p;
5016 int i;
5017 {
5018 return p[i];
5019 }
5020 static char *f (char * (*g) (char **, int), char **p, ...)
5021 {
5022 char *s;
5023 va_list v;
5024 va_start (v,p);
5025 s = g (p, va_arg (v,int));
5026 va_end (v);
5027 return s;
5028 }
5029 int test (int i, double x);
5030 struct s1 {int (*f) (int a);};
5031 struct s2 {int (*f) (double a);};
5032 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5033 int argc;
5034 char **argv;
5035
5036 int
5037 main ()
5038 {
5039
5040 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5041
5042 ;
5043 return 0;
5044 }
5045 _ACEOF
5046 if ac_fn_c_try_compile "$LINENO"; then :
5047 am_cv_prog_cc_stdc="$ac_arg"; break
5048 fi
5049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5050 done
5051 CC="$ac_save_CC"
5052
5053 fi
5054
5055 if test -z "$am_cv_prog_cc_stdc"; then
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5057 $as_echo "none needed" >&6; }
5058 else
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
5060 $as_echo "$am_cv_prog_cc_stdc" >&6; }
5061 fi
5062 case "x$am_cv_prog_cc_stdc" in
5063 x|xno) ;;
5064 *) CC="$CC $am_cv_prog_cc_stdc" ;;
5065 esac
5066
5067 # Expand $ac_aux_dir to an absolute path.
5068 am_aux_dir=`cd "$ac_aux_dir" && pwd`
5069
5070 if test x"${install_sh+set}" != xset; then
5071 case $am_aux_dir in
5072 *\ * | *\ *)
5073 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5074 *)
5075 install_sh="\${SHELL} $am_aux_dir/install-sh"
5076 esac
5077 fi
5078
5079 # Installed binaries are usually stripped using 'strip' when the user
5080 # run "make install-strip". However 'strip' might not be the right
5081 # tool to use in cross-compilation environments, therefore Automake
5082 # will honor the 'STRIP' environment variable to overrule this program.
5083 if test "$cross_compiling" != no; then
5084 if test -n "$ac_tool_prefix"; then
5085 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5086 set dummy ${ac_tool_prefix}strip; ac_word=$2
5087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5088 $as_echo_n "checking for $ac_word... " >&6; }
5089 if ${ac_cv_prog_STRIP+:} false; then :
5090 $as_echo_n "(cached) " >&6
5091 else
5092 if test -n "$STRIP"; then
5093 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5094 else
5095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5096 for as_dir in $PATH
5097 do
5098 IFS=$as_save_IFS
5099 test -z "$as_dir" && as_dir=.
5100 for ac_exec_ext in '' $ac_executable_extensions; do
5101 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5102 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5104 break 2
5105 fi
5106 done
5107 done
5108 IFS=$as_save_IFS
5109
5110 fi
5111 fi
5112 STRIP=$ac_cv_prog_STRIP
5113 if test -n "$STRIP"; then
5114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5115 $as_echo "$STRIP" >&6; }
5116 else
5117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5118 $as_echo "no" >&6; }
5119 fi
5120
5121
5122 fi
5123 if test -z "$ac_cv_prog_STRIP"; then
5124 ac_ct_STRIP=$STRIP
5125 # Extract the first word of "strip", so it can be a program name with args.
5126 set dummy strip; ac_word=$2
5127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5128 $as_echo_n "checking for $ac_word... " >&6; }
5129 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
5130 $as_echo_n "(cached) " >&6
5131 else
5132 if test -n "$ac_ct_STRIP"; then
5133 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5134 else
5135 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5136 for as_dir in $PATH
5137 do
5138 IFS=$as_save_IFS
5139 test -z "$as_dir" && as_dir=.
5140 for ac_exec_ext in '' $ac_executable_extensions; do
5141 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5142 ac_cv_prog_ac_ct_STRIP="strip"
5143 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5144 break 2
5145 fi
5146 done
5147 done
5148 IFS=$as_save_IFS
5149
5150 fi
5151 fi
5152 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5153 if test -n "$ac_ct_STRIP"; then
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5155 $as_echo "$ac_ct_STRIP" >&6; }
5156 else
5157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5158 $as_echo "no" >&6; }
5159 fi
5160
5161 if test "x$ac_ct_STRIP" = x; then
5162 STRIP=":"
5163 else
5164 case $cross_compiling:$ac_tool_warned in
5165 yes:)
5166 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5167 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5168 ac_tool_warned=yes ;;
5169 esac
5170 STRIP=$ac_ct_STRIP
5171 fi
5172 else
5173 STRIP="$ac_cv_prog_STRIP"
5174 fi
5175
5176 fi
5177 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5178
5179
5180 ac_aux_dir=
5181 for ac_dir in .. "$srcdir"/..; do
5182 if test -f "$ac_dir/install-sh"; then
5183 ac_aux_dir=$ac_dir
5184 ac_install_sh="$ac_aux_dir/install-sh -c"
5185 break
5186 elif test -f "$ac_dir/install.sh"; then
5187 ac_aux_dir=$ac_dir
5188 ac_install_sh="$ac_aux_dir/install.sh -c"
5189 break
5190 elif test -f "$ac_dir/shtool"; then
5191 ac_aux_dir=$ac_dir
5192 ac_install_sh="$ac_aux_dir/shtool install -c"
5193 break
5194 fi
5195 done
5196 if test -z "$ac_aux_dir"; then
5197 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
5198 fi
5199
5200 # These three variables are undocumented and unsupported,
5201 # and are intended to be withdrawn in a future Autoconf release.
5202 # They can cause serious problems if a builder's source tree is in a directory
5203 # whose full name contains unusual characters.
5204 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5205 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5206 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5207
5208
5209
5210 test "$program_prefix" != NONE &&
5211 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5212 # Use a double $ so make ignores it.
5213 test "$program_suffix" != NONE &&
5214 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5215 # Double any \ or $.
5216 # By default was `s,x,x', remove it if useless.
5217 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5218 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5219
5220
5221 # We require a C++11 compiler. Check if one is available, and if
5222 # necessary, set CXX_DIALECT to some -std=xxx switch.
5223
5224 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
5225 ac_ext=cpp
5226 ac_cpp='$CXXCPP $CPPFLAGS'
5227 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5228 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5229 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5230 CXX_DIALECT=""
5231 ac_success=no
5232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5233 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5234 if ${ax_cv_cxx_compile_cxx11+:} false; then :
5235 $as_echo_n "(cached) " >&6
5236 else
5237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5238 /* end confdefs.h. */
5239
5240
5241 // If the compiler admits that it is not ready for C++11, why torture it?
5242 // Hopefully, this will speed up the test.
5243
5244 #ifndef __cplusplus
5245
5246 #error "This is not a C++ compiler"
5247
5248 #elif __cplusplus < 201103L
5249
5250 #error "This is not a C++11 compiler"
5251
5252 #else
5253
5254 namespace cxx11
5255 {
5256
5257 namespace test_static_assert
5258 {
5259
5260 template <typename T>
5261 struct check
5262 {
5263 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5264 };
5265
5266 }
5267
5268 namespace test_final_override
5269 {
5270
5271 struct Base
5272 {
5273 virtual void f() {}
5274 };
5275
5276 struct Derived : public Base
5277 {
5278 virtual void f() override {}
5279 };
5280
5281 }
5282
5283 namespace test_double_right_angle_brackets
5284 {
5285
5286 template < typename T >
5287 struct check {};
5288
5289 typedef check<void> single_type;
5290 typedef check<check<void>> double_type;
5291 typedef check<check<check<void>>> triple_type;
5292 typedef check<check<check<check<void>>>> quadruple_type;
5293
5294 }
5295
5296 namespace test_decltype
5297 {
5298
5299 int
5300 f()
5301 {
5302 int a = 1;
5303 decltype(a) b = 2;
5304 return a + b;
5305 }
5306
5307 }
5308
5309 namespace test_type_deduction
5310 {
5311
5312 template < typename T1, typename T2 >
5313 struct is_same
5314 {
5315 static const bool value = false;
5316 };
5317
5318 template < typename T >
5319 struct is_same<T, T>
5320 {
5321 static const bool value = true;
5322 };
5323
5324 template < typename T1, typename T2 >
5325 auto
5326 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5327 {
5328 return a1 + a2;
5329 }
5330
5331 int
5332 test(const int c, volatile int v)
5333 {
5334 static_assert(is_same<int, decltype(0)>::value == true, "");
5335 static_assert(is_same<int, decltype(c)>::value == false, "");
5336 static_assert(is_same<int, decltype(v)>::value == false, "");
5337 auto ac = c;
5338 auto av = v;
5339 auto sumi = ac + av + 'x';
5340 auto sumf = ac + av + 1.0;
5341 static_assert(is_same<int, decltype(ac)>::value == true, "");
5342 static_assert(is_same<int, decltype(av)>::value == true, "");
5343 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5344 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5345 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5346 return (sumf > 0.0) ? sumi : add(c, v);
5347 }
5348
5349 }
5350
5351 namespace test_noexcept
5352 {
5353
5354 int f() { return 0; }
5355 int g() noexcept { return 0; }
5356
5357 static_assert(noexcept(f()) == false, "");
5358 static_assert(noexcept(g()) == true, "");
5359
5360 }
5361
5362 namespace test_constexpr
5363 {
5364
5365 template < typename CharT >
5366 unsigned long constexpr
5367 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5368 {
5369 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5370 }
5371
5372 template < typename CharT >
5373 unsigned long constexpr
5374 strlen_c(const CharT *const s) noexcept
5375 {
5376 return strlen_c_r(s, 0UL);
5377 }
5378
5379 static_assert(strlen_c("") == 0UL, "");
5380 static_assert(strlen_c("1") == 1UL, "");
5381 static_assert(strlen_c("example") == 7UL, "");
5382 static_assert(strlen_c("another\0example") == 7UL, "");
5383
5384 }
5385
5386 namespace test_rvalue_references
5387 {
5388
5389 template < int N >
5390 struct answer
5391 {
5392 static constexpr int value = N;
5393 };
5394
5395 answer<1> f(int&) { return answer<1>(); }
5396 answer<2> f(const int&) { return answer<2>(); }
5397 answer<3> f(int&&) { return answer<3>(); }
5398
5399 void
5400 test()
5401 {
5402 int i = 0;
5403 const int c = 0;
5404 static_assert(decltype(f(i))::value == 1, "");
5405 static_assert(decltype(f(c))::value == 2, "");
5406 static_assert(decltype(f(0))::value == 3, "");
5407 }
5408
5409 }
5410
5411 namespace test_uniform_initialization
5412 {
5413
5414 struct test
5415 {
5416 static const int zero {};
5417 static const int one {1};
5418 };
5419
5420 static_assert(test::zero == 0, "");
5421 static_assert(test::one == 1, "");
5422
5423 }
5424
5425 namespace test_lambdas
5426 {
5427
5428 void
5429 test1()
5430 {
5431 auto lambda1 = [](){};
5432 auto lambda2 = lambda1;
5433 lambda1();
5434 lambda2();
5435 }
5436
5437 int
5438 test2()
5439 {
5440 auto a = [](int i, int j){ return i + j; }(1, 2);
5441 auto b = []() -> int { return '0'; }();
5442 auto c = [=](){ return a + b; }();
5443 auto d = [&](){ return c; }();
5444 auto e = [a, &b](int x) mutable {
5445 const auto identity = [](int y){ return y; };
5446 for (auto i = 0; i < a; ++i)
5447 a += b--;
5448 return x + identity(a + b);
5449 }(0);
5450 return a + b + c + d + e;
5451 }
5452
5453 int
5454 test3()
5455 {
5456 const auto nullary = [](){ return 0; };
5457 const auto unary = [](int x){ return x; };
5458 using nullary_t = decltype(nullary);
5459 using unary_t = decltype(unary);
5460 const auto higher1st = [](nullary_t f){ return f(); };
5461 const auto higher2nd = [unary](nullary_t f1){
5462 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5463 };
5464 return higher1st(nullary) + higher2nd(nullary)(unary);
5465 }
5466
5467 }
5468
5469 namespace test_variadic_templates
5470 {
5471
5472 template <int...>
5473 struct sum;
5474
5475 template <int N0, int... N1toN>
5476 struct sum<N0, N1toN...>
5477 {
5478 static constexpr auto value = N0 + sum<N1toN...>::value;
5479 };
5480
5481 template <>
5482 struct sum<>
5483 {
5484 static constexpr auto value = 0;
5485 };
5486
5487 static_assert(sum<>::value == 0, "");
5488 static_assert(sum<1>::value == 1, "");
5489 static_assert(sum<23>::value == 23, "");
5490 static_assert(sum<1, 2>::value == 3, "");
5491 static_assert(sum<5, 5, 11>::value == 21, "");
5492 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5493
5494 }
5495
5496 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5497 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5498 // because of this.
5499 namespace test_template_alias_sfinae
5500 {
5501
5502 struct foo {};
5503
5504 template<typename T>
5505 using member = typename T::member_type;
5506
5507 template<typename T>
5508 void func(...) {}
5509
5510 template<typename T>
5511 void func(member<T>*) {}
5512
5513 void test();
5514
5515 void test() { func<foo>(0); }
5516
5517 }
5518
5519 } // namespace cxx11
5520
5521 #endif // __cplusplus >= 201103L
5522
5523
5524
5525 _ACEOF
5526 if ac_fn_cxx_try_compile "$LINENO"; then :
5527 ax_cv_cxx_compile_cxx11=yes
5528 else
5529 ax_cv_cxx_compile_cxx11=no
5530 fi
5531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5532 fi
5533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5534 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5535 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5536 ac_success=yes
5537 fi
5538
5539 if test x$ac_success = xno; then
5540 for alternative in ${ax_cxx_compile_alternatives}; do
5541 switch="-std=gnu++${alternative}"
5542 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5544 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5545 if eval \${$cachevar+:} false; then :
5546 $as_echo_n "(cached) " >&6
5547 else
5548 ac_save_CXX="$CXX"
5549 CXX="$CXX $switch"
5550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5551 /* end confdefs.h. */
5552
5553
5554 // If the compiler admits that it is not ready for C++11, why torture it?
5555 // Hopefully, this will speed up the test.
5556
5557 #ifndef __cplusplus
5558
5559 #error "This is not a C++ compiler"
5560
5561 #elif __cplusplus < 201103L
5562
5563 #error "This is not a C++11 compiler"
5564
5565 #else
5566
5567 namespace cxx11
5568 {
5569
5570 namespace test_static_assert
5571 {
5572
5573 template <typename T>
5574 struct check
5575 {
5576 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5577 };
5578
5579 }
5580
5581 namespace test_final_override
5582 {
5583
5584 struct Base
5585 {
5586 virtual void f() {}
5587 };
5588
5589 struct Derived : public Base
5590 {
5591 virtual void f() override {}
5592 };
5593
5594 }
5595
5596 namespace test_double_right_angle_brackets
5597 {
5598
5599 template < typename T >
5600 struct check {};
5601
5602 typedef check<void> single_type;
5603 typedef check<check<void>> double_type;
5604 typedef check<check<check<void>>> triple_type;
5605 typedef check<check<check<check<void>>>> quadruple_type;
5606
5607 }
5608
5609 namespace test_decltype
5610 {
5611
5612 int
5613 f()
5614 {
5615 int a = 1;
5616 decltype(a) b = 2;
5617 return a + b;
5618 }
5619
5620 }
5621
5622 namespace test_type_deduction
5623 {
5624
5625 template < typename T1, typename T2 >
5626 struct is_same
5627 {
5628 static const bool value = false;
5629 };
5630
5631 template < typename T >
5632 struct is_same<T, T>
5633 {
5634 static const bool value = true;
5635 };
5636
5637 template < typename T1, typename T2 >
5638 auto
5639 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5640 {
5641 return a1 + a2;
5642 }
5643
5644 int
5645 test(const int c, volatile int v)
5646 {
5647 static_assert(is_same<int, decltype(0)>::value == true, "");
5648 static_assert(is_same<int, decltype(c)>::value == false, "");
5649 static_assert(is_same<int, decltype(v)>::value == false, "");
5650 auto ac = c;
5651 auto av = v;
5652 auto sumi = ac + av + 'x';
5653 auto sumf = ac + av + 1.0;
5654 static_assert(is_same<int, decltype(ac)>::value == true, "");
5655 static_assert(is_same<int, decltype(av)>::value == true, "");
5656 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5657 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5658 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5659 return (sumf > 0.0) ? sumi : add(c, v);
5660 }
5661
5662 }
5663
5664 namespace test_noexcept
5665 {
5666
5667 int f() { return 0; }
5668 int g() noexcept { return 0; }
5669
5670 static_assert(noexcept(f()) == false, "");
5671 static_assert(noexcept(g()) == true, "");
5672
5673 }
5674
5675 namespace test_constexpr
5676 {
5677
5678 template < typename CharT >
5679 unsigned long constexpr
5680 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5681 {
5682 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5683 }
5684
5685 template < typename CharT >
5686 unsigned long constexpr
5687 strlen_c(const CharT *const s) noexcept
5688 {
5689 return strlen_c_r(s, 0UL);
5690 }
5691
5692 static_assert(strlen_c("") == 0UL, "");
5693 static_assert(strlen_c("1") == 1UL, "");
5694 static_assert(strlen_c("example") == 7UL, "");
5695 static_assert(strlen_c("another\0example") == 7UL, "");
5696
5697 }
5698
5699 namespace test_rvalue_references
5700 {
5701
5702 template < int N >
5703 struct answer
5704 {
5705 static constexpr int value = N;
5706 };
5707
5708 answer<1> f(int&) { return answer<1>(); }
5709 answer<2> f(const int&) { return answer<2>(); }
5710 answer<3> f(int&&) { return answer<3>(); }
5711
5712 void
5713 test()
5714 {
5715 int i = 0;
5716 const int c = 0;
5717 static_assert(decltype(f(i))::value == 1, "");
5718 static_assert(decltype(f(c))::value == 2, "");
5719 static_assert(decltype(f(0))::value == 3, "");
5720 }
5721
5722 }
5723
5724 namespace test_uniform_initialization
5725 {
5726
5727 struct test
5728 {
5729 static const int zero {};
5730 static const int one {1};
5731 };
5732
5733 static_assert(test::zero == 0, "");
5734 static_assert(test::one == 1, "");
5735
5736 }
5737
5738 namespace test_lambdas
5739 {
5740
5741 void
5742 test1()
5743 {
5744 auto lambda1 = [](){};
5745 auto lambda2 = lambda1;
5746 lambda1();
5747 lambda2();
5748 }
5749
5750 int
5751 test2()
5752 {
5753 auto a = [](int i, int j){ return i + j; }(1, 2);
5754 auto b = []() -> int { return '0'; }();
5755 auto c = [=](){ return a + b; }();
5756 auto d = [&](){ return c; }();
5757 auto e = [a, &b](int x) mutable {
5758 const auto identity = [](int y){ return y; };
5759 for (auto i = 0; i < a; ++i)
5760 a += b--;
5761 return x + identity(a + b);
5762 }(0);
5763 return a + b + c + d + e;
5764 }
5765
5766 int
5767 test3()
5768 {
5769 const auto nullary = [](){ return 0; };
5770 const auto unary = [](int x){ return x; };
5771 using nullary_t = decltype(nullary);
5772 using unary_t = decltype(unary);
5773 const auto higher1st = [](nullary_t f){ return f(); };
5774 const auto higher2nd = [unary](nullary_t f1){
5775 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5776 };
5777 return higher1st(nullary) + higher2nd(nullary)(unary);
5778 }
5779
5780 }
5781
5782 namespace test_variadic_templates
5783 {
5784
5785 template <int...>
5786 struct sum;
5787
5788 template <int N0, int... N1toN>
5789 struct sum<N0, N1toN...>
5790 {
5791 static constexpr auto value = N0 + sum<N1toN...>::value;
5792 };
5793
5794 template <>
5795 struct sum<>
5796 {
5797 static constexpr auto value = 0;
5798 };
5799
5800 static_assert(sum<>::value == 0, "");
5801 static_assert(sum<1>::value == 1, "");
5802 static_assert(sum<23>::value == 23, "");
5803 static_assert(sum<1, 2>::value == 3, "");
5804 static_assert(sum<5, 5, 11>::value == 21, "");
5805 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5806
5807 }
5808
5809 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5810 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5811 // because of this.
5812 namespace test_template_alias_sfinae
5813 {
5814
5815 struct foo {};
5816
5817 template<typename T>
5818 using member = typename T::member_type;
5819
5820 template<typename T>
5821 void func(...) {}
5822
5823 template<typename T>
5824 void func(member<T>*) {}
5825
5826 void test();
5827
5828 void test() { func<foo>(0); }
5829
5830 }
5831
5832 } // namespace cxx11
5833
5834 #endif // __cplusplus >= 201103L
5835
5836
5837
5838 _ACEOF
5839 if ac_fn_cxx_try_compile "$LINENO"; then :
5840 eval $cachevar=yes
5841 else
5842 eval $cachevar=no
5843 fi
5844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5845 CXX="$ac_save_CXX"
5846 fi
5847 eval ac_res=\$$cachevar
5848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5849 $as_echo "$ac_res" >&6; }
5850 if eval test x\$$cachevar = xyes; then
5851 CXX_DIALECT="$switch"
5852 ac_success=yes
5853 break
5854 fi
5855 done
5856 fi
5857
5858 if test x$ac_success = xno; then
5859 for alternative in ${ax_cxx_compile_alternatives}; do
5860 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5861 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5863 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5864 if eval \${$cachevar+:} false; then :
5865 $as_echo_n "(cached) " >&6
5866 else
5867 ac_save_CXX="$CXX"
5868 CXX="$CXX $switch"
5869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5870 /* end confdefs.h. */
5871
5872
5873 // If the compiler admits that it is not ready for C++11, why torture it?
5874 // Hopefully, this will speed up the test.
5875
5876 #ifndef __cplusplus
5877
5878 #error "This is not a C++ compiler"
5879
5880 #elif __cplusplus < 201103L
5881
5882 #error "This is not a C++11 compiler"
5883
5884 #else
5885
5886 namespace cxx11
5887 {
5888
5889 namespace test_static_assert
5890 {
5891
5892 template <typename T>
5893 struct check
5894 {
5895 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5896 };
5897
5898 }
5899
5900 namespace test_final_override
5901 {
5902
5903 struct Base
5904 {
5905 virtual void f() {}
5906 };
5907
5908 struct Derived : public Base
5909 {
5910 virtual void f() override {}
5911 };
5912
5913 }
5914
5915 namespace test_double_right_angle_brackets
5916 {
5917
5918 template < typename T >
5919 struct check {};
5920
5921 typedef check<void> single_type;
5922 typedef check<check<void>> double_type;
5923 typedef check<check<check<void>>> triple_type;
5924 typedef check<check<check<check<void>>>> quadruple_type;
5925
5926 }
5927
5928 namespace test_decltype
5929 {
5930
5931 int
5932 f()
5933 {
5934 int a = 1;
5935 decltype(a) b = 2;
5936 return a + b;
5937 }
5938
5939 }
5940
5941 namespace test_type_deduction
5942 {
5943
5944 template < typename T1, typename T2 >
5945 struct is_same
5946 {
5947 static const bool value = false;
5948 };
5949
5950 template < typename T >
5951 struct is_same<T, T>
5952 {
5953 static const bool value = true;
5954 };
5955
5956 template < typename T1, typename T2 >
5957 auto
5958 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5959 {
5960 return a1 + a2;
5961 }
5962
5963 int
5964 test(const int c, volatile int v)
5965 {
5966 static_assert(is_same<int, decltype(0)>::value == true, "");
5967 static_assert(is_same<int, decltype(c)>::value == false, "");
5968 static_assert(is_same<int, decltype(v)>::value == false, "");
5969 auto ac = c;
5970 auto av = v;
5971 auto sumi = ac + av + 'x';
5972 auto sumf = ac + av + 1.0;
5973 static_assert(is_same<int, decltype(ac)>::value == true, "");
5974 static_assert(is_same<int, decltype(av)>::value == true, "");
5975 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5976 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5977 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5978 return (sumf > 0.0) ? sumi : add(c, v);
5979 }
5980
5981 }
5982
5983 namespace test_noexcept
5984 {
5985
5986 int f() { return 0; }
5987 int g() noexcept { return 0; }
5988
5989 static_assert(noexcept(f()) == false, "");
5990 static_assert(noexcept(g()) == true, "");
5991
5992 }
5993
5994 namespace test_constexpr
5995 {
5996
5997 template < typename CharT >
5998 unsigned long constexpr
5999 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6000 {
6001 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6002 }
6003
6004 template < typename CharT >
6005 unsigned long constexpr
6006 strlen_c(const CharT *const s) noexcept
6007 {
6008 return strlen_c_r(s, 0UL);
6009 }
6010
6011 static_assert(strlen_c("") == 0UL, "");
6012 static_assert(strlen_c("1") == 1UL, "");
6013 static_assert(strlen_c("example") == 7UL, "");
6014 static_assert(strlen_c("another\0example") == 7UL, "");
6015
6016 }
6017
6018 namespace test_rvalue_references
6019 {
6020
6021 template < int N >
6022 struct answer
6023 {
6024 static constexpr int value = N;
6025 };
6026
6027 answer<1> f(int&) { return answer<1>(); }
6028 answer<2> f(const int&) { return answer<2>(); }
6029 answer<3> f(int&&) { return answer<3>(); }
6030
6031 void
6032 test()
6033 {
6034 int i = 0;
6035 const int c = 0;
6036 static_assert(decltype(f(i))::value == 1, "");
6037 static_assert(decltype(f(c))::value == 2, "");
6038 static_assert(decltype(f(0))::value == 3, "");
6039 }
6040
6041 }
6042
6043 namespace test_uniform_initialization
6044 {
6045
6046 struct test
6047 {
6048 static const int zero {};
6049 static const int one {1};
6050 };
6051
6052 static_assert(test::zero == 0, "");
6053 static_assert(test::one == 1, "");
6054
6055 }
6056
6057 namespace test_lambdas
6058 {
6059
6060 void
6061 test1()
6062 {
6063 auto lambda1 = [](){};
6064 auto lambda2 = lambda1;
6065 lambda1();
6066 lambda2();
6067 }
6068
6069 int
6070 test2()
6071 {
6072 auto a = [](int i, int j){ return i + j; }(1, 2);
6073 auto b = []() -> int { return '0'; }();
6074 auto c = [=](){ return a + b; }();
6075 auto d = [&](){ return c; }();
6076 auto e = [a, &b](int x) mutable {
6077 const auto identity = [](int y){ return y; };
6078 for (auto i = 0; i < a; ++i)
6079 a += b--;
6080 return x + identity(a + b);
6081 }(0);
6082 return a + b + c + d + e;
6083 }
6084
6085 int
6086 test3()
6087 {
6088 const auto nullary = [](){ return 0; };
6089 const auto unary = [](int x){ return x; };
6090 using nullary_t = decltype(nullary);
6091 using unary_t = decltype(unary);
6092 const auto higher1st = [](nullary_t f){ return f(); };
6093 const auto higher2nd = [unary](nullary_t f1){
6094 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6095 };
6096 return higher1st(nullary) + higher2nd(nullary)(unary);
6097 }
6098
6099 }
6100
6101 namespace test_variadic_templates
6102 {
6103
6104 template <int...>
6105 struct sum;
6106
6107 template <int N0, int... N1toN>
6108 struct sum<N0, N1toN...>
6109 {
6110 static constexpr auto value = N0 + sum<N1toN...>::value;
6111 };
6112
6113 template <>
6114 struct sum<>
6115 {
6116 static constexpr auto value = 0;
6117 };
6118
6119 static_assert(sum<>::value == 0, "");
6120 static_assert(sum<1>::value == 1, "");
6121 static_assert(sum<23>::value == 23, "");
6122 static_assert(sum<1, 2>::value == 3, "");
6123 static_assert(sum<5, 5, 11>::value == 21, "");
6124 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6125
6126 }
6127
6128 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6129 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6130 // because of this.
6131 namespace test_template_alias_sfinae
6132 {
6133
6134 struct foo {};
6135
6136 template<typename T>
6137 using member = typename T::member_type;
6138
6139 template<typename T>
6140 void func(...) {}
6141
6142 template<typename T>
6143 void func(member<T>*) {}
6144
6145 void test();
6146
6147 void test() { func<foo>(0); }
6148
6149 }
6150
6151 } // namespace cxx11
6152
6153 #endif // __cplusplus >= 201103L
6154
6155
6156
6157 _ACEOF
6158 if ac_fn_cxx_try_compile "$LINENO"; then :
6159 eval $cachevar=yes
6160 else
6161 eval $cachevar=no
6162 fi
6163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6164 CXX="$ac_save_CXX"
6165 fi
6166 eval ac_res=\$$cachevar
6167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6168 $as_echo "$ac_res" >&6; }
6169 if eval test x\$$cachevar = xyes; then
6170 CXX_DIALECT="$switch"
6171 ac_success=yes
6172 break
6173 fi
6174 done
6175 if test x$ac_success = xyes; then
6176 break
6177 fi
6178 done
6179 fi
6180 ac_ext=c
6181 ac_cpp='$CPP $CPPFLAGS'
6182 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6183 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6184 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6185
6186 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6187 if test x$ac_success = xno; then
6188 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6189 fi
6190 fi
6191 if test x$ac_success = xno; then
6192 HAVE_CXX11=0
6193 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6194 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6195 else
6196 HAVE_CXX11=1
6197
6198 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
6199
6200 fi
6201
6202
6203
6204
6205 # Dependency checking.
6206 rm -rf .tst 2>/dev/null
6207 mkdir .tst 2>/dev/null
6208 if test -d .tst; then
6209 am__leading_dot=.
6210 else
6211 am__leading_dot=_
6212 fi
6213 rmdir .tst 2>/dev/null
6214
6215 DEPDIR="${am__leading_dot}deps"
6216
6217 ac_config_commands="$ac_config_commands depdir"
6218
6219
6220 depcc="$CC" am_compiler_list=
6221
6222 am_depcomp=$ac_aux_dir/depcomp
6223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6224 $as_echo_n "checking dependency style of $depcc... " >&6; }
6225 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6226 $as_echo_n "(cached) " >&6
6227 else
6228 if test -f "$am_depcomp"; then
6229 # We make a subdir and do the tests there. Otherwise we can end up
6230 # making bogus files that we don't know about and never remove. For
6231 # instance it was reported that on HP-UX the gcc test will end up
6232 # making a dummy file named `D' -- because `-MD' means `put the output
6233 # in D'.
6234 mkdir conftest.dir
6235 # Copy depcomp to subdir because otherwise we won't find it if we're
6236 # using a relative directory.
6237 cp "$am_depcomp" conftest.dir
6238 cd conftest.dir
6239 # We will build objects and dependencies in a subdirectory because
6240 # it helps to detect inapplicable dependency modes. For instance
6241 # both Tru64's cc and ICC support -MD to output dependencies as a
6242 # side effect of compilation, but ICC will put the dependencies in
6243 # the current directory while Tru64 will put them in the object
6244 # directory.
6245 mkdir sub
6246
6247 am_cv_CC_dependencies_compiler_type=none
6248 if test "$am_compiler_list" = ""; then
6249 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6250 fi
6251 for depmode in $am_compiler_list; do
6252 if test $depmode = none; then break; fi
6253
6254 $as_echo "$as_me:$LINENO: trying $depmode" >&5
6255 # Setup a source with many dependencies, because some compilers
6256 # like to wrap large dependency lists on column 80 (with \), and
6257 # we should not choose a depcomp mode which is confused by this.
6258 #
6259 # We need to recreate these files for each test, as the compiler may
6260 # overwrite some of them when testing with obscure command lines.
6261 # This happens at least with the AIX C compiler.
6262 : > sub/conftest.c
6263 for i in 1 2 3 4 5 6; do
6264 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6265 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6266 # Solaris 8's {/usr,}/bin/sh.
6267 touch sub/conftst$i.h
6268 done
6269 echo "include sub/conftest.Po" > confmf
6270
6271 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6272 # mode. It turns out that the SunPro C++ compiler does not properly
6273 # handle `-M -o', and we need to detect this.
6274 depcmd="depmode=$depmode \
6275 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6276 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6277 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6278 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6279 if env $depcmd > conftest.err 2>&1 &&
6280 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6281 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6282 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6283 # icc doesn't choke on unknown options, it will just issue warnings
6284 # or remarks (even with -Werror). So we grep stderr for any message
6285 # that says an option was ignored or not supported.
6286 # When given -MP, icc 7.0 and 7.1 complain thusly:
6287 # icc: Command line warning: ignoring option '-M'; no argument required
6288 # The diagnosis changed in icc 8.0:
6289 # icc: Command line remark: option '-MP' not supported
6290 if (grep 'ignoring option' conftest.err ||
6291 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6292 am_cv_CC_dependencies_compiler_type=$depmode
6293 $as_echo "$as_me:$LINENO: success" >&5
6294 break
6295 fi
6296 fi
6297 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6298 sed -e 's/^/| /' < conftest.err >&5
6299 done
6300
6301 cd ..
6302 rm -rf conftest.dir
6303 else
6304 am_cv_CC_dependencies_compiler_type=none
6305 fi
6306
6307 fi
6308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6309 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6310 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6311 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
6312 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6313
6314 fi
6315
6316
6317
6318 CONFIG_OBS=
6319 CONFIG_DEPS=
6320 CONFIG_SRCS=
6321 ENABLE_CFLAGS=
6322
6323 CONFIG_ALL=
6324 CONFIG_CLEAN=
6325 CONFIG_INSTALL=
6326 CONFIG_UNINSTALL=
6327
6328 # If we haven't got the data from the intl directory,
6329 # assume NLS is disabled.
6330 USE_NLS=no
6331 LIBINTL=
6332 LIBINTL_DEP=
6333 INCINTL=
6334 XGETTEXT=
6335 GMSGFMT=
6336 POSUB=
6337
6338 if test -f ../intl/config.intl; then
6339 . ../intl/config.intl
6340 fi
6341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6342 $as_echo_n "checking whether NLS is requested... " >&6; }
6343 if test x"$USE_NLS" != xyes; then
6344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6345 $as_echo "no" >&6; }
6346 else
6347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6348 $as_echo "yes" >&6; }
6349
6350 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6351
6352
6353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6354 $as_echo_n "checking for catalogs to be installed... " >&6; }
6355 # Look for .po and .gmo files in the source directory.
6356 CATALOGS=
6357 XLINGUAS=
6358 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6359 # If there aren't any .gmo files the shell will give us the
6360 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6361 # weeded out.
6362 case "$cat" in *\**)
6363 continue;;
6364 esac
6365 # The quadruple backslash is collapsed to a double backslash
6366 # by the backticks, then collapsed again by the double quotes,
6367 # leaving us with one backslash in the sed expression (right
6368 # before the dot that mustn't act as a wildcard).
6369 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6370 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6371 # The user is allowed to set LINGUAS to a list of languages to
6372 # install catalogs for. If it's empty that means "all of them."
6373 if test "x$LINGUAS" = x; then
6374 CATALOGS="$CATALOGS $cat"
6375 XLINGUAS="$XLINGUAS $lang"
6376 else
6377 case "$LINGUAS" in *$lang*)
6378 CATALOGS="$CATALOGS $cat"
6379 XLINGUAS="$XLINGUAS $lang"
6380 ;;
6381 esac
6382 fi
6383 done
6384 LINGUAS="$XLINGUAS"
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6386 $as_echo "$LINGUAS" >&6; }
6387
6388
6389 DATADIRNAME=share
6390
6391 INSTOBJEXT=.mo
6392
6393 GENCAT=gencat
6394
6395 CATOBJEXT=.gmo
6396
6397 fi
6398
6399 localedir='${datadir}/locale'
6400
6401
6402 if test x"$USE_NLS" = xyes; then
6403 CONFIG_ALL="$CONFIG_ALL all-po"
6404 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6405 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6406 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6407 fi
6408
6409 PACKAGE=gdb
6410
6411 cat >>confdefs.h <<_ACEOF
6412 #define PACKAGE "$PACKAGE"
6413 _ACEOF
6414
6415
6416
6417 # We never need to detect it in this sub-configure.
6418 # But preserve it for config.status --recheck.
6419
6420
6421
6422 MAKEINFO_EXTRA_FLAGS=""
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6424 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6425 if ${gdb_cv_have_makeinfo_click+:} false; then :
6426 $as_echo_n "(cached) " >&6
6427 else
6428 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6429 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6430 gdb_cv_have_makeinfo_click=yes
6431 else
6432 gdb_cv_have_makeinfo_click=no
6433 fi
6434 fi
6435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6436 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6437 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6438 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6439 fi
6440
6441
6442
6443
6444 # Check whether --with-separate-debug-dir was given.
6445 if test "${with_separate_debug_dir+set}" = set; then :
6446 withval=$with_separate_debug_dir;
6447 DEBUGDIR=$withval
6448 else
6449 DEBUGDIR=${libdir}/debug
6450 fi
6451
6452
6453 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6454 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6455 ac_define_dir=`eval echo $DEBUGDIR`
6456 ac_define_dir=`eval echo $ac_define_dir`
6457
6458 cat >>confdefs.h <<_ACEOF
6459 #define DEBUGDIR "$ac_define_dir"
6460 _ACEOF
6461
6462
6463
6464
6465 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6466 if test "x$prefix" = xNONE; then
6467 test_prefix=/usr/local
6468 else
6469 test_prefix=$prefix
6470 fi
6471 else
6472 test_prefix=$exec_prefix
6473 fi
6474 value=0
6475 case ${ac_define_dir} in
6476 "${test_prefix}"|"${test_prefix}/"*|\
6477 '${exec_prefix}'|'${exec_prefix}/'*)
6478 value=1
6479 ;;
6480 esac
6481
6482 cat >>confdefs.h <<_ACEOF
6483 #define DEBUGDIR_RELOCATABLE $value
6484 _ACEOF
6485
6486
6487
6488
6489 # We can't pass paths as command line arguments.
6490 # Mingw32 tries to be clever and will convert the paths for us.
6491 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6492 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6493 # This breaks GDB's relocatable path conversions since paths passed in
6494 # config.h would not get so translated, the path prefixes no longer match.
6495
6496 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6497 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6498 ac_define_dir=`eval echo $bindir`
6499 ac_define_dir=`eval echo $ac_define_dir`
6500
6501 cat >>confdefs.h <<_ACEOF
6502 #define BINDIR "$ac_define_dir"
6503 _ACEOF
6504
6505
6506
6507 # GDB's datadir relocation
6508
6509
6510
6511 # Check whether --with-gdb-datadir was given.
6512 if test "${with_gdb_datadir+set}" = set; then :
6513 withval=$with_gdb_datadir;
6514 GDB_DATADIR=$withval
6515 else
6516 GDB_DATADIR=${datadir}/gdb
6517 fi
6518
6519
6520 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6521 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6522 ac_define_dir=`eval echo $GDB_DATADIR`
6523 ac_define_dir=`eval echo $ac_define_dir`
6524
6525 cat >>confdefs.h <<_ACEOF
6526 #define GDB_DATADIR "$ac_define_dir"
6527 _ACEOF
6528
6529
6530
6531
6532 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6533 if test "x$prefix" = xNONE; then
6534 test_prefix=/usr/local
6535 else
6536 test_prefix=$prefix
6537 fi
6538 else
6539 test_prefix=$exec_prefix
6540 fi
6541 value=0
6542 case ${ac_define_dir} in
6543 "${test_prefix}"|"${test_prefix}/"*|\
6544 '${exec_prefix}'|'${exec_prefix}/'*)
6545 value=1
6546 ;;
6547 esac
6548
6549 cat >>confdefs.h <<_ACEOF
6550 #define GDB_DATADIR_RELOCATABLE $value
6551 _ACEOF
6552
6553
6554
6555
6556
6557 # Check whether --with-relocated-sources was given.
6558 if test "${with_relocated_sources+set}" = set; then :
6559 withval=$with_relocated_sources; reloc_srcdir="${withval}"
6560
6561 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6562 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6563 ac_define_dir=`eval echo $reloc_srcdir`
6564 ac_define_dir=`eval echo $ac_define_dir`
6565
6566 cat >>confdefs.h <<_ACEOF
6567 #define RELOC_SRCDIR "$ac_define_dir"
6568 _ACEOF
6569
6570
6571
6572 fi
6573
6574
6575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6576 $as_echo_n "checking for default auto-load directory... " >&6; }
6577
6578 # Check whether --with-auto-load-dir was given.
6579 if test "${with_auto_load_dir+set}" = set; then :
6580 withval=$with_auto_load_dir;
6581 else
6582 with_auto_load_dir='$debugdir:$datadir/auto-load'
6583 fi
6584
6585 escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6586
6587 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6588 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6589 ac_define_dir=`eval echo $escape_dir`
6590 ac_define_dir=`eval echo $ac_define_dir`
6591
6592 cat >>confdefs.h <<_ACEOF
6593 #define AUTO_LOAD_DIR "$ac_define_dir"
6594 _ACEOF
6595
6596
6597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6598 $as_echo "$with_auto_load_dir" >&6; }
6599
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6601 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6602
6603 # Check whether --with-auto-load-safe-path was given.
6604 if test "${with_auto_load_safe_path+set}" = set; then :
6605 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6606 with_auto_load_safe_path="/"
6607 fi
6608 else
6609 with_auto_load_safe_path="$with_auto_load_dir"
6610 fi
6611
6612 escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6613
6614 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6615 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6616 ac_define_dir=`eval echo $escape_dir`
6617 ac_define_dir=`eval echo $ac_define_dir`
6618
6619 cat >>confdefs.h <<_ACEOF
6620 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6621 _ACEOF
6622
6623
6624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6625 $as_echo "$with_auto_load_safe_path" >&6; }
6626
6627
6628
6629 subdirs="$subdirs testsuite"
6630
6631
6632 # Check whether to support alternative target configurations
6633 # Check whether --enable-targets was given.
6634 if test "${enable_targets+set}" = set; then :
6635 enableval=$enable_targets; case "${enableval}" in
6636 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6637 ;;
6638 no) enable_targets= ;;
6639 *) enable_targets=$enableval ;;
6640 esac
6641 fi
6642
6643
6644 # Check whether to enable 64-bit support on 32-bit hosts
6645 # Check whether --enable-64-bit-bfd was given.
6646 if test "${enable_64_bit_bfd+set}" = set; then :
6647 enableval=$enable_64_bit_bfd; case "${enableval}" in
6648 yes) want64=true ;;
6649 no) want64=false ;;
6650 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6651 esac
6652 else
6653 want64=false
6654 fi
6655
6656 # Provide defaults for some variables set by the per-host and per-target
6657 # configuration.
6658 gdb_host_obs=posix-hdep.o
6659
6660 if test "${target}" = "${host}"; then
6661 gdb_native=yes
6662 else
6663 gdb_native=no
6664 fi
6665
6666 . $srcdir/configure.host
6667
6668 # Accumulate some settings from configure.tgt over all enabled targets
6669
6670 TARGET_OBS=
6671 all_targets=
6672 HAVE_NATIVE_GCORE_TARGET=
6673
6674 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6675 do
6676 if test "$targ_alias" = "all"; then
6677 all_targets=true
6678 else
6679 # Canonicalize the secondary target names.
6680 result=`$ac_config_sub $targ_alias 2>/dev/null`
6681 if test -n "$result"; then
6682 targ=$result
6683 else
6684 targ=$targ_alias
6685 fi
6686
6687 . ${srcdir}/configure.tgt
6688
6689 if test -z "${gdb_target_obs}"; then :
6690 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6691 fi
6692
6693 # Target-specific object files
6694 for i in ${gdb_target_obs}; do
6695 case " $TARGET_OBS " in
6696 *" ${i} "*) ;;
6697 *)
6698 TARGET_OBS="$TARGET_OBS ${i}"
6699 ;;
6700 esac
6701 done
6702
6703 # Check whether this target needs 64-bit CORE_ADDR
6704 if test x${want64} = xfalse; then
6705 . ${srcdir}/../bfd/config.bfd
6706 fi
6707
6708 # Check whether this target is native and supports gcore.
6709 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6710 && $gdb_have_gcore; then
6711 HAVE_NATIVE_GCORE_TARGET=1
6712 fi
6713 fi
6714 done
6715
6716 if test x${all_targets} = xtrue; then
6717
6718 # We want all 64-bit targets if we either:
6719 # - run on a 64-bit host or
6720 # - already require 64-bit support for some other target or
6721 # - the --enable-64-bit-bfd option was supplied
6722 # Otherwise we only support all 32-bit targets.
6723 #
6724 # NOTE: This test must be in sync with the corresponding
6725 # tests in BFD!
6726
6727 if test x${want64} = xfalse; then
6728 # The cast to long int works around a bug in the HP C Compiler
6729 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6730 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6731 # This bug is HP SR number 8606223364.
6732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6733 $as_echo_n "checking size of long... " >&6; }
6734 if ${ac_cv_sizeof_long+:} false; then :
6735 $as_echo_n "(cached) " >&6
6736 else
6737 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
6738
6739 else
6740 if test "$ac_cv_type_long" = yes; then
6741 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6742 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6743 as_fn_error 77 "cannot compute sizeof (long)
6744 See \`config.log' for more details" "$LINENO" 5; }
6745 else
6746 ac_cv_sizeof_long=0
6747 fi
6748 fi
6749
6750 fi
6751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6752 $as_echo "$ac_cv_sizeof_long" >&6; }
6753
6754
6755
6756 cat >>confdefs.h <<_ACEOF
6757 #define SIZEOF_LONG $ac_cv_sizeof_long
6758 _ACEOF
6759
6760
6761 if test "x${ac_cv_sizeof_long}" = "x8"; then
6762 want64=true
6763 fi
6764 fi
6765 if test x${want64} = xtrue; then
6766 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6767 else
6768 TARGET_OBS='$(ALL_TARGET_OBS)'
6769 fi
6770 fi
6771
6772
6773
6774
6775 # For other settings, only the main target counts.
6776 gdb_sim=
6777 gdb_osabi=
6778 targ=$target; . ${srcdir}/configure.tgt
6779
6780 # Fetch the default architecture and default target vector from BFD.
6781 targ=$target; . $srcdir/../bfd/config.bfd
6782
6783 # We only want the first architecture, so strip off the others if
6784 # there is more than one.
6785 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6786
6787 if test "x$targ_archs" != x; then
6788
6789 cat >>confdefs.h <<_ACEOF
6790 #define DEFAULT_BFD_ARCH $targ_archs
6791 _ACEOF
6792
6793 fi
6794 if test "x$targ_defvec" != x; then
6795
6796 cat >>confdefs.h <<_ACEOF
6797 #define DEFAULT_BFD_VEC $targ_defvec
6798 _ACEOF
6799
6800 fi
6801
6802 # Enable MI.
6803 # Check whether --enable-gdbmi was given.
6804 if test "${enable_gdbmi+set}" = set; then :
6805 enableval=$enable_gdbmi; case $enableval in
6806 yes | no)
6807 ;;
6808 *)
6809 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6810 esac
6811 else
6812 enable_gdbmi=yes
6813 fi
6814
6815 if test x"$enable_gdbmi" = xyes; then
6816 if test -d "$srcdir/mi"; then
6817 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6818 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6819 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6820 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6821 fi
6822 fi
6823
6824 # Enable TUI.
6825 # Check whether --enable-tui was given.
6826 if test "${enable_tui+set}" = set; then :
6827 enableval=$enable_tui; case $enableval in
6828 yes | no | auto)
6829 ;;
6830 *)
6831 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6832 esac
6833 else
6834 enable_tui=auto
6835 fi
6836
6837
6838 # Enable gdbtk.
6839 # Check whether --enable-gdbtk was given.
6840 if test "${enable_gdbtk+set}" = set; then :
6841 enableval=$enable_gdbtk; case $enableval in
6842 yes | no)
6843 ;;
6844 *)
6845 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6846 esac
6847 else
6848 if test -d "$srcdir/gdbtk"; then
6849 enable_gdbtk=yes
6850 else
6851 enable_gdbtk=no
6852 fi
6853 fi
6854
6855 # We unconditionally disable gdbtk tests on selected platforms.
6856 case $host_os in
6857 go32* | windows*)
6858 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6859 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6860 enable_gdbtk=no ;;
6861 esac
6862
6863 # Handle optional debuginfod support
6864
6865
6866
6867
6868
6869
6870
6871 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6872 if test -n "$ac_tool_prefix"; then
6873 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6874 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6876 $as_echo_n "checking for $ac_word... " >&6; }
6877 if ${ac_cv_path_PKG_CONFIG+:} false; then :
6878 $as_echo_n "(cached) " >&6
6879 else
6880 case $PKG_CONFIG in
6881 [\\/]* | ?:[\\/]*)
6882 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6883 ;;
6884 *)
6885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6886 for as_dir in $PATH
6887 do
6888 IFS=$as_save_IFS
6889 test -z "$as_dir" && as_dir=.
6890 for ac_exec_ext in '' $ac_executable_extensions; do
6891 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6892 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6894 break 2
6895 fi
6896 done
6897 done
6898 IFS=$as_save_IFS
6899
6900 ;;
6901 esac
6902 fi
6903 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6904 if test -n "$PKG_CONFIG"; then
6905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6906 $as_echo "$PKG_CONFIG" >&6; }
6907 else
6908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6909 $as_echo "no" >&6; }
6910 fi
6911
6912
6913 fi
6914 if test -z "$ac_cv_path_PKG_CONFIG"; then
6915 ac_pt_PKG_CONFIG=$PKG_CONFIG
6916 # Extract the first word of "pkg-config", so it can be a program name with args.
6917 set dummy pkg-config; ac_word=$2
6918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6919 $as_echo_n "checking for $ac_word... " >&6; }
6920 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
6921 $as_echo_n "(cached) " >&6
6922 else
6923 case $ac_pt_PKG_CONFIG in
6924 [\\/]* | ?:[\\/]*)
6925 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6926 ;;
6927 *)
6928 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6929 for as_dir in $PATH
6930 do
6931 IFS=$as_save_IFS
6932 test -z "$as_dir" && as_dir=.
6933 for ac_exec_ext in '' $ac_executable_extensions; do
6934 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6935 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6936 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6937 break 2
6938 fi
6939 done
6940 done
6941 IFS=$as_save_IFS
6942
6943 ;;
6944 esac
6945 fi
6946 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6947 if test -n "$ac_pt_PKG_CONFIG"; then
6948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
6949 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
6950 else
6951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6952 $as_echo "no" >&6; }
6953 fi
6954
6955 if test "x$ac_pt_PKG_CONFIG" = x; then
6956 PKG_CONFIG=""
6957 else
6958 case $cross_compiling:$ac_tool_warned in
6959 yes:)
6960 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6961 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6962 ac_tool_warned=yes ;;
6963 esac
6964 PKG_CONFIG=$ac_pt_PKG_CONFIG
6965 fi
6966 else
6967 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6968 fi
6969
6970 fi
6971 if test -n "$PKG_CONFIG"; then
6972 _pkg_min_version=0.9.0
6973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
6974 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
6975 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6977 $as_echo "yes" >&6; }
6978 else
6979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6980 $as_echo "no" >&6; }
6981 PKG_CONFIG=""
6982 fi
6983 fi
6984
6985 # Handle optional debuginfod support
6986
6987 # Check whether --with-debuginfod was given.
6988 if test "${with_debuginfod+set}" = set; then :
6989 withval=$with_debuginfod;
6990 else
6991 with_debuginfod=auto
6992 fi
6993
6994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5
6995 $as_echo_n "checking whether to use debuginfod... " >&6; }
6996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5
6997 $as_echo "$with_debuginfod" >&6; }
6998
6999 if test "x$with_debuginfod" != xno; then
7000
7001 pkg_failed=no
7002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5
7003 $as_echo_n "checking for libdebuginfod >= 0.179... " >&6; }
7004
7005 if test -n "$DEBUGINFOD_CFLAGS"; then
7006 pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS"
7007 elif test -n "$PKG_CONFIG"; then
7008 if test -n "$PKG_CONFIG" && \
7009 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7010 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7011 ac_status=$?
7012 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7013 test $ac_status = 0; }; then
7014 pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null`
7015 test "x$?" != "x0" && pkg_failed=yes
7016 else
7017 pkg_failed=yes
7018 fi
7019 else
7020 pkg_failed=untried
7021 fi
7022 if test -n "$DEBUGINFOD_LIBS"; then
7023 pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS"
7024 elif test -n "$PKG_CONFIG"; then
7025 if test -n "$PKG_CONFIG" && \
7026 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7027 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7028 ac_status=$?
7029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7030 test $ac_status = 0; }; then
7031 pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null`
7032 test "x$?" != "x0" && pkg_failed=yes
7033 else
7034 pkg_failed=yes
7035 fi
7036 else
7037 pkg_failed=untried
7038 fi
7039
7040 pkg_save_LDFLAGS="$LDFLAGS"
7041 LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS"
7042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7043 /* end confdefs.h. */
7044
7045 int
7046 main ()
7047 {
7048 return 0;
7049 ;
7050 return 0;
7051 }
7052 _ACEOF
7053 if ac_fn_c_try_link "$LINENO"; then :
7054 pkg_failed=no
7055 else
7056 pkg_failed=yes
7057 fi
7058 rm -f core conftest.err conftest.$ac_objext \
7059 conftest$ac_exeext conftest.$ac_ext
7060 LDFLAGS=$pkg_save_LDFLAGS
7061
7062
7063
7064 if test $pkg_failed = yes; then
7065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7066 $as_echo "no" >&6; }
7067
7068 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7069 _pkg_short_errors_supported=yes
7070 else
7071 _pkg_short_errors_supported=no
7072 fi
7073 if test $_pkg_short_errors_supported = yes; then
7074 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7075 else
7076 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7077 fi
7078 # Put the nasty error message in config.log where it belongs
7079 echo "$DEBUGINFOD_PKG_ERRORS" >&5
7080
7081 if test "x$with_debuginfod" = xyes; then
7082 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7083 else
7084 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7085 $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7086 fi
7087 elif test $pkg_failed = untried; then
7088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7089 $as_echo "no" >&6; }
7090 if test "x$with_debuginfod" = xyes; then
7091 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7092 else
7093 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7094 $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7095 fi
7096 else
7097 DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS
7098 DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS
7099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7100 $as_echo "yes" >&6; }
7101
7102 $as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
7103
7104 fi
7105 else
7106 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5
7107 $as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;}
7108 fi
7109
7110
7111 # Libunwind support for ia64.
7112
7113 # Check whether --with-libunwind-ia64 was given.
7114 if test "${with_libunwind_ia64+set}" = set; then :
7115 withval=$with_libunwind_ia64;
7116 else
7117 with_libunwind_ia64=auto
7118 fi
7119
7120
7121 # Backward compatibility option.
7122 if test "${with_libunwind+set}" = set; then
7123 if test x"$with_libunwind_ia64" != xauto; then
7124 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
7125 fi
7126 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
7127 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
7128 with_libunwind_ia64="$with_libunwind"
7129 fi
7130
7131 case "$with_libunwind_ia64" in
7132 yes | no)
7133 ;;
7134 auto)
7135 for ac_header in libunwind-ia64.h
7136 do :
7137 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
7138 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
7139 cat >>confdefs.h <<_ACEOF
7140 #define HAVE_LIBUNWIND_IA64_H 1
7141 _ACEOF
7142
7143 fi
7144
7145 done
7146
7147 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
7148 ;;
7149 *)
7150 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
7151 ;;
7152 esac
7153
7154 if test x"$with_libunwind_ia64" = xyes; then
7155 for ac_header in libunwind-ia64.h
7156 do :
7157 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
7158 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
7159 cat >>confdefs.h <<_ACEOF
7160 #define HAVE_LIBUNWIND_IA64_H 1
7161 _ACEOF
7162
7163 fi
7164
7165 done
7166
7167 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
7168 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
7169 fi
7170 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
7171 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
7172 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
7173 fi
7174
7175 opt_curses=no
7176
7177 # Check whether --with-curses was given.
7178 if test "${with_curses+set}" = set; then :
7179 withval=$with_curses; opt_curses=$withval
7180 fi
7181
7182
7183 prefer_curses=no
7184 if test "$opt_curses" = "yes"; then
7185 prefer_curses=yes
7186 fi
7187
7188 # Profiling support.
7189 # Check whether --enable-profiling was given.
7190 if test "${enable_profiling+set}" = set; then :
7191 enableval=$enable_profiling; case $enableval in
7192 yes | no)
7193 ;;
7194 *)
7195 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
7196 esac
7197 else
7198 enable_profiling=no
7199 fi
7200
7201
7202 for ac_func in monstartup _mcleanup
7203 do :
7204 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7205 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7206 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7207 cat >>confdefs.h <<_ACEOF
7208 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7209 _ACEOF
7210
7211 fi
7212 done
7213
7214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7215 $as_echo_n "checking for _etext... " >&6; }
7216 if ${ac_cv_var__etext+:} false; then :
7217 $as_echo_n "(cached) " >&6
7218 else
7219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7220 /* end confdefs.h. */
7221 #include <stdlib.h>
7222 extern char _etext;
7223
7224 int
7225 main ()
7226 {
7227 free (&_etext);
7228 ;
7229 return 0;
7230 }
7231 _ACEOF
7232 if ac_fn_c_try_link "$LINENO"; then :
7233 ac_cv_var__etext=yes
7234 else
7235 ac_cv_var__etext=no
7236 fi
7237 rm -f core conftest.err conftest.$ac_objext \
7238 conftest$ac_exeext conftest.$ac_ext
7239 fi
7240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7241 $as_echo "$ac_cv_var__etext" >&6; }
7242 if test "$ac_cv_var__etext" = yes; then
7243
7244 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
7245
7246 fi
7247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7248 $as_echo_n "checking for etext... " >&6; }
7249 if ${ac_cv_var_etext+:} false; then :
7250 $as_echo_n "(cached) " >&6
7251 else
7252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7253 /* end confdefs.h. */
7254 #include <stdlib.h>
7255 extern char etext;
7256
7257 int
7258 main ()
7259 {
7260 free (&etext);
7261 ;
7262 return 0;
7263 }
7264 _ACEOF
7265 if ac_fn_c_try_link "$LINENO"; then :
7266 ac_cv_var_etext=yes
7267 else
7268 ac_cv_var_etext=no
7269 fi
7270 rm -f core conftest.err conftest.$ac_objext \
7271 conftest$ac_exeext conftest.$ac_ext
7272 fi
7273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7274 $as_echo "$ac_cv_var_etext" >&6; }
7275 if test "$ac_cv_var_etext" = yes; then
7276
7277 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
7278
7279 fi
7280 if test "$enable_profiling" = yes ; then
7281 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
7282 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
7283 fi
7284 PROFILE_CFLAGS=-pg
7285 OLD_CFLAGS="$CFLAGS"
7286 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
7287
7288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7289 $as_echo_n "checking whether $CC supports -pg... " >&6; }
7290 if ${ac_cv_cc_supports_pg+:} false; then :
7291 $as_echo_n "(cached) " >&6
7292 else
7293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7294 /* end confdefs.h. */
7295
7296 int
7297 main ()
7298 {
7299 int x;
7300 ;
7301 return 0;
7302 }
7303 _ACEOF
7304 if ac_fn_c_try_compile "$LINENO"; then :
7305 ac_cv_cc_supports_pg=yes
7306 else
7307 ac_cv_cc_supports_pg=no
7308 fi
7309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7310 fi
7311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7312 $as_echo "$ac_cv_cc_supports_pg" >&6; }
7313
7314 if test "$ac_cv_cc_supports_pg" = no; then
7315 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7316 fi
7317
7318 CFLAGS="$OLD_CFLAGS"
7319 fi
7320
7321 CODESIGN_CERT=
7322 # Check whether --enable-codesign was given.
7323 if test "${enable_codesign+set}" = set; then :
7324 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7325 fi
7326
7327
7328
7329
7330
7331 # Check whether --with-pkgversion was given.
7332 if test "${with_pkgversion+set}" = set; then :
7333 withval=$with_pkgversion; case "$withval" in
7334 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
7335 no) PKGVERSION= ;;
7336 *) PKGVERSION="($withval) " ;;
7337 esac
7338 else
7339 PKGVERSION="(GDB) "
7340
7341 fi
7342
7343
7344
7345
7346
7347 # Check whether --with-bugurl was given.
7348 if test "${with_bugurl+set}" = set; then :
7349 withval=$with_bugurl; case "$withval" in
7350 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
7351 no) BUGURL=
7352 ;;
7353 *) BUGURL="$withval"
7354 ;;
7355 esac
7356 else
7357 BUGURL="https://www.gnu.org/software/gdb/bugs/"
7358
7359 fi
7360
7361 case ${BUGURL} in
7362 "")
7363 REPORT_BUGS_TO=
7364 REPORT_BUGS_TEXI=
7365 ;;
7366 *)
7367 REPORT_BUGS_TO="<$BUGURL>"
7368 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7369 ;;
7370 esac;
7371
7372
7373
7374
7375 cat >>confdefs.h <<_ACEOF
7376 #define PKGVERSION "$PKGVERSION"
7377 _ACEOF
7378
7379
7380 cat >>confdefs.h <<_ACEOF
7381 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7382 _ACEOF
7383
7384
7385 # --------------------- #
7386 # Checks for programs. #
7387 # --------------------- #
7388
7389 for ac_prog in gawk mawk nawk awk
7390 do
7391 # Extract the first word of "$ac_prog", so it can be a program name with args.
7392 set dummy $ac_prog; ac_word=$2
7393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7394 $as_echo_n "checking for $ac_word... " >&6; }
7395 if ${ac_cv_prog_AWK+:} false; then :
7396 $as_echo_n "(cached) " >&6
7397 else
7398 if test -n "$AWK"; then
7399 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7400 else
7401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7402 for as_dir in $PATH
7403 do
7404 IFS=$as_save_IFS
7405 test -z "$as_dir" && as_dir=.
7406 for ac_exec_ext in '' $ac_executable_extensions; do
7407 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7408 ac_cv_prog_AWK="$ac_prog"
7409 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7410 break 2
7411 fi
7412 done
7413 done
7414 IFS=$as_save_IFS
7415
7416 fi
7417 fi
7418 AWK=$ac_cv_prog_AWK
7419 if test -n "$AWK"; then
7420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7421 $as_echo "$AWK" >&6; }
7422 else
7423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7424 $as_echo "no" >&6; }
7425 fi
7426
7427
7428 test -n "$AWK" && break
7429 done
7430
7431 # Find a good install program. We prefer a C program (faster),
7432 # so one script is as good as another. But avoid the broken or
7433 # incompatible versions:
7434 # SysV /etc/install, /usr/sbin/install
7435 # SunOS /usr/etc/install
7436 # IRIX /sbin/install
7437 # AIX /bin/install
7438 # AmigaOS /C/install, which installs bootblocks on floppy discs
7439 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7440 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7441 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7442 # OS/2's system install, which has a completely different semantic
7443 # ./install, which can be erroneously created by make from ./install.sh.
7444 # Reject install programs that cannot install multiple files.
7445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7446 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7447 if test -z "$INSTALL"; then
7448 if ${ac_cv_path_install+:} false; then :
7449 $as_echo_n "(cached) " >&6
7450 else
7451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7452 for as_dir in $PATH
7453 do
7454 IFS=$as_save_IFS
7455 test -z "$as_dir" && as_dir=.
7456 # Account for people who put trailing slashes in PATH elements.
7457 case $as_dir/ in #((
7458 ./ | .// | /[cC]/* | \
7459 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7460 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7461 /usr/ucb/* ) ;;
7462 *)
7463 # OSF1 and SCO ODT 3.0 have their own names for install.
7464 # Don't use installbsd from OSF since it installs stuff as root
7465 # by default.
7466 for ac_prog in ginstall scoinst install; do
7467 for ac_exec_ext in '' $ac_executable_extensions; do
7468 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7469 if test $ac_prog = install &&
7470 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7471 # AIX install. It has an incompatible calling convention.
7472 :
7473 elif test $ac_prog = install &&
7474 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7475 # program-specific install script used by HP pwplus--don't use.
7476 :
7477 else
7478 rm -rf conftest.one conftest.two conftest.dir
7479 echo one > conftest.one
7480 echo two > conftest.two
7481 mkdir conftest.dir
7482 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7483 test -s conftest.one && test -s conftest.two &&
7484 test -s conftest.dir/conftest.one &&
7485 test -s conftest.dir/conftest.two
7486 then
7487 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7488 break 3
7489 fi
7490 fi
7491 fi
7492 done
7493 done
7494 ;;
7495 esac
7496
7497 done
7498 IFS=$as_save_IFS
7499
7500 rm -rf conftest.one conftest.two conftest.dir
7501
7502 fi
7503 if test "${ac_cv_path_install+set}" = set; then
7504 INSTALL=$ac_cv_path_install
7505 else
7506 # As a last resort, use the slow shell script. Don't cache a
7507 # value for INSTALL within a source directory, because that will
7508 # break other packages using the cache if that directory is
7509 # removed, or if the value is a relative name.
7510 INSTALL=$ac_install_sh
7511 fi
7512 fi
7513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7514 $as_echo "$INSTALL" >&6; }
7515
7516 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7517 # It thinks the first close brace ends the variable substitution.
7518 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7519
7520 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7521
7522 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7523
7524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7525 $as_echo_n "checking whether ln -s works... " >&6; }
7526 LN_S=$as_ln_s
7527 if test "$LN_S" = "ln -s"; then
7528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7529 $as_echo "yes" >&6; }
7530 else
7531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7532 $as_echo "no, using $LN_S" >&6; }
7533 fi
7534
7535 if test -n "$ac_tool_prefix"; then
7536 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7537 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7539 $as_echo_n "checking for $ac_word... " >&6; }
7540 if ${ac_cv_prog_RANLIB+:} false; then :
7541 $as_echo_n "(cached) " >&6
7542 else
7543 if test -n "$RANLIB"; then
7544 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7545 else
7546 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7547 for as_dir in $PATH
7548 do
7549 IFS=$as_save_IFS
7550 test -z "$as_dir" && as_dir=.
7551 for ac_exec_ext in '' $ac_executable_extensions; do
7552 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7553 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7554 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7555 break 2
7556 fi
7557 done
7558 done
7559 IFS=$as_save_IFS
7560
7561 fi
7562 fi
7563 RANLIB=$ac_cv_prog_RANLIB
7564 if test -n "$RANLIB"; then
7565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7566 $as_echo "$RANLIB" >&6; }
7567 else
7568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7569 $as_echo "no" >&6; }
7570 fi
7571
7572
7573 fi
7574 if test -z "$ac_cv_prog_RANLIB"; then
7575 ac_ct_RANLIB=$RANLIB
7576 # Extract the first word of "ranlib", so it can be a program name with args.
7577 set dummy ranlib; ac_word=$2
7578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7579 $as_echo_n "checking for $ac_word... " >&6; }
7580 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7581 $as_echo_n "(cached) " >&6
7582 else
7583 if test -n "$ac_ct_RANLIB"; then
7584 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7585 else
7586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7587 for as_dir in $PATH
7588 do
7589 IFS=$as_save_IFS
7590 test -z "$as_dir" && as_dir=.
7591 for ac_exec_ext in '' $ac_executable_extensions; do
7592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7593 ac_cv_prog_ac_ct_RANLIB="ranlib"
7594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7595 break 2
7596 fi
7597 done
7598 done
7599 IFS=$as_save_IFS
7600
7601 fi
7602 fi
7603 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7604 if test -n "$ac_ct_RANLIB"; then
7605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7606 $as_echo "$ac_ct_RANLIB" >&6; }
7607 else
7608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7609 $as_echo "no" >&6; }
7610 fi
7611
7612 if test "x$ac_ct_RANLIB" = x; then
7613 RANLIB=":"
7614 else
7615 case $cross_compiling:$ac_tool_warned in
7616 yes:)
7617 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7618 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7619 ac_tool_warned=yes ;;
7620 esac
7621 RANLIB=$ac_ct_RANLIB
7622 fi
7623 else
7624 RANLIB="$ac_cv_prog_RANLIB"
7625 fi
7626
7627 for ac_prog in 'bison -y' byacc
7628 do
7629 # Extract the first word of "$ac_prog", so it can be a program name with args.
7630 set dummy $ac_prog; ac_word=$2
7631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7632 $as_echo_n "checking for $ac_word... " >&6; }
7633 if ${ac_cv_prog_YACC+:} false; then :
7634 $as_echo_n "(cached) " >&6
7635 else
7636 if test -n "$YACC"; then
7637 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7638 else
7639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7640 for as_dir in $PATH
7641 do
7642 IFS=$as_save_IFS
7643 test -z "$as_dir" && as_dir=.
7644 for ac_exec_ext in '' $ac_executable_extensions; do
7645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7646 ac_cv_prog_YACC="$ac_prog"
7647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7648 break 2
7649 fi
7650 done
7651 done
7652 IFS=$as_save_IFS
7653
7654 fi
7655 fi
7656 YACC=$ac_cv_prog_YACC
7657 if test -n "$YACC"; then
7658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7659 $as_echo "$YACC" >&6; }
7660 else
7661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7662 $as_echo "no" >&6; }
7663 fi
7664
7665
7666 test -n "$YACC" && break
7667 done
7668 test -n "$YACC" || YACC="yacc"
7669
7670
7671 if test -n "$ac_tool_prefix"; then
7672 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7673 set dummy ${ac_tool_prefix}ar; ac_word=$2
7674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7675 $as_echo_n "checking for $ac_word... " >&6; }
7676 if ${ac_cv_prog_AR+:} false; then :
7677 $as_echo_n "(cached) " >&6
7678 else
7679 if test -n "$AR"; then
7680 ac_cv_prog_AR="$AR" # Let the user override the test.
7681 else
7682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7683 for as_dir in $PATH
7684 do
7685 IFS=$as_save_IFS
7686 test -z "$as_dir" && as_dir=.
7687 for ac_exec_ext in '' $ac_executable_extensions; do
7688 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7689 ac_cv_prog_AR="${ac_tool_prefix}ar"
7690 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7691 break 2
7692 fi
7693 done
7694 done
7695 IFS=$as_save_IFS
7696
7697 fi
7698 fi
7699 AR=$ac_cv_prog_AR
7700 if test -n "$AR"; then
7701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7702 $as_echo "$AR" >&6; }
7703 else
7704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7705 $as_echo "no" >&6; }
7706 fi
7707
7708
7709 fi
7710 if test -z "$ac_cv_prog_AR"; then
7711 ac_ct_AR=$AR
7712 # Extract the first word of "ar", so it can be a program name with args.
7713 set dummy ar; ac_word=$2
7714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7715 $as_echo_n "checking for $ac_word... " >&6; }
7716 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7717 $as_echo_n "(cached) " >&6
7718 else
7719 if test -n "$ac_ct_AR"; then
7720 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7721 else
7722 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7723 for as_dir in $PATH
7724 do
7725 IFS=$as_save_IFS
7726 test -z "$as_dir" && as_dir=.
7727 for ac_exec_ext in '' $ac_executable_extensions; do
7728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7729 ac_cv_prog_ac_ct_AR="ar"
7730 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7731 break 2
7732 fi
7733 done
7734 done
7735 IFS=$as_save_IFS
7736
7737 fi
7738 fi
7739 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7740 if test -n "$ac_ct_AR"; then
7741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7742 $as_echo "$ac_ct_AR" >&6; }
7743 else
7744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7745 $as_echo "no" >&6; }
7746 fi
7747
7748 if test "x$ac_ct_AR" = x; then
7749 AR=""
7750 else
7751 case $cross_compiling:$ac_tool_warned in
7752 yes:)
7753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7754 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7755 ac_tool_warned=yes ;;
7756 esac
7757 AR=$ac_ct_AR
7758 fi
7759 else
7760 AR="$ac_cv_prog_AR"
7761 fi
7762
7763 if test -n "$ac_tool_prefix"; then
7764 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7765 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7767 $as_echo_n "checking for $ac_word... " >&6; }
7768 if ${ac_cv_prog_DLLTOOL+:} false; then :
7769 $as_echo_n "(cached) " >&6
7770 else
7771 if test -n "$DLLTOOL"; then
7772 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7773 else
7774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7775 for as_dir in $PATH
7776 do
7777 IFS=$as_save_IFS
7778 test -z "$as_dir" && as_dir=.
7779 for ac_exec_ext in '' $ac_executable_extensions; do
7780 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7781 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7782 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7783 break 2
7784 fi
7785 done
7786 done
7787 IFS=$as_save_IFS
7788
7789 fi
7790 fi
7791 DLLTOOL=$ac_cv_prog_DLLTOOL
7792 if test -n "$DLLTOOL"; then
7793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7794 $as_echo "$DLLTOOL" >&6; }
7795 else
7796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7797 $as_echo "no" >&6; }
7798 fi
7799
7800
7801 fi
7802 if test -z "$ac_cv_prog_DLLTOOL"; then
7803 ac_ct_DLLTOOL=$DLLTOOL
7804 # Extract the first word of "dlltool", so it can be a program name with args.
7805 set dummy dlltool; ac_word=$2
7806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7807 $as_echo_n "checking for $ac_word... " >&6; }
7808 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7809 $as_echo_n "(cached) " >&6
7810 else
7811 if test -n "$ac_ct_DLLTOOL"; then
7812 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7813 else
7814 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7815 for as_dir in $PATH
7816 do
7817 IFS=$as_save_IFS
7818 test -z "$as_dir" && as_dir=.
7819 for ac_exec_ext in '' $ac_executable_extensions; do
7820 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7821 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7822 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7823 break 2
7824 fi
7825 done
7826 done
7827 IFS=$as_save_IFS
7828
7829 fi
7830 fi
7831 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7832 if test -n "$ac_ct_DLLTOOL"; then
7833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7834 $as_echo "$ac_ct_DLLTOOL" >&6; }
7835 else
7836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7837 $as_echo "no" >&6; }
7838 fi
7839
7840 if test "x$ac_ct_DLLTOOL" = x; then
7841 DLLTOOL=""
7842 else
7843 case $cross_compiling:$ac_tool_warned in
7844 yes:)
7845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7846 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7847 ac_tool_warned=yes ;;
7848 esac
7849 DLLTOOL=$ac_ct_DLLTOOL
7850 fi
7851 else
7852 DLLTOOL="$ac_cv_prog_DLLTOOL"
7853 fi
7854
7855 if test -n "$ac_tool_prefix"; then
7856 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7857 set dummy ${ac_tool_prefix}windres; ac_word=$2
7858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7859 $as_echo_n "checking for $ac_word... " >&6; }
7860 if ${ac_cv_prog_WINDRES+:} false; then :
7861 $as_echo_n "(cached) " >&6
7862 else
7863 if test -n "$WINDRES"; then
7864 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7865 else
7866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7867 for as_dir in $PATH
7868 do
7869 IFS=$as_save_IFS
7870 test -z "$as_dir" && as_dir=.
7871 for ac_exec_ext in '' $ac_executable_extensions; do
7872 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7873 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7874 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7875 break 2
7876 fi
7877 done
7878 done
7879 IFS=$as_save_IFS
7880
7881 fi
7882 fi
7883 WINDRES=$ac_cv_prog_WINDRES
7884 if test -n "$WINDRES"; then
7885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7886 $as_echo "$WINDRES" >&6; }
7887 else
7888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7889 $as_echo "no" >&6; }
7890 fi
7891
7892
7893 fi
7894 if test -z "$ac_cv_prog_WINDRES"; then
7895 ac_ct_WINDRES=$WINDRES
7896 # Extract the first word of "windres", so it can be a program name with args.
7897 set dummy windres; ac_word=$2
7898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7899 $as_echo_n "checking for $ac_word... " >&6; }
7900 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7901 $as_echo_n "(cached) " >&6
7902 else
7903 if test -n "$ac_ct_WINDRES"; then
7904 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7905 else
7906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7907 for as_dir in $PATH
7908 do
7909 IFS=$as_save_IFS
7910 test -z "$as_dir" && as_dir=.
7911 for ac_exec_ext in '' $ac_executable_extensions; do
7912 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7913 ac_cv_prog_ac_ct_WINDRES="windres"
7914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7915 break 2
7916 fi
7917 done
7918 done
7919 IFS=$as_save_IFS
7920
7921 fi
7922 fi
7923 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7924 if test -n "$ac_ct_WINDRES"; then
7925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7926 $as_echo "$ac_ct_WINDRES" >&6; }
7927 else
7928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7929 $as_echo "no" >&6; }
7930 fi
7931
7932 if test "x$ac_ct_WINDRES" = x; then
7933 WINDRES=""
7934 else
7935 case $cross_compiling:$ac_tool_warned in
7936 yes:)
7937 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7938 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7939 ac_tool_warned=yes ;;
7940 esac
7941 WINDRES=$ac_ct_WINDRES
7942 fi
7943 else
7944 WINDRES="$ac_cv_prog_WINDRES"
7945 fi
7946
7947
7948 case $host_os in
7949 gnu*)
7950 # Needed for GNU Hurd hosts.
7951 if test -n "$ac_tool_prefix"; then
7952 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7953 set dummy ${ac_tool_prefix}mig; ac_word=$2
7954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7955 $as_echo_n "checking for $ac_word... " >&6; }
7956 if ${ac_cv_prog_MIG+:} false; then :
7957 $as_echo_n "(cached) " >&6
7958 else
7959 if test -n "$MIG"; then
7960 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7961 else
7962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7963 for as_dir in $PATH
7964 do
7965 IFS=$as_save_IFS
7966 test -z "$as_dir" && as_dir=.
7967 for ac_exec_ext in '' $ac_executable_extensions; do
7968 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7969 ac_cv_prog_MIG="${ac_tool_prefix}mig"
7970 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7971 break 2
7972 fi
7973 done
7974 done
7975 IFS=$as_save_IFS
7976
7977 fi
7978 fi
7979 MIG=$ac_cv_prog_MIG
7980 if test -n "$MIG"; then
7981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7982 $as_echo "$MIG" >&6; }
7983 else
7984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7985 $as_echo "no" >&6; }
7986 fi
7987
7988
7989 fi
7990 if test -z "$ac_cv_prog_MIG"; then
7991 ac_ct_MIG=$MIG
7992 # Extract the first word of "mig", so it can be a program name with args.
7993 set dummy mig; ac_word=$2
7994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7995 $as_echo_n "checking for $ac_word... " >&6; }
7996 if ${ac_cv_prog_ac_ct_MIG+:} false; then :
7997 $as_echo_n "(cached) " >&6
7998 else
7999 if test -n "$ac_ct_MIG"; then
8000 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
8001 else
8002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8003 for as_dir in $PATH
8004 do
8005 IFS=$as_save_IFS
8006 test -z "$as_dir" && as_dir=.
8007 for ac_exec_ext in '' $ac_executable_extensions; do
8008 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8009 ac_cv_prog_ac_ct_MIG="mig"
8010 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8011 break 2
8012 fi
8013 done
8014 done
8015 IFS=$as_save_IFS
8016
8017 fi
8018 fi
8019 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
8020 if test -n "$ac_ct_MIG"; then
8021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8022 $as_echo "$ac_ct_MIG" >&6; }
8023 else
8024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8025 $as_echo "no" >&6; }
8026 fi
8027
8028 if test "x$ac_ct_MIG" = x; then
8029 MIG=""
8030 else
8031 case $cross_compiling:$ac_tool_warned in
8032 yes:)
8033 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8034 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8035 ac_tool_warned=yes ;;
8036 esac
8037 MIG=$ac_ct_MIG
8038 fi
8039 else
8040 MIG="$ac_cv_prog_MIG"
8041 fi
8042
8043 if test x"$MIG" = x; then
8044 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
8045 fi
8046 ;;
8047 esac
8048
8049 # ---------------------- #
8050 # Checks for libraries. #
8051 # ---------------------- #
8052
8053 # We might need to link with -lm; most simulators need it.
8054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8055 $as_echo_n "checking for main in -lm... " >&6; }
8056 if ${ac_cv_lib_m_main+:} false; then :
8057 $as_echo_n "(cached) " >&6
8058 else
8059 ac_check_lib_save_LIBS=$LIBS
8060 LIBS="-lm $LIBS"
8061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8062 /* end confdefs.h. */
8063
8064
8065 int
8066 main ()
8067 {
8068 return main ();
8069 ;
8070 return 0;
8071 }
8072 _ACEOF
8073 if ac_fn_c_try_link "$LINENO"; then :
8074 ac_cv_lib_m_main=yes
8075 else
8076 ac_cv_lib_m_main=no
8077 fi
8078 rm -f core conftest.err conftest.$ac_objext \
8079 conftest$ac_exeext conftest.$ac_ext
8080 LIBS=$ac_check_lib_save_LIBS
8081 fi
8082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8083 $as_echo "$ac_cv_lib_m_main" >&6; }
8084 if test "x$ac_cv_lib_m_main" = xyes; then :
8085 cat >>confdefs.h <<_ACEOF
8086 #define HAVE_LIBM 1
8087 _ACEOF
8088
8089 LIBS="-lm $LIBS"
8090
8091 fi
8092
8093
8094 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
8095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
8096 $as_echo_n "checking for library containing gethostbyname... " >&6; }
8097 if ${ac_cv_search_gethostbyname+:} false; then :
8098 $as_echo_n "(cached) " >&6
8099 else
8100 ac_func_search_save_LIBS=$LIBS
8101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8102 /* end confdefs.h. */
8103
8104 /* Override any GCC internal prototype to avoid an error.
8105 Use char because int might match the return type of a GCC
8106 builtin and then its argument prototype would still apply. */
8107 #ifdef __cplusplus
8108 extern "C"
8109 #endif
8110 char gethostbyname ();
8111 int
8112 main ()
8113 {
8114 return gethostbyname ();
8115 ;
8116 return 0;
8117 }
8118 _ACEOF
8119 for ac_lib in '' nsl; do
8120 if test -z "$ac_lib"; then
8121 ac_res="none required"
8122 else
8123 ac_res=-l$ac_lib
8124 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8125 fi
8126 if ac_fn_c_try_link "$LINENO"; then :
8127 ac_cv_search_gethostbyname=$ac_res
8128 fi
8129 rm -f core conftest.err conftest.$ac_objext \
8130 conftest$ac_exeext
8131 if ${ac_cv_search_gethostbyname+:} false; then :
8132 break
8133 fi
8134 done
8135 if ${ac_cv_search_gethostbyname+:} false; then :
8136
8137 else
8138 ac_cv_search_gethostbyname=no
8139 fi
8140 rm conftest.$ac_ext
8141 LIBS=$ac_func_search_save_LIBS
8142 fi
8143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
8144 $as_echo "$ac_cv_search_gethostbyname" >&6; }
8145 ac_res=$ac_cv_search_gethostbyname
8146 if test "$ac_res" != no; then :
8147 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8148
8149 fi
8150
8151
8152 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
8153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8154 $as_echo_n "checking for library containing socketpair... " >&6; }
8155 if ${ac_cv_search_socketpair+:} false; then :
8156 $as_echo_n "(cached) " >&6
8157 else
8158 ac_func_search_save_LIBS=$LIBS
8159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8160 /* end confdefs.h. */
8161
8162 /* Override any GCC internal prototype to avoid an error.
8163 Use char because int might match the return type of a GCC
8164 builtin and then its argument prototype would still apply. */
8165 #ifdef __cplusplus
8166 extern "C"
8167 #endif
8168 char socketpair ();
8169 int
8170 main ()
8171 {
8172 return socketpair ();
8173 ;
8174 return 0;
8175 }
8176 _ACEOF
8177 for ac_lib in '' socket; do
8178 if test -z "$ac_lib"; then
8179 ac_res="none required"
8180 else
8181 ac_res=-l$ac_lib
8182 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8183 fi
8184 if ac_fn_c_try_link "$LINENO"; then :
8185 ac_cv_search_socketpair=$ac_res
8186 fi
8187 rm -f core conftest.err conftest.$ac_objext \
8188 conftest$ac_exeext
8189 if ${ac_cv_search_socketpair+:} false; then :
8190 break
8191 fi
8192 done
8193 if ${ac_cv_search_socketpair+:} false; then :
8194
8195 else
8196 ac_cv_search_socketpair=no
8197 fi
8198 rm conftest.$ac_ext
8199 LIBS=$ac_func_search_save_LIBS
8200 fi
8201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8202 $as_echo "$ac_cv_search_socketpair" >&6; }
8203 ac_res=$ac_cv_search_socketpair
8204 if test "$ac_res" != no; then :
8205 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8206
8207 fi
8208
8209
8210 # Link in zlib if we can. This allows us to read compressed debug sections.
8211
8212 # Use the system's zlib library.
8213 zlibdir="-L\$(top_builddir)/../zlib"
8214 zlibinc="-I\$(top_srcdir)/../zlib"
8215
8216 # Check whether --with-system-zlib was given.
8217 if test "${with_system_zlib+set}" = set; then :
8218 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
8219 zlibdir=
8220 zlibinc=
8221 fi
8222
8223 fi
8224
8225
8226
8227
8228
8229 # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
8230 # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
8231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
8232 $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
8233 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
8234 $as_echo_n "(cached) " >&6
8235 else
8236 ac_func_search_save_LIBS=$LIBS
8237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8238 /* end confdefs.h. */
8239
8240 /* Override any GCC internal prototype to avoid an error.
8241 Use char because int might match the return type of a GCC
8242 builtin and then its argument prototype would still apply. */
8243 #ifdef __cplusplus
8244 extern "C"
8245 #endif
8246 char kinfo_getvmmap ();
8247 int
8248 main ()
8249 {
8250 return kinfo_getvmmap ();
8251 ;
8252 return 0;
8253 }
8254 _ACEOF
8255 for ac_lib in '' util util-freebsd; do
8256 if test -z "$ac_lib"; then
8257 ac_res="none required"
8258 else
8259 ac_res=-l$ac_lib
8260 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8261 fi
8262 if ac_fn_c_try_link "$LINENO"; then :
8263 ac_cv_search_kinfo_getvmmap=$ac_res
8264 fi
8265 rm -f core conftest.err conftest.$ac_objext \
8266 conftest$ac_exeext
8267 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
8268 break
8269 fi
8270 done
8271 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
8272
8273 else
8274 ac_cv_search_kinfo_getvmmap=no
8275 fi
8276 rm conftest.$ac_ext
8277 LIBS=$ac_func_search_save_LIBS
8278 fi
8279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8280 $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8281 ac_res=$ac_cv_search_kinfo_getvmmap
8282 if test "$ac_res" != no; then :
8283 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8284
8285 $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8286
8287 fi
8288
8289
8290
8291 if test "X$prefix" = "XNONE"; then
8292 acl_final_prefix="$ac_default_prefix"
8293 else
8294 acl_final_prefix="$prefix"
8295 fi
8296 if test "X$exec_prefix" = "XNONE"; then
8297 acl_final_exec_prefix='${prefix}'
8298 else
8299 acl_final_exec_prefix="$exec_prefix"
8300 fi
8301 acl_save_prefix="$prefix"
8302 prefix="$acl_final_prefix"
8303 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8304 prefix="$acl_save_prefix"
8305
8306
8307 # Check whether --with-gnu-ld was given.
8308 if test "${with_gnu_ld+set}" = set; then :
8309 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8310 else
8311 with_gnu_ld=no
8312 fi
8313
8314 # Prepare PATH_SEPARATOR.
8315 # The user is always right.
8316 if test "${PATH_SEPARATOR+set}" != set; then
8317 echo "#! /bin/sh" >conf$$.sh
8318 echo "exit 0" >>conf$$.sh
8319 chmod +x conf$$.sh
8320 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8321 PATH_SEPARATOR=';'
8322 else
8323 PATH_SEPARATOR=:
8324 fi
8325 rm -f conf$$.sh
8326 fi
8327 ac_prog=ld
8328 if test "$GCC" = yes; then
8329 # Check if gcc -print-prog-name=ld gives a path.
8330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8331 $as_echo_n "checking for ld used by GCC... " >&6; }
8332 case $host in
8333 *-*-mingw*)
8334 # gcc leaves a trailing carriage return which upsets mingw
8335 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8336 *)
8337 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8338 esac
8339 case $ac_prog in
8340 # Accept absolute paths.
8341 [\\/]* | [A-Za-z]:[\\/]*)
8342 re_direlt='/[^/][^/]*/\.\./'
8343 # Canonicalize the path of ld
8344 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8345 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8346 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8347 done
8348 test -z "$LD" && LD="$ac_prog"
8349 ;;
8350 "")
8351 # If it fails, then pretend we aren't using GCC.
8352 ac_prog=ld
8353 ;;
8354 *)
8355 # If it is relative, then search for the first ld in PATH.
8356 with_gnu_ld=unknown
8357 ;;
8358 esac
8359 elif test "$with_gnu_ld" = yes; then
8360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8361 $as_echo_n "checking for GNU ld... " >&6; }
8362 else
8363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8364 $as_echo_n "checking for non-GNU ld... " >&6; }
8365 fi
8366 if ${acl_cv_path_LD+:} false; then :
8367 $as_echo_n "(cached) " >&6
8368 else
8369 if test -z "$LD"; then
8370 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8371 for ac_dir in $PATH; do
8372 test -z "$ac_dir" && ac_dir=.
8373 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8374 acl_cv_path_LD="$ac_dir/$ac_prog"
8375 # Check to see if the program is GNU ld. I'd rather use --version,
8376 # but apparently some GNU ld's only accept -v.
8377 # Break only if it was the GNU/non-GNU ld that we prefer.
8378 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8379 test "$with_gnu_ld" != no && break
8380 else
8381 test "$with_gnu_ld" != yes && break
8382 fi
8383 fi
8384 done
8385 IFS="$ac_save_ifs"
8386 else
8387 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8388 fi
8389 fi
8390
8391 LD="$acl_cv_path_LD"
8392 if test -n "$LD"; then
8393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8394 $as_echo "$LD" >&6; }
8395 else
8396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8397 $as_echo "no" >&6; }
8398 fi
8399 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8401 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8402 if ${acl_cv_prog_gnu_ld+:} false; then :
8403 $as_echo_n "(cached) " >&6
8404 else
8405 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8406 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8407 acl_cv_prog_gnu_ld=yes
8408 else
8409 acl_cv_prog_gnu_ld=no
8410 fi
8411 fi
8412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8413 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8414 with_gnu_ld=$acl_cv_prog_gnu_ld
8415
8416
8417
8418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8419 $as_echo_n "checking for shared library run path origin... " >&6; }
8420 if ${acl_cv_rpath+:} false; then :
8421 $as_echo_n "(cached) " >&6
8422 else
8423
8424 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8425 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8426 . ./conftest.sh
8427 rm -f ./conftest.sh
8428 acl_cv_rpath=done
8429
8430 fi
8431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8432 $as_echo "$acl_cv_rpath" >&6; }
8433 wl="$acl_cv_wl"
8434 libext="$acl_cv_libext"
8435 shlibext="$acl_cv_shlibext"
8436 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8437 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8438 hardcode_direct="$acl_cv_hardcode_direct"
8439 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8440 # Check whether --enable-rpath was given.
8441 if test "${enable_rpath+set}" = set; then :
8442 enableval=$enable_rpath; :
8443 else
8444 enable_rpath=yes
8445 fi
8446
8447
8448
8449
8450
8451
8452
8453
8454 use_additional=yes
8455
8456 acl_save_prefix="$prefix"
8457 prefix="$acl_final_prefix"
8458 acl_save_exec_prefix="$exec_prefix"
8459 exec_prefix="$acl_final_exec_prefix"
8460
8461 eval additional_includedir=\"$includedir\"
8462 eval additional_libdir=\"$libdir\"
8463
8464 exec_prefix="$acl_save_exec_prefix"
8465 prefix="$acl_save_prefix"
8466
8467
8468 # Check whether --with-libiconv-prefix was given.
8469 if test "${with_libiconv_prefix+set}" = set; then :
8470 withval=$with_libiconv_prefix;
8471 if test "X$withval" = "Xno"; then
8472 use_additional=no
8473 else
8474 if test "X$withval" = "X"; then
8475
8476 acl_save_prefix="$prefix"
8477 prefix="$acl_final_prefix"
8478 acl_save_exec_prefix="$exec_prefix"
8479 exec_prefix="$acl_final_exec_prefix"
8480
8481 eval additional_includedir=\"$includedir\"
8482 eval additional_libdir=\"$libdir\"
8483
8484 exec_prefix="$acl_save_exec_prefix"
8485 prefix="$acl_save_prefix"
8486
8487 else
8488 additional_includedir="$withval/include"
8489 additional_libdir="$withval/lib"
8490 fi
8491 fi
8492
8493 fi
8494
8495
8496 # Check whether --with-libiconv-type was given.
8497 if test "${with_libiconv_type+set}" = set; then :
8498 withval=$with_libiconv_type; with_libiconv_type=$withval
8499 else
8500 with_libiconv_type=auto
8501 fi
8502
8503 lib_type=`eval echo \$with_libiconv_type`
8504
8505 LIBICONV=
8506 LTLIBICONV=
8507 INCICONV=
8508 rpathdirs=
8509 ltrpathdirs=
8510 names_already_handled=
8511 names_next_round='iconv '
8512 while test -n "$names_next_round"; do
8513 names_this_round="$names_next_round"
8514 names_next_round=
8515 for name in $names_this_round; do
8516 already_handled=
8517 for n in $names_already_handled; do
8518 if test "$n" = "$name"; then
8519 already_handled=yes
8520 break
8521 fi
8522 done
8523 if test -z "$already_handled"; then
8524 names_already_handled="$names_already_handled $name"
8525 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8526 eval value=\"\$HAVE_LIB$uppername\"
8527 if test -n "$value"; then
8528 if test "$value" = yes; then
8529 eval value=\"\$LIB$uppername\"
8530 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8531 eval value=\"\$LTLIB$uppername\"
8532 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8533 else
8534 :
8535 fi
8536 else
8537 found_dir=
8538 found_la=
8539 found_so=
8540 found_a=
8541 if test $use_additional = yes; then
8542 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8543 found_dir="$additional_libdir"
8544 found_so="$additional_libdir/lib$name.$shlibext"
8545 if test -f "$additional_libdir/lib$name.la"; then
8546 found_la="$additional_libdir/lib$name.la"
8547 fi
8548 elif test x$lib_type != xshared; then
8549 if test -f "$additional_libdir/lib$name.$libext"; then
8550 found_dir="$additional_libdir"
8551 found_a="$additional_libdir/lib$name.$libext"
8552 if test -f "$additional_libdir/lib$name.la"; then
8553 found_la="$additional_libdir/lib$name.la"
8554 fi
8555 fi
8556 fi
8557 fi
8558 if test "X$found_dir" = "X"; then
8559 for x in $LDFLAGS $LTLIBICONV; do
8560
8561 acl_save_prefix="$prefix"
8562 prefix="$acl_final_prefix"
8563 acl_save_exec_prefix="$exec_prefix"
8564 exec_prefix="$acl_final_exec_prefix"
8565 eval x=\"$x\"
8566 exec_prefix="$acl_save_exec_prefix"
8567 prefix="$acl_save_prefix"
8568
8569 case "$x" in
8570 -L*)
8571 dir=`echo "X$x" | sed -e 's/^X-L//'`
8572 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8573 found_dir="$dir"
8574 found_so="$dir/lib$name.$shlibext"
8575 if test -f "$dir/lib$name.la"; then
8576 found_la="$dir/lib$name.la"
8577 fi
8578 elif test x$lib_type != xshared; then
8579 if test -f "$dir/lib$name.$libext"; then
8580 found_dir="$dir"
8581 found_a="$dir/lib$name.$libext"
8582 if test -f "$dir/lib$name.la"; then
8583 found_la="$dir/lib$name.la"
8584 fi
8585 fi
8586 fi
8587 ;;
8588 esac
8589 if test "X$found_dir" != "X"; then
8590 break
8591 fi
8592 done
8593 fi
8594 if test "X$found_dir" != "X"; then
8595 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8596 if test "X$found_so" != "X"; then
8597 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8598 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8599 else
8600 haveit=
8601 for x in $ltrpathdirs; do
8602 if test "X$x" = "X$found_dir"; then
8603 haveit=yes
8604 break
8605 fi
8606 done
8607 if test -z "$haveit"; then
8608 ltrpathdirs="$ltrpathdirs $found_dir"
8609 fi
8610 if test "$hardcode_direct" = yes; then
8611 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8612 else
8613 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8614 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8615 haveit=
8616 for x in $rpathdirs; do
8617 if test "X$x" = "X$found_dir"; then
8618 haveit=yes
8619 break
8620 fi
8621 done
8622 if test -z "$haveit"; then
8623 rpathdirs="$rpathdirs $found_dir"
8624 fi
8625 else
8626 haveit=
8627 for x in $LDFLAGS $LIBICONV; do
8628
8629 acl_save_prefix="$prefix"
8630 prefix="$acl_final_prefix"
8631 acl_save_exec_prefix="$exec_prefix"
8632 exec_prefix="$acl_final_exec_prefix"
8633 eval x=\"$x\"
8634 exec_prefix="$acl_save_exec_prefix"
8635 prefix="$acl_save_prefix"
8636
8637 if test "X$x" = "X-L$found_dir"; then
8638 haveit=yes
8639 break
8640 fi
8641 done
8642 if test -z "$haveit"; then
8643 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8644 fi
8645 if test "$hardcode_minus_L" != no; then
8646 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8647 else
8648 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8649 fi
8650 fi
8651 fi
8652 fi
8653 else
8654 if test "X$found_a" != "X"; then
8655 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8656 else
8657 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8658 fi
8659 fi
8660 additional_includedir=
8661 case "$found_dir" in
8662 */lib | */lib/)
8663 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8664 additional_includedir="$basedir/include"
8665 ;;
8666 esac
8667 if test "X$additional_includedir" != "X"; then
8668 if test "X$additional_includedir" != "X/usr/include"; then
8669 haveit=
8670 if test "X$additional_includedir" = "X/usr/local/include"; then
8671 if test -n "$GCC"; then
8672 case $host_os in
8673 linux*) haveit=yes;;
8674 esac
8675 fi
8676 fi
8677 if test -z "$haveit"; then
8678 for x in $CPPFLAGS $INCICONV; do
8679
8680 acl_save_prefix="$prefix"
8681 prefix="$acl_final_prefix"
8682 acl_save_exec_prefix="$exec_prefix"
8683 exec_prefix="$acl_final_exec_prefix"
8684 eval x=\"$x\"
8685 exec_prefix="$acl_save_exec_prefix"
8686 prefix="$acl_save_prefix"
8687
8688 if test "X$x" = "X-I$additional_includedir"; then
8689 haveit=yes
8690 break
8691 fi
8692 done
8693 if test -z "$haveit"; then
8694 if test -d "$additional_includedir"; then
8695 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8696 fi
8697 fi
8698 fi
8699 fi
8700 fi
8701 if test -n "$found_la"; then
8702 save_libdir="$libdir"
8703 case "$found_la" in
8704 */* | *\\*) . "$found_la" ;;
8705 *) . "./$found_la" ;;
8706 esac
8707 libdir="$save_libdir"
8708 for dep in $dependency_libs; do
8709 case "$dep" in
8710 -L*)
8711 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8712 if test "X$additional_libdir" != "X/usr/lib"; then
8713 haveit=
8714 if test "X$additional_libdir" = "X/usr/local/lib"; then
8715 if test -n "$GCC"; then
8716 case $host_os in
8717 linux*) haveit=yes;;
8718 esac
8719 fi
8720 fi
8721 if test -z "$haveit"; then
8722 haveit=
8723 for x in $LDFLAGS $LIBICONV; do
8724
8725 acl_save_prefix="$prefix"
8726 prefix="$acl_final_prefix"
8727 acl_save_exec_prefix="$exec_prefix"
8728 exec_prefix="$acl_final_exec_prefix"
8729 eval x=\"$x\"
8730 exec_prefix="$acl_save_exec_prefix"
8731 prefix="$acl_save_prefix"
8732
8733 if test "X$x" = "X-L$additional_libdir"; then
8734 haveit=yes
8735 break
8736 fi
8737 done
8738 if test -z "$haveit"; then
8739 if test -d "$additional_libdir"; then
8740 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8741 fi
8742 fi
8743 haveit=
8744 for x in $LDFLAGS $LTLIBICONV; do
8745
8746 acl_save_prefix="$prefix"
8747 prefix="$acl_final_prefix"
8748 acl_save_exec_prefix="$exec_prefix"
8749 exec_prefix="$acl_final_exec_prefix"
8750 eval x=\"$x\"
8751 exec_prefix="$acl_save_exec_prefix"
8752 prefix="$acl_save_prefix"
8753
8754 if test "X$x" = "X-L$additional_libdir"; then
8755 haveit=yes
8756 break
8757 fi
8758 done
8759 if test -z "$haveit"; then
8760 if test -d "$additional_libdir"; then
8761 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8762 fi
8763 fi
8764 fi
8765 fi
8766 ;;
8767 -R*)
8768 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8769 if test "$enable_rpath" != no; then
8770 haveit=
8771 for x in $rpathdirs; do
8772 if test "X$x" = "X$dir"; then
8773 haveit=yes
8774 break
8775 fi
8776 done
8777 if test -z "$haveit"; then
8778 rpathdirs="$rpathdirs $dir"
8779 fi
8780 haveit=
8781 for x in $ltrpathdirs; do
8782 if test "X$x" = "X$dir"; then
8783 haveit=yes
8784 break
8785 fi
8786 done
8787 if test -z "$haveit"; then
8788 ltrpathdirs="$ltrpathdirs $dir"
8789 fi
8790 fi
8791 ;;
8792 -l*)
8793 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8794 ;;
8795 *.la)
8796 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8797 ;;
8798 *)
8799 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8800 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8801 ;;
8802 esac
8803 done
8804 fi
8805 else
8806 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8807 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8808 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8809 else
8810 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8811 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8812 fi
8813 fi
8814 fi
8815 fi
8816 done
8817 done
8818 if test "X$rpathdirs" != "X"; then
8819 if test -n "$hardcode_libdir_separator"; then
8820 alldirs=
8821 for found_dir in $rpathdirs; do
8822 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8823 done
8824 acl_save_libdir="$libdir"
8825 libdir="$alldirs"
8826 eval flag=\"$hardcode_libdir_flag_spec\"
8827 libdir="$acl_save_libdir"
8828 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8829 else
8830 for found_dir in $rpathdirs; do
8831 acl_save_libdir="$libdir"
8832 libdir="$found_dir"
8833 eval flag=\"$hardcode_libdir_flag_spec\"
8834 libdir="$acl_save_libdir"
8835 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8836 done
8837 fi
8838 fi
8839 if test "X$ltrpathdirs" != "X"; then
8840 for found_dir in $ltrpathdirs; do
8841 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8842 done
8843 fi
8844
8845
8846
8847
8848
8849
8850
8851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8852 $as_echo_n "checking for iconv... " >&6; }
8853 if ${am_cv_func_iconv+:} false; then :
8854 $as_echo_n "(cached) " >&6
8855 else
8856
8857 am_cv_func_iconv="no, consider installing GNU libiconv"
8858 am_cv_lib_iconv=no
8859 am_save_CPPFLAGS="$CPPFLAGS"
8860 CPPFLAGS="$CPPFLAGS $INCICONV"
8861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8862 /* end confdefs.h. */
8863 #include <stdlib.h>
8864 #include <iconv.h>
8865 int
8866 main ()
8867 {
8868 iconv_t cd = iconv_open("","");
8869 iconv(cd,NULL,NULL,NULL,NULL);
8870 iconv_close(cd);
8871 ;
8872 return 0;
8873 }
8874 _ACEOF
8875 if ac_fn_c_try_link "$LINENO"; then :
8876 am_cv_func_iconv=yes
8877 fi
8878 rm -f core conftest.err conftest.$ac_objext \
8879 conftest$ac_exeext conftest.$ac_ext
8880 CPPFLAGS="$am_save_CPPFLAGS"
8881
8882 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8883 for _libs in .libs _libs; do
8884 am_save_CPPFLAGS="$CPPFLAGS"
8885 am_save_LIBS="$LIBS"
8886 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8887 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8889 /* end confdefs.h. */
8890 #include <stdlib.h>
8891 #include <iconv.h>
8892 int
8893 main ()
8894 {
8895 iconv_t cd = iconv_open("","");
8896 iconv(cd,NULL,NULL,NULL,NULL);
8897 iconv_close(cd);
8898 ;
8899 return 0;
8900 }
8901 _ACEOF
8902 if ac_fn_c_try_link "$LINENO"; then :
8903 INCICONV="-I../libiconv/include"
8904 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8905 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8906 am_cv_lib_iconv=yes
8907 am_cv_func_iconv=yes
8908 fi
8909 rm -f core conftest.err conftest.$ac_objext \
8910 conftest$ac_exeext conftest.$ac_ext
8911 CPPFLAGS="$am_save_CPPFLAGS"
8912 LIBS="$am_save_LIBS"
8913 if test "$am_cv_func_iconv" = "yes"; then
8914 break
8915 fi
8916 done
8917 fi
8918
8919 if test "$am_cv_func_iconv" != yes; then
8920 am_save_CPPFLAGS="$CPPFLAGS"
8921 am_save_LIBS="$LIBS"
8922 CPPFLAGS="$CPPFLAGS $INCICONV"
8923 LIBS="$LIBS $LIBICONV"
8924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8925 /* end confdefs.h. */
8926 #include <stdlib.h>
8927 #include <iconv.h>
8928 int
8929 main ()
8930 {
8931 iconv_t cd = iconv_open("","");
8932 iconv(cd,NULL,NULL,NULL,NULL);
8933 iconv_close(cd);
8934 ;
8935 return 0;
8936 }
8937 _ACEOF
8938 if ac_fn_c_try_link "$LINENO"; then :
8939 am_cv_lib_iconv=yes
8940 am_cv_func_iconv=yes
8941 fi
8942 rm -f core conftest.err conftest.$ac_objext \
8943 conftest$ac_exeext conftest.$ac_ext
8944 CPPFLAGS="$am_save_CPPFLAGS"
8945 LIBS="$am_save_LIBS"
8946 fi
8947
8948 fi
8949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8950 $as_echo "$am_cv_func_iconv" >&6; }
8951 if test "$am_cv_func_iconv" = yes; then
8952
8953 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8954
8955 fi
8956 if test "$am_cv_lib_iconv" = yes; then
8957
8958 for element in $INCICONV; do
8959 haveit=
8960 for x in $CPPFLAGS; do
8961
8962 acl_save_prefix="$prefix"
8963 prefix="$acl_final_prefix"
8964 acl_save_exec_prefix="$exec_prefix"
8965 exec_prefix="$acl_final_exec_prefix"
8966 eval x=\"$x\"
8967 exec_prefix="$acl_save_exec_prefix"
8968 prefix="$acl_save_prefix"
8969
8970 if test "X$x" = "X$element"; then
8971 haveit=yes
8972 break
8973 fi
8974 done
8975 if test -z "$haveit"; then
8976 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8977 fi
8978 done
8979
8980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8981 $as_echo_n "checking how to link with libiconv... " >&6; }
8982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8983 $as_echo "$LIBICONV" >&6; }
8984 else
8985 LIBICONV=
8986 LTLIBICONV=
8987 fi
8988
8989
8990
8991 if test "$am_cv_func_iconv" = yes; then
8992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8993 $as_echo_n "checking for iconv declaration... " >&6; }
8994 if ${am_cv_proto_iconv+:} false; then :
8995 $as_echo_n "(cached) " >&6
8996 else
8997
8998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8999 /* end confdefs.h. */
9000
9001 #include <stdlib.h>
9002 #include <iconv.h>
9003 extern
9004 #ifdef __cplusplus
9005 "C"
9006 #endif
9007 #if defined(__STDC__) || defined(__cplusplus)
9008 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9009 #else
9010 size_t iconv();
9011 #endif
9012
9013 int
9014 main ()
9015 {
9016
9017 ;
9018 return 0;
9019 }
9020 _ACEOF
9021 if ac_fn_c_try_compile "$LINENO"; then :
9022 am_cv_proto_iconv_arg1=""
9023 else
9024 am_cv_proto_iconv_arg1="const"
9025 fi
9026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9027 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);"
9028 fi
9029
9030 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
9031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
9032 }$am_cv_proto_iconv" >&5
9033 $as_echo "${ac_t:-
9034 }$am_cv_proto_iconv" >&6; }
9035
9036 cat >>confdefs.h <<_ACEOF
9037 #define ICONV_CONST $am_cv_proto_iconv_arg1
9038 _ACEOF
9039
9040 fi
9041
9042
9043 # GDB may fork/exec the iconv program to get the list of supported character
9044 # sets. Allow the user to specify where to find it.
9045 # There are several factors affecting the choice of option name:
9046 # - There is already --with-libiconv-prefix but we can't use it, it specifies
9047 # the build-time location of libiconv files.
9048 # - The program we need to find is iconv, which comes with glibc. The user
9049 # doesn't necessarily have libiconv installed. Therefore naming this
9050 # --with-libiconv-foo feels wrong.
9051 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
9052 # defined to work on directories not files (though it really doesn't know
9053 # the difference).
9054 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
9055 # with --with-libiconv-prefix.
9056 # Putting these together is why the option name is --with-iconv-bin.
9057
9058
9059 # Check whether --with-iconv-bin was given.
9060 if test "${with_iconv_bin+set}" = set; then :
9061 withval=$with_iconv_bin; iconv_bin="${withval}"
9062
9063 cat >>confdefs.h <<_ACEOF
9064 #define ICONV_BIN "${iconv_bin}"
9065 _ACEOF
9066
9067
9068 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9069 if test "x$prefix" = xNONE; then
9070 test_prefix=/usr/local
9071 else
9072 test_prefix=$prefix
9073 fi
9074 else
9075 test_prefix=$exec_prefix
9076 fi
9077 value=0
9078 case ${iconv_bin} in
9079 "${test_prefix}"|"${test_prefix}/"*|\
9080 '${exec_prefix}'|'${exec_prefix}/'*)
9081 value=1
9082 ;;
9083 esac
9084
9085 cat >>confdefs.h <<_ACEOF
9086 #define ICONV_BIN_RELOCATABLE $value
9087 _ACEOF
9088
9089
9090
9091 fi
9092
9093
9094 # For the TUI, we need enhanced curses functionality.
9095 if test x"$enable_tui" != xno; then
9096 prefer_curses=yes
9097 fi
9098
9099 curses_found=no
9100 if test x"$prefer_curses" = xyes; then
9101 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9102 # curses library because the latter might not provide all the
9103 # functionality we need. However, this leads to problems on systems
9104 # where the linker searches /usr/local/lib, but the compiler doesn't
9105 # search /usr/local/include, if ncurses is installed in /usr/local. A
9106 # default installation of ncurses on alpha*-dec-osf* will lead to such
9107 # a situation.
9108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9109 $as_echo_n "checking for library containing waddstr... " >&6; }
9110 if ${ac_cv_search_waddstr+:} false; then :
9111 $as_echo_n "(cached) " >&6
9112 else
9113 ac_func_search_save_LIBS=$LIBS
9114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9115 /* end confdefs.h. */
9116
9117 /* Override any GCC internal prototype to avoid an error.
9118 Use char because int might match the return type of a GCC
9119 builtin and then its argument prototype would still apply. */
9120 #ifdef __cplusplus
9121 extern "C"
9122 #endif
9123 char waddstr ();
9124 int
9125 main ()
9126 {
9127 return waddstr ();
9128 ;
9129 return 0;
9130 }
9131 _ACEOF
9132 for ac_lib in '' ncursesw ncurses cursesX curses; do
9133 if test -z "$ac_lib"; then
9134 ac_res="none required"
9135 else
9136 ac_res=-l$ac_lib
9137 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9138 fi
9139 if ac_fn_c_try_link "$LINENO"; then :
9140 ac_cv_search_waddstr=$ac_res
9141 fi
9142 rm -f core conftest.err conftest.$ac_objext \
9143 conftest$ac_exeext
9144 if ${ac_cv_search_waddstr+:} false; then :
9145 break
9146 fi
9147 done
9148 if ${ac_cv_search_waddstr+:} false; then :
9149
9150 else
9151 ac_cv_search_waddstr=no
9152 fi
9153 rm conftest.$ac_ext
9154 LIBS=$ac_func_search_save_LIBS
9155 fi
9156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9157 $as_echo "$ac_cv_search_waddstr" >&6; }
9158 ac_res=$ac_cv_search_waddstr
9159 if test "$ac_res" != no; then :
9160 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9161
9162 fi
9163
9164
9165 if test "$ac_cv_search_waddstr" != no; then
9166 curses_found=yes
9167 fi
9168 fi
9169
9170 # Check whether we should enable the TUI, but only do so if we really
9171 # can.
9172 if test x"$enable_tui" != xno; then
9173 if test -d "$srcdir/tui"; then
9174 if test "$curses_found" != no; then
9175 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9176 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9177 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9178 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
9179 else
9180 if test x"$enable_tui" = xyes; then
9181 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
9182 else
9183 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9184 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
9185 fi
9186 fi
9187 fi
9188 fi
9189
9190 # Since GDB uses Readline, we need termcap functionality. In many
9191 # cases this will be provided by the curses library, but some systems
9192 # have a separate termcap library, or no curses library at all.
9193
9194 case $host_os in
9195 cygwin*)
9196 if test -d "$srcdir/libtermcap"; then
9197 LIBS="../libtermcap/libtermcap.a $LIBS"
9198 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9199 fi ;;
9200 go32* | *djgpp*)
9201 ac_cv_search_tgetent="none required"
9202 ;;
9203 esac
9204
9205 # These are the libraries checked by Readline.
9206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9207 $as_echo_n "checking for library containing tgetent... " >&6; }
9208 if ${ac_cv_search_tgetent+:} false; then :
9209 $as_echo_n "(cached) " >&6
9210 else
9211 ac_func_search_save_LIBS=$LIBS
9212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9213 /* end confdefs.h. */
9214
9215 /* Override any GCC internal prototype to avoid an error.
9216 Use char because int might match the return type of a GCC
9217 builtin and then its argument prototype would still apply. */
9218 #ifdef __cplusplus
9219 extern "C"
9220 #endif
9221 char tgetent ();
9222 int
9223 main ()
9224 {
9225 return tgetent ();
9226 ;
9227 return 0;
9228 }
9229 _ACEOF
9230 for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
9231 if test -z "$ac_lib"; then
9232 ac_res="none required"
9233 else
9234 ac_res=-l$ac_lib
9235 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9236 fi
9237 if ac_fn_c_try_link "$LINENO"; then :
9238 ac_cv_search_tgetent=$ac_res
9239 fi
9240 rm -f core conftest.err conftest.$ac_objext \
9241 conftest$ac_exeext
9242 if ${ac_cv_search_tgetent+:} false; then :
9243 break
9244 fi
9245 done
9246 if ${ac_cv_search_tgetent+:} false; then :
9247
9248 else
9249 ac_cv_search_tgetent=no
9250 fi
9251 rm conftest.$ac_ext
9252 LIBS=$ac_func_search_save_LIBS
9253 fi
9254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9255 $as_echo "$ac_cv_search_tgetent" >&6; }
9256 ac_res=$ac_cv_search_tgetent
9257 if test "$ac_res" != no; then :
9258 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9259
9260 fi
9261
9262
9263 if test "$ac_cv_search_tgetent" = no; then
9264 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
9265 fi
9266
9267
9268 # Check whether --with-system-readline was given.
9269 if test "${with_system_readline+set}" = set; then :
9270 withval=$with_system_readline;
9271 fi
9272
9273
9274 if test "$with_system_readline" = yes; then
9275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
9276 $as_echo_n "checking whether system readline is new enough... " >&6; }
9277 if ${gdb_cv_readline_ok+:} false; then :
9278 $as_echo_n "(cached) " >&6
9279 else
9280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9281 /* end confdefs.h. */
9282 #include <stdio.h>
9283 #include <readline/readline.h>
9284 int
9285 main ()
9286 {
9287 #if RL_VERSION_MAJOR < 7
9288 # error "readline version 7 required"
9289 #endif
9290 ;
9291 return 0;
9292 }
9293 _ACEOF
9294 if ac_fn_c_try_compile "$LINENO"; then :
9295 gdb_cv_readline_ok=yes
9296 else
9297 gdb_cv_readline_ok=no
9298 fi
9299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9300 fi
9301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9302 $as_echo "$gdb_cv_readline_ok" >&6; }
9303 if test "$gdb_cv_readline_ok" != yes; then
9304 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9305 fi
9306
9307 READLINE=-lreadline
9308 READLINE_DEPS=
9309 READLINE_CFLAGS=
9310 READLINE_TEXI_INCFLAG=
9311 else
9312 READLINE='$(READLINE_DIR)/libreadline.a'
9313 READLINE_DEPS='$(READLINE)'
9314 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9315 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9316 fi
9317
9318
9319
9320
9321
9322 # Generate jit-reader.h
9323
9324 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9325 TARGET_PTR=
9326
9327 # The cast to long int works around a bug in the HP C Compiler
9328 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9329 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9330 # This bug is HP SR number 8606223364.
9331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9332 $as_echo_n "checking size of unsigned long long... " >&6; }
9333 if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9334 $as_echo_n "(cached) " >&6
9335 else
9336 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9337
9338 else
9339 if test "$ac_cv_type_unsigned_long_long" = yes; then
9340 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9341 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9342 as_fn_error 77 "cannot compute sizeof (unsigned long long)
9343 See \`config.log' for more details" "$LINENO" 5; }
9344 else
9345 ac_cv_sizeof_unsigned_long_long=0
9346 fi
9347 fi
9348
9349 fi
9350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9351 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9352
9353
9354
9355 cat >>confdefs.h <<_ACEOF
9356 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9357 _ACEOF
9358
9359
9360 # The cast to long int works around a bug in the HP C Compiler
9361 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9362 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9363 # This bug is HP SR number 8606223364.
9364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9365 $as_echo_n "checking size of unsigned long... " >&6; }
9366 if ${ac_cv_sizeof_unsigned_long+:} false; then :
9367 $as_echo_n "(cached) " >&6
9368 else
9369 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9370
9371 else
9372 if test "$ac_cv_type_unsigned_long" = yes; then
9373 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9374 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9375 as_fn_error 77 "cannot compute sizeof (unsigned long)
9376 See \`config.log' for more details" "$LINENO" 5; }
9377 else
9378 ac_cv_sizeof_unsigned_long=0
9379 fi
9380 fi
9381
9382 fi
9383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9384 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9385
9386
9387
9388 cat >>confdefs.h <<_ACEOF
9389 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9390 _ACEOF
9391
9392
9393 # The cast to long int works around a bug in the HP C Compiler
9394 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9395 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9396 # This bug is HP SR number 8606223364.
9397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9398 $as_echo_n "checking size of unsigned __int128... " >&6; }
9399 if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9400 $as_echo_n "(cached) " >&6
9401 else
9402 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9403
9404 else
9405 if test "$ac_cv_type_unsigned___int128" = yes; then
9406 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9407 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9408 as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9409 See \`config.log' for more details" "$LINENO" 5; }
9410 else
9411 ac_cv_sizeof_unsigned___int128=0
9412 fi
9413 fi
9414
9415 fi
9416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9417 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9418
9419
9420
9421 cat >>confdefs.h <<_ACEOF
9422 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9423 _ACEOF
9424
9425
9426
9427 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9428 TARGET_PTR="unsigned long"
9429 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9430 TARGET_PTR="unsigned long long"
9431 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9432 TARGET_PTR="unsigned __int128"
9433 else
9434 TARGET_PTR="unsigned long"
9435 fi
9436
9437
9438 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9439
9440
9441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9442 $as_echo_n "checking for library containing dlopen... " >&6; }
9443 if ${ac_cv_search_dlopen+:} false; then :
9444 $as_echo_n "(cached) " >&6
9445 else
9446 ac_func_search_save_LIBS=$LIBS
9447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9448 /* end confdefs.h. */
9449
9450 /* Override any GCC internal prototype to avoid an error.
9451 Use char because int might match the return type of a GCC
9452 builtin and then its argument prototype would still apply. */
9453 #ifdef __cplusplus
9454 extern "C"
9455 #endif
9456 char dlopen ();
9457 int
9458 main ()
9459 {
9460 return dlopen ();
9461 ;
9462 return 0;
9463 }
9464 _ACEOF
9465 for ac_lib in '' dl; do
9466 if test -z "$ac_lib"; then
9467 ac_res="none required"
9468 else
9469 ac_res=-l$ac_lib
9470 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9471 fi
9472 if ac_fn_c_try_link "$LINENO"; then :
9473 ac_cv_search_dlopen=$ac_res
9474 fi
9475 rm -f core conftest.err conftest.$ac_objext \
9476 conftest$ac_exeext
9477 if ${ac_cv_search_dlopen+:} false; then :
9478 break
9479 fi
9480 done
9481 if ${ac_cv_search_dlopen+:} false; then :
9482
9483 else
9484 ac_cv_search_dlopen=no
9485 fi
9486 rm conftest.$ac_ext
9487 LIBS=$ac_func_search_save_LIBS
9488 fi
9489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9490 $as_echo "$ac_cv_search_dlopen" >&6; }
9491 ac_res=$ac_cv_search_dlopen
9492 if test "$ac_res" != no; then :
9493 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9494
9495 fi
9496
9497
9498
9499
9500 # Check whether --with-jit-reader-dir was given.
9501 if test "${with_jit_reader_dir+set}" = set; then :
9502 withval=$with_jit_reader_dir;
9503 JIT_READER_DIR=$withval
9504 else
9505 JIT_READER_DIR=${libdir}/gdb
9506 fi
9507
9508
9509 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9510 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9511 ac_define_dir=`eval echo $JIT_READER_DIR`
9512 ac_define_dir=`eval echo $ac_define_dir`
9513
9514 cat >>confdefs.h <<_ACEOF
9515 #define JIT_READER_DIR "$ac_define_dir"
9516 _ACEOF
9517
9518
9519
9520
9521 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9522 if test "x$prefix" = xNONE; then
9523 test_prefix=/usr/local
9524 else
9525 test_prefix=$prefix
9526 fi
9527 else
9528 test_prefix=$exec_prefix
9529 fi
9530 value=0
9531 case ${ac_define_dir} in
9532 "${test_prefix}"|"${test_prefix}/"*|\
9533 '${exec_prefix}'|'${exec_prefix}/'*)
9534 value=1
9535 ;;
9536 esac
9537
9538 cat >>confdefs.h <<_ACEOF
9539 #define JIT_READER_DIR_RELOCATABLE $value
9540 _ACEOF
9541
9542
9543
9544
9545
9546 # Check whether --with-expat was given.
9547 if test "${with_expat+set}" = set; then :
9548 withval=$with_expat;
9549 else
9550 with_expat=auto
9551 fi
9552
9553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9554 $as_echo_n "checking whether to use expat... " >&6; }
9555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9556 $as_echo "$with_expat" >&6; }
9557
9558 if test "${with_expat}" = no; then
9559 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9560 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9561 HAVE_LIBEXPAT=no
9562 else
9563
9564
9565
9566
9567
9568
9569
9570
9571 use_additional=yes
9572
9573 acl_save_prefix="$prefix"
9574 prefix="$acl_final_prefix"
9575 acl_save_exec_prefix="$exec_prefix"
9576 exec_prefix="$acl_final_exec_prefix"
9577
9578 eval additional_includedir=\"$includedir\"
9579 eval additional_libdir=\"$libdir\"
9580
9581 exec_prefix="$acl_save_exec_prefix"
9582 prefix="$acl_save_prefix"
9583
9584
9585 # Check whether --with-libexpat-prefix was given.
9586 if test "${with_libexpat_prefix+set}" = set; then :
9587 withval=$with_libexpat_prefix;
9588 if test "X$withval" = "Xno"; then
9589 use_additional=no
9590 else
9591 if test "X$withval" = "X"; then
9592
9593 acl_save_prefix="$prefix"
9594 prefix="$acl_final_prefix"
9595 acl_save_exec_prefix="$exec_prefix"
9596 exec_prefix="$acl_final_exec_prefix"
9597
9598 eval additional_includedir=\"$includedir\"
9599 eval additional_libdir=\"$libdir\"
9600
9601 exec_prefix="$acl_save_exec_prefix"
9602 prefix="$acl_save_prefix"
9603
9604 else
9605 additional_includedir="$withval/include"
9606 additional_libdir="$withval/lib"
9607 fi
9608 fi
9609
9610 fi
9611
9612
9613 # Check whether --with-libexpat-type was given.
9614 if test "${with_libexpat_type+set}" = set; then :
9615 withval=$with_libexpat_type; with_libexpat_type=$withval
9616 else
9617 with_libexpat_type=auto
9618 fi
9619
9620 lib_type=`eval echo \$with_libexpat_type`
9621
9622 LIBEXPAT=
9623 LTLIBEXPAT=
9624 INCEXPAT=
9625 rpathdirs=
9626 ltrpathdirs=
9627 names_already_handled=
9628 names_next_round='expat '
9629 while test -n "$names_next_round"; do
9630 names_this_round="$names_next_round"
9631 names_next_round=
9632 for name in $names_this_round; do
9633 already_handled=
9634 for n in $names_already_handled; do
9635 if test "$n" = "$name"; then
9636 already_handled=yes
9637 break
9638 fi
9639 done
9640 if test -z "$already_handled"; then
9641 names_already_handled="$names_already_handled $name"
9642 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9643 eval value=\"\$HAVE_LIB$uppername\"
9644 if test -n "$value"; then
9645 if test "$value" = yes; then
9646 eval value=\"\$LIB$uppername\"
9647 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9648 eval value=\"\$LTLIB$uppername\"
9649 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9650 else
9651 :
9652 fi
9653 else
9654 found_dir=
9655 found_la=
9656 found_so=
9657 found_a=
9658 if test $use_additional = yes; then
9659 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9660 found_dir="$additional_libdir"
9661 found_so="$additional_libdir/lib$name.$shlibext"
9662 if test -f "$additional_libdir/lib$name.la"; then
9663 found_la="$additional_libdir/lib$name.la"
9664 fi
9665 elif test x$lib_type != xshared; then
9666 if test -f "$additional_libdir/lib$name.$libext"; then
9667 found_dir="$additional_libdir"
9668 found_a="$additional_libdir/lib$name.$libext"
9669 if test -f "$additional_libdir/lib$name.la"; then
9670 found_la="$additional_libdir/lib$name.la"
9671 fi
9672 fi
9673 fi
9674 fi
9675 if test "X$found_dir" = "X"; then
9676 for x in $LDFLAGS $LTLIBEXPAT; do
9677
9678 acl_save_prefix="$prefix"
9679 prefix="$acl_final_prefix"
9680 acl_save_exec_prefix="$exec_prefix"
9681 exec_prefix="$acl_final_exec_prefix"
9682 eval x=\"$x\"
9683 exec_prefix="$acl_save_exec_prefix"
9684 prefix="$acl_save_prefix"
9685
9686 case "$x" in
9687 -L*)
9688 dir=`echo "X$x" | sed -e 's/^X-L//'`
9689 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9690 found_dir="$dir"
9691 found_so="$dir/lib$name.$shlibext"
9692 if test -f "$dir/lib$name.la"; then
9693 found_la="$dir/lib$name.la"
9694 fi
9695 elif test x$lib_type != xshared; then
9696 if test -f "$dir/lib$name.$libext"; then
9697 found_dir="$dir"
9698 found_a="$dir/lib$name.$libext"
9699 if test -f "$dir/lib$name.la"; then
9700 found_la="$dir/lib$name.la"
9701 fi
9702 fi
9703 fi
9704 ;;
9705 esac
9706 if test "X$found_dir" != "X"; then
9707 break
9708 fi
9709 done
9710 fi
9711 if test "X$found_dir" != "X"; then
9712 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9713 if test "X$found_so" != "X"; then
9714 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9715 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9716 else
9717 haveit=
9718 for x in $ltrpathdirs; do
9719 if test "X$x" = "X$found_dir"; then
9720 haveit=yes
9721 break
9722 fi
9723 done
9724 if test -z "$haveit"; then
9725 ltrpathdirs="$ltrpathdirs $found_dir"
9726 fi
9727 if test "$hardcode_direct" = yes; then
9728 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9729 else
9730 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9731 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9732 haveit=
9733 for x in $rpathdirs; do
9734 if test "X$x" = "X$found_dir"; then
9735 haveit=yes
9736 break
9737 fi
9738 done
9739 if test -z "$haveit"; then
9740 rpathdirs="$rpathdirs $found_dir"
9741 fi
9742 else
9743 haveit=
9744 for x in $LDFLAGS $LIBEXPAT; do
9745
9746 acl_save_prefix="$prefix"
9747 prefix="$acl_final_prefix"
9748 acl_save_exec_prefix="$exec_prefix"
9749 exec_prefix="$acl_final_exec_prefix"
9750 eval x=\"$x\"
9751 exec_prefix="$acl_save_exec_prefix"
9752 prefix="$acl_save_prefix"
9753
9754 if test "X$x" = "X-L$found_dir"; then
9755 haveit=yes
9756 break
9757 fi
9758 done
9759 if test -z "$haveit"; then
9760 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9761 fi
9762 if test "$hardcode_minus_L" != no; then
9763 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9764 else
9765 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9766 fi
9767 fi
9768 fi
9769 fi
9770 else
9771 if test "X$found_a" != "X"; then
9772 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9773 else
9774 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9775 fi
9776 fi
9777 additional_includedir=
9778 case "$found_dir" in
9779 */lib | */lib/)
9780 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9781 additional_includedir="$basedir/include"
9782 ;;
9783 esac
9784 if test "X$additional_includedir" != "X"; then
9785 if test "X$additional_includedir" != "X/usr/include"; then
9786 haveit=
9787 if test "X$additional_includedir" = "X/usr/local/include"; then
9788 if test -n "$GCC"; then
9789 case $host_os in
9790 linux*) haveit=yes;;
9791 esac
9792 fi
9793 fi
9794 if test -z "$haveit"; then
9795 for x in $CPPFLAGS $INCEXPAT; do
9796
9797 acl_save_prefix="$prefix"
9798 prefix="$acl_final_prefix"
9799 acl_save_exec_prefix="$exec_prefix"
9800 exec_prefix="$acl_final_exec_prefix"
9801 eval x=\"$x\"
9802 exec_prefix="$acl_save_exec_prefix"
9803 prefix="$acl_save_prefix"
9804
9805 if test "X$x" = "X-I$additional_includedir"; then
9806 haveit=yes
9807 break
9808 fi
9809 done
9810 if test -z "$haveit"; then
9811 if test -d "$additional_includedir"; then
9812 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9813 fi
9814 fi
9815 fi
9816 fi
9817 fi
9818 if test -n "$found_la"; then
9819 save_libdir="$libdir"
9820 case "$found_la" in
9821 */* | *\\*) . "$found_la" ;;
9822 *) . "./$found_la" ;;
9823 esac
9824 libdir="$save_libdir"
9825 for dep in $dependency_libs; do
9826 case "$dep" in
9827 -L*)
9828 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9829 if test "X$additional_libdir" != "X/usr/lib"; then
9830 haveit=
9831 if test "X$additional_libdir" = "X/usr/local/lib"; then
9832 if test -n "$GCC"; then
9833 case $host_os in
9834 linux*) haveit=yes;;
9835 esac
9836 fi
9837 fi
9838 if test -z "$haveit"; then
9839 haveit=
9840 for x in $LDFLAGS $LIBEXPAT; do
9841
9842 acl_save_prefix="$prefix"
9843 prefix="$acl_final_prefix"
9844 acl_save_exec_prefix="$exec_prefix"
9845 exec_prefix="$acl_final_exec_prefix"
9846 eval x=\"$x\"
9847 exec_prefix="$acl_save_exec_prefix"
9848 prefix="$acl_save_prefix"
9849
9850 if test "X$x" = "X-L$additional_libdir"; then
9851 haveit=yes
9852 break
9853 fi
9854 done
9855 if test -z "$haveit"; then
9856 if test -d "$additional_libdir"; then
9857 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9858 fi
9859 fi
9860 haveit=
9861 for x in $LDFLAGS $LTLIBEXPAT; do
9862
9863 acl_save_prefix="$prefix"
9864 prefix="$acl_final_prefix"
9865 acl_save_exec_prefix="$exec_prefix"
9866 exec_prefix="$acl_final_exec_prefix"
9867 eval x=\"$x\"
9868 exec_prefix="$acl_save_exec_prefix"
9869 prefix="$acl_save_prefix"
9870
9871 if test "X$x" = "X-L$additional_libdir"; then
9872 haveit=yes
9873 break
9874 fi
9875 done
9876 if test -z "$haveit"; then
9877 if test -d "$additional_libdir"; then
9878 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9879 fi
9880 fi
9881 fi
9882 fi
9883 ;;
9884 -R*)
9885 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9886 if test "$enable_rpath" != no; then
9887 haveit=
9888 for x in $rpathdirs; do
9889 if test "X$x" = "X$dir"; then
9890 haveit=yes
9891 break
9892 fi
9893 done
9894 if test -z "$haveit"; then
9895 rpathdirs="$rpathdirs $dir"
9896 fi
9897 haveit=
9898 for x in $ltrpathdirs; do
9899 if test "X$x" = "X$dir"; then
9900 haveit=yes
9901 break
9902 fi
9903 done
9904 if test -z "$haveit"; then
9905 ltrpathdirs="$ltrpathdirs $dir"
9906 fi
9907 fi
9908 ;;
9909 -l*)
9910 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9911 ;;
9912 *.la)
9913 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9914 ;;
9915 *)
9916 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9917 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9918 ;;
9919 esac
9920 done
9921 fi
9922 else
9923 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9924 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9925 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9926 else
9927 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
9928 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
9929 fi
9930 fi
9931 fi
9932 fi
9933 done
9934 done
9935 if test "X$rpathdirs" != "X"; then
9936 if test -n "$hardcode_libdir_separator"; then
9937 alldirs=
9938 for found_dir in $rpathdirs; do
9939 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9940 done
9941 acl_save_libdir="$libdir"
9942 libdir="$alldirs"
9943 eval flag=\"$hardcode_libdir_flag_spec\"
9944 libdir="$acl_save_libdir"
9945 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9946 else
9947 for found_dir in $rpathdirs; do
9948 acl_save_libdir="$libdir"
9949 libdir="$found_dir"
9950 eval flag=\"$hardcode_libdir_flag_spec\"
9951 libdir="$acl_save_libdir"
9952 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9953 done
9954 fi
9955 fi
9956 if test "X$ltrpathdirs" != "X"; then
9957 for found_dir in $ltrpathdirs; do
9958 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9959 done
9960 fi
9961
9962
9963 ac_save_CPPFLAGS="$CPPFLAGS"
9964
9965 for element in $INCEXPAT; do
9966 haveit=
9967 for x in $CPPFLAGS; do
9968
9969 acl_save_prefix="$prefix"
9970 prefix="$acl_final_prefix"
9971 acl_save_exec_prefix="$exec_prefix"
9972 exec_prefix="$acl_final_exec_prefix"
9973 eval x=\"$x\"
9974 exec_prefix="$acl_save_exec_prefix"
9975 prefix="$acl_save_prefix"
9976
9977 if test "X$x" = "X$element"; then
9978 haveit=yes
9979 break
9980 fi
9981 done
9982 if test -z "$haveit"; then
9983 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9984 fi
9985 done
9986
9987
9988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9989 $as_echo_n "checking for libexpat... " >&6; }
9990 if ${ac_cv_libexpat+:} false; then :
9991 $as_echo_n "(cached) " >&6
9992 else
9993
9994 ac_save_LIBS="$LIBS"
9995 LIBS="$LIBS $LIBEXPAT"
9996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9997 /* end confdefs.h. */
9998 #include "expat.h"
9999 int
10000 main ()
10001 {
10002 XML_Parser p = XML_ParserCreate (0);
10003 ;
10004 return 0;
10005 }
10006 _ACEOF
10007 if ac_fn_c_try_link "$LINENO"; then :
10008 ac_cv_libexpat=yes
10009 else
10010 ac_cv_libexpat=no
10011 fi
10012 rm -f core conftest.err conftest.$ac_objext \
10013 conftest$ac_exeext conftest.$ac_ext
10014 LIBS="$ac_save_LIBS"
10015
10016 fi
10017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
10018 $as_echo "$ac_cv_libexpat" >&6; }
10019 if test "$ac_cv_libexpat" = yes; then
10020 HAVE_LIBEXPAT=yes
10021
10022 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
10023
10024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
10025 $as_echo_n "checking how to link with libexpat... " >&6; }
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10027 $as_echo "$LIBEXPAT" >&6; }
10028 else
10029 HAVE_LIBEXPAT=no
10030 CPPFLAGS="$ac_save_CPPFLAGS"
10031 LIBEXPAT=
10032 LTLIBEXPAT=
10033 fi
10034
10035
10036
10037
10038
10039
10040 if test "$HAVE_LIBEXPAT" != yes; then
10041 if test "$with_expat" = yes; then
10042 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
10043 else
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10045 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10046 fi
10047 else
10048 save_LIBS=$LIBS
10049 LIBS="$LIBS $LIBEXPAT"
10050 for ac_func in XML_StopParser
10051 do :
10052 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
10053 if test "x$ac_cv_func_XML_StopParser" = xyes; then :
10054 cat >>confdefs.h <<_ACEOF
10055 #define HAVE_XML_STOPPARSER 1
10056 _ACEOF
10057
10058 fi
10059 done
10060
10061 LIBS=$save_LIBS
10062 fi
10063 fi
10064
10065
10066 # Check whether --with-mpfr was given.
10067 if test "${with_mpfr+set}" = set; then :
10068 withval=$with_mpfr;
10069 else
10070 with_mpfr=auto
10071 fi
10072
10073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
10074 $as_echo_n "checking whether to use MPFR... " >&6; }
10075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
10076 $as_echo "$with_mpfr" >&6; }
10077
10078 if test "${with_mpfr}" = no; then
10079 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
10080 $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
10081 HAVE_LIBMPFR=no
10082 else
10083
10084
10085
10086
10087
10088
10089
10090
10091 use_additional=yes
10092
10093 acl_save_prefix="$prefix"
10094 prefix="$acl_final_prefix"
10095 acl_save_exec_prefix="$exec_prefix"
10096 exec_prefix="$acl_final_exec_prefix"
10097
10098 eval additional_includedir=\"$includedir\"
10099 eval additional_libdir=\"$libdir\"
10100
10101 exec_prefix="$acl_save_exec_prefix"
10102 prefix="$acl_save_prefix"
10103
10104
10105 # Check whether --with-libmpfr-prefix was given.
10106 if test "${with_libmpfr_prefix+set}" = set; then :
10107 withval=$with_libmpfr_prefix;
10108 if test "X$withval" = "Xno"; then
10109 use_additional=no
10110 else
10111 if test "X$withval" = "X"; then
10112
10113 acl_save_prefix="$prefix"
10114 prefix="$acl_final_prefix"
10115 acl_save_exec_prefix="$exec_prefix"
10116 exec_prefix="$acl_final_exec_prefix"
10117
10118 eval additional_includedir=\"$includedir\"
10119 eval additional_libdir=\"$libdir\"
10120
10121 exec_prefix="$acl_save_exec_prefix"
10122 prefix="$acl_save_prefix"
10123
10124 else
10125 additional_includedir="$withval/include"
10126 additional_libdir="$withval/lib"
10127 fi
10128 fi
10129
10130 fi
10131
10132
10133 # Check whether --with-libmpfr-type was given.
10134 if test "${with_libmpfr_type+set}" = set; then :
10135 withval=$with_libmpfr_type; with_libmpfr_type=$withval
10136 else
10137 with_libmpfr_type=auto
10138 fi
10139
10140 lib_type=`eval echo \$with_libmpfr_type`
10141
10142 LIBMPFR=
10143 LTLIBMPFR=
10144 INCMPFR=
10145 rpathdirs=
10146 ltrpathdirs=
10147 names_already_handled=
10148 names_next_round='mpfr gmp'
10149 while test -n "$names_next_round"; do
10150 names_this_round="$names_next_round"
10151 names_next_round=
10152 for name in $names_this_round; do
10153 already_handled=
10154 for n in $names_already_handled; do
10155 if test "$n" = "$name"; then
10156 already_handled=yes
10157 break
10158 fi
10159 done
10160 if test -z "$already_handled"; then
10161 names_already_handled="$names_already_handled $name"
10162 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10163 eval value=\"\$HAVE_LIB$uppername\"
10164 if test -n "$value"; then
10165 if test "$value" = yes; then
10166 eval value=\"\$LIB$uppername\"
10167 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
10168 eval value=\"\$LTLIB$uppername\"
10169 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
10170 else
10171 :
10172 fi
10173 else
10174 found_dir=
10175 found_la=
10176 found_so=
10177 found_a=
10178 if test $use_additional = yes; then
10179 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10180 found_dir="$additional_libdir"
10181 found_so="$additional_libdir/lib$name.$shlibext"
10182 if test -f "$additional_libdir/lib$name.la"; then
10183 found_la="$additional_libdir/lib$name.la"
10184 fi
10185 elif test x$lib_type != xshared; then
10186 if test -f "$additional_libdir/lib$name.$libext"; then
10187 found_dir="$additional_libdir"
10188 found_a="$additional_libdir/lib$name.$libext"
10189 if test -f "$additional_libdir/lib$name.la"; then
10190 found_la="$additional_libdir/lib$name.la"
10191 fi
10192 fi
10193 fi
10194 fi
10195 if test "X$found_dir" = "X"; then
10196 for x in $LDFLAGS $LTLIBMPFR; do
10197
10198 acl_save_prefix="$prefix"
10199 prefix="$acl_final_prefix"
10200 acl_save_exec_prefix="$exec_prefix"
10201 exec_prefix="$acl_final_exec_prefix"
10202 eval x=\"$x\"
10203 exec_prefix="$acl_save_exec_prefix"
10204 prefix="$acl_save_prefix"
10205
10206 case "$x" in
10207 -L*)
10208 dir=`echo "X$x" | sed -e 's/^X-L//'`
10209 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10210 found_dir="$dir"
10211 found_so="$dir/lib$name.$shlibext"
10212 if test -f "$dir/lib$name.la"; then
10213 found_la="$dir/lib$name.la"
10214 fi
10215 elif test x$lib_type != xshared; then
10216 if test -f "$dir/lib$name.$libext"; then
10217 found_dir="$dir"
10218 found_a="$dir/lib$name.$libext"
10219 if test -f "$dir/lib$name.la"; then
10220 found_la="$dir/lib$name.la"
10221 fi
10222 fi
10223 fi
10224 ;;
10225 esac
10226 if test "X$found_dir" != "X"; then
10227 break
10228 fi
10229 done
10230 fi
10231 if test "X$found_dir" != "X"; then
10232 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
10233 if test "X$found_so" != "X"; then
10234 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10235 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10236 else
10237 haveit=
10238 for x in $ltrpathdirs; do
10239 if test "X$x" = "X$found_dir"; then
10240 haveit=yes
10241 break
10242 fi
10243 done
10244 if test -z "$haveit"; then
10245 ltrpathdirs="$ltrpathdirs $found_dir"
10246 fi
10247 if test "$hardcode_direct" = yes; then
10248 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10249 else
10250 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10251 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10252 haveit=
10253 for x in $rpathdirs; do
10254 if test "X$x" = "X$found_dir"; then
10255 haveit=yes
10256 break
10257 fi
10258 done
10259 if test -z "$haveit"; then
10260 rpathdirs="$rpathdirs $found_dir"
10261 fi
10262 else
10263 haveit=
10264 for x in $LDFLAGS $LIBMPFR; do
10265
10266 acl_save_prefix="$prefix"
10267 prefix="$acl_final_prefix"
10268 acl_save_exec_prefix="$exec_prefix"
10269 exec_prefix="$acl_final_exec_prefix"
10270 eval x=\"$x\"
10271 exec_prefix="$acl_save_exec_prefix"
10272 prefix="$acl_save_prefix"
10273
10274 if test "X$x" = "X-L$found_dir"; then
10275 haveit=yes
10276 break
10277 fi
10278 done
10279 if test -z "$haveit"; then
10280 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10281 fi
10282 if test "$hardcode_minus_L" != no; then
10283 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10284 else
10285 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10286 fi
10287 fi
10288 fi
10289 fi
10290 else
10291 if test "X$found_a" != "X"; then
10292 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10293 else
10294 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10295 fi
10296 fi
10297 additional_includedir=
10298 case "$found_dir" in
10299 */lib | */lib/)
10300 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10301 additional_includedir="$basedir/include"
10302 ;;
10303 esac
10304 if test "X$additional_includedir" != "X"; then
10305 if test "X$additional_includedir" != "X/usr/include"; then
10306 haveit=
10307 if test "X$additional_includedir" = "X/usr/local/include"; then
10308 if test -n "$GCC"; then
10309 case $host_os in
10310 linux*) haveit=yes;;
10311 esac
10312 fi
10313 fi
10314 if test -z "$haveit"; then
10315 for x in $CPPFLAGS $INCMPFR; do
10316
10317 acl_save_prefix="$prefix"
10318 prefix="$acl_final_prefix"
10319 acl_save_exec_prefix="$exec_prefix"
10320 exec_prefix="$acl_final_exec_prefix"
10321 eval x=\"$x\"
10322 exec_prefix="$acl_save_exec_prefix"
10323 prefix="$acl_save_prefix"
10324
10325 if test "X$x" = "X-I$additional_includedir"; then
10326 haveit=yes
10327 break
10328 fi
10329 done
10330 if test -z "$haveit"; then
10331 if test -d "$additional_includedir"; then
10332 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10333 fi
10334 fi
10335 fi
10336 fi
10337 fi
10338 if test -n "$found_la"; then
10339 save_libdir="$libdir"
10340 case "$found_la" in
10341 */* | *\\*) . "$found_la" ;;
10342 *) . "./$found_la" ;;
10343 esac
10344 libdir="$save_libdir"
10345 for dep in $dependency_libs; do
10346 case "$dep" in
10347 -L*)
10348 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10349 if test "X$additional_libdir" != "X/usr/lib"; then
10350 haveit=
10351 if test "X$additional_libdir" = "X/usr/local/lib"; then
10352 if test -n "$GCC"; then
10353 case $host_os in
10354 linux*) haveit=yes;;
10355 esac
10356 fi
10357 fi
10358 if test -z "$haveit"; then
10359 haveit=
10360 for x in $LDFLAGS $LIBMPFR; do
10361
10362 acl_save_prefix="$prefix"
10363 prefix="$acl_final_prefix"
10364 acl_save_exec_prefix="$exec_prefix"
10365 exec_prefix="$acl_final_exec_prefix"
10366 eval x=\"$x\"
10367 exec_prefix="$acl_save_exec_prefix"
10368 prefix="$acl_save_prefix"
10369
10370 if test "X$x" = "X-L$additional_libdir"; then
10371 haveit=yes
10372 break
10373 fi
10374 done
10375 if test -z "$haveit"; then
10376 if test -d "$additional_libdir"; then
10377 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10378 fi
10379 fi
10380 haveit=
10381 for x in $LDFLAGS $LTLIBMPFR; do
10382
10383 acl_save_prefix="$prefix"
10384 prefix="$acl_final_prefix"
10385 acl_save_exec_prefix="$exec_prefix"
10386 exec_prefix="$acl_final_exec_prefix"
10387 eval x=\"$x\"
10388 exec_prefix="$acl_save_exec_prefix"
10389 prefix="$acl_save_prefix"
10390
10391 if test "X$x" = "X-L$additional_libdir"; then
10392 haveit=yes
10393 break
10394 fi
10395 done
10396 if test -z "$haveit"; then
10397 if test -d "$additional_libdir"; then
10398 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10399 fi
10400 fi
10401 fi
10402 fi
10403 ;;
10404 -R*)
10405 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10406 if test "$enable_rpath" != no; then
10407 haveit=
10408 for x in $rpathdirs; do
10409 if test "X$x" = "X$dir"; then
10410 haveit=yes
10411 break
10412 fi
10413 done
10414 if test -z "$haveit"; then
10415 rpathdirs="$rpathdirs $dir"
10416 fi
10417 haveit=
10418 for x in $ltrpathdirs; do
10419 if test "X$x" = "X$dir"; then
10420 haveit=yes
10421 break
10422 fi
10423 done
10424 if test -z "$haveit"; then
10425 ltrpathdirs="$ltrpathdirs $dir"
10426 fi
10427 fi
10428 ;;
10429 -l*)
10430 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10431 ;;
10432 *.la)
10433 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10434 ;;
10435 *)
10436 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10437 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10438 ;;
10439 esac
10440 done
10441 fi
10442 else
10443 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10444 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10445 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10446 else
10447 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
10448 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
10449 fi
10450 fi
10451 fi
10452 fi
10453 done
10454 done
10455 if test "X$rpathdirs" != "X"; then
10456 if test -n "$hardcode_libdir_separator"; then
10457 alldirs=
10458 for found_dir in $rpathdirs; do
10459 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10460 done
10461 acl_save_libdir="$libdir"
10462 libdir="$alldirs"
10463 eval flag=\"$hardcode_libdir_flag_spec\"
10464 libdir="$acl_save_libdir"
10465 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10466 else
10467 for found_dir in $rpathdirs; do
10468 acl_save_libdir="$libdir"
10469 libdir="$found_dir"
10470 eval flag=\"$hardcode_libdir_flag_spec\"
10471 libdir="$acl_save_libdir"
10472 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10473 done
10474 fi
10475 fi
10476 if test "X$ltrpathdirs" != "X"; then
10477 for found_dir in $ltrpathdirs; do
10478 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10479 done
10480 fi
10481
10482
10483 ac_save_CPPFLAGS="$CPPFLAGS"
10484
10485 for element in $INCMPFR; do
10486 haveit=
10487 for x in $CPPFLAGS; do
10488
10489 acl_save_prefix="$prefix"
10490 prefix="$acl_final_prefix"
10491 acl_save_exec_prefix="$exec_prefix"
10492 exec_prefix="$acl_final_exec_prefix"
10493 eval x=\"$x\"
10494 exec_prefix="$acl_save_exec_prefix"
10495 prefix="$acl_save_prefix"
10496
10497 if test "X$x" = "X$element"; then
10498 haveit=yes
10499 break
10500 fi
10501 done
10502 if test -z "$haveit"; then
10503 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10504 fi
10505 done
10506
10507
10508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10509 $as_echo_n "checking for libmpfr... " >&6; }
10510 if ${ac_cv_libmpfr+:} false; then :
10511 $as_echo_n "(cached) " >&6
10512 else
10513
10514 ac_save_LIBS="$LIBS"
10515 LIBS="$LIBS $LIBMPFR"
10516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10517 /* end confdefs.h. */
10518 #include <mpfr.h>
10519 int
10520 main ()
10521 {
10522 mpfr_exp_t exp; mpfr_t x;
10523 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10524 ;
10525 return 0;
10526 }
10527 _ACEOF
10528 if ac_fn_c_try_link "$LINENO"; then :
10529 ac_cv_libmpfr=yes
10530 else
10531 ac_cv_libmpfr=no
10532 fi
10533 rm -f core conftest.err conftest.$ac_objext \
10534 conftest$ac_exeext conftest.$ac_ext
10535 LIBS="$ac_save_LIBS"
10536
10537 fi
10538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10539 $as_echo "$ac_cv_libmpfr" >&6; }
10540 if test "$ac_cv_libmpfr" = yes; then
10541 HAVE_LIBMPFR=yes
10542
10543 $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10544
10545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10546 $as_echo_n "checking how to link with libmpfr... " >&6; }
10547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10548 $as_echo "$LIBMPFR" >&6; }
10549 else
10550 HAVE_LIBMPFR=no
10551 CPPFLAGS="$ac_save_CPPFLAGS"
10552 LIBMPFR=
10553 LTLIBMPFR=
10554 fi
10555
10556
10557
10558
10559
10560
10561 if test "$HAVE_LIBMPFR" != yes; then
10562 if test "$with_mpfr" = yes; then
10563 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
10564 else
10565 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10566 $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10567 fi
10568 fi
10569 fi
10570
10571 # --------------------- #
10572 # Check for libpython. #
10573 # --------------------- #
10574
10575
10576
10577
10578
10579
10580 # Check whether --with-python was given.
10581 if test "${with_python+set}" = set; then :
10582 withval=$with_python;
10583 else
10584 with_python=auto
10585 fi
10586
10587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10588 $as_echo_n "checking whether to use python... " >&6; }
10589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10590 $as_echo "$with_python" >&6; }
10591
10592 if test "${with_python}" = no; then
10593 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10594 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10595 have_libpython=no
10596 else
10597 case "${with_python}" in
10598 [\\/]* | ?:[\\/]*)
10599 if test -d "${with_python}"; then
10600 # Assume the python binary is ${with_python}/bin/python.
10601 python_prog="${with_python}/bin/python"
10602 python_prefix=
10603 # If python does not exit ${with_python}/bin, then try in
10604 # ${with_python}. On Windows/MinGW, this is where the Python
10605 # executable is.
10606 if test ! -x "${python_prog}"; then
10607 python_prog="${with_python}/python"
10608 python_prefix=
10609 fi
10610 if test ! -x "${python_prog}"; then
10611 # Fall back to gdb 7.0/7.1 behaviour.
10612 python_prog=missing
10613 python_prefix=${with_python}
10614 fi
10615 elif test -x "${with_python}"; then
10616 # While we can't run python compiled for $host (unless host == build),
10617 # the user could write a script that provides the needed information,
10618 # so we support that.
10619 python_prog=${with_python}
10620 python_prefix=
10621 else
10622 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10623 fi
10624 ;;
10625 */*)
10626 # Disallow --with-python=foo/bar.
10627 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10628 ;;
10629 *)
10630 # The user has either specified auto, yes, or the name of the python
10631 # program assumed to be in $PATH.
10632 python_prefix=
10633 case "${with_python}" in
10634 yes | auto)
10635 if test "${build}" = "${host}"; then
10636 # Extract the first word of "python", so it can be a program name with args.
10637 set dummy python; ac_word=$2
10638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10639 $as_echo_n "checking for $ac_word... " >&6; }
10640 if ${ac_cv_path_python_prog_path+:} false; then :
10641 $as_echo_n "(cached) " >&6
10642 else
10643 case $python_prog_path in
10644 [\\/]* | ?:[\\/]*)
10645 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10646 ;;
10647 *)
10648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10649 for as_dir in $PATH
10650 do
10651 IFS=$as_save_IFS
10652 test -z "$as_dir" && as_dir=.
10653 for ac_exec_ext in '' $ac_executable_extensions; do
10654 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10655 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10656 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10657 break 2
10658 fi
10659 done
10660 done
10661 IFS=$as_save_IFS
10662
10663 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10664 ;;
10665 esac
10666 fi
10667 python_prog_path=$ac_cv_path_python_prog_path
10668 if test -n "$python_prog_path"; then
10669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10670 $as_echo "$python_prog_path" >&6; }
10671 else
10672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10673 $as_echo "no" >&6; }
10674 fi
10675
10676
10677 if test "${python_prog_path}" = missing; then
10678 python_prog=missing
10679 else
10680 python_prog=${python_prog_path}
10681 fi
10682 else
10683 # Not much we can do except assume the cross-compiler will find the
10684 # right files.
10685 python_prog=missing
10686 fi
10687 ;;
10688 *)
10689 # While we can't run python compiled for $host (unless host == build),
10690 # the user could write a script that provides the needed information,
10691 # so we support that.
10692 python_prog="${with_python}"
10693 # Extract the first word of "${python_prog}", so it can be a program name with args.
10694 set dummy ${python_prog}; ac_word=$2
10695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10696 $as_echo_n "checking for $ac_word... " >&6; }
10697 if ${ac_cv_path_python_prog_path+:} false; then :
10698 $as_echo_n "(cached) " >&6
10699 else
10700 case $python_prog_path in
10701 [\\/]* | ?:[\\/]*)
10702 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10703 ;;
10704 *)
10705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10706 for as_dir in $PATH
10707 do
10708 IFS=$as_save_IFS
10709 test -z "$as_dir" && as_dir=.
10710 for ac_exec_ext in '' $ac_executable_extensions; do
10711 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10712 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10714 break 2
10715 fi
10716 done
10717 done
10718 IFS=$as_save_IFS
10719
10720 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10721 ;;
10722 esac
10723 fi
10724 python_prog_path=$ac_cv_path_python_prog_path
10725 if test -n "$python_prog_path"; then
10726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10727 $as_echo "$python_prog_path" >&6; }
10728 else
10729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10730 $as_echo "no" >&6; }
10731 fi
10732
10733
10734 if test "${python_prog_path}" = missing; then
10735 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
10736 fi
10737 ;;
10738 esac
10739 esac
10740
10741 if test "${python_prog}" != missing; then
10742 # We have a python program to use, but it may be too old.
10743 # Don't flag an error for --with-python=auto (the default).
10744 have_python_config=yes
10745 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10746 if test $? != 0; then
10747 have_python_config=failed
10748 if test "${with_python}" != auto; then
10749 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
10750 fi
10751 fi
10752 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10753 if test $? != 0; then
10754 have_python_config=failed
10755 if test "${with_python}" != auto; then
10756 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
10757 fi
10758 fi
10759 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10760 if test $? != 0; then
10761 have_python_config=failed
10762 if test "${with_python}" != auto; then
10763 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
10764 fi
10765 fi
10766 else
10767 # We do not have a python executable we can use to determine where
10768 # to find the Python headers and libs. We cannot guess the include
10769 # path from the python_prefix either, because that include path
10770 # depends on the Python version. So, there is nothing much we can
10771 # do except assume that the compiler will be able to find those files.
10772 python_includes=
10773 python_libs=
10774 have_python_config=no
10775 fi
10776
10777 # If we have python-config, only try the configuration it provides.
10778 # Otherwise fallback on the old way of trying different versions of
10779 # python in turn.
10780
10781 have_libpython=no
10782 if test "${have_python_config}" = yes; then
10783
10784
10785 new_CPPFLAGS=${python_includes}
10786 new_LIBS=${python_libs}
10787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10788 $as_echo_n "checking for python... " >&6; }
10789 save_CPPFLAGS=$CPPFLAGS
10790 save_LIBS=$LIBS
10791 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10792 LIBS="$new_LIBS $LIBS"
10793 found_usable_python=no
10794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10795 /* end confdefs.h. */
10796 #include "Python.h"
10797 int
10798 main ()
10799 {
10800 Py_Initialize ();
10801 ;
10802 return 0;
10803 }
10804 _ACEOF
10805 if ac_fn_c_try_link "$LINENO"; then :
10806 have_libpython=yes
10807 found_usable_python=yes
10808 PYTHON_CPPFLAGS=$new_CPPFLAGS
10809 PYTHON_LIBS=$new_LIBS
10810 fi
10811 rm -f core conftest.err conftest.$ac_objext \
10812 conftest$ac_exeext conftest.$ac_ext
10813 CPPFLAGS=$save_CPPFLAGS
10814 LIBS=$save_LIBS
10815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10816 $as_echo "${found_usable_python}" >&6; }
10817
10818 elif test "${have_python_config}" != failed; then
10819 if test "${have_libpython}" = no; then
10820
10821
10822 new_CPPFLAGS=${python_includes}
10823 new_LIBS="-lpython2.7 ${python_libs}"
10824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10825 $as_echo_n "checking for python... " >&6; }
10826 save_CPPFLAGS=$CPPFLAGS
10827 save_LIBS=$LIBS
10828 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10829 LIBS="$new_LIBS $LIBS"
10830 found_usable_python=no
10831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10832 /* end confdefs.h. */
10833 #include "Python.h"
10834 int
10835 main ()
10836 {
10837 Py_Initialize ();
10838 ;
10839 return 0;
10840 }
10841 _ACEOF
10842 if ac_fn_c_try_link "$LINENO"; then :
10843 have_libpython=yes
10844 found_usable_python=yes
10845 PYTHON_CPPFLAGS=$new_CPPFLAGS
10846 PYTHON_LIBS=$new_LIBS
10847 fi
10848 rm -f core conftest.err conftest.$ac_objext \
10849 conftest$ac_exeext conftest.$ac_ext
10850 CPPFLAGS=$save_CPPFLAGS
10851 LIBS=$save_LIBS
10852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10853 $as_echo "${found_usable_python}" >&6; }
10854
10855 fi
10856 if test "${have_libpython}" = no; then
10857
10858
10859 new_CPPFLAGS=${python_includes}
10860 new_LIBS="-lpython2.6 ${python_libs}"
10861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10862 $as_echo_n "checking for python... " >&6; }
10863 save_CPPFLAGS=$CPPFLAGS
10864 save_LIBS=$LIBS
10865 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10866 LIBS="$new_LIBS $LIBS"
10867 found_usable_python=no
10868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10869 /* end confdefs.h. */
10870 #include "Python.h"
10871 int
10872 main ()
10873 {
10874 Py_Initialize ();
10875 ;
10876 return 0;
10877 }
10878 _ACEOF
10879 if ac_fn_c_try_link "$LINENO"; then :
10880 have_libpython=yes
10881 found_usable_python=yes
10882 PYTHON_CPPFLAGS=$new_CPPFLAGS
10883 PYTHON_LIBS=$new_LIBS
10884 fi
10885 rm -f core conftest.err conftest.$ac_objext \
10886 conftest$ac_exeext conftest.$ac_ext
10887 CPPFLAGS=$save_CPPFLAGS
10888 LIBS=$save_LIBS
10889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10890 $as_echo "${found_usable_python}" >&6; }
10891
10892 fi
10893 fi
10894
10895 if test "${have_libpython}" = no; then
10896 case "${with_python}" in
10897 yes)
10898 as_fn_error $? "python is missing or unusable" "$LINENO" 5
10899 ;;
10900 auto)
10901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10902 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10903 ;;
10904 *)
10905 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
10906 ;;
10907 esac
10908 else
10909 if test -n "${python_prefix}"; then
10910
10911 cat >>confdefs.h <<_ACEOF
10912 #define WITH_PYTHON_PATH "${python_prefix}"
10913 _ACEOF
10914
10915
10916 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10917 if test "x$prefix" = xNONE; then
10918 test_prefix=/usr/local
10919 else
10920 test_prefix=$prefix
10921 fi
10922 else
10923 test_prefix=$exec_prefix
10924 fi
10925 value=0
10926 case ${python_prefix} in
10927 "${test_prefix}"|"${test_prefix}/"*|\
10928 '${exec_prefix}'|'${exec_prefix}/'*)
10929 value=1
10930 ;;
10931 esac
10932
10933 cat >>confdefs.h <<_ACEOF
10934 #define PYTHON_PATH_RELOCATABLE $value
10935 _ACEOF
10936
10937
10938 fi
10939 fi
10940 fi
10941
10942
10943 # Check whether --with-python-libdir was given.
10944 if test "${with_python_libdir+set}" = set; then :
10945 withval=$with_python_libdir;
10946 else
10947
10948 # If no python libdir is specified then select one based on
10949 # python's prefix path.
10950 if test -n "${python_prefix}"; then
10951 with_python_libdir=${python_prefix}/lib
10952 fi
10953
10954 fi
10955
10956
10957 if test "${have_libpython}" != no; then
10958
10959 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
10960
10961 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10962 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10963 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
10964 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
10965 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
10966
10967 if test -n "${with_python_libdir}"; then
10968
10969 cat >>confdefs.h <<_ACEOF
10970 #define WITH_PYTHON_LIBDIR "${with_python_libdir}"
10971 _ACEOF
10972
10973
10974 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10975 if test "x$prefix" = xNONE; then
10976 test_prefix=/usr/local
10977 else
10978 test_prefix=$prefix
10979 fi
10980 else
10981 test_prefix=$exec_prefix
10982 fi
10983 value=0
10984 case ${with_python_libdir} in
10985 "${test_prefix}"|"${test_prefix}/"*|\
10986 '${exec_prefix}'|'${exec_prefix}/'*)
10987 value=1
10988 ;;
10989 esac
10990
10991 cat >>confdefs.h <<_ACEOF
10992 #define PYTHON_LIBDIR_RELOCATABLE $value
10993 _ACEOF
10994
10995
10996 fi
10997
10998 # Flags needed to compile Python code (taken from python-config --cflags).
10999 # We cannot call python-config directly because it will output whatever was
11000 # used when compiling the Python interpreter itself, including flags which
11001 # would make the python-related objects be compiled differently from the
11002 # rest of GDB (e.g., -O2 and -fPIC).
11003 if test "${GCC}" = yes; then
11004 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
11005 # Python headers recommend -DNDEBUG, but it's unclear if that just
11006 # refers to building Python itself. In release mode, though, it
11007 # doesn't hurt for the Python code in gdb to follow.
11008 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
11009 fi
11010
11011 if test "x${tentative_python_cflags}" != x; then
11012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
11013 $as_echo_n "checking compiler flags for python code... " >&6; }
11014 for flag in ${tentative_python_cflags}; do
11015 # Check that the compiler accepts it
11016 saved_CFLAGS="$CFLAGS"
11017 CFLAGS="$CFLAGS $flag"
11018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11019 /* end confdefs.h. */
11020
11021 int
11022 main ()
11023 {
11024
11025 ;
11026 return 0;
11027 }
11028 _ACEOF
11029 if ac_fn_c_try_compile "$LINENO"; then :
11030 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
11031 fi
11032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11033 CFLAGS="$saved_CFLAGS"
11034 done
11035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11036 $as_echo "${PYTHON_CFLAGS}" >&6; }
11037 fi
11038
11039 # On x64 Windows, Python's include headers, and pyconfig.h in
11040 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
11041 # version of Windows. Unfortunately, MS_WIN64 is only defined if
11042 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
11043 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
11044 # The issue was reported to the Python community, but still isn't
11045 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
11046
11047 case "$gdb_host" in
11048 mingw64)
11049 if test "${GCC}" = yes; then
11050 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
11051 fi
11052 ;;
11053 esac
11054 else
11055 # Even if Python support is not compiled in, we need to have this file
11056 # included so that the "python" command, et.al., still exists.
11057 CONFIG_OBS="$CONFIG_OBS python/python.o"
11058 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
11059 fi
11060
11061 # Work around Python http://bugs.python.org/issue10112. See also
11062 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
11063 # no effect. Note that the only test after this that uses Python is
11064 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
11065 # run without -export-dynamic too.
11066 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
11067
11068
11069
11070
11071 if test "${have_libpython}" != no; then
11072 HAVE_PYTHON_TRUE=
11073 HAVE_PYTHON_FALSE='#'
11074 else
11075 HAVE_PYTHON_TRUE='#'
11076 HAVE_PYTHON_FALSE=
11077 fi
11078
11079
11080 # -------------------- #
11081 # Check for libguile. #
11082 # -------------------- #
11083
11084
11085
11086
11087
11088
11089 # Check whether --with-guile was given.
11090 if test "${with_guile+set}" = set; then :
11091 withval=$with_guile;
11092 else
11093 with_guile=auto
11094 fi
11095
11096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
11097 $as_echo_n "checking whether to use guile... " >&6; }
11098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
11099 $as_echo "$with_guile" >&6; }
11100
11101 # Extract the first word of "pkg-config", so it can be a program name with args.
11102 set dummy pkg-config; ac_word=$2
11103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11104 $as_echo_n "checking for $ac_word... " >&6; }
11105 if ${ac_cv_path_pkg_config_prog_path+:} false; then :
11106 $as_echo_n "(cached) " >&6
11107 else
11108 case $pkg_config_prog_path in
11109 [\\/]* | ?:[\\/]*)
11110 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
11111 ;;
11112 *)
11113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11114 for as_dir in $PATH
11115 do
11116 IFS=$as_save_IFS
11117 test -z "$as_dir" && as_dir=.
11118 for ac_exec_ext in '' $ac_executable_extensions; do
11119 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11120 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
11121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11122 break 2
11123 fi
11124 done
11125 done
11126 IFS=$as_save_IFS
11127
11128 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
11129 ;;
11130 esac
11131 fi
11132 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
11133 if test -n "$pkg_config_prog_path"; then
11134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
11135 $as_echo "$pkg_config_prog_path" >&6; }
11136 else
11137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11138 $as_echo "no" >&6; }
11139 fi
11140
11141
11142
11143 try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
11144 have_libguile=no
11145 case "${with_guile}" in
11146 no)
11147 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
11148 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
11149 ;;
11150 auto)
11151 if test "${pkg_config_prog_path}" = "missing"; then
11152 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
11153 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
11154 else
11155
11156 pkg_config=${pkg_config_prog_path}
11157 guile_version_list=${try_guile_versions}
11158 flag_errors=no
11159
11160 found_usable_guile=checking
11161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11162 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11163 for guile_version in ${guile_version_list}; do
11164 ${pkg_config} --exists ${guile_version} 2>/dev/null
11165 if test $? != 0; then
11166 continue
11167 fi
11168 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11169 if test $? != 0; then
11170 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11171 fi
11172 new_LIBS=`${pkg_config} --libs ${guile_version}`
11173 if test $? != 0; then
11174 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11175 fi
11176 found_usable_guile=${guile_version}
11177 break
11178 done
11179 if test "${found_usable_guile}" = "checking"; then
11180 if test "${flag_errors}" = "yes"; then
11181 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11182 else
11183 found_usable_guile=no
11184 fi
11185 fi
11186 if test "${found_usable_guile}" != no; then
11187 save_CPPFLAGS=$CPPFLAGS
11188 save_LIBS=$LIBS
11189 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11190 LIBS="$LIBS $new_LIBS"
11191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11192 /* end confdefs.h. */
11193 #include "libguile.h"
11194 int
11195 main ()
11196 {
11197 scm_init_guile ();
11198 ;
11199 return 0;
11200 }
11201 _ACEOF
11202 if ac_fn_c_try_link "$LINENO"; then :
11203 have_libguile=yes
11204 GUILE_CPPFLAGS=$new_CPPFLAGS
11205 GUILE_LIBS=$new_LIBS
11206 else
11207 found_usable_guile=no
11208 fi
11209 rm -f core conftest.err conftest.$ac_objext \
11210 conftest$ac_exeext conftest.$ac_ext
11211 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11212 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11213
11214 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11215
11216
11217 fi
11218
11219 CPPFLAGS=$save_CPPFLAGS
11220 LIBS=$save_LIBS
11221 if test "${found_usable_guile}" = no; then
11222 if test "${flag_errors}" = yes; then
11223 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11224 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11225 as_fn_error $? "linking guile version ${guile_version} test program failed
11226 See \`config.log' for more details" "$LINENO" 5; }
11227 fi
11228 fi
11229 fi
11230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11231 $as_echo "${found_usable_guile}" >&6; }
11232
11233 fi
11234 ;;
11235 yes)
11236 if test "${pkg_config_prog_path}" = "missing"; then
11237 as_fn_error $? "pkg-config not found" "$LINENO" 5
11238 fi
11239
11240 pkg_config=${pkg_config_prog_path}
11241 guile_version_list=${try_guile_versions}
11242 flag_errors=yes
11243
11244 found_usable_guile=checking
11245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11246 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11247 for guile_version in ${guile_version_list}; do
11248 ${pkg_config} --exists ${guile_version} 2>/dev/null
11249 if test $? != 0; then
11250 continue
11251 fi
11252 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11253 if test $? != 0; then
11254 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11255 fi
11256 new_LIBS=`${pkg_config} --libs ${guile_version}`
11257 if test $? != 0; then
11258 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11259 fi
11260 found_usable_guile=${guile_version}
11261 break
11262 done
11263 if test "${found_usable_guile}" = "checking"; then
11264 if test "${flag_errors}" = "yes"; then
11265 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11266 else
11267 found_usable_guile=no
11268 fi
11269 fi
11270 if test "${found_usable_guile}" != no; then
11271 save_CPPFLAGS=$CPPFLAGS
11272 save_LIBS=$LIBS
11273 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11274 LIBS="$LIBS $new_LIBS"
11275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11276 /* end confdefs.h. */
11277 #include "libguile.h"
11278 int
11279 main ()
11280 {
11281 scm_init_guile ();
11282 ;
11283 return 0;
11284 }
11285 _ACEOF
11286 if ac_fn_c_try_link "$LINENO"; then :
11287 have_libguile=yes
11288 GUILE_CPPFLAGS=$new_CPPFLAGS
11289 GUILE_LIBS=$new_LIBS
11290 else
11291 found_usable_guile=no
11292 fi
11293 rm -f core conftest.err conftest.$ac_objext \
11294 conftest$ac_exeext conftest.$ac_ext
11295 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11296 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11297
11298 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11299
11300
11301 fi
11302
11303 CPPFLAGS=$save_CPPFLAGS
11304 LIBS=$save_LIBS
11305 if test "${found_usable_guile}" = no; then
11306 if test "${flag_errors}" = yes; then
11307 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11308 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11309 as_fn_error $? "linking guile version ${guile_version} test program failed
11310 See \`config.log' for more details" "$LINENO" 5; }
11311 fi
11312 fi
11313 fi
11314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11315 $as_echo "${found_usable_guile}" >&6; }
11316
11317 ;;
11318 [\\/]* | ?:[\\/]*)
11319 if test -x "${with_guile}"; then
11320
11321 pkg_config=${with_guile}
11322 guile_version_list=${try_guile_versions}
11323 flag_errors=yes
11324
11325 found_usable_guile=checking
11326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11327 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11328 for guile_version in ${guile_version_list}; do
11329 ${pkg_config} --exists ${guile_version} 2>/dev/null
11330 if test $? != 0; then
11331 continue
11332 fi
11333 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11334 if test $? != 0; then
11335 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11336 fi
11337 new_LIBS=`${pkg_config} --libs ${guile_version}`
11338 if test $? != 0; then
11339 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11340 fi
11341 found_usable_guile=${guile_version}
11342 break
11343 done
11344 if test "${found_usable_guile}" = "checking"; then
11345 if test "${flag_errors}" = "yes"; then
11346 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11347 else
11348 found_usable_guile=no
11349 fi
11350 fi
11351 if test "${found_usable_guile}" != no; then
11352 save_CPPFLAGS=$CPPFLAGS
11353 save_LIBS=$LIBS
11354 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11355 LIBS="$LIBS $new_LIBS"
11356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11357 /* end confdefs.h. */
11358 #include "libguile.h"
11359 int
11360 main ()
11361 {
11362 scm_init_guile ();
11363 ;
11364 return 0;
11365 }
11366 _ACEOF
11367 if ac_fn_c_try_link "$LINENO"; then :
11368 have_libguile=yes
11369 GUILE_CPPFLAGS=$new_CPPFLAGS
11370 GUILE_LIBS=$new_LIBS
11371 else
11372 found_usable_guile=no
11373 fi
11374 rm -f core conftest.err conftest.$ac_objext \
11375 conftest$ac_exeext conftest.$ac_ext
11376 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11377 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11378
11379 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11380
11381
11382 fi
11383
11384 CPPFLAGS=$save_CPPFLAGS
11385 LIBS=$save_LIBS
11386 if test "${found_usable_guile}" = no; then
11387 if test "${flag_errors}" = yes; then
11388 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11389 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11390 as_fn_error $? "linking guile version ${guile_version} test program failed
11391 See \`config.log' for more details" "$LINENO" 5; }
11392 fi
11393 fi
11394 fi
11395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11396 $as_echo "${found_usable_guile}" >&6; }
11397
11398 else
11399 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11400 fi
11401 ;;
11402 "" | */*)
11403 # Disallow --with=guile="" and --with-guile=foo/bar.
11404 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11405 ;;
11406 *)
11407 # A space separate list of guile versions to try, in order.
11408 if test "${pkg_config_prog_path}" = "missing"; then
11409 as_fn_error $? "pkg-config not found" "$LINENO" 5
11410 fi
11411
11412 pkg_config=${pkg_config_prog_path}
11413 guile_version_list=${with_guile}
11414 flag_errors=yes
11415
11416 found_usable_guile=checking
11417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11418 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11419 for guile_version in ${guile_version_list}; do
11420 ${pkg_config} --exists ${guile_version} 2>/dev/null
11421 if test $? != 0; then
11422 continue
11423 fi
11424 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11425 if test $? != 0; then
11426 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11427 fi
11428 new_LIBS=`${pkg_config} --libs ${guile_version}`
11429 if test $? != 0; then
11430 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11431 fi
11432 found_usable_guile=${guile_version}
11433 break
11434 done
11435 if test "${found_usable_guile}" = "checking"; then
11436 if test "${flag_errors}" = "yes"; then
11437 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11438 else
11439 found_usable_guile=no
11440 fi
11441 fi
11442 if test "${found_usable_guile}" != no; then
11443 save_CPPFLAGS=$CPPFLAGS
11444 save_LIBS=$LIBS
11445 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11446 LIBS="$LIBS $new_LIBS"
11447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11448 /* end confdefs.h. */
11449 #include "libguile.h"
11450 int
11451 main ()
11452 {
11453 scm_init_guile ();
11454 ;
11455 return 0;
11456 }
11457 _ACEOF
11458 if ac_fn_c_try_link "$LINENO"; then :
11459 have_libguile=yes
11460 GUILE_CPPFLAGS=$new_CPPFLAGS
11461 GUILE_LIBS=$new_LIBS
11462 else
11463 found_usable_guile=no
11464 fi
11465 rm -f core conftest.err conftest.$ac_objext \
11466 conftest$ac_exeext conftest.$ac_ext
11467 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11468 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11469
11470 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11471
11472
11473 fi
11474
11475 CPPFLAGS=$save_CPPFLAGS
11476 LIBS=$save_LIBS
11477 if test "${found_usable_guile}" = no; then
11478 if test "${flag_errors}" = yes; then
11479 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11480 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11481 as_fn_error $? "linking guile version ${guile_version} test program failed
11482 See \`config.log' for more details" "$LINENO" 5; }
11483 fi
11484 fi
11485 fi
11486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11487 $as_echo "${found_usable_guile}" >&6; }
11488
11489 ;;
11490 esac
11491
11492 if test "${have_libguile}" != no; then
11493 case "${with_guile}" in
11494 [\\/]* | ?:[\\/]*)
11495
11496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11497 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11498 if ${ac_cv_guild_program_name+:} false; then :
11499 $as_echo_n "(cached) " >&6
11500 else
11501 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
11502
11503 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11504 # the 'guild' and 'bindir' variables. In that case, try to guess
11505 # what the program name is, at the risk of getting it wrong if
11506 # Guile was configured with '--program-suffix' or similar.
11507 if test "x$ac_cv_guild_program_name" = "x"; then
11508 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
11509 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11510 fi
11511
11512 fi
11513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11514 $as_echo "$ac_cv_guild_program_name" >&6; }
11515
11516 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11517 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11518 fi
11519
11520 GUILD="$ac_cv_guild_program_name"
11521
11522
11523 ;;
11524 *)
11525
11526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11527 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11528 if ${ac_cv_guild_program_name+:} false; then :
11529 $as_echo_n "(cached) " >&6
11530 else
11531 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11532
11533 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11534 # the 'guild' and 'bindir' variables. In that case, try to guess
11535 # what the program name is, at the risk of getting it wrong if
11536 # Guile was configured with '--program-suffix' or similar.
11537 if test "x$ac_cv_guild_program_name" = "x"; then
11538 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11539 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11540 fi
11541
11542 fi
11543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11544 $as_echo "$ac_cv_guild_program_name" >&6; }
11545
11546 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11547 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11548 fi
11549
11550 GUILD="$ac_cv_guild_program_name"
11551
11552
11553 ;;
11554 esac
11555
11556
11557 if test "$cross_compiling" = no; then
11558 GUILD_TARGET_FLAG=
11559 else
11560 GUILD_TARGET_FLAG="--target=$host"
11561 fi
11562
11563
11564
11565
11566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11567 $as_echo_n "checking whether guild supports this host... " >&6; }
11568 if ${ac_cv_guild_ok+:} false; then :
11569 $as_echo_n "(cached) " >&6
11570 else
11571 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11572 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11573 ac_cv_guild_ok=yes
11574 else
11575 ac_cv_guild_ok=no
11576 fi
11577 fi
11578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11579 $as_echo "$ac_cv_guild_ok" >&6; }
11580
11581 if test "$ac_cv_guild_ok" = no; then
11582 have_libguile=no
11583 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11584 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
11585 fi
11586 fi
11587
11588 if test "${have_libguile}" != no; then
11589
11590 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
11591
11592 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11593 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11594 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11595 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11596 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
11597
11598 save_LIBS="$LIBS"
11599 save_CPPFLAGS="$CPPFLAGS"
11600 LIBS="$GUILE_LIBS"
11601 CPPFLAGS="$GUILE_CPPFLAGS"
11602 for ac_func in scm_new_smob
11603 do :
11604 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
11605 if test "x$ac_cv_func_scm_new_smob" = xyes; then :
11606 cat >>confdefs.h <<_ACEOF
11607 #define HAVE_SCM_NEW_SMOB 1
11608 _ACEOF
11609
11610 fi
11611 done
11612
11613 LIBS="$save_LIBS"
11614 CPPFLAGS="$save_CPPFLAGS"
11615 else
11616 # Even if Guile support is not compiled in, we need to have these files
11617 # included.
11618 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
11619 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11620 fi
11621
11622
11623 if test "${have_libguile}" != no; then
11624 HAVE_GUILE_TRUE=
11625 HAVE_GUILE_FALSE='#'
11626 else
11627 HAVE_GUILE_TRUE='#'
11628 HAVE_GUILE_FALSE=
11629 fi
11630
11631
11632 # ---------------------------- #
11633 # Check for source highlight. #
11634 # ---------------------------- #
11635
11636 SRCHIGH_LIBS=
11637 SRCHIGH_CFLAGS=
11638
11639 # Check whether --enable-source-highlight was given.
11640 if test "${enable_source_highlight+set}" = set; then :
11641 enableval=$enable_source_highlight; case "${enableval}" in
11642 yes) enable_source_highlight=yes ;;
11643 no) enable_source_highlight=no ;;
11644 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11645 esac
11646 else
11647 enable_source_highlight=auto
11648 fi
11649
11650
11651 if test "${enable_source_highlight}" != "no"; then
11652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
11653 $as_echo_n "checking for the source-highlight library... " >&6; }
11654 if test "${pkg_config_prog_path}" = "missing"; then
11655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
11656 $as_echo "no - pkg-config not found" >&6; }
11657 if test "${enable_source_highlight}" = "yes"; then
11658 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11659 fi
11660 else
11661 case "$LDFLAGS" in
11662 *static-libstdc*)
11663 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11664 ;;
11665 esac
11666
11667 if ${pkg_config_prog_path} --exists source-highlight; then
11668 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11669 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11670
11671 $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11672
11673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11674 $as_echo "yes" >&6; }
11675 else
11676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11677 $as_echo "no" >&6; }
11678 if test "${enable_source_highlight}" = "yes"; then
11679 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11680 fi
11681 fi
11682 fi
11683 fi
11684
11685
11686
11687 # ------------------------- #
11688 # Checks for header files. #
11689 # ------------------------- #
11690
11691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11692 $as_echo_n "checking for ANSI C header files... " >&6; }
11693 if ${ac_cv_header_stdc+:} false; then :
11694 $as_echo_n "(cached) " >&6
11695 else
11696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11697 /* end confdefs.h. */
11698 #include <stdlib.h>
11699 #include <stdarg.h>
11700 #include <string.h>
11701 #include <float.h>
11702
11703 int
11704 main ()
11705 {
11706
11707 ;
11708 return 0;
11709 }
11710 _ACEOF
11711 if ac_fn_c_try_compile "$LINENO"; then :
11712 ac_cv_header_stdc=yes
11713 else
11714 ac_cv_header_stdc=no
11715 fi
11716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11717
11718 if test $ac_cv_header_stdc = yes; then
11719 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11721 /* end confdefs.h. */
11722 #include <string.h>
11723
11724 _ACEOF
11725 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11726 $EGREP "memchr" >/dev/null 2>&1; then :
11727
11728 else
11729 ac_cv_header_stdc=no
11730 fi
11731 rm -f conftest*
11732
11733 fi
11734
11735 if test $ac_cv_header_stdc = yes; then
11736 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11738 /* end confdefs.h. */
11739 #include <stdlib.h>
11740
11741 _ACEOF
11742 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11743 $EGREP "free" >/dev/null 2>&1; then :
11744
11745 else
11746 ac_cv_header_stdc=no
11747 fi
11748 rm -f conftest*
11749
11750 fi
11751
11752 if test $ac_cv_header_stdc = yes; then
11753 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11754 if test "$cross_compiling" = yes; then :
11755 :
11756 else
11757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11758 /* end confdefs.h. */
11759 #include <ctype.h>
11760 #include <stdlib.h>
11761 #if ((' ' & 0x0FF) == 0x020)
11762 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11763 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11764 #else
11765 # define ISLOWER(c) \
11766 (('a' <= (c) && (c) <= 'i') \
11767 || ('j' <= (c) && (c) <= 'r') \
11768 || ('s' <= (c) && (c) <= 'z'))
11769 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11770 #endif
11771
11772 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11773 int
11774 main ()
11775 {
11776 int i;
11777 for (i = 0; i < 256; i++)
11778 if (XOR (islower (i), ISLOWER (i))
11779 || toupper (i) != TOUPPER (i))
11780 return 2;
11781 return 0;
11782 }
11783 _ACEOF
11784 if ac_fn_c_try_run "$LINENO"; then :
11785
11786 else
11787 ac_cv_header_stdc=no
11788 fi
11789 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11790 conftest.$ac_objext conftest.beam conftest.$ac_ext
11791 fi
11792
11793 fi
11794 fi
11795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11796 $as_echo "$ac_cv_header_stdc" >&6; }
11797 if test $ac_cv_header_stdc = yes; then
11798
11799 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11800
11801 fi
11802
11803 # elf_hp.h is for HP/UX 64-bit shared library support.
11804 for ac_header in nlist.h machine/reg.h \
11805 thread_db.h \
11806 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11807 sys/resource.h sys/ptrace.h ptrace.h \
11808 sys/reg.h sys/debugreg.h \
11809 termios.h elf_hp.h
11810 do :
11811 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11812 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11813 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11814 cat >>confdefs.h <<_ACEOF
11815 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11816 _ACEOF
11817
11818 fi
11819
11820 done
11821
11822 for ac_header in sys/user.h
11823 do :
11824 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11825 # include <sys/param.h>
11826 #endif
11827
11828 "
11829 if test "x$ac_cv_header_sys_user_h" = xyes; then :
11830 cat >>confdefs.h <<_ACEOF
11831 #define HAVE_SYS_USER_H 1
11832 _ACEOF
11833
11834 fi
11835
11836 done
11837
11838
11839 for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
11840 do :
11841 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11842 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11843 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11844 cat >>confdefs.h <<_ACEOF
11845 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11846 _ACEOF
11847
11848 fi
11849
11850 done
11851
11852 for ac_header in term.h
11853 do :
11854 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11855 # include <curses.h>
11856 #endif
11857
11858 "
11859 if test "x$ac_cv_header_term_h" = xyes; then :
11860 cat >>confdefs.h <<_ACEOF
11861 #define HAVE_TERM_H 1
11862 _ACEOF
11863
11864 fi
11865
11866 done
11867
11868
11869 for ac_header in sys/socket.h
11870 do :
11871 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
11872 if test "x$ac_cv_header_sys_socket_h" = xyes; then :
11873 cat >>confdefs.h <<_ACEOF
11874 #define HAVE_SYS_SOCKET_H 1
11875 _ACEOF
11876
11877 fi
11878
11879 done
11880
11881 for ac_header in ws2tcpip.h
11882 do :
11883 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
11884 if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
11885 cat >>confdefs.h <<_ACEOF
11886 #define HAVE_WS2TCPIP_H 1
11887 _ACEOF
11888
11889 fi
11890
11891 done
11892
11893
11894 # ------------------------- #
11895 # Checks for declarations. #
11896 # ------------------------- #
11897
11898
11899 # Check for presence and size of long long.
11900 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11901 if test "x$ac_cv_type_long_long" = xyes; then :
11902
11903 cat >>confdefs.h <<_ACEOF
11904 #define HAVE_LONG_LONG 1
11905 _ACEOF
11906
11907 # The cast to long int works around a bug in the HP C Compiler
11908 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11909 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11910 # This bug is HP SR number 8606223364.
11911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11912 $as_echo_n "checking size of long long... " >&6; }
11913 if ${ac_cv_sizeof_long_long+:} false; then :
11914 $as_echo_n "(cached) " >&6
11915 else
11916 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
11917
11918 else
11919 if test "$ac_cv_type_long_long" = yes; then
11920 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11921 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11922 as_fn_error 77 "cannot compute sizeof (long long)
11923 See \`config.log' for more details" "$LINENO" 5; }
11924 else
11925 ac_cv_sizeof_long_long=0
11926 fi
11927 fi
11928
11929 fi
11930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11931 $as_echo "$ac_cv_sizeof_long_long" >&6; }
11932
11933
11934
11935 cat >>confdefs.h <<_ACEOF
11936 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11937 _ACEOF
11938
11939
11940 fi
11941
11942
11943 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
11944 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
11945 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
11946 ac_have_decl=1
11947 else
11948 ac_have_decl=0
11949 fi
11950
11951 cat >>confdefs.h <<_ACEOF
11952 #define HAVE_DECL_BASENAME $ac_have_decl
11953 _ACEOF
11954 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11955 if test "x$ac_cv_have_decl_ffs" = xyes; then :
11956 ac_have_decl=1
11957 else
11958 ac_have_decl=0
11959 fi
11960
11961 cat >>confdefs.h <<_ACEOF
11962 #define HAVE_DECL_FFS $ac_have_decl
11963 _ACEOF
11964 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11965 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
11966 ac_have_decl=1
11967 else
11968 ac_have_decl=0
11969 fi
11970
11971 cat >>confdefs.h <<_ACEOF
11972 #define HAVE_DECL_ASPRINTF $ac_have_decl
11973 _ACEOF
11974 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11975 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
11976 ac_have_decl=1
11977 else
11978 ac_have_decl=0
11979 fi
11980
11981 cat >>confdefs.h <<_ACEOF
11982 #define HAVE_DECL_VASPRINTF $ac_have_decl
11983 _ACEOF
11984 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11985 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11986 ac_have_decl=1
11987 else
11988 ac_have_decl=0
11989 fi
11990
11991 cat >>confdefs.h <<_ACEOF
11992 #define HAVE_DECL_SNPRINTF $ac_have_decl
11993 _ACEOF
11994 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11995 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11996 ac_have_decl=1
11997 else
11998 ac_have_decl=0
11999 fi
12000
12001 cat >>confdefs.h <<_ACEOF
12002 #define HAVE_DECL_VSNPRINTF $ac_have_decl
12003 _ACEOF
12004
12005 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
12006 if test "x$ac_cv_have_decl_strtol" = xyes; then :
12007 ac_have_decl=1
12008 else
12009 ac_have_decl=0
12010 fi
12011
12012 cat >>confdefs.h <<_ACEOF
12013 #define HAVE_DECL_STRTOL $ac_have_decl
12014 _ACEOF
12015 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
12016 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
12017 ac_have_decl=1
12018 else
12019 ac_have_decl=0
12020 fi
12021
12022 cat >>confdefs.h <<_ACEOF
12023 #define HAVE_DECL_STRTOUL $ac_have_decl
12024 _ACEOF
12025 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
12026 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
12027 ac_have_decl=1
12028 else
12029 ac_have_decl=0
12030 fi
12031
12032 cat >>confdefs.h <<_ACEOF
12033 #define HAVE_DECL_STRTOLL $ac_have_decl
12034 _ACEOF
12035 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
12036 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
12037 ac_have_decl=1
12038 else
12039 ac_have_decl=0
12040 fi
12041
12042 cat >>confdefs.h <<_ACEOF
12043 #define HAVE_DECL_STRTOULL $ac_have_decl
12044 _ACEOF
12045
12046 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12047 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
12048 ac_have_decl=1
12049 else
12050 ac_have_decl=0
12051 fi
12052
12053 cat >>confdefs.h <<_ACEOF
12054 #define HAVE_DECL_STRVERSCMP $ac_have_decl
12055 _ACEOF
12056
12057
12058
12059 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12060 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12061 ac_have_decl=1
12062 else
12063 ac_have_decl=0
12064 fi
12065
12066 cat >>confdefs.h <<_ACEOF
12067 #define HAVE_DECL_SNPRINTF $ac_have_decl
12068 _ACEOF
12069
12070
12071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12072 $as_echo_n "checking for LC_MESSAGES... " >&6; }
12073 if ${am_cv_val_LC_MESSAGES+:} false; then :
12074 $as_echo_n "(cached) " >&6
12075 else
12076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12077 /* end confdefs.h. */
12078 #include <locale.h>
12079 int
12080 main ()
12081 {
12082 return LC_MESSAGES
12083 ;
12084 return 0;
12085 }
12086 _ACEOF
12087 if ac_fn_c_try_link "$LINENO"; then :
12088 am_cv_val_LC_MESSAGES=yes
12089 else
12090 am_cv_val_LC_MESSAGES=no
12091 fi
12092 rm -f core conftest.err conftest.$ac_objext \
12093 conftest$ac_exeext conftest.$ac_ext
12094 fi
12095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12096 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12097 if test $am_cv_val_LC_MESSAGES = yes; then
12098
12099 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12100
12101 fi
12102
12103
12104 # ------------------ #
12105 # Checks for types. #
12106 # ------------------ #
12107
12108 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
12109 #if HAVE_SYS_SOCKET_H
12110 # include <sys/socket.h>
12111 #elif HAVE_WS2TCPIP_H
12112 # include <ws2tcpip.h>
12113 #endif
12114
12115 "
12116 if test "x$ac_cv_type_socklen_t" = xyes; then :
12117
12118 cat >>confdefs.h <<_ACEOF
12119 #define HAVE_SOCKLEN_T 1
12120 _ACEOF
12121
12122
12123 fi
12124
12125
12126 # ------------------------------------- #
12127 # Checks for compiler characteristics. #
12128 # ------------------------------------- #
12129
12130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12131 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12132 if ${ac_cv_c_const+:} false; then :
12133 $as_echo_n "(cached) " >&6
12134 else
12135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12136 /* end confdefs.h. */
12137
12138 int
12139 main ()
12140 {
12141
12142 #ifndef __cplusplus
12143 /* Ultrix mips cc rejects this sort of thing. */
12144 typedef int charset[2];
12145 const charset cs = { 0, 0 };
12146 /* SunOS 4.1.1 cc rejects this. */
12147 char const *const *pcpcc;
12148 char **ppc;
12149 /* NEC SVR4.0.2 mips cc rejects this. */
12150 struct point {int x, y;};
12151 static struct point const zero = {0,0};
12152 /* AIX XL C 1.02.0.0 rejects this.
12153 It does not let you subtract one const X* pointer from another in
12154 an arm of an if-expression whose if-part is not a constant
12155 expression */
12156 const char *g = "string";
12157 pcpcc = &g + (g ? g-g : 0);
12158 /* HPUX 7.0 cc rejects these. */
12159 ++pcpcc;
12160 ppc = (char**) pcpcc;
12161 pcpcc = (char const *const *) ppc;
12162 { /* SCO 3.2v4 cc rejects this sort of thing. */
12163 char tx;
12164 char *t = &tx;
12165 char const *s = 0 ? (char *) 0 : (char const *) 0;
12166
12167 *t++ = 0;
12168 if (s) return 0;
12169 }
12170 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12171 int x[] = {25, 17};
12172 const int *foo = &x[0];
12173 ++foo;
12174 }
12175 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12176 typedef const int *iptr;
12177 iptr p = 0;
12178 ++p;
12179 }
12180 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12181 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12182 struct s { int j; const int *ap[3]; } bx;
12183 struct s *b = &bx; b->j = 5;
12184 }
12185 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12186 const int foo = 10;
12187 if (!foo) return 0;
12188 }
12189 return !cs[0] && !zero.x;
12190 #endif
12191
12192 ;
12193 return 0;
12194 }
12195 _ACEOF
12196 if ac_fn_c_try_compile "$LINENO"; then :
12197 ac_cv_c_const=yes
12198 else
12199 ac_cv_c_const=no
12200 fi
12201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12202 fi
12203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12204 $as_echo "$ac_cv_c_const" >&6; }
12205 if test $ac_cv_c_const = no; then
12206
12207 $as_echo "#define const /**/" >>confdefs.h
12208
12209 fi
12210
12211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12212 $as_echo_n "checking for inline... " >&6; }
12213 if ${ac_cv_c_inline+:} false; then :
12214 $as_echo_n "(cached) " >&6
12215 else
12216 ac_cv_c_inline=no
12217 for ac_kw in inline __inline__ __inline; do
12218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12219 /* end confdefs.h. */
12220 #ifndef __cplusplus
12221 typedef int foo_t;
12222 static $ac_kw foo_t static_foo () {return 0; }
12223 $ac_kw foo_t foo () {return 0; }
12224 #endif
12225
12226 _ACEOF
12227 if ac_fn_c_try_compile "$LINENO"; then :
12228 ac_cv_c_inline=$ac_kw
12229 fi
12230 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12231 test "$ac_cv_c_inline" != no && break
12232 done
12233
12234 fi
12235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12236 $as_echo "$ac_cv_c_inline" >&6; }
12237
12238 case $ac_cv_c_inline in
12239 inline | yes) ;;
12240 *)
12241 case $ac_cv_c_inline in
12242 no) ac_val=;;
12243 *) ac_val=$ac_cv_c_inline;;
12244 esac
12245 cat >>confdefs.h <<_ACEOF
12246 #ifndef __cplusplus
12247 #define inline $ac_val
12248 #endif
12249 _ACEOF
12250 ;;
12251 esac
12252
12253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12254 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12255 if ${ac_cv_c_bigendian+:} false; then :
12256 $as_echo_n "(cached) " >&6
12257 else
12258 ac_cv_c_bigendian=unknown
12259 # See if we're dealing with a universal compiler.
12260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12261 /* end confdefs.h. */
12262 #ifndef __APPLE_CC__
12263 not a universal capable compiler
12264 #endif
12265 typedef int dummy;
12266
12267 _ACEOF
12268 if ac_fn_c_try_compile "$LINENO"; then :
12269
12270 # Check for potential -arch flags. It is not universal unless
12271 # there are at least two -arch flags with different values.
12272 ac_arch=
12273 ac_prev=
12274 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12275 if test -n "$ac_prev"; then
12276 case $ac_word in
12277 i?86 | x86_64 | ppc | ppc64)
12278 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12279 ac_arch=$ac_word
12280 else
12281 ac_cv_c_bigendian=universal
12282 break
12283 fi
12284 ;;
12285 esac
12286 ac_prev=
12287 elif test "x$ac_word" = "x-arch"; then
12288 ac_prev=arch
12289 fi
12290 done
12291 fi
12292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12293 if test $ac_cv_c_bigendian = unknown; then
12294 # See if sys/param.h defines the BYTE_ORDER macro.
12295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12296 /* end confdefs.h. */
12297 #include <sys/types.h>
12298 #include <sys/param.h>
12299
12300 int
12301 main ()
12302 {
12303 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12304 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12305 && LITTLE_ENDIAN)
12306 bogus endian macros
12307 #endif
12308
12309 ;
12310 return 0;
12311 }
12312 _ACEOF
12313 if ac_fn_c_try_compile "$LINENO"; then :
12314 # It does; now see whether it defined to BIG_ENDIAN or not.
12315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12316 /* end confdefs.h. */
12317 #include <sys/types.h>
12318 #include <sys/param.h>
12319
12320 int
12321 main ()
12322 {
12323 #if BYTE_ORDER != BIG_ENDIAN
12324 not big endian
12325 #endif
12326
12327 ;
12328 return 0;
12329 }
12330 _ACEOF
12331 if ac_fn_c_try_compile "$LINENO"; then :
12332 ac_cv_c_bigendian=yes
12333 else
12334 ac_cv_c_bigendian=no
12335 fi
12336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12337 fi
12338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12339 fi
12340 if test $ac_cv_c_bigendian = unknown; then
12341 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12343 /* end confdefs.h. */
12344 #include <limits.h>
12345
12346 int
12347 main ()
12348 {
12349 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12350 bogus endian macros
12351 #endif
12352
12353 ;
12354 return 0;
12355 }
12356 _ACEOF
12357 if ac_fn_c_try_compile "$LINENO"; then :
12358 # It does; now see whether it defined to _BIG_ENDIAN or not.
12359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12360 /* end confdefs.h. */
12361 #include <limits.h>
12362
12363 int
12364 main ()
12365 {
12366 #ifndef _BIG_ENDIAN
12367 not big endian
12368 #endif
12369
12370 ;
12371 return 0;
12372 }
12373 _ACEOF
12374 if ac_fn_c_try_compile "$LINENO"; then :
12375 ac_cv_c_bigendian=yes
12376 else
12377 ac_cv_c_bigendian=no
12378 fi
12379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12380 fi
12381 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12382 fi
12383 if test $ac_cv_c_bigendian = unknown; then
12384 # Compile a test program.
12385 if test "$cross_compiling" = yes; then :
12386 # Try to guess by grepping values from an object file.
12387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12388 /* end confdefs.h. */
12389 short int ascii_mm[] =
12390 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12391 short int ascii_ii[] =
12392 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12393 int use_ascii (int i) {
12394 return ascii_mm[i] + ascii_ii[i];
12395 }
12396 short int ebcdic_ii[] =
12397 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12398 short int ebcdic_mm[] =
12399 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12400 int use_ebcdic (int i) {
12401 return ebcdic_mm[i] + ebcdic_ii[i];
12402 }
12403 extern int foo;
12404
12405 int
12406 main ()
12407 {
12408 return use_ascii (foo) == use_ebcdic (foo);
12409 ;
12410 return 0;
12411 }
12412 _ACEOF
12413 if ac_fn_c_try_compile "$LINENO"; then :
12414 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12415 ac_cv_c_bigendian=yes
12416 fi
12417 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12418 if test "$ac_cv_c_bigendian" = unknown; then
12419 ac_cv_c_bigendian=no
12420 else
12421 # finding both strings is unlikely to happen, but who knows?
12422 ac_cv_c_bigendian=unknown
12423 fi
12424 fi
12425 fi
12426 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12427 else
12428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12429 /* end confdefs.h. */
12430 $ac_includes_default
12431 int
12432 main ()
12433 {
12434
12435 /* Are we little or big endian? From Harbison&Steele. */
12436 union
12437 {
12438 long int l;
12439 char c[sizeof (long int)];
12440 } u;
12441 u.l = 1;
12442 return u.c[sizeof (long int) - 1] == 1;
12443
12444 ;
12445 return 0;
12446 }
12447 _ACEOF
12448 if ac_fn_c_try_run "$LINENO"; then :
12449 ac_cv_c_bigendian=no
12450 else
12451 ac_cv_c_bigendian=yes
12452 fi
12453 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12454 conftest.$ac_objext conftest.beam conftest.$ac_ext
12455 fi
12456
12457 fi
12458 fi
12459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12460 $as_echo "$ac_cv_c_bigendian" >&6; }
12461 case $ac_cv_c_bigendian in #(
12462 yes)
12463 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12464 ;; #(
12465 no)
12466 ;; #(
12467 universal)
12468
12469 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12470
12471 ;; #(
12472 *)
12473 as_fn_error $? "unknown endianness
12474 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12475 esac
12476
12477
12478 # ------------------------------ #
12479 # Checks for library functions. #
12480 # ------------------------------ #
12481
12482 for ac_func in getuid getgid \
12483 pipe pread pread64 pwrite resize_term \
12484 getpgid setsid \
12485 sigaction sigsetmask socketpair \
12486 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12487 setrlimit getrlimit posix_madvise waitpid \
12488 use_default_colors
12489 do :
12490 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12491 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12492 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12493 cat >>confdefs.h <<_ACEOF
12494 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12495 _ACEOF
12496
12497 fi
12498 done
12499
12500
12501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12502 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12503 if ${am_cv_langinfo_codeset+:} false; then :
12504 $as_echo_n "(cached) " >&6
12505 else
12506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12507 /* end confdefs.h. */
12508 #include <langinfo.h>
12509 int
12510 main ()
12511 {
12512 char* cs = nl_langinfo(CODESET);
12513 ;
12514 return 0;
12515 }
12516 _ACEOF
12517 if ac_fn_c_try_link "$LINENO"; then :
12518 am_cv_langinfo_codeset=yes
12519 else
12520 am_cv_langinfo_codeset=no
12521 fi
12522 rm -f core conftest.err conftest.$ac_objext \
12523 conftest$ac_exeext conftest.$ac_ext
12524
12525 fi
12526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12527 $as_echo "$am_cv_langinfo_codeset" >&6; }
12528 if test $am_cv_langinfo_codeset = yes; then
12529
12530 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12531
12532 fi
12533
12534 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12535 if test "x$ac_cv_type_size_t" = xyes; then :
12536
12537 else
12538
12539 cat >>confdefs.h <<_ACEOF
12540 #define size_t unsigned int
12541 _ACEOF
12542
12543 fi
12544
12545
12546
12547
12548 for ac_header in $ac_header_list
12549 do :
12550 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12551 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12552 "
12553 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12554 cat >>confdefs.h <<_ACEOF
12555 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12556 _ACEOF
12557
12558 fi
12559
12560 done
12561
12562
12563
12564
12565
12566
12567
12568 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12569 if test "x$ac_cv_type_pid_t" = xyes; then :
12570
12571 else
12572
12573 cat >>confdefs.h <<_ACEOF
12574 #define pid_t int
12575 _ACEOF
12576
12577 fi
12578
12579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12580 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12581 if ${ac_cv_path_SED+:} false; then :
12582 $as_echo_n "(cached) " >&6
12583 else
12584 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12585 for ac_i in 1 2 3 4 5 6 7; do
12586 ac_script="$ac_script$as_nl$ac_script"
12587 done
12588 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12589 { ac_script=; unset ac_script;}
12590 if test -z "$SED"; then
12591 ac_path_SED_found=false
12592 # Loop through the user's path and test for each of PROGNAME-LIST
12593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12594 for as_dir in $PATH
12595 do
12596 IFS=$as_save_IFS
12597 test -z "$as_dir" && as_dir=.
12598 for ac_prog in sed gsed; do
12599 for ac_exec_ext in '' $ac_executable_extensions; do
12600 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12601 as_fn_executable_p "$ac_path_SED" || continue
12602 # Check for GNU ac_path_SED and select it if it is found.
12603 # Check for GNU $ac_path_SED
12604 case `"$ac_path_SED" --version 2>&1` in
12605 *GNU*)
12606 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12607 *)
12608 ac_count=0
12609 $as_echo_n 0123456789 >"conftest.in"
12610 while :
12611 do
12612 cat "conftest.in" "conftest.in" >"conftest.tmp"
12613 mv "conftest.tmp" "conftest.in"
12614 cp "conftest.in" "conftest.nl"
12615 $as_echo '' >> "conftest.nl"
12616 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12617 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12618 as_fn_arith $ac_count + 1 && ac_count=$as_val
12619 if test $ac_count -gt ${ac_path_SED_max-0}; then
12620 # Best one so far, save it but keep looking for a better one
12621 ac_cv_path_SED="$ac_path_SED"
12622 ac_path_SED_max=$ac_count
12623 fi
12624 # 10*(2^10) chars as input seems more than enough
12625 test $ac_count -gt 10 && break
12626 done
12627 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12628 esac
12629
12630 $ac_path_SED_found && break 3
12631 done
12632 done
12633 done
12634 IFS=$as_save_IFS
12635 if test -z "$ac_cv_path_SED"; then
12636 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12637 fi
12638 else
12639 ac_cv_path_SED=$SED
12640 fi
12641
12642 fi
12643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12644 $as_echo "$ac_cv_path_SED" >&6; }
12645 SED="$ac_cv_path_SED"
12646 rm -f conftest.sed
12647
12648
12649 # Set the 'development' global.
12650 . $srcdir/../bfd/development.sh
12651
12652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12653 $as_echo_n "checking for ANSI C header files... " >&6; }
12654 if ${ac_cv_header_stdc+:} false; then :
12655 $as_echo_n "(cached) " >&6
12656 else
12657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12658 /* end confdefs.h. */
12659 #include <stdlib.h>
12660 #include <stdarg.h>
12661 #include <string.h>
12662 #include <float.h>
12663
12664 int
12665 main ()
12666 {
12667
12668 ;
12669 return 0;
12670 }
12671 _ACEOF
12672 if ac_fn_c_try_compile "$LINENO"; then :
12673 ac_cv_header_stdc=yes
12674 else
12675 ac_cv_header_stdc=no
12676 fi
12677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12678
12679 if test $ac_cv_header_stdc = yes; then
12680 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12682 /* end confdefs.h. */
12683 #include <string.h>
12684
12685 _ACEOF
12686 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12687 $EGREP "memchr" >/dev/null 2>&1; then :
12688
12689 else
12690 ac_cv_header_stdc=no
12691 fi
12692 rm -f conftest*
12693
12694 fi
12695
12696 if test $ac_cv_header_stdc = yes; then
12697 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12699 /* end confdefs.h. */
12700 #include <stdlib.h>
12701
12702 _ACEOF
12703 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12704 $EGREP "free" >/dev/null 2>&1; then :
12705
12706 else
12707 ac_cv_header_stdc=no
12708 fi
12709 rm -f conftest*
12710
12711 fi
12712
12713 if test $ac_cv_header_stdc = yes; then
12714 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12715 if test "$cross_compiling" = yes; then :
12716 :
12717 else
12718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12719 /* end confdefs.h. */
12720 #include <ctype.h>
12721 #include <stdlib.h>
12722 #if ((' ' & 0x0FF) == 0x020)
12723 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12724 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12725 #else
12726 # define ISLOWER(c) \
12727 (('a' <= (c) && (c) <= 'i') \
12728 || ('j' <= (c) && (c) <= 'r') \
12729 || ('s' <= (c) && (c) <= 'z'))
12730 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12731 #endif
12732
12733 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12734 int
12735 main ()
12736 {
12737 int i;
12738 for (i = 0; i < 256; i++)
12739 if (XOR (islower (i), ISLOWER (i))
12740 || toupper (i) != TOUPPER (i))
12741 return 2;
12742 return 0;
12743 }
12744 _ACEOF
12745 if ac_fn_c_try_run "$LINENO"; then :
12746
12747 else
12748 ac_cv_header_stdc=no
12749 fi
12750 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12751 conftest.$ac_objext conftest.beam conftest.$ac_ext
12752 fi
12753
12754 fi
12755 fi
12756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12757 $as_echo "$ac_cv_header_stdc" >&6; }
12758 if test $ac_cv_header_stdc = yes; then
12759
12760 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12761
12762 fi
12763
12764 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12765 # for constant arguments. Useless!
12766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12767 $as_echo_n "checking for working alloca.h... " >&6; }
12768 if ${ac_cv_working_alloca_h+:} false; then :
12769 $as_echo_n "(cached) " >&6
12770 else
12771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12772 /* end confdefs.h. */
12773 #include <alloca.h>
12774 int
12775 main ()
12776 {
12777 char *p = (char *) alloca (2 * sizeof (int));
12778 if (p) return 0;
12779 ;
12780 return 0;
12781 }
12782 _ACEOF
12783 if ac_fn_c_try_link "$LINENO"; then :
12784 ac_cv_working_alloca_h=yes
12785 else
12786 ac_cv_working_alloca_h=no
12787 fi
12788 rm -f core conftest.err conftest.$ac_objext \
12789 conftest$ac_exeext conftest.$ac_ext
12790 fi
12791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12792 $as_echo "$ac_cv_working_alloca_h" >&6; }
12793 if test $ac_cv_working_alloca_h = yes; then
12794
12795 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12796
12797 fi
12798
12799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12800 $as_echo_n "checking for alloca... " >&6; }
12801 if ${ac_cv_func_alloca_works+:} false; then :
12802 $as_echo_n "(cached) " >&6
12803 else
12804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12805 /* end confdefs.h. */
12806 #ifdef __GNUC__
12807 # define alloca __builtin_alloca
12808 #else
12809 # ifdef _MSC_VER
12810 # include <malloc.h>
12811 # define alloca _alloca
12812 # else
12813 # ifdef HAVE_ALLOCA_H
12814 # include <alloca.h>
12815 # else
12816 # ifdef _AIX
12817 #pragma alloca
12818 # else
12819 # ifndef alloca /* predefined by HP cc +Olibcalls */
12820 void *alloca (size_t);
12821 # endif
12822 # endif
12823 # endif
12824 # endif
12825 #endif
12826
12827 int
12828 main ()
12829 {
12830 char *p = (char *) alloca (1);
12831 if (p) return 0;
12832 ;
12833 return 0;
12834 }
12835 _ACEOF
12836 if ac_fn_c_try_link "$LINENO"; then :
12837 ac_cv_func_alloca_works=yes
12838 else
12839 ac_cv_func_alloca_works=no
12840 fi
12841 rm -f core conftest.err conftest.$ac_objext \
12842 conftest$ac_exeext conftest.$ac_ext
12843 fi
12844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12845 $as_echo "$ac_cv_func_alloca_works" >&6; }
12846
12847 if test $ac_cv_func_alloca_works = yes; then
12848
12849 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12850
12851 else
12852 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12853 # that cause trouble. Some versions do not even contain alloca or
12854 # contain a buggy version. If you still want to use their alloca,
12855 # use ar to extract alloca.o from them instead of compiling alloca.c.
12856
12857 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12858
12859 $as_echo "#define C_ALLOCA 1" >>confdefs.h
12860
12861
12862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12863 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12864 if ${ac_cv_os_cray+:} false; then :
12865 $as_echo_n "(cached) " >&6
12866 else
12867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12868 /* end confdefs.h. */
12869 #if defined CRAY && ! defined CRAY2
12870 webecray
12871 #else
12872 wenotbecray
12873 #endif
12874
12875 _ACEOF
12876 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12877 $EGREP "webecray" >/dev/null 2>&1; then :
12878 ac_cv_os_cray=yes
12879 else
12880 ac_cv_os_cray=no
12881 fi
12882 rm -f conftest*
12883
12884 fi
12885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12886 $as_echo "$ac_cv_os_cray" >&6; }
12887 if test $ac_cv_os_cray = yes; then
12888 for ac_func in _getb67 GETB67 getb67; do
12889 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12890 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12891 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12892
12893 cat >>confdefs.h <<_ACEOF
12894 #define CRAY_STACKSEG_END $ac_func
12895 _ACEOF
12896
12897 break
12898 fi
12899
12900 done
12901 fi
12902
12903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12904 $as_echo_n "checking stack direction for C alloca... " >&6; }
12905 if ${ac_cv_c_stack_direction+:} false; then :
12906 $as_echo_n "(cached) " >&6
12907 else
12908 if test "$cross_compiling" = yes; then :
12909 ac_cv_c_stack_direction=0
12910 else
12911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12912 /* end confdefs.h. */
12913 $ac_includes_default
12914 int
12915 find_stack_direction (int *addr, int depth)
12916 {
12917 int dir, dummy = 0;
12918 if (! addr)
12919 addr = &dummy;
12920 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
12921 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
12922 return dir + dummy;
12923 }
12924
12925 int
12926 main (int argc, char **argv)
12927 {
12928 return find_stack_direction (0, argc + !argv + 20) < 0;
12929 }
12930 _ACEOF
12931 if ac_fn_c_try_run "$LINENO"; then :
12932 ac_cv_c_stack_direction=1
12933 else
12934 ac_cv_c_stack_direction=-1
12935 fi
12936 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12937 conftest.$ac_objext conftest.beam conftest.$ac_ext
12938 fi
12939
12940 fi
12941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12942 $as_echo "$ac_cv_c_stack_direction" >&6; }
12943 cat >>confdefs.h <<_ACEOF
12944 #define STACK_DIRECTION $ac_cv_c_stack_direction
12945 _ACEOF
12946
12947
12948 fi
12949
12950
12951 WIN32APILIBS=
12952 case ${host} in
12953 *mingw32*)
12954
12955 $as_echo "#define USE_WIN32API 1" >>confdefs.h
12956
12957 WIN32APILIBS="-lws2_32"
12958 ;;
12959 esac
12960
12961
12962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12963 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12964 if ${am_cv_langinfo_codeset+:} false; then :
12965 $as_echo_n "(cached) " >&6
12966 else
12967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12968 /* end confdefs.h. */
12969 #include <langinfo.h>
12970 int
12971 main ()
12972 {
12973 char* cs = nl_langinfo(CODESET);
12974 ;
12975 return 0;
12976 }
12977 _ACEOF
12978 if ac_fn_c_try_link "$LINENO"; then :
12979 am_cv_langinfo_codeset=yes
12980 else
12981 am_cv_langinfo_codeset=no
12982 fi
12983 rm -f core conftest.err conftest.$ac_objext \
12984 conftest$ac_exeext conftest.$ac_ext
12985
12986 fi
12987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12988 $as_echo "$am_cv_langinfo_codeset" >&6; }
12989 if test $am_cv_langinfo_codeset = yes; then
12990
12991 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12992
12993 fi
12994
12995
12996 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h dlfcn.h linux/elf.h sys/procfs.h proc_service.h poll.h sys/poll.h sys/select.h
12997 do :
12998 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12999 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13000 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13001 cat >>confdefs.h <<_ACEOF
13002 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13003 _ACEOF
13004
13005 fi
13006
13007 done
13008
13009
13010
13011 for ac_func in getpagesize
13012 do :
13013 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
13014 if test "x$ac_cv_func_getpagesize" = xyes; then :
13015 cat >>confdefs.h <<_ACEOF
13016 #define HAVE_GETPAGESIZE 1
13017 _ACEOF
13018
13019 fi
13020 done
13021
13022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
13023 $as_echo_n "checking for working mmap... " >&6; }
13024 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
13025 $as_echo_n "(cached) " >&6
13026 else
13027 if test "$cross_compiling" = yes; then :
13028 ac_cv_func_mmap_fixed_mapped=no
13029 else
13030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13031 /* end confdefs.h. */
13032 $ac_includes_default
13033 /* malloc might have been renamed as rpl_malloc. */
13034 #undef malloc
13035
13036 /* Thanks to Mike Haertel and Jim Avera for this test.
13037 Here is a matrix of mmap possibilities:
13038 mmap private not fixed
13039 mmap private fixed at somewhere currently unmapped
13040 mmap private fixed at somewhere already mapped
13041 mmap shared not fixed
13042 mmap shared fixed at somewhere currently unmapped
13043 mmap shared fixed at somewhere already mapped
13044 For private mappings, we should verify that changes cannot be read()
13045 back from the file, nor mmap's back from the file at a different
13046 address. (There have been systems where private was not correctly
13047 implemented like the infamous i386 svr4.0, and systems where the
13048 VM page cache was not coherent with the file system buffer cache
13049 like early versions of FreeBSD and possibly contemporary NetBSD.)
13050 For shared mappings, we should conversely verify that changes get
13051 propagated back to all the places they're supposed to be.
13052
13053 Grep wants private fixed already mapped.
13054 The main things grep needs to know about mmap are:
13055 * does it exist and is it safe to write into the mmap'd area
13056 * how to use it (BSD variants) */
13057
13058 #include <fcntl.h>
13059 #include <sys/mman.h>
13060
13061 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
13062 char *malloc ();
13063 #endif
13064
13065 /* This mess was copied from the GNU getpagesize.h. */
13066 #ifndef HAVE_GETPAGESIZE
13067 # ifdef _SC_PAGESIZE
13068 # define getpagesize() sysconf(_SC_PAGESIZE)
13069 # else /* no _SC_PAGESIZE */
13070 # ifdef HAVE_SYS_PARAM_H
13071 # include <sys/param.h>
13072 # ifdef EXEC_PAGESIZE
13073 # define getpagesize() EXEC_PAGESIZE
13074 # else /* no EXEC_PAGESIZE */
13075 # ifdef NBPG
13076 # define getpagesize() NBPG * CLSIZE
13077 # ifndef CLSIZE
13078 # define CLSIZE 1
13079 # endif /* no CLSIZE */
13080 # else /* no NBPG */
13081 # ifdef NBPC
13082 # define getpagesize() NBPC
13083 # else /* no NBPC */
13084 # ifdef PAGESIZE
13085 # define getpagesize() PAGESIZE
13086 # endif /* PAGESIZE */
13087 # endif /* no NBPC */
13088 # endif /* no NBPG */
13089 # endif /* no EXEC_PAGESIZE */
13090 # else /* no HAVE_SYS_PARAM_H */
13091 # define getpagesize() 8192 /* punt totally */
13092 # endif /* no HAVE_SYS_PARAM_H */
13093 # endif /* no _SC_PAGESIZE */
13094
13095 #endif /* no HAVE_GETPAGESIZE */
13096
13097 int
13098 main ()
13099 {
13100 char *data, *data2, *data3;
13101 const char *cdata2;
13102 int i, pagesize;
13103 int fd, fd2;
13104
13105 pagesize = getpagesize ();
13106
13107 /* First, make a file with some known garbage in it. */
13108 data = (char *) malloc (pagesize);
13109 if (!data)
13110 return 1;
13111 for (i = 0; i < pagesize; ++i)
13112 *(data + i) = rand ();
13113 umask (0);
13114 fd = creat ("conftest.mmap", 0600);
13115 if (fd < 0)
13116 return 2;
13117 if (write (fd, data, pagesize) != pagesize)
13118 return 3;
13119 close (fd);
13120
13121 /* Next, check that the tail of a page is zero-filled. File must have
13122 non-zero length, otherwise we risk SIGBUS for entire page. */
13123 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13124 if (fd2 < 0)
13125 return 4;
13126 cdata2 = "";
13127 if (write (fd2, cdata2, 1) != 1)
13128 return 5;
13129 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13130 if (data2 == MAP_FAILED)
13131 return 6;
13132 for (i = 0; i < pagesize; ++i)
13133 if (*(data2 + i))
13134 return 7;
13135 close (fd2);
13136 if (munmap (data2, pagesize))
13137 return 8;
13138
13139 /* Next, try to mmap the file at a fixed address which already has
13140 something else allocated at it. If we can, also make sure that
13141 we see the same garbage. */
13142 fd = open ("conftest.mmap", O_RDWR);
13143 if (fd < 0)
13144 return 9;
13145 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13146 MAP_PRIVATE | MAP_FIXED, fd, 0L))
13147 return 10;
13148 for (i = 0; i < pagesize; ++i)
13149 if (*(data + i) != *(data2 + i))
13150 return 11;
13151
13152 /* Finally, make sure that changes to the mapped area do not
13153 percolate back to the file as seen by read(). (This is a bug on
13154 some variants of i386 svr4.0.) */
13155 for (i = 0; i < pagesize; ++i)
13156 *(data2 + i) = *(data2 + i) + 1;
13157 data3 = (char *) malloc (pagesize);
13158 if (!data3)
13159 return 12;
13160 if (read (fd, data3, pagesize) != pagesize)
13161 return 13;
13162 for (i = 0; i < pagesize; ++i)
13163 if (*(data + i) != *(data3 + i))
13164 return 14;
13165 close (fd);
13166 return 0;
13167 }
13168 _ACEOF
13169 if ac_fn_c_try_run "$LINENO"; then :
13170 ac_cv_func_mmap_fixed_mapped=yes
13171 else
13172 ac_cv_func_mmap_fixed_mapped=no
13173 fi
13174 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13175 conftest.$ac_objext conftest.beam conftest.$ac_ext
13176 fi
13177
13178 fi
13179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13180 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
13181 if test $ac_cv_func_mmap_fixed_mapped = yes; then
13182
13183 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
13184
13185 fi
13186 rm -f conftest.mmap conftest.txt
13187
13188 for ac_header in vfork.h
13189 do :
13190 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13191 if test "x$ac_cv_header_vfork_h" = xyes; then :
13192 cat >>confdefs.h <<_ACEOF
13193 #define HAVE_VFORK_H 1
13194 _ACEOF
13195
13196 fi
13197
13198 done
13199
13200 for ac_func in fork vfork
13201 do :
13202 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13203 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13204 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13205 cat >>confdefs.h <<_ACEOF
13206 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13207 _ACEOF
13208
13209 fi
13210 done
13211
13212 if test "x$ac_cv_func_fork" = xyes; then
13213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13214 $as_echo_n "checking for working fork... " >&6; }
13215 if ${ac_cv_func_fork_works+:} false; then :
13216 $as_echo_n "(cached) " >&6
13217 else
13218 if test "$cross_compiling" = yes; then :
13219 ac_cv_func_fork_works=cross
13220 else
13221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13222 /* end confdefs.h. */
13223 $ac_includes_default
13224 int
13225 main ()
13226 {
13227
13228 /* By Ruediger Kuhlmann. */
13229 return fork () < 0;
13230
13231 ;
13232 return 0;
13233 }
13234 _ACEOF
13235 if ac_fn_c_try_run "$LINENO"; then :
13236 ac_cv_func_fork_works=yes
13237 else
13238 ac_cv_func_fork_works=no
13239 fi
13240 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13241 conftest.$ac_objext conftest.beam conftest.$ac_ext
13242 fi
13243
13244 fi
13245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13246 $as_echo "$ac_cv_func_fork_works" >&6; }
13247
13248 else
13249 ac_cv_func_fork_works=$ac_cv_func_fork
13250 fi
13251 if test "x$ac_cv_func_fork_works" = xcross; then
13252 case $host in
13253 *-*-amigaos* | *-*-msdosdjgpp*)
13254 # Override, as these systems have only a dummy fork() stub
13255 ac_cv_func_fork_works=no
13256 ;;
13257 *)
13258 ac_cv_func_fork_works=yes
13259 ;;
13260 esac
13261 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13262 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
13263 fi
13264 ac_cv_func_vfork_works=$ac_cv_func_vfork
13265 if test "x$ac_cv_func_vfork" = xyes; then
13266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13267 $as_echo_n "checking for working vfork... " >&6; }
13268 if ${ac_cv_func_vfork_works+:} false; then :
13269 $as_echo_n "(cached) " >&6
13270 else
13271 if test "$cross_compiling" = yes; then :
13272 ac_cv_func_vfork_works=cross
13273 else
13274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13275 /* end confdefs.h. */
13276 /* Thanks to Paul Eggert for this test. */
13277 $ac_includes_default
13278 #include <sys/wait.h>
13279 #ifdef HAVE_VFORK_H
13280 # include <vfork.h>
13281 #endif
13282 /* On some sparc systems, changes by the child to local and incoming
13283 argument registers are propagated back to the parent. The compiler
13284 is told about this with #include <vfork.h>, but some compilers
13285 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13286 static variable whose address is put into a register that is
13287 clobbered by the vfork. */
13288 static void
13289 #ifdef __cplusplus
13290 sparc_address_test (int arg)
13291 # else
13292 sparc_address_test (arg) int arg;
13293 #endif
13294 {
13295 static pid_t child;
13296 if (!child) {
13297 child = vfork ();
13298 if (child < 0) {
13299 perror ("vfork");
13300 _exit(2);
13301 }
13302 if (!child) {
13303 arg = getpid();
13304 write(-1, "", 0);
13305 _exit (arg);
13306 }
13307 }
13308 }
13309
13310 int
13311 main ()
13312 {
13313 pid_t parent = getpid ();
13314 pid_t child;
13315
13316 sparc_address_test (0);
13317
13318 child = vfork ();
13319
13320 if (child == 0) {
13321 /* Here is another test for sparc vfork register problems. This
13322 test uses lots of local variables, at least as many local
13323 variables as main has allocated so far including compiler
13324 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13325 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13326 reuse the register of parent for one of the local variables,
13327 since it will think that parent can't possibly be used any more
13328 in this routine. Assigning to the local variable will thus
13329 munge parent in the parent process. */
13330 pid_t
13331 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13332 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13333 /* Convince the compiler that p..p7 are live; otherwise, it might
13334 use the same hardware register for all 8 local variables. */
13335 if (p != p1 || p != p2 || p != p3 || p != p4
13336 || p != p5 || p != p6 || p != p7)
13337 _exit(1);
13338
13339 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13340 from child file descriptors. If the child closes a descriptor
13341 before it execs or exits, this munges the parent's descriptor
13342 as well. Test for this by closing stdout in the child. */
13343 _exit(close(fileno(stdout)) != 0);
13344 } else {
13345 int status;
13346 struct stat st;
13347
13348 while (wait(&status) != child)
13349 ;
13350 return (
13351 /* Was there some problem with vforking? */
13352 child < 0
13353
13354 /* Did the child fail? (This shouldn't happen.) */
13355 || status
13356
13357 /* Did the vfork/compiler bug occur? */
13358 || parent != getpid()
13359
13360 /* Did the file descriptor bug occur? */
13361 || fstat(fileno(stdout), &st) != 0
13362 );
13363 }
13364 }
13365 _ACEOF
13366 if ac_fn_c_try_run "$LINENO"; then :
13367 ac_cv_func_vfork_works=yes
13368 else
13369 ac_cv_func_vfork_works=no
13370 fi
13371 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13372 conftest.$ac_objext conftest.beam conftest.$ac_ext
13373 fi
13374
13375 fi
13376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13377 $as_echo "$ac_cv_func_vfork_works" >&6; }
13378
13379 fi;
13380 if test "x$ac_cv_func_fork_works" = xcross; then
13381 ac_cv_func_vfork_works=$ac_cv_func_vfork
13382 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13383 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13384 fi
13385
13386 if test "x$ac_cv_func_vfork_works" = xyes; then
13387
13388 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13389
13390 else
13391
13392 $as_echo "#define vfork fork" >>confdefs.h
13393
13394 fi
13395 if test "x$ac_cv_func_fork_works" = xyes; then
13396
13397 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13398
13399 fi
13400
13401 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
13402 ptrace64 sbrk setns sigaltstack sigprocmask \
13403 setpgid setpgrp getrusage getauxval
13404 do :
13405 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13406 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13407 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13408 cat >>confdefs.h <<_ACEOF
13409 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13410 _ACEOF
13411
13412 fi
13413 done
13414
13415
13416 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13417 "
13418 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13419 ac_have_decl=1
13420 else
13421 ac_have_decl=0
13422 fi
13423
13424 cat >>confdefs.h <<_ACEOF
13425 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13426 _ACEOF
13427
13428
13429 if test "$cross_compiling" = yes; then :
13430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13431 /* end confdefs.h. */
13432 #include <sys/personality.h>
13433 int
13434 main ()
13435 {
13436
13437 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13438 # define ADDR_NO_RANDOMIZE 0x0040000
13439 # endif
13440 /* Test the flag could be set and stays set. */
13441 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13442 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13443 return 1
13444 ;
13445 return 0;
13446 }
13447 _ACEOF
13448 if ac_fn_c_try_link "$LINENO"; then :
13449 have_personality=true
13450 else
13451 have_personality=false
13452 fi
13453 rm -f core conftest.err conftest.$ac_objext \
13454 conftest$ac_exeext conftest.$ac_ext
13455 else
13456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13457 /* end confdefs.h. */
13458 #include <sys/personality.h>
13459 int
13460 main ()
13461 {
13462
13463 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13464 # define ADDR_NO_RANDOMIZE 0x0040000
13465 # endif
13466 /* Test the flag could be set and stays set. */
13467 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13468 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13469 return 1
13470 ;
13471 return 0;
13472 }
13473 _ACEOF
13474 if ac_fn_c_try_run "$LINENO"; then :
13475 have_personality=true
13476 else
13477 have_personality=false
13478 fi
13479 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13480 conftest.$ac_objext conftest.beam conftest.$ac_ext
13481 fi
13482
13483 if $have_personality
13484 then
13485
13486 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
13487
13488 fi
13489
13490 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13491 if test "x$ac_cv_have_decl_strstr" = xyes; then :
13492 ac_have_decl=1
13493 else
13494 ac_have_decl=0
13495 fi
13496
13497 cat >>confdefs.h <<_ACEOF
13498 #define HAVE_DECL_STRSTR $ac_have_decl
13499 _ACEOF
13500
13501
13502 # ----------------------- #
13503 # Checks for structures. #
13504 # ----------------------- #
13505
13506 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13507 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13508
13509 cat >>confdefs.h <<_ACEOF
13510 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
13511 _ACEOF
13512
13513
13514 fi
13515 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13516 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
13517
13518 cat >>confdefs.h <<_ACEOF
13519 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13520 _ACEOF
13521
13522
13523 fi
13524
13525
13526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13527 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13528 if ${ac_cv_search_kinfo_getfile+:} false; then :
13529 $as_echo_n "(cached) " >&6
13530 else
13531 ac_func_search_save_LIBS=$LIBS
13532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13533 /* end confdefs.h. */
13534
13535 /* Override any GCC internal prototype to avoid an error.
13536 Use char because int might match the return type of a GCC
13537 builtin and then its argument prototype would still apply. */
13538 #ifdef __cplusplus
13539 extern "C"
13540 #endif
13541 char kinfo_getfile ();
13542 int
13543 main ()
13544 {
13545 return kinfo_getfile ();
13546 ;
13547 return 0;
13548 }
13549 _ACEOF
13550 for ac_lib in '' util util-freebsd; do
13551 if test -z "$ac_lib"; then
13552 ac_res="none required"
13553 else
13554 ac_res=-l$ac_lib
13555 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13556 fi
13557 if ac_fn_c_try_link "$LINENO"; then :
13558 ac_cv_search_kinfo_getfile=$ac_res
13559 fi
13560 rm -f core conftest.err conftest.$ac_objext \
13561 conftest$ac_exeext
13562 if ${ac_cv_search_kinfo_getfile+:} false; then :
13563 break
13564 fi
13565 done
13566 if ${ac_cv_search_kinfo_getfile+:} false; then :
13567
13568 else
13569 ac_cv_search_kinfo_getfile=no
13570 fi
13571 rm conftest.$ac_ext
13572 LIBS=$ac_func_search_save_LIBS
13573 fi
13574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13575 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13576 ac_res=$ac_cv_search_kinfo_getfile
13577 if test "$ac_res" != no; then :
13578 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13579
13580 $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
13581
13582 fi
13583
13584
13585 # Check for std::thread. This does not work on some platforms, like
13586 # mingw and DJGPP.
13587 ac_ext=cpp
13588 ac_cpp='$CXXCPP $CPPFLAGS'
13589 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13590 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13591 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13592
13593
13594
13595
13596
13597 ac_ext=c
13598 ac_cpp='$CPP $CPPFLAGS'
13599 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13600 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13601 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13602
13603 ax_pthread_ok=no
13604
13605 # We used to check for pthread.h first, but this fails if pthread.h
13606 # requires special compiler flags (e.g. on Tru64 or Sequent).
13607 # It gets checked for in the link test anyway.
13608
13609 # First of all, check if the user has set any of the PTHREAD_LIBS,
13610 # etcetera environment variables, and if threads linking works using
13611 # them:
13612 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13613 ax_pthread_save_CC="$CC"
13614 ax_pthread_save_CFLAGS="$CFLAGS"
13615 ax_pthread_save_LIBS="$LIBS"
13616 if test "x$PTHREAD_CC" != "x"; then :
13617 CC="$PTHREAD_CC"
13618 fi
13619 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13620 LIBS="$PTHREAD_LIBS $LIBS"
13621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13622 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13624 /* end confdefs.h. */
13625
13626 /* Override any GCC internal prototype to avoid an error.
13627 Use char because int might match the return type of a GCC
13628 builtin and then its argument prototype would still apply. */
13629 #ifdef __cplusplus
13630 extern "C"
13631 #endif
13632 char pthread_join ();
13633 int
13634 main ()
13635 {
13636 return pthread_join ();
13637 ;
13638 return 0;
13639 }
13640 _ACEOF
13641 if ac_fn_c_try_link "$LINENO"; then :
13642 ax_pthread_ok=yes
13643 fi
13644 rm -f core conftest.err conftest.$ac_objext \
13645 conftest$ac_exeext conftest.$ac_ext
13646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13647 $as_echo "$ax_pthread_ok" >&6; }
13648 if test "x$ax_pthread_ok" = "xno"; then
13649 PTHREAD_LIBS=""
13650 PTHREAD_CFLAGS=""
13651 fi
13652 CC="$ax_pthread_save_CC"
13653 CFLAGS="$ax_pthread_save_CFLAGS"
13654 LIBS="$ax_pthread_save_LIBS"
13655 fi
13656
13657 # We must check for the threads library under a number of different
13658 # names; the ordering is very important because some systems
13659 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
13660 # libraries is broken (non-POSIX).
13661
13662 # Create a list of thread flags to try. Items starting with a "-" are
13663 # C compiler flags, and other items are library names, except for "none"
13664 # which indicates that we try without any flags at all, and "pthread-config"
13665 # which is a program returning the flags for the Pth emulation library.
13666
13667 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
13668
13669 # The ordering *is* (sometimes) important. Some notes on the
13670 # individual items follow:
13671
13672 # pthreads: AIX (must check this before -lpthread)
13673 # none: in case threads are in libc; should be tried before -Kthread and
13674 # other compiler flags to prevent continual compiler warnings
13675 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
13676 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
13677 # (Note: HP C rejects this with "bad form for `-t' option")
13678 # -pthreads: Solaris/gcc (Note: HP C also rejects)
13679 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
13680 # doesn't hurt to check since this sometimes defines pthreads and
13681 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
13682 # is present but should not be used directly; and before -mthreads,
13683 # because the compiler interprets this as "-mt" + "-hreads")
13684 # -mthreads: Mingw32/gcc, Lynx/gcc
13685 # pthread: Linux, etcetera
13686 # --thread-safe: KAI C++
13687 # pthread-config: use pthread-config program (for GNU Pth library)
13688
13689 case $host_os in
13690
13691 freebsd*)
13692
13693 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
13694 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
13695
13696 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
13697 ;;
13698
13699 hpux*)
13700
13701 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
13702 # multi-threading and also sets -lpthread."
13703
13704 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
13705 ;;
13706
13707 openedition*)
13708
13709 # IBM z/OS requires a feature-test macro to be defined in order to
13710 # enable POSIX threads at all, so give the user a hint if this is
13711 # not set. (We don't define these ourselves, as they can affect
13712 # other portions of the system API in unpredictable ways.)
13713
13714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13715 /* end confdefs.h. */
13716
13717 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
13718 AX_PTHREAD_ZOS_MISSING
13719 # endif
13720
13721 _ACEOF
13722 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13723 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
13724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
13725 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
13726 fi
13727 rm -f conftest*
13728
13729 ;;
13730
13731 solaris*)
13732
13733 # On Solaris (at least, for some versions), libc contains stubbed
13734 # (non-functional) versions of the pthreads routines, so link-based
13735 # tests will erroneously succeed. (N.B.: The stubs are missing
13736 # pthread_cleanup_push, or rather a function called by this macro,
13737 # so we could check for that, but who knows whether they'll stub
13738 # that too in a future libc.) So we'll check first for the
13739 # standard Solaris way of linking pthreads (-mt -lpthread).
13740
13741 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
13742 ;;
13743 esac
13744
13745 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
13746
13747 if test "x$GCC" = "xyes"; then :
13748 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
13749 fi
13750
13751 # The presence of a feature test macro requesting re-entrant function
13752 # definitions is, on some systems, a strong hint that pthreads support is
13753 # correctly enabled
13754
13755 case $host_os in
13756 darwin* | hpux* | linux* | osf* | solaris*)
13757 ax_pthread_check_macro="_REENTRANT"
13758 ;;
13759
13760 aix*)
13761 ax_pthread_check_macro="_THREAD_SAFE"
13762 ;;
13763
13764 *)
13765 ax_pthread_check_macro="--"
13766 ;;
13767 esac
13768 if test "x$ax_pthread_check_macro" = "x--"; then :
13769 ax_pthread_check_cond=0
13770 else
13771 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
13772 fi
13773
13774 # Are we compiling with Clang?
13775
13776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
13777 $as_echo_n "checking whether $CC is Clang... " >&6; }
13778 if ${ax_cv_PTHREAD_CLANG+:} false; then :
13779 $as_echo_n "(cached) " >&6
13780 else
13781 ax_cv_PTHREAD_CLANG=no
13782 # Note that Autoconf sets GCC=yes for Clang as well as GCC
13783 if test "x$GCC" = "xyes"; then
13784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13785 /* end confdefs.h. */
13786 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
13787 # if defined(__clang__) && defined(__llvm__)
13788 AX_PTHREAD_CC_IS_CLANG
13789 # endif
13790
13791 _ACEOF
13792 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13793 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
13794 ax_cv_PTHREAD_CLANG=yes
13795 fi
13796 rm -f conftest*
13797
13798 fi
13799
13800 fi
13801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
13802 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
13803 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
13804
13805 ax_pthread_clang_warning=no
13806
13807 # Clang needs special handling, because older versions handle the -pthread
13808 # option in a rather... idiosyncratic way
13809
13810 if test "x$ax_pthread_clang" = "xyes"; then
13811
13812 # Clang takes -pthread; it has never supported any other flag
13813
13814 # (Note 1: This will need to be revisited if a system that Clang
13815 # supports has POSIX threads in a separate library. This tends not
13816 # to be the way of modern systems, but it's conceivable.)
13817
13818 # (Note 2: On some systems, notably Darwin, -pthread is not needed
13819 # to get POSIX threads support; the API is always present and
13820 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
13821 # -pthread does define _REENTRANT, and while the Darwin headers
13822 # ignore this macro, third-party headers might not.)
13823
13824 PTHREAD_CFLAGS="-pthread"
13825 PTHREAD_LIBS=
13826
13827 ax_pthread_ok=yes
13828
13829 # However, older versions of Clang make a point of warning the user
13830 # that, in an invocation where only linking and no compilation is
13831 # taking place, the -pthread option has no effect ("argument unused
13832 # during compilation"). They expect -pthread to be passed in only
13833 # when source code is being compiled.
13834 #
13835 # Problem is, this is at odds with the way Automake and most other
13836 # C build frameworks function, which is that the same flags used in
13837 # compilation (CFLAGS) are also used in linking. Many systems
13838 # supported by AX_PTHREAD require exactly this for POSIX threads
13839 # support, and in fact it is often not straightforward to specify a
13840 # flag that is used only in the compilation phase and not in
13841 # linking. Such a scenario is extremely rare in practice.
13842 #
13843 # Even though use of the -pthread flag in linking would only print
13844 # a warning, this can be a nuisance for well-run software projects
13845 # that build with -Werror. So if the active version of Clang has
13846 # this misfeature, we search for an option to squash it.
13847
13848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
13849 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
13850 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
13851 $as_echo_n "(cached) " >&6
13852 else
13853 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
13854 # Create an alternate version of $ac_link that compiles and
13855 # links in two steps (.c -> .o, .o -> exe) instead of one
13856 # (.c -> exe), because the warning occurs only in the second
13857 # step
13858 ax_pthread_save_ac_link="$ac_link"
13859 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
13860 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
13861 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
13862 ax_pthread_save_CFLAGS="$CFLAGS"
13863 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
13864 if test "x$ax_pthread_try" = "xunknown"; then :
13865 break
13866 fi
13867 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
13868 ac_link="$ax_pthread_save_ac_link"
13869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13870 /* end confdefs.h. */
13871 int main(void){return 0;}
13872 _ACEOF
13873 if ac_fn_c_try_link "$LINENO"; then :
13874 ac_link="$ax_pthread_2step_ac_link"
13875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13876 /* end confdefs.h. */
13877 int main(void){return 0;}
13878 _ACEOF
13879 if ac_fn_c_try_link "$LINENO"; then :
13880 break
13881 fi
13882 rm -f core conftest.err conftest.$ac_objext \
13883 conftest$ac_exeext conftest.$ac_ext
13884
13885 fi
13886 rm -f core conftest.err conftest.$ac_objext \
13887 conftest$ac_exeext conftest.$ac_ext
13888 done
13889 ac_link="$ax_pthread_save_ac_link"
13890 CFLAGS="$ax_pthread_save_CFLAGS"
13891 if test "x$ax_pthread_try" = "x"; then :
13892 ax_pthread_try=no
13893 fi
13894 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
13895
13896 fi
13897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
13898 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
13899
13900 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
13901 no | unknown) ;;
13902 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
13903 esac
13904
13905 fi # $ax_pthread_clang = yes
13906
13907 if test "x$ax_pthread_ok" = "xno"; then
13908 for ax_pthread_try_flag in $ax_pthread_flags; do
13909
13910 case $ax_pthread_try_flag in
13911 none)
13912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
13913 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
13914 ;;
13915
13916 -mt,pthread)
13917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
13918 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
13919 PTHREAD_CFLAGS="-mt"
13920 PTHREAD_LIBS="-lpthread"
13921 ;;
13922
13923 -*)
13924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
13925 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
13926 PTHREAD_CFLAGS="$ax_pthread_try_flag"
13927 ;;
13928
13929 pthread-config)
13930 # Extract the first word of "pthread-config", so it can be a program name with args.
13931 set dummy pthread-config; ac_word=$2
13932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13933 $as_echo_n "checking for $ac_word... " >&6; }
13934 if ${ac_cv_prog_ax_pthread_config+:} false; then :
13935 $as_echo_n "(cached) " >&6
13936 else
13937 if test -n "$ax_pthread_config"; then
13938 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
13939 else
13940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13941 for as_dir in $PATH
13942 do
13943 IFS=$as_save_IFS
13944 test -z "$as_dir" && as_dir=.
13945 for ac_exec_ext in '' $ac_executable_extensions; do
13946 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13947 ac_cv_prog_ax_pthread_config="yes"
13948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13949 break 2
13950 fi
13951 done
13952 done
13953 IFS=$as_save_IFS
13954
13955 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
13956 fi
13957 fi
13958 ax_pthread_config=$ac_cv_prog_ax_pthread_config
13959 if test -n "$ax_pthread_config"; then
13960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
13961 $as_echo "$ax_pthread_config" >&6; }
13962 else
13963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13964 $as_echo "no" >&6; }
13965 fi
13966
13967
13968 if test "x$ax_pthread_config" = "xno"; then :
13969 continue
13970 fi
13971 PTHREAD_CFLAGS="`pthread-config --cflags`"
13972 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
13973 ;;
13974
13975 *)
13976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
13977 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
13978 PTHREAD_LIBS="-l$ax_pthread_try_flag"
13979 ;;
13980 esac
13981
13982 ax_pthread_save_CFLAGS="$CFLAGS"
13983 ax_pthread_save_LIBS="$LIBS"
13984 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13985 LIBS="$PTHREAD_LIBS $LIBS"
13986
13987 # Check for various functions. We must include pthread.h,
13988 # since some functions may be macros. (On the Sequent, we
13989 # need a special flag -Kthread to make this header compile.)
13990 # We check for pthread_join because it is in -lpthread on IRIX
13991 # while pthread_create is in libc. We check for pthread_attr_init
13992 # due to DEC craziness with -lpthreads. We check for
13993 # pthread_cleanup_push because it is one of the few pthread
13994 # functions on Solaris that doesn't have a non-functional libc stub.
13995 # We try pthread_create on general principles.
13996
13997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13998 /* end confdefs.h. */
13999 #include <pthread.h>
14000 # if $ax_pthread_check_cond
14001 # error "$ax_pthread_check_macro must be defined"
14002 # endif
14003 static void routine(void *a) { a = 0; }
14004 static void *start_routine(void *a) { return a; }
14005 int
14006 main ()
14007 {
14008 pthread_t th; pthread_attr_t attr;
14009 pthread_create(&th, 0, start_routine, 0);
14010 pthread_join(th, 0);
14011 pthread_attr_init(&attr);
14012 pthread_cleanup_push(routine, 0);
14013 pthread_cleanup_pop(0) /* ; */
14014 ;
14015 return 0;
14016 }
14017 _ACEOF
14018 if ac_fn_c_try_link "$LINENO"; then :
14019 ax_pthread_ok=yes
14020 fi
14021 rm -f core conftest.err conftest.$ac_objext \
14022 conftest$ac_exeext conftest.$ac_ext
14023
14024 CFLAGS="$ax_pthread_save_CFLAGS"
14025 LIBS="$ax_pthread_save_LIBS"
14026
14027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14028 $as_echo "$ax_pthread_ok" >&6; }
14029 if test "x$ax_pthread_ok" = "xyes"; then :
14030 break
14031 fi
14032
14033 PTHREAD_LIBS=""
14034 PTHREAD_CFLAGS=""
14035 done
14036 fi
14037
14038 # Various other checks:
14039 if test "x$ax_pthread_ok" = "xyes"; then
14040 ax_pthread_save_CFLAGS="$CFLAGS"
14041 ax_pthread_save_LIBS="$LIBS"
14042 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14043 LIBS="$PTHREAD_LIBS $LIBS"
14044
14045 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
14046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
14047 $as_echo_n "checking for joinable pthread attribute... " >&6; }
14048 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
14049 $as_echo_n "(cached) " >&6
14050 else
14051 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
14052 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
14053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14054 /* end confdefs.h. */
14055 #include <pthread.h>
14056 int
14057 main ()
14058 {
14059 int attr = $ax_pthread_attr; return attr /* ; */
14060 ;
14061 return 0;
14062 }
14063 _ACEOF
14064 if ac_fn_c_try_link "$LINENO"; then :
14065 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
14066 fi
14067 rm -f core conftest.err conftest.$ac_objext \
14068 conftest$ac_exeext conftest.$ac_ext
14069 done
14070
14071 fi
14072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
14073 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
14074 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
14075 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
14076 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
14077
14078 cat >>confdefs.h <<_ACEOF
14079 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
14080 _ACEOF
14081
14082 ax_pthread_joinable_attr_defined=yes
14083
14084 fi
14085
14086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
14087 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
14088 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
14089 $as_echo_n "(cached) " >&6
14090 else
14091 ax_cv_PTHREAD_SPECIAL_FLAGS=no
14092 case $host_os in
14093 solaris*)
14094 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
14095 ;;
14096 esac
14097
14098 fi
14099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
14100 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
14101 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
14102 test "x$ax_pthread_special_flags_added" != "xyes"; then :
14103 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
14104 ax_pthread_special_flags_added=yes
14105 fi
14106
14107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
14108 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
14109 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
14110 $as_echo_n "(cached) " >&6
14111 else
14112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14113 /* end confdefs.h. */
14114 #include <pthread.h>
14115 int
14116 main ()
14117 {
14118 int i = PTHREAD_PRIO_INHERIT;
14119 ;
14120 return 0;
14121 }
14122 _ACEOF
14123 if ac_fn_c_try_link "$LINENO"; then :
14124 ax_cv_PTHREAD_PRIO_INHERIT=yes
14125 else
14126 ax_cv_PTHREAD_PRIO_INHERIT=no
14127 fi
14128 rm -f core conftest.err conftest.$ac_objext \
14129 conftest$ac_exeext conftest.$ac_ext
14130
14131 fi
14132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
14133 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
14134 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
14135 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
14136
14137 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
14138
14139 ax_pthread_prio_inherit_defined=yes
14140
14141 fi
14142
14143 CFLAGS="$ax_pthread_save_CFLAGS"
14144 LIBS="$ax_pthread_save_LIBS"
14145
14146 # More AIX lossage: compile with *_r variant
14147 if test "x$GCC" != "xyes"; then
14148 case $host_os in
14149 aix*)
14150 case "x/$CC" in #(
14151 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
14152 #handle absolute path differently from PATH based program lookup
14153 case "x$CC" in #(
14154 x/*) :
14155 if as_fn_executable_p ${CC}_r; then :
14156 PTHREAD_CC="${CC}_r"
14157 fi ;; #(
14158 *) :
14159 for ac_prog in ${CC}_r
14160 do
14161 # Extract the first word of "$ac_prog", so it can be a program name with args.
14162 set dummy $ac_prog; ac_word=$2
14163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14164 $as_echo_n "checking for $ac_word... " >&6; }
14165 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
14166 $as_echo_n "(cached) " >&6
14167 else
14168 if test -n "$PTHREAD_CC"; then
14169 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
14170 else
14171 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14172 for as_dir in $PATH
14173 do
14174 IFS=$as_save_IFS
14175 test -z "$as_dir" && as_dir=.
14176 for ac_exec_ext in '' $ac_executable_extensions; do
14177 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14178 ac_cv_prog_PTHREAD_CC="$ac_prog"
14179 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14180 break 2
14181 fi
14182 done
14183 done
14184 IFS=$as_save_IFS
14185
14186 fi
14187 fi
14188 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
14189 if test -n "$PTHREAD_CC"; then
14190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
14191 $as_echo "$PTHREAD_CC" >&6; }
14192 else
14193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14194 $as_echo "no" >&6; }
14195 fi
14196
14197
14198 test -n "$PTHREAD_CC" && break
14199 done
14200 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14201 ;;
14202 esac ;; #(
14203 *) :
14204 ;;
14205 esac
14206 ;;
14207 esac
14208 fi
14209 fi
14210
14211 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14212
14213
14214
14215
14216
14217 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14218 if test "x$ax_pthread_ok" = "xyes"; then
14219 threads=yes
14220 :
14221 else
14222 ax_pthread_ok=no
14223 threads=no
14224 fi
14225 ac_ext=cpp
14226 ac_cpp='$CXXCPP $CPPFLAGS'
14227 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14228 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14229 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14230
14231
14232 if test "$threads" = "yes"; then
14233 save_LIBS="$LIBS"
14234 LIBS="$PTHREAD_LIBS $LIBS"
14235 save_CXXFLAGS="$CXXFLAGS"
14236 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14238 $as_echo_n "checking for std::thread... " >&6; }
14239 if ${gdb_cv_cxx_std_thread+:} false; then :
14240 $as_echo_n "(cached) " >&6
14241 else
14242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14243 /* end confdefs.h. */
14244 #include <thread>
14245 void callback() { }
14246 int
14247 main ()
14248 {
14249 std::thread t(callback);
14250 ;
14251 return 0;
14252 }
14253 _ACEOF
14254 if ac_fn_cxx_try_compile "$LINENO"; then :
14255 gdb_cv_cxx_std_thread=yes
14256 else
14257 gdb_cv_cxx_std_thread=no
14258 fi
14259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14260 fi
14261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14262 $as_echo "$gdb_cv_cxx_std_thread" >&6; }
14263
14264 # This check must be here, while LIBS includes any necessary
14265 # threading library.
14266 for ac_func in pthread_sigmask pthread_setname_np
14267 do :
14268 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14269 ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14270 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14271 cat >>confdefs.h <<_ACEOF
14272 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14273 _ACEOF
14274
14275 fi
14276 done
14277
14278
14279 LIBS="$save_LIBS"
14280 CXXFLAGS="$save_CXXFLAGS"
14281 fi
14282 if test "$gdb_cv_cxx_std_thread" = "yes"; then
14283
14284 $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
14285
14286 fi
14287 ac_ext=c
14288 ac_cpp='$CPP $CPPFLAGS'
14289 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14290 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14291 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14292
14293
14294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14295 $as_echo_n "checking for sigsetjmp... " >&6; }
14296 if ${gdb_cv_func_sigsetjmp+:} false; then :
14297 $as_echo_n "(cached) " >&6
14298 else
14299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14300 /* end confdefs.h. */
14301
14302 #include <setjmp.h>
14303
14304 int
14305 main ()
14306 {
14307 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
14308 ;
14309 return 0;
14310 }
14311 _ACEOF
14312 if ac_fn_c_try_compile "$LINENO"; then :
14313 gdb_cv_func_sigsetjmp=yes
14314 else
14315 gdb_cv_func_sigsetjmp=no
14316 fi
14317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14318 fi
14319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14320 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
14321 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
14322
14323 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
14324
14325 fi
14326
14327
14328 # Check whether --with-intel_pt was given.
14329 if test "${with_intel_pt+set}" = set; then :
14330 withval=$with_intel_pt;
14331 else
14332 with_intel_pt=auto
14333 fi
14334
14335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
14336 $as_echo_n "checking whether to use intel pt... " >&6; }
14337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
14338 $as_echo "$with_intel_pt" >&6; }
14339
14340 if test "${with_intel_pt}" = no; then
14341 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
14342 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
14343 HAVE_LIBIPT=no
14344 else
14345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14346 /* end confdefs.h. */
14347
14348 #include <linux/perf_event.h>
14349 #ifndef PERF_ATTR_SIZE_VER5
14350 # error
14351 #endif
14352
14353 _ACEOF
14354 if ac_fn_c_try_cpp "$LINENO"; then :
14355 perf_event=yes
14356 else
14357 perf_event=no
14358 fi
14359 rm -f conftest.err conftest.i conftest.$ac_ext
14360 if test "$perf_event" != yes; then
14361 if test "$with_intel_pt" = yes; then
14362 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14363 else
14364 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14365 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14366 fi
14367 fi
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377 use_additional=yes
14378
14379 acl_save_prefix="$prefix"
14380 prefix="$acl_final_prefix"
14381 acl_save_exec_prefix="$exec_prefix"
14382 exec_prefix="$acl_final_exec_prefix"
14383
14384 eval additional_includedir=\"$includedir\"
14385 eval additional_libdir=\"$libdir\"
14386
14387 exec_prefix="$acl_save_exec_prefix"
14388 prefix="$acl_save_prefix"
14389
14390
14391 # Check whether --with-libipt-prefix was given.
14392 if test "${with_libipt_prefix+set}" = set; then :
14393 withval=$with_libipt_prefix;
14394 if test "X$withval" = "Xno"; then
14395 use_additional=no
14396 else
14397 if test "X$withval" = "X"; then
14398
14399 acl_save_prefix="$prefix"
14400 prefix="$acl_final_prefix"
14401 acl_save_exec_prefix="$exec_prefix"
14402 exec_prefix="$acl_final_exec_prefix"
14403
14404 eval additional_includedir=\"$includedir\"
14405 eval additional_libdir=\"$libdir\"
14406
14407 exec_prefix="$acl_save_exec_prefix"
14408 prefix="$acl_save_prefix"
14409
14410 else
14411 additional_includedir="$withval/include"
14412 additional_libdir="$withval/lib"
14413 fi
14414 fi
14415
14416 fi
14417
14418
14419 # Check whether --with-libipt-type was given.
14420 if test "${with_libipt_type+set}" = set; then :
14421 withval=$with_libipt_type; with_libipt_type=$withval
14422 else
14423 with_libipt_type=auto
14424 fi
14425
14426 lib_type=`eval echo \$with_libipt_type`
14427
14428 LIBIPT=
14429 LTLIBIPT=
14430 INCIPT=
14431 rpathdirs=
14432 ltrpathdirs=
14433 names_already_handled=
14434 names_next_round='ipt '
14435 while test -n "$names_next_round"; do
14436 names_this_round="$names_next_round"
14437 names_next_round=
14438 for name in $names_this_round; do
14439 already_handled=
14440 for n in $names_already_handled; do
14441 if test "$n" = "$name"; then
14442 already_handled=yes
14443 break
14444 fi
14445 done
14446 if test -z "$already_handled"; then
14447 names_already_handled="$names_already_handled $name"
14448 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14449 eval value=\"\$HAVE_LIB$uppername\"
14450 if test -n "$value"; then
14451 if test "$value" = yes; then
14452 eval value=\"\$LIB$uppername\"
14453 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14454 eval value=\"\$LTLIB$uppername\"
14455 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14456 else
14457 :
14458 fi
14459 else
14460 found_dir=
14461 found_la=
14462 found_so=
14463 found_a=
14464 if test $use_additional = yes; then
14465 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14466 found_dir="$additional_libdir"
14467 found_so="$additional_libdir/lib$name.$shlibext"
14468 if test -f "$additional_libdir/lib$name.la"; then
14469 found_la="$additional_libdir/lib$name.la"
14470 fi
14471 elif test x$lib_type != xshared; then
14472 if test -f "$additional_libdir/lib$name.$libext"; then
14473 found_dir="$additional_libdir"
14474 found_a="$additional_libdir/lib$name.$libext"
14475 if test -f "$additional_libdir/lib$name.la"; then
14476 found_la="$additional_libdir/lib$name.la"
14477 fi
14478 fi
14479 fi
14480 fi
14481 if test "X$found_dir" = "X"; then
14482 for x in $LDFLAGS $LTLIBIPT; do
14483
14484 acl_save_prefix="$prefix"
14485 prefix="$acl_final_prefix"
14486 acl_save_exec_prefix="$exec_prefix"
14487 exec_prefix="$acl_final_exec_prefix"
14488 eval x=\"$x\"
14489 exec_prefix="$acl_save_exec_prefix"
14490 prefix="$acl_save_prefix"
14491
14492 case "$x" in
14493 -L*)
14494 dir=`echo "X$x" | sed -e 's/^X-L//'`
14495 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14496 found_dir="$dir"
14497 found_so="$dir/lib$name.$shlibext"
14498 if test -f "$dir/lib$name.la"; then
14499 found_la="$dir/lib$name.la"
14500 fi
14501 elif test x$lib_type != xshared; then
14502 if test -f "$dir/lib$name.$libext"; then
14503 found_dir="$dir"
14504 found_a="$dir/lib$name.$libext"
14505 if test -f "$dir/lib$name.la"; then
14506 found_la="$dir/lib$name.la"
14507 fi
14508 fi
14509 fi
14510 ;;
14511 esac
14512 if test "X$found_dir" != "X"; then
14513 break
14514 fi
14515 done
14516 fi
14517 if test "X$found_dir" != "X"; then
14518 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14519 if test "X$found_so" != "X"; then
14520 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14521 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14522 else
14523 haveit=
14524 for x in $ltrpathdirs; do
14525 if test "X$x" = "X$found_dir"; then
14526 haveit=yes
14527 break
14528 fi
14529 done
14530 if test -z "$haveit"; then
14531 ltrpathdirs="$ltrpathdirs $found_dir"
14532 fi
14533 if test "$hardcode_direct" = yes; then
14534 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14535 else
14536 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14537 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14538 haveit=
14539 for x in $rpathdirs; do
14540 if test "X$x" = "X$found_dir"; then
14541 haveit=yes
14542 break
14543 fi
14544 done
14545 if test -z "$haveit"; then
14546 rpathdirs="$rpathdirs $found_dir"
14547 fi
14548 else
14549 haveit=
14550 for x in $LDFLAGS $LIBIPT; do
14551
14552 acl_save_prefix="$prefix"
14553 prefix="$acl_final_prefix"
14554 acl_save_exec_prefix="$exec_prefix"
14555 exec_prefix="$acl_final_exec_prefix"
14556 eval x=\"$x\"
14557 exec_prefix="$acl_save_exec_prefix"
14558 prefix="$acl_save_prefix"
14559
14560 if test "X$x" = "X-L$found_dir"; then
14561 haveit=yes
14562 break
14563 fi
14564 done
14565 if test -z "$haveit"; then
14566 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14567 fi
14568 if test "$hardcode_minus_L" != no; then
14569 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14570 else
14571 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14572 fi
14573 fi
14574 fi
14575 fi
14576 else
14577 if test "X$found_a" != "X"; then
14578 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
14579 else
14580 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
14581 fi
14582 fi
14583 additional_includedir=
14584 case "$found_dir" in
14585 */lib | */lib/)
14586 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14587 additional_includedir="$basedir/include"
14588 ;;
14589 esac
14590 if test "X$additional_includedir" != "X"; then
14591 if test "X$additional_includedir" != "X/usr/include"; then
14592 haveit=
14593 if test "X$additional_includedir" = "X/usr/local/include"; then
14594 if test -n "$GCC"; then
14595 case $host_os in
14596 linux*) haveit=yes;;
14597 esac
14598 fi
14599 fi
14600 if test -z "$haveit"; then
14601 for x in $CPPFLAGS $INCIPT; do
14602
14603 acl_save_prefix="$prefix"
14604 prefix="$acl_final_prefix"
14605 acl_save_exec_prefix="$exec_prefix"
14606 exec_prefix="$acl_final_exec_prefix"
14607 eval x=\"$x\"
14608 exec_prefix="$acl_save_exec_prefix"
14609 prefix="$acl_save_prefix"
14610
14611 if test "X$x" = "X-I$additional_includedir"; then
14612 haveit=yes
14613 break
14614 fi
14615 done
14616 if test -z "$haveit"; then
14617 if test -d "$additional_includedir"; then
14618 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
14619 fi
14620 fi
14621 fi
14622 fi
14623 fi
14624 if test -n "$found_la"; then
14625 save_libdir="$libdir"
14626 case "$found_la" in
14627 */* | *\\*) . "$found_la" ;;
14628 *) . "./$found_la" ;;
14629 esac
14630 libdir="$save_libdir"
14631 for dep in $dependency_libs; do
14632 case "$dep" in
14633 -L*)
14634 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14635 if test "X$additional_libdir" != "X/usr/lib"; then
14636 haveit=
14637 if test "X$additional_libdir" = "X/usr/local/lib"; then
14638 if test -n "$GCC"; then
14639 case $host_os in
14640 linux*) haveit=yes;;
14641 esac
14642 fi
14643 fi
14644 if test -z "$haveit"; then
14645 haveit=
14646 for x in $LDFLAGS $LIBIPT; do
14647
14648 acl_save_prefix="$prefix"
14649 prefix="$acl_final_prefix"
14650 acl_save_exec_prefix="$exec_prefix"
14651 exec_prefix="$acl_final_exec_prefix"
14652 eval x=\"$x\"
14653 exec_prefix="$acl_save_exec_prefix"
14654 prefix="$acl_save_prefix"
14655
14656 if test "X$x" = "X-L$additional_libdir"; then
14657 haveit=yes
14658 break
14659 fi
14660 done
14661 if test -z "$haveit"; then
14662 if test -d "$additional_libdir"; then
14663 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
14664 fi
14665 fi
14666 haveit=
14667 for x in $LDFLAGS $LTLIBIPT; do
14668
14669 acl_save_prefix="$prefix"
14670 prefix="$acl_final_prefix"
14671 acl_save_exec_prefix="$exec_prefix"
14672 exec_prefix="$acl_final_exec_prefix"
14673 eval x=\"$x\"
14674 exec_prefix="$acl_save_exec_prefix"
14675 prefix="$acl_save_prefix"
14676
14677 if test "X$x" = "X-L$additional_libdir"; then
14678 haveit=yes
14679 break
14680 fi
14681 done
14682 if test -z "$haveit"; then
14683 if test -d "$additional_libdir"; then
14684 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
14685 fi
14686 fi
14687 fi
14688 fi
14689 ;;
14690 -R*)
14691 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14692 if test "$enable_rpath" != no; then
14693 haveit=
14694 for x in $rpathdirs; do
14695 if test "X$x" = "X$dir"; then
14696 haveit=yes
14697 break
14698 fi
14699 done
14700 if test -z "$haveit"; then
14701 rpathdirs="$rpathdirs $dir"
14702 fi
14703 haveit=
14704 for x in $ltrpathdirs; do
14705 if test "X$x" = "X$dir"; then
14706 haveit=yes
14707 break
14708 fi
14709 done
14710 if test -z "$haveit"; then
14711 ltrpathdirs="$ltrpathdirs $dir"
14712 fi
14713 fi
14714 ;;
14715 -l*)
14716 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14717 ;;
14718 *.la)
14719 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14720 ;;
14721 *)
14722 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
14723 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
14724 ;;
14725 esac
14726 done
14727 fi
14728 else
14729 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
14730 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14731 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
14732 else
14733 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
14734 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
14735 fi
14736 fi
14737 fi
14738 fi
14739 done
14740 done
14741 if test "X$rpathdirs" != "X"; then
14742 if test -n "$hardcode_libdir_separator"; then
14743 alldirs=
14744 for found_dir in $rpathdirs; do
14745 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14746 done
14747 acl_save_libdir="$libdir"
14748 libdir="$alldirs"
14749 eval flag=\"$hardcode_libdir_flag_spec\"
14750 libdir="$acl_save_libdir"
14751 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14752 else
14753 for found_dir in $rpathdirs; do
14754 acl_save_libdir="$libdir"
14755 libdir="$found_dir"
14756 eval flag=\"$hardcode_libdir_flag_spec\"
14757 libdir="$acl_save_libdir"
14758 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14759 done
14760 fi
14761 fi
14762 if test "X$ltrpathdirs" != "X"; then
14763 for found_dir in $ltrpathdirs; do
14764 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
14765 done
14766 fi
14767
14768
14769 ac_save_CPPFLAGS="$CPPFLAGS"
14770
14771 for element in $INCIPT; do
14772 haveit=
14773 for x in $CPPFLAGS; do
14774
14775 acl_save_prefix="$prefix"
14776 prefix="$acl_final_prefix"
14777 acl_save_exec_prefix="$exec_prefix"
14778 exec_prefix="$acl_final_exec_prefix"
14779 eval x=\"$x\"
14780 exec_prefix="$acl_save_exec_prefix"
14781 prefix="$acl_save_prefix"
14782
14783 if test "X$x" = "X$element"; then
14784 haveit=yes
14785 break
14786 fi
14787 done
14788 if test -z "$haveit"; then
14789 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14790 fi
14791 done
14792
14793
14794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
14795 $as_echo_n "checking for libipt... " >&6; }
14796 if ${ac_cv_libipt+:} false; then :
14797 $as_echo_n "(cached) " >&6
14798 else
14799
14800 ac_save_LIBS="$LIBS"
14801 LIBS="$LIBS $LIBIPT"
14802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14803 /* end confdefs.h. */
14804 #include "intel-pt.h"
14805 int
14806 main ()
14807 {
14808 pt_insn_alloc_decoder (0);
14809 ;
14810 return 0;
14811 }
14812 _ACEOF
14813 if ac_fn_c_try_link "$LINENO"; then :
14814 ac_cv_libipt=yes
14815 else
14816 ac_cv_libipt=no
14817 fi
14818 rm -f core conftest.err conftest.$ac_objext \
14819 conftest$ac_exeext conftest.$ac_ext
14820 LIBS="$ac_save_LIBS"
14821
14822 fi
14823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
14824 $as_echo "$ac_cv_libipt" >&6; }
14825 if test "$ac_cv_libipt" = yes; then
14826 HAVE_LIBIPT=yes
14827
14828 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
14829
14830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
14831 $as_echo_n "checking how to link with libipt... " >&6; }
14832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
14833 $as_echo "$LIBIPT" >&6; }
14834 else
14835 HAVE_LIBIPT=no
14836 CPPFLAGS="$ac_save_CPPFLAGS"
14837 LIBIPT=
14838 LTLIBIPT=
14839 fi
14840
14841
14842
14843
14844
14845
14846 if test "$HAVE_LIBIPT" != yes; then
14847 if test "$with_intel_pt" = yes; then
14848 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
14849 else
14850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
14851 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
14852 fi
14853 else
14854 save_LIBS=$LIBS
14855 LIBS="$LIBS $LIBIPT"
14856 for ac_func in pt_insn_event
14857 do :
14858 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
14859 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
14860 cat >>confdefs.h <<_ACEOF
14861 #define HAVE_PT_INSN_EVENT 1
14862 _ACEOF
14863
14864 fi
14865 done
14866
14867 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
14868 "
14869 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
14870
14871 cat >>confdefs.h <<_ACEOF
14872 #define HAVE_STRUCT_PT_INSN_ENABLED 1
14873 _ACEOF
14874
14875
14876 fi
14877 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
14878 "
14879 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
14880
14881 cat >>confdefs.h <<_ACEOF
14882 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
14883 _ACEOF
14884
14885
14886 fi
14887
14888 LIBS=$save_LIBS
14889 fi
14890 fi
14891
14892 if test "$ac_cv_header_sys_procfs_h" = yes; then
14893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14894 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14895 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
14896 $as_echo_n "(cached) " >&6
14897 else
14898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14899 /* end confdefs.h. */
14900
14901 #define _SYSCALL32
14902 /* Needed for new procfs interface on sparc-solaris. */
14903 #define _STRUCTURED_PROC 1
14904 #include <sys/procfs.h>
14905 int
14906 main ()
14907 {
14908 gregset_t avar
14909 ;
14910 return 0;
14911 }
14912 _ACEOF
14913 if ac_fn_c_try_compile "$LINENO"; then :
14914 bfd_cv_have_sys_procfs_type_gregset_t=yes
14915 else
14916 bfd_cv_have_sys_procfs_type_gregset_t=no
14917
14918 fi
14919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14920 fi
14921
14922 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
14923
14924 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
14925
14926 fi
14927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14928 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14929
14930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14931 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14932 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
14933 $as_echo_n "(cached) " >&6
14934 else
14935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14936 /* end confdefs.h. */
14937
14938 #define _SYSCALL32
14939 /* Needed for new procfs interface on sparc-solaris. */
14940 #define _STRUCTURED_PROC 1
14941 #include <sys/procfs.h>
14942 int
14943 main ()
14944 {
14945 fpregset_t avar
14946 ;
14947 return 0;
14948 }
14949 _ACEOF
14950 if ac_fn_c_try_compile "$LINENO"; then :
14951 bfd_cv_have_sys_procfs_type_fpregset_t=yes
14952 else
14953 bfd_cv_have_sys_procfs_type_fpregset_t=no
14954
14955 fi
14956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14957 fi
14958
14959 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14960
14961 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14962
14963 fi
14964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14965 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14966
14967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14968 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14969 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14970 $as_echo_n "(cached) " >&6
14971 else
14972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14973 /* end confdefs.h. */
14974
14975 #define _SYSCALL32
14976 /* Needed for new procfs interface on sparc-solaris. */
14977 #define _STRUCTURED_PROC 1
14978 #include <sys/procfs.h>
14979 int
14980 main ()
14981 {
14982 prgregset_t avar
14983 ;
14984 return 0;
14985 }
14986 _ACEOF
14987 if ac_fn_c_try_compile "$LINENO"; then :
14988 bfd_cv_have_sys_procfs_type_prgregset_t=yes
14989 else
14990 bfd_cv_have_sys_procfs_type_prgregset_t=no
14991
14992 fi
14993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14994 fi
14995
14996 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
14997
14998 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14999
15000 fi
15001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
15002 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
15003
15004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
15005 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
15006 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
15007 $as_echo_n "(cached) " >&6
15008 else
15009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15010 /* end confdefs.h. */
15011
15012 #define _SYSCALL32
15013 /* Needed for new procfs interface on sparc-solaris. */
15014 #define _STRUCTURED_PROC 1
15015 #include <sys/procfs.h>
15016 int
15017 main ()
15018 {
15019 prfpregset_t avar
15020 ;
15021 return 0;
15022 }
15023 _ACEOF
15024 if ac_fn_c_try_compile "$LINENO"; then :
15025 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
15026 else
15027 bfd_cv_have_sys_procfs_type_prfpregset_t=no
15028
15029 fi
15030 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15031 fi
15032
15033 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
15034
15035 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
15036
15037 fi
15038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
15039 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
15040
15041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
15042 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
15043 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
15044 $as_echo_n "(cached) " >&6
15045 else
15046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15047 /* end confdefs.h. */
15048
15049 #define _SYSCALL32
15050 /* Needed for new procfs interface on sparc-solaris. */
15051 #define _STRUCTURED_PROC 1
15052 #include <sys/procfs.h>
15053 int
15054 main ()
15055 {
15056 prgregset32_t avar
15057 ;
15058 return 0;
15059 }
15060 _ACEOF
15061 if ac_fn_c_try_compile "$LINENO"; then :
15062 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
15063 else
15064 bfd_cv_have_sys_procfs_type_prgregset32_t=no
15065
15066 fi
15067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15068 fi
15069
15070 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
15071
15072 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
15073
15074 fi
15075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
15076 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
15077
15078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
15079 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
15080 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
15081 $as_echo_n "(cached) " >&6
15082 else
15083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15084 /* end confdefs.h. */
15085
15086 #define _SYSCALL32
15087 /* Needed for new procfs interface on sparc-solaris. */
15088 #define _STRUCTURED_PROC 1
15089 #include <sys/procfs.h>
15090 int
15091 main ()
15092 {
15093 lwpid_t avar
15094 ;
15095 return 0;
15096 }
15097 _ACEOF
15098 if ac_fn_c_try_compile "$LINENO"; then :
15099 bfd_cv_have_sys_procfs_type_lwpid_t=yes
15100 else
15101 bfd_cv_have_sys_procfs_type_lwpid_t=no
15102
15103 fi
15104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15105 fi
15106
15107 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
15108
15109 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
15110
15111 fi
15112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
15113 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
15114
15115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
15116 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
15117 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
15118 $as_echo_n "(cached) " >&6
15119 else
15120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15121 /* end confdefs.h. */
15122
15123 #define _SYSCALL32
15124 /* Needed for new procfs interface on sparc-solaris. */
15125 #define _STRUCTURED_PROC 1
15126 #include <sys/procfs.h>
15127 int
15128 main ()
15129 {
15130 psaddr_t avar
15131 ;
15132 return 0;
15133 }
15134 _ACEOF
15135 if ac_fn_c_try_compile "$LINENO"; then :
15136 bfd_cv_have_sys_procfs_type_psaddr_t=yes
15137 else
15138 bfd_cv_have_sys_procfs_type_psaddr_t=no
15139
15140 fi
15141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15142 fi
15143
15144 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
15145
15146 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
15147
15148 fi
15149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
15150 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
15151
15152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
15153 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
15154 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
15155 $as_echo_n "(cached) " >&6
15156 else
15157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15158 /* end confdefs.h. */
15159
15160 #define _SYSCALL32
15161 /* Needed for new procfs interface on sparc-solaris. */
15162 #define _STRUCTURED_PROC 1
15163 #include <sys/procfs.h>
15164 int
15165 main ()
15166 {
15167 elf_fpregset_t avar
15168 ;
15169 return 0;
15170 }
15171 _ACEOF
15172 if ac_fn_c_try_compile "$LINENO"; then :
15173 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
15174 else
15175 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
15176
15177 fi
15178 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15179 fi
15180
15181 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
15182
15183 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
15184
15185 fi
15186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
15187 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
15188
15189 fi
15190
15191
15192 # Check the return and argument types of ptrace.
15193
15194
15195 for ac_header in sys/ptrace.h ptrace.h
15196 do :
15197 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15198 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15199 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15200 cat >>confdefs.h <<_ACEOF
15201 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15202 _ACEOF
15203
15204 fi
15205
15206 done
15207
15208
15209 gdb_ptrace_headers='
15210 #include <sys/types.h>
15211 #if HAVE_SYS_PTRACE_H
15212 # include <sys/ptrace.h>
15213 #endif
15214 #if HAVE_UNISTD_H
15215 # include <unistd.h>
15216 #endif
15217 '
15218
15219 # Check return type. Varargs (used on GNU/Linux) conflict with the
15220 # empty argument list, so check for that explicitly.
15221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
15222 $as_echo_n "checking return type of ptrace... " >&6; }
15223 if ${gdb_cv_func_ptrace_ret+:} false; then :
15224 $as_echo_n "(cached) " >&6
15225 else
15226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15227 /* end confdefs.h. */
15228 $gdb_ptrace_headers
15229 int
15230 main ()
15231 {
15232 extern long ptrace (enum __ptrace_request, ...);
15233 ;
15234 return 0;
15235 }
15236 _ACEOF
15237 if ac_fn_c_try_compile "$LINENO"; then :
15238 gdb_cv_func_ptrace_ret='long'
15239 else
15240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15241 /* end confdefs.h. */
15242 $gdb_ptrace_headers
15243 int
15244 main ()
15245 {
15246 extern int ptrace ();
15247 ;
15248 return 0;
15249 }
15250 _ACEOF
15251 if ac_fn_c_try_compile "$LINENO"; then :
15252 gdb_cv_func_ptrace_ret='int'
15253 else
15254 gdb_cv_func_ptrace_ret='long'
15255 fi
15256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15257 fi
15258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15259 fi
15260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
15261 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
15262
15263 cat >>confdefs.h <<_ACEOF
15264 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
15265 _ACEOF
15266
15267 # Check argument types.
15268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
15269 $as_echo_n "checking types of arguments for ptrace... " >&6; }
15270 if ${gdb_cv_func_ptrace_args+:} false; then :
15271 $as_echo_n "(cached) " >&6
15272 else
15273
15274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15275 /* end confdefs.h. */
15276 $gdb_ptrace_headers
15277 int
15278 main ()
15279 {
15280 extern long ptrace (enum __ptrace_request, ...);
15281 ;
15282 return 0;
15283 }
15284 _ACEOF
15285 if ac_fn_c_try_compile "$LINENO"; then :
15286 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
15287 else
15288
15289 for gdb_arg1 in 'int' 'long'; do
15290 for gdb_arg2 in 'pid_t' 'int' 'long'; do
15291 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
15292 for gdb_arg4 in 'int' 'long' 'void *'; do
15293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15294 /* end confdefs.h. */
15295 $gdb_ptrace_headers
15296 int
15297 main ()
15298 {
15299
15300 extern $gdb_cv_func_ptrace_ret
15301 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
15302
15303 ;
15304 return 0;
15305 }
15306 _ACEOF
15307 if ac_fn_c_try_compile "$LINENO"; then :
15308 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
15309 break 4;
15310 fi
15311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15312 for gdb_arg5 in 'int *' 'int' 'long'; do
15313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15314 /* end confdefs.h. */
15315 $gdb_ptrace_headers
15316 int
15317 main ()
15318 {
15319
15320 extern $gdb_cv_func_ptrace_ret
15321 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
15322
15323 ;
15324 return 0;
15325 }
15326 _ACEOF
15327 if ac_fn_c_try_compile "$LINENO"; then :
15328
15329 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15330 break 5;
15331 fi
15332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15333 done
15334 done
15335 done
15336 done
15337 done
15338 # Provide a safe default value.
15339 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
15340
15341 fi
15342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15343 fi
15344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
15345 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
15346 ac_save_IFS=$IFS; IFS=','
15347 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15348 IFS=$ac_save_IFS
15349 shift
15350
15351 cat >>confdefs.h <<_ACEOF
15352 #define PTRACE_TYPE_ARG1 $1
15353 _ACEOF
15354
15355
15356 cat >>confdefs.h <<_ACEOF
15357 #define PTRACE_TYPE_ARG3 $3
15358 _ACEOF
15359
15360
15361 cat >>confdefs.h <<_ACEOF
15362 #define PTRACE_TYPE_ARG4 $4
15363 _ACEOF
15364
15365 if test -n "$5"; then
15366
15367 cat >>confdefs.h <<_ACEOF
15368 #define PTRACE_TYPE_ARG5 $5
15369 _ACEOF
15370
15371 fi
15372
15373
15374 if test "$cross_compiling" = no; then
15375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15376 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15377 if ${ac_cv_func_setpgrp_void+:} false; then :
15378 $as_echo_n "(cached) " >&6
15379 else
15380 if test "$cross_compiling" = yes; then :
15381 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
15382 else
15383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15384 /* end confdefs.h. */
15385 $ac_includes_default
15386 int
15387 main ()
15388 {
15389 /* If this system has a BSD-style setpgrp which takes arguments,
15390 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15391 exit successfully. */
15392 return setpgrp (1,1) != -1;
15393 ;
15394 return 0;
15395 }
15396 _ACEOF
15397 if ac_fn_c_try_run "$LINENO"; then :
15398 ac_cv_func_setpgrp_void=no
15399 else
15400 ac_cv_func_setpgrp_void=yes
15401 fi
15402 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15403 conftest.$ac_objext conftest.beam conftest.$ac_ext
15404 fi
15405
15406 fi
15407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15408 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15409 if test $ac_cv_func_setpgrp_void = yes; then
15410
15411 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15412
15413 fi
15414
15415 else
15416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15417 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15418 if ${ac_cv_func_setpgrp_void+:} false; then :
15419 $as_echo_n "(cached) " >&6
15420 else
15421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15422 /* end confdefs.h. */
15423
15424 #include <unistd.h>
15425
15426 int
15427 main ()
15428 {
15429
15430 if (setpgrp(1,1) == -1)
15431 exit (0);
15432 else
15433 exit (1);
15434
15435 ;
15436 return 0;
15437 }
15438 _ACEOF
15439 if ac_fn_c_try_compile "$LINENO"; then :
15440 ac_cv_func_setpgrp_void=no
15441 else
15442 ac_cv_func_setpgrp_void=yes
15443 fi
15444 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15445 fi
15446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15447 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15448 if test "$ac_cv_func_setpgrp_void" = yes; then
15449 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15450
15451 fi
15452 fi
15453
15454 # Assume we'll default to using the included libiberty regex.
15455 gdb_use_included_regex=yes
15456
15457 # However, if the system regex is GNU regex, then default to *not*
15458 # using the included regex.
15459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
15460 $as_echo_n "checking for GNU regex... " >&6; }
15461 if ${gdb_cv_have_gnu_regex+:} false; then :
15462 $as_echo_n "(cached) " >&6
15463 else
15464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15465 /* end confdefs.h. */
15466 #include <gnu-versions.h>
15467 int
15468 main ()
15469 {
15470 #define REGEX_INTERFACE_VERSION 1
15471 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
15472 # error "Version mismatch"
15473 #endif
15474 ;
15475 return 0;
15476 }
15477 _ACEOF
15478 if ac_fn_c_try_compile "$LINENO"; then :
15479 gdb_cv_have_gnu_regex=yes
15480 else
15481 gdb_cv_have_gnu_regex=no
15482 fi
15483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15484 fi
15485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
15486 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
15487 if test "$gdb_cv_have_gnu_regex" = yes; then
15488 gdb_use_included_regex=no
15489 fi
15490
15491
15492 # Check whether --with-included-regex was given.
15493 if test "${with_included_regex+set}" = set; then :
15494 withval=$with_included_regex; gdb_with_regex=$withval
15495 else
15496 gdb_with_regex=$gdb_use_included_regex
15497 fi
15498
15499 if test "$gdb_with_regex" = yes; then
15500
15501 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
15502
15503 fi
15504
15505 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15506 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15507 #include <sys/proc.h>
15508
15509 "
15510 if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
15511
15512 cat >>confdefs.h <<_ACEOF
15513 #define HAVE_STRUCT_THREAD_TD_PCB 1
15514 _ACEOF
15515
15516
15517 fi
15518
15519
15520 # See if <sys/lwp.h> defines `struct lwp`.
15521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15522 $as_echo_n "checking for struct lwp... " >&6; }
15523 if ${gdb_cv_struct_lwp+:} false; then :
15524 $as_echo_n "(cached) " >&6
15525 else
15526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15527 /* end confdefs.h. */
15528 #include <sys/param.h>
15529 #define _KMEMUSER
15530 #include <sys/lwp.h>
15531 int
15532 main ()
15533 {
15534 struct lwp l;
15535 ;
15536 return 0;
15537 }
15538 _ACEOF
15539 if ac_fn_c_try_compile "$LINENO"; then :
15540 gdb_cv_struct_lwp=yes
15541 else
15542 gdb_cv_struct_lwp=no
15543 fi
15544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15545 fi
15546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15547 $as_echo "$gdb_cv_struct_lwp" >&6; }
15548 if test "$gdb_cv_struct_lwp" = yes; then
15549
15550 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
15551
15552 fi
15553
15554 # See if <machine/reg.h> degines `struct reg'.
15555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
15556 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
15557 if ${gdb_cv_struct_reg+:} false; then :
15558 $as_echo_n "(cached) " >&6
15559 else
15560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15561 /* end confdefs.h. */
15562 #include <sys/types.h>
15563 #include <machine/reg.h>
15564 int
15565 main ()
15566 {
15567 struct reg r;
15568 ;
15569 return 0;
15570 }
15571 _ACEOF
15572 if ac_fn_c_try_compile "$LINENO"; then :
15573 gdb_cv_struct_reg=yes
15574 else
15575 gdb_cv_struct_reg=no
15576 fi
15577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15578 fi
15579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
15580 $as_echo "$gdb_cv_struct_reg" >&6; }
15581 if test "$gdb_cv_struct_reg" = yes; then
15582
15583 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
15584
15585 fi
15586
15587 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
15588 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
15589 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
15590 #include <machine/reg.h>
15591 "
15592 if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
15593
15594 cat >>confdefs.h <<_ACEOF
15595 #define HAVE_STRUCT_REG_R_FS 1
15596 _ACEOF
15597
15598
15599 fi
15600 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
15601 #include <machine/reg.h>
15602 "
15603 if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
15604
15605 cat >>confdefs.h <<_ACEOF
15606 #define HAVE_STRUCT_REG_R_GS 1
15607 _ACEOF
15608
15609
15610 fi
15611
15612
15613 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
15614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
15615 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
15616 if ${gdb_cv_have_ptrace_getregs+:} false; then :
15617 $as_echo_n "(cached) " >&6
15618 else
15619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15620 /* end confdefs.h. */
15621 #include <sys/ptrace.h>
15622 int
15623 main ()
15624 {
15625 PTRACE_GETREGS;
15626 ;
15627 return 0;
15628 }
15629 _ACEOF
15630 if ac_fn_c_try_compile "$LINENO"; then :
15631 gdb_cv_have_ptrace_getregs=yes
15632 else
15633 gdb_cv_have_ptrace_getregs=no
15634 fi
15635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15636 fi
15637
15638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
15639 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
15640 if test "$gdb_cv_have_ptrace_getregs" = yes; then
15641
15642 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
15643
15644 fi
15645
15646 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
15647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
15648 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
15649 if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
15650 $as_echo_n "(cached) " >&6
15651 else
15652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15653 /* end confdefs.h. */
15654 #include <sys/ptrace.h>
15655 int
15656 main ()
15657 {
15658 PTRACE_GETFPXREGS;
15659 ;
15660 return 0;
15661 }
15662 _ACEOF
15663 if ac_fn_c_try_compile "$LINENO"; then :
15664 gdb_cv_have_ptrace_getfpxregs=yes
15665 else
15666 gdb_cv_have_ptrace_getfpxregs=no
15667 fi
15668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15669 fi
15670
15671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
15672 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
15673 if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
15674
15675 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
15676
15677 fi
15678
15679 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
15680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
15681 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
15682 if ${gdb_cv_have_pt_getdbregs+:} false; then :
15683 $as_echo_n "(cached) " >&6
15684 else
15685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15686 /* end confdefs.h. */
15687 #include <sys/types.h>
15688 #include <sys/ptrace.h>
15689 int
15690 main ()
15691 {
15692 PT_GETDBREGS;
15693 ;
15694 return 0;
15695 }
15696 _ACEOF
15697 if ac_fn_c_try_compile "$LINENO"; then :
15698 gdb_cv_have_pt_getdbregs=yes
15699 else
15700 gdb_cv_have_pt_getdbregs=no
15701 fi
15702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15703 fi
15704
15705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
15706 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
15707 if test "$gdb_cv_have_pt_getdbregs" = yes; then
15708
15709 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
15710
15711 fi
15712
15713 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
15714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
15715 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
15716 if ${gdb_cv_have_pt_getxmmregs+:} false; then :
15717 $as_echo_n "(cached) " >&6
15718 else
15719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15720 /* end confdefs.h. */
15721 #include <sys/types.h>
15722 #include <sys/ptrace.h>
15723 int
15724 main ()
15725 {
15726 PT_GETXMMREGS;
15727 ;
15728 return 0;
15729 }
15730 _ACEOF
15731 if ac_fn_c_try_compile "$LINENO"; then :
15732 gdb_cv_have_pt_getxmmregs=yes
15733 else
15734 gdb_cv_have_pt_getxmmregs=no
15735 fi
15736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15737 fi
15738
15739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
15740 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
15741 if test "$gdb_cv_have_pt_getxmmregs" = yes; then
15742
15743 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
15744
15745 fi
15746
15747 # See if <sys/ptrace.h> supports LWP names on FreeBSD
15748 # Older FreeBSD versions don't have the pl_tdname member of
15749 # `struct ptrace_lwpinfo'.
15750 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
15751 "
15752 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
15753
15754 cat >>confdefs.h <<_ACEOF
15755 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
15756 _ACEOF
15757
15758
15759 fi
15760
15761
15762 # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
15763 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
15764 # FreeBSD 10.3.
15765 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>
15766 "
15767 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
15768
15769 cat >>confdefs.h <<_ACEOF
15770 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
15771 _ACEOF
15772
15773
15774 fi
15775
15776
15777 # Check if the compiler supports the `long long' type.
15778
15779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
15780 $as_echo_n "checking for long long support in compiler... " >&6; }
15781 if ${gdb_cv_c_long_long+:} false; then :
15782 $as_echo_n "(cached) " >&6
15783 else
15784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15785 /* end confdefs.h. */
15786 extern long long foo;
15787 int
15788 main ()
15789 {
15790 switch (foo & 2) { case 0: return 1; }
15791 ;
15792 return 0;
15793 }
15794 _ACEOF
15795 if ac_fn_c_try_compile "$LINENO"; then :
15796 gdb_cv_c_long_long=yes
15797 else
15798 gdb_cv_c_long_long=no
15799 fi
15800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15801 fi
15802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
15803 $as_echo "$gdb_cv_c_long_long" >&6; }
15804 if test "$gdb_cv_c_long_long" != yes; then
15805 # libdecnumber requires long long.
15806 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
15807 fi
15808
15809 # Check if the compiler and runtime support printing long longs.
15810
15811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15812 $as_echo_n "checking for long long support in printf... " >&6; }
15813 if ${gdb_cv_printf_has_long_long+:} false; then :
15814 $as_echo_n "(cached) " >&6
15815 else
15816 if test "$cross_compiling" = yes; then :
15817 gdb_cv_printf_has_long_long=no
15818 else
15819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15820 /* end confdefs.h. */
15821 $ac_includes_default
15822 int
15823 main ()
15824 {
15825 char buf[32];
15826 long long l = 0;
15827 l = (l << 16) + 0x0123;
15828 l = (l << 16) + 0x4567;
15829 l = (l << 16) + 0x89ab;
15830 l = (l << 16) + 0xcdef;
15831 sprintf (buf, "0x%016llx", l);
15832 return (strcmp ("0x0123456789abcdef", buf));
15833 ;
15834 return 0;
15835 }
15836 _ACEOF
15837 if ac_fn_c_try_run "$LINENO"; then :
15838 gdb_cv_printf_has_long_long=yes
15839 else
15840 gdb_cv_printf_has_long_long=no
15841 fi
15842 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15843 conftest.$ac_objext conftest.beam conftest.$ac_ext
15844 fi
15845
15846 fi
15847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15848 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
15849 if test "$gdb_cv_printf_has_long_long" = yes; then
15850
15851 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
15852
15853 fi
15854
15855 # Check if the compiler and runtime support printing decfloats.
15856
15857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
15858 $as_echo_n "checking for decfloat support in printf... " >&6; }
15859 if ${gdb_cv_printf_has_decfloat+:} false; then :
15860 $as_echo_n "(cached) " >&6
15861 else
15862 if test "$cross_compiling" = yes; then :
15863 gdb_cv_printf_has_decfloat=no
15864 else
15865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15866 /* end confdefs.h. */
15867 $ac_includes_default
15868 int
15869 main ()
15870 {
15871 char buf[64];
15872 _Decimal32 d32 = 1.2345df;
15873 _Decimal64 d64 = 1.2345dd;
15874 _Decimal128 d128 = 1.2345dl;
15875 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
15876 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
15877 ;
15878 return 0;
15879 }
15880 _ACEOF
15881 if ac_fn_c_try_run "$LINENO"; then :
15882 gdb_cv_printf_has_decfloat=yes
15883 else
15884 gdb_cv_printf_has_decfloat=no
15885 fi
15886 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15887 conftest.$ac_objext conftest.beam conftest.$ac_ext
15888 fi
15889
15890 fi
15891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
15892 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
15893 if test "$gdb_cv_printf_has_decfloat" = yes; then
15894
15895 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
15896
15897 fi
15898
15899 # Check if the compiler supports the `long double' type. We can't use
15900 # AC_C_LONG_DOUBLE because that one does additional checks on the
15901 # constants defined in <float.h> that fail on some systems,
15902 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
15903
15904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15905 $as_echo_n "checking for long double support in compiler... " >&6; }
15906 if ${gdb_cv_c_long_double+:} false; then :
15907 $as_echo_n "(cached) " >&6
15908 else
15909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15910 /* end confdefs.h. */
15911 long double foo;
15912 _ACEOF
15913 if ac_fn_c_try_compile "$LINENO"; then :
15914 gdb_cv_c_long_double=yes
15915 else
15916 gdb_cv_c_long_double=no
15917 fi
15918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15919 fi
15920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15921 $as_echo "$gdb_cv_c_long_double" >&6; }
15922 if test "$gdb_cv_c_long_double" = yes; then
15923
15924 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
15925
15926 fi
15927
15928 # Check if the compiler and runtime support printing long doubles.
15929
15930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15931 $as_echo_n "checking for long double support in printf... " >&6; }
15932 if ${gdb_cv_printf_has_long_double+:} false; then :
15933 $as_echo_n "(cached) " >&6
15934 else
15935 if test "$cross_compiling" = yes; then :
15936 gdb_cv_printf_has_long_double=no
15937 else
15938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15939 /* end confdefs.h. */
15940 $ac_includes_default
15941 int
15942 main ()
15943 {
15944 char buf[16];
15945 long double f = 3.141592653;
15946 sprintf (buf, "%Lg", f);
15947 return (strncmp ("3.14159", buf, 7));
15948 ;
15949 return 0;
15950 }
15951 _ACEOF
15952 if ac_fn_c_try_run "$LINENO"; then :
15953 gdb_cv_printf_has_long_double=yes
15954 else
15955 gdb_cv_printf_has_long_double=no
15956 fi
15957 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15958 conftest.$ac_objext conftest.beam conftest.$ac_ext
15959 fi
15960
15961 fi
15962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15963 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
15964 if test "$gdb_cv_printf_has_long_double" = yes; then
15965
15966 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
15967
15968 fi
15969
15970 # Check if the compiler and runtime support scanning long doubles.
15971
15972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15973 $as_echo_n "checking for long double support in scanf... " >&6; }
15974 if ${gdb_cv_scanf_has_long_double+:} false; then :
15975 $as_echo_n "(cached) " >&6
15976 else
15977 if test "$cross_compiling" = yes; then :
15978 gdb_cv_scanf_has_long_double=no
15979 else
15980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15981 /* end confdefs.h. */
15982 #include <stdio.h>
15983 int
15984 main ()
15985 {
15986 char *buf = "3.141592653";
15987 long double f = 0;
15988 sscanf (buf, "%Lg", &f);
15989 return !(f > 3.14159 && f < 3.14160);
15990 ;
15991 return 0;
15992 }
15993 _ACEOF
15994 if ac_fn_c_try_run "$LINENO"; then :
15995 gdb_cv_scanf_has_long_double=yes
15996 else
15997 gdb_cv_scanf_has_long_double=no
15998 fi
15999 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16000 conftest.$ac_objext conftest.beam conftest.$ac_ext
16001 fi
16002
16003 fi
16004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
16005 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
16006 if test "$gdb_cv_scanf_has_long_double" = yes; then
16007
16008 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
16009
16010 fi
16011
16012 case ${host_os} in
16013 aix*)
16014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
16015 $as_echo_n "checking for -bbigtoc option... " >&6; }
16016 if ${gdb_cv_bigtoc+:} false; then :
16017 $as_echo_n "(cached) " >&6
16018 else
16019
16020 SAVE_LDFLAGS=$LDFLAGS
16021
16022 case $GCC in
16023 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
16024 *) gdb_cv_bigtoc=-bbigtoc ;;
16025 esac
16026
16027 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
16028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16029 /* end confdefs.h. */
16030
16031 int
16032 main ()
16033 {
16034 int i;
16035 ;
16036 return 0;
16037 }
16038 _ACEOF
16039 if ac_fn_c_try_link "$LINENO"; then :
16040
16041 else
16042 gdb_cv_bigtoc=
16043 fi
16044 rm -f core conftest.err conftest.$ac_objext \
16045 conftest$ac_exeext conftest.$ac_ext
16046 LDFLAGS="${SAVE_LDFLAGS}"
16047
16048 fi
16049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
16050 $as_echo "$gdb_cv_bigtoc" >&6; }
16051 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
16052 ;;
16053 esac
16054
16055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
16056 $as_echo_n "checking for the dynamic export flag... " >&6; }
16057 dynamic_list=false
16058 if test "${gdb_native}" = yes; then
16059 # The dynamically loaded libthread_db needs access to symbols in the gdb
16060 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
16061 # may not be supported there.
16062 old_LDFLAGS="$LDFLAGS"
16063 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
16064 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
16065 LDFLAGS="$LDFLAGS $RDYNAMIC"
16066 if test "${have_libpython}" = no; then
16067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16068 /* end confdefs.h. */
16069
16070 int
16071 main ()
16072 {
16073
16074 ;
16075 return 0;
16076 }
16077 _ACEOF
16078 if ac_fn_c_try_link "$LINENO"; then :
16079 dynamic_list=true
16080 fi
16081 rm -f core conftest.err conftest.$ac_objext \
16082 conftest$ac_exeext conftest.$ac_ext
16083 else
16084 # Workaround http://bugs.python.org/issue4434 where static
16085 # libpythonX.Y.a would get its symbols required for
16086 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
16087 # Problem does not happen for the recommended libpythonX.Y.so linkage.
16088
16089 # Note the workaround for Python
16090 # http://bugs.python.org/issue10112 earlier has removed
16091 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
16092 # here too, as otherwise it'd make this -Wl,--dynamic-list test
16093 # always pass.
16094 old_CFLAGS="$CFLAGS"
16095 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
16096 old_LIBS="$LIBS"
16097 LIBS="$LIBS $PYTHON_LIBS"
16098 old_CPPFLAGS="$CPPFLAGS"
16099 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16100 if test "$cross_compiling" = yes; then :
16101 true
16102 else
16103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16104 /* end confdefs.h. */
16105 #include "Python.h"
16106 int
16107 main ()
16108 {
16109 int err;
16110 Py_Initialize ();
16111 err = PyRun_SimpleString ("import itertools\n");
16112 Py_Finalize ();
16113 return err == 0 ? 0 : 1;
16114 ;
16115 return 0;
16116 }
16117 _ACEOF
16118 if ac_fn_c_try_run "$LINENO"; then :
16119 dynamic_list=true
16120 fi
16121 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16122 conftest.$ac_objext conftest.beam conftest.$ac_ext
16123 fi
16124
16125 LIBS="$old_LIBS"
16126 CFLAGS="$old_CFLAGS"
16127 CPPFLAGS="$old_CPPFLAGS"
16128 fi
16129 LDFLAGS="$old_LDFLAGS"
16130 fi
16131 if $dynamic_list; then
16132 found="-Wl,--dynamic-list"
16133 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
16134 else
16135 found="-rdynamic"
16136 RDYNAMIC="-rdynamic"
16137 fi
16138
16139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
16140 $as_echo "$found" >&6; }
16141
16142
16143 if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
16144 case ${host_os} in
16145 aix*)
16146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
16147 $as_echo_n "checking for AiX thread debugging library... " >&6; }
16148 if ${gdb_cv_have_aix_thread_debug+:} false; then :
16149 $as_echo_n "(cached) " >&6
16150 else
16151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16152 /* end confdefs.h. */
16153 #include <sys/pthdebug.h>
16154 int
16155 main ()
16156 {
16157 #ifndef PTHDB_VERSION_3
16158 #error
16159 #endif
16160 ;
16161 return 0;
16162 }
16163 _ACEOF
16164 if ac_fn_c_try_compile "$LINENO"; then :
16165 gdb_cv_have_aix_thread_debug=yes
16166 else
16167 gdb_cv_have_aix_thread_debug=no
16168 fi
16169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16170 fi
16171
16172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
16173 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
16174 if test "$gdb_cv_have_aix_thread_debug" = yes; then
16175 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
16176 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
16177 LIBS="$LIBS -lpthdebug"
16178
16179 # Older versions of AIX do not provide the declaration for
16180 # the getthrds function (it appears that it was introduced
16181 # with AIX 6.x).
16182 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
16183 "
16184 if test "x$ac_cv_have_decl_getthrds" = xyes; then :
16185 ac_have_decl=1
16186 else
16187 ac_have_decl=0
16188 fi
16189
16190 cat >>confdefs.h <<_ACEOF
16191 #define HAVE_DECL_GETTHRDS $ac_have_decl
16192 _ACEOF
16193
16194 fi
16195 ;;
16196 esac
16197
16198 fi
16199
16200 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
16201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
16202 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
16203 if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
16204 $as_echo_n "(cached) " >&6
16205 else
16206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16207 /* end confdefs.h. */
16208 #include <thread_db.h>
16209 int
16210 main ()
16211 {
16212 int i = TD_NOTALLOC;
16213 ;
16214 return 0;
16215 }
16216 _ACEOF
16217 if ac_fn_c_try_compile "$LINENO"; then :
16218 gdb_cv_thread_db_h_has_td_notalloc=yes
16219 else
16220 gdb_cv_thread_db_h_has_td_notalloc=no
16221
16222 fi
16223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16224
16225 fi
16226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
16227 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
16228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
16229 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
16230 if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
16231 $as_echo_n "(cached) " >&6
16232 else
16233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16234 /* end confdefs.h. */
16235 #include <thread_db.h>
16236 int
16237 main ()
16238 {
16239 int i = TD_VERSION;
16240 ;
16241 return 0;
16242 }
16243 _ACEOF
16244 if ac_fn_c_try_compile "$LINENO"; then :
16245 gdb_cv_thread_db_h_has_td_version=yes
16246 else
16247 gdb_cv_thread_db_h_has_td_version=no
16248
16249 fi
16250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16251
16252 fi
16253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
16254 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
16255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
16256 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
16257 if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
16258 $as_echo_n "(cached) " >&6
16259 else
16260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16261 /* end confdefs.h. */
16262 #include <thread_db.h>
16263 int
16264 main ()
16265 {
16266 int i = TD_NOTLS;
16267 ;
16268 return 0;
16269 }
16270 _ACEOF
16271 if ac_fn_c_try_compile "$LINENO"; then :
16272 gdb_cv_thread_db_h_has_td_notls=yes
16273 else
16274 gdb_cv_thread_db_h_has_td_notls=no
16275
16276 fi
16277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16278
16279 fi
16280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16281 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
16282 fi
16283 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
16284
16285 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
16286
16287 fi
16288 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16289
16290 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
16291
16292 fi
16293 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16294
16295 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
16296
16297 fi
16298
16299 case $host_os in
16300 go32* | *djgpp*)
16301 gdbinit=gdb.ini
16302 ;;
16303 *)
16304 gdbinit=.gdbinit
16305 ;;
16306 esac
16307
16308 cat >>confdefs.h <<_ACEOF
16309 #define GDBINIT "$gdbinit"
16310 _ACEOF
16311
16312
16313
16314 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16315 # except that the argument to --with-sysroot is optional.
16316 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16317 if test "x$with_sysroot" = xyes; then
16318 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16319 fi
16320
16321 # Check whether --with-sysroot was given.
16322 if test "${with_sysroot+set}" = set; then :
16323 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16324 else
16325 TARGET_SYSTEM_ROOT=
16326 fi
16327
16328
16329 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16330 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16331 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16332 ac_define_dir=`eval echo $ac_define_dir`
16333
16334 cat >>confdefs.h <<_ACEOF
16335 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
16336 _ACEOF
16337
16338
16339
16340
16341 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16342 if test "x$prefix" = xNONE; then
16343 test_prefix=/usr/local
16344 else
16345 test_prefix=$prefix
16346 fi
16347 else
16348 test_prefix=$exec_prefix
16349 fi
16350 value=0
16351 case ${ac_define_dir} in
16352 "${test_prefix}"|"${test_prefix}/"*|\
16353 '${exec_prefix}'|'${exec_prefix}/'*)
16354 value=1
16355 ;;
16356 esac
16357
16358 cat >>confdefs.h <<_ACEOF
16359 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16360 _ACEOF
16361
16362
16363
16364
16365
16366 # Check whether --with-system-gdbinit was given.
16367 if test "${with_system_gdbinit+set}" = set; then :
16368 withval=$with_system_gdbinit;
16369 SYSTEM_GDBINIT=$withval
16370 else
16371 SYSTEM_GDBINIT=
16372 fi
16373
16374
16375 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16376 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16377 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16378 ac_define_dir=`eval echo $ac_define_dir`
16379
16380 cat >>confdefs.h <<_ACEOF
16381 #define SYSTEM_GDBINIT "$ac_define_dir"
16382 _ACEOF
16383
16384
16385
16386
16387 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16388 if test "x$prefix" = xNONE; then
16389 test_prefix=/usr/local
16390 else
16391 test_prefix=$prefix
16392 fi
16393 else
16394 test_prefix=$exec_prefix
16395 fi
16396 value=0
16397 case ${ac_define_dir} in
16398 "${test_prefix}"|"${test_prefix}/"*|\
16399 '${exec_prefix}'|'${exec_prefix}/'*)
16400 value=1
16401 ;;
16402 esac
16403
16404 cat >>confdefs.h <<_ACEOF
16405 #define SYSTEM_GDBINIT_RELOCATABLE $value
16406 _ACEOF
16407
16408
16409
16410
16411
16412 # Check whether --with-system-gdbinit-dir was given.
16413 if test "${with_system_gdbinit_dir+set}" = set; then :
16414 withval=$with_system_gdbinit_dir;
16415 SYSTEM_GDBINIT_DIR=$withval
16416 else
16417 SYSTEM_GDBINIT_DIR=
16418 fi
16419
16420
16421 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16422 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16423 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16424 ac_define_dir=`eval echo $ac_define_dir`
16425
16426 cat >>confdefs.h <<_ACEOF
16427 #define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16428 _ACEOF
16429
16430
16431
16432
16433 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16434 if test "x$prefix" = xNONE; then
16435 test_prefix=/usr/local
16436 else
16437 test_prefix=$prefix
16438 fi
16439 else
16440 test_prefix=$exec_prefix
16441 fi
16442 value=0
16443 case ${ac_define_dir} in
16444 "${test_prefix}"|"${test_prefix}/"*|\
16445 '${exec_prefix}'|'${exec_prefix}/'*)
16446 value=1
16447 ;;
16448 esac
16449
16450 cat >>confdefs.h <<_ACEOF
16451 #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16452 _ACEOF
16453
16454
16455
16456
16457
16458 # Check whether --enable-werror was given.
16459 if test "${enable_werror+set}" = set; then :
16460 enableval=$enable_werror; case "${enableval}" in
16461 yes | y) ERROR_ON_WARNING="yes" ;;
16462 no | n) ERROR_ON_WARNING="no" ;;
16463 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
16464 esac
16465 fi
16466
16467
16468 # Enable -Werror by default when using gcc. Turn it off for releases.
16469 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
16470 ERROR_ON_WARNING=yes
16471 fi
16472
16473 WERROR_CFLAGS=""
16474 if test "${ERROR_ON_WARNING}" = yes ; then
16475 WERROR_CFLAGS="-Werror"
16476 fi
16477
16478 # The options we'll try to enable.
16479 build_warnings="-Wall -Wpointer-arith \
16480 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
16481 -Wno-switch -Wno-char-subscripts \
16482 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
16483 -Wno-sign-compare -Wno-error=maybe-uninitialized \
16484 -Wno-mismatched-tags \
16485 -Wno-error=deprecated-register \
16486 -Wsuggest-override \
16487 -Wimplicit-fallthrough=3 \
16488 -Wduplicated-cond \
16489 -Wshadow=local \
16490 -Wdeprecated-copy \
16491 -Wdeprecated-copy-dtor \
16492 -Wredundant-move \
16493 -Wmissing-declarations \
16494 -Wmissing-prototypes \
16495 -Wstrict-null-sentinel \
16496 "
16497
16498 case "${host}" in
16499 *-*-mingw32*)
16500 # Enable -Wno-format by default when using gcc on mingw since many
16501 # GCC versions complain about %I64.
16502 build_warnings="$build_warnings -Wno-format" ;;
16503 *-*-solaris*)
16504 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16505 # doesn't understand.
16506 build_warnings="$build_warnings -Wno-unknown-pragmas"
16507 # Solaris 11 <unistd.h> marks vfork deprecated.
16508 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
16509 *)
16510 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16511 # but there's a special case for this below.
16512 build_warnings="$build_warnings -Wformat-nonliteral" ;;
16513 esac
16514
16515 # Check whether --enable-build-warnings was given.
16516 if test "${enable_build_warnings+set}" = set; then :
16517 enableval=$enable_build_warnings; case "${enableval}" in
16518 yes) ;;
16519 no) build_warnings="-w";;
16520 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16521 build_warnings="${build_warnings} ${t}";;
16522 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16523 build_warnings="${t} ${build_warnings}";;
16524 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16525 esac
16526 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16527 echo "Setting compiler warning flags = $build_warnings" 6>&1
16528 fi
16529 fi
16530 # Check whether --enable-gdb-build-warnings was given.
16531 if test "${enable_gdb_build_warnings+set}" = set; then :
16532 enableval=$enable_gdb_build_warnings; case "${enableval}" in
16533 yes) ;;
16534 no) build_warnings="-w";;
16535 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16536 build_warnings="${build_warnings} ${t}";;
16537 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16538 build_warnings="${t} ${build_warnings}";;
16539 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16540 esac
16541 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16542 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16543 fi
16544 fi
16545
16546 # The set of warnings supported by a C++ compiler is not the same as
16547 # of the C compiler.
16548 ac_ext=cpp
16549 ac_cpp='$CXXCPP $CPPFLAGS'
16550 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16551 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16552 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16553
16554
16555 WARN_CFLAGS=""
16556 if test "x${build_warnings}" != x -a "x$GCC" = xyes
16557 then
16558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16559 $as_echo_n "checking compiler warning flags... " >&6; }
16560 # Separate out the -Werror flag as some files just cannot be
16561 # compiled with it enabled.
16562 for w in ${build_warnings}; do
16563 # GCC does not complain about -Wno-unknown-warning. Invert
16564 # and test -Wunknown-warning instead.
16565 case $w in
16566 -Wno-*)
16567 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
16568 -Wformat-nonliteral)
16569 # gcc requires -Wformat before -Wformat-nonliteral
16570 # will work, so stick them together.
16571 w="-Wformat $w"
16572 wtest="$w"
16573 ;;
16574 *)
16575 wtest=$w ;;
16576 esac
16577
16578 case $w in
16579 -Werr*) WERROR_CFLAGS=-Werror ;;
16580 *)
16581 # Check whether GCC accepts it.
16582 saved_CFLAGS="$CFLAGS"
16583 CFLAGS="$CFLAGS -Werror $wtest"
16584 saved_CXXFLAGS="$CXXFLAGS"
16585 CXXFLAGS="$CXXFLAGS -Werror $wtest"
16586 if test "x$w" = "x-Wunused-variable"; then
16587 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16588 # fixed in GCC 4.9. This test is derived from the gdb
16589 # source code that triggered this bug in GCC.
16590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16591 /* end confdefs.h. */
16592 struct scoped_restore_base {};
16593 struct scoped_restore_tmpl : public scoped_restore_base {
16594 ~scoped_restore_tmpl() {}
16595 };
16596 int
16597 main ()
16598 {
16599 const scoped_restore_base &b = scoped_restore_tmpl();
16600 ;
16601 return 0;
16602 }
16603 _ACEOF
16604 if ac_fn_cxx_try_compile "$LINENO"; then :
16605 WARN_CFLAGS="${WARN_CFLAGS} $w"
16606 fi
16607 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16608 else
16609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16610 /* end confdefs.h. */
16611
16612 int
16613 main ()
16614 {
16615
16616 ;
16617 return 0;
16618 }
16619 _ACEOF
16620 if ac_fn_cxx_try_compile "$LINENO"; then :
16621 WARN_CFLAGS="${WARN_CFLAGS} $w"
16622 fi
16623 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16624 fi
16625 CFLAGS="$saved_CFLAGS"
16626 CXXFLAGS="$saved_CXXFLAGS"
16627 esac
16628 done
16629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16630 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
16631 fi
16632
16633
16634
16635 ac_ext=c
16636 ac_cpp='$CPP $CPPFLAGS'
16637 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16638 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16639 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16640
16641
16642
16643 # Check whether --enable-ubsan was given.
16644 if test "${enable_ubsan+set}" = set; then :
16645 enableval=$enable_ubsan;
16646 else
16647 enable_ubsan=no
16648 fi
16649
16650 if test "x$enable_ubsan" = xauto; then
16651 if $development; then
16652 enable_ubsan=yes
16653 fi
16654 fi
16655 ac_ext=cpp
16656 ac_cpp='$CXXCPP $CPPFLAGS'
16657 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16658 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16659 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16660
16661 if test "x$enable_ubsan" = xyes; then
16662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
16663 $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
16664 saved_CXXFLAGS="$CXXFLAGS"
16665 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16667 /* end confdefs.h. */
16668
16669 int
16670 main ()
16671 {
16672
16673 ;
16674 return 0;
16675 }
16676 _ACEOF
16677 if ac_fn_cxx_try_link "$LINENO"; then :
16678 enable_ubsan=yes
16679 else
16680 enable_ubsan=no
16681 fi
16682 rm -f core conftest.err conftest.$ac_objext \
16683 conftest$ac_exeext conftest.$ac_ext
16684 CXXFLAGS="$saved_CXXFLAGS"
16685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
16686 $as_echo "$enable_ubsan" >&6; }
16687 if test "x$enable_ubsan" = xyes; then
16688 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16689 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
16690 fi
16691 fi
16692 ac_ext=c
16693 ac_cpp='$CPP $CPPFLAGS'
16694 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16695 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16696 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16697
16698
16699
16700 # In the Cygwin environment, we need some additional flags.
16701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
16702 $as_echo_n "checking for cygwin... " >&6; }
16703 if ${gdb_cv_os_cygwin+:} false; then :
16704 $as_echo_n "(cached) " >&6
16705 else
16706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16707 /* end confdefs.h. */
16708
16709 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
16710 lose
16711 #endif
16712 _ACEOF
16713 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16714 $EGREP "^lose$" >/dev/null 2>&1; then :
16715 gdb_cv_os_cygwin=yes
16716 else
16717 gdb_cv_os_cygwin=no
16718 fi
16719 rm -f conftest*
16720
16721 fi
16722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
16723 $as_echo "$gdb_cv_os_cygwin" >&6; }
16724
16725
16726 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
16727 case ${host} in
16728 *go32* ) SER_HARDWIRE=ser-go32.o ;;
16729 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
16730 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
16731 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
16732 esac
16733
16734
16735 # libreadline needs libuser32.a in a cygwin environment
16736 WIN32LIBS=
16737 if test x"$gdb_cv_os_cygwin" = xyes; then
16738 WIN32LIBS="-luser32"
16739 case "${target}" in
16740 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
16741 ;;
16742 esac
16743 fi
16744
16745 # The ser-tcp.c module requires sockets.
16746 # Note that WIN32APILIBS is set by GDB_AC_COMMON.
16747 WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
16748
16749 # Add ELF support to GDB, but only if BFD includes ELF support.
16750
16751 OLD_CFLAGS=$CFLAGS
16752 OLD_LDFLAGS=$LDFLAGS
16753 OLD_LIBS=$LIBS
16754 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16755 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16756 # always want our bfd.
16757 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
16758 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16759 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
16760 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
16761 LIBS="-lbfd -liberty -lz $intl $LIBS"
16762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
16763 $as_echo_n "checking for ELF support in BFD... " >&6; }
16764 if ${gdb_cv_var_elf+:} false; then :
16765 $as_echo_n "(cached) " >&6
16766 else
16767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16768 /* end confdefs.h. */
16769 #include <stdlib.h>
16770 #include "bfd.h"
16771 #include "elf-bfd.h"
16772
16773 int
16774 main ()
16775 {
16776 return bfd_get_elf_phdr_upper_bound (NULL);
16777 ;
16778 return 0;
16779 }
16780 _ACEOF
16781 if ac_fn_c_try_link "$LINENO"; then :
16782 gdb_cv_var_elf=yes
16783 else
16784 gdb_cv_var_elf=no
16785 fi
16786 rm -f core conftest.err conftest.$ac_objext \
16787 conftest$ac_exeext conftest.$ac_ext
16788 fi
16789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
16790 $as_echo "$gdb_cv_var_elf" >&6; }
16791 CFLAGS=$OLD_CFLAGS
16792 LDFLAGS=$OLD_LDFLAGS
16793 LIBS=$OLD_LIBS
16794 if test "$gdb_cv_var_elf" = yes; then
16795 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
16796
16797 $as_echo "#define HAVE_ELF 1" >>confdefs.h
16798
16799 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16800 if test "$plugins" = "yes"; then
16801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16802 $as_echo_n "checking for library containing dlopen... " >&6; }
16803 if ${ac_cv_search_dlopen+:} false; then :
16804 $as_echo_n "(cached) " >&6
16805 else
16806 ac_func_search_save_LIBS=$LIBS
16807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16808 /* end confdefs.h. */
16809
16810 /* Override any GCC internal prototype to avoid an error.
16811 Use char because int might match the return type of a GCC
16812 builtin and then its argument prototype would still apply. */
16813 #ifdef __cplusplus
16814 extern "C"
16815 #endif
16816 char dlopen ();
16817 int
16818 main ()
16819 {
16820 return dlopen ();
16821 ;
16822 return 0;
16823 }
16824 _ACEOF
16825 for ac_lib in '' dl; do
16826 if test -z "$ac_lib"; then
16827 ac_res="none required"
16828 else
16829 ac_res=-l$ac_lib
16830 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16831 fi
16832 if ac_fn_c_try_link "$LINENO"; then :
16833 ac_cv_search_dlopen=$ac_res
16834 fi
16835 rm -f core conftest.err conftest.$ac_objext \
16836 conftest$ac_exeext
16837 if ${ac_cv_search_dlopen+:} false; then :
16838 break
16839 fi
16840 done
16841 if ${ac_cv_search_dlopen+:} false; then :
16842
16843 else
16844 ac_cv_search_dlopen=no
16845 fi
16846 rm conftest.$ac_ext
16847 LIBS=$ac_func_search_save_LIBS
16848 fi
16849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16850 $as_echo "$ac_cv_search_dlopen" >&6; }
16851 ac_res=$ac_cv_search_dlopen
16852 if test "$ac_res" != no; then :
16853 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16854
16855 fi
16856
16857 fi
16858 fi
16859
16860 # Add macho support to GDB, but only if BFD includes it.
16861
16862 OLD_CFLAGS=$CFLAGS
16863 OLD_LDFLAGS=$LDFLAGS
16864 OLD_LIBS=$LIBS
16865 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16866 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16867 # always want our bfd.
16868 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
16869 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16870 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
16871 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
16872 LIBS="-lbfd -liberty -lz $intl $LIBS"
16873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
16874 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
16875 if ${gdb_cv_var_macho+:} false; then :
16876 $as_echo_n "(cached) " >&6
16877 else
16878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16879 /* end confdefs.h. */
16880 #include <stdlib.h>
16881 #include "bfd.h"
16882 #include "mach-o.h"
16883
16884 int
16885 main ()
16886 {
16887 return bfd_mach_o_lookup_command (NULL, 0, NULL);
16888 ;
16889 return 0;
16890 }
16891 _ACEOF
16892 if ac_fn_c_try_link "$LINENO"; then :
16893 gdb_cv_var_macho=yes
16894 else
16895 gdb_cv_var_macho=no
16896 fi
16897 rm -f core conftest.err conftest.$ac_objext \
16898 conftest$ac_exeext conftest.$ac_ext
16899 fi
16900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
16901 $as_echo "$gdb_cv_var_macho" >&6; }
16902 CFLAGS=$OLD_CFLAGS
16903 LDFLAGS=$OLD_LDFLAGS
16904 LIBS=$OLD_LIBS
16905 if test "$gdb_cv_var_macho" = yes; then
16906 CONFIG_OBS="$CONFIG_OBS machoread.o"
16907 fi
16908
16909 # Add any host-specific objects to GDB.
16910 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
16911
16912 # If building on ELF, look for lzma support for embedded compressed debug info.
16913 if test "$gdb_cv_var_elf" = yes; then
16914
16915 # Check whether --with-lzma was given.
16916 if test "${with_lzma+set}" = set; then :
16917 withval=$with_lzma;
16918 else
16919 with_lzma=auto
16920 fi
16921
16922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
16923 $as_echo_n "checking whether to use lzma... " >&6; }
16924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
16925 $as_echo "$with_lzma" >&6; }
16926
16927 if test "${with_lzma}" != no; then
16928
16929
16930
16931
16932
16933
16934
16935
16936 use_additional=yes
16937
16938 acl_save_prefix="$prefix"
16939 prefix="$acl_final_prefix"
16940 acl_save_exec_prefix="$exec_prefix"
16941 exec_prefix="$acl_final_exec_prefix"
16942
16943 eval additional_includedir=\"$includedir\"
16944 eval additional_libdir=\"$libdir\"
16945
16946 exec_prefix="$acl_save_exec_prefix"
16947 prefix="$acl_save_prefix"
16948
16949
16950 # Check whether --with-liblzma-prefix was given.
16951 if test "${with_liblzma_prefix+set}" = set; then :
16952 withval=$with_liblzma_prefix;
16953 if test "X$withval" = "Xno"; then
16954 use_additional=no
16955 else
16956 if test "X$withval" = "X"; then
16957
16958 acl_save_prefix="$prefix"
16959 prefix="$acl_final_prefix"
16960 acl_save_exec_prefix="$exec_prefix"
16961 exec_prefix="$acl_final_exec_prefix"
16962
16963 eval additional_includedir=\"$includedir\"
16964 eval additional_libdir=\"$libdir\"
16965
16966 exec_prefix="$acl_save_exec_prefix"
16967 prefix="$acl_save_prefix"
16968
16969 else
16970 additional_includedir="$withval/include"
16971 additional_libdir="$withval/lib"
16972 fi
16973 fi
16974
16975 fi
16976
16977
16978 # Check whether --with-liblzma-type was given.
16979 if test "${with_liblzma_type+set}" = set; then :
16980 withval=$with_liblzma_type; with_liblzma_type=$withval
16981 else
16982 with_liblzma_type=auto
16983 fi
16984
16985 lib_type=`eval echo \$with_liblzma_type`
16986
16987 LIBLZMA=
16988 LTLIBLZMA=
16989 INCLZMA=
16990 rpathdirs=
16991 ltrpathdirs=
16992 names_already_handled=
16993 names_next_round='lzma '
16994 while test -n "$names_next_round"; do
16995 names_this_round="$names_next_round"
16996 names_next_round=
16997 for name in $names_this_round; do
16998 already_handled=
16999 for n in $names_already_handled; do
17000 if test "$n" = "$name"; then
17001 already_handled=yes
17002 break
17003 fi
17004 done
17005 if test -z "$already_handled"; then
17006 names_already_handled="$names_already_handled $name"
17007 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17008 eval value=\"\$HAVE_LIB$uppername\"
17009 if test -n "$value"; then
17010 if test "$value" = yes; then
17011 eval value=\"\$LIB$uppername\"
17012 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
17013 eval value=\"\$LTLIB$uppername\"
17014 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
17015 else
17016 :
17017 fi
17018 else
17019 found_dir=
17020 found_la=
17021 found_so=
17022 found_a=
17023 if test $use_additional = yes; then
17024 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
17025 found_dir="$additional_libdir"
17026 found_so="$additional_libdir/lib$name.$shlibext"
17027 if test -f "$additional_libdir/lib$name.la"; then
17028 found_la="$additional_libdir/lib$name.la"
17029 fi
17030 elif test x$lib_type != xshared; then
17031 if test -f "$additional_libdir/lib$name.$libext"; then
17032 found_dir="$additional_libdir"
17033 found_a="$additional_libdir/lib$name.$libext"
17034 if test -f "$additional_libdir/lib$name.la"; then
17035 found_la="$additional_libdir/lib$name.la"
17036 fi
17037 fi
17038 fi
17039 fi
17040 if test "X$found_dir" = "X"; then
17041 for x in $LDFLAGS $LTLIBLZMA; do
17042
17043 acl_save_prefix="$prefix"
17044 prefix="$acl_final_prefix"
17045 acl_save_exec_prefix="$exec_prefix"
17046 exec_prefix="$acl_final_exec_prefix"
17047 eval x=\"$x\"
17048 exec_prefix="$acl_save_exec_prefix"
17049 prefix="$acl_save_prefix"
17050
17051 case "$x" in
17052 -L*)
17053 dir=`echo "X$x" | sed -e 's/^X-L//'`
17054 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
17055 found_dir="$dir"
17056 found_so="$dir/lib$name.$shlibext"
17057 if test -f "$dir/lib$name.la"; then
17058 found_la="$dir/lib$name.la"
17059 fi
17060 elif test x$lib_type != xshared; then
17061 if test -f "$dir/lib$name.$libext"; then
17062 found_dir="$dir"
17063 found_a="$dir/lib$name.$libext"
17064 if test -f "$dir/lib$name.la"; then
17065 found_la="$dir/lib$name.la"
17066 fi
17067 fi
17068 fi
17069 ;;
17070 esac
17071 if test "X$found_dir" != "X"; then
17072 break
17073 fi
17074 done
17075 fi
17076 if test "X$found_dir" != "X"; then
17077 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
17078 if test "X$found_so" != "X"; then
17079 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17080 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17081 else
17082 haveit=
17083 for x in $ltrpathdirs; do
17084 if test "X$x" = "X$found_dir"; then
17085 haveit=yes
17086 break
17087 fi
17088 done
17089 if test -z "$haveit"; then
17090 ltrpathdirs="$ltrpathdirs $found_dir"
17091 fi
17092 if test "$hardcode_direct" = yes; then
17093 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17094 else
17095 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17096 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17097 haveit=
17098 for x in $rpathdirs; do
17099 if test "X$x" = "X$found_dir"; then
17100 haveit=yes
17101 break
17102 fi
17103 done
17104 if test -z "$haveit"; then
17105 rpathdirs="$rpathdirs $found_dir"
17106 fi
17107 else
17108 haveit=
17109 for x in $LDFLAGS $LIBLZMA; do
17110
17111 acl_save_prefix="$prefix"
17112 prefix="$acl_final_prefix"
17113 acl_save_exec_prefix="$exec_prefix"
17114 exec_prefix="$acl_final_exec_prefix"
17115 eval x=\"$x\"
17116 exec_prefix="$acl_save_exec_prefix"
17117 prefix="$acl_save_prefix"
17118
17119 if test "X$x" = "X-L$found_dir"; then
17120 haveit=yes
17121 break
17122 fi
17123 done
17124 if test -z "$haveit"; then
17125 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
17126 fi
17127 if test "$hardcode_minus_L" != no; then
17128 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17129 else
17130 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17131 fi
17132 fi
17133 fi
17134 fi
17135 else
17136 if test "X$found_a" != "X"; then
17137 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
17138 else
17139 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
17140 fi
17141 fi
17142 additional_includedir=
17143 case "$found_dir" in
17144 */lib | */lib/)
17145 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17146 additional_includedir="$basedir/include"
17147 ;;
17148 esac
17149 if test "X$additional_includedir" != "X"; then
17150 if test "X$additional_includedir" != "X/usr/include"; then
17151 haveit=
17152 if test "X$additional_includedir" = "X/usr/local/include"; then
17153 if test -n "$GCC"; then
17154 case $host_os in
17155 linux*) haveit=yes;;
17156 esac
17157 fi
17158 fi
17159 if test -z "$haveit"; then
17160 for x in $CPPFLAGS $INCLZMA; do
17161
17162 acl_save_prefix="$prefix"
17163 prefix="$acl_final_prefix"
17164 acl_save_exec_prefix="$exec_prefix"
17165 exec_prefix="$acl_final_exec_prefix"
17166 eval x=\"$x\"
17167 exec_prefix="$acl_save_exec_prefix"
17168 prefix="$acl_save_prefix"
17169
17170 if test "X$x" = "X-I$additional_includedir"; then
17171 haveit=yes
17172 break
17173 fi
17174 done
17175 if test -z "$haveit"; then
17176 if test -d "$additional_includedir"; then
17177 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
17178 fi
17179 fi
17180 fi
17181 fi
17182 fi
17183 if test -n "$found_la"; then
17184 save_libdir="$libdir"
17185 case "$found_la" in
17186 */* | *\\*) . "$found_la" ;;
17187 *) . "./$found_la" ;;
17188 esac
17189 libdir="$save_libdir"
17190 for dep in $dependency_libs; do
17191 case "$dep" in
17192 -L*)
17193 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17194 if test "X$additional_libdir" != "X/usr/lib"; then
17195 haveit=
17196 if test "X$additional_libdir" = "X/usr/local/lib"; then
17197 if test -n "$GCC"; then
17198 case $host_os in
17199 linux*) haveit=yes;;
17200 esac
17201 fi
17202 fi
17203 if test -z "$haveit"; then
17204 haveit=
17205 for x in $LDFLAGS $LIBLZMA; do
17206
17207 acl_save_prefix="$prefix"
17208 prefix="$acl_final_prefix"
17209 acl_save_exec_prefix="$exec_prefix"
17210 exec_prefix="$acl_final_exec_prefix"
17211 eval x=\"$x\"
17212 exec_prefix="$acl_save_exec_prefix"
17213 prefix="$acl_save_prefix"
17214
17215 if test "X$x" = "X-L$additional_libdir"; then
17216 haveit=yes
17217 break
17218 fi
17219 done
17220 if test -z "$haveit"; then
17221 if test -d "$additional_libdir"; then
17222 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
17223 fi
17224 fi
17225 haveit=
17226 for x in $LDFLAGS $LTLIBLZMA; do
17227
17228 acl_save_prefix="$prefix"
17229 prefix="$acl_final_prefix"
17230 acl_save_exec_prefix="$exec_prefix"
17231 exec_prefix="$acl_final_exec_prefix"
17232 eval x=\"$x\"
17233 exec_prefix="$acl_save_exec_prefix"
17234 prefix="$acl_save_prefix"
17235
17236 if test "X$x" = "X-L$additional_libdir"; then
17237 haveit=yes
17238 break
17239 fi
17240 done
17241 if test -z "$haveit"; then
17242 if test -d "$additional_libdir"; then
17243 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
17244 fi
17245 fi
17246 fi
17247 fi
17248 ;;
17249 -R*)
17250 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17251 if test "$enable_rpath" != no; then
17252 haveit=
17253 for x in $rpathdirs; do
17254 if test "X$x" = "X$dir"; then
17255 haveit=yes
17256 break
17257 fi
17258 done
17259 if test -z "$haveit"; then
17260 rpathdirs="$rpathdirs $dir"
17261 fi
17262 haveit=
17263 for x in $ltrpathdirs; do
17264 if test "X$x" = "X$dir"; then
17265 haveit=yes
17266 break
17267 fi
17268 done
17269 if test -z "$haveit"; then
17270 ltrpathdirs="$ltrpathdirs $dir"
17271 fi
17272 fi
17273 ;;
17274 -l*)
17275 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17276 ;;
17277 *.la)
17278 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17279 ;;
17280 *)
17281 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
17282 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
17283 ;;
17284 esac
17285 done
17286 fi
17287 else
17288 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
17289 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17290 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
17291 else
17292 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
17293 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
17294 fi
17295 fi
17296 fi
17297 fi
17298 done
17299 done
17300 if test "X$rpathdirs" != "X"; then
17301 if test -n "$hardcode_libdir_separator"; then
17302 alldirs=
17303 for found_dir in $rpathdirs; do
17304 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17305 done
17306 acl_save_libdir="$libdir"
17307 libdir="$alldirs"
17308 eval flag=\"$hardcode_libdir_flag_spec\"
17309 libdir="$acl_save_libdir"
17310 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17311 else
17312 for found_dir in $rpathdirs; do
17313 acl_save_libdir="$libdir"
17314 libdir="$found_dir"
17315 eval flag=\"$hardcode_libdir_flag_spec\"
17316 libdir="$acl_save_libdir"
17317 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17318 done
17319 fi
17320 fi
17321 if test "X$ltrpathdirs" != "X"; then
17322 for found_dir in $ltrpathdirs; do
17323 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17324 done
17325 fi
17326
17327
17328 ac_save_CPPFLAGS="$CPPFLAGS"
17329
17330 for element in $INCLZMA; do
17331 haveit=
17332 for x in $CPPFLAGS; do
17333
17334 acl_save_prefix="$prefix"
17335 prefix="$acl_final_prefix"
17336 acl_save_exec_prefix="$exec_prefix"
17337 exec_prefix="$acl_final_exec_prefix"
17338 eval x=\"$x\"
17339 exec_prefix="$acl_save_exec_prefix"
17340 prefix="$acl_save_prefix"
17341
17342 if test "X$x" = "X$element"; then
17343 haveit=yes
17344 break
17345 fi
17346 done
17347 if test -z "$haveit"; then
17348 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17349 fi
17350 done
17351
17352
17353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17354 $as_echo_n "checking for liblzma... " >&6; }
17355 if ${ac_cv_liblzma+:} false; then :
17356 $as_echo_n "(cached) " >&6
17357 else
17358
17359 ac_save_LIBS="$LIBS"
17360 LIBS="$LIBS $LIBLZMA"
17361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17362 /* end confdefs.h. */
17363 #include "lzma.h"
17364 int
17365 main ()
17366 {
17367 lzma_index_iter iter;
17368 lzma_index_iter_init (&iter, 0);
17369 lzma_mf_is_supported (LZMA_MF_HC3);
17370 ;
17371 return 0;
17372 }
17373 _ACEOF
17374 if ac_fn_c_try_link "$LINENO"; then :
17375 ac_cv_liblzma=yes
17376 else
17377 ac_cv_liblzma=no
17378 fi
17379 rm -f core conftest.err conftest.$ac_objext \
17380 conftest$ac_exeext conftest.$ac_ext
17381 LIBS="$ac_save_LIBS"
17382
17383 fi
17384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17385 $as_echo "$ac_cv_liblzma" >&6; }
17386 if test "$ac_cv_liblzma" = yes; then
17387 HAVE_LIBLZMA=yes
17388
17389 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17390
17391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17392 $as_echo_n "checking how to link with liblzma... " >&6; }
17393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17394 $as_echo "$LIBLZMA" >&6; }
17395 else
17396 HAVE_LIBLZMA=no
17397 CPPFLAGS="$ac_save_CPPFLAGS"
17398 LIBLZMA=
17399 LTLIBLZMA=
17400 fi
17401
17402
17403
17404
17405
17406
17407 if test "$HAVE_LIBLZMA" != yes; then
17408 if test "$with_lzma" = yes; then
17409 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
17410 fi
17411 fi
17412 fi
17413 fi
17414
17415 LIBGUI="../libgui/src/libgui.a"
17416 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17417
17418
17419
17420 WIN32LDAPP=
17421
17422
17423
17424 case "${host}" in
17425 *-*-cygwin* | *-*-mingw* )
17426 configdir="win"
17427 ;;
17428 *)
17429 configdir="unix"
17430 ;;
17431 esac
17432
17433 GDBTKLIBS=
17434 if test "${enable_gdbtk}" = "yes"; then
17435
17436 # Gdbtk must have an absolute path to srcdir in order to run
17437 # properly when not installed.
17438 here=`pwd`
17439 cd ${srcdir}
17440 GDBTK_SRC_DIR=`pwd`
17441 cd $here
17442
17443
17444 #
17445 # Ok, lets find the tcl configuration
17446 # First, look for one uninstalled.
17447 # the alternative search directory is invoked by --with-tcl
17448 #
17449
17450 if test x"${no_tcl}" = x ; then
17451 # we reset no_tcl in case something fails here
17452 no_tcl=true
17453
17454 # Check whether --with-tcl was given.
17455 if test "${with_tcl+set}" = set; then :
17456 withval=$with_tcl; with_tclconfig=${withval}
17457 fi
17458
17459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17460 $as_echo_n "checking for Tcl configuration... " >&6; }
17461 if ${ac_cv_c_tclconfig+:} false; then :
17462 $as_echo_n "(cached) " >&6
17463 else
17464
17465
17466 # First check to see if --with-tcl was specified.
17467 case "${host}" in
17468 *-*-cygwin*) platDir="win" ;;
17469 *) platDir="unix" ;;
17470 esac
17471 if test x"${with_tclconfig}" != x ; then
17472 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17473 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17474 else
17475 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
17476 fi
17477 fi
17478
17479 # then check for a private Tcl installation
17480 if test x"${ac_cv_c_tclconfig}" = x ; then
17481 for i in \
17482 ../tcl \
17483 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17484 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17485 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17486 ../../tcl \
17487 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17488 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17489 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17490 ../../../tcl \
17491 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17492 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17493 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17494 if test -f "$i/$platDir/tclConfig.sh" ; then
17495 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17496 break
17497 fi
17498 done
17499 fi
17500
17501 # on Darwin, check in Framework installation locations
17502 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17503 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17504 `ls -d /Library/Frameworks 2>/dev/null` \
17505 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17506 `ls -d /System/Library/Frameworks 2>/dev/null` \
17507 ; do
17508 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17509 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17510 break
17511 fi
17512 done
17513 fi
17514
17515 # check in a few common install locations
17516 if test x"${ac_cv_c_tclconfig}" = x ; then
17517 for i in `ls -d ${libdir} 2>/dev/null` \
17518 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17519 `ls -d ${prefix}/lib 2>/dev/null` \
17520 `ls -d /usr/local/lib 2>/dev/null` \
17521 `ls -d /usr/contrib/lib 2>/dev/null` \
17522 `ls -d /usr/lib 2>/dev/null` \
17523 ; do
17524 if test -f "$i/tclConfig.sh" ; then
17525 ac_cv_c_tclconfig=`(cd $i; pwd)`
17526 break
17527 fi
17528 done
17529 fi
17530
17531 # check in a few other private locations
17532 if test x"${ac_cv_c_tclconfig}" = x ; then
17533 for i in \
17534 ${srcdir}/../tcl \
17535 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17536 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17537 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17538 if test -f "$i/$platDir/tclConfig.sh" ; then
17539 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17540 break
17541 fi
17542 done
17543 fi
17544
17545 fi
17546
17547
17548 if test x"${ac_cv_c_tclconfig}" = x ; then
17549 TCL_BIN_DIR="# no Tcl configs found"
17550 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17551 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
17552 else
17553 no_tcl=
17554 TCL_BIN_DIR=${ac_cv_c_tclconfig}
17555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17556 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
17557 fi
17558 fi
17559
17560
17561 # If $no_tk is nonempty, then we can't do Tk, and there is no
17562 # point to doing Tcl.
17563
17564 #
17565 # Ok, lets find the tk configuration
17566 # First, look for one uninstalled.
17567 # the alternative search directory is invoked by --with-tk
17568 #
17569
17570 if test x"${no_tk}" = x ; then
17571 # we reset no_tk in case something fails here
17572 no_tk=true
17573
17574 # Check whether --with-tk was given.
17575 if test "${with_tk+set}" = set; then :
17576 withval=$with_tk; with_tkconfig=${withval}
17577 fi
17578
17579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17580 $as_echo_n "checking for Tk configuration... " >&6; }
17581 if ${ac_cv_c_tkconfig+:} false; then :
17582 $as_echo_n "(cached) " >&6
17583 else
17584
17585
17586 # First check to see if --with-tkconfig was specified.
17587 if test x"${with_tkconfig}" != x ; then
17588 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17589 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17590 else
17591 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
17592 fi
17593 fi
17594
17595 # then check for a private Tk library
17596 case "${host}" in
17597 *-*-cygwin*) platDir="win" ;;
17598 *) platDir="unix" ;;
17599 esac
17600 if test x"${ac_cv_c_tkconfig}" = x ; then
17601 for i in \
17602 ../tk \
17603 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17604 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17605 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17606 ../../tk \
17607 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17608 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17609 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17610 ../../../tk \
17611 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17612 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17613 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17614 if test -f "$i/$platDir/tkConfig.sh" ; then
17615 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17616 break
17617 fi
17618 done
17619 fi
17620
17621 # on Darwin, check in Framework installation locations
17622 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17623 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17624 `ls -d /Library/Frameworks 2>/dev/null` \
17625 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17626 `ls -d /System/Library/Frameworks 2>/dev/null` \
17627 ; do
17628 if test -f "$i/Tk.framework/tkConfig.sh" ; then
17629 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17630 break
17631 fi
17632 done
17633 fi
17634
17635 # check in a few common install locations
17636 if test x"${ac_cv_c_tkconfig}" = x ; then
17637 for i in `ls -d ${libdir} 2>/dev/null` \
17638 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17639 `ls -d ${prefix}/lib 2>/dev/null` \
17640 `ls -d /usr/local/lib 2>/dev/null` \
17641 `ls -d /usr/contrib/lib 2>/dev/null` \
17642 `ls -d /usr/lib 2>/dev/null` \
17643 ; do
17644 if test -f "$i/tkConfig.sh" ; then
17645 ac_cv_c_tkconfig=`(cd $i; pwd)`
17646 break
17647 fi
17648 done
17649 fi
17650 # check in a few other private locations
17651 if test x"${ac_cv_c_tkconfig}" = x ; then
17652 for i in \
17653 ${srcdir}/../tk \
17654 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17655 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
17656 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
17657 if test -f "$i/$platDir/tkConfig.sh" ; then
17658 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17659 break
17660 fi
17661 done
17662 fi
17663
17664 fi
17665
17666
17667 if test x"${ac_cv_c_tkconfig}" = x ; then
17668 TK_BIN_DIR="# no Tk configs found"
17669 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
17670 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
17671 else
17672 no_tk=
17673 TK_BIN_DIR=${ac_cv_c_tkconfig}
17674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
17675 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
17676 fi
17677 fi
17678
17679
17680 if test -z "${no_tcl}" -a -z "${no_tk}"; then
17681
17682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
17683 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
17684
17685 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
17686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17687 $as_echo "loading" >&6; }
17688 . ${TCL_BIN_DIR}/tclConfig.sh
17689 else
17690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
17691 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
17692 fi
17693
17694 # eval is required to do the TCL_DBGX substitution
17695 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
17696 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
17697
17698 # If the TCL_BIN_DIR is the build directory (not the install directory),
17699 # then set the common variable name to the value of the build variables.
17700 # For example, the variable TCL_LIB_SPEC will be set to the value
17701 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
17702 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
17703 # installed and uninstalled version of Tcl.
17704 if test -f "${TCL_BIN_DIR}/Makefile" ; then
17705 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
17706 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
17707 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
17708 elif test "`uname -s`" = "Darwin"; then
17709 # If Tcl was built as a framework, attempt to use the libraries
17710 # from the framework at the given location so that linking works
17711 # against Tcl.framework installed in an arbitrary location.
17712 case ${TCL_DEFS} in
17713 *TCL_FRAMEWORK*)
17714 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
17715 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
17716 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
17717 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
17718 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
17719 break
17720 fi
17721 done
17722 fi
17723 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
17724 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
17725 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
17726 fi
17727 ;;
17728 esac
17729 fi
17730
17731 # eval is required to do the TCL_DBGX substitution
17732 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
17733 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
17734 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
17735 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751 # Check for in-tree tcl
17752 here=`pwd`
17753 cd ${srcdir}/..
17754 topdir=`pwd`
17755 cd ${here}
17756
17757 intree="no"
17758 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
17759 intree="yes"
17760 fi
17761
17762 # Find Tcl private headers
17763 if test x"${intree}" = xno; then
17764
17765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
17766 $as_echo_n "checking for Tcl private headers... " >&6; }
17767 private_dir=""
17768 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
17769 if test -f ${dir}/tclInt.h ; then
17770 private_dir=${dir}
17771 fi
17772
17773 if test x"${private_dir}" = x; then
17774 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
17775 else
17776 TCL_PRIVATE_INCLUDE="-I${private_dir}"
17777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17778 $as_echo "${private_dir}" >&6; }
17779 fi
17780
17781 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
17782 TCL_LIBRARY="${TCL_LIB_SPEC}"
17783 TCL_DEPS=""
17784 else
17785 # If building tcl in the same src tree, private headers
17786 # are not needed, but we need to be sure to use the right
17787 # headers library
17788 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
17789 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
17790 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
17791 fi
17792
17793
17794
17795
17796
17797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
17798 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
17799
17800 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
17801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17802 $as_echo "loading" >&6; }
17803 . ${TK_BIN_DIR}/tkConfig.sh
17804 else
17805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
17806 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
17807 fi
17808
17809 # eval is required to do the TK_DBGX substitution
17810 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
17811 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
17812
17813 # If the TK_BIN_DIR is the build directory (not the install directory),
17814 # then set the common variable name to the value of the build variables.
17815 # For example, the variable TK_LIB_SPEC will be set to the value
17816 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
17817 # instead of TK_BUILD_LIB_SPEC since it will work with both an
17818 # installed and uninstalled version of Tcl.
17819 if test -f "${TK_BIN_DIR}/Makefile" ; then
17820 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
17821 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
17822 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
17823 elif test "`uname -s`" = "Darwin"; then
17824 # If Tk was built as a framework, attempt to use the libraries
17825 # from the framework at the given location so that linking works
17826 # against Tk.framework installed in an arbitrary location.
17827 case ${TK_DEFS} in
17828 *TK_FRAMEWORK*)
17829 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
17830 for i in "`cd ${TK_BIN_DIR}; pwd`" \
17831 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
17832 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
17833 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
17834 break
17835 fi
17836 done
17837 fi
17838 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
17839 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
17840 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
17841 fi
17842 ;;
17843 esac
17844 fi
17845
17846 # eval is required to do the TK_DBGX substitution
17847 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
17848 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
17849 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
17850 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865 # Check for in-tree Tk
17866 intree="no"
17867 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
17868 intree="yes"
17869 fi
17870
17871 # Find Tk private headers
17872 if test x"${intree}" = xno; then
17873
17874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
17875 $as_echo_n "checking for Tk private headers... " >&6; }
17876 private_dir=""
17877 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
17878 if test -f ${dir}/tkInt.h; then
17879 private_dir=${dir}
17880 fi
17881
17882 if test x"${private_dir}" = x; then
17883 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
17884 else
17885 TK_PRIVATE_INCLUDE="-I${private_dir}"
17886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17887 $as_echo "${private_dir}" >&6; }
17888 fi
17889
17890 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
17891 TK_LIBRARY=${TK_LIB_SPEC}
17892 TK_DEPS=""
17893 else
17894 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
17895 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
17896 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
17897 fi
17898
17899
17900
17901
17902
17903 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
17904
17905 # Include some libraries that Tcl and Tk want.
17906 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
17907 # Yes, the ordering seems wrong here. But it isn't.
17908 # TK_LIBS is the list of libraries that need to be linked
17909 # after Tcl/Tk. Note that this isn't put into LIBS. If it
17910 # were in LIBS then any link tests after this point would
17911 # try to include things like `$(LIBGUI)', which wouldn't work.
17912 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
17913
17914 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
17915 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
17916 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
17917 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
17918 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
17919 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
17920 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
17921
17922 if test x"$gdb_cv_os_cygwin" = xyes; then
17923 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
17924 WIN32LDAPP="-Wl,--subsystem,console"
17925 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
17926 fi
17927
17928 subdirs="$subdirs gdbtk"
17929
17930 fi
17931 fi
17932
17933
17934
17935
17936
17937
17938
17939
17940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17941 $as_echo_n "checking for X... " >&6; }
17942
17943
17944 # Check whether --with-x was given.
17945 if test "${with_x+set}" = set; then :
17946 withval=$with_x;
17947 fi
17948
17949 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17950 if test "x$with_x" = xno; then
17951 # The user explicitly disabled X.
17952 have_x=disabled
17953 else
17954 case $x_includes,$x_libraries in #(
17955 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
17956 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
17957 $as_echo_n "(cached) " >&6
17958 else
17959 # One or both of the vars are not set, and there is no cached value.
17960 ac_x_includes=no ac_x_libraries=no
17961 rm -f -r conftest.dir
17962 if mkdir conftest.dir; then
17963 cd conftest.dir
17964 cat >Imakefile <<'_ACEOF'
17965 incroot:
17966 @echo incroot='${INCROOT}'
17967 usrlibdir:
17968 @echo usrlibdir='${USRLIBDIR}'
17969 libdir:
17970 @echo libdir='${LIBDIR}'
17971 _ACEOF
17972 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
17973 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
17974 for ac_var in incroot usrlibdir libdir; do
17975 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17976 done
17977 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
17978 for ac_extension in a so sl dylib la dll; do
17979 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17980 test -f "$ac_im_libdir/libX11.$ac_extension"; then
17981 ac_im_usrlibdir=$ac_im_libdir; break
17982 fi
17983 done
17984 # Screen out bogus values from the imake configuration. They are
17985 # bogus both because they are the default anyway, and because
17986 # using them would break gcc on systems where it needs fixed includes.
17987 case $ac_im_incroot in
17988 /usr/include) ac_x_includes= ;;
17989 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
17990 esac
17991 case $ac_im_usrlibdir in
17992 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
17993 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
17994 esac
17995 fi
17996 cd ..
17997 rm -f -r conftest.dir
17998 fi
17999
18000 # Standard set of common directories for X headers.
18001 # Check X11 before X11Rn because it is often a symlink to the current release.
18002 ac_x_header_dirs='
18003 /usr/X11/include
18004 /usr/X11R7/include
18005 /usr/X11R6/include
18006 /usr/X11R5/include
18007 /usr/X11R4/include
18008
18009 /usr/include/X11
18010 /usr/include/X11R7
18011 /usr/include/X11R6
18012 /usr/include/X11R5
18013 /usr/include/X11R4
18014
18015 /usr/local/X11/include
18016 /usr/local/X11R7/include
18017 /usr/local/X11R6/include
18018 /usr/local/X11R5/include
18019 /usr/local/X11R4/include
18020
18021 /usr/local/include/X11
18022 /usr/local/include/X11R7
18023 /usr/local/include/X11R6
18024 /usr/local/include/X11R5
18025 /usr/local/include/X11R4
18026
18027 /usr/X386/include
18028 /usr/x386/include
18029 /usr/XFree86/include/X11
18030
18031 /usr/include
18032 /usr/local/include
18033 /usr/unsupported/include
18034 /usr/athena/include
18035 /usr/local/x11r5/include
18036 /usr/lpp/Xamples/include
18037
18038 /usr/openwin/include
18039 /usr/openwin/share/include'
18040
18041 if test "$ac_x_includes" = no; then
18042 # Guess where to find include files, by looking for Xlib.h.
18043 # First, try using that file with no special directory specified.
18044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18045 /* end confdefs.h. */
18046 #include <X11/Xlib.h>
18047 _ACEOF
18048 if ac_fn_c_try_cpp "$LINENO"; then :
18049 # We can compile using X headers with no special include directory.
18050 ac_x_includes=
18051 else
18052 for ac_dir in $ac_x_header_dirs; do
18053 if test -r "$ac_dir/X11/Xlib.h"; then
18054 ac_x_includes=$ac_dir
18055 break
18056 fi
18057 done
18058 fi
18059 rm -f conftest.err conftest.i conftest.$ac_ext
18060 fi # $ac_x_includes = no
18061
18062 if test "$ac_x_libraries" = no; then
18063 # Check for the libraries.
18064 # See if we find them without any special options.
18065 # Don't add to $LIBS permanently.
18066 ac_save_LIBS=$LIBS
18067 LIBS="-lX11 $LIBS"
18068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18069 /* end confdefs.h. */
18070 #include <X11/Xlib.h>
18071 int
18072 main ()
18073 {
18074 XrmInitialize ()
18075 ;
18076 return 0;
18077 }
18078 _ACEOF
18079 if ac_fn_c_try_link "$LINENO"; then :
18080 LIBS=$ac_save_LIBS
18081 # We can link X programs with no special library path.
18082 ac_x_libraries=
18083 else
18084 LIBS=$ac_save_LIBS
18085 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
18086 do
18087 # Don't even attempt the hair of trying to link an X program!
18088 for ac_extension in a so sl dylib la dll; do
18089 if test -r "$ac_dir/libX11.$ac_extension"; then
18090 ac_x_libraries=$ac_dir
18091 break 2
18092 fi
18093 done
18094 done
18095 fi
18096 rm -f core conftest.err conftest.$ac_objext \
18097 conftest$ac_exeext conftest.$ac_ext
18098 fi # $ac_x_libraries = no
18099
18100 case $ac_x_includes,$ac_x_libraries in #(
18101 no,* | *,no | *\'*)
18102 # Didn't find X, or a directory has "'" in its name.
18103 ac_cv_have_x="have_x=no";; #(
18104 *)
18105 # Record where we found X for the cache.
18106 ac_cv_have_x="have_x=yes\
18107 ac_x_includes='$ac_x_includes'\
18108 ac_x_libraries='$ac_x_libraries'"
18109 esac
18110 fi
18111 ;; #(
18112 *) have_x=yes;;
18113 esac
18114 eval "$ac_cv_have_x"
18115 fi # $with_x != no
18116
18117 if test "$have_x" != yes; then
18118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
18119 $as_echo "$have_x" >&6; }
18120 no_x=yes
18121 else
18122 # If each of the values was on the command line, it overrides each guess.
18123 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
18124 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
18125 # Update the cache value to reflect the command line values.
18126 ac_cv_have_x="have_x=yes\
18127 ac_x_includes='$x_includes'\
18128 ac_x_libraries='$x_libraries'"
18129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
18130 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
18131 fi
18132
18133
18134 # Unlike the sim directory, whether a simulator is linked is controlled by
18135 # presence of a gdb_sim definition in the target configure.tgt entry.
18136 # This code just checks for a few cases where we'd like to ignore those
18137 # definitions, even when they're present in the '.mt' file. These cases
18138 # are when --disable-sim is specified, or if the simulator directory is
18139 # not part of the source tree.
18140 #
18141 # Check whether --enable-sim was given.
18142 if test "${enable_sim+set}" = set; then :
18143 enableval=$enable_sim; echo "enable_sim = $enable_sim";
18144 echo "enableval = ${enableval}";
18145 case "${enableval}" in
18146 yes) ignore_sim=false ;;
18147 no) ignore_sim=true ;;
18148 *) ignore_sim=false ;;
18149 esac
18150 else
18151 ignore_sim=false
18152 fi
18153
18154
18155 if test ! -d "${srcdir}/../sim"; then
18156 ignore_sim=true
18157 fi
18158
18159 SIM=
18160 SIM_OBS=
18161 if test "${ignore_sim}" = "false"; then
18162 if test x"${gdb_sim}" != x ; then
18163 SIM="${gdb_sim}"
18164 SIM_OBS="remote-sim.o"
18165
18166 $as_echo "#define WITH_SIM 1" >>confdefs.h
18167
18168
18169 # Some tdep code should only be compiled in when the ppc sim is
18170 # built. PR sim/13418.
18171 case $target in
18172 powerpc*-*-*)
18173
18174 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
18175
18176 ;;
18177 esac
18178 fi
18179 fi
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194 # List of host floatformats.
18195
18196 cat >>confdefs.h <<_ACEOF
18197 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
18198 _ACEOF
18199
18200
18201 cat >>confdefs.h <<_ACEOF
18202 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
18203 _ACEOF
18204
18205
18206 cat >>confdefs.h <<_ACEOF
18207 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
18208 _ACEOF
18209
18210
18211 # target_subdir is used by the testsuite to find the target libraries.
18212 target_subdir=
18213 if test "${host}" != "${target}"; then
18214 target_subdir="${target_alias}/"
18215 fi
18216
18217
18218 # Import nat definitions.
18219 nat_makefile_frag=/dev/null
18220 if test "${gdb_native}" = "yes"; then
18221 . ${srcdir}/configure.nat
18222 nativefile=$NAT_FILE
18223 fi
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235 if test x"${gdb_osabi}" != x ; then
18236
18237 cat >>confdefs.h <<_ACEOF
18238 #define GDB_OSABI_DEFAULT $gdb_osabi
18239 _ACEOF
18240
18241 fi
18242
18243 # Check for babeltrace and babeltrace-ctf
18244
18245 # Check whether --with-babeltrace was given.
18246 if test "${with_babeltrace+set}" = set; then :
18247 withval=$with_babeltrace;
18248 else
18249 with_babeltrace=auto
18250 fi
18251
18252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
18253 $as_echo_n "checking whether to use babeltrace... " >&6; }
18254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
18255 $as_echo "$with_babeltrace" >&6; }
18256
18257 if test "x$with_babeltrace" = "xno"; then
18258 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
18259 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
18260 else
18261 # Append -Werror to CFLAGS so that configure can catch the warning
18262 # "assignment from incompatible pointer type", which is related to
18263 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
18264 # in GDB, while babeltrace 1.0.3 is broken.
18265 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18266 # safe to save and restore CFLAGS here.
18267 saved_CFLAGS=$CFLAGS
18268 CFLAGS="$CFLAGS -Werror"
18269
18270
18271
18272
18273
18274
18275
18276
18277 use_additional=yes
18278
18279 acl_save_prefix="$prefix"
18280 prefix="$acl_final_prefix"
18281 acl_save_exec_prefix="$exec_prefix"
18282 exec_prefix="$acl_final_exec_prefix"
18283
18284 eval additional_includedir=\"$includedir\"
18285 eval additional_libdir=\"$libdir\"
18286
18287 exec_prefix="$acl_save_exec_prefix"
18288 prefix="$acl_save_prefix"
18289
18290
18291 # Check whether --with-libbabeltrace-prefix was given.
18292 if test "${with_libbabeltrace_prefix+set}" = set; then :
18293 withval=$with_libbabeltrace_prefix;
18294 if test "X$withval" = "Xno"; then
18295 use_additional=no
18296 else
18297 if test "X$withval" = "X"; then
18298
18299 acl_save_prefix="$prefix"
18300 prefix="$acl_final_prefix"
18301 acl_save_exec_prefix="$exec_prefix"
18302 exec_prefix="$acl_final_exec_prefix"
18303
18304 eval additional_includedir=\"$includedir\"
18305 eval additional_libdir=\"$libdir\"
18306
18307 exec_prefix="$acl_save_exec_prefix"
18308 prefix="$acl_save_prefix"
18309
18310 else
18311 additional_includedir="$withval/include"
18312 additional_libdir="$withval/lib"
18313 fi
18314 fi
18315
18316 fi
18317
18318
18319 # Check whether --with-libbabeltrace-type was given.
18320 if test "${with_libbabeltrace_type+set}" = set; then :
18321 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
18322 else
18323 with_libbabeltrace_type=auto
18324 fi
18325
18326 lib_type=`eval echo \$with_libbabeltrace_type`
18327
18328 LIBBABELTRACE=
18329 LTLIBBABELTRACE=
18330 INCBABELTRACE=
18331 rpathdirs=
18332 ltrpathdirs=
18333 names_already_handled=
18334 names_next_round='babeltrace babeltrace-ctf'
18335 while test -n "$names_next_round"; do
18336 names_this_round="$names_next_round"
18337 names_next_round=
18338 for name in $names_this_round; do
18339 already_handled=
18340 for n in $names_already_handled; do
18341 if test "$n" = "$name"; then
18342 already_handled=yes
18343 break
18344 fi
18345 done
18346 if test -z "$already_handled"; then
18347 names_already_handled="$names_already_handled $name"
18348 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18349 eval value=\"\$HAVE_LIB$uppername\"
18350 if test -n "$value"; then
18351 if test "$value" = yes; then
18352 eval value=\"\$LIB$uppername\"
18353 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18354 eval value=\"\$LTLIB$uppername\"
18355 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18356 else
18357 :
18358 fi
18359 else
18360 found_dir=
18361 found_la=
18362 found_so=
18363 found_a=
18364 if test $use_additional = yes; then
18365 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18366 found_dir="$additional_libdir"
18367 found_so="$additional_libdir/lib$name.$shlibext"
18368 if test -f "$additional_libdir/lib$name.la"; then
18369 found_la="$additional_libdir/lib$name.la"
18370 fi
18371 elif test x$lib_type != xshared; then
18372 if test -f "$additional_libdir/lib$name.$libext"; then
18373 found_dir="$additional_libdir"
18374 found_a="$additional_libdir/lib$name.$libext"
18375 if test -f "$additional_libdir/lib$name.la"; then
18376 found_la="$additional_libdir/lib$name.la"
18377 fi
18378 fi
18379 fi
18380 fi
18381 if test "X$found_dir" = "X"; then
18382 for x in $LDFLAGS $LTLIBBABELTRACE; do
18383
18384 acl_save_prefix="$prefix"
18385 prefix="$acl_final_prefix"
18386 acl_save_exec_prefix="$exec_prefix"
18387 exec_prefix="$acl_final_exec_prefix"
18388 eval x=\"$x\"
18389 exec_prefix="$acl_save_exec_prefix"
18390 prefix="$acl_save_prefix"
18391
18392 case "$x" in
18393 -L*)
18394 dir=`echo "X$x" | sed -e 's/^X-L//'`
18395 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18396 found_dir="$dir"
18397 found_so="$dir/lib$name.$shlibext"
18398 if test -f "$dir/lib$name.la"; then
18399 found_la="$dir/lib$name.la"
18400 fi
18401 elif test x$lib_type != xshared; then
18402 if test -f "$dir/lib$name.$libext"; then
18403 found_dir="$dir"
18404 found_a="$dir/lib$name.$libext"
18405 if test -f "$dir/lib$name.la"; then
18406 found_la="$dir/lib$name.la"
18407 fi
18408 fi
18409 fi
18410 ;;
18411 esac
18412 if test "X$found_dir" != "X"; then
18413 break
18414 fi
18415 done
18416 fi
18417 if test "X$found_dir" != "X"; then
18418 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18419 if test "X$found_so" != "X"; then
18420 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18421 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18422 else
18423 haveit=
18424 for x in $ltrpathdirs; do
18425 if test "X$x" = "X$found_dir"; then
18426 haveit=yes
18427 break
18428 fi
18429 done
18430 if test -z "$haveit"; then
18431 ltrpathdirs="$ltrpathdirs $found_dir"
18432 fi
18433 if test "$hardcode_direct" = yes; then
18434 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18435 else
18436 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18437 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18438 haveit=
18439 for x in $rpathdirs; do
18440 if test "X$x" = "X$found_dir"; then
18441 haveit=yes
18442 break
18443 fi
18444 done
18445 if test -z "$haveit"; then
18446 rpathdirs="$rpathdirs $found_dir"
18447 fi
18448 else
18449 haveit=
18450 for x in $LDFLAGS $LIBBABELTRACE; do
18451
18452 acl_save_prefix="$prefix"
18453 prefix="$acl_final_prefix"
18454 acl_save_exec_prefix="$exec_prefix"
18455 exec_prefix="$acl_final_exec_prefix"
18456 eval x=\"$x\"
18457 exec_prefix="$acl_save_exec_prefix"
18458 prefix="$acl_save_prefix"
18459
18460 if test "X$x" = "X-L$found_dir"; then
18461 haveit=yes
18462 break
18463 fi
18464 done
18465 if test -z "$haveit"; then
18466 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18467 fi
18468 if test "$hardcode_minus_L" != no; then
18469 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18470 else
18471 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18472 fi
18473 fi
18474 fi
18475 fi
18476 else
18477 if test "X$found_a" != "X"; then
18478 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18479 else
18480 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18481 fi
18482 fi
18483 additional_includedir=
18484 case "$found_dir" in
18485 */lib | */lib/)
18486 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18487 additional_includedir="$basedir/include"
18488 ;;
18489 esac
18490 if test "X$additional_includedir" != "X"; then
18491 if test "X$additional_includedir" != "X/usr/include"; then
18492 haveit=
18493 if test "X$additional_includedir" = "X/usr/local/include"; then
18494 if test -n "$GCC"; then
18495 case $host_os in
18496 linux*) haveit=yes;;
18497 esac
18498 fi
18499 fi
18500 if test -z "$haveit"; then
18501 for x in $CPPFLAGS $INCBABELTRACE; do
18502
18503 acl_save_prefix="$prefix"
18504 prefix="$acl_final_prefix"
18505 acl_save_exec_prefix="$exec_prefix"
18506 exec_prefix="$acl_final_exec_prefix"
18507 eval x=\"$x\"
18508 exec_prefix="$acl_save_exec_prefix"
18509 prefix="$acl_save_prefix"
18510
18511 if test "X$x" = "X-I$additional_includedir"; then
18512 haveit=yes
18513 break
18514 fi
18515 done
18516 if test -z "$haveit"; then
18517 if test -d "$additional_includedir"; then
18518 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18519 fi
18520 fi
18521 fi
18522 fi
18523 fi
18524 if test -n "$found_la"; then
18525 save_libdir="$libdir"
18526 case "$found_la" in
18527 */* | *\\*) . "$found_la" ;;
18528 *) . "./$found_la" ;;
18529 esac
18530 libdir="$save_libdir"
18531 for dep in $dependency_libs; do
18532 case "$dep" in
18533 -L*)
18534 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18535 if test "X$additional_libdir" != "X/usr/lib"; then
18536 haveit=
18537 if test "X$additional_libdir" = "X/usr/local/lib"; then
18538 if test -n "$GCC"; then
18539 case $host_os in
18540 linux*) haveit=yes;;
18541 esac
18542 fi
18543 fi
18544 if test -z "$haveit"; then
18545 haveit=
18546 for x in $LDFLAGS $LIBBABELTRACE; do
18547
18548 acl_save_prefix="$prefix"
18549 prefix="$acl_final_prefix"
18550 acl_save_exec_prefix="$exec_prefix"
18551 exec_prefix="$acl_final_exec_prefix"
18552 eval x=\"$x\"
18553 exec_prefix="$acl_save_exec_prefix"
18554 prefix="$acl_save_prefix"
18555
18556 if test "X$x" = "X-L$additional_libdir"; then
18557 haveit=yes
18558 break
18559 fi
18560 done
18561 if test -z "$haveit"; then
18562 if test -d "$additional_libdir"; then
18563 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18564 fi
18565 fi
18566 haveit=
18567 for x in $LDFLAGS $LTLIBBABELTRACE; do
18568
18569 acl_save_prefix="$prefix"
18570 prefix="$acl_final_prefix"
18571 acl_save_exec_prefix="$exec_prefix"
18572 exec_prefix="$acl_final_exec_prefix"
18573 eval x=\"$x\"
18574 exec_prefix="$acl_save_exec_prefix"
18575 prefix="$acl_save_prefix"
18576
18577 if test "X$x" = "X-L$additional_libdir"; then
18578 haveit=yes
18579 break
18580 fi
18581 done
18582 if test -z "$haveit"; then
18583 if test -d "$additional_libdir"; then
18584 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18585 fi
18586 fi
18587 fi
18588 fi
18589 ;;
18590 -R*)
18591 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18592 if test "$enable_rpath" != no; then
18593 haveit=
18594 for x in $rpathdirs; do
18595 if test "X$x" = "X$dir"; then
18596 haveit=yes
18597 break
18598 fi
18599 done
18600 if test -z "$haveit"; then
18601 rpathdirs="$rpathdirs $dir"
18602 fi
18603 haveit=
18604 for x in $ltrpathdirs; do
18605 if test "X$x" = "X$dir"; then
18606 haveit=yes
18607 break
18608 fi
18609 done
18610 if test -z "$haveit"; then
18611 ltrpathdirs="$ltrpathdirs $dir"
18612 fi
18613 fi
18614 ;;
18615 -l*)
18616 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18617 ;;
18618 *.la)
18619 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18620 ;;
18621 *)
18622 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18623 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18624 ;;
18625 esac
18626 done
18627 fi
18628 else
18629 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
18630 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18631 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
18632 else
18633 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
18634 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
18635 fi
18636 fi
18637 fi
18638 fi
18639 done
18640 done
18641 if test "X$rpathdirs" != "X"; then
18642 if test -n "$hardcode_libdir_separator"; then
18643 alldirs=
18644 for found_dir in $rpathdirs; do
18645 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18646 done
18647 acl_save_libdir="$libdir"
18648 libdir="$alldirs"
18649 eval flag=\"$hardcode_libdir_flag_spec\"
18650 libdir="$acl_save_libdir"
18651 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18652 else
18653 for found_dir in $rpathdirs; do
18654 acl_save_libdir="$libdir"
18655 libdir="$found_dir"
18656 eval flag=\"$hardcode_libdir_flag_spec\"
18657 libdir="$acl_save_libdir"
18658 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18659 done
18660 fi
18661 fi
18662 if test "X$ltrpathdirs" != "X"; then
18663 for found_dir in $ltrpathdirs; do
18664 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
18665 done
18666 fi
18667
18668
18669 ac_save_CPPFLAGS="$CPPFLAGS"
18670
18671 for element in $INCBABELTRACE; do
18672 haveit=
18673 for x in $CPPFLAGS; do
18674
18675 acl_save_prefix="$prefix"
18676 prefix="$acl_final_prefix"
18677 acl_save_exec_prefix="$exec_prefix"
18678 exec_prefix="$acl_final_exec_prefix"
18679 eval x=\"$x\"
18680 exec_prefix="$acl_save_exec_prefix"
18681 prefix="$acl_save_prefix"
18682
18683 if test "X$x" = "X$element"; then
18684 haveit=yes
18685 break
18686 fi
18687 done
18688 if test -z "$haveit"; then
18689 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18690 fi
18691 done
18692
18693
18694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
18695 $as_echo_n "checking for libbabeltrace... " >&6; }
18696 if ${ac_cv_libbabeltrace+:} false; then :
18697 $as_echo_n "(cached) " >&6
18698 else
18699
18700 ac_save_LIBS="$LIBS"
18701 LIBS="$LIBS $LIBBABELTRACE"
18702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18703 /* end confdefs.h. */
18704 #include <babeltrace/babeltrace.h>
18705 #include <babeltrace/ctf/events.h>
18706 #include <babeltrace/ctf/iterator.h>
18707 int
18708 main ()
18709 {
18710 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
18711 struct bt_ctf_event *event = NULL;
18712 const struct bt_definition *scope;
18713
18714 pos->type = BT_SEEK_BEGIN;
18715 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
18716 scope = bt_ctf_get_top_level_scope (event,
18717 BT_STREAM_EVENT_HEADER);
18718 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
18719
18720 ;
18721 return 0;
18722 }
18723 _ACEOF
18724 if ac_fn_c_try_link "$LINENO"; then :
18725 ac_cv_libbabeltrace=yes
18726 else
18727 ac_cv_libbabeltrace=no
18728 fi
18729 rm -f core conftest.err conftest.$ac_objext \
18730 conftest$ac_exeext conftest.$ac_ext
18731 LIBS="$ac_save_LIBS"
18732
18733 fi
18734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
18735 $as_echo "$ac_cv_libbabeltrace" >&6; }
18736 if test "$ac_cv_libbabeltrace" = yes; then
18737 HAVE_LIBBABELTRACE=yes
18738
18739 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
18740
18741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
18742 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
18743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
18744 $as_echo "$LIBBABELTRACE" >&6; }
18745 else
18746 HAVE_LIBBABELTRACE=no
18747 CPPFLAGS="$ac_save_CPPFLAGS"
18748 LIBBABELTRACE=
18749 LTLIBBABELTRACE=
18750 fi
18751
18752
18753
18754
18755
18756
18757 CFLAGS=$saved_CFLAGS
18758
18759 if test "$HAVE_LIBBABELTRACE" != yes; then
18760 if test "$with_babeltrace" = yes; then
18761 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
18762 else
18763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
18764 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
18765 fi
18766 fi
18767 fi
18768
18769 # Check for xxhash
18770
18771 # Check whether --with-xxhash was given.
18772 if test "${with_xxhash+set}" = set; then :
18773 withval=$with_xxhash;
18774 else
18775 with_xxhash=auto
18776 fi
18777
18778
18779 # Check whether --enable-libctf was given.
18780 if test "${enable_libctf+set}" = set; then :
18781 enableval=$enable_libctf;
18782 case "$enableval" in
18783 yes|no) ;;
18784 *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
18785 esac
18786
18787 else
18788 enable_libctf=yes
18789 fi
18790
18791
18792 if test x${enable_static} = xno; then
18793 LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
18794 CTF_DEPS="../libctf/.libs/libctf.so"
18795 else
18796 LIBCTF="../libctf/.libs/libctf.a"
18797 CTF_DEPS="$LIBCTF"
18798 fi
18799 if test "${enable_libctf}" = yes; then
18800
18801 $as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
18802
18803 else
18804 LIBCTF=
18805 CTF_DEPS=
18806 fi
18807
18808
18809
18810
18811 # If nativefile (NAT_FILE) is not set in configure.nat, we link to an
18812 # empty version.
18813
18814 if test "x$with_xxhash" != "xno"; then
18815
18816
18817
18818
18819
18820
18821
18822
18823 use_additional=yes
18824
18825 acl_save_prefix="$prefix"
18826 prefix="$acl_final_prefix"
18827 acl_save_exec_prefix="$exec_prefix"
18828 exec_prefix="$acl_final_exec_prefix"
18829
18830 eval additional_includedir=\"$includedir\"
18831 eval additional_libdir=\"$libdir\"
18832
18833 exec_prefix="$acl_save_exec_prefix"
18834 prefix="$acl_save_prefix"
18835
18836
18837 # Check whether --with-libxxhash-prefix was given.
18838 if test "${with_libxxhash_prefix+set}" = set; then :
18839 withval=$with_libxxhash_prefix;
18840 if test "X$withval" = "Xno"; then
18841 use_additional=no
18842 else
18843 if test "X$withval" = "X"; then
18844
18845 acl_save_prefix="$prefix"
18846 prefix="$acl_final_prefix"
18847 acl_save_exec_prefix="$exec_prefix"
18848 exec_prefix="$acl_final_exec_prefix"
18849
18850 eval additional_includedir=\"$includedir\"
18851 eval additional_libdir=\"$libdir\"
18852
18853 exec_prefix="$acl_save_exec_prefix"
18854 prefix="$acl_save_prefix"
18855
18856 else
18857 additional_includedir="$withval/include"
18858 additional_libdir="$withval/lib"
18859 fi
18860 fi
18861
18862 fi
18863
18864
18865 # Check whether --with-libxxhash-type was given.
18866 if test "${with_libxxhash_type+set}" = set; then :
18867 withval=$with_libxxhash_type; with_libxxhash_type=$withval
18868 else
18869 with_libxxhash_type=auto
18870 fi
18871
18872 lib_type=`eval echo \$with_libxxhash_type`
18873
18874 LIBXXHASH=
18875 LTLIBXXHASH=
18876 INCXXHASH=
18877 rpathdirs=
18878 ltrpathdirs=
18879 names_already_handled=
18880 names_next_round='xxhash '
18881 while test -n "$names_next_round"; do
18882 names_this_round="$names_next_round"
18883 names_next_round=
18884 for name in $names_this_round; do
18885 already_handled=
18886 for n in $names_already_handled; do
18887 if test "$n" = "$name"; then
18888 already_handled=yes
18889 break
18890 fi
18891 done
18892 if test -z "$already_handled"; then
18893 names_already_handled="$names_already_handled $name"
18894 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18895 eval value=\"\$HAVE_LIB$uppername\"
18896 if test -n "$value"; then
18897 if test "$value" = yes; then
18898 eval value=\"\$LIB$uppername\"
18899 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
18900 eval value=\"\$LTLIB$uppername\"
18901 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
18902 else
18903 :
18904 fi
18905 else
18906 found_dir=
18907 found_la=
18908 found_so=
18909 found_a=
18910 if test $use_additional = yes; then
18911 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18912 found_dir="$additional_libdir"
18913 found_so="$additional_libdir/lib$name.$shlibext"
18914 if test -f "$additional_libdir/lib$name.la"; then
18915 found_la="$additional_libdir/lib$name.la"
18916 fi
18917 elif test x$lib_type != xshared; then
18918 if test -f "$additional_libdir/lib$name.$libext"; then
18919 found_dir="$additional_libdir"
18920 found_a="$additional_libdir/lib$name.$libext"
18921 if test -f "$additional_libdir/lib$name.la"; then
18922 found_la="$additional_libdir/lib$name.la"
18923 fi
18924 fi
18925 fi
18926 fi
18927 if test "X$found_dir" = "X"; then
18928 for x in $LDFLAGS $LTLIBXXHASH; do
18929
18930 acl_save_prefix="$prefix"
18931 prefix="$acl_final_prefix"
18932 acl_save_exec_prefix="$exec_prefix"
18933 exec_prefix="$acl_final_exec_prefix"
18934 eval x=\"$x\"
18935 exec_prefix="$acl_save_exec_prefix"
18936 prefix="$acl_save_prefix"
18937
18938 case "$x" in
18939 -L*)
18940 dir=`echo "X$x" | sed -e 's/^X-L//'`
18941 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18942 found_dir="$dir"
18943 found_so="$dir/lib$name.$shlibext"
18944 if test -f "$dir/lib$name.la"; then
18945 found_la="$dir/lib$name.la"
18946 fi
18947 elif test x$lib_type != xshared; then
18948 if test -f "$dir/lib$name.$libext"; then
18949 found_dir="$dir"
18950 found_a="$dir/lib$name.$libext"
18951 if test -f "$dir/lib$name.la"; then
18952 found_la="$dir/lib$name.la"
18953 fi
18954 fi
18955 fi
18956 ;;
18957 esac
18958 if test "X$found_dir" != "X"; then
18959 break
18960 fi
18961 done
18962 fi
18963 if test "X$found_dir" != "X"; then
18964 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
18965 if test "X$found_so" != "X"; then
18966 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18967 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18968 else
18969 haveit=
18970 for x in $ltrpathdirs; do
18971 if test "X$x" = "X$found_dir"; then
18972 haveit=yes
18973 break
18974 fi
18975 done
18976 if test -z "$haveit"; then
18977 ltrpathdirs="$ltrpathdirs $found_dir"
18978 fi
18979 if test "$hardcode_direct" = yes; then
18980 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18981 else
18982 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18983 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18984 haveit=
18985 for x in $rpathdirs; do
18986 if test "X$x" = "X$found_dir"; then
18987 haveit=yes
18988 break
18989 fi
18990 done
18991 if test -z "$haveit"; then
18992 rpathdirs="$rpathdirs $found_dir"
18993 fi
18994 else
18995 haveit=
18996 for x in $LDFLAGS $LIBXXHASH; do
18997
18998 acl_save_prefix="$prefix"
18999 prefix="$acl_final_prefix"
19000 acl_save_exec_prefix="$exec_prefix"
19001 exec_prefix="$acl_final_exec_prefix"
19002 eval x=\"$x\"
19003 exec_prefix="$acl_save_exec_prefix"
19004 prefix="$acl_save_prefix"
19005
19006 if test "X$x" = "X-L$found_dir"; then
19007 haveit=yes
19008 break
19009 fi
19010 done
19011 if test -z "$haveit"; then
19012 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
19013 fi
19014 if test "$hardcode_minus_L" != no; then
19015 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19016 else
19017 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19018 fi
19019 fi
19020 fi
19021 fi
19022 else
19023 if test "X$found_a" != "X"; then
19024 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
19025 else
19026 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
19027 fi
19028 fi
19029 additional_includedir=
19030 case "$found_dir" in
19031 */lib | */lib/)
19032 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19033 additional_includedir="$basedir/include"
19034 ;;
19035 esac
19036 if test "X$additional_includedir" != "X"; then
19037 if test "X$additional_includedir" != "X/usr/include"; then
19038 haveit=
19039 if test "X$additional_includedir" = "X/usr/local/include"; then
19040 if test -n "$GCC"; then
19041 case $host_os in
19042 linux*) haveit=yes;;
19043 esac
19044 fi
19045 fi
19046 if test -z "$haveit"; then
19047 for x in $CPPFLAGS $INCXXHASH; do
19048
19049 acl_save_prefix="$prefix"
19050 prefix="$acl_final_prefix"
19051 acl_save_exec_prefix="$exec_prefix"
19052 exec_prefix="$acl_final_exec_prefix"
19053 eval x=\"$x\"
19054 exec_prefix="$acl_save_exec_prefix"
19055 prefix="$acl_save_prefix"
19056
19057 if test "X$x" = "X-I$additional_includedir"; then
19058 haveit=yes
19059 break
19060 fi
19061 done
19062 if test -z "$haveit"; then
19063 if test -d "$additional_includedir"; then
19064 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
19065 fi
19066 fi
19067 fi
19068 fi
19069 fi
19070 if test -n "$found_la"; then
19071 save_libdir="$libdir"
19072 case "$found_la" in
19073 */* | *\\*) . "$found_la" ;;
19074 *) . "./$found_la" ;;
19075 esac
19076 libdir="$save_libdir"
19077 for dep in $dependency_libs; do
19078 case "$dep" in
19079 -L*)
19080 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19081 if test "X$additional_libdir" != "X/usr/lib"; then
19082 haveit=
19083 if test "X$additional_libdir" = "X/usr/local/lib"; then
19084 if test -n "$GCC"; then
19085 case $host_os in
19086 linux*) haveit=yes;;
19087 esac
19088 fi
19089 fi
19090 if test -z "$haveit"; then
19091 haveit=
19092 for x in $LDFLAGS $LIBXXHASH; do
19093
19094 acl_save_prefix="$prefix"
19095 prefix="$acl_final_prefix"
19096 acl_save_exec_prefix="$exec_prefix"
19097 exec_prefix="$acl_final_exec_prefix"
19098 eval x=\"$x\"
19099 exec_prefix="$acl_save_exec_prefix"
19100 prefix="$acl_save_prefix"
19101
19102 if test "X$x" = "X-L$additional_libdir"; then
19103 haveit=yes
19104 break
19105 fi
19106 done
19107 if test -z "$haveit"; then
19108 if test -d "$additional_libdir"; then
19109 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
19110 fi
19111 fi
19112 haveit=
19113 for x in $LDFLAGS $LTLIBXXHASH; do
19114
19115 acl_save_prefix="$prefix"
19116 prefix="$acl_final_prefix"
19117 acl_save_exec_prefix="$exec_prefix"
19118 exec_prefix="$acl_final_exec_prefix"
19119 eval x=\"$x\"
19120 exec_prefix="$acl_save_exec_prefix"
19121 prefix="$acl_save_prefix"
19122
19123 if test "X$x" = "X-L$additional_libdir"; then
19124 haveit=yes
19125 break
19126 fi
19127 done
19128 if test -z "$haveit"; then
19129 if test -d "$additional_libdir"; then
19130 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
19131 fi
19132 fi
19133 fi
19134 fi
19135 ;;
19136 -R*)
19137 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19138 if test "$enable_rpath" != no; then
19139 haveit=
19140 for x in $rpathdirs; do
19141 if test "X$x" = "X$dir"; then
19142 haveit=yes
19143 break
19144 fi
19145 done
19146 if test -z "$haveit"; then
19147 rpathdirs="$rpathdirs $dir"
19148 fi
19149 haveit=
19150 for x in $ltrpathdirs; do
19151 if test "X$x" = "X$dir"; then
19152 haveit=yes
19153 break
19154 fi
19155 done
19156 if test -z "$haveit"; then
19157 ltrpathdirs="$ltrpathdirs $dir"
19158 fi
19159 fi
19160 ;;
19161 -l*)
19162 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19163 ;;
19164 *.la)
19165 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19166 ;;
19167 *)
19168 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
19169 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
19170 ;;
19171 esac
19172 done
19173 fi
19174 else
19175 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19176 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19177 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
19178 else
19179 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
19180 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
19181 fi
19182 fi
19183 fi
19184 fi
19185 done
19186 done
19187 if test "X$rpathdirs" != "X"; then
19188 if test -n "$hardcode_libdir_separator"; then
19189 alldirs=
19190 for found_dir in $rpathdirs; do
19191 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19192 done
19193 acl_save_libdir="$libdir"
19194 libdir="$alldirs"
19195 eval flag=\"$hardcode_libdir_flag_spec\"
19196 libdir="$acl_save_libdir"
19197 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19198 else
19199 for found_dir in $rpathdirs; do
19200 acl_save_libdir="$libdir"
19201 libdir="$found_dir"
19202 eval flag=\"$hardcode_libdir_flag_spec\"
19203 libdir="$acl_save_libdir"
19204 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19205 done
19206 fi
19207 fi
19208 if test "X$ltrpathdirs" != "X"; then
19209 for found_dir in $ltrpathdirs; do
19210 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
19211 done
19212 fi
19213
19214
19215 ac_save_CPPFLAGS="$CPPFLAGS"
19216
19217 for element in $INCXXHASH; do
19218 haveit=
19219 for x in $CPPFLAGS; do
19220
19221 acl_save_prefix="$prefix"
19222 prefix="$acl_final_prefix"
19223 acl_save_exec_prefix="$exec_prefix"
19224 exec_prefix="$acl_final_exec_prefix"
19225 eval x=\"$x\"
19226 exec_prefix="$acl_save_exec_prefix"
19227 prefix="$acl_save_prefix"
19228
19229 if test "X$x" = "X$element"; then
19230 haveit=yes
19231 break
19232 fi
19233 done
19234 if test -z "$haveit"; then
19235 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19236 fi
19237 done
19238
19239
19240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
19241 $as_echo_n "checking for libxxhash... " >&6; }
19242 if ${ac_cv_libxxhash+:} false; then :
19243 $as_echo_n "(cached) " >&6
19244 else
19245
19246 ac_save_LIBS="$LIBS"
19247 LIBS="$LIBS $LIBXXHASH"
19248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19249 /* end confdefs.h. */
19250 #include <xxhash.h>
19251 int
19252 main ()
19253 {
19254 XXH32("foo", 3, 0);
19255
19256 ;
19257 return 0;
19258 }
19259 _ACEOF
19260 if ac_fn_c_try_link "$LINENO"; then :
19261 ac_cv_libxxhash=yes
19262 else
19263 ac_cv_libxxhash=no
19264 fi
19265 rm -f core conftest.err conftest.$ac_objext \
19266 conftest$ac_exeext conftest.$ac_ext
19267 LIBS="$ac_save_LIBS"
19268
19269 fi
19270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
19271 $as_echo "$ac_cv_libxxhash" >&6; }
19272 if test "$ac_cv_libxxhash" = yes; then
19273 HAVE_LIBXXHASH=yes
19274
19275 $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
19276
19277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
19278 $as_echo_n "checking how to link with libxxhash... " >&6; }
19279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
19280 $as_echo "$LIBXXHASH" >&6; }
19281 else
19282 HAVE_LIBXXHASH=no
19283 CPPFLAGS="$ac_save_CPPFLAGS"
19284 LIBXXHASH=
19285 LTLIBXXHASH=
19286 fi
19287
19288
19289
19290
19291
19292
19293 if test "$HAVE_LIBXXHASH" != yes; then
19294 if test "$with_xxhash" = yes; then
19295 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
19296 fi
19297 fi
19298 if test "x$with_xxhash" = "xauto"; then
19299 with_xxhash="$HAVE_LIBXXHASH"
19300 fi
19301 fi
19302
19303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
19304 $as_echo_n "checking whether to use xxhash... " >&6; }
19305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
19306 $as_echo "$with_xxhash" >&6; }
19307
19308 NM_H=
19309 rm -f nm.h
19310 if test "${nativefile}" != ""; then
19311 case "${nativefile}" in
19312 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
19313 * ) GDB_NM_FILE="${nativefile}"
19314 esac
19315 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
19316
19317
19318 cat >>confdefs.h <<_ACEOF
19319 #define GDB_NM_FILE "${GDB_NM_FILE}"
19320 _ACEOF
19321
19322 NM_H=nm.h
19323 fi
19324
19325
19326
19327 for ac_prog in xsltproc
19328 do
19329 # Extract the first word of "$ac_prog", so it can be a program name with args.
19330 set dummy $ac_prog; ac_word=$2
19331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19332 $as_echo_n "checking for $ac_word... " >&6; }
19333 if ${ac_cv_path_XSLTPROC+:} false; then :
19334 $as_echo_n "(cached) " >&6
19335 else
19336 case $XSLTPROC in
19337 [\\/]* | ?:[\\/]*)
19338 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19339 ;;
19340 *)
19341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19342 for as_dir in $PATH
19343 do
19344 IFS=$as_save_IFS
19345 test -z "$as_dir" && as_dir=.
19346 for ac_exec_ext in '' $ac_executable_extensions; do
19347 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19348 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19349 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19350 break 2
19351 fi
19352 done
19353 done
19354 IFS=$as_save_IFS
19355
19356 ;;
19357 esac
19358 fi
19359 XSLTPROC=$ac_cv_path_XSLTPROC
19360 if test -n "$XSLTPROC"; then
19361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19362 $as_echo "$XSLTPROC" >&6; }
19363 else
19364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19365 $as_echo "no" >&6; }
19366 fi
19367
19368
19369 test -n "$XSLTPROC" && break
19370 done
19371 test -n "$XSLTPROC" || XSLTPROC="missing"
19372
19373 if test "x$USE_MAINTAINER_MODE" = xyes; then
19374 if test "${XSLTPROC}" = missing; then
19375 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
19376 fi
19377 fi
19378
19379
19380
19381
19382
19383 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
19384
19385
19386
19387 # Check whether we will enable the inclusion of unit tests when
19388 # compiling GDB.
19389 #
19390 # The default value of this option changes depending whether we're on
19391 # development mode (in which case it's "true") or not (in which case
19392 # it's "false"). The $development variable is set by the GDB_AC_COMMON
19393 # macro, which must therefore be used before GDB_AC_SELFTEST.
19394
19395 if test "x$development" != xtrue && test "x$development" != xfalse; then :
19396 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
19397 fi
19398
19399 # Check whether --enable-unit-tests was given.
19400 if test "${enable_unit_tests+set}" = set; then :
19401 enableval=$enable_unit_tests; case "${enableval}" in
19402 yes) enable_unittests=true ;;
19403 no) enable_unittests=false ;;
19404 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19405 esac
19406 else
19407 enable_unittests=$development
19408 fi
19409
19410
19411 if $enable_unittests; then
19412
19413 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19414
19415
19416 CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
19417 CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
19418
19419 fi
19420
19421
19422
19423 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19424 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19425 if test "x$GDB_TRANSFORM_NAME" = x; then
19426 GDB_TRANSFORM_NAME=gdb
19427 fi
19428
19429
19430
19431 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19432 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19433 if test "x$GCORE_TRANSFORM_NAME" = x; then
19434 GCORE_TRANSFORM_NAME=gcore
19435 fi
19436
19437
19438 ac_config_files="$ac_config_files gcore"
19439
19440 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
19441
19442
19443 cat >confcache <<\_ACEOF
19444 # This file is a shell script that caches the results of configure
19445 # tests run on this system so they can be shared between configure
19446 # scripts and configure runs, see configure's option --config-cache.
19447 # It is not useful on other systems. If it contains results you don't
19448 # want to keep, you may remove or edit it.
19449 #
19450 # config.status only pays attention to the cache file if you give it
19451 # the --recheck option to rerun configure.
19452 #
19453 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19454 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19455 # following values.
19456
19457 _ACEOF
19458
19459 # The following way of writing the cache mishandles newlines in values,
19460 # but we know of no workaround that is simple, portable, and efficient.
19461 # So, we kill variables containing newlines.
19462 # Ultrix sh set writes to stderr and can't be redirected directly,
19463 # and sets the high bit in the cache file unless we assign to the vars.
19464 (
19465 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19466 eval ac_val=\$$ac_var
19467 case $ac_val in #(
19468 *${as_nl}*)
19469 case $ac_var in #(
19470 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19471 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19472 esac
19473 case $ac_var in #(
19474 _ | IFS | as_nl) ;; #(
19475 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19476 *) { eval $ac_var=; unset $ac_var;} ;;
19477 esac ;;
19478 esac
19479 done
19480
19481 (set) 2>&1 |
19482 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19483 *${as_nl}ac_space=\ *)
19484 # `set' does not quote correctly, so add quotes: double-quote
19485 # substitution turns \\\\ into \\, and sed turns \\ into \.
19486 sed -n \
19487 "s/'/'\\\\''/g;
19488 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19489 ;; #(
19490 *)
19491 # `set' quotes correctly as required by POSIX, so do not add quotes.
19492 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19493 ;;
19494 esac |
19495 sort
19496 ) |
19497 sed '
19498 /^ac_cv_env_/b end
19499 t clear
19500 :clear
19501 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19502 t end
19503 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19504 :end' >>confcache
19505 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19506 if test -w "$cache_file"; then
19507 if test "x$cache_file" != "x/dev/null"; then
19508 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19509 $as_echo "$as_me: updating cache $cache_file" >&6;}
19510 if test ! -f "$cache_file" || test -h "$cache_file"; then
19511 cat confcache >"$cache_file"
19512 else
19513 case $cache_file in #(
19514 */* | ?:*)
19515 mv -f confcache "$cache_file"$$ &&
19516 mv -f "$cache_file"$$ "$cache_file" ;; #(
19517 *)
19518 mv -f confcache "$cache_file" ;;
19519 esac
19520 fi
19521 fi
19522 else
19523 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19524 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19525 fi
19526 fi
19527 rm -f confcache
19528
19529 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19530 # Let make expand exec_prefix.
19531 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19532
19533 DEFS=-DHAVE_CONFIG_H
19534
19535 ac_libobjs=
19536 ac_ltlibobjs=
19537 U=
19538 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19539 # 1. Remove the extension, and $U if already installed.
19540 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19541 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19542 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19543 # will be set to the directory where LIBOBJS objects are built.
19544 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19545 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19546 done
19547 LIBOBJS=$ac_libobjs
19548
19549 LTLIBOBJS=$ac_ltlibobjs
19550
19551
19552 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
19553 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
19554 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19555 fi
19556 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
19557 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
19558 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19559 fi
19560 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
19561 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
19562 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19563 fi
19564
19565
19566 : "${CONFIG_STATUS=./config.status}"
19567 ac_write_fail=0
19568 ac_clean_files_save=$ac_clean_files
19569 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19570 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19571 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19572 as_write_fail=0
19573 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19574 #! $SHELL
19575 # Generated by $as_me.
19576 # Run this file to recreate the current configuration.
19577 # Compiler output produced by configure, useful for debugging
19578 # configure, is in config.log if it exists.
19579
19580 debug=false
19581 ac_cs_recheck=false
19582 ac_cs_silent=false
19583
19584 SHELL=\${CONFIG_SHELL-$SHELL}
19585 export SHELL
19586 _ASEOF
19587 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19588 ## -------------------- ##
19589 ## M4sh Initialization. ##
19590 ## -------------------- ##
19591
19592 # Be more Bourne compatible
19593 DUALCASE=1; export DUALCASE # for MKS sh
19594 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19595 emulate sh
19596 NULLCMD=:
19597 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19598 # is contrary to our usage. Disable this feature.
19599 alias -g '${1+"$@"}'='"$@"'
19600 setopt NO_GLOB_SUBST
19601 else
19602 case `(set -o) 2>/dev/null` in #(
19603 *posix*) :
19604 set -o posix ;; #(
19605 *) :
19606 ;;
19607 esac
19608 fi
19609
19610
19611 as_nl='
19612 '
19613 export as_nl
19614 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19615 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19616 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19617 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19618 # Prefer a ksh shell builtin over an external printf program on Solaris,
19619 # but without wasting forks for bash or zsh.
19620 if test -z "$BASH_VERSION$ZSH_VERSION" \
19621 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19622 as_echo='print -r --'
19623 as_echo_n='print -rn --'
19624 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19625 as_echo='printf %s\n'
19626 as_echo_n='printf %s'
19627 else
19628 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19629 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19630 as_echo_n='/usr/ucb/echo -n'
19631 else
19632 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19633 as_echo_n_body='eval
19634 arg=$1;
19635 case $arg in #(
19636 *"$as_nl"*)
19637 expr "X$arg" : "X\\(.*\\)$as_nl";
19638 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19639 esac;
19640 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19641 '
19642 export as_echo_n_body
19643 as_echo_n='sh -c $as_echo_n_body as_echo'
19644 fi
19645 export as_echo_body
19646 as_echo='sh -c $as_echo_body as_echo'
19647 fi
19648
19649 # The user is always right.
19650 if test "${PATH_SEPARATOR+set}" != set; then
19651 PATH_SEPARATOR=:
19652 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19653 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19654 PATH_SEPARATOR=';'
19655 }
19656 fi
19657
19658
19659 # IFS
19660 # We need space, tab and new line, in precisely that order. Quoting is
19661 # there to prevent editors from complaining about space-tab.
19662 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19663 # splitting by setting IFS to empty value.)
19664 IFS=" "" $as_nl"
19665
19666 # Find who we are. Look in the path if we contain no directory separator.
19667 as_myself=
19668 case $0 in #((
19669 *[\\/]* ) as_myself=$0 ;;
19670 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19671 for as_dir in $PATH
19672 do
19673 IFS=$as_save_IFS
19674 test -z "$as_dir" && as_dir=.
19675 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19676 done
19677 IFS=$as_save_IFS
19678
19679 ;;
19680 esac
19681 # We did not find ourselves, most probably we were run as `sh COMMAND'
19682 # in which case we are not to be found in the path.
19683 if test "x$as_myself" = x; then
19684 as_myself=$0
19685 fi
19686 if test ! -f "$as_myself"; then
19687 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19688 exit 1
19689 fi
19690
19691 # Unset variables that we do not need and which cause bugs (e.g. in
19692 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19693 # suppresses any "Segmentation fault" message there. '((' could
19694 # trigger a bug in pdksh 5.2.14.
19695 for as_var in BASH_ENV ENV MAIL MAILPATH
19696 do eval test x\${$as_var+set} = xset \
19697 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19698 done
19699 PS1='$ '
19700 PS2='> '
19701 PS4='+ '
19702
19703 # NLS nuisances.
19704 LC_ALL=C
19705 export LC_ALL
19706 LANGUAGE=C
19707 export LANGUAGE
19708
19709 # CDPATH.
19710 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19711
19712
19713 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19714 # ----------------------------------------
19715 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19716 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19717 # script with STATUS, using 1 if that was 0.
19718 as_fn_error ()
19719 {
19720 as_status=$1; test $as_status -eq 0 && as_status=1
19721 if test "$4"; then
19722 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19723 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19724 fi
19725 $as_echo "$as_me: error: $2" >&2
19726 as_fn_exit $as_status
19727 } # as_fn_error
19728
19729
19730 # as_fn_set_status STATUS
19731 # -----------------------
19732 # Set $? to STATUS, without forking.
19733 as_fn_set_status ()
19734 {
19735 return $1
19736 } # as_fn_set_status
19737
19738 # as_fn_exit STATUS
19739 # -----------------
19740 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19741 as_fn_exit ()
19742 {
19743 set +e
19744 as_fn_set_status $1
19745 exit $1
19746 } # as_fn_exit
19747
19748 # as_fn_unset VAR
19749 # ---------------
19750 # Portably unset VAR.
19751 as_fn_unset ()
19752 {
19753 { eval $1=; unset $1;}
19754 }
19755 as_unset=as_fn_unset
19756 # as_fn_append VAR VALUE
19757 # ----------------------
19758 # Append the text in VALUE to the end of the definition contained in VAR. Take
19759 # advantage of any shell optimizations that allow amortized linear growth over
19760 # repeated appends, instead of the typical quadratic growth present in naive
19761 # implementations.
19762 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19763 eval 'as_fn_append ()
19764 {
19765 eval $1+=\$2
19766 }'
19767 else
19768 as_fn_append ()
19769 {
19770 eval $1=\$$1\$2
19771 }
19772 fi # as_fn_append
19773
19774 # as_fn_arith ARG...
19775 # ------------------
19776 # Perform arithmetic evaluation on the ARGs, and store the result in the
19777 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19778 # must be portable across $(()) and expr.
19779 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19780 eval 'as_fn_arith ()
19781 {
19782 as_val=$(( $* ))
19783 }'
19784 else
19785 as_fn_arith ()
19786 {
19787 as_val=`expr "$@" || test $? -eq 1`
19788 }
19789 fi # as_fn_arith
19790
19791
19792 if expr a : '\(a\)' >/dev/null 2>&1 &&
19793 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19794 as_expr=expr
19795 else
19796 as_expr=false
19797 fi
19798
19799 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19800 as_basename=basename
19801 else
19802 as_basename=false
19803 fi
19804
19805 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19806 as_dirname=dirname
19807 else
19808 as_dirname=false
19809 fi
19810
19811 as_me=`$as_basename -- "$0" ||
19812 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19813 X"$0" : 'X\(//\)$' \| \
19814 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19815 $as_echo X/"$0" |
19816 sed '/^.*\/\([^/][^/]*\)\/*$/{
19817 s//\1/
19818 q
19819 }
19820 /^X\/\(\/\/\)$/{
19821 s//\1/
19822 q
19823 }
19824 /^X\/\(\/\).*/{
19825 s//\1/
19826 q
19827 }
19828 s/.*/./; q'`
19829
19830 # Avoid depending upon Character Ranges.
19831 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19832 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19833 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19834 as_cr_digits='0123456789'
19835 as_cr_alnum=$as_cr_Letters$as_cr_digits
19836
19837 ECHO_C= ECHO_N= ECHO_T=
19838 case `echo -n x` in #(((((
19839 -n*)
19840 case `echo 'xy\c'` in
19841 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19842 xy) ECHO_C='\c';;
19843 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19844 ECHO_T=' ';;
19845 esac;;
19846 *)
19847 ECHO_N='-n';;
19848 esac
19849
19850 rm -f conf$$ conf$$.exe conf$$.file
19851 if test -d conf$$.dir; then
19852 rm -f conf$$.dir/conf$$.file
19853 else
19854 rm -f conf$$.dir
19855 mkdir conf$$.dir 2>/dev/null
19856 fi
19857 if (echo >conf$$.file) 2>/dev/null; then
19858 if ln -s conf$$.file conf$$ 2>/dev/null; then
19859 as_ln_s='ln -s'
19860 # ... but there are two gotchas:
19861 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19862 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19863 # In both cases, we have to default to `cp -pR'.
19864 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19865 as_ln_s='cp -pR'
19866 elif ln conf$$.file conf$$ 2>/dev/null; then
19867 as_ln_s=ln
19868 else
19869 as_ln_s='cp -pR'
19870 fi
19871 else
19872 as_ln_s='cp -pR'
19873 fi
19874 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19875 rmdir conf$$.dir 2>/dev/null
19876
19877
19878 # as_fn_mkdir_p
19879 # -------------
19880 # Create "$as_dir" as a directory, including parents if necessary.
19881 as_fn_mkdir_p ()
19882 {
19883
19884 case $as_dir in #(
19885 -*) as_dir=./$as_dir;;
19886 esac
19887 test -d "$as_dir" || eval $as_mkdir_p || {
19888 as_dirs=
19889 while :; do
19890 case $as_dir in #(
19891 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19892 *) as_qdir=$as_dir;;
19893 esac
19894 as_dirs="'$as_qdir' $as_dirs"
19895 as_dir=`$as_dirname -- "$as_dir" ||
19896 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19897 X"$as_dir" : 'X\(//\)[^/]' \| \
19898 X"$as_dir" : 'X\(//\)$' \| \
19899 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19900 $as_echo X"$as_dir" |
19901 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19902 s//\1/
19903 q
19904 }
19905 /^X\(\/\/\)[^/].*/{
19906 s//\1/
19907 q
19908 }
19909 /^X\(\/\/\)$/{
19910 s//\1/
19911 q
19912 }
19913 /^X\(\/\).*/{
19914 s//\1/
19915 q
19916 }
19917 s/.*/./; q'`
19918 test -d "$as_dir" && break
19919 done
19920 test -z "$as_dirs" || eval "mkdir $as_dirs"
19921 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19922
19923
19924 } # as_fn_mkdir_p
19925 if mkdir -p . 2>/dev/null; then
19926 as_mkdir_p='mkdir -p "$as_dir"'
19927 else
19928 test -d ./-p && rmdir ./-p
19929 as_mkdir_p=false
19930 fi
19931
19932
19933 # as_fn_executable_p FILE
19934 # -----------------------
19935 # Test if FILE is an executable regular file.
19936 as_fn_executable_p ()
19937 {
19938 test -f "$1" && test -x "$1"
19939 } # as_fn_executable_p
19940 as_test_x='test -x'
19941 as_executable_p=as_fn_executable_p
19942
19943 # Sed expression to map a string onto a valid CPP name.
19944 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19945
19946 # Sed expression to map a string onto a valid variable name.
19947 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19948
19949
19950 exec 6>&1
19951 ## ----------------------------------- ##
19952 ## Main body of $CONFIG_STATUS script. ##
19953 ## ----------------------------------- ##
19954 _ASEOF
19955 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19956
19957 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19958 # Save the log message, to keep $0 and so on meaningful, and to
19959 # report actual input values of CONFIG_FILES etc. instead of their
19960 # values after options handling.
19961 ac_log="
19962 This file was extended by $as_me, which was
19963 generated by GNU Autoconf 2.69. Invocation command line was
19964
19965 CONFIG_FILES = $CONFIG_FILES
19966 CONFIG_HEADERS = $CONFIG_HEADERS
19967 CONFIG_LINKS = $CONFIG_LINKS
19968 CONFIG_COMMANDS = $CONFIG_COMMANDS
19969 $ $0 $@
19970
19971 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19972 "
19973
19974 _ACEOF
19975
19976 case $ac_config_files in *"
19977 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19978 esac
19979
19980 case $ac_config_headers in *"
19981 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19982 esac
19983
19984
19985 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19986 # Files that config.status was made for.
19987 config_files="$ac_config_files"
19988 config_headers="$ac_config_headers"
19989 config_links="$ac_config_links"
19990 config_commands="$ac_config_commands"
19991
19992 _ACEOF
19993
19994 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19995 ac_cs_usage="\
19996 \`$as_me' instantiates files and other configuration actions
19997 from templates according to the current configuration. Unless the files
19998 and actions are specified as TAGs, all are instantiated by default.
19999
20000 Usage: $0 [OPTION]... [TAG]...
20001
20002 -h, --help print this help, then exit
20003 -V, --version print version number and configuration settings, then exit
20004 --config print configuration, then exit
20005 -q, --quiet, --silent
20006 do not print progress messages
20007 -d, --debug don't remove temporary files
20008 --recheck update $as_me by reconfiguring in the same conditions
20009 --file=FILE[:TEMPLATE]
20010 instantiate the configuration file FILE
20011 --header=FILE[:TEMPLATE]
20012 instantiate the configuration header FILE
20013
20014 Configuration files:
20015 $config_files
20016
20017 Configuration headers:
20018 $config_headers
20019
20020 Configuration links:
20021 $config_links
20022
20023 Configuration commands:
20024 $config_commands
20025
20026 Report bugs to the package provider."
20027
20028 _ACEOF
20029 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20030 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20031 ac_cs_version="\\
20032 config.status
20033 configured by $0, generated by GNU Autoconf 2.69,
20034 with options \\"\$ac_cs_config\\"
20035
20036 Copyright (C) 2012 Free Software Foundation, Inc.
20037 This config.status script is free software; the Free Software Foundation
20038 gives unlimited permission to copy, distribute and modify it."
20039
20040 ac_pwd='$ac_pwd'
20041 srcdir='$srcdir'
20042 INSTALL='$INSTALL'
20043 AWK='$AWK'
20044 test -n "\$AWK" || AWK=awk
20045 _ACEOF
20046
20047 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20048 # The default lists apply if the user does not specify any file.
20049 ac_need_defaults=:
20050 while test $# != 0
20051 do
20052 case $1 in
20053 --*=?*)
20054 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20055 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20056 ac_shift=:
20057 ;;
20058 --*=)
20059 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20060 ac_optarg=
20061 ac_shift=:
20062 ;;
20063 *)
20064 ac_option=$1
20065 ac_optarg=$2
20066 ac_shift=shift
20067 ;;
20068 esac
20069
20070 case $ac_option in
20071 # Handling of the options.
20072 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20073 ac_cs_recheck=: ;;
20074 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20075 $as_echo "$ac_cs_version"; exit ;;
20076 --config | --confi | --conf | --con | --co | --c )
20077 $as_echo "$ac_cs_config"; exit ;;
20078 --debug | --debu | --deb | --de | --d | -d )
20079 debug=: ;;
20080 --file | --fil | --fi | --f )
20081 $ac_shift
20082 case $ac_optarg in
20083 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20084 '') as_fn_error $? "missing file argument" ;;
20085 esac
20086 as_fn_append CONFIG_FILES " '$ac_optarg'"
20087 ac_need_defaults=false;;
20088 --header | --heade | --head | --hea )
20089 $ac_shift
20090 case $ac_optarg in
20091 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20092 esac
20093 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20094 ac_need_defaults=false;;
20095 --he | --h)
20096 # Conflict between --help and --header
20097 as_fn_error $? "ambiguous option: \`$1'
20098 Try \`$0 --help' for more information.";;
20099 --help | --hel | -h )
20100 $as_echo "$ac_cs_usage"; exit ;;
20101 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20102 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20103 ac_cs_silent=: ;;
20104
20105 # This is an error.
20106 -*) as_fn_error $? "unrecognized option: \`$1'
20107 Try \`$0 --help' for more information." ;;
20108
20109 *) as_fn_append ac_config_targets " $1"
20110 ac_need_defaults=false ;;
20111
20112 esac
20113 shift
20114 done
20115
20116 ac_configure_extra_args=
20117
20118 if $ac_cs_silent; then
20119 exec 6>/dev/null
20120 ac_configure_extra_args="$ac_configure_extra_args --silent"
20121 fi
20122
20123 _ACEOF
20124 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20125 if \$ac_cs_recheck; then
20126 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20127 shift
20128 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20129 CONFIG_SHELL='$SHELL'
20130 export CONFIG_SHELL
20131 exec "\$@"
20132 fi
20133
20134 _ACEOF
20135 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20136 exec 5>>config.log
20137 {
20138 echo
20139 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20140 ## Running $as_me. ##
20141 _ASBOX
20142 $as_echo "$ac_log"
20143 } >&5
20144
20145 _ACEOF
20146 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20147 #
20148 # INIT-COMMANDS
20149 #
20150 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
20151 GDB_NM_FILE=$GDB_NM_FILE
20152
20153 _ACEOF
20154
20155 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20156
20157 # Handling of arguments.
20158 for ac_config_target in $ac_config_targets
20159 do
20160 case $ac_config_target in
20161 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
20162 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
20163 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
20164 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
20165 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
20166 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20167 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
20168 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
20169 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
20170 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
20171
20172 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20173 esac
20174 done
20175
20176
20177 # If the user did not use the arguments to specify the items to instantiate,
20178 # then the envvar interface is used. Set only those that are not.
20179 # We use the long form for the default assignment because of an extremely
20180 # bizarre bug on SunOS 4.1.3.
20181 if $ac_need_defaults; then
20182 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20183 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20184 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20185 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20186 fi
20187
20188 # Have a temporary directory for convenience. Make it in the build tree
20189 # simply because there is no reason against having it here, and in addition,
20190 # creating and moving files from /tmp can sometimes cause problems.
20191 # Hook for its removal unless debugging.
20192 # Note that there is a small window in which the directory will not be cleaned:
20193 # after its creation but before its name has been assigned to `$tmp'.
20194 $debug ||
20195 {
20196 tmp= ac_tmp=
20197 trap 'exit_status=$?
20198 : "${ac_tmp:=$tmp}"
20199 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20200 ' 0
20201 trap 'as_fn_exit 1' 1 2 13 15
20202 }
20203 # Create a (secure) tmp directory for tmp files.
20204
20205 {
20206 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20207 test -d "$tmp"
20208 } ||
20209 {
20210 tmp=./conf$$-$RANDOM
20211 (umask 077 && mkdir "$tmp")
20212 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20213 ac_tmp=$tmp
20214
20215 # Set up the scripts for CONFIG_FILES section.
20216 # No need to generate them if there are no CONFIG_FILES.
20217 # This happens for instance with `./config.status config.h'.
20218 if test -n "$CONFIG_FILES"; then
20219
20220 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
20221 ac_cs_awk_getline=:
20222 ac_cs_awk_pipe_init=
20223 ac_cs_awk_read_file='
20224 while ((getline aline < (F[key])) > 0)
20225 print(aline)
20226 close(F[key])'
20227 ac_cs_awk_pipe_fini=
20228 else
20229 ac_cs_awk_getline=false
20230 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
20231 ac_cs_awk_read_file='
20232 print "|#_!!_#|"
20233 print "cat " F[key] " &&"
20234 '$ac_cs_awk_pipe_init
20235 # The final `:' finishes the AND list.
20236 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
20237 fi
20238 ac_cr=`echo X | tr X '\015'`
20239 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20240 # But we know of no other shell where ac_cr would be empty at this
20241 # point, so we can use a bashism as a fallback.
20242 if test "x$ac_cr" = x; then
20243 eval ac_cr=\$\'\\r\'
20244 fi
20245 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20246 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20247 ac_cs_awk_cr='\\r'
20248 else
20249 ac_cs_awk_cr=$ac_cr
20250 fi
20251
20252 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20253 _ACEOF
20254
20255 # Create commands to substitute file output variables.
20256 {
20257 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
20258 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
20259 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
20260 echo "_ACAWK" &&
20261 echo "_ACEOF"
20262 } >conf$$files.sh &&
20263 . ./conf$$files.sh ||
20264 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20265 rm -f conf$$files.sh
20266
20267 {
20268 echo "cat >conf$$subs.awk <<_ACEOF" &&
20269 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20270 echo "_ACEOF"
20271 } >conf$$subs.sh ||
20272 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20273 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20274 ac_delim='%!_!# '
20275 for ac_last_try in false false false false false :; do
20276 . ./conf$$subs.sh ||
20277 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20278
20279 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20280 if test $ac_delim_n = $ac_delim_num; then
20281 break
20282 elif $ac_last_try; then
20283 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20284 else
20285 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20286 fi
20287 done
20288 rm -f conf$$subs.sh
20289
20290 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20291 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20292 _ACEOF
20293 sed -n '
20294 h
20295 s/^/S["/; s/!.*/"]=/
20296 p
20297 g
20298 s/^[^!]*!//
20299 :repl
20300 t repl
20301 s/'"$ac_delim"'$//
20302 t delim
20303 :nl
20304 h
20305 s/\(.\{148\}\)..*/\1/
20306 t more1
20307 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20308 p
20309 n
20310 b repl
20311 :more1
20312 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20313 p
20314 g
20315 s/.\{148\}//
20316 t nl
20317 :delim
20318 h
20319 s/\(.\{148\}\)..*/\1/
20320 t more2
20321 s/["\\]/\\&/g; s/^/"/; s/$/"/
20322 p
20323 b
20324 :more2
20325 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20326 p
20327 g
20328 s/.\{148\}//
20329 t delim
20330 ' <conf$$subs.awk | sed '
20331 /^[^""]/{
20332 N
20333 s/\n//
20334 }
20335 ' >>$CONFIG_STATUS || ac_write_fail=1
20336 rm -f conf$$subs.awk
20337 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20338 _ACAWK
20339 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20340 for (key in S) S_is_set[key] = 1
20341 FS = "\a"
20342 \$ac_cs_awk_pipe_init
20343 }
20344 {
20345 line = $ 0
20346 nfields = split(line, field, "@")
20347 substed = 0
20348 len = length(field[1])
20349 for (i = 2; i < nfields; i++) {
20350 key = field[i]
20351 keylen = length(key)
20352 if (S_is_set[key]) {
20353 value = S[key]
20354 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20355 len += length(value) + length(field[++i])
20356 substed = 1
20357 } else
20358 len += 1 + keylen
20359 }
20360 if (nfields == 3 && !substed) {
20361 key = field[2]
20362 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
20363 \$ac_cs_awk_read_file
20364 next
20365 }
20366 }
20367 print line
20368 }
20369 \$ac_cs_awk_pipe_fini
20370 _ACAWK
20371 _ACEOF
20372 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20373 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20374 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20375 else
20376 cat
20377 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20378 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20379 _ACEOF
20380
20381 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20382 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20383 # trailing colons and then remove the whole line if VPATH becomes empty
20384 # (actually we leave an empty line to preserve line numbers).
20385 if test "x$srcdir" = x.; then
20386 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20387 h
20388 s///
20389 s/^/:/
20390 s/[ ]*$/:/
20391 s/:\$(srcdir):/:/g
20392 s/:\${srcdir}:/:/g
20393 s/:@srcdir@:/:/g
20394 s/^:*//
20395 s/:*$//
20396 x
20397 s/\(=[ ]*\).*/\1/
20398 G
20399 s/\n//
20400 s/^[^=]*=[ ]*$//
20401 }'
20402 fi
20403
20404 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20405 fi # test -n "$CONFIG_FILES"
20406
20407 # Set up the scripts for CONFIG_HEADERS section.
20408 # No need to generate them if there are no CONFIG_HEADERS.
20409 # This happens for instance with `./config.status Makefile'.
20410 if test -n "$CONFIG_HEADERS"; then
20411 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20412 BEGIN {
20413 _ACEOF
20414
20415 # Transform confdefs.h into an awk script `defines.awk', embedded as
20416 # here-document in config.status, that substitutes the proper values into
20417 # config.h.in to produce config.h.
20418
20419 # Create a delimiter string that does not exist in confdefs.h, to ease
20420 # handling of long lines.
20421 ac_delim='%!_!# '
20422 for ac_last_try in false false :; do
20423 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20424 if test -z "$ac_tt"; then
20425 break
20426 elif $ac_last_try; then
20427 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20428 else
20429 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20430 fi
20431 done
20432
20433 # For the awk script, D is an array of macro values keyed by name,
20434 # likewise P contains macro parameters if any. Preserve backslash
20435 # newline sequences.
20436
20437 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20438 sed -n '
20439 s/.\{148\}/&'"$ac_delim"'/g
20440 t rset
20441 :rset
20442 s/^[ ]*#[ ]*define[ ][ ]*/ /
20443 t def
20444 d
20445 :def
20446 s/\\$//
20447 t bsnl
20448 s/["\\]/\\&/g
20449 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20450 D["\1"]=" \3"/p
20451 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20452 d
20453 :bsnl
20454 s/["\\]/\\&/g
20455 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20456 D["\1"]=" \3\\\\\\n"\\/p
20457 t cont
20458 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20459 t cont
20460 d
20461 :cont
20462 n
20463 s/.\{148\}/&'"$ac_delim"'/g
20464 t clear
20465 :clear
20466 s/\\$//
20467 t bsnlc
20468 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20469 d
20470 :bsnlc
20471 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20472 b cont
20473 ' <confdefs.h | sed '
20474 s/'"$ac_delim"'/"\\\
20475 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20476
20477 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20478 for (key in D) D_is_set[key] = 1
20479 FS = "\a"
20480 }
20481 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20482 line = \$ 0
20483 split(line, arg, " ")
20484 if (arg[1] == "#") {
20485 defundef = arg[2]
20486 mac1 = arg[3]
20487 } else {
20488 defundef = substr(arg[1], 2)
20489 mac1 = arg[2]
20490 }
20491 split(mac1, mac2, "(") #)
20492 macro = mac2[1]
20493 prefix = substr(line, 1, index(line, defundef) - 1)
20494 if (D_is_set[macro]) {
20495 # Preserve the white space surrounding the "#".
20496 print prefix "define", macro P[macro] D[macro]
20497 next
20498 } else {
20499 # Replace #undef with comments. This is necessary, for example,
20500 # in the case of _POSIX_SOURCE, which is predefined and required
20501 # on some systems where configure will not decide to define it.
20502 if (defundef == "undef") {
20503 print "/*", prefix defundef, macro, "*/"
20504 next
20505 }
20506 }
20507 }
20508 { print }
20509 _ACAWK
20510 _ACEOF
20511 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20512 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20513 fi # test -n "$CONFIG_HEADERS"
20514
20515
20516 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20517 shift
20518 for ac_tag
20519 do
20520 case $ac_tag in
20521 :[FHLC]) ac_mode=$ac_tag; continue;;
20522 esac
20523 case $ac_mode$ac_tag in
20524 :[FHL]*:*);;
20525 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20526 :[FH]-) ac_tag=-:-;;
20527 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20528 esac
20529 ac_save_IFS=$IFS
20530 IFS=:
20531 set x $ac_tag
20532 IFS=$ac_save_IFS
20533 shift
20534 ac_file=$1
20535 shift
20536
20537 case $ac_mode in
20538 :L) ac_source=$1;;
20539 :[FH])
20540 ac_file_inputs=
20541 for ac_f
20542 do
20543 case $ac_f in
20544 -) ac_f="$ac_tmp/stdin";;
20545 *) # Look for the file first in the build tree, then in the source tree
20546 # (if the path is not absolute). The absolute path cannot be DOS-style,
20547 # because $ac_f cannot contain `:'.
20548 test -f "$ac_f" ||
20549 case $ac_f in
20550 [\\/$]*) false;;
20551 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20552 esac ||
20553 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20554 esac
20555 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20556 as_fn_append ac_file_inputs " '$ac_f'"
20557 done
20558
20559 # Let's still pretend it is `configure' which instantiates (i.e., don't
20560 # use $as_me), people would be surprised to read:
20561 # /* config.h. Generated by config.status. */
20562 configure_input='Generated from '`
20563 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20564 `' by configure.'
20565 if test x"$ac_file" != x-; then
20566 configure_input="$ac_file. $configure_input"
20567 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20568 $as_echo "$as_me: creating $ac_file" >&6;}
20569 fi
20570 # Neutralize special characters interpreted by sed in replacement strings.
20571 case $configure_input in #(
20572 *\&* | *\|* | *\\* )
20573 ac_sed_conf_input=`$as_echo "$configure_input" |
20574 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20575 *) ac_sed_conf_input=$configure_input;;
20576 esac
20577
20578 case $ac_tag in
20579 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20580 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20581 esac
20582 ;;
20583 esac
20584
20585 ac_dir=`$as_dirname -- "$ac_file" ||
20586 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20587 X"$ac_file" : 'X\(//\)[^/]' \| \
20588 X"$ac_file" : 'X\(//\)$' \| \
20589 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20590 $as_echo X"$ac_file" |
20591 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20592 s//\1/
20593 q
20594 }
20595 /^X\(\/\/\)[^/].*/{
20596 s//\1/
20597 q
20598 }
20599 /^X\(\/\/\)$/{
20600 s//\1/
20601 q
20602 }
20603 /^X\(\/\).*/{
20604 s//\1/
20605 q
20606 }
20607 s/.*/./; q'`
20608 as_dir="$ac_dir"; as_fn_mkdir_p
20609 ac_builddir=.
20610
20611 case "$ac_dir" in
20612 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20613 *)
20614 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20615 # A ".." for each directory in $ac_dir_suffix.
20616 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20617 case $ac_top_builddir_sub in
20618 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20619 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20620 esac ;;
20621 esac
20622 ac_abs_top_builddir=$ac_pwd
20623 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20624 # for backward compatibility:
20625 ac_top_builddir=$ac_top_build_prefix
20626
20627 case $srcdir in
20628 .) # We are building in place.
20629 ac_srcdir=.
20630 ac_top_srcdir=$ac_top_builddir_sub
20631 ac_abs_top_srcdir=$ac_pwd ;;
20632 [\\/]* | ?:[\\/]* ) # Absolute name.
20633 ac_srcdir=$srcdir$ac_dir_suffix;
20634 ac_top_srcdir=$srcdir
20635 ac_abs_top_srcdir=$srcdir ;;
20636 *) # Relative name.
20637 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20638 ac_top_srcdir=$ac_top_build_prefix$srcdir
20639 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20640 esac
20641 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20642
20643
20644 case $ac_mode in
20645 :F)
20646 #
20647 # CONFIG_FILE
20648 #
20649
20650 case $INSTALL in
20651 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20652 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20653 esac
20654 _ACEOF
20655
20656 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20657 # If the template does not know about datarootdir, expand it.
20658 # FIXME: This hack should be removed a few years after 2.60.
20659 ac_datarootdir_hack=; ac_datarootdir_seen=
20660 ac_sed_dataroot='
20661 /datarootdir/ {
20662 p
20663 q
20664 }
20665 /@datadir@/p
20666 /@docdir@/p
20667 /@infodir@/p
20668 /@localedir@/p
20669 /@mandir@/p'
20670 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20671 *datarootdir*) ac_datarootdir_seen=yes;;
20672 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20673 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20674 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20675 _ACEOF
20676 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20677 ac_datarootdir_hack='
20678 s&@datadir@&$datadir&g
20679 s&@docdir@&$docdir&g
20680 s&@infodir@&$infodir&g
20681 s&@localedir@&$localedir&g
20682 s&@mandir@&$mandir&g
20683 s&\\\${datarootdir}&$datarootdir&g' ;;
20684 esac
20685 _ACEOF
20686
20687 # Neutralize VPATH when `$srcdir' = `.'.
20688 # Shell code in configure.ac might set extrasub.
20689 # FIXME: do we really want to maintain this feature?
20690 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20691 ac_sed_extra="$ac_vpsub
20692 $extrasub
20693 _ACEOF
20694 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20695 :t
20696 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20697 s|@configure_input@|$ac_sed_conf_input|;t t
20698 s&@top_builddir@&$ac_top_builddir_sub&;t t
20699 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20700 s&@srcdir@&$ac_srcdir&;t t
20701 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20702 s&@top_srcdir@&$ac_top_srcdir&;t t
20703 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20704 s&@builddir@&$ac_builddir&;t t
20705 s&@abs_builddir@&$ac_abs_builddir&;t t
20706 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20707 s&@INSTALL@&$ac_INSTALL&;t t
20708 $ac_datarootdir_hack
20709 "
20710 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
20711 if $ac_cs_awk_getline; then
20712 $AWK -f "$ac_tmp/subs.awk"
20713 else
20714 $AWK -f "$ac_tmp/subs.awk" | $SHELL
20715 fi \
20716 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20717
20718 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20719 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20720 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20721 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20722 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20723 which seems to be undefined. Please make sure it is defined" >&5
20724 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20725 which seems to be undefined. Please make sure it is defined" >&2;}
20726
20727 rm -f "$ac_tmp/stdin"
20728 case $ac_file in
20729 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20730 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20731 esac \
20732 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20733 ;;
20734 :H)
20735 #
20736 # CONFIG_HEADER
20737 #
20738 if test x"$ac_file" != x-; then
20739 {
20740 $as_echo "/* $configure_input */" \
20741 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20742 } >"$ac_tmp/config.h" \
20743 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20744 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20745 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20746 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20747 else
20748 rm -f "$ac_file"
20749 mv "$ac_tmp/config.h" "$ac_file" \
20750 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20751 fi
20752 else
20753 $as_echo "/* $configure_input */" \
20754 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20755 || as_fn_error $? "could not create -" "$LINENO" 5
20756 fi
20757 ;;
20758 :L)
20759 #
20760 # CONFIG_LINK
20761 #
20762
20763 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20764 :
20765 else
20766 # Prefer the file from the source tree if names are identical.
20767 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20768 ac_source=$srcdir/$ac_source
20769 fi
20770
20771 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20772 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20773
20774 if test ! -r "$ac_source"; then
20775 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20776 fi
20777 rm -f "$ac_file"
20778
20779 # Try a relative symlink, then a hard link, then a copy.
20780 case $ac_source in
20781 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20782 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20783 esac
20784 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20785 ln "$ac_source" "$ac_file" 2>/dev/null ||
20786 cp -p "$ac_source" "$ac_file" ||
20787 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20788 fi
20789 ;;
20790 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20791 $as_echo "$as_me: executing $ac_file commands" >&6;}
20792 ;;
20793 esac
20794
20795
20796 case $ac_file$ac_mode in
20797 "config.h":H) echo > stamp-h ;;
20798 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
20799 "nm.h":L) echo > stamp-nmh ;;
20800 "gcore":F) chmod +x gcore ;;
20801
20802 esac
20803 done # for ac_tag
20804
20805
20806 as_fn_exit 0
20807 _ACEOF
20808 ac_clean_files=$ac_clean_files_save
20809
20810 test $ac_write_fail = 0 ||
20811 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20812
20813
20814 # configure is writing to config.log, and then calls config.status.
20815 # config.status does its own redirection, appending to config.log.
20816 # Unfortunately, on DOS this fails, as config.log is still kept open
20817 # by configure, so config.status won't be able to write to it; its
20818 # output is simply discarded. So we exec the FD to /dev/null,
20819 # effectively closing config.log, so it can be properly (re)opened and
20820 # appended to by config.status. When coming back to configure, we
20821 # need to make the FD available again.
20822 if test "$no_create" != yes; then
20823 ac_cs_success=:
20824 ac_config_status_args=
20825 test "$silent" = yes &&
20826 ac_config_status_args="$ac_config_status_args --quiet"
20827 exec 5>/dev/null
20828 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20829 exec 5>>config.log
20830 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20831 # would make configure fail if this is the last instruction.
20832 $ac_cs_success || as_fn_exit 1
20833 fi
20834
20835 #
20836 # CONFIG_SUBDIRS section.
20837 #
20838 if test "$no_recursion" != yes; then
20839
20840 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
20841 # so they do not pile up.
20842 ac_sub_configure_args=
20843 ac_prev=
20844 eval "set x $ac_configure_args"
20845 shift
20846 for ac_arg
20847 do
20848 if test -n "$ac_prev"; then
20849 ac_prev=
20850 continue
20851 fi
20852 case $ac_arg in
20853 -cache-file | --cache-file | --cache-fil | --cache-fi \
20854 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
20855 ac_prev=cache_file ;;
20856 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
20857 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
20858 | --c=*)
20859 ;;
20860 --config-cache | -C)
20861 ;;
20862 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
20863 ac_prev=srcdir ;;
20864 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
20865 ;;
20866 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
20867 ac_prev=prefix ;;
20868 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
20869 ;;
20870 --disable-option-checking)
20871 ;;
20872 *)
20873 case $ac_arg in
20874 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
20875 esac
20876 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
20877 esac
20878 done
20879
20880 # Always prepend --prefix to ensure using the same prefix
20881 # in subdir configurations.
20882 ac_arg="--prefix=$prefix"
20883 case $ac_arg in
20884 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
20885 esac
20886 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
20887
20888 # Pass --silent
20889 if test "$silent" = yes; then
20890 ac_sub_configure_args="--silent $ac_sub_configure_args"
20891 fi
20892
20893 # Always prepend --disable-option-checking to silence warnings, since
20894 # different subdirs can have different --enable and --with options.
20895 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
20896
20897 ac_popdir=`pwd`
20898 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
20899
20900 # Do not complain, so a configure script can configure whichever
20901 # parts of a large source tree are present.
20902 test -d "$srcdir/$ac_dir" || continue
20903
20904 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
20905 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
20906 $as_echo "$ac_msg" >&6
20907 as_dir="$ac_dir"; as_fn_mkdir_p
20908 ac_builddir=.
20909
20910 case "$ac_dir" in
20911 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20912 *)
20913 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20914 # A ".." for each directory in $ac_dir_suffix.
20915 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20916 case $ac_top_builddir_sub in
20917 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20918 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20919 esac ;;
20920 esac
20921 ac_abs_top_builddir=$ac_pwd
20922 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20923 # for backward compatibility:
20924 ac_top_builddir=$ac_top_build_prefix
20925
20926 case $srcdir in
20927 .) # We are building in place.
20928 ac_srcdir=.
20929 ac_top_srcdir=$ac_top_builddir_sub
20930 ac_abs_top_srcdir=$ac_pwd ;;
20931 [\\/]* | ?:[\\/]* ) # Absolute name.
20932 ac_srcdir=$srcdir$ac_dir_suffix;
20933 ac_top_srcdir=$srcdir
20934 ac_abs_top_srcdir=$srcdir ;;
20935 *) # Relative name.
20936 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20937 ac_top_srcdir=$ac_top_build_prefix$srcdir
20938 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20939 esac
20940 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20941
20942
20943 cd "$ac_dir"
20944
20945 # Check for guested configure; otherwise get Cygnus style configure.
20946 if test -f "$ac_srcdir/configure.gnu"; then
20947 ac_sub_configure=$ac_srcdir/configure.gnu
20948 elif test -f "$ac_srcdir/configure"; then
20949 ac_sub_configure=$ac_srcdir/configure
20950 elif test -f "$ac_srcdir/configure.in"; then
20951 # This should be Cygnus configure.
20952 ac_sub_configure=$ac_aux_dir/configure
20953 else
20954 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
20955 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
20956 ac_sub_configure=
20957 fi
20958
20959 # The recursion is here.
20960 if test -n "$ac_sub_configure"; then
20961 # Make the cache file name correct relative to the subdirectory.
20962 case $cache_file in
20963 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
20964 *) # Relative name.
20965 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
20966 esac
20967
20968 { $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
20969 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
20970 # The eval makes quoting arguments work.
20971 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
20972 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
20973 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
20974 fi
20975
20976 cd "$ac_popdir"
20977 done
20978 fi
20979 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20980 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20981 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20982 fi
20983
This page took 0.50614 seconds and 5 git commands to generate.