OSDN Git Service

libcpp/
[pf3gnuchains/gcc-fork.git] / gcc / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.59.
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="tree.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 build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict_warn cxx_compat_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
313 ac_subst_files='language_hooks'
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 ac_env_GMPLIBS_set=${GMPLIBS+set}
774 ac_env_GMPLIBS_value=$GMPLIBS
775 ac_cv_env_GMPLIBS_set=${GMPLIBS+set}
776 ac_cv_env_GMPLIBS_value=$GMPLIBS
777 ac_env_GMPINC_set=${GMPINC+set}
778 ac_env_GMPINC_value=$GMPINC
779 ac_cv_env_GMPINC_set=${GMPINC+set}
780 ac_cv_env_GMPINC_value=$GMPINC
781
782 #
783 # Report the --help message.
784 #
785 if test "$ac_init_help" = "long"; then
786   # Omit some internal or obsolete options to make the list less imposing.
787   # This message is too long to be a string in the A/UX 3.1 sh.
788   cat <<_ACEOF
789 \`configure' configures this package to adapt to many kinds of systems.
790
791 Usage: $0 [OPTION]... [VAR=VALUE]...
792
793 To assign environment variables (e.g., CC, CFLAGS...), specify them as
794 VAR=VALUE.  See below for descriptions of some of the useful variables.
795
796 Defaults for the options are specified in brackets.
797
798 Configuration:
799   -h, --help              display this help and exit
800       --help=short        display options specific to this package
801       --help=recursive    display the short help of all the included packages
802   -V, --version           display version information and exit
803   -q, --quiet, --silent   do not print \`checking...' messages
804       --cache-file=FILE   cache test results in FILE [disabled]
805   -C, --config-cache      alias for \`--cache-file=config.cache'
806   -n, --no-create         do not create output files
807       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
808
809 _ACEOF
810
811   cat <<_ACEOF
812 Installation directories:
813   --prefix=PREFIX         install architecture-independent files in PREFIX
814                           [$ac_default_prefix]
815   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
816                           [PREFIX]
817
818 By default, \`make install' will install all the files in
819 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
820 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
821 for instance \`--prefix=\$HOME'.
822
823 For better control, use the options below.
824
825 Fine tuning of the installation directories:
826   --bindir=DIR           user executables [EPREFIX/bin]
827   --sbindir=DIR          system admin executables [EPREFIX/sbin]
828   --libexecdir=DIR       program executables [EPREFIX/libexec]
829   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
830   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
831   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
832   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
833   --libdir=DIR           object code libraries [EPREFIX/lib]
834   --includedir=DIR       C header files [PREFIX/include]
835   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
836   --infodir=DIR          info documentation [PREFIX/info]
837   --mandir=DIR           man documentation [PREFIX/man]
838 _ACEOF
839
840   cat <<\_ACEOF
841
842 Program names:
843   --program-prefix=PREFIX            prepend PREFIX to installed program names
844   --program-suffix=SUFFIX            append SUFFIX to installed program names
845   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
846
847 System types:
848   --build=BUILD     configure for building on BUILD [guessed]
849   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
850   --target=TARGET   configure for building compilers for TARGET [HOST]
851 _ACEOF
852 fi
853
854 if test -n "$ac_init_help"; then
855
856   cat <<\_ACEOF
857
858 Optional Features:
859   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
860   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
861   --enable-generated-files-in-srcdir
862                           put copies of generated files in source dir
863                           intended for creating source tarballs for users
864                           without texinfo bison or flex.
865   --enable-werror-always         enable -Werror always
866   --enable-checking=LIST
867                           enable expensive run-time checks.  With LIST,
868                           enable only specific categories of checks.
869                           Categories are: yes,no,all,none,release.
870                           Flags are: assert,fold,gc,gcac,misc,
871                           rtlflag,rtl,runtime,tree,valgrind.
872   --enable-mapped-location   location_t is fileline integer cookie
873   --enable-coverage=LEVEL
874                           enable compiler's code coverage collection.
875                           Use to measure compiler performance and locate
876                           unused parts of the compiler. With LEVEL, specify
877                           optimization. Values are opt, noopt,
878                           default is noopt
879   --enable-gather-detailed-mem-stats         enable detailed memory allocation stats gathering
880   --enable-multilib       enable library support for multiple ABIs
881   --enable-__cxa_atexit   enable __cxa_atexit for C++
882   --enable-decimal-float={no,yes,bid,dpd}
883                         enable decimal float extension to C.  Selecting 'bid'
884                         or 'dpd' choses which decimal floating point format
885                         to use
886   --enable-threads        enable thread usage for target GCC
887   --enable-threads=LIB    use LIB thread package for target GCC
888   --enable-tls            enable or disable generation of tls code
889                           overriding the assembler check for tls support
890   --enable-objc-gc        enable the use of Boehm's garbage collector with
891                           the GNU Objective-C runtime
892   --disable-shared        don't provide a shared libgcc
893   --enable-intermodule    build the compiler in one step
894   --enable-languages=LIST specify which front-ends to build
895   --disable-rpath         do not hardcode runtime library paths
896   --enable-initfini-array       use .init_array/.fini_array sections
897   --enable-sjlj-exceptions
898                           arrange to use setjmp/longjmp exception handling
899   --enable-secureplt      enable -msecure-plt by default for PowerPC
900   --disable-win32-registry
901                           disable lookup of installation paths in the
902                           Registry on Windows hosts
903   --enable-win32-registry enable registry lookup (default)
904   --enable-win32-registry=KEY
905                           use KEY instead of GCC version as the last portion
906                           of the registry key
907   --enable-maintainer-mode
908                           enable make rules and dependencies not useful
909                           (and sometimes confusing) to the casual installer
910   --enable-version-specific-runtime-libs
911                           specify that runtime libraries should be
912                           installed in a compiler-specific directory
913
914 Optional Packages:
915   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
916   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
917   --with-build-libsubdir=DIR  Directory where to find libraries for build system
918   --with-local-prefix=DIR specifies directory to put local include
919   --with-gxx-include-dir=DIR
920                           specifies directory to put g++ header files
921   --with-cpp-install-dir=DIR
922                           install the user visible C preprocessor in DIR
923                           (relative to PREFIX) as well as PREFIX/bin
924   --with-gnu-ld           arrange to work with GNU ld.
925   --with-ld               arrange to use the specified ld (full pathname)
926   --with-demangler-in-ld  try to use demangler in GNU ld.
927   --with-gnu-as           arrange to work with GNU as
928   --with-as               arrange to use the specified as (full pathname)
929   --with-stabs            arrange to use stabs instead of host debug format
930   --with-dwarf2           force the default debug format to be DWARF 2
931   --with-build-sysroot=sysroot
932                           use sysroot as the system root during the build
933   --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
934   --with-gnu-ld           assume the C compiler uses GNU ld default=no
935   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
936   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
937   --with-system-libunwind use installed libunwind
938   --with-long-double-128  Use 128-bit long double by default.
939   --with-gc={page,zone}   choose the garbage collection mechanism to use
940                           with the compiler
941   --with-system-zlib      use installed libz
942   --with-slibdir=DIR      shared libraries in DIR [LIBDIR]
943   --with-datarootdir=DIR  Use DIR as the data root [PREFIX/share]
944   --with-docdir=DIR       Install documentation in DIR [DATAROOTDIR]
945   --with-htmldir=DIR      html documentation in in DIR [DOCDIR]
946
947 Some influential environment variables:
948   CC          C compiler command
949   CFLAGS      C compiler flags
950   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
951               nonstandard directory <lib dir>
952   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
953               headers in a nonstandard directory <include dir>
954   CPP         C preprocessor
955   GMPLIBS     How to link GMP
956   GMPINC      How to find GMP include files
957
958 Use these variables to override the choices made by `configure' or to help
959 it to find libraries and programs with nonstandard names/locations.
960
961 _ACEOF
962 fi
963
964 if test "$ac_init_help" = "recursive"; then
965   # If there are subdirs, report their specific --help.
966   ac_popdir=`pwd`
967   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
968     test -d $ac_dir || continue
969     ac_builddir=.
970
971 if test "$ac_dir" != .; then
972   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
973   # A "../" for each directory in $ac_dir_suffix.
974   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
975 else
976   ac_dir_suffix= ac_top_builddir=
977 fi
978
979 case $srcdir in
980   .)  # No --srcdir option.  We are building in place.
981     ac_srcdir=.
982     if test -z "$ac_top_builddir"; then
983        ac_top_srcdir=.
984     else
985        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
986     fi ;;
987   [\\/]* | ?:[\\/]* )  # Absolute path.
988     ac_srcdir=$srcdir$ac_dir_suffix;
989     ac_top_srcdir=$srcdir ;;
990   *) # Relative path.
991     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
992     ac_top_srcdir=$ac_top_builddir$srcdir ;;
993 esac
994
995 # Do not use `cd foo && pwd` to compute absolute paths, because
996 # the directories may not exist.
997 case `pwd` in
998 .) ac_abs_builddir="$ac_dir";;
999 *)
1000   case "$ac_dir" in
1001   .) ac_abs_builddir=`pwd`;;
1002   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1003   *) ac_abs_builddir=`pwd`/"$ac_dir";;
1004   esac;;
1005 esac
1006 case $ac_abs_builddir in
1007 .) ac_abs_top_builddir=${ac_top_builddir}.;;
1008 *)
1009   case ${ac_top_builddir}. in
1010   .) ac_abs_top_builddir=$ac_abs_builddir;;
1011   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
1012   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
1013   esac;;
1014 esac
1015 case $ac_abs_builddir in
1016 .) ac_abs_srcdir=$ac_srcdir;;
1017 *)
1018   case $ac_srcdir in
1019   .) ac_abs_srcdir=$ac_abs_builddir;;
1020   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1021   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1022   esac;;
1023 esac
1024 case $ac_abs_builddir in
1025 .) ac_abs_top_srcdir=$ac_top_srcdir;;
1026 *)
1027   case $ac_top_srcdir in
1028   .) ac_abs_top_srcdir=$ac_abs_builddir;;
1029   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1030   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1031   esac;;
1032 esac
1033
1034     cd $ac_dir
1035     # Check for guested configure; otherwise get Cygnus style configure.
1036     if test -f $ac_srcdir/configure.gnu; then
1037       echo
1038       $SHELL $ac_srcdir/configure.gnu  --help=recursive
1039     elif test -f $ac_srcdir/configure; then
1040       echo
1041       $SHELL $ac_srcdir/configure  --help=recursive
1042     elif test -f $ac_srcdir/configure.ac ||
1043            test -f $ac_srcdir/configure.in; then
1044       echo
1045       $ac_configure --help
1046     else
1047       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1048     fi
1049     cd $ac_popdir
1050   done
1051 fi
1052
1053 test -n "$ac_init_help" && exit 0
1054 if $ac_init_version; then
1055   cat <<\_ACEOF
1056
1057 Copyright (C) 2003 Free Software Foundation, Inc.
1058 This configure script is free software; the Free Software Foundation
1059 gives unlimited permission to copy, distribute and modify it.
1060 _ACEOF
1061   exit 0
1062 fi
1063 exec 5>config.log
1064 cat >&5 <<_ACEOF
1065 This file contains any messages produced by compilers while
1066 running configure, to aid debugging if configure makes a mistake.
1067
1068 It was created by $as_me, which was
1069 generated by GNU Autoconf 2.59.  Invocation command line was
1070
1071   $ $0 $@
1072
1073 _ACEOF
1074 {
1075 cat <<_ASUNAME
1076 ## --------- ##
1077 ## Platform. ##
1078 ## --------- ##
1079
1080 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1081 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1082 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1083 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1084 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1085
1086 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1087 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1088
1089 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1090 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1091 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1092 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1093 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1094 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1095 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1096
1097 _ASUNAME
1098
1099 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1100 for as_dir in $PATH
1101 do
1102   IFS=$as_save_IFS
1103   test -z "$as_dir" && as_dir=.
1104   echo "PATH: $as_dir"
1105 done
1106
1107 } >&5
1108
1109 cat >&5 <<_ACEOF
1110
1111
1112 ## ----------- ##
1113 ## Core tests. ##
1114 ## ----------- ##
1115
1116 _ACEOF
1117
1118
1119 # Keep a trace of the command line.
1120 # Strip out --no-create and --no-recursion so they do not pile up.
1121 # Strip out --silent because we don't want to record it for future runs.
1122 # Also quote any args containing shell meta-characters.
1123 # Make two passes to allow for proper duplicate-argument suppression.
1124 ac_configure_args=
1125 ac_configure_args0=
1126 ac_configure_args1=
1127 ac_sep=
1128 ac_must_keep_next=false
1129 for ac_pass in 1 2
1130 do
1131   for ac_arg
1132   do
1133     case $ac_arg in
1134     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1135     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1136     | -silent | --silent | --silen | --sile | --sil)
1137       continue ;;
1138     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1139       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1140     esac
1141     case $ac_pass in
1142     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1143     2)
1144       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1145       if test $ac_must_keep_next = true; then
1146         ac_must_keep_next=false # Got value, back to normal.
1147       else
1148         case $ac_arg in
1149           *=* | --config-cache | -C | -disable-* | --disable-* \
1150           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1151           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1152           | -with-* | --with-* | -without-* | --without-* | --x)
1153             case "$ac_configure_args0 " in
1154               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1155             esac
1156             ;;
1157           -* ) ac_must_keep_next=true ;;
1158         esac
1159       fi
1160       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1161       # Get rid of the leading space.
1162       ac_sep=" "
1163       ;;
1164     esac
1165   done
1166 done
1167 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1168 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1169
1170 # When interrupted or exit'd, cleanup temporary files, and complete
1171 # config.log.  We remove comments because anyway the quotes in there
1172 # would cause problems or look ugly.
1173 # WARNING: Be sure not to use single quotes in there, as some shells,
1174 # such as our DU 5.0 friend, will then `close' the trap.
1175 trap 'exit_status=$?
1176   # Save into config.log some information that might help in debugging.
1177   {
1178     echo
1179
1180     cat <<\_ASBOX
1181 ## ---------------- ##
1182 ## Cache variables. ##
1183 ## ---------------- ##
1184 _ASBOX
1185     echo
1186     # The following way of writing the cache mishandles newlines in values,
1187 {
1188   (set) 2>&1 |
1189     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1190     *ac_space=\ *)
1191       sed -n \
1192         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1193           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1194       ;;
1195     *)
1196       sed -n \
1197         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1198       ;;
1199     esac;
1200 }
1201     echo
1202
1203     cat <<\_ASBOX
1204 ## ----------------- ##
1205 ## Output variables. ##
1206 ## ----------------- ##
1207 _ASBOX
1208     echo
1209     for ac_var in $ac_subst_vars
1210     do
1211       eval ac_val=$`echo $ac_var`
1212       echo "$ac_var='"'"'$ac_val'"'"'"
1213     done | sort
1214     echo
1215
1216     if test -n "$ac_subst_files"; then
1217       cat <<\_ASBOX
1218 ## ------------- ##
1219 ## Output files. ##
1220 ## ------------- ##
1221 _ASBOX
1222       echo
1223       for ac_var in $ac_subst_files
1224       do
1225         eval ac_val=$`echo $ac_var`
1226         echo "$ac_var='"'"'$ac_val'"'"'"
1227       done | sort
1228       echo
1229     fi
1230
1231     if test -s confdefs.h; then
1232       cat <<\_ASBOX
1233 ## ----------- ##
1234 ## confdefs.h. ##
1235 ## ----------- ##
1236 _ASBOX
1237       echo
1238       sed "/^$/d" confdefs.h | sort
1239       echo
1240     fi
1241     test "$ac_signal" != 0 &&
1242       echo "$as_me: caught signal $ac_signal"
1243     echo "$as_me: exit $exit_status"
1244   } >&5
1245   rm -f core *.core &&
1246   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1247     exit $exit_status
1248      ' 0
1249 for ac_signal in 1 2 13 15; do
1250   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1251 done
1252 ac_signal=0
1253
1254 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1255 rm -rf conftest* confdefs.h
1256 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1257 echo >confdefs.h
1258
1259 # Predefined preprocessor variables.
1260
1261 cat >>confdefs.h <<_ACEOF
1262 #define PACKAGE_NAME "$PACKAGE_NAME"
1263 _ACEOF
1264
1265
1266 cat >>confdefs.h <<_ACEOF
1267 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1268 _ACEOF
1269
1270
1271 cat >>confdefs.h <<_ACEOF
1272 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1273 _ACEOF
1274
1275
1276 cat >>confdefs.h <<_ACEOF
1277 #define PACKAGE_STRING "$PACKAGE_STRING"
1278 _ACEOF
1279
1280
1281 cat >>confdefs.h <<_ACEOF
1282 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1283 _ACEOF
1284
1285
1286 # Let the site file select an alternate cache file if it wants to.
1287 # Prefer explicitly selected file to automatically selected ones.
1288 if test -z "$CONFIG_SITE"; then
1289   if test "x$prefix" != xNONE; then
1290     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1291   else
1292     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1293   fi
1294 fi
1295 for ac_site_file in $CONFIG_SITE; do
1296   if test -r "$ac_site_file"; then
1297     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1298 echo "$as_me: loading site script $ac_site_file" >&6;}
1299     sed 's/^/| /' "$ac_site_file" >&5
1300     . "$ac_site_file"
1301   fi
1302 done
1303
1304 if test -r "$cache_file"; then
1305   # Some versions of bash will fail to source /dev/null (special
1306   # files actually), so we avoid doing that.
1307   if test -f "$cache_file"; then
1308     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1309 echo "$as_me: loading cache $cache_file" >&6;}
1310     case $cache_file in
1311       [\\/]* | ?:[\\/]* ) . $cache_file;;
1312       *)                      . ./$cache_file;;
1313     esac
1314   fi
1315 else
1316   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1317 echo "$as_me: creating cache $cache_file" >&6;}
1318   >$cache_file
1319 fi
1320
1321 # Check that the precious variables saved in the cache have kept the same
1322 # value.
1323 ac_cache_corrupted=false
1324 for ac_var in `(set) 2>&1 |
1325                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1326   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1327   eval ac_new_set=\$ac_env_${ac_var}_set
1328   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1329   eval ac_new_val="\$ac_env_${ac_var}_value"
1330   case $ac_old_set,$ac_new_set in
1331     set,)
1332       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1333 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1334       ac_cache_corrupted=: ;;
1335     ,set)
1336       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1337 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1338       ac_cache_corrupted=: ;;
1339     ,);;
1340     *)
1341       if test "x$ac_old_val" != "x$ac_new_val"; then
1342         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1343 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1344         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1345 echo "$as_me:   former value:  $ac_old_val" >&2;}
1346         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1347 echo "$as_me:   current value: $ac_new_val" >&2;}
1348         ac_cache_corrupted=:
1349       fi;;
1350   esac
1351   # Pass precious variables to config.status.
1352   if test "$ac_new_set" = set; then
1353     case $ac_new_val in
1354     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1355       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1356     *) ac_arg=$ac_var=$ac_new_val ;;
1357     esac
1358     case " $ac_configure_args " in
1359       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1360       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1361     esac
1362   fi
1363 done
1364 if $ac_cache_corrupted; then
1365   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1366 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1367   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1368 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1369    { (exit 1); exit 1; }; }
1370 fi
1371
1372 ac_ext=c
1373 ac_cpp='$CPP $CPPFLAGS'
1374 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1375 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1376 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397           ac_config_headers="$ac_config_headers auto-host.h:config.in"
1398
1399
1400 gcc_version=`cat $srcdir/BASE-VER`
1401
1402 # Determine the host, build, and target systems
1403 ac_aux_dir=
1404 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1405   if test -f $ac_dir/install-sh; then
1406     ac_aux_dir=$ac_dir
1407     ac_install_sh="$ac_aux_dir/install-sh -c"
1408     break
1409   elif test -f $ac_dir/install.sh; then
1410     ac_aux_dir=$ac_dir
1411     ac_install_sh="$ac_aux_dir/install.sh -c"
1412     break
1413   elif test -f $ac_dir/shtool; then
1414     ac_aux_dir=$ac_dir
1415     ac_install_sh="$ac_aux_dir/shtool install -c"
1416     break
1417   fi
1418 done
1419 if test -z "$ac_aux_dir"; then
1420   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1421 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1422    { (exit 1); exit 1; }; }
1423 fi
1424 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1425 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1426 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1427
1428 # Make sure we can run config.sub.
1429 $ac_config_sub sun4 >/dev/null 2>&1 ||
1430   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1431 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1432    { (exit 1); exit 1; }; }
1433
1434 echo "$as_me:$LINENO: checking build system type" >&5
1435 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1436 if test "${ac_cv_build+set}" = set; then
1437   echo $ECHO_N "(cached) $ECHO_C" >&6
1438 else
1439   ac_cv_build_alias=$build_alias
1440 test -z "$ac_cv_build_alias" &&
1441   ac_cv_build_alias=`$ac_config_guess`
1442 test -z "$ac_cv_build_alias" &&
1443   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1444 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1445    { (exit 1); exit 1; }; }
1446 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1447   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1448 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1449    { (exit 1); exit 1; }; }
1450
1451 fi
1452 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1453 echo "${ECHO_T}$ac_cv_build" >&6
1454 build=$ac_cv_build
1455 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1456 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1457 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1458
1459
1460 echo "$as_me:$LINENO: checking host system type" >&5
1461 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1462 if test "${ac_cv_host+set}" = set; then
1463   echo $ECHO_N "(cached) $ECHO_C" >&6
1464 else
1465   ac_cv_host_alias=$host_alias
1466 test -z "$ac_cv_host_alias" &&
1467   ac_cv_host_alias=$ac_cv_build_alias
1468 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1469   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1470 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1471    { (exit 1); exit 1; }; }
1472
1473 fi
1474 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1475 echo "${ECHO_T}$ac_cv_host" >&6
1476 host=$ac_cv_host
1477 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1478 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1479 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1480
1481
1482 echo "$as_me:$LINENO: checking target system type" >&5
1483 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1484 if test "${ac_cv_target+set}" = set; then
1485   echo $ECHO_N "(cached) $ECHO_C" >&6
1486 else
1487   ac_cv_target_alias=$target_alias
1488 test "x$ac_cv_target_alias" = "x" &&
1489   ac_cv_target_alias=$ac_cv_host_alias
1490 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1491   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1492 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1493    { (exit 1); exit 1; }; }
1494
1495 fi
1496 echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1497 echo "${ECHO_T}$ac_cv_target" >&6
1498 target=$ac_cv_target
1499 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1500 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1501 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1502
1503
1504 # The aliases save the names the user supplied, while $host etc.
1505 # will get canonicalized.
1506 test -n "$target_alias" &&
1507   test "$program_prefix$program_suffix$program_transform_name" = \
1508     NONENONEs,x,x, &&
1509   program_prefix=${target_alias}-
1510
1511 # Determine the noncanonical target name, for directory use.
1512  case ${build_alias} in
1513   "") build_noncanonical=${build} ;;
1514   *) build_noncanonical=${build_alias} ;;
1515 esac
1516
1517  case ${host_alias} in
1518   "") host_noncanonical=${build_noncanonical} ;;
1519   *) host_noncanonical=${host_alias} ;;
1520 esac
1521
1522  case ${target_alias} in
1523   "") target_noncanonical=${host_noncanonical} ;;
1524   *) target_noncanonical=${target_alias} ;;
1525 esac
1526
1527
1528
1529
1530 # Determine the target- and build-specific subdirectories
1531
1532 # post-stage1 host modules use a different CC_FOR_BUILD so, in order to
1533 # have matching libraries, they should use host libraries: Makefile.tpl
1534 # arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
1535 # However, they still use the build modules, because the corresponding
1536 # host modules (e.g. bison) are only built for the host when bootstrap
1537 # finishes. So:
1538 # - build_subdir is where we find build modules, and never changes.
1539 # - build_libsubdir is where we find build libraries, and can be overridden.
1540
1541 # Prefix 'build-' so this never conflicts with target_subdir.
1542 build_subdir="build-${build_noncanonical}"
1543
1544 # Check whether --with-build-libsubdir or --without-build-libsubdir was given.
1545 if test "${with_build_libsubdir+set}" = set; then
1546   withval="$with_build_libsubdir"
1547   build_libsubdir="$withval"
1548 else
1549   build_libsubdir="$build_subdir"
1550 fi;
1551 # --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
1552 if ( test $srcdir = . && test -d gcc ) \
1553    || test -d $srcdir/../host-${host_noncanonical}; then
1554   host_subdir="host-${host_noncanonical}"
1555 else
1556   host_subdir=.
1557 fi
1558 # No prefix.
1559 target_subdir=${target_noncanonical}
1560
1561
1562 # Set program_transform_name
1563 test "$program_prefix" != NONE &&
1564   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1565 # Use a double $ so make ignores it.
1566 test "$program_suffix" != NONE &&
1567   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1568 # Double any \ or $.  echo might interpret backslashes.
1569 # By default was `s,x,x', remove it if useless.
1570 cat <<\_ACEOF >conftest.sed
1571 s/[\\$]/&&/g;s/;s,x,x,$//
1572 _ACEOF
1573 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1574 rm conftest.sed
1575
1576
1577 # Check for bogus environment variables.
1578 # Test if LIBRARY_PATH contains the notation for the current directory
1579 # since this would lead to problems installing/building glibc.
1580 # LIBRARY_PATH contains the current directory if one of the following
1581 # is true:
1582 # - one of the terminals (":" and ";") is the first or last sign
1583 # - two terminals occur directly after each other
1584 # - the path contains an element with a dot in it
1585 echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
1586 echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6
1587 case ${LIBRARY_PATH} in
1588   [:\;]* | *[:\;] | *[:\;][:\;]* |  *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1589     library_path_setting="contains current directory"
1590     ;;
1591   *)
1592     library_path_setting="ok"
1593     ;;
1594 esac
1595 echo "$as_me:$LINENO: result: $library_path_setting" >&5
1596 echo "${ECHO_T}$library_path_setting" >&6
1597 if test "$library_path_setting" != "ok"; then
1598 { { echo "$as_me:$LINENO: error:
1599 *** LIBRARY_PATH shouldn't contain the current directory when
1600 *** building gcc. Please change the environment variable
1601 *** and run configure again." >&5
1602 echo "$as_me: error:
1603 *** LIBRARY_PATH shouldn't contain the current directory when
1604 *** building gcc. Please change the environment variable
1605 *** and run configure again." >&2;}
1606    { (exit 1); exit 1; }; }
1607 fi
1608
1609 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
1610 # since this would lead to problems installing/building glibc.
1611 # GCC_EXEC_PREFIX contains the current directory if one of the following
1612 # is true:
1613 # - one of the terminals (":" and ";") is the first or last sign
1614 # - two terminals occur directly after each other
1615 # - the path contains an element with a dot in it
1616 echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
1617 echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6
1618 case ${GCC_EXEC_PREFIX} in
1619   [:\;]* | *[:\;] | *[:\;][:\;]* |  *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
1620     gcc_exec_prefix_setting="contains current directory"
1621     ;;
1622   *)
1623     gcc_exec_prefix_setting="ok"
1624     ;;
1625 esac
1626 echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
1627 echo "${ECHO_T}$gcc_exec_prefix_setting" >&6
1628 if test "$gcc_exec_prefix_setting" != "ok"; then
1629 { { echo "$as_me:$LINENO: error:
1630 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
1631 *** building gcc. Please change the environment variable
1632 *** and run configure again." >&5
1633 echo "$as_me: error:
1634 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
1635 *** building gcc. Please change the environment variable
1636 *** and run configure again." >&2;}
1637    { (exit 1); exit 1; }; }
1638 fi
1639
1640 # -----------
1641 # Directories
1642 # -----------
1643
1644 # Specify the local prefix
1645 local_prefix=
1646
1647 # Check whether --with-local-prefix or --without-local-prefix was given.
1648 if test "${with_local_prefix+set}" = set; then
1649   withval="$with_local_prefix"
1650   case "${withval}" in
1651 yes)    { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
1652 echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
1653    { (exit 1); exit 1; }; } ;;
1654 no)     ;;
1655 *)      local_prefix=$with_local_prefix ;;
1656 esac
1657 fi;
1658
1659 # Default local prefix if it is empty
1660 if test x$local_prefix = x; then
1661         local_prefix=/usr/local
1662 fi
1663
1664 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
1665 # passed in by the toplevel make and thus we'd get different behavior
1666 # depending on where we built the sources.
1667 gcc_gxx_include_dir=
1668 # Specify the g++ header file directory
1669
1670 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1671 if test "${with_gxx_include_dir+set}" = set; then
1672   withval="$with_gxx_include_dir"
1673   case "${withval}" in
1674 yes)    { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
1675 echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
1676    { (exit 1); exit 1; }; } ;;
1677 no)     ;;
1678 *)      gcc_gxx_include_dir=$with_gxx_include_dir ;;
1679 esac
1680 fi;
1681
1682 # This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
1683 if test x${gcc_gxx_include_dir} = x; then
1684   if test x${enable_version_specific_runtime_libs} = xyes; then
1685     gcc_gxx_include_dir='${libsubdir}/include/c++'
1686   else
1687     libstdcxx_incdir='include/c++/$(version)'
1688     if test x$host != x$target; then
1689        libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
1690     fi
1691     gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/$libstdcxx_incdir"
1692   fi
1693 fi
1694
1695
1696 # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given.
1697 if test "${with_cpp_install_dir+set}" = set; then
1698   withval="$with_cpp_install_dir"
1699   if test x$withval = xyes; then
1700   { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
1701 echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
1702    { (exit 1); exit 1; }; }
1703 elif test x$withval != xno; then
1704   cpp_install_dir=$withval
1705 fi
1706 fi;
1707
1708 # We would like to our source tree to be readonly.  However when releases or
1709 # pre-releases are generated, the flex/bison generated files as well as the
1710 # various formats of manuals need to be included along with the rest of the
1711 # sources.  Therefore we have --enable-generated-files-in-srcdir to do
1712 # just that.
1713
1714 echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
1715 echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6
1716     # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given.
1717 if test "${enable_generated_files_in_srcdir+set}" = set; then
1718   enableval="$enable_generated_files_in_srcdir"
1719   generated_files_in_srcdir=$enableval
1720 else
1721   generated_files_in_srcdir=no
1722 fi;
1723
1724 echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
1725 echo "${ECHO_T}$generated_files_in_srcdir" >&6
1726
1727 if test "$generated_files_in_srcdir" = "yes"; then
1728   GENINSRC=''
1729 else
1730   GENINSRC='#'
1731 fi
1732
1733
1734 # -------------------
1735 # Find default linker
1736 # -------------------
1737
1738 # With GNU ld
1739
1740 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1741 if test "${with_gnu_ld+set}" = set; then
1742   withval="$with_gnu_ld"
1743   gnu_ld_flag="$with_gnu_ld"
1744 else
1745   gnu_ld_flag=no
1746 fi;
1747
1748 # With pre-defined ld
1749
1750 # Check whether --with-ld or --without-ld was given.
1751 if test "${with_ld+set}" = set; then
1752   withval="$with_ld"
1753   DEFAULT_LINKER="$with_ld"
1754 fi;
1755 if test x"${DEFAULT_LINKER+set}" = x"set"; then
1756   if test ! -x "$DEFAULT_LINKER"; then
1757     { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
1758 echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
1759    { (exit 1); exit 1; }; }
1760   elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1761     gnu_ld_flag=yes
1762   fi
1763
1764 cat >>confdefs.h <<_ACEOF
1765 #define DEFAULT_LINKER "$DEFAULT_LINKER"
1766 _ACEOF
1767
1768 fi
1769
1770 echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
1771 echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6
1772 if test x"${DEFAULT_LINKER+set}" = x"set"; then
1773   if test x"$gnu_ld_flag" = x"no"; then
1774     echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
1775 echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6
1776   else
1777     echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
1778 echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6
1779   fi
1780 else
1781   echo "$as_me:$LINENO: result: no" >&5
1782 echo "${ECHO_T}no" >&6
1783 fi
1784
1785 # With demangler in GNU ld
1786
1787 # Check whether --with-demangler-in-ld or --without-demangler-in-ld was given.
1788 if test "${with_demangler_in_ld+set}" = set; then
1789   withval="$with_demangler_in_ld"
1790   demangler_in_ld="$with_demangler_in_ld"
1791 else
1792   demangler_in_ld=no
1793 fi;
1794
1795 # ----------------------
1796 # Find default assembler
1797 # ----------------------
1798
1799 # With GNU as
1800
1801 # Check whether --with-gnu-as or --without-gnu-as was given.
1802 if test "${with_gnu_as+set}" = set; then
1803   withval="$with_gnu_as"
1804   gas_flag="$with_gnu_as"
1805 else
1806   gas_flag=no
1807 fi;
1808
1809
1810 # Check whether --with-as or --without-as was given.
1811 if test "${with_as+set}" = set; then
1812   withval="$with_as"
1813   DEFAULT_ASSEMBLER="$with_as"
1814 fi;
1815 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1816   if test ! -x "$DEFAULT_ASSEMBLER"; then
1817     { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
1818 echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
1819    { (exit 1); exit 1; }; }
1820   elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
1821     gas_flag=yes
1822   fi
1823
1824 cat >>confdefs.h <<_ACEOF
1825 #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
1826 _ACEOF
1827
1828 fi
1829
1830 echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
1831 echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6
1832 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
1833   if test x"$gas_flag" = x"no"; then
1834     echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
1835 echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6
1836   else
1837     echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
1838 echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6
1839   fi
1840 else
1841   echo "$as_me:$LINENO: result: no" >&5
1842 echo "${ECHO_T}no" >&6
1843 fi
1844
1845 # ---------------
1846 # Find C compiler
1847 # ---------------
1848
1849 # If a non-executable a.out is present (e.g. created by GNU as above even if
1850 # invoked with -v only), the IRIX 6 native ld just overwrites the existing
1851 # file, even when creating an executable, so an execution test fails.
1852 # Remove possible default executable files to avoid this.
1853 #
1854 # FIXME: This really belongs into AC_PROG_CC and can be removed once
1855 # Autoconf includes it.
1856 rm -f a.out a.exe b.out
1857
1858 # Find the native compiler
1859 ac_ext=c
1860 ac_cpp='$CPP $CPPFLAGS'
1861 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1862 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1863 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1864 if test -n "$ac_tool_prefix"; then
1865   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1866 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1867 echo "$as_me:$LINENO: checking for $ac_word" >&5
1868 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1869 if test "${ac_cv_prog_CC+set}" = set; then
1870   echo $ECHO_N "(cached) $ECHO_C" >&6
1871 else
1872   if test -n "$CC"; then
1873   ac_cv_prog_CC="$CC" # Let the user override the test.
1874 else
1875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1876 for as_dir in $PATH
1877 do
1878   IFS=$as_save_IFS
1879   test -z "$as_dir" && as_dir=.
1880   for ac_exec_ext in '' $ac_executable_extensions; do
1881   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1882     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1883     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1884     break 2
1885   fi
1886 done
1887 done
1888
1889 fi
1890 fi
1891 CC=$ac_cv_prog_CC
1892 if test -n "$CC"; then
1893   echo "$as_me:$LINENO: result: $CC" >&5
1894 echo "${ECHO_T}$CC" >&6
1895 else
1896   echo "$as_me:$LINENO: result: no" >&5
1897 echo "${ECHO_T}no" >&6
1898 fi
1899
1900 fi
1901 if test -z "$ac_cv_prog_CC"; then
1902   ac_ct_CC=$CC
1903   # Extract the first word of "gcc", so it can be a program name with args.
1904 set dummy gcc; ac_word=$2
1905 echo "$as_me:$LINENO: checking for $ac_word" >&5
1906 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1907 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1908   echo $ECHO_N "(cached) $ECHO_C" >&6
1909 else
1910   if test -n "$ac_ct_CC"; then
1911   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1912 else
1913 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1914 for as_dir in $PATH
1915 do
1916   IFS=$as_save_IFS
1917   test -z "$as_dir" && as_dir=.
1918   for ac_exec_ext in '' $ac_executable_extensions; do
1919   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1920     ac_cv_prog_ac_ct_CC="gcc"
1921     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1922     break 2
1923   fi
1924 done
1925 done
1926
1927 fi
1928 fi
1929 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1930 if test -n "$ac_ct_CC"; then
1931   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1932 echo "${ECHO_T}$ac_ct_CC" >&6
1933 else
1934   echo "$as_me:$LINENO: result: no" >&5
1935 echo "${ECHO_T}no" >&6
1936 fi
1937
1938   CC=$ac_ct_CC
1939 else
1940   CC="$ac_cv_prog_CC"
1941 fi
1942
1943 if test -z "$CC"; then
1944   if test -n "$ac_tool_prefix"; then
1945   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1946 set dummy ${ac_tool_prefix}cc; ac_word=$2
1947 echo "$as_me:$LINENO: checking for $ac_word" >&5
1948 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1949 if test "${ac_cv_prog_CC+set}" = set; then
1950   echo $ECHO_N "(cached) $ECHO_C" >&6
1951 else
1952   if test -n "$CC"; then
1953   ac_cv_prog_CC="$CC" # Let the user override the test.
1954 else
1955 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1956 for as_dir in $PATH
1957 do
1958   IFS=$as_save_IFS
1959   test -z "$as_dir" && as_dir=.
1960   for ac_exec_ext in '' $ac_executable_extensions; do
1961   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1962     ac_cv_prog_CC="${ac_tool_prefix}cc"
1963     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1964     break 2
1965   fi
1966 done
1967 done
1968
1969 fi
1970 fi
1971 CC=$ac_cv_prog_CC
1972 if test -n "$CC"; then
1973   echo "$as_me:$LINENO: result: $CC" >&5
1974 echo "${ECHO_T}$CC" >&6
1975 else
1976   echo "$as_me:$LINENO: result: no" >&5
1977 echo "${ECHO_T}no" >&6
1978 fi
1979
1980 fi
1981 if test -z "$ac_cv_prog_CC"; then
1982   ac_ct_CC=$CC
1983   # Extract the first word of "cc", so it can be a program name with args.
1984 set dummy cc; ac_word=$2
1985 echo "$as_me:$LINENO: checking for $ac_word" >&5
1986 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1987 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1988   echo $ECHO_N "(cached) $ECHO_C" >&6
1989 else
1990   if test -n "$ac_ct_CC"; then
1991   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1992 else
1993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1994 for as_dir in $PATH
1995 do
1996   IFS=$as_save_IFS
1997   test -z "$as_dir" && as_dir=.
1998   for ac_exec_ext in '' $ac_executable_extensions; do
1999   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2000     ac_cv_prog_ac_ct_CC="cc"
2001     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2002     break 2
2003   fi
2004 done
2005 done
2006
2007 fi
2008 fi
2009 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2010 if test -n "$ac_ct_CC"; then
2011   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2012 echo "${ECHO_T}$ac_ct_CC" >&6
2013 else
2014   echo "$as_me:$LINENO: result: no" >&5
2015 echo "${ECHO_T}no" >&6
2016 fi
2017
2018   CC=$ac_ct_CC
2019 else
2020   CC="$ac_cv_prog_CC"
2021 fi
2022
2023 fi
2024 if test -z "$CC"; then
2025   # Extract the first word of "cc", so it can be a program name with args.
2026 set dummy cc; ac_word=$2
2027 echo "$as_me:$LINENO: checking for $ac_word" >&5
2028 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2029 if test "${ac_cv_prog_CC+set}" = set; then
2030   echo $ECHO_N "(cached) $ECHO_C" >&6
2031 else
2032   if test -n "$CC"; then
2033   ac_cv_prog_CC="$CC" # Let the user override the test.
2034 else
2035   ac_prog_rejected=no
2036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2037 for as_dir in $PATH
2038 do
2039   IFS=$as_save_IFS
2040   test -z "$as_dir" && as_dir=.
2041   for ac_exec_ext in '' $ac_executable_extensions; do
2042   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2043     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2044        ac_prog_rejected=yes
2045        continue
2046      fi
2047     ac_cv_prog_CC="cc"
2048     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2049     break 2
2050   fi
2051 done
2052 done
2053
2054 if test $ac_prog_rejected = yes; then
2055   # We found a bogon in the path, so make sure we never use it.
2056   set dummy $ac_cv_prog_CC
2057   shift
2058   if test $# != 0; then
2059     # We chose a different compiler from the bogus one.
2060     # However, it has the same basename, so the bogon will be chosen
2061     # first if we set CC to just the basename; use the full file name.
2062     shift
2063     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2064   fi
2065 fi
2066 fi
2067 fi
2068 CC=$ac_cv_prog_CC
2069 if test -n "$CC"; then
2070   echo "$as_me:$LINENO: result: $CC" >&5
2071 echo "${ECHO_T}$CC" >&6
2072 else
2073   echo "$as_me:$LINENO: result: no" >&5
2074 echo "${ECHO_T}no" >&6
2075 fi
2076
2077 fi
2078 if test -z "$CC"; then
2079   if test -n "$ac_tool_prefix"; then
2080   for ac_prog in cl
2081   do
2082     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2083 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2084 echo "$as_me:$LINENO: checking for $ac_word" >&5
2085 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2086 if test "${ac_cv_prog_CC+set}" = set; then
2087   echo $ECHO_N "(cached) $ECHO_C" >&6
2088 else
2089   if test -n "$CC"; then
2090   ac_cv_prog_CC="$CC" # Let the user override the test.
2091 else
2092 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2093 for as_dir in $PATH
2094 do
2095   IFS=$as_save_IFS
2096   test -z "$as_dir" && as_dir=.
2097   for ac_exec_ext in '' $ac_executable_extensions; do
2098   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2099     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2100     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2101     break 2
2102   fi
2103 done
2104 done
2105
2106 fi
2107 fi
2108 CC=$ac_cv_prog_CC
2109 if test -n "$CC"; then
2110   echo "$as_me:$LINENO: result: $CC" >&5
2111 echo "${ECHO_T}$CC" >&6
2112 else
2113   echo "$as_me:$LINENO: result: no" >&5
2114 echo "${ECHO_T}no" >&6
2115 fi
2116
2117     test -n "$CC" && break
2118   done
2119 fi
2120 if test -z "$CC"; then
2121   ac_ct_CC=$CC
2122   for ac_prog in cl
2123 do
2124   # Extract the first word of "$ac_prog", so it can be a program name with args.
2125 set dummy $ac_prog; ac_word=$2
2126 echo "$as_me:$LINENO: checking for $ac_word" >&5
2127 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2128 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2129   echo $ECHO_N "(cached) $ECHO_C" >&6
2130 else
2131   if test -n "$ac_ct_CC"; then
2132   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2133 else
2134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2135 for as_dir in $PATH
2136 do
2137   IFS=$as_save_IFS
2138   test -z "$as_dir" && as_dir=.
2139   for ac_exec_ext in '' $ac_executable_extensions; do
2140   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2141     ac_cv_prog_ac_ct_CC="$ac_prog"
2142     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2143     break 2
2144   fi
2145 done
2146 done
2147
2148 fi
2149 fi
2150 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2151 if test -n "$ac_ct_CC"; then
2152   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2153 echo "${ECHO_T}$ac_ct_CC" >&6
2154 else
2155   echo "$as_me:$LINENO: result: no" >&5
2156 echo "${ECHO_T}no" >&6
2157 fi
2158
2159   test -n "$ac_ct_CC" && break
2160 done
2161
2162   CC=$ac_ct_CC
2163 fi
2164
2165 fi
2166
2167
2168 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2169 See \`config.log' for more details." >&5
2170 echo "$as_me: error: no acceptable C compiler found in \$PATH
2171 See \`config.log' for more details." >&2;}
2172    { (exit 1); exit 1; }; }
2173
2174 # Provide some information about the compiler.
2175 echo "$as_me:$LINENO:" \
2176      "checking for C compiler version" >&5
2177 ac_compiler=`set X $ac_compile; echo $2`
2178 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2179   (eval $ac_compiler --version </dev/null >&5) 2>&5
2180   ac_status=$?
2181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2182   (exit $ac_status); }
2183 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2184   (eval $ac_compiler -v </dev/null >&5) 2>&5
2185   ac_status=$?
2186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2187   (exit $ac_status); }
2188 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2189   (eval $ac_compiler -V </dev/null >&5) 2>&5
2190   ac_status=$?
2191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2192   (exit $ac_status); }
2193
2194 cat >conftest.$ac_ext <<_ACEOF
2195 /* confdefs.h.  */
2196 _ACEOF
2197 cat confdefs.h >>conftest.$ac_ext
2198 cat >>conftest.$ac_ext <<_ACEOF
2199 /* end confdefs.h.  */
2200
2201 int
2202 main ()
2203 {
2204
2205   ;
2206   return 0;
2207 }
2208 _ACEOF
2209 ac_clean_files_save=$ac_clean_files
2210 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2211 # Try to create an executable without -o first, disregard a.out.
2212 # It will help us diagnose broken compilers, and finding out an intuition
2213 # of exeext.
2214 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2215 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2216 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2217 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2218   (eval $ac_link_default) 2>&5
2219   ac_status=$?
2220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2221   (exit $ac_status); }; then
2222   # Find the output, starting from the most likely.  This scheme is
2223 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2224 # resort.
2225
2226 # Be careful to initialize this variable, since it used to be cached.
2227 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2228 ac_cv_exeext=
2229 # b.out is created by i960 compilers.
2230 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2231 do
2232   test -f "$ac_file" || continue
2233   case $ac_file in
2234     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2235         ;;
2236     conftest.$ac_ext )
2237         # This is the source file.
2238         ;;
2239     [ab].out )
2240         # We found the default executable, but exeext='' is most
2241         # certainly right.
2242         break;;
2243     *.* )
2244         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2245         # FIXME: I believe we export ac_cv_exeext for Libtool,
2246         # but it would be cool to find out if it's true.  Does anybody
2247         # maintain Libtool? --akim.
2248         export ac_cv_exeext
2249         break;;
2250     * )
2251         break;;
2252   esac
2253 done
2254 else
2255   echo "$as_me: failed program was:" >&5
2256 sed 's/^/| /' conftest.$ac_ext >&5
2257
2258 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2259 See \`config.log' for more details." >&5
2260 echo "$as_me: error: C compiler cannot create executables
2261 See \`config.log' for more details." >&2;}
2262    { (exit 77); exit 77; }; }
2263 fi
2264
2265 ac_exeext=$ac_cv_exeext
2266 echo "$as_me:$LINENO: result: $ac_file" >&5
2267 echo "${ECHO_T}$ac_file" >&6
2268
2269 # Check the compiler produces executables we can run.  If not, either
2270 # the compiler is broken, or we cross compile.
2271 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2272 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2273 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2274 # If not cross compiling, check that we can run a simple program.
2275 if test "$cross_compiling" != yes; then
2276   if { ac_try='./$ac_file'
2277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2278   (eval $ac_try) 2>&5
2279   ac_status=$?
2280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2281   (exit $ac_status); }; }; then
2282     cross_compiling=no
2283   else
2284     if test "$cross_compiling" = maybe; then
2285         cross_compiling=yes
2286     else
2287         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2288 If you meant to cross compile, use \`--host'.
2289 See \`config.log' for more details." >&5
2290 echo "$as_me: error: cannot run C compiled programs.
2291 If you meant to cross compile, use \`--host'.
2292 See \`config.log' for more details." >&2;}
2293    { (exit 1); exit 1; }; }
2294     fi
2295   fi
2296 fi
2297 echo "$as_me:$LINENO: result: yes" >&5
2298 echo "${ECHO_T}yes" >&6
2299
2300 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2301 ac_clean_files=$ac_clean_files_save
2302 # Check the compiler produces executables we can run.  If not, either
2303 # the compiler is broken, or we cross compile.
2304 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2305 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2306 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2307 echo "${ECHO_T}$cross_compiling" >&6
2308
2309 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2310 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2311 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2312   (eval $ac_link) 2>&5
2313   ac_status=$?
2314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2315   (exit $ac_status); }; then
2316   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2317 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2318 # work properly (i.e., refer to `conftest.exe'), while it won't with
2319 # `rm'.
2320 for ac_file in conftest.exe conftest conftest.*; do
2321   test -f "$ac_file" || continue
2322   case $ac_file in
2323     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2324     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2325           export ac_cv_exeext
2326           break;;
2327     * ) break;;
2328   esac
2329 done
2330 else
2331   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2332 See \`config.log' for more details." >&5
2333 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2334 See \`config.log' for more details." >&2;}
2335    { (exit 1); exit 1; }; }
2336 fi
2337
2338 rm -f conftest$ac_cv_exeext
2339 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2340 echo "${ECHO_T}$ac_cv_exeext" >&6
2341
2342 rm -f conftest.$ac_ext
2343 EXEEXT=$ac_cv_exeext
2344 ac_exeext=$EXEEXT
2345 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2346 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2347 if test "${ac_cv_objext+set}" = set; then
2348   echo $ECHO_N "(cached) $ECHO_C" >&6
2349 else
2350   cat >conftest.$ac_ext <<_ACEOF
2351 /* confdefs.h.  */
2352 _ACEOF
2353 cat confdefs.h >>conftest.$ac_ext
2354 cat >>conftest.$ac_ext <<_ACEOF
2355 /* end confdefs.h.  */
2356
2357 int
2358 main ()
2359 {
2360
2361   ;
2362   return 0;
2363 }
2364 _ACEOF
2365 rm -f conftest.o conftest.obj
2366 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2367   (eval $ac_compile) 2>&5
2368   ac_status=$?
2369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2370   (exit $ac_status); }; then
2371   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2372   case $ac_file in
2373     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2374     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2375        break;;
2376   esac
2377 done
2378 else
2379   echo "$as_me: failed program was:" >&5
2380 sed 's/^/| /' conftest.$ac_ext >&5
2381
2382 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2383 See \`config.log' for more details." >&5
2384 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2385 See \`config.log' for more details." >&2;}
2386    { (exit 1); exit 1; }; }
2387 fi
2388
2389 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2390 fi
2391 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2392 echo "${ECHO_T}$ac_cv_objext" >&6
2393 OBJEXT=$ac_cv_objext
2394 ac_objext=$OBJEXT
2395 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2396 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2397 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2398   echo $ECHO_N "(cached) $ECHO_C" >&6
2399 else
2400   cat >conftest.$ac_ext <<_ACEOF
2401 /* confdefs.h.  */
2402 _ACEOF
2403 cat confdefs.h >>conftest.$ac_ext
2404 cat >>conftest.$ac_ext <<_ACEOF
2405 /* end confdefs.h.  */
2406
2407 int
2408 main ()
2409 {
2410 #ifndef __GNUC__
2411        choke me
2412 #endif
2413
2414   ;
2415   return 0;
2416 }
2417 _ACEOF
2418 rm -f conftest.$ac_objext
2419 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2420   (eval $ac_compile) 2>conftest.er1
2421   ac_status=$?
2422   grep -v '^ *+' conftest.er1 >conftest.err
2423   rm -f conftest.er1
2424   cat conftest.err >&5
2425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2426   (exit $ac_status); } &&
2427          { ac_try='test -z "$ac_c_werror_flag"
2428                          || test ! -s conftest.err'
2429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2430   (eval $ac_try) 2>&5
2431   ac_status=$?
2432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2433   (exit $ac_status); }; } &&
2434          { ac_try='test -s conftest.$ac_objext'
2435   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2436   (eval $ac_try) 2>&5
2437   ac_status=$?
2438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2439   (exit $ac_status); }; }; then
2440   ac_compiler_gnu=yes
2441 else
2442   echo "$as_me: failed program was:" >&5
2443 sed 's/^/| /' conftest.$ac_ext >&5
2444
2445 ac_compiler_gnu=no
2446 fi
2447 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2448 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2449
2450 fi
2451 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2452 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2453 GCC=`test $ac_compiler_gnu = yes && echo yes`
2454 ac_test_CFLAGS=${CFLAGS+set}
2455 ac_save_CFLAGS=$CFLAGS
2456 CFLAGS="-g"
2457 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2458 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2459 if test "${ac_cv_prog_cc_g+set}" = set; then
2460   echo $ECHO_N "(cached) $ECHO_C" >&6
2461 else
2462   cat >conftest.$ac_ext <<_ACEOF
2463 /* confdefs.h.  */
2464 _ACEOF
2465 cat confdefs.h >>conftest.$ac_ext
2466 cat >>conftest.$ac_ext <<_ACEOF
2467 /* end confdefs.h.  */
2468
2469 int
2470 main ()
2471 {
2472
2473   ;
2474   return 0;
2475 }
2476 _ACEOF
2477 rm -f conftest.$ac_objext
2478 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2479   (eval $ac_compile) 2>conftest.er1
2480   ac_status=$?
2481   grep -v '^ *+' conftest.er1 >conftest.err
2482   rm -f conftest.er1
2483   cat conftest.err >&5
2484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2485   (exit $ac_status); } &&
2486          { ac_try='test -z "$ac_c_werror_flag"
2487                          || test ! -s conftest.err'
2488   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2489   (eval $ac_try) 2>&5
2490   ac_status=$?
2491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2492   (exit $ac_status); }; } &&
2493          { ac_try='test -s conftest.$ac_objext'
2494   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2495   (eval $ac_try) 2>&5
2496   ac_status=$?
2497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2498   (exit $ac_status); }; }; then
2499   ac_cv_prog_cc_g=yes
2500 else
2501   echo "$as_me: failed program was:" >&5
2502 sed 's/^/| /' conftest.$ac_ext >&5
2503
2504 ac_cv_prog_cc_g=no
2505 fi
2506 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2507 fi
2508 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2509 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2510 if test "$ac_test_CFLAGS" = set; then
2511   CFLAGS=$ac_save_CFLAGS
2512 elif test $ac_cv_prog_cc_g = yes; then
2513   if test "$GCC" = yes; then
2514     CFLAGS="-g -O2"
2515   else
2516     CFLAGS="-g"
2517   fi
2518 else
2519   if test "$GCC" = yes; then
2520     CFLAGS="-O2"
2521   else
2522     CFLAGS=
2523   fi
2524 fi
2525 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2526 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2527 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2528   echo $ECHO_N "(cached) $ECHO_C" >&6
2529 else
2530   ac_cv_prog_cc_stdc=no
2531 ac_save_CC=$CC
2532 cat >conftest.$ac_ext <<_ACEOF
2533 /* confdefs.h.  */
2534 _ACEOF
2535 cat confdefs.h >>conftest.$ac_ext
2536 cat >>conftest.$ac_ext <<_ACEOF
2537 /* end confdefs.h.  */
2538 #include <stdarg.h>
2539 #include <stdio.h>
2540 #include <sys/types.h>
2541 #include <sys/stat.h>
2542 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2543 struct buf { int x; };
2544 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2545 static char *e (p, i)
2546      char **p;
2547      int i;
2548 {
2549   return p[i];
2550 }
2551 static char *f (char * (*g) (char **, int), char **p, ...)
2552 {
2553   char *s;
2554   va_list v;
2555   va_start (v,p);
2556   s = g (p, va_arg (v,int));
2557   va_end (v);
2558   return s;
2559 }
2560
2561 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2562    function prototypes and stuff, but not '\xHH' hex character constants.
2563    These don't provoke an error unfortunately, instead are silently treated
2564    as 'x'.  The following induces an error, until -std1 is added to get
2565    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2566    array size at least.  It's necessary to write '\x00'==0 to get something
2567    that's true only with -std1.  */
2568 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2569
2570 int test (int i, double x);
2571 struct s1 {int (*f) (int a);};
2572 struct s2 {int (*f) (double a);};
2573 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2574 int argc;
2575 char **argv;
2576 int
2577 main ()
2578 {
2579 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2580   ;
2581   return 0;
2582 }
2583 _ACEOF
2584 # Don't try gcc -ansi; that turns off useful extensions and
2585 # breaks some systems' header files.
2586 # AIX                   -qlanglvl=ansi
2587 # Ultrix and OSF/1      -std1
2588 # HP-UX 10.20 and later -Ae
2589 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2590 # SVR4                  -Xc -D__EXTENSIONS__
2591 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2592 do
2593   CC="$ac_save_CC $ac_arg"
2594   rm -f conftest.$ac_objext
2595 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2596   (eval $ac_compile) 2>conftest.er1
2597   ac_status=$?
2598   grep -v '^ *+' conftest.er1 >conftest.err
2599   rm -f conftest.er1
2600   cat conftest.err >&5
2601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2602   (exit $ac_status); } &&
2603          { ac_try='test -z "$ac_c_werror_flag"
2604                          || test ! -s conftest.err'
2605   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2606   (eval $ac_try) 2>&5
2607   ac_status=$?
2608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2609   (exit $ac_status); }; } &&
2610          { ac_try='test -s conftest.$ac_objext'
2611   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2612   (eval $ac_try) 2>&5
2613   ac_status=$?
2614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2615   (exit $ac_status); }; }; then
2616   ac_cv_prog_cc_stdc=$ac_arg
2617 break
2618 else
2619   echo "$as_me: failed program was:" >&5
2620 sed 's/^/| /' conftest.$ac_ext >&5
2621
2622 fi
2623 rm -f conftest.err conftest.$ac_objext
2624 done
2625 rm -f conftest.$ac_ext conftest.$ac_objext
2626 CC=$ac_save_CC
2627
2628 fi
2629
2630 case "x$ac_cv_prog_cc_stdc" in
2631   x|xno)
2632     echo "$as_me:$LINENO: result: none needed" >&5
2633 echo "${ECHO_T}none needed" >&6 ;;
2634   *)
2635     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2636 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2637     CC="$CC $ac_cv_prog_cc_stdc" ;;
2638 esac
2639
2640 # Some people use a C++ compiler to compile C.  Since we use `exit',
2641 # in C++ we need to declare it.  In case someone uses the same compiler
2642 # for both compiling C and C++ we need to have the C++ compiler decide
2643 # the declaration of exit, since it's the most demanding environment.
2644 cat >conftest.$ac_ext <<_ACEOF
2645 #ifndef __cplusplus
2646   choke me
2647 #endif
2648 _ACEOF
2649 rm -f conftest.$ac_objext
2650 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2651   (eval $ac_compile) 2>conftest.er1
2652   ac_status=$?
2653   grep -v '^ *+' conftest.er1 >conftest.err
2654   rm -f conftest.er1
2655   cat conftest.err >&5
2656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2657   (exit $ac_status); } &&
2658          { ac_try='test -z "$ac_c_werror_flag"
2659                          || test ! -s conftest.err'
2660   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2661   (eval $ac_try) 2>&5
2662   ac_status=$?
2663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2664   (exit $ac_status); }; } &&
2665          { ac_try='test -s conftest.$ac_objext'
2666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2667   (eval $ac_try) 2>&5
2668   ac_status=$?
2669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2670   (exit $ac_status); }; }; then
2671   for ac_declaration in \
2672    '' \
2673    'extern "C" void std::exit (int) throw (); using std::exit;' \
2674    'extern "C" void std::exit (int); using std::exit;' \
2675    'extern "C" void exit (int) throw ();' \
2676    'extern "C" void exit (int);' \
2677    'void exit (int);'
2678 do
2679   cat >conftest.$ac_ext <<_ACEOF
2680 /* confdefs.h.  */
2681 _ACEOF
2682 cat confdefs.h >>conftest.$ac_ext
2683 cat >>conftest.$ac_ext <<_ACEOF
2684 /* end confdefs.h.  */
2685 $ac_declaration
2686 #include <stdlib.h>
2687 int
2688 main ()
2689 {
2690 exit (42);
2691   ;
2692   return 0;
2693 }
2694 _ACEOF
2695 rm -f conftest.$ac_objext
2696 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2697   (eval $ac_compile) 2>conftest.er1
2698   ac_status=$?
2699   grep -v '^ *+' conftest.er1 >conftest.err
2700   rm -f conftest.er1
2701   cat conftest.err >&5
2702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2703   (exit $ac_status); } &&
2704          { ac_try='test -z "$ac_c_werror_flag"
2705                          || test ! -s conftest.err'
2706   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2707   (eval $ac_try) 2>&5
2708   ac_status=$?
2709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2710   (exit $ac_status); }; } &&
2711          { ac_try='test -s conftest.$ac_objext'
2712   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2713   (eval $ac_try) 2>&5
2714   ac_status=$?
2715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2716   (exit $ac_status); }; }; then
2717   :
2718 else
2719   echo "$as_me: failed program was:" >&5
2720 sed 's/^/| /' conftest.$ac_ext >&5
2721
2722 continue
2723 fi
2724 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2725   cat >conftest.$ac_ext <<_ACEOF
2726 /* confdefs.h.  */
2727 _ACEOF
2728 cat confdefs.h >>conftest.$ac_ext
2729 cat >>conftest.$ac_ext <<_ACEOF
2730 /* end confdefs.h.  */
2731 $ac_declaration
2732 int
2733 main ()
2734 {
2735 exit (42);
2736   ;
2737   return 0;
2738 }
2739 _ACEOF
2740 rm -f conftest.$ac_objext
2741 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2742   (eval $ac_compile) 2>conftest.er1
2743   ac_status=$?
2744   grep -v '^ *+' conftest.er1 >conftest.err
2745   rm -f conftest.er1
2746   cat conftest.err >&5
2747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2748   (exit $ac_status); } &&
2749          { ac_try='test -z "$ac_c_werror_flag"
2750                          || test ! -s conftest.err'
2751   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2752   (eval $ac_try) 2>&5
2753   ac_status=$?
2754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2755   (exit $ac_status); }; } &&
2756          { ac_try='test -s conftest.$ac_objext'
2757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2758   (eval $ac_try) 2>&5
2759   ac_status=$?
2760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2761   (exit $ac_status); }; }; then
2762   break
2763 else
2764   echo "$as_me: failed program was:" >&5
2765 sed 's/^/| /' conftest.$ac_ext >&5
2766
2767 fi
2768 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2769 done
2770 rm -f conftest*
2771 if test -n "$ac_declaration"; then
2772   echo '#ifdef __cplusplus' >>confdefs.h
2773   echo $ac_declaration      >>confdefs.h
2774   echo '#endif'             >>confdefs.h
2775 fi
2776
2777 else
2778   echo "$as_me: failed program was:" >&5
2779 sed 's/^/| /' conftest.$ac_ext >&5
2780
2781 fi
2782 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2783 ac_ext=c
2784 ac_cpp='$CPP $CPPFLAGS'
2785 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2786 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2787 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2788
2789 if test "x$CC" != xcc; then
2790   echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
2791 echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
2792 else
2793   echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
2794 echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
2795 fi
2796 set dummy $CC; ac_cc=`echo $2 |
2797                       sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2798 if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
2799   echo $ECHO_N "(cached) $ECHO_C" >&6
2800 else
2801   cat >conftest.$ac_ext <<_ACEOF
2802 /* confdefs.h.  */
2803 _ACEOF
2804 cat confdefs.h >>conftest.$ac_ext
2805 cat >>conftest.$ac_ext <<_ACEOF
2806 /* end confdefs.h.  */
2807
2808 int
2809 main ()
2810 {
2811
2812   ;
2813   return 0;
2814 }
2815 _ACEOF
2816 # Make sure it works both with $CC and with simple cc.
2817 # We do the test twice because some compilers refuse to overwrite an
2818 # existing .o file with -o, though they will create one.
2819 ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2820 if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2821   (eval $ac_try) 2>&5
2822   ac_status=$?
2823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2824   (exit $ac_status); } &&
2825    test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2826   (eval $ac_try) 2>&5
2827   ac_status=$?
2828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2829   (exit $ac_status); };
2830 then
2831   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
2832   if test "x$CC" != xcc; then
2833     # Test first that cc exists at all.
2834     if { ac_try='cc -c conftest.$ac_ext >&5'
2835   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2836   (eval $ac_try) 2>&5
2837   ac_status=$?
2838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2839   (exit $ac_status); }; }; then
2840       ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
2841       if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2842   (eval $ac_try) 2>&5
2843   ac_status=$?
2844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2845   (exit $ac_status); } &&
2846          test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2847   (eval $ac_try) 2>&5
2848   ac_status=$?
2849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2850   (exit $ac_status); };
2851       then
2852         # cc works too.
2853         :
2854       else
2855         # cc exists but doesn't like -o.
2856         eval ac_cv_prog_cc_${ac_cc}_c_o=no
2857       fi
2858     fi
2859   fi
2860 else
2861   eval ac_cv_prog_cc_${ac_cc}_c_o=no
2862 fi
2863 rm -f conftest*
2864
2865 fi
2866 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
2867   echo "$as_me:$LINENO: result: yes" >&5
2868 echo "${ECHO_T}yes" >&6
2869 else
2870   echo "$as_me:$LINENO: result: no" >&5
2871 echo "${ECHO_T}no" >&6
2872
2873 cat >>confdefs.h <<\_ACEOF
2874 #define NO_MINUS_C_MINUS_O 1
2875 _ACEOF
2876
2877 fi
2878
2879 # expand $ac_aux_dir to an absolute path
2880 am_aux_dir=`cd $ac_aux_dir && pwd`
2881
2882 # FIXME: we rely on the cache variable name because
2883 # there is no other way.
2884 set dummy $CC
2885 ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
2886 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
2887    # Losing compiler, so override with the script.
2888    # FIXME: It is wrong to rewrite CC.
2889    # But if we don't then we get into trouble of one sort or another.
2890    # A longer-term fix would be to have automake use am__CC in this case,
2891    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
2892    CC="$am_aux_dir/compile $CC"
2893 fi
2894
2895 # autoconf is lame and doesn't give us any substitution variable for this.
2896 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
2897   NO_MINUS_C_MINUS_O=yes
2898 else
2899   OUTPUT_OPTION='-o $@'
2900 fi
2901
2902
2903
2904 # Remove the -O2: for historical reasons, unless bootstrapping we prefer
2905 # optimizations to be activated explicitly by the toplevel.
2906 case "$CC" in
2907   */prev-gcc/xgcc*) ;;
2908   *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
2909 esac
2910
2911
2912 # -------------------------
2913 # Check C compiler features
2914 # -------------------------
2915
2916 ac_ext=c
2917 ac_cpp='$CPP $CPPFLAGS'
2918 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2919 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2920 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2921 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2922 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2923 # On Suns, sometimes $CPP names a directory.
2924 if test -n "$CPP" && test -d "$CPP"; then
2925   CPP=
2926 fi
2927 if test -z "$CPP"; then
2928   if test "${ac_cv_prog_CPP+set}" = set; then
2929   echo $ECHO_N "(cached) $ECHO_C" >&6
2930 else
2931       # Double quotes because CPP needs to be expanded
2932     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2933     do
2934       ac_preproc_ok=false
2935 for ac_c_preproc_warn_flag in '' yes
2936 do
2937   # Use a header file that comes with gcc, so configuring glibc
2938   # with a fresh cross-compiler works.
2939   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2940   # <limits.h> exists even on freestanding compilers.
2941   # On the NeXT, cc -E runs the code through the compiler's parser,
2942   # not just through cpp. "Syntax error" is here to catch this case.
2943   cat >conftest.$ac_ext <<_ACEOF
2944 /* confdefs.h.  */
2945 _ACEOF
2946 cat confdefs.h >>conftest.$ac_ext
2947 cat >>conftest.$ac_ext <<_ACEOF
2948 /* end confdefs.h.  */
2949 #ifdef __STDC__
2950 # include <limits.h>
2951 #else
2952 # include <assert.h>
2953 #endif
2954                      Syntax error
2955 _ACEOF
2956 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2957   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2958   ac_status=$?
2959   grep -v '^ *+' conftest.er1 >conftest.err
2960   rm -f conftest.er1
2961   cat conftest.err >&5
2962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2963   (exit $ac_status); } >/dev/null; then
2964   if test -s conftest.err; then
2965     ac_cpp_err=$ac_c_preproc_warn_flag
2966     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2967   else
2968     ac_cpp_err=
2969   fi
2970 else
2971   ac_cpp_err=yes
2972 fi
2973 if test -z "$ac_cpp_err"; then
2974   :
2975 else
2976   echo "$as_me: failed program was:" >&5
2977 sed 's/^/| /' conftest.$ac_ext >&5
2978
2979   # Broken: fails on valid input.
2980 continue
2981 fi
2982 rm -f conftest.err conftest.$ac_ext
2983
2984   # OK, works on sane cases.  Now check whether non-existent headers
2985   # can be detected and how.
2986   cat >conftest.$ac_ext <<_ACEOF
2987 /* confdefs.h.  */
2988 _ACEOF
2989 cat confdefs.h >>conftest.$ac_ext
2990 cat >>conftest.$ac_ext <<_ACEOF
2991 /* end confdefs.h.  */
2992 #include <ac_nonexistent.h>
2993 _ACEOF
2994 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2995   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2996   ac_status=$?
2997   grep -v '^ *+' conftest.er1 >conftest.err
2998   rm -f conftest.er1
2999   cat conftest.err >&5
3000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3001   (exit $ac_status); } >/dev/null; then
3002   if test -s conftest.err; then
3003     ac_cpp_err=$ac_c_preproc_warn_flag
3004     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3005   else
3006     ac_cpp_err=
3007   fi
3008 else
3009   ac_cpp_err=yes
3010 fi
3011 if test -z "$ac_cpp_err"; then
3012   # Broken: success on invalid input.
3013 continue
3014 else
3015   echo "$as_me: failed program was:" >&5
3016 sed 's/^/| /' conftest.$ac_ext >&5
3017
3018   # Passes both tests.
3019 ac_preproc_ok=:
3020 break
3021 fi
3022 rm -f conftest.err conftest.$ac_ext
3023
3024 done
3025 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3026 rm -f conftest.err conftest.$ac_ext
3027 if $ac_preproc_ok; then
3028   break
3029 fi
3030
3031     done
3032     ac_cv_prog_CPP=$CPP
3033
3034 fi
3035   CPP=$ac_cv_prog_CPP
3036 else
3037   ac_cv_prog_CPP=$CPP
3038 fi
3039 echo "$as_me:$LINENO: result: $CPP" >&5
3040 echo "${ECHO_T}$CPP" >&6
3041 ac_preproc_ok=false
3042 for ac_c_preproc_warn_flag in '' yes
3043 do
3044   # Use a header file that comes with gcc, so configuring glibc
3045   # with a fresh cross-compiler works.
3046   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3047   # <limits.h> exists even on freestanding compilers.
3048   # On the NeXT, cc -E runs the code through the compiler's parser,
3049   # not just through cpp. "Syntax error" is here to catch this case.
3050   cat >conftest.$ac_ext <<_ACEOF
3051 /* confdefs.h.  */
3052 _ACEOF
3053 cat confdefs.h >>conftest.$ac_ext
3054 cat >>conftest.$ac_ext <<_ACEOF
3055 /* end confdefs.h.  */
3056 #ifdef __STDC__
3057 # include <limits.h>
3058 #else
3059 # include <assert.h>
3060 #endif
3061                      Syntax error
3062 _ACEOF
3063 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3064   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3065   ac_status=$?
3066   grep -v '^ *+' conftest.er1 >conftest.err
3067   rm -f conftest.er1
3068   cat conftest.err >&5
3069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3070   (exit $ac_status); } >/dev/null; then
3071   if test -s conftest.err; then
3072     ac_cpp_err=$ac_c_preproc_warn_flag
3073     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3074   else
3075     ac_cpp_err=
3076   fi
3077 else
3078   ac_cpp_err=yes
3079 fi
3080 if test -z "$ac_cpp_err"; then
3081   :
3082 else
3083   echo "$as_me: failed program was:" >&5
3084 sed 's/^/| /' conftest.$ac_ext >&5
3085
3086   # Broken: fails on valid input.
3087 continue
3088 fi
3089 rm -f conftest.err conftest.$ac_ext
3090
3091   # OK, works on sane cases.  Now check whether non-existent headers
3092   # can be detected and how.
3093   cat >conftest.$ac_ext <<_ACEOF
3094 /* confdefs.h.  */
3095 _ACEOF
3096 cat confdefs.h >>conftest.$ac_ext
3097 cat >>conftest.$ac_ext <<_ACEOF
3098 /* end confdefs.h.  */
3099 #include <ac_nonexistent.h>
3100 _ACEOF
3101 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3102   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3103   ac_status=$?
3104   grep -v '^ *+' conftest.er1 >conftest.err
3105   rm -f conftest.er1
3106   cat conftest.err >&5
3107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3108   (exit $ac_status); } >/dev/null; then
3109   if test -s conftest.err; then
3110     ac_cpp_err=$ac_c_preproc_warn_flag
3111     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3112   else
3113     ac_cpp_err=
3114   fi
3115 else
3116   ac_cpp_err=yes
3117 fi
3118 if test -z "$ac_cpp_err"; then
3119   # Broken: success on invalid input.
3120 continue
3121 else
3122   echo "$as_me: failed program was:" >&5
3123 sed 's/^/| /' conftest.$ac_ext >&5
3124
3125   # Passes both tests.
3126 ac_preproc_ok=:
3127 break
3128 fi
3129 rm -f conftest.err conftest.$ac_ext
3130
3131 done
3132 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3133 rm -f conftest.err conftest.$ac_ext
3134 if $ac_preproc_ok; then
3135   :
3136 else
3137   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3138 See \`config.log' for more details." >&5
3139 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3140 See \`config.log' for more details." >&2;}
3141    { (exit 1); exit 1; }; }
3142 fi
3143
3144 ac_ext=c
3145 ac_cpp='$CPP $CPPFLAGS'
3146 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3147 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3148 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3149
3150
3151 echo "$as_me:$LINENO: checking for inline" >&5
3152 echo $ECHO_N "checking for inline... $ECHO_C" >&6
3153 if test "${ac_cv_c_inline+set}" = set; then
3154   echo $ECHO_N "(cached) $ECHO_C" >&6
3155 else
3156   ac_cv_c_inline=no
3157 for ac_kw in inline __inline__ __inline; do
3158   cat >conftest.$ac_ext <<_ACEOF
3159 /* confdefs.h.  */
3160 _ACEOF
3161 cat confdefs.h >>conftest.$ac_ext
3162 cat >>conftest.$ac_ext <<_ACEOF
3163 /* end confdefs.h.  */
3164 #ifndef __cplusplus
3165 typedef int foo_t;
3166 static $ac_kw foo_t static_foo () {return 0; }
3167 $ac_kw foo_t foo () {return 0; }
3168 #endif
3169
3170 _ACEOF
3171 rm -f conftest.$ac_objext
3172 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3173   (eval $ac_compile) 2>conftest.er1
3174   ac_status=$?
3175   grep -v '^ *+' conftest.er1 >conftest.err
3176   rm -f conftest.er1
3177   cat conftest.err >&5
3178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3179   (exit $ac_status); } &&
3180          { ac_try='test -z "$ac_c_werror_flag"
3181                          || test ! -s conftest.err'
3182   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3183   (eval $ac_try) 2>&5
3184   ac_status=$?
3185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3186   (exit $ac_status); }; } &&
3187          { ac_try='test -s conftest.$ac_objext'
3188   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3189   (eval $ac_try) 2>&5
3190   ac_status=$?
3191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3192   (exit $ac_status); }; }; then
3193   ac_cv_c_inline=$ac_kw; break
3194 else
3195   echo "$as_me: failed program was:" >&5
3196 sed 's/^/| /' conftest.$ac_ext >&5
3197
3198 fi
3199 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3200 done
3201
3202 fi
3203 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3204 echo "${ECHO_T}$ac_cv_c_inline" >&6
3205
3206
3207 case $ac_cv_c_inline in
3208   inline | yes) ;;
3209   *)
3210     case $ac_cv_c_inline in
3211       no) ac_val=;;
3212       *) ac_val=$ac_cv_c_inline;;
3213     esac
3214     cat >>confdefs.h <<_ACEOF
3215 #ifndef __cplusplus
3216 #define inline $ac_val
3217 #endif
3218 _ACEOF
3219     ;;
3220 esac
3221
3222
3223 # sizeof(char) is 1 by definition.
3224
3225 echo "$as_me:$LINENO: checking for egrep" >&5
3226 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3227 if test "${ac_cv_prog_egrep+set}" = set; then
3228   echo $ECHO_N "(cached) $ECHO_C" >&6
3229 else
3230   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3231     then ac_cv_prog_egrep='grep -E'
3232     else ac_cv_prog_egrep='egrep'
3233     fi
3234 fi
3235 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3236 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3237  EGREP=$ac_cv_prog_egrep
3238
3239
3240 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3241 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3242 if test "${ac_cv_header_stdc+set}" = set; then
3243   echo $ECHO_N "(cached) $ECHO_C" >&6
3244 else
3245   cat >conftest.$ac_ext <<_ACEOF
3246 /* confdefs.h.  */
3247 _ACEOF
3248 cat confdefs.h >>conftest.$ac_ext
3249 cat >>conftest.$ac_ext <<_ACEOF
3250 /* end confdefs.h.  */
3251 #include <stdlib.h>
3252 #include <stdarg.h>
3253 #include <string.h>
3254 #include <float.h>
3255
3256 int
3257 main ()
3258 {
3259
3260   ;
3261   return 0;
3262 }
3263 _ACEOF
3264 rm -f conftest.$ac_objext
3265 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3266   (eval $ac_compile) 2>conftest.er1
3267   ac_status=$?
3268   grep -v '^ *+' conftest.er1 >conftest.err
3269   rm -f conftest.er1
3270   cat conftest.err >&5
3271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3272   (exit $ac_status); } &&
3273          { ac_try='test -z "$ac_c_werror_flag"
3274                          || test ! -s conftest.err'
3275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3276   (eval $ac_try) 2>&5
3277   ac_status=$?
3278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3279   (exit $ac_status); }; } &&
3280          { ac_try='test -s conftest.$ac_objext'
3281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3282   (eval $ac_try) 2>&5
3283   ac_status=$?
3284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3285   (exit $ac_status); }; }; then
3286   ac_cv_header_stdc=yes
3287 else
3288   echo "$as_me: failed program was:" >&5
3289 sed 's/^/| /' conftest.$ac_ext >&5
3290
3291 ac_cv_header_stdc=no
3292 fi
3293 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3294
3295 if test $ac_cv_header_stdc = yes; then
3296   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3297   cat >conftest.$ac_ext <<_ACEOF
3298 /* confdefs.h.  */
3299 _ACEOF
3300 cat confdefs.h >>conftest.$ac_ext
3301 cat >>conftest.$ac_ext <<_ACEOF
3302 /* end confdefs.h.  */
3303 #include <string.h>
3304
3305 _ACEOF
3306 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3307   $EGREP "memchr" >/dev/null 2>&1; then
3308   :
3309 else
3310   ac_cv_header_stdc=no
3311 fi
3312 rm -f conftest*
3313
3314 fi
3315
3316 if test $ac_cv_header_stdc = yes; then
3317   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3318   cat >conftest.$ac_ext <<_ACEOF
3319 /* confdefs.h.  */
3320 _ACEOF
3321 cat confdefs.h >>conftest.$ac_ext
3322 cat >>conftest.$ac_ext <<_ACEOF
3323 /* end confdefs.h.  */
3324 #include <stdlib.h>
3325
3326 _ACEOF
3327 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3328   $EGREP "free" >/dev/null 2>&1; then
3329   :
3330 else
3331   ac_cv_header_stdc=no
3332 fi
3333 rm -f conftest*
3334
3335 fi
3336
3337 if test $ac_cv_header_stdc = yes; then
3338   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3339   if test "$cross_compiling" = yes; then
3340   :
3341 else
3342   cat >conftest.$ac_ext <<_ACEOF
3343 /* confdefs.h.  */
3344 _ACEOF
3345 cat confdefs.h >>conftest.$ac_ext
3346 cat >>conftest.$ac_ext <<_ACEOF
3347 /* end confdefs.h.  */
3348 #include <ctype.h>
3349 #if ((' ' & 0x0FF) == 0x020)
3350 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3351 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3352 #else
3353 # define ISLOWER(c) \
3354                    (('a' <= (c) && (c) <= 'i') \
3355                      || ('j' <= (c) && (c) <= 'r') \
3356                      || ('s' <= (c) && (c) <= 'z'))
3357 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3358 #endif
3359
3360 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3361 int
3362 main ()
3363 {
3364   int i;
3365   for (i = 0; i < 256; i++)
3366     if (XOR (islower (i), ISLOWER (i))
3367         || toupper (i) != TOUPPER (i))
3368       exit(2);
3369   exit (0);
3370 }
3371 _ACEOF
3372 rm -f conftest$ac_exeext
3373 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3374   (eval $ac_link) 2>&5
3375   ac_status=$?
3376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3377   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3378   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3379   (eval $ac_try) 2>&5
3380   ac_status=$?
3381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3382   (exit $ac_status); }; }; then
3383   :
3384 else
3385   echo "$as_me: program exited with status $ac_status" >&5
3386 echo "$as_me: failed program was:" >&5
3387 sed 's/^/| /' conftest.$ac_ext >&5
3388
3389 ( exit $ac_status )
3390 ac_cv_header_stdc=no
3391 fi
3392 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3393 fi
3394 fi
3395 fi
3396 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3397 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3398 if test $ac_cv_header_stdc = yes; then
3399
3400 cat >>confdefs.h <<\_ACEOF
3401 #define STDC_HEADERS 1
3402 _ACEOF
3403
3404 fi
3405
3406 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3417                   inttypes.h stdint.h unistd.h
3418 do
3419 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3420 echo "$as_me:$LINENO: checking for $ac_header" >&5
3421 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3422 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3423   echo $ECHO_N "(cached) $ECHO_C" >&6
3424 else
3425   cat >conftest.$ac_ext <<_ACEOF
3426 /* confdefs.h.  */
3427 _ACEOF
3428 cat confdefs.h >>conftest.$ac_ext
3429 cat >>conftest.$ac_ext <<_ACEOF
3430 /* end confdefs.h.  */
3431 $ac_includes_default
3432
3433 #include <$ac_header>
3434 _ACEOF
3435 rm -f conftest.$ac_objext
3436 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3437   (eval $ac_compile) 2>conftest.er1
3438   ac_status=$?
3439   grep -v '^ *+' conftest.er1 >conftest.err
3440   rm -f conftest.er1
3441   cat conftest.err >&5
3442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3443   (exit $ac_status); } &&
3444          { ac_try='test -z "$ac_c_werror_flag"
3445                          || test ! -s conftest.err'
3446   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3447   (eval $ac_try) 2>&5
3448   ac_status=$?
3449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3450   (exit $ac_status); }; } &&
3451          { ac_try='test -s conftest.$ac_objext'
3452   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3453   (eval $ac_try) 2>&5
3454   ac_status=$?
3455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3456   (exit $ac_status); }; }; then
3457   eval "$as_ac_Header=yes"
3458 else
3459   echo "$as_me: failed program was:" >&5
3460 sed 's/^/| /' conftest.$ac_ext >&5
3461
3462 eval "$as_ac_Header=no"
3463 fi
3464 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3465 fi
3466 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3467 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3468 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3469   cat >>confdefs.h <<_ACEOF
3470 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3471 _ACEOF
3472
3473 fi
3474
3475 done
3476
3477
3478 echo "$as_me:$LINENO: checking for void *" >&5
3479 echo $ECHO_N "checking for void *... $ECHO_C" >&6
3480 if test "${ac_cv_type_void_p+set}" = set; then
3481   echo $ECHO_N "(cached) $ECHO_C" >&6
3482 else
3483   cat >conftest.$ac_ext <<_ACEOF
3484 /* confdefs.h.  */
3485 _ACEOF
3486 cat confdefs.h >>conftest.$ac_ext
3487 cat >>conftest.$ac_ext <<_ACEOF
3488 /* end confdefs.h.  */
3489 $ac_includes_default
3490 int
3491 main ()
3492 {
3493 if ((void * *) 0)
3494   return 0;
3495 if (sizeof (void *))
3496   return 0;
3497   ;
3498   return 0;
3499 }
3500 _ACEOF
3501 rm -f conftest.$ac_objext
3502 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3503   (eval $ac_compile) 2>conftest.er1
3504   ac_status=$?
3505   grep -v '^ *+' conftest.er1 >conftest.err
3506   rm -f conftest.er1
3507   cat conftest.err >&5
3508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3509   (exit $ac_status); } &&
3510          { ac_try='test -z "$ac_c_werror_flag"
3511                          || test ! -s conftest.err'
3512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3513   (eval $ac_try) 2>&5
3514   ac_status=$?
3515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3516   (exit $ac_status); }; } &&
3517          { ac_try='test -s conftest.$ac_objext'
3518   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3519   (eval $ac_try) 2>&5
3520   ac_status=$?
3521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3522   (exit $ac_status); }; }; then
3523   ac_cv_type_void_p=yes
3524 else
3525   echo "$as_me: failed program was:" >&5
3526 sed 's/^/| /' conftest.$ac_ext >&5
3527
3528 ac_cv_type_void_p=no
3529 fi
3530 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3531 fi
3532 echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
3533 echo "${ECHO_T}$ac_cv_type_void_p" >&6
3534
3535 echo "$as_me:$LINENO: checking size of void *" >&5
3536 echo $ECHO_N "checking size of void *... $ECHO_C" >&6
3537 if test "${ac_cv_sizeof_void_p+set}" = set; then
3538   echo $ECHO_N "(cached) $ECHO_C" >&6
3539 else
3540   if test "$ac_cv_type_void_p" = yes; then
3541   # The cast to unsigned long works around a bug in the HP C Compiler
3542   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3543   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3544   # This bug is HP SR number 8606223364.
3545   if test "$cross_compiling" = yes; then
3546   # Depending upon the size, compute the lo and hi bounds.
3547 cat >conftest.$ac_ext <<_ACEOF
3548 /* confdefs.h.  */
3549 _ACEOF
3550 cat confdefs.h >>conftest.$ac_ext
3551 cat >>conftest.$ac_ext <<_ACEOF
3552 /* end confdefs.h.  */
3553 $ac_includes_default
3554 int
3555 main ()
3556 {
3557 static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
3558 test_array [0] = 0
3559
3560   ;
3561   return 0;
3562 }
3563 _ACEOF
3564 rm -f conftest.$ac_objext
3565 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3566   (eval $ac_compile) 2>conftest.er1
3567   ac_status=$?
3568   grep -v '^ *+' conftest.er1 >conftest.err
3569   rm -f conftest.er1
3570   cat conftest.err >&5
3571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3572   (exit $ac_status); } &&
3573          { ac_try='test -z "$ac_c_werror_flag"
3574                          || test ! -s conftest.err'
3575   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3576   (eval $ac_try) 2>&5
3577   ac_status=$?
3578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3579   (exit $ac_status); }; } &&
3580          { ac_try='test -s conftest.$ac_objext'
3581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3582   (eval $ac_try) 2>&5
3583   ac_status=$?
3584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3585   (exit $ac_status); }; }; then
3586   ac_lo=0 ac_mid=0
3587   while :; do
3588     cat >conftest.$ac_ext <<_ACEOF
3589 /* confdefs.h.  */
3590 _ACEOF
3591 cat confdefs.h >>conftest.$ac_ext
3592 cat >>conftest.$ac_ext <<_ACEOF
3593 /* end confdefs.h.  */
3594 $ac_includes_default
3595 int
3596 main ()
3597 {
3598 static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3599 test_array [0] = 0
3600
3601   ;
3602   return 0;
3603 }
3604 _ACEOF
3605 rm -f conftest.$ac_objext
3606 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3607   (eval $ac_compile) 2>conftest.er1
3608   ac_status=$?
3609   grep -v '^ *+' conftest.er1 >conftest.err
3610   rm -f conftest.er1
3611   cat conftest.err >&5
3612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3613   (exit $ac_status); } &&
3614          { ac_try='test -z "$ac_c_werror_flag"
3615                          || test ! -s conftest.err'
3616   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3617   (eval $ac_try) 2>&5
3618   ac_status=$?
3619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3620   (exit $ac_status); }; } &&
3621          { ac_try='test -s conftest.$ac_objext'
3622   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3623   (eval $ac_try) 2>&5
3624   ac_status=$?
3625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3626   (exit $ac_status); }; }; then
3627   ac_hi=$ac_mid; break
3628 else
3629   echo "$as_me: failed program was:" >&5
3630 sed 's/^/| /' conftest.$ac_ext >&5
3631
3632 ac_lo=`expr $ac_mid + 1`
3633                     if test $ac_lo -le $ac_mid; then
3634                       ac_lo= ac_hi=
3635                       break
3636                     fi
3637                     ac_mid=`expr 2 '*' $ac_mid + 1`
3638 fi
3639 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3640   done
3641 else
3642   echo "$as_me: failed program was:" >&5
3643 sed 's/^/| /' conftest.$ac_ext >&5
3644
3645 cat >conftest.$ac_ext <<_ACEOF
3646 /* confdefs.h.  */
3647 _ACEOF
3648 cat confdefs.h >>conftest.$ac_ext
3649 cat >>conftest.$ac_ext <<_ACEOF
3650 /* end confdefs.h.  */
3651 $ac_includes_default
3652 int
3653 main ()
3654 {
3655 static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
3656 test_array [0] = 0
3657
3658   ;
3659   return 0;
3660 }
3661 _ACEOF
3662 rm -f conftest.$ac_objext
3663 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3664   (eval $ac_compile) 2>conftest.er1
3665   ac_status=$?
3666   grep -v '^ *+' conftest.er1 >conftest.err
3667   rm -f conftest.er1
3668   cat conftest.err >&5
3669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3670   (exit $ac_status); } &&
3671          { ac_try='test -z "$ac_c_werror_flag"
3672                          || test ! -s conftest.err'
3673   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3674   (eval $ac_try) 2>&5
3675   ac_status=$?
3676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3677   (exit $ac_status); }; } &&
3678          { ac_try='test -s conftest.$ac_objext'
3679   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3680   (eval $ac_try) 2>&5
3681   ac_status=$?
3682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3683   (exit $ac_status); }; }; then
3684   ac_hi=-1 ac_mid=-1
3685   while :; do
3686     cat >conftest.$ac_ext <<_ACEOF
3687 /* confdefs.h.  */
3688 _ACEOF
3689 cat confdefs.h >>conftest.$ac_ext
3690 cat >>conftest.$ac_ext <<_ACEOF
3691 /* end confdefs.h.  */
3692 $ac_includes_default
3693 int
3694 main ()
3695 {
3696 static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
3697 test_array [0] = 0
3698
3699   ;
3700   return 0;
3701 }
3702 _ACEOF
3703 rm -f conftest.$ac_objext
3704 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3705   (eval $ac_compile) 2>conftest.er1
3706   ac_status=$?
3707   grep -v '^ *+' conftest.er1 >conftest.err
3708   rm -f conftest.er1
3709   cat conftest.err >&5
3710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3711   (exit $ac_status); } &&
3712          { ac_try='test -z "$ac_c_werror_flag"
3713                          || test ! -s conftest.err'
3714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3715   (eval $ac_try) 2>&5
3716   ac_status=$?
3717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3718   (exit $ac_status); }; } &&
3719          { ac_try='test -s conftest.$ac_objext'
3720   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3721   (eval $ac_try) 2>&5
3722   ac_status=$?
3723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3724   (exit $ac_status); }; }; then
3725   ac_lo=$ac_mid; break
3726 else
3727   echo "$as_me: failed program was:" >&5
3728 sed 's/^/| /' conftest.$ac_ext >&5
3729
3730 ac_hi=`expr '(' $ac_mid ')' - 1`
3731                        if test $ac_mid -le $ac_hi; then
3732                          ac_lo= ac_hi=
3733                          break
3734                        fi
3735                        ac_mid=`expr 2 '*' $ac_mid`
3736 fi
3737 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3738   done
3739 else
3740   echo "$as_me: failed program was:" >&5
3741 sed 's/^/| /' conftest.$ac_ext >&5
3742
3743 ac_lo= ac_hi=
3744 fi
3745 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3746 fi
3747 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3748 # Binary search between lo and hi bounds.
3749 while test "x$ac_lo" != "x$ac_hi"; do
3750   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3751   cat >conftest.$ac_ext <<_ACEOF
3752 /* confdefs.h.  */
3753 _ACEOF
3754 cat confdefs.h >>conftest.$ac_ext
3755 cat >>conftest.$ac_ext <<_ACEOF
3756 /* end confdefs.h.  */
3757 $ac_includes_default
3758 int
3759 main ()
3760 {
3761 static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
3762 test_array [0] = 0
3763
3764   ;
3765   return 0;
3766 }
3767 _ACEOF
3768 rm -f conftest.$ac_objext
3769 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3770   (eval $ac_compile) 2>conftest.er1
3771   ac_status=$?
3772   grep -v '^ *+' conftest.er1 >conftest.err
3773   rm -f conftest.er1
3774   cat conftest.err >&5
3775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3776   (exit $ac_status); } &&
3777          { ac_try='test -z "$ac_c_werror_flag"
3778                          || test ! -s conftest.err'
3779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3780   (eval $ac_try) 2>&5
3781   ac_status=$?
3782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3783   (exit $ac_status); }; } &&
3784          { ac_try='test -s conftest.$ac_objext'
3785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3786   (eval $ac_try) 2>&5
3787   ac_status=$?
3788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3789   (exit $ac_status); }; }; then
3790   ac_hi=$ac_mid
3791 else
3792   echo "$as_me: failed program was:" >&5
3793 sed 's/^/| /' conftest.$ac_ext >&5
3794
3795 ac_lo=`expr '(' $ac_mid ')' + 1`
3796 fi
3797 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3798 done
3799 case $ac_lo in
3800 ?*) ac_cv_sizeof_void_p=$ac_lo;;
3801 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3802 See \`config.log' for more details." >&5
3803 echo "$as_me: error: cannot compute sizeof (void *), 77
3804 See \`config.log' for more details." >&2;}
3805    { (exit 1); exit 1; }; } ;;
3806 esac
3807 else
3808   if test "$cross_compiling" = yes; then
3809   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
3810 See \`config.log' for more details." >&5
3811 echo "$as_me: error: cannot run test program while cross compiling
3812 See \`config.log' for more details." >&2;}
3813    { (exit 1); exit 1; }; }
3814 else
3815   cat >conftest.$ac_ext <<_ACEOF
3816 /* confdefs.h.  */
3817 _ACEOF
3818 cat confdefs.h >>conftest.$ac_ext
3819 cat >>conftest.$ac_ext <<_ACEOF
3820 /* end confdefs.h.  */
3821 $ac_includes_default
3822 long longval () { return (long) (sizeof (void *)); }
3823 unsigned long ulongval () { return (long) (sizeof (void *)); }
3824 #include <stdio.h>
3825 #include <stdlib.h>
3826 int
3827 main ()
3828 {
3829
3830   FILE *f = fopen ("conftest.val", "w");
3831   if (! f)
3832     exit (1);
3833   if (((long) (sizeof (void *))) < 0)
3834     {
3835       long i = longval ();
3836       if (i != ((long) (sizeof (void *))))
3837         exit (1);
3838       fprintf (f, "%ld\n", i);
3839     }
3840   else
3841     {
3842       unsigned long i = ulongval ();
3843       if (i != ((long) (sizeof (void *))))
3844         exit (1);
3845       fprintf (f, "%lu\n", i);
3846     }
3847   exit (ferror (f) || fclose (f) != 0);
3848
3849   ;
3850   return 0;
3851 }
3852 _ACEOF
3853 rm -f conftest$ac_exeext
3854 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3855   (eval $ac_link) 2>&5
3856   ac_status=$?
3857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3858   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3859   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3860   (eval $ac_try) 2>&5
3861   ac_status=$?
3862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3863   (exit $ac_status); }; }; then
3864   ac_cv_sizeof_void_p=`cat conftest.val`
3865 else
3866   echo "$as_me: program exited with status $ac_status" >&5
3867 echo "$as_me: failed program was:" >&5
3868 sed 's/^/| /' conftest.$ac_ext >&5
3869
3870 ( exit $ac_status )
3871 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
3872 See \`config.log' for more details." >&5
3873 echo "$as_me: error: cannot compute sizeof (void *), 77
3874 See \`config.log' for more details." >&2;}
3875    { (exit 1); exit 1; }; }
3876 fi
3877 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3878 fi
3879 fi
3880 rm -f conftest.val
3881 else
3882   ac_cv_sizeof_void_p=0
3883 fi
3884 fi
3885 echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
3886 echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
3887 cat >>confdefs.h <<_ACEOF
3888 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
3889 _ACEOF
3890
3891
3892 echo "$as_me:$LINENO: checking for short" >&5
3893 echo $ECHO_N "checking for short... $ECHO_C" >&6
3894 if test "${ac_cv_type_short+set}" = set; then
3895   echo $ECHO_N "(cached) $ECHO_C" >&6
3896 else
3897   cat >conftest.$ac_ext <<_ACEOF
3898 /* confdefs.h.  */
3899 _ACEOF
3900 cat confdefs.h >>conftest.$ac_ext
3901 cat >>conftest.$ac_ext <<_ACEOF
3902 /* end confdefs.h.  */
3903 $ac_includes_default
3904 int
3905 main ()
3906 {
3907 if ((short *) 0)
3908   return 0;
3909 if (sizeof (short))
3910   return 0;
3911   ;
3912   return 0;
3913 }
3914 _ACEOF
3915 rm -f conftest.$ac_objext
3916 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3917   (eval $ac_compile) 2>conftest.er1
3918   ac_status=$?
3919   grep -v '^ *+' conftest.er1 >conftest.err
3920   rm -f conftest.er1
3921   cat conftest.err >&5
3922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3923   (exit $ac_status); } &&
3924          { ac_try='test -z "$ac_c_werror_flag"
3925                          || test ! -s conftest.err'
3926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3927   (eval $ac_try) 2>&5
3928   ac_status=$?
3929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3930   (exit $ac_status); }; } &&
3931          { ac_try='test -s conftest.$ac_objext'
3932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3933   (eval $ac_try) 2>&5
3934   ac_status=$?
3935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3936   (exit $ac_status); }; }; then
3937   ac_cv_type_short=yes
3938 else
3939   echo "$as_me: failed program was:" >&5
3940 sed 's/^/| /' conftest.$ac_ext >&5
3941
3942 ac_cv_type_short=no
3943 fi
3944 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3945 fi
3946 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
3947 echo "${ECHO_T}$ac_cv_type_short" >&6
3948
3949 echo "$as_me:$LINENO: checking size of short" >&5
3950 echo $ECHO_N "checking size of short... $ECHO_C" >&6
3951 if test "${ac_cv_sizeof_short+set}" = set; then
3952   echo $ECHO_N "(cached) $ECHO_C" >&6
3953 else
3954   if test "$ac_cv_type_short" = yes; then
3955   # The cast to unsigned long works around a bug in the HP C Compiler
3956   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
3957   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
3958   # This bug is HP SR number 8606223364.
3959   if test "$cross_compiling" = yes; then
3960   # Depending upon the size, compute the lo and hi bounds.
3961 cat >conftest.$ac_ext <<_ACEOF
3962 /* confdefs.h.  */
3963 _ACEOF
3964 cat confdefs.h >>conftest.$ac_ext
3965 cat >>conftest.$ac_ext <<_ACEOF
3966 /* end confdefs.h.  */
3967 $ac_includes_default
3968 int
3969 main ()
3970 {
3971 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
3972 test_array [0] = 0
3973
3974   ;
3975   return 0;
3976 }
3977 _ACEOF
3978 rm -f conftest.$ac_objext
3979 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3980   (eval $ac_compile) 2>conftest.er1
3981   ac_status=$?
3982   grep -v '^ *+' conftest.er1 >conftest.err
3983   rm -f conftest.er1
3984   cat conftest.err >&5
3985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3986   (exit $ac_status); } &&
3987          { ac_try='test -z "$ac_c_werror_flag"
3988                          || test ! -s conftest.err'
3989   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3990   (eval $ac_try) 2>&5
3991   ac_status=$?
3992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3993   (exit $ac_status); }; } &&
3994          { ac_try='test -s conftest.$ac_objext'
3995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3996   (eval $ac_try) 2>&5
3997   ac_status=$?
3998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3999   (exit $ac_status); }; }; then
4000   ac_lo=0 ac_mid=0
4001   while :; do
4002     cat >conftest.$ac_ext <<_ACEOF
4003 /* confdefs.h.  */
4004 _ACEOF
4005 cat confdefs.h >>conftest.$ac_ext
4006 cat >>conftest.$ac_ext <<_ACEOF
4007 /* end confdefs.h.  */
4008 $ac_includes_default
4009 int
4010 main ()
4011 {
4012 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4013 test_array [0] = 0
4014
4015   ;
4016   return 0;
4017 }
4018 _ACEOF
4019 rm -f conftest.$ac_objext
4020 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4021   (eval $ac_compile) 2>conftest.er1
4022   ac_status=$?
4023   grep -v '^ *+' conftest.er1 >conftest.err
4024   rm -f conftest.er1
4025   cat conftest.err >&5
4026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4027   (exit $ac_status); } &&
4028          { ac_try='test -z "$ac_c_werror_flag"
4029                          || test ! -s conftest.err'
4030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4031   (eval $ac_try) 2>&5
4032   ac_status=$?
4033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4034   (exit $ac_status); }; } &&
4035          { ac_try='test -s conftest.$ac_objext'
4036   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4037   (eval $ac_try) 2>&5
4038   ac_status=$?
4039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4040   (exit $ac_status); }; }; then
4041   ac_hi=$ac_mid; break
4042 else
4043   echo "$as_me: failed program was:" >&5
4044 sed 's/^/| /' conftest.$ac_ext >&5
4045
4046 ac_lo=`expr $ac_mid + 1`
4047                     if test $ac_lo -le $ac_mid; then
4048                       ac_lo= ac_hi=
4049                       break
4050                     fi
4051                     ac_mid=`expr 2 '*' $ac_mid + 1`
4052 fi
4053 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4054   done
4055 else
4056   echo "$as_me: failed program was:" >&5
4057 sed 's/^/| /' conftest.$ac_ext >&5
4058
4059 cat >conftest.$ac_ext <<_ACEOF
4060 /* confdefs.h.  */
4061 _ACEOF
4062 cat confdefs.h >>conftest.$ac_ext
4063 cat >>conftest.$ac_ext <<_ACEOF
4064 /* end confdefs.h.  */
4065 $ac_includes_default
4066 int
4067 main ()
4068 {
4069 static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
4070 test_array [0] = 0
4071
4072   ;
4073   return 0;
4074 }
4075 _ACEOF
4076 rm -f conftest.$ac_objext
4077 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4078   (eval $ac_compile) 2>conftest.er1
4079   ac_status=$?
4080   grep -v '^ *+' conftest.er1 >conftest.err
4081   rm -f conftest.er1
4082   cat conftest.err >&5
4083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4084   (exit $ac_status); } &&
4085          { ac_try='test -z "$ac_c_werror_flag"
4086                          || test ! -s conftest.err'
4087   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4088   (eval $ac_try) 2>&5
4089   ac_status=$?
4090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4091   (exit $ac_status); }; } &&
4092          { ac_try='test -s conftest.$ac_objext'
4093   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4094   (eval $ac_try) 2>&5
4095   ac_status=$?
4096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4097   (exit $ac_status); }; }; then
4098   ac_hi=-1 ac_mid=-1
4099   while :; do
4100     cat >conftest.$ac_ext <<_ACEOF
4101 /* confdefs.h.  */
4102 _ACEOF
4103 cat confdefs.h >>conftest.$ac_ext
4104 cat >>conftest.$ac_ext <<_ACEOF
4105 /* end confdefs.h.  */
4106 $ac_includes_default
4107 int
4108 main ()
4109 {
4110 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
4111 test_array [0] = 0
4112
4113   ;
4114   return 0;
4115 }
4116 _ACEOF
4117 rm -f conftest.$ac_objext
4118 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4119   (eval $ac_compile) 2>conftest.er1
4120   ac_status=$?
4121   grep -v '^ *+' conftest.er1 >conftest.err
4122   rm -f conftest.er1
4123   cat conftest.err >&5
4124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4125   (exit $ac_status); } &&
4126          { ac_try='test -z "$ac_c_werror_flag"
4127                          || test ! -s conftest.err'
4128   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4129   (eval $ac_try) 2>&5
4130   ac_status=$?
4131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4132   (exit $ac_status); }; } &&
4133          { ac_try='test -s conftest.$ac_objext'
4134   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4135   (eval $ac_try) 2>&5
4136   ac_status=$?
4137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4138   (exit $ac_status); }; }; then
4139   ac_lo=$ac_mid; break
4140 else
4141   echo "$as_me: failed program was:" >&5
4142 sed 's/^/| /' conftest.$ac_ext >&5
4143
4144 ac_hi=`expr '(' $ac_mid ')' - 1`
4145                        if test $ac_mid -le $ac_hi; then
4146                          ac_lo= ac_hi=
4147                          break
4148                        fi
4149                        ac_mid=`expr 2 '*' $ac_mid`
4150 fi
4151 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4152   done
4153 else
4154   echo "$as_me: failed program was:" >&5
4155 sed 's/^/| /' conftest.$ac_ext >&5
4156
4157 ac_lo= ac_hi=
4158 fi
4159 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4160 fi
4161 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4162 # Binary search between lo and hi bounds.
4163 while test "x$ac_lo" != "x$ac_hi"; do
4164   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4165   cat >conftest.$ac_ext <<_ACEOF
4166 /* confdefs.h.  */
4167 _ACEOF
4168 cat confdefs.h >>conftest.$ac_ext
4169 cat >>conftest.$ac_ext <<_ACEOF
4170 /* end confdefs.h.  */
4171 $ac_includes_default
4172 int
4173 main ()
4174 {
4175 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
4176 test_array [0] = 0
4177
4178   ;
4179   return 0;
4180 }
4181 _ACEOF
4182 rm -f conftest.$ac_objext
4183 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4184   (eval $ac_compile) 2>conftest.er1
4185   ac_status=$?
4186   grep -v '^ *+' conftest.er1 >conftest.err
4187   rm -f conftest.er1
4188   cat conftest.err >&5
4189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4190   (exit $ac_status); } &&
4191          { ac_try='test -z "$ac_c_werror_flag"
4192                          || test ! -s conftest.err'
4193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4194   (eval $ac_try) 2>&5
4195   ac_status=$?
4196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4197   (exit $ac_status); }; } &&
4198          { ac_try='test -s conftest.$ac_objext'
4199   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4200   (eval $ac_try) 2>&5
4201   ac_status=$?
4202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4203   (exit $ac_status); }; }; then
4204   ac_hi=$ac_mid
4205 else
4206   echo "$as_me: failed program was:" >&5
4207 sed 's/^/| /' conftest.$ac_ext >&5
4208
4209 ac_lo=`expr '(' $ac_mid ')' + 1`
4210 fi
4211 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4212 done
4213 case $ac_lo in
4214 ?*) ac_cv_sizeof_short=$ac_lo;;
4215 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4216 See \`config.log' for more details." >&5
4217 echo "$as_me: error: cannot compute sizeof (short), 77
4218 See \`config.log' for more details." >&2;}
4219    { (exit 1); exit 1; }; } ;;
4220 esac
4221 else
4222   if test "$cross_compiling" = yes; then
4223   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4224 See \`config.log' for more details." >&5
4225 echo "$as_me: error: cannot run test program while cross compiling
4226 See \`config.log' for more details." >&2;}
4227    { (exit 1); exit 1; }; }
4228 else
4229   cat >conftest.$ac_ext <<_ACEOF
4230 /* confdefs.h.  */
4231 _ACEOF
4232 cat confdefs.h >>conftest.$ac_ext
4233 cat >>conftest.$ac_ext <<_ACEOF
4234 /* end confdefs.h.  */
4235 $ac_includes_default
4236 long longval () { return (long) (sizeof (short)); }
4237 unsigned long ulongval () { return (long) (sizeof (short)); }
4238 #include <stdio.h>
4239 #include <stdlib.h>
4240 int
4241 main ()
4242 {
4243
4244   FILE *f = fopen ("conftest.val", "w");
4245   if (! f)
4246     exit (1);
4247   if (((long) (sizeof (short))) < 0)
4248     {
4249       long i = longval ();
4250       if (i != ((long) (sizeof (short))))
4251         exit (1);
4252       fprintf (f, "%ld\n", i);
4253     }
4254   else
4255     {
4256       unsigned long i = ulongval ();
4257       if (i != ((long) (sizeof (short))))
4258         exit (1);
4259       fprintf (f, "%lu\n", i);
4260     }
4261   exit (ferror (f) || fclose (f) != 0);
4262
4263   ;
4264   return 0;
4265 }
4266 _ACEOF
4267 rm -f conftest$ac_exeext
4268 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4269   (eval $ac_link) 2>&5
4270   ac_status=$?
4271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4272   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4274   (eval $ac_try) 2>&5
4275   ac_status=$?
4276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4277   (exit $ac_status); }; }; then
4278   ac_cv_sizeof_short=`cat conftest.val`
4279 else
4280   echo "$as_me: program exited with status $ac_status" >&5
4281 echo "$as_me: failed program was:" >&5
4282 sed 's/^/| /' conftest.$ac_ext >&5
4283
4284 ( exit $ac_status )
4285 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
4286 See \`config.log' for more details." >&5
4287 echo "$as_me: error: cannot compute sizeof (short), 77
4288 See \`config.log' for more details." >&2;}
4289    { (exit 1); exit 1; }; }
4290 fi
4291 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4292 fi
4293 fi
4294 rm -f conftest.val
4295 else
4296   ac_cv_sizeof_short=0
4297 fi
4298 fi
4299 echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
4300 echo "${ECHO_T}$ac_cv_sizeof_short" >&6
4301 cat >>confdefs.h <<_ACEOF
4302 #define SIZEOF_SHORT $ac_cv_sizeof_short
4303 _ACEOF
4304
4305
4306 echo "$as_me:$LINENO: checking for int" >&5
4307 echo $ECHO_N "checking for int... $ECHO_C" >&6
4308 if test "${ac_cv_type_int+set}" = set; then
4309   echo $ECHO_N "(cached) $ECHO_C" >&6
4310 else
4311   cat >conftest.$ac_ext <<_ACEOF
4312 /* confdefs.h.  */
4313 _ACEOF
4314 cat confdefs.h >>conftest.$ac_ext
4315 cat >>conftest.$ac_ext <<_ACEOF
4316 /* end confdefs.h.  */
4317 $ac_includes_default
4318 int
4319 main ()
4320 {
4321 if ((int *) 0)
4322   return 0;
4323 if (sizeof (int))
4324   return 0;
4325   ;
4326   return 0;
4327 }
4328 _ACEOF
4329 rm -f conftest.$ac_objext
4330 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4331   (eval $ac_compile) 2>conftest.er1
4332   ac_status=$?
4333   grep -v '^ *+' conftest.er1 >conftest.err
4334   rm -f conftest.er1
4335   cat conftest.err >&5
4336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4337   (exit $ac_status); } &&
4338          { ac_try='test -z "$ac_c_werror_flag"
4339                          || test ! -s conftest.err'
4340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4341   (eval $ac_try) 2>&5
4342   ac_status=$?
4343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4344   (exit $ac_status); }; } &&
4345          { ac_try='test -s conftest.$ac_objext'
4346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4347   (eval $ac_try) 2>&5
4348   ac_status=$?
4349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4350   (exit $ac_status); }; }; then
4351   ac_cv_type_int=yes
4352 else
4353   echo "$as_me: failed program was:" >&5
4354 sed 's/^/| /' conftest.$ac_ext >&5
4355
4356 ac_cv_type_int=no
4357 fi
4358 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4359 fi
4360 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4361 echo "${ECHO_T}$ac_cv_type_int" >&6
4362
4363 echo "$as_me:$LINENO: checking size of int" >&5
4364 echo $ECHO_N "checking size of int... $ECHO_C" >&6
4365 if test "${ac_cv_sizeof_int+set}" = set; then
4366   echo $ECHO_N "(cached) $ECHO_C" >&6
4367 else
4368   if test "$ac_cv_type_int" = yes; then
4369   # The cast to unsigned long works around a bug in the HP C Compiler
4370   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4371   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4372   # This bug is HP SR number 8606223364.
4373   if test "$cross_compiling" = yes; then
4374   # Depending upon the size, compute the lo and hi bounds.
4375 cat >conftest.$ac_ext <<_ACEOF
4376 /* confdefs.h.  */
4377 _ACEOF
4378 cat confdefs.h >>conftest.$ac_ext
4379 cat >>conftest.$ac_ext <<_ACEOF
4380 /* end confdefs.h.  */
4381 $ac_includes_default
4382 int
4383 main ()
4384 {
4385 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4386 test_array [0] = 0
4387
4388   ;
4389   return 0;
4390 }
4391 _ACEOF
4392 rm -f conftest.$ac_objext
4393 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4394   (eval $ac_compile) 2>conftest.er1
4395   ac_status=$?
4396   grep -v '^ *+' conftest.er1 >conftest.err
4397   rm -f conftest.er1
4398   cat conftest.err >&5
4399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4400   (exit $ac_status); } &&
4401          { ac_try='test -z "$ac_c_werror_flag"
4402                          || test ! -s conftest.err'
4403   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4404   (eval $ac_try) 2>&5
4405   ac_status=$?
4406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4407   (exit $ac_status); }; } &&
4408          { ac_try='test -s conftest.$ac_objext'
4409   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4410   (eval $ac_try) 2>&5
4411   ac_status=$?
4412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4413   (exit $ac_status); }; }; then
4414   ac_lo=0 ac_mid=0
4415   while :; do
4416     cat >conftest.$ac_ext <<_ACEOF
4417 /* confdefs.h.  */
4418 _ACEOF
4419 cat confdefs.h >>conftest.$ac_ext
4420 cat >>conftest.$ac_ext <<_ACEOF
4421 /* end confdefs.h.  */
4422 $ac_includes_default
4423 int
4424 main ()
4425 {
4426 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4427 test_array [0] = 0
4428
4429   ;
4430   return 0;
4431 }
4432 _ACEOF
4433 rm -f conftest.$ac_objext
4434 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4435   (eval $ac_compile) 2>conftest.er1
4436   ac_status=$?
4437   grep -v '^ *+' conftest.er1 >conftest.err
4438   rm -f conftest.er1
4439   cat conftest.err >&5
4440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4441   (exit $ac_status); } &&
4442          { ac_try='test -z "$ac_c_werror_flag"
4443                          || test ! -s conftest.err'
4444   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4445   (eval $ac_try) 2>&5
4446   ac_status=$?
4447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4448   (exit $ac_status); }; } &&
4449          { ac_try='test -s conftest.$ac_objext'
4450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4451   (eval $ac_try) 2>&5
4452   ac_status=$?
4453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4454   (exit $ac_status); }; }; then
4455   ac_hi=$ac_mid; break
4456 else
4457   echo "$as_me: failed program was:" >&5
4458 sed 's/^/| /' conftest.$ac_ext >&5
4459
4460 ac_lo=`expr $ac_mid + 1`
4461                     if test $ac_lo -le $ac_mid; then
4462                       ac_lo= ac_hi=
4463                       break
4464                     fi
4465                     ac_mid=`expr 2 '*' $ac_mid + 1`
4466 fi
4467 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4468   done
4469 else
4470   echo "$as_me: failed program was:" >&5
4471 sed 's/^/| /' conftest.$ac_ext >&5
4472
4473 cat >conftest.$ac_ext <<_ACEOF
4474 /* confdefs.h.  */
4475 _ACEOF
4476 cat confdefs.h >>conftest.$ac_ext
4477 cat >>conftest.$ac_ext <<_ACEOF
4478 /* end confdefs.h.  */
4479 $ac_includes_default
4480 int
4481 main ()
4482 {
4483 static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4484 test_array [0] = 0
4485
4486   ;
4487   return 0;
4488 }
4489 _ACEOF
4490 rm -f conftest.$ac_objext
4491 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4492   (eval $ac_compile) 2>conftest.er1
4493   ac_status=$?
4494   grep -v '^ *+' conftest.er1 >conftest.err
4495   rm -f conftest.er1
4496   cat conftest.err >&5
4497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4498   (exit $ac_status); } &&
4499          { ac_try='test -z "$ac_c_werror_flag"
4500                          || test ! -s conftest.err'
4501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4502   (eval $ac_try) 2>&5
4503   ac_status=$?
4504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4505   (exit $ac_status); }; } &&
4506          { ac_try='test -s conftest.$ac_objext'
4507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4508   (eval $ac_try) 2>&5
4509   ac_status=$?
4510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4511   (exit $ac_status); }; }; then
4512   ac_hi=-1 ac_mid=-1
4513   while :; do
4514     cat >conftest.$ac_ext <<_ACEOF
4515 /* confdefs.h.  */
4516 _ACEOF
4517 cat confdefs.h >>conftest.$ac_ext
4518 cat >>conftest.$ac_ext <<_ACEOF
4519 /* end confdefs.h.  */
4520 $ac_includes_default
4521 int
4522 main ()
4523 {
4524 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4525 test_array [0] = 0
4526
4527   ;
4528   return 0;
4529 }
4530 _ACEOF
4531 rm -f conftest.$ac_objext
4532 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4533   (eval $ac_compile) 2>conftest.er1
4534   ac_status=$?
4535   grep -v '^ *+' conftest.er1 >conftest.err
4536   rm -f conftest.er1
4537   cat conftest.err >&5
4538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4539   (exit $ac_status); } &&
4540          { ac_try='test -z "$ac_c_werror_flag"
4541                          || test ! -s conftest.err'
4542   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4543   (eval $ac_try) 2>&5
4544   ac_status=$?
4545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4546   (exit $ac_status); }; } &&
4547          { ac_try='test -s conftest.$ac_objext'
4548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4549   (eval $ac_try) 2>&5
4550   ac_status=$?
4551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4552   (exit $ac_status); }; }; then
4553   ac_lo=$ac_mid; break
4554 else
4555   echo "$as_me: failed program was:" >&5
4556 sed 's/^/| /' conftest.$ac_ext >&5
4557
4558 ac_hi=`expr '(' $ac_mid ')' - 1`
4559                        if test $ac_mid -le $ac_hi; then
4560                          ac_lo= ac_hi=
4561                          break
4562                        fi
4563                        ac_mid=`expr 2 '*' $ac_mid`
4564 fi
4565 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4566   done
4567 else
4568   echo "$as_me: failed program was:" >&5
4569 sed 's/^/| /' conftest.$ac_ext >&5
4570
4571 ac_lo= ac_hi=
4572 fi
4573 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4574 fi
4575 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4576 # Binary search between lo and hi bounds.
4577 while test "x$ac_lo" != "x$ac_hi"; do
4578   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4579   cat >conftest.$ac_ext <<_ACEOF
4580 /* confdefs.h.  */
4581 _ACEOF
4582 cat confdefs.h >>conftest.$ac_ext
4583 cat >>conftest.$ac_ext <<_ACEOF
4584 /* end confdefs.h.  */
4585 $ac_includes_default
4586 int
4587 main ()
4588 {
4589 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4590 test_array [0] = 0
4591
4592   ;
4593   return 0;
4594 }
4595 _ACEOF
4596 rm -f conftest.$ac_objext
4597 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4598   (eval $ac_compile) 2>conftest.er1
4599   ac_status=$?
4600   grep -v '^ *+' conftest.er1 >conftest.err
4601   rm -f conftest.er1
4602   cat conftest.err >&5
4603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4604   (exit $ac_status); } &&
4605          { ac_try='test -z "$ac_c_werror_flag"
4606                          || test ! -s conftest.err'
4607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4608   (eval $ac_try) 2>&5
4609   ac_status=$?
4610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4611   (exit $ac_status); }; } &&
4612          { ac_try='test -s conftest.$ac_objext'
4613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4614   (eval $ac_try) 2>&5
4615   ac_status=$?
4616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4617   (exit $ac_status); }; }; then
4618   ac_hi=$ac_mid
4619 else
4620   echo "$as_me: failed program was:" >&5
4621 sed 's/^/| /' conftest.$ac_ext >&5
4622
4623 ac_lo=`expr '(' $ac_mid ')' + 1`
4624 fi
4625 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4626 done
4627 case $ac_lo in
4628 ?*) ac_cv_sizeof_int=$ac_lo;;
4629 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4630 See \`config.log' for more details." >&5
4631 echo "$as_me: error: cannot compute sizeof (int), 77
4632 See \`config.log' for more details." >&2;}
4633    { (exit 1); exit 1; }; } ;;
4634 esac
4635 else
4636   if test "$cross_compiling" = yes; then
4637   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4638 See \`config.log' for more details." >&5
4639 echo "$as_me: error: cannot run test program while cross compiling
4640 See \`config.log' for more details." >&2;}
4641    { (exit 1); exit 1; }; }
4642 else
4643   cat >conftest.$ac_ext <<_ACEOF
4644 /* confdefs.h.  */
4645 _ACEOF
4646 cat confdefs.h >>conftest.$ac_ext
4647 cat >>conftest.$ac_ext <<_ACEOF
4648 /* end confdefs.h.  */
4649 $ac_includes_default
4650 long longval () { return (long) (sizeof (int)); }
4651 unsigned long ulongval () { return (long) (sizeof (int)); }
4652 #include <stdio.h>
4653 #include <stdlib.h>
4654 int
4655 main ()
4656 {
4657
4658   FILE *f = fopen ("conftest.val", "w");
4659   if (! f)
4660     exit (1);
4661   if (((long) (sizeof (int))) < 0)
4662     {
4663       long i = longval ();
4664       if (i != ((long) (sizeof (int))))
4665         exit (1);
4666       fprintf (f, "%ld\n", i);
4667     }
4668   else
4669     {
4670       unsigned long i = ulongval ();
4671       if (i != ((long) (sizeof (int))))
4672         exit (1);
4673       fprintf (f, "%lu\n", i);
4674     }
4675   exit (ferror (f) || fclose (f) != 0);
4676
4677   ;
4678   return 0;
4679 }
4680 _ACEOF
4681 rm -f conftest$ac_exeext
4682 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4683   (eval $ac_link) 2>&5
4684   ac_status=$?
4685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4686   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4688   (eval $ac_try) 2>&5
4689   ac_status=$?
4690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4691   (exit $ac_status); }; }; then
4692   ac_cv_sizeof_int=`cat conftest.val`
4693 else
4694   echo "$as_me: program exited with status $ac_status" >&5
4695 echo "$as_me: failed program was:" >&5
4696 sed 's/^/| /' conftest.$ac_ext >&5
4697
4698 ( exit $ac_status )
4699 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
4700 See \`config.log' for more details." >&5
4701 echo "$as_me: error: cannot compute sizeof (int), 77
4702 See \`config.log' for more details." >&2;}
4703    { (exit 1); exit 1; }; }
4704 fi
4705 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4706 fi
4707 fi
4708 rm -f conftest.val
4709 else
4710   ac_cv_sizeof_int=0
4711 fi
4712 fi
4713 echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4714 echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4715 cat >>confdefs.h <<_ACEOF
4716 #define SIZEOF_INT $ac_cv_sizeof_int
4717 _ACEOF
4718
4719
4720 echo "$as_me:$LINENO: checking for long" >&5
4721 echo $ECHO_N "checking for long... $ECHO_C" >&6
4722 if test "${ac_cv_type_long+set}" = set; then
4723   echo $ECHO_N "(cached) $ECHO_C" >&6
4724 else
4725   cat >conftest.$ac_ext <<_ACEOF
4726 /* confdefs.h.  */
4727 _ACEOF
4728 cat confdefs.h >>conftest.$ac_ext
4729 cat >>conftest.$ac_ext <<_ACEOF
4730 /* end confdefs.h.  */
4731 $ac_includes_default
4732 int
4733 main ()
4734 {
4735 if ((long *) 0)
4736   return 0;
4737 if (sizeof (long))
4738   return 0;
4739   ;
4740   return 0;
4741 }
4742 _ACEOF
4743 rm -f conftest.$ac_objext
4744 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4745   (eval $ac_compile) 2>conftest.er1
4746   ac_status=$?
4747   grep -v '^ *+' conftest.er1 >conftest.err
4748   rm -f conftest.er1
4749   cat conftest.err >&5
4750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4751   (exit $ac_status); } &&
4752          { ac_try='test -z "$ac_c_werror_flag"
4753                          || test ! -s conftest.err'
4754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4755   (eval $ac_try) 2>&5
4756   ac_status=$?
4757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4758   (exit $ac_status); }; } &&
4759          { ac_try='test -s conftest.$ac_objext'
4760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4761   (eval $ac_try) 2>&5
4762   ac_status=$?
4763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4764   (exit $ac_status); }; }; then
4765   ac_cv_type_long=yes
4766 else
4767   echo "$as_me: failed program was:" >&5
4768 sed 's/^/| /' conftest.$ac_ext >&5
4769
4770 ac_cv_type_long=no
4771 fi
4772 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4773 fi
4774 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
4775 echo "${ECHO_T}$ac_cv_type_long" >&6
4776
4777 echo "$as_me:$LINENO: checking size of long" >&5
4778 echo $ECHO_N "checking size of long... $ECHO_C" >&6
4779 if test "${ac_cv_sizeof_long+set}" = set; then
4780   echo $ECHO_N "(cached) $ECHO_C" >&6
4781 else
4782   if test "$ac_cv_type_long" = yes; then
4783   # The cast to unsigned long works around a bug in the HP C Compiler
4784   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4785   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4786   # This bug is HP SR number 8606223364.
4787   if test "$cross_compiling" = yes; then
4788   # Depending upon the size, compute the lo and hi bounds.
4789 cat >conftest.$ac_ext <<_ACEOF
4790 /* confdefs.h.  */
4791 _ACEOF
4792 cat confdefs.h >>conftest.$ac_ext
4793 cat >>conftest.$ac_ext <<_ACEOF
4794 /* end confdefs.h.  */
4795 $ac_includes_default
4796 int
4797 main ()
4798 {
4799 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
4800 test_array [0] = 0
4801
4802   ;
4803   return 0;
4804 }
4805 _ACEOF
4806 rm -f conftest.$ac_objext
4807 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4808   (eval $ac_compile) 2>conftest.er1
4809   ac_status=$?
4810   grep -v '^ *+' conftest.er1 >conftest.err
4811   rm -f conftest.er1
4812   cat conftest.err >&5
4813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4814   (exit $ac_status); } &&
4815          { ac_try='test -z "$ac_c_werror_flag"
4816                          || test ! -s conftest.err'
4817   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4818   (eval $ac_try) 2>&5
4819   ac_status=$?
4820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4821   (exit $ac_status); }; } &&
4822          { ac_try='test -s conftest.$ac_objext'
4823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4824   (eval $ac_try) 2>&5
4825   ac_status=$?
4826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4827   (exit $ac_status); }; }; then
4828   ac_lo=0 ac_mid=0
4829   while :; do
4830     cat >conftest.$ac_ext <<_ACEOF
4831 /* confdefs.h.  */
4832 _ACEOF
4833 cat confdefs.h >>conftest.$ac_ext
4834 cat >>conftest.$ac_ext <<_ACEOF
4835 /* end confdefs.h.  */
4836 $ac_includes_default
4837 int
4838 main ()
4839 {
4840 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
4841 test_array [0] = 0
4842
4843   ;
4844   return 0;
4845 }
4846 _ACEOF
4847 rm -f conftest.$ac_objext
4848 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4849   (eval $ac_compile) 2>conftest.er1
4850   ac_status=$?
4851   grep -v '^ *+' conftest.er1 >conftest.err
4852   rm -f conftest.er1
4853   cat conftest.err >&5
4854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4855   (exit $ac_status); } &&
4856          { ac_try='test -z "$ac_c_werror_flag"
4857                          || test ! -s conftest.err'
4858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4859   (eval $ac_try) 2>&5
4860   ac_status=$?
4861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4862   (exit $ac_status); }; } &&
4863          { ac_try='test -s conftest.$ac_objext'
4864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4865   (eval $ac_try) 2>&5
4866   ac_status=$?
4867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4868   (exit $ac_status); }; }; then
4869   ac_hi=$ac_mid; break
4870 else
4871   echo "$as_me: failed program was:" >&5
4872 sed 's/^/| /' conftest.$ac_ext >&5
4873
4874 ac_lo=`expr $ac_mid + 1`
4875                     if test $ac_lo -le $ac_mid; then
4876                       ac_lo= ac_hi=
4877                       break
4878                     fi
4879                     ac_mid=`expr 2 '*' $ac_mid + 1`
4880 fi
4881 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4882   done
4883 else
4884   echo "$as_me: failed program was:" >&5
4885 sed 's/^/| /' conftest.$ac_ext >&5
4886
4887 cat >conftest.$ac_ext <<_ACEOF
4888 /* confdefs.h.  */
4889 _ACEOF
4890 cat confdefs.h >>conftest.$ac_ext
4891 cat >>conftest.$ac_ext <<_ACEOF
4892 /* end confdefs.h.  */
4893 $ac_includes_default
4894 int
4895 main ()
4896 {
4897 static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
4898 test_array [0] = 0
4899
4900   ;
4901   return 0;
4902 }
4903 _ACEOF
4904 rm -f conftest.$ac_objext
4905 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4906   (eval $ac_compile) 2>conftest.er1
4907   ac_status=$?
4908   grep -v '^ *+' conftest.er1 >conftest.err
4909   rm -f conftest.er1
4910   cat conftest.err >&5
4911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4912   (exit $ac_status); } &&
4913          { ac_try='test -z "$ac_c_werror_flag"
4914                          || test ! -s conftest.err'
4915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4916   (eval $ac_try) 2>&5
4917   ac_status=$?
4918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4919   (exit $ac_status); }; } &&
4920          { ac_try='test -s conftest.$ac_objext'
4921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4922   (eval $ac_try) 2>&5
4923   ac_status=$?
4924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4925   (exit $ac_status); }; }; then
4926   ac_hi=-1 ac_mid=-1
4927   while :; do
4928     cat >conftest.$ac_ext <<_ACEOF
4929 /* confdefs.h.  */
4930 _ACEOF
4931 cat confdefs.h >>conftest.$ac_ext
4932 cat >>conftest.$ac_ext <<_ACEOF
4933 /* end confdefs.h.  */
4934 $ac_includes_default
4935 int
4936 main ()
4937 {
4938 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
4939 test_array [0] = 0
4940
4941   ;
4942   return 0;
4943 }
4944 _ACEOF
4945 rm -f conftest.$ac_objext
4946 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4947   (eval $ac_compile) 2>conftest.er1
4948   ac_status=$?
4949   grep -v '^ *+' conftest.er1 >conftest.err
4950   rm -f conftest.er1
4951   cat conftest.err >&5
4952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4953   (exit $ac_status); } &&
4954          { ac_try='test -z "$ac_c_werror_flag"
4955                          || test ! -s conftest.err'
4956   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4957   (eval $ac_try) 2>&5
4958   ac_status=$?
4959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4960   (exit $ac_status); }; } &&
4961          { ac_try='test -s conftest.$ac_objext'
4962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4963   (eval $ac_try) 2>&5
4964   ac_status=$?
4965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4966   (exit $ac_status); }; }; then
4967   ac_lo=$ac_mid; break
4968 else
4969   echo "$as_me: failed program was:" >&5
4970 sed 's/^/| /' conftest.$ac_ext >&5
4971
4972 ac_hi=`expr '(' $ac_mid ')' - 1`
4973                        if test $ac_mid -le $ac_hi; then
4974                          ac_lo= ac_hi=
4975                          break
4976                        fi
4977                        ac_mid=`expr 2 '*' $ac_mid`
4978 fi
4979 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4980   done
4981 else
4982   echo "$as_me: failed program was:" >&5
4983 sed 's/^/| /' conftest.$ac_ext >&5
4984
4985 ac_lo= ac_hi=
4986 fi
4987 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4988 fi
4989 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4990 # Binary search between lo and hi bounds.
4991 while test "x$ac_lo" != "x$ac_hi"; do
4992   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4993   cat >conftest.$ac_ext <<_ACEOF
4994 /* confdefs.h.  */
4995 _ACEOF
4996 cat confdefs.h >>conftest.$ac_ext
4997 cat >>conftest.$ac_ext <<_ACEOF
4998 /* end confdefs.h.  */
4999 $ac_includes_default
5000 int
5001 main ()
5002 {
5003 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5004 test_array [0] = 0
5005
5006   ;
5007   return 0;
5008 }
5009 _ACEOF
5010 rm -f conftest.$ac_objext
5011 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5012   (eval $ac_compile) 2>conftest.er1
5013   ac_status=$?
5014   grep -v '^ *+' conftest.er1 >conftest.err
5015   rm -f conftest.er1
5016   cat conftest.err >&5
5017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5018   (exit $ac_status); } &&
5019          { ac_try='test -z "$ac_c_werror_flag"
5020                          || test ! -s conftest.err'
5021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5022   (eval $ac_try) 2>&5
5023   ac_status=$?
5024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5025   (exit $ac_status); }; } &&
5026          { ac_try='test -s conftest.$ac_objext'
5027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5028   (eval $ac_try) 2>&5
5029   ac_status=$?
5030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5031   (exit $ac_status); }; }; then
5032   ac_hi=$ac_mid
5033 else
5034   echo "$as_me: failed program was:" >&5
5035 sed 's/^/| /' conftest.$ac_ext >&5
5036
5037 ac_lo=`expr '(' $ac_mid ')' + 1`
5038 fi
5039 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5040 done
5041 case $ac_lo in
5042 ?*) ac_cv_sizeof_long=$ac_lo;;
5043 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5044 See \`config.log' for more details." >&5
5045 echo "$as_me: error: cannot compute sizeof (long), 77
5046 See \`config.log' for more details." >&2;}
5047    { (exit 1); exit 1; }; } ;;
5048 esac
5049 else
5050   if test "$cross_compiling" = yes; then
5051   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5052 See \`config.log' for more details." >&5
5053 echo "$as_me: error: cannot run test program while cross compiling
5054 See \`config.log' for more details." >&2;}
5055    { (exit 1); exit 1; }; }
5056 else
5057   cat >conftest.$ac_ext <<_ACEOF
5058 /* confdefs.h.  */
5059 _ACEOF
5060 cat confdefs.h >>conftest.$ac_ext
5061 cat >>conftest.$ac_ext <<_ACEOF
5062 /* end confdefs.h.  */
5063 $ac_includes_default
5064 long longval () { return (long) (sizeof (long)); }
5065 unsigned long ulongval () { return (long) (sizeof (long)); }
5066 #include <stdio.h>
5067 #include <stdlib.h>
5068 int
5069 main ()
5070 {
5071
5072   FILE *f = fopen ("conftest.val", "w");
5073   if (! f)
5074     exit (1);
5075   if (((long) (sizeof (long))) < 0)
5076     {
5077       long i = longval ();
5078       if (i != ((long) (sizeof (long))))
5079         exit (1);
5080       fprintf (f, "%ld\n", i);
5081     }
5082   else
5083     {
5084       unsigned long i = ulongval ();
5085       if (i != ((long) (sizeof (long))))
5086         exit (1);
5087       fprintf (f, "%lu\n", i);
5088     }
5089   exit (ferror (f) || fclose (f) != 0);
5090
5091   ;
5092   return 0;
5093 }
5094 _ACEOF
5095 rm -f conftest$ac_exeext
5096 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5097   (eval $ac_link) 2>&5
5098   ac_status=$?
5099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5100   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5101   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5102   (eval $ac_try) 2>&5
5103   ac_status=$?
5104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5105   (exit $ac_status); }; }; then
5106   ac_cv_sizeof_long=`cat conftest.val`
5107 else
5108   echo "$as_me: program exited with status $ac_status" >&5
5109 echo "$as_me: failed program was:" >&5
5110 sed 's/^/| /' conftest.$ac_ext >&5
5111
5112 ( exit $ac_status )
5113 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
5114 See \`config.log' for more details." >&5
5115 echo "$as_me: error: cannot compute sizeof (long), 77
5116 See \`config.log' for more details." >&2;}
5117    { (exit 1); exit 1; }; }
5118 fi
5119 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5120 fi
5121 fi
5122 rm -f conftest.val
5123 else
5124   ac_cv_sizeof_long=0
5125 fi
5126 fi
5127 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5128 echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5129 cat >>confdefs.h <<_ACEOF
5130 #define SIZEOF_LONG $ac_cv_sizeof_long
5131 _ACEOF
5132
5133
5134 echo "$as_me:$LINENO: checking for long long" >&5
5135 echo $ECHO_N "checking for long long... $ECHO_C" >&6
5136 if test "${ac_cv_type_long_long+set}" = set; then
5137   echo $ECHO_N "(cached) $ECHO_C" >&6
5138 else
5139   cat >conftest.$ac_ext <<_ACEOF
5140 /* confdefs.h.  */
5141 _ACEOF
5142 cat confdefs.h >>conftest.$ac_ext
5143 cat >>conftest.$ac_ext <<_ACEOF
5144 /* end confdefs.h.  */
5145 $ac_includes_default
5146 int
5147 main ()
5148 {
5149 if ((long long *) 0)
5150   return 0;
5151 if (sizeof (long long))
5152   return 0;
5153   ;
5154   return 0;
5155 }
5156 _ACEOF
5157 rm -f conftest.$ac_objext
5158 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5159   (eval $ac_compile) 2>conftest.er1
5160   ac_status=$?
5161   grep -v '^ *+' conftest.er1 >conftest.err
5162   rm -f conftest.er1
5163   cat conftest.err >&5
5164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5165   (exit $ac_status); } &&
5166          { ac_try='test -z "$ac_c_werror_flag"
5167                          || test ! -s conftest.err'
5168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5169   (eval $ac_try) 2>&5
5170   ac_status=$?
5171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5172   (exit $ac_status); }; } &&
5173          { ac_try='test -s conftest.$ac_objext'
5174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5175   (eval $ac_try) 2>&5
5176   ac_status=$?
5177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5178   (exit $ac_status); }; }; then
5179   ac_cv_type_long_long=yes
5180 else
5181   echo "$as_me: failed program was:" >&5
5182 sed 's/^/| /' conftest.$ac_ext >&5
5183
5184 ac_cv_type_long_long=no
5185 fi
5186 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5187 fi
5188 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5189 echo "${ECHO_T}$ac_cv_type_long_long" >&6
5190 if test $ac_cv_type_long_long = yes; then
5191
5192 cat >>confdefs.h <<_ACEOF
5193 #define HAVE_LONG_LONG 1
5194 _ACEOF
5195
5196 echo "$as_me:$LINENO: checking for long long" >&5
5197 echo $ECHO_N "checking for long long... $ECHO_C" >&6
5198 if test "${ac_cv_type_long_long+set}" = set; then
5199   echo $ECHO_N "(cached) $ECHO_C" >&6
5200 else
5201   cat >conftest.$ac_ext <<_ACEOF
5202 /* confdefs.h.  */
5203 _ACEOF
5204 cat confdefs.h >>conftest.$ac_ext
5205 cat >>conftest.$ac_ext <<_ACEOF
5206 /* end confdefs.h.  */
5207 $ac_includes_default
5208 int
5209 main ()
5210 {
5211 if ((long long *) 0)
5212   return 0;
5213 if (sizeof (long long))
5214   return 0;
5215   ;
5216   return 0;
5217 }
5218 _ACEOF
5219 rm -f conftest.$ac_objext
5220 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5221   (eval $ac_compile) 2>conftest.er1
5222   ac_status=$?
5223   grep -v '^ *+' conftest.er1 >conftest.err
5224   rm -f conftest.er1
5225   cat conftest.err >&5
5226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5227   (exit $ac_status); } &&
5228          { ac_try='test -z "$ac_c_werror_flag"
5229                          || test ! -s conftest.err'
5230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5231   (eval $ac_try) 2>&5
5232   ac_status=$?
5233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5234   (exit $ac_status); }; } &&
5235          { ac_try='test -s conftest.$ac_objext'
5236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5237   (eval $ac_try) 2>&5
5238   ac_status=$?
5239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5240   (exit $ac_status); }; }; then
5241   ac_cv_type_long_long=yes
5242 else
5243   echo "$as_me: failed program was:" >&5
5244 sed 's/^/| /' conftest.$ac_ext >&5
5245
5246 ac_cv_type_long_long=no
5247 fi
5248 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5249 fi
5250 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5251 echo "${ECHO_T}$ac_cv_type_long_long" >&6
5252
5253 echo "$as_me:$LINENO: checking size of long long" >&5
5254 echo $ECHO_N "checking size of long long... $ECHO_C" >&6
5255 if test "${ac_cv_sizeof_long_long+set}" = set; then
5256   echo $ECHO_N "(cached) $ECHO_C" >&6
5257 else
5258   if test "$ac_cv_type_long_long" = yes; then
5259   # The cast to unsigned long works around a bug in the HP C Compiler
5260   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5261   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5262   # This bug is HP SR number 8606223364.
5263   if test "$cross_compiling" = yes; then
5264   # Depending upon the size, compute the lo and hi bounds.
5265 cat >conftest.$ac_ext <<_ACEOF
5266 /* confdefs.h.  */
5267 _ACEOF
5268 cat confdefs.h >>conftest.$ac_ext
5269 cat >>conftest.$ac_ext <<_ACEOF
5270 /* end confdefs.h.  */
5271 $ac_includes_default
5272 int
5273 main ()
5274 {
5275 static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
5276 test_array [0] = 0
5277
5278   ;
5279   return 0;
5280 }
5281 _ACEOF
5282 rm -f conftest.$ac_objext
5283 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5284   (eval $ac_compile) 2>conftest.er1
5285   ac_status=$?
5286   grep -v '^ *+' conftest.er1 >conftest.err
5287   rm -f conftest.er1
5288   cat conftest.err >&5
5289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5290   (exit $ac_status); } &&
5291          { ac_try='test -z "$ac_c_werror_flag"
5292                          || test ! -s conftest.err'
5293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5294   (eval $ac_try) 2>&5
5295   ac_status=$?
5296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5297   (exit $ac_status); }; } &&
5298          { ac_try='test -s conftest.$ac_objext'
5299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5300   (eval $ac_try) 2>&5
5301   ac_status=$?
5302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5303   (exit $ac_status); }; }; then
5304   ac_lo=0 ac_mid=0
5305   while :; do
5306     cat >conftest.$ac_ext <<_ACEOF
5307 /* confdefs.h.  */
5308 _ACEOF
5309 cat confdefs.h >>conftest.$ac_ext
5310 cat >>conftest.$ac_ext <<_ACEOF
5311 /* end confdefs.h.  */
5312 $ac_includes_default
5313 int
5314 main ()
5315 {
5316 static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5317 test_array [0] = 0
5318
5319   ;
5320   return 0;
5321 }
5322 _ACEOF
5323 rm -f conftest.$ac_objext
5324 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5325   (eval $ac_compile) 2>conftest.er1
5326   ac_status=$?
5327   grep -v '^ *+' conftest.er1 >conftest.err
5328   rm -f conftest.er1
5329   cat conftest.err >&5
5330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5331   (exit $ac_status); } &&
5332          { ac_try='test -z "$ac_c_werror_flag"
5333                          || test ! -s conftest.err'
5334   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5335   (eval $ac_try) 2>&5
5336   ac_status=$?
5337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5338   (exit $ac_status); }; } &&
5339          { ac_try='test -s conftest.$ac_objext'
5340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5341   (eval $ac_try) 2>&5
5342   ac_status=$?
5343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5344   (exit $ac_status); }; }; then
5345   ac_hi=$ac_mid; break
5346 else
5347   echo "$as_me: failed program was:" >&5
5348 sed 's/^/| /' conftest.$ac_ext >&5
5349
5350 ac_lo=`expr $ac_mid + 1`
5351                     if test $ac_lo -le $ac_mid; then
5352                       ac_lo= ac_hi=
5353                       break
5354                     fi
5355                     ac_mid=`expr 2 '*' $ac_mid + 1`
5356 fi
5357 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5358   done
5359 else
5360   echo "$as_me: failed program was:" >&5
5361 sed 's/^/| /' conftest.$ac_ext >&5
5362
5363 cat >conftest.$ac_ext <<_ACEOF
5364 /* confdefs.h.  */
5365 _ACEOF
5366 cat confdefs.h >>conftest.$ac_ext
5367 cat >>conftest.$ac_ext <<_ACEOF
5368 /* end confdefs.h.  */
5369 $ac_includes_default
5370 int
5371 main ()
5372 {
5373 static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
5374 test_array [0] = 0
5375
5376   ;
5377   return 0;
5378 }
5379 _ACEOF
5380 rm -f conftest.$ac_objext
5381 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5382   (eval $ac_compile) 2>conftest.er1
5383   ac_status=$?
5384   grep -v '^ *+' conftest.er1 >conftest.err
5385   rm -f conftest.er1
5386   cat conftest.err >&5
5387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5388   (exit $ac_status); } &&
5389          { ac_try='test -z "$ac_c_werror_flag"
5390                          || test ! -s conftest.err'
5391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5392   (eval $ac_try) 2>&5
5393   ac_status=$?
5394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5395   (exit $ac_status); }; } &&
5396          { ac_try='test -s conftest.$ac_objext'
5397   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5398   (eval $ac_try) 2>&5
5399   ac_status=$?
5400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5401   (exit $ac_status); }; }; then
5402   ac_hi=-1 ac_mid=-1
5403   while :; do
5404     cat >conftest.$ac_ext <<_ACEOF
5405 /* confdefs.h.  */
5406 _ACEOF
5407 cat confdefs.h >>conftest.$ac_ext
5408 cat >>conftest.$ac_ext <<_ACEOF
5409 /* end confdefs.h.  */
5410 $ac_includes_default
5411 int
5412 main ()
5413 {
5414 static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
5415 test_array [0] = 0
5416
5417   ;
5418   return 0;
5419 }
5420 _ACEOF
5421 rm -f conftest.$ac_objext
5422 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5423   (eval $ac_compile) 2>conftest.er1
5424   ac_status=$?
5425   grep -v '^ *+' conftest.er1 >conftest.err
5426   rm -f conftest.er1
5427   cat conftest.err >&5
5428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5429   (exit $ac_status); } &&
5430          { ac_try='test -z "$ac_c_werror_flag"
5431                          || test ! -s conftest.err'
5432   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5433   (eval $ac_try) 2>&5
5434   ac_status=$?
5435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5436   (exit $ac_status); }; } &&
5437          { ac_try='test -s conftest.$ac_objext'
5438   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5439   (eval $ac_try) 2>&5
5440   ac_status=$?
5441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5442   (exit $ac_status); }; }; then
5443   ac_lo=$ac_mid; break
5444 else
5445   echo "$as_me: failed program was:" >&5
5446 sed 's/^/| /' conftest.$ac_ext >&5
5447
5448 ac_hi=`expr '(' $ac_mid ')' - 1`
5449                        if test $ac_mid -le $ac_hi; then
5450                          ac_lo= ac_hi=
5451                          break
5452                        fi
5453                        ac_mid=`expr 2 '*' $ac_mid`
5454 fi
5455 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5456   done
5457 else
5458   echo "$as_me: failed program was:" >&5
5459 sed 's/^/| /' conftest.$ac_ext >&5
5460
5461 ac_lo= ac_hi=
5462 fi
5463 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5464 fi
5465 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5466 # Binary search between lo and hi bounds.
5467 while test "x$ac_lo" != "x$ac_hi"; do
5468   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5469   cat >conftest.$ac_ext <<_ACEOF
5470 /* confdefs.h.  */
5471 _ACEOF
5472 cat confdefs.h >>conftest.$ac_ext
5473 cat >>conftest.$ac_ext <<_ACEOF
5474 /* end confdefs.h.  */
5475 $ac_includes_default
5476 int
5477 main ()
5478 {
5479 static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
5480 test_array [0] = 0
5481
5482   ;
5483   return 0;
5484 }
5485 _ACEOF
5486 rm -f conftest.$ac_objext
5487 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5488   (eval $ac_compile) 2>conftest.er1
5489   ac_status=$?
5490   grep -v '^ *+' conftest.er1 >conftest.err
5491   rm -f conftest.er1
5492   cat conftest.err >&5
5493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5494   (exit $ac_status); } &&
5495          { ac_try='test -z "$ac_c_werror_flag"
5496                          || test ! -s conftest.err'
5497   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5498   (eval $ac_try) 2>&5
5499   ac_status=$?
5500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5501   (exit $ac_status); }; } &&
5502          { ac_try='test -s conftest.$ac_objext'
5503   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5504   (eval $ac_try) 2>&5
5505   ac_status=$?
5506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5507   (exit $ac_status); }; }; then
5508   ac_hi=$ac_mid
5509 else
5510   echo "$as_me: failed program was:" >&5
5511 sed 's/^/| /' conftest.$ac_ext >&5
5512
5513 ac_lo=`expr '(' $ac_mid ')' + 1`
5514 fi
5515 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5516 done
5517 case $ac_lo in
5518 ?*) ac_cv_sizeof_long_long=$ac_lo;;
5519 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5520 See \`config.log' for more details." >&5
5521 echo "$as_me: error: cannot compute sizeof (long long), 77
5522 See \`config.log' for more details." >&2;}
5523    { (exit 1); exit 1; }; } ;;
5524 esac
5525 else
5526   if test "$cross_compiling" = yes; then
5527   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5528 See \`config.log' for more details." >&5
5529 echo "$as_me: error: cannot run test program while cross compiling
5530 See \`config.log' for more details." >&2;}
5531    { (exit 1); exit 1; }; }
5532 else
5533   cat >conftest.$ac_ext <<_ACEOF
5534 /* confdefs.h.  */
5535 _ACEOF
5536 cat confdefs.h >>conftest.$ac_ext
5537 cat >>conftest.$ac_ext <<_ACEOF
5538 /* end confdefs.h.  */
5539 $ac_includes_default
5540 long longval () { return (long) (sizeof (long long)); }
5541 unsigned long ulongval () { return (long) (sizeof (long long)); }
5542 #include <stdio.h>
5543 #include <stdlib.h>
5544 int
5545 main ()
5546 {
5547
5548   FILE *f = fopen ("conftest.val", "w");
5549   if (! f)
5550     exit (1);
5551   if (((long) (sizeof (long long))) < 0)
5552     {
5553       long i = longval ();
5554       if (i != ((long) (sizeof (long long))))
5555         exit (1);
5556       fprintf (f, "%ld\n", i);
5557     }
5558   else
5559     {
5560       unsigned long i = ulongval ();
5561       if (i != ((long) (sizeof (long long))))
5562         exit (1);
5563       fprintf (f, "%lu\n", i);
5564     }
5565   exit (ferror (f) || fclose (f) != 0);
5566
5567   ;
5568   return 0;
5569 }
5570 _ACEOF
5571 rm -f conftest$ac_exeext
5572 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5573   (eval $ac_link) 2>&5
5574   ac_status=$?
5575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5576   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5577   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5578   (eval $ac_try) 2>&5
5579   ac_status=$?
5580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5581   (exit $ac_status); }; }; then
5582   ac_cv_sizeof_long_long=`cat conftest.val`
5583 else
5584   echo "$as_me: program exited with status $ac_status" >&5
5585 echo "$as_me: failed program was:" >&5
5586 sed 's/^/| /' conftest.$ac_ext >&5
5587
5588 ( exit $ac_status )
5589 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
5590 See \`config.log' for more details." >&5
5591 echo "$as_me: error: cannot compute sizeof (long long), 77
5592 See \`config.log' for more details." >&2;}
5593    { (exit 1); exit 1; }; }
5594 fi
5595 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5596 fi
5597 fi
5598 rm -f conftest.val
5599 else
5600   ac_cv_sizeof_long_long=0
5601 fi
5602 fi
5603 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
5604 echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
5605 cat >>confdefs.h <<_ACEOF
5606 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5607 _ACEOF
5608
5609
5610 fi
5611
5612 echo "$as_me:$LINENO: checking for __int64" >&5
5613 echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5614 if test "${ac_cv_type___int64+set}" = set; then
5615   echo $ECHO_N "(cached) $ECHO_C" >&6
5616 else
5617   cat >conftest.$ac_ext <<_ACEOF
5618 /* confdefs.h.  */
5619 _ACEOF
5620 cat confdefs.h >>conftest.$ac_ext
5621 cat >>conftest.$ac_ext <<_ACEOF
5622 /* end confdefs.h.  */
5623 $ac_includes_default
5624 int
5625 main ()
5626 {
5627 if ((__int64 *) 0)
5628   return 0;
5629 if (sizeof (__int64))
5630   return 0;
5631   ;
5632   return 0;
5633 }
5634 _ACEOF
5635 rm -f conftest.$ac_objext
5636 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5637   (eval $ac_compile) 2>conftest.er1
5638   ac_status=$?
5639   grep -v '^ *+' conftest.er1 >conftest.err
5640   rm -f conftest.er1
5641   cat conftest.err >&5
5642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5643   (exit $ac_status); } &&
5644          { ac_try='test -z "$ac_c_werror_flag"
5645                          || test ! -s conftest.err'
5646   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5647   (eval $ac_try) 2>&5
5648   ac_status=$?
5649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5650   (exit $ac_status); }; } &&
5651          { ac_try='test -s conftest.$ac_objext'
5652   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5653   (eval $ac_try) 2>&5
5654   ac_status=$?
5655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5656   (exit $ac_status); }; }; then
5657   ac_cv_type___int64=yes
5658 else
5659   echo "$as_me: failed program was:" >&5
5660 sed 's/^/| /' conftest.$ac_ext >&5
5661
5662 ac_cv_type___int64=no
5663 fi
5664 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5665 fi
5666 echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5667 echo "${ECHO_T}$ac_cv_type___int64" >&6
5668 if test $ac_cv_type___int64 = yes; then
5669
5670 cat >>confdefs.h <<_ACEOF
5671 #define HAVE___INT64 1
5672 _ACEOF
5673
5674 echo "$as_me:$LINENO: checking for __int64" >&5
5675 echo $ECHO_N "checking for __int64... $ECHO_C" >&6
5676 if test "${ac_cv_type___int64+set}" = set; then
5677   echo $ECHO_N "(cached) $ECHO_C" >&6
5678 else
5679   cat >conftest.$ac_ext <<_ACEOF
5680 /* confdefs.h.  */
5681 _ACEOF
5682 cat confdefs.h >>conftest.$ac_ext
5683 cat >>conftest.$ac_ext <<_ACEOF
5684 /* end confdefs.h.  */
5685 $ac_includes_default
5686 int
5687 main ()
5688 {
5689 if ((__int64 *) 0)
5690   return 0;
5691 if (sizeof (__int64))
5692   return 0;
5693   ;
5694   return 0;
5695 }
5696 _ACEOF
5697 rm -f conftest.$ac_objext
5698 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5699   (eval $ac_compile) 2>conftest.er1
5700   ac_status=$?
5701   grep -v '^ *+' conftest.er1 >conftest.err
5702   rm -f conftest.er1
5703   cat conftest.err >&5
5704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5705   (exit $ac_status); } &&
5706          { ac_try='test -z "$ac_c_werror_flag"
5707                          || test ! -s conftest.err'
5708   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5709   (eval $ac_try) 2>&5
5710   ac_status=$?
5711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5712   (exit $ac_status); }; } &&
5713          { ac_try='test -s conftest.$ac_objext'
5714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5715   (eval $ac_try) 2>&5
5716   ac_status=$?
5717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5718   (exit $ac_status); }; }; then
5719   ac_cv_type___int64=yes
5720 else
5721   echo "$as_me: failed program was:" >&5
5722 sed 's/^/| /' conftest.$ac_ext >&5
5723
5724 ac_cv_type___int64=no
5725 fi
5726 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5727 fi
5728 echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
5729 echo "${ECHO_T}$ac_cv_type___int64" >&6
5730
5731 echo "$as_me:$LINENO: checking size of __int64" >&5
5732 echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
5733 if test "${ac_cv_sizeof___int64+set}" = set; then
5734   echo $ECHO_N "(cached) $ECHO_C" >&6
5735 else
5736   if test "$ac_cv_type___int64" = yes; then
5737   # The cast to unsigned long works around a bug in the HP C Compiler
5738   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5739   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5740   # This bug is HP SR number 8606223364.
5741   if test "$cross_compiling" = yes; then
5742   # Depending upon the size, compute the lo and hi bounds.
5743 cat >conftest.$ac_ext <<_ACEOF
5744 /* confdefs.h.  */
5745 _ACEOF
5746 cat confdefs.h >>conftest.$ac_ext
5747 cat >>conftest.$ac_ext <<_ACEOF
5748 /* end confdefs.h.  */
5749 $ac_includes_default
5750 int
5751 main ()
5752 {
5753 static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
5754 test_array [0] = 0
5755
5756   ;
5757   return 0;
5758 }
5759 _ACEOF
5760 rm -f conftest.$ac_objext
5761 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5762   (eval $ac_compile) 2>conftest.er1
5763   ac_status=$?
5764   grep -v '^ *+' conftest.er1 >conftest.err
5765   rm -f conftest.er1
5766   cat conftest.err >&5
5767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5768   (exit $ac_status); } &&
5769          { ac_try='test -z "$ac_c_werror_flag"
5770                          || test ! -s conftest.err'
5771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5772   (eval $ac_try) 2>&5
5773   ac_status=$?
5774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5775   (exit $ac_status); }; } &&
5776          { ac_try='test -s conftest.$ac_objext'
5777   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5778   (eval $ac_try) 2>&5
5779   ac_status=$?
5780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5781   (exit $ac_status); }; }; then
5782   ac_lo=0 ac_mid=0
5783   while :; do
5784     cat >conftest.$ac_ext <<_ACEOF
5785 /* confdefs.h.  */
5786 _ACEOF
5787 cat confdefs.h >>conftest.$ac_ext
5788 cat >>conftest.$ac_ext <<_ACEOF
5789 /* end confdefs.h.  */
5790 $ac_includes_default
5791 int
5792 main ()
5793 {
5794 static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5795 test_array [0] = 0
5796
5797   ;
5798   return 0;
5799 }
5800 _ACEOF
5801 rm -f conftest.$ac_objext
5802 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5803   (eval $ac_compile) 2>conftest.er1
5804   ac_status=$?
5805   grep -v '^ *+' conftest.er1 >conftest.err
5806   rm -f conftest.er1
5807   cat conftest.err >&5
5808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5809   (exit $ac_status); } &&
5810          { ac_try='test -z "$ac_c_werror_flag"
5811                          || test ! -s conftest.err'
5812   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5813   (eval $ac_try) 2>&5
5814   ac_status=$?
5815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5816   (exit $ac_status); }; } &&
5817          { ac_try='test -s conftest.$ac_objext'
5818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5819   (eval $ac_try) 2>&5
5820   ac_status=$?
5821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5822   (exit $ac_status); }; }; then
5823   ac_hi=$ac_mid; break
5824 else
5825   echo "$as_me: failed program was:" >&5
5826 sed 's/^/| /' conftest.$ac_ext >&5
5827
5828 ac_lo=`expr $ac_mid + 1`
5829                     if test $ac_lo -le $ac_mid; then
5830                       ac_lo= ac_hi=
5831                       break
5832                     fi
5833                     ac_mid=`expr 2 '*' $ac_mid + 1`
5834 fi
5835 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5836   done
5837 else
5838   echo "$as_me: failed program was:" >&5
5839 sed 's/^/| /' conftest.$ac_ext >&5
5840
5841 cat >conftest.$ac_ext <<_ACEOF
5842 /* confdefs.h.  */
5843 _ACEOF
5844 cat confdefs.h >>conftest.$ac_ext
5845 cat >>conftest.$ac_ext <<_ACEOF
5846 /* end confdefs.h.  */
5847 $ac_includes_default
5848 int
5849 main ()
5850 {
5851 static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
5852 test_array [0] = 0
5853
5854   ;
5855   return 0;
5856 }
5857 _ACEOF
5858 rm -f conftest.$ac_objext
5859 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5860   (eval $ac_compile) 2>conftest.er1
5861   ac_status=$?
5862   grep -v '^ *+' conftest.er1 >conftest.err
5863   rm -f conftest.er1
5864   cat conftest.err >&5
5865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5866   (exit $ac_status); } &&
5867          { ac_try='test -z "$ac_c_werror_flag"
5868                          || test ! -s conftest.err'
5869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5870   (eval $ac_try) 2>&5
5871   ac_status=$?
5872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5873   (exit $ac_status); }; } &&
5874          { ac_try='test -s conftest.$ac_objext'
5875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5876   (eval $ac_try) 2>&5
5877   ac_status=$?
5878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5879   (exit $ac_status); }; }; then
5880   ac_hi=-1 ac_mid=-1
5881   while :; do
5882     cat >conftest.$ac_ext <<_ACEOF
5883 /* confdefs.h.  */
5884 _ACEOF
5885 cat confdefs.h >>conftest.$ac_ext
5886 cat >>conftest.$ac_ext <<_ACEOF
5887 /* end confdefs.h.  */
5888 $ac_includes_default
5889 int
5890 main ()
5891 {
5892 static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
5893 test_array [0] = 0
5894
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   ac_lo=$ac_mid; break
5922 else
5923   echo "$as_me: failed program was:" >&5
5924 sed 's/^/| /' conftest.$ac_ext >&5
5925
5926 ac_hi=`expr '(' $ac_mid ')' - 1`
5927                        if test $ac_mid -le $ac_hi; then
5928                          ac_lo= ac_hi=
5929                          break
5930                        fi
5931                        ac_mid=`expr 2 '*' $ac_mid`
5932 fi
5933 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5934   done
5935 else
5936   echo "$as_me: failed program was:" >&5
5937 sed 's/^/| /' conftest.$ac_ext >&5
5938
5939 ac_lo= ac_hi=
5940 fi
5941 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5942 fi
5943 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5944 # Binary search between lo and hi bounds.
5945 while test "x$ac_lo" != "x$ac_hi"; do
5946   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5947   cat >conftest.$ac_ext <<_ACEOF
5948 /* confdefs.h.  */
5949 _ACEOF
5950 cat confdefs.h >>conftest.$ac_ext
5951 cat >>conftest.$ac_ext <<_ACEOF
5952 /* end confdefs.h.  */
5953 $ac_includes_default
5954 int
5955 main ()
5956 {
5957 static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
5958 test_array [0] = 0
5959
5960   ;
5961   return 0;
5962 }
5963 _ACEOF
5964 rm -f conftest.$ac_objext
5965 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5966   (eval $ac_compile) 2>conftest.er1
5967   ac_status=$?
5968   grep -v '^ *+' conftest.er1 >conftest.err
5969   rm -f conftest.er1
5970   cat conftest.err >&5
5971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5972   (exit $ac_status); } &&
5973          { ac_try='test -z "$ac_c_werror_flag"
5974                          || test ! -s conftest.err'
5975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5976   (eval $ac_try) 2>&5
5977   ac_status=$?
5978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5979   (exit $ac_status); }; } &&
5980          { ac_try='test -s conftest.$ac_objext'
5981   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5982   (eval $ac_try) 2>&5
5983   ac_status=$?
5984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5985   (exit $ac_status); }; }; then
5986   ac_hi=$ac_mid
5987 else
5988   echo "$as_me: failed program was:" >&5
5989 sed 's/^/| /' conftest.$ac_ext >&5
5990
5991 ac_lo=`expr '(' $ac_mid ')' + 1`
5992 fi
5993 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5994 done
5995 case $ac_lo in
5996 ?*) ac_cv_sizeof___int64=$ac_lo;;
5997 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
5998 See \`config.log' for more details." >&5
5999 echo "$as_me: error: cannot compute sizeof (__int64), 77
6000 See \`config.log' for more details." >&2;}
6001    { (exit 1); exit 1; }; } ;;
6002 esac
6003 else
6004   if test "$cross_compiling" = yes; then
6005   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6006 See \`config.log' for more details." >&5
6007 echo "$as_me: error: cannot run test program while cross compiling
6008 See \`config.log' for more details." >&2;}
6009    { (exit 1); exit 1; }; }
6010 else
6011   cat >conftest.$ac_ext <<_ACEOF
6012 /* confdefs.h.  */
6013 _ACEOF
6014 cat confdefs.h >>conftest.$ac_ext
6015 cat >>conftest.$ac_ext <<_ACEOF
6016 /* end confdefs.h.  */
6017 $ac_includes_default
6018 long longval () { return (long) (sizeof (__int64)); }
6019 unsigned long ulongval () { return (long) (sizeof (__int64)); }
6020 #include <stdio.h>
6021 #include <stdlib.h>
6022 int
6023 main ()
6024 {
6025
6026   FILE *f = fopen ("conftest.val", "w");
6027   if (! f)
6028     exit (1);
6029   if (((long) (sizeof (__int64))) < 0)
6030     {
6031       long i = longval ();
6032       if (i != ((long) (sizeof (__int64))))
6033         exit (1);
6034       fprintf (f, "%ld\n", i);
6035     }
6036   else
6037     {
6038       unsigned long i = ulongval ();
6039       if (i != ((long) (sizeof (__int64))))
6040         exit (1);
6041       fprintf (f, "%lu\n", i);
6042     }
6043   exit (ferror (f) || fclose (f) != 0);
6044
6045   ;
6046   return 0;
6047 }
6048 _ACEOF
6049 rm -f conftest$ac_exeext
6050 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6051   (eval $ac_link) 2>&5
6052   ac_status=$?
6053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6054   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6055   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6056   (eval $ac_try) 2>&5
6057   ac_status=$?
6058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6059   (exit $ac_status); }; }; then
6060   ac_cv_sizeof___int64=`cat conftest.val`
6061 else
6062   echo "$as_me: program exited with status $ac_status" >&5
6063 echo "$as_me: failed program was:" >&5
6064 sed 's/^/| /' conftest.$ac_ext >&5
6065
6066 ( exit $ac_status )
6067 { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
6068 See \`config.log' for more details." >&5
6069 echo "$as_me: error: cannot compute sizeof (__int64), 77
6070 See \`config.log' for more details." >&2;}
6071    { (exit 1); exit 1; }; }
6072 fi
6073 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6074 fi
6075 fi
6076 rm -f conftest.val
6077 else
6078   ac_cv_sizeof___int64=0
6079 fi
6080 fi
6081 echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
6082 echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
6083 cat >>confdefs.h <<_ACEOF
6084 #define SIZEOF___INT64 $ac_cv_sizeof___int64
6085 _ACEOF
6086
6087
6088 fi
6089
6090
6091 # ---------------------
6092 # Warnings and checking
6093 # ---------------------
6094
6095 # Check $CC warning features (if it's GCC).
6096 # We want to use -pedantic, but we don't want warnings about
6097 # * 'long long'
6098 # * variadic macros
6099 # * overlong strings
6100 # So, we only use -pedantic if we can disable those warnings.
6101
6102 echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5
6103 echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6
6104 if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then
6105   echo $ECHO_N "(cached) $ECHO_C" >&6
6106 else
6107   save_CFLAGS="$CFLAGS"
6108   CFLAGS="-Wno-long-long"
6109   cat >conftest.$ac_ext <<_ACEOF
6110 /* confdefs.h.  */
6111 _ACEOF
6112 cat confdefs.h >>conftest.$ac_ext
6113 cat >>conftest.$ac_ext <<_ACEOF
6114 /* end confdefs.h.  */
6115
6116 _ACEOF
6117 rm -f conftest.$ac_objext
6118 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6119   (eval $ac_compile) 2>conftest.er1
6120   ac_status=$?
6121   grep -v '^ *+' conftest.er1 >conftest.err
6122   rm -f conftest.er1
6123   cat conftest.err >&5
6124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6125   (exit $ac_status); } &&
6126          { ac_try='test -z "$ac_c_werror_flag"
6127                          || test ! -s conftest.err'
6128   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6129   (eval $ac_try) 2>&5
6130   ac_status=$?
6131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6132   (exit $ac_status); }; } &&
6133          { ac_try='test -s conftest.$ac_objext'
6134   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6135   (eval $ac_try) 2>&5
6136   ac_status=$?
6137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6138   (exit $ac_status); }; }; then
6139   ac_cv_prog_cc_w_no_long_long=yes
6140 else
6141   echo "$as_me: failed program was:" >&5
6142 sed 's/^/| /' conftest.$ac_ext >&5
6143
6144 ac_cv_prog_cc_w_no_long_long=no
6145 fi
6146 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6147   CFLAGS="$save_CFLAGS"
6148
6149 fi
6150 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5
6151 echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6
6152
6153 echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5
6154 echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6
6155 if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
6156   echo $ECHO_N "(cached) $ECHO_C" >&6
6157 else
6158   save_CFLAGS="$CFLAGS"
6159   CFLAGS="-Wno-variadic-macros"
6160   cat >conftest.$ac_ext <<_ACEOF
6161 /* confdefs.h.  */
6162 _ACEOF
6163 cat confdefs.h >>conftest.$ac_ext
6164 cat >>conftest.$ac_ext <<_ACEOF
6165 /* end confdefs.h.  */
6166
6167 _ACEOF
6168 rm -f conftest.$ac_objext
6169 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6170   (eval $ac_compile) 2>conftest.er1
6171   ac_status=$?
6172   grep -v '^ *+' conftest.er1 >conftest.err
6173   rm -f conftest.er1
6174   cat conftest.err >&5
6175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6176   (exit $ac_status); } &&
6177          { ac_try='test -z "$ac_c_werror_flag"
6178                          || test ! -s conftest.err'
6179   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6180   (eval $ac_try) 2>&5
6181   ac_status=$?
6182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6183   (exit $ac_status); }; } &&
6184          { ac_try='test -s conftest.$ac_objext'
6185   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6186   (eval $ac_try) 2>&5
6187   ac_status=$?
6188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6189   (exit $ac_status); }; }; then
6190   ac_cv_prog_cc_w_no_variadic_macros=yes
6191 else
6192   echo "$as_me: failed program was:" >&5
6193 sed 's/^/| /' conftest.$ac_ext >&5
6194
6195 ac_cv_prog_cc_w_no_variadic_macros=no
6196 fi
6197 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6198   CFLAGS="$save_CFLAGS"
6199
6200 fi
6201 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5
6202 echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6
6203
6204 echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-overlength-strings" >&5
6205 echo $ECHO_N "checking whether ${CC} accepts -Wno-overlength-strings... $ECHO_C" >&6
6206 if test "${ac_cv_prog_cc_w_no_overlength_strings+set}" = set; then
6207   echo $ECHO_N "(cached) $ECHO_C" >&6
6208 else
6209   save_CFLAGS="$CFLAGS"
6210   CFLAGS="-Wno-overlength-strings"
6211   cat >conftest.$ac_ext <<_ACEOF
6212 /* confdefs.h.  */
6213 _ACEOF
6214 cat confdefs.h >>conftest.$ac_ext
6215 cat >>conftest.$ac_ext <<_ACEOF
6216 /* end confdefs.h.  */
6217
6218 _ACEOF
6219 rm -f conftest.$ac_objext
6220 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6221   (eval $ac_compile) 2>conftest.er1
6222   ac_status=$?
6223   grep -v '^ *+' conftest.er1 >conftest.err
6224   rm -f conftest.er1
6225   cat conftest.err >&5
6226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6227   (exit $ac_status); } &&
6228          { ac_try='test -z "$ac_c_werror_flag"
6229                          || test ! -s conftest.err'
6230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6231   (eval $ac_try) 2>&5
6232   ac_status=$?
6233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6234   (exit $ac_status); }; } &&
6235          { ac_try='test -s conftest.$ac_objext'
6236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6237   (eval $ac_try) 2>&5
6238   ac_status=$?
6239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6240   (exit $ac_status); }; }; then
6241   ac_cv_prog_cc_w_no_overlength_strings=yes
6242 else
6243   echo "$as_me: failed program was:" >&5
6244 sed 's/^/| /' conftest.$ac_ext >&5
6245
6246 ac_cv_prog_cc_w_no_overlength_strings=no
6247 fi
6248 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6249   CFLAGS="$save_CFLAGS"
6250
6251 fi
6252 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_overlength_strings" >&5
6253 echo "${ECHO_T}$ac_cv_prog_cc_w_no_overlength_strings" >&6
6254
6255 strict_warn=
6256 if test $ac_cv_prog_cc_w_no_long_long = yes \
6257    && test $ac_cv_prog_cc_w_no_variadic_macros = yes \
6258    && test $ac_cv_prog_cc_w_no_overlength_strings = yes ; then
6259   strict_warn="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
6260 fi
6261
6262 # Add -Wold-style-definition if it's accepted
6263 echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
6264 echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6
6265 if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
6266   echo $ECHO_N "(cached) $ECHO_C" >&6
6267 else
6268   save_CFLAGS="$CFLAGS"
6269   CFLAGS="-Wold-style-definition"
6270   cat >conftest.$ac_ext <<_ACEOF
6271 /* confdefs.h.  */
6272 _ACEOF
6273 cat confdefs.h >>conftest.$ac_ext
6274 cat >>conftest.$ac_ext <<_ACEOF
6275 /* end confdefs.h.  */
6276
6277 _ACEOF
6278 rm -f conftest.$ac_objext
6279 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6280   (eval $ac_compile) 2>conftest.er1
6281   ac_status=$?
6282   grep -v '^ *+' conftest.er1 >conftest.err
6283   rm -f conftest.er1
6284   cat conftest.err >&5
6285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6286   (exit $ac_status); } &&
6287          { ac_try='test -z "$ac_c_werror_flag"
6288                          || test ! -s conftest.err'
6289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6290   (eval $ac_try) 2>&5
6291   ac_status=$?
6292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6293   (exit $ac_status); }; } &&
6294          { ac_try='test -s conftest.$ac_objext'
6295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6296   (eval $ac_try) 2>&5
6297   ac_status=$?
6298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6299   (exit $ac_status); }; }; then
6300   ac_cv_prog_cc_w_old_style_definition=yes
6301 else
6302   echo "$as_me: failed program was:" >&5
6303 sed 's/^/| /' conftest.$ac_ext >&5
6304
6305 ac_cv_prog_cc_w_old_style_definition=no
6306 fi
6307 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6308   CFLAGS="$save_CFLAGS"
6309
6310 fi
6311 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5
6312 echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6
6313 if test $ac_cv_prog_cc_w_old_style_definition = yes ; then
6314   strict_warn="${strict_warn} -Wold-style-definition"
6315 fi
6316
6317 # Add -Wmissing-format-attribute if it's accepted
6318 echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5
6319 echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6
6320 if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then
6321   echo $ECHO_N "(cached) $ECHO_C" >&6
6322 else
6323   save_CFLAGS="$CFLAGS"
6324   CFLAGS="-Wmissing-format-attribute"
6325   cat >conftest.$ac_ext <<_ACEOF
6326 /* confdefs.h.  */
6327 _ACEOF
6328 cat confdefs.h >>conftest.$ac_ext
6329 cat >>conftest.$ac_ext <<_ACEOF
6330 /* end confdefs.h.  */
6331
6332 _ACEOF
6333 rm -f conftest.$ac_objext
6334 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6335   (eval $ac_compile) 2>conftest.er1
6336   ac_status=$?
6337   grep -v '^ *+' conftest.er1 >conftest.err
6338   rm -f conftest.er1
6339   cat conftest.err >&5
6340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6341   (exit $ac_status); } &&
6342          { ac_try='test -z "$ac_c_werror_flag"
6343                          || test ! -s conftest.err'
6344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6345   (eval $ac_try) 2>&5
6346   ac_status=$?
6347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6348   (exit $ac_status); }; } &&
6349          { ac_try='test -s conftest.$ac_objext'
6350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6351   (eval $ac_try) 2>&5
6352   ac_status=$?
6353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6354   (exit $ac_status); }; }; then
6355   ac_cv_prog_cc_w_missing_format_attribute=yes
6356 else
6357   echo "$as_me: failed program was:" >&5
6358 sed 's/^/| /' conftest.$ac_ext >&5
6359
6360 ac_cv_prog_cc_w_missing_format_attribute=no
6361 fi
6362 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6363   CFLAGS="$save_CFLAGS"
6364
6365 fi
6366 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5
6367 echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6
6368 if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then
6369   strict_warn="${strict_warn} -Wmissing-format-attribute"
6370 fi
6371
6372 # Enable -Werror, period.
6373 # Check whether --enable-werror_always or --disable-werror_always was given.
6374 if test "${enable_werror_always+set}" = set; then
6375   enableval="$enable_werror_always"
6376
6377 else
6378   enable_werror_always=no
6379 fi;
6380 if test x${enable_werror_always} = xyes ; then
6381   strict_warn="${strict_warn} -Werror"
6382 fi
6383
6384
6385 # Get C++ compatibility warning flag, if supported.
6386 echo "$as_me:$LINENO: checking whether ${CC} accepts -Wc++-compat" >&5
6387 echo $ECHO_N "checking whether ${CC} accepts -Wc++-compat... $ECHO_C" >&6
6388 if test "${ac_cv_prog_cc_w_cxx_compat+set}" = set; then
6389   echo $ECHO_N "(cached) $ECHO_C" >&6
6390 else
6391   save_CFLAGS="$CFLAGS"
6392   CFLAGS="-Wc++-compat"
6393   cat >conftest.$ac_ext <<_ACEOF
6394 /* confdefs.h.  */
6395 _ACEOF
6396 cat confdefs.h >>conftest.$ac_ext
6397 cat >>conftest.$ac_ext <<_ACEOF
6398 /* end confdefs.h.  */
6399
6400 _ACEOF
6401 rm -f conftest.$ac_objext
6402 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6403   (eval $ac_compile) 2>conftest.er1
6404   ac_status=$?
6405   grep -v '^ *+' conftest.er1 >conftest.err
6406   rm -f conftest.er1
6407   cat conftest.err >&5
6408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6409   (exit $ac_status); } &&
6410          { ac_try='test -z "$ac_c_werror_flag"
6411                          || test ! -s conftest.err'
6412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6413   (eval $ac_try) 2>&5
6414   ac_status=$?
6415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6416   (exit $ac_status); }; } &&
6417          { ac_try='test -s conftest.$ac_objext'
6418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6419   (eval $ac_try) 2>&5
6420   ac_status=$?
6421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6422   (exit $ac_status); }; }; then
6423   ac_cv_prog_cc_w_cxx_compat=yes
6424 else
6425   echo "$as_me: failed program was:" >&5
6426 sed 's/^/| /' conftest.$ac_ext >&5
6427
6428 ac_cv_prog_cc_w_cxx_compat=no
6429 fi
6430 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6431   CFLAGS="$save_CFLAGS"
6432
6433 fi
6434 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_cxx_compat" >&5
6435 echo "${ECHO_T}$ac_cv_prog_cc_w_cxx_compat" >&6
6436 if test x${ac_cv_prog_cc_w_cxx_compat} = xyes; then
6437   cxx_compat_warn="-Wc++-compat"
6438 fi
6439
6440
6441
6442 # If the native compiler is GCC, we can enable warnings even in stage1.
6443 # That's useful for people building cross-compilers, or just running a
6444 # quick `make'.
6445 warn_cflags=
6446 if test "x$GCC" = "xyes"; then
6447   warn_cflags='$(GCC_WARN_CFLAGS)'
6448 fi
6449
6450
6451 # Enable expensive internal checks
6452 is_release=
6453 if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
6454   is_release=yes
6455 fi
6456
6457 # Check whether --enable-checking or --disable-checking was given.
6458 if test "${enable_checking+set}" = set; then
6459   enableval="$enable_checking"
6460   ac_checking_flags="${enableval}"
6461 else
6462
6463 # Determine the default checks.
6464 if test x$is_release = x ; then
6465   ac_checking_flags=yes
6466 else
6467   ac_checking_flags=release
6468 fi
6469 fi;
6470 ac_assert_checking=1
6471 ac_checking=
6472 ac_fold_checking=
6473 ac_gc_checking=
6474 ac_gc_always_collect=
6475 ac_rtl_checking=
6476 ac_rtlflag_checking=
6477 ac_runtime_checking=1
6478 ac_tree_checking=
6479 ac_valgrind_checking=
6480 IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS="$IFS,"
6481 for check in $ac_checking_flags
6482 do
6483         case $check in
6484         # these set all the flags to specific states
6485         yes)            ac_assert_checking=1 ; ac_checking=1 ;
6486                         ac_fold_checking= ; ac_gc_checking=1 ;
6487                         ac_gc_always_collect= ; ac_rtl_checking= ;
6488                         ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6489                         ac_tree_checking=1 ; ac_valgrind_checking= ;;
6490         no|none)        ac_assert_checking= ; ac_checking= ;
6491                         ac_fold_checking= ; ac_gc_checking= ;
6492                         ac_gc_always_collect= ; ac_rtl_checking= ;
6493                         ac_rtlflag_checking= ; ac_runtime_checking= ;
6494                         ac_tree_checking= ; ac_valgrind_checking= ;;
6495         all)            ac_assert_checking=1 ; ac_checking=1 ;
6496                         ac_fold_checking=1 ; ac_gc_checking=1 ;
6497                         ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
6498                         ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
6499                         ac_tree_checking=1 ; ac_valgrind_checking= ;;
6500         release)        ac_assert_checking=1 ; ac_checking= ;
6501                         ac_fold_checking= ; ac_gc_checking= ;
6502                         ac_gc_always_collect= ; ac_rtl_checking= ;
6503                         ac_rtlflag_checking= ; ac_runtime_checking=1 ;
6504                         ac_tree_checking= ; ac_valgrind_checking= ;;
6505         # these enable particular checks
6506         assert)         ac_assert_checking=1 ;;
6507         fold)           ac_fold_checking=1 ;;
6508         gc)             ac_gc_checking=1 ;;
6509         gcac)           ac_gc_always_collect=1 ;;
6510         misc)           ac_checking=1 ;;
6511         rtl)            ac_rtl_checking=1 ;;
6512         rtlflag)        ac_rtlflag_checking=1 ;;
6513         runtime)        ac_runtime_checking=1 ;;
6514         tree)           ac_tree_checking=1 ;;
6515         valgrind)       ac_valgrind_checking=1 ;;
6516         *)      { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
6517 echo "$as_me: error: unknown check category $check" >&2;}
6518    { (exit 1); exit 1; }; } ;;
6519         esac
6520 done
6521 IFS="$ac_save_IFS"
6522
6523 nocommon_flag=""
6524 if test x$ac_checking != x ; then
6525
6526 cat >>confdefs.h <<\_ACEOF
6527 #define ENABLE_CHECKING 1
6528 _ACEOF
6529
6530   nocommon_flag=-fno-common
6531 fi
6532
6533 if test x$ac_assert_checking != x ; then
6534
6535 cat >>confdefs.h <<\_ACEOF
6536 #define ENABLE_ASSERT_CHECKING 1
6537 _ACEOF
6538
6539 fi
6540
6541 if test x$ac_runtime_checking != x ; then
6542
6543 cat >>confdefs.h <<\_ACEOF
6544 #define ENABLE_RUNTIME_CHECKING 1
6545 _ACEOF
6546
6547 fi
6548 if test x$ac_tree_checking != x ; then
6549
6550 cat >>confdefs.h <<\_ACEOF
6551 #define ENABLE_TREE_CHECKING 1
6552 _ACEOF
6553
6554   TREEBROWSER=tree-browser.o
6555 fi
6556
6557 if test x$ac_rtl_checking != x ; then
6558
6559 cat >>confdefs.h <<\_ACEOF
6560 #define ENABLE_RTL_CHECKING 1
6561 _ACEOF
6562
6563 fi
6564 if test x$ac_rtlflag_checking != x ; then
6565
6566 cat >>confdefs.h <<\_ACEOF
6567 #define ENABLE_RTL_FLAG_CHECKING 1
6568 _ACEOF
6569
6570 fi
6571 if test x$ac_gc_checking != x ; then
6572
6573 cat >>confdefs.h <<\_ACEOF
6574 #define ENABLE_GC_CHECKING 1
6575 _ACEOF
6576
6577 fi
6578 if test x$ac_gc_always_collect != x ; then
6579
6580 cat >>confdefs.h <<\_ACEOF
6581 #define ENABLE_GC_ALWAYS_COLLECT 1
6582 _ACEOF
6583
6584 fi
6585 if test x$ac_fold_checking != x ; then
6586
6587 cat >>confdefs.h <<\_ACEOF
6588 #define ENABLE_FOLD_CHECKING 1
6589 _ACEOF
6590
6591 fi
6592 valgrind_path_defines=
6593 valgrind_command=
6594
6595 if test "${ac_cv_header_valgrind_h+set}" = set; then
6596   echo "$as_me:$LINENO: checking for valgrind.h" >&5
6597 echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6598 if test "${ac_cv_header_valgrind_h+set}" = set; then
6599   echo $ECHO_N "(cached) $ECHO_C" >&6
6600 fi
6601 echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6602 echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6603 else
6604   # Is the header compilable?
6605 echo "$as_me:$LINENO: checking valgrind.h usability" >&5
6606 echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6
6607 cat >conftest.$ac_ext <<_ACEOF
6608 /* confdefs.h.  */
6609 _ACEOF
6610 cat confdefs.h >>conftest.$ac_ext
6611 cat >>conftest.$ac_ext <<_ACEOF
6612 /* end confdefs.h.  */
6613 $ac_includes_default
6614 #include <valgrind.h>
6615 _ACEOF
6616 rm -f conftest.$ac_objext
6617 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6618   (eval $ac_compile) 2>conftest.er1
6619   ac_status=$?
6620   grep -v '^ *+' conftest.er1 >conftest.err
6621   rm -f conftest.er1
6622   cat conftest.err >&5
6623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6624   (exit $ac_status); } &&
6625          { ac_try='test -z "$ac_c_werror_flag"
6626                          || test ! -s conftest.err'
6627   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6628   (eval $ac_try) 2>&5
6629   ac_status=$?
6630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6631   (exit $ac_status); }; } &&
6632          { ac_try='test -s conftest.$ac_objext'
6633   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6634   (eval $ac_try) 2>&5
6635   ac_status=$?
6636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6637   (exit $ac_status); }; }; then
6638   ac_header_compiler=yes
6639 else
6640   echo "$as_me: failed program was:" >&5
6641 sed 's/^/| /' conftest.$ac_ext >&5
6642
6643 ac_header_compiler=no
6644 fi
6645 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6646 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6647 echo "${ECHO_T}$ac_header_compiler" >&6
6648
6649 # Is the header present?
6650 echo "$as_me:$LINENO: checking valgrind.h presence" >&5
6651 echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6
6652 cat >conftest.$ac_ext <<_ACEOF
6653 /* confdefs.h.  */
6654 _ACEOF
6655 cat confdefs.h >>conftest.$ac_ext
6656 cat >>conftest.$ac_ext <<_ACEOF
6657 /* end confdefs.h.  */
6658 #include <valgrind.h>
6659 _ACEOF
6660 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6661   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6662   ac_status=$?
6663   grep -v '^ *+' conftest.er1 >conftest.err
6664   rm -f conftest.er1
6665   cat conftest.err >&5
6666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6667   (exit $ac_status); } >/dev/null; then
6668   if test -s conftest.err; then
6669     ac_cpp_err=$ac_c_preproc_warn_flag
6670     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6671   else
6672     ac_cpp_err=
6673   fi
6674 else
6675   ac_cpp_err=yes
6676 fi
6677 if test -z "$ac_cpp_err"; then
6678   ac_header_preproc=yes
6679 else
6680   echo "$as_me: failed program was:" >&5
6681 sed 's/^/| /' conftest.$ac_ext >&5
6682
6683   ac_header_preproc=no
6684 fi
6685 rm -f conftest.err conftest.$ac_ext
6686 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6687 echo "${ECHO_T}$ac_header_preproc" >&6
6688
6689 # So?  What about this header?
6690 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6691   yes:no: )
6692     { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
6693 echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6694     { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
6695 echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
6696     ac_header_preproc=yes
6697     ;;
6698   no:yes:* )
6699     { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
6700 echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
6701     { echo "$as_me:$LINENO: WARNING: valgrind.h:     check for missing prerequisite headers?" >&5
6702 echo "$as_me: WARNING: valgrind.h:     check for missing prerequisite headers?" >&2;}
6703     { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
6704 echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
6705     { echo "$as_me:$LINENO: WARNING: valgrind.h:     section \"Present But Cannot Be Compiled\"" >&5
6706 echo "$as_me: WARNING: valgrind.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6707     { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
6708 echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
6709     { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
6710 echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
6711     (
6712       cat <<\_ASBOX
6713 ## ------------------------------------------ ##
6714 ## Report this to the AC_PACKAGE_NAME lists.  ##
6715 ## ------------------------------------------ ##
6716 _ASBOX
6717     ) |
6718       sed "s/^/$as_me: WARNING:     /" >&2
6719     ;;
6720 esac
6721 echo "$as_me:$LINENO: checking for valgrind.h" >&5
6722 echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6
6723 if test "${ac_cv_header_valgrind_h+set}" = set; then
6724   echo $ECHO_N "(cached) $ECHO_C" >&6
6725 else
6726   ac_cv_header_valgrind_h=$ac_header_preproc
6727 fi
6728 echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
6729 echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6
6730
6731 fi
6732 if test $ac_cv_header_valgrind_h = yes; then
6733   have_valgrind_h=yes
6734 else
6735   have_valgrind_h=no
6736 fi
6737
6738
6739
6740 if test x$ac_valgrind_checking != x ; then
6741   # It is certainly possible that there's valgrind but no valgrind.h.
6742   # GCC relies on making annotations so we must have both.
6743   echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
6744 echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6
6745   cat >conftest.$ac_ext <<_ACEOF
6746 /* confdefs.h.  */
6747 _ACEOF
6748 cat confdefs.h >>conftest.$ac_ext
6749 cat >>conftest.$ac_ext <<_ACEOF
6750 /* end confdefs.h.  */
6751 #include <valgrind/memcheck.h>
6752 #ifndef VALGRIND_DISCARD
6753 #error VALGRIND_DISCARD not defined
6754 #endif
6755 _ACEOF
6756 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6757   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6758   ac_status=$?
6759   grep -v '^ *+' conftest.er1 >conftest.err
6760   rm -f conftest.er1
6761   cat conftest.err >&5
6762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6763   (exit $ac_status); } >/dev/null; then
6764   if test -s conftest.err; then
6765     ac_cpp_err=$ac_c_preproc_warn_flag
6766     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6767   else
6768     ac_cpp_err=
6769   fi
6770 else
6771   ac_cpp_err=yes
6772 fi
6773 if test -z "$ac_cpp_err"; then
6774   gcc_cv_header_valgrind_memcheck_h=yes
6775 else
6776   echo "$as_me: failed program was:" >&5
6777 sed 's/^/| /' conftest.$ac_ext >&5
6778
6779   gcc_cv_header_valgrind_memcheck_h=no
6780 fi
6781 rm -f conftest.err conftest.$ac_ext
6782   echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
6783 echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6
6784   echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
6785 echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6
6786   cat >conftest.$ac_ext <<_ACEOF
6787 /* confdefs.h.  */
6788 _ACEOF
6789 cat confdefs.h >>conftest.$ac_ext
6790 cat >>conftest.$ac_ext <<_ACEOF
6791 /* end confdefs.h.  */
6792 #include <memcheck.h>
6793 #ifndef VALGRIND_DISCARD
6794 #error VALGRIND_DISCARD not defined
6795 #endif
6796 _ACEOF
6797 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6798   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6799   ac_status=$?
6800   grep -v '^ *+' conftest.er1 >conftest.err
6801   rm -f conftest.er1
6802   cat conftest.err >&5
6803   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6804   (exit $ac_status); } >/dev/null; then
6805   if test -s conftest.err; then
6806     ac_cpp_err=$ac_c_preproc_warn_flag
6807     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6808   else
6809     ac_cpp_err=
6810   fi
6811 else
6812   ac_cpp_err=yes
6813 fi
6814 if test -z "$ac_cpp_err"; then
6815   gcc_cv_header_memcheck_h=yes
6816 else
6817   echo "$as_me: failed program was:" >&5
6818 sed 's/^/| /' conftest.$ac_ext >&5
6819
6820   gcc_cv_header_memcheck_h=no
6821 fi
6822 rm -f conftest.err conftest.$ac_ext
6823   echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
6824 echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6
6825
6826 # Prepare PATH_SEPARATOR.
6827 # The user is always right.
6828 if test "${PATH_SEPARATOR+set}" != set; then
6829   echo "#! /bin/sh" >conf$$.sh
6830   echo  "exit 0"   >>conf$$.sh
6831   chmod +x conf$$.sh
6832   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6833     PATH_SEPARATOR=';'
6834   else
6835     PATH_SEPARATOR=:
6836   fi
6837   rm -f conf$$.sh
6838 fi
6839
6840 # Find out how to test for executable files. Don't use a zero-byte file,
6841 # as systems may use methods other than mode bits to determine executability.
6842 cat >conf$$.file <<_ASEOF
6843 #! /bin/sh
6844 exit 0
6845 _ASEOF
6846 chmod +x conf$$.file
6847 if test -x conf$$.file >/dev/null 2>&1; then
6848   ac_executable_p="test -x"
6849 else
6850   ac_executable_p="test -f"
6851 fi
6852 rm -f conf$$.file
6853
6854 # Extract the first word of "valgrind", so it can be a program name with args.
6855 set dummy valgrind; ac_word=$2
6856 echo "$as_me:$LINENO: checking for $ac_word" >&5
6857 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6858 if test "${ac_cv_path_valgrind_path+set}" = set; then
6859   echo $ECHO_N "(cached) $ECHO_C" >&6
6860 else
6861   case "$valgrind_path" in
6862   [\\/]* | ?:[\\/]*)
6863     ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
6864     ;;
6865   *)
6866     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6867     for ac_dir in $PATH; do
6868       IFS="$ac_save_IFS"
6869       test -z "$ac_dir" && ac_dir=.
6870       for ac_exec_ext in '' $ac_executable_extensions; do
6871         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6872           if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
6873             ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
6874             break 2
6875           fi
6876         fi
6877       done
6878     done
6879     IFS="$ac_save_IFS"
6880     ;;
6881 esac
6882 fi
6883 valgrind_path="$ac_cv_path_valgrind_path"
6884 if test -n "$valgrind_path"; then
6885   echo "$as_me:$LINENO: result: $valgrind_path" >&5
6886 echo "${ECHO_T}$valgrind_path" >&6
6887 else
6888   echo "$as_me:$LINENO: result: no" >&5
6889 echo "${ECHO_T}no" >&6
6890 fi
6891
6892   if test "x$valgrind_path" = "x" \
6893     || (test $have_valgrind_h = no \
6894         && test $gcc_cv_header_memcheck_h = no \
6895         && test $gcc_cv_header_valgrind_memcheck_h = no); then
6896         { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
6897 echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
6898    { (exit 1); exit 1; }; }
6899   fi
6900   valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
6901   valgrind_command="$valgrind_path -q"
6902
6903 cat >>confdefs.h <<\_ACEOF
6904 #define ENABLE_VALGRIND_CHECKING 1
6905 _ACEOF
6906
6907   if test $gcc_cv_header_valgrind_memcheck_h = yes; then
6908
6909 cat >>confdefs.h <<\_ACEOF
6910 #define HAVE_VALGRIND_MEMCHECK_H 1
6911 _ACEOF
6912
6913   fi
6914   if test $gcc_cv_header_memcheck_h = yes; then
6915
6916 cat >>confdefs.h <<\_ACEOF
6917 #define HAVE_MEMCHECK_H 1
6918 _ACEOF
6919
6920   fi
6921 fi
6922
6923
6924
6925 # Check whether --enable-mapped-location or --disable-mapped-location was given.
6926 if test "${enable_mapped_location+set}" = set; then
6927   enableval="$enable_mapped_location"
6928
6929 else
6930   enable_mapped_location=no
6931 fi;
6932
6933 if test "$enable_mapped_location" = yes ; then
6934
6935 cat >>confdefs.h <<\_ACEOF
6936 #define USE_MAPPED_LOCATION 1
6937 _ACEOF
6938
6939 fi
6940
6941 # Enable code coverage collection
6942 # Check whether --enable-coverage or --disable-coverage was given.
6943 if test "${enable_coverage+set}" = set; then
6944   enableval="$enable_coverage"
6945   case "${enableval}" in
6946   yes|noopt)
6947     coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
6948     ;;
6949   opt)
6950     coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
6951     ;;
6952   no)
6953     # a.k.a. --disable-coverage
6954     coverage_flags=""
6955     ;;
6956   *)
6957     { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
6958 echo "$as_me: error: unknown coverage setting $enableval" >&2;}
6959    { (exit 1); exit 1; }; }
6960     ;;
6961 esac
6962 else
6963   coverage_flags=""
6964 fi;
6965
6966
6967 # Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given.
6968 if test "${enable_gather_detailed_mem_stats+set}" = set; then
6969   enableval="$enable_gather_detailed_mem_stats"
6970
6971 else
6972   enable_gather_detailed_mem_stats=no
6973 fi;
6974 if test x$enable_gather_detailed_mem_stats = xyes ; then
6975
6976 cat >>confdefs.h <<\_ACEOF
6977 #define GATHER_STATISTICS 1
6978 _ACEOF
6979
6980 fi
6981
6982 # -------------------------------
6983 # Miscenalleous configure options
6984 # -------------------------------
6985
6986 # With stabs
6987
6988 # Check whether --with-stabs or --without-stabs was given.
6989 if test "${with_stabs+set}" = set; then
6990   withval="$with_stabs"
6991   stabs="$with_stabs"
6992 else
6993   stabs=no
6994 fi;
6995
6996 # Determine whether or not multilibs are enabled.
6997 # Check whether --enable-multilib or --disable-multilib was given.
6998 if test "${enable_multilib+set}" = set; then
6999   enableval="$enable_multilib"
7000
7001 else
7002   enable_multilib=yes
7003 fi;
7004
7005
7006 # Enable __cxa_atexit for C++.
7007 # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
7008 if test "${enable___cxa_atexit+set}" = set; then
7009   enableval="$enable___cxa_atexit"
7010
7011 fi;
7012
7013 # Enable C extension for decimal float if target supports it.
7014 # Check whether --enable-decimal-float or --disable-decimal-float was given.
7015 if test "${enable_decimal_float+set}" = set; then
7016   enableval="$enable_decimal_float"
7017
7018   case $enable_decimal_float in
7019     yes | no | bid | dpd) ;;
7020     *) { { echo "$as_me:$LINENO: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
7021 Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&5
7022 echo "$as_me: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
7023 Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&2;}
7024    { (exit 1); exit 1; }; } ;;
7025   esac
7026
7027 else
7028
7029   case $target in
7030     powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
7031       enable_decimal_float=yes
7032       ;;
7033     *)
7034       { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5
7035 echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
7036       enable_decimal_float=no
7037       ;;
7038   esac
7039
7040 fi;
7041
7042 dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
7043
7044 cat >>confdefs.h <<_ACEOF
7045 #define ENABLE_DECIMAL_FLOAT $dfp
7046 _ACEOF
7047
7048
7049 # x86's use BID format instead of DPD
7050 case x$enable_decimal_float in
7051   xyes)
7052     case $target in
7053       i?86*-*-linux* | x86_64*-*-linux*)
7054         enable_decimal_float=bid
7055         ;;
7056       *)
7057         enable_decimal_float=dpd
7058         ;;
7059     esac
7060     ;;
7061   xno)
7062     # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
7063     # dependency on libdecnumber.
7064     enable_decimal_float=dpd
7065     ;;
7066 esac
7067
7068
7069 bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi`
7070
7071 cat >>confdefs.h <<_ACEOF
7072 #define ENABLE_DECIMAL_BID_FORMAT $bid
7073 _ACEOF
7074
7075
7076 # Enable threads
7077 # Pass with no value to take the default
7078 # Pass with a value to specify a thread package
7079 # Check whether --enable-threads or --disable-threads was given.
7080 if test "${enable_threads+set}" = set; then
7081   enableval="$enable_threads"
7082
7083 else
7084   enable_threads=''
7085 fi;
7086
7087 # Check whether --enable-tls or --disable-tls was given.
7088 if test "${enable_tls+set}" = set; then
7089   enableval="$enable_tls"
7090
7091   case $enable_tls in
7092     yes | no) ;;
7093     *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls.
7094 Valid choices are 'yes' and 'no'." >&5
7095 echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls.
7096 Valid choices are 'yes' and 'no'." >&2;}
7097    { (exit 1); exit 1; }; } ;;
7098   esac
7099
7100 else
7101   enable_tls=''
7102 fi;
7103
7104 # Check whether --enable-objc-gc or --disable-objc-gc was given.
7105 if test "${enable_objc_gc+set}" = set; then
7106   enableval="$enable_objc_gc"
7107   if test x$enable_objc_gc = xno; then
7108         objc_boehm_gc=''
7109 else
7110         objc_boehm_gc=1
7111 fi
7112 else
7113   objc_boehm_gc=''
7114 fi;
7115
7116
7117 # Check whether --with-dwarf2 or --without-dwarf2 was given.
7118 if test "${with_dwarf2+set}" = set; then
7119   withval="$with_dwarf2"
7120   dwarf2="$with_dwarf2"
7121 else
7122   dwarf2=no
7123 fi;
7124
7125 # Check whether --enable-shared or --disable-shared was given.
7126 if test "${enable_shared+set}" = set; then
7127   enableval="$enable_shared"
7128
7129   case $enable_shared in
7130   yes | no) ;;
7131   *)
7132     enable_shared=no
7133     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
7134     for pkg in $enableval; do
7135       if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
7136         enable_shared=yes
7137       fi
7138     done
7139     IFS="$ac_save_ifs"
7140     ;;
7141   esac
7142
7143 else
7144   enable_shared=yes
7145 fi;
7146
7147
7148
7149 # Check whether --with-build-sysroot or --without-build-sysroot was given.
7150 if test "${with_build_sysroot+set}" = set; then
7151   withval="$with_build_sysroot"
7152
7153 fi;
7154
7155
7156 # Check whether --with-sysroot or --without-sysroot was given.
7157 if test "${with_sysroot+set}" = set; then
7158   withval="$with_sysroot"
7159
7160  case ${with_sysroot} in
7161  yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
7162  *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
7163  esac
7164
7165  TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
7166  CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
7167
7168  if test "x$exec_prefix" = xNONE; then
7169   if test "x$prefix" = xNONE; then
7170    test_prefix=/usr/local
7171   else
7172    test_prefix=$prefix
7173   fi
7174  else
7175   test_prefix=$exec_prefix
7176  fi
7177  case ${TARGET_SYSTEM_ROOT} in
7178  "${test_prefix}"|"${test_prefix}/"*|\
7179  '${exec_prefix}'|'${exec_prefix}/'*)
7180    t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
7181    TARGET_SYSTEM_ROOT_DEFINE="$t"
7182    ;;
7183  esac
7184
7185 else
7186
7187  TARGET_SYSTEM_ROOT=
7188  TARGET_SYSTEM_ROOT_DEFINE=
7189  CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
7190
7191 fi;
7192
7193
7194
7195
7196 # Build with intermodule optimisations
7197 # Check whether --enable-intermodule or --disable-intermodule was given.
7198 if test "${enable_intermodule+set}" = set; then
7199   enableval="$enable_intermodule"
7200   case ${enable_intermodule} in
7201   yes) onestep="-onestep";;
7202   *) onestep="";;
7203 esac
7204 else
7205   onestep=""
7206 fi;
7207
7208
7209 # Sanity check enable_languages in case someone does not run the toplevel
7210 # configure # script.
7211 # Check whether --enable-languages or --disable-languages was given.
7212 if test "${enable_languages+set}" = set; then
7213   enableval="$enable_languages"
7214   case ,${enable_languages}, in
7215        ,,|,yes,)
7216                 # go safe -- we cannot be much sure without the toplevel
7217                 # configure's
7218                 # analysis of which target libs are present and usable
7219                 enable_languages=c
7220                 ;;
7221          *,all,*)
7222                 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
7223 echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
7224    { (exit 1); exit 1; }; }
7225                 ;;
7226         *,c,*)
7227                 ;;
7228         *)
7229                 enable_languages=c,${enable_languages}
7230                 ;;
7231 esac
7232 else
7233   enable_languages=c
7234 fi;
7235
7236 # Used by documentation targets
7237
7238
7239
7240
7241 # -------------------------
7242 # Checks for other programs
7243 # -------------------------
7244
7245 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7246 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
7247 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
7248 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
7249   echo $ECHO_N "(cached) $ECHO_C" >&6
7250 else
7251   cat >conftest.make <<\_ACEOF
7252 all:
7253         @echo 'ac_maketemp="$(MAKE)"'
7254 _ACEOF
7255 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7256 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
7257 if test -n "$ac_maketemp"; then
7258   eval ac_cv_prog_make_${ac_make}_set=yes
7259 else
7260   eval ac_cv_prog_make_${ac_make}_set=no
7261 fi
7262 rm -f conftest.make
7263 fi
7264 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
7265   echo "$as_me:$LINENO: result: yes" >&5
7266 echo "${ECHO_T}yes" >&6
7267   SET_MAKE=
7268 else
7269   echo "$as_me:$LINENO: result: no" >&5
7270 echo "${ECHO_T}no" >&6
7271   SET_MAKE="MAKE=${MAKE-make}"
7272 fi
7273
7274
7275 # Find some useful tools
7276 for ac_prog in gawk mawk nawk awk
7277 do
7278   # Extract the first word of "$ac_prog", so it can be a program name with args.
7279 set dummy $ac_prog; ac_word=$2
7280 echo "$as_me:$LINENO: checking for $ac_word" >&5
7281 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7282 if test "${ac_cv_prog_AWK+set}" = set; then
7283   echo $ECHO_N "(cached) $ECHO_C" >&6
7284 else
7285   if test -n "$AWK"; then
7286   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7287 else
7288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7289 for as_dir in $PATH
7290 do
7291   IFS=$as_save_IFS
7292   test -z "$as_dir" && as_dir=.
7293   for ac_exec_ext in '' $ac_executable_extensions; do
7294   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7295     ac_cv_prog_AWK="$ac_prog"
7296     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7297     break 2
7298   fi
7299 done
7300 done
7301
7302 fi
7303 fi
7304 AWK=$ac_cv_prog_AWK
7305 if test -n "$AWK"; then
7306   echo "$as_me:$LINENO: result: $AWK" >&5
7307 echo "${ECHO_T}$AWK" >&6
7308 else
7309   echo "$as_me:$LINENO: result: no" >&5
7310 echo "${ECHO_T}no" >&6
7311 fi
7312
7313   test -n "$AWK" && break
7314 done
7315
7316 # We need awk to create options.c and options.h.
7317 # Bail out if it's missing.
7318 case ${AWK} in
7319   "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
7320 echo "$as_me: error: can't build without awk, bailing out" >&2;}
7321    { (exit 1); exit 1; }; } ;;
7322 esac
7323
7324 echo "$as_me:$LINENO: checking whether ln -s works" >&5
7325 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
7326 if test "${gcc_cv_prog_LN_S+set}" = set; then
7327   echo $ECHO_N "(cached) $ECHO_C" >&6
7328 else
7329   rm -f conftestdata_t
7330 echo >conftestdata_f
7331 if ln -s conftestdata_f conftestdata_t 2>/dev/null
7332 then
7333   gcc_cv_prog_LN_S="ln -s"
7334 else
7335   if ln conftestdata_f conftestdata_t 2>/dev/null
7336   then
7337     gcc_cv_prog_LN_S=ln
7338   else
7339     if cp -p conftestdata_f conftestdata_t 2>/dev/null
7340     then
7341       gcc_cv_prog_LN_S="cp -p"
7342     else
7343       gcc_cv_prog_LN_S=cp
7344     fi
7345   fi
7346 fi
7347 rm -f conftestdata_f conftestdata_t
7348
7349 fi
7350 LN_S="$gcc_cv_prog_LN_S"
7351 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
7352   echo "$as_me:$LINENO: result: yes" >&5
7353 echo "${ECHO_T}yes" >&6
7354 else
7355   if test "$gcc_cv_prog_LN_S" = "ln"; then
7356     echo "$as_me:$LINENO: result: no, using ln" >&5
7357 echo "${ECHO_T}no, using ln" >&6
7358   else
7359     echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
7360 echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6
7361   fi
7362 fi
7363
7364 echo "$as_me:$LINENO: checking whether ln works" >&5
7365 echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
7366 if test "${acx_cv_prog_LN+set}" = set; then
7367   echo $ECHO_N "(cached) $ECHO_C" >&6
7368 else
7369   rm -f conftestdata_t
7370 echo >conftestdata_f
7371 if ln conftestdata_f conftestdata_t 2>/dev/null
7372 then
7373   acx_cv_prog_LN=ln
7374 else
7375   acx_cv_prog_LN=no
7376 fi
7377 rm -f conftestdata_f conftestdata_t
7378
7379 fi
7380 if test $acx_cv_prog_LN = no; then
7381   LN="$LN_S"
7382   echo "$as_me:$LINENO: result: no, using $LN" >&5
7383 echo "${ECHO_T}no, using $LN" >&6
7384 else
7385   LN="$acx_cv_prog_LN"
7386   echo "$as_me:$LINENO: result: yes" >&5
7387 echo "${ECHO_T}yes" >&6
7388 fi
7389
7390 if test -n "$ac_tool_prefix"; then
7391   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7392 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7393 echo "$as_me:$LINENO: checking for $ac_word" >&5
7394 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7395 if test "${ac_cv_prog_RANLIB+set}" = set; then
7396   echo $ECHO_N "(cached) $ECHO_C" >&6
7397 else
7398   if test -n "$RANLIB"; then
7399   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7400 else
7401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7402 for as_dir in $PATH
7403 do
7404   IFS=$as_save_IFS
7405   test -z "$as_dir" && as_dir=.
7406   for ac_exec_ext in '' $ac_executable_extensions; do
7407   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7408     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7409     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7410     break 2
7411   fi
7412 done
7413 done
7414
7415 fi
7416 fi
7417 RANLIB=$ac_cv_prog_RANLIB
7418 if test -n "$RANLIB"; then
7419   echo "$as_me:$LINENO: result: $RANLIB" >&5
7420 echo "${ECHO_T}$RANLIB" >&6
7421 else
7422   echo "$as_me:$LINENO: result: no" >&5
7423 echo "${ECHO_T}no" >&6
7424 fi
7425
7426 fi
7427 if test -z "$ac_cv_prog_RANLIB"; then
7428   ac_ct_RANLIB=$RANLIB
7429   # Extract the first word of "ranlib", so it can be a program name with args.
7430 set dummy ranlib; ac_word=$2
7431 echo "$as_me:$LINENO: checking for $ac_word" >&5
7432 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7433 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7434   echo $ECHO_N "(cached) $ECHO_C" >&6
7435 else
7436   if test -n "$ac_ct_RANLIB"; then
7437   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7438 else
7439 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7440 for as_dir in $PATH
7441 do
7442   IFS=$as_save_IFS
7443   test -z "$as_dir" && as_dir=.
7444   for ac_exec_ext in '' $ac_executable_extensions; do
7445   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7446     ac_cv_prog_ac_ct_RANLIB="ranlib"
7447     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7448     break 2
7449   fi
7450 done
7451 done
7452
7453   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7454 fi
7455 fi
7456 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7457 if test -n "$ac_ct_RANLIB"; then
7458   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7459 echo "${ECHO_T}$ac_ct_RANLIB" >&6
7460 else
7461   echo "$as_me:$LINENO: result: no" >&5
7462 echo "${ECHO_T}no" >&6
7463 fi
7464
7465   RANLIB=$ac_ct_RANLIB
7466 else
7467   RANLIB="$ac_cv_prog_RANLIB"
7468 fi
7469
7470 case "${host}" in
7471 *-*-darwin*)
7472   # By default, the Darwin ranlib will not treat common symbols as
7473   # definitions when  building the archive table of contents.  Other
7474   # ranlibs do that; pass an option to the Darwin ranlib that makes
7475   # it behave similarly.
7476   ranlib_flags="-c"
7477   ;;
7478 *)
7479   ranlib_flags=""
7480 esac
7481
7482
7483 # Find a good install program.  We prefer a C program (faster),
7484 # so one script is as good as another.  But avoid the broken or
7485 # incompatible versions:
7486 # SysV /etc/install, /usr/sbin/install
7487 # SunOS /usr/etc/install
7488 # IRIX /sbin/install
7489 # AIX /bin/install
7490 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7491 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7492 # ./install, which can be erroneously created by make from ./install.sh.
7493 echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
7494 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
7495 if test -z "$INSTALL"; then
7496 if test "${ac_cv_path_install+set}" = set; then
7497   echo $ECHO_N "(cached) $ECHO_C" >&6
7498 else
7499     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
7500   for ac_dir in $PATH; do
7501     # Account for people who put trailing slashes in PATH elements.
7502     case "$ac_dir/" in
7503     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
7504     *)
7505       # OSF1 and SCO ODT 3.0 have their own names for install.
7506       for ac_prog in ginstall scoinst install; do
7507         if test -f $ac_dir/$ac_prog; then
7508           if test $ac_prog = install &&
7509             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
7510             # AIX install.  It has an incompatible calling convention.
7511             # OSF/1 installbsd also uses dspmsg, but is usable.
7512             :
7513           else
7514             ac_cv_path_install="$ac_dir/$ac_prog -c"
7515             break 2
7516           fi
7517         fi
7518       done
7519       ;;
7520     esac
7521   done
7522   IFS="$ac_save_IFS"
7523
7524 fi
7525   if test "${ac_cv_path_install+set}" = set; then
7526     INSTALL="$ac_cv_path_install"
7527   else
7528     # As a last resort, use the slow shell script.  We don't cache a
7529     # path for INSTALL within a source directory, because that will
7530     # break other packages using the cache if that directory is
7531     # removed, or if the path is relative.
7532     INSTALL="$ac_install_sh"
7533   fi
7534 fi
7535 echo "$as_me:$LINENO: result: $INSTALL" >&5
7536 echo "${ECHO_T}$INSTALL" >&6
7537
7538 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7539 # It thinks the first close brace ends the variable substitution.
7540 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7541
7542 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7543
7544
7545 # See if cmp has --ignore-initial.
7546 echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
7547 echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6
7548 if test "${gcc_cv_prog_cmp_skip+set}" = set; then
7549   echo $ECHO_N "(cached) $ECHO_C" >&6
7550 else
7551    echo abfoo >t1
7552   echo cdfoo >t2
7553   gcc_cv_prog_cmp_skip=slowcompare
7554   if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
7555     if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
7556       :
7557     else
7558       gcc_cv_prog_cmp_skip=gnucompare
7559     fi
7560   fi
7561   if test $gcc_cv_prog_cmp_skip = slowcompare ; then
7562     if cmp t1 t2 2 2 > /dev/null 2>&1; then
7563       if cmp t1 t2 1 1 > /dev/null 2>&1; then
7564         :
7565       else
7566         gcc_cv_prog_cmp_skip=fastcompare
7567       fi
7568     fi
7569   fi
7570   rm t1 t2
7571
7572 fi
7573 echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
7574 echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
7575 make_compare_target=$gcc_cv_prog_cmp_skip
7576
7577
7578
7579 # See if we have the mktemp command.
7580 # Extract the first word of "mktemp", so it can be a program name with args.
7581 set dummy mktemp; ac_word=$2
7582 echo "$as_me:$LINENO: checking for $ac_word" >&5
7583 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7584 if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
7585   echo $ECHO_N "(cached) $ECHO_C" >&6
7586 else
7587   if test -n "$have_mktemp_command"; then
7588   ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
7589 else
7590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7591 for as_dir in $PATH
7592 do
7593   IFS=$as_save_IFS
7594   test -z "$as_dir" && as_dir=.
7595   for ac_exec_ext in '' $ac_executable_extensions; do
7596   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7597     ac_cv_prog_have_mktemp_command="yes"
7598     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7599     break 2
7600   fi
7601 done
7602 done
7603
7604   test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
7605 fi
7606 fi
7607 have_mktemp_command=$ac_cv_prog_have_mktemp_command
7608 if test -n "$have_mktemp_command"; then
7609   echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
7610 echo "${ECHO_T}$have_mktemp_command" >&6
7611 else
7612   echo "$as_me:$LINENO: result: no" >&5
7613 echo "${ECHO_T}no" >&6
7614 fi
7615
7616
7617 MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
7618
7619 # See if makeinfo has been installed and is modern enough
7620 # that we can use it.
7621
7622 ac_executable_extensions="$build_exeext"
7623
7624 # Extract the first word of "makeinfo", so it can be a program name with args.
7625 set dummy makeinfo; ac_word=$2
7626 echo "$as_me:$LINENO: checking for $ac_word" >&5
7627 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7628 if test "${ac_cv_prog_MAKEINFO+set}" = set; then
7629   echo $ECHO_N "(cached) $ECHO_C" >&6
7630 else
7631   if test -n "$MAKEINFO"; then
7632   ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
7633 else
7634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7635 for as_dir in $PATH
7636 do
7637   IFS=$as_save_IFS
7638   test -z "$as_dir" && as_dir=.
7639   for ac_exec_ext in '' $ac_executable_extensions; do
7640   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7641     ac_cv_prog_MAKEINFO="makeinfo"
7642     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7643     break 2
7644   fi
7645 done
7646 done
7647
7648 fi
7649 fi
7650 MAKEINFO=$ac_cv_prog_MAKEINFO
7651 if test -n "$MAKEINFO"; then
7652   echo "$as_me:$LINENO: result: $MAKEINFO" >&5
7653 echo "${ECHO_T}$MAKEINFO" >&6
7654 else
7655   echo "$as_me:$LINENO: result: no" >&5
7656 echo "${ECHO_T}no" >&6
7657 fi
7658
7659 if test -n "$MAKEINFO"; then
7660   # Found it, now check the version.
7661   echo "$as_me:$LINENO: checking for modern makeinfo" >&5
7662 echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6
7663 if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
7664   echo $ECHO_N "(cached) $ECHO_C" >&6
7665 else
7666     ac_prog_version=`$MAKEINFO --version 2>&1 |
7667                    sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
7668   echo "configure:7668: version of makeinfo is $ac_prog_version" >&5
7669   case $ac_prog_version in
7670     '')     gcc_cv_prog_makeinfo_modern=no;;
7671     4.[4-9]*)
7672             gcc_cv_prog_makeinfo_modern=yes;;
7673     *)      gcc_cv_prog_makeinfo_modern=no;;
7674   esac
7675
7676 fi
7677 echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
7678 echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6
7679 else
7680   gcc_cv_prog_makeinfo_modern=no
7681 fi
7682
7683 if test $gcc_cv_prog_makeinfo_modern = no; then
7684   MAKEINFO="$MISSING makeinfo"
7685   { echo "$as_me:$LINENO: WARNING:
7686 *** Makeinfo is missing or too old.
7687 *** Info documentation will not be built." >&5
7688 echo "$as_me: WARNING:
7689 *** Makeinfo is missing or too old.
7690 *** Info documentation will not be built." >&2;}
7691   BUILD_INFO=
7692 else
7693   BUILD_INFO=info
7694 fi
7695
7696
7697 # Is pod2man recent enough to regenerate manpages?
7698 echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
7699 echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6
7700 if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
7701   echo "$as_me:$LINENO: result: yes" >&5
7702 echo "${ECHO_T}yes" >&6
7703   GENERATED_MANPAGES=generated-manpages
7704 else
7705   echo "$as_me:$LINENO: result: no" >&5
7706 echo "${ECHO_T}no" >&6
7707   GENERATED_MANPAGES=
7708 fi
7709
7710
7711 # How about lex?
7712 for ac_prog in flex
7713 do
7714   # Extract the first word of "$ac_prog", so it can be a program name with args.
7715 set dummy $ac_prog; ac_word=$2
7716 echo "$as_me:$LINENO: checking for $ac_word" >&5
7717 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7718 if test "${ac_cv_prog_FLEX+set}" = set; then
7719   echo $ECHO_N "(cached) $ECHO_C" >&6
7720 else
7721   if test -n "$FLEX"; then
7722   ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
7723 else
7724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7725 for as_dir in $PATH
7726 do
7727   IFS=$as_save_IFS
7728   test -z "$as_dir" && as_dir=.
7729   for ac_exec_ext in '' $ac_executable_extensions; do
7730   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7731     ac_cv_prog_FLEX="$ac_prog"
7732     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7733     break 2
7734   fi
7735 done
7736 done
7737
7738 fi
7739 fi
7740 FLEX=$ac_cv_prog_FLEX
7741 if test -n "$FLEX"; then
7742   echo "$as_me:$LINENO: result: $FLEX" >&5
7743 echo "${ECHO_T}$FLEX" >&6
7744 else
7745   echo "$as_me:$LINENO: result: no" >&5
7746 echo "${ECHO_T}no" >&6
7747 fi
7748
7749   test -n "$FLEX" && break
7750 done
7751 test -n "$FLEX" || FLEX="$MISSING flex"
7752
7753
7754 # Bison?
7755 for ac_prog in bison
7756 do
7757   # Extract the first word of "$ac_prog", so it can be a program name with args.
7758 set dummy $ac_prog; ac_word=$2
7759 echo "$as_me:$LINENO: checking for $ac_word" >&5
7760 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7761 if test "${ac_cv_prog_BISON+set}" = set; then
7762   echo $ECHO_N "(cached) $ECHO_C" >&6
7763 else
7764   if test -n "$BISON"; then
7765   ac_cv_prog_BISON="$BISON" # Let the user override the test.
7766 else
7767 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7768 for as_dir in $PATH
7769 do
7770   IFS=$as_save_IFS
7771   test -z "$as_dir" && as_dir=.
7772   for ac_exec_ext in '' $ac_executable_extensions; do
7773   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7774     ac_cv_prog_BISON="$ac_prog"
7775     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7776     break 2
7777   fi
7778 done
7779 done
7780
7781 fi
7782 fi
7783 BISON=$ac_cv_prog_BISON
7784 if test -n "$BISON"; then
7785   echo "$as_me:$LINENO: result: $BISON" >&5
7786 echo "${ECHO_T}$BISON" >&6
7787 else
7788   echo "$as_me:$LINENO: result: no" >&5
7789 echo "${ECHO_T}no" >&6
7790 fi
7791
7792   test -n "$BISON" && break
7793 done
7794 test -n "$BISON" || BISON="$MISSING bison"
7795
7796
7797 # Binutils are not build modules, unlike bison/flex/makeinfo.  So we
7798 # check for build == host before using them.
7799
7800 # NM
7801 if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
7802   && test -d ../binutils ; then
7803   NM='$(objdir)/../binutils/nm-new'
7804 else
7805   # Extract the first word of "nm", so it can be a program name with args.
7806 set dummy nm; ac_word=$2
7807 echo "$as_me:$LINENO: checking for $ac_word" >&5
7808 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7809 if test "${ac_cv_prog_NM+set}" = set; then
7810   echo $ECHO_N "(cached) $ECHO_C" >&6
7811 else
7812   if test -n "$NM"; then
7813   ac_cv_prog_NM="$NM" # Let the user override the test.
7814 else
7815 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7816 for as_dir in $PATH
7817 do
7818   IFS=$as_save_IFS
7819   test -z "$as_dir" && as_dir=.
7820   for ac_exec_ext in '' $ac_executable_extensions; do
7821   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7822     ac_cv_prog_NM="nm"
7823     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7824     break 2
7825   fi
7826 done
7827 done
7828
7829   test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
7830 fi
7831 fi
7832 NM=$ac_cv_prog_NM
7833 if test -n "$NM"; then
7834   echo "$as_me:$LINENO: result: $NM" >&5
7835 echo "${ECHO_T}$NM" >&6
7836 else
7837   echo "$as_me:$LINENO: result: no" >&5
7838 echo "${ECHO_T}no" >&6
7839 fi
7840
7841 fi
7842
7843 # AR
7844 if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
7845   && test -d ../binutils ; then
7846   AR='$(objdir)/../binutils/ar'
7847 else
7848   # Extract the first word of "ar", so it can be a program name with args.
7849 set dummy ar; ac_word=$2
7850 echo "$as_me:$LINENO: checking for $ac_word" >&5
7851 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7852 if test "${ac_cv_prog_AR+set}" = set; then
7853   echo $ECHO_N "(cached) $ECHO_C" >&6
7854 else
7855   if test -n "$AR"; then
7856   ac_cv_prog_AR="$AR" # Let the user override the test.
7857 else
7858 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7859 for as_dir in $PATH
7860 do
7861   IFS=$as_save_IFS
7862   test -z "$as_dir" && as_dir=.
7863   for ac_exec_ext in '' $ac_executable_extensions; do
7864   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7865     ac_cv_prog_AR="ar"
7866     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7867     break 2
7868   fi
7869 done
7870 done
7871
7872   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
7873 fi
7874 fi
7875 AR=$ac_cv_prog_AR
7876 if test -n "$AR"; then
7877   echo "$as_me:$LINENO: result: $AR" >&5
7878 echo "${ECHO_T}$AR" >&6
7879 else
7880   echo "$as_me:$LINENO: result: no" >&5
7881 echo "${ECHO_T}no" >&6
7882 fi
7883
7884 fi
7885
7886
7887 # --------------------
7888 # Checks for C headers
7889 # --------------------
7890
7891 echo "$as_me:$LINENO: checking for GNU C library" >&5
7892 echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6
7893 if test "${gcc_cv_glibc+set}" = set; then
7894   echo $ECHO_N "(cached) $ECHO_C" >&6
7895 else
7896   cat >conftest.$ac_ext <<_ACEOF
7897 /* confdefs.h.  */
7898 _ACEOF
7899 cat confdefs.h >>conftest.$ac_ext
7900 cat >>conftest.$ac_ext <<_ACEOF
7901 /* end confdefs.h.  */
7902 #include <features.h>
7903 int
7904 main ()
7905 {
7906
7907 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
7908 #error Not a GNU C library system
7909 #endif
7910   ;
7911   return 0;
7912 }
7913 _ACEOF
7914 rm -f conftest.$ac_objext
7915 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7916   (eval $ac_compile) 2>conftest.er1
7917   ac_status=$?
7918   grep -v '^ *+' conftest.er1 >conftest.err
7919   rm -f conftest.er1
7920   cat conftest.err >&5
7921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7922   (exit $ac_status); } &&
7923          { ac_try='test -z "$ac_c_werror_flag"
7924                          || test ! -s conftest.err'
7925   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7926   (eval $ac_try) 2>&5
7927   ac_status=$?
7928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7929   (exit $ac_status); }; } &&
7930          { ac_try='test -s conftest.$ac_objext'
7931   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7932   (eval $ac_try) 2>&5
7933   ac_status=$?
7934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7935   (exit $ac_status); }; }; then
7936   gcc_cv_glibc=yes
7937 else
7938   echo "$as_me: failed program was:" >&5
7939 sed 's/^/| /' conftest.$ac_ext >&5
7940
7941 gcc_cv_glibc=no
7942 fi
7943 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7944 fi
7945
7946 echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
7947 echo "${ECHO_T}$gcc_cv_glibc" >&6
7948 if test $gcc_cv_glibc = yes; then
7949
7950 cat >>confdefs.h <<\_ACEOF
7951 #define _GNU_SOURCE 1
7952 _ACEOF
7953
7954 fi
7955
7956 # Need to reject headers which give warnings, so that the -Werror bootstrap
7957 # works later. *sigh*  This needs to come before all header checks.
7958
7959 ac_c_preproc_warn_flag=yes
7960
7961 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7962 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7963 if test "${ac_cv_header_stdc+set}" = set; then
7964   echo $ECHO_N "(cached) $ECHO_C" >&6
7965 else
7966   cat >conftest.$ac_ext <<_ACEOF
7967 /* confdefs.h.  */
7968 _ACEOF
7969 cat confdefs.h >>conftest.$ac_ext
7970 cat >>conftest.$ac_ext <<_ACEOF
7971 /* end confdefs.h.  */
7972 #include <stdlib.h>
7973 #include <stdarg.h>
7974 #include <string.h>
7975 #include <float.h>
7976
7977 int
7978 main ()
7979 {
7980
7981   ;
7982   return 0;
7983 }
7984 _ACEOF
7985 rm -f conftest.$ac_objext
7986 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7987   (eval $ac_compile) 2>conftest.er1
7988   ac_status=$?
7989   grep -v '^ *+' conftest.er1 >conftest.err
7990   rm -f conftest.er1
7991   cat conftest.err >&5
7992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7993   (exit $ac_status); } &&
7994          { ac_try='test -z "$ac_c_werror_flag"
7995                          || test ! -s conftest.err'
7996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7997   (eval $ac_try) 2>&5
7998   ac_status=$?
7999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8000   (exit $ac_status); }; } &&
8001          { ac_try='test -s conftest.$ac_objext'
8002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8003   (eval $ac_try) 2>&5
8004   ac_status=$?
8005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8006   (exit $ac_status); }; }; then
8007   ac_cv_header_stdc=yes
8008 else
8009   echo "$as_me: failed program was:" >&5
8010 sed 's/^/| /' conftest.$ac_ext >&5
8011
8012 ac_cv_header_stdc=no
8013 fi
8014 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8015
8016 if test $ac_cv_header_stdc = yes; then
8017   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8018   cat >conftest.$ac_ext <<_ACEOF
8019 /* confdefs.h.  */
8020 _ACEOF
8021 cat confdefs.h >>conftest.$ac_ext
8022 cat >>conftest.$ac_ext <<_ACEOF
8023 /* end confdefs.h.  */
8024 #include <string.h>
8025
8026 _ACEOF
8027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8028   $EGREP "memchr" >/dev/null 2>&1; then
8029   :
8030 else
8031   ac_cv_header_stdc=no
8032 fi
8033 rm -f conftest*
8034
8035 fi
8036
8037 if test $ac_cv_header_stdc = yes; then
8038   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8039   cat >conftest.$ac_ext <<_ACEOF
8040 /* confdefs.h.  */
8041 _ACEOF
8042 cat confdefs.h >>conftest.$ac_ext
8043 cat >>conftest.$ac_ext <<_ACEOF
8044 /* end confdefs.h.  */
8045 #include <stdlib.h>
8046
8047 _ACEOF
8048 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8049   $EGREP "free" >/dev/null 2>&1; then
8050   :
8051 else
8052   ac_cv_header_stdc=no
8053 fi
8054 rm -f conftest*
8055
8056 fi
8057
8058 if test $ac_cv_header_stdc = yes; then
8059   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8060   if test "$cross_compiling" = yes; then
8061   :
8062 else
8063   cat >conftest.$ac_ext <<_ACEOF
8064 /* confdefs.h.  */
8065 _ACEOF
8066 cat confdefs.h >>conftest.$ac_ext
8067 cat >>conftest.$ac_ext <<_ACEOF
8068 /* end confdefs.h.  */
8069 #include <ctype.h>
8070 #if ((' ' & 0x0FF) == 0x020)
8071 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8072 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8073 #else
8074 # define ISLOWER(c) \
8075                    (('a' <= (c) && (c) <= 'i') \
8076                      || ('j' <= (c) && (c) <= 'r') \
8077                      || ('s' <= (c) && (c) <= 'z'))
8078 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8079 #endif
8080
8081 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8082 int
8083 main ()
8084 {
8085   int i;
8086   for (i = 0; i < 256; i++)
8087     if (XOR (islower (i), ISLOWER (i))
8088         || toupper (i) != TOUPPER (i))
8089       exit(2);
8090   exit (0);
8091 }
8092 _ACEOF
8093 rm -f conftest$ac_exeext
8094 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8095   (eval $ac_link) 2>&5
8096   ac_status=$?
8097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8098   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8100   (eval $ac_try) 2>&5
8101   ac_status=$?
8102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8103   (exit $ac_status); }; }; then
8104   :
8105 else
8106   echo "$as_me: program exited with status $ac_status" >&5
8107 echo "$as_me: failed program was:" >&5
8108 sed 's/^/| /' conftest.$ac_ext >&5
8109
8110 ( exit $ac_status )
8111 ac_cv_header_stdc=no
8112 fi
8113 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8114 fi
8115 fi
8116 fi
8117 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8118 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8119 if test $ac_cv_header_stdc = yes; then
8120
8121 cat >>confdefs.h <<\_ACEOF
8122 #define STDC_HEADERS 1
8123 _ACEOF
8124
8125 fi
8126
8127 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
8128 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
8129 if test "${ac_cv_header_time+set}" = set; then
8130   echo $ECHO_N "(cached) $ECHO_C" >&6
8131 else
8132   cat >conftest.$ac_ext <<_ACEOF
8133 /* confdefs.h.  */
8134 _ACEOF
8135 cat confdefs.h >>conftest.$ac_ext
8136 cat >>conftest.$ac_ext <<_ACEOF
8137 /* end confdefs.h.  */
8138 #include <sys/types.h>
8139 #include <sys/time.h>
8140 #include <time.h>
8141
8142 int
8143 main ()
8144 {
8145 if ((struct tm *) 0)
8146 return 0;
8147   ;
8148   return 0;
8149 }
8150 _ACEOF
8151 rm -f conftest.$ac_objext
8152 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8153   (eval $ac_compile) 2>conftest.er1
8154   ac_status=$?
8155   grep -v '^ *+' conftest.er1 >conftest.err
8156   rm -f conftest.er1
8157   cat conftest.err >&5
8158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8159   (exit $ac_status); } &&
8160          { ac_try='test -z "$ac_c_werror_flag"
8161                          || test ! -s conftest.err'
8162   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8163   (eval $ac_try) 2>&5
8164   ac_status=$?
8165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8166   (exit $ac_status); }; } &&
8167          { ac_try='test -s conftest.$ac_objext'
8168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8169   (eval $ac_try) 2>&5
8170   ac_status=$?
8171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8172   (exit $ac_status); }; }; then
8173   ac_cv_header_time=yes
8174 else
8175   echo "$as_me: failed program was:" >&5
8176 sed 's/^/| /' conftest.$ac_ext >&5
8177
8178 ac_cv_header_time=no
8179 fi
8180 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8181 fi
8182 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
8183 echo "${ECHO_T}$ac_cv_header_time" >&6
8184 if test $ac_cv_header_time = yes; then
8185
8186 cat >>confdefs.h <<\_ACEOF
8187 #define TIME_WITH_SYS_TIME 1
8188 _ACEOF
8189
8190 fi
8191
8192 echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
8193 echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6
8194 if test "${gcc_cv_header_string+set}" = set; then
8195   echo $ECHO_N "(cached) $ECHO_C" >&6
8196 else
8197   cat >conftest.$ac_ext <<_ACEOF
8198 /* confdefs.h.  */
8199 _ACEOF
8200 cat confdefs.h >>conftest.$ac_ext
8201 cat >>conftest.$ac_ext <<_ACEOF
8202 /* end confdefs.h.  */
8203 #include <string.h>
8204 #include <strings.h>
8205 int
8206 main ()
8207 {
8208
8209   ;
8210   return 0;
8211 }
8212 _ACEOF
8213 rm -f conftest.$ac_objext
8214 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8215   (eval $ac_compile) 2>conftest.er1
8216   ac_status=$?
8217   grep -v '^ *+' conftest.er1 >conftest.err
8218   rm -f conftest.er1
8219   cat conftest.err >&5
8220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8221   (exit $ac_status); } &&
8222          { ac_try='test -z "$ac_c_werror_flag"
8223                          || test ! -s conftest.err'
8224   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8225   (eval $ac_try) 2>&5
8226   ac_status=$?
8227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8228   (exit $ac_status); }; } &&
8229          { ac_try='test -s conftest.$ac_objext'
8230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8231   (eval $ac_try) 2>&5
8232   ac_status=$?
8233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8234   (exit $ac_status); }; }; then
8235   gcc_cv_header_string=yes
8236 else
8237   echo "$as_me: failed program was:" >&5
8238 sed 's/^/| /' conftest.$ac_ext >&5
8239
8240 gcc_cv_header_string=no
8241 fi
8242 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8243 fi
8244 echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
8245 echo "${ECHO_T}$gcc_cv_header_string" >&6
8246 if test $gcc_cv_header_string = yes; then
8247
8248 cat >>confdefs.h <<\_ACEOF
8249 #define STRING_WITH_STRINGS 1
8250 _ACEOF
8251
8252 fi
8253
8254 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
8255 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
8256 if test "${ac_cv_header_sys_wait_h+set}" = set; then
8257   echo $ECHO_N "(cached) $ECHO_C" >&6
8258 else
8259   cat >conftest.$ac_ext <<_ACEOF
8260 /* confdefs.h.  */
8261 _ACEOF
8262 cat confdefs.h >>conftest.$ac_ext
8263 cat >>conftest.$ac_ext <<_ACEOF
8264 /* end confdefs.h.  */
8265 #include <sys/types.h>
8266 #include <sys/wait.h>
8267 #ifndef WEXITSTATUS
8268 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8269 #endif
8270 #ifndef WIFEXITED
8271 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8272 #endif
8273
8274 int
8275 main ()
8276 {
8277   int s;
8278   wait (&s);
8279   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8280   ;
8281   return 0;
8282 }
8283 _ACEOF
8284 rm -f conftest.$ac_objext
8285 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8286   (eval $ac_compile) 2>conftest.er1
8287   ac_status=$?
8288   grep -v '^ *+' conftest.er1 >conftest.err
8289   rm -f conftest.er1
8290   cat conftest.err >&5
8291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8292   (exit $ac_status); } &&
8293          { ac_try='test -z "$ac_c_werror_flag"
8294                          || test ! -s conftest.err'
8295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8296   (eval $ac_try) 2>&5
8297   ac_status=$?
8298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8299   (exit $ac_status); }; } &&
8300          { ac_try='test -s conftest.$ac_objext'
8301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8302   (eval $ac_try) 2>&5
8303   ac_status=$?
8304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8305   (exit $ac_status); }; }; then
8306   ac_cv_header_sys_wait_h=yes
8307 else
8308   echo "$as_me: failed program was:" >&5
8309 sed 's/^/| /' conftest.$ac_ext >&5
8310
8311 ac_cv_header_sys_wait_h=no
8312 fi
8313 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8314 fi
8315 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
8316 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
8317 if test $ac_cv_header_sys_wait_h = yes; then
8318
8319 cat >>confdefs.h <<\_ACEOF
8320 #define HAVE_SYS_WAIT_H 1
8321 _ACEOF
8322
8323 fi
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347 for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
8348                  fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
8349                  sys/resource.h sys/param.h sys/times.h sys/stat.h \
8350                  direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
8351 do
8352 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8353 echo "$as_me:$LINENO: checking for $ac_header" >&5
8354 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8355 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8356   echo $ECHO_N "(cached) $ECHO_C" >&6
8357 else
8358   cat >conftest.$ac_ext <<_ACEOF
8359 /* confdefs.h.  */
8360 _ACEOF
8361 cat confdefs.h >>conftest.$ac_ext
8362 cat >>conftest.$ac_ext <<_ACEOF
8363 /* end confdefs.h.  */
8364 #include <$ac_header>
8365 _ACEOF
8366 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8367   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8368   ac_status=$?
8369   grep -v '^ *+' conftest.er1 >conftest.err
8370   rm -f conftest.er1
8371   cat conftest.err >&5
8372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8373   (exit $ac_status); } >/dev/null; then
8374   if test -s conftest.err; then
8375     ac_cpp_err=$ac_c_preproc_warn_flag
8376     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8377   else
8378     ac_cpp_err=
8379   fi
8380 else
8381   ac_cpp_err=yes
8382 fi
8383 if test -z "$ac_cpp_err"; then
8384   eval "$as_ac_Header=yes"
8385 else
8386   echo "$as_me: failed program was:" >&5
8387 sed 's/^/| /' conftest.$ac_ext >&5
8388
8389   eval "$as_ac_Header=no"
8390 fi
8391 rm -f conftest.err conftest.$ac_ext
8392 fi
8393 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8394 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8395 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8396   cat >>confdefs.h <<_ACEOF
8397 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8398 _ACEOF
8399
8400 fi
8401 done
8402
8403
8404 # Check for thread headers.
8405 echo "$as_me:$LINENO: checking for thread.h" >&5
8406 echo $ECHO_N "checking for thread.h... $ECHO_C" >&6
8407 if test "${ac_cv_header_thread_h+set}" = set; then
8408   echo $ECHO_N "(cached) $ECHO_C" >&6
8409 else
8410   cat >conftest.$ac_ext <<_ACEOF
8411 /* confdefs.h.  */
8412 _ACEOF
8413 cat confdefs.h >>conftest.$ac_ext
8414 cat >>conftest.$ac_ext <<_ACEOF
8415 /* end confdefs.h.  */
8416 #include <thread.h>
8417 _ACEOF
8418 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8419   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8420   ac_status=$?
8421   grep -v '^ *+' conftest.er1 >conftest.err
8422   rm -f conftest.er1
8423   cat conftest.err >&5
8424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8425   (exit $ac_status); } >/dev/null; then
8426   if test -s conftest.err; then
8427     ac_cpp_err=$ac_c_preproc_warn_flag
8428     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8429   else
8430     ac_cpp_err=
8431   fi
8432 else
8433   ac_cpp_err=yes
8434 fi
8435 if test -z "$ac_cpp_err"; then
8436   ac_cv_header_thread_h=yes
8437 else
8438   echo "$as_me: failed program was:" >&5
8439 sed 's/^/| /' conftest.$ac_ext >&5
8440
8441   ac_cv_header_thread_h=no
8442 fi
8443 rm -f conftest.err conftest.$ac_ext
8444 fi
8445 echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
8446 echo "${ECHO_T}$ac_cv_header_thread_h" >&6
8447 if test $ac_cv_header_thread_h = yes; then
8448   have_thread_h=yes
8449 else
8450   have_thread_h=
8451 fi
8452
8453 echo "$as_me:$LINENO: checking for pthread.h" >&5
8454 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
8455 if test "${ac_cv_header_pthread_h+set}" = set; then
8456   echo $ECHO_N "(cached) $ECHO_C" >&6
8457 else
8458   cat >conftest.$ac_ext <<_ACEOF
8459 /* confdefs.h.  */
8460 _ACEOF
8461 cat confdefs.h >>conftest.$ac_ext
8462 cat >>conftest.$ac_ext <<_ACEOF
8463 /* end confdefs.h.  */
8464 #include <pthread.h>
8465 _ACEOF
8466 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8467   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8468   ac_status=$?
8469   grep -v '^ *+' conftest.er1 >conftest.err
8470   rm -f conftest.er1
8471   cat conftest.err >&5
8472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8473   (exit $ac_status); } >/dev/null; then
8474   if test -s conftest.err; then
8475     ac_cpp_err=$ac_c_preproc_warn_flag
8476     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8477   else
8478     ac_cpp_err=
8479   fi
8480 else
8481   ac_cpp_err=yes
8482 fi
8483 if test -z "$ac_cpp_err"; then
8484   ac_cv_header_pthread_h=yes
8485 else
8486   echo "$as_me: failed program was:" >&5
8487 sed 's/^/| /' conftest.$ac_ext >&5
8488
8489   ac_cv_header_pthread_h=no
8490 fi
8491 rm -f conftest.err conftest.$ac_ext
8492 fi
8493 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
8494 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
8495 if test $ac_cv_header_pthread_h = yes; then
8496   have_pthread_h=yes
8497 else
8498   have_pthread_h=
8499 fi
8500
8501
8502 # These tests can't be done till we know if we have limits.h.
8503 echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
8504 echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6
8505 if test "${gcc_cv_decl_char_bit+set}" = set; then
8506   echo $ECHO_N "(cached) $ECHO_C" >&6
8507 else
8508   cat >conftest.$ac_ext <<_ACEOF
8509 /* confdefs.h.  */
8510 _ACEOF
8511 cat confdefs.h >>conftest.$ac_ext
8512 cat >>conftest.$ac_ext <<_ACEOF
8513 /* end confdefs.h.  */
8514 #ifdef HAVE_LIMITS_H
8515 #include <limits.h>
8516 #endif
8517 #ifdef CHAR_BIT
8518 found
8519 #endif
8520 _ACEOF
8521 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8522   $EGREP "found" >/dev/null 2>&1; then
8523   gcc_cv_decl_char_bit=yes
8524 else
8525   gcc_cv_decl_char_bit=no
8526 fi
8527 rm -f conftest*
8528
8529
8530 fi
8531 echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
8532 echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6
8533 if test $gcc_cv_decl_char_bit = no; then
8534   echo "$as_me:$LINENO: checking number of bits in a byte" >&5
8535 echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6
8536 if test "${gcc_cv_c_nbby+set}" = set; then
8537   echo $ECHO_N "(cached) $ECHO_C" >&6
8538 else
8539   i=8
8540  gcc_cv_c_nbby=
8541  while test $i -lt 65; do
8542    cat >conftest.$ac_ext <<_ACEOF
8543 /* confdefs.h.  */
8544 _ACEOF
8545 cat confdefs.h >>conftest.$ac_ext
8546 cat >>conftest.$ac_ext <<_ACEOF
8547 /* end confdefs.h.  */
8548
8549 int
8550 main ()
8551 {
8552 switch(0) {
8553   case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
8554   case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
8555   ; }
8556   ;
8557   return 0;
8558 }
8559 _ACEOF
8560 rm -f conftest.$ac_objext
8561 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8562   (eval $ac_compile) 2>conftest.er1
8563   ac_status=$?
8564   grep -v '^ *+' conftest.er1 >conftest.err
8565   rm -f conftest.er1
8566   cat conftest.err >&5
8567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8568   (exit $ac_status); } &&
8569          { ac_try='test -z "$ac_c_werror_flag"
8570                          || test ! -s conftest.err'
8571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8572   (eval $ac_try) 2>&5
8573   ac_status=$?
8574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8575   (exit $ac_status); }; } &&
8576          { ac_try='test -s conftest.$ac_objext'
8577   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8578   (eval $ac_try) 2>&5
8579   ac_status=$?
8580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8581   (exit $ac_status); }; }; then
8582   gcc_cv_c_nbby=$i; break
8583 else
8584   echo "$as_me: failed program was:" >&5
8585 sed 's/^/| /' conftest.$ac_ext >&5
8586
8587 fi
8588 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8589    i=`expr $i + 1`
8590  done
8591  test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
8592
8593 fi
8594 echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
8595 echo "${ECHO_T}$gcc_cv_c_nbby" >&6
8596 if test $gcc_cv_c_nbby = failed; then
8597   { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
8598 echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
8599    { (exit 1); exit 1; }; }
8600 else
8601
8602 cat >>confdefs.h <<_ACEOF
8603 #define CHAR_BIT $gcc_cv_c_nbby
8604 _ACEOF
8605
8606 fi
8607 fi
8608 echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
8609 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
8610 if test "${ac_cv_c_bigendian+set}" = set; then
8611   echo $ECHO_N "(cached) $ECHO_C" >&6
8612 else
8613   # See if sys/param.h defines the BYTE_ORDER macro.
8614 cat >conftest.$ac_ext <<_ACEOF
8615 /* confdefs.h.  */
8616 _ACEOF
8617 cat confdefs.h >>conftest.$ac_ext
8618 cat >>conftest.$ac_ext <<_ACEOF
8619 /* end confdefs.h.  */
8620 #include <sys/types.h>
8621 #include <sys/param.h>
8622
8623 int
8624 main ()
8625 {
8626 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
8627  bogus endian macros
8628 #endif
8629
8630   ;
8631   return 0;
8632 }
8633 _ACEOF
8634 rm -f conftest.$ac_objext
8635 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8636   (eval $ac_compile) 2>conftest.er1
8637   ac_status=$?
8638   grep -v '^ *+' conftest.er1 >conftest.err
8639   rm -f conftest.er1
8640   cat conftest.err >&5
8641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8642   (exit $ac_status); } &&
8643          { ac_try='test -z "$ac_c_werror_flag"
8644                          || test ! -s conftest.err'
8645   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8646   (eval $ac_try) 2>&5
8647   ac_status=$?
8648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8649   (exit $ac_status); }; } &&
8650          { ac_try='test -s conftest.$ac_objext'
8651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8652   (eval $ac_try) 2>&5
8653   ac_status=$?
8654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8655   (exit $ac_status); }; }; then
8656   # It does; now see whether it defined to BIG_ENDIAN or not.
8657 cat >conftest.$ac_ext <<_ACEOF
8658 /* confdefs.h.  */
8659 _ACEOF
8660 cat confdefs.h >>conftest.$ac_ext
8661 cat >>conftest.$ac_ext <<_ACEOF
8662 /* end confdefs.h.  */
8663 #include <sys/types.h>
8664 #include <sys/param.h>
8665
8666 int
8667 main ()
8668 {
8669 #if BYTE_ORDER != BIG_ENDIAN
8670  not big endian
8671 #endif
8672
8673   ;
8674   return 0;
8675 }
8676 _ACEOF
8677 rm -f conftest.$ac_objext
8678 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8679   (eval $ac_compile) 2>conftest.er1
8680   ac_status=$?
8681   grep -v '^ *+' conftest.er1 >conftest.err
8682   rm -f conftest.er1
8683   cat conftest.err >&5
8684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8685   (exit $ac_status); } &&
8686          { ac_try='test -z "$ac_c_werror_flag"
8687                          || test ! -s conftest.err'
8688   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8689   (eval $ac_try) 2>&5
8690   ac_status=$?
8691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8692   (exit $ac_status); }; } &&
8693          { ac_try='test -s conftest.$ac_objext'
8694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8695   (eval $ac_try) 2>&5
8696   ac_status=$?
8697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8698   (exit $ac_status); }; }; then
8699   ac_cv_c_bigendian=yes
8700 else
8701   echo "$as_me: failed program was:" >&5
8702 sed 's/^/| /' conftest.$ac_ext >&5
8703
8704 ac_cv_c_bigendian=no
8705 fi
8706 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8707 else
8708   echo "$as_me: failed program was:" >&5
8709 sed 's/^/| /' conftest.$ac_ext >&5
8710
8711 # It does not; compile a test program.
8712 if test "$cross_compiling" = yes; then
8713   # try to guess the endianness by grepping values into an object file
8714   ac_cv_c_bigendian=unknown
8715   cat >conftest.$ac_ext <<_ACEOF
8716 /* confdefs.h.  */
8717 _ACEOF
8718 cat confdefs.h >>conftest.$ac_ext
8719 cat >>conftest.$ac_ext <<_ACEOF
8720 /* end confdefs.h.  */
8721 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8722 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8723 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
8724 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8725 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8726 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
8727 int
8728 main ()
8729 {
8730  _ascii (); _ebcdic ();
8731   ;
8732   return 0;
8733 }
8734 _ACEOF
8735 rm -f conftest.$ac_objext
8736 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8737   (eval $ac_compile) 2>conftest.er1
8738   ac_status=$?
8739   grep -v '^ *+' conftest.er1 >conftest.err
8740   rm -f conftest.er1
8741   cat conftest.err >&5
8742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8743   (exit $ac_status); } &&
8744          { ac_try='test -z "$ac_c_werror_flag"
8745                          || test ! -s conftest.err'
8746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8747   (eval $ac_try) 2>&5
8748   ac_status=$?
8749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8750   (exit $ac_status); }; } &&
8751          { ac_try='test -s conftest.$ac_objext'
8752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8753   (eval $ac_try) 2>&5
8754   ac_status=$?
8755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8756   (exit $ac_status); }; }; then
8757   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
8758   ac_cv_c_bigendian=yes
8759 fi
8760 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8761   if test "$ac_cv_c_bigendian" = unknown; then
8762     ac_cv_c_bigendian=no
8763   else
8764     # finding both strings is unlikely to happen, but who knows?
8765     ac_cv_c_bigendian=unknown
8766   fi
8767 fi
8768 else
8769   echo "$as_me: failed program was:" >&5
8770 sed 's/^/| /' conftest.$ac_ext >&5
8771
8772 fi
8773 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8774 else
8775   cat >conftest.$ac_ext <<_ACEOF
8776 /* confdefs.h.  */
8777 _ACEOF
8778 cat confdefs.h >>conftest.$ac_ext
8779 cat >>conftest.$ac_ext <<_ACEOF
8780 /* end confdefs.h.  */
8781 int
8782 main ()
8783 {
8784   /* Are we little or big endian?  From Harbison&Steele.  */
8785   union
8786   {
8787     long l;
8788     char c[sizeof (long)];
8789   } u;
8790   u.l = 1;
8791   exit (u.c[sizeof (long) - 1] == 1);
8792 }
8793 _ACEOF
8794 rm -f conftest$ac_exeext
8795 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8796   (eval $ac_link) 2>&5
8797   ac_status=$?
8798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8800   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8801   (eval $ac_try) 2>&5
8802   ac_status=$?
8803   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8804   (exit $ac_status); }; }; then
8805   ac_cv_c_bigendian=no
8806 else
8807   echo "$as_me: program exited with status $ac_status" >&5
8808 echo "$as_me: failed program was:" >&5
8809 sed 's/^/| /' conftest.$ac_ext >&5
8810
8811 ( exit $ac_status )
8812 ac_cv_c_bigendian=yes
8813 fi
8814 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8815 fi
8816 fi
8817 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8818 fi
8819 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
8820 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
8821 case $ac_cv_c_bigendian in
8822   yes)
8823
8824 cat >>confdefs.h <<\_ACEOF
8825 #define WORDS_BIGENDIAN 1
8826 _ACEOF
8827  ;;
8828   no)
8829      ;;
8830   *)
8831     { { echo "$as_me:$LINENO: error: unknown endianness
8832 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
8833 echo "$as_me: error: unknown endianness
8834 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
8835    { (exit 1); exit 1; }; } ;;
8836 esac
8837
8838
8839 # --------
8840 # UNSORTED
8841 # --------
8842
8843
8844 # These libraries may be used by collect2.
8845 # We may need a special search path to get them linked.
8846 echo "$as_me:$LINENO: checking for collect2 libraries" >&5
8847 echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6
8848 if test "${gcc_cv_collect2_libs+set}" = set; then
8849   echo $ECHO_N "(cached) $ECHO_C" >&6
8850 else
8851   save_LIBS="$LIBS"
8852 for libs in '' -lld -lmld \
8853                 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
8854                 '-L/usr/lib/cmplrs/cc3.11 -lmld'
8855 do
8856         LIBS="$libs"
8857         cat >conftest.$ac_ext <<_ACEOF
8858 /* confdefs.h.  */
8859 _ACEOF
8860 cat confdefs.h >>conftest.$ac_ext
8861 cat >>conftest.$ac_ext <<_ACEOF
8862 /* end confdefs.h.  */
8863
8864 /* Override any gcc2 internal prototype to avoid an error.  */
8865 #ifdef __cplusplus
8866 extern "C"
8867 #endif
8868 /* We use char because int might match the return type of a gcc2
8869    builtin and then its argument prototype would still apply.  */
8870 char ldopen ();
8871 int
8872 main ()
8873 {
8874 ldopen ();
8875   ;
8876   return 0;
8877 }
8878 _ACEOF
8879 rm -f conftest.$ac_objext conftest$ac_exeext
8880 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8881   (eval $ac_link) 2>conftest.er1
8882   ac_status=$?
8883   grep -v '^ *+' conftest.er1 >conftest.err
8884   rm -f conftest.er1
8885   cat conftest.err >&5
8886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8887   (exit $ac_status); } &&
8888          { ac_try='test -z "$ac_c_werror_flag"
8889                          || test ! -s conftest.err'
8890   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8891   (eval $ac_try) 2>&5
8892   ac_status=$?
8893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8894   (exit $ac_status); }; } &&
8895          { ac_try='test -s conftest$ac_exeext'
8896   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8897   (eval $ac_try) 2>&5
8898   ac_status=$?
8899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8900   (exit $ac_status); }; }; then
8901   gcc_cv_collect2_libs="$libs"; break
8902 else
8903   echo "$as_me: failed program was:" >&5
8904 sed 's/^/| /' conftest.$ac_ext >&5
8905
8906 fi
8907 rm -f conftest.err conftest.$ac_objext \
8908       conftest$ac_exeext conftest.$ac_ext
8909 done
8910 LIBS="$save_LIBS"
8911 test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
8912 fi
8913 echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
8914 echo "${ECHO_T}$gcc_cv_collect2_libs" >&6
8915 case $gcc_cv_collect2_libs in
8916         "none required")        ;;
8917         *)      COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
8918 esac
8919
8920
8921 # When building Ada code on Alpha, we need exc_resume which is usually in
8922 # -lexc.  So test for it.
8923 save_LIBS="$LIBS"
8924 LIBS=
8925 echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
8926 echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6
8927 if test "${ac_cv_search_exc_resume+set}" = set; then
8928   echo $ECHO_N "(cached) $ECHO_C" >&6
8929 else
8930   ac_func_search_save_LIBS=$LIBS
8931 ac_cv_search_exc_resume=no
8932 cat >conftest.$ac_ext <<_ACEOF
8933 /* confdefs.h.  */
8934 _ACEOF
8935 cat confdefs.h >>conftest.$ac_ext
8936 cat >>conftest.$ac_ext <<_ACEOF
8937 /* end confdefs.h.  */
8938
8939 /* Override any gcc2 internal prototype to avoid an error.  */
8940 #ifdef __cplusplus
8941 extern "C"
8942 #endif
8943 /* We use char because int might match the return type of a gcc2
8944    builtin and then its argument prototype would still apply.  */
8945 char exc_resume ();
8946 int
8947 main ()
8948 {
8949 exc_resume ();
8950   ;
8951   return 0;
8952 }
8953 _ACEOF
8954 rm -f conftest.$ac_objext conftest$ac_exeext
8955 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8956   (eval $ac_link) 2>conftest.er1
8957   ac_status=$?
8958   grep -v '^ *+' conftest.er1 >conftest.err
8959   rm -f conftest.er1
8960   cat conftest.err >&5
8961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8962   (exit $ac_status); } &&
8963          { ac_try='test -z "$ac_c_werror_flag"
8964                          || test ! -s conftest.err'
8965   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8966   (eval $ac_try) 2>&5
8967   ac_status=$?
8968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8969   (exit $ac_status); }; } &&
8970          { ac_try='test -s conftest$ac_exeext'
8971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8972   (eval $ac_try) 2>&5
8973   ac_status=$?
8974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8975   (exit $ac_status); }; }; then
8976   ac_cv_search_exc_resume="none required"
8977 else
8978   echo "$as_me: failed program was:" >&5
8979 sed 's/^/| /' conftest.$ac_ext >&5
8980
8981 fi
8982 rm -f conftest.err conftest.$ac_objext \
8983       conftest$ac_exeext conftest.$ac_ext
8984 if test "$ac_cv_search_exc_resume" = no; then
8985   for ac_lib in exc; do
8986     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8987     cat >conftest.$ac_ext <<_ACEOF
8988 /* confdefs.h.  */
8989 _ACEOF
8990 cat confdefs.h >>conftest.$ac_ext
8991 cat >>conftest.$ac_ext <<_ACEOF
8992 /* end confdefs.h.  */
8993
8994 /* Override any gcc2 internal prototype to avoid an error.  */
8995 #ifdef __cplusplus
8996 extern "C"
8997 #endif
8998 /* We use char because int might match the return type of a gcc2
8999    builtin and then its argument prototype would still apply.  */
9000 char exc_resume ();
9001 int
9002 main ()
9003 {
9004 exc_resume ();
9005   ;
9006   return 0;
9007 }
9008 _ACEOF
9009 rm -f conftest.$ac_objext conftest$ac_exeext
9010 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9011   (eval $ac_link) 2>conftest.er1
9012   ac_status=$?
9013   grep -v '^ *+' conftest.er1 >conftest.err
9014   rm -f conftest.er1
9015   cat conftest.err >&5
9016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9017   (exit $ac_status); } &&
9018          { ac_try='test -z "$ac_c_werror_flag"
9019                          || test ! -s conftest.err'
9020   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9021   (eval $ac_try) 2>&5
9022   ac_status=$?
9023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9024   (exit $ac_status); }; } &&
9025          { ac_try='test -s conftest$ac_exeext'
9026   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9027   (eval $ac_try) 2>&5
9028   ac_status=$?
9029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9030   (exit $ac_status); }; }; then
9031   ac_cv_search_exc_resume="-l$ac_lib"
9032 break
9033 else
9034   echo "$as_me: failed program was:" >&5
9035 sed 's/^/| /' conftest.$ac_ext >&5
9036
9037 fi
9038 rm -f conftest.err conftest.$ac_objext \
9039       conftest$ac_exeext conftest.$ac_ext
9040   done
9041 fi
9042 LIBS=$ac_func_search_save_LIBS
9043 fi
9044 echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
9045 echo "${ECHO_T}$ac_cv_search_exc_resume" >&6
9046 if test "$ac_cv_search_exc_resume" != no; then
9047   test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS"
9048
9049 fi
9050
9051 GNAT_LIBEXC="$LIBS"
9052 LIBS="$save_LIBS"
9053
9054
9055 # Some systems put ldexp and frexp in libm instead of libc; assume
9056 # they're both in the same place.  jcf-dump needs them.
9057 save_LIBS="$LIBS"
9058 LIBS=
9059 echo "$as_me:$LINENO: checking for library containing ldexp" >&5
9060 echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6
9061 if test "${ac_cv_search_ldexp+set}" = set; then
9062   echo $ECHO_N "(cached) $ECHO_C" >&6
9063 else
9064   ac_func_search_save_LIBS=$LIBS
9065 ac_cv_search_ldexp=no
9066 cat >conftest.$ac_ext <<_ACEOF
9067 /* confdefs.h.  */
9068 _ACEOF
9069 cat confdefs.h >>conftest.$ac_ext
9070 cat >>conftest.$ac_ext <<_ACEOF
9071 /* end confdefs.h.  */
9072
9073 /* Override any gcc2 internal prototype to avoid an error.  */
9074 #ifdef __cplusplus
9075 extern "C"
9076 #endif
9077 /* We use char because int might match the return type of a gcc2
9078    builtin and then its argument prototype would still apply.  */
9079 char ldexp ();
9080 int
9081 main ()
9082 {
9083 ldexp ();
9084   ;
9085   return 0;
9086 }
9087 _ACEOF
9088 rm -f conftest.$ac_objext conftest$ac_exeext
9089 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9090   (eval $ac_link) 2>conftest.er1
9091   ac_status=$?
9092   grep -v '^ *+' conftest.er1 >conftest.err
9093   rm -f conftest.er1
9094   cat conftest.err >&5
9095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9096   (exit $ac_status); } &&
9097          { ac_try='test -z "$ac_c_werror_flag"
9098                          || test ! -s conftest.err'
9099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9100   (eval $ac_try) 2>&5
9101   ac_status=$?
9102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9103   (exit $ac_status); }; } &&
9104          { ac_try='test -s conftest$ac_exeext'
9105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9106   (eval $ac_try) 2>&5
9107   ac_status=$?
9108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9109   (exit $ac_status); }; }; then
9110   ac_cv_search_ldexp="none required"
9111 else
9112   echo "$as_me: failed program was:" >&5
9113 sed 's/^/| /' conftest.$ac_ext >&5
9114
9115 fi
9116 rm -f conftest.err conftest.$ac_objext \
9117       conftest$ac_exeext conftest.$ac_ext
9118 if test "$ac_cv_search_ldexp" = no; then
9119   for ac_lib in m; do
9120     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9121     cat >conftest.$ac_ext <<_ACEOF
9122 /* confdefs.h.  */
9123 _ACEOF
9124 cat confdefs.h >>conftest.$ac_ext
9125 cat >>conftest.$ac_ext <<_ACEOF
9126 /* end confdefs.h.  */
9127
9128 /* Override any gcc2 internal prototype to avoid an error.  */
9129 #ifdef __cplusplus
9130 extern "C"
9131 #endif
9132 /* We use char because int might match the return type of a gcc2
9133    builtin and then its argument prototype would still apply.  */
9134 char ldexp ();
9135 int
9136 main ()
9137 {
9138 ldexp ();
9139   ;
9140   return 0;
9141 }
9142 _ACEOF
9143 rm -f conftest.$ac_objext conftest$ac_exeext
9144 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9145   (eval $ac_link) 2>conftest.er1
9146   ac_status=$?
9147   grep -v '^ *+' conftest.er1 >conftest.err
9148   rm -f conftest.er1
9149   cat conftest.err >&5
9150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9151   (exit $ac_status); } &&
9152          { ac_try='test -z "$ac_c_werror_flag"
9153                          || test ! -s conftest.err'
9154   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9155   (eval $ac_try) 2>&5
9156   ac_status=$?
9157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9158   (exit $ac_status); }; } &&
9159          { ac_try='test -s conftest$ac_exeext'
9160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9161   (eval $ac_try) 2>&5
9162   ac_status=$?
9163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9164   (exit $ac_status); }; }; then
9165   ac_cv_search_ldexp="-l$ac_lib"
9166 break
9167 else
9168   echo "$as_me: failed program was:" >&5
9169 sed 's/^/| /' conftest.$ac_ext >&5
9170
9171 fi
9172 rm -f conftest.err conftest.$ac_objext \
9173       conftest$ac_exeext conftest.$ac_ext
9174   done
9175 fi
9176 LIBS=$ac_func_search_save_LIBS
9177 fi
9178 echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
9179 echo "${ECHO_T}$ac_cv_search_ldexp" >&6
9180 if test "$ac_cv_search_ldexp" != no; then
9181   test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS"
9182
9183 fi
9184
9185 LDEXP_LIB="$LIBS"
9186 LIBS="$save_LIBS"
9187
9188
9189 # Use <inttypes.h> only if it exists,
9190 # doesn't clash with <sys/types.h>, and declares intmax_t.
9191 echo "$as_me:$LINENO: checking for inttypes.h" >&5
9192 echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
9193 if test "${gcc_cv_header_inttypes_h+set}" = set; then
9194   echo $ECHO_N "(cached) $ECHO_C" >&6
9195 else
9196   cat >conftest.$ac_ext <<_ACEOF
9197 /* confdefs.h.  */
9198 _ACEOF
9199 cat confdefs.h >>conftest.$ac_ext
9200 cat >>conftest.$ac_ext <<_ACEOF
9201 /* end confdefs.h.  */
9202 #include <sys/types.h>
9203 #include <inttypes.h>
9204 int
9205 main ()
9206 {
9207 intmax_t i = -1;
9208   ;
9209   return 0;
9210 }
9211 _ACEOF
9212 rm -f conftest.$ac_objext
9213 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9214   (eval $ac_compile) 2>conftest.er1
9215   ac_status=$?
9216   grep -v '^ *+' conftest.er1 >conftest.err
9217   rm -f conftest.er1
9218   cat conftest.err >&5
9219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9220   (exit $ac_status); } &&
9221          { ac_try='test -z "$ac_c_werror_flag"
9222                          || test ! -s conftest.err'
9223   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9224   (eval $ac_try) 2>&5
9225   ac_status=$?
9226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9227   (exit $ac_status); }; } &&
9228          { ac_try='test -s conftest.$ac_objext'
9229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9230   (eval $ac_try) 2>&5
9231   ac_status=$?
9232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9233   (exit $ac_status); }; }; then
9234   gcc_cv_header_inttypes_h=yes
9235 else
9236   echo "$as_me: failed program was:" >&5
9237 sed 's/^/| /' conftest.$ac_ext >&5
9238
9239 gcc_cv_header_inttypes_h=no
9240 fi
9241 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9242 fi
9243
9244 echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
9245 echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6
9246 if test $gcc_cv_header_inttypes_h = yes; then
9247
9248 cat >>confdefs.h <<\_ACEOF
9249 #define HAVE_INTTYPES_H 1
9250 _ACEOF
9251
9252 fi
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291 for ac_func in times clock kill getrlimit setrlimit atoll atoq \
9292         sysconf strsignal getrusage nl_langinfo scandir alphasort \
9293         gettimeofday mbstowcs wcswidth mmap mincore setlocale \
9294         clearerr_unlocked feof_unlocked   ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked   fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked   fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked   putchar_unlocked putc_unlocked
9295 do
9296 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9297 echo "$as_me:$LINENO: checking for $ac_func" >&5
9298 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9299 if eval "test \"\${$as_ac_var+set}\" = set"; then
9300   echo $ECHO_N "(cached) $ECHO_C" >&6
9301 else
9302   cat >conftest.$ac_ext <<_ACEOF
9303 /* confdefs.h.  */
9304 _ACEOF
9305 cat confdefs.h >>conftest.$ac_ext
9306 cat >>conftest.$ac_ext <<_ACEOF
9307 /* end confdefs.h.  */
9308 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9309    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9310 #define $ac_func innocuous_$ac_func
9311
9312 /* System header to define __stub macros and hopefully few prototypes,
9313     which can conflict with char $ac_func (); below.
9314     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9315     <limits.h> exists even on freestanding compilers.  */
9316
9317 #ifdef __STDC__
9318 # include <limits.h>
9319 #else
9320 # include <assert.h>
9321 #endif
9322
9323 #undef $ac_func
9324
9325 /* Override any gcc2 internal prototype to avoid an error.  */
9326 #ifdef __cplusplus
9327 extern "C"
9328 {
9329 #endif
9330 /* We use char because int might match the return type of a gcc2
9331    builtin and then its argument prototype would still apply.  */
9332 char $ac_func ();
9333 /* The GNU C library defines this for functions which it implements
9334     to always fail with ENOSYS.  Some functions are actually named
9335     something starting with __ and the normal name is an alias.  */
9336 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9337 choke me
9338 #else
9339 char (*f) () = $ac_func;
9340 #endif
9341 #ifdef __cplusplus
9342 }
9343 #endif
9344
9345 int
9346 main ()
9347 {
9348 return f != $ac_func;
9349   ;
9350   return 0;
9351 }
9352 _ACEOF
9353 rm -f conftest.$ac_objext conftest$ac_exeext
9354 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9355   (eval $ac_link) 2>conftest.er1
9356   ac_status=$?
9357   grep -v '^ *+' conftest.er1 >conftest.err
9358   rm -f conftest.er1
9359   cat conftest.err >&5
9360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9361   (exit $ac_status); } &&
9362          { ac_try='test -z "$ac_c_werror_flag"
9363                          || test ! -s conftest.err'
9364   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9365   (eval $ac_try) 2>&5
9366   ac_status=$?
9367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9368   (exit $ac_status); }; } &&
9369          { ac_try='test -s conftest$ac_exeext'
9370   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9371   (eval $ac_try) 2>&5
9372   ac_status=$?
9373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9374   (exit $ac_status); }; }; then
9375   eval "$as_ac_var=yes"
9376 else
9377   echo "$as_me: failed program was:" >&5
9378 sed 's/^/| /' conftest.$ac_ext >&5
9379
9380 eval "$as_ac_var=no"
9381 fi
9382 rm -f conftest.err conftest.$ac_objext \
9383       conftest$ac_exeext conftest.$ac_ext
9384 fi
9385 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9386 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9387 if test `eval echo '${'$as_ac_var'}'` = yes; then
9388   cat >>confdefs.h <<_ACEOF
9389 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9390 _ACEOF
9391
9392 fi
9393 done
9394
9395
9396 if test x$ac_cv_func_mbstowcs = xyes; then
9397   echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
9398 echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6
9399 if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
9400   echo $ECHO_N "(cached) $ECHO_C" >&6
9401 else
9402       if test "$cross_compiling" = yes; then
9403   gcc_cv_func_mbstowcs_works=yes
9404 else
9405   cat >conftest.$ac_ext <<_ACEOF
9406 /* confdefs.h.  */
9407 _ACEOF
9408 cat confdefs.h >>conftest.$ac_ext
9409 cat >>conftest.$ac_ext <<_ACEOF
9410 /* end confdefs.h.  */
9411 #include <stdlib.h>
9412 int main()
9413 {
9414   mbstowcs(0, "", 0);
9415   return 0;
9416 }
9417 _ACEOF
9418 rm -f conftest$ac_exeext
9419 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9420   (eval $ac_link) 2>&5
9421   ac_status=$?
9422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9423   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9425   (eval $ac_try) 2>&5
9426   ac_status=$?
9427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9428   (exit $ac_status); }; }; then
9429   gcc_cv_func_mbstowcs_works=yes
9430 else
9431   echo "$as_me: program exited with status $ac_status" >&5
9432 echo "$as_me: failed program was:" >&5
9433 sed 's/^/| /' conftest.$ac_ext >&5
9434
9435 ( exit $ac_status )
9436 gcc_cv_func_mbstowcs_works=no
9437 fi
9438 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9439 fi
9440 fi
9441 echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
9442 echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6
9443   if test x$gcc_cv_func_mbstowcs_works = xyes; then
9444
9445 cat >>confdefs.h <<\_ACEOF
9446 #define HAVE_WORKING_MBSTOWCS 1
9447 _ACEOF
9448
9449   fi
9450 fi
9451
9452 echo "$as_me:$LINENO: checking for ssize_t" >&5
9453 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
9454 if test "${ac_cv_type_ssize_t+set}" = set; then
9455   echo $ECHO_N "(cached) $ECHO_C" >&6
9456 else
9457   cat >conftest.$ac_ext <<_ACEOF
9458 /* confdefs.h.  */
9459 _ACEOF
9460 cat confdefs.h >>conftest.$ac_ext
9461 cat >>conftest.$ac_ext <<_ACEOF
9462 /* end confdefs.h.  */
9463 $ac_includes_default
9464 int
9465 main ()
9466 {
9467 if ((ssize_t *) 0)
9468   return 0;
9469 if (sizeof (ssize_t))
9470   return 0;
9471   ;
9472   return 0;
9473 }
9474 _ACEOF
9475 rm -f conftest.$ac_objext
9476 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9477   (eval $ac_compile) 2>conftest.er1
9478   ac_status=$?
9479   grep -v '^ *+' conftest.er1 >conftest.err
9480   rm -f conftest.er1
9481   cat conftest.err >&5
9482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9483   (exit $ac_status); } &&
9484          { ac_try='test -z "$ac_c_werror_flag"
9485                          || test ! -s conftest.err'
9486   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9487   (eval $ac_try) 2>&5
9488   ac_status=$?
9489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9490   (exit $ac_status); }; } &&
9491          { ac_try='test -s conftest.$ac_objext'
9492   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9493   (eval $ac_try) 2>&5
9494   ac_status=$?
9495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9496   (exit $ac_status); }; }; then
9497   ac_cv_type_ssize_t=yes
9498 else
9499   echo "$as_me: failed program was:" >&5
9500 sed 's/^/| /' conftest.$ac_ext >&5
9501
9502 ac_cv_type_ssize_t=no
9503 fi
9504 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9505 fi
9506 echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
9507 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
9508 if test $ac_cv_type_ssize_t = yes; then
9509   :
9510 else
9511
9512 cat >>confdefs.h <<_ACEOF
9513 #define ssize_t int
9514 _ACEOF
9515
9516 fi
9517
9518
9519 # Try to determine the array type of the second argument of getgroups
9520 # for the target system (int or gid_t).
9521 echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
9522 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
9523 if test "${ac_cv_type_uid_t+set}" = set; then
9524   echo $ECHO_N "(cached) $ECHO_C" >&6
9525 else
9526   cat >conftest.$ac_ext <<_ACEOF
9527 /* confdefs.h.  */
9528 _ACEOF
9529 cat confdefs.h >>conftest.$ac_ext
9530 cat >>conftest.$ac_ext <<_ACEOF
9531 /* end confdefs.h.  */
9532 #include <sys/types.h>
9533
9534 _ACEOF
9535 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9536   $EGREP "uid_t" >/dev/null 2>&1; then
9537   ac_cv_type_uid_t=yes
9538 else
9539   ac_cv_type_uid_t=no
9540 fi
9541 rm -f conftest*
9542
9543 fi
9544 echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
9545 echo "${ECHO_T}$ac_cv_type_uid_t" >&6
9546 if test $ac_cv_type_uid_t = no; then
9547
9548 cat >>confdefs.h <<\_ACEOF
9549 #define uid_t int
9550 _ACEOF
9551
9552
9553 cat >>confdefs.h <<\_ACEOF
9554 #define gid_t int
9555 _ACEOF
9556
9557 fi
9558
9559 echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
9560 echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
9561 if test "${ac_cv_type_getgroups+set}" = set; then
9562   echo $ECHO_N "(cached) $ECHO_C" >&6
9563 else
9564   if test "$cross_compiling" = yes; then
9565   ac_cv_type_getgroups=cross
9566 else
9567   cat >conftest.$ac_ext <<_ACEOF
9568 /* confdefs.h.  */
9569 _ACEOF
9570 cat confdefs.h >>conftest.$ac_ext
9571 cat >>conftest.$ac_ext <<_ACEOF
9572 /* end confdefs.h.  */
9573 /* Thanks to Mike Rendell for this test.  */
9574 #include <sys/types.h>
9575 #define NGID 256
9576 #undef MAX
9577 #define MAX(x, y) ((x) > (y) ? (x) : (y))
9578
9579 int
9580 main ()
9581 {
9582   gid_t gidset[NGID];
9583   int i, n;
9584   union { gid_t gval; long lval; }  val;
9585
9586   val.lval = -1;
9587   for (i = 0; i < NGID; i++)
9588     gidset[i] = val.gval;
9589   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
9590                  gidset);
9591   /* Exit non-zero if getgroups seems to require an array of ints.  This
9592      happens when gid_t is short but getgroups modifies an array of ints.  */
9593   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
9594 }
9595 _ACEOF
9596 rm -f conftest$ac_exeext
9597 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9598   (eval $ac_link) 2>&5
9599   ac_status=$?
9600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9601   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9602   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9603   (eval $ac_try) 2>&5
9604   ac_status=$?
9605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9606   (exit $ac_status); }; }; then
9607   ac_cv_type_getgroups=gid_t
9608 else
9609   echo "$as_me: program exited with status $ac_status" >&5
9610 echo "$as_me: failed program was:" >&5
9611 sed 's/^/| /' conftest.$ac_ext >&5
9612
9613 ( exit $ac_status )
9614 ac_cv_type_getgroups=int
9615 fi
9616 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9617 fi
9618 if test $ac_cv_type_getgroups = cross; then
9619         cat >conftest.$ac_ext <<_ACEOF
9620 /* confdefs.h.  */
9621 _ACEOF
9622 cat confdefs.h >>conftest.$ac_ext
9623 cat >>conftest.$ac_ext <<_ACEOF
9624 /* end confdefs.h.  */
9625 #include <unistd.h>
9626
9627 _ACEOF
9628 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9629   $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
9630   ac_cv_type_getgroups=gid_t
9631 else
9632   ac_cv_type_getgroups=int
9633 fi
9634 rm -f conftest*
9635
9636 fi
9637 fi
9638 echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
9639 echo "${ECHO_T}$ac_cv_type_getgroups" >&6
9640
9641 cat >>confdefs.h <<_ACEOF
9642 #define GETGROUPS_T $ac_cv_type_getgroups
9643 _ACEOF
9644
9645
9646 if test "${target}" = "${build}"; then
9647   TARGET_GETGROUPS_T=$ac_cv_type_getgroups
9648 else
9649   case "${target}" in
9650         # This condition may need some tweaking.  It should include all
9651         # targets where the array type of the second argument of getgroups
9652         # is int and the type of gid_t is not equivalent to int.
9653         *-*-sunos* | *-*-ultrix*)
9654                 TARGET_GETGROUPS_T=int
9655                 ;;
9656         *)
9657                 TARGET_GETGROUPS_T=gid_t
9658                 ;;
9659   esac
9660 fi
9661
9662
9663
9664 echo "$as_me:$LINENO: checking for sys/mman.h" >&5
9665 echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
9666 if test "${ac_cv_header_sys_mman_h+set}" = set; then
9667   echo $ECHO_N "(cached) $ECHO_C" >&6
9668 else
9669   cat >conftest.$ac_ext <<_ACEOF
9670 /* confdefs.h.  */
9671 _ACEOF
9672 cat confdefs.h >>conftest.$ac_ext
9673 cat >>conftest.$ac_ext <<_ACEOF
9674 /* end confdefs.h.  */
9675 #include <sys/mman.h>
9676 _ACEOF
9677 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9678   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9679   ac_status=$?
9680   grep -v '^ *+' conftest.er1 >conftest.err
9681   rm -f conftest.er1
9682   cat conftest.err >&5
9683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9684   (exit $ac_status); } >/dev/null; then
9685   if test -s conftest.err; then
9686     ac_cpp_err=$ac_c_preproc_warn_flag
9687     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9688   else
9689     ac_cpp_err=
9690   fi
9691 else
9692   ac_cpp_err=yes
9693 fi
9694 if test -z "$ac_cpp_err"; then
9695   ac_cv_header_sys_mman_h=yes
9696 else
9697   echo "$as_me: failed program was:" >&5
9698 sed 's/^/| /' conftest.$ac_ext >&5
9699
9700   ac_cv_header_sys_mman_h=no
9701 fi
9702 rm -f conftest.err conftest.$ac_ext
9703 fi
9704 echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
9705 echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
9706 if test $ac_cv_header_sys_mman_h = yes; then
9707   gcc_header_sys_mman_h=yes
9708 else
9709   gcc_header_sys_mman_h=no
9710 fi
9711
9712 echo "$as_me:$LINENO: checking for mmap" >&5
9713 echo $ECHO_N "checking for mmap... $ECHO_C" >&6
9714 if test "${ac_cv_func_mmap+set}" = set; then
9715   echo $ECHO_N "(cached) $ECHO_C" >&6
9716 else
9717   cat >conftest.$ac_ext <<_ACEOF
9718 /* confdefs.h.  */
9719 _ACEOF
9720 cat confdefs.h >>conftest.$ac_ext
9721 cat >>conftest.$ac_ext <<_ACEOF
9722 /* end confdefs.h.  */
9723 /* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
9724    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9725 #define mmap innocuous_mmap
9726
9727 /* System header to define __stub macros and hopefully few prototypes,
9728     which can conflict with char mmap (); below.
9729     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9730     <limits.h> exists even on freestanding compilers.  */
9731
9732 #ifdef __STDC__
9733 # include <limits.h>
9734 #else
9735 # include <assert.h>
9736 #endif
9737
9738 #undef mmap
9739
9740 /* Override any gcc2 internal prototype to avoid an error.  */
9741 #ifdef __cplusplus
9742 extern "C"
9743 {
9744 #endif
9745 /* We use char because int might match the return type of a gcc2
9746    builtin and then its argument prototype would still apply.  */
9747 char mmap ();
9748 /* The GNU C library defines this for functions which it implements
9749     to always fail with ENOSYS.  Some functions are actually named
9750     something starting with __ and the normal name is an alias.  */
9751 #if defined (__stub_mmap) || defined (__stub___mmap)
9752 choke me
9753 #else
9754 char (*f) () = mmap;
9755 #endif
9756 #ifdef __cplusplus
9757 }
9758 #endif
9759
9760 int
9761 main ()
9762 {
9763 return f != mmap;
9764   ;
9765   return 0;
9766 }
9767 _ACEOF
9768 rm -f conftest.$ac_objext conftest$ac_exeext
9769 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9770   (eval $ac_link) 2>conftest.er1
9771   ac_status=$?
9772   grep -v '^ *+' conftest.er1 >conftest.err
9773   rm -f conftest.er1
9774   cat conftest.err >&5
9775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9776   (exit $ac_status); } &&
9777          { ac_try='test -z "$ac_c_werror_flag"
9778                          || test ! -s conftest.err'
9779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9780   (eval $ac_try) 2>&5
9781   ac_status=$?
9782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9783   (exit $ac_status); }; } &&
9784          { ac_try='test -s conftest$ac_exeext'
9785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9786   (eval $ac_try) 2>&5
9787   ac_status=$?
9788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9789   (exit $ac_status); }; }; then
9790   ac_cv_func_mmap=yes
9791 else
9792   echo "$as_me: failed program was:" >&5
9793 sed 's/^/| /' conftest.$ac_ext >&5
9794
9795 ac_cv_func_mmap=no
9796 fi
9797 rm -f conftest.err conftest.$ac_objext \
9798       conftest$ac_exeext conftest.$ac_ext
9799 fi
9800 echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
9801 echo "${ECHO_T}$ac_cv_func_mmap" >&6
9802 if test $ac_cv_func_mmap = yes; then
9803   gcc_func_mmap=yes
9804 else
9805   gcc_func_mmap=no
9806 fi
9807
9808 if test "$gcc_header_sys_mman_h" != yes \
9809  || test "$gcc_func_mmap" != yes; then
9810    gcc_cv_func_mmap_file=no
9811    gcc_cv_func_mmap_dev_zero=no
9812    gcc_cv_func_mmap_anon=no
9813 else
9814    echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
9815 echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
9816 if test "${gcc_cv_func_mmap_file+set}" = set; then
9817   echo $ECHO_N "(cached) $ECHO_C" >&6
9818 else
9819   # Add a system to this blacklist if
9820    # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
9821    # memory area containing the same data that you'd get if you applied
9822    # read() to the same fd.  The only system known to have a problem here
9823    # is VMS, where text files have record structure.
9824    case "$host_os" in
9825      vms* | ultrix*)
9826         gcc_cv_func_mmap_file=no ;;
9827      *)
9828         gcc_cv_func_mmap_file=yes;;
9829    esac
9830 fi
9831 echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
9832 echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
9833    echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
9834 echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
9835 if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
9836   echo $ECHO_N "(cached) $ECHO_C" >&6
9837 else
9838   # Add a system to this blacklist if it has mmap() but /dev/zero
9839    # does not exist, or if mmapping /dev/zero does not give anonymous
9840    # zeroed pages with both the following properties:
9841    # 1. If you map N consecutive pages in with one call, and then
9842    #    unmap any subset of those pages, the pages that were not
9843    #    explicitly unmapped remain accessible.
9844    # 2. If you map two adjacent blocks of memory and then unmap them
9845    #    both at once, they must both go away.
9846    # Systems known to be in this category are Windows (all variants),
9847    # VMS, and Darwin.
9848    case "$host_os" in
9849      vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
9850         gcc_cv_func_mmap_dev_zero=no ;;
9851      *)
9852         gcc_cv_func_mmap_dev_zero=yes;;
9853    esac
9854 fi
9855 echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
9856 echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
9857
9858    # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
9859    echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
9860 echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
9861 if test "${gcc_cv_decl_map_anon+set}" = set; then
9862   echo $ECHO_N "(cached) $ECHO_C" >&6
9863 else
9864   cat >conftest.$ac_ext <<_ACEOF
9865 /* confdefs.h.  */
9866 _ACEOF
9867 cat confdefs.h >>conftest.$ac_ext
9868 cat >>conftest.$ac_ext <<_ACEOF
9869 /* end confdefs.h.  */
9870 #include <sys/types.h>
9871 #include <sys/mman.h>
9872 #include <unistd.h>
9873
9874 #ifndef MAP_ANONYMOUS
9875 #define MAP_ANONYMOUS MAP_ANON
9876 #endif
9877
9878 int
9879 main ()
9880 {
9881 int n = MAP_ANONYMOUS;
9882   ;
9883   return 0;
9884 }
9885 _ACEOF
9886 rm -f conftest.$ac_objext
9887 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9888   (eval $ac_compile) 2>conftest.er1
9889   ac_status=$?
9890   grep -v '^ *+' conftest.er1 >conftest.err
9891   rm -f conftest.er1
9892   cat conftest.err >&5
9893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9894   (exit $ac_status); } &&
9895          { ac_try='test -z "$ac_c_werror_flag"
9896                          || test ! -s conftest.err'
9897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9898   (eval $ac_try) 2>&5
9899   ac_status=$?
9900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9901   (exit $ac_status); }; } &&
9902          { ac_try='test -s conftest.$ac_objext'
9903   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9904   (eval $ac_try) 2>&5
9905   ac_status=$?
9906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9907   (exit $ac_status); }; }; then
9908   gcc_cv_decl_map_anon=yes
9909 else
9910   echo "$as_me: failed program was:" >&5
9911 sed 's/^/| /' conftest.$ac_ext >&5
9912
9913 gcc_cv_decl_map_anon=no
9914 fi
9915 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9916 fi
9917 echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
9918 echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
9919
9920    if test $gcc_cv_decl_map_anon = no; then
9921      gcc_cv_func_mmap_anon=no
9922    else
9923      echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
9924 echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
9925 if test "${gcc_cv_func_mmap_anon+set}" = set; then
9926   echo $ECHO_N "(cached) $ECHO_C" >&6
9927 else
9928   # Add a system to this blacklist if it has mmap() and MAP_ANON or
9929    # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
9930    # doesn't give anonymous zeroed pages with the same properties listed
9931    # above for use of /dev/zero.
9932    # Systems known to be in this category are Windows, VMS, and SCO Unix.
9933    case "$host_os" in
9934      vms* | cygwin* | pe | mingw* | sco* | udk* )
9935         gcc_cv_func_mmap_anon=no ;;
9936      *)
9937         gcc_cv_func_mmap_anon=yes;;
9938    esac
9939 fi
9940 echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
9941 echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
9942    fi
9943 fi
9944
9945 if test $gcc_cv_func_mmap_file = yes; then
9946
9947 cat >>confdefs.h <<\_ACEOF
9948 #define HAVE_MMAP_FILE 1
9949 _ACEOF
9950
9951 fi
9952 if test $gcc_cv_func_mmap_dev_zero = yes; then
9953
9954 cat >>confdefs.h <<\_ACEOF
9955 #define HAVE_MMAP_DEV_ZERO 1
9956 _ACEOF
9957
9958 fi
9959 if test $gcc_cv_func_mmap_anon = yes; then
9960
9961 cat >>confdefs.h <<\_ACEOF
9962 #define HAVE_MMAP_ANON 1
9963 _ACEOF
9964
9965 fi
9966
9967
9968 case "${host}" in
9969 *-*-*vms*)
9970   # Under VMS, vfork works very differently than on Unix. The standard test
9971   # won't work, and it isn't easily adaptable. It makes more sense to
9972   # just force it.
9973   ac_cv_func_vfork_works=yes
9974   ;;
9975 esac
9976 echo "$as_me:$LINENO: checking for pid_t" >&5
9977 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
9978 if test "${ac_cv_type_pid_t+set}" = set; then
9979   echo $ECHO_N "(cached) $ECHO_C" >&6
9980 else
9981   cat >conftest.$ac_ext <<_ACEOF
9982 /* confdefs.h.  */
9983 _ACEOF
9984 cat confdefs.h >>conftest.$ac_ext
9985 cat >>conftest.$ac_ext <<_ACEOF
9986 /* end confdefs.h.  */
9987 $ac_includes_default
9988 int
9989 main ()
9990 {
9991 if ((pid_t *) 0)
9992   return 0;
9993 if (sizeof (pid_t))
9994   return 0;
9995   ;
9996   return 0;
9997 }
9998 _ACEOF
9999 rm -f conftest.$ac_objext
10000 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10001   (eval $ac_compile) 2>conftest.er1
10002   ac_status=$?
10003   grep -v '^ *+' conftest.er1 >conftest.err
10004   rm -f conftest.er1
10005   cat conftest.err >&5
10006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10007   (exit $ac_status); } &&
10008          { ac_try='test -z "$ac_c_werror_flag"
10009                          || test ! -s conftest.err'
10010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10011   (eval $ac_try) 2>&5
10012   ac_status=$?
10013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10014   (exit $ac_status); }; } &&
10015          { ac_try='test -s conftest.$ac_objext'
10016   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10017   (eval $ac_try) 2>&5
10018   ac_status=$?
10019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10020   (exit $ac_status); }; }; then
10021   ac_cv_type_pid_t=yes
10022 else
10023   echo "$as_me: failed program was:" >&5
10024 sed 's/^/| /' conftest.$ac_ext >&5
10025
10026 ac_cv_type_pid_t=no
10027 fi
10028 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10029 fi
10030 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10031 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
10032 if test $ac_cv_type_pid_t = yes; then
10033   :
10034 else
10035
10036 cat >>confdefs.h <<_ACEOF
10037 #define pid_t int
10038 _ACEOF
10039
10040 fi
10041
10042
10043
10044 for ac_header in unistd.h vfork.h
10045 do
10046 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10047 echo "$as_me:$LINENO: checking for $ac_header" >&5
10048 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10049 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10050   echo $ECHO_N "(cached) $ECHO_C" >&6
10051 else
10052   cat >conftest.$ac_ext <<_ACEOF
10053 /* confdefs.h.  */
10054 _ACEOF
10055 cat confdefs.h >>conftest.$ac_ext
10056 cat >>conftest.$ac_ext <<_ACEOF
10057 /* end confdefs.h.  */
10058 #include <$ac_header>
10059 _ACEOF
10060 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10061   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10062   ac_status=$?
10063   grep -v '^ *+' conftest.er1 >conftest.err
10064   rm -f conftest.er1
10065   cat conftest.err >&5
10066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10067   (exit $ac_status); } >/dev/null; then
10068   if test -s conftest.err; then
10069     ac_cpp_err=$ac_c_preproc_warn_flag
10070     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10071   else
10072     ac_cpp_err=
10073   fi
10074 else
10075   ac_cpp_err=yes
10076 fi
10077 if test -z "$ac_cpp_err"; then
10078   eval "$as_ac_Header=yes"
10079 else
10080   echo "$as_me: failed program was:" >&5
10081 sed 's/^/| /' conftest.$ac_ext >&5
10082
10083   eval "$as_ac_Header=no"
10084 fi
10085 rm -f conftest.err conftest.$ac_ext
10086 fi
10087 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10088 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10089 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10090   cat >>confdefs.h <<_ACEOF
10091 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10092 _ACEOF
10093
10094 fi
10095 done
10096
10097
10098
10099 for ac_func in fork vfork
10100 do
10101 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10102 echo "$as_me:$LINENO: checking for $ac_func" >&5
10103 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10104 if eval "test \"\${$as_ac_var+set}\" = set"; then
10105   echo $ECHO_N "(cached) $ECHO_C" >&6
10106 else
10107   cat >conftest.$ac_ext <<_ACEOF
10108 /* confdefs.h.  */
10109 _ACEOF
10110 cat confdefs.h >>conftest.$ac_ext
10111 cat >>conftest.$ac_ext <<_ACEOF
10112 /* end confdefs.h.  */
10113 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10114    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10115 #define $ac_func innocuous_$ac_func
10116
10117 /* System header to define __stub macros and hopefully few prototypes,
10118     which can conflict with char $ac_func (); below.
10119     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10120     <limits.h> exists even on freestanding compilers.  */
10121
10122 #ifdef __STDC__
10123 # include <limits.h>
10124 #else
10125 # include <assert.h>
10126 #endif
10127
10128 #undef $ac_func
10129
10130 /* Override any gcc2 internal prototype to avoid an error.  */
10131 #ifdef __cplusplus
10132 extern "C"
10133 {
10134 #endif
10135 /* We use char because int might match the return type of a gcc2
10136    builtin and then its argument prototype would still apply.  */
10137 char $ac_func ();
10138 /* The GNU C library defines this for functions which it implements
10139     to always fail with ENOSYS.  Some functions are actually named
10140     something starting with __ and the normal name is an alias.  */
10141 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10142 choke me
10143 #else
10144 char (*f) () = $ac_func;
10145 #endif
10146 #ifdef __cplusplus
10147 }
10148 #endif
10149
10150 int
10151 main ()
10152 {
10153 return f != $ac_func;
10154   ;
10155   return 0;
10156 }
10157 _ACEOF
10158 rm -f conftest.$ac_objext conftest$ac_exeext
10159 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10160   (eval $ac_link) 2>conftest.er1
10161   ac_status=$?
10162   grep -v '^ *+' conftest.er1 >conftest.err
10163   rm -f conftest.er1
10164   cat conftest.err >&5
10165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10166   (exit $ac_status); } &&
10167          { ac_try='test -z "$ac_c_werror_flag"
10168                          || test ! -s conftest.err'
10169   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10170   (eval $ac_try) 2>&5
10171   ac_status=$?
10172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10173   (exit $ac_status); }; } &&
10174          { ac_try='test -s conftest$ac_exeext'
10175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10176   (eval $ac_try) 2>&5
10177   ac_status=$?
10178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10179   (exit $ac_status); }; }; then
10180   eval "$as_ac_var=yes"
10181 else
10182   echo "$as_me: failed program was:" >&5
10183 sed 's/^/| /' conftest.$ac_ext >&5
10184
10185 eval "$as_ac_var=no"
10186 fi
10187 rm -f conftest.err conftest.$ac_objext \
10188       conftest$ac_exeext conftest.$ac_ext
10189 fi
10190 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10191 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10192 if test `eval echo '${'$as_ac_var'}'` = yes; then
10193   cat >>confdefs.h <<_ACEOF
10194 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10195 _ACEOF
10196
10197 fi
10198 done
10199
10200 if test "x$ac_cv_func_fork" = xyes; then
10201   echo "$as_me:$LINENO: checking for working fork" >&5
10202 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
10203 if test "${ac_cv_func_fork_works+set}" = set; then
10204   echo $ECHO_N "(cached) $ECHO_C" >&6
10205 else
10206   if test "$cross_compiling" = yes; then
10207   ac_cv_func_fork_works=cross
10208 else
10209   cat >conftest.$ac_ext <<_ACEOF
10210 /* By Ruediger Kuhlmann. */
10211       #include <sys/types.h>
10212       #if HAVE_UNISTD_H
10213       # include <unistd.h>
10214       #endif
10215       /* Some systems only have a dummy stub for fork() */
10216       int main ()
10217       {
10218         if (fork() < 0)
10219           exit (1);
10220         exit (0);
10221       }
10222 _ACEOF
10223 rm -f conftest$ac_exeext
10224 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10225   (eval $ac_link) 2>&5
10226   ac_status=$?
10227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10228   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10230   (eval $ac_try) 2>&5
10231   ac_status=$?
10232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10233   (exit $ac_status); }; }; then
10234   ac_cv_func_fork_works=yes
10235 else
10236   echo "$as_me: program exited with status $ac_status" >&5
10237 echo "$as_me: failed program was:" >&5
10238 sed 's/^/| /' conftest.$ac_ext >&5
10239
10240 ( exit $ac_status )
10241 ac_cv_func_fork_works=no
10242 fi
10243 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10244 fi
10245 fi
10246 echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
10247 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
10248
10249 else
10250   ac_cv_func_fork_works=$ac_cv_func_fork
10251 fi
10252 if test "x$ac_cv_func_fork_works" = xcross; then
10253   case $host in
10254     *-*-amigaos* | *-*-msdosdjgpp*)
10255       # Override, as these systems have only a dummy fork() stub
10256       ac_cv_func_fork_works=no
10257       ;;
10258     *)
10259       ac_cv_func_fork_works=yes
10260       ;;
10261   esac
10262   { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10263 echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
10264 fi
10265 ac_cv_func_vfork_works=$ac_cv_func_vfork
10266 if test "x$ac_cv_func_vfork" = xyes; then
10267   echo "$as_me:$LINENO: checking for working vfork" >&5
10268 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
10269 if test "${ac_cv_func_vfork_works+set}" = set; then
10270   echo $ECHO_N "(cached) $ECHO_C" >&6
10271 else
10272   if test "$cross_compiling" = yes; then
10273   ac_cv_func_vfork_works=cross
10274 else
10275   cat >conftest.$ac_ext <<_ACEOF
10276 /* confdefs.h.  */
10277 _ACEOF
10278 cat confdefs.h >>conftest.$ac_ext
10279 cat >>conftest.$ac_ext <<_ACEOF
10280 /* end confdefs.h.  */
10281 /* Thanks to Paul Eggert for this test.  */
10282 #include <stdio.h>
10283 #include <stdlib.h>
10284 #include <sys/types.h>
10285 #include <sys/stat.h>
10286 #include <sys/wait.h>
10287 #if HAVE_UNISTD_H
10288 # include <unistd.h>
10289 #endif
10290 #if HAVE_VFORK_H
10291 # include <vfork.h>
10292 #endif
10293 /* On some sparc systems, changes by the child to local and incoming
10294    argument registers are propagated back to the parent.  The compiler
10295    is told about this with #include <vfork.h>, but some compilers
10296    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
10297    static variable whose address is put into a register that is
10298    clobbered by the vfork.  */
10299 static void
10300 #ifdef __cplusplus
10301 sparc_address_test (int arg)
10302 # else
10303 sparc_address_test (arg) int arg;
10304 #endif
10305 {
10306   static pid_t child;
10307   if (!child) {
10308     child = vfork ();
10309     if (child < 0) {
10310       perror ("vfork");
10311       _exit(2);
10312     }
10313     if (!child) {
10314       arg = getpid();
10315       write(-1, "", 0);
10316       _exit (arg);
10317     }
10318   }
10319 }
10320
10321 int
10322 main ()
10323 {
10324   pid_t parent = getpid ();
10325   pid_t child;
10326
10327   sparc_address_test (0);
10328
10329   child = vfork ();
10330
10331   if (child == 0) {
10332     /* Here is another test for sparc vfork register problems.  This
10333        test uses lots of local variables, at least as many local
10334        variables as main has allocated so far including compiler
10335        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
10336        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
10337        reuse the register of parent for one of the local variables,
10338        since it will think that parent can't possibly be used any more
10339        in this routine.  Assigning to the local variable will thus
10340        munge parent in the parent process.  */
10341     pid_t
10342       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10343       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10344     /* Convince the compiler that p..p7 are live; otherwise, it might
10345        use the same hardware register for all 8 local variables.  */
10346     if (p != p1 || p != p2 || p != p3 || p != p4
10347         || p != p5 || p != p6 || p != p7)
10348       _exit(1);
10349
10350     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10351        from child file descriptors.  If the child closes a descriptor
10352        before it execs or exits, this munges the parent's descriptor
10353        as well.  Test for this by closing stdout in the child.  */
10354     _exit(close(fileno(stdout)) != 0);
10355   } else {
10356     int status;
10357     struct stat st;
10358
10359     while (wait(&status) != child)
10360       ;
10361     exit(
10362          /* Was there some problem with vforking?  */
10363          child < 0
10364
10365          /* Did the child fail?  (This shouldn't happen.)  */
10366          || status
10367
10368          /* Did the vfork/compiler bug occur?  */
10369          || parent != getpid()
10370
10371          /* Did the file descriptor bug occur?  */
10372          || fstat(fileno(stdout), &st) != 0
10373          );
10374   }
10375 }
10376 _ACEOF
10377 rm -f conftest$ac_exeext
10378 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10379   (eval $ac_link) 2>&5
10380   ac_status=$?
10381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10382   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10383   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10384   (eval $ac_try) 2>&5
10385   ac_status=$?
10386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10387   (exit $ac_status); }; }; then
10388   ac_cv_func_vfork_works=yes
10389 else
10390   echo "$as_me: program exited with status $ac_status" >&5
10391 echo "$as_me: failed program was:" >&5
10392 sed 's/^/| /' conftest.$ac_ext >&5
10393
10394 ( exit $ac_status )
10395 ac_cv_func_vfork_works=no
10396 fi
10397 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10398 fi
10399 fi
10400 echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
10401 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
10402
10403 fi;
10404 if test "x$ac_cv_func_fork_works" = xcross; then
10405   ac_cv_func_vfork_works=$ac_cv_func_vfork
10406   { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
10407 echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
10408 fi
10409
10410 if test "x$ac_cv_func_vfork_works" = xyes; then
10411
10412 cat >>confdefs.h <<\_ACEOF
10413 #define HAVE_WORKING_VFORK 1
10414 _ACEOF
10415
10416 else
10417
10418 cat >>confdefs.h <<\_ACEOF
10419 #define vfork fork
10420 _ACEOF
10421
10422 fi
10423 if test "x$ac_cv_func_fork_works" = xyes; then
10424
10425 cat >>confdefs.h <<\_ACEOF
10426 #define HAVE_WORKING_FORK 1
10427 _ACEOF
10428
10429 fi
10430
10431
10432
10433       if test "X$prefix" = "XNONE"; then
10434     acl_final_prefix="$ac_default_prefix"
10435   else
10436     acl_final_prefix="$prefix"
10437   fi
10438   if test "X$exec_prefix" = "XNONE"; then
10439     acl_final_exec_prefix='${prefix}'
10440   else
10441     acl_final_exec_prefix="$exec_prefix"
10442   fi
10443   acl_save_prefix="$prefix"
10444   prefix="$acl_final_prefix"
10445   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10446   prefix="$acl_save_prefix"
10447
10448
10449 # Check whether --with-gnu-ld or --without-gnu-ld was given.
10450 if test "${with_gnu_ld+set}" = set; then
10451   withval="$with_gnu_ld"
10452   test "$withval" = no || with_gnu_ld=yes
10453 else
10454   with_gnu_ld=no
10455 fi;
10456 # Prepare PATH_SEPARATOR.
10457 # The user is always right.
10458 if test "${PATH_SEPARATOR+set}" != set; then
10459   echo "#! /bin/sh" >conf$$.sh
10460   echo  "exit 0"   >>conf$$.sh
10461   chmod +x conf$$.sh
10462   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10463     PATH_SEPARATOR=';'
10464   else
10465     PATH_SEPARATOR=:
10466   fi
10467   rm -f conf$$.sh
10468 fi
10469 ac_prog=ld
10470 if test "$GCC" = yes; then
10471   # Check if gcc -print-prog-name=ld gives a path.
10472   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
10473 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
10474   case $host in
10475   *-*-mingw*)
10476     # gcc leaves a trailing carriage return which upsets mingw
10477     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10478   *)
10479     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10480   esac
10481   case $ac_prog in
10482     # Accept absolute paths.
10483     [\\/]* | [A-Za-z]:[\\/]*)
10484       re_direlt='/[^/][^/]*/\.\./'
10485       # Canonicalize the path of ld
10486       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
10487       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10488         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10489       done
10490       test -z "$LD" && LD="$ac_prog"
10491       ;;
10492   "")
10493     # If it fails, then pretend we aren't using GCC.
10494     ac_prog=ld
10495     ;;
10496   *)
10497     # If it is relative, then search for the first ld in PATH.
10498     with_gnu_ld=unknown
10499     ;;
10500   esac
10501 elif test "$with_gnu_ld" = yes; then
10502   echo "$as_me:$LINENO: checking for GNU ld" >&5
10503 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
10504 else
10505   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10506 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
10507 fi
10508 if test "${acl_cv_path_LD+set}" = set; then
10509   echo $ECHO_N "(cached) $ECHO_C" >&6
10510 else
10511   if test -z "$LD"; then
10512   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
10513   for ac_dir in $PATH; do
10514     test -z "$ac_dir" && ac_dir=.
10515     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10516       acl_cv_path_LD="$ac_dir/$ac_prog"
10517       # Check to see if the program is GNU ld.  I'd rather use --version,
10518       # but apparently some GNU ld's only accept -v.
10519       # Break only if it was the GNU/non-GNU ld that we prefer.
10520       if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
10521         test "$with_gnu_ld" != no && break
10522       else
10523         test "$with_gnu_ld" != yes && break
10524       fi
10525     fi
10526   done
10527   IFS="$ac_save_ifs"
10528 else
10529   acl_cv_path_LD="$LD" # Let the user override the test with a path.
10530 fi
10531 fi
10532
10533 LD="$acl_cv_path_LD"
10534 if test -n "$LD"; then
10535   echo "$as_me:$LINENO: result: $LD" >&5
10536 echo "${ECHO_T}$LD" >&6
10537 else
10538   echo "$as_me:$LINENO: result: no" >&5
10539 echo "${ECHO_T}no" >&6
10540 fi
10541 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10542 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10543    { (exit 1); exit 1; }; }
10544 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10545 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
10546 if test "${acl_cv_prog_gnu_ld+set}" = set; then
10547   echo $ECHO_N "(cached) $ECHO_C" >&6
10548 else
10549   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
10550 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
10551   acl_cv_prog_gnu_ld=yes
10552 else
10553   acl_cv_prog_gnu_ld=no
10554 fi
10555 fi
10556 echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
10557 echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
10558 with_gnu_ld=$acl_cv_prog_gnu_ld
10559
10560
10561
10562                                                 echo "$as_me:$LINENO: checking for shared library run path origin" >&5
10563 echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
10564 if test "${acl_cv_rpath+set}" = set; then
10565   echo $ECHO_N "(cached) $ECHO_C" >&6
10566 else
10567
10568     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10569     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10570     . ./conftest.sh
10571     rm -f ./conftest.sh
10572     acl_cv_rpath=done
10573
10574 fi
10575 echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
10576 echo "${ECHO_T}$acl_cv_rpath" >&6
10577   wl="$acl_cv_wl"
10578   libext="$acl_cv_libext"
10579   shlibext="$acl_cv_shlibext"
10580   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10581   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10582   hardcode_direct="$acl_cv_hardcode_direct"
10583   hardcode_minus_L="$acl_cv_hardcode_minus_L"
10584     # Check whether --enable-rpath or --disable-rpath was given.
10585 if test "${enable_rpath+set}" = set; then
10586   enableval="$enable_rpath"
10587   :
10588 else
10589   enable_rpath=yes
10590 fi;
10591
10592
10593
10594
10595
10596
10597
10598     use_additional=yes
10599
10600   acl_save_prefix="$prefix"
10601   prefix="$acl_final_prefix"
10602   acl_save_exec_prefix="$exec_prefix"
10603   exec_prefix="$acl_final_exec_prefix"
10604
10605     eval additional_includedir=\"$includedir\"
10606     eval additional_libdir=\"$libdir\"
10607
10608   exec_prefix="$acl_save_exec_prefix"
10609   prefix="$acl_save_prefix"
10610
10611
10612 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10613 if test "${with_libiconv_prefix+set}" = set; then
10614   withval="$with_libiconv_prefix"
10615
10616     if test "X$withval" = "Xno"; then
10617       use_additional=no
10618     else
10619       if test "X$withval" = "X"; then
10620
10621   acl_save_prefix="$prefix"
10622   prefix="$acl_final_prefix"
10623   acl_save_exec_prefix="$exec_prefix"
10624   exec_prefix="$acl_final_exec_prefix"
10625
10626           eval additional_includedir=\"$includedir\"
10627           eval additional_libdir=\"$libdir\"
10628
10629   exec_prefix="$acl_save_exec_prefix"
10630   prefix="$acl_save_prefix"
10631
10632       else
10633         additional_includedir="$withval/include"
10634         additional_libdir="$withval/lib"
10635       fi
10636     fi
10637
10638 fi;
10639       LIBICONV=
10640   LTLIBICONV=
10641   INCICONV=
10642   rpathdirs=
10643   ltrpathdirs=
10644   names_already_handled=
10645   names_next_round='iconv '
10646   while test -n "$names_next_round"; do
10647     names_this_round="$names_next_round"
10648     names_next_round=
10649     for name in $names_this_round; do
10650       already_handled=
10651       for n in $names_already_handled; do
10652         if test "$n" = "$name"; then
10653           already_handled=yes
10654           break
10655         fi
10656       done
10657       if test -z "$already_handled"; then
10658         names_already_handled="$names_already_handled $name"
10659                         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10660         eval value=\"\$HAVE_LIB$uppername\"
10661         if test -n "$value"; then
10662           if test "$value" = yes; then
10663             eval value=\"\$LIB$uppername\"
10664             test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10665             eval value=\"\$LTLIB$uppername\"
10666             test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10667           else
10668                                     :
10669           fi
10670         else
10671                               found_dir=
10672           found_la=
10673           found_so=
10674           found_a=
10675           if test $use_additional = yes; then
10676             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
10677               found_dir="$additional_libdir"
10678               found_so="$additional_libdir/lib$name.$shlibext"
10679               if test -f "$additional_libdir/lib$name.la"; then
10680                 found_la="$additional_libdir/lib$name.la"
10681               fi
10682             else
10683               if test -f "$additional_libdir/lib$name.$libext"; then
10684                 found_dir="$additional_libdir"
10685                 found_a="$additional_libdir/lib$name.$libext"
10686                 if test -f "$additional_libdir/lib$name.la"; then
10687                   found_la="$additional_libdir/lib$name.la"
10688                 fi
10689               fi
10690             fi
10691           fi
10692           if test "X$found_dir" = "X"; then
10693             for x in $LDFLAGS $LTLIBICONV; do
10694
10695   acl_save_prefix="$prefix"
10696   prefix="$acl_final_prefix"
10697   acl_save_exec_prefix="$exec_prefix"
10698   exec_prefix="$acl_final_exec_prefix"
10699   eval x=\"$x\"
10700   exec_prefix="$acl_save_exec_prefix"
10701   prefix="$acl_save_prefix"
10702
10703               case "$x" in
10704                 -L*)
10705                   dir=`echo "X$x" | sed -e 's/^X-L//'`
10706                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
10707                     found_dir="$dir"
10708                     found_so="$dir/lib$name.$shlibext"
10709                     if test -f "$dir/lib$name.la"; then
10710                       found_la="$dir/lib$name.la"
10711                     fi
10712                   else
10713                     if test -f "$dir/lib$name.$libext"; then
10714                       found_dir="$dir"
10715                       found_a="$dir/lib$name.$libext"
10716                       if test -f "$dir/lib$name.la"; then
10717                         found_la="$dir/lib$name.la"
10718                       fi
10719                     fi
10720                   fi
10721                   ;;
10722               esac
10723               if test "X$found_dir" != "X"; then
10724                 break
10725               fi
10726             done
10727           fi
10728           if test "X$found_dir" != "X"; then
10729                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10730             if test "X$found_so" != "X"; then
10731                                                         if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10732                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10733               else
10734                                                                                 haveit=
10735                 for x in $ltrpathdirs; do
10736                   if test "X$x" = "X$found_dir"; then
10737                     haveit=yes
10738                     break
10739                   fi
10740                 done
10741                 if test -z "$haveit"; then
10742                   ltrpathdirs="$ltrpathdirs $found_dir"
10743                 fi
10744                                 if test "$hardcode_direct" = yes; then
10745                                                       LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10746                 else
10747                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10748                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10749                                                             haveit=
10750                     for x in $rpathdirs; do
10751                       if test "X$x" = "X$found_dir"; then
10752                         haveit=yes
10753                         break
10754                       fi
10755                     done
10756                     if test -z "$haveit"; then
10757                       rpathdirs="$rpathdirs $found_dir"
10758                     fi
10759                   else
10760                                                                                 haveit=
10761                     for x in $LDFLAGS $LIBICONV; do
10762
10763   acl_save_prefix="$prefix"
10764   prefix="$acl_final_prefix"
10765   acl_save_exec_prefix="$exec_prefix"
10766   exec_prefix="$acl_final_exec_prefix"
10767   eval x=\"$x\"
10768   exec_prefix="$acl_save_exec_prefix"
10769   prefix="$acl_save_prefix"
10770
10771                       if test "X$x" = "X-L$found_dir"; then
10772                         haveit=yes
10773                         break
10774                       fi
10775                     done
10776                     if test -z "$haveit"; then
10777                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10778                     fi
10779                     if test "$hardcode_minus_L" != no; then
10780                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10781                     else
10782                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10783                     fi
10784                   fi
10785                 fi
10786               fi
10787             else
10788               if test "X$found_a" != "X"; then
10789                                 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10790               else
10791                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10792               fi
10793             fi
10794                         additional_includedir=
10795             case "$found_dir" in
10796               */lib | */lib/)
10797                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10798                 additional_includedir="$basedir/include"
10799                 ;;
10800             esac
10801             if test "X$additional_includedir" != "X"; then
10802                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
10803                 haveit=
10804                 if test "X$additional_includedir" = "X/usr/local/include"; then
10805                   if test -n "$GCC"; then
10806                     case $host_os in
10807                       linux*) haveit=yes;;
10808                     esac
10809                   fi
10810                 fi
10811                 if test -z "$haveit"; then
10812                   for x in $CPPFLAGS $INCICONV; do
10813
10814   acl_save_prefix="$prefix"
10815   prefix="$acl_final_prefix"
10816   acl_save_exec_prefix="$exec_prefix"
10817   exec_prefix="$acl_final_exec_prefix"
10818   eval x=\"$x\"
10819   exec_prefix="$acl_save_exec_prefix"
10820   prefix="$acl_save_prefix"
10821
10822                     if test "X$x" = "X-I$additional_includedir"; then
10823                       haveit=yes
10824                       break
10825                     fi
10826                   done
10827                   if test -z "$haveit"; then
10828                     if test -d "$additional_includedir"; then
10829                                             INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10830                     fi
10831                   fi
10832                 fi
10833               fi
10834             fi
10835                         if test -n "$found_la"; then
10836                                                         save_libdir="$libdir"
10837               case "$found_la" in
10838                 */* | *\\*) . "$found_la" ;;
10839                 *) . "./$found_la" ;;
10840               esac
10841               libdir="$save_libdir"
10842                             for dep in $dependency_libs; do
10843                 case "$dep" in
10844                   -L*)
10845                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10846                                                                                                                                                                 if test "X$additional_libdir" != "X/usr/lib"; then
10847                       haveit=
10848                       if test "X$additional_libdir" = "X/usr/local/lib"; then
10849                         if test -n "$GCC"; then
10850                           case $host_os in
10851                             linux*) haveit=yes;;
10852                           esac
10853                         fi
10854                       fi
10855                       if test -z "$haveit"; then
10856                         haveit=
10857                         for x in $LDFLAGS $LIBICONV; do
10858
10859   acl_save_prefix="$prefix"
10860   prefix="$acl_final_prefix"
10861   acl_save_exec_prefix="$exec_prefix"
10862   exec_prefix="$acl_final_exec_prefix"
10863   eval x=\"$x\"
10864   exec_prefix="$acl_save_exec_prefix"
10865   prefix="$acl_save_prefix"
10866
10867                           if test "X$x" = "X-L$additional_libdir"; then
10868                             haveit=yes
10869                             break
10870                           fi
10871                         done
10872                         if test -z "$haveit"; then
10873                           if test -d "$additional_libdir"; then
10874                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10875                           fi
10876                         fi
10877                         haveit=
10878                         for x in $LDFLAGS $LTLIBICONV; do
10879
10880   acl_save_prefix="$prefix"
10881   prefix="$acl_final_prefix"
10882   acl_save_exec_prefix="$exec_prefix"
10883   exec_prefix="$acl_final_exec_prefix"
10884   eval x=\"$x\"
10885   exec_prefix="$acl_save_exec_prefix"
10886   prefix="$acl_save_prefix"
10887
10888                           if test "X$x" = "X-L$additional_libdir"; then
10889                             haveit=yes
10890                             break
10891                           fi
10892                         done
10893                         if test -z "$haveit"; then
10894                           if test -d "$additional_libdir"; then
10895                                                         LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10896                           fi
10897                         fi
10898                       fi
10899                     fi
10900                     ;;
10901                   -R*)
10902                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
10903                     if test "$enable_rpath" != no; then
10904                                                                   haveit=
10905                       for x in $rpathdirs; do
10906                         if test "X$x" = "X$dir"; then
10907                           haveit=yes
10908                           break
10909                         fi
10910                       done
10911                       if test -z "$haveit"; then
10912                         rpathdirs="$rpathdirs $dir"
10913                       fi
10914                                                                   haveit=
10915                       for x in $ltrpathdirs; do
10916                         if test "X$x" = "X$dir"; then
10917                           haveit=yes
10918                           break
10919                         fi
10920                       done
10921                       if test -z "$haveit"; then
10922                         ltrpathdirs="$ltrpathdirs $dir"
10923                       fi
10924                     fi
10925                     ;;
10926                   -l*)
10927                                         names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10928                     ;;
10929                   *.la)
10930                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10931                     ;;
10932                   *)
10933                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10934                     LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10935                     ;;
10936                 esac
10937               done
10938             fi
10939           else
10940                                                             LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10941             LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10942           fi
10943         fi
10944       fi
10945     done
10946   done
10947   if test "X$rpathdirs" != "X"; then
10948     if test -n "$hardcode_libdir_separator"; then
10949                         alldirs=
10950       for found_dir in $rpathdirs; do
10951         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10952       done
10953             acl_save_libdir="$libdir"
10954       libdir="$alldirs"
10955       eval flag=\"$hardcode_libdir_flag_spec\"
10956       libdir="$acl_save_libdir"
10957       LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10958     else
10959             for found_dir in $rpathdirs; do
10960         acl_save_libdir="$libdir"
10961         libdir="$found_dir"
10962         eval flag=\"$hardcode_libdir_flag_spec\"
10963         libdir="$acl_save_libdir"
10964         LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10965       done
10966     fi
10967   fi
10968   if test "X$ltrpathdirs" != "X"; then
10969             for found_dir in $ltrpathdirs; do
10970       LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
10971     done
10972   fi
10973
10974
10975
10976
10977
10978
10979
10980           am_save_CPPFLAGS="$CPPFLAGS"
10981
10982   for element in $INCICONV; do
10983     haveit=
10984     for x in $CPPFLAGS; do
10985
10986   acl_save_prefix="$prefix"
10987   prefix="$acl_final_prefix"
10988   acl_save_exec_prefix="$exec_prefix"
10989   exec_prefix="$acl_final_exec_prefix"
10990   eval x=\"$x\"
10991   exec_prefix="$acl_save_exec_prefix"
10992   prefix="$acl_save_prefix"
10993
10994       if test "X$x" = "X$element"; then
10995         haveit=yes
10996         break
10997       fi
10998     done
10999     if test -z "$haveit"; then
11000       CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11001     fi
11002   done
11003
11004
11005   echo "$as_me:$LINENO: checking for iconv" >&5
11006 echo $ECHO_N "checking for iconv... $ECHO_C" >&6
11007 if test "${am_cv_func_iconv+set}" = set; then
11008   echo $ECHO_N "(cached) $ECHO_C" >&6
11009 else
11010
11011     am_cv_func_iconv="no, consider installing GNU libiconv"
11012     am_cv_lib_iconv=no
11013     cat >conftest.$ac_ext <<_ACEOF
11014 /* confdefs.h.  */
11015 _ACEOF
11016 cat confdefs.h >>conftest.$ac_ext
11017 cat >>conftest.$ac_ext <<_ACEOF
11018 /* end confdefs.h.  */
11019 #include <stdlib.h>
11020 #include <iconv.h>
11021 int
11022 main ()
11023 {
11024 iconv_t cd = iconv_open("","");
11025        iconv(cd,NULL,NULL,NULL,NULL);
11026        iconv_close(cd);
11027   ;
11028   return 0;
11029 }
11030 _ACEOF
11031 rm -f conftest.$ac_objext conftest$ac_exeext
11032 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11033   (eval $ac_link) 2>conftest.er1
11034   ac_status=$?
11035   grep -v '^ *+' conftest.er1 >conftest.err
11036   rm -f conftest.er1
11037   cat conftest.err >&5
11038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11039   (exit $ac_status); } &&
11040          { ac_try='test -z "$ac_c_werror_flag"
11041                          || test ! -s conftest.err'
11042   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11043   (eval $ac_try) 2>&5
11044   ac_status=$?
11045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11046   (exit $ac_status); }; } &&
11047          { ac_try='test -s conftest$ac_exeext'
11048   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11049   (eval $ac_try) 2>&5
11050   ac_status=$?
11051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11052   (exit $ac_status); }; }; then
11053   am_cv_func_iconv=yes
11054 else
11055   echo "$as_me: failed program was:" >&5
11056 sed 's/^/| /' conftest.$ac_ext >&5
11057
11058 fi
11059 rm -f conftest.err conftest.$ac_objext \
11060       conftest$ac_exeext conftest.$ac_ext
11061     if test "$am_cv_func_iconv" != yes; then
11062       am_save_LIBS="$LIBS"
11063       LIBS="$LIBS $LIBICONV"
11064       cat >conftest.$ac_ext <<_ACEOF
11065 /* confdefs.h.  */
11066 _ACEOF
11067 cat confdefs.h >>conftest.$ac_ext
11068 cat >>conftest.$ac_ext <<_ACEOF
11069 /* end confdefs.h.  */
11070 #include <stdlib.h>
11071 #include <iconv.h>
11072 int
11073 main ()
11074 {
11075 iconv_t cd = iconv_open("","");
11076          iconv(cd,NULL,NULL,NULL,NULL);
11077          iconv_close(cd);
11078   ;
11079   return 0;
11080 }
11081 _ACEOF
11082 rm -f conftest.$ac_objext conftest$ac_exeext
11083 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11084   (eval $ac_link) 2>conftest.er1
11085   ac_status=$?
11086   grep -v '^ *+' conftest.er1 >conftest.err
11087   rm -f conftest.er1
11088   cat conftest.err >&5
11089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11090   (exit $ac_status); } &&
11091          { ac_try='test -z "$ac_c_werror_flag"
11092                          || test ! -s conftest.err'
11093   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11094   (eval $ac_try) 2>&5
11095   ac_status=$?
11096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11097   (exit $ac_status); }; } &&
11098          { ac_try='test -s conftest$ac_exeext'
11099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11100   (eval $ac_try) 2>&5
11101   ac_status=$?
11102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11103   (exit $ac_status); }; }; then
11104   am_cv_lib_iconv=yes
11105         am_cv_func_iconv=yes
11106 else
11107   echo "$as_me: failed program was:" >&5
11108 sed 's/^/| /' conftest.$ac_ext >&5
11109
11110 fi
11111 rm -f conftest.err conftest.$ac_objext \
11112       conftest$ac_exeext conftest.$ac_ext
11113       LIBS="$am_save_LIBS"
11114     fi
11115
11116 fi
11117 echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
11118 echo "${ECHO_T}$am_cv_func_iconv" >&6
11119   if test "$am_cv_func_iconv" = yes; then
11120
11121 cat >>confdefs.h <<\_ACEOF
11122 #define HAVE_ICONV 1
11123 _ACEOF
11124
11125   fi
11126   if test "$am_cv_lib_iconv" = yes; then
11127     echo "$as_me:$LINENO: checking how to link with libiconv" >&5
11128 echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
11129     echo "$as_me:$LINENO: result: $LIBICONV" >&5
11130 echo "${ECHO_T}$LIBICONV" >&6
11131   else
11132             CPPFLAGS="$am_save_CPPFLAGS"
11133     LIBICONV=
11134     LTLIBICONV=
11135   fi
11136
11137
11138
11139   if test "$am_cv_func_iconv" = yes; then
11140     echo "$as_me:$LINENO: checking for iconv declaration" >&5
11141 echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
11142     if test "${am_cv_proto_iconv+set}" = set; then
11143   echo $ECHO_N "(cached) $ECHO_C" >&6
11144 else
11145
11146       cat >conftest.$ac_ext <<_ACEOF
11147 /* confdefs.h.  */
11148 _ACEOF
11149 cat confdefs.h >>conftest.$ac_ext
11150 cat >>conftest.$ac_ext <<_ACEOF
11151 /* end confdefs.h.  */
11152
11153 #include <stdlib.h>
11154 #include <iconv.h>
11155 extern
11156 #ifdef __cplusplus
11157 "C"
11158 #endif
11159 #if defined(__STDC__) || defined(__cplusplus)
11160 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11161 #else
11162 size_t iconv();
11163 #endif
11164
11165 int
11166 main ()
11167 {
11168
11169   ;
11170   return 0;
11171 }
11172 _ACEOF
11173 rm -f conftest.$ac_objext
11174 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11175   (eval $ac_compile) 2>conftest.er1
11176   ac_status=$?
11177   grep -v '^ *+' conftest.er1 >conftest.err
11178   rm -f conftest.er1
11179   cat conftest.err >&5
11180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11181   (exit $ac_status); } &&
11182          { ac_try='test -z "$ac_c_werror_flag"
11183                          || test ! -s conftest.err'
11184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11185   (eval $ac_try) 2>&5
11186   ac_status=$?
11187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11188   (exit $ac_status); }; } &&
11189          { ac_try='test -s conftest.$ac_objext'
11190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11191   (eval $ac_try) 2>&5
11192   ac_status=$?
11193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11194   (exit $ac_status); }; }; then
11195   am_cv_proto_iconv_arg1=""
11196 else
11197   echo "$as_me: failed program was:" >&5
11198 sed 's/^/| /' conftest.$ac_ext >&5
11199
11200 am_cv_proto_iconv_arg1="const"
11201 fi
11202 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11203       am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
11204 fi
11205
11206     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
11207     echo "$as_me:$LINENO: result: ${ac_t:-
11208          }$am_cv_proto_iconv" >&5
11209 echo "${ECHO_T}${ac_t:-
11210          }$am_cv_proto_iconv" >&6
11211
11212 cat >>confdefs.h <<_ACEOF
11213 #define ICONV_CONST $am_cv_proto_iconv_arg1
11214 _ACEOF
11215
11216   fi
11217
11218 # Until we have in-tree GNU iconv:
11219 LIBICONV_DEP=
11220
11221
11222
11223   echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
11224 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
11225 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
11226   echo $ECHO_N "(cached) $ECHO_C" >&6
11227 else
11228   cat >conftest.$ac_ext <<_ACEOF
11229 /* confdefs.h.  */
11230 _ACEOF
11231 cat confdefs.h >>conftest.$ac_ext
11232 cat >>conftest.$ac_ext <<_ACEOF
11233 /* end confdefs.h.  */
11234 #include <locale.h>
11235 int
11236 main ()
11237 {
11238 return LC_MESSAGES
11239   ;
11240   return 0;
11241 }
11242 _ACEOF
11243 rm -f conftest.$ac_objext conftest$ac_exeext
11244 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11245   (eval $ac_link) 2>conftest.er1
11246   ac_status=$?
11247   grep -v '^ *+' conftest.er1 >conftest.err
11248   rm -f conftest.er1
11249   cat conftest.err >&5
11250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11251   (exit $ac_status); } &&
11252          { ac_try='test -z "$ac_c_werror_flag"
11253                          || test ! -s conftest.err'
11254   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11255   (eval $ac_try) 2>&5
11256   ac_status=$?
11257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11258   (exit $ac_status); }; } &&
11259          { ac_try='test -s conftest$ac_exeext'
11260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11261   (eval $ac_try) 2>&5
11262   ac_status=$?
11263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11264   (exit $ac_status); }; }; then
11265   am_cv_val_LC_MESSAGES=yes
11266 else
11267   echo "$as_me: failed program was:" >&5
11268 sed 's/^/| /' conftest.$ac_ext >&5
11269
11270 am_cv_val_LC_MESSAGES=no
11271 fi
11272 rm -f conftest.err conftest.$ac_objext \
11273       conftest$ac_exeext conftest.$ac_ext
11274 fi
11275 echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
11276 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
11277   if test $am_cv_val_LC_MESSAGES = yes; then
11278
11279 cat >>confdefs.h <<\_ACEOF
11280 #define HAVE_LC_MESSAGES 1
11281 _ACEOF
11282
11283   fi
11284
11285
11286
11287   echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
11288 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11289 if test "${am_cv_langinfo_codeset+set}" = set; then
11290   echo $ECHO_N "(cached) $ECHO_C" >&6
11291 else
11292   cat >conftest.$ac_ext <<_ACEOF
11293 /* confdefs.h.  */
11294 _ACEOF
11295 cat confdefs.h >>conftest.$ac_ext
11296 cat >>conftest.$ac_ext <<_ACEOF
11297 /* end confdefs.h.  */
11298 #include <langinfo.h>
11299 int
11300 main ()
11301 {
11302 char* cs = nl_langinfo(CODESET);
11303   ;
11304   return 0;
11305 }
11306 _ACEOF
11307 rm -f conftest.$ac_objext conftest$ac_exeext
11308 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11309   (eval $ac_link) 2>conftest.er1
11310   ac_status=$?
11311   grep -v '^ *+' conftest.er1 >conftest.err
11312   rm -f conftest.er1
11313   cat conftest.err >&5
11314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11315   (exit $ac_status); } &&
11316          { ac_try='test -z "$ac_c_werror_flag"
11317                          || test ! -s conftest.err'
11318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11319   (eval $ac_try) 2>&5
11320   ac_status=$?
11321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11322   (exit $ac_status); }; } &&
11323          { ac_try='test -s conftest$ac_exeext'
11324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11325   (eval $ac_try) 2>&5
11326   ac_status=$?
11327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11328   (exit $ac_status); }; }; then
11329   am_cv_langinfo_codeset=yes
11330 else
11331   echo "$as_me: failed program was:" >&5
11332 sed 's/^/| /' conftest.$ac_ext >&5
11333
11334 am_cv_langinfo_codeset=no
11335 fi
11336 rm -f conftest.err conftest.$ac_objext \
11337       conftest$ac_exeext conftest.$ac_ext
11338
11339 fi
11340 echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
11341 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11342   if test $am_cv_langinfo_codeset = yes; then
11343
11344 cat >>confdefs.h <<\_ACEOF
11345 #define HAVE_LANGINFO_CODESET 1
11346 _ACEOF
11347
11348   fi
11349
11350
11351 # We will need to find libiberty.h and ansidecl.h
11352 saved_CFLAGS="$CFLAGS"
11353 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393 for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
11394         strsignal strstr strverscmp \
11395         errno snprintf vsnprintf vasprintf malloc realloc calloc \
11396         free basename getopt clock getpagesize clearerr_unlocked feof_unlocked   ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked   fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked   fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked   putchar_unlocked putc_unlocked
11397 do
11398   ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
11399 echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11400 echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11401 if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11402   echo $ECHO_N "(cached) $ECHO_C" >&6
11403 else
11404   cat >conftest.$ac_ext <<_ACEOF
11405 /* confdefs.h.  */
11406 _ACEOF
11407 cat confdefs.h >>conftest.$ac_ext
11408 cat >>conftest.$ac_ext <<_ACEOF
11409 /* end confdefs.h.  */
11410 #undef $ac_tr_decl
11411 #define $ac_tr_decl 1
11412
11413 #include "ansidecl.h"
11414 #include "system.h"
11415
11416 int
11417 main ()
11418 {
11419 #ifndef $ac_func
11420 char *(*pfn) = (char *(*)) $ac_func ;
11421 #endif
11422   ;
11423   return 0;
11424 }
11425 _ACEOF
11426 rm -f conftest.$ac_objext
11427 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11428   (eval $ac_compile) 2>conftest.er1
11429   ac_status=$?
11430   grep -v '^ *+' conftest.er1 >conftest.err
11431   rm -f conftest.er1
11432   cat conftest.err >&5
11433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11434   (exit $ac_status); } &&
11435          { ac_try='test -z "$ac_c_werror_flag"
11436                          || test ! -s conftest.err'
11437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11438   (eval $ac_try) 2>&5
11439   ac_status=$?
11440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11441   (exit $ac_status); }; } &&
11442          { ac_try='test -s conftest.$ac_objext'
11443   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11444   (eval $ac_try) 2>&5
11445   ac_status=$?
11446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11447   (exit $ac_status); }; }; then
11448   eval "gcc_cv_have_decl_$ac_func=yes"
11449 else
11450   echo "$as_me: failed program was:" >&5
11451 sed 's/^/| /' conftest.$ac_ext >&5
11452
11453 eval "gcc_cv_have_decl_$ac_func=no"
11454 fi
11455 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11456 fi
11457
11458 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
11459   echo "$as_me:$LINENO: result: yes" >&5
11460 echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
11461 #define $ac_tr_decl 1
11462 _ACEOF
11463
11464 else
11465   echo "$as_me:$LINENO: result: no" >&5
11466 echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
11467 #define $ac_tr_decl 0
11468 _ACEOF
11469
11470 fi
11471
11472 done
11473
11474
11475
11476
11477
11478 for ac_func in getrlimit setrlimit getrusage
11479 do
11480   ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
11481 echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11482 echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11483 if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11484   echo $ECHO_N "(cached) $ECHO_C" >&6
11485 else
11486   cat >conftest.$ac_ext <<_ACEOF
11487 /* confdefs.h.  */
11488 _ACEOF
11489 cat confdefs.h >>conftest.$ac_ext
11490 cat >>conftest.$ac_ext <<_ACEOF
11491 /* end confdefs.h.  */
11492 #undef $ac_tr_decl
11493 #define $ac_tr_decl 1
11494
11495 #include "ansidecl.h"
11496 #include "system.h"
11497 #ifdef HAVE_SYS_RESOURCE_H
11498 #include <sys/resource.h>
11499 #endif
11500
11501
11502 int
11503 main ()
11504 {
11505 #ifndef $ac_func
11506 char *(*pfn) = (char *(*)) $ac_func ;
11507 #endif
11508   ;
11509   return 0;
11510 }
11511 _ACEOF
11512 rm -f conftest.$ac_objext
11513 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11514   (eval $ac_compile) 2>conftest.er1
11515   ac_status=$?
11516   grep -v '^ *+' conftest.er1 >conftest.err
11517   rm -f conftest.er1
11518   cat conftest.err >&5
11519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11520   (exit $ac_status); } &&
11521          { ac_try='test -z "$ac_c_werror_flag"
11522                          || test ! -s conftest.err'
11523   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11524   (eval $ac_try) 2>&5
11525   ac_status=$?
11526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11527   (exit $ac_status); }; } &&
11528          { ac_try='test -s conftest.$ac_objext'
11529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11530   (eval $ac_try) 2>&5
11531   ac_status=$?
11532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11533   (exit $ac_status); }; }; then
11534   eval "gcc_cv_have_decl_$ac_func=yes"
11535 else
11536   echo "$as_me: failed program was:" >&5
11537 sed 's/^/| /' conftest.$ac_ext >&5
11538
11539 eval "gcc_cv_have_decl_$ac_func=no"
11540 fi
11541 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11542 fi
11543
11544 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
11545   echo "$as_me:$LINENO: result: yes" >&5
11546 echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
11547 #define $ac_tr_decl 1
11548 _ACEOF
11549
11550 else
11551   echo "$as_me:$LINENO: result: no" >&5
11552 echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
11553 #define $ac_tr_decl 0
11554 _ACEOF
11555
11556 fi
11557
11558 done
11559
11560
11561 cat >conftest.$ac_ext <<_ACEOF
11562 /* confdefs.h.  */
11563 _ACEOF
11564 cat confdefs.h >>conftest.$ac_ext
11565 cat >>conftest.$ac_ext <<_ACEOF
11566 /* end confdefs.h.  */
11567
11568 #include "ansidecl.h"
11569 #include "system.h"
11570 #ifdef HAVE_SYS_RESOURCE_H
11571 #include <sys/resource.h>
11572 #endif
11573
11574 int
11575 main ()
11576 {
11577 rlim_t l = 0;
11578   ;
11579   return 0;
11580 }
11581 _ACEOF
11582 rm -f conftest.$ac_objext
11583 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11584   (eval $ac_compile) 2>conftest.er1
11585   ac_status=$?
11586   grep -v '^ *+' conftest.er1 >conftest.err
11587   rm -f conftest.er1
11588   cat conftest.err >&5
11589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11590   (exit $ac_status); } &&
11591          { ac_try='test -z "$ac_c_werror_flag"
11592                          || test ! -s conftest.err'
11593   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11594   (eval $ac_try) 2>&5
11595   ac_status=$?
11596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11597   (exit $ac_status); }; } &&
11598          { ac_try='test -s conftest.$ac_objext'
11599   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11600   (eval $ac_try) 2>&5
11601   ac_status=$?
11602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11603   (exit $ac_status); }; }; then
11604   :
11605 else
11606   echo "$as_me: failed program was:" >&5
11607 sed 's/^/| /' conftest.$ac_ext >&5
11608
11609
11610 cat >>confdefs.h <<\_ACEOF
11611 #define rlim_t long
11612 _ACEOF
11613
11614 fi
11615 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11616
11617 # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
11618 # FREAD and FWRITE macros.  Fortunately, for GCC's single usage of ldgetname
11619 # in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
11620 # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
11621
11622 for ac_func in ldgetname
11623 do
11624   ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
11625 echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11626 echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11627 if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11628   echo $ECHO_N "(cached) $ECHO_C" >&6
11629 else
11630   cat >conftest.$ac_ext <<_ACEOF
11631 /* confdefs.h.  */
11632 _ACEOF
11633 cat confdefs.h >>conftest.$ac_ext
11634 cat >>conftest.$ac_ext <<_ACEOF
11635 /* end confdefs.h.  */
11636 #undef $ac_tr_decl
11637 #define $ac_tr_decl 1
11638
11639 #include "ansidecl.h"
11640 #include "system.h"
11641 #ifdef HAVE_LDFCN_H
11642 #undef FREAD
11643 #undef FWRITE
11644 #include <ldfcn.h>
11645 #endif
11646
11647
11648 int
11649 main ()
11650 {
11651 #ifndef $ac_func
11652 char *(*pfn) = (char *(*)) $ac_func ;
11653 #endif
11654   ;
11655   return 0;
11656 }
11657 _ACEOF
11658 rm -f conftest.$ac_objext
11659 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11660   (eval $ac_compile) 2>conftest.er1
11661   ac_status=$?
11662   grep -v '^ *+' conftest.er1 >conftest.err
11663   rm -f conftest.er1
11664   cat conftest.err >&5
11665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11666   (exit $ac_status); } &&
11667          { ac_try='test -z "$ac_c_werror_flag"
11668                          || test ! -s conftest.err'
11669   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11670   (eval $ac_try) 2>&5
11671   ac_status=$?
11672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11673   (exit $ac_status); }; } &&
11674          { ac_try='test -s conftest.$ac_objext'
11675   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11676   (eval $ac_try) 2>&5
11677   ac_status=$?
11678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11679   (exit $ac_status); }; }; then
11680   eval "gcc_cv_have_decl_$ac_func=yes"
11681 else
11682   echo "$as_me: failed program was:" >&5
11683 sed 's/^/| /' conftest.$ac_ext >&5
11684
11685 eval "gcc_cv_have_decl_$ac_func=no"
11686 fi
11687 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11688 fi
11689
11690 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
11691   echo "$as_me:$LINENO: result: yes" >&5
11692 echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
11693 #define $ac_tr_decl 1
11694 _ACEOF
11695
11696 else
11697   echo "$as_me:$LINENO: result: no" >&5
11698 echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
11699 #define $ac_tr_decl 0
11700 _ACEOF
11701
11702 fi
11703
11704 done
11705
11706
11707
11708 for ac_func in times
11709 do
11710   ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
11711 echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11712 echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11713 if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11714   echo $ECHO_N "(cached) $ECHO_C" >&6
11715 else
11716   cat >conftest.$ac_ext <<_ACEOF
11717 /* confdefs.h.  */
11718 _ACEOF
11719 cat confdefs.h >>conftest.$ac_ext
11720 cat >>conftest.$ac_ext <<_ACEOF
11721 /* end confdefs.h.  */
11722 #undef $ac_tr_decl
11723 #define $ac_tr_decl 1
11724
11725 #include "ansidecl.h"
11726 #include "system.h"
11727 #ifdef HAVE_SYS_TIMES_H
11728 #include <sys/times.h>
11729 #endif
11730
11731
11732 int
11733 main ()
11734 {
11735 #ifndef $ac_func
11736 char *(*pfn) = (char *(*)) $ac_func ;
11737 #endif
11738   ;
11739   return 0;
11740 }
11741 _ACEOF
11742 rm -f conftest.$ac_objext
11743 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11744   (eval $ac_compile) 2>conftest.er1
11745   ac_status=$?
11746   grep -v '^ *+' conftest.er1 >conftest.err
11747   rm -f conftest.er1
11748   cat conftest.err >&5
11749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11750   (exit $ac_status); } &&
11751          { ac_try='test -z "$ac_c_werror_flag"
11752                          || test ! -s conftest.err'
11753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11754   (eval $ac_try) 2>&5
11755   ac_status=$?
11756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11757   (exit $ac_status); }; } &&
11758          { ac_try='test -s conftest.$ac_objext'
11759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11760   (eval $ac_try) 2>&5
11761   ac_status=$?
11762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11763   (exit $ac_status); }; }; then
11764   eval "gcc_cv_have_decl_$ac_func=yes"
11765 else
11766   echo "$as_me: failed program was:" >&5
11767 sed 's/^/| /' conftest.$ac_ext >&5
11768
11769 eval "gcc_cv_have_decl_$ac_func=no"
11770 fi
11771 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11772 fi
11773
11774 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
11775   echo "$as_me:$LINENO: result: yes" >&5
11776 echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
11777 #define $ac_tr_decl 1
11778 _ACEOF
11779
11780 else
11781   echo "$as_me:$LINENO: result: no" >&5
11782 echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
11783 #define $ac_tr_decl 0
11784 _ACEOF
11785
11786 fi
11787
11788 done
11789
11790
11791
11792 for ac_func in sigaltstack
11793 do
11794   ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
11795 echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11796 echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
11797 if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
11798   echo $ECHO_N "(cached) $ECHO_C" >&6
11799 else
11800   cat >conftest.$ac_ext <<_ACEOF
11801 /* confdefs.h.  */
11802 _ACEOF
11803 cat confdefs.h >>conftest.$ac_ext
11804 cat >>conftest.$ac_ext <<_ACEOF
11805 /* end confdefs.h.  */
11806 #undef $ac_tr_decl
11807 #define $ac_tr_decl 1
11808
11809 #include "ansidecl.h"
11810 #include "system.h"
11811 #include <signal.h>
11812
11813
11814 int
11815 main ()
11816 {
11817 #ifndef $ac_func
11818 char *(*pfn) = (char *(*)) $ac_func ;
11819 #endif
11820   ;
11821   return 0;
11822 }
11823 _ACEOF
11824 rm -f conftest.$ac_objext
11825 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11826   (eval $ac_compile) 2>conftest.er1
11827   ac_status=$?
11828   grep -v '^ *+' conftest.er1 >conftest.err
11829   rm -f conftest.er1
11830   cat conftest.err >&5
11831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11832   (exit $ac_status); } &&
11833          { ac_try='test -z "$ac_c_werror_flag"
11834                          || test ! -s conftest.err'
11835   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11836   (eval $ac_try) 2>&5
11837   ac_status=$?
11838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11839   (exit $ac_status); }; } &&
11840          { ac_try='test -s conftest.$ac_objext'
11841   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11842   (eval $ac_try) 2>&5
11843   ac_status=$?
11844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11845   (exit $ac_status); }; }; then
11846   eval "gcc_cv_have_decl_$ac_func=yes"
11847 else
11848   echo "$as_me: failed program was:" >&5
11849 sed 's/^/| /' conftest.$ac_ext >&5
11850
11851 eval "gcc_cv_have_decl_$ac_func=no"
11852 fi
11853 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11854 fi
11855
11856 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
11857   echo "$as_me:$LINENO: result: yes" >&5
11858 echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
11859 #define $ac_tr_decl 1
11860 _ACEOF
11861
11862 else
11863   echo "$as_me:$LINENO: result: no" >&5
11864 echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
11865 #define $ac_tr_decl 0
11866 _ACEOF
11867
11868 fi
11869
11870 done
11871
11872
11873 # More time-related stuff.
11874 echo "$as_me:$LINENO: checking for struct tms" >&5
11875 echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
11876 if test "${ac_cv_struct_tms+set}" = set; then
11877   echo $ECHO_N "(cached) $ECHO_C" >&6
11878 else
11879
11880 cat >conftest.$ac_ext <<_ACEOF
11881 /* confdefs.h.  */
11882 _ACEOF
11883 cat confdefs.h >>conftest.$ac_ext
11884 cat >>conftest.$ac_ext <<_ACEOF
11885 /* end confdefs.h.  */
11886
11887 #include "ansidecl.h"
11888 #include "system.h"
11889 #ifdef HAVE_SYS_TIMES_H
11890 #include <sys/times.h>
11891 #endif
11892
11893 int
11894 main ()
11895 {
11896 struct tms tms;
11897   ;
11898   return 0;
11899 }
11900 _ACEOF
11901 rm -f conftest.$ac_objext
11902 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11903   (eval $ac_compile) 2>conftest.er1
11904   ac_status=$?
11905   grep -v '^ *+' conftest.er1 >conftest.err
11906   rm -f conftest.er1
11907   cat conftest.err >&5
11908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11909   (exit $ac_status); } &&
11910          { ac_try='test -z "$ac_c_werror_flag"
11911                          || test ! -s conftest.err'
11912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11913   (eval $ac_try) 2>&5
11914   ac_status=$?
11915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11916   (exit $ac_status); }; } &&
11917          { ac_try='test -s conftest.$ac_objext'
11918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11919   (eval $ac_try) 2>&5
11920   ac_status=$?
11921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11922   (exit $ac_status); }; }; then
11923   ac_cv_struct_tms=yes
11924 else
11925   echo "$as_me: failed program was:" >&5
11926 sed 's/^/| /' conftest.$ac_ext >&5
11927
11928 ac_cv_struct_tms=no
11929 fi
11930 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11931 fi
11932 echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
11933 echo "${ECHO_T}$ac_cv_struct_tms" >&6
11934 if test $ac_cv_struct_tms = yes; then
11935
11936 cat >>confdefs.h <<\_ACEOF
11937 #define HAVE_STRUCT_TMS 1
11938 _ACEOF
11939
11940 fi
11941
11942 # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
11943 # revisit after autoconf 2.50.
11944 echo "$as_me:$LINENO: checking for clock_t" >&5
11945 echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
11946 if test "${gcc_cv_type_clock_t+set}" = set; then
11947   echo $ECHO_N "(cached) $ECHO_C" >&6
11948 else
11949
11950 cat >conftest.$ac_ext <<_ACEOF
11951 /* confdefs.h.  */
11952 _ACEOF
11953 cat confdefs.h >>conftest.$ac_ext
11954 cat >>conftest.$ac_ext <<_ACEOF
11955 /* end confdefs.h.  */
11956
11957 #include "ansidecl.h"
11958 #include "system.h"
11959
11960 int
11961 main ()
11962 {
11963 clock_t x;
11964   ;
11965   return 0;
11966 }
11967 _ACEOF
11968 rm -f conftest.$ac_objext
11969 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11970   (eval $ac_compile) 2>conftest.er1
11971   ac_status=$?
11972   grep -v '^ *+' conftest.er1 >conftest.err
11973   rm -f conftest.er1
11974   cat conftest.err >&5
11975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11976   (exit $ac_status); } &&
11977          { ac_try='test -z "$ac_c_werror_flag"
11978                          || test ! -s conftest.err'
11979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11980   (eval $ac_try) 2>&5
11981   ac_status=$?
11982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11983   (exit $ac_status); }; } &&
11984          { ac_try='test -s conftest.$ac_objext'
11985   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11986   (eval $ac_try) 2>&5
11987   ac_status=$?
11988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11989   (exit $ac_status); }; }; then
11990   gcc_cv_type_clock_t=yes
11991 else
11992   echo "$as_me: failed program was:" >&5
11993 sed 's/^/| /' conftest.$ac_ext >&5
11994
11995 gcc_cv_type_clock_t=no
11996 fi
11997 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11998 fi
11999 echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
12000 echo "${ECHO_T}$gcc_cv_type_clock_t" >&6
12001 if test $gcc_cv_type_clock_t = yes; then
12002
12003 cat >>confdefs.h <<\_ACEOF
12004 #define HAVE_CLOCK_T 1
12005 _ACEOF
12006
12007 fi
12008
12009 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
12010 CFLAGS="$saved_CFLAGS"
12011
12012 # Check whether --enable-initfini-array or --disable-initfini-array was given.
12013 if test "${enable_initfini_array+set}" = set; then
12014   enableval="$enable_initfini_array"
12015
12016 else
12017
12018 echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
12019 echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
12020 if test "${gcc_cv_initfini_array+set}" = set; then
12021   echo $ECHO_N "(cached) $ECHO_C" >&6
12022 else
12023     if test "$cross_compiling" = yes; then
12024   gcc_cv_initfini_array=no
12025 else
12026   cat >conftest.$ac_ext <<_ACEOF
12027 /* confdefs.h.  */
12028 _ACEOF
12029 cat confdefs.h >>conftest.$ac_ext
12030 cat >>conftest.$ac_ext <<_ACEOF
12031 /* end confdefs.h.  */
12032
12033 static int x = -1;
12034 int main (void) { return x; }
12035 int foo (void) { x = 0; }
12036 int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
12037 _ACEOF
12038 rm -f conftest$ac_exeext
12039 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12040   (eval $ac_link) 2>&5
12041   ac_status=$?
12042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12043   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12045   (eval $ac_try) 2>&5
12046   ac_status=$?
12047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12048   (exit $ac_status); }; }; then
12049   gcc_cv_initfini_array=yes
12050 else
12051   echo "$as_me: program exited with status $ac_status" >&5
12052 echo "$as_me: failed program was:" >&5
12053 sed 's/^/| /' conftest.$ac_ext >&5
12054
12055 ( exit $ac_status )
12056 gcc_cv_initfini_array=no
12057 fi
12058 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12059 fi
12060 fi
12061 echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
12062 echo "${ECHO_T}$gcc_cv_initfini_array" >&6
12063   enable_initfini_array=$gcc_cv_initfini_array
12064
12065 fi;
12066 if test $enable_initfini_array = yes; then
12067
12068 cat >>confdefs.h <<\_ACEOF
12069 #define HAVE_INITFINI_ARRAY 1
12070 _ACEOF
12071
12072 fi
12073
12074 # mkdir takes a single argument on some systems.
12075 echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
12076 echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6
12077 if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
12078   echo $ECHO_N "(cached) $ECHO_C" >&6
12079 else
12080   cat >conftest.$ac_ext <<_ACEOF
12081 /* confdefs.h.  */
12082 _ACEOF
12083 cat confdefs.h >>conftest.$ac_ext
12084 cat >>conftest.$ac_ext <<_ACEOF
12085 /* end confdefs.h.  */
12086
12087 #include <sys/types.h>
12088 #ifdef HAVE_SYS_STAT_H
12089 # include <sys/stat.h>
12090 #endif
12091 #ifdef HAVE_UNISTD_H
12092 # include <unistd.h>
12093 #endif
12094 #ifdef HAVE_DIRECT_H
12095 # include <direct.h>
12096 #endif
12097 int
12098 main ()
12099 {
12100 mkdir ("foo", 0);
12101   ;
12102   return 0;
12103 }
12104 _ACEOF
12105 rm -f conftest.$ac_objext
12106 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12107   (eval $ac_compile) 2>conftest.er1
12108   ac_status=$?
12109   grep -v '^ *+' conftest.er1 >conftest.err
12110   rm -f conftest.er1
12111   cat conftest.err >&5
12112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12113   (exit $ac_status); } &&
12114          { ac_try='test -z "$ac_c_werror_flag"
12115                          || test ! -s conftest.err'
12116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12117   (eval $ac_try) 2>&5
12118   ac_status=$?
12119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12120   (exit $ac_status); }; } &&
12121          { ac_try='test -s conftest.$ac_objext'
12122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12123   (eval $ac_try) 2>&5
12124   ac_status=$?
12125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12126   (exit $ac_status); }; }; then
12127   gcc_cv_mkdir_takes_one_arg=no
12128 else
12129   echo "$as_me: failed program was:" >&5
12130 sed 's/^/| /' conftest.$ac_ext >&5
12131
12132 gcc_cv_mkdir_takes_one_arg=yes
12133 fi
12134 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12135 fi
12136 echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
12137 echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6
12138 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
12139
12140 cat >>confdefs.h <<\_ACEOF
12141 #define MKDIR_TAKES_ONE_ARG 1
12142 _ACEOF
12143
12144 fi
12145
12146
12147 # File extensions
12148 manext='.1'
12149 objext='.o'
12150
12151
12152
12153 # With Setjmp/Longjmp based exception handling.
12154 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
12155 if test "${enable_sjlj_exceptions+set}" = set; then
12156   enableval="$enable_sjlj_exceptions"
12157   sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
12158
12159 cat >>confdefs.h <<_ACEOF
12160 #define CONFIG_SJLJ_EXCEPTIONS $sjlj
12161 _ACEOF
12162
12163 fi;
12164
12165 # For platforms with the unwind ABI which includes an unwind library,
12166 # libunwind, we can choose to use the system libunwind.
12167
12168 # Check whether --with-system-libunwind or --without-system-libunwind was given.
12169 if test "${with_system_libunwind+set}" = set; then
12170   withval="$with_system_libunwind"
12171
12172 fi;
12173
12174 # config.gcc also contains tests of with_system_libunwind.
12175 if test x$with_system_libunwind = xyes; then
12176
12177 cat >>confdefs.h <<\_ACEOF
12178 #define HAVE_GETIPINFO 1
12179 _ACEOF
12180
12181 fi
12182
12183 # --------------------------------------------------------
12184 # Build, host, and target specific configuration fragments
12185 # --------------------------------------------------------
12186
12187 # Collect build-machine-specific information.
12188 . ${srcdir}/config.build
12189
12190 # Collect host-machine-specific information.
12191 . ${srcdir}/config.host
12192
12193 target_gtfiles=
12194
12195 # Collect target-machine-specific information.
12196 . ${srcdir}/config.gcc
12197
12198 extra_objs="${host_extra_objs} ${extra_objs}"
12199 extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
12200
12201 # Default the target-machine variables that were not explicitly set.
12202 if test x"$tm_file" = x
12203 then tm_file=$cpu_type/$cpu_type.h; fi
12204
12205 if test x"$extra_headers" = x
12206 then extra_headers=; fi
12207
12208 if test x$md_file = x
12209 then md_file=$cpu_type/$cpu_type.md; fi
12210
12211 if test x$out_file = x
12212 then out_file=$cpu_type/$cpu_type.c; fi
12213
12214 if test x"$tmake_file" = x
12215 then tmake_file=$cpu_type/t-$cpu_type
12216 fi
12217
12218 if test x"$dwarf2" = xyes
12219 then tm_file="$tm_file tm-dwarf2.h"
12220 fi
12221
12222 # Say what files are being used for the output code and MD file.
12223 echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
12224 echo "Using \`$srcdir/config/$md_file' as machine description file."
12225
12226 # If any of the xm_file variables contain nonexistent files, warn
12227 # about them and drop them.
12228
12229 bx=
12230 for x in $build_xm_file; do
12231   if    test -f $srcdir/config/$x
12232   then      bx="$bx $x"
12233   else      { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12234 echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
12235   fi
12236 done
12237 build_xm_file="$bx"
12238
12239 hx=
12240 for x in $host_xm_file; do
12241   if    test -f $srcdir/config/$x
12242   then      hx="$hx $x"
12243   else      { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12244 echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
12245   fi
12246 done
12247 host_xm_file="$hx"
12248
12249 tx=
12250 for x in $xm_file; do
12251   if    test -f $srcdir/config/$x
12252   then      tx="$tx $x"
12253   else      { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12254 echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
12255   fi
12256 done
12257 xm_file="$tx"
12258
12259 count=a
12260 for f in $tm_file; do
12261         count=${count}x
12262 done
12263 if test $count = ax; then
12264         echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
12265 else
12266         echo "Using the following target machine macro files:"
12267         for f in $tm_file; do
12268                 echo "  $srcdir/config/$f"
12269         done
12270 fi
12271
12272 if test x$need_64bit_hwint = xyes; then
12273
12274 cat >>confdefs.h <<\_ACEOF
12275 #define NEED_64BIT_HOST_WIDE_INT 1
12276 _ACEOF
12277
12278 fi
12279
12280 if test x$use_long_long_for_widest_fast_int = xyes; then
12281
12282 cat >>confdefs.h <<\_ACEOF
12283 #define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
12284 _ACEOF
12285
12286 fi
12287
12288 count=a
12289 for f in $host_xm_file; do
12290         count=${count}x
12291 done
12292 if test $count = a; then
12293         :
12294 elif test $count = ax; then
12295         echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
12296 else
12297         echo "Using the following host machine macro files:"
12298         for f in $host_xm_file; do
12299                 echo "  $srcdir/config/$f"
12300         done
12301 fi
12302 echo "Using ${out_host_hook_obj} for host machine hooks."
12303
12304 if test "$host_xm_file" != "$build_xm_file"; then
12305         count=a
12306         for f in $build_xm_file; do
12307                 count=${count}x
12308         done
12309         if test $count = a; then
12310                 :
12311         elif test $count = ax; then
12312                 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
12313         else
12314                 echo "Using the following build machine macro files:"
12315                 for f in $build_xm_file; do
12316                         echo "  $srcdir/config/$f"
12317                 done
12318         fi
12319 fi
12320
12321 case ${host} in
12322   powerpc*-*-darwin*)
12323     echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5
12324 echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6
12325 if test "${gcc_cv_mcontext_underscores+set}" = set; then
12326   echo $ECHO_N "(cached) $ECHO_C" >&6
12327 else
12328   cat >conftest.$ac_ext <<_ACEOF
12329
12330 #include <sys/cdefs.h>
12331 #include <sys/signal.h>
12332 #include <ucontext.h>
12333 int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
12334
12335 _ACEOF
12336 rm -f conftest.$ac_objext
12337 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12338   (eval $ac_compile) 2>conftest.er1
12339   ac_status=$?
12340   grep -v '^ *+' conftest.er1 >conftest.err
12341   rm -f conftest.er1
12342   cat conftest.err >&5
12343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12344   (exit $ac_status); } &&
12345          { ac_try='test -z "$ac_c_werror_flag"
12346                          || test ! -s conftest.err'
12347   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12348   (eval $ac_try) 2>&5
12349   ac_status=$?
12350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12351   (exit $ac_status); }; } &&
12352          { ac_try='test -s conftest.$ac_objext'
12353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12354   (eval $ac_try) 2>&5
12355   ac_status=$?
12356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12357   (exit $ac_status); }; }; then
12358   gcc_cv_mcontext_underscores=no
12359 else
12360   echo "$as_me: failed program was:" >&5
12361 sed 's/^/| /' conftest.$ac_ext >&5
12362
12363 gcc_cv_mcontext_underscores=yes
12364 fi
12365 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12366 fi
12367 echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5
12368 echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6
12369       if test $gcc_cv_mcontext_underscores = yes; then
12370
12371 cat >>confdefs.h <<\_ACEOF
12372 #define HAS_MCONTEXT_T_UNDERSCORES
12373 _ACEOF
12374
12375       fi
12376     ;;
12377 esac
12378
12379 # ---------
12380 # Threading
12381 # ---------
12382
12383 # Check if a valid thread package
12384 case ${enable_threads} in
12385   "" | no)
12386     # No threads
12387     target_thread_file='single'
12388     ;;
12389   yes)
12390     # default
12391     target_thread_file='single'
12392     ;;
12393   aix | dce | gnat | irix | posix | posix95 | rtems | \
12394   single | solaris | vxworks | win32 )
12395     target_thread_file=${enable_threads}
12396     ;;
12397   *)
12398     echo "${enable_threads} is an unknown thread package" 1>&2
12399     exit 1
12400     ;;
12401 esac
12402
12403 if test x${thread_file} = x; then
12404   # No thread file set by target-specific clauses in config.gcc,
12405   # so use file chosen by default logic above
12406   thread_file=${target_thread_file}
12407 fi
12408
12409 # Make gthr-default.h if we have a thread file.
12410 gthread_flags=
12411 if test $thread_file != single; then
12412   rm -f gthr-default.h
12413   echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
12414   gthread_flags=-DHAVE_GTHR_DEFAULT
12415 fi
12416
12417
12418 # --------
12419 # UNSORTED
12420 # --------
12421
12422 use_cxa_atexit=no
12423 if test x$enable___cxa_atexit = xyes || \
12424    test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
12425   if test x$host = x$target; then
12426     case $host in
12427       # mingw32 doesn't have __cxa_atexit but uses atexit registration
12428       # keyed to flag_use_cxa_atexit
12429       *-*-mingw32*)
12430         use_cxa_atexit=yes
12431         ;;
12432       *)
12433         echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
12434 echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6
12435 if test "${ac_cv_func___cxa_atexit+set}" = set; then
12436   echo $ECHO_N "(cached) $ECHO_C" >&6
12437 else
12438   cat >conftest.$ac_ext <<_ACEOF
12439 /* confdefs.h.  */
12440 _ACEOF
12441 cat confdefs.h >>conftest.$ac_ext
12442 cat >>conftest.$ac_ext <<_ACEOF
12443 /* end confdefs.h.  */
12444 /* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
12445    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
12446 #define __cxa_atexit innocuous___cxa_atexit
12447
12448 /* System header to define __stub macros and hopefully few prototypes,
12449     which can conflict with char __cxa_atexit (); below.
12450     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12451     <limits.h> exists even on freestanding compilers.  */
12452
12453 #ifdef __STDC__
12454 # include <limits.h>
12455 #else
12456 # include <assert.h>
12457 #endif
12458
12459 #undef __cxa_atexit
12460
12461 /* Override any gcc2 internal prototype to avoid an error.  */
12462 #ifdef __cplusplus
12463 extern "C"
12464 {
12465 #endif
12466 /* We use char because int might match the return type of a gcc2
12467    builtin and then its argument prototype would still apply.  */
12468 char __cxa_atexit ();
12469 /* The GNU C library defines this for functions which it implements
12470     to always fail with ENOSYS.  Some functions are actually named
12471     something starting with __ and the normal name is an alias.  */
12472 #if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit)
12473 choke me
12474 #else
12475 char (*f) () = __cxa_atexit;
12476 #endif
12477 #ifdef __cplusplus
12478 }
12479 #endif
12480
12481 int
12482 main ()
12483 {
12484 return f != __cxa_atexit;
12485   ;
12486   return 0;
12487 }
12488 _ACEOF
12489 rm -f conftest.$ac_objext conftest$ac_exeext
12490 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12491   (eval $ac_link) 2>conftest.er1
12492   ac_status=$?
12493   grep -v '^ *+' conftest.er1 >conftest.err
12494   rm -f conftest.er1
12495   cat conftest.err >&5
12496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12497   (exit $ac_status); } &&
12498          { ac_try='test -z "$ac_c_werror_flag"
12499                          || test ! -s conftest.err'
12500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12501   (eval $ac_try) 2>&5
12502   ac_status=$?
12503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12504   (exit $ac_status); }; } &&
12505          { ac_try='test -s conftest$ac_exeext'
12506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12507   (eval $ac_try) 2>&5
12508   ac_status=$?
12509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12510   (exit $ac_status); }; }; then
12511   ac_cv_func___cxa_atexit=yes
12512 else
12513   echo "$as_me: failed program was:" >&5
12514 sed 's/^/| /' conftest.$ac_ext >&5
12515
12516 ac_cv_func___cxa_atexit=no
12517 fi
12518 rm -f conftest.err conftest.$ac_objext \
12519       conftest$ac_exeext conftest.$ac_ext
12520 fi
12521 echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
12522 echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6
12523 if test $ac_cv_func___cxa_atexit = yes; then
12524   use_cxa_atexit=yes
12525 else
12526   echo "__cxa_atexit can't be enabled on this target"
12527 fi
12528
12529         ;;
12530     esac
12531   else
12532     # We can't check for __cxa_atexit when building a cross, so assume
12533     # it is available
12534     use_cxa_atexit=yes
12535   fi
12536   if test x$use_cxa_atexit = xyes; then
12537
12538 cat >>confdefs.h <<\_ACEOF
12539 #define DEFAULT_USE_CXA_ATEXIT 2
12540 _ACEOF
12541
12542   fi
12543 fi
12544
12545 use_getipinfo=yes
12546 if test x$with_system_libunwind = xyes; then
12547    if test x$host = x$target; then
12548      echo "$as_me:$LINENO: checking for library containing _Unwind_GetIPInfo" >&5
12549 echo $ECHO_N "checking for library containing _Unwind_GetIPInfo... $ECHO_C" >&6
12550 if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then
12551   echo $ECHO_N "(cached) $ECHO_C" >&6
12552 else
12553   ac_func_search_save_LIBS=$LIBS
12554 ac_cv_search__Unwind_GetIPInfo=no
12555 cat >conftest.$ac_ext <<_ACEOF
12556 /* confdefs.h.  */
12557 _ACEOF
12558 cat confdefs.h >>conftest.$ac_ext
12559 cat >>conftest.$ac_ext <<_ACEOF
12560 /* end confdefs.h.  */
12561
12562 /* Override any gcc2 internal prototype to avoid an error.  */
12563 #ifdef __cplusplus
12564 extern "C"
12565 #endif
12566 /* We use char because int might match the return type of a gcc2
12567    builtin and then its argument prototype would still apply.  */
12568 char _Unwind_GetIPInfo ();
12569 int
12570 main ()
12571 {
12572 _Unwind_GetIPInfo ();
12573   ;
12574   return 0;
12575 }
12576 _ACEOF
12577 rm -f conftest.$ac_objext conftest$ac_exeext
12578 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12579   (eval $ac_link) 2>conftest.er1
12580   ac_status=$?
12581   grep -v '^ *+' conftest.er1 >conftest.err
12582   rm -f conftest.er1
12583   cat conftest.err >&5
12584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12585   (exit $ac_status); } &&
12586          { ac_try='test -z "$ac_c_werror_flag"
12587                          || test ! -s conftest.err'
12588   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12589   (eval $ac_try) 2>&5
12590   ac_status=$?
12591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12592   (exit $ac_status); }; } &&
12593          { ac_try='test -s conftest$ac_exeext'
12594   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12595   (eval $ac_try) 2>&5
12596   ac_status=$?
12597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12598   (exit $ac_status); }; }; then
12599   ac_cv_search__Unwind_GetIPInfo="none required"
12600 else
12601   echo "$as_me: failed program was:" >&5
12602 sed 's/^/| /' conftest.$ac_ext >&5
12603
12604 fi
12605 rm -f conftest.err conftest.$ac_objext \
12606       conftest$ac_exeext conftest.$ac_ext
12607 if test "$ac_cv_search__Unwind_GetIPInfo" = no; then
12608   for ac_lib in unwind; do
12609     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12610     cat >conftest.$ac_ext <<_ACEOF
12611 /* confdefs.h.  */
12612 _ACEOF
12613 cat confdefs.h >>conftest.$ac_ext
12614 cat >>conftest.$ac_ext <<_ACEOF
12615 /* end confdefs.h.  */
12616
12617 /* Override any gcc2 internal prototype to avoid an error.  */
12618 #ifdef __cplusplus
12619 extern "C"
12620 #endif
12621 /* We use char because int might match the return type of a gcc2
12622    builtin and then its argument prototype would still apply.  */
12623 char _Unwind_GetIPInfo ();
12624 int
12625 main ()
12626 {
12627 _Unwind_GetIPInfo ();
12628   ;
12629   return 0;
12630 }
12631 _ACEOF
12632 rm -f conftest.$ac_objext conftest$ac_exeext
12633 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12634   (eval $ac_link) 2>conftest.er1
12635   ac_status=$?
12636   grep -v '^ *+' conftest.er1 >conftest.err
12637   rm -f conftest.er1
12638   cat conftest.err >&5
12639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12640   (exit $ac_status); } &&
12641          { ac_try='test -z "$ac_c_werror_flag"
12642                          || test ! -s conftest.err'
12643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12644   (eval $ac_try) 2>&5
12645   ac_status=$?
12646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12647   (exit $ac_status); }; } &&
12648          { ac_try='test -s conftest$ac_exeext'
12649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12650   (eval $ac_try) 2>&5
12651   ac_status=$?
12652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12653   (exit $ac_status); }; }; then
12654   ac_cv_search__Unwind_GetIPInfo="-l$ac_lib"
12655 break
12656 else
12657   echo "$as_me: failed program was:" >&5
12658 sed 's/^/| /' conftest.$ac_ext >&5
12659
12660 fi
12661 rm -f conftest.err conftest.$ac_objext \
12662       conftest$ac_exeext conftest.$ac_ext
12663   done
12664 fi
12665 LIBS=$ac_func_search_save_LIBS
12666 fi
12667 echo "$as_me:$LINENO: result: $ac_cv_search__Unwind_GetIPInfo" >&5
12668 echo "${ECHO_T}$ac_cv_search__Unwind_GetIPInfo" >&6
12669 if test "$ac_cv_search__Unwind_GetIPInfo" != no; then
12670   test "$ac_cv_search__Unwind_GetIPInfo" = "none required" || LIBS="$ac_cv_search__Unwind_GetIPInfo $LIBS"
12671
12672 else
12673   use_getipinfo=no
12674 fi
12675
12676    fi
12677 fi
12678
12679 if test x$use_getipinfo = xyes; then
12680
12681 cat >>confdefs.h <<\_ACEOF
12682 #define HAVE_GETIPINFO 1
12683 _ACEOF
12684
12685 else
12686    echo "The system unwind library does not support _Unwind_GetIPInfo."
12687 fi
12688
12689 # Look for a file containing extra machine modes.
12690 if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
12691   extra_modes_file='$(srcdir)'/config/${extra_modes}
12692
12693
12694 cat >>confdefs.h <<_ACEOF
12695 #define EXTRA_MODES_FILE "config/$extra_modes"
12696 _ACEOF
12697
12698 fi
12699
12700 # Convert extra_options into a form suitable for Makefile use.
12701 extra_opt_files=
12702 for f in $extra_options; do
12703   extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
12704 done
12705
12706
12707 # auto-host.h is the file containing items generated by autoconf and is
12708 # the first file included by config.h.
12709 # If host=build, it is correct to have bconfig include auto-host.h
12710 # as well.  If host!=build, we are in error and need to do more
12711 # work to find out the build config parameters.
12712 if test x$host = x$build
12713 then
12714         build_auto=auto-host.h
12715 else
12716         # We create a subdir, then run autoconf in the subdir.
12717         # To prevent recursion we set host and build for the new
12718         # invocation of configure to the build for this invocation
12719         # of configure.
12720         tempdir=build.$$
12721         rm -rf $tempdir
12722         mkdir $tempdir
12723         cd $tempdir
12724         case ${srcdir} in
12725         /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
12726         *) realsrcdir=../${srcdir};;
12727         esac
12728         saved_CFLAGS="${CFLAGS}"
12729         CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
12730         ${realsrcdir}/configure \
12731                 --enable-languages=${enable_languages-all} \
12732                 --target=$target_alias --host=$build_alias --build=$build_alias
12733         CFLAGS="${saved_CFLAGS}"
12734
12735         # We just finished tests for the build machine, so rename
12736         # the file auto-build.h in the gcc directory.
12737         mv auto-host.h ../auto-build.h
12738         cd ..
12739         rm -rf $tempdir
12740         build_auto=auto-build.h
12741 fi
12742
12743
12744 tm_file="${tm_file} defaults.h"
12745 tm_p_file="${tm_p_file} tm-preds.h"
12746 host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
12747 build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
12748 # We don't want ansidecl.h in target files, write code there in ISO/GNU C.
12749 # put this back in temporarily.
12750 xm_file="auto-host.h ansidecl.h ${xm_file}"
12751
12752 # --------
12753 # UNSORTED
12754 # --------
12755
12756 # Compile in configure arguments.
12757 if test -f configargs.h ; then
12758         # Being re-configured.
12759         gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
12760         gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
12761 else
12762         gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
12763 fi
12764
12765 # Double all backslashes and backslash all quotes to turn
12766 # gcc_config_arguments into a C string.
12767 sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
12768 $gcc_config_arguments
12769 EOF
12770 gcc_config_arguments_str=`cat conftest.out`
12771 rm -f conftest.out
12772
12773 cat > configargs.h <<EOF
12774 /* Generated automatically. */
12775 static const char configuration_arguments[] = "$gcc_config_arguments_str";
12776 static const char thread_model[] = "$thread_file";
12777
12778 static const struct {
12779   const char *name, *value;
12780 } configure_default_options[] = $configure_default_options;
12781 EOF
12782
12783 # Internationalization
12784 # If we haven't got the data from the intl directory,
12785 # assume NLS is disabled.
12786 USE_NLS=no
12787 LIBINTL=
12788 LIBINTL_DEP=
12789 INCINTL=
12790 XGETTEXT=
12791 GMSGFMT=
12792 POSUB=
12793
12794 if test -f  ../intl/config.intl; then
12795   .  ../intl/config.intl
12796 fi
12797 echo "$as_me:$LINENO: checking whether NLS is requested" >&5
12798 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
12799 if test x"$USE_NLS" != xyes; then
12800   echo "$as_me:$LINENO: result: no" >&5
12801 echo "${ECHO_T}no" >&6
12802 else
12803   echo "$as_me:$LINENO: result: yes" >&5
12804 echo "${ECHO_T}yes" >&6
12805
12806 cat >>confdefs.h <<\_ACEOF
12807 #define ENABLE_NLS 1
12808 _ACEOF
12809
12810
12811   echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
12812 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
12813   # Look for .po and .gmo files in the source directory.
12814   CATALOGS=
12815   XLINGUAS=
12816   for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
12817     # If there aren't any .gmo files the shell will give us the
12818     # literal string "../path/to/srcdir/po/*.gmo" which has to be
12819     # weeded out.
12820     case "$cat" in *\**)
12821       continue;;
12822     esac
12823     # The quadruple backslash is collapsed to a double backslash
12824     # by the backticks, then collapsed again by the double quotes,
12825     # leaving us with one backslash in the sed expression (right
12826     # before the dot that mustn't act as a wildcard).
12827     cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
12828     lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
12829     # The user is allowed to set LINGUAS to a list of languages to
12830     # install catalogs for.  If it's empty that means "all of them."
12831     if test "x$LINGUAS" = x; then
12832       CATALOGS="$CATALOGS $cat"
12833       XLINGUAS="$XLINGUAS $lang"
12834     else
12835       case "$LINGUAS" in *$lang*)
12836         CATALOGS="$CATALOGS $cat"
12837         XLINGUAS="$XLINGUAS $lang"
12838         ;;
12839       esac
12840     fi
12841   done
12842   LINGUAS="$XLINGUAS"
12843   echo "$as_me:$LINENO: result: $LINGUAS" >&5
12844 echo "${ECHO_T}$LINGUAS" >&6
12845
12846
12847     DATADIRNAME=share
12848
12849   INSTOBJEXT=.mo
12850
12851   GENCAT=gencat
12852
12853   CATOBJEXT=.gmo
12854
12855 fi
12856
12857 # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
12858 # -liconv on the link line twice.
12859 case "$LIBINTL" in *$LIBICONV*)
12860         LIBICONV= ;;
12861 esac
12862
12863 # Check whether --enable-secureplt or --disable-secureplt was given.
12864 if test "${enable_secureplt+set}" = set; then
12865   enableval="$enable_secureplt"
12866
12867 fi;
12868
12869 # Windows32 Registry support for specifying GCC installation paths.
12870 # Check whether --enable-win32-registry or --disable-win32-registry was given.
12871 if test "${enable_win32_registry+set}" = set; then
12872   enableval="$enable_win32_registry"
12873
12874 fi;
12875
12876 case $host_os in
12877   win32 | pe | cygwin* | mingw32* | uwin*)
12878     if test "x$enable_win32_registry" != xno; then
12879       echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
12880 echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6
12881 if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
12882   echo $ECHO_N "(cached) $ECHO_C" >&6
12883 else
12884   ac_func_search_save_LIBS=$LIBS
12885 ac_cv_search_RegOpenKeyExA=no
12886 cat >conftest.$ac_ext <<_ACEOF
12887 /* confdefs.h.  */
12888 _ACEOF
12889 cat confdefs.h >>conftest.$ac_ext
12890 cat >>conftest.$ac_ext <<_ACEOF
12891 /* end confdefs.h.  */
12892
12893 /* Override any gcc2 internal prototype to avoid an error.  */
12894 #ifdef __cplusplus
12895 extern "C"
12896 #endif
12897 /* We use char because int might match the return type of a gcc2
12898    builtin and then its argument prototype would still apply.  */
12899 char RegOpenKeyExA ();
12900 int
12901 main ()
12902 {
12903 RegOpenKeyExA ();
12904   ;
12905   return 0;
12906 }
12907 _ACEOF
12908 rm -f conftest.$ac_objext conftest$ac_exeext
12909 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12910   (eval $ac_link) 2>conftest.er1
12911   ac_status=$?
12912   grep -v '^ *+' conftest.er1 >conftest.err
12913   rm -f conftest.er1
12914   cat conftest.err >&5
12915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12916   (exit $ac_status); } &&
12917          { ac_try='test -z "$ac_c_werror_flag"
12918                          || test ! -s conftest.err'
12919   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12920   (eval $ac_try) 2>&5
12921   ac_status=$?
12922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12923   (exit $ac_status); }; } &&
12924          { ac_try='test -s conftest$ac_exeext'
12925   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12926   (eval $ac_try) 2>&5
12927   ac_status=$?
12928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12929   (exit $ac_status); }; }; then
12930   ac_cv_search_RegOpenKeyExA="none required"
12931 else
12932   echo "$as_me: failed program was:" >&5
12933 sed 's/^/| /' conftest.$ac_ext >&5
12934
12935 fi
12936 rm -f conftest.err conftest.$ac_objext \
12937       conftest$ac_exeext conftest.$ac_ext
12938 if test "$ac_cv_search_RegOpenKeyExA" = no; then
12939   for ac_lib in advapi32; do
12940     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12941     cat >conftest.$ac_ext <<_ACEOF
12942 /* confdefs.h.  */
12943 _ACEOF
12944 cat confdefs.h >>conftest.$ac_ext
12945 cat >>conftest.$ac_ext <<_ACEOF
12946 /* end confdefs.h.  */
12947
12948 /* Override any gcc2 internal prototype to avoid an error.  */
12949 #ifdef __cplusplus
12950 extern "C"
12951 #endif
12952 /* We use char because int might match the return type of a gcc2
12953    builtin and then its argument prototype would still apply.  */
12954 char RegOpenKeyExA ();
12955 int
12956 main ()
12957 {
12958 RegOpenKeyExA ();
12959   ;
12960   return 0;
12961 }
12962 _ACEOF
12963 rm -f conftest.$ac_objext conftest$ac_exeext
12964 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12965   (eval $ac_link) 2>conftest.er1
12966   ac_status=$?
12967   grep -v '^ *+' conftest.er1 >conftest.err
12968   rm -f conftest.er1
12969   cat conftest.err >&5
12970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12971   (exit $ac_status); } &&
12972          { ac_try='test -z "$ac_c_werror_flag"
12973                          || test ! -s conftest.err'
12974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12975   (eval $ac_try) 2>&5
12976   ac_status=$?
12977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12978   (exit $ac_status); }; } &&
12979          { ac_try='test -s conftest$ac_exeext'
12980   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12981   (eval $ac_try) 2>&5
12982   ac_status=$?
12983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12984   (exit $ac_status); }; }; then
12985   ac_cv_search_RegOpenKeyExA="-l$ac_lib"
12986 break
12987 else
12988   echo "$as_me: failed program was:" >&5
12989 sed 's/^/| /' conftest.$ac_ext >&5
12990
12991 fi
12992 rm -f conftest.err conftest.$ac_objext \
12993       conftest$ac_exeext conftest.$ac_ext
12994   done
12995 fi
12996 LIBS=$ac_func_search_save_LIBS
12997 fi
12998 echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
12999 echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6
13000 if test "$ac_cv_search_RegOpenKeyExA" != no; then
13001   test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS"
13002
13003 else
13004   enable_win32_registry=no
13005 fi
13006
13007     fi
13008
13009     if test "x$enable_win32_registry" != xno; then
13010
13011 cat >>confdefs.h <<\_ACEOF
13012 #define ENABLE_WIN32_REGISTRY 1
13013 _ACEOF
13014
13015
13016       if test "x$enable_win32_registry" != xyes \
13017          && test "x$enable_win32_registry" != x; then
13018
13019 cat >>confdefs.h <<_ACEOF
13020 #define WIN32_REGISTRY_KEY "$enable_win32_registry"
13021 _ACEOF
13022
13023       fi
13024     fi
13025   ;;
13026 esac
13027
13028 # Get an absolute path to the GCC top-level source directory
13029 holddir=`${PWDCMD-pwd}`
13030 cd $srcdir
13031 topdir=`${PWDCMD-pwd}`
13032 cd $holddir
13033
13034 # Conditionalize the makefile for this host machine.
13035 xmake_file=
13036 for f in ${host_xmake_file}
13037 do
13038         if test -f ${srcdir}/config/$f
13039         then
13040                 xmake_file="${xmake_file} \$(srcdir)/config/$f"
13041         fi
13042 done
13043
13044 # Conditionalize the makefile for this target machine.
13045 tmake_file_=
13046 for f in ${tmake_file}
13047 do
13048         if test -f ${srcdir}/config/$f
13049         then
13050                 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
13051         fi
13052 done
13053 tmake_file="${tmake_file_}"
13054
13055 # This is a terrible hack which will go away some day.
13056 host_cc_for_libada=${CC}
13057
13058
13059 out_object_file=`basename $out_file .c`.o
13060
13061 tm_file_list="options.h"
13062 tm_include_list="options.h"
13063 for f in $tm_file; do
13064   case $f in
13065     ./* )
13066        f=`echo $f | sed 's/^..//'`
13067        tm_file_list="${tm_file_list} $f"
13068        tm_include_list="${tm_include_list} $f"
13069        ;;
13070     defaults.h )
13071        tm_file_list="${tm_file_list} \$(srcdir)/$f"
13072        tm_include_list="${tm_include_list} $f"
13073        ;;
13074     * )
13075        tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
13076        tm_include_list="${tm_include_list} config/$f"
13077        ;;
13078   esac
13079 done
13080
13081 tm_p_file_list=
13082 tm_p_include_list=
13083 for f in $tm_p_file; do
13084   case $f in
13085     tm-preds.h )
13086        tm_p_file_list="${tm_p_file_list} $f"
13087        tm_p_include_list="${tm_p_include_list} $f"
13088        ;;
13089     * )
13090        tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
13091        tm_p_include_list="${tm_p_include_list} config/$f"
13092   esac
13093 done
13094
13095 xm_file_list=
13096 xm_include_list=
13097 for f in $xm_file; do
13098   case $f in
13099     ansidecl.h )
13100        xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
13101        xm_include_list="${xm_include_list} $f"
13102        ;;
13103     auto-host.h )
13104        xm_file_list="${xm_file_list} $f"
13105        xm_include_list="${xm_include_list} $f"
13106        ;;
13107     * )
13108        xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
13109        xm_include_list="${xm_include_list} config/$f"
13110        ;;
13111   esac
13112 done
13113
13114 host_xm_file_list=
13115 host_xm_include_list=
13116 for f in $host_xm_file; do
13117   case $f in
13118     ansidecl.h )
13119        host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
13120        host_xm_include_list="${host_xm_include_list} $f"
13121        ;;
13122     auto-host.h )
13123        host_xm_file_list="${host_xm_file_list} $f"
13124        host_xm_include_list="${host_xm_include_list} $f"
13125        ;;
13126     * )
13127        host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
13128        host_xm_include_list="${host_xm_include_list} config/$f"
13129        ;;
13130   esac
13131 done
13132
13133 build_xm_file_list=
13134 for f in $build_xm_file; do
13135   case $f in
13136     ansidecl.h )
13137        build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
13138        build_xm_include_list="${build_xm_include_list} $f"
13139        ;;
13140     auto-build.h | auto-host.h )
13141        build_xm_file_list="${build_xm_file_list} $f"
13142        build_xm_include_list="${build_xm_include_list} $f"
13143        ;;
13144     * )
13145        build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
13146        build_xm_include_list="${build_xm_include_list} config/$f"
13147        ;;
13148   esac
13149 done
13150
13151 # Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a
13152 # cross-compiler which does not use the native headers and libraries.
13153 # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
13154 CROSS=
13155 ALL=all.internal
13156 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
13157
13158 if test "x$with_build_sysroot" != x; then
13159   build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
13160 else
13161   # This value is used, even on a native system, because
13162   # CROSS_SYSTEM_HEADER_DIR is just
13163   # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
13164   build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
13165 fi
13166
13167 if test x$host != x$target
13168 then
13169         CROSS="-DCROSS_DIRECTORY_STRUCTURE"
13170         ALL=all.cross
13171         SYSTEM_HEADER_DIR=$build_system_header_dir
13172         case "$host","$target" in
13173         # Darwin crosses can use the host system's libraries and headers,
13174         # because of the fat library support.  Of course, it must be the
13175         # same version of Darwin on both sides.  Allow the user to
13176         # just say --target=foo-darwin without a version number to mean
13177         # "the version on this system".
13178             *-*-darwin*,*-*-darwin*)
13179                 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
13180                 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
13181                 if test $hostos = $targetos -o $targetos = darwin ; then
13182                     CROSS=
13183                     SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
13184                     with_headers=yes
13185                 fi
13186                 ;;
13187
13188             i?86-*-*,x86_64-*-* \
13189             | powerpc*-*-*,powerpc64*-*-*)
13190                 CROSS="$CROSS -DNATIVE_CROSS" ;;
13191         esac
13192 elif test "x$TARGET_SYSTEM_ROOT" != x; then
13193         SYSTEM_HEADER_DIR=$build_system_header_dir
13194 fi
13195
13196 # If this is a cross-compiler that does not
13197 # have its own set of headers then define
13198 # inhibit_libc
13199
13200 # If this is using newlib, without having the headers available now,
13201 # then define inhibit_libc in LIBGCC2_CFLAGS.
13202 # This prevents libgcc2 from containing any code which requires libc
13203 # support.
13204 inhibit_libc=false
13205 if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
13206        test x$with_newlib = xyes ; } &&
13207      { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
13208        inhibit_libc=true
13209 fi
13210
13211
13212 # When building gcc with a cross-compiler, we need to adjust things so
13213 # that the generator programs are still built with the native compiler.
13214 # Also, we cannot run fixincludes or fix-header.
13215
13216 # These are the normal (build=host) settings:
13217 CC_FOR_BUILD='$(CC)'
13218 BUILD_CFLAGS='$(ALL_CFLAGS)'
13219 STMP_FIXINC=stmp-fixinc
13220
13221 # Possibly disable fixproto, on a per-target basis.
13222 case ${use_fixproto} in
13223   no)
13224     STMP_FIXPROTO=
13225     ;;
13226   yes)
13227     STMP_FIXPROTO=stmp-fixproto
13228     ;;
13229 esac
13230
13231
13232 # And these apply if build != host, or we are generating coverage data
13233 if test x$build != x$host || test "x$coverage_flags" != x
13234 then
13235     BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
13236
13237     if test "x$TARGET_SYSTEM_ROOT" = x; then
13238         if test "x$STMP_FIXPROTO" != x; then
13239           STMP_FIXPROTO=stmp-install-fixproto
13240         fi
13241     fi
13242 fi
13243
13244 # Expand extra_headers to include complete path.
13245 # This substitutes for lots of t-* files.
13246 extra_headers_list=
13247 # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
13248 for file in ${extra_headers} ; do
13249   extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
13250 done
13251
13252 # Define collect2 in Makefile.
13253 case $host_can_use_collect2 in
13254   no) collect2= ;;
13255   *) collect2='collect2$(exeext)' ;;
13256 esac
13257
13258
13259 # Add a definition of USE_COLLECT2 if system wants one.
13260 case $use_collect2 in
13261   no) use_collect2= ;;
13262   "") ;;
13263   *)
13264     host_xm_defines="${host_xm_defines} USE_COLLECT2"
13265     xm_defines="${xm_defines} USE_COLLECT2"
13266     case $host_can_use_collect2 in
13267       no)
13268         { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
13269 echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
13270    { (exit 1); exit 1; }; }
13271         ;;
13272     esac
13273     ;;
13274 esac
13275
13276 # ---------------------------
13277 # Assembler & linker features
13278 # ---------------------------
13279
13280 # Identify the assembler which will work hand-in-glove with the newly
13281 # built GCC, so that we can examine its features.  This is the assembler
13282 # which will be driven by the driver program.
13283 #
13284 # If build != host, and we aren't building gas in-tree, we identify a
13285 # build->target assembler and hope that it will have the same features
13286 # as the host->target assembler we'll be using.
13287 gcc_cv_gas_major_version=
13288 gcc_cv_gas_minor_version=
13289 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
13290
13291 if test "${gcc_cv_as+set}" = set; then
13292   :
13293 else
13294
13295 if test -x "$DEFAULT_ASSEMBLER"; then
13296         gcc_cv_as="$DEFAULT_ASSEMBLER"
13297 elif test -f $gcc_cv_as_gas_srcdir/configure.in \
13298      && test -f ../gas/Makefile \
13299      && test x$build = x$host; then
13300         gcc_cv_as=../gas/as-new$build_exeext
13301 elif test -x as$build_exeext; then
13302         # Build using assembler in the current directory.
13303         gcc_cv_as=./as$build_exeext
13304 elif test -x $AS_FOR_TARGET; then
13305         gcc_cv_as="$AS_FOR_TARGET"
13306 else
13307         # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
13308 set dummy $AS_FOR_TARGET; ac_word=$2
13309 echo "$as_me:$LINENO: checking for $ac_word" >&5
13310 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13311 if test "${ac_cv_path_gcc_cv_as+set}" = set; then
13312   echo $ECHO_N "(cached) $ECHO_C" >&6
13313 else
13314   case $gcc_cv_as in
13315   [\\/]* | ?:[\\/]*)
13316   ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
13317   ;;
13318   *)
13319   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13320 for as_dir in $PATH
13321 do
13322   IFS=$as_save_IFS
13323   test -z "$as_dir" && as_dir=.
13324   for ac_exec_ext in '' $ac_executable_extensions; do
13325   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13326     ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
13327     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13328     break 2
13329   fi
13330 done
13331 done
13332
13333   ;;
13334 esac
13335 fi
13336 gcc_cv_as=$ac_cv_path_gcc_cv_as
13337
13338 if test -n "$gcc_cv_as"; then
13339   echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13340 echo "${ECHO_T}$gcc_cv_as" >&6
13341 else
13342   echo "$as_me:$LINENO: result: no" >&5
13343 echo "${ECHO_T}no" >&6
13344 fi
13345
13346 fi
13347 fi
13348
13349
13350 ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
13351
13352
13353 echo "$as_me:$LINENO: checking what assembler to use" >&5
13354 echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
13355 if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
13356   # Single tree build which includes gas.  We want to prefer it
13357   # over whatever linker top-level may have detected, since
13358   # we'll use what we're building after installation anyway.
13359   echo "$as_me:$LINENO: result: newly built gas" >&5
13360 echo "${ECHO_T}newly built gas" >&6
13361   in_tree_gas=yes
13362   gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
13363 for f in $gcc_cv_as_bfd_srcdir/configure \
13364          $gcc_cv_as_gas_srcdir/configure \
13365          $gcc_cv_as_gas_srcdir/configure.in \
13366          $gcc_cv_as_gas_srcdir/Makefile.in ; do
13367   gcc_cv_gas_version=`sed -n -e 's/^[   ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
13368   if test x$gcc_cv_gas_version != x; then
13369     break
13370   fi
13371 done
13372 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
13373 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13374 gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
13375 case $gcc_cv_gas_patch_version in
13376   "") gcc_cv_gas_patch_version="0" ;;
13377 esac
13378 gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
13379                             + $gcc_cv_gas_minor_version \) \* 1000 \
13380                             + $gcc_cv_gas_patch_version`
13381
13382   in_tree_gas_is_elf=no
13383   if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
13384      || (grep 'obj_format = multi' ../gas/Makefile \
13385          && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
13386   then
13387     in_tree_gas_is_elf=yes
13388   fi
13389 else
13390   echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13391 echo "${ECHO_T}$gcc_cv_as" >&6
13392   in_tree_gas=no
13393 fi
13394
13395 # Identify the linker which will work hand-in-glove with the newly
13396 # built GCC, so that we can examine its features.  This is the linker
13397 # which will be driven by the driver program.
13398 #
13399 # If build != host, and we aren't building gas in-tree, we identify a
13400 # build->target linker and hope that it will have the same features
13401 # as the host->target linker we'll be using.
13402 gcc_cv_gld_major_version=
13403 gcc_cv_gld_minor_version=
13404 gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
13405 gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
13406
13407 if test "${gcc_cv_ld+set}" = set; then
13408   :
13409 else
13410
13411 if test -x "$DEFAULT_LINKER"; then
13412         gcc_cv_ld="$DEFAULT_LINKER"
13413 elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
13414      && test -f ../ld/Makefile \
13415      && test x$build = x$host; then
13416         gcc_cv_ld=../ld/ld-new$build_exeext
13417 elif test -x collect-ld$build_exeext; then
13418         # Build using linker in the current directory.
13419         gcc_cv_ld=./collect-ld$build_exeext
13420 elif test -x $LD_FOR_TARGET; then
13421         gcc_cv_ld="$LD_FOR_TARGET"
13422 else
13423         # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
13424 set dummy $LD_FOR_TARGET; ac_word=$2
13425 echo "$as_me:$LINENO: checking for $ac_word" >&5
13426 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13427 if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
13428   echo $ECHO_N "(cached) $ECHO_C" >&6
13429 else
13430   case $gcc_cv_ld in
13431   [\\/]* | ?:[\\/]*)
13432   ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
13433   ;;
13434   *)
13435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13436 for as_dir in $PATH
13437 do
13438   IFS=$as_save_IFS
13439   test -z "$as_dir" && as_dir=.
13440   for ac_exec_ext in '' $ac_executable_extensions; do
13441   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13442     ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
13443     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13444     break 2
13445   fi
13446 done
13447 done
13448
13449   ;;
13450 esac
13451 fi
13452 gcc_cv_ld=$ac_cv_path_gcc_cv_ld
13453
13454 if test -n "$gcc_cv_ld"; then
13455   echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13456 echo "${ECHO_T}$gcc_cv_ld" >&6
13457 else
13458   echo "$as_me:$LINENO: result: no" >&5
13459 echo "${ECHO_T}no" >&6
13460 fi
13461
13462 fi
13463 fi
13464
13465
13466 ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
13467
13468
13469 echo "$as_me:$LINENO: checking what linker to use" >&5
13470 echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
13471 if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
13472         # Single tree build which includes ld.  We want to prefer it
13473         # over whatever linker top-level may have detected, since
13474         # we'll use what we're building after installation anyway.
13475         echo "$as_me:$LINENO: result: newly built ld" >&5
13476 echo "${ECHO_T}newly built ld" >&6
13477         in_tree_ld=yes
13478         in_tree_ld_is_elf=no
13479         if (grep 'EMUL = .*elf' ../ld/Makefile \
13480             || grep 'EMUL = .*linux' ../ld/Makefile \
13481             || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
13482           in_tree_ld_is_elf=yes
13483         fi
13484         for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in
13485         do
13486                 gcc_cv_gld_version=`sed -n -e 's/^[     ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
13487                 if test x$gcc_cv_gld_version != x; then
13488                         break
13489                 fi
13490         done
13491         gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
13492         gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13493 else
13494         echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13495 echo "${ECHO_T}$gcc_cv_ld" >&6
13496         in_tree_ld=no
13497 fi
13498
13499 # Figure out what nm we will be using.
13500 gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
13501 if test "${gcc_cv_nm+set}" = set; then
13502   :
13503 else
13504
13505 if test -f $gcc_cv_binutils_srcdir/configure.in \
13506      && test -f ../binutils/Makefile \
13507      && test x$build = x$host; then
13508         gcc_cv_nm=../binutils/nm-new$build_exeext
13509 elif test -x nm$build_exeext; then
13510         gcc_cv_nm=./nm$build_exeext
13511 elif test -x $NM_FOR_TARGET; then
13512         gcc_cv_nm="$NM_FOR_TARGET"
13513 else
13514         # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
13515 set dummy $NM_FOR_TARGET; ac_word=$2
13516 echo "$as_me:$LINENO: checking for $ac_word" >&5
13517 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13518 if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
13519   echo $ECHO_N "(cached) $ECHO_C" >&6
13520 else
13521   case $gcc_cv_nm in
13522   [\\/]* | ?:[\\/]*)
13523   ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
13524   ;;
13525   *)
13526   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13527 for as_dir in $PATH
13528 do
13529   IFS=$as_save_IFS
13530   test -z "$as_dir" && as_dir=.
13531   for ac_exec_ext in '' $ac_executable_extensions; do
13532   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13533     ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
13534     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13535     break 2
13536   fi
13537 done
13538 done
13539
13540   ;;
13541 esac
13542 fi
13543 gcc_cv_nm=$ac_cv_path_gcc_cv_nm
13544
13545 if test -n "$gcc_cv_nm"; then
13546   echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13547 echo "${ECHO_T}$gcc_cv_nm" >&6
13548 else
13549   echo "$as_me:$LINENO: result: no" >&5
13550 echo "${ECHO_T}no" >&6
13551 fi
13552
13553 fi
13554 fi
13555
13556
13557 echo "$as_me:$LINENO: checking what nm to use" >&5
13558 echo $ECHO_N "checking what nm to use... $ECHO_C" >&6
13559 if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
13560         # Single tree build which includes binutils.
13561         echo "$as_me:$LINENO: result: newly built nm" >&5
13562 echo "${ECHO_T}newly built nm" >&6
13563         in_tree_nm=yes
13564 else
13565         echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
13566 echo "${ECHO_T}$gcc_cv_nm" >&6
13567         in_tree_nm=no
13568 fi
13569
13570 ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
13571
13572
13573 # Figure out what objdump we will be using.
13574 if test "${gcc_cv_objdump+set}" = set; then
13575   :
13576 else
13577
13578 if test -f $gcc_cv_binutils_srcdir/configure.in \
13579      && test -f ../binutils/Makefile \
13580      && test x$build = x$host; then
13581         # Single tree build which includes binutils.
13582         gcc_cv_objdump=../binutils/objdump$build_exeext
13583 elif test -x objdump$build_exeext; then
13584         gcc_cv_objdump=./objdump$build_exeext
13585 elif test -x $OBJDUMP_FOR_TARGET; then
13586         gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
13587 else
13588         # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
13589 set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
13590 echo "$as_me:$LINENO: checking for $ac_word" >&5
13591 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13592 if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
13593   echo $ECHO_N "(cached) $ECHO_C" >&6
13594 else
13595   case $gcc_cv_objdump in
13596   [\\/]* | ?:[\\/]*)
13597   ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
13598   ;;
13599   *)
13600   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13601 for as_dir in $PATH
13602 do
13603   IFS=$as_save_IFS
13604   test -z "$as_dir" && as_dir=.
13605   for ac_exec_ext in '' $ac_executable_extensions; do
13606   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13607     ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
13608     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13609     break 2
13610   fi
13611 done
13612 done
13613
13614   ;;
13615 esac
13616 fi
13617 gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
13618
13619 if test -n "$gcc_cv_objdump"; then
13620   echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13621 echo "${ECHO_T}$gcc_cv_objdump" >&6
13622 else
13623   echo "$as_me:$LINENO: result: no" >&5
13624 echo "${ECHO_T}no" >&6
13625 fi
13626
13627 fi
13628 fi
13629
13630
13631 echo "$as_me:$LINENO: checking what objdump to use" >&5
13632 echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6
13633 if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
13634         # Single tree build which includes binutils.
13635         echo "$as_me:$LINENO: result: newly built objdump" >&5
13636 echo "${ECHO_T}newly built objdump" >&6
13637 elif test x$gcc_cv_objdump = x; then
13638         echo "$as_me:$LINENO: result: not found" >&5
13639 echo "${ECHO_T}not found" >&6
13640 else
13641         echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
13642 echo "${ECHO_T}$gcc_cv_objdump" >&6
13643 fi
13644
13645 # Figure out what assembler alignment features are present.
13646 echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
13647 echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6
13648 if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
13649   echo $ECHO_N "(cached) $ECHO_C" >&6
13650 else
13651   gcc_cv_as_balign_and_p2align=no
13652     if test $in_tree_gas = yes; then
13653     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
13654   then gcc_cv_as_balign_and_p2align=yes
13655 fi
13656   elif test x$gcc_cv_as != x; then
13657     echo '.balign 4
13658 .p2align 2' > conftest.s
13659     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
13660   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13661   (eval $ac_try) 2>&5
13662   ac_status=$?
13663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13664   (exit $ac_status); }; }
13665     then
13666         gcc_cv_as_balign_and_p2align=yes
13667     else
13668       echo "configure: failed program was" >&5
13669       cat conftest.s >&5
13670     fi
13671     rm -f conftest.o conftest.s
13672   fi
13673 fi
13674 echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
13675 echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6
13676 if test $gcc_cv_as_balign_and_p2align = yes; then
13677
13678 cat >>confdefs.h <<\_ACEOF
13679 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
13680 _ACEOF
13681
13682 fi
13683
13684 echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
13685 echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6
13686 if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
13687   echo $ECHO_N "(cached) $ECHO_C" >&6
13688 else
13689   gcc_cv_as_max_skip_p2align=no
13690     if test $in_tree_gas = yes; then
13691     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13692   then gcc_cv_as_max_skip_p2align=yes
13693 fi
13694   elif test x$gcc_cv_as != x; then
13695     echo '.p2align 4,,7' > conftest.s
13696     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
13697   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13698   (eval $ac_try) 2>&5
13699   ac_status=$?
13700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13701   (exit $ac_status); }; }
13702     then
13703         gcc_cv_as_max_skip_p2align=yes
13704     else
13705       echo "configure: failed program was" >&5
13706       cat conftest.s >&5
13707     fi
13708     rm -f conftest.o conftest.s
13709   fi
13710 fi
13711 echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
13712 echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6
13713 if test $gcc_cv_as_max_skip_p2align = yes; then
13714
13715 cat >>confdefs.h <<\_ACEOF
13716 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
13717 _ACEOF
13718
13719 fi
13720
13721 echo "$as_me:$LINENO: checking assembler for .literal16" >&5
13722 echo $ECHO_N "checking assembler for .literal16... $ECHO_C" >&6
13723 if test "${gcc_cv_as_literal16+set}" = set; then
13724   echo $ECHO_N "(cached) $ECHO_C" >&6
13725 else
13726   gcc_cv_as_literal16=no
13727     if test $in_tree_gas = yes; then
13728     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
13729   then gcc_cv_as_literal16=yes
13730 fi
13731   elif test x$gcc_cv_as != x; then
13732     echo '.literal16' > conftest.s
13733     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
13734   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13735   (eval $ac_try) 2>&5
13736   ac_status=$?
13737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13738   (exit $ac_status); }; }
13739     then
13740         gcc_cv_as_literal16=yes
13741     else
13742       echo "configure: failed program was" >&5
13743       cat conftest.s >&5
13744     fi
13745     rm -f conftest.o conftest.s
13746   fi
13747 fi
13748 echo "$as_me:$LINENO: result: $gcc_cv_as_literal16" >&5
13749 echo "${ECHO_T}$gcc_cv_as_literal16" >&6
13750 if test $gcc_cv_as_literal16 = yes; then
13751
13752 cat >>confdefs.h <<\_ACEOF
13753 #define HAVE_GAS_LITERAL16 1
13754 _ACEOF
13755
13756 fi
13757
13758 echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
13759 echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6
13760 if test "${gcc_cv_as_subsection_m1+set}" = set; then
13761   echo $ECHO_N "(cached) $ECHO_C" >&6
13762 else
13763   gcc_cv_as_subsection_m1=no
13764     if test $in_tree_gas = yes; then
13765     if test $in_tree_gas_is_elf = yes \
13766   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
13767   then gcc_cv_as_subsection_m1=yes
13768 fi
13769   elif test x$gcc_cv_as != x; then
13770     echo 'conftest_label1: .word 0
13771 .subsection -1
13772 conftest_label2: .word 0
13773 .previous' > conftest.s
13774     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
13775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13776   (eval $ac_try) 2>&5
13777   ac_status=$?
13778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13779   (exit $ac_status); }; }
13780     then
13781         if test x$gcc_cv_nm != x; then
13782     $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
13783     $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
13784     if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
13785     then :
13786     else gcc_cv_as_subsection_m1=yes
13787     fi
13788     rm -f conftest.nm1 conftest.nm2
13789   fi
13790     else
13791       echo "configure: failed program was" >&5
13792       cat conftest.s >&5
13793     fi
13794     rm -f conftest.o conftest.s
13795   fi
13796 fi
13797 echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
13798 echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6
13799 if test $gcc_cv_as_subsection_m1 = yes; then
13800
13801 cat >>confdefs.h <<\_ACEOF
13802 #define HAVE_GAS_SUBSECTION_ORDERING 1
13803 _ACEOF
13804
13805 fi
13806
13807 echo "$as_me:$LINENO: checking assembler for .weak" >&5
13808 echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6
13809 if test "${gcc_cv_as_weak+set}" = set; then
13810   echo $ECHO_N "(cached) $ECHO_C" >&6
13811 else
13812   gcc_cv_as_weak=no
13813     if test $in_tree_gas = yes; then
13814     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
13815   then gcc_cv_as_weak=yes
13816 fi
13817   elif test x$gcc_cv_as != x; then
13818     echo '      .weak foobar' > conftest.s
13819     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
13820   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13821   (eval $ac_try) 2>&5
13822   ac_status=$?
13823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13824   (exit $ac_status); }; }
13825     then
13826         gcc_cv_as_weak=yes
13827     else
13828       echo "configure: failed program was" >&5
13829       cat conftest.s >&5
13830     fi
13831     rm -f conftest.o conftest.s
13832   fi
13833 fi
13834 echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
13835 echo "${ECHO_T}$gcc_cv_as_weak" >&6
13836 if test $gcc_cv_as_weak = yes; then
13837
13838 cat >>confdefs.h <<\_ACEOF
13839 #define HAVE_GAS_WEAK 1
13840 _ACEOF
13841
13842 fi
13843
13844 echo "$as_me:$LINENO: checking assembler for .weakref" >&5
13845 echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6
13846 if test "${gcc_cv_as_weakref+set}" = set; then
13847   echo $ECHO_N "(cached) $ECHO_C" >&6
13848 else
13849   gcc_cv_as_weakref=no
13850     if test $in_tree_gas = yes; then
13851     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
13852   then gcc_cv_as_weakref=yes
13853 fi
13854   elif test x$gcc_cv_as != x; then
13855     echo '      .weakref foobar, barfnot' > conftest.s
13856     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
13857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13858   (eval $ac_try) 2>&5
13859   ac_status=$?
13860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13861   (exit $ac_status); }; }
13862     then
13863         gcc_cv_as_weakref=yes
13864     else
13865       echo "configure: failed program was" >&5
13866       cat conftest.s >&5
13867     fi
13868     rm -f conftest.o conftest.s
13869   fi
13870 fi
13871 echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5
13872 echo "${ECHO_T}$gcc_cv_as_weakref" >&6
13873 if test $gcc_cv_as_weakref = yes; then
13874
13875 cat >>confdefs.h <<\_ACEOF
13876 #define HAVE_GAS_WEAKREF 1
13877 _ACEOF
13878
13879 fi
13880
13881 echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
13882 echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6
13883 if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
13884   echo $ECHO_N "(cached) $ECHO_C" >&6
13885 else
13886   gcc_cv_as_nsubspa_comdat=no
13887     if test $in_tree_gas = yes; then
13888     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
13889   then gcc_cv_as_nsubspa_comdat=yes
13890 fi
13891   elif test x$gcc_cv_as != x; then
13892     echo '      .SPACE $TEXT$
13893         .NSUBSPA $CODE$,COMDAT' > conftest.s
13894     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
13895   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13896   (eval $ac_try) 2>&5
13897   ac_status=$?
13898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13899   (exit $ac_status); }; }
13900     then
13901         gcc_cv_as_nsubspa_comdat=yes
13902     else
13903       echo "configure: failed program was" >&5
13904       cat conftest.s >&5
13905     fi
13906     rm -f conftest.o conftest.s
13907   fi
13908 fi
13909 echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
13910 echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6
13911 if test $gcc_cv_as_nsubspa_comdat = yes; then
13912
13913 cat >>confdefs.h <<\_ACEOF
13914 #define HAVE_GAS_NSUBSPA_COMDAT 1
13915 _ACEOF
13916
13917 fi
13918
13919 # .hidden needs to be supported in both the assembler and the linker,
13920 # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
13921 # This is irritatingly difficult to feature test for; we have to check the
13922 # date string after the version number.  If we've got an in-tree
13923 # ld, we don't know its patchlevel version, so we set the baseline at 2.13
13924 # to be safe.
13925 # The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
13926 echo "$as_me:$LINENO: checking assembler for .hidden" >&5
13927 echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6
13928 if test "${gcc_cv_as_hidden+set}" = set; then
13929   echo $ECHO_N "(cached) $ECHO_C" >&6
13930 else
13931   gcc_cv_as_hidden=no
13932     if test $in_tree_gas = yes; then
13933     if test $in_tree_gas_is_elf = yes \
13934   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
13935   then gcc_cv_as_hidden=yes
13936 fi
13937   elif test x$gcc_cv_as != x; then
13938     echo '      .hidden foobar
13939 foobar:' > conftest.s
13940     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
13941   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13942   (eval $ac_try) 2>&5
13943   ac_status=$?
13944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13945   (exit $ac_status); }; }
13946     then
13947         gcc_cv_as_hidden=yes
13948     else
13949       echo "configure: failed program was" >&5
13950       cat conftest.s >&5
13951     fi
13952     rm -f conftest.o conftest.s
13953   fi
13954 fi
13955 echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
13956 echo "${ECHO_T}$gcc_cv_as_hidden" >&6
13957
13958
13959 echo "$as_me:$LINENO: checking linker for .hidden support" >&5
13960 echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6
13961 if test "${gcc_cv_ld_hidden+set}" = set; then
13962   echo $ECHO_N "(cached) $ECHO_C" >&6
13963 else
13964   if test $in_tree_ld = yes ; then
13965   gcc_cv_ld_hidden=no
13966   if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 13 -o "$gcc_cv_gld_major_version" -gt 2 \
13967      && test $in_tree_ld_is_elf = yes; then
13968      gcc_cv_ld_hidden=yes
13969   fi
13970 else
13971   gcc_cv_ld_hidden=yes
13972   ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
13973   if echo "$ld_ver" | grep GNU > /dev/null; then
13974     ld_vers=`echo $ld_ver | sed -n \
13975         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13976         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13977         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
13978         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\)[  ].*$,\1,p' \
13979         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[     ].*$,\1,p' \
13980         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[       ].*$,\1,p' \
13981         -e 's,^.*[       ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[   -].*$,\1,p'`
13982     ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
13983     ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
13984     ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
13985     ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
13986     if test 0"$ld_date" -lt 20020404; then
13987       if test -n "$ld_date"; then
13988         # If there was date string, but was earlier than 2002-04-04, fail
13989         gcc_cv_ld_hidden=no
13990       elif test -z "$ld_vers"; then
13991         # If there was no date string nor ld version number, something is wrong
13992         gcc_cv_ld_hidden=no
13993       else
13994         test -z "$ld_vers_patch" && ld_vers_patch=0
13995         if test "$ld_vers_major" -lt 2; then
13996           gcc_cv_ld_hidden=no
13997         elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
13998           gcc_cv_ld_hidden="no"
13999         elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
14000           gcc_cv_ld_hidden=no
14001         fi
14002       fi
14003     fi
14004   else
14005     case "${target}" in
14006       hppa64*-*-hpux* | ia64*-*-hpux*)
14007         gcc_cv_ld_hidden=yes
14008         ;;
14009       *)
14010         gcc_cv_ld_hidden=no
14011         ;;
14012     esac
14013   fi
14014 fi
14015 fi
14016 echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
14017 echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
14018 libgcc_visibility=no
14019
14020
14021 if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
14022   libgcc_visibility=yes
14023
14024 cat >>confdefs.h <<\_ACEOF
14025 #define HAVE_GAS_HIDDEN 1
14026 _ACEOF
14027
14028 fi
14029
14030 # Check if we have .[us]leb128, and support symbol arithmetic with it.
14031 echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
14032 echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6
14033 if test "${gcc_cv_as_leb128+set}" = set; then
14034   echo $ECHO_N "(cached) $ECHO_C" >&6
14035 else
14036   gcc_cv_as_leb128=no
14037     if test $in_tree_gas = yes; then
14038     if test $in_tree_gas_is_elf = yes \
14039   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14040   then gcc_cv_as_leb128=yes
14041 fi
14042   elif test x$gcc_cv_as != x; then
14043     echo '      .data
14044         .uleb128 L2 - L1
14045 L1:
14046         .uleb128 1280
14047         .sleb128 -1010
14048 L2:' > conftest.s
14049     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
14050   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14051   (eval $ac_try) 2>&5
14052   ac_status=$?
14053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14054   (exit $ac_status); }; }
14055     then
14056         # GAS versions before 2.11 do not support uleb128,
14057   # despite appearing to.
14058   # ??? There exists an elf-specific test that will crash
14059   # the assembler.  Perhaps it's better to figure out whether
14060   # arbitrary sections are supported and try the test.
14061   as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
14062   if echo "$as_ver" | grep GNU > /dev/null; then
14063     as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
14064     as_major=`echo $as_ver | sed 's/\..*//'`
14065     as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
14066     if test $as_major -eq 2 && test $as_minor -lt 11
14067     then :
14068     else gcc_cv_as_leb128=yes
14069     fi
14070   fi
14071     else
14072       echo "configure: failed program was" >&5
14073       cat conftest.s >&5
14074     fi
14075     rm -f conftest.o conftest.s
14076   fi
14077 fi
14078 echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
14079 echo "${ECHO_T}$gcc_cv_as_leb128" >&6
14080 if test $gcc_cv_as_leb128 = yes; then
14081
14082 cat >>confdefs.h <<\_ACEOF
14083 #define HAVE_AS_LEB128 1
14084 _ACEOF
14085
14086 fi
14087
14088 # GAS versions up to and including 2.11.0 may mis-optimize
14089 # .eh_frame data.
14090 echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
14091 echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6
14092 if test "${gcc_cv_as_eh_frame+set}" = set; then
14093   echo $ECHO_N "(cached) $ECHO_C" >&6
14094 else
14095   gcc_cv_as_eh_frame=no
14096     if test $in_tree_gas = yes; then
14097     if test $in_tree_gas_is_elf = yes \
14098   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14099   then gcc_cv_as_eh_frame=yes
14100 fi
14101   elif test x$gcc_cv_as != x; then
14102     echo '      .text
14103 .LFB1:
14104         .4byte  0
14105 .L1:
14106         .4byte  0
14107 .LFE1:
14108         .section        .eh_frame,"aw",@progbits
14109 __FRAME_BEGIN__:
14110         .4byte  .LECIE1-.LSCIE1
14111 .LSCIE1:
14112         .4byte  0x0
14113         .byte   0x1
14114         .ascii "z\0"
14115         .byte   0x1
14116         .byte   0x78
14117         .byte   0x1a
14118         .byte   0x0
14119         .byte   0x4
14120         .4byte  1
14121         .p2align 1
14122 .LECIE1:
14123 .LSFDE1:
14124         .4byte  .LEFDE1-.LASFDE1
14125 .LASFDE1:
14126         .4byte  .LASFDE1-__FRAME_BEGIN__
14127         .4byte  .LFB1
14128         .4byte  .LFE1-.LFB1
14129         .byte   0x4
14130         .4byte  .LFE1-.LFB1
14131         .byte   0x4
14132         .4byte  .L1-.LFB1
14133 .LEFDE1:' > conftest.s
14134     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
14135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14136   (eval $ac_try) 2>&5
14137   ac_status=$?
14138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14139   (exit $ac_status); }; }
14140     then
14141           cat > conftest.lit <<EOF
14142  0000 10000000 00000000 017a0001 781a0004  .........z..x...
14143  0010 01000000 12000000 18000000 00000000  ................
14144  0020 08000000 04080000 0044               .........D      
14145 EOF
14146 cat > conftest.big <<EOF
14147  0000 00000010 00000000 017a0001 781a0004  .........z..x...
14148  0010 00000001 00000012 00000018 00000000  ................
14149  0020 00000008 04000000 0844               .........D      
14150 EOF
14151   # If the assembler didn't choke, and we can objdump,
14152   # and we got the correct data, then succeed.
14153   # The text in the here-document typically retains its unix-style line
14154   # endings, while the output of objdump will use host line endings.
14155   # Therefore, use diff -b for the comparisons.
14156   if test x$gcc_cv_objdump != x \
14157   && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
14158      | tail -3 > conftest.got \
14159   && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
14160     || diff -b conftest.big conftest.got > /dev/null 2>&1; }
14161   then
14162     gcc_cv_as_eh_frame=yes
14163   elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
14164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14165   (eval $ac_try) 2>&5
14166   ac_status=$?
14167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14168   (exit $ac_status); }; }; then
14169     gcc_cv_as_eh_frame=buggy
14170   else
14171     # Uh oh, what do we do now?
14172     gcc_cv_as_eh_frame=no
14173   fi
14174     else
14175       echo "configure: failed program was" >&5
14176       cat conftest.s >&5
14177     fi
14178     rm -f conftest.o conftest.s
14179   fi
14180 fi
14181 echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
14182 echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6
14183
14184
14185 if test $gcc_cv_as_eh_frame = buggy; then
14186
14187 cat >>confdefs.h <<\_ACEOF
14188 #define USE_AS_TRADITIONAL_FORMAT 1
14189 _ACEOF
14190
14191 fi
14192
14193 echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14194 echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
14195 if test "${gcc_cv_as_shf_merge+set}" = set; then
14196   echo $ECHO_N "(cached) $ECHO_C" >&6
14197 else
14198   gcc_cv_as_shf_merge=no
14199     if test $in_tree_gas = yes; then
14200     if test $in_tree_gas_is_elf = yes \
14201   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14202   then gcc_cv_as_shf_merge=yes
14203 fi
14204   elif test x$gcc_cv_as != x; then
14205     echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
14206     if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14208   (eval $ac_try) 2>&5
14209   ac_status=$?
14210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14211   (exit $ac_status); }; }
14212     then
14213         gcc_cv_as_shf_merge=yes
14214     else
14215       echo "configure: failed program was" >&5
14216       cat conftest.s >&5
14217     fi
14218     rm -f conftest.o conftest.s
14219   fi
14220 fi
14221 echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14222 echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
14223
14224 if test $gcc_cv_as_shf_merge = no; then
14225   echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14226 echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6
14227 if test "${gcc_cv_as_shf_merge+set}" = set; then
14228   echo $ECHO_N "(cached) $ECHO_C" >&6
14229 else
14230   gcc_cv_as_shf_merge=no
14231     if test $in_tree_gas = yes; then
14232     if test $in_tree_gas_is_elf = yes \
14233   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14234   then gcc_cv_as_shf_merge=yes
14235 fi
14236   elif test x$gcc_cv_as != x; then
14237     echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
14238     if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14240   (eval $ac_try) 2>&5
14241   ac_status=$?
14242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14243   (exit $ac_status); }; }
14244     then
14245         gcc_cv_as_shf_merge=yes
14246     else
14247       echo "configure: failed program was" >&5
14248       cat conftest.s >&5
14249     fi
14250     rm -f conftest.o conftest.s
14251   fi
14252 fi
14253 echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14254 echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6
14255
14256 fi
14257
14258 cat >>confdefs.h <<_ACEOF
14259 #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
14260 _ACEOF
14261
14262
14263 echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14264 echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
14265 if test "${gcc_cv_as_comdat_group+set}" = set; then
14266   echo $ECHO_N "(cached) $ECHO_C" >&6
14267 else
14268   gcc_cv_as_comdat_group=no
14269     if test $in_tree_gas = yes; then
14270     if test $in_tree_gas_is_elf = yes \
14271   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
14272   then gcc_cv_as_comdat_group=yes
14273 fi
14274   elif test x$gcc_cv_as != x; then
14275     echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
14276     if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14278   (eval $ac_try) 2>&5
14279   ac_status=$?
14280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14281   (exit $ac_status); }; }
14282     then
14283         gcc_cv_as_comdat_group=yes
14284     else
14285       echo "configure: failed program was" >&5
14286       cat conftest.s >&5
14287     fi
14288     rm -f conftest.o conftest.s
14289   fi
14290 fi
14291 echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
14292 echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6
14293
14294 if test $gcc_cv_as_comdat_group = yes; then
14295   gcc_cv_as_comdat_group_percent=no
14296 else
14297  echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14298 echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6
14299 if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
14300   echo $ECHO_N "(cached) $ECHO_C" >&6
14301 else
14302   gcc_cv_as_comdat_group_percent=no
14303     if test $in_tree_gas = yes; then
14304     if test $in_tree_gas_is_elf = yes \
14305   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
14306   then gcc_cv_as_comdat_group_percent=yes
14307 fi
14308   elif test x$gcc_cv_as != x; then
14309     echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
14310     if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14312   (eval $ac_try) 2>&5
14313   ac_status=$?
14314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14315   (exit $ac_status); }; }
14316     then
14317         gcc_cv_as_comdat_group_percent=yes
14318     else
14319       echo "configure: failed program was" >&5
14320       cat conftest.s >&5
14321     fi
14322     rm -f conftest.o conftest.s
14323   fi
14324 fi
14325 echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
14326 echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6
14327
14328 fi
14329 if test $in_tree_ld != yes && test x"$ld_vers" != x; then
14330   comdat_group=yes
14331   if test 0"$ld_date" -lt 20050308; then
14332     if test -n "$ld_date"; then
14333       # If there was date string, but was earlier than 2005-03-08, fail
14334       comdat_group=no
14335     elif test "$ld_vers_major" -lt 2; then
14336       comdat_group=no
14337     elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
14338       comdat_group=no
14339     fi
14340   fi
14341 else
14342   # assume linkers other than GNU ld don't support COMDAT group
14343   comdat_group=no
14344 fi
14345 if test $comdat_group = no; then
14346   gcc_cv_as_comdat_group=no
14347   gcc_cv_as_comdat_group_percent=no
14348 fi
14349
14350 cat >>confdefs.h <<_ACEOF
14351 #define HAVE_COMDAT_GROUP `if test $gcc_cv_as_comdat_group = yes || test $gcc_cv_as_comdat_group_percent = yes; then echo 1; else echo 0; fi`
14352 _ACEOF
14353
14354
14355 # Thread-local storage - the check is heavily parametrized.
14356 conftest_s=
14357 tls_first_major=
14358 tls_first_minor=
14359 tls_as_opt=
14360 case "$target" in
14361   alpha*-*-*)
14362     conftest_s='
14363         .section ".tdata","awT",@progbits
14364 foo:    .long   25
14365         .text
14366         ldq     $27,__tls_get_addr($29)         !literal!1
14367         lda     $16,foo($29)                    !tlsgd!1
14368         jsr     $26,($27),__tls_get_addr        !lituse_tlsgd!1
14369         ldq     $27,__tls_get_addr($29)         !literal!2
14370         lda     $16,foo($29)                    !tlsldm!2
14371         jsr     $26,($27),__tls_get_addr        !lituse_tlsldm!2
14372         ldq     $1,foo($29)                     !gotdtprel
14373         ldah    $2,foo($29)                     !dtprelhi
14374         lda     $3,foo($2)                      !dtprello
14375         lda     $4,foo($29)                     !dtprel
14376         ldq     $1,foo($29)                     !gottprel
14377         ldah    $2,foo($29)                     !tprelhi
14378         lda     $3,foo($2)                      !tprello
14379         lda     $4,foo($29)                     !tprel'
14380         tls_first_major=2
14381         tls_first_minor=13
14382         tls_as_opt=--fatal-warnings
14383         ;;
14384   frv*-*-*)
14385     conftest_s='
14386         .section ".tdata","awT",@progbits
14387 x:      .long   25
14388         .text
14389         call    #gettlsoff(x)'
14390         tls_first_major=2
14391         tls_first_minor=14
14392         ;;
14393   hppa*-*-linux*)
14394     conftest_s='
14395 t1:     .reg    %r20
14396 t2:     .reg    %r21
14397 gp:     .reg    %r19
14398         .section ".tdata","awT",@progbits
14399 foo:    .long   25
14400         .text
14401         .align  4
14402         addil LT%foo-$tls_gdidx$,gp
14403         ldo RT%foo-$tls_gdidx$(%r1),%arg0
14404         b __tls_get_addr
14405         nop
14406         addil LT%foo-$tls_ldidx$,gp
14407         b __tls_get_addr
14408         ldo RT%foo-$tls_ldidx$(%r1),%arg0
14409         addil LR%foo-$tls_dtpoff$,%ret0
14410         ldo RR%foo-$tls_dtpoff$(%r1),%t1
14411         mfctl %cr27,%t1
14412         addil LT%foo-$tls_ieoff$,gp
14413         ldw RT%foo-$tls_ieoff$(%r1),%t2
14414         add %t1,%t2,%t3
14415         mfctl %cr27,%t1
14416         addil LR%foo-$tls_leoff$,%t1
14417         ldo RR%foo-$tls_leoff$(%r1),%t2'
14418         tls_first_major=2
14419         tls_first_minor=15
14420         tls_as_opt=--fatal-warnings
14421         ;;
14422   arm*-*-*)
14423     conftest_s='
14424         .section ".tdata","awT",%progbits
14425 foo:    .long   25
14426         .text
14427 .word foo(gottpoff)
14428 .word foo(tpoff)
14429 .word foo(tlsgd)
14430 .word foo(tlsldm)
14431 .word foo(tlsldo)'
14432         tls_first_major=2
14433         tls_first_minor=17
14434         ;;
14435   i[34567]86-*-*)
14436     conftest_s='
14437         .section ".tdata","awT",@progbits
14438 foo:    .long   25
14439         .text
14440         movl    %gs:0, %eax
14441         leal    foo@TLSGD(,%ebx,1), %eax
14442         leal    foo@TLSLDM(%ebx), %eax
14443         leal    foo@DTPOFF(%eax), %edx
14444         movl    foo@GOTTPOFF(%ebx), %eax
14445         subl    foo@GOTTPOFF(%ebx), %eax
14446         addl    foo@GOTNTPOFF(%ebx), %eax
14447         movl    foo@INDNTPOFF, %eax
14448         movl    $foo@TPOFF, %eax
14449         subl    $foo@TPOFF, %eax
14450         leal    foo@NTPOFF(%ecx), %eax'
14451         tls_first_major=2
14452         tls_first_minor=14
14453         tls_as_opt=--fatal-warnings
14454         ;;
14455   x86_64-*-*)
14456     conftest_s='
14457         .section ".tdata","awT",@progbits
14458 foo:    .long   25
14459         .text
14460         movq    %fs:0, %rax
14461         leaq    foo@TLSGD(%rip), %rdi
14462         leaq    foo@TLSLD(%rip), %rdi
14463         leaq    foo@DTPOFF(%rax), %rdx
14464         movq    foo@GOTTPOFF(%rip), %rax
14465         movq    $foo@TPOFF, %rax'
14466         tls_first_major=2
14467         tls_first_minor=14
14468         tls_as_opt=--fatal-warnings
14469         ;;
14470   ia64-*-*)
14471     conftest_s='
14472         .section ".tdata","awT",@progbits
14473 foo:    data8   25
14474         .text
14475         addl    r16 = @ltoff(@dtpmod(foo#)), gp
14476         addl    r17 = @ltoff(@dtprel(foo#)), gp
14477         addl    r18 = @ltoff(@tprel(foo#)), gp
14478         addl    r19 = @dtprel(foo#), gp
14479         adds    r21 = @dtprel(foo#), r13
14480         movl    r23 = @dtprel(foo#)
14481         addl    r20 = @tprel(foo#), gp
14482         adds    r22 = @tprel(foo#), r13
14483         movl    r24 = @tprel(foo#)'
14484         tls_first_major=2
14485         tls_first_minor=13
14486         tls_as_opt=--fatal-warnings
14487         ;;
14488   mips*-*-*)
14489     conftest_s='
14490         .section .tdata,"awT",@progbits
14491 x:
14492         .word 2
14493         .text
14494         addiu $4, $28, %tlsgd(x)
14495         addiu $4, $28, %tlsldm(x)
14496         lui $4, %dtprel_hi(x)
14497         addiu $4, $4, %dtprel_lo(x)
14498         lw $4, %gottprel(x)($28)
14499         lui $4, %tprel_hi(x)
14500         addiu $4, $4, %tprel_lo(x)'
14501         tls_first_major=2
14502         tls_first_minor=16
14503         tls_as_opt='-32 --fatal-warnings'
14504         ;;
14505   powerpc-*-*)
14506     conftest_s='
14507         .section ".tdata","awT",@progbits
14508         .align 2
14509 ld0:    .space 4
14510 ld1:    .space 4
14511 x1:     .space 4
14512 x2:     .space 4
14513 x3:     .space 4
14514         .text
14515         addi 3,31,ld0@got@tlsgd
14516         bl __tls_get_addr
14517         addi 3,31,x1@got@tlsld
14518         bl __tls_get_addr
14519         addi 9,3,x1@dtprel
14520         addis 9,3,x2@dtprel@ha
14521         addi 9,9,x2@dtprel@l
14522         lwz 9,x3@got@tprel(31)
14523         add 9,9,x@tls
14524         addi 9,2,x1@tprel
14525         addis 9,2,x2@tprel@ha
14526         addi 9,9,x2@tprel@l'
14527         tls_first_major=2
14528         tls_first_minor=14
14529         tls_as_opt="-a32 --fatal-warnings"
14530         ;;
14531   powerpc64-*-*)
14532     conftest_s='
14533         .section ".tdata","awT",@progbits
14534         .align 3
14535 ld0:    .space 8
14536 ld1:    .space 8
14537 x1:     .space 8
14538 x2:     .space 8
14539 x3:     .space 8
14540         .text
14541         addi 3,2,ld0@got@tlsgd
14542         bl .__tls_get_addr
14543         nop
14544         addi 3,2,ld1@toc
14545         bl .__tls_get_addr
14546         nop
14547         addi 3,2,x1@got@tlsld
14548         bl .__tls_get_addr
14549         nop
14550         addi 9,3,x1@dtprel
14551         bl .__tls_get_addr
14552         nop
14553         addis 9,3,x2@dtprel@ha
14554         addi 9,9,x2@dtprel@l
14555         bl .__tls_get_addr
14556         nop
14557         ld 9,x3@got@dtprel(2)
14558         add 9,9,3
14559         bl .__tls_get_addr
14560         nop'
14561         tls_first_major=2
14562         tls_first_minor=14
14563         tls_as_opt="-a64 --fatal-warnings"
14564         ;;
14565   s390-*-*)
14566     conftest_s='
14567         .section ".tdata","awT",@progbits
14568 foo:    .long   25
14569         .text
14570         .long   foo@TLSGD
14571         .long   foo@TLSLDM
14572         .long   foo@DTPOFF
14573         .long   foo@NTPOFF
14574         .long   foo@GOTNTPOFF
14575         .long   foo@INDNTPOFF
14576         l       %r1,foo@GOTNTPOFF(%r12)
14577         l       %r1,0(%r1):tls_load:foo
14578         bas     %r14,0(%r1,%r13):tls_gdcall:foo
14579         bas     %r14,0(%r1,%r13):tls_ldcall:foo'
14580         tls_first_major=2
14581         tls_first_minor=14
14582         tls_as_opt="-m31 --fatal-warnings"
14583         ;;
14584   s390x-*-*)
14585     conftest_s='
14586         .section ".tdata","awT",@progbits
14587 foo:    .long   25
14588         .text
14589         .quad   foo@TLSGD
14590         .quad   foo@TLSLDM
14591         .quad   foo@DTPOFF
14592         .quad   foo@NTPOFF
14593         .quad   foo@GOTNTPOFF
14594         lg      %r1,foo@GOTNTPOFF(%r12)
14595         larl    %r1,foo@INDNTPOFF
14596         brasl   %r14,__tls_get_offset@PLT:tls_gdcall:foo
14597         brasl   %r14,__tls_get_offset@PLT:tls_ldcall:foo'
14598         tls_first_major=2
14599         tls_first_minor=14
14600         tls_as_opt="-m64 -Aesame --fatal-warnings"
14601         ;;
14602   sh-*-* | sh[34]-*-*)
14603     conftest_s='
14604         .section ".tdata","awT",@progbits
14605 foo:    .long   25
14606         .text
14607         .long   foo@TLSGD
14608         .long   foo@TLSLDM
14609         .long   foo@DTPOFF
14610         .long   foo@GOTTPOFF
14611         .long   foo@TPOFF'
14612         tls_first_major=2
14613         tls_first_minor=13
14614         tls_as_opt=--fatal-warnings
14615         ;;
14616   sparc*-*-*)
14617     case "$target" in
14618       sparc*-sun-solaris2.[56789]*)
14619         # TLS was introduced in the Solaris 9 4/04 release but
14620         # we do not enable it by default on Solaris 9 either.
14621         if test "x$enable_tls" = xyes ; then
14622           on_solaris=yes
14623         else
14624           enable_tls=no;
14625         fi
14626         ;;
14627       sparc*-sun-solaris2.*)
14628         on_solaris=yes
14629         ;;
14630       *)
14631         on_solaris=no
14632         ;;
14633     esac
14634     if test x$on_solaris = xyes && test x$gas_flag = xno; then
14635       conftest_s='
14636         .section ".tdata",#alloc,#write,#tls
14637 foo:    .long   25
14638         .text
14639         sethi   %tgd_hi22(foo), %o0
14640         add     %o0, %tgd_lo10(foo), %o1
14641         add     %l7, %o1, %o0, %tgd_add(foo)
14642         call    __tls_get_addr, %tgd_call(foo)
14643         sethi   %tldm_hi22(foo), %l1
14644         add     %l1, %tldm_lo10(foo), %l2
14645         add     %l7, %l2, %o0, %tldm_add(foo)
14646         call    __tls_get_addr, %tldm_call(foo)
14647         sethi   %tldo_hix22(foo), %l3
14648         xor     %l3, %tldo_lox10(foo), %l4
14649         add     %o0, %l4, %l5, %tldo_add(foo)
14650         sethi   %tie_hi22(foo), %o3
14651         add     %o3, %tie_lo10(foo), %o3
14652         ld      [%l7 + %o3], %o2, %tie_ld(foo)
14653         add     %g7, %o2, %o4, %tie_add(foo)
14654         sethi   %tle_hix22(foo), %l1
14655         xor     %l1, %tle_lox10(foo), %o5
14656         ld      [%g7 + %o5], %o1'
14657         tls_first_major=0
14658         tls_first_minor=0
14659     else
14660       conftest_s='
14661         .section ".tdata","awT",@progbits
14662 foo:    .long   25
14663         .text
14664         sethi   %tgd_hi22(foo), %o0
14665         add     %o0, %tgd_lo10(foo), %o1
14666         add     %l7, %o1, %o0, %tgd_add(foo)
14667         call    __tls_get_addr, %tgd_call(foo)
14668         sethi   %tldm_hi22(foo), %l1
14669         add     %l1, %tldm_lo10(foo), %l2
14670         add     %l7, %l2, %o0, %tldm_add(foo)
14671         call    __tls_get_addr, %tldm_call(foo)
14672         sethi   %tldo_hix22(foo), %l3
14673         xor     %l3, %tldo_lox10(foo), %l4
14674         add     %o0, %l4, %l5, %tldo_add(foo)
14675         sethi   %tie_hi22(foo), %o3
14676         add     %o3, %tie_lo10(foo), %o3
14677         ld      [%l7 + %o3], %o2, %tie_ld(foo)
14678         add     %g7, %o2, %o4, %tie_add(foo)
14679         sethi   %tle_hix22(foo), %l1
14680         xor     %l1, %tle_lox10(foo), %o5
14681         ld      [%g7 + %o5], %o1'
14682         tls_first_major=2
14683         tls_first_minor=14
14684         tls_as_opt="-32 --fatal-warnings"
14685       fi
14686         ;;
14687 esac
14688 set_have_as_tls=no
14689 if test "x$enable_tls" = xno ; then
14690   : # TLS explicitly disabled.
14691 elif test "x$enable_tls" = xyes ; then
14692   set_have_as_tls=yes # TLS explicitly enabled.
14693 elif test -z "$tls_first_major"; then
14694   : # If we don't have a check, assume no support.
14695 else
14696   echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
14697 echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6
14698 if test "${gcc_cv_as_tls+set}" = set; then
14699   echo $ECHO_N "(cached) $ECHO_C" >&6
14700 else
14701   gcc_cv_as_tls=no
14702     if test $in_tree_gas = yes; then
14703     if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
14704   then gcc_cv_as_tls=yes
14705 fi
14706   elif test x$gcc_cv_as != x; then
14707     echo "$conftest_s" > conftest.s
14708     if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
14709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14710   (eval $ac_try) 2>&5
14711   ac_status=$?
14712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14713   (exit $ac_status); }; }
14714     then
14715         gcc_cv_as_tls=yes
14716     else
14717       echo "configure: failed program was" >&5
14718       cat conftest.s >&5
14719     fi
14720     rm -f conftest.o conftest.s
14721   fi
14722 fi
14723 echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
14724 echo "${ECHO_T}$gcc_cv_as_tls" >&6
14725 if test $gcc_cv_as_tls = yes; then
14726   set_have_as_tls=yes
14727 fi
14728 fi
14729 if test $set_have_as_tls = yes ; then
14730
14731 cat >>confdefs.h <<\_ACEOF
14732 #define HAVE_AS_TLS 1
14733 _ACEOF
14734
14735 fi
14736
14737 # Target-specific assembler checks.
14738
14739 echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
14740 echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6
14741 gcc_cv_ld_static_dynamic=no
14742 if test $in_tree_ld = yes ; then
14743   if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
14744     gcc_cv_ld_static_dynamic=yes
14745   fi
14746 elif test x$gcc_cv_ld != x; then
14747         # Check if linker supports -Bstatic/-Bdynamic option
14748         if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
14749           && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
14750                 gcc_cv_ld_static_dynamic=yes
14751         fi
14752 fi
14753 if test x"$gcc_cv_ld_static_dynamic" = xyes; then
14754
14755 cat >>confdefs.h <<\_ACEOF
14756 #define HAVE_LD_STATIC_DYNAMIC 1
14757 _ACEOF
14758
14759 fi
14760 echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
14761 echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6
14762
14763 if test x"$demangler_in_ld" = xyes; then
14764   echo "$as_me:$LINENO: checking linker --demangle support" >&5
14765 echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6
14766   gcc_cv_ld_demangle=no
14767   if test $in_tree_ld = yes; then
14768     if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 14 -o "$gcc_cv_gld_major_version" -gt 2; then \
14769       gcc_cv_ld_demangle=yes
14770     fi
14771   elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
14772     # Check if the GNU linker supports --demangle option
14773     if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
14774       gcc_cv_ld_demangle=yes
14775     fi
14776   fi
14777   if test x"$gcc_cv_ld_demangle" = xyes; then
14778
14779 cat >>confdefs.h <<\_ACEOF
14780 #define HAVE_LD_DEMANGLE 1
14781 _ACEOF
14782
14783   fi
14784   echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
14785 echo "${ECHO_T}$gcc_cv_ld_demangle" >&6
14786 fi
14787
14788 case "$target" in
14789   # All TARGET_ABI_OSF targets.
14790   alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
14791     echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
14792 echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
14793 if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
14794   echo $ECHO_N "(cached) $ECHO_C" >&6
14795 else
14796   gcc_cv_as_alpha_explicit_relocs=no
14797     if test $in_tree_gas = yes; then
14798     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14799   then gcc_cv_as_alpha_explicit_relocs=yes
14800 fi
14801   elif test x$gcc_cv_as != x; then
14802     echo '      .set nomacro
14803         .text
14804         extbl   $3, $2, $3      !lituse_bytoff!1
14805         ldq     $2, a($29)      !literal!1
14806         ldq     $4, b($29)      !literal!2
14807         ldq_u   $3, 0($2)       !lituse_base!1
14808         ldq     $27, f($29)     !literal!5
14809         jsr     $26, ($27), f   !lituse_jsr!5
14810         ldah    $29, 0($26)     !gpdisp!3
14811         lda     $0, c($29)      !gprel
14812         ldah    $1, d($29)      !gprelhigh
14813         lda     $1, d($1)       !gprellow
14814         lda     $29, 0($29)     !gpdisp!3' > conftest.s
14815     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
14816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14817   (eval $ac_try) 2>&5
14818   ac_status=$?
14819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14820   (exit $ac_status); }; }
14821     then
14822         gcc_cv_as_alpha_explicit_relocs=yes
14823     else
14824       echo "configure: failed program was" >&5
14825       cat conftest.s >&5
14826     fi
14827     rm -f conftest.o conftest.s
14828   fi
14829 fi
14830 echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
14831 echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6
14832 if test $gcc_cv_as_alpha_explicit_relocs = yes; then
14833
14834 cat >>confdefs.h <<\_ACEOF
14835 #define HAVE_AS_EXPLICIT_RELOCS 1
14836 _ACEOF
14837
14838 fi
14839     echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
14840 echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6
14841 if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
14842   echo $ECHO_N "(cached) $ECHO_C" >&6
14843 else
14844   gcc_cv_as_alpha_jsrdirect_relocs=no
14845     if test $in_tree_gas = yes; then
14846     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
14847   then gcc_cv_as_alpha_jsrdirect_relocs=yes
14848 fi
14849   elif test x$gcc_cv_as != x; then
14850     echo '      .set nomacro
14851         .text
14852         ldq     $27, a($29)     !literal!1
14853         jsr     $26, ($27), a   !lituse_jsrdirect!1' > conftest.s
14854     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
14855   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14856   (eval $ac_try) 2>&5
14857   ac_status=$?
14858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14859   (exit $ac_status); }; }
14860     then
14861         gcc_cv_as_alpha_jsrdirect_relocs=yes
14862     else
14863       echo "configure: failed program was" >&5
14864       cat conftest.s >&5
14865     fi
14866     rm -f conftest.o conftest.s
14867   fi
14868 fi
14869 echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
14870 echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6
14871 if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
14872
14873 cat >>confdefs.h <<\_ACEOF
14874 #define HAVE_AS_JSRDIRECT_RELOCS 1
14875 _ACEOF
14876
14877 fi
14878     ;;
14879
14880   cris-*-*)
14881     echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
14882 echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6
14883 if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
14884   echo $ECHO_N "(cached) $ECHO_C" >&6
14885 else
14886   gcc_cv_as_cris_no_mul_bug=no
14887     if test $in_tree_gas = yes; then
14888     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14889   then gcc_cv_as_cris_no_mul_bug=yes
14890 fi
14891   elif test x$gcc_cv_as != x; then
14892     echo '.text' > conftest.s
14893     if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
14894   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14895   (eval $ac_try) 2>&5
14896   ac_status=$?
14897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14898   (exit $ac_status); }; }
14899     then
14900         gcc_cv_as_cris_no_mul_bug=yes
14901     else
14902       echo "configure: failed program was" >&5
14903       cat conftest.s >&5
14904     fi
14905     rm -f conftest.o conftest.s
14906   fi
14907 fi
14908 echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
14909 echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6
14910 if test $gcc_cv_as_cris_no_mul_bug = yes; then
14911
14912 cat >>confdefs.h <<\_ACEOF
14913 #define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
14914 _ACEOF
14915
14916 fi
14917     ;;
14918
14919   sparc*-*-*)
14920     echo "$as_me:$LINENO: checking assembler for .register" >&5
14921 echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6
14922 if test "${gcc_cv_as_sparc_register_op+set}" = set; then
14923   echo $ECHO_N "(cached) $ECHO_C" >&6
14924 else
14925   gcc_cv_as_sparc_register_op=no
14926   if test x$gcc_cv_as != x; then
14927     echo '.register %g2, #scratch' > conftest.s
14928     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
14929   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14930   (eval $ac_try) 2>&5
14931   ac_status=$?
14932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14933   (exit $ac_status); }; }
14934     then
14935         gcc_cv_as_sparc_register_op=yes
14936     else
14937       echo "configure: failed program was" >&5
14938       cat conftest.s >&5
14939     fi
14940     rm -f conftest.o conftest.s
14941   fi
14942 fi
14943 echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
14944 echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6
14945 if test $gcc_cv_as_sparc_register_op = yes; then
14946
14947 cat >>confdefs.h <<\_ACEOF
14948 #define HAVE_AS_REGISTER_PSEUDO_OP 1
14949 _ACEOF
14950
14951 fi
14952
14953     echo "$as_me:$LINENO: checking assembler for -relax option" >&5
14954 echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6
14955 if test "${gcc_cv_as_sparc_relax+set}" = set; then
14956   echo $ECHO_N "(cached) $ECHO_C" >&6
14957 else
14958   gcc_cv_as_sparc_relax=no
14959   if test x$gcc_cv_as != x; then
14960     echo '.text' > conftest.s
14961     if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
14962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14963   (eval $ac_try) 2>&5
14964   ac_status=$?
14965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14966   (exit $ac_status); }; }
14967     then
14968         gcc_cv_as_sparc_relax=yes
14969     else
14970       echo "configure: failed program was" >&5
14971       cat conftest.s >&5
14972     fi
14973     rm -f conftest.o conftest.s
14974   fi
14975 fi
14976 echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
14977 echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6
14978 if test $gcc_cv_as_sparc_relax = yes; then
14979
14980 cat >>confdefs.h <<\_ACEOF
14981 #define HAVE_AS_RELAX_OPTION 1
14982 _ACEOF
14983
14984 fi
14985
14986     echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
14987 echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6
14988 if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
14989   echo $ECHO_N "(cached) $ECHO_C" >&6
14990 else
14991   gcc_cv_as_sparc_ua_pcrel=no
14992   if test x$gcc_cv_as != x; then
14993     echo '.text
14994 foo:
14995         nop
14996 .data
14997 .align 4
14998 .byte 0
14999 .uaword %r_disp32(foo)' > conftest.s
15000     if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
15001   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15002   (eval $ac_try) 2>&5
15003   ac_status=$?
15004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15005   (exit $ac_status); }; }
15006     then
15007         if test x$gcc_cv_ld != x \
15008        && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
15009          gcc_cv_as_sparc_ua_pcrel=yes
15010        fi
15011        rm -f conftest
15012     else
15013       echo "configure: failed program was" >&5
15014       cat conftest.s >&5
15015     fi
15016     rm -f conftest.o conftest.s
15017   fi
15018 fi
15019 echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
15020 echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6
15021 if test $gcc_cv_as_sparc_ua_pcrel = yes; then
15022
15023 cat >>confdefs.h <<\_ACEOF
15024 #define HAVE_AS_SPARC_UA_PCREL 1
15025 _ACEOF
15026
15027
15028       echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
15029 echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6
15030 if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
15031   echo $ECHO_N "(cached) $ECHO_C" >&6
15032 else
15033   gcc_cv_as_sparc_ua_pcrel_hidden=no
15034   if test x$gcc_cv_as != x; then
15035     echo '.data
15036 .align 4
15037 .byte 0x31
15038 .uaword %r_disp32(foo)
15039 .byte 0x32, 0x33, 0x34
15040 .global foo
15041 .hidden foo
15042 foo:
15043 .skip 4' > conftest.s
15044     if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
15045   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15046   (eval $ac_try) 2>&5
15047   ac_status=$?
15048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15049   (exit $ac_status); }; }
15050     then
15051         if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
15052          && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
15053          && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
15054             | grep ' 31000000 07323334' > /dev/null 2>&1; then
15055             if $gcc_cv_objdump -R conftest 2> /dev/null \
15056                | grep 'DISP32' > /dev/null 2>&1; then
15057                 :
15058             else
15059                 gcc_cv_as_sparc_ua_pcrel_hidden=yes
15060             fi
15061          fi
15062          rm -f conftest
15063     else
15064       echo "configure: failed program was" >&5
15065       cat conftest.s >&5
15066     fi
15067     rm -f conftest.o conftest.s
15068   fi
15069 fi
15070 echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
15071 echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6
15072 if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
15073
15074 cat >>confdefs.h <<\_ACEOF
15075 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
15076 _ACEOF
15077
15078 fi
15079
15080 fi # unaligned pcrel relocs
15081
15082     echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
15083 echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6
15084 if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
15085   echo $ECHO_N "(cached) $ECHO_C" >&6
15086 else
15087   gcc_cv_as_sparc_offsetable_lo10=no
15088   if test x$gcc_cv_as != x; then
15089     echo '.text
15090         or %g1, %lo(ab) + 12, %g1
15091         or %g1, %lo(ab + 12), %g1' > conftest.s
15092     if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
15093   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15094   (eval $ac_try) 2>&5
15095   ac_status=$?
15096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15097   (exit $ac_status); }; }
15098     then
15099         if test x$gcc_cv_objdump != x \
15100        && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
15101           | grep ' 82106000 82106000' > /dev/null 2>&1; then
15102          gcc_cv_as_sparc_offsetable_lo10=yes
15103        fi
15104     else
15105       echo "configure: failed program was" >&5
15106       cat conftest.s >&5
15107     fi
15108     rm -f conftest.o conftest.s
15109   fi
15110 fi
15111 echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
15112 echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6
15113 if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
15114
15115 cat >>confdefs.h <<\_ACEOF
15116 #define HAVE_AS_OFFSETABLE_LO10 1
15117 _ACEOF
15118
15119 fi
15120     ;;
15121
15122   i[34567]86-*-* | x86_64-*-*)
15123     case $target_os in
15124       cygwin* | pe | mingw32*)
15125         # Used for DWARF 2 in PE
15126         echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
15127 echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6
15128 if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
15129   echo $ECHO_N "(cached) $ECHO_C" >&6
15130 else
15131   gcc_cv_as_ix86_pe_secrel32=no
15132     if test $in_tree_gas = yes; then
15133     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
15134   then gcc_cv_as_ix86_pe_secrel32=yes
15135 fi
15136   elif test x$gcc_cv_as != x; then
15137     echo '.text
15138 foo:    nop
15139 .data
15140         .secrel32 foo' > conftest.s
15141     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
15142   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15143   (eval $ac_try) 2>&5
15144   ac_status=$?
15145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15146   (exit $ac_status); }; }
15147     then
15148         if test x$gcc_cv_ld != x \
15149            && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
15150              gcc_cv_as_ix86_pe_secrel32=yes
15151            fi
15152            rm -f conftest
15153     else
15154       echo "configure: failed program was" >&5
15155       cat conftest.s >&5
15156     fi
15157     rm -f conftest.o conftest.s
15158   fi
15159 fi
15160 echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
15161 echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6
15162 if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
15163
15164 cat >>confdefs.h <<\_ACEOF
15165 #define HAVE_GAS_PE_SECREL32_RELOC 1
15166 _ACEOF
15167
15168 fi
15169         ;;
15170     esac
15171
15172     echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
15173 echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6
15174 if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
15175   echo $ECHO_N "(cached) $ECHO_C" >&6
15176 else
15177   gcc_cv_as_ix86_filds_fists=no
15178     if test $in_tree_gas = yes; then
15179     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
15180   then gcc_cv_as_ix86_filds_fists=yes
15181 fi
15182   elif test x$gcc_cv_as != x; then
15183     echo 'filds mem; fists mem' > conftest.s
15184     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
15185   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15186   (eval $ac_try) 2>&5
15187   ac_status=$?
15188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15189   (exit $ac_status); }; }
15190     then
15191         gcc_cv_as_ix86_filds_fists=yes
15192     else
15193       echo "configure: failed program was" >&5
15194       cat conftest.s >&5
15195     fi
15196     rm -f conftest.o conftest.s
15197   fi
15198 fi
15199 echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
15200 echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6
15201 if test $gcc_cv_as_ix86_filds_fists = yes; then
15202
15203 cat >>confdefs.h <<\_ACEOF
15204 #define HAVE_GAS_FILDS_FISTS 1
15205 _ACEOF
15206
15207 fi
15208
15209     echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
15210 echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6
15211 if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
15212   echo $ECHO_N "(cached) $ECHO_C" >&6
15213 else
15214   gcc_cv_as_ix86_cmov_sun_syntax=no
15215   if test x$gcc_cv_as != x; then
15216     echo 'cmovl.l %edx, %eax' > conftest.s
15217     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
15218   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15219   (eval $ac_try) 2>&5
15220   ac_status=$?
15221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15222   (exit $ac_status); }; }
15223     then
15224         gcc_cv_as_ix86_cmov_sun_syntax=yes
15225     else
15226       echo "configure: failed program was" >&5
15227       cat conftest.s >&5
15228     fi
15229     rm -f conftest.o conftest.s
15230   fi
15231 fi
15232 echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
15233 echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6
15234 if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
15235
15236 cat >>confdefs.h <<\_ACEOF
15237 #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
15238 _ACEOF
15239
15240 fi
15241
15242     echo "$as_me:$LINENO: checking assembler for ffreep mnemonic" >&5
15243 echo $ECHO_N "checking assembler for ffreep mnemonic... $ECHO_C" >&6
15244 if test "${gcc_cv_as_ix86_ffreep+set}" = set; then
15245   echo $ECHO_N "(cached) $ECHO_C" >&6
15246 else
15247   gcc_cv_as_ix86_ffreep=no
15248   if test x$gcc_cv_as != x; then
15249     echo 'ffreep %st(1)' > conftest.s
15250     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
15251   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15252   (eval $ac_try) 2>&5
15253   ac_status=$?
15254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15255   (exit $ac_status); }; }
15256     then
15257         gcc_cv_as_ix86_ffreep=yes
15258     else
15259       echo "configure: failed program was" >&5
15260       cat conftest.s >&5
15261     fi
15262     rm -f conftest.o conftest.s
15263   fi
15264 fi
15265 echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_ffreep" >&5
15266 echo "${ECHO_T}$gcc_cv_as_ix86_ffreep" >&6
15267 if test $gcc_cv_as_ix86_ffreep = yes; then
15268
15269 cat >>confdefs.h <<\_ACEOF
15270 #define HAVE_AS_IX86_FFREEP 1
15271 _ACEOF
15272
15273 fi
15274
15275     echo "$as_me:$LINENO: checking assembler for sahf mnemonic" >&5
15276 echo $ECHO_N "checking assembler for sahf mnemonic... $ECHO_C" >&6
15277 if test "${gcc_cv_as_ix86_sahf+set}" = set; then
15278   echo $ECHO_N "(cached) $ECHO_C" >&6
15279 else
15280   gcc_cv_as_ix86_sahf=no
15281   if test x$gcc_cv_as != x; then
15282     echo 'sahf' > conftest.s
15283     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
15284   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15285   (eval $ac_try) 2>&5
15286   ac_status=$?
15287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15288   (exit $ac_status); }; }
15289     then
15290         gcc_cv_as_ix86_sahf=yes
15291     else
15292       echo "configure: failed program was" >&5
15293       cat conftest.s >&5
15294     fi
15295     rm -f conftest.o conftest.s
15296   fi
15297 fi
15298 echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_sahf" >&5
15299 echo "${ECHO_T}$gcc_cv_as_ix86_sahf" >&6
15300 if test $gcc_cv_as_ix86_sahf = yes; then
15301
15302 cat >>confdefs.h <<\_ACEOF
15303 #define HAVE_AS_IX86_SAHF 1
15304 _ACEOF
15305
15306 fi
15307
15308     echo "$as_me:$LINENO: checking assembler for different section symbol subtraction" >&5
15309 echo $ECHO_N "checking assembler for different section symbol subtraction... $ECHO_C" >&6
15310 if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then
15311   echo $ECHO_N "(cached) $ECHO_C" >&6
15312 else
15313   gcc_cv_as_ix86_diff_sect_delta=no
15314   if test x$gcc_cv_as != x; then
15315     echo '.section .rodata
15316 .L1:
15317         .long .L2-.L1
15318         .long .L3-.L1
15319         .text
15320 .L3:    nop
15321 .L2:    nop' > conftest.s
15322     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
15323   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15324   (eval $ac_try) 2>&5
15325   ac_status=$?
15326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15327   (exit $ac_status); }; }
15328     then
15329         gcc_cv_as_ix86_diff_sect_delta=yes
15330     else
15331       echo "configure: failed program was" >&5
15332       cat conftest.s >&5
15333     fi
15334     rm -f conftest.o conftest.s
15335   fi
15336 fi
15337 echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_diff_sect_delta" >&5
15338 echo "${ECHO_T}$gcc_cv_as_ix86_diff_sect_delta" >&6
15339 if test $gcc_cv_as_ix86_diff_sect_delta = yes; then
15340
15341 cat >>confdefs.h <<\_ACEOF
15342 #define HAVE_AS_IX86_DIFF_SECT_DELTA 1
15343 _ACEOF
15344
15345 fi
15346
15347     # This one is used unconditionally by i386.[ch]; it is to be defined
15348     # to 1 if the feature is present, 0 otherwise.
15349     echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
15350 echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6
15351 if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
15352   echo $ECHO_N "(cached) $ECHO_C" >&6
15353 else
15354   gcc_cv_as_ix86_gotoff_in_data=no
15355     if test $in_tree_gas = yes; then
15356     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15357   then gcc_cv_as_ix86_gotoff_in_data=yes
15358 fi
15359   elif test x$gcc_cv_as != x; then
15360     echo '      .text
15361 .L0:
15362         nop
15363         .data
15364         .long .L0@GOTOFF' > conftest.s
15365     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
15366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15367   (eval $ac_try) 2>&5
15368   ac_status=$?
15369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15370   (exit $ac_status); }; }
15371     then
15372         gcc_cv_as_ix86_gotoff_in_data=yes
15373     else
15374       echo "configure: failed program was" >&5
15375       cat conftest.s >&5
15376     fi
15377     rm -f conftest.o conftest.s
15378   fi
15379 fi
15380 echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
15381 echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6
15382
15383
15384 cat >>confdefs.h <<_ACEOF
15385 #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
15386 _ACEOF
15387
15388     ;;
15389
15390   ia64*-*-*)
15391     echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
15392 echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6
15393 if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
15394   echo $ECHO_N "(cached) $ECHO_C" >&6
15395 else
15396   gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
15397     if test $in_tree_gas = yes; then
15398     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15399   then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
15400 fi
15401   elif test x$gcc_cv_as != x; then
15402     echo '      .text
15403         addl r15 = @ltoffx(x#), gp
15404         ;;
15405         ld8.mov r16 = [r15], x#' > conftest.s
15406     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
15407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15408   (eval $ac_try) 2>&5
15409   ac_status=$?
15410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15411   (exit $ac_status); }; }
15412     then
15413         gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
15414     else
15415       echo "configure: failed program was" >&5
15416       cat conftest.s >&5
15417     fi
15418     rm -f conftest.o conftest.s
15419   fi
15420 fi
15421 echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
15422 echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6
15423 if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
15424
15425 cat >>confdefs.h <<\_ACEOF
15426 #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
15427 _ACEOF
15428
15429 fi
15430
15431     ;;
15432
15433   powerpc*-*-*)
15434     case $target in
15435       *-*-aix*) conftest_s='    .machine "pwr5"
15436         .csect .text[PR]
15437         mfcr 3,128';;
15438       *-*-darwin*)
15439         echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
15440 echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6
15441 if test "${gcc_cv_as_machine_directive+set}" = set; then
15442   echo $ECHO_N "(cached) $ECHO_C" >&6
15443 else
15444   gcc_cv_as_machine_directive=no
15445   if test x$gcc_cv_as != x; then
15446     echo '      .machine ppc7400' > conftest.s
15447     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
15448   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15449   (eval $ac_try) 2>&5
15450   ac_status=$?
15451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15452   (exit $ac_status); }; }
15453     then
15454         gcc_cv_as_machine_directive=yes
15455     else
15456       echo "configure: failed program was" >&5
15457       cat conftest.s >&5
15458     fi
15459     rm -f conftest.o conftest.s
15460   fi
15461 fi
15462 echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
15463 echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6
15464
15465         if test x$gcc_cv_as_machine_directive != xyes; then
15466           echo "*** This target requires an assembler supporting \".machine\"" >&2
15467           echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
15468           test x$build = x$target && exit 1
15469         fi
15470         conftest_s='    .text
15471         mfcr r3,128';;
15472       *) conftest_s='   .machine power4
15473         .text
15474         mfcr 3,128';;
15475     esac
15476
15477     echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
15478 echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6
15479 if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
15480   echo $ECHO_N "(cached) $ECHO_C" >&6
15481 else
15482   gcc_cv_as_powerpc_mfcrf=no
15483     if test $in_tree_gas = yes; then
15484     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15485   then gcc_cv_as_powerpc_mfcrf=yes
15486 fi
15487   elif test x$gcc_cv_as != x; then
15488     echo "$conftest_s" > conftest.s
15489     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
15490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15491   (eval $ac_try) 2>&5
15492   ac_status=$?
15493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15494   (exit $ac_status); }; }
15495     then
15496         gcc_cv_as_powerpc_mfcrf=yes
15497     else
15498       echo "configure: failed program was" >&5
15499       cat conftest.s >&5
15500     fi
15501     rm -f conftest.o conftest.s
15502   fi
15503 fi
15504 echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
15505 echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6
15506 if test $gcc_cv_as_powerpc_mfcrf = yes; then
15507
15508 cat >>confdefs.h <<\_ACEOF
15509 #define HAVE_AS_MFCRF 1
15510 _ACEOF
15511
15512 fi
15513
15514     case $target in
15515       *-*-aix*) conftest_s='    .machine "pwr5"
15516         .csect .text[PR]
15517         popcntb 3,3';;
15518       *) conftest_s='   .machine power5
15519         .text
15520         popcntb 3,3';;
15521     esac
15522
15523     echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
15524 echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6
15525 if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
15526   echo $ECHO_N "(cached) $ECHO_C" >&6
15527 else
15528   gcc_cv_as_powerpc_popcntb=no
15529     if test $in_tree_gas = yes; then
15530     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15531   then gcc_cv_as_powerpc_popcntb=yes
15532 fi
15533   elif test x$gcc_cv_as != x; then
15534     echo "$conftest_s" > conftest.s
15535     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
15536   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15537   (eval $ac_try) 2>&5
15538   ac_status=$?
15539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15540   (exit $ac_status); }; }
15541     then
15542         gcc_cv_as_powerpc_popcntb=yes
15543     else
15544       echo "configure: failed program was" >&5
15545       cat conftest.s >&5
15546     fi
15547     rm -f conftest.o conftest.s
15548   fi
15549 fi
15550 echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
15551 echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6
15552 if test $gcc_cv_as_powerpc_popcntb = yes; then
15553
15554 cat >>confdefs.h <<\_ACEOF
15555 #define HAVE_AS_POPCNTB 1
15556 _ACEOF
15557
15558 fi
15559
15560     case $target in
15561       *-*-aix*) conftest_s='    .machine "pwr5x"
15562         .csect .text[PR]
15563         frin 1,1';;
15564       *) conftest_s='   .machine power5
15565         .text
15566         frin 1,1';;
15567     esac
15568
15569     echo "$as_me:$LINENO: checking assembler for fp round support" >&5
15570 echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6
15571 if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then
15572   echo $ECHO_N "(cached) $ECHO_C" >&6
15573 else
15574   gcc_cv_as_powerpc_fprnd=no
15575     if test $in_tree_gas = yes; then
15576     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15577   then gcc_cv_as_powerpc_fprnd=yes
15578 fi
15579   elif test x$gcc_cv_as != x; then
15580     echo "$conftest_s" > conftest.s
15581     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
15582   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15583   (eval $ac_try) 2>&5
15584   ac_status=$?
15585   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15586   (exit $ac_status); }; }
15587     then
15588         gcc_cv_as_powerpc_fprnd=yes
15589     else
15590       echo "configure: failed program was" >&5
15591       cat conftest.s >&5
15592     fi
15593     rm -f conftest.o conftest.s
15594   fi
15595 fi
15596 echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5
15597 echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6
15598 if test $gcc_cv_as_powerpc_fprnd = yes; then
15599
15600 cat >>confdefs.h <<\_ACEOF
15601 #define HAVE_AS_FPRND 1
15602 _ACEOF
15603
15604 fi
15605
15606     case $target in
15607       *-*-aix*) conftest_s='    .machine "pwr6"
15608         .csect .text[PR]
15609         mffgpr 1,3';;
15610       *) conftest_s='   .machine power6
15611         .text
15612         mffgpr 1,3';;
15613     esac
15614
15615     echo "$as_me:$LINENO: checking assembler for move fp gpr support" >&5
15616 echo $ECHO_N "checking assembler for move fp gpr support... $ECHO_C" >&6
15617 if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then
15618   echo $ECHO_N "(cached) $ECHO_C" >&6
15619 else
15620   gcc_cv_as_powerpc_mfpgpr=no
15621     if test $in_tree_gas = yes; then
15622     if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
15623   then gcc_cv_as_powerpc_mfpgpr=yes
15624 fi
15625   elif test x$gcc_cv_as != x; then
15626     echo "$conftest_s" > conftest.s
15627     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
15628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15629   (eval $ac_try) 2>&5
15630   ac_status=$?
15631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15632   (exit $ac_status); }; }
15633     then
15634         gcc_cv_as_powerpc_mfpgpr=yes
15635     else
15636       echo "configure: failed program was" >&5
15637       cat conftest.s >&5
15638     fi
15639     rm -f conftest.o conftest.s
15640   fi
15641 fi
15642 echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfpgpr" >&5
15643 echo "${ECHO_T}$gcc_cv_as_powerpc_mfpgpr" >&6
15644 if test $gcc_cv_as_powerpc_mfpgpr = yes; then
15645
15646 cat >>confdefs.h <<\_ACEOF
15647 #define HAVE_AS_MFPGPR 1
15648 _ACEOF
15649
15650 fi
15651
15652     case $target in
15653       *-*-aix*) conftest_s='    .csect .text[PR]
15654 LCF..0:
15655         addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
15656       *-*-darwin*)
15657         conftest_s='    .text
15658 LCF0:
15659         addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
15660       *) conftest_s='   .text
15661 .LCF0:
15662         addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
15663     esac
15664
15665     echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
15666 echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6
15667 if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
15668   echo $ECHO_N "(cached) $ECHO_C" >&6
15669 else
15670   gcc_cv_as_powerpc_rel16=no
15671     if test $in_tree_gas = yes; then
15672     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15673   then gcc_cv_as_powerpc_rel16=yes
15674 fi
15675   elif test x$gcc_cv_as != x; then
15676     echo "$conftest_s" > conftest.s
15677     if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15678   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15679   (eval $ac_try) 2>&5
15680   ac_status=$?
15681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15682   (exit $ac_status); }; }
15683     then
15684         gcc_cv_as_powerpc_rel16=yes
15685     else
15686       echo "configure: failed program was" >&5
15687       cat conftest.s >&5
15688     fi
15689     rm -f conftest.o conftest.s
15690   fi
15691 fi
15692 echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
15693 echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6
15694 if test $gcc_cv_as_powerpc_rel16 = yes; then
15695
15696 cat >>confdefs.h <<\_ACEOF
15697 #define HAVE_AS_REL16 1
15698 _ACEOF
15699
15700 fi
15701
15702     case $target in
15703       *-*-aix*) conftest_s='    .machine "pwr6"
15704         .csect .text[PR]
15705         cmpb 3,4,5';;
15706       *) conftest_s='   .machine power6
15707         .text
15708         cmpb 3,4,5';;
15709     esac
15710
15711     echo "$as_me:$LINENO: checking assembler for compare bytes support" >&5
15712 echo $ECHO_N "checking assembler for compare bytes support... $ECHO_C" >&6
15713 if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then
15714   echo $ECHO_N "(cached) $ECHO_C" >&6
15715 else
15716   gcc_cv_as_powerpc_cmpb=no
15717     if test $in_tree_gas = yes; then
15718     if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
15719   then gcc_cv_as_powerpc_cmpb=yes
15720 fi
15721   elif test x$gcc_cv_as != x; then
15722     echo "$conftest_s" > conftest.s
15723     if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15724   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15725   (eval $ac_try) 2>&5
15726   ac_status=$?
15727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15728   (exit $ac_status); }; }
15729     then
15730         gcc_cv_as_powerpc_cmpb=yes
15731     else
15732       echo "configure: failed program was" >&5
15733       cat conftest.s >&5
15734     fi
15735     rm -f conftest.o conftest.s
15736   fi
15737 fi
15738 echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_cmpb" >&5
15739 echo "${ECHO_T}$gcc_cv_as_powerpc_cmpb" >&6
15740 if test $gcc_cv_as_powerpc_cmpb = yes; then
15741
15742 cat >>confdefs.h <<\_ACEOF
15743 #define HAVE_AS_CMPB 1
15744 _ACEOF
15745
15746 fi
15747
15748     case $target in
15749       *-*-aix*) conftest_s='    .machine "pwr6"
15750         .csect .text[PR]
15751         dadd 1,2,3';;
15752       *) conftest_s='   .machine power6
15753         .text
15754         dadd 1,2,3';;
15755     esac
15756
15757     echo "$as_me:$LINENO: checking assembler for decimal float support" >&5
15758 echo $ECHO_N "checking assembler for decimal float support... $ECHO_C" >&6
15759 if test "${gcc_cv_as_powerpc_dfp+set}" = set; then
15760   echo $ECHO_N "(cached) $ECHO_C" >&6
15761 else
15762   gcc_cv_as_powerpc_dfp=no
15763     if test $in_tree_gas = yes; then
15764     if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
15765   then gcc_cv_as_powerpc_dfp=yes
15766 fi
15767   elif test x$gcc_cv_as != x; then
15768     echo "$conftest_s" > conftest.s
15769     if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
15770   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15771   (eval $ac_try) 2>&5
15772   ac_status=$?
15773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15774   (exit $ac_status); }; }
15775     then
15776         gcc_cv_as_powerpc_dfp=yes
15777     else
15778       echo "configure: failed program was" >&5
15779       cat conftest.s >&5
15780     fi
15781     rm -f conftest.o conftest.s
15782   fi
15783 fi
15784 echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_dfp" >&5
15785 echo "${ECHO_T}$gcc_cv_as_powerpc_dfp" >&6
15786 if test $gcc_cv_as_powerpc_dfp = yes; then
15787
15788 cat >>confdefs.h <<\_ACEOF
15789 #define HAVE_AS_DFP 1
15790 _ACEOF
15791
15792 fi
15793     ;;
15794
15795   mips*-*-*)
15796     echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
15797 echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6
15798 if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
15799   echo $ECHO_N "(cached) $ECHO_C" >&6
15800 else
15801   gcc_cv_as_mips_explicit_relocs=no
15802     if test $in_tree_gas = yes; then
15803     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15804   then gcc_cv_as_mips_explicit_relocs=yes
15805 fi
15806   elif test x$gcc_cv_as != x; then
15807     echo '      lw $4,%gp_rel(foo)($4)' > conftest.s
15808     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
15809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15810   (eval $ac_try) 2>&5
15811   ac_status=$?
15812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15813   (exit $ac_status); }; }
15814     then
15815         gcc_cv_as_mips_explicit_relocs=yes
15816     else
15817       echo "configure: failed program was" >&5
15818       cat conftest.s >&5
15819     fi
15820     rm -f conftest.o conftest.s
15821   fi
15822 fi
15823 echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
15824 echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6
15825 if test $gcc_cv_as_mips_explicit_relocs = yes; then
15826   if test x$target_cpu_default = x
15827        then target_cpu_default=MASK_EXPLICIT_RELOCS
15828        else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
15829        fi
15830 fi
15831     echo "$as_me:$LINENO: checking assembler for -mno-shared support" >&5
15832 echo $ECHO_N "checking assembler for -mno-shared support... $ECHO_C" >&6
15833 if test "${gcc_cv_as_mips_no_shared+set}" = set; then
15834   echo $ECHO_N "(cached) $ECHO_C" >&6
15835 else
15836   gcc_cv_as_mips_no_shared=no
15837     if test $in_tree_gas = yes; then
15838     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
15839   then gcc_cv_as_mips_no_shared=yes
15840 fi
15841   elif test x$gcc_cv_as != x; then
15842     echo 'nop' > conftest.s
15843     if { ac_try='$gcc_cv_as -mno-shared -o conftest.o conftest.s >&5'
15844   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15845   (eval $ac_try) 2>&5
15846   ac_status=$?
15847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15848   (exit $ac_status); }; }
15849     then
15850         gcc_cv_as_mips_no_shared=yes
15851     else
15852       echo "configure: failed program was" >&5
15853       cat conftest.s >&5
15854     fi
15855     rm -f conftest.o conftest.s
15856   fi
15857 fi
15858 echo "$as_me:$LINENO: result: $gcc_cv_as_mips_no_shared" >&5
15859 echo "${ECHO_T}$gcc_cv_as_mips_no_shared" >&6
15860 if test $gcc_cv_as_mips_no_shared = yes; then
15861
15862 cat >>confdefs.h <<\_ACEOF
15863 #define HAVE_AS_NO_SHARED 1
15864 _ACEOF
15865
15866 fi
15867     ;;
15868 esac
15869
15870 # Mips and HP-UX need the GNU assembler.
15871 # Linux on IA64 might be able to use the Intel assembler.
15872
15873 case "$target" in
15874   mips*-*-* | *-*-hpux* )
15875     if test x$gas_flag = xyes \
15876        || test x"$host" != x"$build" \
15877        || test ! -x "$gcc_cv_as" \
15878        || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
15879       :
15880     else
15881       echo "*** This configuration requires the GNU assembler" >&2
15882       exit 1
15883     fi
15884     ;;
15885 esac
15886
15887 # ??? Not all targets support dwarf2 debug_line, even within a version
15888 # of gas.  Moreover, we need to emit a valid instruction to trigger any
15889 # info to the output file.  So, as supported targets are added to gas 2.11,
15890 # add some instruction here to (also) show we expect this might work.
15891 # ??? Once 2.11 is released, probably need to add first known working
15892 # version to the per-target configury.
15893 case "$target" in
15894   i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
15895   | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
15896   | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-* | spu-*-*)
15897     insn="nop"
15898     ;;
15899   ia64*-*-* | s390*-*-*)
15900     insn="nop 0"
15901     ;;
15902   mmix-*-*)
15903     insn="swym 0"
15904     ;;
15905 esac
15906 if test x"$insn" != x; then
15907  conftest_s="\
15908         .file 1 \"conftest.s\"
15909         .loc 1 3 0
15910         $insn"
15911  echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
15912 echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6
15913 if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
15914   echo $ECHO_N "(cached) $ECHO_C" >&6
15915 else
15916   gcc_cv_as_dwarf2_debug_line=no
15917     if test $in_tree_gas = yes; then
15918     if test $in_tree_gas_is_elf = yes \
15919   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15920   then gcc_cv_as_dwarf2_debug_line=yes
15921 fi
15922   elif test x$gcc_cv_as != x; then
15923     echo "$conftest_s" > conftest.s
15924     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
15925   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15926   (eval $ac_try) 2>&5
15927   ac_status=$?
15928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15929   (exit $ac_status); }; }
15930     then
15931         if test x$gcc_cv_objdump != x \
15932    && $gcc_cv_objdump -h conftest.o 2> /dev/null \
15933       | grep debug_line > /dev/null 2>&1; then
15934      gcc_cv_as_dwarf2_debug_line=yes
15935    fi
15936     else
15937       echo "configure: failed program was" >&5
15938       cat conftest.s >&5
15939     fi
15940     rm -f conftest.o conftest.s
15941   fi
15942 fi
15943 echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
15944 echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6
15945
15946
15947 # The .debug_line file table must be in the exact order that
15948 # we specified the files, since these indices are also used
15949 # by DW_AT_decl_file.  Approximate this test by testing if
15950 # the assembler bitches if the same index is assigned twice.
15951  echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
15952 echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6
15953 if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
15954   echo $ECHO_N "(cached) $ECHO_C" >&6
15955 else
15956   gcc_cv_as_dwarf2_file_buggy=no
15957   if test x$gcc_cv_as != x; then
15958     echo '      .file 1 "foo.s"
15959         .file 1 "bar.s"' > conftest.s
15960     if { ac_try='$gcc_cv_as  -o conftest.o conftest.s >&5'
15961   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15962   (eval $ac_try) 2>&5
15963   ac_status=$?
15964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15965   (exit $ac_status); }; }
15966     then
15967         gcc_cv_as_dwarf2_file_buggy=yes
15968     else
15969       echo "configure: failed program was" >&5
15970       cat conftest.s >&5
15971     fi
15972     rm -f conftest.o conftest.s
15973   fi
15974 fi
15975 echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
15976 echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6
15977
15978
15979  if test $gcc_cv_as_dwarf2_debug_line = yes \
15980  && test $gcc_cv_as_dwarf2_file_buggy = no; then
15981
15982 cat >>confdefs.h <<\_ACEOF
15983 #define HAVE_AS_DWARF2_DEBUG_LINE 1
15984 _ACEOF
15985
15986  fi
15987
15988  echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
15989 echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6
15990 if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
15991   echo $ECHO_N "(cached) $ECHO_C" >&6
15992 else
15993   gcc_cv_as_gdwarf2_flag=no
15994     if test $in_tree_gas = yes; then
15995     if test $in_tree_gas_is_elf = yes \
15996   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15997   then gcc_cv_as_gdwarf2_flag=yes
15998 fi
15999   elif test x$gcc_cv_as != x; then
16000     echo "$insn" > conftest.s
16001     if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
16002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16003   (eval $ac_try) 2>&5
16004   ac_status=$?
16005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16006   (exit $ac_status); }; }
16007     then
16008         gcc_cv_as_gdwarf2_flag=yes
16009     else
16010       echo "configure: failed program was" >&5
16011       cat conftest.s >&5
16012     fi
16013     rm -f conftest.o conftest.s
16014   fi
16015 fi
16016 echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
16017 echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6
16018 if test $gcc_cv_as_gdwarf2_flag = yes; then
16019
16020 cat >>confdefs.h <<\_ACEOF
16021 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
16022 _ACEOF
16023
16024 fi
16025
16026  echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
16027 echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6
16028 if test "${gcc_cv_as_gstabs_flag+set}" = set; then
16029   echo $ECHO_N "(cached) $ECHO_C" >&6
16030 else
16031   gcc_cv_as_gstabs_flag=no
16032     if test $in_tree_gas = yes; then
16033     if test $in_tree_gas_is_elf = yes \
16034   && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
16035   then gcc_cv_as_gstabs_flag=yes
16036 fi
16037   elif test x$gcc_cv_as != x; then
16038     echo "$insn" > conftest.s
16039     if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
16040   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16041   (eval $ac_try) 2>&5
16042   ac_status=$?
16043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16044   (exit $ac_status); }; }
16045     then
16046         # The native Solaris 9/Intel assembler doesn't understand --gstabs
16047    # and warns about it, but still exits successfully.  So check for
16048    # this.
16049    if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
16050   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16051   (eval $ac_try) 2>&5
16052   ac_status=$?
16053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16054   (exit $ac_status); }; }
16055    then :
16056    else gcc_cv_as_gstabs_flag=yes
16057    fi
16058     else
16059       echo "configure: failed program was" >&5
16060       cat conftest.s >&5
16061     fi
16062     rm -f conftest.o conftest.s
16063   fi
16064 fi
16065 echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
16066 echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6
16067 if test $gcc_cv_as_gstabs_flag = yes; then
16068
16069 cat >>confdefs.h <<\_ACEOF
16070 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
16071 _ACEOF
16072
16073 fi
16074 fi
16075
16076 echo "$as_me:$LINENO: checking assembler for tolerance to line number 0" >&5
16077 echo $ECHO_N "checking assembler for tolerance to line number 0... $ECHO_C" >&6
16078 if test "${gcc_cv_as_line_zero+set}" = set; then
16079   echo $ECHO_N "(cached) $ECHO_C" >&6
16080 else
16081   gcc_cv_as_line_zero=no
16082   if test $in_tree_gas = yes; then
16083     if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91`
16084   then gcc_cv_as_line_zero=yes
16085 fi
16086   elif test "x$gcc_cv_as" != x; then
16087     { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s
16088     if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out'
16089   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16090   (eval $ac_try) 2>&5
16091   ac_status=$?
16092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16093   (exit $ac_status); }; } &&
16094        test "x`cat conftest.out`" = x
16095     then
16096       gcc_cv_as_line_zero=yes
16097     else
16098       echo "configure: failed program was" >&5
16099       cat conftest.s >&5
16100       echo "configure: error output was" >&5
16101       cat conftest.out >&5
16102     fi
16103     rm -f conftest.o conftest.s conftest.out
16104   fi
16105 fi
16106 echo "$as_me:$LINENO: result: $gcc_cv_as_line_zero" >&5
16107 echo "${ECHO_T}$gcc_cv_as_line_zero" >&6
16108 if test "x$gcc_cv_as_line_zero" = xyes; then
16109
16110 cat >>confdefs.h <<\_ACEOF
16111 #define HAVE_AS_LINE_ZERO 1
16112 _ACEOF
16113
16114 fi
16115
16116 echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
16117 echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6
16118 gcc_cv_ld_ro_rw_mix=unknown
16119 if test $in_tree_ld = yes ; then
16120   if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 \
16121      && test $in_tree_ld_is_elf = yes; then
16122     gcc_cv_ld_ro_rw_mix=read-write
16123   fi
16124 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
16125   echo '.section myfoosect, "a"' > conftest1.s
16126   echo '.section myfoosect, "aw"' > conftest2.s
16127   echo '.byte 1' >> conftest2.s
16128   echo '.section myfoosect, "a"' > conftest3.s
16129   echo '.byte 0' >> conftest3.s
16130   if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
16131      && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
16132      && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
16133      && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
16134         conftest2.o conftest3.o > /dev/null 2>&1; then
16135     gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
16136                          | sed -e '/myfoosect/!d' -e N`
16137     if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
16138       if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
16139         gcc_cv_ld_ro_rw_mix=read-only
16140       else
16141         gcc_cv_ld_ro_rw_mix=read-write
16142       fi
16143     fi
16144   fi
16145   rm -f conftest.* conftest[123].*
16146 fi
16147 if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
16148
16149 cat >>confdefs.h <<\_ACEOF
16150 #define HAVE_LD_RO_RW_SECTION_MIXING 1
16151 _ACEOF
16152
16153 fi
16154 echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
16155 echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6
16156
16157 echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
16158 echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6
16159 gcc_cv_ld_eh_frame_hdr=no
16160 if test $in_tree_ld = yes ; then
16161   if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 \
16162      && test $in_tree_ld_is_elf = yes; then
16163     gcc_cv_ld_eh_frame_hdr=yes
16164   fi
16165 elif test x$gcc_cv_ld != x; then
16166         # Check if linker supports --eh-frame-hdr option
16167         if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
16168                 gcc_cv_ld_eh_frame_hdr=yes
16169         fi
16170 fi
16171
16172 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
16173
16174 cat >>confdefs.h <<\_ACEOF
16175 #define HAVE_LD_EH_FRAME_HDR 1
16176 _ACEOF
16177
16178 fi
16179 echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
16180 echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6
16181
16182 echo "$as_me:$LINENO: checking linker position independent executable support" >&5
16183 echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6
16184 gcc_cv_ld_pie=no
16185 if test $in_tree_ld = yes ; then
16186   if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 15 -o "$gcc_cv_gld_major_version" -gt 2 \
16187      && test $in_tree_ld_is_elf = yes; then
16188     gcc_cv_ld_pie=yes
16189   fi
16190 elif test x$gcc_cv_ld != x; then
16191         # Check if linker supports -pie option
16192         if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
16193                 gcc_cv_ld_pie=yes
16194         fi
16195 fi
16196 if test x"$gcc_cv_ld_pie" = xyes; then
16197
16198 cat >>confdefs.h <<\_ACEOF
16199 #define HAVE_LD_PIE 1
16200 _ACEOF
16201
16202 fi
16203 echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
16204 echo "${ECHO_T}$gcc_cv_ld_pie" >&6
16205
16206 echo "$as_me:$LINENO: checking linker EH-compatible garbage collection of sections" >&5
16207 echo $ECHO_N "checking linker EH-compatible garbage collection of sections... $ECHO_C" >&6
16208 gcc_cv_ld_eh_gc_sections=no
16209 if test $in_tree_ld = yes ; then
16210   if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 17 -o "$gcc_cv_gld_major_version" -gt 2 \
16211      && test $in_tree_ld_is_elf = yes; then
16212     gcc_cv_ld_eh_gc_sections=yes
16213   fi
16214 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
16215   cat > conftest.s <<EOF
16216         .section        .text
16217 .globl _start
16218         .type _start, @function
16219 _start:
16220         .long foo
16221         .size _start, .-_start
16222         .section        .text.foo,"ax",@progbits
16223         .type foo, @function
16224 foo:
16225         .long 0
16226         .size foo, .-foo
16227         .section        .gcc_except_table.foo,"a",@progbits
16228 .L0:
16229         .long 0
16230         .section        .eh_frame,"a",@progbits
16231         .long .L0
16232 EOF
16233   if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
16234     if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
16235          | grep "gc-sections option ignored" > /dev/null; then
16236       gcc_cv_ld_eh_gc_sections=no
16237     elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
16238       gcc_cv_ld_eh_gc_sections=yes
16239       # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections.
16240       if test x$gcc_cv_as_comdat_group != xyes; then
16241         gcc_cv_ld_eh_gc_sections=no
16242         cat > conftest.s <<EOF
16243         .section        .text
16244 .globl _start
16245         .type _start, @function
16246 _start:
16247         .long foo
16248         .size _start, .-_start
16249         .section        .gnu.linkonce.t.foo,"ax",@progbits
16250         .type foo, @function
16251 foo:
16252         .long 0
16253         .size foo, .-foo
16254         .section        .gcc_except_table.foo,"a",@progbits
16255 .L0:
16256         .long 0
16257         .section        .eh_frame,"a",@progbits
16258         .long .L0
16259 EOF
16260         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
16261           if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
16262                | grep "gc-sections option ignored" > /dev/null; then
16263             gcc_cv_ld_eh_gc_sections=no
16264           elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
16265             gcc_cv_ld_eh_gc_sections=yes
16266           fi
16267         fi
16268       fi
16269     fi
16270   fi
16271   rm -f conftest.s conftest.o conftest
16272 fi
16273 case "$target" in
16274   hppa*-*-linux*)
16275     # ??? This apparently exposes a binutils bug with PC-relative relocations.
16276     gcc_cv_ld_eh_gc_sections=no
16277     ;;
16278 esac
16279 if test x$gcc_cv_ld_eh_gc_sections = xyes; then
16280
16281 cat >>confdefs.h <<\_ACEOF
16282 #define HAVE_LD_EH_GC_SECTIONS 1
16283 _ACEOF
16284
16285 fi
16286 echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_gc_sections" >&5
16287 echo "${ECHO_T}$gcc_cv_ld_eh_gc_sections" >&6
16288
16289 # --------
16290 # UNSORTED
16291 # --------
16292
16293 echo "$as_me:$LINENO: checking linker --as-needed support" >&5
16294 echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6
16295 if test "${gcc_cv_ld_as_needed+set}" = set; then
16296   echo $ECHO_N "(cached) $ECHO_C" >&6
16297 else
16298   gcc_cv_ld_as_needed=no
16299 if test $in_tree_ld = yes ; then
16300   if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \
16301      && test $in_tree_ld_is_elf = yes; then
16302     gcc_cv_ld_as_needed=yes
16303   fi
16304 elif test x$gcc_cv_ld != x; then
16305         # Check if linker supports --as-needed and --no-as-needed options
16306         if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
16307                 gcc_cv_ld_as_needed=yes
16308         fi
16309 fi
16310
16311 fi
16312 echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
16313 echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6
16314 if test x"$gcc_cv_ld_as_needed" = xyes; then
16315
16316 cat >>confdefs.h <<\_ACEOF
16317 #define HAVE_LD_AS_NEEDED 1
16318 _ACEOF
16319
16320 fi
16321
16322 case "$target:$tm_file" in
16323   powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
16324     echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
16325 echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6
16326 if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
16327   echo $ECHO_N "(cached) $ECHO_C" >&6
16328 else
16329   gcc_cv_ld_no_dot_syms=no
16330     if test $in_tree_ld = yes ; then
16331       if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2; then
16332         gcc_cv_ld_no_dot_syms=yes
16333       fi
16334     elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
16335       cat > conftest1.s <<EOF
16336         .text
16337         bl .foo
16338 EOF
16339       cat > conftest2.s <<EOF
16340         .section ".opd","aw"
16341         .align 3
16342         .globl foo
16343         .type foo,@function
16344 foo:
16345         .quad .LEfoo,.TOC.@tocbase,0
16346         .text
16347 .LEfoo:
16348         blr
16349         .size foo,.-.LEfoo
16350 EOF
16351       if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
16352          && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
16353          && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
16354         gcc_cv_ld_no_dot_syms=yes
16355       fi
16356       rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
16357     fi
16358
16359 fi
16360 echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
16361 echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6
16362     if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
16363
16364 cat >>confdefs.h <<\_ACEOF
16365 #define HAVE_LD_NO_DOT_SYMS 1
16366 _ACEOF
16367
16368     fi
16369     ;;
16370 esac
16371
16372 echo "$as_me:$LINENO: checking linker --sysroot support" >&5
16373 echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
16374 if test "${gcc_cv_ld_sysroot+set}" = set; then
16375   echo $ECHO_N "(cached) $ECHO_C" >&6
16376 else
16377   gcc_cv_ld_sysroot=no
16378   if test $in_tree_ld = yes ; then
16379       if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 ; then
16380         gcc_cv_ld_sysroot=yes
16381       fi
16382   elif test x$gcc_cv_ld != x; then
16383     if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
16384       gcc_cv_ld_sysroot=yes
16385     fi
16386   fi
16387 fi
16388 echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
16389 echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6
16390 if test x"$gcc_cv_ld_sysroot" = xyes; then
16391
16392 cat >>confdefs.h <<\_ACEOF
16393 #define HAVE_LD_SYSROOT 1
16394 _ACEOF
16395
16396 fi
16397
16398 if test x$with_sysroot = x && test x$host = x$target \
16399    && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
16400    && test "$prefix" != "NONE"; then
16401
16402 cat >>confdefs.h <<_ACEOF
16403 #define PREFIX_INCLUDE_DIR "$prefix/include"
16404 _ACEOF
16405
16406 fi
16407
16408 # Test for stack protector support in target C library.
16409 echo "$as_me:$LINENO: checking __stack_chk_fail in target C library" >&5
16410 echo $ECHO_N "checking __stack_chk_fail in target C library... $ECHO_C" >&6
16411 if test "${gcc_cv_libc_provides_ssp+set}" = set; then
16412   echo $ECHO_N "(cached) $ECHO_C" >&6
16413 else
16414   gcc_cv_libc_provides_ssp=no
16415     case "$target" in
16416        *-*-linux*)
16417       if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
16418         if test "x$with_sysroot" = x; then
16419           glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
16420         elif test "x$with_build_sysroot" != "x"; then
16421           glibc_header_dir="${with_build_sysroot}/usr/include"
16422         elif test "x$with_sysroot" = xyes; then
16423           glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
16424         else
16425           glibc_header_dir="${with_sysroot}/usr/include"
16426         fi
16427       else
16428         glibc_header_dir=/usr/include
16429       fi
16430       # glibc 2.4 and later provides __stack_chk_fail and
16431       # either __stack_chk_guard, or TLS access to stack guard canary.
16432       if test -f $glibc_header_dir/features.h \
16433          && $EGREP '^[  ]*#[    ]*define[       ]+__GNU_LIBRARY__[      ]+([1-9][0-9]|[6-9])' \
16434             $glibc_header_dir/features.h > /dev/null; then
16435         if $EGREP '^[   ]*#[    ]*define[       ]+__GLIBC__[    ]+([1-9][0-9]|[3-9])' \
16436            $glibc_header_dir/features.h > /dev/null; then
16437           gcc_cv_libc_provides_ssp=yes
16438         elif $EGREP '^[         ]*#[    ]*define[       ]+__GLIBC__[    ]+2' \
16439              $glibc_header_dir/features.h > /dev/null \
16440              && $EGREP '^[      ]*#[    ]*define[       ]+__GLIBC_MINOR__[      ]+([1-9][0-9]|[4-9])' \
16441              $glibc_header_dir/features.h > /dev/null; then
16442           gcc_cv_libc_provides_ssp=yes
16443         fi
16444         fi
16445         ;;
16446        *-*-darwin*)
16447          echo "$as_me:$LINENO: checking for __stack_chk_fail" >&5
16448 echo $ECHO_N "checking for __stack_chk_fail... $ECHO_C" >&6
16449 if test "${ac_cv_func___stack_chk_fail+set}" = set; then
16450   echo $ECHO_N "(cached) $ECHO_C" >&6
16451 else
16452   cat >conftest.$ac_ext <<_ACEOF
16453 /* confdefs.h.  */
16454 _ACEOF
16455 cat confdefs.h >>conftest.$ac_ext
16456 cat >>conftest.$ac_ext <<_ACEOF
16457 /* end confdefs.h.  */
16458 /* Define __stack_chk_fail to an innocuous variant, in case <limits.h> declares __stack_chk_fail.
16459    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16460 #define __stack_chk_fail innocuous___stack_chk_fail
16461
16462 /* System header to define __stub macros and hopefully few prototypes,
16463     which can conflict with char __stack_chk_fail (); below.
16464     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16465     <limits.h> exists even on freestanding compilers.  */
16466
16467 #ifdef __STDC__
16468 # include <limits.h>
16469 #else
16470 # include <assert.h>
16471 #endif
16472
16473 #undef __stack_chk_fail
16474
16475 /* Override any gcc2 internal prototype to avoid an error.  */
16476 #ifdef __cplusplus
16477 extern "C"
16478 {
16479 #endif
16480 /* We use char because int might match the return type of a gcc2
16481    builtin and then its argument prototype would still apply.  */
16482 char __stack_chk_fail ();
16483 /* The GNU C library defines this for functions which it implements
16484     to always fail with ENOSYS.  Some functions are actually named
16485     something starting with __ and the normal name is an alias.  */
16486 #if defined (__stub___stack_chk_fail) || defined (__stub_____stack_chk_fail)
16487 choke me
16488 #else
16489 char (*f) () = __stack_chk_fail;
16490 #endif
16491 #ifdef __cplusplus
16492 }
16493 #endif
16494
16495 int
16496 main ()
16497 {
16498 return f != __stack_chk_fail;
16499   ;
16500   return 0;
16501 }
16502 _ACEOF
16503 rm -f conftest.$ac_objext conftest$ac_exeext
16504 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16505   (eval $ac_link) 2>conftest.er1
16506   ac_status=$?
16507   grep -v '^ *+' conftest.er1 >conftest.err
16508   rm -f conftest.er1
16509   cat conftest.err >&5
16510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16511   (exit $ac_status); } &&
16512          { ac_try='test -z "$ac_c_werror_flag"
16513                          || test ! -s conftest.err'
16514   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16515   (eval $ac_try) 2>&5
16516   ac_status=$?
16517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16518   (exit $ac_status); }; } &&
16519          { ac_try='test -s conftest$ac_exeext'
16520   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16521   (eval $ac_try) 2>&5
16522   ac_status=$?
16523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16524   (exit $ac_status); }; }; then
16525   ac_cv_func___stack_chk_fail=yes
16526 else
16527   echo "$as_me: failed program was:" >&5
16528 sed 's/^/| /' conftest.$ac_ext >&5
16529
16530 ac_cv_func___stack_chk_fail=no
16531 fi
16532 rm -f conftest.err conftest.$ac_objext \
16533       conftest$ac_exeext conftest.$ac_ext
16534 fi
16535 echo "$as_me:$LINENO: result: $ac_cv_func___stack_chk_fail" >&5
16536 echo "${ECHO_T}$ac_cv_func___stack_chk_fail" >&6
16537 if test $ac_cv_func___stack_chk_fail = yes; then
16538   gcc_cv_libc_provides_ssp=yes
16539 else
16540   echo "no __stack_chk_fail on this target"
16541 fi
16542
16543         ;;
16544   *) gcc_cv_libc_provides_ssp=no ;;
16545     esac
16546 fi
16547 echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
16548 echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6
16549
16550 if test x$gcc_cv_libc_provides_ssp = xyes; then
16551
16552 cat >>confdefs.h <<\_ACEOF
16553 #define TARGET_LIBC_PROVIDES_SSP 1
16554 _ACEOF
16555
16556 fi
16557
16558 # Check if TFmode long double should be used by default or not.
16559 # Some glibc targets used DFmode long double, but with glibc 2.4
16560 # and later they can use TFmode.
16561 case "$target" in
16562   powerpc*-*-*gnu* | \
16563   sparc*-*-linux* | \
16564   s390*-*-linux* | \
16565   alpha*-*-linux*)
16566
16567 # Check whether --with-long-double-128 or --without-long-double-128 was given.
16568 if test "${with_long_double_128+set}" = set; then
16569   withval="$with_long_double_128"
16570   gcc_cv_target_ldbl128="$with_long_double_128"
16571 else
16572   gcc_cv_target_ldbl128=no
16573       if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
16574         if test "x$with_sysroot" = x; then
16575           glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
16576         elif test "x$with_build_sysroot" != "x"; then
16577           glibc_header_dir="${with_build_sysroot}/usr/include"
16578         elif test "x$with_sysroot" = xyes; then
16579           glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
16580         else
16581           glibc_header_dir="${with_sysroot}/usr/include"
16582         fi
16583       else
16584         glibc_header_dir=/usr/include
16585       fi
16586       grep '^[  ]*#[    ]*define[       ][      ]*__LONG_DOUBLE_MATH_OPTIONAL' \
16587         $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
16588       && gcc_cv_target_ldbl128=yes
16589
16590 fi;
16591     ;;
16592 esac
16593 if test x$gcc_cv_target_ldbl128 = xyes; then
16594
16595 cat >>confdefs.h <<\_ACEOF
16596 #define TARGET_DEFAULT_LONG_DOUBLE_128 1
16597 _ACEOF
16598
16599 fi
16600
16601 # Find out what GC implementation we want, or may, use.
16602
16603 # Check whether --with-gc or --without-gc was given.
16604 if test "${with_gc+set}" = set; then
16605   withval="$with_gc"
16606   case "$withval" in
16607   page)
16608     GGC=ggc-$withval
16609     ;;
16610   zone)
16611     GGC=ggc-$withval
16612
16613 cat >>confdefs.h <<\_ACEOF
16614 #define GGC_ZONE 1
16615 _ACEOF
16616
16617     ;;
16618   *)
16619     { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
16620 echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
16621    { (exit 1); exit 1; }; }
16622     ;;
16623 esac
16624 else
16625   GGC=ggc-page
16626 fi;
16627
16628 echo "Using $GGC for garbage collection."
16629
16630 # Use the system's zlib library.
16631 zlibdir=-L../zlib
16632 zlibinc="-I\$(srcdir)/../zlib"
16633
16634 # Check whether --with-system-zlib or --without-system-zlib was given.
16635 if test "${with_system_zlib+set}" = set; then
16636   withval="$with_system_zlib"
16637   zlibdir=
16638 zlibinc=
16639
16640 fi;
16641
16642
16643
16644
16645 echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
16646 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
16647     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
16648 if test "${enable_maintainer_mode+set}" = set; then
16649   enableval="$enable_maintainer_mode"
16650   maintainer_mode=$enableval
16651 else
16652   maintainer_mode=no
16653 fi;
16654
16655 echo "$as_me:$LINENO: result: $maintainer_mode" >&5
16656 echo "${ECHO_T}$maintainer_mode" >&6
16657
16658 if test "$maintainer_mode" = "yes"; then
16659   MAINT=''
16660 else
16661   MAINT='#'
16662 fi
16663
16664 # --------------
16665 # Language hooks
16666 # --------------
16667
16668 # Make empty files to contain the specs and options for each language.
16669 # Then add #include lines to for a compiler that has specs and/or options.
16670
16671 subdirs=
16672 lang_opt_files=
16673 lang_specs_files=
16674 lang_tree_files=
16675 # These (without "all_") are set in each config-lang.in.
16676 # `language' must be a single word so is spelled singularly.
16677 all_languages=
16678 all_compilers=
16679 all_outputs='Makefile gccbug libada-mk'
16680 # List of language makefile fragments.
16681 all_lang_makefrags=
16682 # List of language subdirectory makefiles.  Deprecated.
16683 all_lang_makefiles=
16684 # Additional files for gengtype
16685 all_gtfiles="$target_gtfiles"
16686
16687 # These are the languages that are set in --enable-languages,
16688 # and are available in the GCC tree.
16689 all_selected_languages=
16690
16691 # Add the language fragments.
16692 # Languages are added via two mechanisms.  Some information must be
16693 # recorded in makefile variables, these are defined in config-lang.in.
16694 # We accumulate them and plug them into the main Makefile.
16695 # The other mechanism is a set of hooks for each of the main targets
16696 # like `clean', `install', etc.
16697
16698 language_hooks="Make-hooks"
16699
16700 for lang in ${srcdir}/*/config-lang.in
16701 do
16702         test "$lang" = "${srcdir}/*/config-lang.in" && continue
16703
16704         lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^   ]*\).*$,\1,p' $lang`
16705         if test "x$lang_alias" = x
16706         then
16707               echo "$lang doesn't set \$language." 1>&2
16708               exit 1
16709         fi
16710         subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
16711         subdirs="$subdirs $subdir"
16712         case ",$enable_languages," in
16713         *,$lang_alias,*)
16714             all_selected_languages="$all_selected_languages $lang_alias"
16715             if test -f $srcdir/$subdir/lang-specs.h; then
16716                 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
16717             fi
16718             ;;
16719         esac
16720
16721         language=
16722         boot_language=
16723         compilers=
16724         outputs=
16725         gtfiles=
16726         subdir_requires=
16727         . ${srcdir}/$subdir/config-lang.in
16728         if test "x$language" = x
16729         then
16730                 echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2
16731                 exit 1
16732         fi
16733
16734         ok=:
16735         case ",$enable_languages," in
16736                 *,$lang_alias,*) ;;
16737                 *)
16738                         for i in $subdir_requires; do
16739                                 test -f "${srcdir}/$i/config-lang.in" && continue
16740                                 ok=false
16741                                 break
16742                         done
16743                 ;;
16744         esac
16745         $ok || continue
16746
16747         all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in"
16748         if test -f $srcdir/$subdir/lang.opt; then
16749             lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
16750         fi
16751         if test -f $srcdir/$subdir/$subdir-tree.def; then
16752             lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
16753         fi
16754         if test -f ${srcdir}/$subdir/Makefile.in
16755                 then all_lang_makefiles="$subdir/Makefile"
16756         fi
16757         all_languages="$all_languages $language"
16758         all_compilers="$all_compilers $compilers"
16759         all_outputs="$all_outputs $outputs"
16760         all_gtfiles="$all_gtfiles [$subdir] $gtfiles"
16761 done
16762
16763 # Pick up gtfiles for c
16764 gtfiles=
16765 . ${srcdir}/c-config-lang.in
16766 all_gtfiles="$all_gtfiles [c] $gtfiles"
16767
16768 check_languages=
16769 for language in $all_selected_languages
16770 do
16771         check_languages="$check_languages check-$language"
16772 done
16773
16774 # We link each language in with a set of hooks, reached indirectly via
16775 # lang.${target}.  Only do so for selected languages.
16776
16777 rm -f Make-hooks
16778 touch Make-hooks
16779 target_list="all.cross start.encap rest.encap tags \
16780         install-common install-man install-info install-pdf dvi pdf \
16781         html uninstall info man srcextra srcman srcinfo \
16782         mostlyclean clean distclean maintainer-clean"
16783
16784 for t in $target_list
16785 do
16786         x=
16787         for lang in $all_selected_languages
16788         do
16789                 x="$x $lang.$t"
16790         done
16791         echo "lang.$t: $x" >> Make-hooks
16792 done
16793
16794 # --------
16795 # UNSORTED
16796 # --------
16797
16798 # Create .gdbinit.
16799
16800 echo "dir ." > .gdbinit
16801 echo "dir ${srcdir}" >> .gdbinit
16802 if test x$gdb_needs_out_file_path = xyes
16803 then
16804         echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
16805 fi
16806 if test "x$subdirs" != x; then
16807         for s in $subdirs
16808         do
16809                 echo "dir ${srcdir}/$s" >> .gdbinit
16810         done
16811 fi
16812 echo "source ${srcdir}/gdbinit.in" >> .gdbinit
16813
16814 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
16815 # absolute path for gcc_tooldir based on inserting the number of up-directory
16816 # movements required to get from $(exec_prefix) to $(prefix) into the basic
16817 # $(libsubdir)/@(unlibsubdir) based path.
16818 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
16819 # make and thus we'd get different behavior depending on where we built the
16820 # sources.
16821 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
16822     gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
16823 else
16824 # An explanation of the sed strings:
16825 #  -e 's|^\$(prefix)||'   matches and eliminates 'prefix' from 'exec_prefix'
16826 #  -e 's|/$||'            match a trailing forward slash and eliminates it
16827 #  -e 's|^[^/]|/|'        forces the string to start with a forward slash (*)
16828 #  -e 's|/[^/]*|../|g'    replaces each occurrence of /<directory> with ../
16829 #
16830 # (*) Note this pattern overwrites the first character of the string
16831 # with a forward slash if one is not already present.  This is not a
16832 # problem because the exact names of the sub-directories concerned is
16833 # unimportant, just the number of them matters.
16834 #
16835 # The practical upshot of these patterns is like this:
16836 #
16837 #  prefix     exec_prefix        result
16838 #  ------     -----------        ------
16839 #   /foo        /foo/bar          ../
16840 #   /foo/       /foo/bar          ../
16841 #   /foo        /foo/bar/         ../
16842 #   /foo/       /foo/bar/         ../
16843 #   /foo        /foo/bar/ugg      ../../
16844 #
16845     dollar='$$'
16846     gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
16847 fi
16848
16849
16850
16851 # Find a directory in which to install a shared libgcc.
16852
16853 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
16854 if test "${enable_version_specific_runtime_libs+set}" = set; then
16855   enableval="$enable_version_specific_runtime_libs"
16856
16857 fi;
16858
16859
16860 # Check whether --with-slibdir or --without-slibdir was given.
16861 if test "${with_slibdir+set}" = set; then
16862   withval="$with_slibdir"
16863   slibdir="$with_slibdir"
16864 else
16865   if test "${enable_version_specific_runtime_libs+set}" = set; then
16866   slibdir='$(libsubdir)'
16867 elif test "$host" != "$target"; then
16868   slibdir='$(build_tooldir)/lib'
16869 else
16870   slibdir='$(libdir)'
16871 fi
16872 fi;
16873
16874
16875 objdir=`${PWDCMD-pwd}`
16876
16877
16878
16879 # Check whether --with-datarootdir or --without-datarootdir was given.
16880 if test "${with_datarootdir+set}" = set; then
16881   withval="$with_datarootdir"
16882   datarootdir="\${prefix}/$with_datarootdir"
16883 else
16884   datarootdir='$(prefix)/share'
16885 fi;
16886
16887
16888
16889 # Check whether --with-docdir or --without-docdir was given.
16890 if test "${with_docdir+set}" = set; then
16891   withval="$with_docdir"
16892   docdir="\${prefix}/$with_docdir"
16893 else
16894   docdir='$(datarootdir)'
16895 fi;
16896
16897
16898
16899 # Check whether --with-htmldir or --without-htmldir was given.
16900 if test "${with_htmldir+set}" = set; then
16901   withval="$with_htmldir"
16902   htmldir="\${prefix}/$with_htmldir"
16903 else
16904   htmldir='$(docdir)'
16905 fi;
16906
16907
16908 # Substitute configuration variables
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964 # Echo link setup.
16965 if test x${build} = x${host} ; then
16966   if test x${host} = x${target} ; then
16967     echo "Links are now set up to build a native compiler for ${target}." 1>&2
16968   else
16969     echo "Links are now set up to build a cross-compiler" 1>&2
16970     echo " from ${host} to ${target}." 1>&2
16971   fi
16972 else
16973   if test x${host} = x${target} ; then
16974     echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
16975     echo " for ${target}." 1>&2
16976   else
16977     echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
16978     echo " from ${host} to ${target}." 1>&2
16979   fi
16980 fi
16981
16982
16983
16984
16985 # Configure the subdirectories
16986 # AC_CONFIG_SUBDIRS($subdirs)
16987
16988 # Create the Makefile
16989 # and configure language subdirectories
16990           ac_config_files="$ac_config_files $all_outputs"
16991
16992
16993           ac_config_commands="$ac_config_commands default"
16994
16995 cat >confcache <<\_ACEOF
16996 # This file is a shell script that caches the results of configure
16997 # tests run on this system so they can be shared between configure
16998 # scripts and configure runs, see configure's option --config-cache.
16999 # It is not useful on other systems.  If it contains results you don't
17000 # want to keep, you may remove or edit it.
17001 #
17002 # config.status only pays attention to the cache file if you give it
17003 # the --recheck option to rerun configure.
17004 #
17005 # `ac_cv_env_foo' variables (set or unset) will be overridden when
17006 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17007 # following values.
17008
17009 _ACEOF
17010
17011 # The following way of writing the cache mishandles newlines in values,
17012 # but we know of no workaround that is simple, portable, and efficient.
17013 # So, don't put newlines in cache variables' values.
17014 # Ultrix sh set writes to stderr and can't be redirected directly,
17015 # and sets the high bit in the cache file unless we assign to the vars.
17016 {
17017   (set) 2>&1 |
17018     case `(ac_space=' '; set | grep ac_space) 2>&1` in
17019     *ac_space=\ *)
17020       # `set' does not quote correctly, so add quotes (double-quote
17021       # substitution turns \\\\ into \\, and sed turns \\ into \).
17022       sed -n \
17023         "s/'/'\\\\''/g;
17024           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17025       ;;
17026     *)
17027       # `set' quotes correctly as required by POSIX, so do not add quotes.
17028       sed -n \
17029         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17030       ;;
17031     esac;
17032 } |
17033   sed '
17034      t clear
17035      : clear
17036      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17037      t end
17038      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17039      : end' >>confcache
17040 if diff $cache_file confcache >/dev/null 2>&1; then :; else
17041   if test -w $cache_file; then
17042     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17043     cat confcache >$cache_file
17044   else
17045     echo "not updating unwritable cache $cache_file"
17046   fi
17047 fi
17048 rm -f confcache
17049
17050 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17051 # Let make expand exec_prefix.
17052 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17053
17054 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17055 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17056 # trailing colons and then remove the whole line if VPATH becomes empty
17057 # (actually we leave an empty line to preserve line numbers).
17058 if test "x$srcdir" = x.; then
17059   ac_vpsub='/^[  ]*VPATH[        ]*=/{
17060 s/:*\$(srcdir):*/:/;
17061 s/:*\${srcdir}:*/:/;
17062 s/:*@srcdir@:*/:/;
17063 s/^\([^=]*=[     ]*\):*/\1/;
17064 s/:*$//;
17065 s/^[^=]*=[       ]*$//;
17066 }'
17067 fi
17068
17069 DEFS=-DHAVE_CONFIG_H
17070
17071 ac_libobjs=
17072 ac_ltlibobjs=
17073 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17074   # 1. Remove the extension, and $U if already installed.
17075   ac_i=`echo "$ac_i" |
17076          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
17077   # 2. Add them.
17078   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
17079   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
17080 done
17081 LIBOBJS=$ac_libobjs
17082
17083 LTLIBOBJS=$ac_ltlibobjs
17084
17085
17086
17087 : ${CONFIG_STATUS=./config.status}
17088 ac_clean_files_save=$ac_clean_files
17089 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17090 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17091 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17092 cat >$CONFIG_STATUS <<_ACEOF
17093 #! $SHELL
17094 # Generated by $as_me.
17095 # Run this file to recreate the current configuration.
17096 # Compiler output produced by configure, useful for debugging
17097 # configure, is in config.log if it exists.
17098
17099 debug=false
17100 ac_cs_recheck=false
17101 ac_cs_silent=false
17102 SHELL=\${CONFIG_SHELL-$SHELL}
17103 _ACEOF
17104
17105 cat >>$CONFIG_STATUS <<\_ACEOF
17106 ## --------------------- ##
17107 ## M4sh Initialization.  ##
17108 ## --------------------- ##
17109
17110 # Be Bourne compatible
17111 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17112   emulate sh
17113   NULLCMD=:
17114   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17115   # is contrary to our usage.  Disable this feature.
17116   alias -g '${1+"$@"}'='"$@"'
17117 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17118   set -o posix
17119 fi
17120 DUALCASE=1; export DUALCASE # for MKS sh
17121
17122 # Support unset when possible.
17123 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
17124   as_unset=unset
17125 else
17126   as_unset=false
17127 fi
17128
17129
17130 # Work around bugs in pre-3.0 UWIN ksh.
17131 $as_unset ENV MAIL MAILPATH
17132 PS1='$ '
17133 PS2='> '
17134 PS4='+ '
17135
17136 # NLS nuisances.
17137 for as_var in \
17138   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
17139   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
17140   LC_TELEPHONE LC_TIME
17141 do
17142   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
17143     eval $as_var=C; export $as_var
17144   else
17145     $as_unset $as_var
17146   fi
17147 done
17148
17149 # Required to use basename.
17150 if expr a : '\(a\)' >/dev/null 2>&1; then
17151   as_expr=expr
17152 else
17153   as_expr=false
17154 fi
17155
17156 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
17157   as_basename=basename
17158 else
17159   as_basename=false
17160 fi
17161
17162
17163 # Name of the executable.
17164 as_me=`$as_basename "$0" ||
17165 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17166          X"$0" : 'X\(//\)$' \| \
17167          X"$0" : 'X\(/\)$' \| \
17168          .     : '\(.\)' 2>/dev/null ||
17169 echo X/"$0" |
17170     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17171           /^X\/\(\/\/\)$/{ s//\1/; q; }
17172           /^X\/\(\/\).*/{ s//\1/; q; }
17173           s/.*/./; q'`
17174
17175
17176 # PATH needs CR, and LINENO needs CR and PATH.
17177 # Avoid depending upon Character Ranges.
17178 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17179 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17180 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17181 as_cr_digits='0123456789'
17182 as_cr_alnum=$as_cr_Letters$as_cr_digits
17183
17184 # The user is always right.
17185 if test "${PATH_SEPARATOR+set}" != set; then
17186   echo "#! /bin/sh" >conf$$.sh
17187   echo  "exit 0"   >>conf$$.sh
17188   chmod +x conf$$.sh
17189   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
17190     PATH_SEPARATOR=';'
17191   else
17192     PATH_SEPARATOR=:
17193   fi
17194   rm -f conf$$.sh
17195 fi
17196
17197
17198   as_lineno_1=$LINENO
17199   as_lineno_2=$LINENO
17200   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17201   test "x$as_lineno_1" != "x$as_lineno_2" &&
17202   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
17203   # Find who we are.  Look in the path if we contain no path at all
17204   # relative or not.
17205   case $0 in
17206     *[\\/]* ) as_myself=$0 ;;
17207     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17208 for as_dir in $PATH
17209 do
17210   IFS=$as_save_IFS
17211   test -z "$as_dir" && as_dir=.
17212   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17213 done
17214
17215        ;;
17216   esac
17217   # We did not find ourselves, most probably we were run as `sh COMMAND'
17218   # in which case we are not to be found in the path.
17219   if test "x$as_myself" = x; then
17220     as_myself=$0
17221   fi
17222   if test ! -f "$as_myself"; then
17223     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17224 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17225    { (exit 1); exit 1; }; }
17226   fi
17227   case $CONFIG_SHELL in
17228   '')
17229     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17230 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17231 do
17232   IFS=$as_save_IFS
17233   test -z "$as_dir" && as_dir=.
17234   for as_base in sh bash ksh sh5; do
17235          case $as_dir in
17236          /*)
17237            if ("$as_dir/$as_base" -c '
17238   as_lineno_1=$LINENO
17239   as_lineno_2=$LINENO
17240   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17241   test "x$as_lineno_1" != "x$as_lineno_2" &&
17242   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
17243              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
17244              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
17245              CONFIG_SHELL=$as_dir/$as_base
17246              export CONFIG_SHELL
17247              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17248            fi;;
17249          esac
17250        done
17251 done
17252 ;;
17253   esac
17254
17255   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17256   # uniformly replaced by the line number.  The first 'sed' inserts a
17257   # line-number line before each line; the second 'sed' does the real
17258   # work.  The second script uses 'N' to pair each line-number line
17259   # with the numbered line, and appends trailing '-' during
17260   # substitution so that $LINENO is not a special case at line end.
17261   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
17262   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
17263   sed '=' <$as_myself |
17264     sed '
17265       N
17266       s,$,-,
17267       : loop
17268       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
17269       t loop
17270       s,-$,,
17271       s,^['$as_cr_digits']*\n,,
17272     ' >$as_me.lineno &&
17273   chmod +x $as_me.lineno ||
17274     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17275 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17276    { (exit 1); exit 1; }; }
17277
17278   # Don't try to exec as it changes $[0], causing all sort of problems
17279   # (the dirname of $[0] is not the place where we might find the
17280   # original and so on.  Autoconf is especially sensible to this).
17281   . ./$as_me.lineno
17282   # Exit status is that of the last command.
17283   exit
17284 }
17285
17286
17287 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17288   *c*,-n*) ECHO_N= ECHO_C='
17289 ' ECHO_T='      ' ;;
17290   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17291   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
17292 esac
17293
17294 if expr a : '\(a\)' >/dev/null 2>&1; then
17295   as_expr=expr
17296 else
17297   as_expr=false
17298 fi
17299
17300 rm -f conf$$ conf$$.exe conf$$.file
17301 echo >conf$$.file
17302 if ln -s conf$$.file conf$$ 2>/dev/null; then
17303   # We could just check for DJGPP; but this test a) works b) is more generic
17304   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17305   if test -f conf$$.exe; then
17306     # Don't use ln at all; we don't have any links
17307     as_ln_s='cp -p'
17308   else
17309     as_ln_s='ln -s'
17310   fi
17311 elif ln conf$$.file conf$$ 2>/dev/null; then
17312   as_ln_s=ln
17313 else
17314   as_ln_s='cp -p'
17315 fi
17316 rm -f conf$$ conf$$.exe conf$$.file
17317
17318 if mkdir -p . 2>/dev/null; then
17319   as_mkdir_p=:
17320 else
17321   test -d ./-p && rmdir ./-p
17322   as_mkdir_p=false
17323 fi
17324
17325 as_executable_p="test -f"
17326
17327 # Sed expression to map a string onto a valid CPP name.
17328 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17329
17330 # Sed expression to map a string onto a valid variable name.
17331 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17332
17333
17334 # IFS
17335 # We need space, tab and new line, in precisely that order.
17336 as_nl='
17337 '
17338 IFS="   $as_nl"
17339
17340 # CDPATH.
17341 $as_unset CDPATH
17342
17343 exec 6>&1
17344
17345 # Open the log real soon, to keep \$[0] and so on meaningful, and to
17346 # report actual input values of CONFIG_FILES etc. instead of their
17347 # values after options handling.  Logging --version etc. is OK.
17348 exec 5>>config.log
17349 {
17350   echo
17351   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17352 ## Running $as_me. ##
17353 _ASBOX
17354 } >&5
17355 cat >&5 <<_CSEOF
17356
17357 This file was extended by $as_me, which was
17358 generated by GNU Autoconf 2.59.  Invocation command line was
17359
17360   CONFIG_FILES    = $CONFIG_FILES
17361   CONFIG_HEADERS  = $CONFIG_HEADERS
17362   CONFIG_LINKS    = $CONFIG_LINKS
17363   CONFIG_COMMANDS = $CONFIG_COMMANDS
17364   $ $0 $@
17365
17366 _CSEOF
17367 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17368 echo >&5
17369 _ACEOF
17370
17371 # Files that config.status was made for.
17372 if test -n "$ac_config_files"; then
17373   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17374 fi
17375
17376 if test -n "$ac_config_headers"; then
17377   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17378 fi
17379
17380 if test -n "$ac_config_links"; then
17381   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17382 fi
17383
17384 if test -n "$ac_config_commands"; then
17385   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17386 fi
17387
17388 cat >>$CONFIG_STATUS <<\_ACEOF
17389
17390 ac_cs_usage="\
17391 \`$as_me' instantiates files from templates according to the
17392 current configuration.
17393
17394 Usage: $0 [OPTIONS] [FILE]...
17395
17396   -h, --help       print this help, then exit
17397   -V, --version    print version number, then exit
17398   -q, --quiet      do not print progress messages
17399   -d, --debug      don't remove temporary files
17400       --recheck    update $as_me by reconfiguring in the same conditions
17401   --file=FILE[:TEMPLATE]
17402                    instantiate the configuration file FILE
17403   --header=FILE[:TEMPLATE]
17404                    instantiate the configuration header FILE
17405
17406 Configuration files:
17407 $config_files
17408
17409 Configuration headers:
17410 $config_headers
17411
17412 Configuration commands:
17413 $config_commands
17414
17415 Report bugs to <bug-autoconf@gnu.org>."
17416 _ACEOF
17417
17418 cat >>$CONFIG_STATUS <<_ACEOF
17419 ac_cs_version="\\
17420 config.status
17421 configured by $0, generated by GNU Autoconf 2.59,
17422   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17423
17424 Copyright (C) 2003 Free Software Foundation, Inc.
17425 This config.status script is free software; the Free Software Foundation
17426 gives unlimited permission to copy, distribute and modify it."
17427 srcdir=$srcdir
17428 _ACEOF
17429
17430 cat >>$CONFIG_STATUS <<\_ACEOF
17431 # If no file are specified by the user, then we need to provide default
17432 # value.  By we need to know if files were specified by the user.
17433 ac_need_defaults=:
17434 while test $# != 0
17435 do
17436   case $1 in
17437   --*=*)
17438     ac_option=`expr "x$1" : 'x\([^=]*\)='`
17439     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17440     ac_shift=:
17441     ;;
17442   -*)
17443     ac_option=$1
17444     ac_optarg=$2
17445     ac_shift=shift
17446     ;;
17447   *) # This is not an option, so the user has probably given explicit
17448      # arguments.
17449      ac_option=$1
17450      ac_need_defaults=false;;
17451   esac
17452
17453   case $ac_option in
17454   # Handling of the options.
17455 _ACEOF
17456 cat >>$CONFIG_STATUS <<\_ACEOF
17457   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17458     ac_cs_recheck=: ;;
17459   --version | --vers* | -V )
17460     echo "$ac_cs_version"; exit 0 ;;
17461   --he | --h)
17462     # Conflict between --help and --header
17463     { { echo "$as_me:$LINENO: error: ambiguous option: $1
17464 Try \`$0 --help' for more information." >&5
17465 echo "$as_me: error: ambiguous option: $1
17466 Try \`$0 --help' for more information." >&2;}
17467    { (exit 1); exit 1; }; };;
17468   --help | --hel | -h )
17469     echo "$ac_cs_usage"; exit 0 ;;
17470   --debug | --d* | -d )
17471     debug=: ;;
17472   --file | --fil | --fi | --f )
17473     $ac_shift
17474     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
17475     ac_need_defaults=false;;
17476   --header | --heade | --head | --hea )
17477     $ac_shift
17478     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
17479     ac_need_defaults=false;;
17480   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17481   | -silent | --silent | --silen | --sile | --sil | --si | --s)
17482     ac_cs_silent=: ;;
17483
17484   # This is an error.
17485   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17486 Try \`$0 --help' for more information." >&5
17487 echo "$as_me: error: unrecognized option: $1
17488 Try \`$0 --help' for more information." >&2;}
17489    { (exit 1); exit 1; }; } ;;
17490
17491   *) ac_config_targets="$ac_config_targets $1" ;;
17492
17493   esac
17494   shift
17495 done
17496
17497 ac_configure_extra_args=
17498
17499 if $ac_cs_silent; then
17500   exec 6>/dev/null
17501   ac_configure_extra_args="$ac_configure_extra_args --silent"
17502 fi
17503
17504 _ACEOF
17505 cat >>$CONFIG_STATUS <<_ACEOF
17506 if \$ac_cs_recheck; then
17507   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
17508   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17509 fi
17510
17511 _ACEOF
17512
17513 cat >>$CONFIG_STATUS <<_ACEOF
17514 #
17515 # INIT-COMMANDS section.
17516 #
17517
17518 subdirs='$subdirs'
17519
17520 _ACEOF
17521
17522
17523
17524 cat >>$CONFIG_STATUS <<\_ACEOF
17525 for ac_config_target in $ac_config_targets
17526 do
17527   case "$ac_config_target" in
17528   # Handling of arguments.
17529   "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
17530   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17531   "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
17532   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17533 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17534    { (exit 1); exit 1; }; };;
17535   esac
17536 done
17537
17538 # If the user did not use the arguments to specify the items to instantiate,
17539 # then the envvar interface is used.  Set only those that are not.
17540 # We use the long form for the default assignment because of an extremely
17541 # bizarre bug on SunOS 4.1.3.
17542 if $ac_need_defaults; then
17543   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17544   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17545   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17546 fi
17547
17548 # Have a temporary directory for convenience.  Make it in the build tree
17549 # simply because there is no reason to put it here, and in addition,
17550 # creating and moving files from /tmp can sometimes cause problems.
17551 # Create a temporary directory, and hook for its removal unless debugging.
17552 $debug ||
17553 {
17554   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17555   trap '{ (exit 1); exit 1; }' 1 2 13 15
17556 }
17557
17558 # Create a (secure) tmp directory for tmp files.
17559
17560 {
17561   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
17562   test -n "$tmp" && test -d "$tmp"
17563 }  ||
17564 {
17565   tmp=./confstat$$-$RANDOM
17566   (umask 077 && mkdir $tmp)
17567 } ||
17568 {
17569    echo "$me: cannot create a temporary directory in ." >&2
17570    { (exit 1); exit 1; }
17571 }
17572
17573 _ACEOF
17574
17575 cat >>$CONFIG_STATUS <<_ACEOF
17576
17577 #
17578 # CONFIG_FILES section.
17579 #
17580
17581 # No need to generate the scripts if there are no CONFIG_FILES.
17582 # This happens for instance when ./config.status config.h
17583 if test -n "\$CONFIG_FILES"; then
17584   # Protect against being on the right side of a sed subst in config.status.
17585   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17586    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17587 s,@SHELL@,$SHELL,;t t
17588 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17589 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17590 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17591 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17592 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17593 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17594 s,@exec_prefix@,$exec_prefix,;t t
17595 s,@prefix@,$prefix,;t t
17596 s,@program_transform_name@,$program_transform_name,;t t
17597 s,@bindir@,$bindir,;t t
17598 s,@sbindir@,$sbindir,;t t
17599 s,@libexecdir@,$libexecdir,;t t
17600 s,@datadir@,$datadir,;t t
17601 s,@sysconfdir@,$sysconfdir,;t t
17602 s,@sharedstatedir@,$sharedstatedir,;t t
17603 s,@localstatedir@,$localstatedir,;t t
17604 s,@libdir@,$libdir,;t t
17605 s,@includedir@,$includedir,;t t
17606 s,@oldincludedir@,$oldincludedir,;t t
17607 s,@infodir@,$infodir,;t t
17608 s,@mandir@,$mandir,;t t
17609 s,@build_alias@,$build_alias,;t t
17610 s,@host_alias@,$host_alias,;t t
17611 s,@target_alias@,$target_alias,;t t
17612 s,@DEFS@,$DEFS,;t t
17613 s,@ECHO_C@,$ECHO_C,;t t
17614 s,@ECHO_N@,$ECHO_N,;t t
17615 s,@ECHO_T@,$ECHO_T,;t t
17616 s,@LIBS@,$LIBS,;t t
17617 s,@build@,$build,;t t
17618 s,@build_cpu@,$build_cpu,;t t
17619 s,@build_vendor@,$build_vendor,;t t
17620 s,@build_os@,$build_os,;t t
17621 s,@host@,$host,;t t
17622 s,@host_cpu@,$host_cpu,;t t
17623 s,@host_vendor@,$host_vendor,;t t
17624 s,@host_os@,$host_os,;t t
17625 s,@target@,$target,;t t
17626 s,@target_cpu@,$target_cpu,;t t
17627 s,@target_vendor@,$target_vendor,;t t
17628 s,@target_os@,$target_os,;t t
17629 s,@target_noncanonical@,$target_noncanonical,;t t
17630 s,@build_libsubdir@,$build_libsubdir,;t t
17631 s,@build_subdir@,$build_subdir,;t t
17632 s,@host_subdir@,$host_subdir,;t t
17633 s,@target_subdir@,$target_subdir,;t t
17634 s,@GENINSRC@,$GENINSRC,;t t
17635 s,@CC@,$CC,;t t
17636 s,@CFLAGS@,$CFLAGS,;t t
17637 s,@LDFLAGS@,$LDFLAGS,;t t
17638 s,@CPPFLAGS@,$CPPFLAGS,;t t
17639 s,@ac_ct_CC@,$ac_ct_CC,;t t
17640 s,@EXEEXT@,$EXEEXT,;t t
17641 s,@OBJEXT@,$OBJEXT,;t t
17642 s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
17643 s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
17644 s,@CPP@,$CPP,;t t
17645 s,@EGREP@,$EGREP,;t t
17646 s,@strict_warn@,$strict_warn,;t t
17647 s,@cxx_compat_warn@,$cxx_compat_warn,;t t
17648 s,@warn_cflags@,$warn_cflags,;t t
17649 s,@nocommon_flag@,$nocommon_flag,;t t
17650 s,@TREEBROWSER@,$TREEBROWSER,;t t
17651 s,@valgrind_path@,$valgrind_path,;t t
17652 s,@valgrind_path_defines@,$valgrind_path_defines,;t t
17653 s,@valgrind_command@,$valgrind_command,;t t
17654 s,@coverage_flags@,$coverage_flags,;t t
17655 s,@enable_multilib@,$enable_multilib,;t t
17656 s,@enable_decimal_float@,$enable_decimal_float,;t t
17657 s,@enable_shared@,$enable_shared,;t t
17658 s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
17659 s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
17660 s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
17661 s,@onestep@,$onestep,;t t
17662 s,@datarootdir@,$datarootdir,;t t
17663 s,@docdir@,$docdir,;t t
17664 s,@htmldir@,$htmldir,;t t
17665 s,@SET_MAKE@,$SET_MAKE,;t t
17666 s,@AWK@,$AWK,;t t
17667 s,@LN_S@,$LN_S,;t t
17668 s,@LN@,$LN,;t t
17669 s,@RANLIB@,$RANLIB,;t t
17670 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17671 s,@ranlib_flags@,$ranlib_flags,;t t
17672 s,@INSTALL@,$INSTALL,;t t
17673 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17674 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17675 s,@make_compare_target@,$make_compare_target,;t t
17676 s,@have_mktemp_command@,$have_mktemp_command,;t t
17677 s,@MAKEINFO@,$MAKEINFO,;t t
17678 s,@BUILD_INFO@,$BUILD_INFO,;t t
17679 s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t
17680 s,@FLEX@,$FLEX,;t t
17681 s,@BISON@,$BISON,;t t
17682 s,@NM@,$NM,;t t
17683 s,@AR@,$AR,;t t
17684 s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t
17685 s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t
17686 s,@LDEXP_LIB@,$LDEXP_LIB,;t t
17687 s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t
17688 s,@LIBICONV@,$LIBICONV,;t t
17689 s,@LTLIBICONV@,$LTLIBICONV,;t t
17690 s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t
17691 s,@manext@,$manext,;t t
17692 s,@objext@,$objext,;t t
17693 s,@gthread_flags@,$gthread_flags,;t t
17694 s,@extra_modes_file@,$extra_modes_file,;t t
17695 s,@extra_opt_files@,$extra_opt_files,;t t
17696 s,@USE_NLS@,$USE_NLS,;t t
17697 s,@LIBINTL@,$LIBINTL,;t t
17698 s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
17699 s,@INCINTL@,$INCINTL,;t t
17700 s,@XGETTEXT@,$XGETTEXT,;t t
17701 s,@GMSGFMT@,$GMSGFMT,;t t
17702 s,@POSUB@,$POSUB,;t t
17703 s,@CATALOGS@,$CATALOGS,;t t
17704 s,@DATADIRNAME@,$DATADIRNAME,;t t
17705 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
17706 s,@GENCAT@,$GENCAT,;t t
17707 s,@CATOBJEXT@,$CATOBJEXT,;t t
17708 s,@host_cc_for_libada@,$host_cc_for_libada,;t t
17709 s,@CROSS@,$CROSS,;t t
17710 s,@ALL@,$ALL,;t t
17711 s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t
17712 s,@inhibit_libc@,$inhibit_libc,;t t
17713 s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
17714 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17715 s,@STMP_FIXINC@,$STMP_FIXINC,;t t
17716 s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t
17717 s,@collect2@,$collect2,;t t
17718 s,@gcc_cv_as@,$gcc_cv_as,;t t
17719 s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t
17720 s,@gcc_cv_ld@,$gcc_cv_ld,;t t
17721 s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t
17722 s,@gcc_cv_nm@,$gcc_cv_nm,;t t
17723 s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t
17724 s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t
17725 s,@libgcc_visibility@,$libgcc_visibility,;t t
17726 s,@GGC@,$GGC,;t t
17727 s,@zlibdir@,$zlibdir,;t t
17728 s,@zlibinc@,$zlibinc,;t t
17729 s,@MAINT@,$MAINT,;t t
17730 s,@gcc_tooldir@,$gcc_tooldir,;t t
17731 s,@dollar@,$dollar,;t t
17732 s,@slibdir@,$slibdir,;t t
17733 s,@objdir@,$objdir,;t t
17734 s,@subdirs@,$subdirs,;t t
17735 s,@srcdir@,$srcdir,;t t
17736 s,@all_compilers@,$all_compilers,;t t
17737 s,@all_gtfiles@,$all_gtfiles,;t t
17738 s,@all_lang_makefrags@,$all_lang_makefrags,;t t
17739 s,@all_lang_makefiles@,$all_lang_makefiles,;t t
17740 s,@all_languages@,$all_languages,;t t
17741 s,@all_selected_languages@,$all_selected_languages,;t t
17742 s,@build_exeext@,$build_exeext,;t t
17743 s,@build_install_headers_dir@,$build_install_headers_dir,;t t
17744 s,@build_xm_file_list@,$build_xm_file_list,;t t
17745 s,@build_xm_include_list@,$build_xm_include_list,;t t
17746 s,@build_xm_defines@,$build_xm_defines,;t t
17747 s,@check_languages@,$check_languages,;t t
17748 s,@cpp_install_dir@,$cpp_install_dir,;t t
17749 s,@xmake_file@,$xmake_file,;t t
17750 s,@tmake_file@,$tmake_file,;t t
17751 s,@extra_gcc_objs@,$extra_gcc_objs,;t t
17752 s,@extra_headers_list@,$extra_headers_list,;t t
17753 s,@extra_objs@,$extra_objs,;t t
17754 s,@extra_parts@,$extra_parts,;t t
17755 s,@extra_passes@,$extra_passes,;t t
17756 s,@extra_programs@,$extra_programs,;t t
17757 s,@float_h_file@,$float_h_file,;t t
17758 s,@gcc_config_arguments@,$gcc_config_arguments,;t t
17759 s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t
17760 s,@host_exeext@,$host_exeext,;t t
17761 s,@host_xm_file_list@,$host_xm_file_list,;t t
17762 s,@host_xm_include_list@,$host_xm_include_list,;t t
17763 s,@host_xm_defines@,$host_xm_defines,;t t
17764 s,@out_host_hook_obj@,$out_host_hook_obj,;t t
17765 s,@install@,$install,;t t
17766 s,@lang_opt_files@,$lang_opt_files,;t t
17767 s,@lang_specs_files@,$lang_specs_files,;t t
17768 s,@lang_tree_files@,$lang_tree_files,;t t
17769 s,@local_prefix@,$local_prefix,;t t
17770 s,@md_file@,$md_file,;t t
17771 s,@objc_boehm_gc@,$objc_boehm_gc,;t t
17772 s,@out_file@,$out_file,;t t
17773 s,@out_object_file@,$out_object_file,;t t
17774 s,@thread_file@,$thread_file,;t t
17775 s,@tm_file_list@,$tm_file_list,;t t
17776 s,@tm_include_list@,$tm_include_list,;t t
17777 s,@tm_defines@,$tm_defines,;t t
17778 s,@tm_p_file_list@,$tm_p_file_list,;t t
17779 s,@tm_p_include_list@,$tm_p_include_list,;t t
17780 s,@xm_file_list@,$xm_file_list,;t t
17781 s,@xm_include_list@,$xm_include_list,;t t
17782 s,@xm_defines@,$xm_defines,;t t
17783 s,@c_target_objs@,$c_target_objs,;t t
17784 s,@cxx_target_objs@,$cxx_target_objs,;t t
17785 s,@target_cpu_default@,$target_cpu_default,;t t
17786 s,@GMPLIBS@,$GMPLIBS,;t t
17787 s,@GMPINC@,$GMPINC,;t t
17788 s,@LIBOBJS@,$LIBOBJS,;t t
17789 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
17790 /@language_hooks@/r $language_hooks
17791 s,@language_hooks@,,;t t
17792 CEOF
17793
17794 _ACEOF
17795
17796   cat >>$CONFIG_STATUS <<\_ACEOF
17797   # Split the substitutions into bite-sized pieces for seds with
17798   # small command number limits, like on Digital OSF/1 and HP-UX.
17799   ac_max_sed_lines=48
17800   ac_sed_frag=1 # Number of current file.
17801   ac_beg=1 # First line for current file.
17802   ac_end=$ac_max_sed_lines # Line after last line for current file.
17803   ac_more_lines=:
17804   ac_sed_cmds=
17805   while $ac_more_lines; do
17806     if test $ac_beg -gt 1; then
17807       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17808     else
17809       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17810     fi
17811     if test ! -s $tmp/subs.frag; then
17812       ac_more_lines=false
17813     else
17814       # The purpose of the label and of the branching condition is to
17815       # speed up the sed processing (if there are no `@' at all, there
17816       # is no need to browse any of the substitutions).
17817       # These are the two extra sed commands mentioned above.
17818       (echo ':t
17819   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17820       if test -z "$ac_sed_cmds"; then
17821         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17822       else
17823         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17824       fi
17825       ac_sed_frag=`expr $ac_sed_frag + 1`
17826       ac_beg=$ac_end
17827       ac_end=`expr $ac_end + $ac_max_sed_lines`
17828     fi
17829   done
17830   if test -z "$ac_sed_cmds"; then
17831     ac_sed_cmds=cat
17832   fi
17833 fi # test -n "$CONFIG_FILES"
17834
17835 _ACEOF
17836 cat >>$CONFIG_STATUS <<\_ACEOF
17837 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17838   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17839   case $ac_file in
17840   - | *:- | *:-:* ) # input from stdin
17841         cat >$tmp/stdin
17842         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17843         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17844   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17845         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17846   * )   ac_file_in=$ac_file.in ;;
17847   esac
17848
17849   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17850   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17851 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17852          X"$ac_file" : 'X\(//\)[^/]' \| \
17853          X"$ac_file" : 'X\(//\)$' \| \
17854          X"$ac_file" : 'X\(/\)' \| \
17855          .     : '\(.\)' 2>/dev/null ||
17856 echo X"$ac_file" |
17857     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17858           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17859           /^X\(\/\/\)$/{ s//\1/; q; }
17860           /^X\(\/\).*/{ s//\1/; q; }
17861           s/.*/./; q'`
17862   { if $as_mkdir_p; then
17863     mkdir -p "$ac_dir"
17864   else
17865     as_dir="$ac_dir"
17866     as_dirs=
17867     while test ! -d "$as_dir"; do
17868       as_dirs="$as_dir $as_dirs"
17869       as_dir=`(dirname "$as_dir") 2>/dev/null ||
17870 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17871          X"$as_dir" : 'X\(//\)[^/]' \| \
17872          X"$as_dir" : 'X\(//\)$' \| \
17873          X"$as_dir" : 'X\(/\)' \| \
17874          .     : '\(.\)' 2>/dev/null ||
17875 echo X"$as_dir" |
17876     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17877           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17878           /^X\(\/\/\)$/{ s//\1/; q; }
17879           /^X\(\/\).*/{ s//\1/; q; }
17880           s/.*/./; q'`
17881     done
17882     test ! -n "$as_dirs" || mkdir $as_dirs
17883   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17884 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17885    { (exit 1); exit 1; }; }; }
17886
17887   ac_builddir=.
17888
17889 if test "$ac_dir" != .; then
17890   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17891   # A "../" for each directory in $ac_dir_suffix.
17892   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17893 else
17894   ac_dir_suffix= ac_top_builddir=
17895 fi
17896
17897 case $srcdir in
17898   .)  # No --srcdir option.  We are building in place.
17899     ac_srcdir=.
17900     if test -z "$ac_top_builddir"; then
17901        ac_top_srcdir=.
17902     else
17903        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17904     fi ;;
17905   [\\/]* | ?:[\\/]* )  # Absolute path.
17906     ac_srcdir=$srcdir$ac_dir_suffix;
17907     ac_top_srcdir=$srcdir ;;
17908   *) # Relative path.
17909     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17910     ac_top_srcdir=$ac_top_builddir$srcdir ;;
17911 esac
17912
17913 # Do not use `cd foo && pwd` to compute absolute paths, because
17914 # the directories may not exist.
17915 case `pwd` in
17916 .) ac_abs_builddir="$ac_dir";;
17917 *)
17918   case "$ac_dir" in
17919   .) ac_abs_builddir=`pwd`;;
17920   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
17921   *) ac_abs_builddir=`pwd`/"$ac_dir";;
17922   esac;;
17923 esac
17924 case $ac_abs_builddir in
17925 .) ac_abs_top_builddir=${ac_top_builddir}.;;
17926 *)
17927   case ${ac_top_builddir}. in
17928   .) ac_abs_top_builddir=$ac_abs_builddir;;
17929   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
17930   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
17931   esac;;
17932 esac
17933 case $ac_abs_builddir in
17934 .) ac_abs_srcdir=$ac_srcdir;;
17935 *)
17936   case $ac_srcdir in
17937   .) ac_abs_srcdir=$ac_abs_builddir;;
17938   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
17939   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
17940   esac;;
17941 esac
17942 case $ac_abs_builddir in
17943 .) ac_abs_top_srcdir=$ac_top_srcdir;;
17944 *)
17945   case $ac_top_srcdir in
17946   .) ac_abs_top_srcdir=$ac_abs_builddir;;
17947   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
17948   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
17949   esac;;
17950 esac
17951
17952
17953
17954   if test x"$ac_file" != x-; then
17955     { echo "$as_me:$LINENO: creating $ac_file" >&5
17956 echo "$as_me: creating $ac_file" >&6;}
17957     rm -f "$ac_file"
17958   fi
17959   # Let's still pretend it is `configure' which instantiates (i.e., don't
17960   # use $as_me), people would be surprised to read:
17961   #    /* config.h.  Generated by config.status.  */
17962   if test x"$ac_file" = x-; then
17963     configure_input=
17964   else
17965     configure_input="$ac_file.  "
17966   fi
17967   configure_input=$configure_input"Generated from `echo $ac_file_in |
17968                                      sed 's,.*/,,'` by configure."
17969
17970   # First look for the input files in the build tree, otherwise in the
17971   # src tree.
17972   ac_file_inputs=`IFS=:
17973     for f in $ac_file_in; do
17974       case $f in
17975       -) echo $tmp/stdin ;;
17976       [\\/$]*)
17977          # Absolute (can't be DOS-style, as IFS=:)
17978          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17979 echo "$as_me: error: cannot find input file: $f" >&2;}
17980    { (exit 1); exit 1; }; }
17981          echo "$f";;
17982       *) # Relative
17983          if test -f "$f"; then
17984            # Build tree
17985            echo "$f"
17986          elif test -f "$srcdir/$f"; then
17987            # Source tree
17988            echo "$srcdir/$f"
17989          else
17990            # /dev/null tree
17991            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17992 echo "$as_me: error: cannot find input file: $f" >&2;}
17993    { (exit 1); exit 1; }; }
17994          fi;;
17995       esac
17996     done` || { (exit 1); exit 1; }
17997 _ACEOF
17998 cat >>$CONFIG_STATUS <<_ACEOF
17999   sed "$ac_vpsub
18000 $extrasub
18001 _ACEOF
18002 cat >>$CONFIG_STATUS <<\_ACEOF
18003 :t
18004 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18005 s,@configure_input@,$configure_input,;t t
18006 s,@srcdir@,$ac_srcdir,;t t
18007 s,@abs_srcdir@,$ac_abs_srcdir,;t t
18008 s,@top_srcdir@,$ac_top_srcdir,;t t
18009 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18010 s,@builddir@,$ac_builddir,;t t
18011 s,@abs_builddir@,$ac_abs_builddir,;t t
18012 s,@top_builddir@,$ac_top_builddir,;t t
18013 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18014 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18015   rm -f $tmp/stdin
18016   if test x"$ac_file" != x-; then
18017     mv $tmp/out $ac_file
18018   else
18019     cat $tmp/out
18020     rm -f $tmp/out
18021   fi
18022
18023 done
18024 _ACEOF
18025 cat >>$CONFIG_STATUS <<\_ACEOF
18026
18027 #
18028 # CONFIG_HEADER section.
18029 #
18030
18031 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18032 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18033 #
18034 # ac_d sets the value in "#define NAME VALUE" lines.
18035 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
18036 ac_dB='[         ].*$,\1#\2'
18037 ac_dC=' '
18038 ac_dD=',;t'
18039 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18040 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18041 ac_uB='$,\1#\2define\3'
18042 ac_uC=' '
18043 ac_uD=',;t'
18044
18045 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18046   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18047   case $ac_file in
18048   - | *:- | *:-:* ) # input from stdin
18049         cat >$tmp/stdin
18050         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18051         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18052   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18053         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18054   * )   ac_file_in=$ac_file.in ;;
18055   esac
18056
18057   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18058 echo "$as_me: creating $ac_file" >&6;}
18059
18060   # First look for the input files in the build tree, otherwise in the
18061   # src tree.
18062   ac_file_inputs=`IFS=:
18063     for f in $ac_file_in; do
18064       case $f in
18065       -) echo $tmp/stdin ;;
18066       [\\/$]*)
18067          # Absolute (can't be DOS-style, as IFS=:)
18068          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18069 echo "$as_me: error: cannot find input file: $f" >&2;}
18070    { (exit 1); exit 1; }; }
18071          # Do quote $f, to prevent DOS paths from being IFS'd.
18072          echo "$f";;
18073       *) # Relative
18074          if test -f "$f"; then
18075            # Build tree
18076            echo "$f"
18077          elif test -f "$srcdir/$f"; then
18078            # Source tree
18079            echo "$srcdir/$f"
18080          else
18081            # /dev/null tree
18082            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18083 echo "$as_me: error: cannot find input file: $f" >&2;}
18084    { (exit 1); exit 1; }; }
18085          fi;;
18086       esac
18087     done` || { (exit 1); exit 1; }
18088   # Remove the trailing spaces.
18089   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
18090
18091 _ACEOF
18092
18093 # Transform confdefs.h into two sed scripts, `conftest.defines' and
18094 # `conftest.undefs', that substitutes the proper values into
18095 # config.h.in to produce config.h.  The first handles `#define'
18096 # templates, and the second `#undef' templates.
18097 # And first: Protect against being on the right side of a sed subst in
18098 # config.status.  Protect against being in an unquoted here document
18099 # in config.status.
18100 rm -f conftest.defines conftest.undefs
18101 # Using a here document instead of a string reduces the quoting nightmare.
18102 # Putting comments in sed scripts is not portable.
18103 #
18104 # `end' is used to avoid that the second main sed command (meant for
18105 # 0-ary CPP macros) applies to n-ary macro definitions.
18106 # See the Autoconf documentation for `clear'.
18107 cat >confdef2sed.sed <<\_ACEOF
18108 s/[\\&,]/\\&/g
18109 s,[\\$`],\\&,g
18110 t clear
18111 : clear
18112 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18113 t end
18114 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18115 : end
18116 _ACEOF
18117 # If some macros were called several times there might be several times
18118 # the same #defines, which is useless.  Nevertheless, we may not want to
18119 # sort them, since we want the *last* AC-DEFINE to be honored.
18120 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18121 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18122 rm -f confdef2sed.sed
18123
18124 # This sed command replaces #undef with comments.  This is necessary, for
18125 # example, in the case of _POSIX_SOURCE, which is predefined and required
18126 # on some systems where configure will not decide to define it.
18127 cat >>conftest.undefs <<\_ACEOF
18128 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18129 _ACEOF
18130
18131 # Break up conftest.defines because some shells have a limit on the size
18132 # of here documents, and old seds have small limits too (100 cmds).
18133 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
18134 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
18135 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18136 echo '  :' >>$CONFIG_STATUS
18137 rm -f conftest.tail
18138 while grep . conftest.defines >/dev/null
18139 do
18140   # Write a limited-size here document to $tmp/defines.sed.
18141   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18142   # Speed up: don't consider the non `#define' lines.
18143   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
18144   # Work around the forget-to-reset-the-flag bug.
18145   echo 't clr' >>$CONFIG_STATUS
18146   echo ': clr' >>$CONFIG_STATUS
18147   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
18148   echo 'CEOF
18149   sed -f $tmp/defines.sed $tmp/in >$tmp/out
18150   rm -f $tmp/in
18151   mv $tmp/out $tmp/in
18152 ' >>$CONFIG_STATUS
18153   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18154   rm -f conftest.defines
18155   mv conftest.tail conftest.defines
18156 done
18157 rm -f conftest.defines
18158 echo '  fi # grep' >>$CONFIG_STATUS
18159 echo >>$CONFIG_STATUS
18160
18161 # Break up conftest.undefs because some shells have a limit on the size
18162 # of here documents, and old seds have small limits too (100 cmds).
18163 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
18164 rm -f conftest.tail
18165 while grep . conftest.undefs >/dev/null
18166 do
18167   # Write a limited-size here document to $tmp/undefs.sed.
18168   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18169   # Speed up: don't consider the non `#undef'
18170   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
18171   # Work around the forget-to-reset-the-flag bug.
18172   echo 't clr' >>$CONFIG_STATUS
18173   echo ': clr' >>$CONFIG_STATUS
18174   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18175   echo 'CEOF
18176   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18177   rm -f $tmp/in
18178   mv $tmp/out $tmp/in
18179 ' >>$CONFIG_STATUS
18180   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18181   rm -f conftest.undefs
18182   mv conftest.tail conftest.undefs
18183 done
18184 rm -f conftest.undefs
18185
18186 cat >>$CONFIG_STATUS <<\_ACEOF
18187   # Let's still pretend it is `configure' which instantiates (i.e., don't
18188   # use $as_me), people would be surprised to read:
18189   #    /* config.h.  Generated by config.status.  */
18190   if test x"$ac_file" = x-; then
18191     echo "/* Generated by configure.  */" >$tmp/config.h
18192   else
18193     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
18194   fi
18195   cat $tmp/in >>$tmp/config.h
18196   rm -f $tmp/in
18197   if test x"$ac_file" != x-; then
18198     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
18199       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18200 echo "$as_me: $ac_file is unchanged" >&6;}
18201     else
18202       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18203 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18204          X"$ac_file" : 'X\(//\)[^/]' \| \
18205          X"$ac_file" : 'X\(//\)$' \| \
18206          X"$ac_file" : 'X\(/\)' \| \
18207          .     : '\(.\)' 2>/dev/null ||
18208 echo X"$ac_file" |
18209     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18210           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18211           /^X\(\/\/\)$/{ s//\1/; q; }
18212           /^X\(\/\).*/{ s//\1/; q; }
18213           s/.*/./; q'`
18214       { if $as_mkdir_p; then
18215     mkdir -p "$ac_dir"
18216   else
18217     as_dir="$ac_dir"
18218     as_dirs=
18219     while test ! -d "$as_dir"; do
18220       as_dirs="$as_dir $as_dirs"
18221       as_dir=`(dirname "$as_dir") 2>/dev/null ||
18222 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18223          X"$as_dir" : 'X\(//\)[^/]' \| \
18224          X"$as_dir" : 'X\(//\)$' \| \
18225          X"$as_dir" : 'X\(/\)' \| \
18226          .     : '\(.\)' 2>/dev/null ||
18227 echo X"$as_dir" |
18228     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18229           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18230           /^X\(\/\/\)$/{ s//\1/; q; }
18231           /^X\(\/\).*/{ s//\1/; q; }
18232           s/.*/./; q'`
18233     done
18234     test ! -n "$as_dirs" || mkdir $as_dirs
18235   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18236 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18237    { (exit 1); exit 1; }; }; }
18238
18239       rm -f $ac_file
18240       mv $tmp/config.h $ac_file
18241     fi
18242   else
18243     cat $tmp/config.h
18244     rm -f $tmp/config.h
18245   fi
18246 done
18247 _ACEOF
18248 cat >>$CONFIG_STATUS <<\_ACEOF
18249
18250 #
18251 # CONFIG_COMMANDS section.
18252 #
18253 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18254   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18255   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18256   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
18257 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18258          X"$ac_dest" : 'X\(//\)[^/]' \| \
18259          X"$ac_dest" : 'X\(//\)$' \| \
18260          X"$ac_dest" : 'X\(/\)' \| \
18261          .     : '\(.\)' 2>/dev/null ||
18262 echo X"$ac_dest" |
18263     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18264           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18265           /^X\(\/\/\)$/{ s//\1/; q; }
18266           /^X\(\/\).*/{ s//\1/; q; }
18267           s/.*/./; q'`
18268   { if $as_mkdir_p; then
18269     mkdir -p "$ac_dir"
18270   else
18271     as_dir="$ac_dir"
18272     as_dirs=
18273     while test ! -d "$as_dir"; do
18274       as_dirs="$as_dir $as_dirs"
18275       as_dir=`(dirname "$as_dir") 2>/dev/null ||
18276 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18277          X"$as_dir" : 'X\(//\)[^/]' \| \
18278          X"$as_dir" : 'X\(//\)$' \| \
18279          X"$as_dir" : 'X\(/\)' \| \
18280          .     : '\(.\)' 2>/dev/null ||
18281 echo X"$as_dir" |
18282     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18283           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18284           /^X\(\/\/\)$/{ s//\1/; q; }
18285           /^X\(\/\).*/{ s//\1/; q; }
18286           s/.*/./; q'`
18287     done
18288     test ! -n "$as_dirs" || mkdir $as_dirs
18289   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18290 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18291    { (exit 1); exit 1; }; }; }
18292
18293   ac_builddir=.
18294
18295 if test "$ac_dir" != .; then
18296   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18297   # A "../" for each directory in $ac_dir_suffix.
18298   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18299 else
18300   ac_dir_suffix= ac_top_builddir=
18301 fi
18302
18303 case $srcdir in
18304   .)  # No --srcdir option.  We are building in place.
18305     ac_srcdir=.
18306     if test -z "$ac_top_builddir"; then
18307        ac_top_srcdir=.
18308     else
18309        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18310     fi ;;
18311   [\\/]* | ?:[\\/]* )  # Absolute path.
18312     ac_srcdir=$srcdir$ac_dir_suffix;
18313     ac_top_srcdir=$srcdir ;;
18314   *) # Relative path.
18315     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18316     ac_top_srcdir=$ac_top_builddir$srcdir ;;
18317 esac
18318
18319 # Do not use `cd foo && pwd` to compute absolute paths, because
18320 # the directories may not exist.
18321 case `pwd` in
18322 .) ac_abs_builddir="$ac_dir";;
18323 *)
18324   case "$ac_dir" in
18325   .) ac_abs_builddir=`pwd`;;
18326   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
18327   *) ac_abs_builddir=`pwd`/"$ac_dir";;
18328   esac;;
18329 esac
18330 case $ac_abs_builddir in
18331 .) ac_abs_top_builddir=${ac_top_builddir}.;;
18332 *)
18333   case ${ac_top_builddir}. in
18334   .) ac_abs_top_builddir=$ac_abs_builddir;;
18335   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
18336   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
18337   esac;;
18338 esac
18339 case $ac_abs_builddir in
18340 .) ac_abs_srcdir=$ac_srcdir;;
18341 *)
18342   case $ac_srcdir in
18343   .) ac_abs_srcdir=$ac_abs_builddir;;
18344   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
18345   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
18346   esac;;
18347 esac
18348 case $ac_abs_builddir in
18349 .) ac_abs_top_srcdir=$ac_top_srcdir;;
18350 *)
18351   case $ac_top_srcdir in
18352   .) ac_abs_top_srcdir=$ac_abs_builddir;;
18353   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
18354   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
18355   esac;;
18356 esac
18357
18358
18359   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
18360 echo "$as_me: executing $ac_dest commands" >&6;}
18361   case $ac_dest in
18362     default )
18363 case ${CONFIG_HEADERS} in
18364   *auto-host.h:config.in*)
18365   echo > cstamp-h ;;
18366 esac
18367 # Make sure all the subdirs exist.
18368 for d in $subdirs doc build
18369 do
18370     test -d $d || mkdir $d
18371 done
18372  ;;
18373   esac
18374 done
18375 _ACEOF
18376
18377 cat >>$CONFIG_STATUS <<\_ACEOF
18378
18379 { (exit 0); exit 0; }
18380 _ACEOF
18381 chmod +x $CONFIG_STATUS
18382 ac_clean_files=$ac_clean_files_save
18383
18384
18385 # configure is writing to config.log, and then calls config.status.
18386 # config.status does its own redirection, appending to config.log.
18387 # Unfortunately, on DOS this fails, as config.log is still kept open
18388 # by configure, so config.status won't be able to write to it; its
18389 # output is simply discarded.  So we exec the FD to /dev/null,
18390 # effectively closing config.log, so it can be properly (re)opened and
18391 # appended to by config.status.  When coming back to configure, we
18392 # need to make the FD available again.
18393 if test "$no_create" != yes; then
18394   ac_cs_success=:
18395   ac_config_status_args=
18396   test "$silent" = yes &&
18397     ac_config_status_args="$ac_config_status_args --quiet"
18398   exec 5>/dev/null
18399   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18400   exec 5>>config.log
18401   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18402   # would make configure fail if this is the last instruction.
18403   $ac_cs_success || { (exit 1); exit 1; }
18404 fi
18405