* utils.c (gnat_define_builtin): Remove second parameter of
[official-gcc.git] / libiberty / configure
blobe44984c1fbec26e98b6024775621a726a893fa9a
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.59.
5 # Copyright (C) 2003 Free Software Foundation, Inc.
6 # This configure script is free software; the Free Software Foundation
7 # gives unlimited permission to copy, distribute and modify it.
8 ## --------------------- ##
9 ## M4sh Initialization. ##
10 ## --------------------- ##
12 # Be Bourne compatible
13 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14 emulate sh
15 NULLCMD=:
16 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17 # is contrary to our usage. Disable this feature.
18 alias -g '${1+"$@"}'='"$@"'
19 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
22 DUALCASE=1; export DUALCASE # for MKS sh
24 # Support unset when possible.
25 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26 as_unset=unset
27 else
28 as_unset=false
32 # Work around bugs in pre-3.0 UWIN ksh.
33 $as_unset ENV MAIL MAILPATH
34 PS1='$ '
35 PS2='> '
36 PS4='+ '
38 # NLS nuisances.
39 for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
45 eval $as_var=C; export $as_var
46 else
47 $as_unset $as_var
49 done
51 # Required to use basename.
52 if expr a : '\(a\)' >/dev/null 2>&1; then
53 as_expr=expr
54 else
55 as_expr=false
58 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59 as_basename=basename
60 else
61 as_basename=false
65 # Name of the executable.
66 as_me=`$as_basename "$0" ||
67 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
71 echo X/"$0" |
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
78 # PATH needs CR, and LINENO needs CR and PATH.
79 # Avoid depending upon Character Ranges.
80 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83 as_cr_digits='0123456789'
84 as_cr_alnum=$as_cr_Letters$as_cr_digits
86 # The user is always right.
87 if test "${PATH_SEPARATOR+set}" != set; then
88 echo "#! /bin/sh" >conf$$.sh
89 echo "exit 0" >>conf$$.sh
90 chmod +x conf$$.sh
91 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92 PATH_SEPARATOR=';'
93 else
94 PATH_SEPARATOR=:
96 rm -f conf$$.sh
100 as_lineno_1=$LINENO
101 as_lineno_2=$LINENO
102 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103 test "x$as_lineno_1" != "x$as_lineno_2" &&
104 test "x$as_lineno_3" = "x$as_lineno_2" || {
105 # Find who we are. Look in the path if we contain no path at all
106 # relative or not.
107 case $0 in
108 *[\\/]* ) as_myself=$0 ;;
109 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110 for as_dir in $PATH
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115 done
118 esac
119 # We did not find ourselves, most probably we were run as `sh COMMAND'
120 # in which case we are not to be found in the path.
121 if test "x$as_myself" = x; then
122 as_myself=$0
124 if test ! -f "$as_myself"; then
125 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126 { (exit 1); exit 1; }; }
128 case $CONFIG_SHELL in
130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
138 if ("$as_dir/$as_base" -c '
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142 test "x$as_lineno_1" != "x$as_lineno_2" &&
143 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
144 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146 CONFIG_SHELL=$as_dir/$as_base
147 export CONFIG_SHELL
148 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149 fi;;
150 esac
151 done
152 done
154 esac
156 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157 # uniformly replaced by the line number. The first 'sed' inserts a
158 # line-number line before each line; the second 'sed' does the real
159 # work. The second script uses 'N' to pair each line-number line
160 # with the numbered line, and appends trailing '-' during
161 # substitution so that $LINENO is not a special case at line end.
162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
165 sed '
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170 t loop
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
173 ' >$as_me.lineno &&
174 chmod +x $as_me.lineno ||
175 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176 { (exit 1); exit 1; }; }
178 # Don't try to exec as it changes $[0], causing all sort of problems
179 # (the dirname of $[0] is not the place where we might find the
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
182 # Exit status is that of the last command.
183 exit
187 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188 *c*,-n*) ECHO_N= ECHO_C='
189 ' ECHO_T=' ' ;;
190 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
192 esac
194 if expr a : '\(a\)' >/dev/null 2>&1; then
195 as_expr=expr
196 else
197 as_expr=false
200 rm -f conf$$ conf$$.exe conf$$.file
201 echo >conf$$.file
202 if ln -s conf$$.file conf$$ 2>/dev/null; then
203 # We could just check for DJGPP; but this test a) works b) is more generic
204 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205 if test -f conf$$.exe; then
206 # Don't use ln at all; we don't have any links
207 as_ln_s='cp -p'
208 else
209 as_ln_s='ln -s'
211 elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213 else
214 as_ln_s='cp -p'
216 rm -f conf$$ conf$$.exe conf$$.file
218 if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220 else
221 test -d ./-p && rmdir ./-p
222 as_mkdir_p=false
225 as_executable_p="test -f"
227 # Sed expression to map a string onto a valid CPP name.
228 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
230 # Sed expression to map a string onto a valid variable name.
231 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
234 # IFS
235 # We need space, tab and new line, in precisely that order.
236 as_nl='
238 IFS=" $as_nl"
240 # CDPATH.
241 $as_unset CDPATH
244 # Name of the host.
245 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246 # so uname gets run too.
247 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
249 exec 6>&1
252 # Initializations.
254 ac_default_prefix=/usr/local
255 ac_config_libobj_dir=.
256 cross_compiling=no
257 subdirs=
258 MFLAGS=
259 MAKEFLAGS=
260 SHELL=${CONFIG_SHELL-/bin/sh}
262 # Maximum number of lines to put in a shell here document.
263 # This variable seems obsolete. It should probably be removed, and
264 # only ac_max_sed_lines should be used.
265 : ${ac_max_here_lines=38}
267 # Identity of this package.
268 PACKAGE_NAME=
269 PACKAGE_TARNAME=
270 PACKAGE_VERSION=
271 PACKAGE_STRING=
272 PACKAGE_BUGREPORT=
274 ac_unique_file="xmalloc.c"
275 # Factoring default headers for most tests.
276 ac_includes_default="\
277 #include <stdio.h>
278 #if HAVE_SYS_TYPES_H
279 # include <sys/types.h>
280 #endif
281 #if HAVE_SYS_STAT_H
282 # include <sys/stat.h>
283 #endif
284 #if STDC_HEADERS
285 # include <stdlib.h>
286 # include <stddef.h>
287 #else
288 # if HAVE_STDLIB_H
289 # include <stdlib.h>
290 # endif
291 #endif
292 #if HAVE_STRING_H
293 # if !STDC_HEADERS && HAVE_MEMORY_H
294 # include <memory.h>
295 # endif
296 # include <string.h>
297 #endif
298 #if HAVE_STRINGS_H
299 # include <strings.h>
300 #endif
301 #if HAVE_INTTYPES_H
302 # include <inttypes.h>
303 #else
304 # if HAVE_STDINT_H
305 # include <stdint.h>
306 # endif
307 #endif
308 #if HAVE_UNISTD_H
309 # include <unistd.h>
310 #endif"
312 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libiberty_topdir MAINT NOTMAINT MAKEINFO BUILD_INFO PERL HAVE_PERL build build_cpu build_vendor build_os host host_cpu host_vendor host_os AR ac_ct_AR RANLIB ac_ct_RANLIB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP ac_libiberty_warn_cflags NO_MINUS_C_MINUS_O OUTPUT_OPTION INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA EGREP LIBOBJS CHECK target_header_dir pexecute INSTALL_DEST LTLIBOBJS'
313 ac_subst_files='host_makefile_frag'
315 # Initialize some variables set by options.
316 ac_init_help=
317 ac_init_version=false
318 # The variables have the same names as the options, with
319 # dashes changed to underlines.
320 cache_file=/dev/null
321 exec_prefix=NONE
322 no_create=
323 no_recursion=
324 prefix=NONE
325 program_prefix=NONE
326 program_suffix=NONE
327 program_transform_name=s,x,x,
328 silent=
329 site=
330 srcdir=
331 verbose=
332 x_includes=NONE
333 x_libraries=NONE
335 # Installation directory options.
336 # These are left unexpanded so users can "make install exec_prefix=/foo"
337 # and all the variables that are supposed to be based on exec_prefix
338 # by default will actually change.
339 # Use braces instead of parens because sh, perl, etc. also accept them.
340 bindir='${exec_prefix}/bin'
341 sbindir='${exec_prefix}/sbin'
342 libexecdir='${exec_prefix}/libexec'
343 datadir='${prefix}/share'
344 sysconfdir='${prefix}/etc'
345 sharedstatedir='${prefix}/com'
346 localstatedir='${prefix}/var'
347 libdir='${exec_prefix}/lib'
348 includedir='${prefix}/include'
349 oldincludedir='/usr/include'
350 infodir='${prefix}/info'
351 mandir='${prefix}/man'
353 ac_prev=
354 for ac_option
356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
365 # Accept the important Cygnus configure options, so we can diagnose typos.
367 case $ac_option in
369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
372 bindir=$ac_optarg ;;
374 -build | --build | --buil | --bui | --bu)
375 ac_prev=build_alias ;;
376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
377 build_alias=$ac_optarg ;;
379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
384 cache_file=$ac_optarg ;;
386 --config-cache | -C)
387 cache_file=config.cache ;;
389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
393 datadir=$ac_optarg ;;
395 -disable-* | --disable-*)
396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
397 # Reject names that are not valid shell variable names.
398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
404 -enable-* | --enable-*)
405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
406 # Reject names that are not valid shell variable names.
407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
413 *) ac_optarg=yes ;;
414 esac
415 eval "enable_$ac_feature='$ac_optarg'" ;;
417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
424 exec_prefix=$ac_optarg ;;
426 -gas | --gas | --ga | --g)
427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
437 -host | --host | --hos | --ho)
438 ac_prev=host_alias ;;
439 -host=* | --host=* | --hos=* | --ho=*)
440 host_alias=$ac_optarg ;;
442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
447 includedir=$ac_optarg ;;
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
452 infodir=$ac_optarg ;;
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
457 libdir=$ac_optarg ;;
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
464 libexecdir=$ac_optarg ;;
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
473 localstatedir=$ac_optarg ;;
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
478 mandir=$ac_optarg ;;
480 -nfp | --nfp | --nf)
481 # Obsolete; use --without-fp.
482 with_fp=no ;;
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
485 | --no-cr | --no-c | -n)
486 no_create=yes ;;
488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
499 oldincludedir=$ac_optarg ;;
501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
504 prefix=$ac_optarg ;;
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
511 program_prefix=$ac_optarg ;;
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
518 program_suffix=$ac_optarg ;;
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
535 program_transform_name=$ac_optarg ;;
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
545 sbindir=$ac_optarg ;;
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
556 sharedstatedir=$ac_optarg ;;
558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
561 site=$ac_optarg ;;
563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
566 srcdir=$ac_optarg ;;
568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
573 sysconfdir=$ac_optarg ;;
575 -target | --target | --targe | --targ | --tar | --ta | --t)
576 ac_prev=target_alias ;;
577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
578 target_alias=$ac_optarg ;;
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
586 -with-* | --with-*)
587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
588 # Reject names that are not valid shell variable names.
589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
592 ac_package=`echo $ac_package| sed 's/-/_/g'`
593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
595 *) ac_optarg=yes ;;
596 esac
597 eval "with_$ac_package='$ac_optarg'" ;;
599 -without-* | --without-*)
600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
601 # Reject names that are not valid shell variable names.
602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
617 x_includes=$ac_optarg ;;
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
624 x_libraries=$ac_optarg ;;
626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627 Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
649 esac
650 done
652 if test -n "$ac_prev"; then
653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
658 # Be sure to have absolute paths.
659 for ac_var in exec_prefix prefix
661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
666 esac
667 done
669 # Be sure to have absolute paths.
670 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
671 localstatedir libdir includedir oldincludedir infodir mandir
673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677 { (exit 1); exit 1; }; };;
678 esac
679 done
681 # There might be people who depend on the old broken behavior: `$host'
682 # used to hold the argument of --host etc.
683 # FIXME: To remove some day.
684 build=$build_alias
685 host=$host_alias
686 target=$target_alias
688 # FIXME: To remove some day.
689 if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
699 ac_tool_prefix=
700 test -n "$host_alias" && ac_tool_prefix=$host_alias-
702 test "$silent" = yes && exec 6>/dev/null
705 # Find the source files, if location was not specified.
706 if test -z "$srcdir"; then
707 ac_srcdir_defaulted=yes
708 # Try the directory containing this script, then its parent.
709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
715 echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
723 srcdir=..
725 else
726 ac_srcdir_defaulted=no
728 if test ! -r $srcdir/$ac_unique_file; then
729 if test "$ac_srcdir_defaulted" = yes; then
730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731 { (exit 1); exit 1; }; }
732 else
733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734 { (exit 1); exit 1; }; }
737 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
740 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741 ac_env_build_alias_set=${build_alias+set}
742 ac_env_build_alias_value=$build_alias
743 ac_cv_env_build_alias_set=${build_alias+set}
744 ac_cv_env_build_alias_value=$build_alias
745 ac_env_host_alias_set=${host_alias+set}
746 ac_env_host_alias_value=$host_alias
747 ac_cv_env_host_alias_set=${host_alias+set}
748 ac_cv_env_host_alias_value=$host_alias
749 ac_env_target_alias_set=${target_alias+set}
750 ac_env_target_alias_value=$target_alias
751 ac_cv_env_target_alias_set=${target_alias+set}
752 ac_cv_env_target_alias_value=$target_alias
753 ac_env_CC_set=${CC+set}
754 ac_env_CC_value=$CC
755 ac_cv_env_CC_set=${CC+set}
756 ac_cv_env_CC_value=$CC
757 ac_env_CFLAGS_set=${CFLAGS+set}
758 ac_env_CFLAGS_value=$CFLAGS
759 ac_cv_env_CFLAGS_set=${CFLAGS+set}
760 ac_cv_env_CFLAGS_value=$CFLAGS
761 ac_env_LDFLAGS_set=${LDFLAGS+set}
762 ac_env_LDFLAGS_value=$LDFLAGS
763 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764 ac_cv_env_LDFLAGS_value=$LDFLAGS
765 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766 ac_env_CPPFLAGS_value=$CPPFLAGS
767 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769 ac_env_CPP_set=${CPP+set}
770 ac_env_CPP_value=$CPP
771 ac_cv_env_CPP_set=${CPP+set}
772 ac_cv_env_CPP_value=$CPP
775 # Report the --help message.
777 if test "$ac_init_help" = "long"; then
778 # Omit some internal or obsolete options to make the list less imposing.
779 # This message is too long to be a string in the A/UX 3.1 sh.
780 cat <<_ACEOF
781 \`configure' configures this package to adapt to many kinds of systems.
783 Usage: $0 [OPTION]... [VAR=VALUE]...
785 To assign environment variables (e.g., CC, CFLAGS...), specify them as
786 VAR=VALUE. See below for descriptions of some of the useful variables.
788 Defaults for the options are specified in brackets.
790 Configuration:
791 -h, --help display this help and exit
792 --help=short display options specific to this package
793 --help=recursive display the short help of all the included packages
794 -V, --version display version information and exit
795 -q, --quiet, --silent do not print \`checking...' messages
796 --cache-file=FILE cache test results in FILE [disabled]
797 -C, --config-cache alias for \`--cache-file=config.cache'
798 -n, --no-create do not create output files
799 --srcdir=DIR find the sources in DIR [configure dir or \`..']
801 _ACEOF
803 cat <<_ACEOF
804 Installation directories:
805 --prefix=PREFIX install architecture-independent files in PREFIX
806 [$ac_default_prefix]
807 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
808 [PREFIX]
810 By default, \`make install' will install all the files in
811 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
812 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
813 for instance \`--prefix=\$HOME'.
815 For better control, use the options below.
817 Fine tuning of the installation directories:
818 --bindir=DIR user executables [EPREFIX/bin]
819 --sbindir=DIR system admin executables [EPREFIX/sbin]
820 --libexecdir=DIR program executables [EPREFIX/libexec]
821 --datadir=DIR read-only architecture-independent data [PREFIX/share]
822 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
823 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
824 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
825 --libdir=DIR object code libraries [EPREFIX/lib]
826 --includedir=DIR C header files [PREFIX/include]
827 --oldincludedir=DIR C header files for non-gcc [/usr/include]
828 --infodir=DIR info documentation [PREFIX/info]
829 --mandir=DIR man documentation [PREFIX/man]
830 _ACEOF
832 cat <<\_ACEOF
834 System types:
835 --build=BUILD configure for building on BUILD [guessed]
836 --host=HOST cross-compile to build programs to run on HOST [BUILD]
837 _ACEOF
840 if test -n "$ac_init_help"; then
842 cat <<\_ACEOF
844 Optional Features:
845 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
846 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
847 --enable-maintainer-mode
848 enable make rules and dependencies not useful
849 (and sometimes confusing) to the casual installer
850 --enable-install-libiberty Install headers for end users
852 Optional Packages:
853 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
854 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
855 --with-target-subdir=SUBDIR Configuring in a subdirectory for target
856 --with-build-subdir=SUBDIR Configuring in a subdirectory for build
857 --with-cross-host=HOST Configuring with a cross compiler
858 --with-newlib Configuring with newlib
860 Some influential environment variables:
861 CC C compiler command
862 CFLAGS C compiler flags
863 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
864 nonstandard directory <lib dir>
865 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
866 headers in a nonstandard directory <include dir>
867 CPP C preprocessor
869 Use these variables to override the choices made by `configure' or to help
870 it to find libraries and programs with nonstandard names/locations.
872 _ACEOF
875 if test "$ac_init_help" = "recursive"; then
876 # If there are subdirs, report their specific --help.
877 ac_popdir=`pwd`
878 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
879 test -d $ac_dir || continue
880 ac_builddir=.
882 if test "$ac_dir" != .; then
883 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
884 # A "../" for each directory in $ac_dir_suffix.
885 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
886 else
887 ac_dir_suffix= ac_top_builddir=
890 case $srcdir in
891 .) # No --srcdir option. We are building in place.
892 ac_srcdir=.
893 if test -z "$ac_top_builddir"; then
894 ac_top_srcdir=.
895 else
896 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
897 fi ;;
898 [\\/]* | ?:[\\/]* ) # Absolute path.
899 ac_srcdir=$srcdir$ac_dir_suffix;
900 ac_top_srcdir=$srcdir ;;
901 *) # Relative path.
902 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
903 ac_top_srcdir=$ac_top_builddir$srcdir ;;
904 esac
906 # Do not use `cd foo && pwd` to compute absolute paths, because
907 # the directories may not exist.
908 case `pwd` in
909 .) ac_abs_builddir="$ac_dir";;
911 case "$ac_dir" in
912 .) ac_abs_builddir=`pwd`;;
913 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
914 *) ac_abs_builddir=`pwd`/"$ac_dir";;
915 esac;;
916 esac
917 case $ac_abs_builddir in
918 .) ac_abs_top_builddir=${ac_top_builddir}.;;
920 case ${ac_top_builddir}. in
921 .) ac_abs_top_builddir=$ac_abs_builddir;;
922 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
923 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
924 esac;;
925 esac
926 case $ac_abs_builddir in
927 .) ac_abs_srcdir=$ac_srcdir;;
929 case $ac_srcdir in
930 .) ac_abs_srcdir=$ac_abs_builddir;;
931 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
932 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
933 esac;;
934 esac
935 case $ac_abs_builddir in
936 .) ac_abs_top_srcdir=$ac_top_srcdir;;
938 case $ac_top_srcdir in
939 .) ac_abs_top_srcdir=$ac_abs_builddir;;
940 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
941 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
942 esac;;
943 esac
945 cd $ac_dir
946 # Check for guested configure; otherwise get Cygnus style configure.
947 if test -f $ac_srcdir/configure.gnu; then
948 echo
949 $SHELL $ac_srcdir/configure.gnu --help=recursive
950 elif test -f $ac_srcdir/configure; then
951 echo
952 $SHELL $ac_srcdir/configure --help=recursive
953 elif test -f $ac_srcdir/configure.ac ||
954 test -f $ac_srcdir/configure.in; then
955 echo
956 $ac_configure --help
957 else
958 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
960 cd $ac_popdir
961 done
964 test -n "$ac_init_help" && exit 0
965 if $ac_init_version; then
966 cat <<\_ACEOF
968 Copyright (C) 2003 Free Software Foundation, Inc.
969 This configure script is free software; the Free Software Foundation
970 gives unlimited permission to copy, distribute and modify it.
971 _ACEOF
972 exit 0
974 exec 5>config.log
975 cat >&5 <<_ACEOF
976 This file contains any messages produced by compilers while
977 running configure, to aid debugging if configure makes a mistake.
979 It was created by $as_me, which was
980 generated by GNU Autoconf 2.59. Invocation command line was
982 $ $0 $@
984 _ACEOF
986 cat <<_ASUNAME
987 ## --------- ##
988 ## Platform. ##
989 ## --------- ##
991 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
992 uname -m = `(uname -m) 2>/dev/null || echo unknown`
993 uname -r = `(uname -r) 2>/dev/null || echo unknown`
994 uname -s = `(uname -s) 2>/dev/null || echo unknown`
995 uname -v = `(uname -v) 2>/dev/null || echo unknown`
997 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
998 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1000 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1001 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1002 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1003 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1004 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1005 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1006 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1008 _ASUNAME
1010 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1011 for as_dir in $PATH
1013 IFS=$as_save_IFS
1014 test -z "$as_dir" && as_dir=.
1015 echo "PATH: $as_dir"
1016 done
1018 } >&5
1020 cat >&5 <<_ACEOF
1023 ## ----------- ##
1024 ## Core tests. ##
1025 ## ----------- ##
1027 _ACEOF
1030 # Keep a trace of the command line.
1031 # Strip out --no-create and --no-recursion so they do not pile up.
1032 # Strip out --silent because we don't want to record it for future runs.
1033 # Also quote any args containing shell meta-characters.
1034 # Make two passes to allow for proper duplicate-argument suppression.
1035 ac_configure_args=
1036 ac_configure_args0=
1037 ac_configure_args1=
1038 ac_sep=
1039 ac_must_keep_next=false
1040 for ac_pass in 1 2
1042 for ac_arg
1044 case $ac_arg in
1045 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1046 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1047 | -silent | --silent | --silen | --sile | --sil)
1048 continue ;;
1049 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1050 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1051 esac
1052 case $ac_pass in
1053 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1055 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1056 if test $ac_must_keep_next = true; then
1057 ac_must_keep_next=false # Got value, back to normal.
1058 else
1059 case $ac_arg in
1060 *=* | --config-cache | -C | -disable-* | --disable-* \
1061 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1062 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1063 | -with-* | --with-* | -without-* | --without-* | --x)
1064 case "$ac_configure_args0 " in
1065 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1066 esac
1068 -* ) ac_must_keep_next=true ;;
1069 esac
1071 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1072 # Get rid of the leading space.
1073 ac_sep=" "
1075 esac
1076 done
1077 done
1078 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1079 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1081 # When interrupted or exit'd, cleanup temporary files, and complete
1082 # config.log. We remove comments because anyway the quotes in there
1083 # would cause problems or look ugly.
1084 # WARNING: Be sure not to use single quotes in there, as some shells,
1085 # such as our DU 5.0 friend, will then `close' the trap.
1086 trap 'exit_status=$?
1087 # Save into config.log some information that might help in debugging.
1089 echo
1091 cat <<\_ASBOX
1092 ## ---------------- ##
1093 ## Cache variables. ##
1094 ## ---------------- ##
1095 _ASBOX
1096 echo
1097 # The following way of writing the cache mishandles newlines in values,
1099 (set) 2>&1 |
1100 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1101 *ac_space=\ *)
1102 sed -n \
1103 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1104 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1107 sed -n \
1108 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1110 esac;
1112 echo
1114 cat <<\_ASBOX
1115 ## ----------------- ##
1116 ## Output variables. ##
1117 ## ----------------- ##
1118 _ASBOX
1119 echo
1120 for ac_var in $ac_subst_vars
1122 eval ac_val=$`echo $ac_var`
1123 echo "$ac_var='"'"'$ac_val'"'"'"
1124 done | sort
1125 echo
1127 if test -n "$ac_subst_files"; then
1128 cat <<\_ASBOX
1129 ## ------------- ##
1130 ## Output files. ##
1131 ## ------------- ##
1132 _ASBOX
1133 echo
1134 for ac_var in $ac_subst_files
1136 eval ac_val=$`echo $ac_var`
1137 echo "$ac_var='"'"'$ac_val'"'"'"
1138 done | sort
1139 echo
1142 if test -s confdefs.h; then
1143 cat <<\_ASBOX
1144 ## ----------- ##
1145 ## confdefs.h. ##
1146 ## ----------- ##
1147 _ASBOX
1148 echo
1149 sed "/^$/d" confdefs.h | sort
1150 echo
1152 test "$ac_signal" != 0 &&
1153 echo "$as_me: caught signal $ac_signal"
1154 echo "$as_me: exit $exit_status"
1155 } >&5
1156 rm -f core *.core &&
1157 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1158 exit $exit_status
1160 for ac_signal in 1 2 13 15; do
1161 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1162 done
1163 ac_signal=0
1165 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1166 rm -rf conftest* confdefs.h
1167 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1168 echo >confdefs.h
1170 # Predefined preprocessor variables.
1172 cat >>confdefs.h <<_ACEOF
1173 #define PACKAGE_NAME "$PACKAGE_NAME"
1174 _ACEOF
1177 cat >>confdefs.h <<_ACEOF
1178 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1179 _ACEOF
1182 cat >>confdefs.h <<_ACEOF
1183 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1184 _ACEOF
1187 cat >>confdefs.h <<_ACEOF
1188 #define PACKAGE_STRING "$PACKAGE_STRING"
1189 _ACEOF
1192 cat >>confdefs.h <<_ACEOF
1193 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1194 _ACEOF
1197 # Let the site file select an alternate cache file if it wants to.
1198 # Prefer explicitly selected file to automatically selected ones.
1199 if test -z "$CONFIG_SITE"; then
1200 if test "x$prefix" != xNONE; then
1201 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1202 else
1203 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1206 for ac_site_file in $CONFIG_SITE; do
1207 if test -r "$ac_site_file"; then
1208 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1209 echo "$as_me: loading site script $ac_site_file" >&6;}
1210 sed 's/^/| /' "$ac_site_file" >&5
1211 . "$ac_site_file"
1213 done
1215 if test -r "$cache_file"; then
1216 # Some versions of bash will fail to source /dev/null (special
1217 # files actually), so we avoid doing that.
1218 if test -f "$cache_file"; then
1219 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1220 echo "$as_me: loading cache $cache_file" >&6;}
1221 case $cache_file in
1222 [\\/]* | ?:[\\/]* ) . $cache_file;;
1223 *) . ./$cache_file;;
1224 esac
1226 else
1227 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1228 echo "$as_me: creating cache $cache_file" >&6;}
1229 >$cache_file
1232 # Check that the precious variables saved in the cache have kept the same
1233 # value.
1234 ac_cache_corrupted=false
1235 for ac_var in `(set) 2>&1 |
1236 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1237 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1238 eval ac_new_set=\$ac_env_${ac_var}_set
1239 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1240 eval ac_new_val="\$ac_env_${ac_var}_value"
1241 case $ac_old_set,$ac_new_set in
1242 set,)
1243 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1244 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1245 ac_cache_corrupted=: ;;
1246 ,set)
1247 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1248 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1249 ac_cache_corrupted=: ;;
1250 ,);;
1252 if test "x$ac_old_val" != "x$ac_new_val"; then
1253 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1254 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1255 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1256 echo "$as_me: former value: $ac_old_val" >&2;}
1257 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1258 echo "$as_me: current value: $ac_new_val" >&2;}
1259 ac_cache_corrupted=:
1260 fi;;
1261 esac
1262 # Pass precious variables to config.status.
1263 if test "$ac_new_set" = set; then
1264 case $ac_new_val in
1265 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1266 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1267 *) ac_arg=$ac_var=$ac_new_val ;;
1268 esac
1269 case " $ac_configure_args " in
1270 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1271 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1272 esac
1274 done
1275 if $ac_cache_corrupted; then
1276 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1277 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1278 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1279 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1280 { (exit 1); exit 1; }; }
1283 ac_ext=c
1284 ac_cpp='$CPP $CPPFLAGS'
1285 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1286 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1287 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1309 # This works around the fact that libtool configuration may change LD
1310 # for this particular configuration, but some shells, instead of
1311 # keeping the changes in LD private, export them just because LD is
1312 # exported. We don't use libtool yet, but some day we might, so...
1313 ORIGINAL_LD_FOR_MULTILIBS=$LD
1316 # Check whether --with-target-subdir or --without-target-subdir was given.
1317 if test "${with_target_subdir+set}" = set; then
1318 withval="$with_target_subdir"
1322 # Check whether --with-build-subdir or --without-build-subdir was given.
1323 if test "${with_build_subdir+set}" = set; then
1324 withval="$with_build_subdir"
1328 # Check whether --with-cross-host or --without-cross-host was given.
1329 if test "${with_cross_host+set}" = set; then
1330 withval="$with_cross_host"
1334 # Check whether --with-newlib or --without-newlib was given.
1335 if test "${with_newlib+set}" = set; then
1336 withval="$with_newlib"
1340 if test "${srcdir}" = "."; then
1341 if test -n "${with_build_subdir}"; then
1342 libiberty_topdir="${srcdir}/../.."
1343 with_target_subdir=
1344 elif test -z "${with_target_subdir}"; then
1345 libiberty_topdir="${srcdir}/.."
1346 else
1347 if test "${with_target_subdir}" != "."; then
1348 libiberty_topdir="${srcdir}/${with_multisrctop}../.."
1349 else
1350 libiberty_topdir="${srcdir}/${with_multisrctop}.."
1353 else
1354 libiberty_topdir="${srcdir}/.."
1357 ac_aux_dir=
1358 for ac_dir in $libiberty_topdir $srcdir/$libiberty_topdir; do
1359 if test -f $ac_dir/install-sh; then
1360 ac_aux_dir=$ac_dir
1361 ac_install_sh="$ac_aux_dir/install-sh -c"
1362 break
1363 elif test -f $ac_dir/install.sh; then
1364 ac_aux_dir=$ac_dir
1365 ac_install_sh="$ac_aux_dir/install.sh -c"
1366 break
1367 elif test -f $ac_dir/shtool; then
1368 ac_aux_dir=$ac_dir
1369 ac_install_sh="$ac_aux_dir/shtool install -c"
1370 break
1372 done
1373 if test -z "$ac_aux_dir"; then
1374 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" >&5
1375 echo "$as_me: error: cannot find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" >&2;}
1376 { (exit 1); exit 1; }; }
1378 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1379 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1380 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1384 echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
1385 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
1386 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1387 if test "${enable_maintainer_mode+set}" = set; then
1388 enableval="$enable_maintainer_mode"
1389 maintainer_mode=$enableval
1390 else
1391 maintainer_mode=no
1394 echo "$as_me:$LINENO: result: $maintainer_mode" >&5
1395 echo "${ECHO_T}$maintainer_mode" >&6
1397 if test "$maintainer_mode" = "yes"; then
1398 MAINT=''
1399 NOTMAINT='#'
1400 else
1401 MAINT='#'
1402 NOTMAINT=''
1405 # Do we have a single-tree copy of texinfo? Even if we do, we can't
1406 # rely on it - libiberty is built before texinfo.
1407 # Extract the first word of "makeinfo", so it can be a program name with args.
1408 set dummy makeinfo; ac_word=$2
1409 echo "$as_me:$LINENO: checking for $ac_word" >&5
1410 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1411 if test "${ac_cv_prog_MAKEINFO+set}" = set; then
1412 echo $ECHO_N "(cached) $ECHO_C" >&6
1413 else
1414 if test -n "$MAKEINFO"; then
1415 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
1416 else
1417 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1418 for as_dir in $PATH
1420 IFS=$as_save_IFS
1421 test -z "$as_dir" && as_dir=.
1422 for ac_exec_ext in '' $ac_executable_extensions; do
1423 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1424 ac_cv_prog_MAKEINFO="makeinfo"
1425 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1426 break 2
1428 done
1429 done
1433 MAKEINFO=$ac_cv_prog_MAKEINFO
1434 if test -n "$MAKEINFO"; then
1435 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
1436 echo "${ECHO_T}$MAKEINFO" >&6
1437 else
1438 echo "$as_me:$LINENO: result: no" >&5
1439 echo "${ECHO_T}no" >&6
1442 if test "x$MAKEINFO" = "x"; then
1443 MAKEINFO="@echo makeinfo missing; true"
1444 BUILD_INFO=
1445 else
1446 BUILD_INFO=info
1447 case "$MAKEINFO" in
1448 */missing\ makeinfo*)
1449 BUILD_INFO=
1450 { echo "$as_me:$LINENO: WARNING:
1451 *** Makeinfo is missing. Info documentation will not be built." >&5
1452 echo "$as_me: WARNING:
1453 *** Makeinfo is missing. Info documentation will not be built." >&2;}
1456 case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in
1457 x*\ [1-3].* )
1458 MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true"
1459 BUILD_INFO=
1460 { echo "$as_me:$LINENO: WARNING:
1461 *** Makeinfo is too old. Info documentation will not be built." >&5
1462 echo "$as_me: WARNING:
1463 *** Makeinfo is too old. Info documentation will not be built." >&2;}
1465 esac
1467 esac
1472 # Extract the first word of "perl", so it can be a program name with args.
1473 set dummy perl; ac_word=$2
1474 echo "$as_me:$LINENO: checking for $ac_word" >&5
1475 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1476 if test "${ac_cv_prog_PERL+set}" = set; then
1477 echo $ECHO_N "(cached) $ECHO_C" >&6
1478 else
1479 if test -n "$PERL"; then
1480 ac_cv_prog_PERL="$PERL" # Let the user override the test.
1481 else
1482 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1483 for as_dir in $PATH
1485 IFS=$as_save_IFS
1486 test -z "$as_dir" && as_dir=.
1487 for ac_exec_ext in '' $ac_executable_extensions; do
1488 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1489 ac_cv_prog_PERL="perl"
1490 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1491 break 2
1493 done
1494 done
1498 PERL=$ac_cv_prog_PERL
1499 if test -n "$PERL"; then
1500 echo "$as_me:$LINENO: result: $PERL" >&5
1501 echo "${ECHO_T}$PERL" >&6
1502 else
1503 echo "$as_me:$LINENO: result: no" >&5
1504 echo "${ECHO_T}no" >&6
1507 if test x"$PERL" = x""; then
1508 HAVE_PERL='#'
1509 else
1510 HAVE_PERL=''
1514 # Make sure we can run config.sub.
1515 $ac_config_sub sun4 >/dev/null 2>&1 ||
1516 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1517 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1518 { (exit 1); exit 1; }; }
1520 echo "$as_me:$LINENO: checking build system type" >&5
1521 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1522 if test "${ac_cv_build+set}" = set; then
1523 echo $ECHO_N "(cached) $ECHO_C" >&6
1524 else
1525 ac_cv_build_alias=$build_alias
1526 test -z "$ac_cv_build_alias" &&
1527 ac_cv_build_alias=`$ac_config_guess`
1528 test -z "$ac_cv_build_alias" &&
1529 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1530 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1531 { (exit 1); exit 1; }; }
1532 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1533 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1534 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1535 { (exit 1); exit 1; }; }
1538 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1539 echo "${ECHO_T}$ac_cv_build" >&6
1540 build=$ac_cv_build
1541 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1542 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1543 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1546 echo "$as_me:$LINENO: checking host system type" >&5
1547 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1548 if test "${ac_cv_host+set}" = set; then
1549 echo $ECHO_N "(cached) $ECHO_C" >&6
1550 else
1551 ac_cv_host_alias=$host_alias
1552 test -z "$ac_cv_host_alias" &&
1553 ac_cv_host_alias=$ac_cv_build_alias
1554 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1555 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1556 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1557 { (exit 1); exit 1; }; }
1560 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1561 echo "${ECHO_T}$ac_cv_host" >&6
1562 host=$ac_cv_host
1563 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1564 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1565 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1570 if test -n "$ac_tool_prefix"; then
1571 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1572 set dummy ${ac_tool_prefix}ar; ac_word=$2
1573 echo "$as_me:$LINENO: checking for $ac_word" >&5
1574 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1575 if test "${ac_cv_prog_AR+set}" = set; then
1576 echo $ECHO_N "(cached) $ECHO_C" >&6
1577 else
1578 if test -n "$AR"; then
1579 ac_cv_prog_AR="$AR" # Let the user override the test.
1580 else
1581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1582 for as_dir in $PATH
1584 IFS=$as_save_IFS
1585 test -z "$as_dir" && as_dir=.
1586 for ac_exec_ext in '' $ac_executable_extensions; do
1587 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1588 ac_cv_prog_AR="${ac_tool_prefix}ar"
1589 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1590 break 2
1592 done
1593 done
1597 AR=$ac_cv_prog_AR
1598 if test -n "$AR"; then
1599 echo "$as_me:$LINENO: result: $AR" >&5
1600 echo "${ECHO_T}$AR" >&6
1601 else
1602 echo "$as_me:$LINENO: result: no" >&5
1603 echo "${ECHO_T}no" >&6
1607 if test -z "$ac_cv_prog_AR"; then
1608 ac_ct_AR=$AR
1609 # Extract the first word of "ar", so it can be a program name with args.
1610 set dummy ar; ac_word=$2
1611 echo "$as_me:$LINENO: checking for $ac_word" >&5
1612 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1613 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
1614 echo $ECHO_N "(cached) $ECHO_C" >&6
1615 else
1616 if test -n "$ac_ct_AR"; then
1617 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
1618 else
1619 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1620 for as_dir in $PATH
1622 IFS=$as_save_IFS
1623 test -z "$as_dir" && as_dir=.
1624 for ac_exec_ext in '' $ac_executable_extensions; do
1625 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1626 ac_cv_prog_ac_ct_AR="ar"
1627 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1628 break 2
1630 done
1631 done
1635 ac_ct_AR=$ac_cv_prog_ac_ct_AR
1636 if test -n "$ac_ct_AR"; then
1637 echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
1638 echo "${ECHO_T}$ac_ct_AR" >&6
1639 else
1640 echo "$as_me:$LINENO: result: no" >&5
1641 echo "${ECHO_T}no" >&6
1644 AR=$ac_ct_AR
1645 else
1646 AR="$ac_cv_prog_AR"
1649 if test -n "$ac_tool_prefix"; then
1650 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1651 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1652 echo "$as_me:$LINENO: checking for $ac_word" >&5
1653 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1654 if test "${ac_cv_prog_RANLIB+set}" = set; then
1655 echo $ECHO_N "(cached) $ECHO_C" >&6
1656 else
1657 if test -n "$RANLIB"; then
1658 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1659 else
1660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1661 for as_dir in $PATH
1663 IFS=$as_save_IFS
1664 test -z "$as_dir" && as_dir=.
1665 for ac_exec_ext in '' $ac_executable_extensions; do
1666 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1667 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1668 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1669 break 2
1671 done
1672 done
1676 RANLIB=$ac_cv_prog_RANLIB
1677 if test -n "$RANLIB"; then
1678 echo "$as_me:$LINENO: result: $RANLIB" >&5
1679 echo "${ECHO_T}$RANLIB" >&6
1680 else
1681 echo "$as_me:$LINENO: result: no" >&5
1682 echo "${ECHO_T}no" >&6
1686 if test -z "$ac_cv_prog_RANLIB"; then
1687 ac_ct_RANLIB=$RANLIB
1688 # Extract the first word of "ranlib", so it can be a program name with args.
1689 set dummy ranlib; ac_word=$2
1690 echo "$as_me:$LINENO: checking for $ac_word" >&5
1691 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1692 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
1693 echo $ECHO_N "(cached) $ECHO_C" >&6
1694 else
1695 if test -n "$ac_ct_RANLIB"; then
1696 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
1697 else
1698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1699 for as_dir in $PATH
1701 IFS=$as_save_IFS
1702 test -z "$as_dir" && as_dir=.
1703 for ac_exec_ext in '' $ac_executable_extensions; do
1704 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1705 ac_cv_prog_ac_ct_RANLIB="ranlib"
1706 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1707 break 2
1709 done
1710 done
1712 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
1715 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
1716 if test -n "$ac_ct_RANLIB"; then
1717 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
1718 echo "${ECHO_T}$ac_ct_RANLIB" >&6
1719 else
1720 echo "$as_me:$LINENO: result: no" >&5
1721 echo "${ECHO_T}no" >&6
1724 RANLIB=$ac_ct_RANLIB
1725 else
1726 RANLIB="$ac_cv_prog_RANLIB"
1731 ac_ext=c
1732 ac_cpp='$CPP $CPPFLAGS'
1733 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1734 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1735 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1736 if test -n "$ac_tool_prefix"; then
1737 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1738 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1739 echo "$as_me:$LINENO: checking for $ac_word" >&5
1740 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1741 if test "${ac_cv_prog_CC+set}" = set; then
1742 echo $ECHO_N "(cached) $ECHO_C" >&6
1743 else
1744 if test -n "$CC"; then
1745 ac_cv_prog_CC="$CC" # Let the user override the test.
1746 else
1747 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1748 for as_dir in $PATH
1750 IFS=$as_save_IFS
1751 test -z "$as_dir" && as_dir=.
1752 for ac_exec_ext in '' $ac_executable_extensions; do
1753 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1754 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1755 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1756 break 2
1758 done
1759 done
1763 CC=$ac_cv_prog_CC
1764 if test -n "$CC"; then
1765 echo "$as_me:$LINENO: result: $CC" >&5
1766 echo "${ECHO_T}$CC" >&6
1767 else
1768 echo "$as_me:$LINENO: result: no" >&5
1769 echo "${ECHO_T}no" >&6
1773 if test -z "$ac_cv_prog_CC"; then
1774 ac_ct_CC=$CC
1775 # Extract the first word of "gcc", so it can be a program name with args.
1776 set dummy gcc; ac_word=$2
1777 echo "$as_me:$LINENO: checking for $ac_word" >&5
1778 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1779 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1780 echo $ECHO_N "(cached) $ECHO_C" >&6
1781 else
1782 if test -n "$ac_ct_CC"; then
1783 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1784 else
1785 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1786 for as_dir in $PATH
1788 IFS=$as_save_IFS
1789 test -z "$as_dir" && as_dir=.
1790 for ac_exec_ext in '' $ac_executable_extensions; do
1791 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1792 ac_cv_prog_ac_ct_CC="gcc"
1793 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1794 break 2
1796 done
1797 done
1801 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1802 if test -n "$ac_ct_CC"; then
1803 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1804 echo "${ECHO_T}$ac_ct_CC" >&6
1805 else
1806 echo "$as_me:$LINENO: result: no" >&5
1807 echo "${ECHO_T}no" >&6
1810 CC=$ac_ct_CC
1811 else
1812 CC="$ac_cv_prog_CC"
1815 if test -z "$CC"; then
1816 if test -n "$ac_tool_prefix"; then
1817 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1818 set dummy ${ac_tool_prefix}cc; ac_word=$2
1819 echo "$as_me:$LINENO: checking for $ac_word" >&5
1820 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1821 if test "${ac_cv_prog_CC+set}" = set; then
1822 echo $ECHO_N "(cached) $ECHO_C" >&6
1823 else
1824 if test -n "$CC"; then
1825 ac_cv_prog_CC="$CC" # Let the user override the test.
1826 else
1827 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1828 for as_dir in $PATH
1830 IFS=$as_save_IFS
1831 test -z "$as_dir" && as_dir=.
1832 for ac_exec_ext in '' $ac_executable_extensions; do
1833 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1834 ac_cv_prog_CC="${ac_tool_prefix}cc"
1835 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1836 break 2
1838 done
1839 done
1843 CC=$ac_cv_prog_CC
1844 if test -n "$CC"; then
1845 echo "$as_me:$LINENO: result: $CC" >&5
1846 echo "${ECHO_T}$CC" >&6
1847 else
1848 echo "$as_me:$LINENO: result: no" >&5
1849 echo "${ECHO_T}no" >&6
1853 if test -z "$ac_cv_prog_CC"; then
1854 ac_ct_CC=$CC
1855 # Extract the first word of "cc", so it can be a program name with args.
1856 set dummy cc; ac_word=$2
1857 echo "$as_me:$LINENO: checking for $ac_word" >&5
1858 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1859 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1860 echo $ECHO_N "(cached) $ECHO_C" >&6
1861 else
1862 if test -n "$ac_ct_CC"; then
1863 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1864 else
1865 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1866 for as_dir in $PATH
1868 IFS=$as_save_IFS
1869 test -z "$as_dir" && as_dir=.
1870 for ac_exec_ext in '' $ac_executable_extensions; do
1871 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1872 ac_cv_prog_ac_ct_CC="cc"
1873 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1874 break 2
1876 done
1877 done
1881 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1882 if test -n "$ac_ct_CC"; then
1883 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1884 echo "${ECHO_T}$ac_ct_CC" >&6
1885 else
1886 echo "$as_me:$LINENO: result: no" >&5
1887 echo "${ECHO_T}no" >&6
1890 CC=$ac_ct_CC
1891 else
1892 CC="$ac_cv_prog_CC"
1896 if test -z "$CC"; then
1897 # Extract the first word of "cc", so it can be a program name with args.
1898 set dummy cc; ac_word=$2
1899 echo "$as_me:$LINENO: checking for $ac_word" >&5
1900 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1901 if test "${ac_cv_prog_CC+set}" = set; then
1902 echo $ECHO_N "(cached) $ECHO_C" >&6
1903 else
1904 if test -n "$CC"; then
1905 ac_cv_prog_CC="$CC" # Let the user override the test.
1906 else
1907 ac_prog_rejected=no
1908 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1909 for as_dir in $PATH
1911 IFS=$as_save_IFS
1912 test -z "$as_dir" && as_dir=.
1913 for ac_exec_ext in '' $ac_executable_extensions; do
1914 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1915 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1916 ac_prog_rejected=yes
1917 continue
1919 ac_cv_prog_CC="cc"
1920 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1921 break 2
1923 done
1924 done
1926 if test $ac_prog_rejected = yes; then
1927 # We found a bogon in the path, so make sure we never use it.
1928 set dummy $ac_cv_prog_CC
1929 shift
1930 if test $# != 0; then
1931 # We chose a different compiler from the bogus one.
1932 # However, it has the same basename, so the bogon will be chosen
1933 # first if we set CC to just the basename; use the full file name.
1934 shift
1935 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1940 CC=$ac_cv_prog_CC
1941 if test -n "$CC"; then
1942 echo "$as_me:$LINENO: result: $CC" >&5
1943 echo "${ECHO_T}$CC" >&6
1944 else
1945 echo "$as_me:$LINENO: result: no" >&5
1946 echo "${ECHO_T}no" >&6
1950 if test -z "$CC"; then
1951 if test -n "$ac_tool_prefix"; then
1952 for ac_prog in cl
1954 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1955 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1956 echo "$as_me:$LINENO: checking for $ac_word" >&5
1957 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1958 if test "${ac_cv_prog_CC+set}" = set; then
1959 echo $ECHO_N "(cached) $ECHO_C" >&6
1960 else
1961 if test -n "$CC"; then
1962 ac_cv_prog_CC="$CC" # Let the user override the test.
1963 else
1964 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1965 for as_dir in $PATH
1967 IFS=$as_save_IFS
1968 test -z "$as_dir" && as_dir=.
1969 for ac_exec_ext in '' $ac_executable_extensions; do
1970 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1971 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1972 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1973 break 2
1975 done
1976 done
1980 CC=$ac_cv_prog_CC
1981 if test -n "$CC"; then
1982 echo "$as_me:$LINENO: result: $CC" >&5
1983 echo "${ECHO_T}$CC" >&6
1984 else
1985 echo "$as_me:$LINENO: result: no" >&5
1986 echo "${ECHO_T}no" >&6
1989 test -n "$CC" && break
1990 done
1992 if test -z "$CC"; then
1993 ac_ct_CC=$CC
1994 for ac_prog in cl
1996 # Extract the first word of "$ac_prog", so it can be a program name with args.
1997 set dummy $ac_prog; ac_word=$2
1998 echo "$as_me:$LINENO: checking for $ac_word" >&5
1999 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2000 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2001 echo $ECHO_N "(cached) $ECHO_C" >&6
2002 else
2003 if test -n "$ac_ct_CC"; then
2004 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2005 else
2006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2007 for as_dir in $PATH
2009 IFS=$as_save_IFS
2010 test -z "$as_dir" && as_dir=.
2011 for ac_exec_ext in '' $ac_executable_extensions; do
2012 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2013 ac_cv_prog_ac_ct_CC="$ac_prog"
2014 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2015 break 2
2017 done
2018 done
2022 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2023 if test -n "$ac_ct_CC"; then
2024 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2025 echo "${ECHO_T}$ac_ct_CC" >&6
2026 else
2027 echo "$as_me:$LINENO: result: no" >&5
2028 echo "${ECHO_T}no" >&6
2031 test -n "$ac_ct_CC" && break
2032 done
2034 CC=$ac_ct_CC
2040 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2041 See \`config.log' for more details." >&5
2042 echo "$as_me: error: no acceptable C compiler found in \$PATH
2043 See \`config.log' for more details." >&2;}
2044 { (exit 1); exit 1; }; }
2046 # Provide some information about the compiler.
2047 echo "$as_me:$LINENO:" \
2048 "checking for C compiler version" >&5
2049 ac_compiler=`set X $ac_compile; echo $2`
2050 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2051 (eval $ac_compiler --version </dev/null >&5) 2>&5
2052 ac_status=$?
2053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2054 (exit $ac_status); }
2055 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2056 (eval $ac_compiler -v </dev/null >&5) 2>&5
2057 ac_status=$?
2058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2059 (exit $ac_status); }
2060 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2061 (eval $ac_compiler -V </dev/null >&5) 2>&5
2062 ac_status=$?
2063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2064 (exit $ac_status); }
2066 cat >conftest.$ac_ext <<_ACEOF
2067 /* confdefs.h. */
2068 _ACEOF
2069 cat confdefs.h >>conftest.$ac_ext
2070 cat >>conftest.$ac_ext <<_ACEOF
2071 /* end confdefs.h. */
2074 main ()
2078 return 0;
2080 _ACEOF
2081 # FIXME: Cleanup?
2082 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2083 (eval $ac_link) 2>&5
2084 ac_status=$?
2085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2086 (exit $ac_status); }; then
2087 gcc_no_link=no
2088 else
2089 gcc_no_link=yes
2092 if test x$gcc_no_link = xyes; then
2093 # Setting cross_compile will disable run tests; it will
2094 # also disable AC_CHECK_FILE but that's generally
2095 # correct if we can't link.
2096 cross_compiling=yes
2097 EXEEXT=
2098 else
2099 cat >conftest.$ac_ext <<_ACEOF
2100 /* confdefs.h. */
2101 _ACEOF
2102 cat confdefs.h >>conftest.$ac_ext
2103 cat >>conftest.$ac_ext <<_ACEOF
2104 /* end confdefs.h. */
2107 main ()
2111 return 0;
2113 _ACEOF
2114 ac_clean_files_save=$ac_clean_files
2115 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2116 # Try to create an executable without -o first, disregard a.out.
2117 # It will help us diagnose broken compilers, and finding out an intuition
2118 # of exeext.
2119 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2120 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2121 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2122 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2123 (eval $ac_link_default) 2>&5
2124 ac_status=$?
2125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2126 (exit $ac_status); }; then
2127 # Find the output, starting from the most likely. This scheme is
2128 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2129 # resort.
2131 # Be careful to initialize this variable, since it used to be cached.
2132 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2133 ac_cv_exeext=
2134 # b.out is created by i960 compilers.
2135 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2137 test -f "$ac_file" || continue
2138 case $ac_file in
2139 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2141 conftest.$ac_ext )
2142 # This is the source file.
2144 [ab].out )
2145 # We found the default executable, but exeext='' is most
2146 # certainly right.
2147 break;;
2148 *.* )
2149 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2150 # FIXME: I believe we export ac_cv_exeext for Libtool,
2151 # but it would be cool to find out if it's true. Does anybody
2152 # maintain Libtool? --akim.
2153 export ac_cv_exeext
2154 break;;
2156 break;;
2157 esac
2158 done
2159 else
2160 echo "$as_me: failed program was:" >&5
2161 sed 's/^/| /' conftest.$ac_ext >&5
2163 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2164 See \`config.log' for more details." >&5
2165 echo "$as_me: error: C compiler cannot create executables
2166 See \`config.log' for more details." >&2;}
2167 { (exit 77); exit 77; }; }
2170 ac_exeext=$ac_cv_exeext
2171 echo "$as_me:$LINENO: result: $ac_file" >&5
2172 echo "${ECHO_T}$ac_file" >&6
2174 # Check the compiler produces executables we can run. If not, either
2175 # the compiler is broken, or we cross compile.
2176 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2177 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2178 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2179 # If not cross compiling, check that we can run a simple program.
2180 if test "$cross_compiling" != yes; then
2181 if { ac_try='./$ac_file'
2182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2183 (eval $ac_try) 2>&5
2184 ac_status=$?
2185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2186 (exit $ac_status); }; }; then
2187 cross_compiling=no
2188 else
2189 if test "$cross_compiling" = maybe; then
2190 cross_compiling=yes
2191 else
2192 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2193 If you meant to cross compile, use \`--host'.
2194 See \`config.log' for more details." >&5
2195 echo "$as_me: error: cannot run C compiled programs.
2196 If you meant to cross compile, use \`--host'.
2197 See \`config.log' for more details." >&2;}
2198 { (exit 1); exit 1; }; }
2202 echo "$as_me:$LINENO: result: yes" >&5
2203 echo "${ECHO_T}yes" >&6
2205 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2206 ac_clean_files=$ac_clean_files_save
2207 # Check the compiler produces executables we can run. If not, either
2208 # the compiler is broken, or we cross compile.
2209 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2210 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2211 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2212 echo "${ECHO_T}$cross_compiling" >&6
2214 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2215 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2216 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2217 (eval $ac_link) 2>&5
2218 ac_status=$?
2219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2220 (exit $ac_status); }; then
2221 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2222 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2223 # work properly (i.e., refer to `conftest.exe'), while it won't with
2224 # `rm'.
2225 for ac_file in conftest.exe conftest conftest.*; do
2226 test -f "$ac_file" || continue
2227 case $ac_file in
2228 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2229 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2230 export ac_cv_exeext
2231 break;;
2232 * ) break;;
2233 esac
2234 done
2235 else
2236 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2237 See \`config.log' for more details." >&5
2238 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2239 See \`config.log' for more details." >&2;}
2240 { (exit 1); exit 1; }; }
2243 rm -f conftest$ac_cv_exeext
2244 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2245 echo "${ECHO_T}$ac_cv_exeext" >&6
2247 rm -f conftest.$ac_ext
2248 EXEEXT=$ac_cv_exeext
2249 ac_exeext=$EXEEXT
2251 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2252 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2253 if test "${ac_cv_objext+set}" = set; then
2254 echo $ECHO_N "(cached) $ECHO_C" >&6
2255 else
2256 cat >conftest.$ac_ext <<_ACEOF
2257 /* confdefs.h. */
2258 _ACEOF
2259 cat confdefs.h >>conftest.$ac_ext
2260 cat >>conftest.$ac_ext <<_ACEOF
2261 /* end confdefs.h. */
2264 main ()
2268 return 0;
2270 _ACEOF
2271 rm -f conftest.o conftest.obj
2272 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2273 (eval $ac_compile) 2>&5
2274 ac_status=$?
2275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2276 (exit $ac_status); }; then
2277 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2278 case $ac_file in
2279 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2280 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2281 break;;
2282 esac
2283 done
2284 else
2285 echo "$as_me: failed program was:" >&5
2286 sed 's/^/| /' conftest.$ac_ext >&5
2288 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2289 See \`config.log' for more details." >&5
2290 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2291 See \`config.log' for more details." >&2;}
2292 { (exit 1); exit 1; }; }
2295 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2297 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2298 echo "${ECHO_T}$ac_cv_objext" >&6
2299 OBJEXT=$ac_cv_objext
2300 ac_objext=$OBJEXT
2301 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2302 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2303 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2304 echo $ECHO_N "(cached) $ECHO_C" >&6
2305 else
2306 cat >conftest.$ac_ext <<_ACEOF
2307 /* confdefs.h. */
2308 _ACEOF
2309 cat confdefs.h >>conftest.$ac_ext
2310 cat >>conftest.$ac_ext <<_ACEOF
2311 /* end confdefs.h. */
2314 main ()
2316 #ifndef __GNUC__
2317 choke me
2318 #endif
2321 return 0;
2323 _ACEOF
2324 rm -f conftest.$ac_objext
2325 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2326 (eval $ac_compile) 2>conftest.er1
2327 ac_status=$?
2328 grep -v '^ *+' conftest.er1 >conftest.err
2329 rm -f conftest.er1
2330 cat conftest.err >&5
2331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2332 (exit $ac_status); } &&
2333 { ac_try='test -z "$ac_c_werror_flag"
2334 || test ! -s conftest.err'
2335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2336 (eval $ac_try) 2>&5
2337 ac_status=$?
2338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2339 (exit $ac_status); }; } &&
2340 { ac_try='test -s conftest.$ac_objext'
2341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2342 (eval $ac_try) 2>&5
2343 ac_status=$?
2344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2345 (exit $ac_status); }; }; then
2346 ac_compiler_gnu=yes
2347 else
2348 echo "$as_me: failed program was:" >&5
2349 sed 's/^/| /' conftest.$ac_ext >&5
2351 ac_compiler_gnu=no
2353 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2354 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2357 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2358 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2359 GCC=`test $ac_compiler_gnu = yes && echo yes`
2360 ac_test_CFLAGS=${CFLAGS+set}
2361 ac_save_CFLAGS=$CFLAGS
2362 CFLAGS="-g"
2363 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2364 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2365 if test "${ac_cv_prog_cc_g+set}" = set; then
2366 echo $ECHO_N "(cached) $ECHO_C" >&6
2367 else
2368 cat >conftest.$ac_ext <<_ACEOF
2369 /* confdefs.h. */
2370 _ACEOF
2371 cat confdefs.h >>conftest.$ac_ext
2372 cat >>conftest.$ac_ext <<_ACEOF
2373 /* end confdefs.h. */
2376 main ()
2380 return 0;
2382 _ACEOF
2383 rm -f conftest.$ac_objext
2384 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2385 (eval $ac_compile) 2>conftest.er1
2386 ac_status=$?
2387 grep -v '^ *+' conftest.er1 >conftest.err
2388 rm -f conftest.er1
2389 cat conftest.err >&5
2390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2391 (exit $ac_status); } &&
2392 { ac_try='test -z "$ac_c_werror_flag"
2393 || test ! -s conftest.err'
2394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2395 (eval $ac_try) 2>&5
2396 ac_status=$?
2397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2398 (exit $ac_status); }; } &&
2399 { ac_try='test -s conftest.$ac_objext'
2400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2401 (eval $ac_try) 2>&5
2402 ac_status=$?
2403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2404 (exit $ac_status); }; }; then
2405 ac_cv_prog_cc_g=yes
2406 else
2407 echo "$as_me: failed program was:" >&5
2408 sed 's/^/| /' conftest.$ac_ext >&5
2410 ac_cv_prog_cc_g=no
2412 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2414 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2415 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2416 if test "$ac_test_CFLAGS" = set; then
2417 CFLAGS=$ac_save_CFLAGS
2418 elif test $ac_cv_prog_cc_g = yes; then
2419 if test "$GCC" = yes; then
2420 CFLAGS="-g -O2"
2421 else
2422 CFLAGS="-g"
2424 else
2425 if test "$GCC" = yes; then
2426 CFLAGS="-O2"
2427 else
2428 CFLAGS=
2431 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2432 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2433 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2434 echo $ECHO_N "(cached) $ECHO_C" >&6
2435 else
2436 ac_cv_prog_cc_stdc=no
2437 ac_save_CC=$CC
2438 cat >conftest.$ac_ext <<_ACEOF
2439 /* confdefs.h. */
2440 _ACEOF
2441 cat confdefs.h >>conftest.$ac_ext
2442 cat >>conftest.$ac_ext <<_ACEOF
2443 /* end confdefs.h. */
2444 #include <stdarg.h>
2445 #include <stdio.h>
2446 #include <sys/types.h>
2447 #include <sys/stat.h>
2448 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2449 struct buf { int x; };
2450 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2451 static char *e (p, i)
2452 char **p;
2453 int i;
2455 return p[i];
2457 static char *f (char * (*g) (char **, int), char **p, ...)
2459 char *s;
2460 va_list v;
2461 va_start (v,p);
2462 s = g (p, va_arg (v,int));
2463 va_end (v);
2464 return s;
2467 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2468 function prototypes and stuff, but not '\xHH' hex character constants.
2469 These don't provoke an error unfortunately, instead are silently treated
2470 as 'x'. The following induces an error, until -std1 is added to get
2471 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2472 array size at least. It's necessary to write '\x00'==0 to get something
2473 that's true only with -std1. */
2474 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2476 int test (int i, double x);
2477 struct s1 {int (*f) (int a);};
2478 struct s2 {int (*f) (double a);};
2479 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2480 int argc;
2481 char **argv;
2483 main ()
2485 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2487 return 0;
2489 _ACEOF
2490 # Don't try gcc -ansi; that turns off useful extensions and
2491 # breaks some systems' header files.
2492 # AIX -qlanglvl=ansi
2493 # Ultrix and OSF/1 -std1
2494 # HP-UX 10.20 and later -Ae
2495 # HP-UX older versions -Aa -D_HPUX_SOURCE
2496 # SVR4 -Xc -D__EXTENSIONS__
2497 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2499 CC="$ac_save_CC $ac_arg"
2500 rm -f conftest.$ac_objext
2501 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2502 (eval $ac_compile) 2>conftest.er1
2503 ac_status=$?
2504 grep -v '^ *+' conftest.er1 >conftest.err
2505 rm -f conftest.er1
2506 cat conftest.err >&5
2507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2508 (exit $ac_status); } &&
2509 { ac_try='test -z "$ac_c_werror_flag"
2510 || test ! -s conftest.err'
2511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2512 (eval $ac_try) 2>&5
2513 ac_status=$?
2514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2515 (exit $ac_status); }; } &&
2516 { ac_try='test -s conftest.$ac_objext'
2517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2518 (eval $ac_try) 2>&5
2519 ac_status=$?
2520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2521 (exit $ac_status); }; }; then
2522 ac_cv_prog_cc_stdc=$ac_arg
2523 break
2524 else
2525 echo "$as_me: failed program was:" >&5
2526 sed 's/^/| /' conftest.$ac_ext >&5
2529 rm -f conftest.err conftest.$ac_objext
2530 done
2531 rm -f conftest.$ac_ext conftest.$ac_objext
2532 CC=$ac_save_CC
2536 case "x$ac_cv_prog_cc_stdc" in
2537 x|xno)
2538 echo "$as_me:$LINENO: result: none needed" >&5
2539 echo "${ECHO_T}none needed" >&6 ;;
2541 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2542 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2543 CC="$CC $ac_cv_prog_cc_stdc" ;;
2544 esac
2546 # Some people use a C++ compiler to compile C. Since we use `exit',
2547 # in C++ we need to declare it. In case someone uses the same compiler
2548 # for both compiling C and C++ we need to have the C++ compiler decide
2549 # the declaration of exit, since it's the most demanding environment.
2550 cat >conftest.$ac_ext <<_ACEOF
2551 #ifndef __cplusplus
2552 choke me
2553 #endif
2554 _ACEOF
2555 rm -f conftest.$ac_objext
2556 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2557 (eval $ac_compile) 2>conftest.er1
2558 ac_status=$?
2559 grep -v '^ *+' conftest.er1 >conftest.err
2560 rm -f conftest.er1
2561 cat conftest.err >&5
2562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2563 (exit $ac_status); } &&
2564 { ac_try='test -z "$ac_c_werror_flag"
2565 || test ! -s conftest.err'
2566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2567 (eval $ac_try) 2>&5
2568 ac_status=$?
2569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2570 (exit $ac_status); }; } &&
2571 { ac_try='test -s conftest.$ac_objext'
2572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2573 (eval $ac_try) 2>&5
2574 ac_status=$?
2575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2576 (exit $ac_status); }; }; then
2577 for ac_declaration in \
2578 '' \
2579 'extern "C" void std::exit (int) throw (); using std::exit;' \
2580 'extern "C" void std::exit (int); using std::exit;' \
2581 'extern "C" void exit (int) throw ();' \
2582 'extern "C" void exit (int);' \
2583 'void exit (int);'
2585 cat >conftest.$ac_ext <<_ACEOF
2586 /* confdefs.h. */
2587 _ACEOF
2588 cat confdefs.h >>conftest.$ac_ext
2589 cat >>conftest.$ac_ext <<_ACEOF
2590 /* end confdefs.h. */
2591 $ac_declaration
2592 #include <stdlib.h>
2594 main ()
2596 exit (42);
2598 return 0;
2600 _ACEOF
2601 rm -f conftest.$ac_objext
2602 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2603 (eval $ac_compile) 2>conftest.er1
2604 ac_status=$?
2605 grep -v '^ *+' conftest.er1 >conftest.err
2606 rm -f conftest.er1
2607 cat conftest.err >&5
2608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2609 (exit $ac_status); } &&
2610 { ac_try='test -z "$ac_c_werror_flag"
2611 || test ! -s conftest.err'
2612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2613 (eval $ac_try) 2>&5
2614 ac_status=$?
2615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2616 (exit $ac_status); }; } &&
2617 { ac_try='test -s conftest.$ac_objext'
2618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2619 (eval $ac_try) 2>&5
2620 ac_status=$?
2621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2622 (exit $ac_status); }; }; then
2624 else
2625 echo "$as_me: failed program was:" >&5
2626 sed 's/^/| /' conftest.$ac_ext >&5
2628 continue
2630 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2631 cat >conftest.$ac_ext <<_ACEOF
2632 /* confdefs.h. */
2633 _ACEOF
2634 cat confdefs.h >>conftest.$ac_ext
2635 cat >>conftest.$ac_ext <<_ACEOF
2636 /* end confdefs.h. */
2637 $ac_declaration
2639 main ()
2641 exit (42);
2643 return 0;
2645 _ACEOF
2646 rm -f conftest.$ac_objext
2647 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2648 (eval $ac_compile) 2>conftest.er1
2649 ac_status=$?
2650 grep -v '^ *+' conftest.er1 >conftest.err
2651 rm -f conftest.er1
2652 cat conftest.err >&5
2653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2654 (exit $ac_status); } &&
2655 { ac_try='test -z "$ac_c_werror_flag"
2656 || test ! -s conftest.err'
2657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2658 (eval $ac_try) 2>&5
2659 ac_status=$?
2660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2661 (exit $ac_status); }; } &&
2662 { ac_try='test -s conftest.$ac_objext'
2663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2664 (eval $ac_try) 2>&5
2665 ac_status=$?
2666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2667 (exit $ac_status); }; }; then
2668 break
2669 else
2670 echo "$as_me: failed program was:" >&5
2671 sed 's/^/| /' conftest.$ac_ext >&5
2674 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2675 done
2676 rm -f conftest*
2677 if test -n "$ac_declaration"; then
2678 echo '#ifdef __cplusplus' >>confdefs.h
2679 echo $ac_declaration >>confdefs.h
2680 echo '#endif' >>confdefs.h
2683 else
2684 echo "$as_me: failed program was:" >&5
2685 sed 's/^/| /' conftest.$ac_ext >&5
2688 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2689 ac_ext=c
2690 ac_cpp='$CPP $CPPFLAGS'
2691 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2692 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2693 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2695 ac_ext=c
2696 ac_cpp='$CPP $CPPFLAGS'
2697 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2698 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2699 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2700 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2701 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2702 # On Suns, sometimes $CPP names a directory.
2703 if test -n "$CPP" && test -d "$CPP"; then
2704 CPP=
2706 if test -z "$CPP"; then
2707 if test "${ac_cv_prog_CPP+set}" = set; then
2708 echo $ECHO_N "(cached) $ECHO_C" >&6
2709 else
2710 # Double quotes because CPP needs to be expanded
2711 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2713 ac_preproc_ok=false
2714 for ac_c_preproc_warn_flag in '' yes
2716 # Use a header file that comes with gcc, so configuring glibc
2717 # with a fresh cross-compiler works.
2718 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2719 # <limits.h> exists even on freestanding compilers.
2720 # On the NeXT, cc -E runs the code through the compiler's parser,
2721 # not just through cpp. "Syntax error" is here to catch this case.
2722 cat >conftest.$ac_ext <<_ACEOF
2723 /* confdefs.h. */
2724 _ACEOF
2725 cat confdefs.h >>conftest.$ac_ext
2726 cat >>conftest.$ac_ext <<_ACEOF
2727 /* end confdefs.h. */
2728 #ifdef __STDC__
2729 # include <limits.h>
2730 #else
2731 # include <assert.h>
2732 #endif
2733 Syntax error
2734 _ACEOF
2735 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2736 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2737 ac_status=$?
2738 grep -v '^ *+' conftest.er1 >conftest.err
2739 rm -f conftest.er1
2740 cat conftest.err >&5
2741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2742 (exit $ac_status); } >/dev/null; then
2743 if test -s conftest.err; then
2744 ac_cpp_err=$ac_c_preproc_warn_flag
2745 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2746 else
2747 ac_cpp_err=
2749 else
2750 ac_cpp_err=yes
2752 if test -z "$ac_cpp_err"; then
2754 else
2755 echo "$as_me: failed program was:" >&5
2756 sed 's/^/| /' conftest.$ac_ext >&5
2758 # Broken: fails on valid input.
2759 continue
2761 rm -f conftest.err conftest.$ac_ext
2763 # OK, works on sane cases. Now check whether non-existent headers
2764 # can be detected and how.
2765 cat >conftest.$ac_ext <<_ACEOF
2766 /* confdefs.h. */
2767 _ACEOF
2768 cat confdefs.h >>conftest.$ac_ext
2769 cat >>conftest.$ac_ext <<_ACEOF
2770 /* end confdefs.h. */
2771 #include <ac_nonexistent.h>
2772 _ACEOF
2773 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2774 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2775 ac_status=$?
2776 grep -v '^ *+' conftest.er1 >conftest.err
2777 rm -f conftest.er1
2778 cat conftest.err >&5
2779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2780 (exit $ac_status); } >/dev/null; then
2781 if test -s conftest.err; then
2782 ac_cpp_err=$ac_c_preproc_warn_flag
2783 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2784 else
2785 ac_cpp_err=
2787 else
2788 ac_cpp_err=yes
2790 if test -z "$ac_cpp_err"; then
2791 # Broken: success on invalid input.
2792 continue
2793 else
2794 echo "$as_me: failed program was:" >&5
2795 sed 's/^/| /' conftest.$ac_ext >&5
2797 # Passes both tests.
2798 ac_preproc_ok=:
2799 break
2801 rm -f conftest.err conftest.$ac_ext
2803 done
2804 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2805 rm -f conftest.err conftest.$ac_ext
2806 if $ac_preproc_ok; then
2807 break
2810 done
2811 ac_cv_prog_CPP=$CPP
2814 CPP=$ac_cv_prog_CPP
2815 else
2816 ac_cv_prog_CPP=$CPP
2818 echo "$as_me:$LINENO: result: $CPP" >&5
2819 echo "${ECHO_T}$CPP" >&6
2820 ac_preproc_ok=false
2821 for ac_c_preproc_warn_flag in '' yes
2823 # Use a header file that comes with gcc, so configuring glibc
2824 # with a fresh cross-compiler works.
2825 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2826 # <limits.h> exists even on freestanding compilers.
2827 # On the NeXT, cc -E runs the code through the compiler's parser,
2828 # not just through cpp. "Syntax error" is here to catch this case.
2829 cat >conftest.$ac_ext <<_ACEOF
2830 /* confdefs.h. */
2831 _ACEOF
2832 cat confdefs.h >>conftest.$ac_ext
2833 cat >>conftest.$ac_ext <<_ACEOF
2834 /* end confdefs.h. */
2835 #ifdef __STDC__
2836 # include <limits.h>
2837 #else
2838 # include <assert.h>
2839 #endif
2840 Syntax error
2841 _ACEOF
2842 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2843 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2844 ac_status=$?
2845 grep -v '^ *+' conftest.er1 >conftest.err
2846 rm -f conftest.er1
2847 cat conftest.err >&5
2848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2849 (exit $ac_status); } >/dev/null; then
2850 if test -s conftest.err; then
2851 ac_cpp_err=$ac_c_preproc_warn_flag
2852 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2853 else
2854 ac_cpp_err=
2856 else
2857 ac_cpp_err=yes
2859 if test -z "$ac_cpp_err"; then
2861 else
2862 echo "$as_me: failed program was:" >&5
2863 sed 's/^/| /' conftest.$ac_ext >&5
2865 # Broken: fails on valid input.
2866 continue
2868 rm -f conftest.err conftest.$ac_ext
2870 # OK, works on sane cases. Now check whether non-existent headers
2871 # can be detected and how.
2872 cat >conftest.$ac_ext <<_ACEOF
2873 /* confdefs.h. */
2874 _ACEOF
2875 cat confdefs.h >>conftest.$ac_ext
2876 cat >>conftest.$ac_ext <<_ACEOF
2877 /* end confdefs.h. */
2878 #include <ac_nonexistent.h>
2879 _ACEOF
2880 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2881 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2882 ac_status=$?
2883 grep -v '^ *+' conftest.er1 >conftest.err
2884 rm -f conftest.er1
2885 cat conftest.err >&5
2886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2887 (exit $ac_status); } >/dev/null; then
2888 if test -s conftest.err; then
2889 ac_cpp_err=$ac_c_preproc_warn_flag
2890 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2891 else
2892 ac_cpp_err=
2894 else
2895 ac_cpp_err=yes
2897 if test -z "$ac_cpp_err"; then
2898 # Broken: success on invalid input.
2899 continue
2900 else
2901 echo "$as_me: failed program was:" >&5
2902 sed 's/^/| /' conftest.$ac_ext >&5
2904 # Passes both tests.
2905 ac_preproc_ok=:
2906 break
2908 rm -f conftest.err conftest.$ac_ext
2910 done
2911 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2912 rm -f conftest.err conftest.$ac_ext
2913 if $ac_preproc_ok; then
2915 else
2916 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2917 See \`config.log' for more details." >&5
2918 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2919 See \`config.log' for more details." >&2;}
2920 { (exit 1); exit 1; }; }
2923 ac_ext=c
2924 ac_cpp='$CPP $CPPFLAGS'
2925 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2926 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2927 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2930 ac_c_preproc_warn_flag=yes
2932 if test x$GCC = xyes; then
2933 ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
2937 if test "x$CC" != xcc; then
2938 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2939 echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2940 else
2941 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2942 echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2944 set dummy $CC; ac_cc=`echo $2 |
2945 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2946 if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2947 echo $ECHO_N "(cached) $ECHO_C" >&6
2948 else
2949 cat >conftest.$ac_ext <<_ACEOF
2950 /* confdefs.h. */
2951 _ACEOF
2952 cat confdefs.h >>conftest.$ac_ext
2953 cat >>conftest.$ac_ext <<_ACEOF
2954 /* end confdefs.h. */
2957 main ()
2961 return 0;
2963 _ACEOF
2964 # Make sure it works both with $CC and with simple cc.
2965 # We do the test twice because some compilers refuse to overwrite an
2966 # existing .o file with -o, though they will create one.
2967 ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2968 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2969 (eval $ac_try) 2>&5
2970 ac_status=$?
2971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2972 (exit $ac_status); } &&
2973 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2974 (eval $ac_try) 2>&5
2975 ac_status=$?
2976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2977 (exit $ac_status); };
2978 then
2979 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2980 if test "x$CC" != xcc; then
2981 # Test first that cc exists at all.
2982 if { ac_try='cc -c conftest.$ac_ext >&5'
2983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2984 (eval $ac_try) 2>&5
2985 ac_status=$?
2986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2987 (exit $ac_status); }; }; then
2988 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2989 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2990 (eval $ac_try) 2>&5
2991 ac_status=$?
2992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2993 (exit $ac_status); } &&
2994 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2995 (eval $ac_try) 2>&5
2996 ac_status=$?
2997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2998 (exit $ac_status); };
2999 then
3000 # cc works too.
3002 else
3003 # cc exists but doesn't like -o.
3004 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3008 else
3009 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3011 rm -f conftest*
3014 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
3015 echo "$as_me:$LINENO: result: yes" >&5
3016 echo "${ECHO_T}yes" >&6
3017 else
3018 echo "$as_me:$LINENO: result: no" >&5
3019 echo "${ECHO_T}no" >&6
3021 cat >>confdefs.h <<\_ACEOF
3022 #define NO_MINUS_C_MINUS_O 1
3023 _ACEOF
3027 # autoconf is lame and doesn't give us any substitution variable for this.
3028 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
3029 NO_MINUS_C_MINUS_O=yes
3030 else
3031 OUTPUT_OPTION='-o $@'
3037 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3038 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3039 if test "${ac_cv_c_const+set}" = set; then
3040 echo $ECHO_N "(cached) $ECHO_C" >&6
3041 else
3042 cat >conftest.$ac_ext <<_ACEOF
3043 /* confdefs.h. */
3044 _ACEOF
3045 cat confdefs.h >>conftest.$ac_ext
3046 cat >>conftest.$ac_ext <<_ACEOF
3047 /* end confdefs.h. */
3050 main ()
3052 /* FIXME: Include the comments suggested by Paul. */
3053 #ifndef __cplusplus
3054 /* Ultrix mips cc rejects this. */
3055 typedef int charset[2];
3056 const charset x;
3057 /* SunOS 4.1.1 cc rejects this. */
3058 char const *const *ccp;
3059 char **p;
3060 /* NEC SVR4.0.2 mips cc rejects this. */
3061 struct point {int x, y;};
3062 static struct point const zero = {0,0};
3063 /* AIX XL C 1.02.0.0 rejects this.
3064 It does not let you subtract one const X* pointer from another in
3065 an arm of an if-expression whose if-part is not a constant
3066 expression */
3067 const char *g = "string";
3068 ccp = &g + (g ? g-g : 0);
3069 /* HPUX 7.0 cc rejects these. */
3070 ++ccp;
3071 p = (char**) ccp;
3072 ccp = (char const *const *) p;
3073 { /* SCO 3.2v4 cc rejects this. */
3074 char *t;
3075 char const *s = 0 ? (char *) 0 : (char const *) 0;
3077 *t++ = 0;
3079 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3080 int x[] = {25, 17};
3081 const int *foo = &x[0];
3082 ++foo;
3084 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3085 typedef const int *iptr;
3086 iptr p = 0;
3087 ++p;
3089 { /* AIX XL C 1.02.0.0 rejects this saying
3090 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3091 struct s { int j; const int *ap[3]; };
3092 struct s *b; b->j = 5;
3094 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3095 const int foo = 10;
3097 #endif
3100 return 0;
3102 _ACEOF
3103 rm -f conftest.$ac_objext
3104 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3105 (eval $ac_compile) 2>conftest.er1
3106 ac_status=$?
3107 grep -v '^ *+' conftest.er1 >conftest.err
3108 rm -f conftest.er1
3109 cat conftest.err >&5
3110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3111 (exit $ac_status); } &&
3112 { ac_try='test -z "$ac_c_werror_flag"
3113 || test ! -s conftest.err'
3114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3115 (eval $ac_try) 2>&5
3116 ac_status=$?
3117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3118 (exit $ac_status); }; } &&
3119 { ac_try='test -s conftest.$ac_objext'
3120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3121 (eval $ac_try) 2>&5
3122 ac_status=$?
3123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3124 (exit $ac_status); }; }; then
3125 ac_cv_c_const=yes
3126 else
3127 echo "$as_me: failed program was:" >&5
3128 sed 's/^/| /' conftest.$ac_ext >&5
3130 ac_cv_c_const=no
3132 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3134 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3135 echo "${ECHO_T}$ac_cv_c_const" >&6
3136 if test $ac_cv_c_const = no; then
3138 cat >>confdefs.h <<\_ACEOF
3139 #define const
3140 _ACEOF
3144 echo "$as_me:$LINENO: checking for inline" >&5
3145 echo $ECHO_N "checking for inline... $ECHO_C" >&6
3146 if test "${ac_cv_c_inline+set}" = set; then
3147 echo $ECHO_N "(cached) $ECHO_C" >&6
3148 else
3149 ac_cv_c_inline=no
3150 for ac_kw in inline __inline__ __inline; do
3151 cat >conftest.$ac_ext <<_ACEOF
3152 /* confdefs.h. */
3153 _ACEOF
3154 cat confdefs.h >>conftest.$ac_ext
3155 cat >>conftest.$ac_ext <<_ACEOF
3156 /* end confdefs.h. */
3157 #ifndef __cplusplus
3158 typedef int foo_t;
3159 static $ac_kw foo_t static_foo () {return 0; }
3160 $ac_kw foo_t foo () {return 0; }
3161 #endif
3163 _ACEOF
3164 rm -f conftest.$ac_objext
3165 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3166 (eval $ac_compile) 2>conftest.er1
3167 ac_status=$?
3168 grep -v '^ *+' conftest.er1 >conftest.err
3169 rm -f conftest.er1
3170 cat conftest.err >&5
3171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3172 (exit $ac_status); } &&
3173 { ac_try='test -z "$ac_c_werror_flag"
3174 || test ! -s conftest.err'
3175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3176 (eval $ac_try) 2>&5
3177 ac_status=$?
3178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3179 (exit $ac_status); }; } &&
3180 { ac_try='test -s conftest.$ac_objext'
3181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3182 (eval $ac_try) 2>&5
3183 ac_status=$?
3184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3185 (exit $ac_status); }; }; then
3186 ac_cv_c_inline=$ac_kw; break
3187 else
3188 echo "$as_me: failed program was:" >&5
3189 sed 's/^/| /' conftest.$ac_ext >&5
3192 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3193 done
3196 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3197 echo "${ECHO_T}$ac_cv_c_inline" >&6
3200 case $ac_cv_c_inline in
3201 inline | yes) ;;
3203 case $ac_cv_c_inline in
3204 no) ac_val=;;
3205 *) ac_val=$ac_cv_c_inline;;
3206 esac
3207 cat >>confdefs.h <<_ACEOF
3208 #ifndef __cplusplus
3209 #define inline $ac_val
3210 #endif
3211 _ACEOF
3213 esac
3215 echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
3216 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
3217 if test "${ac_cv_c_bigendian+set}" = set; then
3218 echo $ECHO_N "(cached) $ECHO_C" >&6
3219 else
3220 ac_cv_c_bigendian=unknown
3221 # See if sys/param.h defines the BYTE_ORDER macro.
3222 cat >conftest.$ac_ext <<_ACEOF
3223 /* confdefs.h. */
3224 _ACEOF
3225 cat confdefs.h >>conftest.$ac_ext
3226 cat >>conftest.$ac_ext <<_ACEOF
3227 /* end confdefs.h. */
3228 #include <sys/types.h>
3229 #include <sys/param.h>
3231 main ()
3234 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3235 bogus endian macros
3236 #endif
3238 return 0;
3240 _ACEOF
3241 rm -f conftest.$ac_objext
3242 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3243 (eval $ac_compile) 2>conftest.er1
3244 ac_status=$?
3245 grep -v '^ *+' conftest.er1 >conftest.err
3246 rm -f conftest.er1
3247 cat conftest.err >&5
3248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3249 (exit $ac_status); } &&
3250 { ac_try='test -z "$ac_c_werror_flag"
3251 || test ! -s conftest.err'
3252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3253 (eval $ac_try) 2>&5
3254 ac_status=$?
3255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3256 (exit $ac_status); }; } &&
3257 { ac_try='test -s conftest.$ac_objext'
3258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3259 (eval $ac_try) 2>&5
3260 ac_status=$?
3261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3262 (exit $ac_status); }; }; then
3263 # It does; now see whether it defined to BIG_ENDIAN or not.
3264 cat >conftest.$ac_ext <<_ACEOF
3265 /* confdefs.h. */
3266 _ACEOF
3267 cat confdefs.h >>conftest.$ac_ext
3268 cat >>conftest.$ac_ext <<_ACEOF
3269 /* end confdefs.h. */
3270 #include <sys/types.h>
3271 #include <sys/param.h>
3273 main ()
3276 #if BYTE_ORDER != BIG_ENDIAN
3277 not big endian
3278 #endif
3280 return 0;
3282 _ACEOF
3283 rm -f conftest.$ac_objext
3284 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3285 (eval $ac_compile) 2>conftest.er1
3286 ac_status=$?
3287 grep -v '^ *+' conftest.er1 >conftest.err
3288 rm -f conftest.er1
3289 cat conftest.err >&5
3290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3291 (exit $ac_status); } &&
3292 { ac_try='test -z "$ac_c_werror_flag"
3293 || test ! -s conftest.err'
3294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3295 (eval $ac_try) 2>&5
3296 ac_status=$?
3297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3298 (exit $ac_status); }; } &&
3299 { ac_try='test -s conftest.$ac_objext'
3300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3301 (eval $ac_try) 2>&5
3302 ac_status=$?
3303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3304 (exit $ac_status); }; }; then
3305 ac_cv_c_bigendian=yes
3306 else
3307 echo "$as_me: failed program was:" >&5
3308 sed 's/^/| /' conftest.$ac_ext >&5
3310 ac_cv_c_bigendian=no
3312 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3313 else
3314 echo "$as_me: failed program was:" >&5
3315 sed 's/^/| /' conftest.$ac_ext >&5
3318 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3319 if test $ac_cv_c_bigendian = unknown; then
3320 if test "$cross_compiling" = yes; then
3321 echo $ac_n "cross-compiling... " 2>&6
3322 else
3323 cat >conftest.$ac_ext <<_ACEOF
3324 /* confdefs.h. */
3325 _ACEOF
3326 cat confdefs.h >>conftest.$ac_ext
3327 cat >>conftest.$ac_ext <<_ACEOF
3328 /* end confdefs.h. */
3329 main () {
3330 /* Are we little or big endian? From Harbison&Steele. */
3331 union
3333 long l;
3334 char c[sizeof (long)];
3335 } u;
3336 u.l = 1;
3337 exit (u.c[sizeof (long) - 1] == 1);
3339 _ACEOF
3340 rm -f conftest$ac_exeext
3341 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3342 (eval $ac_link) 2>&5
3343 ac_status=$?
3344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3345 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3347 (eval $ac_try) 2>&5
3348 ac_status=$?
3349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3350 (exit $ac_status); }; }; then
3351 ac_cv_c_bigendian=no
3352 else
3353 echo "$as_me: program exited with status $ac_status" >&5
3354 echo "$as_me: failed program was:" >&5
3355 sed 's/^/| /' conftest.$ac_ext >&5
3357 ( exit $ac_status )
3358 ac_cv_c_bigendian=yes
3360 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3364 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
3365 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
3366 if test $ac_cv_c_bigendian = unknown; then
3367 echo "$as_me:$LINENO: checking to probe for byte ordering" >&5
3368 echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6
3370 cat >conftest.c <<EOF
3371 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3372 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3373 void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3374 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3375 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3376 void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3377 int main() { _ascii (); _ebcdic (); return 0; }
3379 if test -f conftest.c ; then
3380 if ${CC-cc} ${CFLAGS} -c conftest.c -o conftest.o && test -f conftest.o ; then
3381 if test `grep -l BIGenDianSyS conftest.o` ; then
3382 echo $ac_n ' big endian probe OK, ' 1>&6
3383 ac_cv_c_bigendian=yes
3385 if test `grep -l LiTTleEnDian conftest.o` ; then
3386 echo $ac_n ' little endian probe OK, ' 1>&6
3387 if test $ac_cv_c_bigendian = yes ; then
3388 ac_cv_c_bigendian=unknown;
3389 else
3390 ac_cv_c_bigendian=no
3393 echo $ac_n 'guessing bigendian ... ' >&6
3396 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
3397 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
3399 if test $ac_cv_c_bigendian = yes; then
3401 cat >>confdefs.h <<\_ACEOF
3402 #define WORDS_BIGENDIAN 1
3403 _ACEOF
3406 cat >>confdefs.h <<\_ACEOF
3407 #define HOST_WORDS_BIG_ENDIAN 1
3408 _ACEOF
3410 BYTEORDER=4321
3411 else
3412 BYTEORDER=1234
3415 cat >>confdefs.h <<_ACEOF
3416 #define BYTEORDER $BYTEORDER
3417 _ACEOF
3419 if test $ac_cv_c_bigendian = unknown; then
3420 { { echo "$as_me:$LINENO: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&5
3421 echo "$as_me: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&2;}
3422 { (exit 1); exit 1; }; }
3428 ac_config_headers="$ac_config_headers config.h:config.in"
3432 # Find a good install program. We prefer a C program (faster),
3433 # so one script is as good as another. But avoid the broken or
3434 # incompatible versions:
3435 # SysV /etc/install, /usr/sbin/install
3436 # SunOS /usr/etc/install
3437 # IRIX /sbin/install
3438 # AIX /bin/install
3439 # AmigaOS /C/install, which installs bootblocks on floppy discs
3440 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3441 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3442 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3443 # OS/2's system install, which has a completely different semantic
3444 # ./install, which can be erroneously created by make from ./install.sh.
3445 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3446 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
3447 if test -z "$INSTALL"; then
3448 if test "${ac_cv_path_install+set}" = set; then
3449 echo $ECHO_N "(cached) $ECHO_C" >&6
3450 else
3451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3452 for as_dir in $PATH
3454 IFS=$as_save_IFS
3455 test -z "$as_dir" && as_dir=.
3456 # Account for people who put trailing slashes in PATH elements.
3457 case $as_dir/ in
3458 ./ | .// | /cC/* | \
3459 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3460 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3461 /usr/ucb/* ) ;;
3463 # OSF1 and SCO ODT 3.0 have their own names for install.
3464 # Don't use installbsd from OSF since it installs stuff as root
3465 # by default.
3466 for ac_prog in ginstall scoinst install; do
3467 for ac_exec_ext in '' $ac_executable_extensions; do
3468 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3469 if test $ac_prog = install &&
3470 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3471 # AIX install. It has an incompatible calling convention.
3473 elif test $ac_prog = install &&
3474 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3475 # program-specific install script used by HP pwplus--don't use.
3477 else
3478 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3479 break 3
3482 done
3483 done
3485 esac
3486 done
3490 if test "${ac_cv_path_install+set}" = set; then
3491 INSTALL=$ac_cv_path_install
3492 else
3493 # As a last resort, use the slow shell script. We don't cache a
3494 # path for INSTALL within a source directory, because that will
3495 # break other packages using the cache if that directory is
3496 # removed, or if the path is relative.
3497 INSTALL=$ac_install_sh
3500 echo "$as_me:$LINENO: result: $INSTALL" >&5
3501 echo "${ECHO_T}$INSTALL" >&6
3503 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3504 # It thinks the first close brace ends the variable substitution.
3505 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3507 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3509 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3512 . ${srcdir}/config.table
3513 host_makefile_frag=${frag}
3516 # It's OK to check for header files. Although the compiler may not be
3517 # able to link anything, it had better be able to at least compile
3518 # something.
3543 for ac_header in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h
3545 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3546 echo "$as_me:$LINENO: checking for $ac_header" >&5
3547 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3548 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3549 echo $ECHO_N "(cached) $ECHO_C" >&6
3550 else
3551 cat >conftest.$ac_ext <<_ACEOF
3552 /* confdefs.h. */
3553 _ACEOF
3554 cat confdefs.h >>conftest.$ac_ext
3555 cat >>conftest.$ac_ext <<_ACEOF
3556 /* end confdefs.h. */
3557 #include <$ac_header>
3558 _ACEOF
3559 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3560 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3561 ac_status=$?
3562 grep -v '^ *+' conftest.er1 >conftest.err
3563 rm -f conftest.er1
3564 cat conftest.err >&5
3565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3566 (exit $ac_status); } >/dev/null; then
3567 if test -s conftest.err; then
3568 ac_cpp_err=$ac_c_preproc_warn_flag
3569 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3570 else
3571 ac_cpp_err=
3573 else
3574 ac_cpp_err=yes
3576 if test -z "$ac_cpp_err"; then
3577 eval "$as_ac_Header=yes"
3578 else
3579 echo "$as_me: failed program was:" >&5
3580 sed 's/^/| /' conftest.$ac_ext >&5
3582 eval "$as_ac_Header=no"
3584 rm -f conftest.err conftest.$ac_ext
3586 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3587 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3588 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3589 cat >>confdefs.h <<_ACEOF
3590 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3591 _ACEOF
3594 done
3596 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
3597 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
3598 if test "${ac_cv_header_sys_wait_h+set}" = set; then
3599 echo $ECHO_N "(cached) $ECHO_C" >&6
3600 else
3601 cat >conftest.$ac_ext <<_ACEOF
3602 /* confdefs.h. */
3603 _ACEOF
3604 cat confdefs.h >>conftest.$ac_ext
3605 cat >>conftest.$ac_ext <<_ACEOF
3606 /* end confdefs.h. */
3607 #include <sys/types.h>
3608 #include <sys/wait.h>
3609 #ifndef WEXITSTATUS
3610 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3611 #endif
3612 #ifndef WIFEXITED
3613 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3614 #endif
3617 main ()
3619 int s;
3620 wait (&s);
3621 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3623 return 0;
3625 _ACEOF
3626 rm -f conftest.$ac_objext
3627 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3628 (eval $ac_compile) 2>conftest.er1
3629 ac_status=$?
3630 grep -v '^ *+' conftest.er1 >conftest.err
3631 rm -f conftest.er1
3632 cat conftest.err >&5
3633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3634 (exit $ac_status); } &&
3635 { ac_try='test -z "$ac_c_werror_flag"
3636 || test ! -s conftest.err'
3637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3638 (eval $ac_try) 2>&5
3639 ac_status=$?
3640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3641 (exit $ac_status); }; } &&
3642 { ac_try='test -s conftest.$ac_objext'
3643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3644 (eval $ac_try) 2>&5
3645 ac_status=$?
3646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3647 (exit $ac_status); }; }; then
3648 ac_cv_header_sys_wait_h=yes
3649 else
3650 echo "$as_me: failed program was:" >&5
3651 sed 's/^/| /' conftest.$ac_ext >&5
3653 ac_cv_header_sys_wait_h=no
3655 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3657 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3658 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3659 if test $ac_cv_header_sys_wait_h = yes; then
3661 cat >>confdefs.h <<\_ACEOF
3662 #define HAVE_SYS_WAIT_H 1
3663 _ACEOF
3667 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
3668 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3669 if test "${ac_cv_header_time+set}" = set; then
3670 echo $ECHO_N "(cached) $ECHO_C" >&6
3671 else
3672 cat >conftest.$ac_ext <<_ACEOF
3673 /* confdefs.h. */
3674 _ACEOF
3675 cat confdefs.h >>conftest.$ac_ext
3676 cat >>conftest.$ac_ext <<_ACEOF
3677 /* end confdefs.h. */
3678 #include <sys/types.h>
3679 #include <sys/time.h>
3680 #include <time.h>
3683 main ()
3685 if ((struct tm *) 0)
3686 return 0;
3688 return 0;
3690 _ACEOF
3691 rm -f conftest.$ac_objext
3692 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3693 (eval $ac_compile) 2>conftest.er1
3694 ac_status=$?
3695 grep -v '^ *+' conftest.er1 >conftest.err
3696 rm -f conftest.er1
3697 cat conftest.err >&5
3698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3699 (exit $ac_status); } &&
3700 { ac_try='test -z "$ac_c_werror_flag"
3701 || test ! -s conftest.err'
3702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3703 (eval $ac_try) 2>&5
3704 ac_status=$?
3705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3706 (exit $ac_status); }; } &&
3707 { ac_try='test -s conftest.$ac_objext'
3708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3709 (eval $ac_try) 2>&5
3710 ac_status=$?
3711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3712 (exit $ac_status); }; }; then
3713 ac_cv_header_time=yes
3714 else
3715 echo "$as_me: failed program was:" >&5
3716 sed 's/^/| /' conftest.$ac_ext >&5
3718 ac_cv_header_time=no
3720 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3722 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
3723 echo "${ECHO_T}$ac_cv_header_time" >&6
3724 if test $ac_cv_header_time = yes; then
3726 cat >>confdefs.h <<\_ACEOF
3727 #define TIME_WITH_SYS_TIME 1
3728 _ACEOF
3733 echo "$as_me:$LINENO: checking whether errno must be declared" >&5
3734 echo $ECHO_N "checking whether errno must be declared... $ECHO_C" >&6
3735 if test "${libiberty_cv_declare_errno+set}" = set; then
3736 echo $ECHO_N "(cached) $ECHO_C" >&6
3737 else
3738 cat >conftest.$ac_ext <<_ACEOF
3739 /* confdefs.h. */
3740 _ACEOF
3741 cat confdefs.h >>conftest.$ac_ext
3742 cat >>conftest.$ac_ext <<_ACEOF
3743 /* end confdefs.h. */
3744 #include <errno.h>
3746 main ()
3748 int x = errno;
3750 return 0;
3752 _ACEOF
3753 rm -f conftest.$ac_objext
3754 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3755 (eval $ac_compile) 2>conftest.er1
3756 ac_status=$?
3757 grep -v '^ *+' conftest.er1 >conftest.err
3758 rm -f conftest.er1
3759 cat conftest.err >&5
3760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3761 (exit $ac_status); } &&
3762 { ac_try='test -z "$ac_c_werror_flag"
3763 || test ! -s conftest.err'
3764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3765 (eval $ac_try) 2>&5
3766 ac_status=$?
3767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3768 (exit $ac_status); }; } &&
3769 { ac_try='test -s conftest.$ac_objext'
3770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3771 (eval $ac_try) 2>&5
3772 ac_status=$?
3773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3774 (exit $ac_status); }; }; then
3775 libiberty_cv_declare_errno=no
3776 else
3777 echo "$as_me: failed program was:" >&5
3778 sed 's/^/| /' conftest.$ac_ext >&5
3780 libiberty_cv_declare_errno=yes
3782 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3784 echo "$as_me:$LINENO: result: $libiberty_cv_declare_errno" >&5
3785 echo "${ECHO_T}$libiberty_cv_declare_errno" >&6
3786 if test $libiberty_cv_declare_errno = yes
3787 then
3788 cat >>confdefs.h <<\_ACEOF
3789 #define NEED_DECLARATION_ERRNO 1
3790 _ACEOF
3795 echo "$as_me:$LINENO: checking for egrep" >&5
3796 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3797 if test "${ac_cv_prog_egrep+set}" = set; then
3798 echo $ECHO_N "(cached) $ECHO_C" >&6
3799 else
3800 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3801 then ac_cv_prog_egrep='grep -E'
3802 else ac_cv_prog_egrep='egrep'
3805 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3806 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3807 EGREP=$ac_cv_prog_egrep
3810 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3811 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3812 if test "${ac_cv_header_stdc+set}" = set; then
3813 echo $ECHO_N "(cached) $ECHO_C" >&6
3814 else
3815 cat >conftest.$ac_ext <<_ACEOF
3816 /* confdefs.h. */
3817 _ACEOF
3818 cat confdefs.h >>conftest.$ac_ext
3819 cat >>conftest.$ac_ext <<_ACEOF
3820 /* end confdefs.h. */
3821 #include <stdlib.h>
3822 #include <stdarg.h>
3823 #include <string.h>
3824 #include <float.h>
3827 main ()
3831 return 0;
3833 _ACEOF
3834 rm -f conftest.$ac_objext
3835 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3836 (eval $ac_compile) 2>conftest.er1
3837 ac_status=$?
3838 grep -v '^ *+' conftest.er1 >conftest.err
3839 rm -f conftest.er1
3840 cat conftest.err >&5
3841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3842 (exit $ac_status); } &&
3843 { ac_try='test -z "$ac_c_werror_flag"
3844 || test ! -s conftest.err'
3845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3846 (eval $ac_try) 2>&5
3847 ac_status=$?
3848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3849 (exit $ac_status); }; } &&
3850 { ac_try='test -s conftest.$ac_objext'
3851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3852 (eval $ac_try) 2>&5
3853 ac_status=$?
3854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3855 (exit $ac_status); }; }; then
3856 ac_cv_header_stdc=yes
3857 else
3858 echo "$as_me: failed program was:" >&5
3859 sed 's/^/| /' conftest.$ac_ext >&5
3861 ac_cv_header_stdc=no
3863 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3865 if test $ac_cv_header_stdc = yes; then
3866 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3867 cat >conftest.$ac_ext <<_ACEOF
3868 /* confdefs.h. */
3869 _ACEOF
3870 cat confdefs.h >>conftest.$ac_ext
3871 cat >>conftest.$ac_ext <<_ACEOF
3872 /* end confdefs.h. */
3873 #include <string.h>
3875 _ACEOF
3876 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3877 $EGREP "memchr" >/dev/null 2>&1; then
3879 else
3880 ac_cv_header_stdc=no
3882 rm -f conftest*
3886 if test $ac_cv_header_stdc = yes; then
3887 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3888 cat >conftest.$ac_ext <<_ACEOF
3889 /* confdefs.h. */
3890 _ACEOF
3891 cat confdefs.h >>conftest.$ac_ext
3892 cat >>conftest.$ac_ext <<_ACEOF
3893 /* end confdefs.h. */
3894 #include <stdlib.h>
3896 _ACEOF
3897 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3898 $EGREP "free" >/dev/null 2>&1; then
3900 else
3901 ac_cv_header_stdc=no
3903 rm -f conftest*
3907 if test $ac_cv_header_stdc = yes; then
3908 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3909 if test "$cross_compiling" = yes; then
3911 else
3912 cat >conftest.$ac_ext <<_ACEOF
3913 /* confdefs.h. */
3914 _ACEOF
3915 cat confdefs.h >>conftest.$ac_ext
3916 cat >>conftest.$ac_ext <<_ACEOF
3917 /* end confdefs.h. */
3918 #include <ctype.h>
3919 #if ((' ' & 0x0FF) == 0x020)
3920 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3921 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3922 #else
3923 # define ISLOWER(c) \
3924 (('a' <= (c) && (c) <= 'i') \
3925 || ('j' <= (c) && (c) <= 'r') \
3926 || ('s' <= (c) && (c) <= 'z'))
3927 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3928 #endif
3930 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3932 main ()
3934 int i;
3935 for (i = 0; i < 256; i++)
3936 if (XOR (islower (i), ISLOWER (i))
3937 || toupper (i) != TOUPPER (i))
3938 exit(2);
3939 exit (0);
3941 _ACEOF
3942 rm -f conftest$ac_exeext
3943 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3944 (eval $ac_link) 2>&5
3945 ac_status=$?
3946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3947 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3949 (eval $ac_try) 2>&5
3950 ac_status=$?
3951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3952 (exit $ac_status); }; }; then
3954 else
3955 echo "$as_me: program exited with status $ac_status" >&5
3956 echo "$as_me: failed program was:" >&5
3957 sed 's/^/| /' conftest.$ac_ext >&5
3959 ( exit $ac_status )
3960 ac_cv_header_stdc=no
3962 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3966 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3967 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3968 if test $ac_cv_header_stdc = yes; then
3970 cat >>confdefs.h <<\_ACEOF
3971 #define STDC_HEADERS 1
3972 _ACEOF
3976 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3986 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3987 inttypes.h stdint.h unistd.h
3989 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3990 echo "$as_me:$LINENO: checking for $ac_header" >&5
3991 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3992 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3993 echo $ECHO_N "(cached) $ECHO_C" >&6
3994 else
3995 cat >conftest.$ac_ext <<_ACEOF
3996 /* confdefs.h. */
3997 _ACEOF
3998 cat confdefs.h >>conftest.$ac_ext
3999 cat >>conftest.$ac_ext <<_ACEOF
4000 /* end confdefs.h. */
4001 #include <$ac_header>
4002 _ACEOF
4003 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4004 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4005 ac_status=$?
4006 grep -v '^ *+' conftest.er1 >conftest.err
4007 rm -f conftest.er1
4008 cat conftest.err >&5
4009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4010 (exit $ac_status); } >/dev/null; then
4011 if test -s conftest.err; then
4012 ac_cpp_err=$ac_c_preproc_warn_flag
4013 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4014 else
4015 ac_cpp_err=
4017 else
4018 ac_cpp_err=yes
4020 if test -z "$ac_cpp_err"; then
4021 eval "$as_ac_Header=yes"
4022 else
4023 echo "$as_me: failed program was:" >&5
4024 sed 's/^/| /' conftest.$ac_ext >&5
4026 eval "$as_ac_Header=no"
4028 rm -f conftest.err conftest.$ac_ext
4030 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4031 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4032 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4033 cat >>confdefs.h <<_ACEOF
4034 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4035 _ACEOF
4038 done
4041 echo "$as_me:$LINENO: checking for uintptr_t" >&5
4042 echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
4043 if test "${ac_cv_type_uintptr_t+set}" = set; then
4044 echo $ECHO_N "(cached) $ECHO_C" >&6
4045 else
4046 cat >conftest.$ac_ext <<_ACEOF
4047 /* confdefs.h. */
4048 _ACEOF
4049 cat confdefs.h >>conftest.$ac_ext
4050 cat >>conftest.$ac_ext <<_ACEOF
4051 /* end confdefs.h. */
4052 $ac_includes_default
4054 main ()
4056 if ((uintptr_t *) 0)
4057 return 0;
4058 if (sizeof (uintptr_t))
4059 return 0;
4061 return 0;
4063 _ACEOF
4064 rm -f conftest.$ac_objext
4065 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4066 (eval $ac_compile) 2>conftest.er1
4067 ac_status=$?
4068 grep -v '^ *+' conftest.er1 >conftest.err
4069 rm -f conftest.er1
4070 cat conftest.err >&5
4071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4072 (exit $ac_status); } &&
4073 { ac_try='test -z "$ac_c_werror_flag"
4074 || test ! -s conftest.err'
4075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4076 (eval $ac_try) 2>&5
4077 ac_status=$?
4078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4079 (exit $ac_status); }; } &&
4080 { ac_try='test -s conftest.$ac_objext'
4081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4082 (eval $ac_try) 2>&5
4083 ac_status=$?
4084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4085 (exit $ac_status); }; }; then
4086 ac_cv_type_uintptr_t=yes
4087 else
4088 echo "$as_me: failed program was:" >&5
4089 sed 's/^/| /' conftest.$ac_ext >&5
4091 ac_cv_type_uintptr_t=no
4093 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4095 echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
4096 echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
4097 if test $ac_cv_type_uintptr_t = yes; then
4099 else
4101 cat >>confdefs.h <<_ACEOF
4102 #define uintptr_t unsigned long
4103 _ACEOF
4108 # Look for a 64-bit type.
4109 echo "$as_me:$LINENO: checking for a 64-bit type" >&5
4110 echo $ECHO_N "checking for a 64-bit type... $ECHO_C" >&6
4111 if test "${liberty_cv_uint64+set}" = set; then
4112 echo $ECHO_N "(cached) $ECHO_C" >&6
4113 else
4114 cat >conftest.$ac_ext <<_ACEOF
4115 /* confdefs.h. */
4116 _ACEOF
4117 cat confdefs.h >>conftest.$ac_ext
4118 cat >>conftest.$ac_ext <<_ACEOF
4119 /* end confdefs.h. */
4120 #ifdef HAVE_STDINT_H
4121 #include <stdint.h>
4122 #endif
4124 main ()
4126 extern uint64_t foo;
4128 return 0;
4130 _ACEOF
4131 rm -f conftest.$ac_objext
4132 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4133 (eval $ac_compile) 2>conftest.er1
4134 ac_status=$?
4135 grep -v '^ *+' conftest.er1 >conftest.err
4136 rm -f conftest.er1
4137 cat conftest.err >&5
4138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4139 (exit $ac_status); } &&
4140 { ac_try='test -z "$ac_c_werror_flag"
4141 || test ! -s conftest.err'
4142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4143 (eval $ac_try) 2>&5
4144 ac_status=$?
4145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4146 (exit $ac_status); }; } &&
4147 { ac_try='test -s conftest.$ac_objext'
4148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4149 (eval $ac_try) 2>&5
4150 ac_status=$?
4151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4152 (exit $ac_status); }; }; then
4153 liberty_cv_uint64=uint64_t
4154 else
4155 echo "$as_me: failed program was:" >&5
4156 sed 's/^/| /' conftest.$ac_ext >&5
4158 cat >conftest.$ac_ext <<_ACEOF
4159 /* confdefs.h. */
4160 _ACEOF
4161 cat confdefs.h >>conftest.$ac_ext
4162 cat >>conftest.$ac_ext <<_ACEOF
4163 /* end confdefs.h. */
4164 #ifdef HAVE_LIMITS_H
4165 #include <limits.h>
4166 #endif
4167 #ifndef CHAR_BIT
4168 #define CHAR_BIT 8
4169 #endif
4171 main ()
4173 extern char foo[sizeof(long) * CHAR_BIT >= 64 ? 1 : -1];
4175 return 0;
4177 _ACEOF
4178 rm -f conftest.$ac_objext
4179 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4180 (eval $ac_compile) 2>conftest.er1
4181 ac_status=$?
4182 grep -v '^ *+' conftest.er1 >conftest.err
4183 rm -f conftest.er1
4184 cat conftest.err >&5
4185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4186 (exit $ac_status); } &&
4187 { ac_try='test -z "$ac_c_werror_flag"
4188 || test ! -s conftest.err'
4189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4190 (eval $ac_try) 2>&5
4191 ac_status=$?
4192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4193 (exit $ac_status); }; } &&
4194 { ac_try='test -s conftest.$ac_objext'
4195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4196 (eval $ac_try) 2>&5
4197 ac_status=$?
4198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4199 (exit $ac_status); }; }; then
4200 liberty_cv_uint64="unsigned long"
4201 else
4202 echo "$as_me: failed program was:" >&5
4203 sed 's/^/| /' conftest.$ac_ext >&5
4205 cat >conftest.$ac_ext <<_ACEOF
4206 /* confdefs.h. */
4207 _ACEOF
4208 cat confdefs.h >>conftest.$ac_ext
4209 cat >>conftest.$ac_ext <<_ACEOF
4210 /* end confdefs.h. */
4211 #ifdef HAVE_LIMITS_H
4212 #include <limits.h>
4213 #endif
4214 #ifndef CHAR_BIT
4215 #define CHAR_BIT 8
4216 #endif
4218 main ()
4220 extern char foo[sizeof(long long) * CHAR_BIT >= 64 ? 1 : -1];
4222 return 0;
4224 _ACEOF
4225 rm -f conftest.$ac_objext
4226 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4227 (eval $ac_compile) 2>conftest.er1
4228 ac_status=$?
4229 grep -v '^ *+' conftest.er1 >conftest.err
4230 rm -f conftest.er1
4231 cat conftest.err >&5
4232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4233 (exit $ac_status); } &&
4234 { ac_try='test -z "$ac_c_werror_flag"
4235 || test ! -s conftest.err'
4236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4237 (eval $ac_try) 2>&5
4238 ac_status=$?
4239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4240 (exit $ac_status); }; } &&
4241 { ac_try='test -s conftest.$ac_objext'
4242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4243 (eval $ac_try) 2>&5
4244 ac_status=$?
4245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4246 (exit $ac_status); }; }; then
4247 liberty_cv_uint64="unsigned long long"
4248 else
4249 echo "$as_me: failed program was:" >&5
4250 sed 's/^/| /' conftest.$ac_ext >&5
4252 liberty_cv_uint64=none
4254 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4256 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4258 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4261 echo "$as_me:$LINENO: result: $liberty_cv_uint64" >&5
4262 echo "${ECHO_T}$liberty_cv_uint64" >&6
4263 if test "$liberty_cv_uint64" != none; then
4265 cat >>confdefs.h <<_ACEOF
4266 #define UNSIGNED_64BIT_TYPE $liberty_cv_uint64
4267 _ACEOF
4271 # Given the above check, we always have uintptr_t or a fallback
4272 # definition. So define HAVE_UINTPTR_T in case any imported code
4273 # relies on it.
4275 cat >>confdefs.h <<\_ACEOF
4276 #define HAVE_UINTPTR_T 1
4277 _ACEOF
4280 echo "$as_me:$LINENO: checking for pid_t" >&5
4281 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4282 if test "${ac_cv_type_pid_t+set}" = set; then
4283 echo $ECHO_N "(cached) $ECHO_C" >&6
4284 else
4285 cat >conftest.$ac_ext <<_ACEOF
4286 /* confdefs.h. */
4287 _ACEOF
4288 cat confdefs.h >>conftest.$ac_ext
4289 cat >>conftest.$ac_ext <<_ACEOF
4290 /* end confdefs.h. */
4291 $ac_includes_default
4293 main ()
4295 if ((pid_t *) 0)
4296 return 0;
4297 if (sizeof (pid_t))
4298 return 0;
4300 return 0;
4302 _ACEOF
4303 rm -f conftest.$ac_objext
4304 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4305 (eval $ac_compile) 2>conftest.er1
4306 ac_status=$?
4307 grep -v '^ *+' conftest.er1 >conftest.err
4308 rm -f conftest.er1
4309 cat conftest.err >&5
4310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4311 (exit $ac_status); } &&
4312 { ac_try='test -z "$ac_c_werror_flag"
4313 || test ! -s conftest.err'
4314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4315 (eval $ac_try) 2>&5
4316 ac_status=$?
4317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4318 (exit $ac_status); }; } &&
4319 { ac_try='test -s conftest.$ac_objext'
4320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4321 (eval $ac_try) 2>&5
4322 ac_status=$?
4323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4324 (exit $ac_status); }; }; then
4325 ac_cv_type_pid_t=yes
4326 else
4327 echo "$as_me: failed program was:" >&5
4328 sed 's/^/| /' conftest.$ac_ext >&5
4330 ac_cv_type_pid_t=no
4332 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4334 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4335 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4336 if test $ac_cv_type_pid_t = yes; then
4338 else
4340 cat >>confdefs.h <<_ACEOF
4341 #define pid_t int
4342 _ACEOF
4347 # This is the list of functions which libiberty will provide if they
4348 # are not available on the host.
4350 funcs="asprintf"
4351 funcs="$funcs atexit"
4352 funcs="$funcs basename"
4353 funcs="$funcs bcmp"
4354 funcs="$funcs bcopy"
4355 funcs="$funcs bsearch"
4356 funcs="$funcs bzero"
4357 funcs="$funcs calloc"
4358 funcs="$funcs clock"
4359 funcs="$funcs ffs"
4360 funcs="$funcs getcwd"
4361 funcs="$funcs getpagesize"
4362 funcs="$funcs index"
4363 funcs="$funcs insque"
4364 funcs="$funcs memchr"
4365 funcs="$funcs memcmp"
4366 funcs="$funcs memcpy"
4367 funcs="$funcs memmove"
4368 funcs="$funcs mempcpy"
4369 funcs="$funcs memset"
4370 funcs="$funcs mkstemps"
4371 funcs="$funcs putenv"
4372 funcs="$funcs random"
4373 funcs="$funcs rename"
4374 funcs="$funcs rindex"
4375 funcs="$funcs setenv"
4376 funcs="$funcs snprintf"
4377 funcs="$funcs sigsetmask"
4378 funcs="$funcs stpcpy"
4379 funcs="$funcs stpncpy"
4380 funcs="$funcs strcasecmp"
4381 funcs="$funcs strchr"
4382 funcs="$funcs strdup"
4383 funcs="$funcs strncasecmp"
4384 funcs="$funcs strrchr"
4385 funcs="$funcs strstr"
4386 funcs="$funcs strtod"
4387 funcs="$funcs strtol"
4388 funcs="$funcs strtoul"
4389 funcs="$funcs tmpnam"
4390 funcs="$funcs vasprintf"
4391 funcs="$funcs vfprintf"
4392 funcs="$funcs vprintf"
4393 funcs="$funcs vsnprintf"
4394 funcs="$funcs vsprintf"
4395 funcs="$funcs waitpid"
4397 # Also in the old function.def file: alloca, vfork, getopt.
4399 vars="sys_errlist sys_nerr sys_siglist"
4401 checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
4402 checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
4403 checkfuncs="$checkfuncs getsysinfo table sysctl"
4405 # These are neither executed nor required, but they help keep
4406 # autoheader happy without adding a bunch of text to acconfig.h.
4407 if test "x" = "y"; then
4471 for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \
4472 getcwd getpagesize index insque mkstemps memchr memcmp memcpy \
4473 memmove mempcpy memset putenv random rename rindex sigsetmask \
4474 strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strrchr strstr \
4475 strtod strtol strtoul tmpnam vasprintf vfprintf vprintf \
4476 vsprintf waitpid getrusage on_exit psignal strerror strsignal \
4477 sysconf times sbrk gettimeofday ffs snprintf vsnprintf \
4478 pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl \
4479 realpath canonicalize_file_name
4481 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4482 echo "$as_me:$LINENO: checking for $ac_func" >&5
4483 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4484 if eval "test \"\${$as_ac_var+set}\" = set"; then
4485 echo $ECHO_N "(cached) $ECHO_C" >&6
4486 else
4487 if test x$gcc_no_link = xyes; then
4488 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
4489 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
4490 { (exit 1); exit 1; }; }
4492 cat >conftest.$ac_ext <<_ACEOF
4493 /* confdefs.h. */
4494 _ACEOF
4495 cat confdefs.h >>conftest.$ac_ext
4496 cat >>conftest.$ac_ext <<_ACEOF
4497 /* end confdefs.h. */
4498 /* System header to define __stub macros and hopefully few prototypes,
4499 which can conflict with char $ac_func (); below.
4500 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4501 <limits.h> exists even on freestanding compilers. Under hpux,
4502 including <limits.h> includes <sys/time.h> and causes problems
4503 checking for functions defined therein. */
4504 #if defined (__STDC__) && !defined (_HPUX_SOURCE)
4505 # include <limits.h>
4506 #else
4507 # include <assert.h>
4508 #endif
4509 /* Override any gcc2 internal prototype to avoid an error. */
4510 #ifdef __cplusplus
4511 extern "C"
4513 #endif
4514 /* We use char because int might match the return type of a gcc2
4515 builtin and then its argument prototype would still apply. */
4516 char $ac_func ();
4517 /* The GNU C library defines this for functions which it implements
4518 to always fail with ENOSYS. Some functions are actually named
4519 something starting with __ and the normal name is an alias. */
4520 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4521 choke me
4522 #else
4523 char (*f) () = $ac_func;
4524 #endif
4525 #ifdef __cplusplus
4527 #endif
4530 main ()
4532 return f != $ac_func;
4534 return 0;
4536 _ACEOF
4537 rm -f conftest.$ac_objext conftest$ac_exeext
4538 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4539 (eval $ac_link) 2>conftest.er1
4540 ac_status=$?
4541 grep -v '^ *+' conftest.er1 >conftest.err
4542 rm -f conftest.er1
4543 cat conftest.err >&5
4544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4545 (exit $ac_status); } &&
4546 { ac_try='test -z "$ac_c_werror_flag"
4547 || test ! -s conftest.err'
4548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4549 (eval $ac_try) 2>&5
4550 ac_status=$?
4551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4552 (exit $ac_status); }; } &&
4553 { ac_try='test -s conftest$ac_exeext'
4554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4555 (eval $ac_try) 2>&5
4556 ac_status=$?
4557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4558 (exit $ac_status); }; }; then
4559 eval "$as_ac_var=yes"
4560 else
4561 echo "$as_me: failed program was:" >&5
4562 sed 's/^/| /' conftest.$ac_ext >&5
4564 eval "$as_ac_var=no"
4566 rm -f conftest.err conftest.$ac_objext \
4567 conftest$ac_exeext conftest.$ac_ext
4569 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4570 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4571 if test `eval echo '${'$as_ac_var'}'` = yes; then
4572 cat >>confdefs.h <<_ACEOF
4573 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4574 _ACEOF
4577 done
4580 cat >>confdefs.h <<\_ACEOF
4581 #define HAVE_SYS_ERRLIST 1
4582 _ACEOF
4585 cat >>confdefs.h <<\_ACEOF
4586 #define HAVE_SYS_NERR 1
4587 _ACEOF
4590 cat >>confdefs.h <<\_ACEOF
4591 #define HAVE_SYS_SIGLIST 1
4592 _ACEOF
4596 # For each of these functions, if the host does not provide the
4597 # function we want to put FN.o in LIBOBJS, and if the host does
4598 # provide the function, we want to define HAVE_FN in config.h.
4600 setobjs=
4601 CHECK=
4602 target_header_dir=
4603 if test -n "${with_target_subdir}"; then
4605 # We are being configured as a target library. AC_REPLACE_FUNCS
4606 # may not work correctly, because the compiler may not be able to
4607 # link executables. Note that we may still be being configured
4608 # native.
4610 # If we are being configured for newlib, we know which functions
4611 # newlib provide and which ones we will be expected to provide.
4613 if test "x${with_newlib}" = "xyes"; then
4614 case $LIBOBJS in
4615 "asprintf.$ac_objext" | \
4616 *" asprintf.$ac_objext" | \
4617 "asprintf.$ac_objext "* | \
4618 *" asprintf.$ac_objext "* ) ;;
4619 *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" ;;
4620 esac
4622 case $LIBOBJS in
4623 "basename.$ac_objext" | \
4624 *" basename.$ac_objext" | \
4625 "basename.$ac_objext "* | \
4626 *" basename.$ac_objext "* ) ;;
4627 *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
4628 esac
4630 case $LIBOBJS in
4631 "insque.$ac_objext" | \
4632 *" insque.$ac_objext" | \
4633 "insque.$ac_objext "* | \
4634 *" insque.$ac_objext "* ) ;;
4635 *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
4636 esac
4638 case $LIBOBJS in
4639 "random.$ac_objext" | \
4640 *" random.$ac_objext" | \
4641 "random.$ac_objext "* | \
4642 *" random.$ac_objext "* ) ;;
4643 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
4644 esac
4646 case $LIBOBJS in
4647 "strdup.$ac_objext" | \
4648 *" strdup.$ac_objext" | \
4649 "strdup.$ac_objext "* | \
4650 *" strdup.$ac_objext "* ) ;;
4651 *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;;
4652 esac
4654 case $LIBOBJS in
4655 "vasprintf.$ac_objext" | \
4656 *" vasprintf.$ac_objext" | \
4657 "vasprintf.$ac_objext "* | \
4658 *" vasprintf.$ac_objext "* ) ;;
4659 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
4660 esac
4663 for f in $funcs; do
4664 case "$f" in
4665 asprintf | basename | insque | random | strdup | vasprintf)
4668 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4669 cat >>confdefs.h <<_ACEOF
4670 #define $n 1
4671 _ACEOF
4674 esac
4675 done
4677 # newlib doesnt provide any of the variables in $vars, so we
4678 # dont have to check them here.
4680 # Of the functions in $checkfuncs, newlib only has strerror.
4681 cat >> confdefs.h <<\EOF
4682 #define HAVE_STRERROR 1
4686 setobjs=yes
4690 # We may wish to install the target headers somewhere.
4691 # Check whether --enable-install-libiberty or --disable-install-libiberty was given.
4692 if test "${enable_install_libiberty+set}" = set; then
4693 enableval="$enable_install_libiberty"
4694 enable_install_libiberty=$enableval
4695 else
4696 enable_install_libiberty=no
4698 # Option parsed, now set things appropriately.
4699 case x"$enable_install_libiberty" in
4700 xyes|x)
4701 target_header_dir=libiberty
4703 xno)
4704 target_header_dir=
4707 # This could be sanity-checked in various ways...
4708 target_header_dir="${enable_install_libiberty}"
4710 esac
4713 else
4715 # Not a target library, so we set things up to run the test suite.
4716 CHECK=check-cplus-dem
4723 case "${host}" in
4724 *-*-cygwin* | *-*-mingw*)
4725 cat >> confdefs.h <<\EOF
4726 #define HAVE_SYS_ERRLIST 1
4729 cat >> confdefs.h <<\EOF
4730 #define HAVE_SYS_NERR 1
4734 esac
4736 if test -z "${setobjs}"; then
4737 case "${host}" in
4739 *-*-vxworks*)
4740 # Handle VxWorks configuration specially, since on VxWorks the
4741 # libraries are actually on the target board, not in the file
4742 # system.
4743 case $LIBOBJS in
4744 "basename.$ac_objext" | \
4745 *" basename.$ac_objext" | \
4746 "basename.$ac_objext "* | \
4747 *" basename.$ac_objext "* ) ;;
4748 *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
4749 esac
4751 case $LIBOBJS in
4752 "getpagesize.$ac_objext" | \
4753 *" getpagesize.$ac_objext" | \
4754 "getpagesize.$ac_objext "* | \
4755 *" getpagesize.$ac_objext "* ) ;;
4756 *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" ;;
4757 esac
4759 case $LIBOBJS in
4760 "insque.$ac_objext" | \
4761 *" insque.$ac_objext" | \
4762 "insque.$ac_objext "* | \
4763 *" insque.$ac_objext "* ) ;;
4764 *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
4765 esac
4767 case $LIBOBJS in
4768 "random.$ac_objext" | \
4769 *" random.$ac_objext" | \
4770 "random.$ac_objext "* | \
4771 *" random.$ac_objext "* ) ;;
4772 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
4773 esac
4775 case $LIBOBJS in
4776 "strcasecmp.$ac_objext" | \
4777 *" strcasecmp.$ac_objext" | \
4778 "strcasecmp.$ac_objext "* | \
4779 *" strcasecmp.$ac_objext "* ) ;;
4780 *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" ;;
4781 esac
4783 case $LIBOBJS in
4784 "strncasecmp.$ac_objext" | \
4785 *" strncasecmp.$ac_objext" | \
4786 "strncasecmp.$ac_objext "* | \
4787 *" strncasecmp.$ac_objext "* ) ;;
4788 *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;;
4789 esac
4791 case $LIBOBJS in
4792 "strdup.$ac_objext" | \
4793 *" strdup.$ac_objext" | \
4794 "strdup.$ac_objext "* | \
4795 *" strdup.$ac_objext "* ) ;;
4796 *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;;
4797 esac
4799 case $LIBOBJS in
4800 "vfork.$ac_objext" | \
4801 *" vfork.$ac_objext" | \
4802 "vfork.$ac_objext "* | \
4803 *" vfork.$ac_objext "* ) ;;
4804 *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;;
4805 esac
4807 case $LIBOBJS in
4808 "waitpid.$ac_objext" | \
4809 *" waitpid.$ac_objext" | \
4810 "waitpid.$ac_objext "* | \
4811 *" waitpid.$ac_objext "* ) ;;
4812 *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" ;;
4813 esac
4815 case $LIBOBJS in
4816 "vasprintf.$ac_objext" | \
4817 *" vasprintf.$ac_objext" | \
4818 "vasprintf.$ac_objext "* | \
4819 *" vasprintf.$ac_objext "* ) ;;
4820 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
4821 esac
4823 for f in $funcs; do
4824 case "$f" in
4825 basename | getpagesize | insque | random | strcasecmp)
4827 strncasecmp | strdup | vfork | waitpid | vasprintf)
4830 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4831 cat >>confdefs.h <<_ACEOF
4832 #define $n 1
4833 _ACEOF
4836 esac
4837 done
4839 # VxWorks doesn't provide any of the variables in $vars, so we
4840 # don't have to check them here.
4842 # Of the functions in $checkfuncs, VxWorks only has strerror.
4843 cat >> confdefs.h <<\EOF
4844 #define HAVE_STRERROR 1
4848 setobjs=yes
4851 esac
4854 if test -z "${setobjs}"; then
4856 case "${host}" in
4858 *-*-cygwin*)
4859 # The Cygwin library actually uses a couple of files from
4860 # libiberty when it is built. If we are building a native
4861 # Cygwin, and we run the tests, we will appear to have these
4862 # files. However, when we go on to build winsup, we will wind up
4863 # with a library which does not have the files, since they should
4864 # have come from libiberty.
4866 # We handle this by removing the functions the winsup library
4867 # provides from our shell variables, so that they appear to be
4868 # missing.
4870 # DJ - only if we're *building* cygwin, not just building *with* cygwin
4872 if test -n "${with_target_subdir}"
4873 then
4874 funcs="`echo $funcs | sed -e 's/random//'`"
4875 case $LIBOBJS in
4876 "random.$ac_objext" | \
4877 *" random.$ac_objext" | \
4878 "random.$ac_objext "* | \
4879 *" random.$ac_objext "* ) ;;
4880 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
4881 esac
4883 vars="`echo $vars | sed -e 's/sys_siglist//'`"
4884 checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`"
4888 *-*-mingw32*)
4889 # Under mingw32, sys_nerr and sys_errlist exist, but they are
4890 # macros, so the test below won't find them.
4891 libiberty_cv_var_sys_nerr=yes
4892 libiberty_cv_var_sys_errlist=yes
4895 *-*-uwin*)
4896 # Under some versions of uwin, vfork is notoriously buggy and the test
4897 # can hang configure; on other versions, vfork exists just as a stub.
4898 # FIXME: This should be removed once vfork in uwin's runtime is fixed.
4899 ac_cv_func_vfork_works=no
4900 # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are
4901 # macros (actually, these are imported from a DLL, but the end effect
4902 # is the same), so the test below won't find them.
4903 libiberty_cv_var_sys_nerr=yes
4904 libiberty_cv_var_sys_errlist=yes
4907 *-*-*vms*)
4908 # Under VMS, vfork works very different than on Unix. The standard test
4909 # won't work, and it isn't easily adaptable. It makes more sense to
4910 # just force it.
4911 ac_cv_func_vfork_works=yes
4914 esac
4916 # We haven't set the list of objects yet. Use the standard autoconf
4917 # tests. This will only work if the compiler works.
4918 echo "$as_me:$LINENO: checking for library containing strerror" >&5
4919 echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
4920 if test "${ac_cv_search_strerror+set}" = set; then
4921 echo $ECHO_N "(cached) $ECHO_C" >&6
4922 else
4923 ac_func_search_save_LIBS=$LIBS
4924 ac_cv_search_strerror=no
4925 if test x$gcc_no_link = xyes; then
4926 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
4927 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
4928 { (exit 1); exit 1; }; }
4930 cat >conftest.$ac_ext <<_ACEOF
4931 /* confdefs.h. */
4932 _ACEOF
4933 cat confdefs.h >>conftest.$ac_ext
4934 cat >>conftest.$ac_ext <<_ACEOF
4935 /* end confdefs.h. */
4937 /* Override any gcc2 internal prototype to avoid an error. */
4938 #ifdef __cplusplus
4939 extern "C"
4940 #endif
4941 /* We use char because int might match the return type of a gcc2
4942 builtin and then its argument prototype would still apply. */
4943 char strerror ();
4945 main ()
4947 strerror ();
4949 return 0;
4951 _ACEOF
4952 rm -f conftest.$ac_objext conftest$ac_exeext
4953 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4954 (eval $ac_link) 2>conftest.er1
4955 ac_status=$?
4956 grep -v '^ *+' conftest.er1 >conftest.err
4957 rm -f conftest.er1
4958 cat conftest.err >&5
4959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4960 (exit $ac_status); } &&
4961 { ac_try='test -z "$ac_c_werror_flag"
4962 || test ! -s conftest.err'
4963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4964 (eval $ac_try) 2>&5
4965 ac_status=$?
4966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4967 (exit $ac_status); }; } &&
4968 { ac_try='test -s conftest$ac_exeext'
4969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4970 (eval $ac_try) 2>&5
4971 ac_status=$?
4972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4973 (exit $ac_status); }; }; then
4974 ac_cv_search_strerror="none required"
4975 else
4976 echo "$as_me: failed program was:" >&5
4977 sed 's/^/| /' conftest.$ac_ext >&5
4980 rm -f conftest.err conftest.$ac_objext \
4981 conftest$ac_exeext conftest.$ac_ext
4982 if test "$ac_cv_search_strerror" = no; then
4983 for ac_lib in cposix; do
4984 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4985 if test x$gcc_no_link = xyes; then
4986 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
4987 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
4988 { (exit 1); exit 1; }; }
4990 cat >conftest.$ac_ext <<_ACEOF
4991 /* confdefs.h. */
4992 _ACEOF
4993 cat confdefs.h >>conftest.$ac_ext
4994 cat >>conftest.$ac_ext <<_ACEOF
4995 /* end confdefs.h. */
4997 /* Override any gcc2 internal prototype to avoid an error. */
4998 #ifdef __cplusplus
4999 extern "C"
5000 #endif
5001 /* We use char because int might match the return type of a gcc2
5002 builtin and then its argument prototype would still apply. */
5003 char strerror ();
5005 main ()
5007 strerror ();
5009 return 0;
5011 _ACEOF
5012 rm -f conftest.$ac_objext conftest$ac_exeext
5013 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5014 (eval $ac_link) 2>conftest.er1
5015 ac_status=$?
5016 grep -v '^ *+' conftest.er1 >conftest.err
5017 rm -f conftest.er1
5018 cat conftest.err >&5
5019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5020 (exit $ac_status); } &&
5021 { ac_try='test -z "$ac_c_werror_flag"
5022 || test ! -s conftest.err'
5023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5024 (eval $ac_try) 2>&5
5025 ac_status=$?
5026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5027 (exit $ac_status); }; } &&
5028 { ac_try='test -s conftest$ac_exeext'
5029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5030 (eval $ac_try) 2>&5
5031 ac_status=$?
5032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5033 (exit $ac_status); }; }; then
5034 ac_cv_search_strerror="-l$ac_lib"
5035 break
5036 else
5037 echo "$as_me: failed program was:" >&5
5038 sed 's/^/| /' conftest.$ac_ext >&5
5041 rm -f conftest.err conftest.$ac_objext \
5042 conftest$ac_exeext conftest.$ac_ext
5043 done
5045 LIBS=$ac_func_search_save_LIBS
5047 echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
5048 echo "${ECHO_T}$ac_cv_search_strerror" >&6
5049 if test "$ac_cv_search_strerror" != no; then
5050 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
5055 for ac_func in $funcs
5057 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5058 echo "$as_me:$LINENO: checking for $ac_func" >&5
5059 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5060 if eval "test \"\${$as_ac_var+set}\" = set"; then
5061 echo $ECHO_N "(cached) $ECHO_C" >&6
5062 else
5063 if test x$gcc_no_link = xyes; then
5064 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5065 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5066 { (exit 1); exit 1; }; }
5068 cat >conftest.$ac_ext <<_ACEOF
5069 /* confdefs.h. */
5070 _ACEOF
5071 cat confdefs.h >>conftest.$ac_ext
5072 cat >>conftest.$ac_ext <<_ACEOF
5073 /* end confdefs.h. */
5074 /* System header to define __stub macros and hopefully few prototypes,
5075 which can conflict with char $ac_func (); below.
5076 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5077 <limits.h> exists even on freestanding compilers. Under hpux,
5078 including <limits.h> includes <sys/time.h> and causes problems
5079 checking for functions defined therein. */
5080 #if defined (__STDC__) && !defined (_HPUX_SOURCE)
5081 # include <limits.h>
5082 #else
5083 # include <assert.h>
5084 #endif
5085 /* Override any gcc2 internal prototype to avoid an error. */
5086 #ifdef __cplusplus
5087 extern "C"
5089 #endif
5090 /* We use char because int might match the return type of a gcc2
5091 builtin and then its argument prototype would still apply. */
5092 char $ac_func ();
5093 /* The GNU C library defines this for functions which it implements
5094 to always fail with ENOSYS. Some functions are actually named
5095 something starting with __ and the normal name is an alias. */
5096 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5097 choke me
5098 #else
5099 char (*f) () = $ac_func;
5100 #endif
5101 #ifdef __cplusplus
5103 #endif
5106 main ()
5108 return f != $ac_func;
5110 return 0;
5112 _ACEOF
5113 rm -f conftest.$ac_objext conftest$ac_exeext
5114 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5115 (eval $ac_link) 2>conftest.er1
5116 ac_status=$?
5117 grep -v '^ *+' conftest.er1 >conftest.err
5118 rm -f conftest.er1
5119 cat conftest.err >&5
5120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5121 (exit $ac_status); } &&
5122 { ac_try='test -z "$ac_c_werror_flag"
5123 || test ! -s conftest.err'
5124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5125 (eval $ac_try) 2>&5
5126 ac_status=$?
5127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5128 (exit $ac_status); }; } &&
5129 { ac_try='test -s conftest$ac_exeext'
5130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5131 (eval $ac_try) 2>&5
5132 ac_status=$?
5133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5134 (exit $ac_status); }; }; then
5135 eval "$as_ac_var=yes"
5136 else
5137 echo "$as_me: failed program was:" >&5
5138 sed 's/^/| /' conftest.$ac_ext >&5
5140 eval "$as_ac_var=no"
5142 rm -f conftest.err conftest.$ac_objext \
5143 conftest$ac_exeext conftest.$ac_ext
5145 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5146 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5147 if test `eval echo '${'$as_ac_var'}'` = yes; then
5148 cat >>confdefs.h <<_ACEOF
5149 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5150 _ACEOF
5152 else
5153 case $LIBOBJS in
5154 "$ac_func.$ac_objext" | \
5155 *" $ac_func.$ac_objext" | \
5156 "$ac_func.$ac_objext "* | \
5157 *" $ac_func.$ac_objext "* ) ;;
5158 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
5159 esac
5162 done
5165 echo "$as_me:$LINENO: checking whether alloca needs Cray hooks" >&5
5166 echo $ECHO_N "checking whether alloca needs Cray hooks... $ECHO_C" >&6
5167 if test "${ac_cv_os_cray+set}" = set; then
5168 echo $ECHO_N "(cached) $ECHO_C" >&6
5169 else
5170 cat >conftest.$ac_ext <<_ACEOF
5171 /* confdefs.h. */
5172 _ACEOF
5173 cat confdefs.h >>conftest.$ac_ext
5174 cat >>conftest.$ac_ext <<_ACEOF
5175 /* end confdefs.h. */
5176 #if defined(CRAY) && ! defined(CRAY2)
5177 webecray
5178 #else
5179 wenotbecray
5180 #endif
5182 _ACEOF
5183 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5184 $EGREP "webecray" >/dev/null 2>&1; then
5185 ac_cv_os_cray=yes
5186 else
5187 ac_cv_os_cray=no
5189 rm -f conftest*
5192 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
5193 echo "${ECHO_T}$ac_cv_os_cray" >&6
5194 if test $ac_cv_os_cray = yes; then
5195 for ac_func in _getb67 GETB67 getb67; do
5196 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5197 echo "$as_me:$LINENO: checking for $ac_func" >&5
5198 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5199 if eval "test \"\${$as_ac_var+set}\" = set"; then
5200 echo $ECHO_N "(cached) $ECHO_C" >&6
5201 else
5202 if test x$gcc_no_link = xyes; then
5203 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5204 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5205 { (exit 1); exit 1; }; }
5207 cat >conftest.$ac_ext <<_ACEOF
5208 /* confdefs.h. */
5209 _ACEOF
5210 cat confdefs.h >>conftest.$ac_ext
5211 cat >>conftest.$ac_ext <<_ACEOF
5212 /* end confdefs.h. */
5213 /* System header to define __stub macros and hopefully few prototypes,
5214 which can conflict with char $ac_func (); below.
5215 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5216 <limits.h> exists even on freestanding compilers. Under hpux,
5217 including <limits.h> includes <sys/time.h> and causes problems
5218 checking for functions defined therein. */
5219 #if defined (__STDC__) && !defined (_HPUX_SOURCE)
5220 # include <limits.h>
5221 #else
5222 # include <assert.h>
5223 #endif
5224 /* Override any gcc2 internal prototype to avoid an error. */
5225 #ifdef __cplusplus
5226 extern "C"
5228 #endif
5229 /* We use char because int might match the return type of a gcc2
5230 builtin and then its argument prototype would still apply. */
5231 char $ac_func ();
5232 /* The GNU C library defines this for functions which it implements
5233 to always fail with ENOSYS. Some functions are actually named
5234 something starting with __ and the normal name is an alias. */
5235 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5236 choke me
5237 #else
5238 char (*f) () = $ac_func;
5239 #endif
5240 #ifdef __cplusplus
5242 #endif
5245 main ()
5247 return f != $ac_func;
5249 return 0;
5251 _ACEOF
5252 rm -f conftest.$ac_objext conftest$ac_exeext
5253 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5254 (eval $ac_link) 2>conftest.er1
5255 ac_status=$?
5256 grep -v '^ *+' conftest.er1 >conftest.err
5257 rm -f conftest.er1
5258 cat conftest.err >&5
5259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5260 (exit $ac_status); } &&
5261 { ac_try='test -z "$ac_c_werror_flag"
5262 || test ! -s conftest.err'
5263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5264 (eval $ac_try) 2>&5
5265 ac_status=$?
5266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5267 (exit $ac_status); }; } &&
5268 { ac_try='test -s conftest$ac_exeext'
5269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5270 (eval $ac_try) 2>&5
5271 ac_status=$?
5272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5273 (exit $ac_status); }; }; then
5274 eval "$as_ac_var=yes"
5275 else
5276 echo "$as_me: failed program was:" >&5
5277 sed 's/^/| /' conftest.$ac_ext >&5
5279 eval "$as_ac_var=no"
5281 rm -f conftest.err conftest.$ac_objext \
5282 conftest$ac_exeext conftest.$ac_ext
5284 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5285 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5286 if test `eval echo '${'$as_ac_var'}'` = yes; then
5288 cat >>confdefs.h <<_ACEOF
5289 #define CRAY_STACKSEG_END $ac_func
5290 _ACEOF
5291 break
5294 done
5297 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
5298 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
5299 if test "${ac_cv_c_stack_direction+set}" = set; then
5300 echo $ECHO_N "(cached) $ECHO_C" >&6
5301 else
5302 if test "$cross_compiling" = yes; then
5303 ac_cv_c_stack_direction=0
5304 else
5305 cat >conftest.$ac_ext <<_ACEOF
5306 /* confdefs.h. */
5307 _ACEOF
5308 cat confdefs.h >>conftest.$ac_ext
5309 cat >>conftest.$ac_ext <<_ACEOF
5310 /* end confdefs.h. */
5311 find_stack_direction ()
5313 static char *addr = 0;
5314 auto char dummy;
5315 if (addr == 0)
5317 addr = &dummy;
5318 return find_stack_direction ();
5320 else
5321 return (&dummy > addr) ? 1 : -1;
5323 main ()
5325 exit (find_stack_direction() < 0);
5327 _ACEOF
5328 rm -f conftest$ac_exeext
5329 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5330 (eval $ac_link) 2>&5
5331 ac_status=$?
5332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5333 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5335 (eval $ac_try) 2>&5
5336 ac_status=$?
5337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5338 (exit $ac_status); }; }; then
5339 ac_cv_c_stack_direction=1
5340 else
5341 echo "$as_me: program exited with status $ac_status" >&5
5342 echo "$as_me: failed program was:" >&5
5343 sed 's/^/| /' conftest.$ac_ext >&5
5345 ( exit $ac_status )
5346 ac_cv_c_stack_direction=-1
5348 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5351 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
5352 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
5354 cat >>confdefs.h <<_ACEOF
5355 #define STACK_DIRECTION $ac_cv_c_stack_direction
5356 _ACEOF
5361 for ac_header in unistd.h vfork.h
5363 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5364 echo "$as_me:$LINENO: checking for $ac_header" >&5
5365 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5366 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5367 echo $ECHO_N "(cached) $ECHO_C" >&6
5368 else
5369 cat >conftest.$ac_ext <<_ACEOF
5370 /* confdefs.h. */
5371 _ACEOF
5372 cat confdefs.h >>conftest.$ac_ext
5373 cat >>conftest.$ac_ext <<_ACEOF
5374 /* end confdefs.h. */
5375 #include <$ac_header>
5376 _ACEOF
5377 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5378 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5379 ac_status=$?
5380 grep -v '^ *+' conftest.er1 >conftest.err
5381 rm -f conftest.er1
5382 cat conftest.err >&5
5383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5384 (exit $ac_status); } >/dev/null; then
5385 if test -s conftest.err; then
5386 ac_cpp_err=$ac_c_preproc_warn_flag
5387 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5388 else
5389 ac_cpp_err=
5391 else
5392 ac_cpp_err=yes
5394 if test -z "$ac_cpp_err"; then
5395 eval "$as_ac_Header=yes"
5396 else
5397 echo "$as_me: failed program was:" >&5
5398 sed 's/^/| /' conftest.$ac_ext >&5
5400 eval "$as_ac_Header=no"
5402 rm -f conftest.err conftest.$ac_ext
5404 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5405 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5406 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5407 cat >>confdefs.h <<_ACEOF
5408 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5409 _ACEOF
5412 done
5416 for ac_func in fork vfork
5418 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5419 echo "$as_me:$LINENO: checking for $ac_func" >&5
5420 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5421 if eval "test \"\${$as_ac_var+set}\" = set"; then
5422 echo $ECHO_N "(cached) $ECHO_C" >&6
5423 else
5424 if test x$gcc_no_link = xyes; then
5425 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5426 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5427 { (exit 1); exit 1; }; }
5429 cat >conftest.$ac_ext <<_ACEOF
5430 /* confdefs.h. */
5431 _ACEOF
5432 cat confdefs.h >>conftest.$ac_ext
5433 cat >>conftest.$ac_ext <<_ACEOF
5434 /* end confdefs.h. */
5435 /* System header to define __stub macros and hopefully few prototypes,
5436 which can conflict with char $ac_func (); below.
5437 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5438 <limits.h> exists even on freestanding compilers. Under hpux,
5439 including <limits.h> includes <sys/time.h> and causes problems
5440 checking for functions defined therein. */
5441 #if defined (__STDC__) && !defined (_HPUX_SOURCE)
5442 # include <limits.h>
5443 #else
5444 # include <assert.h>
5445 #endif
5446 /* Override any gcc2 internal prototype to avoid an error. */
5447 #ifdef __cplusplus
5448 extern "C"
5450 #endif
5451 /* We use char because int might match the return type of a gcc2
5452 builtin and then its argument prototype would still apply. */
5453 char $ac_func ();
5454 /* The GNU C library defines this for functions which it implements
5455 to always fail with ENOSYS. Some functions are actually named
5456 something starting with __ and the normal name is an alias. */
5457 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5458 choke me
5459 #else
5460 char (*f) () = $ac_func;
5461 #endif
5462 #ifdef __cplusplus
5464 #endif
5467 main ()
5469 return f != $ac_func;
5471 return 0;
5473 _ACEOF
5474 rm -f conftest.$ac_objext conftest$ac_exeext
5475 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5476 (eval $ac_link) 2>conftest.er1
5477 ac_status=$?
5478 grep -v '^ *+' conftest.er1 >conftest.err
5479 rm -f conftest.er1
5480 cat conftest.err >&5
5481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5482 (exit $ac_status); } &&
5483 { ac_try='test -z "$ac_c_werror_flag"
5484 || test ! -s conftest.err'
5485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5486 (eval $ac_try) 2>&5
5487 ac_status=$?
5488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5489 (exit $ac_status); }; } &&
5490 { ac_try='test -s conftest$ac_exeext'
5491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5492 (eval $ac_try) 2>&5
5493 ac_status=$?
5494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5495 (exit $ac_status); }; }; then
5496 eval "$as_ac_var=yes"
5497 else
5498 echo "$as_me: failed program was:" >&5
5499 sed 's/^/| /' conftest.$ac_ext >&5
5501 eval "$as_ac_var=no"
5503 rm -f conftest.err conftest.$ac_objext \
5504 conftest$ac_exeext conftest.$ac_ext
5506 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5507 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5508 if test `eval echo '${'$as_ac_var'}'` = yes; then
5509 cat >>confdefs.h <<_ACEOF
5510 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5511 _ACEOF
5514 done
5516 if test "x$ac_cv_func_fork" = xyes; then
5517 echo "$as_me:$LINENO: checking for working fork" >&5
5518 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
5519 if test "${ac_cv_func_fork_works+set}" = set; then
5520 echo $ECHO_N "(cached) $ECHO_C" >&6
5521 else
5522 if test "$cross_compiling" = yes; then
5523 ac_cv_func_fork_works=cross
5524 else
5525 cat >conftest.$ac_ext <<_ACEOF
5526 /* By Ruediger Kuhlmann. */
5527 #include <sys/types.h>
5528 #if HAVE_UNISTD_H
5529 # include <unistd.h>
5530 #endif
5531 /* Some systems only have a dummy stub for fork() */
5532 int main ()
5534 if (fork() < 0)
5535 exit (1);
5536 exit (0);
5538 _ACEOF
5539 rm -f conftest$ac_exeext
5540 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5541 (eval $ac_link) 2>&5
5542 ac_status=$?
5543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5544 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5546 (eval $ac_try) 2>&5
5547 ac_status=$?
5548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5549 (exit $ac_status); }; }; then
5550 ac_cv_func_fork_works=yes
5551 else
5552 echo "$as_me: program exited with status $ac_status" >&5
5553 echo "$as_me: failed program was:" >&5
5554 sed 's/^/| /' conftest.$ac_ext >&5
5556 ( exit $ac_status )
5557 ac_cv_func_fork_works=no
5559 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5562 echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
5563 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
5565 else
5566 ac_cv_func_fork_works=$ac_cv_func_fork
5568 if test "x$ac_cv_func_fork_works" = xcross; then
5569 case $host in
5570 *-*-amigaos* | *-*-msdosdjgpp*)
5571 # Override, as these systems have only a dummy fork() stub
5572 ac_cv_func_fork_works=no
5575 ac_cv_func_fork_works=yes
5577 esac
5578 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
5579 echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
5581 ac_cv_func_vfork_works=$ac_cv_func_vfork
5582 if test "x$ac_cv_func_vfork" = xyes; then
5583 echo "$as_me:$LINENO: checking for working vfork" >&5
5584 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
5585 if test "${ac_cv_func_vfork_works+set}" = set; then
5586 echo $ECHO_N "(cached) $ECHO_C" >&6
5587 else
5588 if test "$cross_compiling" = yes; then
5589 ac_cv_func_vfork_works=cross
5590 else
5591 cat >conftest.$ac_ext <<_ACEOF
5592 /* confdefs.h. */
5593 _ACEOF
5594 cat confdefs.h >>conftest.$ac_ext
5595 cat >>conftest.$ac_ext <<_ACEOF
5596 /* end confdefs.h. */
5597 /* Thanks to Paul Eggert for this test. */
5598 #include <stdio.h>
5599 #include <stdlib.h>
5600 #include <sys/types.h>
5601 #include <sys/stat.h>
5602 #include <sys/wait.h>
5603 #if HAVE_UNISTD_H
5604 # include <unistd.h>
5605 #endif
5606 #if HAVE_VFORK_H
5607 # include <vfork.h>
5608 #endif
5609 /* On some sparc systems, changes by the child to local and incoming
5610 argument registers are propagated back to the parent. The compiler
5611 is told about this with #include <vfork.h>, but some compilers
5612 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
5613 static variable whose address is put into a register that is
5614 clobbered by the vfork. */
5615 static void
5616 #ifdef __cplusplus
5617 sparc_address_test (int arg)
5618 # else
5619 sparc_address_test (arg) int arg;
5620 #endif
5622 static pid_t child;
5623 if (!child) {
5624 child = vfork ();
5625 if (child < 0) {
5626 perror ("vfork");
5627 _exit(2);
5629 if (!child) {
5630 arg = getpid();
5631 write(-1, "", 0);
5632 _exit (arg);
5638 main ()
5640 pid_t parent = getpid ();
5641 pid_t child;
5643 sparc_address_test (0);
5645 child = vfork ();
5647 if (child == 0) {
5648 /* Here is another test for sparc vfork register problems. This
5649 test uses lots of local variables, at least as many local
5650 variables as main has allocated so far including compiler
5651 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
5652 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
5653 reuse the register of parent for one of the local variables,
5654 since it will think that parent can't possibly be used any more
5655 in this routine. Assigning to the local variable will thus
5656 munge parent in the parent process. */
5657 pid_t
5658 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
5659 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
5660 /* Convince the compiler that p..p7 are live; otherwise, it might
5661 use the same hardware register for all 8 local variables. */
5662 if (p != p1 || p != p2 || p != p3 || p != p4
5663 || p != p5 || p != p6 || p != p7)
5664 _exit(1);
5666 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
5667 from child file descriptors. If the child closes a descriptor
5668 before it execs or exits, this munges the parent's descriptor
5669 as well. Test for this by closing stdout in the child. */
5670 _exit(close(fileno(stdout)) != 0);
5671 } else {
5672 int status;
5673 struct stat st;
5675 while (wait(&status) != child)
5677 exit(
5678 /* Was there some problem with vforking? */
5679 child < 0
5681 /* Did the child fail? (This shouldn't happen.) */
5682 || status
5684 /* Did the vfork/compiler bug occur? */
5685 || parent != getpid()
5687 /* Did the file descriptor bug occur? */
5688 || fstat(fileno(stdout), &st) != 0
5692 _ACEOF
5693 rm -f conftest$ac_exeext
5694 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5695 (eval $ac_link) 2>&5
5696 ac_status=$?
5697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5698 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5700 (eval $ac_try) 2>&5
5701 ac_status=$?
5702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5703 (exit $ac_status); }; }; then
5704 ac_cv_func_vfork_works=yes
5705 else
5706 echo "$as_me: program exited with status $ac_status" >&5
5707 echo "$as_me: failed program was:" >&5
5708 sed 's/^/| /' conftest.$ac_ext >&5
5710 ( exit $ac_status )
5711 ac_cv_func_vfork_works=no
5713 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5716 echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
5717 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
5720 if test "x$ac_cv_func_fork_works" = xcross; then
5721 ac_cv_func_vfork_works=$ac_cv_func_vfork
5722 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
5723 echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
5726 if test "x$ac_cv_func_vfork_works" = xyes; then
5728 cat >>confdefs.h <<\_ACEOF
5729 #define HAVE_WORKING_VFORK 1
5730 _ACEOF
5732 else
5734 cat >>confdefs.h <<\_ACEOF
5735 #define vfork fork
5736 _ACEOF
5739 if test "x$ac_cv_func_fork_works" = xyes; then
5741 cat >>confdefs.h <<\_ACEOF
5742 #define HAVE_WORKING_FORK 1
5743 _ACEOF
5747 if test $ac_cv_func_vfork_works = no; then
5748 case $LIBOBJS in
5749 "vfork.$ac_objext" | \
5750 *" vfork.$ac_objext" | \
5751 "vfork.$ac_objext "* | \
5752 *" vfork.$ac_objext "* ) ;;
5753 *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;;
5754 esac
5757 # We only need _doprnt if we might use it to implement v*printf.
5758 if test $ac_cv_func_vprintf != yes \
5759 || test $ac_cv_func_vfprintf != yes \
5760 || test $ac_cv_func_vsprintf != yes; then
5762 for ac_func in _doprnt
5764 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5765 echo "$as_me:$LINENO: checking for $ac_func" >&5
5766 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5767 if eval "test \"\${$as_ac_var+set}\" = set"; then
5768 echo $ECHO_N "(cached) $ECHO_C" >&6
5769 else
5770 if test x$gcc_no_link = xyes; then
5771 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5772 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5773 { (exit 1); exit 1; }; }
5775 cat >conftest.$ac_ext <<_ACEOF
5776 /* confdefs.h. */
5777 _ACEOF
5778 cat confdefs.h >>conftest.$ac_ext
5779 cat >>conftest.$ac_ext <<_ACEOF
5780 /* end confdefs.h. */
5781 /* System header to define __stub macros and hopefully few prototypes,
5782 which can conflict with char $ac_func (); below.
5783 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5784 <limits.h> exists even on freestanding compilers. Under hpux,
5785 including <limits.h> includes <sys/time.h> and causes problems
5786 checking for functions defined therein. */
5787 #if defined (__STDC__) && !defined (_HPUX_SOURCE)
5788 # include <limits.h>
5789 #else
5790 # include <assert.h>
5791 #endif
5792 /* Override any gcc2 internal prototype to avoid an error. */
5793 #ifdef __cplusplus
5794 extern "C"
5796 #endif
5797 /* We use char because int might match the return type of a gcc2
5798 builtin and then its argument prototype would still apply. */
5799 char $ac_func ();
5800 /* The GNU C library defines this for functions which it implements
5801 to always fail with ENOSYS. Some functions are actually named
5802 something starting with __ and the normal name is an alias. */
5803 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5804 choke me
5805 #else
5806 char (*f) () = $ac_func;
5807 #endif
5808 #ifdef __cplusplus
5810 #endif
5813 main ()
5815 return f != $ac_func;
5817 return 0;
5819 _ACEOF
5820 rm -f conftest.$ac_objext conftest$ac_exeext
5821 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5822 (eval $ac_link) 2>conftest.er1
5823 ac_status=$?
5824 grep -v '^ *+' conftest.er1 >conftest.err
5825 rm -f conftest.er1
5826 cat conftest.err >&5
5827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5828 (exit $ac_status); } &&
5829 { ac_try='test -z "$ac_c_werror_flag"
5830 || test ! -s conftest.err'
5831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5832 (eval $ac_try) 2>&5
5833 ac_status=$?
5834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5835 (exit $ac_status); }; } &&
5836 { ac_try='test -s conftest$ac_exeext'
5837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5838 (eval $ac_try) 2>&5
5839 ac_status=$?
5840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5841 (exit $ac_status); }; }; then
5842 eval "$as_ac_var=yes"
5843 else
5844 echo "$as_me: failed program was:" >&5
5845 sed 's/^/| /' conftest.$ac_ext >&5
5847 eval "$as_ac_var=no"
5849 rm -f conftest.err conftest.$ac_objext \
5850 conftest$ac_exeext conftest.$ac_ext
5852 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5853 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5854 if test `eval echo '${'$as_ac_var'}'` = yes; then
5855 cat >>confdefs.h <<_ACEOF
5856 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5857 _ACEOF
5859 else
5860 case $LIBOBJS in
5861 "$ac_func.$ac_objext" | \
5862 *" $ac_func.$ac_objext" | \
5863 "$ac_func.$ac_objext "* | \
5864 *" $ac_func.$ac_objext "* ) ;;
5865 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
5866 esac
5869 done
5872 else
5874 for ac_func in _doprnt
5876 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5877 echo "$as_me:$LINENO: checking for $ac_func" >&5
5878 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5879 if eval "test \"\${$as_ac_var+set}\" = set"; then
5880 echo $ECHO_N "(cached) $ECHO_C" >&6
5881 else
5882 if test x$gcc_no_link = xyes; then
5883 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5884 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5885 { (exit 1); exit 1; }; }
5887 cat >conftest.$ac_ext <<_ACEOF
5888 /* confdefs.h. */
5889 _ACEOF
5890 cat confdefs.h >>conftest.$ac_ext
5891 cat >>conftest.$ac_ext <<_ACEOF
5892 /* end confdefs.h. */
5893 /* System header to define __stub macros and hopefully few prototypes,
5894 which can conflict with char $ac_func (); below.
5895 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5896 <limits.h> exists even on freestanding compilers. Under hpux,
5897 including <limits.h> includes <sys/time.h> and causes problems
5898 checking for functions defined therein. */
5899 #if defined (__STDC__) && !defined (_HPUX_SOURCE)
5900 # include <limits.h>
5901 #else
5902 # include <assert.h>
5903 #endif
5904 /* Override any gcc2 internal prototype to avoid an error. */
5905 #ifdef __cplusplus
5906 extern "C"
5908 #endif
5909 /* We use char because int might match the return type of a gcc2
5910 builtin and then its argument prototype would still apply. */
5911 char $ac_func ();
5912 /* The GNU C library defines this for functions which it implements
5913 to always fail with ENOSYS. Some functions are actually named
5914 something starting with __ and the normal name is an alias. */
5915 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5916 choke me
5917 #else
5918 char (*f) () = $ac_func;
5919 #endif
5920 #ifdef __cplusplus
5922 #endif
5925 main ()
5927 return f != $ac_func;
5929 return 0;
5931 _ACEOF
5932 rm -f conftest.$ac_objext conftest$ac_exeext
5933 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5934 (eval $ac_link) 2>conftest.er1
5935 ac_status=$?
5936 grep -v '^ *+' conftest.er1 >conftest.err
5937 rm -f conftest.er1
5938 cat conftest.err >&5
5939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5940 (exit $ac_status); } &&
5941 { ac_try='test -z "$ac_c_werror_flag"
5942 || test ! -s conftest.err'
5943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5944 (eval $ac_try) 2>&5
5945 ac_status=$?
5946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5947 (exit $ac_status); }; } &&
5948 { ac_try='test -s conftest$ac_exeext'
5949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5950 (eval $ac_try) 2>&5
5951 ac_status=$?
5952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5953 (exit $ac_status); }; }; then
5954 eval "$as_ac_var=yes"
5955 else
5956 echo "$as_me: failed program was:" >&5
5957 sed 's/^/| /' conftest.$ac_ext >&5
5959 eval "$as_ac_var=no"
5961 rm -f conftest.err conftest.$ac_objext \
5962 conftest$ac_exeext conftest.$ac_ext
5964 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5965 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5966 if test `eval echo '${'$as_ac_var'}'` = yes; then
5967 cat >>confdefs.h <<_ACEOF
5968 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5969 _ACEOF
5972 done
5976 for v in $vars; do
5977 echo "$as_me:$LINENO: checking for $v" >&5
5978 echo $ECHO_N "checking for $v... $ECHO_C" >&6
5979 if eval "test \"\${libiberty_cv_var_$v+set}\" = set"; then
5980 echo $ECHO_N "(cached) $ECHO_C" >&6
5981 else
5982 if test x$gcc_no_link = xyes; then
5983 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5984 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5985 { (exit 1); exit 1; }; }
5987 cat >conftest.$ac_ext <<_ACEOF
5988 /* confdefs.h. */
5989 _ACEOF
5990 cat confdefs.h >>conftest.$ac_ext
5991 cat >>conftest.$ac_ext <<_ACEOF
5992 /* end confdefs.h. */
5993 int *p;
5995 main ()
5997 extern int $v []; p = $v;
5999 return 0;
6001 _ACEOF
6002 rm -f conftest.$ac_objext conftest$ac_exeext
6003 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6004 (eval $ac_link) 2>conftest.er1
6005 ac_status=$?
6006 grep -v '^ *+' conftest.er1 >conftest.err
6007 rm -f conftest.er1
6008 cat conftest.err >&5
6009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6010 (exit $ac_status); } &&
6011 { ac_try='test -z "$ac_c_werror_flag"
6012 || test ! -s conftest.err'
6013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6014 (eval $ac_try) 2>&5
6015 ac_status=$?
6016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6017 (exit $ac_status); }; } &&
6018 { ac_try='test -s conftest$ac_exeext'
6019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6020 (eval $ac_try) 2>&5
6021 ac_status=$?
6022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6023 (exit $ac_status); }; }; then
6024 eval "libiberty_cv_var_$v=yes"
6025 else
6026 echo "$as_me: failed program was:" >&5
6027 sed 's/^/| /' conftest.$ac_ext >&5
6029 eval "libiberty_cv_var_$v=no"
6031 rm -f conftest.err conftest.$ac_objext \
6032 conftest$ac_exeext conftest.$ac_ext
6035 if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
6036 echo "$as_me:$LINENO: result: yes" >&5
6037 echo "${ECHO_T}yes" >&6
6038 n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6039 cat >>confdefs.h <<_ACEOF
6040 #define $n 1
6041 _ACEOF
6043 else
6044 echo "$as_me:$LINENO: result: no" >&5
6045 echo "${ECHO_T}no" >&6
6047 done
6049 # special check for _system_configuration because AIX <4.3.2 do not
6050 # contain the `physmem' member.
6051 echo "$as_me:$LINENO: checking for external symbol _system_configuration" >&5
6052 echo $ECHO_N "checking for external symbol _system_configuration... $ECHO_C" >&6
6053 cat >conftest.$ac_ext <<_ACEOF
6054 /* confdefs.h. */
6055 _ACEOF
6056 cat confdefs.h >>conftest.$ac_ext
6057 cat >>conftest.$ac_ext <<_ACEOF
6058 /* end confdefs.h. */
6059 #include <sys/systemcfg.h>
6061 main ()
6063 double x = _system_configuration.physmem;
6065 return 0;
6067 _ACEOF
6068 rm -f conftest.$ac_objext
6069 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6070 (eval $ac_compile) 2>conftest.er1
6071 ac_status=$?
6072 grep -v '^ *+' conftest.er1 >conftest.err
6073 rm -f conftest.er1
6074 cat conftest.err >&5
6075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6076 (exit $ac_status); } &&
6077 { ac_try='test -z "$ac_c_werror_flag"
6078 || test ! -s conftest.err'
6079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6080 (eval $ac_try) 2>&5
6081 ac_status=$?
6082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6083 (exit $ac_status); }; } &&
6084 { ac_try='test -s conftest.$ac_objext'
6085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6086 (eval $ac_try) 2>&5
6087 ac_status=$?
6088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6089 (exit $ac_status); }; }; then
6090 echo "$as_me:$LINENO: result: yes" >&5
6091 echo "${ECHO_T}yes" >&6
6093 cat >>confdefs.h <<\_ACEOF
6094 #define HAVE__SYSTEM_CONFIGURATION 1
6095 _ACEOF
6097 else
6098 echo "$as_me: failed program was:" >&5
6099 sed 's/^/| /' conftest.$ac_ext >&5
6101 echo "$as_me:$LINENO: result: no" >&5
6102 echo "${ECHO_T}no" >&6
6104 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6107 for ac_func in $checkfuncs
6109 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6110 echo "$as_me:$LINENO: checking for $ac_func" >&5
6111 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6112 if eval "test \"\${$as_ac_var+set}\" = set"; then
6113 echo $ECHO_N "(cached) $ECHO_C" >&6
6114 else
6115 if test x$gcc_no_link = xyes; then
6116 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6117 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6118 { (exit 1); exit 1; }; }
6120 cat >conftest.$ac_ext <<_ACEOF
6121 /* confdefs.h. */
6122 _ACEOF
6123 cat confdefs.h >>conftest.$ac_ext
6124 cat >>conftest.$ac_ext <<_ACEOF
6125 /* end confdefs.h. */
6126 /* System header to define __stub macros and hopefully few prototypes,
6127 which can conflict with char $ac_func (); below.
6128 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6129 <limits.h> exists even on freestanding compilers. Under hpux,
6130 including <limits.h> includes <sys/time.h> and causes problems
6131 checking for functions defined therein. */
6132 #if defined (__STDC__) && !defined (_HPUX_SOURCE)
6133 # include <limits.h>
6134 #else
6135 # include <assert.h>
6136 #endif
6137 /* Override any gcc2 internal prototype to avoid an error. */
6138 #ifdef __cplusplus
6139 extern "C"
6141 #endif
6142 /* We use char because int might match the return type of a gcc2
6143 builtin and then its argument prototype would still apply. */
6144 char $ac_func ();
6145 /* The GNU C library defines this for functions which it implements
6146 to always fail with ENOSYS. Some functions are actually named
6147 something starting with __ and the normal name is an alias. */
6148 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6149 choke me
6150 #else
6151 char (*f) () = $ac_func;
6152 #endif
6153 #ifdef __cplusplus
6155 #endif
6158 main ()
6160 return f != $ac_func;
6162 return 0;
6164 _ACEOF
6165 rm -f conftest.$ac_objext conftest$ac_exeext
6166 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6167 (eval $ac_link) 2>conftest.er1
6168 ac_status=$?
6169 grep -v '^ *+' conftest.er1 >conftest.err
6170 rm -f conftest.er1
6171 cat conftest.err >&5
6172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6173 (exit $ac_status); } &&
6174 { ac_try='test -z "$ac_c_werror_flag"
6175 || test ! -s conftest.err'
6176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6177 (eval $ac_try) 2>&5
6178 ac_status=$?
6179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6180 (exit $ac_status); }; } &&
6181 { ac_try='test -s conftest$ac_exeext'
6182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6183 (eval $ac_try) 2>&5
6184 ac_status=$?
6185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6186 (exit $ac_status); }; }; then
6187 eval "$as_ac_var=yes"
6188 else
6189 echo "$as_me: failed program was:" >&5
6190 sed 's/^/| /' conftest.$ac_ext >&5
6192 eval "$as_ac_var=no"
6194 rm -f conftest.err conftest.$ac_objext \
6195 conftest$ac_exeext conftest.$ac_ext
6197 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6198 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6199 if test `eval echo '${'$as_ac_var'}'` = yes; then
6200 cat >>confdefs.h <<_ACEOF
6201 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6202 _ACEOF
6205 done
6207 echo "$as_me:$LINENO: checking whether canonicalize_file_name must be declared" >&5
6208 echo $ECHO_N "checking whether canonicalize_file_name must be declared... $ECHO_C" >&6
6209 if test "${libiberty_cv_decl_needed_canonicalize_file_name+set}" = set; then
6210 echo $ECHO_N "(cached) $ECHO_C" >&6
6211 else
6212 cat >conftest.$ac_ext <<_ACEOF
6213 /* confdefs.h. */
6214 _ACEOF
6215 cat confdefs.h >>conftest.$ac_ext
6216 cat >>conftest.$ac_ext <<_ACEOF
6217 /* end confdefs.h. */
6219 #include "confdefs.h"
6220 #include <stdio.h>
6221 #ifdef HAVE_STRING_H
6222 #include <string.h>
6223 #else
6224 #ifdef HAVE_STRINGS_H
6225 #include <strings.h>
6226 #endif
6227 #endif
6228 #ifdef HAVE_STDLIB_H
6229 #include <stdlib.h>
6230 #endif
6231 #ifdef HAVE_UNISTD_H
6232 #include <unistd.h>
6233 #endif
6235 main ()
6237 char *(*pfn) = (char *(*)) canonicalize_file_name
6239 return 0;
6241 _ACEOF
6242 rm -f conftest.$ac_objext
6243 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6244 (eval $ac_compile) 2>conftest.er1
6245 ac_status=$?
6246 grep -v '^ *+' conftest.er1 >conftest.err
6247 rm -f conftest.er1
6248 cat conftest.err >&5
6249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6250 (exit $ac_status); } &&
6251 { ac_try='test -z "$ac_c_werror_flag"
6252 || test ! -s conftest.err'
6253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6254 (eval $ac_try) 2>&5
6255 ac_status=$?
6256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6257 (exit $ac_status); }; } &&
6258 { ac_try='test -s conftest.$ac_objext'
6259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6260 (eval $ac_try) 2>&5
6261 ac_status=$?
6262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6263 (exit $ac_status); }; }; then
6264 libiberty_cv_decl_needed_canonicalize_file_name=no
6265 else
6266 echo "$as_me: failed program was:" >&5
6267 sed 's/^/| /' conftest.$ac_ext >&5
6269 libiberty_cv_decl_needed_canonicalize_file_name=yes
6271 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6274 echo "$as_me:$LINENO: result: $libiberty_cv_decl_needed_canonicalize_file_name" >&5
6275 echo "${ECHO_T}$libiberty_cv_decl_needed_canonicalize_file_name" >&6
6276 if test $libiberty_cv_decl_needed_canonicalize_file_name = yes; then
6278 cat >>confdefs.h <<\_ACEOF
6279 #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
6280 _ACEOF
6286 # Figure out which version of pexecute to use.
6287 case "${host}" in
6288 *-*-mingw* | *-*-winnt*) pexecute=./pex-win32.o ;;
6289 *-*-msdosdjgpp*) pexecute=./pex-djgpp.o ;;
6290 *-*-msdos*) pexecute=./pex-msdos.o ;;
6291 *-*-os2-emx*) pexecute=./pex-os2.o ;;
6292 *) pexecute=./pex-unix.o ;;
6293 esac
6296 if test x$gcc_no_link = xyes; then
6297 if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
6298 ac_cv_func_mmap_fixed_mapped=no
6301 if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
6304 for ac_header in stdlib.h unistd.h
6306 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6307 echo "$as_me:$LINENO: checking for $ac_header" >&5
6308 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6309 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6310 echo $ECHO_N "(cached) $ECHO_C" >&6
6311 else
6312 cat >conftest.$ac_ext <<_ACEOF
6313 /* confdefs.h. */
6314 _ACEOF
6315 cat confdefs.h >>conftest.$ac_ext
6316 cat >>conftest.$ac_ext <<_ACEOF
6317 /* end confdefs.h. */
6318 #include <$ac_header>
6319 _ACEOF
6320 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6321 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6322 ac_status=$?
6323 grep -v '^ *+' conftest.er1 >conftest.err
6324 rm -f conftest.er1
6325 cat conftest.err >&5
6326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6327 (exit $ac_status); } >/dev/null; then
6328 if test -s conftest.err; then
6329 ac_cpp_err=$ac_c_preproc_warn_flag
6330 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6331 else
6332 ac_cpp_err=
6334 else
6335 ac_cpp_err=yes
6337 if test -z "$ac_cpp_err"; then
6338 eval "$as_ac_Header=yes"
6339 else
6340 echo "$as_me: failed program was:" >&5
6341 sed 's/^/| /' conftest.$ac_ext >&5
6343 eval "$as_ac_Header=no"
6345 rm -f conftest.err conftest.$ac_ext
6347 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6348 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6349 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6350 cat >>confdefs.h <<_ACEOF
6351 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6352 _ACEOF
6355 done
6358 for ac_func in getpagesize
6360 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6361 echo "$as_me:$LINENO: checking for $ac_func" >&5
6362 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6363 if eval "test \"\${$as_ac_var+set}\" = set"; then
6364 echo $ECHO_N "(cached) $ECHO_C" >&6
6365 else
6366 if test x$gcc_no_link = xyes; then
6367 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6368 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6369 { (exit 1); exit 1; }; }
6371 cat >conftest.$ac_ext <<_ACEOF
6372 /* confdefs.h. */
6373 _ACEOF
6374 cat confdefs.h >>conftest.$ac_ext
6375 cat >>conftest.$ac_ext <<_ACEOF
6376 /* end confdefs.h. */
6377 /* System header to define __stub macros and hopefully few prototypes,
6378 which can conflict with char $ac_func (); below.
6379 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6380 <limits.h> exists even on freestanding compilers. Under hpux,
6381 including <limits.h> includes <sys/time.h> and causes problems
6382 checking for functions defined therein. */
6383 #if defined (__STDC__) && !defined (_HPUX_SOURCE)
6384 # include <limits.h>
6385 #else
6386 # include <assert.h>
6387 #endif
6388 /* Override any gcc2 internal prototype to avoid an error. */
6389 #ifdef __cplusplus
6390 extern "C"
6392 #endif
6393 /* We use char because int might match the return type of a gcc2
6394 builtin and then its argument prototype would still apply. */
6395 char $ac_func ();
6396 /* The GNU C library defines this for functions which it implements
6397 to always fail with ENOSYS. Some functions are actually named
6398 something starting with __ and the normal name is an alias. */
6399 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6400 choke me
6401 #else
6402 char (*f) () = $ac_func;
6403 #endif
6404 #ifdef __cplusplus
6406 #endif
6409 main ()
6411 return f != $ac_func;
6413 return 0;
6415 _ACEOF
6416 rm -f conftest.$ac_objext conftest$ac_exeext
6417 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6418 (eval $ac_link) 2>conftest.er1
6419 ac_status=$?
6420 grep -v '^ *+' conftest.er1 >conftest.err
6421 rm -f conftest.er1
6422 cat conftest.err >&5
6423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6424 (exit $ac_status); } &&
6425 { ac_try='test -z "$ac_c_werror_flag"
6426 || test ! -s conftest.err'
6427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6428 (eval $ac_try) 2>&5
6429 ac_status=$?
6430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6431 (exit $ac_status); }; } &&
6432 { ac_try='test -s conftest$ac_exeext'
6433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6434 (eval $ac_try) 2>&5
6435 ac_status=$?
6436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6437 (exit $ac_status); }; }; then
6438 eval "$as_ac_var=yes"
6439 else
6440 echo "$as_me: failed program was:" >&5
6441 sed 's/^/| /' conftest.$ac_ext >&5
6443 eval "$as_ac_var=no"
6445 rm -f conftest.err conftest.$ac_objext \
6446 conftest$ac_exeext conftest.$ac_ext
6448 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6449 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6450 if test `eval echo '${'$as_ac_var'}'` = yes; then
6451 cat >>confdefs.h <<_ACEOF
6452 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6453 _ACEOF
6456 done
6458 echo "$as_me:$LINENO: checking for working mmap" >&5
6459 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
6460 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
6461 echo $ECHO_N "(cached) $ECHO_C" >&6
6462 else
6463 if test "$cross_compiling" = yes; then
6464 ac_cv_func_mmap_fixed_mapped=no
6465 else
6466 cat >conftest.$ac_ext <<_ACEOF
6467 /* confdefs.h. */
6468 _ACEOF
6469 cat confdefs.h >>conftest.$ac_ext
6470 cat >>conftest.$ac_ext <<_ACEOF
6471 /* end confdefs.h. */
6472 $ac_includes_default
6473 /* malloc might have been renamed as rpl_malloc. */
6474 #undef malloc
6476 /* Thanks to Mike Haertel and Jim Avera for this test.
6477 Here is a matrix of mmap possibilities:
6478 mmap private not fixed
6479 mmap private fixed at somewhere currently unmapped
6480 mmap private fixed at somewhere already mapped
6481 mmap shared not fixed
6482 mmap shared fixed at somewhere currently unmapped
6483 mmap shared fixed at somewhere already mapped
6484 For private mappings, we should verify that changes cannot be read()
6485 back from the file, nor mmap's back from the file at a different
6486 address. (There have been systems where private was not correctly
6487 implemented like the infamous i386 svr4.0, and systems where the
6488 VM page cache was not coherent with the file system buffer cache
6489 like early versions of FreeBSD and possibly contemporary NetBSD.)
6490 For shared mappings, we should conversely verify that changes get
6491 propagated back to all the places they're supposed to be.
6493 Grep wants private fixed already mapped.
6494 The main things grep needs to know about mmap are:
6495 * does it exist and is it safe to write into the mmap'd area
6496 * how to use it (BSD variants) */
6498 #include <fcntl.h>
6499 #include <sys/mman.h>
6501 #if !STDC_HEADERS && !HAVE_STDLIB_H
6502 char *malloc ();
6503 #endif
6505 /* This mess was copied from the GNU getpagesize.h. */
6506 #if !HAVE_GETPAGESIZE
6507 /* Assume that all systems that can run configure have sys/param.h. */
6508 # if !HAVE_SYS_PARAM_H
6509 # define HAVE_SYS_PARAM_H 1
6510 # endif
6512 # ifdef _SC_PAGESIZE
6513 # define getpagesize() sysconf(_SC_PAGESIZE)
6514 # else /* no _SC_PAGESIZE */
6515 # if HAVE_SYS_PARAM_H
6516 # include <sys/param.h>
6517 # ifdef EXEC_PAGESIZE
6518 # define getpagesize() EXEC_PAGESIZE
6519 # else /* no EXEC_PAGESIZE */
6520 # ifdef NBPG
6521 # define getpagesize() NBPG * CLSIZE
6522 # ifndef CLSIZE
6523 # define CLSIZE 1
6524 # endif /* no CLSIZE */
6525 # else /* no NBPG */
6526 # ifdef NBPC
6527 # define getpagesize() NBPC
6528 # else /* no NBPC */
6529 # ifdef PAGESIZE
6530 # define getpagesize() PAGESIZE
6531 # endif /* PAGESIZE */
6532 # endif /* no NBPC */
6533 # endif /* no NBPG */
6534 # endif /* no EXEC_PAGESIZE */
6535 # else /* no HAVE_SYS_PARAM_H */
6536 # define getpagesize() 8192 /* punt totally */
6537 # endif /* no HAVE_SYS_PARAM_H */
6538 # endif /* no _SC_PAGESIZE */
6540 #endif /* no HAVE_GETPAGESIZE */
6543 main ()
6545 char *data, *data2, *data3;
6546 int i, pagesize;
6547 int fd;
6549 pagesize = getpagesize ();
6551 /* First, make a file with some known garbage in it. */
6552 data = (char *) malloc (pagesize);
6553 if (!data)
6554 exit (1);
6555 for (i = 0; i < pagesize; ++i)
6556 *(data + i) = rand ();
6557 umask (0);
6558 fd = creat ("conftest.mmap", 0600);
6559 if (fd < 0)
6560 exit (1);
6561 if (write (fd, data, pagesize) != pagesize)
6562 exit (1);
6563 close (fd);
6565 /* Next, try to mmap the file at a fixed address which already has
6566 something else allocated at it. If we can, also make sure that
6567 we see the same garbage. */
6568 fd = open ("conftest.mmap", O_RDWR);
6569 if (fd < 0)
6570 exit (1);
6571 data2 = (char *) malloc (2 * pagesize);
6572 if (!data2)
6573 exit (1);
6574 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
6575 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
6576 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6577 exit (1);
6578 for (i = 0; i < pagesize; ++i)
6579 if (*(data + i) != *(data2 + i))
6580 exit (1);
6582 /* Finally, make sure that changes to the mapped area do not
6583 percolate back to the file as seen by read(). (This is a bug on
6584 some variants of i386 svr4.0.) */
6585 for (i = 0; i < pagesize; ++i)
6586 *(data2 + i) = *(data2 + i) + 1;
6587 data3 = (char *) malloc (pagesize);
6588 if (!data3)
6589 exit (1);
6590 if (read (fd, data3, pagesize) != pagesize)
6591 exit (1);
6592 for (i = 0; i < pagesize; ++i)
6593 if (*(data + i) != *(data3 + i))
6594 exit (1);
6595 close (fd);
6596 exit (0);
6598 _ACEOF
6599 rm -f conftest$ac_exeext
6600 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6601 (eval $ac_link) 2>&5
6602 ac_status=$?
6603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6604 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6606 (eval $ac_try) 2>&5
6607 ac_status=$?
6608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6609 (exit $ac_status); }; }; then
6610 ac_cv_func_mmap_fixed_mapped=yes
6611 else
6612 echo "$as_me: program exited with status $ac_status" >&5
6613 echo "$as_me: failed program was:" >&5
6614 sed 's/^/| /' conftest.$ac_ext >&5
6616 ( exit $ac_status )
6617 ac_cv_func_mmap_fixed_mapped=no
6619 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6622 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
6623 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
6624 if test $ac_cv_func_mmap_fixed_mapped = yes; then
6626 cat >>confdefs.h <<\_ACEOF
6627 #define HAVE_MMAP 1
6628 _ACEOF
6631 rm -f conftest.mmap
6635 echo "$as_me:$LINENO: checking for working strncmp" >&5
6636 echo $ECHO_N "checking for working strncmp... $ECHO_C" >&6
6637 if test "${ac_cv_func_strncmp_works+set}" = set; then
6638 echo $ECHO_N "(cached) $ECHO_C" >&6
6639 else
6640 if test "$cross_compiling" = yes; then
6641 ac_cv_func_strncmp_works=no
6642 else
6643 cat >conftest.$ac_ext <<_ACEOF
6644 /* confdefs.h. */
6645 _ACEOF
6646 cat confdefs.h >>conftest.$ac_ext
6647 cat >>conftest.$ac_ext <<_ACEOF
6648 /* end confdefs.h. */
6650 /* Test by Jim Wilson and Kaveh Ghazi.
6651 Check whether strncmp reads past the end of its string parameters. */
6652 #include <sys/types.h>
6654 #ifdef HAVE_FCNTL_H
6655 #include <fcntl.h>
6656 #endif
6658 #ifdef HAVE_SYS_MMAN_H
6659 #include <sys/mman.h>
6660 #endif
6662 #ifndef MAP_ANON
6663 #ifdef MAP_ANONYMOUS
6664 #define MAP_ANON MAP_ANONYMOUS
6665 #else
6666 #define MAP_ANON MAP_FILE
6667 #endif
6668 #endif
6670 #ifndef MAP_FILE
6671 #define MAP_FILE 0
6672 #endif
6673 #ifndef O_RDONLY
6674 #define O_RDONLY 0
6675 #endif
6677 #define MAP_LEN 0x10000
6679 main ()
6681 #if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
6682 char *p;
6683 int dev_zero;
6685 dev_zero = open ("/dev/zero", O_RDONLY);
6686 if (dev_zero < 0)
6687 exit (1);
6689 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
6690 MAP_ANON|MAP_PRIVATE, dev_zero, 0);
6691 if (p == (char *)-1)
6692 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
6693 MAP_ANON|MAP_PRIVATE, -1, 0);
6694 if (p == (char *)-1)
6695 exit (2);
6696 else
6698 char *string = "__si_type_info";
6699 char *q = (char *) p + MAP_LEN - strlen (string) - 2;
6700 char *r = (char *) p + 0xe;
6702 strcpy (q, string);
6703 strcpy (r, string);
6704 strncmp (r, q, 14);
6706 #endif /* HAVE_MMAP || HAVE_MMAP_ANYWHERE */
6707 exit (0);
6710 _ACEOF
6711 rm -f conftest$ac_exeext
6712 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6713 (eval $ac_link) 2>&5
6714 ac_status=$?
6715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6716 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6718 (eval $ac_try) 2>&5
6719 ac_status=$?
6720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6721 (exit $ac_status); }; }; then
6722 ac_cv_func_strncmp_works=yes
6723 else
6724 echo "$as_me: program exited with status $ac_status" >&5
6725 echo "$as_me: failed program was:" >&5
6726 sed 's/^/| /' conftest.$ac_ext >&5
6728 ( exit $ac_status )
6729 ac_cv_func_strncmp_works=no
6731 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6733 rm -f core core.* *.core
6735 echo "$as_me:$LINENO: result: $ac_cv_func_strncmp_works" >&5
6736 echo "${ECHO_T}$ac_cv_func_strncmp_works" >&6
6737 if test $ac_cv_func_strncmp_works = no ; then
6738 case $LIBOBJS in
6739 "strncmp.$ac_objext" | \
6740 *" strncmp.$ac_objext" | \
6741 "strncmp.$ac_objext "* | \
6742 *" strncmp.$ac_objext "* ) ;;
6743 *) LIBOBJS="$LIBOBJS strncmp.$ac_objext" ;;
6744 esac
6749 # Install a library built with a cross compiler in $(tooldir) rather
6750 # than $(libdir).
6751 if test -z "${with_cross_host}"; then
6752 INSTALL_DEST=libdir
6753 else
6754 INSTALL_DEST=tooldir
6759 L=""
6760 for l in x $LIBOBJS; do
6761 case $l in
6762 x) ;;
6763 *) L="$L ./$l" ;;
6764 esac
6765 done
6766 LIBOBJS="$L"
6768 # We need multilib support, but only if configuring for the target.
6769 ac_config_files="$ac_config_files Makefile testsuite/Makefile"
6771 ac_config_commands="$ac_config_commands default"
6773 cat >confcache <<\_ACEOF
6774 # This file is a shell script that caches the results of configure
6775 # tests run on this system so they can be shared between configure
6776 # scripts and configure runs, see configure's option --config-cache.
6777 # It is not useful on other systems. If it contains results you don't
6778 # want to keep, you may remove or edit it.
6780 # config.status only pays attention to the cache file if you give it
6781 # the --recheck option to rerun configure.
6783 # `ac_cv_env_foo' variables (set or unset) will be overridden when
6784 # loading this file, other *unset* `ac_cv_foo' will be assigned the
6785 # following values.
6787 _ACEOF
6789 # The following way of writing the cache mishandles newlines in values,
6790 # but we know of no workaround that is simple, portable, and efficient.
6791 # So, don't put newlines in cache variables' values.
6792 # Ultrix sh set writes to stderr and can't be redirected directly,
6793 # and sets the high bit in the cache file unless we assign to the vars.
6795 (set) 2>&1 |
6796 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6797 *ac_space=\ *)
6798 # `set' does not quote correctly, so add quotes (double-quote
6799 # substitution turns \\\\ into \\, and sed turns \\ into \).
6800 sed -n \
6801 "s/'/'\\\\''/g;
6802 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
6805 # `set' quotes correctly as required by POSIX, so do not add quotes.
6806 sed -n \
6807 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
6809 esac;
6811 sed '
6812 t clear
6813 : clear
6814 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
6815 t end
6816 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
6817 : end' >>confcache
6818 if diff $cache_file confcache >/dev/null 2>&1; then :; else
6819 if test -w $cache_file; then
6820 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
6821 cat confcache >$cache_file
6822 else
6823 echo "not updating unwritable cache $cache_file"
6826 rm -f confcache
6828 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6829 # Let make expand exec_prefix.
6830 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6832 # VPATH may cause trouble with some makes, so we remove $(srcdir),
6833 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
6834 # trailing colons and then remove the whole line if VPATH becomes empty
6835 # (actually we leave an empty line to preserve line numbers).
6836 if test "x$srcdir" = x.; then
6837 ac_vpsub='/^[ ]*VPATH[ ]*=/{
6838 s/:*\$(srcdir):*/:/;
6839 s/:*\${srcdir}:*/:/;
6840 s/:*@srcdir@:*/:/;
6841 s/^\([^=]*=[ ]*\):*/\1/;
6842 s/:*$//;
6843 s/^[^=]*=[ ]*$//;
6847 DEFS=-DHAVE_CONFIG_H
6849 ac_libobjs=
6850 ac_ltlibobjs=
6851 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
6852 # 1. Remove the extension, and $U if already installed.
6853 ac_i=`echo "$ac_i" |
6854 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
6855 # 2. Add them.
6856 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
6857 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
6858 done
6859 LIBOBJS=$ac_libobjs
6861 LTLIBOBJS=$ac_ltlibobjs
6865 : ${CONFIG_STATUS=./config.status}
6866 ac_clean_files_save=$ac_clean_files
6867 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
6868 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
6869 echo "$as_me: creating $CONFIG_STATUS" >&6;}
6870 cat >$CONFIG_STATUS <<_ACEOF
6871 #! $SHELL
6872 # Generated by $as_me.
6873 # Run this file to recreate the current configuration.
6874 # Compiler output produced by configure, useful for debugging
6875 # configure, is in config.log if it exists.
6877 debug=false
6878 ac_cs_recheck=false
6879 ac_cs_silent=false
6880 SHELL=\${CONFIG_SHELL-$SHELL}
6881 _ACEOF
6883 cat >>$CONFIG_STATUS <<\_ACEOF
6884 ## --------------------- ##
6885 ## M4sh Initialization. ##
6886 ## --------------------- ##
6888 # Be Bourne compatible
6889 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
6890 emulate sh
6891 NULLCMD=:
6892 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
6893 # is contrary to our usage. Disable this feature.
6894 alias -g '${1+"$@"}'='"$@"'
6895 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
6896 set -o posix
6898 DUALCASE=1; export DUALCASE # for MKS sh
6900 # Support unset when possible.
6901 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
6902 as_unset=unset
6903 else
6904 as_unset=false
6908 # Work around bugs in pre-3.0 UWIN ksh.
6909 $as_unset ENV MAIL MAILPATH
6910 PS1='$ '
6911 PS2='> '
6912 PS4='+ '
6914 # NLS nuisances.
6915 for as_var in \
6916 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
6917 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
6918 LC_TELEPHONE LC_TIME
6920 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6921 eval $as_var=C; export $as_var
6922 else
6923 $as_unset $as_var
6925 done
6927 # Required to use basename.
6928 if expr a : '\(a\)' >/dev/null 2>&1; then
6929 as_expr=expr
6930 else
6931 as_expr=false
6934 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
6935 as_basename=basename
6936 else
6937 as_basename=false
6941 # Name of the executable.
6942 as_me=`$as_basename "$0" ||
6943 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
6944 X"$0" : 'X\(//\)$' \| \
6945 X"$0" : 'X\(/\)$' \| \
6946 . : '\(.\)' 2>/dev/null ||
6947 echo X/"$0" |
6948 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
6949 /^X\/\(\/\/\)$/{ s//\1/; q; }
6950 /^X\/\(\/\).*/{ s//\1/; q; }
6951 s/.*/./; q'`
6954 # PATH needs CR, and LINENO needs CR and PATH.
6955 # Avoid depending upon Character Ranges.
6956 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
6957 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
6958 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
6959 as_cr_digits='0123456789'
6960 as_cr_alnum=$as_cr_Letters$as_cr_digits
6962 # The user is always right.
6963 if test "${PATH_SEPARATOR+set}" != set; then
6964 echo "#! /bin/sh" >conf$$.sh
6965 echo "exit 0" >>conf$$.sh
6966 chmod +x conf$$.sh
6967 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6968 PATH_SEPARATOR=';'
6969 else
6970 PATH_SEPARATOR=:
6972 rm -f conf$$.sh
6976 as_lineno_1=$LINENO
6977 as_lineno_2=$LINENO
6978 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
6979 test "x$as_lineno_1" != "x$as_lineno_2" &&
6980 test "x$as_lineno_3" = "x$as_lineno_2" || {
6981 # Find who we are. Look in the path if we contain no path at all
6982 # relative or not.
6983 case $0 in
6984 *[\\/]* ) as_myself=$0 ;;
6985 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6986 for as_dir in $PATH
6988 IFS=$as_save_IFS
6989 test -z "$as_dir" && as_dir=.
6990 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
6991 done
6994 esac
6995 # We did not find ourselves, most probably we were run as `sh COMMAND'
6996 # in which case we are not to be found in the path.
6997 if test "x$as_myself" = x; then
6998 as_myself=$0
7000 if test ! -f "$as_myself"; then
7001 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
7002 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
7003 { (exit 1); exit 1; }; }
7005 case $CONFIG_SHELL in
7007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7008 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
7010 IFS=$as_save_IFS
7011 test -z "$as_dir" && as_dir=.
7012 for as_base in sh bash ksh sh5; do
7013 case $as_dir in
7015 if ("$as_dir/$as_base" -c '
7016 as_lineno_1=$LINENO
7017 as_lineno_2=$LINENO
7018 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
7019 test "x$as_lineno_1" != "x$as_lineno_2" &&
7020 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
7021 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
7022 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
7023 CONFIG_SHELL=$as_dir/$as_base
7024 export CONFIG_SHELL
7025 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
7026 fi;;
7027 esac
7028 done
7029 done
7031 esac
7033 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
7034 # uniformly replaced by the line number. The first 'sed' inserts a
7035 # line-number line before each line; the second 'sed' does the real
7036 # work. The second script uses 'N' to pair each line-number line
7037 # with the numbered line, and appends trailing '-' during
7038 # substitution so that $LINENO is not a special case at line end.
7039 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
7040 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
7041 sed '=' <$as_myself |
7042 sed '
7044 s,$,-,
7045 : loop
7046 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
7047 t loop
7048 s,-$,,
7049 s,^['$as_cr_digits']*\n,,
7050 ' >$as_me.lineno &&
7051 chmod +x $as_me.lineno ||
7052 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
7053 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
7054 { (exit 1); exit 1; }; }
7056 # Don't try to exec as it changes $[0], causing all sort of problems
7057 # (the dirname of $[0] is not the place where we might find the
7058 # original and so on. Autoconf is especially sensible to this).
7059 . ./$as_me.lineno
7060 # Exit status is that of the last command.
7061 exit
7065 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
7066 *c*,-n*) ECHO_N= ECHO_C='
7067 ' ECHO_T=' ' ;;
7068 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
7069 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
7070 esac
7072 if expr a : '\(a\)' >/dev/null 2>&1; then
7073 as_expr=expr
7074 else
7075 as_expr=false
7078 rm -f conf$$ conf$$.exe conf$$.file
7079 echo >conf$$.file
7080 if ln -s conf$$.file conf$$ 2>/dev/null; then
7081 # We could just check for DJGPP; but this test a) works b) is more generic
7082 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
7083 if test -f conf$$.exe; then
7084 # Don't use ln at all; we don't have any links
7085 as_ln_s='cp -p'
7086 else
7087 as_ln_s='ln -s'
7089 elif ln conf$$.file conf$$ 2>/dev/null; then
7090 as_ln_s=ln
7091 else
7092 as_ln_s='cp -p'
7094 rm -f conf$$ conf$$.exe conf$$.file
7096 if mkdir -p . 2>/dev/null; then
7097 as_mkdir_p=:
7098 else
7099 test -d ./-p && rmdir ./-p
7100 as_mkdir_p=false
7103 as_executable_p="test -f"
7105 # Sed expression to map a string onto a valid CPP name.
7106 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
7108 # Sed expression to map a string onto a valid variable name.
7109 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
7112 # IFS
7113 # We need space, tab and new line, in precisely that order.
7114 as_nl='
7116 IFS=" $as_nl"
7118 # CDPATH.
7119 $as_unset CDPATH
7121 exec 6>&1
7123 # Open the log real soon, to keep \$[0] and so on meaningful, and to
7124 # report actual input values of CONFIG_FILES etc. instead of their
7125 # values after options handling. Logging --version etc. is OK.
7126 exec 5>>config.log
7128 echo
7129 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
7130 ## Running $as_me. ##
7131 _ASBOX
7132 } >&5
7133 cat >&5 <<_CSEOF
7135 This file was extended by $as_me, which was
7136 generated by GNU Autoconf 2.59. Invocation command line was
7138 CONFIG_FILES = $CONFIG_FILES
7139 CONFIG_HEADERS = $CONFIG_HEADERS
7140 CONFIG_LINKS = $CONFIG_LINKS
7141 CONFIG_COMMANDS = $CONFIG_COMMANDS
7142 $ $0 $@
7144 _CSEOF
7145 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
7146 echo >&5
7147 _ACEOF
7149 # Files that config.status was made for.
7150 if test -n "$ac_config_files"; then
7151 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
7154 if test -n "$ac_config_headers"; then
7155 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
7158 if test -n "$ac_config_links"; then
7159 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
7162 if test -n "$ac_config_commands"; then
7163 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
7166 cat >>$CONFIG_STATUS <<\_ACEOF
7168 ac_cs_usage="\
7169 \`$as_me' instantiates files from templates according to the
7170 current configuration.
7172 Usage: $0 [OPTIONS] [FILE]...
7174 -h, --help print this help, then exit
7175 -V, --version print version number, then exit
7176 -q, --quiet do not print progress messages
7177 -d, --debug don't remove temporary files
7178 --recheck update $as_me by reconfiguring in the same conditions
7179 --file=FILE[:TEMPLATE]
7180 instantiate the configuration file FILE
7181 --header=FILE[:TEMPLATE]
7182 instantiate the configuration header FILE
7184 Configuration files:
7185 $config_files
7187 Configuration headers:
7188 $config_headers
7190 Configuration commands:
7191 $config_commands
7193 Report bugs to <bug-autoconf@gnu.org>."
7194 _ACEOF
7196 cat >>$CONFIG_STATUS <<_ACEOF
7197 ac_cs_version="\\
7198 config.status
7199 configured by $0, generated by GNU Autoconf 2.59,
7200 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
7202 Copyright (C) 2003 Free Software Foundation, Inc.
7203 This config.status script is free software; the Free Software Foundation
7204 gives unlimited permission to copy, distribute and modify it."
7205 srcdir=$srcdir
7206 INSTALL="$INSTALL"
7207 _ACEOF
7209 cat >>$CONFIG_STATUS <<\_ACEOF
7210 # If no file are specified by the user, then we need to provide default
7211 # value. By we need to know if files were specified by the user.
7212 ac_need_defaults=:
7213 while test $# != 0
7215 case $1 in
7216 --*=*)
7217 ac_option=`expr "x$1" : 'x\([^=]*\)='`
7218 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
7219 ac_shift=:
7222 ac_option=$1
7223 ac_optarg=$2
7224 ac_shift=shift
7226 *) # This is not an option, so the user has probably given explicit
7227 # arguments.
7228 ac_option=$1
7229 ac_need_defaults=false;;
7230 esac
7232 case $ac_option in
7233 # Handling of the options.
7234 _ACEOF
7235 cat >>$CONFIG_STATUS <<\_ACEOF
7236 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7237 ac_cs_recheck=: ;;
7238 --version | --vers* | -V )
7239 echo "$ac_cs_version"; exit 0 ;;
7240 --he | --h)
7241 # Conflict between --help and --header
7242 { { echo "$as_me:$LINENO: error: ambiguous option: $1
7243 Try \`$0 --help' for more information." >&5
7244 echo "$as_me: error: ambiguous option: $1
7245 Try \`$0 --help' for more information." >&2;}
7246 { (exit 1); exit 1; }; };;
7247 --help | --hel | -h )
7248 echo "$ac_cs_usage"; exit 0 ;;
7249 --debug | --d* | -d )
7250 debug=: ;;
7251 --file | --fil | --fi | --f )
7252 $ac_shift
7253 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
7254 ac_need_defaults=false;;
7255 --header | --heade | --head | --hea )
7256 $ac_shift
7257 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
7258 ac_need_defaults=false;;
7259 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
7260 | -silent | --silent | --silen | --sile | --sil | --si | --s)
7261 ac_cs_silent=: ;;
7263 # This is an error.
7264 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
7265 Try \`$0 --help' for more information." >&5
7266 echo "$as_me: error: unrecognized option: $1
7267 Try \`$0 --help' for more information." >&2;}
7268 { (exit 1); exit 1; }; } ;;
7270 *) ac_config_targets="$ac_config_targets $1" ;;
7272 esac
7273 shift
7274 done
7276 ac_configure_extra_args=
7278 if $ac_cs_silent; then
7279 exec 6>/dev/null
7280 ac_configure_extra_args="$ac_configure_extra_args --silent"
7283 _ACEOF
7284 cat >>$CONFIG_STATUS <<_ACEOF
7285 if \$ac_cs_recheck; then
7286 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
7287 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
7290 _ACEOF
7292 cat >>$CONFIG_STATUS <<_ACEOF
7294 # INIT-COMMANDS section.
7297 srcdir=${srcdir}
7298 host=${host}
7299 target=${target}
7300 with_target_subdir=${with_target_subdir}
7301 with_build_subdir=${with_build_subdir}
7302 with_multisubdir=${with_multisubdir}
7303 ac_configure_args="--enable-multilib ${ac_configure_args}"
7304 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
7305 ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
7306 libiberty_topdir=${libiberty_topdir}
7309 _ACEOF
7313 cat >>$CONFIG_STATUS <<\_ACEOF
7314 for ac_config_target in $ac_config_targets
7316 case "$ac_config_target" in
7317 # Handling of arguments.
7318 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
7319 "testsuite/Makefile" ) CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
7320 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
7321 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
7322 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
7323 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
7324 { (exit 1); exit 1; }; };;
7325 esac
7326 done
7328 # If the user did not use the arguments to specify the items to instantiate,
7329 # then the envvar interface is used. Set only those that are not.
7330 # We use the long form for the default assignment because of an extremely
7331 # bizarre bug on SunOS 4.1.3.
7332 if $ac_need_defaults; then
7333 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
7334 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
7335 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
7338 # Have a temporary directory for convenience. Make it in the build tree
7339 # simply because there is no reason to put it here, and in addition,
7340 # creating and moving files from /tmp can sometimes cause problems.
7341 # Create a temporary directory, and hook for its removal unless debugging.
7342 $debug ||
7344 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
7345 trap '{ (exit 1); exit 1; }' 1 2 13 15
7348 # Create a (secure) tmp directory for tmp files.
7351 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
7352 test -n "$tmp" && test -d "$tmp"
7353 } ||
7355 tmp=./confstat$$-$RANDOM
7356 (umask 077 && mkdir $tmp)
7357 } ||
7359 echo "$me: cannot create a temporary directory in ." >&2
7360 { (exit 1); exit 1; }
7363 _ACEOF
7365 cat >>$CONFIG_STATUS <<_ACEOF
7368 # CONFIG_FILES section.
7371 # No need to generate the scripts if there are no CONFIG_FILES.
7372 # This happens for instance when ./config.status config.h
7373 if test -n "\$CONFIG_FILES"; then
7374 # Protect against being on the right side of a sed subst in config.status.
7375 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
7376 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
7377 s,@SHELL@,$SHELL,;t t
7378 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
7379 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
7380 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
7381 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
7382 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
7383 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
7384 s,@exec_prefix@,$exec_prefix,;t t
7385 s,@prefix@,$prefix,;t t
7386 s,@program_transform_name@,$program_transform_name,;t t
7387 s,@bindir@,$bindir,;t t
7388 s,@sbindir@,$sbindir,;t t
7389 s,@libexecdir@,$libexecdir,;t t
7390 s,@datadir@,$datadir,;t t
7391 s,@sysconfdir@,$sysconfdir,;t t
7392 s,@sharedstatedir@,$sharedstatedir,;t t
7393 s,@localstatedir@,$localstatedir,;t t
7394 s,@libdir@,$libdir,;t t
7395 s,@includedir@,$includedir,;t t
7396 s,@oldincludedir@,$oldincludedir,;t t
7397 s,@infodir@,$infodir,;t t
7398 s,@mandir@,$mandir,;t t
7399 s,@build_alias@,$build_alias,;t t
7400 s,@host_alias@,$host_alias,;t t
7401 s,@target_alias@,$target_alias,;t t
7402 s,@DEFS@,$DEFS,;t t
7403 s,@ECHO_C@,$ECHO_C,;t t
7404 s,@ECHO_N@,$ECHO_N,;t t
7405 s,@ECHO_T@,$ECHO_T,;t t
7406 s,@LIBS@,$LIBS,;t t
7407 s,@libiberty_topdir@,$libiberty_topdir,;t t
7408 s,@MAINT@,$MAINT,;t t
7409 s,@NOTMAINT@,$NOTMAINT,;t t
7410 s,@MAKEINFO@,$MAKEINFO,;t t
7411 s,@BUILD_INFO@,$BUILD_INFO,;t t
7412 s,@PERL@,$PERL,;t t
7413 s,@HAVE_PERL@,$HAVE_PERL,;t t
7414 s,@build@,$build,;t t
7415 s,@build_cpu@,$build_cpu,;t t
7416 s,@build_vendor@,$build_vendor,;t t
7417 s,@build_os@,$build_os,;t t
7418 s,@host@,$host,;t t
7419 s,@host_cpu@,$host_cpu,;t t
7420 s,@host_vendor@,$host_vendor,;t t
7421 s,@host_os@,$host_os,;t t
7422 s,@AR@,$AR,;t t
7423 s,@ac_ct_AR@,$ac_ct_AR,;t t
7424 s,@RANLIB@,$RANLIB,;t t
7425 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
7426 s,@CC@,$CC,;t t
7427 s,@CFLAGS@,$CFLAGS,;t t
7428 s,@LDFLAGS@,$LDFLAGS,;t t
7429 s,@CPPFLAGS@,$CPPFLAGS,;t t
7430 s,@ac_ct_CC@,$ac_ct_CC,;t t
7431 s,@EXEEXT@,$EXEEXT,;t t
7432 s,@OBJEXT@,$OBJEXT,;t t
7433 s,@CPP@,$CPP,;t t
7434 s,@ac_libiberty_warn_cflags@,$ac_libiberty_warn_cflags,;t t
7435 s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
7436 s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
7437 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
7438 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
7439 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
7440 s,@EGREP@,$EGREP,;t t
7441 s,@LIBOBJS@,$LIBOBJS,;t t
7442 s,@CHECK@,$CHECK,;t t
7443 s,@target_header_dir@,$target_header_dir,;t t
7444 s,@pexecute@,$pexecute,;t t
7445 s,@INSTALL_DEST@,$INSTALL_DEST,;t t
7446 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
7447 /@host_makefile_frag@/r $host_makefile_frag
7448 s,@host_makefile_frag@,,;t t
7449 CEOF
7451 _ACEOF
7453 cat >>$CONFIG_STATUS <<\_ACEOF
7454 # Split the substitutions into bite-sized pieces for seds with
7455 # small command number limits, like on Digital OSF/1 and HP-UX.
7456 ac_max_sed_lines=48
7457 ac_sed_frag=1 # Number of current file.
7458 ac_beg=1 # First line for current file.
7459 ac_end=$ac_max_sed_lines # Line after last line for current file.
7460 ac_more_lines=:
7461 ac_sed_cmds=
7462 while $ac_more_lines; do
7463 if test $ac_beg -gt 1; then
7464 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
7465 else
7466 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
7468 if test ! -s $tmp/subs.frag; then
7469 ac_more_lines=false
7470 else
7471 # The purpose of the label and of the branching condition is to
7472 # speed up the sed processing (if there are no `@' at all, there
7473 # is no need to browse any of the substitutions).
7474 # These are the two extra sed commands mentioned above.
7475 (echo ':t
7476 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
7477 if test -z "$ac_sed_cmds"; then
7478 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
7479 else
7480 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
7482 ac_sed_frag=`expr $ac_sed_frag + 1`
7483 ac_beg=$ac_end
7484 ac_end=`expr $ac_end + $ac_max_sed_lines`
7486 done
7487 if test -z "$ac_sed_cmds"; then
7488 ac_sed_cmds=cat
7490 fi # test -n "$CONFIG_FILES"
7492 _ACEOF
7493 cat >>$CONFIG_STATUS <<\_ACEOF
7494 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
7495 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7496 case $ac_file in
7497 - | *:- | *:-:* ) # input from stdin
7498 cat >$tmp/stdin
7499 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
7500 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
7501 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
7502 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
7503 * ) ac_file_in=$ac_file.in ;;
7504 esac
7506 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
7507 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
7508 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7509 X"$ac_file" : 'X\(//\)[^/]' \| \
7510 X"$ac_file" : 'X\(//\)$' \| \
7511 X"$ac_file" : 'X\(/\)' \| \
7512 . : '\(.\)' 2>/dev/null ||
7513 echo X"$ac_file" |
7514 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
7515 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
7516 /^X\(\/\/\)$/{ s//\1/; q; }
7517 /^X\(\/\).*/{ s//\1/; q; }
7518 s/.*/./; q'`
7519 { if $as_mkdir_p; then
7520 mkdir -p "$ac_dir"
7521 else
7522 as_dir="$ac_dir"
7523 as_dirs=
7524 while test ! -d "$as_dir"; do
7525 as_dirs="$as_dir $as_dirs"
7526 as_dir=`(dirname "$as_dir") 2>/dev/null ||
7527 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7528 X"$as_dir" : 'X\(//\)[^/]' \| \
7529 X"$as_dir" : 'X\(//\)$' \| \
7530 X"$as_dir" : 'X\(/\)' \| \
7531 . : '\(.\)' 2>/dev/null ||
7532 echo X"$as_dir" |
7533 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
7534 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
7535 /^X\(\/\/\)$/{ s//\1/; q; }
7536 /^X\(\/\).*/{ s//\1/; q; }
7537 s/.*/./; q'`
7538 done
7539 test ! -n "$as_dirs" || mkdir $as_dirs
7540 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
7541 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
7542 { (exit 1); exit 1; }; }; }
7544 ac_builddir=.
7546 if test "$ac_dir" != .; then
7547 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
7548 # A "../" for each directory in $ac_dir_suffix.
7549 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
7550 else
7551 ac_dir_suffix= ac_top_builddir=
7554 case $srcdir in
7555 .) # No --srcdir option. We are building in place.
7556 ac_srcdir=.
7557 if test -z "$ac_top_builddir"; then
7558 ac_top_srcdir=.
7559 else
7560 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
7561 fi ;;
7562 [\\/]* | ?:[\\/]* ) # Absolute path.
7563 ac_srcdir=$srcdir$ac_dir_suffix;
7564 ac_top_srcdir=$srcdir ;;
7565 *) # Relative path.
7566 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
7567 ac_top_srcdir=$ac_top_builddir$srcdir ;;
7568 esac
7570 # Do not use `cd foo && pwd` to compute absolute paths, because
7571 # the directories may not exist.
7572 case `pwd` in
7573 .) ac_abs_builddir="$ac_dir";;
7575 case "$ac_dir" in
7576 .) ac_abs_builddir=`pwd`;;
7577 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
7578 *) ac_abs_builddir=`pwd`/"$ac_dir";;
7579 esac;;
7580 esac
7581 case $ac_abs_builddir in
7582 .) ac_abs_top_builddir=${ac_top_builddir}.;;
7584 case ${ac_top_builddir}. in
7585 .) ac_abs_top_builddir=$ac_abs_builddir;;
7586 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
7587 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
7588 esac;;
7589 esac
7590 case $ac_abs_builddir in
7591 .) ac_abs_srcdir=$ac_srcdir;;
7593 case $ac_srcdir in
7594 .) ac_abs_srcdir=$ac_abs_builddir;;
7595 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
7596 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
7597 esac;;
7598 esac
7599 case $ac_abs_builddir in
7600 .) ac_abs_top_srcdir=$ac_top_srcdir;;
7602 case $ac_top_srcdir in
7603 .) ac_abs_top_srcdir=$ac_abs_builddir;;
7604 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
7605 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
7606 esac;;
7607 esac
7610 case $INSTALL in
7611 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
7612 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
7613 esac
7615 if test x"$ac_file" != x-; then
7616 { echo "$as_me:$LINENO: creating $ac_file" >&5
7617 echo "$as_me: creating $ac_file" >&6;}
7618 rm -f "$ac_file"
7620 # Let's still pretend it is `configure' which instantiates (i.e., don't
7621 # use $as_me), people would be surprised to read:
7622 # /* config.h. Generated by config.status. */
7623 if test x"$ac_file" = x-; then
7624 configure_input=
7625 else
7626 configure_input="$ac_file. "
7628 configure_input=$configure_input"Generated from `echo $ac_file_in |
7629 sed 's,.*/,,'` by configure."
7631 # First look for the input files in the build tree, otherwise in the
7632 # src tree.
7633 ac_file_inputs=`IFS=:
7634 for f in $ac_file_in; do
7635 case $f in
7636 -) echo $tmp/stdin ;;
7637 [\\/$]*)
7638 # Absolute (can't be DOS-style, as IFS=:)
7639 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
7640 echo "$as_me: error: cannot find input file: $f" >&2;}
7641 { (exit 1); exit 1; }; }
7642 echo "$f";;
7643 *) # Relative
7644 if test -f "$f"; then
7645 # Build tree
7646 echo "$f"
7647 elif test -f "$srcdir/$f"; then
7648 # Source tree
7649 echo "$srcdir/$f"
7650 else
7651 # /dev/null tree
7652 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
7653 echo "$as_me: error: cannot find input file: $f" >&2;}
7654 { (exit 1); exit 1; }; }
7655 fi;;
7656 esac
7657 done` || { (exit 1); exit 1; }
7658 _ACEOF
7659 cat >>$CONFIG_STATUS <<_ACEOF
7660 sed "$ac_vpsub
7661 $extrasub
7662 _ACEOF
7663 cat >>$CONFIG_STATUS <<\_ACEOF
7665 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
7666 s,@configure_input@,$configure_input,;t t
7667 s,@srcdir@,$ac_srcdir,;t t
7668 s,@abs_srcdir@,$ac_abs_srcdir,;t t
7669 s,@top_srcdir@,$ac_top_srcdir,;t t
7670 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
7671 s,@builddir@,$ac_builddir,;t t
7672 s,@abs_builddir@,$ac_abs_builddir,;t t
7673 s,@top_builddir@,$ac_top_builddir,;t t
7674 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
7675 s,@INSTALL@,$ac_INSTALL,;t t
7676 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
7677 rm -f $tmp/stdin
7678 if test x"$ac_file" != x-; then
7679 mv $tmp/out $ac_file
7680 else
7681 cat $tmp/out
7682 rm -f $tmp/out
7685 done
7686 _ACEOF
7687 cat >>$CONFIG_STATUS <<\_ACEOF
7690 # CONFIG_HEADER section.
7693 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7694 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7696 # ac_d sets the value in "#define NAME VALUE" lines.
7697 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7698 ac_dB='[ ].*$,\1#\2'
7699 ac_dC=' '
7700 ac_dD=',;t'
7701 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7702 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7703 ac_uB='$,\1#\2define\3'
7704 ac_uC=' '
7705 ac_uD=',;t'
7707 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
7708 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7709 case $ac_file in
7710 - | *:- | *:-:* ) # input from stdin
7711 cat >$tmp/stdin
7712 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
7713 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
7714 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
7715 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
7716 * ) ac_file_in=$ac_file.in ;;
7717 esac
7719 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
7720 echo "$as_me: creating $ac_file" >&6;}
7722 # First look for the input files in the build tree, otherwise in the
7723 # src tree.
7724 ac_file_inputs=`IFS=:
7725 for f in $ac_file_in; do
7726 case $f in
7727 -) echo $tmp/stdin ;;
7728 [\\/$]*)
7729 # Absolute (can't be DOS-style, as IFS=:)
7730 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
7731 echo "$as_me: error: cannot find input file: $f" >&2;}
7732 { (exit 1); exit 1; }; }
7733 # Do quote $f, to prevent DOS paths from being IFS'd.
7734 echo "$f";;
7735 *) # Relative
7736 if test -f "$f"; then
7737 # Build tree
7738 echo "$f"
7739 elif test -f "$srcdir/$f"; then
7740 # Source tree
7741 echo "$srcdir/$f"
7742 else
7743 # /dev/null tree
7744 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
7745 echo "$as_me: error: cannot find input file: $f" >&2;}
7746 { (exit 1); exit 1; }; }
7747 fi;;
7748 esac
7749 done` || { (exit 1); exit 1; }
7750 # Remove the trailing spaces.
7751 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
7753 _ACEOF
7755 # Transform confdefs.h into two sed scripts, `conftest.defines' and
7756 # `conftest.undefs', that substitutes the proper values into
7757 # config.h.in to produce config.h. The first handles `#define'
7758 # templates, and the second `#undef' templates.
7759 # And first: Protect against being on the right side of a sed subst in
7760 # config.status. Protect against being in an unquoted here document
7761 # in config.status.
7762 rm -f conftest.defines conftest.undefs
7763 # Using a here document instead of a string reduces the quoting nightmare.
7764 # Putting comments in sed scripts is not portable.
7766 # `end' is used to avoid that the second main sed command (meant for
7767 # 0-ary CPP macros) applies to n-ary macro definitions.
7768 # See the Autoconf documentation for `clear'.
7769 cat >confdef2sed.sed <<\_ACEOF
7770 s/[\\&,]/\\&/g
7771 s,[\\$`],\\&,g
7772 t clear
7773 : clear
7774 s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
7775 t end
7776 s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
7777 : end
7778 _ACEOF
7779 # If some macros were called several times there might be several times
7780 # the same #defines, which is useless. Nevertheless, we may not want to
7781 # sort them, since we want the *last* AC-DEFINE to be honored.
7782 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
7783 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
7784 rm -f confdef2sed.sed
7786 # This sed command replaces #undef with comments. This is necessary, for
7787 # example, in the case of _POSIX_SOURCE, which is predefined and required
7788 # on some systems where configure will not decide to define it.
7789 cat >>conftest.undefs <<\_ACEOF
7790 s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
7791 _ACEOF
7793 # Break up conftest.defines because some shells have a limit on the size
7794 # of here documents, and old seds have small limits too (100 cmds).
7795 echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
7796 echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
7797 echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
7798 echo ' :' >>$CONFIG_STATUS
7799 rm -f conftest.tail
7800 while grep . conftest.defines >/dev/null
7802 # Write a limited-size here document to $tmp/defines.sed.
7803 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
7804 # Speed up: don't consider the non `#define' lines.
7805 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
7806 # Work around the forget-to-reset-the-flag bug.
7807 echo 't clr' >>$CONFIG_STATUS
7808 echo ': clr' >>$CONFIG_STATUS
7809 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
7810 echo 'CEOF
7811 sed -f $tmp/defines.sed $tmp/in >$tmp/out
7812 rm -f $tmp/in
7813 mv $tmp/out $tmp/in
7814 ' >>$CONFIG_STATUS
7815 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
7816 rm -f conftest.defines
7817 mv conftest.tail conftest.defines
7818 done
7819 rm -f conftest.defines
7820 echo ' fi # grep' >>$CONFIG_STATUS
7821 echo >>$CONFIG_STATUS
7823 # Break up conftest.undefs because some shells have a limit on the size
7824 # of here documents, and old seds have small limits too (100 cmds).
7825 echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
7826 rm -f conftest.tail
7827 while grep . conftest.undefs >/dev/null
7829 # Write a limited-size here document to $tmp/undefs.sed.
7830 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
7831 # Speed up: don't consider the non `#undef'
7832 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
7833 # Work around the forget-to-reset-the-flag bug.
7834 echo 't clr' >>$CONFIG_STATUS
7835 echo ': clr' >>$CONFIG_STATUS
7836 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
7837 echo 'CEOF
7838 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
7839 rm -f $tmp/in
7840 mv $tmp/out $tmp/in
7841 ' >>$CONFIG_STATUS
7842 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
7843 rm -f conftest.undefs
7844 mv conftest.tail conftest.undefs
7845 done
7846 rm -f conftest.undefs
7848 cat >>$CONFIG_STATUS <<\_ACEOF
7849 # Let's still pretend it is `configure' which instantiates (i.e., don't
7850 # use $as_me), people would be surprised to read:
7851 # /* config.h. Generated by config.status. */
7852 if test x"$ac_file" = x-; then
7853 echo "/* Generated by configure. */" >$tmp/config.h
7854 else
7855 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
7857 cat $tmp/in >>$tmp/config.h
7858 rm -f $tmp/in
7859 if test x"$ac_file" != x-; then
7860 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
7861 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
7862 echo "$as_me: $ac_file is unchanged" >&6;}
7863 else
7864 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
7865 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7866 X"$ac_file" : 'X\(//\)[^/]' \| \
7867 X"$ac_file" : 'X\(//\)$' \| \
7868 X"$ac_file" : 'X\(/\)' \| \
7869 . : '\(.\)' 2>/dev/null ||
7870 echo X"$ac_file" |
7871 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
7872 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
7873 /^X\(\/\/\)$/{ s//\1/; q; }
7874 /^X\(\/\).*/{ s//\1/; q; }
7875 s/.*/./; q'`
7876 { if $as_mkdir_p; then
7877 mkdir -p "$ac_dir"
7878 else
7879 as_dir="$ac_dir"
7880 as_dirs=
7881 while test ! -d "$as_dir"; do
7882 as_dirs="$as_dir $as_dirs"
7883 as_dir=`(dirname "$as_dir") 2>/dev/null ||
7884 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7885 X"$as_dir" : 'X\(//\)[^/]' \| \
7886 X"$as_dir" : 'X\(//\)$' \| \
7887 X"$as_dir" : 'X\(/\)' \| \
7888 . : '\(.\)' 2>/dev/null ||
7889 echo X"$as_dir" |
7890 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
7891 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
7892 /^X\(\/\/\)$/{ s//\1/; q; }
7893 /^X\(\/\).*/{ s//\1/; q; }
7894 s/.*/./; q'`
7895 done
7896 test ! -n "$as_dirs" || mkdir $as_dirs
7897 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
7898 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
7899 { (exit 1); exit 1; }; }; }
7901 rm -f $ac_file
7902 mv $tmp/config.h $ac_file
7904 else
7905 cat $tmp/config.h
7906 rm -f $tmp/config.h
7908 done
7909 _ACEOF
7910 cat >>$CONFIG_STATUS <<\_ACEOF
7913 # CONFIG_COMMANDS section.
7915 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
7916 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
7917 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
7918 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
7919 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7920 X"$ac_dest" : 'X\(//\)[^/]' \| \
7921 X"$ac_dest" : 'X\(//\)$' \| \
7922 X"$ac_dest" : 'X\(/\)' \| \
7923 . : '\(.\)' 2>/dev/null ||
7924 echo X"$ac_dest" |
7925 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
7926 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
7927 /^X\(\/\/\)$/{ s//\1/; q; }
7928 /^X\(\/\).*/{ s//\1/; q; }
7929 s/.*/./; q'`
7930 { if $as_mkdir_p; then
7931 mkdir -p "$ac_dir"
7932 else
7933 as_dir="$ac_dir"
7934 as_dirs=
7935 while test ! -d "$as_dir"; do
7936 as_dirs="$as_dir $as_dirs"
7937 as_dir=`(dirname "$as_dir") 2>/dev/null ||
7938 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7939 X"$as_dir" : 'X\(//\)[^/]' \| \
7940 X"$as_dir" : 'X\(//\)$' \| \
7941 X"$as_dir" : 'X\(/\)' \| \
7942 . : '\(.\)' 2>/dev/null ||
7943 echo X"$as_dir" |
7944 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
7945 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
7946 /^X\(\/\/\)$/{ s//\1/; q; }
7947 /^X\(\/\).*/{ s//\1/; q; }
7948 s/.*/./; q'`
7949 done
7950 test ! -n "$as_dirs" || mkdir $as_dirs
7951 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
7952 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
7953 { (exit 1); exit 1; }; }; }
7955 ac_builddir=.
7957 if test "$ac_dir" != .; then
7958 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
7959 # A "../" for each directory in $ac_dir_suffix.
7960 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
7961 else
7962 ac_dir_suffix= ac_top_builddir=
7965 case $srcdir in
7966 .) # No --srcdir option. We are building in place.
7967 ac_srcdir=.
7968 if test -z "$ac_top_builddir"; then
7969 ac_top_srcdir=.
7970 else
7971 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
7972 fi ;;
7973 [\\/]* | ?:[\\/]* ) # Absolute path.
7974 ac_srcdir=$srcdir$ac_dir_suffix;
7975 ac_top_srcdir=$srcdir ;;
7976 *) # Relative path.
7977 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
7978 ac_top_srcdir=$ac_top_builddir$srcdir ;;
7979 esac
7981 # Do not use `cd foo && pwd` to compute absolute paths, because
7982 # the directories may not exist.
7983 case `pwd` in
7984 .) ac_abs_builddir="$ac_dir";;
7986 case "$ac_dir" in
7987 .) ac_abs_builddir=`pwd`;;
7988 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
7989 *) ac_abs_builddir=`pwd`/"$ac_dir";;
7990 esac;;
7991 esac
7992 case $ac_abs_builddir in
7993 .) ac_abs_top_builddir=${ac_top_builddir}.;;
7995 case ${ac_top_builddir}. in
7996 .) ac_abs_top_builddir=$ac_abs_builddir;;
7997 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
7998 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
7999 esac;;
8000 esac
8001 case $ac_abs_builddir in
8002 .) ac_abs_srcdir=$ac_srcdir;;
8004 case $ac_srcdir in
8005 .) ac_abs_srcdir=$ac_abs_builddir;;
8006 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8007 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
8008 esac;;
8009 esac
8010 case $ac_abs_builddir in
8011 .) ac_abs_top_srcdir=$ac_top_srcdir;;
8013 case $ac_top_srcdir in
8014 .) ac_abs_top_srcdir=$ac_abs_builddir;;
8015 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8016 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
8017 esac;;
8018 esac
8021 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
8022 echo "$as_me: executing $ac_dest commands" >&6;}
8023 case $ac_dest in
8024 default ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
8025 if test -n "$CONFIG_FILES"; then
8026 if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then
8027 # FIXME: We shouldn't need to set ac_file
8028 ac_file=Makefile
8029 LD="${ORIGINAL_LD_FOR_MULTILIBS}"
8030 . ${libiberty_topdir}/config-ml.in
8032 fi ;;
8033 esac
8034 done
8035 _ACEOF
8037 cat >>$CONFIG_STATUS <<\_ACEOF
8039 { (exit 0); exit 0; }
8040 _ACEOF
8041 chmod +x $CONFIG_STATUS
8042 ac_clean_files=$ac_clean_files_save
8045 # configure is writing to config.log, and then calls config.status.
8046 # config.status does its own redirection, appending to config.log.
8047 # Unfortunately, on DOS this fails, as config.log is still kept open
8048 # by configure, so config.status won't be able to write to it; its
8049 # output is simply discarded. So we exec the FD to /dev/null,
8050 # effectively closing config.log, so it can be properly (re)opened and
8051 # appended to by config.status. When coming back to configure, we
8052 # need to make the FD available again.
8053 if test "$no_create" != yes; then
8054 ac_cs_success=:
8055 ac_config_status_args=
8056 test "$silent" = yes &&
8057 ac_config_status_args="$ac_config_status_args --quiet"
8058 exec 5>/dev/null
8059 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
8060 exec 5>>config.log
8061 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
8062 # would make configure fail if this is the last instruction.
8063 $ac_cs_success || { (exit 1); exit 1; }