merge from gcc
[deliverable/binutils-gdb.git] / libiberty / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.58.
4 #
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 ## --------------------- ##
11
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
21 fi
22 DUALCASE=1; export DUALCASE # for MKS sh
23
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
29 fi
30
31
32 # Work around bugs in pre-3.0 UWIN ksh.
33 $as_unset ENV MAIL MAILPATH
34 PS1='$ '
35 PS2='> '
36 PS4='+ '
37
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
43 do
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
48 fi
49 done
50
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
56 fi
57
58 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59 as_basename=basename
60 else
61 as_basename=false
62 fi
63
64
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'`
76
77
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
85
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=:
95 fi
96 rm -f conf$$.sh
97 fi
98
99
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
111 do
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
116
117 ;;
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
123 fi
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; }; }
127 fi
128 case $CONFIG_SHELL in
129 '')
130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132 do
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
137 /*)
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
153 ;;
154 esac
155
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 '
166 N
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; }; }
177
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
184 }
185
186
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
193
194 if expr a : '\(a\)' >/dev/null 2>&1; then
195 as_expr=expr
196 else
197 as_expr=false
198 fi
199
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'
210 fi
211 elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213 else
214 as_ln_s='cp -p'
215 fi
216 rm -f conf$$ conf$$.exe conf$$.file
217
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
223 fi
224
225 as_executable_p="test -f"
226
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'"
229
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'"
232
233
234 # IFS
235 # We need space, tab and new line, in precisely that order.
236 as_nl='
237 '
238 IFS=" $as_nl"
239
240 # CDPATH.
241 $as_unset CDPATH
242
243
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`
248
249 exec 6>&1
250
251 #
252 # Initializations.
253 #
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}
261
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}
266
267 # Identity of this package.
268 PACKAGE_NAME=
269 PACKAGE_TARNAME=
270 PACKAGE_VERSION=
271 PACKAGE_STRING=
272 PACKAGE_BUGREPORT=
273
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"
311
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'
314
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
334
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'
352
353 ac_prev=
354 for ac_option
355 do
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
361 fi
362
363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
364
365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
367 case $ac_option in
368
369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
372 bindir=$ac_optarg ;;
373
374 -build | --build | --buil | --bui | --bu)
375 ac_prev=build_alias ;;
376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
377 build_alias=$ac_optarg ;;
378
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 ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
388
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 ;;
394
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" ;;
403
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'" ;;
416
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 ;;
425
426 -gas | --gas | --ga | --g)
427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
429
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 ;;
436
437 -host | --host | --hos | --ho)
438 ac_prev=host_alias ;;
439 -host=* | --host=* | --hos=* | --ho=*)
440 host_alias=$ac_optarg ;;
441
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 ;;
448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
452 infodir=$ac_optarg ;;
453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
457 libdir=$ac_optarg ;;
458
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 ;;
465
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 ;;
474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
478 mandir=$ac_optarg ;;
479
480 -nfp | --nfp | --nf)
481 # Obsolete; use --without-fp.
482 with_fp=no ;;
483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
485 | --no-cr | --no-c | -n)
486 no_create=yes ;;
487
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 ;;
491
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 ;;
500
501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
504 prefix=$ac_optarg ;;
505
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 ;;
512
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 ;;
519
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 ;;
536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
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 ;;
546
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 ;;
557
558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
561 site=$ac_optarg ;;
562
563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
566 srcdir=$ac_optarg ;;
567
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 ;;
574
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 ;;
579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
585
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'" ;;
598
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" ;;
607
608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
611
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 ;;
618
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 ;;
625
626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627 Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
629 ;;
630
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 ;;
640
641 *)
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}
647 ;;
648
649 esac
650 done
651
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; }; }
656 fi
657
658 # Be sure to have absolute paths.
659 for ac_var in exec_prefix prefix
660 do
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
668
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
672 do
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
680
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
687
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
696 fi
697 fi
698
699 ac_tool_prefix=
700 test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702 test "$silent" = yes && exec 6>/dev/null
703
704
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=..
724 fi
725 else
726 ac_srcdir_defaulted=no
727 fi
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; }; }
735 fi
736 fi
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
773
774 #
775 # Report the --help message.
776 #
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.
782
783 Usage: $0 [OPTION]... [VAR=VALUE]...
784
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.
787
788 Defaults for the options are specified in brackets.
789
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 \`..']
800
801 _ACEOF
802
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]
809
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'.
814
815 For better control, use the options below.
816
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
831
832 cat <<\_ACEOF
833
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
838 fi
839
840 if test -n "$ac_init_help"; then
841
842 cat <<\_ACEOF
843
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
851
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
859
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
868
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.
871
872 _ACEOF
873 fi
874
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=.
881
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=
888 fi
889
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
905 case "$ac_dir" in
906 .) ac_abs_builddir=$ac_builddir;;
907 *)
908 case $ac_builddir in
909 .) ac_abs_builddir="$ac_dir";;
910 [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;;
911 *) ac_abs_builddir="$ac_dir"/$ac_builddir;;
912 esac;;
913 esac
914 case "$ac_dir" in
915 .) ac_abs_top_builddir=${ac_top_builddir}.;;
916 *)
917 case ${ac_top_builddir}. in
918 .) ac_abs_top_builddir="$ac_dir";;
919 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
920 *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;;
921 esac;;
922 esac
923 case "$ac_dir" in
924 .) ac_abs_srcdir=$ac_srcdir;;
925 *)
926 case $ac_srcdir in
927 .) ac_abs_srcdir="$ac_dir";;
928 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
929 *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;;
930 esac;;
931 esac
932 case "$ac_dir" in
933 .) ac_abs_top_srcdir=$ac_top_srcdir;;
934 *)
935 case $ac_top_srcdir in
936 .) ac_abs_top_srcdir="$ac_dir";;
937 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
938 *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;;
939 esac;;
940 esac
941
942 cd $ac_dir
943 # Check for guested configure; otherwise get Cygnus style configure.
944 if test -f $ac_srcdir/configure.gnu; then
945 echo
946 $SHELL $ac_srcdir/configure.gnu --help=recursive
947 elif test -f $ac_srcdir/configure; then
948 echo
949 $SHELL $ac_srcdir/configure --help=recursive
950 elif test -f $ac_srcdir/configure.ac ||
951 test -f $ac_srcdir/configure.in; then
952 echo
953 $ac_configure --help
954 else
955 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
956 fi
957 cd $ac_popdir
958 done
959 fi
960
961 test -n "$ac_init_help" && exit 0
962 if $ac_init_version; then
963 cat <<\_ACEOF
964
965 Copyright (C) 2003 Free Software Foundation, Inc.
966 This configure script is free software; the Free Software Foundation
967 gives unlimited permission to copy, distribute and modify it.
968 _ACEOF
969 exit 0
970 fi
971 exec 5>config.log
972 cat >&5 <<_ACEOF
973 This file contains any messages produced by compilers while
974 running configure, to aid debugging if configure makes a mistake.
975
976 It was created by $as_me, which was
977 generated by GNU Autoconf 2.58. Invocation command line was
978
979 $ $0 $@
980
981 _ACEOF
982 {
983 cat <<_ASUNAME
984 ## --------- ##
985 ## Platform. ##
986 ## --------- ##
987
988 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
989 uname -m = `(uname -m) 2>/dev/null || echo unknown`
990 uname -r = `(uname -r) 2>/dev/null || echo unknown`
991 uname -s = `(uname -s) 2>/dev/null || echo unknown`
992 uname -v = `(uname -v) 2>/dev/null || echo unknown`
993
994 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
995 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
996
997 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
998 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
999 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1000 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1001 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1002 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1003 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1004
1005 _ASUNAME
1006
1007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1008 for as_dir in $PATH
1009 do
1010 IFS=$as_save_IFS
1011 test -z "$as_dir" && as_dir=.
1012 echo "PATH: $as_dir"
1013 done
1014
1015 } >&5
1016
1017 cat >&5 <<_ACEOF
1018
1019
1020 ## ----------- ##
1021 ## Core tests. ##
1022 ## ----------- ##
1023
1024 _ACEOF
1025
1026
1027 # Keep a trace of the command line.
1028 # Strip out --no-create and --no-recursion so they do not pile up.
1029 # Strip out --silent because we don't want to record it for future runs.
1030 # Also quote any args containing shell meta-characters.
1031 # Make two passes to allow for proper duplicate-argument suppression.
1032 ac_configure_args=
1033 ac_configure_args0=
1034 ac_configure_args1=
1035 ac_sep=
1036 ac_must_keep_next=false
1037 for ac_pass in 1 2
1038 do
1039 for ac_arg
1040 do
1041 case $ac_arg in
1042 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1043 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1044 | -silent | --silent | --silen | --sile | --sil)
1045 continue ;;
1046 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1047 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1048 esac
1049 case $ac_pass in
1050 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1051 2)
1052 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1053 if test $ac_must_keep_next = true; then
1054 ac_must_keep_next=false # Got value, back to normal.
1055 else
1056 case $ac_arg in
1057 *=* | --config-cache | -C | -disable-* | --disable-* \
1058 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1059 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1060 | -with-* | --with-* | -without-* | --without-* | --x)
1061 case "$ac_configure_args0 " in
1062 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1063 esac
1064 ;;
1065 -* ) ac_must_keep_next=true ;;
1066 esac
1067 fi
1068 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1069 # Get rid of the leading space.
1070 ac_sep=" "
1071 ;;
1072 esac
1073 done
1074 done
1075 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1076 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1077
1078 # When interrupted or exit'd, cleanup temporary files, and complete
1079 # config.log. We remove comments because anyway the quotes in there
1080 # would cause problems or look ugly.
1081 # WARNING: Be sure not to use single quotes in there, as some shells,
1082 # such as our DU 5.0 friend, will then `close' the trap.
1083 trap 'exit_status=$?
1084 # Save into config.log some information that might help in debugging.
1085 {
1086 echo
1087
1088 cat <<\_ASBOX
1089 ## ---------------- ##
1090 ## Cache variables. ##
1091 ## ---------------- ##
1092 _ASBOX
1093 echo
1094 # The following way of writing the cache mishandles newlines in values,
1095 {
1096 (set) 2>&1 |
1097 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1098 *ac_space=\ *)
1099 sed -n \
1100 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1101 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1102 ;;
1103 *)
1104 sed -n \
1105 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1106 ;;
1107 esac;
1108 }
1109 echo
1110
1111 cat <<\_ASBOX
1112 ## ----------------- ##
1113 ## Output variables. ##
1114 ## ----------------- ##
1115 _ASBOX
1116 echo
1117 for ac_var in $ac_subst_vars
1118 do
1119 eval ac_val=$`echo $ac_var`
1120 echo "$ac_var='"'"'$ac_val'"'"'"
1121 done | sort
1122 echo
1123
1124 if test -n "$ac_subst_files"; then
1125 cat <<\_ASBOX
1126 ## ------------- ##
1127 ## Output files. ##
1128 ## ------------- ##
1129 _ASBOX
1130 echo
1131 for ac_var in $ac_subst_files
1132 do
1133 eval ac_val=$`echo $ac_var`
1134 echo "$ac_var='"'"'$ac_val'"'"'"
1135 done | sort
1136 echo
1137 fi
1138
1139 if test -s confdefs.h; then
1140 cat <<\_ASBOX
1141 ## ----------- ##
1142 ## confdefs.h. ##
1143 ## ----------- ##
1144 _ASBOX
1145 echo
1146 sed "/^$/d" confdefs.h | sort
1147 echo
1148 fi
1149 test "$ac_signal" != 0 &&
1150 echo "$as_me: caught signal $ac_signal"
1151 echo "$as_me: exit $exit_status"
1152 } >&5
1153 rm -f core *.core &&
1154 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1155 exit $exit_status
1156 ' 0
1157 for ac_signal in 1 2 13 15; do
1158 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1159 done
1160 ac_signal=0
1161
1162 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1163 rm -rf conftest* confdefs.h
1164 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1165 echo >confdefs.h
1166
1167 # Predefined preprocessor variables.
1168
1169 cat >>confdefs.h <<_ACEOF
1170 #define PACKAGE_NAME "$PACKAGE_NAME"
1171 _ACEOF
1172
1173
1174 cat >>confdefs.h <<_ACEOF
1175 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1176 _ACEOF
1177
1178
1179 cat >>confdefs.h <<_ACEOF
1180 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1181 _ACEOF
1182
1183
1184 cat >>confdefs.h <<_ACEOF
1185 #define PACKAGE_STRING "$PACKAGE_STRING"
1186 _ACEOF
1187
1188
1189 cat >>confdefs.h <<_ACEOF
1190 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1191 _ACEOF
1192
1193
1194 # Let the site file select an alternate cache file if it wants to.
1195 # Prefer explicitly selected file to automatically selected ones.
1196 if test -z "$CONFIG_SITE"; then
1197 if test "x$prefix" != xNONE; then
1198 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1199 else
1200 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1201 fi
1202 fi
1203 for ac_site_file in $CONFIG_SITE; do
1204 if test -r "$ac_site_file"; then
1205 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1206 echo "$as_me: loading site script $ac_site_file" >&6;}
1207 sed 's/^/| /' "$ac_site_file" >&5
1208 . "$ac_site_file"
1209 fi
1210 done
1211
1212 if test -r "$cache_file"; then
1213 # Some versions of bash will fail to source /dev/null (special
1214 # files actually), so we avoid doing that.
1215 if test -f "$cache_file"; then
1216 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1217 echo "$as_me: loading cache $cache_file" >&6;}
1218 case $cache_file in
1219 [\\/]* | ?:[\\/]* ) . $cache_file;;
1220 *) . ./$cache_file;;
1221 esac
1222 fi
1223 else
1224 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1225 echo "$as_me: creating cache $cache_file" >&6;}
1226 >$cache_file
1227 fi
1228
1229 # Check that the precious variables saved in the cache have kept the same
1230 # value.
1231 ac_cache_corrupted=false
1232 for ac_var in `(set) 2>&1 |
1233 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1234 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1235 eval ac_new_set=\$ac_env_${ac_var}_set
1236 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1237 eval ac_new_val="\$ac_env_${ac_var}_value"
1238 case $ac_old_set,$ac_new_set in
1239 set,)
1240 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1241 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1242 ac_cache_corrupted=: ;;
1243 ,set)
1244 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1245 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1246 ac_cache_corrupted=: ;;
1247 ,);;
1248 *)
1249 if test "x$ac_old_val" != "x$ac_new_val"; then
1250 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1251 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1252 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1253 echo "$as_me: former value: $ac_old_val" >&2;}
1254 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1255 echo "$as_me: current value: $ac_new_val" >&2;}
1256 ac_cache_corrupted=:
1257 fi;;
1258 esac
1259 # Pass precious variables to config.status.
1260 if test "$ac_new_set" = set; then
1261 case $ac_new_val in
1262 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1263 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1264 *) ac_arg=$ac_var=$ac_new_val ;;
1265 esac
1266 case " $ac_configure_args " in
1267 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1268 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1269 esac
1270 fi
1271 done
1272 if $ac_cache_corrupted; then
1273 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1274 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1275 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1276 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1277 { (exit 1); exit 1; }; }
1278 fi
1279
1280 ac_ext=c
1281 ac_cpp='$CPP $CPPFLAGS'
1282 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1283 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1284 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305 # This works around the fact that libtool configuration may change LD
1306 # for this particular configuration, but some shells, instead of
1307 # keeping the changes in LD private, export them just because LD is
1308 # exported. We don't use libtool yet, but some day we might, so...
1309 ORIGINAL_LD_FOR_MULTILIBS=$LD
1310
1311
1312 # Check whether --with-target-subdir or --without-target-subdir was given.
1313 if test "${with_target_subdir+set}" = set; then
1314 withval="$with_target_subdir"
1315
1316 fi;
1317
1318 # Check whether --with-build-subdir or --without-build-subdir was given.
1319 if test "${with_build_subdir+set}" = set; then
1320 withval="$with_build_subdir"
1321
1322 fi;
1323
1324 # Check whether --with-cross-host or --without-cross-host was given.
1325 if test "${with_cross_host+set}" = set; then
1326 withval="$with_cross_host"
1327
1328 fi;
1329
1330 # Check whether --with-newlib or --without-newlib was given.
1331 if test "${with_newlib+set}" = set; then
1332 withval="$with_newlib"
1333
1334 fi;
1335
1336 if test "${srcdir}" = "."; then
1337 if test -n "${with_build_subdir}"; then
1338 libiberty_topdir="${srcdir}/../.."
1339 with_target_subdir=
1340 elif test -z "${with_target_subdir}"; then
1341 libiberty_topdir="${srcdir}/.."
1342 else
1343 if test "${with_target_subdir}" != "."; then
1344 libiberty_topdir="${srcdir}/${with_multisrctop}../.."
1345 else
1346 libiberty_topdir="${srcdir}/${with_multisrctop}.."
1347 fi
1348 fi
1349 else
1350 libiberty_topdir="${srcdir}/.."
1351 fi
1352
1353 ac_aux_dir=
1354 for ac_dir in $libiberty_topdir $srcdir/$libiberty_topdir; do
1355 if test -f $ac_dir/install-sh; then
1356 ac_aux_dir=$ac_dir
1357 ac_install_sh="$ac_aux_dir/install-sh -c"
1358 break
1359 elif 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/shtool; then
1364 ac_aux_dir=$ac_dir
1365 ac_install_sh="$ac_aux_dir/shtool install -c"
1366 break
1367 fi
1368 done
1369 if test -z "$ac_aux_dir"; then
1370 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" >&5
1371 echo "$as_me: error: cannot find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" >&2;}
1372 { (exit 1); exit 1; }; }
1373 fi
1374 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1375 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1376 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1377
1378
1379
1380 echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
1381 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
1382 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1383 if test "${enable_maintainer_mode+set}" = set; then
1384 enableval="$enable_maintainer_mode"
1385 maintainer_mode=$enableval
1386 else
1387 maintainer_mode=no
1388 fi;
1389
1390 echo "$as_me:$LINENO: result: $maintainer_mode" >&5
1391 echo "${ECHO_T}$maintainer_mode" >&6
1392
1393 if test "$maintainer_mode" = "yes"; then
1394 MAINT=''
1395 NOTMAINT='#'
1396 else
1397 MAINT='#'
1398 NOTMAINT=''
1399 fi
1400
1401 # Do we have a single-tree copy of texinfo? Even if we do, we can't
1402 # rely on it - libiberty is built before texinfo.
1403 # Extract the first word of "makeinfo", so it can be a program name with args.
1404 set dummy makeinfo; ac_word=$2
1405 echo "$as_me:$LINENO: checking for $ac_word" >&5
1406 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1407 if test "${ac_cv_prog_MAKEINFO+set}" = set; then
1408 echo $ECHO_N "(cached) $ECHO_C" >&6
1409 else
1410 if test -n "$MAKEINFO"; then
1411 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
1412 else
1413 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1414 for as_dir in $PATH
1415 do
1416 IFS=$as_save_IFS
1417 test -z "$as_dir" && as_dir=.
1418 for ac_exec_ext in '' $ac_executable_extensions; do
1419 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1420 ac_cv_prog_MAKEINFO="makeinfo"
1421 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1422 break 2
1423 fi
1424 done
1425 done
1426
1427 fi
1428 fi
1429 MAKEINFO=$ac_cv_prog_MAKEINFO
1430 if test -n "$MAKEINFO"; then
1431 echo "$as_me:$LINENO: result: $MAKEINFO" >&5
1432 echo "${ECHO_T}$MAKEINFO" >&6
1433 else
1434 echo "$as_me:$LINENO: result: no" >&5
1435 echo "${ECHO_T}no" >&6
1436 fi
1437
1438 if test "x$MAKEINFO" = "x"; then
1439 MAKEINFO="@echo makeinfo missing; true"
1440 BUILD_INFO=
1441 else
1442 BUILD_INFO=info
1443 case "$MAKEINFO" in
1444 */missing\ makeinfo*)
1445 BUILD_INFO=
1446 { echo "$as_me:$LINENO: WARNING:
1447 *** Makeinfo is missing. Info documentation will not be built." >&5
1448 echo "$as_me: WARNING:
1449 *** Makeinfo is missing. Info documentation will not be built." >&2;}
1450 ;;
1451 *)
1452 case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in
1453 x*\ [1-3].* )
1454 MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true"
1455 BUILD_INFO=
1456 { echo "$as_me:$LINENO: WARNING:
1457 *** Makeinfo is too old. Info documentation will not be built." >&5
1458 echo "$as_me: WARNING:
1459 *** Makeinfo is too old. Info documentation will not be built." >&2;}
1460 ;;
1461 esac
1462 ;;
1463 esac
1464 fi
1465
1466
1467
1468 # Extract the first word of "perl", so it can be a program name with args.
1469 set dummy perl; ac_word=$2
1470 echo "$as_me:$LINENO: checking for $ac_word" >&5
1471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1472 if test "${ac_cv_prog_PERL+set}" = set; then
1473 echo $ECHO_N "(cached) $ECHO_C" >&6
1474 else
1475 if test -n "$PERL"; then
1476 ac_cv_prog_PERL="$PERL" # Let the user override the test.
1477 else
1478 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1479 for as_dir in $PATH
1480 do
1481 IFS=$as_save_IFS
1482 test -z "$as_dir" && as_dir=.
1483 for ac_exec_ext in '' $ac_executable_extensions; do
1484 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1485 ac_cv_prog_PERL="perl"
1486 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1487 break 2
1488 fi
1489 done
1490 done
1491
1492 fi
1493 fi
1494 PERL=$ac_cv_prog_PERL
1495 if test -n "$PERL"; then
1496 echo "$as_me:$LINENO: result: $PERL" >&5
1497 echo "${ECHO_T}$PERL" >&6
1498 else
1499 echo "$as_me:$LINENO: result: no" >&5
1500 echo "${ECHO_T}no" >&6
1501 fi
1502
1503 if test x"$PERL" = x""; then
1504 HAVE_PERL='#'
1505 else
1506 HAVE_PERL=''
1507 fi
1508
1509
1510 # Make sure we can run config.sub.
1511 $ac_config_sub sun4 >/dev/null 2>&1 ||
1512 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1513 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1514 { (exit 1); exit 1; }; }
1515
1516 echo "$as_me:$LINENO: checking build system type" >&5
1517 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1518 if test "${ac_cv_build+set}" = set; then
1519 echo $ECHO_N "(cached) $ECHO_C" >&6
1520 else
1521 ac_cv_build_alias=$build_alias
1522 test -z "$ac_cv_build_alias" &&
1523 ac_cv_build_alias=`$ac_config_guess`
1524 test -z "$ac_cv_build_alias" &&
1525 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1526 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1527 { (exit 1); exit 1; }; }
1528 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1529 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1530 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1531 { (exit 1); exit 1; }; }
1532
1533 fi
1534 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1535 echo "${ECHO_T}$ac_cv_build" >&6
1536 build=$ac_cv_build
1537 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1538 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1539 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1540
1541
1542 echo "$as_me:$LINENO: checking host system type" >&5
1543 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1544 if test "${ac_cv_host+set}" = set; then
1545 echo $ECHO_N "(cached) $ECHO_C" >&6
1546 else
1547 ac_cv_host_alias=$host_alias
1548 test -z "$ac_cv_host_alias" &&
1549 ac_cv_host_alias=$ac_cv_build_alias
1550 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1551 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1552 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1553 { (exit 1); exit 1; }; }
1554
1555 fi
1556 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1557 echo "${ECHO_T}$ac_cv_host" >&6
1558 host=$ac_cv_host
1559 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1560 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1561 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1562
1563
1564
1565
1566 if test -n "$ac_tool_prefix"; then
1567 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1568 set dummy ${ac_tool_prefix}ar; ac_word=$2
1569 echo "$as_me:$LINENO: checking for $ac_word" >&5
1570 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1571 if test "${ac_cv_prog_AR+set}" = set; then
1572 echo $ECHO_N "(cached) $ECHO_C" >&6
1573 else
1574 if test -n "$AR"; then
1575 ac_cv_prog_AR="$AR" # Let the user override the test.
1576 else
1577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1578 for as_dir in $PATH
1579 do
1580 IFS=$as_save_IFS
1581 test -z "$as_dir" && as_dir=.
1582 for ac_exec_ext in '' $ac_executable_extensions; do
1583 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1584 ac_cv_prog_AR="${ac_tool_prefix}ar"
1585 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1586 break 2
1587 fi
1588 done
1589 done
1590
1591 fi
1592 fi
1593 AR=$ac_cv_prog_AR
1594 if test -n "$AR"; then
1595 echo "$as_me:$LINENO: result: $AR" >&5
1596 echo "${ECHO_T}$AR" >&6
1597 else
1598 echo "$as_me:$LINENO: result: no" >&5
1599 echo "${ECHO_T}no" >&6
1600 fi
1601
1602 fi
1603 if test -z "$ac_cv_prog_AR"; then
1604 ac_ct_AR=$AR
1605 # Extract the first word of "ar", so it can be a program name with args.
1606 set dummy ar; ac_word=$2
1607 echo "$as_me:$LINENO: checking for $ac_word" >&5
1608 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1609 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
1610 echo $ECHO_N "(cached) $ECHO_C" >&6
1611 else
1612 if test -n "$ac_ct_AR"; then
1613 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
1614 else
1615 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1616 for as_dir in $PATH
1617 do
1618 IFS=$as_save_IFS
1619 test -z "$as_dir" && as_dir=.
1620 for ac_exec_ext in '' $ac_executable_extensions; do
1621 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1622 ac_cv_prog_ac_ct_AR="ar"
1623 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1624 break 2
1625 fi
1626 done
1627 done
1628
1629 fi
1630 fi
1631 ac_ct_AR=$ac_cv_prog_ac_ct_AR
1632 if test -n "$ac_ct_AR"; then
1633 echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
1634 echo "${ECHO_T}$ac_ct_AR" >&6
1635 else
1636 echo "$as_me:$LINENO: result: no" >&5
1637 echo "${ECHO_T}no" >&6
1638 fi
1639
1640 AR=$ac_ct_AR
1641 else
1642 AR="$ac_cv_prog_AR"
1643 fi
1644
1645 if test -n "$ac_tool_prefix"; then
1646 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1647 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1648 echo "$as_me:$LINENO: checking for $ac_word" >&5
1649 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1650 if test "${ac_cv_prog_RANLIB+set}" = set; then
1651 echo $ECHO_N "(cached) $ECHO_C" >&6
1652 else
1653 if test -n "$RANLIB"; then
1654 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1655 else
1656 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1657 for as_dir in $PATH
1658 do
1659 IFS=$as_save_IFS
1660 test -z "$as_dir" && as_dir=.
1661 for ac_exec_ext in '' $ac_executable_extensions; do
1662 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1663 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1664 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1665 break 2
1666 fi
1667 done
1668 done
1669
1670 fi
1671 fi
1672 RANLIB=$ac_cv_prog_RANLIB
1673 if test -n "$RANLIB"; then
1674 echo "$as_me:$LINENO: result: $RANLIB" >&5
1675 echo "${ECHO_T}$RANLIB" >&6
1676 else
1677 echo "$as_me:$LINENO: result: no" >&5
1678 echo "${ECHO_T}no" >&6
1679 fi
1680
1681 fi
1682 if test -z "$ac_cv_prog_RANLIB"; then
1683 ac_ct_RANLIB=$RANLIB
1684 # Extract the first word of "ranlib", so it can be a program name with args.
1685 set dummy ranlib; ac_word=$2
1686 echo "$as_me:$LINENO: checking for $ac_word" >&5
1687 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1688 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
1689 echo $ECHO_N "(cached) $ECHO_C" >&6
1690 else
1691 if test -n "$ac_ct_RANLIB"; then
1692 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
1693 else
1694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1695 for as_dir in $PATH
1696 do
1697 IFS=$as_save_IFS
1698 test -z "$as_dir" && as_dir=.
1699 for ac_exec_ext in '' $ac_executable_extensions; do
1700 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1701 ac_cv_prog_ac_ct_RANLIB="ranlib"
1702 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1703 break 2
1704 fi
1705 done
1706 done
1707
1708 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
1709 fi
1710 fi
1711 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
1712 if test -n "$ac_ct_RANLIB"; then
1713 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
1714 echo "${ECHO_T}$ac_ct_RANLIB" >&6
1715 else
1716 echo "$as_me:$LINENO: result: no" >&5
1717 echo "${ECHO_T}no" >&6
1718 fi
1719
1720 RANLIB=$ac_ct_RANLIB
1721 else
1722 RANLIB="$ac_cv_prog_RANLIB"
1723 fi
1724
1725
1726
1727 ac_ext=c
1728 ac_cpp='$CPP $CPPFLAGS'
1729 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1730 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1731 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1732 if test -n "$ac_tool_prefix"; then
1733 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1734 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1735 echo "$as_me:$LINENO: checking for $ac_word" >&5
1736 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1737 if test "${ac_cv_prog_CC+set}" = set; then
1738 echo $ECHO_N "(cached) $ECHO_C" >&6
1739 else
1740 if test -n "$CC"; then
1741 ac_cv_prog_CC="$CC" # Let the user override the test.
1742 else
1743 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1744 for as_dir in $PATH
1745 do
1746 IFS=$as_save_IFS
1747 test -z "$as_dir" && as_dir=.
1748 for ac_exec_ext in '' $ac_executable_extensions; do
1749 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1750 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1751 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1752 break 2
1753 fi
1754 done
1755 done
1756
1757 fi
1758 fi
1759 CC=$ac_cv_prog_CC
1760 if test -n "$CC"; then
1761 echo "$as_me:$LINENO: result: $CC" >&5
1762 echo "${ECHO_T}$CC" >&6
1763 else
1764 echo "$as_me:$LINENO: result: no" >&5
1765 echo "${ECHO_T}no" >&6
1766 fi
1767
1768 fi
1769 if test -z "$ac_cv_prog_CC"; then
1770 ac_ct_CC=$CC
1771 # Extract the first word of "gcc", so it can be a program name with args.
1772 set dummy gcc; ac_word=$2
1773 echo "$as_me:$LINENO: checking for $ac_word" >&5
1774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1775 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1776 echo $ECHO_N "(cached) $ECHO_C" >&6
1777 else
1778 if test -n "$ac_ct_CC"; then
1779 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1780 else
1781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1782 for as_dir in $PATH
1783 do
1784 IFS=$as_save_IFS
1785 test -z "$as_dir" && as_dir=.
1786 for ac_exec_ext in '' $ac_executable_extensions; do
1787 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1788 ac_cv_prog_ac_ct_CC="gcc"
1789 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1790 break 2
1791 fi
1792 done
1793 done
1794
1795 fi
1796 fi
1797 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1798 if test -n "$ac_ct_CC"; then
1799 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1800 echo "${ECHO_T}$ac_ct_CC" >&6
1801 else
1802 echo "$as_me:$LINENO: result: no" >&5
1803 echo "${ECHO_T}no" >&6
1804 fi
1805
1806 CC=$ac_ct_CC
1807 else
1808 CC="$ac_cv_prog_CC"
1809 fi
1810
1811 if test -z "$CC"; then
1812 if test -n "$ac_tool_prefix"; then
1813 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1814 set dummy ${ac_tool_prefix}cc; ac_word=$2
1815 echo "$as_me:$LINENO: checking for $ac_word" >&5
1816 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1817 if test "${ac_cv_prog_CC+set}" = set; then
1818 echo $ECHO_N "(cached) $ECHO_C" >&6
1819 else
1820 if test -n "$CC"; then
1821 ac_cv_prog_CC="$CC" # Let the user override the test.
1822 else
1823 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1824 for as_dir in $PATH
1825 do
1826 IFS=$as_save_IFS
1827 test -z "$as_dir" && as_dir=.
1828 for ac_exec_ext in '' $ac_executable_extensions; do
1829 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1830 ac_cv_prog_CC="${ac_tool_prefix}cc"
1831 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1832 break 2
1833 fi
1834 done
1835 done
1836
1837 fi
1838 fi
1839 CC=$ac_cv_prog_CC
1840 if test -n "$CC"; then
1841 echo "$as_me:$LINENO: result: $CC" >&5
1842 echo "${ECHO_T}$CC" >&6
1843 else
1844 echo "$as_me:$LINENO: result: no" >&5
1845 echo "${ECHO_T}no" >&6
1846 fi
1847
1848 fi
1849 if test -z "$ac_cv_prog_CC"; then
1850 ac_ct_CC=$CC
1851 # Extract the first word of "cc", so it can be a program name with args.
1852 set dummy cc; ac_word=$2
1853 echo "$as_me:$LINENO: checking for $ac_word" >&5
1854 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1855 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1856 echo $ECHO_N "(cached) $ECHO_C" >&6
1857 else
1858 if test -n "$ac_ct_CC"; then
1859 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1860 else
1861 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1862 for as_dir in $PATH
1863 do
1864 IFS=$as_save_IFS
1865 test -z "$as_dir" && as_dir=.
1866 for ac_exec_ext in '' $ac_executable_extensions; do
1867 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1868 ac_cv_prog_ac_ct_CC="cc"
1869 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1870 break 2
1871 fi
1872 done
1873 done
1874
1875 fi
1876 fi
1877 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1878 if test -n "$ac_ct_CC"; then
1879 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1880 echo "${ECHO_T}$ac_ct_CC" >&6
1881 else
1882 echo "$as_me:$LINENO: result: no" >&5
1883 echo "${ECHO_T}no" >&6
1884 fi
1885
1886 CC=$ac_ct_CC
1887 else
1888 CC="$ac_cv_prog_CC"
1889 fi
1890
1891 fi
1892 if test -z "$CC"; then
1893 # Extract the first word of "cc", so it can be a program name with args.
1894 set dummy cc; ac_word=$2
1895 echo "$as_me:$LINENO: checking for $ac_word" >&5
1896 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1897 if test "${ac_cv_prog_CC+set}" = set; then
1898 echo $ECHO_N "(cached) $ECHO_C" >&6
1899 else
1900 if test -n "$CC"; then
1901 ac_cv_prog_CC="$CC" # Let the user override the test.
1902 else
1903 ac_prog_rejected=no
1904 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1905 for as_dir in $PATH
1906 do
1907 IFS=$as_save_IFS
1908 test -z "$as_dir" && as_dir=.
1909 for ac_exec_ext in '' $ac_executable_extensions; do
1910 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1911 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1912 ac_prog_rejected=yes
1913 continue
1914 fi
1915 ac_cv_prog_CC="cc"
1916 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1917 break 2
1918 fi
1919 done
1920 done
1921
1922 if test $ac_prog_rejected = yes; then
1923 # We found a bogon in the path, so make sure we never use it.
1924 set dummy $ac_cv_prog_CC
1925 shift
1926 if test $# != 0; then
1927 # We chose a different compiler from the bogus one.
1928 # However, it has the same basename, so the bogon will be chosen
1929 # first if we set CC to just the basename; use the full file name.
1930 shift
1931 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1932 fi
1933 fi
1934 fi
1935 fi
1936 CC=$ac_cv_prog_CC
1937 if test -n "$CC"; then
1938 echo "$as_me:$LINENO: result: $CC" >&5
1939 echo "${ECHO_T}$CC" >&6
1940 else
1941 echo "$as_me:$LINENO: result: no" >&5
1942 echo "${ECHO_T}no" >&6
1943 fi
1944
1945 fi
1946 if test -z "$CC"; then
1947 if test -n "$ac_tool_prefix"; then
1948 for ac_prog in cl
1949 do
1950 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1951 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1952 echo "$as_me:$LINENO: checking for $ac_word" >&5
1953 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1954 if test "${ac_cv_prog_CC+set}" = set; then
1955 echo $ECHO_N "(cached) $ECHO_C" >&6
1956 else
1957 if test -n "$CC"; then
1958 ac_cv_prog_CC="$CC" # Let the user override the test.
1959 else
1960 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1961 for as_dir in $PATH
1962 do
1963 IFS=$as_save_IFS
1964 test -z "$as_dir" && as_dir=.
1965 for ac_exec_ext in '' $ac_executable_extensions; do
1966 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1967 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1968 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1969 break 2
1970 fi
1971 done
1972 done
1973
1974 fi
1975 fi
1976 CC=$ac_cv_prog_CC
1977 if test -n "$CC"; then
1978 echo "$as_me:$LINENO: result: $CC" >&5
1979 echo "${ECHO_T}$CC" >&6
1980 else
1981 echo "$as_me:$LINENO: result: no" >&5
1982 echo "${ECHO_T}no" >&6
1983 fi
1984
1985 test -n "$CC" && break
1986 done
1987 fi
1988 if test -z "$CC"; then
1989 ac_ct_CC=$CC
1990 for ac_prog in cl
1991 do
1992 # Extract the first word of "$ac_prog", so it can be a program name with args.
1993 set dummy $ac_prog; ac_word=$2
1994 echo "$as_me:$LINENO: checking for $ac_word" >&5
1995 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1996 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1997 echo $ECHO_N "(cached) $ECHO_C" >&6
1998 else
1999 if test -n "$ac_ct_CC"; then
2000 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2001 else
2002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2003 for as_dir in $PATH
2004 do
2005 IFS=$as_save_IFS
2006 test -z "$as_dir" && as_dir=.
2007 for ac_exec_ext in '' $ac_executable_extensions; do
2008 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2009 ac_cv_prog_ac_ct_CC="$ac_prog"
2010 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2011 break 2
2012 fi
2013 done
2014 done
2015
2016 fi
2017 fi
2018 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2019 if test -n "$ac_ct_CC"; then
2020 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2021 echo "${ECHO_T}$ac_ct_CC" >&6
2022 else
2023 echo "$as_me:$LINENO: result: no" >&5
2024 echo "${ECHO_T}no" >&6
2025 fi
2026
2027 test -n "$ac_ct_CC" && break
2028 done
2029
2030 CC=$ac_ct_CC
2031 fi
2032
2033 fi
2034
2035
2036 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2037 See \`config.log' for more details." >&5
2038 echo "$as_me: error: no acceptable C compiler found in \$PATH
2039 See \`config.log' for more details." >&2;}
2040 { (exit 1); exit 1; }; }
2041
2042 # Provide some information about the compiler.
2043 echo "$as_me:$LINENO:" \
2044 "checking for C compiler version" >&5
2045 ac_compiler=`set X $ac_compile; echo $2`
2046 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2047 (eval $ac_compiler --version </dev/null >&5) 2>&5
2048 ac_status=$?
2049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2050 (exit $ac_status); }
2051 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2052 (eval $ac_compiler -v </dev/null >&5) 2>&5
2053 ac_status=$?
2054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2055 (exit $ac_status); }
2056 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2057 (eval $ac_compiler -V </dev/null >&5) 2>&5
2058 ac_status=$?
2059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2060 (exit $ac_status); }
2061
2062 cat >conftest.$ac_ext <<_ACEOF
2063 /* confdefs.h. */
2064 _ACEOF
2065 cat confdefs.h >>conftest.$ac_ext
2066 cat >>conftest.$ac_ext <<_ACEOF
2067 /* end confdefs.h. */
2068
2069 int
2070 main ()
2071 {
2072
2073 ;
2074 return 0;
2075 }
2076 _ACEOF
2077 # FIXME: Cleanup?
2078 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2079 (eval $ac_link) 2>&5
2080 ac_status=$?
2081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2082 (exit $ac_status); }; then
2083 gcc_no_link=no
2084 else
2085 gcc_no_link=yes
2086 fi
2087
2088 if test x$gcc_no_link = xyes; then
2089 # Setting cross_compile will disable run tests; it will
2090 # also disable AC_CHECK_FILE but that's generally
2091 # correct if we can't link.
2092 cross_compiling=yes
2093 EXEEXT=
2094 else
2095 cat >conftest.$ac_ext <<_ACEOF
2096 /* confdefs.h. */
2097 _ACEOF
2098 cat confdefs.h >>conftest.$ac_ext
2099 cat >>conftest.$ac_ext <<_ACEOF
2100 /* end confdefs.h. */
2101
2102 int
2103 main ()
2104 {
2105
2106 ;
2107 return 0;
2108 }
2109 _ACEOF
2110 ac_clean_files_save=$ac_clean_files
2111 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2112 # Try to create an executable without -o first, disregard a.out.
2113 # It will help us diagnose broken compilers, and finding out an intuition
2114 # of exeext.
2115 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2116 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2117 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2118 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2119 (eval $ac_link_default) 2>&5
2120 ac_status=$?
2121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2122 (exit $ac_status); }; then
2123 # Find the output, starting from the most likely. This scheme is
2124 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2125 # resort.
2126
2127 # Be careful to initialize this variable, since it used to be cached.
2128 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2129 ac_cv_exeext=
2130 # b.out is created by i960 compilers.
2131 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2132 do
2133 test -f "$ac_file" || continue
2134 case $ac_file in
2135 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2136 ;;
2137 conftest.$ac_ext )
2138 # This is the source file.
2139 ;;
2140 [ab].out )
2141 # We found the default executable, but exeext='' is most
2142 # certainly right.
2143 break;;
2144 *.* )
2145 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2146 # FIXME: I believe we export ac_cv_exeext for Libtool,
2147 # but it would be cool to find out if it's true. Does anybody
2148 # maintain Libtool? --akim.
2149 export ac_cv_exeext
2150 break;;
2151 * )
2152 break;;
2153 esac
2154 done
2155 else
2156 echo "$as_me: failed program was:" >&5
2157 sed 's/^/| /' conftest.$ac_ext >&5
2158
2159 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2160 See \`config.log' for more details." >&5
2161 echo "$as_me: error: C compiler cannot create executables
2162 See \`config.log' for more details." >&2;}
2163 { (exit 77); exit 77; }; }
2164 fi
2165
2166 ac_exeext=$ac_cv_exeext
2167 echo "$as_me:$LINENO: result: $ac_file" >&5
2168 echo "${ECHO_T}$ac_file" >&6
2169
2170 # Check the compiler produces executables we can run. If not, either
2171 # the compiler is broken, or we cross compile.
2172 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2173 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2174 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2175 # If not cross compiling, check that we can run a simple program.
2176 if test "$cross_compiling" != yes; then
2177 if { ac_try='./$ac_file'
2178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2179 (eval $ac_try) 2>&5
2180 ac_status=$?
2181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2182 (exit $ac_status); }; }; then
2183 cross_compiling=no
2184 else
2185 if test "$cross_compiling" = maybe; then
2186 cross_compiling=yes
2187 else
2188 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2189 If you meant to cross compile, use \`--host'.
2190 See \`config.log' for more details." >&5
2191 echo "$as_me: error: cannot run C compiled programs.
2192 If you meant to cross compile, use \`--host'.
2193 See \`config.log' for more details." >&2;}
2194 { (exit 1); exit 1; }; }
2195 fi
2196 fi
2197 fi
2198 echo "$as_me:$LINENO: result: yes" >&5
2199 echo "${ECHO_T}yes" >&6
2200
2201 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2202 ac_clean_files=$ac_clean_files_save
2203 # Check the compiler produces executables we can run. If not, either
2204 # the compiler is broken, or we cross compile.
2205 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2206 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2207 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2208 echo "${ECHO_T}$cross_compiling" >&6
2209
2210 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2211 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2212 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2213 (eval $ac_link) 2>&5
2214 ac_status=$?
2215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2216 (exit $ac_status); }; then
2217 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2218 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2219 # work properly (i.e., refer to `conftest.exe'), while it won't with
2220 # `rm'.
2221 for ac_file in conftest.exe conftest conftest.*; do
2222 test -f "$ac_file" || continue
2223 case $ac_file in
2224 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2225 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2226 export ac_cv_exeext
2227 break;;
2228 * ) break;;
2229 esac
2230 done
2231 else
2232 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2233 See \`config.log' for more details." >&5
2234 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2235 See \`config.log' for more details." >&2;}
2236 { (exit 1); exit 1; }; }
2237 fi
2238
2239 rm -f conftest$ac_cv_exeext
2240 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2241 echo "${ECHO_T}$ac_cv_exeext" >&6
2242
2243 rm -f conftest.$ac_ext
2244 EXEEXT=$ac_cv_exeext
2245 ac_exeext=$EXEEXT
2246 fi
2247 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2248 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2249 if test "${ac_cv_objext+set}" = set; then
2250 echo $ECHO_N "(cached) $ECHO_C" >&6
2251 else
2252 cat >conftest.$ac_ext <<_ACEOF
2253 /* confdefs.h. */
2254 _ACEOF
2255 cat confdefs.h >>conftest.$ac_ext
2256 cat >>conftest.$ac_ext <<_ACEOF
2257 /* end confdefs.h. */
2258
2259 int
2260 main ()
2261 {
2262
2263 ;
2264 return 0;
2265 }
2266 _ACEOF
2267 rm -f conftest.o conftest.obj
2268 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2269 (eval $ac_compile) 2>&5
2270 ac_status=$?
2271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2272 (exit $ac_status); }; then
2273 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2274 case $ac_file in
2275 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2276 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2277 break;;
2278 esac
2279 done
2280 else
2281 echo "$as_me: failed program was:" >&5
2282 sed 's/^/| /' conftest.$ac_ext >&5
2283
2284 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2285 See \`config.log' for more details." >&5
2286 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2287 See \`config.log' for more details." >&2;}
2288 { (exit 1); exit 1; }; }
2289 fi
2290
2291 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2292 fi
2293 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2294 echo "${ECHO_T}$ac_cv_objext" >&6
2295 OBJEXT=$ac_cv_objext
2296 ac_objext=$OBJEXT
2297 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2298 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2299 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2300 echo $ECHO_N "(cached) $ECHO_C" >&6
2301 else
2302 cat >conftest.$ac_ext <<_ACEOF
2303 /* confdefs.h. */
2304 _ACEOF
2305 cat confdefs.h >>conftest.$ac_ext
2306 cat >>conftest.$ac_ext <<_ACEOF
2307 /* end confdefs.h. */
2308
2309 int
2310 main ()
2311 {
2312 #ifndef __GNUC__
2313 choke me
2314 #endif
2315
2316 ;
2317 return 0;
2318 }
2319 _ACEOF
2320 rm -f conftest.$ac_objext
2321 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2322 (eval $ac_compile) 2>conftest.er1
2323 ac_status=$?
2324 grep -v '^ *+' conftest.er1 >conftest.err
2325 rm -f conftest.er1
2326 cat conftest.err >&5
2327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2328 (exit $ac_status); } &&
2329 { ac_try='test -z "$ac_c_werror_flag"
2330 || test ! -s conftest.err'
2331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2332 (eval $ac_try) 2>&5
2333 ac_status=$?
2334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2335 (exit $ac_status); }; } &&
2336 { ac_try='test -s conftest.$ac_objext'
2337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2338 (eval $ac_try) 2>&5
2339 ac_status=$?
2340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2341 (exit $ac_status); }; }; then
2342 ac_compiler_gnu=yes
2343 else
2344 echo "$as_me: failed program was:" >&5
2345 sed 's/^/| /' conftest.$ac_ext >&5
2346
2347 ac_compiler_gnu=no
2348 fi
2349 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2350 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2351
2352 fi
2353 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2354 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2355 GCC=`test $ac_compiler_gnu = yes && echo yes`
2356 ac_test_CFLAGS=${CFLAGS+set}
2357 ac_save_CFLAGS=$CFLAGS
2358 CFLAGS="-g"
2359 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2360 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2361 if test "${ac_cv_prog_cc_g+set}" = set; then
2362 echo $ECHO_N "(cached) $ECHO_C" >&6
2363 else
2364 cat >conftest.$ac_ext <<_ACEOF
2365 /* confdefs.h. */
2366 _ACEOF
2367 cat confdefs.h >>conftest.$ac_ext
2368 cat >>conftest.$ac_ext <<_ACEOF
2369 /* end confdefs.h. */
2370
2371 int
2372 main ()
2373 {
2374
2375 ;
2376 return 0;
2377 }
2378 _ACEOF
2379 rm -f conftest.$ac_objext
2380 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2381 (eval $ac_compile) 2>conftest.er1
2382 ac_status=$?
2383 grep -v '^ *+' conftest.er1 >conftest.err
2384 rm -f conftest.er1
2385 cat conftest.err >&5
2386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2387 (exit $ac_status); } &&
2388 { ac_try='test -z "$ac_c_werror_flag"
2389 || test ! -s conftest.err'
2390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2391 (eval $ac_try) 2>&5
2392 ac_status=$?
2393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2394 (exit $ac_status); }; } &&
2395 { ac_try='test -s conftest.$ac_objext'
2396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2397 (eval $ac_try) 2>&5
2398 ac_status=$?
2399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2400 (exit $ac_status); }; }; then
2401 ac_cv_prog_cc_g=yes
2402 else
2403 echo "$as_me: failed program was:" >&5
2404 sed 's/^/| /' conftest.$ac_ext >&5
2405
2406 ac_cv_prog_cc_g=no
2407 fi
2408 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2409 fi
2410 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2411 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2412 if test "$ac_test_CFLAGS" = set; then
2413 CFLAGS=$ac_save_CFLAGS
2414 elif test $ac_cv_prog_cc_g = yes; then
2415 if test "$GCC" = yes; then
2416 CFLAGS="-g -O2"
2417 else
2418 CFLAGS="-g"
2419 fi
2420 else
2421 if test "$GCC" = yes; then
2422 CFLAGS="-O2"
2423 else
2424 CFLAGS=
2425 fi
2426 fi
2427 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2428 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2429 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2430 echo $ECHO_N "(cached) $ECHO_C" >&6
2431 else
2432 ac_cv_prog_cc_stdc=no
2433 ac_save_CC=$CC
2434 cat >conftest.$ac_ext <<_ACEOF
2435 /* confdefs.h. */
2436 _ACEOF
2437 cat confdefs.h >>conftest.$ac_ext
2438 cat >>conftest.$ac_ext <<_ACEOF
2439 /* end confdefs.h. */
2440 #include <stdarg.h>
2441 #include <stdio.h>
2442 #include <sys/types.h>
2443 #include <sys/stat.h>
2444 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2445 struct buf { int x; };
2446 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2447 static char *e (p, i)
2448 char **p;
2449 int i;
2450 {
2451 return p[i];
2452 }
2453 static char *f (char * (*g) (char **, int), char **p, ...)
2454 {
2455 char *s;
2456 va_list v;
2457 va_start (v,p);
2458 s = g (p, va_arg (v,int));
2459 va_end (v);
2460 return s;
2461 }
2462
2463 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2464 function prototypes and stuff, but not '\xHH' hex character constants.
2465 These don't provoke an error unfortunately, instead are silently treated
2466 as 'x'. The following induces an error, until -std1 is added to get
2467 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2468 array size at least. It's necessary to write '\x00'==0 to get something
2469 that's true only with -std1. */
2470 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2471
2472 int test (int i, double x);
2473 struct s1 {int (*f) (int a);};
2474 struct s2 {int (*f) (double a);};
2475 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2476 int argc;
2477 char **argv;
2478 int
2479 main ()
2480 {
2481 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2482 ;
2483 return 0;
2484 }
2485 _ACEOF
2486 # Don't try gcc -ansi; that turns off useful extensions and
2487 # breaks some systems' header files.
2488 # AIX -qlanglvl=ansi
2489 # Ultrix and OSF/1 -std1
2490 # HP-UX 10.20 and later -Ae
2491 # HP-UX older versions -Aa -D_HPUX_SOURCE
2492 # SVR4 -Xc -D__EXTENSIONS__
2493 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2494 do
2495 CC="$ac_save_CC $ac_arg"
2496 rm -f conftest.$ac_objext
2497 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2498 (eval $ac_compile) 2>conftest.er1
2499 ac_status=$?
2500 grep -v '^ *+' conftest.er1 >conftest.err
2501 rm -f conftest.er1
2502 cat conftest.err >&5
2503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2504 (exit $ac_status); } &&
2505 { ac_try='test -z "$ac_c_werror_flag"
2506 || test ! -s conftest.err'
2507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2508 (eval $ac_try) 2>&5
2509 ac_status=$?
2510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2511 (exit $ac_status); }; } &&
2512 { ac_try='test -s conftest.$ac_objext'
2513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2514 (eval $ac_try) 2>&5
2515 ac_status=$?
2516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2517 (exit $ac_status); }; }; then
2518 ac_cv_prog_cc_stdc=$ac_arg
2519 break
2520 else
2521 echo "$as_me: failed program was:" >&5
2522 sed 's/^/| /' conftest.$ac_ext >&5
2523
2524 fi
2525 rm -f conftest.err conftest.$ac_objext
2526 done
2527 rm -f conftest.$ac_ext conftest.$ac_objext
2528 CC=$ac_save_CC
2529
2530 fi
2531
2532 case "x$ac_cv_prog_cc_stdc" in
2533 x|xno)
2534 echo "$as_me:$LINENO: result: none needed" >&5
2535 echo "${ECHO_T}none needed" >&6 ;;
2536 *)
2537 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2538 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2539 CC="$CC $ac_cv_prog_cc_stdc" ;;
2540 esac
2541
2542 # Some people use a C++ compiler to compile C. Since we use `exit',
2543 # in C++ we need to declare it. In case someone uses the same compiler
2544 # for both compiling C and C++ we need to have the C++ compiler decide
2545 # the declaration of exit, since it's the most demanding environment.
2546 cat >conftest.$ac_ext <<_ACEOF
2547 #ifndef __cplusplus
2548 choke me
2549 #endif
2550 _ACEOF
2551 rm -f conftest.$ac_objext
2552 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2553 (eval $ac_compile) 2>conftest.er1
2554 ac_status=$?
2555 grep -v '^ *+' conftest.er1 >conftest.err
2556 rm -f conftest.er1
2557 cat conftest.err >&5
2558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2559 (exit $ac_status); } &&
2560 { ac_try='test -z "$ac_c_werror_flag"
2561 || test ! -s conftest.err'
2562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2563 (eval $ac_try) 2>&5
2564 ac_status=$?
2565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2566 (exit $ac_status); }; } &&
2567 { ac_try='test -s conftest.$ac_objext'
2568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2569 (eval $ac_try) 2>&5
2570 ac_status=$?
2571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2572 (exit $ac_status); }; }; then
2573 for ac_declaration in \
2574 '' \
2575 'extern "C" void std::exit (int) throw (); using std::exit;' \
2576 'extern "C" void std::exit (int); using std::exit;' \
2577 'extern "C" void exit (int) throw ();' \
2578 'extern "C" void exit (int);' \
2579 'void exit (int);'
2580 do
2581 cat >conftest.$ac_ext <<_ACEOF
2582 /* confdefs.h. */
2583 _ACEOF
2584 cat confdefs.h >>conftest.$ac_ext
2585 cat >>conftest.$ac_ext <<_ACEOF
2586 /* end confdefs.h. */
2587 $ac_declaration
2588 #include <stdlib.h>
2589 int
2590 main ()
2591 {
2592 exit (42);
2593 ;
2594 return 0;
2595 }
2596 _ACEOF
2597 rm -f conftest.$ac_objext
2598 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2599 (eval $ac_compile) 2>conftest.er1
2600 ac_status=$?
2601 grep -v '^ *+' conftest.er1 >conftest.err
2602 rm -f conftest.er1
2603 cat conftest.err >&5
2604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2605 (exit $ac_status); } &&
2606 { ac_try='test -z "$ac_c_werror_flag"
2607 || test ! -s conftest.err'
2608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2609 (eval $ac_try) 2>&5
2610 ac_status=$?
2611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2612 (exit $ac_status); }; } &&
2613 { ac_try='test -s conftest.$ac_objext'
2614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2615 (eval $ac_try) 2>&5
2616 ac_status=$?
2617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2618 (exit $ac_status); }; }; then
2619 :
2620 else
2621 echo "$as_me: failed program was:" >&5
2622 sed 's/^/| /' conftest.$ac_ext >&5
2623
2624 continue
2625 fi
2626 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2627 cat >conftest.$ac_ext <<_ACEOF
2628 /* confdefs.h. */
2629 _ACEOF
2630 cat confdefs.h >>conftest.$ac_ext
2631 cat >>conftest.$ac_ext <<_ACEOF
2632 /* end confdefs.h. */
2633 $ac_declaration
2634 int
2635 main ()
2636 {
2637 exit (42);
2638 ;
2639 return 0;
2640 }
2641 _ACEOF
2642 rm -f conftest.$ac_objext
2643 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2644 (eval $ac_compile) 2>conftest.er1
2645 ac_status=$?
2646 grep -v '^ *+' conftest.er1 >conftest.err
2647 rm -f conftest.er1
2648 cat conftest.err >&5
2649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2650 (exit $ac_status); } &&
2651 { ac_try='test -z "$ac_c_werror_flag"
2652 || test ! -s conftest.err'
2653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2654 (eval $ac_try) 2>&5
2655 ac_status=$?
2656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2657 (exit $ac_status); }; } &&
2658 { ac_try='test -s conftest.$ac_objext'
2659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2660 (eval $ac_try) 2>&5
2661 ac_status=$?
2662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2663 (exit $ac_status); }; }; then
2664 break
2665 else
2666 echo "$as_me: failed program was:" >&5
2667 sed 's/^/| /' conftest.$ac_ext >&5
2668
2669 fi
2670 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2671 done
2672 rm -f conftest*
2673 if test -n "$ac_declaration"; then
2674 echo '#ifdef __cplusplus' >>confdefs.h
2675 echo $ac_declaration >>confdefs.h
2676 echo '#endif' >>confdefs.h
2677 fi
2678
2679 else
2680 echo "$as_me: failed program was:" >&5
2681 sed 's/^/| /' conftest.$ac_ext >&5
2682
2683 fi
2684 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2685 ac_ext=c
2686 ac_cpp='$CPP $CPPFLAGS'
2687 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2690
2691 ac_ext=c
2692 ac_cpp='$CPP $CPPFLAGS'
2693 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2694 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2695 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2696 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2697 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2698 # On Suns, sometimes $CPP names a directory.
2699 if test -n "$CPP" && test -d "$CPP"; then
2700 CPP=
2701 fi
2702 if test -z "$CPP"; then
2703 if test "${ac_cv_prog_CPP+set}" = set; then
2704 echo $ECHO_N "(cached) $ECHO_C" >&6
2705 else
2706 # Double quotes because CPP needs to be expanded
2707 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2708 do
2709 ac_preproc_ok=false
2710 for ac_c_preproc_warn_flag in '' yes
2711 do
2712 # Use a header file that comes with gcc, so configuring glibc
2713 # with a fresh cross-compiler works.
2714 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2715 # <limits.h> exists even on freestanding compilers.
2716 # On the NeXT, cc -E runs the code through the compiler's parser,
2717 # not just through cpp. "Syntax error" is here to catch this case.
2718 cat >conftest.$ac_ext <<_ACEOF
2719 /* confdefs.h. */
2720 _ACEOF
2721 cat confdefs.h >>conftest.$ac_ext
2722 cat >>conftest.$ac_ext <<_ACEOF
2723 /* end confdefs.h. */
2724 #ifdef __STDC__
2725 # include <limits.h>
2726 #else
2727 # include <assert.h>
2728 #endif
2729 Syntax error
2730 _ACEOF
2731 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2732 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2733 ac_status=$?
2734 grep -v '^ *+' conftest.er1 >conftest.err
2735 rm -f conftest.er1
2736 cat conftest.err >&5
2737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2738 (exit $ac_status); } >/dev/null; then
2739 if test -s conftest.err; then
2740 ac_cpp_err=$ac_c_preproc_warn_flag
2741 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2742 else
2743 ac_cpp_err=
2744 fi
2745 else
2746 ac_cpp_err=yes
2747 fi
2748 if test -z "$ac_cpp_err"; then
2749 :
2750 else
2751 echo "$as_me: failed program was:" >&5
2752 sed 's/^/| /' conftest.$ac_ext >&5
2753
2754 # Broken: fails on valid input.
2755 continue
2756 fi
2757 rm -f conftest.err conftest.$ac_ext
2758
2759 # OK, works on sane cases. Now check whether non-existent headers
2760 # can be detected and how.
2761 cat >conftest.$ac_ext <<_ACEOF
2762 /* confdefs.h. */
2763 _ACEOF
2764 cat confdefs.h >>conftest.$ac_ext
2765 cat >>conftest.$ac_ext <<_ACEOF
2766 /* end confdefs.h. */
2767 #include <ac_nonexistent.h>
2768 _ACEOF
2769 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2770 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2771 ac_status=$?
2772 grep -v '^ *+' conftest.er1 >conftest.err
2773 rm -f conftest.er1
2774 cat conftest.err >&5
2775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2776 (exit $ac_status); } >/dev/null; then
2777 if test -s conftest.err; then
2778 ac_cpp_err=$ac_c_preproc_warn_flag
2779 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2780 else
2781 ac_cpp_err=
2782 fi
2783 else
2784 ac_cpp_err=yes
2785 fi
2786 if test -z "$ac_cpp_err"; then
2787 # Broken: success on invalid input.
2788 continue
2789 else
2790 echo "$as_me: failed program was:" >&5
2791 sed 's/^/| /' conftest.$ac_ext >&5
2792
2793 # Passes both tests.
2794 ac_preproc_ok=:
2795 break
2796 fi
2797 rm -f conftest.err conftest.$ac_ext
2798
2799 done
2800 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2801 rm -f conftest.err conftest.$ac_ext
2802 if $ac_preproc_ok; then
2803 break
2804 fi
2805
2806 done
2807 ac_cv_prog_CPP=$CPP
2808
2809 fi
2810 CPP=$ac_cv_prog_CPP
2811 else
2812 ac_cv_prog_CPP=$CPP
2813 fi
2814 echo "$as_me:$LINENO: result: $CPP" >&5
2815 echo "${ECHO_T}$CPP" >&6
2816 ac_preproc_ok=false
2817 for ac_c_preproc_warn_flag in '' yes
2818 do
2819 # Use a header file that comes with gcc, so configuring glibc
2820 # with a fresh cross-compiler works.
2821 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2822 # <limits.h> exists even on freestanding compilers.
2823 # On the NeXT, cc -E runs the code through the compiler's parser,
2824 # not just through cpp. "Syntax error" is here to catch this case.
2825 cat >conftest.$ac_ext <<_ACEOF
2826 /* confdefs.h. */
2827 _ACEOF
2828 cat confdefs.h >>conftest.$ac_ext
2829 cat >>conftest.$ac_ext <<_ACEOF
2830 /* end confdefs.h. */
2831 #ifdef __STDC__
2832 # include <limits.h>
2833 #else
2834 # include <assert.h>
2835 #endif
2836 Syntax error
2837 _ACEOF
2838 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2839 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2840 ac_status=$?
2841 grep -v '^ *+' conftest.er1 >conftest.err
2842 rm -f conftest.er1
2843 cat conftest.err >&5
2844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2845 (exit $ac_status); } >/dev/null; then
2846 if test -s conftest.err; then
2847 ac_cpp_err=$ac_c_preproc_warn_flag
2848 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2849 else
2850 ac_cpp_err=
2851 fi
2852 else
2853 ac_cpp_err=yes
2854 fi
2855 if test -z "$ac_cpp_err"; then
2856 :
2857 else
2858 echo "$as_me: failed program was:" >&5
2859 sed 's/^/| /' conftest.$ac_ext >&5
2860
2861 # Broken: fails on valid input.
2862 continue
2863 fi
2864 rm -f conftest.err conftest.$ac_ext
2865
2866 # OK, works on sane cases. Now check whether non-existent headers
2867 # can be detected and how.
2868 cat >conftest.$ac_ext <<_ACEOF
2869 /* confdefs.h. */
2870 _ACEOF
2871 cat confdefs.h >>conftest.$ac_ext
2872 cat >>conftest.$ac_ext <<_ACEOF
2873 /* end confdefs.h. */
2874 #include <ac_nonexistent.h>
2875 _ACEOF
2876 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2877 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2878 ac_status=$?
2879 grep -v '^ *+' conftest.er1 >conftest.err
2880 rm -f conftest.er1
2881 cat conftest.err >&5
2882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2883 (exit $ac_status); } >/dev/null; then
2884 if test -s conftest.err; then
2885 ac_cpp_err=$ac_c_preproc_warn_flag
2886 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2887 else
2888 ac_cpp_err=
2889 fi
2890 else
2891 ac_cpp_err=yes
2892 fi
2893 if test -z "$ac_cpp_err"; then
2894 # Broken: success on invalid input.
2895 continue
2896 else
2897 echo "$as_me: failed program was:" >&5
2898 sed 's/^/| /' conftest.$ac_ext >&5
2899
2900 # Passes both tests.
2901 ac_preproc_ok=:
2902 break
2903 fi
2904 rm -f conftest.err conftest.$ac_ext
2905
2906 done
2907 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2908 rm -f conftest.err conftest.$ac_ext
2909 if $ac_preproc_ok; then
2910 :
2911 else
2912 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2913 See \`config.log' for more details." >&5
2914 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2915 See \`config.log' for more details." >&2;}
2916 { (exit 1); exit 1; }; }
2917 fi
2918
2919 ac_ext=c
2920 ac_cpp='$CPP $CPPFLAGS'
2921 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2922 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2923 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2924
2925
2926 ac_c_preproc_warn_flag=yes
2927
2928 if test x$GCC = xyes; then
2929 ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
2930 fi
2931
2932
2933 if test "x$CC" != xcc; then
2934 echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2935 echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2936 else
2937 echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2938 echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2939 fi
2940 set dummy $CC; ac_cc=`echo $2 |
2941 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2942 if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2943 echo $ECHO_N "(cached) $ECHO_C" >&6
2944 else
2945 cat >conftest.$ac_ext <<_ACEOF
2946 /* confdefs.h. */
2947 _ACEOF
2948 cat confdefs.h >>conftest.$ac_ext
2949 cat >>conftest.$ac_ext <<_ACEOF
2950 /* end confdefs.h. */
2951
2952 int
2953 main ()
2954 {
2955
2956 ;
2957 return 0;
2958 }
2959 _ACEOF
2960 # Make sure it works both with $CC and with simple cc.
2961 # We do the test twice because some compilers refuse to overwrite an
2962 # existing .o file with -o, though they will create one.
2963 ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2964 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2965 (eval $ac_try) 2>&5
2966 ac_status=$?
2967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2968 (exit $ac_status); } &&
2969 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2970 (eval $ac_try) 2>&5
2971 ac_status=$?
2972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2973 (exit $ac_status); };
2974 then
2975 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2976 if test "x$CC" != xcc; then
2977 # Test first that cc exists at all.
2978 if { ac_try='cc -c conftest.$ac_ext >&5'
2979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2980 (eval $ac_try) 2>&5
2981 ac_status=$?
2982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2983 (exit $ac_status); }; }; then
2984 ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2985 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2986 (eval $ac_try) 2>&5
2987 ac_status=$?
2988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2989 (exit $ac_status); } &&
2990 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2991 (eval $ac_try) 2>&5
2992 ac_status=$?
2993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2994 (exit $ac_status); };
2995 then
2996 # cc works too.
2997 :
2998 else
2999 # cc exists but doesn't like -o.
3000 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3001 fi
3002 fi
3003 fi
3004 else
3005 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3006 fi
3007 rm -f conftest*
3008
3009 fi
3010 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
3011 echo "$as_me:$LINENO: result: yes" >&5
3012 echo "${ECHO_T}yes" >&6
3013 else
3014 echo "$as_me:$LINENO: result: no" >&5
3015 echo "${ECHO_T}no" >&6
3016
3017 cat >>confdefs.h <<\_ACEOF
3018 #define NO_MINUS_C_MINUS_O 1
3019 _ACEOF
3020
3021 fi
3022
3023 # autoconf is lame and doesn't give us any substitution variable for this.
3024 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
3025 NO_MINUS_C_MINUS_O=yes
3026 else
3027 OUTPUT_OPTION='-o $@'
3028 fi
3029
3030
3031
3032
3033 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3034 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3035 if test "${ac_cv_c_const+set}" = set; then
3036 echo $ECHO_N "(cached) $ECHO_C" >&6
3037 else
3038 cat >conftest.$ac_ext <<_ACEOF
3039 /* confdefs.h. */
3040 _ACEOF
3041 cat confdefs.h >>conftest.$ac_ext
3042 cat >>conftest.$ac_ext <<_ACEOF
3043 /* end confdefs.h. */
3044
3045 int
3046 main ()
3047 {
3048 /* FIXME: Include the comments suggested by Paul. */
3049 #ifndef __cplusplus
3050 /* Ultrix mips cc rejects this. */
3051 typedef int charset[2];
3052 const charset x;
3053 /* SunOS 4.1.1 cc rejects this. */
3054 char const *const *ccp;
3055 char **p;
3056 /* NEC SVR4.0.2 mips cc rejects this. */
3057 struct point {int x, y;};
3058 static struct point const zero = {0,0};
3059 /* AIX XL C 1.02.0.0 rejects this.
3060 It does not let you subtract one const X* pointer from another in
3061 an arm of an if-expression whose if-part is not a constant
3062 expression */
3063 const char *g = "string";
3064 ccp = &g + (g ? g-g : 0);
3065 /* HPUX 7.0 cc rejects these. */
3066 ++ccp;
3067 p = (char**) ccp;
3068 ccp = (char const *const *) p;
3069 { /* SCO 3.2v4 cc rejects this. */
3070 char *t;
3071 char const *s = 0 ? (char *) 0 : (char const *) 0;
3072
3073 *t++ = 0;
3074 }
3075 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3076 int x[] = {25, 17};
3077 const int *foo = &x[0];
3078 ++foo;
3079 }
3080 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3081 typedef const int *iptr;
3082 iptr p = 0;
3083 ++p;
3084 }
3085 { /* AIX XL C 1.02.0.0 rejects this saying
3086 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3087 struct s { int j; const int *ap[3]; };
3088 struct s *b; b->j = 5;
3089 }
3090 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3091 const int foo = 10;
3092 }
3093 #endif
3094
3095 ;
3096 return 0;
3097 }
3098 _ACEOF
3099 rm -f conftest.$ac_objext
3100 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3101 (eval $ac_compile) 2>conftest.er1
3102 ac_status=$?
3103 grep -v '^ *+' conftest.er1 >conftest.err
3104 rm -f conftest.er1
3105 cat conftest.err >&5
3106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3107 (exit $ac_status); } &&
3108 { ac_try='test -z "$ac_c_werror_flag"
3109 || test ! -s conftest.err'
3110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3111 (eval $ac_try) 2>&5
3112 ac_status=$?
3113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3114 (exit $ac_status); }; } &&
3115 { ac_try='test -s conftest.$ac_objext'
3116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3117 (eval $ac_try) 2>&5
3118 ac_status=$?
3119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3120 (exit $ac_status); }; }; then
3121 ac_cv_c_const=yes
3122 else
3123 echo "$as_me: failed program was:" >&5
3124 sed 's/^/| /' conftest.$ac_ext >&5
3125
3126 ac_cv_c_const=no
3127 fi
3128 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3129 fi
3130 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3131 echo "${ECHO_T}$ac_cv_c_const" >&6
3132 if test $ac_cv_c_const = no; then
3133
3134 cat >>confdefs.h <<\_ACEOF
3135 #define const
3136 _ACEOF
3137
3138 fi
3139
3140 echo "$as_me:$LINENO: checking for inline" >&5
3141 echo $ECHO_N "checking for inline... $ECHO_C" >&6
3142 if test "${ac_cv_c_inline+set}" = set; then
3143 echo $ECHO_N "(cached) $ECHO_C" >&6
3144 else
3145 ac_cv_c_inline=no
3146 for ac_kw in inline __inline__ __inline; do
3147 cat >conftest.$ac_ext <<_ACEOF
3148 /* confdefs.h. */
3149 _ACEOF
3150 cat confdefs.h >>conftest.$ac_ext
3151 cat >>conftest.$ac_ext <<_ACEOF
3152 /* end confdefs.h. */
3153 #ifndef __cplusplus
3154 typedef int foo_t;
3155 static $ac_kw foo_t static_foo () {return 0; }
3156 $ac_kw foo_t foo () {return 0; }
3157 #endif
3158
3159 _ACEOF
3160 rm -f conftest.$ac_objext
3161 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3162 (eval $ac_compile) 2>conftest.er1
3163 ac_status=$?
3164 grep -v '^ *+' conftest.er1 >conftest.err
3165 rm -f conftest.er1
3166 cat conftest.err >&5
3167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3168 (exit $ac_status); } &&
3169 { ac_try='test -z "$ac_c_werror_flag"
3170 || test ! -s conftest.err'
3171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3172 (eval $ac_try) 2>&5
3173 ac_status=$?
3174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3175 (exit $ac_status); }; } &&
3176 { ac_try='test -s conftest.$ac_objext'
3177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3178 (eval $ac_try) 2>&5
3179 ac_status=$?
3180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3181 (exit $ac_status); }; }; then
3182 ac_cv_c_inline=$ac_kw; break
3183 else
3184 echo "$as_me: failed program was:" >&5
3185 sed 's/^/| /' conftest.$ac_ext >&5
3186
3187 fi
3188 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3189 done
3190
3191 fi
3192 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3193 echo "${ECHO_T}$ac_cv_c_inline" >&6
3194
3195
3196 case $ac_cv_c_inline in
3197 inline | yes) ;;
3198 *)
3199 case $ac_cv_c_inline in
3200 no) ac_val=;;
3201 *) ac_val=$ac_cv_c_inline;;
3202 esac
3203 cat >>confdefs.h <<_ACEOF
3204 #ifndef __cplusplus
3205 #define inline $ac_val
3206 #endif
3207 _ACEOF
3208 ;;
3209 esac
3210
3211 echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
3212 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
3213 if test "${ac_cv_c_bigendian+set}" = set; then
3214 echo $ECHO_N "(cached) $ECHO_C" >&6
3215 else
3216 ac_cv_c_bigendian=unknown
3217 # See if sys/param.h defines the BYTE_ORDER macro.
3218 cat >conftest.$ac_ext <<_ACEOF
3219 /* confdefs.h. */
3220 _ACEOF
3221 cat confdefs.h >>conftest.$ac_ext
3222 cat >>conftest.$ac_ext <<_ACEOF
3223 /* end confdefs.h. */
3224 #include <sys/types.h>
3225 #include <sys/param.h>
3226 int
3227 main ()
3228 {
3229
3230 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3231 bogus endian macros
3232 #endif
3233 ;
3234 return 0;
3235 }
3236 _ACEOF
3237 rm -f conftest.$ac_objext
3238 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3239 (eval $ac_compile) 2>conftest.er1
3240 ac_status=$?
3241 grep -v '^ *+' conftest.er1 >conftest.err
3242 rm -f conftest.er1
3243 cat conftest.err >&5
3244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3245 (exit $ac_status); } &&
3246 { ac_try='test -z "$ac_c_werror_flag"
3247 || test ! -s conftest.err'
3248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3249 (eval $ac_try) 2>&5
3250 ac_status=$?
3251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3252 (exit $ac_status); }; } &&
3253 { ac_try='test -s conftest.$ac_objext'
3254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3255 (eval $ac_try) 2>&5
3256 ac_status=$?
3257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3258 (exit $ac_status); }; }; then
3259 # It does; now see whether it defined to BIG_ENDIAN or not.
3260 cat >conftest.$ac_ext <<_ACEOF
3261 /* confdefs.h. */
3262 _ACEOF
3263 cat confdefs.h >>conftest.$ac_ext
3264 cat >>conftest.$ac_ext <<_ACEOF
3265 /* end confdefs.h. */
3266 #include <sys/types.h>
3267 #include <sys/param.h>
3268 int
3269 main ()
3270 {
3271
3272 #if BYTE_ORDER != BIG_ENDIAN
3273 not big endian
3274 #endif
3275 ;
3276 return 0;
3277 }
3278 _ACEOF
3279 rm -f conftest.$ac_objext
3280 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3281 (eval $ac_compile) 2>conftest.er1
3282 ac_status=$?
3283 grep -v '^ *+' conftest.er1 >conftest.err
3284 rm -f conftest.er1
3285 cat conftest.err >&5
3286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3287 (exit $ac_status); } &&
3288 { ac_try='test -z "$ac_c_werror_flag"
3289 || test ! -s conftest.err'
3290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3291 (eval $ac_try) 2>&5
3292 ac_status=$?
3293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3294 (exit $ac_status); }; } &&
3295 { ac_try='test -s conftest.$ac_objext'
3296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3297 (eval $ac_try) 2>&5
3298 ac_status=$?
3299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3300 (exit $ac_status); }; }; then
3301 ac_cv_c_bigendian=yes
3302 else
3303 echo "$as_me: failed program was:" >&5
3304 sed 's/^/| /' conftest.$ac_ext >&5
3305
3306 ac_cv_c_bigendian=no
3307 fi
3308 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3309 else
3310 echo "$as_me: failed program was:" >&5
3311 sed 's/^/| /' conftest.$ac_ext >&5
3312
3313 fi
3314 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3315 if test $ac_cv_c_bigendian = unknown; then
3316 if test "$cross_compiling" = yes; then
3317 echo $ac_n "cross-compiling... " 2>&6
3318 else
3319 cat >conftest.$ac_ext <<_ACEOF
3320 /* confdefs.h. */
3321 _ACEOF
3322 cat confdefs.h >>conftest.$ac_ext
3323 cat >>conftest.$ac_ext <<_ACEOF
3324 /* end confdefs.h. */
3325 main () {
3326 /* Are we little or big endian? From Harbison&Steele. */
3327 union
3328 {
3329 long l;
3330 char c[sizeof (long)];
3331 } u;
3332 u.l = 1;
3333 exit (u.c[sizeof (long) - 1] == 1);
3334 }
3335 _ACEOF
3336 rm -f conftest$ac_exeext
3337 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3338 (eval $ac_link) 2>&5
3339 ac_status=$?
3340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3341 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3343 (eval $ac_try) 2>&5
3344 ac_status=$?
3345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3346 (exit $ac_status); }; }; then
3347 ac_cv_c_bigendian=no
3348 else
3349 echo "$as_me: program exited with status $ac_status" >&5
3350 echo "$as_me: failed program was:" >&5
3351 sed 's/^/| /' conftest.$ac_ext >&5
3352
3353 ( exit $ac_status )
3354 ac_cv_c_bigendian=yes
3355 fi
3356 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3357 fi
3358 fi
3359 fi
3360 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
3361 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
3362 if test $ac_cv_c_bigendian = unknown; then
3363 echo "$as_me:$LINENO: checking to probe for byte ordering" >&5
3364 echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6
3365
3366 cat >conftest.c <<EOF
3367 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3368 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3369 void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3370 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3371 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3372 void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3373 int main() { _ascii (); _ebcdic (); return 0; }
3374 EOF
3375 if test -f conftest.c ; then
3376 if ${CC-cc} ${CFLAGS} -c conftest.c -o conftest.o && test -f conftest.o ; then
3377 if test `grep -l BIGenDianSyS conftest.o` ; then
3378 echo $ac_n ' big endian probe OK, ' 1>&6
3379 ac_cv_c_bigendian=yes
3380 fi
3381 if test `grep -l LiTTleEnDian conftest.o` ; then
3382 echo $ac_n ' little endian probe OK, ' 1>&6
3383 if test $ac_cv_c_bigendian = yes ; then
3384 ac_cv_c_bigendian=unknown;
3385 else
3386 ac_cv_c_bigendian=no
3387 fi
3388 fi
3389 echo $ac_n 'guessing bigendian ... ' >&6
3390 fi
3391 fi
3392 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
3393 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
3394 fi
3395 if test $ac_cv_c_bigendian = yes; then
3396
3397 cat >>confdefs.h <<\_ACEOF
3398 #define WORDS_BIGENDIAN 1
3399 _ACEOF
3400
3401
3402 cat >>confdefs.h <<\_ACEOF
3403 #define HOST_WORDS_BIG_ENDIAN 1
3404 _ACEOF
3405
3406 BYTEORDER=4321
3407 else
3408 BYTEORDER=1234
3409 fi
3410
3411 cat >>confdefs.h <<_ACEOF
3412 #define BYTEORDER $BYTEORDER
3413 _ACEOF
3414
3415 if test $ac_cv_c_bigendian = unknown; then
3416 { { echo "$as_me:$LINENO: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&5
3417 echo "$as_me: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&2;}
3418 { (exit 1); exit 1; }; }
3419 fi
3420
3421
3422
3423
3424 ac_config_headers="$ac_config_headers config.h:config.in"
3425
3426
3427
3428 # Find a good install program. We prefer a C program (faster),
3429 # so one script is as good as another. But avoid the broken or
3430 # incompatible versions:
3431 # SysV /etc/install, /usr/sbin/install
3432 # SunOS /usr/etc/install
3433 # IRIX /sbin/install
3434 # AIX /bin/install
3435 # AmigaOS /C/install, which installs bootblocks on floppy discs
3436 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3437 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3438 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3439 # OS/2's system install, which has a completely different semantic
3440 # ./install, which can be erroneously created by make from ./install.sh.
3441 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3442 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
3443 if test -z "$INSTALL"; then
3444 if test "${ac_cv_path_install+set}" = set; then
3445 echo $ECHO_N "(cached) $ECHO_C" >&6
3446 else
3447 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3448 for as_dir in $PATH
3449 do
3450 IFS=$as_save_IFS
3451 test -z "$as_dir" && as_dir=.
3452 # Account for people who put trailing slashes in PATH elements.
3453 case $as_dir/ in
3454 ./ | .// | /cC/* | \
3455 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3456 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3457 /usr/ucb/* ) ;;
3458 *)
3459 # OSF1 and SCO ODT 3.0 have their own names for install.
3460 # Don't use installbsd from OSF since it installs stuff as root
3461 # by default.
3462 for ac_prog in ginstall scoinst install; do
3463 for ac_exec_ext in '' $ac_executable_extensions; do
3464 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3465 if test $ac_prog = install &&
3466 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3467 # AIX install. It has an incompatible calling convention.
3468 :
3469 elif test $ac_prog = install &&
3470 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3471 # program-specific install script used by HP pwplus--don't use.
3472 :
3473 else
3474 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3475 break 3
3476 fi
3477 fi
3478 done
3479 done
3480 ;;
3481 esac
3482 done
3483
3484
3485 fi
3486 if test "${ac_cv_path_install+set}" = set; then
3487 INSTALL=$ac_cv_path_install
3488 else
3489 # As a last resort, use the slow shell script. We don't cache a
3490 # path for INSTALL within a source directory, because that will
3491 # break other packages using the cache if that directory is
3492 # removed, or if the path is relative.
3493 INSTALL=$ac_install_sh
3494 fi
3495 fi
3496 echo "$as_me:$LINENO: result: $INSTALL" >&5
3497 echo "${ECHO_T}$INSTALL" >&6
3498
3499 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3500 # It thinks the first close brace ends the variable substitution.
3501 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3502
3503 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3504
3505 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3506
3507
3508 . ${srcdir}/config.table
3509 host_makefile_frag=${frag}
3510
3511
3512 # It's OK to check for header files. Although the compiler may not be
3513 # able to link anything, it had better be able to at least compile
3514 # something.
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538 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
3539 do
3540 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3541 echo "$as_me:$LINENO: checking for $ac_header" >&5
3542 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3543 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3544 echo $ECHO_N "(cached) $ECHO_C" >&6
3545 else
3546 cat >conftest.$ac_ext <<_ACEOF
3547 /* confdefs.h. */
3548 _ACEOF
3549 cat confdefs.h >>conftest.$ac_ext
3550 cat >>conftest.$ac_ext <<_ACEOF
3551 /* end confdefs.h. */
3552 #include <$ac_header>
3553 _ACEOF
3554 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3555 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3556 ac_status=$?
3557 grep -v '^ *+' conftest.er1 >conftest.err
3558 rm -f conftest.er1
3559 cat conftest.err >&5
3560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3561 (exit $ac_status); } >/dev/null; then
3562 if test -s conftest.err; then
3563 ac_cpp_err=$ac_c_preproc_warn_flag
3564 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3565 else
3566 ac_cpp_err=
3567 fi
3568 else
3569 ac_cpp_err=yes
3570 fi
3571 if test -z "$ac_cpp_err"; then
3572 eval "$as_ac_Header=yes"
3573 else
3574 echo "$as_me: failed program was:" >&5
3575 sed 's/^/| /' conftest.$ac_ext >&5
3576
3577 eval "$as_ac_Header=no"
3578 fi
3579 rm -f conftest.err conftest.$ac_ext
3580 fi
3581 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3582 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3583 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3584 cat >>confdefs.h <<_ACEOF
3585 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3586 _ACEOF
3587
3588 fi
3589 done
3590
3591 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
3592 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
3593 if test "${ac_cv_header_sys_wait_h+set}" = set; then
3594 echo $ECHO_N "(cached) $ECHO_C" >&6
3595 else
3596 cat >conftest.$ac_ext <<_ACEOF
3597 /* confdefs.h. */
3598 _ACEOF
3599 cat confdefs.h >>conftest.$ac_ext
3600 cat >>conftest.$ac_ext <<_ACEOF
3601 /* end confdefs.h. */
3602 #include <sys/types.h>
3603 #include <sys/wait.h>
3604 #ifndef WEXITSTATUS
3605 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3606 #endif
3607 #ifndef WIFEXITED
3608 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3609 #endif
3610
3611 int
3612 main ()
3613 {
3614 int s;
3615 wait (&s);
3616 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3617 ;
3618 return 0;
3619 }
3620 _ACEOF
3621 rm -f conftest.$ac_objext
3622 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3623 (eval $ac_compile) 2>conftest.er1
3624 ac_status=$?
3625 grep -v '^ *+' conftest.er1 >conftest.err
3626 rm -f conftest.er1
3627 cat conftest.err >&5
3628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3629 (exit $ac_status); } &&
3630 { ac_try='test -z "$ac_c_werror_flag"
3631 || test ! -s conftest.err'
3632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3633 (eval $ac_try) 2>&5
3634 ac_status=$?
3635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3636 (exit $ac_status); }; } &&
3637 { ac_try='test -s conftest.$ac_objext'
3638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3639 (eval $ac_try) 2>&5
3640 ac_status=$?
3641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3642 (exit $ac_status); }; }; then
3643 ac_cv_header_sys_wait_h=yes
3644 else
3645 echo "$as_me: failed program was:" >&5
3646 sed 's/^/| /' conftest.$ac_ext >&5
3647
3648 ac_cv_header_sys_wait_h=no
3649 fi
3650 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3651 fi
3652 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3653 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3654 if test $ac_cv_header_sys_wait_h = yes; then
3655
3656 cat >>confdefs.h <<\_ACEOF
3657 #define HAVE_SYS_WAIT_H 1
3658 _ACEOF
3659
3660 fi
3661
3662 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
3663 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3664 if test "${ac_cv_header_time+set}" = set; then
3665 echo $ECHO_N "(cached) $ECHO_C" >&6
3666 else
3667 cat >conftest.$ac_ext <<_ACEOF
3668 /* confdefs.h. */
3669 _ACEOF
3670 cat confdefs.h >>conftest.$ac_ext
3671 cat >>conftest.$ac_ext <<_ACEOF
3672 /* end confdefs.h. */
3673 #include <sys/types.h>
3674 #include <sys/time.h>
3675 #include <time.h>
3676
3677 int
3678 main ()
3679 {
3680 if ((struct tm *) 0)
3681 return 0;
3682 ;
3683 return 0;
3684 }
3685 _ACEOF
3686 rm -f conftest.$ac_objext
3687 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3688 (eval $ac_compile) 2>conftest.er1
3689 ac_status=$?
3690 grep -v '^ *+' conftest.er1 >conftest.err
3691 rm -f conftest.er1
3692 cat conftest.err >&5
3693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3694 (exit $ac_status); } &&
3695 { ac_try='test -z "$ac_c_werror_flag"
3696 || test ! -s conftest.err'
3697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3698 (eval $ac_try) 2>&5
3699 ac_status=$?
3700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3701 (exit $ac_status); }; } &&
3702 { ac_try='test -s conftest.$ac_objext'
3703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3704 (eval $ac_try) 2>&5
3705 ac_status=$?
3706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3707 (exit $ac_status); }; }; then
3708 ac_cv_header_time=yes
3709 else
3710 echo "$as_me: failed program was:" >&5
3711 sed 's/^/| /' conftest.$ac_ext >&5
3712
3713 ac_cv_header_time=no
3714 fi
3715 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3716 fi
3717 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
3718 echo "${ECHO_T}$ac_cv_header_time" >&6
3719 if test $ac_cv_header_time = yes; then
3720
3721 cat >>confdefs.h <<\_ACEOF
3722 #define TIME_WITH_SYS_TIME 1
3723 _ACEOF
3724
3725 fi
3726
3727
3728 echo "$as_me:$LINENO: checking whether errno must be declared" >&5
3729 echo $ECHO_N "checking whether errno must be declared... $ECHO_C" >&6
3730 if test "${libiberty_cv_declare_errno+set}" = set; then
3731 echo $ECHO_N "(cached) $ECHO_C" >&6
3732 else
3733 cat >conftest.$ac_ext <<_ACEOF
3734 /* confdefs.h. */
3735 _ACEOF
3736 cat confdefs.h >>conftest.$ac_ext
3737 cat >>conftest.$ac_ext <<_ACEOF
3738 /* end confdefs.h. */
3739 #include <errno.h>
3740 int
3741 main ()
3742 {
3743 int x = errno;
3744 ;
3745 return 0;
3746 }
3747 _ACEOF
3748 rm -f conftest.$ac_objext
3749 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3750 (eval $ac_compile) 2>conftest.er1
3751 ac_status=$?
3752 grep -v '^ *+' conftest.er1 >conftest.err
3753 rm -f conftest.er1
3754 cat conftest.err >&5
3755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3756 (exit $ac_status); } &&
3757 { ac_try='test -z "$ac_c_werror_flag"
3758 || test ! -s conftest.err'
3759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3760 (eval $ac_try) 2>&5
3761 ac_status=$?
3762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3763 (exit $ac_status); }; } &&
3764 { ac_try='test -s conftest.$ac_objext'
3765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3766 (eval $ac_try) 2>&5
3767 ac_status=$?
3768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3769 (exit $ac_status); }; }; then
3770 libiberty_cv_declare_errno=no
3771 else
3772 echo "$as_me: failed program was:" >&5
3773 sed 's/^/| /' conftest.$ac_ext >&5
3774
3775 libiberty_cv_declare_errno=yes
3776 fi
3777 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3778 fi
3779 echo "$as_me:$LINENO: result: $libiberty_cv_declare_errno" >&5
3780 echo "${ECHO_T}$libiberty_cv_declare_errno" >&6
3781 if test $libiberty_cv_declare_errno = yes
3782 then
3783 cat >>confdefs.h <<\_ACEOF
3784 #define NEED_DECLARATION_ERRNO 1
3785 _ACEOF
3786
3787 fi
3788
3789
3790 echo "$as_me:$LINENO: checking for egrep" >&5
3791 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3792 if test "${ac_cv_prog_egrep+set}" = set; then
3793 echo $ECHO_N "(cached) $ECHO_C" >&6
3794 else
3795 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3796 then ac_cv_prog_egrep='grep -E'
3797 else ac_cv_prog_egrep='egrep'
3798 fi
3799 fi
3800 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3801 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3802 EGREP=$ac_cv_prog_egrep
3803
3804
3805 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3806 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3807 if test "${ac_cv_header_stdc+set}" = set; then
3808 echo $ECHO_N "(cached) $ECHO_C" >&6
3809 else
3810 cat >conftest.$ac_ext <<_ACEOF
3811 /* confdefs.h. */
3812 _ACEOF
3813 cat confdefs.h >>conftest.$ac_ext
3814 cat >>conftest.$ac_ext <<_ACEOF
3815 /* end confdefs.h. */
3816 #include <stdlib.h>
3817 #include <stdarg.h>
3818 #include <string.h>
3819 #include <float.h>
3820
3821 int
3822 main ()
3823 {
3824
3825 ;
3826 return 0;
3827 }
3828 _ACEOF
3829 rm -f conftest.$ac_objext
3830 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3831 (eval $ac_compile) 2>conftest.er1
3832 ac_status=$?
3833 grep -v '^ *+' conftest.er1 >conftest.err
3834 rm -f conftest.er1
3835 cat conftest.err >&5
3836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3837 (exit $ac_status); } &&
3838 { ac_try='test -z "$ac_c_werror_flag"
3839 || test ! -s conftest.err'
3840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3841 (eval $ac_try) 2>&5
3842 ac_status=$?
3843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3844 (exit $ac_status); }; } &&
3845 { ac_try='test -s conftest.$ac_objext'
3846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3847 (eval $ac_try) 2>&5
3848 ac_status=$?
3849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3850 (exit $ac_status); }; }; then
3851 ac_cv_header_stdc=yes
3852 else
3853 echo "$as_me: failed program was:" >&5
3854 sed 's/^/| /' conftest.$ac_ext >&5
3855
3856 ac_cv_header_stdc=no
3857 fi
3858 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3859
3860 if test $ac_cv_header_stdc = yes; then
3861 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3862 cat >conftest.$ac_ext <<_ACEOF
3863 /* confdefs.h. */
3864 _ACEOF
3865 cat confdefs.h >>conftest.$ac_ext
3866 cat >>conftest.$ac_ext <<_ACEOF
3867 /* end confdefs.h. */
3868 #include <string.h>
3869
3870 _ACEOF
3871 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3872 $EGREP "memchr" >/dev/null 2>&1; then
3873 :
3874 else
3875 ac_cv_header_stdc=no
3876 fi
3877 rm -f conftest*
3878
3879 fi
3880
3881 if test $ac_cv_header_stdc = yes; then
3882 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3883 cat >conftest.$ac_ext <<_ACEOF
3884 /* confdefs.h. */
3885 _ACEOF
3886 cat confdefs.h >>conftest.$ac_ext
3887 cat >>conftest.$ac_ext <<_ACEOF
3888 /* end confdefs.h. */
3889 #include <stdlib.h>
3890
3891 _ACEOF
3892 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3893 $EGREP "free" >/dev/null 2>&1; then
3894 :
3895 else
3896 ac_cv_header_stdc=no
3897 fi
3898 rm -f conftest*
3899
3900 fi
3901
3902 if test $ac_cv_header_stdc = yes; then
3903 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3904 if test "$cross_compiling" = yes; then
3905 :
3906 else
3907 cat >conftest.$ac_ext <<_ACEOF
3908 /* confdefs.h. */
3909 _ACEOF
3910 cat confdefs.h >>conftest.$ac_ext
3911 cat >>conftest.$ac_ext <<_ACEOF
3912 /* end confdefs.h. */
3913 #include <ctype.h>
3914 #if ((' ' & 0x0FF) == 0x020)
3915 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3916 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3917 #else
3918 # define ISLOWER(c) \
3919 (('a' <= (c) && (c) <= 'i') \
3920 || ('j' <= (c) && (c) <= 'r') \
3921 || ('s' <= (c) && (c) <= 'z'))
3922 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3923 #endif
3924
3925 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3926 int
3927 main ()
3928 {
3929 int i;
3930 for (i = 0; i < 256; i++)
3931 if (XOR (islower (i), ISLOWER (i))
3932 || toupper (i) != TOUPPER (i))
3933 exit(2);
3934 exit (0);
3935 }
3936 _ACEOF
3937 rm -f conftest$ac_exeext
3938 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3939 (eval $ac_link) 2>&5
3940 ac_status=$?
3941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3942 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3944 (eval $ac_try) 2>&5
3945 ac_status=$?
3946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3947 (exit $ac_status); }; }; then
3948 :
3949 else
3950 echo "$as_me: program exited with status $ac_status" >&5
3951 echo "$as_me: failed program was:" >&5
3952 sed 's/^/| /' conftest.$ac_ext >&5
3953
3954 ( exit $ac_status )
3955 ac_cv_header_stdc=no
3956 fi
3957 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3958 fi
3959 fi
3960 fi
3961 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3962 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3963 if test $ac_cv_header_stdc = yes; then
3964
3965 cat >>confdefs.h <<\_ACEOF
3966 #define STDC_HEADERS 1
3967 _ACEOF
3968
3969 fi
3970
3971 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3982 inttypes.h stdint.h unistd.h
3983 do
3984 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3985 echo "$as_me:$LINENO: checking for $ac_header" >&5
3986 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3987 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3988 echo $ECHO_N "(cached) $ECHO_C" >&6
3989 else
3990 cat >conftest.$ac_ext <<_ACEOF
3991 /* confdefs.h. */
3992 _ACEOF
3993 cat confdefs.h >>conftest.$ac_ext
3994 cat >>conftest.$ac_ext <<_ACEOF
3995 /* end confdefs.h. */
3996 #include <$ac_header>
3997 _ACEOF
3998 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3999 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4000 ac_status=$?
4001 grep -v '^ *+' conftest.er1 >conftest.err
4002 rm -f conftest.er1
4003 cat conftest.err >&5
4004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4005 (exit $ac_status); } >/dev/null; then
4006 if test -s conftest.err; then
4007 ac_cpp_err=$ac_c_preproc_warn_flag
4008 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4009 else
4010 ac_cpp_err=
4011 fi
4012 else
4013 ac_cpp_err=yes
4014 fi
4015 if test -z "$ac_cpp_err"; then
4016 eval "$as_ac_Header=yes"
4017 else
4018 echo "$as_me: failed program was:" >&5
4019 sed 's/^/| /' conftest.$ac_ext >&5
4020
4021 eval "$as_ac_Header=no"
4022 fi
4023 rm -f conftest.err conftest.$ac_ext
4024 fi
4025 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4026 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4027 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4028 cat >>confdefs.h <<_ACEOF
4029 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4030 _ACEOF
4031
4032 fi
4033 done
4034
4035
4036 echo "$as_me:$LINENO: checking for uintptr_t" >&5
4037 echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
4038 if test "${ac_cv_type_uintptr_t+set}" = set; then
4039 echo $ECHO_N "(cached) $ECHO_C" >&6
4040 else
4041 cat >conftest.$ac_ext <<_ACEOF
4042 /* confdefs.h. */
4043 _ACEOF
4044 cat confdefs.h >>conftest.$ac_ext
4045 cat >>conftest.$ac_ext <<_ACEOF
4046 /* end confdefs.h. */
4047 $ac_includes_default
4048 int
4049 main ()
4050 {
4051 if ((uintptr_t *) 0)
4052 return 0;
4053 if (sizeof (uintptr_t))
4054 return 0;
4055 ;
4056 return 0;
4057 }
4058 _ACEOF
4059 rm -f conftest.$ac_objext
4060 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4061 (eval $ac_compile) 2>conftest.er1
4062 ac_status=$?
4063 grep -v '^ *+' conftest.er1 >conftest.err
4064 rm -f conftest.er1
4065 cat conftest.err >&5
4066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4067 (exit $ac_status); } &&
4068 { ac_try='test -z "$ac_c_werror_flag"
4069 || test ! -s conftest.err'
4070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4071 (eval $ac_try) 2>&5
4072 ac_status=$?
4073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4074 (exit $ac_status); }; } &&
4075 { ac_try='test -s conftest.$ac_objext'
4076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4077 (eval $ac_try) 2>&5
4078 ac_status=$?
4079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4080 (exit $ac_status); }; }; then
4081 ac_cv_type_uintptr_t=yes
4082 else
4083 echo "$as_me: failed program was:" >&5
4084 sed 's/^/| /' conftest.$ac_ext >&5
4085
4086 ac_cv_type_uintptr_t=no
4087 fi
4088 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4089 fi
4090 echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
4091 echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
4092 if test $ac_cv_type_uintptr_t = yes; then
4093 :
4094 else
4095
4096 cat >>confdefs.h <<_ACEOF
4097 #define uintptr_t unsigned long
4098 _ACEOF
4099
4100 fi
4101
4102 # Given the above check, we always have uintptr_t or a fallback
4103 # definition. So define HAVE_UINTPTR_T in case any imported code
4104 # relies on it.
4105
4106 cat >>confdefs.h <<\_ACEOF
4107 #define HAVE_UINTPTR_T 1
4108 _ACEOF
4109
4110
4111 echo "$as_me:$LINENO: checking for pid_t" >&5
4112 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4113 if test "${ac_cv_type_pid_t+set}" = set; then
4114 echo $ECHO_N "(cached) $ECHO_C" >&6
4115 else
4116 cat >conftest.$ac_ext <<_ACEOF
4117 /* confdefs.h. */
4118 _ACEOF
4119 cat confdefs.h >>conftest.$ac_ext
4120 cat >>conftest.$ac_ext <<_ACEOF
4121 /* end confdefs.h. */
4122 $ac_includes_default
4123 int
4124 main ()
4125 {
4126 if ((pid_t *) 0)
4127 return 0;
4128 if (sizeof (pid_t))
4129 return 0;
4130 ;
4131 return 0;
4132 }
4133 _ACEOF
4134 rm -f conftest.$ac_objext
4135 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4136 (eval $ac_compile) 2>conftest.er1
4137 ac_status=$?
4138 grep -v '^ *+' conftest.er1 >conftest.err
4139 rm -f conftest.er1
4140 cat conftest.err >&5
4141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4142 (exit $ac_status); } &&
4143 { ac_try='test -z "$ac_c_werror_flag"
4144 || test ! -s conftest.err'
4145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4146 (eval $ac_try) 2>&5
4147 ac_status=$?
4148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4149 (exit $ac_status); }; } &&
4150 { ac_try='test -s conftest.$ac_objext'
4151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4152 (eval $ac_try) 2>&5
4153 ac_status=$?
4154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4155 (exit $ac_status); }; }; then
4156 ac_cv_type_pid_t=yes
4157 else
4158 echo "$as_me: failed program was:" >&5
4159 sed 's/^/| /' conftest.$ac_ext >&5
4160
4161 ac_cv_type_pid_t=no
4162 fi
4163 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4164 fi
4165 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4166 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4167 if test $ac_cv_type_pid_t = yes; then
4168 :
4169 else
4170
4171 cat >>confdefs.h <<_ACEOF
4172 #define pid_t int
4173 _ACEOF
4174
4175 fi
4176
4177
4178 # This is the list of functions which libiberty will provide if they
4179 # are not available on the host.
4180
4181 funcs="asprintf"
4182 funcs="$funcs atexit"
4183 funcs="$funcs basename"
4184 funcs="$funcs bcmp"
4185 funcs="$funcs bcopy"
4186 funcs="$funcs bsearch"
4187 funcs="$funcs bzero"
4188 funcs="$funcs calloc"
4189 funcs="$funcs clock"
4190 funcs="$funcs ffs"
4191 funcs="$funcs getcwd"
4192 funcs="$funcs getpagesize"
4193 funcs="$funcs index"
4194 funcs="$funcs insque"
4195 funcs="$funcs memchr"
4196 funcs="$funcs memcmp"
4197 funcs="$funcs memcpy"
4198 funcs="$funcs memmove"
4199 funcs="$funcs mempcpy"
4200 funcs="$funcs memset"
4201 funcs="$funcs mkstemps"
4202 funcs="$funcs putenv"
4203 funcs="$funcs random"
4204 funcs="$funcs rename"
4205 funcs="$funcs rindex"
4206 funcs="$funcs setenv"
4207 funcs="$funcs snprintf"
4208 funcs="$funcs sigsetmask"
4209 funcs="$funcs stpcpy"
4210 funcs="$funcs stpncpy"
4211 funcs="$funcs strcasecmp"
4212 funcs="$funcs strchr"
4213 funcs="$funcs strdup"
4214 funcs="$funcs strncasecmp"
4215 funcs="$funcs strrchr"
4216 funcs="$funcs strstr"
4217 funcs="$funcs strtod"
4218 funcs="$funcs strtol"
4219 funcs="$funcs strtoul"
4220 funcs="$funcs tmpnam"
4221 funcs="$funcs vasprintf"
4222 funcs="$funcs vfprintf"
4223 funcs="$funcs vprintf"
4224 funcs="$funcs vsnprintf"
4225 funcs="$funcs vsprintf"
4226 funcs="$funcs waitpid"
4227
4228 # Also in the old function.def file: alloca, vfork, getopt.
4229
4230 vars="sys_errlist sys_nerr sys_siglist"
4231
4232 checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
4233 checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
4234 checkfuncs="$checkfuncs getsysinfo table sysctl"
4235
4236 # These are neither executed nor required, but they help keep
4237 # autoheader happy without adding a bunch of text to acconfig.h.
4238 if test "x" = "y"; then
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302 for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \
4303 getcwd getpagesize index insque mkstemps memchr memcmp memcpy \
4304 memmove mempcpy memset putenv random rename rindex sigsetmask \
4305 strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strrchr strstr \
4306 strtod strtol strtoul tmpnam vasprintf vfprintf vprintf \
4307 vsprintf waitpid getrusage on_exit psignal strerror strsignal \
4308 sysconf times sbrk gettimeofday ffs snprintf vsnprintf \
4309 pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl \
4310 realpath canonicalize_file_name
4311 do
4312 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4313 echo "$as_me:$LINENO: checking for $ac_func" >&5
4314 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4315 if eval "test \"\${$as_ac_var+set}\" = set"; then
4316 echo $ECHO_N "(cached) $ECHO_C" >&6
4317 else
4318 if test x$gcc_no_link = xyes; then
4319 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
4320 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
4321 { (exit 1); exit 1; }; }
4322 fi
4323 cat >conftest.$ac_ext <<_ACEOF
4324 /* confdefs.h. */
4325 _ACEOF
4326 cat confdefs.h >>conftest.$ac_ext
4327 cat >>conftest.$ac_ext <<_ACEOF
4328 /* end confdefs.h. */
4329 /* System header to define __stub macros and hopefully few prototypes,
4330 which can conflict with char $ac_func (); below.
4331 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4332 <limits.h> exists even on freestanding compilers. Under hpux,
4333 including <limits.h> includes <sys/time.h> and causes problems
4334 checking for functions defined therein. */
4335 #if defined (__STDC__) && !defined (_HPUX_SOURCE)
4336 # include <limits.h>
4337 #else
4338 # include <assert.h>
4339 #endif
4340 /* Override any gcc2 internal prototype to avoid an error. */
4341 #ifdef __cplusplus
4342 extern "C"
4343 {
4344 #endif
4345 /* We use char because int might match the return type of a gcc2
4346 builtin and then its argument prototype would still apply. */
4347 char $ac_func ();
4348 /* The GNU C library defines this for functions which it implements
4349 to always fail with ENOSYS. Some functions are actually named
4350 something starting with __ and the normal name is an alias. */
4351 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4352 choke me
4353 #else
4354 char (*f) () = $ac_func;
4355 #endif
4356 #ifdef __cplusplus
4357 }
4358 #endif
4359
4360 int
4361 main ()
4362 {
4363 return f != $ac_func;
4364 ;
4365 return 0;
4366 }
4367 _ACEOF
4368 rm -f conftest.$ac_objext conftest$ac_exeext
4369 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4370 (eval $ac_link) 2>conftest.er1
4371 ac_status=$?
4372 grep -v '^ *+' conftest.er1 >conftest.err
4373 rm -f conftest.er1
4374 cat conftest.err >&5
4375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4376 (exit $ac_status); } &&
4377 { ac_try='test -z "$ac_c_werror_flag"
4378 || test ! -s conftest.err'
4379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4380 (eval $ac_try) 2>&5
4381 ac_status=$?
4382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4383 (exit $ac_status); }; } &&
4384 { ac_try='test -s conftest$ac_exeext'
4385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4386 (eval $ac_try) 2>&5
4387 ac_status=$?
4388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4389 (exit $ac_status); }; }; then
4390 eval "$as_ac_var=yes"
4391 else
4392 echo "$as_me: failed program was:" >&5
4393 sed 's/^/| /' conftest.$ac_ext >&5
4394
4395 eval "$as_ac_var=no"
4396 fi
4397 rm -f conftest.err conftest.$ac_objext \
4398 conftest$ac_exeext conftest.$ac_ext
4399 fi
4400 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4401 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4402 if test `eval echo '${'$as_ac_var'}'` = yes; then
4403 cat >>confdefs.h <<_ACEOF
4404 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4405 _ACEOF
4406
4407 fi
4408 done
4409
4410
4411 cat >>confdefs.h <<\_ACEOF
4412 #define HAVE_SYS_ERRLIST 1
4413 _ACEOF
4414
4415
4416 cat >>confdefs.h <<\_ACEOF
4417 #define HAVE_SYS_NERR 1
4418 _ACEOF
4419
4420
4421 cat >>confdefs.h <<\_ACEOF
4422 #define HAVE_SYS_SIGLIST 1
4423 _ACEOF
4424
4425 fi
4426
4427 # For each of these functions, if the host does not provide the
4428 # function we want to put FN.o in LIBOBJS, and if the host does
4429 # provide the function, we want to define HAVE_FN in config.h.
4430
4431 setobjs=
4432 CHECK=
4433 target_header_dir=
4434 if test -n "${with_target_subdir}"; then
4435
4436 # We are being configured as a target library. AC_REPLACE_FUNCS
4437 # may not work correctly, because the compiler may not be able to
4438 # link executables. Note that we may still be being configured
4439 # native.
4440
4441 # If we are being configured for newlib, we know which functions
4442 # newlib provide and which ones we will be expected to provide.
4443
4444 if test "x${with_newlib}" = "xyes"; then
4445 case $LIBOBJS in
4446 "asprintf.$ac_objext" | \
4447 *" asprintf.$ac_objext" | \
4448 "asprintf.$ac_objext "* | \
4449 *" asprintf.$ac_objext "* ) ;;
4450 *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" ;;
4451 esac
4452
4453 case $LIBOBJS in
4454 "basename.$ac_objext" | \
4455 *" basename.$ac_objext" | \
4456 "basename.$ac_objext "* | \
4457 *" basename.$ac_objext "* ) ;;
4458 *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
4459 esac
4460
4461 case $LIBOBJS in
4462 "insque.$ac_objext" | \
4463 *" insque.$ac_objext" | \
4464 "insque.$ac_objext "* | \
4465 *" insque.$ac_objext "* ) ;;
4466 *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
4467 esac
4468
4469 case $LIBOBJS in
4470 "random.$ac_objext" | \
4471 *" random.$ac_objext" | \
4472 "random.$ac_objext "* | \
4473 *" random.$ac_objext "* ) ;;
4474 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
4475 esac
4476
4477 case $LIBOBJS in
4478 "strdup.$ac_objext" | \
4479 *" strdup.$ac_objext" | \
4480 "strdup.$ac_objext "* | \
4481 *" strdup.$ac_objext "* ) ;;
4482 *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;;
4483 esac
4484
4485 case $LIBOBJS in
4486 "vasprintf.$ac_objext" | \
4487 *" vasprintf.$ac_objext" | \
4488 "vasprintf.$ac_objext "* | \
4489 *" vasprintf.$ac_objext "* ) ;;
4490 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
4491 esac
4492
4493
4494 for f in $funcs; do
4495 case "$f" in
4496 asprintf | basename | insque | random | strdup | vasprintf)
4497 ;;
4498 *)
4499 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4500 cat >>confdefs.h <<_ACEOF
4501 #define $n 1
4502 _ACEOF
4503
4504 ;;
4505 esac
4506 done
4507
4508 # newlib doesnt provide any of the variables in $vars, so we
4509 # dont have to check them here.
4510
4511 # Of the functions in $checkfuncs, newlib only has strerror.
4512 cat >> confdefs.h <<\EOF
4513 #define HAVE_STRERROR 1
4514 EOF
4515
4516
4517 setobjs=yes
4518
4519 fi
4520
4521 # We may wish to install the target headers somewhere.
4522 # Check whether --enable-install-libiberty or --disable-install-libiberty was given.
4523 if test "${enable_install_libiberty+set}" = set; then
4524 enableval="$enable_install_libiberty"
4525 enable_install_libiberty=$enableval
4526 else
4527 enable_install_libiberty=no
4528 fi;
4529 # Option parsed, now set things appropriately.
4530 case x"$enable_install_libiberty" in
4531 xyes|x)
4532 target_header_dir=libiberty
4533 ;;
4534 xno)
4535 target_header_dir=
4536 ;;
4537 *)
4538 # This could be sanity-checked in various ways...
4539 target_header_dir="${enable_install_libiberty}"
4540 ;;
4541 esac
4542
4543
4544 else
4545
4546 # Not a target library, so we set things up to run the test suite.
4547 CHECK=check-cplus-dem
4548
4549 fi
4550
4551
4552
4553
4554 case "${host}" in
4555 *-*-cygwin* | *-*-mingw*)
4556 cat >> confdefs.h <<\EOF
4557 #define HAVE_SYS_ERRLIST 1
4558 EOF
4559
4560 cat >> confdefs.h <<\EOF
4561 #define HAVE_SYS_NERR 1
4562 EOF
4563
4564 ;;
4565 esac
4566
4567 if test -z "${setobjs}"; then
4568 case "${host}" in
4569
4570 *-*-vxworks*)
4571 # Handle VxWorks configuration specially, since on VxWorks the
4572 # libraries are actually on the target board, not in the file
4573 # system.
4574 case $LIBOBJS in
4575 "basename.$ac_objext" | \
4576 *" basename.$ac_objext" | \
4577 "basename.$ac_objext "* | \
4578 *" basename.$ac_objext "* ) ;;
4579 *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
4580 esac
4581
4582 case $LIBOBJS in
4583 "getpagesize.$ac_objext" | \
4584 *" getpagesize.$ac_objext" | \
4585 "getpagesize.$ac_objext "* | \
4586 *" getpagesize.$ac_objext "* ) ;;
4587 *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" ;;
4588 esac
4589
4590 case $LIBOBJS in
4591 "insque.$ac_objext" | \
4592 *" insque.$ac_objext" | \
4593 "insque.$ac_objext "* | \
4594 *" insque.$ac_objext "* ) ;;
4595 *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
4596 esac
4597
4598 case $LIBOBJS in
4599 "random.$ac_objext" | \
4600 *" random.$ac_objext" | \
4601 "random.$ac_objext "* | \
4602 *" random.$ac_objext "* ) ;;
4603 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
4604 esac
4605
4606 case $LIBOBJS in
4607 "strcasecmp.$ac_objext" | \
4608 *" strcasecmp.$ac_objext" | \
4609 "strcasecmp.$ac_objext "* | \
4610 *" strcasecmp.$ac_objext "* ) ;;
4611 *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" ;;
4612 esac
4613
4614 case $LIBOBJS in
4615 "strncasecmp.$ac_objext" | \
4616 *" strncasecmp.$ac_objext" | \
4617 "strncasecmp.$ac_objext "* | \
4618 *" strncasecmp.$ac_objext "* ) ;;
4619 *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" ;;
4620 esac
4621
4622 case $LIBOBJS in
4623 "strdup.$ac_objext" | \
4624 *" strdup.$ac_objext" | \
4625 "strdup.$ac_objext "* | \
4626 *" strdup.$ac_objext "* ) ;;
4627 *) LIBOBJS="$LIBOBJS strdup.$ac_objext" ;;
4628 esac
4629
4630 case $LIBOBJS in
4631 "vfork.$ac_objext" | \
4632 *" vfork.$ac_objext" | \
4633 "vfork.$ac_objext "* | \
4634 *" vfork.$ac_objext "* ) ;;
4635 *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;;
4636 esac
4637
4638 case $LIBOBJS in
4639 "waitpid.$ac_objext" | \
4640 *" waitpid.$ac_objext" | \
4641 "waitpid.$ac_objext "* | \
4642 *" waitpid.$ac_objext "* ) ;;
4643 *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" ;;
4644 esac
4645
4646 case $LIBOBJS in
4647 "vasprintf.$ac_objext" | \
4648 *" vasprintf.$ac_objext" | \
4649 "vasprintf.$ac_objext "* | \
4650 *" vasprintf.$ac_objext "* ) ;;
4651 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
4652 esac
4653
4654 for f in $funcs; do
4655 case "$f" in
4656 basename | getpagesize | insque | random | strcasecmp)
4657 ;;
4658 strncasecmp | strdup | vfork | waitpid | vasprintf)
4659 ;;
4660 *)
4661 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4662 cat >>confdefs.h <<_ACEOF
4663 #define $n 1
4664 _ACEOF
4665
4666 ;;
4667 esac
4668 done
4669
4670 # VxWorks doesn't provide any of the variables in $vars, so we
4671 # don't have to check them here.
4672
4673 # Of the functions in $checkfuncs, VxWorks only has strerror.
4674 cat >> confdefs.h <<\EOF
4675 #define HAVE_STRERROR 1
4676 EOF
4677
4678
4679 setobjs=yes
4680 ;;
4681
4682 esac
4683 fi
4684
4685 if test -z "${setobjs}"; then
4686
4687 case "${host}" in
4688
4689 *-*-cygwin*)
4690 # The Cygwin library actually uses a couple of files from
4691 # libiberty when it is built. If we are building a native
4692 # Cygwin, and we run the tests, we will appear to have these
4693 # files. However, when we go on to build winsup, we will wind up
4694 # with a library which does not have the files, since they should
4695 # have come from libiberty.
4696
4697 # We handle this by removing the functions the winsup library
4698 # provides from our shell variables, so that they appear to be
4699 # missing.
4700
4701 # DJ - only if we're *building* cygwin, not just building *with* cygwin
4702
4703 if test -n "${with_target_subdir}"
4704 then
4705 funcs="`echo $funcs | sed -e 's/random//'`"
4706 case $LIBOBJS in
4707 "random.$ac_objext" | \
4708 *" random.$ac_objext" | \
4709 "random.$ac_objext "* | \
4710 *" random.$ac_objext "* ) ;;
4711 *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
4712 esac
4713
4714 vars="`echo $vars | sed -e 's/sys_siglist//'`"
4715 checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`"
4716 fi
4717 ;;
4718
4719 *-*-mingw32*)
4720 # Under mingw32, sys_nerr and sys_errlist exist, but they are
4721 # macros, so the test below won't find them.
4722 libiberty_cv_var_sys_nerr=yes
4723 libiberty_cv_var_sys_errlist=yes
4724 ;;
4725
4726 *-*-uwin*)
4727 # Under some versions of uwin, vfork is notoriously buggy and the test
4728 # can hang configure; on other versions, vfork exists just as a stub.
4729 # FIXME: This should be removed once vfork in uwin's runtime is fixed.
4730 ac_cv_func_vfork_works=no
4731 # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are
4732 # macros (actually, these are imported from a DLL, but the end effect
4733 # is the same), so the test below won't find them.
4734 libiberty_cv_var_sys_nerr=yes
4735 libiberty_cv_var_sys_errlist=yes
4736 ;;
4737
4738 *-*-*vms*)
4739 # Under VMS, vfork works very different than on Unix. The standard test
4740 # won't work, and it isn't easily adaptable. It makes more sense to
4741 # just force it.
4742 ac_cv_func_vfork_works=yes
4743 ;;
4744
4745 esac
4746
4747 # We haven't set the list of objects yet. Use the standard autoconf
4748 # tests. This will only work if the compiler works.
4749 echo "$as_me:$LINENO: checking for library containing strerror" >&5
4750 echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
4751 if test "${ac_cv_search_strerror+set}" = set; then
4752 echo $ECHO_N "(cached) $ECHO_C" >&6
4753 else
4754 ac_func_search_save_LIBS=$LIBS
4755 ac_cv_search_strerror=no
4756 if test x$gcc_no_link = xyes; then
4757 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
4758 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
4759 { (exit 1); exit 1; }; }
4760 fi
4761 cat >conftest.$ac_ext <<_ACEOF
4762 /* confdefs.h. */
4763 _ACEOF
4764 cat confdefs.h >>conftest.$ac_ext
4765 cat >>conftest.$ac_ext <<_ACEOF
4766 /* end confdefs.h. */
4767
4768 /* Override any gcc2 internal prototype to avoid an error. */
4769 #ifdef __cplusplus
4770 extern "C"
4771 #endif
4772 /* We use char because int might match the return type of a gcc2
4773 builtin and then its argument prototype would still apply. */
4774 char strerror ();
4775 int
4776 main ()
4777 {
4778 strerror ();
4779 ;
4780 return 0;
4781 }
4782 _ACEOF
4783 rm -f conftest.$ac_objext conftest$ac_exeext
4784 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4785 (eval $ac_link) 2>conftest.er1
4786 ac_status=$?
4787 grep -v '^ *+' conftest.er1 >conftest.err
4788 rm -f conftest.er1
4789 cat conftest.err >&5
4790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4791 (exit $ac_status); } &&
4792 { ac_try='test -z "$ac_c_werror_flag"
4793 || test ! -s conftest.err'
4794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4795 (eval $ac_try) 2>&5
4796 ac_status=$?
4797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4798 (exit $ac_status); }; } &&
4799 { ac_try='test -s conftest$ac_exeext'
4800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4801 (eval $ac_try) 2>&5
4802 ac_status=$?
4803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4804 (exit $ac_status); }; }; then
4805 ac_cv_search_strerror="none required"
4806 else
4807 echo "$as_me: failed program was:" >&5
4808 sed 's/^/| /' conftest.$ac_ext >&5
4809
4810 fi
4811 rm -f conftest.err conftest.$ac_objext \
4812 conftest$ac_exeext conftest.$ac_ext
4813 if test "$ac_cv_search_strerror" = no; then
4814 for ac_lib in cposix; do
4815 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4816 if test x$gcc_no_link = xyes; then
4817 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
4818 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
4819 { (exit 1); exit 1; }; }
4820 fi
4821 cat >conftest.$ac_ext <<_ACEOF
4822 /* confdefs.h. */
4823 _ACEOF
4824 cat confdefs.h >>conftest.$ac_ext
4825 cat >>conftest.$ac_ext <<_ACEOF
4826 /* end confdefs.h. */
4827
4828 /* Override any gcc2 internal prototype to avoid an error. */
4829 #ifdef __cplusplus
4830 extern "C"
4831 #endif
4832 /* We use char because int might match the return type of a gcc2
4833 builtin and then its argument prototype would still apply. */
4834 char strerror ();
4835 int
4836 main ()
4837 {
4838 strerror ();
4839 ;
4840 return 0;
4841 }
4842 _ACEOF
4843 rm -f conftest.$ac_objext conftest$ac_exeext
4844 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4845 (eval $ac_link) 2>conftest.er1
4846 ac_status=$?
4847 grep -v '^ *+' conftest.er1 >conftest.err
4848 rm -f conftest.er1
4849 cat conftest.err >&5
4850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4851 (exit $ac_status); } &&
4852 { ac_try='test -z "$ac_c_werror_flag"
4853 || test ! -s conftest.err'
4854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4855 (eval $ac_try) 2>&5
4856 ac_status=$?
4857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4858 (exit $ac_status); }; } &&
4859 { ac_try='test -s conftest$ac_exeext'
4860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4861 (eval $ac_try) 2>&5
4862 ac_status=$?
4863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4864 (exit $ac_status); }; }; then
4865 ac_cv_search_strerror="-l$ac_lib"
4866 break
4867 else
4868 echo "$as_me: failed program was:" >&5
4869 sed 's/^/| /' conftest.$ac_ext >&5
4870
4871 fi
4872 rm -f conftest.err conftest.$ac_objext \
4873 conftest$ac_exeext conftest.$ac_ext
4874 done
4875 fi
4876 LIBS=$ac_func_search_save_LIBS
4877 fi
4878 echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
4879 echo "${ECHO_T}$ac_cv_search_strerror" >&6
4880 if test "$ac_cv_search_strerror" != no; then
4881 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
4882
4883 fi
4884
4885
4886 for ac_func in $funcs
4887 do
4888 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4889 echo "$as_me:$LINENO: checking for $ac_func" >&5
4890 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4891 if eval "test \"\${$as_ac_var+set}\" = set"; then
4892 echo $ECHO_N "(cached) $ECHO_C" >&6
4893 else
4894 if test x$gcc_no_link = xyes; then
4895 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
4896 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
4897 { (exit 1); exit 1; }; }
4898 fi
4899 cat >conftest.$ac_ext <<_ACEOF
4900 /* confdefs.h. */
4901 _ACEOF
4902 cat confdefs.h >>conftest.$ac_ext
4903 cat >>conftest.$ac_ext <<_ACEOF
4904 /* end confdefs.h. */
4905 /* System header to define __stub macros and hopefully few prototypes,
4906 which can conflict with char $ac_func (); below.
4907 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4908 <limits.h> exists even on freestanding compilers. Under hpux,
4909 including <limits.h> includes <sys/time.h> and causes problems
4910 checking for functions defined therein. */
4911 #if defined (__STDC__) && !defined (_HPUX_SOURCE)
4912 # include <limits.h>
4913 #else
4914 # include <assert.h>
4915 #endif
4916 /* Override any gcc2 internal prototype to avoid an error. */
4917 #ifdef __cplusplus
4918 extern "C"
4919 {
4920 #endif
4921 /* We use char because int might match the return type of a gcc2
4922 builtin and then its argument prototype would still apply. */
4923 char $ac_func ();
4924 /* The GNU C library defines this for functions which it implements
4925 to always fail with ENOSYS. Some functions are actually named
4926 something starting with __ and the normal name is an alias. */
4927 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4928 choke me
4929 #else
4930 char (*f) () = $ac_func;
4931 #endif
4932 #ifdef __cplusplus
4933 }
4934 #endif
4935
4936 int
4937 main ()
4938 {
4939 return f != $ac_func;
4940 ;
4941 return 0;
4942 }
4943 _ACEOF
4944 rm -f conftest.$ac_objext conftest$ac_exeext
4945 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4946 (eval $ac_link) 2>conftest.er1
4947 ac_status=$?
4948 grep -v '^ *+' conftest.er1 >conftest.err
4949 rm -f conftest.er1
4950 cat conftest.err >&5
4951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4952 (exit $ac_status); } &&
4953 { ac_try='test -z "$ac_c_werror_flag"
4954 || test ! -s conftest.err'
4955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4956 (eval $ac_try) 2>&5
4957 ac_status=$?
4958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4959 (exit $ac_status); }; } &&
4960 { ac_try='test -s conftest$ac_exeext'
4961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4962 (eval $ac_try) 2>&5
4963 ac_status=$?
4964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4965 (exit $ac_status); }; }; then
4966 eval "$as_ac_var=yes"
4967 else
4968 echo "$as_me: failed program was:" >&5
4969 sed 's/^/| /' conftest.$ac_ext >&5
4970
4971 eval "$as_ac_var=no"
4972 fi
4973 rm -f conftest.err conftest.$ac_objext \
4974 conftest$ac_exeext conftest.$ac_ext
4975 fi
4976 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4977 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4978 if test `eval echo '${'$as_ac_var'}'` = yes; then
4979 cat >>confdefs.h <<_ACEOF
4980 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4981 _ACEOF
4982
4983 else
4984 case $LIBOBJS in
4985 "$ac_func.$ac_objext" | \
4986 *" $ac_func.$ac_objext" | \
4987 "$ac_func.$ac_objext "* | \
4988 *" $ac_func.$ac_objext "* ) ;;
4989 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
4990 esac
4991
4992 fi
4993 done
4994
4995
4996 echo "$as_me:$LINENO: checking whether alloca needs Cray hooks" >&5
4997 echo $ECHO_N "checking whether alloca needs Cray hooks... $ECHO_C" >&6
4998 if test "${ac_cv_os_cray+set}" = set; then
4999 echo $ECHO_N "(cached) $ECHO_C" >&6
5000 else
5001 cat >conftest.$ac_ext <<_ACEOF
5002 /* confdefs.h. */
5003 _ACEOF
5004 cat confdefs.h >>conftest.$ac_ext
5005 cat >>conftest.$ac_ext <<_ACEOF
5006 /* end confdefs.h. */
5007 #if defined(CRAY) && ! defined(CRAY2)
5008 webecray
5009 #else
5010 wenotbecray
5011 #endif
5012
5013 _ACEOF
5014 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5015 $EGREP "webecray" >/dev/null 2>&1; then
5016 ac_cv_os_cray=yes
5017 else
5018 ac_cv_os_cray=no
5019 fi
5020 rm -f conftest*
5021
5022 fi
5023 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
5024 echo "${ECHO_T}$ac_cv_os_cray" >&6
5025 if test $ac_cv_os_cray = yes; then
5026 for ac_func in _getb67 GETB67 getb67; do
5027 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5028 echo "$as_me:$LINENO: checking for $ac_func" >&5
5029 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5030 if eval "test \"\${$as_ac_var+set}\" = set"; then
5031 echo $ECHO_N "(cached) $ECHO_C" >&6
5032 else
5033 if test x$gcc_no_link = xyes; then
5034 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5035 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5036 { (exit 1); exit 1; }; }
5037 fi
5038 cat >conftest.$ac_ext <<_ACEOF
5039 /* confdefs.h. */
5040 _ACEOF
5041 cat confdefs.h >>conftest.$ac_ext
5042 cat >>conftest.$ac_ext <<_ACEOF
5043 /* end confdefs.h. */
5044 /* System header to define __stub macros and hopefully few prototypes,
5045 which can conflict with char $ac_func (); below.
5046 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5047 <limits.h> exists even on freestanding compilers. Under hpux,
5048 including <limits.h> includes <sys/time.h> and causes problems
5049 checking for functions defined therein. */
5050 #if defined (__STDC__) && !defined (_HPUX_SOURCE)
5051 # include <limits.h>
5052 #else
5053 # include <assert.h>
5054 #endif
5055 /* Override any gcc2 internal prototype to avoid an error. */
5056 #ifdef __cplusplus
5057 extern "C"
5058 {
5059 #endif
5060 /* We use char because int might match the return type of a gcc2
5061 builtin and then its argument prototype would still apply. */
5062 char $ac_func ();
5063 /* The GNU C library defines this for functions which it implements
5064 to always fail with ENOSYS. Some functions are actually named
5065 something starting with __ and the normal name is an alias. */
5066 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5067 choke me
5068 #else
5069 char (*f) () = $ac_func;
5070 #endif
5071 #ifdef __cplusplus
5072 }
5073 #endif
5074
5075 int
5076 main ()
5077 {
5078 return f != $ac_func;
5079 ;
5080 return 0;
5081 }
5082 _ACEOF
5083 rm -f conftest.$ac_objext conftest$ac_exeext
5084 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5085 (eval $ac_link) 2>conftest.er1
5086 ac_status=$?
5087 grep -v '^ *+' conftest.er1 >conftest.err
5088 rm -f conftest.er1
5089 cat conftest.err >&5
5090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5091 (exit $ac_status); } &&
5092 { ac_try='test -z "$ac_c_werror_flag"
5093 || test ! -s conftest.err'
5094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5095 (eval $ac_try) 2>&5
5096 ac_status=$?
5097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5098 (exit $ac_status); }; } &&
5099 { ac_try='test -s conftest$ac_exeext'
5100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5101 (eval $ac_try) 2>&5
5102 ac_status=$?
5103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5104 (exit $ac_status); }; }; then
5105 eval "$as_ac_var=yes"
5106 else
5107 echo "$as_me: failed program was:" >&5
5108 sed 's/^/| /' conftest.$ac_ext >&5
5109
5110 eval "$as_ac_var=no"
5111 fi
5112 rm -f conftest.err conftest.$ac_objext \
5113 conftest$ac_exeext conftest.$ac_ext
5114 fi
5115 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5116 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5117 if test `eval echo '${'$as_ac_var'}'` = yes; then
5118
5119 cat >>confdefs.h <<_ACEOF
5120 #define CRAY_STACKSEG_END $ac_func
5121 _ACEOF
5122 break
5123 fi
5124
5125 done
5126 fi
5127
5128 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
5129 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
5130 if test "${ac_cv_c_stack_direction+set}" = set; then
5131 echo $ECHO_N "(cached) $ECHO_C" >&6
5132 else
5133 if test "$cross_compiling" = yes; then
5134 ac_cv_c_stack_direction=0
5135 else
5136 cat >conftest.$ac_ext <<_ACEOF
5137 /* confdefs.h. */
5138 _ACEOF
5139 cat confdefs.h >>conftest.$ac_ext
5140 cat >>conftest.$ac_ext <<_ACEOF
5141 /* end confdefs.h. */
5142 find_stack_direction ()
5143 {
5144 static char *addr = 0;
5145 auto char dummy;
5146 if (addr == 0)
5147 {
5148 addr = &dummy;
5149 return find_stack_direction ();
5150 }
5151 else
5152 return (&dummy > addr) ? 1 : -1;
5153 }
5154 main ()
5155 {
5156 exit (find_stack_direction() < 0);
5157 }
5158 _ACEOF
5159 rm -f conftest$ac_exeext
5160 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5161 (eval $ac_link) 2>&5
5162 ac_status=$?
5163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5164 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5166 (eval $ac_try) 2>&5
5167 ac_status=$?
5168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5169 (exit $ac_status); }; }; then
5170 ac_cv_c_stack_direction=1
5171 else
5172 echo "$as_me: program exited with status $ac_status" >&5
5173 echo "$as_me: failed program was:" >&5
5174 sed 's/^/| /' conftest.$ac_ext >&5
5175
5176 ( exit $ac_status )
5177 ac_cv_c_stack_direction=-1
5178 fi
5179 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5180 fi
5181 fi
5182 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
5183 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
5184
5185 cat >>confdefs.h <<_ACEOF
5186 #define STACK_DIRECTION $ac_cv_c_stack_direction
5187 _ACEOF
5188
5189
5190
5191
5192 for ac_header in unistd.h vfork.h
5193 do
5194 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5195 echo "$as_me:$LINENO: checking for $ac_header" >&5
5196 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5197 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5198 echo $ECHO_N "(cached) $ECHO_C" >&6
5199 else
5200 cat >conftest.$ac_ext <<_ACEOF
5201 /* confdefs.h. */
5202 _ACEOF
5203 cat confdefs.h >>conftest.$ac_ext
5204 cat >>conftest.$ac_ext <<_ACEOF
5205 /* end confdefs.h. */
5206 #include <$ac_header>
5207 _ACEOF
5208 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5209 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5210 ac_status=$?
5211 grep -v '^ *+' conftest.er1 >conftest.err
5212 rm -f conftest.er1
5213 cat conftest.err >&5
5214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5215 (exit $ac_status); } >/dev/null; then
5216 if test -s conftest.err; then
5217 ac_cpp_err=$ac_c_preproc_warn_flag
5218 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5219 else
5220 ac_cpp_err=
5221 fi
5222 else
5223 ac_cpp_err=yes
5224 fi
5225 if test -z "$ac_cpp_err"; then
5226 eval "$as_ac_Header=yes"
5227 else
5228 echo "$as_me: failed program was:" >&5
5229 sed 's/^/| /' conftest.$ac_ext >&5
5230
5231 eval "$as_ac_Header=no"
5232 fi
5233 rm -f conftest.err conftest.$ac_ext
5234 fi
5235 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5236 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5237 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5238 cat >>confdefs.h <<_ACEOF
5239 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5240 _ACEOF
5241
5242 fi
5243 done
5244
5245
5246
5247 for ac_func in fork vfork
5248 do
5249 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5250 echo "$as_me:$LINENO: checking for $ac_func" >&5
5251 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5252 if eval "test \"\${$as_ac_var+set}\" = set"; then
5253 echo $ECHO_N "(cached) $ECHO_C" >&6
5254 else
5255 if test x$gcc_no_link = xyes; then
5256 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5257 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5258 { (exit 1); exit 1; }; }
5259 fi
5260 cat >conftest.$ac_ext <<_ACEOF
5261 /* confdefs.h. */
5262 _ACEOF
5263 cat confdefs.h >>conftest.$ac_ext
5264 cat >>conftest.$ac_ext <<_ACEOF
5265 /* end confdefs.h. */
5266 /* System header to define __stub macros and hopefully few prototypes,
5267 which can conflict with char $ac_func (); below.
5268 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5269 <limits.h> exists even on freestanding compilers. Under hpux,
5270 including <limits.h> includes <sys/time.h> and causes problems
5271 checking for functions defined therein. */
5272 #if defined (__STDC__) && !defined (_HPUX_SOURCE)
5273 # include <limits.h>
5274 #else
5275 # include <assert.h>
5276 #endif
5277 /* Override any gcc2 internal prototype to avoid an error. */
5278 #ifdef __cplusplus
5279 extern "C"
5280 {
5281 #endif
5282 /* We use char because int might match the return type of a gcc2
5283 builtin and then its argument prototype would still apply. */
5284 char $ac_func ();
5285 /* The GNU C library defines this for functions which it implements
5286 to always fail with ENOSYS. Some functions are actually named
5287 something starting with __ and the normal name is an alias. */
5288 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5289 choke me
5290 #else
5291 char (*f) () = $ac_func;
5292 #endif
5293 #ifdef __cplusplus
5294 }
5295 #endif
5296
5297 int
5298 main ()
5299 {
5300 return f != $ac_func;
5301 ;
5302 return 0;
5303 }
5304 _ACEOF
5305 rm -f conftest.$ac_objext conftest$ac_exeext
5306 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5307 (eval $ac_link) 2>conftest.er1
5308 ac_status=$?
5309 grep -v '^ *+' conftest.er1 >conftest.err
5310 rm -f conftest.er1
5311 cat conftest.err >&5
5312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5313 (exit $ac_status); } &&
5314 { ac_try='test -z "$ac_c_werror_flag"
5315 || test ! -s conftest.err'
5316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5317 (eval $ac_try) 2>&5
5318 ac_status=$?
5319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5320 (exit $ac_status); }; } &&
5321 { ac_try='test -s conftest$ac_exeext'
5322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5323 (eval $ac_try) 2>&5
5324 ac_status=$?
5325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5326 (exit $ac_status); }; }; then
5327 eval "$as_ac_var=yes"
5328 else
5329 echo "$as_me: failed program was:" >&5
5330 sed 's/^/| /' conftest.$ac_ext >&5
5331
5332 eval "$as_ac_var=no"
5333 fi
5334 rm -f conftest.err conftest.$ac_objext \
5335 conftest$ac_exeext conftest.$ac_ext
5336 fi
5337 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5338 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5339 if test `eval echo '${'$as_ac_var'}'` = yes; then
5340 cat >>confdefs.h <<_ACEOF
5341 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5342 _ACEOF
5343
5344 fi
5345 done
5346
5347 if test "x$ac_cv_func_fork" = xyes; then
5348 echo "$as_me:$LINENO: checking for working fork" >&5
5349 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
5350 if test "${ac_cv_func_fork_works+set}" = set; then
5351 echo $ECHO_N "(cached) $ECHO_C" >&6
5352 else
5353 if test "$cross_compiling" = yes; then
5354 ac_cv_func_fork_works=cross
5355 else
5356 cat >conftest.$ac_ext <<_ACEOF
5357 /* By Ruediger Kuhlmann. */
5358 #include <sys/types.h>
5359 #if HAVE_UNISTD_H
5360 # include <unistd.h>
5361 #endif
5362 /* Some systems only have a dummy stub for fork() */
5363 int main ()
5364 {
5365 if (fork() < 0)
5366 exit (1);
5367 exit (0);
5368 }
5369 _ACEOF
5370 rm -f conftest$ac_exeext
5371 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5372 (eval $ac_link) 2>&5
5373 ac_status=$?
5374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5375 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5377 (eval $ac_try) 2>&5
5378 ac_status=$?
5379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5380 (exit $ac_status); }; }; then
5381 ac_cv_func_fork_works=yes
5382 else
5383 echo "$as_me: program exited with status $ac_status" >&5
5384 echo "$as_me: failed program was:" >&5
5385 sed 's/^/| /' conftest.$ac_ext >&5
5386
5387 ( exit $ac_status )
5388 ac_cv_func_fork_works=no
5389 fi
5390 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5391 fi
5392 fi
5393 echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
5394 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
5395
5396 else
5397 ac_cv_func_fork_works=$ac_cv_func_fork
5398 fi
5399 if test "x$ac_cv_func_fork_works" = xcross; then
5400 case $host in
5401 *-*-amigaos* | *-*-msdosdjgpp*)
5402 # Override, as these systems have only a dummy fork() stub
5403 ac_cv_func_fork_works=no
5404 ;;
5405 *)
5406 ac_cv_func_fork_works=yes
5407 ;;
5408 esac
5409 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
5410 echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
5411 fi
5412 ac_cv_func_vfork_works=$ac_cv_func_vfork
5413 if test "x$ac_cv_func_vfork" = xyes; then
5414 echo "$as_me:$LINENO: checking for working vfork" >&5
5415 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
5416 if test "${ac_cv_func_vfork_works+set}" = set; then
5417 echo $ECHO_N "(cached) $ECHO_C" >&6
5418 else
5419 if test "$cross_compiling" = yes; then
5420 ac_cv_func_vfork_works=cross
5421 else
5422 cat >conftest.$ac_ext <<_ACEOF
5423 /* confdefs.h. */
5424 _ACEOF
5425 cat confdefs.h >>conftest.$ac_ext
5426 cat >>conftest.$ac_ext <<_ACEOF
5427 /* end confdefs.h. */
5428 /* Thanks to Paul Eggert for this test. */
5429 #include <stdio.h>
5430 #include <stdlib.h>
5431 #include <sys/types.h>
5432 #include <sys/stat.h>
5433 #include <sys/wait.h>
5434 #if HAVE_UNISTD_H
5435 # include <unistd.h>
5436 #endif
5437 #if HAVE_VFORK_H
5438 # include <vfork.h>
5439 #endif
5440 /* On some sparc systems, changes by the child to local and incoming
5441 argument registers are propagated back to the parent. The compiler
5442 is told about this with #include <vfork.h>, but some compilers
5443 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
5444 static variable whose address is put into a register that is
5445 clobbered by the vfork. */
5446 static void
5447 #ifdef __cplusplus
5448 sparc_address_test (int arg)
5449 # else
5450 sparc_address_test (arg) int arg;
5451 #endif
5452 {
5453 static pid_t child;
5454 if (!child) {
5455 child = vfork ();
5456 if (child < 0) {
5457 perror ("vfork");
5458 _exit(2);
5459 }
5460 if (!child) {
5461 arg = getpid();
5462 write(-1, "", 0);
5463 _exit (arg);
5464 }
5465 }
5466 }
5467
5468 int
5469 main ()
5470 {
5471 pid_t parent = getpid ();
5472 pid_t child;
5473
5474 sparc_address_test (0);
5475
5476 child = vfork ();
5477
5478 if (child == 0) {
5479 /* Here is another test for sparc vfork register problems. This
5480 test uses lots of local variables, at least as many local
5481 variables as main has allocated so far including compiler
5482 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
5483 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
5484 reuse the register of parent for one of the local variables,
5485 since it will think that parent can't possibly be used any more
5486 in this routine. Assigning to the local variable will thus
5487 munge parent in the parent process. */
5488 pid_t
5489 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
5490 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
5491 /* Convince the compiler that p..p7 are live; otherwise, it might
5492 use the same hardware register for all 8 local variables. */
5493 if (p != p1 || p != p2 || p != p3 || p != p4
5494 || p != p5 || p != p6 || p != p7)
5495 _exit(1);
5496
5497 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
5498 from child file descriptors. If the child closes a descriptor
5499 before it execs or exits, this munges the parent's descriptor
5500 as well. Test for this by closing stdout in the child. */
5501 _exit(close(fileno(stdout)) != 0);
5502 } else {
5503 int status;
5504 struct stat st;
5505
5506 while (wait(&status) != child)
5507 ;
5508 exit(
5509 /* Was there some problem with vforking? */
5510 child < 0
5511
5512 /* Did the child fail? (This shouldn't happen.) */
5513 || status
5514
5515 /* Did the vfork/compiler bug occur? */
5516 || parent != getpid()
5517
5518 /* Did the file descriptor bug occur? */
5519 || fstat(fileno(stdout), &st) != 0
5520 );
5521 }
5522 }
5523 _ACEOF
5524 rm -f conftest$ac_exeext
5525 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5526 (eval $ac_link) 2>&5
5527 ac_status=$?
5528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5529 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5531 (eval $ac_try) 2>&5
5532 ac_status=$?
5533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5534 (exit $ac_status); }; }; then
5535 ac_cv_func_vfork_works=yes
5536 else
5537 echo "$as_me: program exited with status $ac_status" >&5
5538 echo "$as_me: failed program was:" >&5
5539 sed 's/^/| /' conftest.$ac_ext >&5
5540
5541 ( exit $ac_status )
5542 ac_cv_func_vfork_works=no
5543 fi
5544 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5545 fi
5546 fi
5547 echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
5548 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
5549
5550 fi;
5551 if test "x$ac_cv_func_fork_works" = xcross; then
5552 ac_cv_func_vfork_works=$ac_cv_func_vfork
5553 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
5554 echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
5555 fi
5556
5557 if test "x$ac_cv_func_vfork_works" = xyes; then
5558
5559 cat >>confdefs.h <<\_ACEOF
5560 #define HAVE_WORKING_VFORK 1
5561 _ACEOF
5562
5563 else
5564
5565 cat >>confdefs.h <<\_ACEOF
5566 #define vfork fork
5567 _ACEOF
5568
5569 fi
5570 if test "x$ac_cv_func_fork_works" = xyes; then
5571
5572 cat >>confdefs.h <<\_ACEOF
5573 #define HAVE_WORKING_FORK 1
5574 _ACEOF
5575
5576 fi
5577
5578 if test $ac_cv_func_vfork_works = no; then
5579 case $LIBOBJS in
5580 "vfork.$ac_objext" | \
5581 *" vfork.$ac_objext" | \
5582 "vfork.$ac_objext "* | \
5583 *" vfork.$ac_objext "* ) ;;
5584 *) LIBOBJS="$LIBOBJS vfork.$ac_objext" ;;
5585 esac
5586
5587 fi
5588 # We only need _doprnt if we might use it to implement v*printf.
5589 if test $ac_cv_func_vprintf != yes \
5590 || test $ac_cv_func_vfprintf != yes \
5591 || test $ac_cv_func_vsprintf != yes; then
5592
5593 for ac_func in _doprnt
5594 do
5595 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5596 echo "$as_me:$LINENO: checking for $ac_func" >&5
5597 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5598 if eval "test \"\${$as_ac_var+set}\" = set"; then
5599 echo $ECHO_N "(cached) $ECHO_C" >&6
5600 else
5601 if test x$gcc_no_link = xyes; then
5602 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5603 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5604 { (exit 1); exit 1; }; }
5605 fi
5606 cat >conftest.$ac_ext <<_ACEOF
5607 /* confdefs.h. */
5608 _ACEOF
5609 cat confdefs.h >>conftest.$ac_ext
5610 cat >>conftest.$ac_ext <<_ACEOF
5611 /* end confdefs.h. */
5612 /* System header to define __stub macros and hopefully few prototypes,
5613 which can conflict with char $ac_func (); below.
5614 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5615 <limits.h> exists even on freestanding compilers. Under hpux,
5616 including <limits.h> includes <sys/time.h> and causes problems
5617 checking for functions defined therein. */
5618 #if defined (__STDC__) && !defined (_HPUX_SOURCE)
5619 # include <limits.h>
5620 #else
5621 # include <assert.h>
5622 #endif
5623 /* Override any gcc2 internal prototype to avoid an error. */
5624 #ifdef __cplusplus
5625 extern "C"
5626 {
5627 #endif
5628 /* We use char because int might match the return type of a gcc2
5629 builtin and then its argument prototype would still apply. */
5630 char $ac_func ();
5631 /* The GNU C library defines this for functions which it implements
5632 to always fail with ENOSYS. Some functions are actually named
5633 something starting with __ and the normal name is an alias. */
5634 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5635 choke me
5636 #else
5637 char (*f) () = $ac_func;
5638 #endif
5639 #ifdef __cplusplus
5640 }
5641 #endif
5642
5643 int
5644 main ()
5645 {
5646 return f != $ac_func;
5647 ;
5648 return 0;
5649 }
5650 _ACEOF
5651 rm -f conftest.$ac_objext conftest$ac_exeext
5652 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5653 (eval $ac_link) 2>conftest.er1
5654 ac_status=$?
5655 grep -v '^ *+' conftest.er1 >conftest.err
5656 rm -f conftest.er1
5657 cat conftest.err >&5
5658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5659 (exit $ac_status); } &&
5660 { ac_try='test -z "$ac_c_werror_flag"
5661 || test ! -s conftest.err'
5662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5663 (eval $ac_try) 2>&5
5664 ac_status=$?
5665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5666 (exit $ac_status); }; } &&
5667 { ac_try='test -s conftest$ac_exeext'
5668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5669 (eval $ac_try) 2>&5
5670 ac_status=$?
5671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5672 (exit $ac_status); }; }; then
5673 eval "$as_ac_var=yes"
5674 else
5675 echo "$as_me: failed program was:" >&5
5676 sed 's/^/| /' conftest.$ac_ext >&5
5677
5678 eval "$as_ac_var=no"
5679 fi
5680 rm -f conftest.err conftest.$ac_objext \
5681 conftest$ac_exeext conftest.$ac_ext
5682 fi
5683 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5684 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5685 if test `eval echo '${'$as_ac_var'}'` = yes; then
5686 cat >>confdefs.h <<_ACEOF
5687 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5688 _ACEOF
5689
5690 else
5691 case $LIBOBJS in
5692 "$ac_func.$ac_objext" | \
5693 *" $ac_func.$ac_objext" | \
5694 "$ac_func.$ac_objext "* | \
5695 *" $ac_func.$ac_objext "* ) ;;
5696 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
5697 esac
5698
5699 fi
5700 done
5701
5702
5703 else
5704
5705 for ac_func in _doprnt
5706 do
5707 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5708 echo "$as_me:$LINENO: checking for $ac_func" >&5
5709 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5710 if eval "test \"\${$as_ac_var+set}\" = set"; then
5711 echo $ECHO_N "(cached) $ECHO_C" >&6
5712 else
5713 if test x$gcc_no_link = xyes; then
5714 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5715 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5716 { (exit 1); exit 1; }; }
5717 fi
5718 cat >conftest.$ac_ext <<_ACEOF
5719 /* confdefs.h. */
5720 _ACEOF
5721 cat confdefs.h >>conftest.$ac_ext
5722 cat >>conftest.$ac_ext <<_ACEOF
5723 /* end confdefs.h. */
5724 /* System header to define __stub macros and hopefully few prototypes,
5725 which can conflict with char $ac_func (); below.
5726 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5727 <limits.h> exists even on freestanding compilers. Under hpux,
5728 including <limits.h> includes <sys/time.h> and causes problems
5729 checking for functions defined therein. */
5730 #if defined (__STDC__) && !defined (_HPUX_SOURCE)
5731 # include <limits.h>
5732 #else
5733 # include <assert.h>
5734 #endif
5735 /* Override any gcc2 internal prototype to avoid an error. */
5736 #ifdef __cplusplus
5737 extern "C"
5738 {
5739 #endif
5740 /* We use char because int might match the return type of a gcc2
5741 builtin and then its argument prototype would still apply. */
5742 char $ac_func ();
5743 /* The GNU C library defines this for functions which it implements
5744 to always fail with ENOSYS. Some functions are actually named
5745 something starting with __ and the normal name is an alias. */
5746 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5747 choke me
5748 #else
5749 char (*f) () = $ac_func;
5750 #endif
5751 #ifdef __cplusplus
5752 }
5753 #endif
5754
5755 int
5756 main ()
5757 {
5758 return f != $ac_func;
5759 ;
5760 return 0;
5761 }
5762 _ACEOF
5763 rm -f conftest.$ac_objext conftest$ac_exeext
5764 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5765 (eval $ac_link) 2>conftest.er1
5766 ac_status=$?
5767 grep -v '^ *+' conftest.er1 >conftest.err
5768 rm -f conftest.er1
5769 cat conftest.err >&5
5770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5771 (exit $ac_status); } &&
5772 { ac_try='test -z "$ac_c_werror_flag"
5773 || test ! -s conftest.err'
5774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5775 (eval $ac_try) 2>&5
5776 ac_status=$?
5777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5778 (exit $ac_status); }; } &&
5779 { ac_try='test -s conftest$ac_exeext'
5780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5781 (eval $ac_try) 2>&5
5782 ac_status=$?
5783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5784 (exit $ac_status); }; }; then
5785 eval "$as_ac_var=yes"
5786 else
5787 echo "$as_me: failed program was:" >&5
5788 sed 's/^/| /' conftest.$ac_ext >&5
5789
5790 eval "$as_ac_var=no"
5791 fi
5792 rm -f conftest.err conftest.$ac_objext \
5793 conftest$ac_exeext conftest.$ac_ext
5794 fi
5795 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5796 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5797 if test `eval echo '${'$as_ac_var'}'` = yes; then
5798 cat >>confdefs.h <<_ACEOF
5799 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5800 _ACEOF
5801
5802 fi
5803 done
5804
5805 fi
5806
5807 for v in $vars; do
5808 echo "$as_me:$LINENO: checking for $v" >&5
5809 echo $ECHO_N "checking for $v... $ECHO_C" >&6
5810 if eval "test \"\${libiberty_cv_var_$v+set}\" = set"; then
5811 echo $ECHO_N "(cached) $ECHO_C" >&6
5812 else
5813 if test x$gcc_no_link = xyes; then
5814 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5815 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5816 { (exit 1); exit 1; }; }
5817 fi
5818 cat >conftest.$ac_ext <<_ACEOF
5819 /* confdefs.h. */
5820 _ACEOF
5821 cat confdefs.h >>conftest.$ac_ext
5822 cat >>conftest.$ac_ext <<_ACEOF
5823 /* end confdefs.h. */
5824 int *p;
5825 int
5826 main ()
5827 {
5828 extern int $v []; p = $v;
5829 ;
5830 return 0;
5831 }
5832 _ACEOF
5833 rm -f conftest.$ac_objext conftest$ac_exeext
5834 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5835 (eval $ac_link) 2>conftest.er1
5836 ac_status=$?
5837 grep -v '^ *+' conftest.er1 >conftest.err
5838 rm -f conftest.er1
5839 cat conftest.err >&5
5840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5841 (exit $ac_status); } &&
5842 { ac_try='test -z "$ac_c_werror_flag"
5843 || test ! -s conftest.err'
5844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5845 (eval $ac_try) 2>&5
5846 ac_status=$?
5847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5848 (exit $ac_status); }; } &&
5849 { ac_try='test -s conftest$ac_exeext'
5850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5851 (eval $ac_try) 2>&5
5852 ac_status=$?
5853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5854 (exit $ac_status); }; }; then
5855 eval "libiberty_cv_var_$v=yes"
5856 else
5857 echo "$as_me: failed program was:" >&5
5858 sed 's/^/| /' conftest.$ac_ext >&5
5859
5860 eval "libiberty_cv_var_$v=no"
5861 fi
5862 rm -f conftest.err conftest.$ac_objext \
5863 conftest$ac_exeext conftest.$ac_ext
5864 fi
5865
5866 if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
5867 echo "$as_me:$LINENO: result: yes" >&5
5868 echo "${ECHO_T}yes" >&6
5869 n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5870 cat >>confdefs.h <<_ACEOF
5871 #define $n 1
5872 _ACEOF
5873
5874 else
5875 echo "$as_me:$LINENO: result: no" >&5
5876 echo "${ECHO_T}no" >&6
5877 fi
5878 done
5879
5880 # special check for _system_configuration because AIX <4.3.2 do not
5881 # contain the `physmem' member.
5882 echo "$as_me:$LINENO: checking for external symbol _system_configuration" >&5
5883 echo $ECHO_N "checking for external symbol _system_configuration... $ECHO_C" >&6
5884 cat >conftest.$ac_ext <<_ACEOF
5885 /* confdefs.h. */
5886 _ACEOF
5887 cat confdefs.h >>conftest.$ac_ext
5888 cat >>conftest.$ac_ext <<_ACEOF
5889 /* end confdefs.h. */
5890 #include <sys/systemcfg.h>
5891 int
5892 main ()
5893 {
5894 double x = _system_configuration.physmem;
5895 ;
5896 return 0;
5897 }
5898 _ACEOF
5899 rm -f conftest.$ac_objext
5900 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5901 (eval $ac_compile) 2>conftest.er1
5902 ac_status=$?
5903 grep -v '^ *+' conftest.er1 >conftest.err
5904 rm -f conftest.er1
5905 cat conftest.err >&5
5906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5907 (exit $ac_status); } &&
5908 { ac_try='test -z "$ac_c_werror_flag"
5909 || test ! -s conftest.err'
5910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5911 (eval $ac_try) 2>&5
5912 ac_status=$?
5913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5914 (exit $ac_status); }; } &&
5915 { ac_try='test -s conftest.$ac_objext'
5916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5917 (eval $ac_try) 2>&5
5918 ac_status=$?
5919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5920 (exit $ac_status); }; }; then
5921 echo "$as_me:$LINENO: result: yes" >&5
5922 echo "${ECHO_T}yes" >&6
5923
5924 cat >>confdefs.h <<\_ACEOF
5925 #define HAVE__SYSTEM_CONFIGURATION 1
5926 _ACEOF
5927
5928 else
5929 echo "$as_me: failed program was:" >&5
5930 sed 's/^/| /' conftest.$ac_ext >&5
5931
5932 echo "$as_me:$LINENO: result: no" >&5
5933 echo "${ECHO_T}no" >&6
5934 fi
5935 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5936
5937
5938 for ac_func in $checkfuncs
5939 do
5940 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5941 echo "$as_me:$LINENO: checking for $ac_func" >&5
5942 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5943 if eval "test \"\${$as_ac_var+set}\" = set"; then
5944 echo $ECHO_N "(cached) $ECHO_C" >&6
5945 else
5946 if test x$gcc_no_link = xyes; then
5947 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
5948 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
5949 { (exit 1); exit 1; }; }
5950 fi
5951 cat >conftest.$ac_ext <<_ACEOF
5952 /* confdefs.h. */
5953 _ACEOF
5954 cat confdefs.h >>conftest.$ac_ext
5955 cat >>conftest.$ac_ext <<_ACEOF
5956 /* end confdefs.h. */
5957 /* System header to define __stub macros and hopefully few prototypes,
5958 which can conflict with char $ac_func (); below.
5959 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5960 <limits.h> exists even on freestanding compilers. Under hpux,
5961 including <limits.h> includes <sys/time.h> and causes problems
5962 checking for functions defined therein. */
5963 #if defined (__STDC__) && !defined (_HPUX_SOURCE)
5964 # include <limits.h>
5965 #else
5966 # include <assert.h>
5967 #endif
5968 /* Override any gcc2 internal prototype to avoid an error. */
5969 #ifdef __cplusplus
5970 extern "C"
5971 {
5972 #endif
5973 /* We use char because int might match the return type of a gcc2
5974 builtin and then its argument prototype would still apply. */
5975 char $ac_func ();
5976 /* The GNU C library defines this for functions which it implements
5977 to always fail with ENOSYS. Some functions are actually named
5978 something starting with __ and the normal name is an alias. */
5979 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5980 choke me
5981 #else
5982 char (*f) () = $ac_func;
5983 #endif
5984 #ifdef __cplusplus
5985 }
5986 #endif
5987
5988 int
5989 main ()
5990 {
5991 return f != $ac_func;
5992 ;
5993 return 0;
5994 }
5995 _ACEOF
5996 rm -f conftest.$ac_objext conftest$ac_exeext
5997 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5998 (eval $ac_link) 2>conftest.er1
5999 ac_status=$?
6000 grep -v '^ *+' conftest.er1 >conftest.err
6001 rm -f conftest.er1
6002 cat conftest.err >&5
6003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6004 (exit $ac_status); } &&
6005 { ac_try='test -z "$ac_c_werror_flag"
6006 || test ! -s conftest.err'
6007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6008 (eval $ac_try) 2>&5
6009 ac_status=$?
6010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6011 (exit $ac_status); }; } &&
6012 { ac_try='test -s conftest$ac_exeext'
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); }; }; then
6018 eval "$as_ac_var=yes"
6019 else
6020 echo "$as_me: failed program was:" >&5
6021 sed 's/^/| /' conftest.$ac_ext >&5
6022
6023 eval "$as_ac_var=no"
6024 fi
6025 rm -f conftest.err conftest.$ac_objext \
6026 conftest$ac_exeext conftest.$ac_ext
6027 fi
6028 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6029 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6030 if test `eval echo '${'$as_ac_var'}'` = yes; then
6031 cat >>confdefs.h <<_ACEOF
6032 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6033 _ACEOF
6034
6035 fi
6036 done
6037
6038 echo "$as_me:$LINENO: checking whether canonicalize_file_name must be declared" >&5
6039 echo $ECHO_N "checking whether canonicalize_file_name must be declared... $ECHO_C" >&6
6040 if test "${libiberty_cv_decl_needed_canonicalize_file_name+set}" = set; then
6041 echo $ECHO_N "(cached) $ECHO_C" >&6
6042 else
6043 cat >conftest.$ac_ext <<_ACEOF
6044 /* confdefs.h. */
6045 _ACEOF
6046 cat confdefs.h >>conftest.$ac_ext
6047 cat >>conftest.$ac_ext <<_ACEOF
6048 /* end confdefs.h. */
6049
6050 #include "confdefs.h"
6051 #include <stdio.h>
6052 #ifdef HAVE_STRING_H
6053 #include <string.h>
6054 #else
6055 #ifdef HAVE_STRINGS_H
6056 #include <strings.h>
6057 #endif
6058 #endif
6059 #ifdef HAVE_STDLIB_H
6060 #include <stdlib.h>
6061 #endif
6062 #ifdef HAVE_UNISTD_H
6063 #include <unistd.h>
6064 #endif
6065 int
6066 main ()
6067 {
6068 char *(*pfn) = (char *(*)) canonicalize_file_name
6069 ;
6070 return 0;
6071 }
6072 _ACEOF
6073 rm -f conftest.$ac_objext
6074 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6075 (eval $ac_compile) 2>conftest.er1
6076 ac_status=$?
6077 grep -v '^ *+' conftest.er1 >conftest.err
6078 rm -f conftest.er1
6079 cat conftest.err >&5
6080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6081 (exit $ac_status); } &&
6082 { ac_try='test -z "$ac_c_werror_flag"
6083 || test ! -s conftest.err'
6084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6085 (eval $ac_try) 2>&5
6086 ac_status=$?
6087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6088 (exit $ac_status); }; } &&
6089 { ac_try='test -s conftest.$ac_objext'
6090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6091 (eval $ac_try) 2>&5
6092 ac_status=$?
6093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6094 (exit $ac_status); }; }; then
6095 libiberty_cv_decl_needed_canonicalize_file_name=no
6096 else
6097 echo "$as_me: failed program was:" >&5
6098 sed 's/^/| /' conftest.$ac_ext >&5
6099
6100 libiberty_cv_decl_needed_canonicalize_file_name=yes
6101 fi
6102 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6103 fi
6104
6105 echo "$as_me:$LINENO: result: $libiberty_cv_decl_needed_canonicalize_file_name" >&5
6106 echo "${ECHO_T}$libiberty_cv_decl_needed_canonicalize_file_name" >&6
6107 if test $libiberty_cv_decl_needed_canonicalize_file_name = yes; then
6108
6109 cat >>confdefs.h <<\_ACEOF
6110 #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
6111 _ACEOF
6112
6113 fi
6114
6115 fi
6116
6117 # Figure out which version of pexecute to use.
6118 case "${host}" in
6119 *-*-mingw* | *-*-winnt*) pexecute=./pex-win32.o ;;
6120 *-*-msdosdjgpp*) pexecute=./pex-djgpp.o ;;
6121 *-*-msdos*) pexecute=./pex-msdos.o ;;
6122 *-*-os2-emx*) pexecute=./pex-os2.o ;;
6123 *) pexecute=./pex-unix.o ;;
6124 esac
6125
6126
6127 if test x$gcc_no_link = xyes; then
6128 if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
6129 ac_cv_func_mmap_fixed_mapped=no
6130 fi
6131 fi
6132 if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
6133
6134
6135 for ac_header in stdlib.h unistd.h
6136 do
6137 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6138 echo "$as_me:$LINENO: checking for $ac_header" >&5
6139 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6140 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6141 echo $ECHO_N "(cached) $ECHO_C" >&6
6142 else
6143 cat >conftest.$ac_ext <<_ACEOF
6144 /* confdefs.h. */
6145 _ACEOF
6146 cat confdefs.h >>conftest.$ac_ext
6147 cat >>conftest.$ac_ext <<_ACEOF
6148 /* end confdefs.h. */
6149 #include <$ac_header>
6150 _ACEOF
6151 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6152 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6153 ac_status=$?
6154 grep -v '^ *+' conftest.er1 >conftest.err
6155 rm -f conftest.er1
6156 cat conftest.err >&5
6157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6158 (exit $ac_status); } >/dev/null; then
6159 if test -s conftest.err; then
6160 ac_cpp_err=$ac_c_preproc_warn_flag
6161 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6162 else
6163 ac_cpp_err=
6164 fi
6165 else
6166 ac_cpp_err=yes
6167 fi
6168 if test -z "$ac_cpp_err"; then
6169 eval "$as_ac_Header=yes"
6170 else
6171 echo "$as_me: failed program was:" >&5
6172 sed 's/^/| /' conftest.$ac_ext >&5
6173
6174 eval "$as_ac_Header=no"
6175 fi
6176 rm -f conftest.err conftest.$ac_ext
6177 fi
6178 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6179 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6180 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6181 cat >>confdefs.h <<_ACEOF
6182 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6183 _ACEOF
6184
6185 fi
6186 done
6187
6188
6189 for ac_func in getpagesize
6190 do
6191 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6192 echo "$as_me:$LINENO: checking for $ac_func" >&5
6193 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6194 if eval "test \"\${$as_ac_var+set}\" = set"; then
6195 echo $ECHO_N "(cached) $ECHO_C" >&6
6196 else
6197 if test x$gcc_no_link = xyes; then
6198 { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
6199 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
6200 { (exit 1); exit 1; }; }
6201 fi
6202 cat >conftest.$ac_ext <<_ACEOF
6203 /* confdefs.h. */
6204 _ACEOF
6205 cat confdefs.h >>conftest.$ac_ext
6206 cat >>conftest.$ac_ext <<_ACEOF
6207 /* end confdefs.h. */
6208 /* System header to define __stub macros and hopefully few prototypes,
6209 which can conflict with char $ac_func (); below.
6210 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6211 <limits.h> exists even on freestanding compilers. Under hpux,
6212 including <limits.h> includes <sys/time.h> and causes problems
6213 checking for functions defined therein. */
6214 #if defined (__STDC__) && !defined (_HPUX_SOURCE)
6215 # include <limits.h>
6216 #else
6217 # include <assert.h>
6218 #endif
6219 /* Override any gcc2 internal prototype to avoid an error. */
6220 #ifdef __cplusplus
6221 extern "C"
6222 {
6223 #endif
6224 /* We use char because int might match the return type of a gcc2
6225 builtin and then its argument prototype would still apply. */
6226 char $ac_func ();
6227 /* The GNU C library defines this for functions which it implements
6228 to always fail with ENOSYS. Some functions are actually named
6229 something starting with __ and the normal name is an alias. */
6230 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6231 choke me
6232 #else
6233 char (*f) () = $ac_func;
6234 #endif
6235 #ifdef __cplusplus
6236 }
6237 #endif
6238
6239 int
6240 main ()
6241 {
6242 return f != $ac_func;
6243 ;
6244 return 0;
6245 }
6246 _ACEOF
6247 rm -f conftest.$ac_objext conftest$ac_exeext
6248 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6249 (eval $ac_link) 2>conftest.er1
6250 ac_status=$?
6251 grep -v '^ *+' conftest.er1 >conftest.err
6252 rm -f conftest.er1
6253 cat conftest.err >&5
6254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6255 (exit $ac_status); } &&
6256 { ac_try='test -z "$ac_c_werror_flag"
6257 || test ! -s conftest.err'
6258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6259 (eval $ac_try) 2>&5
6260 ac_status=$?
6261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6262 (exit $ac_status); }; } &&
6263 { ac_try='test -s conftest$ac_exeext'
6264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6265 (eval $ac_try) 2>&5
6266 ac_status=$?
6267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6268 (exit $ac_status); }; }; then
6269 eval "$as_ac_var=yes"
6270 else
6271 echo "$as_me: failed program was:" >&5
6272 sed 's/^/| /' conftest.$ac_ext >&5
6273
6274 eval "$as_ac_var=no"
6275 fi
6276 rm -f conftest.err conftest.$ac_objext \
6277 conftest$ac_exeext conftest.$ac_ext
6278 fi
6279 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6280 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6281 if test `eval echo '${'$as_ac_var'}'` = yes; then
6282 cat >>confdefs.h <<_ACEOF
6283 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6284 _ACEOF
6285
6286 fi
6287 done
6288
6289 echo "$as_me:$LINENO: checking for working mmap" >&5
6290 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
6291 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
6292 echo $ECHO_N "(cached) $ECHO_C" >&6
6293 else
6294 if test "$cross_compiling" = yes; then
6295 ac_cv_func_mmap_fixed_mapped=no
6296 else
6297 cat >conftest.$ac_ext <<_ACEOF
6298 /* confdefs.h. */
6299 _ACEOF
6300 cat confdefs.h >>conftest.$ac_ext
6301 cat >>conftest.$ac_ext <<_ACEOF
6302 /* end confdefs.h. */
6303 $ac_includes_default
6304 /* malloc might have been renamed as rpl_malloc. */
6305 #undef malloc
6306
6307 /* Thanks to Mike Haertel and Jim Avera for this test.
6308 Here is a matrix of mmap possibilities:
6309 mmap private not fixed
6310 mmap private fixed at somewhere currently unmapped
6311 mmap private fixed at somewhere already mapped
6312 mmap shared not fixed
6313 mmap shared fixed at somewhere currently unmapped
6314 mmap shared fixed at somewhere already mapped
6315 For private mappings, we should verify that changes cannot be read()
6316 back from the file, nor mmap's back from the file at a different
6317 address. (There have been systems where private was not correctly
6318 implemented like the infamous i386 svr4.0, and systems where the
6319 VM page cache was not coherent with the file system buffer cache
6320 like early versions of FreeBSD and possibly contemporary NetBSD.)
6321 For shared mappings, we should conversely verify that changes get
6322 propagated back to all the places they're supposed to be.
6323
6324 Grep wants private fixed already mapped.
6325 The main things grep needs to know about mmap are:
6326 * does it exist and is it safe to write into the mmap'd area
6327 * how to use it (BSD variants) */
6328
6329 #include <fcntl.h>
6330 #include <sys/mman.h>
6331
6332 #if !STDC_HEADERS && !HAVE_STDLIB_H
6333 char *malloc ();
6334 #endif
6335
6336 /* This mess was copied from the GNU getpagesize.h. */
6337 #if !HAVE_GETPAGESIZE
6338 /* Assume that all systems that can run configure have sys/param.h. */
6339 # if !HAVE_SYS_PARAM_H
6340 # define HAVE_SYS_PARAM_H 1
6341 # endif
6342
6343 # ifdef _SC_PAGESIZE
6344 # define getpagesize() sysconf(_SC_PAGESIZE)
6345 # else /* no _SC_PAGESIZE */
6346 # if HAVE_SYS_PARAM_H
6347 # include <sys/param.h>
6348 # ifdef EXEC_PAGESIZE
6349 # define getpagesize() EXEC_PAGESIZE
6350 # else /* no EXEC_PAGESIZE */
6351 # ifdef NBPG
6352 # define getpagesize() NBPG * CLSIZE
6353 # ifndef CLSIZE
6354 # define CLSIZE 1
6355 # endif /* no CLSIZE */
6356 # else /* no NBPG */
6357 # ifdef NBPC
6358 # define getpagesize() NBPC
6359 # else /* no NBPC */
6360 # ifdef PAGESIZE
6361 # define getpagesize() PAGESIZE
6362 # endif /* PAGESIZE */
6363 # endif /* no NBPC */
6364 # endif /* no NBPG */
6365 # endif /* no EXEC_PAGESIZE */
6366 # else /* no HAVE_SYS_PARAM_H */
6367 # define getpagesize() 8192 /* punt totally */
6368 # endif /* no HAVE_SYS_PARAM_H */
6369 # endif /* no _SC_PAGESIZE */
6370
6371 #endif /* no HAVE_GETPAGESIZE */
6372
6373 int
6374 main ()
6375 {
6376 char *data, *data2, *data3;
6377 int i, pagesize;
6378 int fd;
6379
6380 pagesize = getpagesize ();
6381
6382 /* First, make a file with some known garbage in it. */
6383 data = (char *) malloc (pagesize);
6384 if (!data)
6385 exit (1);
6386 for (i = 0; i < pagesize; ++i)
6387 *(data + i) = rand ();
6388 umask (0);
6389 fd = creat ("conftest.mmap", 0600);
6390 if (fd < 0)
6391 exit (1);
6392 if (write (fd, data, pagesize) != pagesize)
6393 exit (1);
6394 close (fd);
6395
6396 /* Next, try to mmap the file at a fixed address which already has
6397 something else allocated at it. If we can, also make sure that
6398 we see the same garbage. */
6399 fd = open ("conftest.mmap", O_RDWR);
6400 if (fd < 0)
6401 exit (1);
6402 data2 = (char *) malloc (2 * pagesize);
6403 if (!data2)
6404 exit (1);
6405 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
6406 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
6407 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6408 exit (1);
6409 for (i = 0; i < pagesize; ++i)
6410 if (*(data + i) != *(data2 + i))
6411 exit (1);
6412
6413 /* Finally, make sure that changes to the mapped area do not
6414 percolate back to the file as seen by read(). (This is a bug on
6415 some variants of i386 svr4.0.) */
6416 for (i = 0; i < pagesize; ++i)
6417 *(data2 + i) = *(data2 + i) + 1;
6418 data3 = (char *) malloc (pagesize);
6419 if (!data3)
6420 exit (1);
6421 if (read (fd, data3, pagesize) != pagesize)
6422 exit (1);
6423 for (i = 0; i < pagesize; ++i)
6424 if (*(data + i) != *(data3 + i))
6425 exit (1);
6426 close (fd);
6427 exit (0);
6428 }
6429 _ACEOF
6430 rm -f conftest$ac_exeext
6431 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6432 (eval $ac_link) 2>&5
6433 ac_status=$?
6434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6435 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6437 (eval $ac_try) 2>&5
6438 ac_status=$?
6439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6440 (exit $ac_status); }; }; then
6441 ac_cv_func_mmap_fixed_mapped=yes
6442 else
6443 echo "$as_me: program exited with status $ac_status" >&5
6444 echo "$as_me: failed program was:" >&5
6445 sed 's/^/| /' conftest.$ac_ext >&5
6446
6447 ( exit $ac_status )
6448 ac_cv_func_mmap_fixed_mapped=no
6449 fi
6450 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6451 fi
6452 fi
6453 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
6454 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
6455 if test $ac_cv_func_mmap_fixed_mapped = yes; then
6456
6457 cat >>confdefs.h <<\_ACEOF
6458 #define HAVE_MMAP 1
6459 _ACEOF
6460
6461 fi
6462 rm -f conftest.mmap
6463
6464 fi
6465
6466 echo "$as_me:$LINENO: checking for working strncmp" >&5
6467 echo $ECHO_N "checking for working strncmp... $ECHO_C" >&6
6468 if test "${ac_cv_func_strncmp_works+set}" = set; then
6469 echo $ECHO_N "(cached) $ECHO_C" >&6
6470 else
6471 if test "$cross_compiling" = yes; then
6472 ac_cv_func_strncmp_works=no
6473 else
6474 cat >conftest.$ac_ext <<_ACEOF
6475 /* confdefs.h. */
6476 _ACEOF
6477 cat confdefs.h >>conftest.$ac_ext
6478 cat >>conftest.$ac_ext <<_ACEOF
6479 /* end confdefs.h. */
6480
6481 /* Test by Jim Wilson and Kaveh Ghazi.
6482 Check whether strncmp reads past the end of its string parameters. */
6483 #include <sys/types.h>
6484
6485 #ifdef HAVE_FCNTL_H
6486 #include <fcntl.h>
6487 #endif
6488
6489 #ifdef HAVE_SYS_MMAN_H
6490 #include <sys/mman.h>
6491 #endif
6492
6493 #ifndef MAP_ANON
6494 #ifdef MAP_ANONYMOUS
6495 #define MAP_ANON MAP_ANONYMOUS
6496 #else
6497 #define MAP_ANON MAP_FILE
6498 #endif
6499 #endif
6500
6501 #ifndef MAP_FILE
6502 #define MAP_FILE 0
6503 #endif
6504 #ifndef O_RDONLY
6505 #define O_RDONLY 0
6506 #endif
6507
6508 #define MAP_LEN 0x10000
6509
6510 main ()
6511 {
6512 #if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
6513 char *p;
6514 int dev_zero;
6515
6516 dev_zero = open ("/dev/zero", O_RDONLY);
6517 if (dev_zero < 0)
6518 exit (1);
6519
6520 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
6521 MAP_ANON|MAP_PRIVATE, dev_zero, 0);
6522 if (p == (char *)-1)
6523 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
6524 MAP_ANON|MAP_PRIVATE, -1, 0);
6525 if (p == (char *)-1)
6526 exit (2);
6527 else
6528 {
6529 char *string = "__si_type_info";
6530 char *q = (char *) p + MAP_LEN - strlen (string) - 2;
6531 char *r = (char *) p + 0xe;
6532
6533 strcpy (q, string);
6534 strcpy (r, string);
6535 strncmp (r, q, 14);
6536 }
6537 #endif /* HAVE_MMAP || HAVE_MMAP_ANYWHERE */
6538 exit (0);
6539 }
6540
6541 _ACEOF
6542 rm -f conftest$ac_exeext
6543 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6544 (eval $ac_link) 2>&5
6545 ac_status=$?
6546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6547 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6549 (eval $ac_try) 2>&5
6550 ac_status=$?
6551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6552 (exit $ac_status); }; }; then
6553 ac_cv_func_strncmp_works=yes
6554 else
6555 echo "$as_me: program exited with status $ac_status" >&5
6556 echo "$as_me: failed program was:" >&5
6557 sed 's/^/| /' conftest.$ac_ext >&5
6558
6559 ( exit $ac_status )
6560 ac_cv_func_strncmp_works=no
6561 fi
6562 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6563 fi
6564 rm -f core core.* *.core
6565 fi
6566 echo "$as_me:$LINENO: result: $ac_cv_func_strncmp_works" >&5
6567 echo "${ECHO_T}$ac_cv_func_strncmp_works" >&6
6568 if test $ac_cv_func_strncmp_works = no ; then
6569 case $LIBOBJS in
6570 "strncmp.$ac_objext" | \
6571 *" strncmp.$ac_objext" | \
6572 "strncmp.$ac_objext "* | \
6573 *" strncmp.$ac_objext "* ) ;;
6574 *) LIBOBJS="$LIBOBJS strncmp.$ac_objext" ;;
6575 esac
6576
6577 fi
6578
6579
6580 # Install a library built with a cross compiler in $(tooldir) rather
6581 # than $(libdir).
6582 if test -z "${with_cross_host}"; then
6583 INSTALL_DEST=libdir
6584 else
6585 INSTALL_DEST=tooldir
6586 fi
6587
6588
6589
6590 L=""
6591 for l in x $LIBOBJS; do
6592 case $l in
6593 x) ;;
6594 *) L="$L ./$l" ;;
6595 esac
6596 done
6597 LIBOBJS="$L"
6598
6599 # We need multilib support, but only if configuring for the target.
6600 ac_config_files="$ac_config_files Makefile testsuite/Makefile"
6601 ac_config_commands="$ac_config_commands default"
6602 cat >confcache <<\_ACEOF
6603 # This file is a shell script that caches the results of configure
6604 # tests run on this system so they can be shared between configure
6605 # scripts and configure runs, see configure's option --config-cache.
6606 # It is not useful on other systems. If it contains results you don't
6607 # want to keep, you may remove or edit it.
6608 #
6609 # config.status only pays attention to the cache file if you give it
6610 # the --recheck option to rerun configure.
6611 #
6612 # `ac_cv_env_foo' variables (set or unset) will be overridden when
6613 # loading this file, other *unset* `ac_cv_foo' will be assigned the
6614 # following values.
6615
6616 _ACEOF
6617
6618 # The following way of writing the cache mishandles newlines in values,
6619 # but we know of no workaround that is simple, portable, and efficient.
6620 # So, don't put newlines in cache variables' values.
6621 # Ultrix sh set writes to stderr and can't be redirected directly,
6622 # and sets the high bit in the cache file unless we assign to the vars.
6623 {
6624 (set) 2>&1 |
6625 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6626 *ac_space=\ *)
6627 # `set' does not quote correctly, so add quotes (double-quote
6628 # substitution turns \\\\ into \\, and sed turns \\ into \).
6629 sed -n \
6630 "s/'/'\\\\''/g;
6631 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
6632 ;;
6633 *)
6634 # `set' quotes correctly as required by POSIX, so do not add quotes.
6635 sed -n \
6636 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
6637 ;;
6638 esac;
6639 } |
6640 sed '
6641 t clear
6642 : clear
6643 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
6644 t end
6645 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
6646 : end' >>confcache
6647 if diff $cache_file confcache >/dev/null 2>&1; then :; else
6648 if test -w $cache_file; then
6649 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
6650 cat confcache >$cache_file
6651 else
6652 echo "not updating unwritable cache $cache_file"
6653 fi
6654 fi
6655 rm -f confcache
6656
6657 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6658 # Let make expand exec_prefix.
6659 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6660
6661 # VPATH may cause trouble with some makes, so we remove $(srcdir),
6662 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
6663 # trailing colons and then remove the whole line if VPATH becomes empty
6664 # (actually we leave an empty line to preserve line numbers).
6665 if test "x$srcdir" = x.; then
6666 ac_vpsub='/^[ ]*VPATH[ ]*=/{
6667 s/:*\$(srcdir):*/:/;
6668 s/:*\${srcdir}:*/:/;
6669 s/:*@srcdir@:*/:/;
6670 s/^\([^=]*=[ ]*\):*/\1/;
6671 s/:*$//;
6672 s/^[^=]*=[ ]*$//;
6673 }'
6674 fi
6675
6676 DEFS=-DHAVE_CONFIG_H
6677
6678 ac_libobjs=
6679 ac_ltlibobjs=
6680 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
6681 # 1. Remove the extension, and $U if already installed.
6682 ac_i=`echo "$ac_i" |
6683 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
6684 # 2. Add them.
6685 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
6686 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
6687 done
6688 LIBOBJS=$ac_libobjs
6689
6690 LTLIBOBJS=$ac_ltlibobjs
6691
6692
6693
6694 : ${CONFIG_STATUS=./config.status}
6695 ac_clean_files_save=$ac_clean_files
6696 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
6697 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
6698 echo "$as_me: creating $CONFIG_STATUS" >&6;}
6699 cat >$CONFIG_STATUS <<_ACEOF
6700 #! $SHELL
6701 # Generated by $as_me.
6702 # Run this file to recreate the current configuration.
6703 # Compiler output produced by configure, useful for debugging
6704 # configure, is in config.log if it exists.
6705
6706 debug=false
6707 ac_cs_recheck=false
6708 ac_cs_silent=false
6709 SHELL=\${CONFIG_SHELL-$SHELL}
6710 _ACEOF
6711
6712 cat >>$CONFIG_STATUS <<\_ACEOF
6713 ## --------------------- ##
6714 ## M4sh Initialization. ##
6715 ## --------------------- ##
6716
6717 # Be Bourne compatible
6718 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
6719 emulate sh
6720 NULLCMD=:
6721 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
6722 # is contrary to our usage. Disable this feature.
6723 alias -g '${1+"$@"}'='"$@"'
6724 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
6725 set -o posix
6726 fi
6727 DUALCASE=1; export DUALCASE # for MKS sh
6728
6729 # Support unset when possible.
6730 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
6731 as_unset=unset
6732 else
6733 as_unset=false
6734 fi
6735
6736
6737 # Work around bugs in pre-3.0 UWIN ksh.
6738 $as_unset ENV MAIL MAILPATH
6739 PS1='$ '
6740 PS2='> '
6741 PS4='+ '
6742
6743 # NLS nuisances.
6744 for as_var in \
6745 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
6746 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
6747 LC_TELEPHONE LC_TIME
6748 do
6749 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6750 eval $as_var=C; export $as_var
6751 else
6752 $as_unset $as_var
6753 fi
6754 done
6755
6756 # Required to use basename.
6757 if expr a : '\(a\)' >/dev/null 2>&1; then
6758 as_expr=expr
6759 else
6760 as_expr=false
6761 fi
6762
6763 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
6764 as_basename=basename
6765 else
6766 as_basename=false
6767 fi
6768
6769
6770 # Name of the executable.
6771 as_me=`$as_basename "$0" ||
6772 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
6773 X"$0" : 'X\(//\)$' \| \
6774 X"$0" : 'X\(/\)$' \| \
6775 . : '\(.\)' 2>/dev/null ||
6776 echo X/"$0" |
6777 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
6778 /^X\/\(\/\/\)$/{ s//\1/; q; }
6779 /^X\/\(\/\).*/{ s//\1/; q; }
6780 s/.*/./; q'`
6781
6782
6783 # PATH needs CR, and LINENO needs CR and PATH.
6784 # Avoid depending upon Character Ranges.
6785 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
6786 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
6787 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
6788 as_cr_digits='0123456789'
6789 as_cr_alnum=$as_cr_Letters$as_cr_digits
6790
6791 # The user is always right.
6792 if test "${PATH_SEPARATOR+set}" != set; then
6793 echo "#! /bin/sh" >conf$$.sh
6794 echo "exit 0" >>conf$$.sh
6795 chmod +x conf$$.sh
6796 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6797 PATH_SEPARATOR=';'
6798 else
6799 PATH_SEPARATOR=:
6800 fi
6801 rm -f conf$$.sh
6802 fi
6803
6804
6805 as_lineno_1=$LINENO
6806 as_lineno_2=$LINENO
6807 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
6808 test "x$as_lineno_1" != "x$as_lineno_2" &&
6809 test "x$as_lineno_3" = "x$as_lineno_2" || {
6810 # Find who we are. Look in the path if we contain no path at all
6811 # relative or not.
6812 case $0 in
6813 *[\\/]* ) as_myself=$0 ;;
6814 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6815 for as_dir in $PATH
6816 do
6817 IFS=$as_save_IFS
6818 test -z "$as_dir" && as_dir=.
6819 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
6820 done
6821
6822 ;;
6823 esac
6824 # We did not find ourselves, most probably we were run as `sh COMMAND'
6825 # in which case we are not to be found in the path.
6826 if test "x$as_myself" = x; then
6827 as_myself=$0
6828 fi
6829 if test ! -f "$as_myself"; then
6830 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
6831 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
6832 { (exit 1); exit 1; }; }
6833 fi
6834 case $CONFIG_SHELL in
6835 '')
6836 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6837 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
6838 do
6839 IFS=$as_save_IFS
6840 test -z "$as_dir" && as_dir=.
6841 for as_base in sh bash ksh sh5; do
6842 case $as_dir in
6843 /*)
6844 if ("$as_dir/$as_base" -c '
6845 as_lineno_1=$LINENO
6846 as_lineno_2=$LINENO
6847 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
6848 test "x$as_lineno_1" != "x$as_lineno_2" &&
6849 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
6850 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
6851 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
6852 CONFIG_SHELL=$as_dir/$as_base
6853 export CONFIG_SHELL
6854 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
6855 fi;;
6856 esac
6857 done
6858 done
6859 ;;
6860 esac
6861
6862 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
6863 # uniformly replaced by the line number. The first 'sed' inserts a
6864 # line-number line before each line; the second 'sed' does the real
6865 # work. The second script uses 'N' to pair each line-number line
6866 # with the numbered line, and appends trailing '-' during
6867 # substitution so that $LINENO is not a special case at line end.
6868 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
6869 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
6870 sed '=' <$as_myself |
6871 sed '
6872 N
6873 s,$,-,
6874 : loop
6875 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
6876 t loop
6877 s,-$,,
6878 s,^['$as_cr_digits']*\n,,
6879 ' >$as_me.lineno &&
6880 chmod +x $as_me.lineno ||
6881 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
6882 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
6883 { (exit 1); exit 1; }; }
6884
6885 # Don't try to exec as it changes $[0], causing all sort of problems
6886 # (the dirname of $[0] is not the place where we might find the
6887 # original and so on. Autoconf is especially sensible to this).
6888 . ./$as_me.lineno
6889 # Exit status is that of the last command.
6890 exit
6891 }
6892
6893
6894 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
6895 *c*,-n*) ECHO_N= ECHO_C='
6896 ' ECHO_T=' ' ;;
6897 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
6898 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
6899 esac
6900
6901 if expr a : '\(a\)' >/dev/null 2>&1; then
6902 as_expr=expr
6903 else
6904 as_expr=false
6905 fi
6906
6907 rm -f conf$$ conf$$.exe conf$$.file
6908 echo >conf$$.file
6909 if ln -s conf$$.file conf$$ 2>/dev/null; then
6910 # We could just check for DJGPP; but this test a) works b) is more generic
6911 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
6912 if test -f conf$$.exe; then
6913 # Don't use ln at all; we don't have any links
6914 as_ln_s='cp -p'
6915 else
6916 as_ln_s='ln -s'
6917 fi
6918 elif ln conf$$.file conf$$ 2>/dev/null; then
6919 as_ln_s=ln
6920 else
6921 as_ln_s='cp -p'
6922 fi
6923 rm -f conf$$ conf$$.exe conf$$.file
6924
6925 if mkdir -p . 2>/dev/null; then
6926 as_mkdir_p=:
6927 else
6928 test -d ./-p && rmdir ./-p
6929 as_mkdir_p=false
6930 fi
6931
6932 as_executable_p="test -f"
6933
6934 # Sed expression to map a string onto a valid CPP name.
6935 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
6936
6937 # Sed expression to map a string onto a valid variable name.
6938 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
6939
6940
6941 # IFS
6942 # We need space, tab and new line, in precisely that order.
6943 as_nl='
6944 '
6945 IFS=" $as_nl"
6946
6947 # CDPATH.
6948 $as_unset CDPATH
6949
6950 exec 6>&1
6951
6952 # Open the log real soon, to keep \$[0] and so on meaningful, and to
6953 # report actual input values of CONFIG_FILES etc. instead of their
6954 # values after options handling. Logging --version etc. is OK.
6955 exec 5>>config.log
6956 {
6957 echo
6958 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
6959 ## Running $as_me. ##
6960 _ASBOX
6961 } >&5
6962 cat >&5 <<_CSEOF
6963
6964 This file was extended by $as_me, which was
6965 generated by GNU Autoconf 2.58. Invocation command line was
6966
6967 CONFIG_FILES = $CONFIG_FILES
6968 CONFIG_HEADERS = $CONFIG_HEADERS
6969 CONFIG_LINKS = $CONFIG_LINKS
6970 CONFIG_COMMANDS = $CONFIG_COMMANDS
6971 $ $0 $@
6972
6973 _CSEOF
6974 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
6975 echo >&5
6976 _ACEOF
6977
6978 # Files that config.status was made for.
6979 if test -n "$ac_config_files"; then
6980 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
6981 fi
6982
6983 if test -n "$ac_config_headers"; then
6984 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
6985 fi
6986
6987 if test -n "$ac_config_links"; then
6988 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
6989 fi
6990
6991 if test -n "$ac_config_commands"; then
6992 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
6993 fi
6994
6995 cat >>$CONFIG_STATUS <<\_ACEOF
6996
6997 ac_cs_usage="\
6998 \`$as_me' instantiates files from templates according to the
6999 current configuration.
7000
7001 Usage: $0 [OPTIONS] [FILE]...
7002
7003 -h, --help print this help, then exit
7004 -V, --version print version number, then exit
7005 -q, --quiet do not print progress messages
7006 -d, --debug don't remove temporary files
7007 --recheck update $as_me by reconfiguring in the same conditions
7008 --file=FILE[:TEMPLATE]
7009 instantiate the configuration file FILE
7010 --header=FILE[:TEMPLATE]
7011 instantiate the configuration header FILE
7012
7013 Configuration files:
7014 $config_files
7015
7016 Configuration headers:
7017 $config_headers
7018
7019 Configuration commands:
7020 $config_commands
7021
7022 Report bugs to <bug-autoconf@gnu.org>."
7023 _ACEOF
7024
7025 cat >>$CONFIG_STATUS <<_ACEOF
7026 ac_cs_version="\\
7027 config.status
7028 configured by $0, generated by GNU Autoconf 2.58,
7029 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
7030
7031 Copyright (C) 2003 Free Software Foundation, Inc.
7032 This config.status script is free software; the Free Software Foundation
7033 gives unlimited permission to copy, distribute and modify it."
7034 srcdir=$srcdir
7035 INSTALL="$INSTALL"
7036 _ACEOF
7037
7038 cat >>$CONFIG_STATUS <<\_ACEOF
7039 # If no file are specified by the user, then we need to provide default
7040 # value. By we need to know if files were specified by the user.
7041 ac_need_defaults=:
7042 while test $# != 0
7043 do
7044 case $1 in
7045 --*=*)
7046 ac_option=`expr "x$1" : 'x\([^=]*\)='`
7047 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
7048 ac_shift=:
7049 ;;
7050 -*)
7051 ac_option=$1
7052 ac_optarg=$2
7053 ac_shift=shift
7054 ;;
7055 *) # This is not an option, so the user has probably given explicit
7056 # arguments.
7057 ac_option=$1
7058 ac_need_defaults=false;;
7059 esac
7060
7061 case $ac_option in
7062 # Handling of the options.
7063 _ACEOF
7064 cat >>$CONFIG_STATUS <<\_ACEOF
7065 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7066 ac_cs_recheck=: ;;
7067 --version | --vers* | -V )
7068 echo "$ac_cs_version"; exit 0 ;;
7069 --he | --h)
7070 # Conflict between --help and --header
7071 { { echo "$as_me:$LINENO: error: ambiguous option: $1
7072 Try \`$0 --help' for more information." >&5
7073 echo "$as_me: error: ambiguous option: $1
7074 Try \`$0 --help' for more information." >&2;}
7075 { (exit 1); exit 1; }; };;
7076 --help | --hel | -h )
7077 echo "$ac_cs_usage"; exit 0 ;;
7078 --debug | --d* | -d )
7079 debug=: ;;
7080 --file | --fil | --fi | --f )
7081 $ac_shift
7082 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
7083 ac_need_defaults=false;;
7084 --header | --heade | --head | --hea )
7085 $ac_shift
7086 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
7087 ac_need_defaults=false;;
7088 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
7089 | -silent | --silent | --silen | --sile | --sil | --si | --s)
7090 ac_cs_silent=: ;;
7091
7092 # This is an error.
7093 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
7094 Try \`$0 --help' for more information." >&5
7095 echo "$as_me: error: unrecognized option: $1
7096 Try \`$0 --help' for more information." >&2;}
7097 { (exit 1); exit 1; }; } ;;
7098
7099 *) ac_config_targets="$ac_config_targets $1" ;;
7100
7101 esac
7102 shift
7103 done
7104
7105 ac_configure_extra_args=
7106
7107 if $ac_cs_silent; then
7108 exec 6>/dev/null
7109 ac_configure_extra_args="$ac_configure_extra_args --silent"
7110 fi
7111
7112 _ACEOF
7113 cat >>$CONFIG_STATUS <<_ACEOF
7114 if \$ac_cs_recheck; then
7115 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
7116 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
7117 fi
7118
7119 _ACEOF
7120
7121 cat >>$CONFIG_STATUS <<_ACEOF
7122 #
7123 # INIT-COMMANDS section.
7124 #
7125
7126 srcdir=${srcdir}
7127 host=${host}
7128 target=${target}
7129 with_target_subdir=${with_target_subdir}
7130 with_build_subdir=${with_build_subdir}
7131 with_multisubdir=${with_multisubdir}
7132 ac_configure_args="--enable-multilib ${ac_configure_args}"
7133 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
7134 ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
7135 libiberty_topdir=${libiberty_topdir}
7136
7137
7138 _ACEOF
7139
7140
7141
7142 cat >>$CONFIG_STATUS <<\_ACEOF
7143 for ac_config_target in $ac_config_targets
7144 do
7145 case "$ac_config_target" in
7146 # Handling of arguments.
7147 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
7148 "testsuite/Makefile" ) CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
7149 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
7150 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
7151 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
7152 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
7153 { (exit 1); exit 1; }; };;
7154 esac
7155 done
7156
7157 # If the user did not use the arguments to specify the items to instantiate,
7158 # then the envvar interface is used. Set only those that are not.
7159 # We use the long form for the default assignment because of an extremely
7160 # bizarre bug on SunOS 4.1.3.
7161 if $ac_need_defaults; then
7162 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
7163 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
7164 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
7165 fi
7166
7167 # Have a temporary directory for convenience. Make it in the build tree
7168 # simply because there is no reason to put it here, and in addition,
7169 # creating and moving files from /tmp can sometimes cause problems.
7170 # Create a temporary directory, and hook for its removal unless debugging.
7171 $debug ||
7172 {
7173 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
7174 trap '{ (exit 1); exit 1; }' 1 2 13 15
7175 }
7176
7177 # Create a (secure) tmp directory for tmp files.
7178
7179 {
7180 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
7181 test -n "$tmp" && test -d "$tmp"
7182 } ||
7183 {
7184 tmp=./confstat$$-$RANDOM
7185 (umask 077 && mkdir $tmp)
7186 } ||
7187 {
7188 echo "$me: cannot create a temporary directory in ." >&2
7189 { (exit 1); exit 1; }
7190 }
7191
7192 _ACEOF
7193
7194 cat >>$CONFIG_STATUS <<_ACEOF
7195
7196 #
7197 # CONFIG_FILES section.
7198 #
7199
7200 # No need to generate the scripts if there are no CONFIG_FILES.
7201 # This happens for instance when ./config.status config.h
7202 if test -n "\$CONFIG_FILES"; then
7203 # Protect against being on the right side of a sed subst in config.status.
7204 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
7205 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
7206 s,@SHELL@,$SHELL,;t t
7207 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
7208 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
7209 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
7210 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
7211 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
7212 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
7213 s,@exec_prefix@,$exec_prefix,;t t
7214 s,@prefix@,$prefix,;t t
7215 s,@program_transform_name@,$program_transform_name,;t t
7216 s,@bindir@,$bindir,;t t
7217 s,@sbindir@,$sbindir,;t t
7218 s,@libexecdir@,$libexecdir,;t t
7219 s,@datadir@,$datadir,;t t
7220 s,@sysconfdir@,$sysconfdir,;t t
7221 s,@sharedstatedir@,$sharedstatedir,;t t
7222 s,@localstatedir@,$localstatedir,;t t
7223 s,@libdir@,$libdir,;t t
7224 s,@includedir@,$includedir,;t t
7225 s,@oldincludedir@,$oldincludedir,;t t
7226 s,@infodir@,$infodir,;t t
7227 s,@mandir@,$mandir,;t t
7228 s,@build_alias@,$build_alias,;t t
7229 s,@host_alias@,$host_alias,;t t
7230 s,@target_alias@,$target_alias,;t t
7231 s,@DEFS@,$DEFS,;t t
7232 s,@ECHO_C@,$ECHO_C,;t t
7233 s,@ECHO_N@,$ECHO_N,;t t
7234 s,@ECHO_T@,$ECHO_T,;t t
7235 s,@LIBS@,$LIBS,;t t
7236 s,@libiberty_topdir@,$libiberty_topdir,;t t
7237 s,@MAINT@,$MAINT,;t t
7238 s,@NOTMAINT@,$NOTMAINT,;t t
7239 s,@MAKEINFO@,$MAKEINFO,;t t
7240 s,@BUILD_INFO@,$BUILD_INFO,;t t
7241 s,@PERL@,$PERL,;t t
7242 s,@HAVE_PERL@,$HAVE_PERL,;t t
7243 s,@build@,$build,;t t
7244 s,@build_cpu@,$build_cpu,;t t
7245 s,@build_vendor@,$build_vendor,;t t
7246 s,@build_os@,$build_os,;t t
7247 s,@host@,$host,;t t
7248 s,@host_cpu@,$host_cpu,;t t
7249 s,@host_vendor@,$host_vendor,;t t
7250 s,@host_os@,$host_os,;t t
7251 s,@AR@,$AR,;t t
7252 s,@ac_ct_AR@,$ac_ct_AR,;t t
7253 s,@RANLIB@,$RANLIB,;t t
7254 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
7255 s,@CC@,$CC,;t t
7256 s,@CFLAGS@,$CFLAGS,;t t
7257 s,@LDFLAGS@,$LDFLAGS,;t t
7258 s,@CPPFLAGS@,$CPPFLAGS,;t t
7259 s,@ac_ct_CC@,$ac_ct_CC,;t t
7260 s,@EXEEXT@,$EXEEXT,;t t
7261 s,@OBJEXT@,$OBJEXT,;t t
7262 s,@CPP@,$CPP,;t t
7263 s,@ac_libiberty_warn_cflags@,$ac_libiberty_warn_cflags,;t t
7264 s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
7265 s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
7266 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
7267 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
7268 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
7269 s,@EGREP@,$EGREP,;t t
7270 s,@LIBOBJS@,$LIBOBJS,;t t
7271 s,@CHECK@,$CHECK,;t t
7272 s,@target_header_dir@,$target_header_dir,;t t
7273 s,@pexecute@,$pexecute,;t t
7274 s,@INSTALL_DEST@,$INSTALL_DEST,;t t
7275 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
7276 /@host_makefile_frag@/r $host_makefile_frag
7277 s,@host_makefile_frag@,,;t t
7278 CEOF
7279
7280 _ACEOF
7281
7282 cat >>$CONFIG_STATUS <<\_ACEOF
7283 # Split the substitutions into bite-sized pieces for seds with
7284 # small command number limits, like on Digital OSF/1 and HP-UX.
7285 ac_max_sed_lines=48
7286 ac_sed_frag=1 # Number of current file.
7287 ac_beg=1 # First line for current file.
7288 ac_end=$ac_max_sed_lines # Line after last line for current file.
7289 ac_more_lines=:
7290 ac_sed_cmds=
7291 while $ac_more_lines; do
7292 if test $ac_beg -gt 1; then
7293 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
7294 else
7295 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
7296 fi
7297 if test ! -s $tmp/subs.frag; then
7298 ac_more_lines=false
7299 else
7300 # The purpose of the label and of the branching condition is to
7301 # speed up the sed processing (if there are no `@' at all, there
7302 # is no need to browse any of the substitutions).
7303 # These are the two extra sed commands mentioned above.
7304 (echo ':t
7305 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
7306 if test -z "$ac_sed_cmds"; then
7307 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
7308 else
7309 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
7310 fi
7311 ac_sed_frag=`expr $ac_sed_frag + 1`
7312 ac_beg=$ac_end
7313 ac_end=`expr $ac_end + $ac_max_sed_lines`
7314 fi
7315 done
7316 if test -z "$ac_sed_cmds"; then
7317 ac_sed_cmds=cat
7318 fi
7319 fi # test -n "$CONFIG_FILES"
7320
7321 _ACEOF
7322 cat >>$CONFIG_STATUS <<\_ACEOF
7323 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
7324 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7325 case $ac_file in
7326 - | *:- | *:-:* ) # input from stdin
7327 cat >$tmp/stdin
7328 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
7329 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
7330 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
7331 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
7332 * ) ac_file_in=$ac_file.in ;;
7333 esac
7334
7335 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
7336 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
7337 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7338 X"$ac_file" : 'X\(//\)[^/]' \| \
7339 X"$ac_file" : 'X\(//\)$' \| \
7340 X"$ac_file" : 'X\(/\)' \| \
7341 . : '\(.\)' 2>/dev/null ||
7342 echo X"$ac_file" |
7343 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
7344 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
7345 /^X\(\/\/\)$/{ s//\1/; q; }
7346 /^X\(\/\).*/{ s//\1/; q; }
7347 s/.*/./; q'`
7348 { if $as_mkdir_p; then
7349 mkdir -p "$ac_dir"
7350 else
7351 as_dir="$ac_dir"
7352 as_dirs=
7353 while test ! -d "$as_dir"; do
7354 as_dirs="$as_dir $as_dirs"
7355 as_dir=`(dirname "$as_dir") 2>/dev/null ||
7356 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7357 X"$as_dir" : 'X\(//\)[^/]' \| \
7358 X"$as_dir" : 'X\(//\)$' \| \
7359 X"$as_dir" : 'X\(/\)' \| \
7360 . : '\(.\)' 2>/dev/null ||
7361 echo X"$as_dir" |
7362 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
7363 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
7364 /^X\(\/\/\)$/{ s//\1/; q; }
7365 /^X\(\/\).*/{ s//\1/; q; }
7366 s/.*/./; q'`
7367 done
7368 test ! -n "$as_dirs" || mkdir $as_dirs
7369 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
7370 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
7371 { (exit 1); exit 1; }; }; }
7372
7373 ac_builddir=.
7374
7375 if test "$ac_dir" != .; then
7376 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
7377 # A "../" for each directory in $ac_dir_suffix.
7378 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
7379 else
7380 ac_dir_suffix= ac_top_builddir=
7381 fi
7382
7383 case $srcdir in
7384 .) # No --srcdir option. We are building in place.
7385 ac_srcdir=.
7386 if test -z "$ac_top_builddir"; then
7387 ac_top_srcdir=.
7388 else
7389 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
7390 fi ;;
7391 [\\/]* | ?:[\\/]* ) # Absolute path.
7392 ac_srcdir=$srcdir$ac_dir_suffix;
7393 ac_top_srcdir=$srcdir ;;
7394 *) # Relative path.
7395 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
7396 ac_top_srcdir=$ac_top_builddir$srcdir ;;
7397 esac
7398 case "$ac_dir" in
7399 .) ac_abs_builddir=$ac_builddir;;
7400 *)
7401 case $ac_builddir in
7402 .) ac_abs_builddir="$ac_dir";;
7403 [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;;
7404 *) ac_abs_builddir="$ac_dir"/$ac_builddir;;
7405 esac;;
7406 esac
7407 case "$ac_dir" in
7408 .) ac_abs_top_builddir=${ac_top_builddir}.;;
7409 *)
7410 case ${ac_top_builddir}. in
7411 .) ac_abs_top_builddir="$ac_dir";;
7412 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
7413 *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;;
7414 esac;;
7415 esac
7416 case "$ac_dir" in
7417 .) ac_abs_srcdir=$ac_srcdir;;
7418 *)
7419 case $ac_srcdir in
7420 .) ac_abs_srcdir="$ac_dir";;
7421 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
7422 *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;;
7423 esac;;
7424 esac
7425 case "$ac_dir" in
7426 .) ac_abs_top_srcdir=$ac_top_srcdir;;
7427 *)
7428 case $ac_top_srcdir in
7429 .) ac_abs_top_srcdir="$ac_dir";;
7430 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
7431 *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;;
7432 esac;;
7433 esac
7434
7435
7436 case $INSTALL in
7437 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
7438 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
7439 esac
7440
7441 if test x"$ac_file" != x-; then
7442 { echo "$as_me:$LINENO: creating $ac_file" >&5
7443 echo "$as_me: creating $ac_file" >&6;}
7444 rm -f "$ac_file"
7445 fi
7446 # Let's still pretend it is `configure' which instantiates (i.e., don't
7447 # use $as_me), people would be surprised to read:
7448 # /* config.h. Generated by config.status. */
7449 if test x"$ac_file" = x-; then
7450 configure_input=
7451 else
7452 configure_input="$ac_file. "
7453 fi
7454 configure_input=$configure_input"Generated from `echo $ac_file_in |
7455 sed 's,.*/,,'` by configure."
7456
7457 # First look for the input files in the build tree, otherwise in the
7458 # src tree.
7459 ac_file_inputs=`IFS=:
7460 for f in $ac_file_in; do
7461 case $f in
7462 -) echo $tmp/stdin ;;
7463 [\\/$]*)
7464 # Absolute (can't be DOS-style, as IFS=:)
7465 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
7466 echo "$as_me: error: cannot find input file: $f" >&2;}
7467 { (exit 1); exit 1; }; }
7468 echo "$f";;
7469 *) # Relative
7470 if test -f "$f"; then
7471 # Build tree
7472 echo "$f"
7473 elif test -f "$srcdir/$f"; then
7474 # Source tree
7475 echo "$srcdir/$f"
7476 else
7477 # /dev/null tree
7478 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
7479 echo "$as_me: error: cannot find input file: $f" >&2;}
7480 { (exit 1); exit 1; }; }
7481 fi;;
7482 esac
7483 done` || { (exit 1); exit 1; }
7484 _ACEOF
7485 cat >>$CONFIG_STATUS <<_ACEOF
7486 sed "$ac_vpsub
7487 $extrasub
7488 _ACEOF
7489 cat >>$CONFIG_STATUS <<\_ACEOF
7490 :t
7491 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
7492 s,@configure_input@,$configure_input,;t t
7493 s,@srcdir@,$ac_srcdir,;t t
7494 s,@abs_srcdir@,$ac_abs_srcdir,;t t
7495 s,@top_srcdir@,$ac_top_srcdir,;t t
7496 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
7497 s,@builddir@,$ac_builddir,;t t
7498 s,@abs_builddir@,$ac_abs_builddir,;t t
7499 s,@top_builddir@,$ac_top_builddir,;t t
7500 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
7501 s,@INSTALL@,$ac_INSTALL,;t t
7502 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
7503 rm -f $tmp/stdin
7504 if test x"$ac_file" != x-; then
7505 mv $tmp/out $ac_file
7506 else
7507 cat $tmp/out
7508 rm -f $tmp/out
7509 fi
7510
7511 done
7512 _ACEOF
7513 cat >>$CONFIG_STATUS <<\_ACEOF
7514
7515 #
7516 # CONFIG_HEADER section.
7517 #
7518
7519 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7520 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7521 #
7522 # ac_d sets the value in "#define NAME VALUE" lines.
7523 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7524 ac_dB='[ ].*$,\1#\2'
7525 ac_dC=' '
7526 ac_dD=',;t'
7527 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7528 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7529 ac_uB='$,\1#\2define\3'
7530 ac_uC=' '
7531 ac_uD=',;t'
7532
7533 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
7534 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7535 case $ac_file in
7536 - | *:- | *:-:* ) # input from stdin
7537 cat >$tmp/stdin
7538 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
7539 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
7540 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
7541 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
7542 * ) ac_file_in=$ac_file.in ;;
7543 esac
7544
7545 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
7546 echo "$as_me: creating $ac_file" >&6;}
7547
7548 # First look for the input files in the build tree, otherwise in the
7549 # src tree.
7550 ac_file_inputs=`IFS=:
7551 for f in $ac_file_in; do
7552 case $f in
7553 -) echo $tmp/stdin ;;
7554 [\\/$]*)
7555 # Absolute (can't be DOS-style, as IFS=:)
7556 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
7557 echo "$as_me: error: cannot find input file: $f" >&2;}
7558 { (exit 1); exit 1; }; }
7559 # Do quote $f, to prevent DOS paths from being IFS'd.
7560 echo "$f";;
7561 *) # Relative
7562 if test -f "$f"; then
7563 # Build tree
7564 echo "$f"
7565 elif test -f "$srcdir/$f"; then
7566 # Source tree
7567 echo "$srcdir/$f"
7568 else
7569 # /dev/null tree
7570 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
7571 echo "$as_me: error: cannot find input file: $f" >&2;}
7572 { (exit 1); exit 1; }; }
7573 fi;;
7574 esac
7575 done` || { (exit 1); exit 1; }
7576 # Remove the trailing spaces.
7577 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
7578
7579 _ACEOF
7580
7581 # Transform confdefs.h into two sed scripts, `conftest.defines' and
7582 # `conftest.undefs', that substitutes the proper values into
7583 # config.h.in to produce config.h. The first handles `#define'
7584 # templates, and the second `#undef' templates.
7585 # And first: Protect against being on the right side of a sed subst in
7586 # config.status. Protect against being in an unquoted here document
7587 # in config.status.
7588 rm -f conftest.defines conftest.undefs
7589 # Using a here document instead of a string reduces the quoting nightmare.
7590 # Putting comments in sed scripts is not portable.
7591 #
7592 # `end' is used to avoid that the second main sed command (meant for
7593 # 0-ary CPP macros) applies to n-ary macro definitions.
7594 # See the Autoconf documentation for `clear'.
7595 cat >confdef2sed.sed <<\_ACEOF
7596 s/[\\&,]/\\&/g
7597 s,[\\$`],\\&,g
7598 t clear
7599 : clear
7600 s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
7601 t end
7602 s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
7603 : end
7604 _ACEOF
7605 # If some macros were called several times there might be several times
7606 # the same #defines, which is useless. Nevertheless, we may not want to
7607 # sort them, since we want the *last* AC-DEFINE to be honored.
7608 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
7609 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
7610 rm -f confdef2sed.sed
7611
7612 # This sed command replaces #undef with comments. This is necessary, for
7613 # example, in the case of _POSIX_SOURCE, which is predefined and required
7614 # on some systems where configure will not decide to define it.
7615 cat >>conftest.undefs <<\_ACEOF
7616 s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
7617 _ACEOF
7618
7619 # Break up conftest.defines because some shells have a limit on the size
7620 # of here documents, and old seds have small limits too (100 cmds).
7621 echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
7622 echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
7623 echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
7624 echo ' :' >>$CONFIG_STATUS
7625 rm -f conftest.tail
7626 while grep . conftest.defines >/dev/null
7627 do
7628 # Write a limited-size here document to $tmp/defines.sed.
7629 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
7630 # Speed up: don't consider the non `#define' lines.
7631 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
7632 # Work around the forget-to-reset-the-flag bug.
7633 echo 't clr' >>$CONFIG_STATUS
7634 echo ': clr' >>$CONFIG_STATUS
7635 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
7636 echo 'CEOF
7637 sed -f $tmp/defines.sed $tmp/in >$tmp/out
7638 rm -f $tmp/in
7639 mv $tmp/out $tmp/in
7640 ' >>$CONFIG_STATUS
7641 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
7642 rm -f conftest.defines
7643 mv conftest.tail conftest.defines
7644 done
7645 rm -f conftest.defines
7646 echo ' fi # grep' >>$CONFIG_STATUS
7647 echo >>$CONFIG_STATUS
7648
7649 # Break up conftest.undefs because some shells have a limit on the size
7650 # of here documents, and old seds have small limits too (100 cmds).
7651 echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
7652 rm -f conftest.tail
7653 while grep . conftest.undefs >/dev/null
7654 do
7655 # Write a limited-size here document to $tmp/undefs.sed.
7656 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
7657 # Speed up: don't consider the non `#undef'
7658 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
7659 # Work around the forget-to-reset-the-flag bug.
7660 echo 't clr' >>$CONFIG_STATUS
7661 echo ': clr' >>$CONFIG_STATUS
7662 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
7663 echo 'CEOF
7664 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
7665 rm -f $tmp/in
7666 mv $tmp/out $tmp/in
7667 ' >>$CONFIG_STATUS
7668 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
7669 rm -f conftest.undefs
7670 mv conftest.tail conftest.undefs
7671 done
7672 rm -f conftest.undefs
7673
7674 cat >>$CONFIG_STATUS <<\_ACEOF
7675 # Let's still pretend it is `configure' which instantiates (i.e., don't
7676 # use $as_me), people would be surprised to read:
7677 # /* config.h. Generated by config.status. */
7678 if test x"$ac_file" = x-; then
7679 echo "/* Generated by configure. */" >$tmp/config.h
7680 else
7681 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
7682 fi
7683 cat $tmp/in >>$tmp/config.h
7684 rm -f $tmp/in
7685 if test x"$ac_file" != x-; then
7686 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
7687 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
7688 echo "$as_me: $ac_file is unchanged" >&6;}
7689 else
7690 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
7691 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7692 X"$ac_file" : 'X\(//\)[^/]' \| \
7693 X"$ac_file" : 'X\(//\)$' \| \
7694 X"$ac_file" : 'X\(/\)' \| \
7695 . : '\(.\)' 2>/dev/null ||
7696 echo X"$ac_file" |
7697 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
7698 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
7699 /^X\(\/\/\)$/{ s//\1/; q; }
7700 /^X\(\/\).*/{ s//\1/; q; }
7701 s/.*/./; q'`
7702 { if $as_mkdir_p; then
7703 mkdir -p "$ac_dir"
7704 else
7705 as_dir="$ac_dir"
7706 as_dirs=
7707 while test ! -d "$as_dir"; do
7708 as_dirs="$as_dir $as_dirs"
7709 as_dir=`(dirname "$as_dir") 2>/dev/null ||
7710 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7711 X"$as_dir" : 'X\(//\)[^/]' \| \
7712 X"$as_dir" : 'X\(//\)$' \| \
7713 X"$as_dir" : 'X\(/\)' \| \
7714 . : '\(.\)' 2>/dev/null ||
7715 echo X"$as_dir" |
7716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
7717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
7718 /^X\(\/\/\)$/{ s//\1/; q; }
7719 /^X\(\/\).*/{ s//\1/; q; }
7720 s/.*/./; q'`
7721 done
7722 test ! -n "$as_dirs" || mkdir $as_dirs
7723 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
7724 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
7725 { (exit 1); exit 1; }; }; }
7726
7727 rm -f $ac_file
7728 mv $tmp/config.h $ac_file
7729 fi
7730 else
7731 cat $tmp/config.h
7732 rm -f $tmp/config.h
7733 fi
7734 done
7735 _ACEOF
7736 cat >>$CONFIG_STATUS <<\_ACEOF
7737
7738 #
7739 # CONFIG_COMMANDS section.
7740 #
7741 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
7742 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
7743 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
7744 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
7745 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7746 X"$ac_dest" : 'X\(//\)[^/]' \| \
7747 X"$ac_dest" : 'X\(//\)$' \| \
7748 X"$ac_dest" : 'X\(/\)' \| \
7749 . : '\(.\)' 2>/dev/null ||
7750 echo X"$ac_dest" |
7751 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
7752 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
7753 /^X\(\/\/\)$/{ s//\1/; q; }
7754 /^X\(\/\).*/{ s//\1/; q; }
7755 s/.*/./; q'`
7756 { if $as_mkdir_p; then
7757 mkdir -p "$ac_dir"
7758 else
7759 as_dir="$ac_dir"
7760 as_dirs=
7761 while test ! -d "$as_dir"; do
7762 as_dirs="$as_dir $as_dirs"
7763 as_dir=`(dirname "$as_dir") 2>/dev/null ||
7764 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7765 X"$as_dir" : 'X\(//\)[^/]' \| \
7766 X"$as_dir" : 'X\(//\)$' \| \
7767 X"$as_dir" : 'X\(/\)' \| \
7768 . : '\(.\)' 2>/dev/null ||
7769 echo X"$as_dir" |
7770 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
7771 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
7772 /^X\(\/\/\)$/{ s//\1/; q; }
7773 /^X\(\/\).*/{ s//\1/; q; }
7774 s/.*/./; q'`
7775 done
7776 test ! -n "$as_dirs" || mkdir $as_dirs
7777 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
7778 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
7779 { (exit 1); exit 1; }; }; }
7780
7781 ac_builddir=.
7782
7783 if test "$ac_dir" != .; then
7784 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
7785 # A "../" for each directory in $ac_dir_suffix.
7786 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
7787 else
7788 ac_dir_suffix= ac_top_builddir=
7789 fi
7790
7791 case $srcdir in
7792 .) # No --srcdir option. We are building in place.
7793 ac_srcdir=.
7794 if test -z "$ac_top_builddir"; then
7795 ac_top_srcdir=.
7796 else
7797 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
7798 fi ;;
7799 [\\/]* | ?:[\\/]* ) # Absolute path.
7800 ac_srcdir=$srcdir$ac_dir_suffix;
7801 ac_top_srcdir=$srcdir ;;
7802 *) # Relative path.
7803 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
7804 ac_top_srcdir=$ac_top_builddir$srcdir ;;
7805 esac
7806 case "$ac_dir" in
7807 .) ac_abs_builddir=$ac_builddir;;
7808 *)
7809 case $ac_builddir in
7810 .) ac_abs_builddir="$ac_dir";;
7811 [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;;
7812 *) ac_abs_builddir="$ac_dir"/$ac_builddir;;
7813 esac;;
7814 esac
7815 case "$ac_dir" in
7816 .) ac_abs_top_builddir=${ac_top_builddir}.;;
7817 *)
7818 case ${ac_top_builddir}. in
7819 .) ac_abs_top_builddir="$ac_dir";;
7820 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
7821 *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;;
7822 esac;;
7823 esac
7824 case "$ac_dir" in
7825 .) ac_abs_srcdir=$ac_srcdir;;
7826 *)
7827 case $ac_srcdir in
7828 .) ac_abs_srcdir="$ac_dir";;
7829 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
7830 *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;;
7831 esac;;
7832 esac
7833 case "$ac_dir" in
7834 .) ac_abs_top_srcdir=$ac_top_srcdir;;
7835 *)
7836 case $ac_top_srcdir in
7837 .) ac_abs_top_srcdir="$ac_dir";;
7838 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
7839 *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;;
7840 esac;;
7841 esac
7842
7843
7844 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
7845 echo "$as_me: executing $ac_dest commands" >&6;}
7846 case $ac_dest in
7847 default ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
7848 if test -n "$CONFIG_FILES"; then
7849 if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then
7850 # FIXME: We shouldn't need to set ac_file
7851 ac_file=Makefile
7852 LD="${ORIGINAL_LD_FOR_MULTILIBS}"
7853 . ${libiberty_topdir}/config-ml.in
7854 fi
7855 fi ;;
7856 esac
7857 done
7858 _ACEOF
7859
7860 cat >>$CONFIG_STATUS <<\_ACEOF
7861
7862 { (exit 0); exit 0; }
7863 _ACEOF
7864 chmod +x $CONFIG_STATUS
7865 ac_clean_files=$ac_clean_files_save
7866
7867
7868 # configure is writing to config.log, and then calls config.status.
7869 # config.status does its own redirection, appending to config.log.
7870 # Unfortunately, on DOS this fails, as config.log is still kept open
7871 # by configure, so config.status won't be able to write to it; its
7872 # output is simply discarded. So we exec the FD to /dev/null,
7873 # effectively closing config.log, so it can be properly (re)opened and
7874 # appended to by config.status. When coming back to configure, we
7875 # need to make the FD available again.
7876 if test "$no_create" != yes; then
7877 ac_cs_success=:
7878 ac_config_status_args=
7879 test "$silent" = yes &&
7880 ac_config_status_args="$ac_config_status_args --quiet"
7881 exec 5>/dev/null
7882 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
7883 exec 5>>config.log
7884 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
7885 # would make configure fail if this is the last instruction.
7886 $ac_cs_success || { (exit 1); exit 1; }
7887 fi
7888
This page took 0.259589 seconds and 5 git commands to generate.