]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
predicates.md (mcore_general_movesrc_operand): Accept CONSTs.
[thirdparty/gcc.git] / gcc / configure
CommitLineData
005537df 1#! /bin/sh
861bb6c1 2# Guess values for system-dependent variables and create Makefiles.
a6ccdbab 3# Generated by GNU Autoconf 2.61.
861bb6c1 4#
a6ccdbab
EC
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
861bb6c1
JL
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
ba479fd2
NN
9## --------------------- ##
10## M4sh Initialization. ##
11## --------------------- ##
12
a6ccdbab
EC
13# Be more Bourne compatible
14DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16 emulate sh
17 NULLCMD=:
18 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19 # is contrary to our usage. Disable this feature.
20 alias -g '${1+"$@"}'='"$@"'
a6ccdbab
EC
21 setopt NO_GLOB_SUBST
22else
23 case `(set -o) 2>/dev/null` in
24 *posix*) set -o posix ;;
25esac
26
27fi
28
29
30
31
32# PATH needs CR
33# Avoid depending upon Character Ranges.
34as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37as_cr_digits='0123456789'
38as_cr_alnum=$as_cr_Letters$as_cr_digits
39
40# The user is always right.
41if test "${PATH_SEPARATOR+set}" != set; then
42 echo "#! /bin/sh" >conf$$.sh
43 echo "exit 0" >>conf$$.sh
44 chmod +x conf$$.sh
45 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
46 PATH_SEPARATOR=';'
47 else
48 PATH_SEPARATOR=:
49 fi
50 rm -f conf$$.sh
ba479fd2
NN
51fi
52
53# Support unset when possible.
86da66b5 54if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
55 as_unset=unset
56else
57 as_unset=false
58fi
59
60
a6ccdbab
EC
61# IFS
62# We need space, tab and new line, in precisely that order. Quoting is
63# there to prevent editors from complaining about space-tab.
64# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65# splitting by setting IFS to empty value.)
66as_nl='
67'
68IFS=" "" $as_nl"
69
70# Find who we are. Look in the path if we contain no directory separator.
71case $0 in
72 *[\\/]* ) as_myself=$0 ;;
73 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
74for as_dir in $PATH
75do
76 IFS=$as_save_IFS
77 test -z "$as_dir" && as_dir=.
78 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
79done
80IFS=$as_save_IFS
81
82 ;;
83esac
84# We did not find ourselves, most probably we were run as `sh COMMAND'
85# in which case we are not to be found in the path.
86if test "x$as_myself" = x; then
87 as_myself=$0
88fi
89if test ! -f "$as_myself"; then
90 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
91 { (exit 1); exit 1; }
92fi
93
ba479fd2 94# Work around bugs in pre-3.0 UWIN ksh.
a6ccdbab
EC
95for as_var in ENV MAIL MAILPATH
96do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
97done
ba479fd2
NN
98PS1='$ '
99PS2='> '
100PS4='+ '
101
102# NLS nuisances.
103for as_var in \
104 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
105 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
106 LC_TELEPHONE LC_TIME
107do
86da66b5 108 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
109 eval $as_var=C; export $as_var
110 else
a6ccdbab 111 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
ba479fd2
NN
112 fi
113done
114
115# Required to use basename.
a6ccdbab
EC
116if expr a : '\(a\)' >/dev/null 2>&1 &&
117 test "X`expr 00001 : '.*\(...\)'`" = X001; then
ba479fd2
NN
118 as_expr=expr
119else
120 as_expr=false
121fi
122
a6ccdbab 123if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
ba479fd2
NN
124 as_basename=basename
125else
126 as_basename=false
127fi
128
129
130# Name of the executable.
a6ccdbab 131as_me=`$as_basename -- "$0" ||
ba479fd2
NN
132$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
133 X"$0" : 'X\(//\)$' \| \
a6ccdbab 134 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
ba479fd2 135echo X/"$0" |
a6ccdbab
EC
136 sed '/^.*\/\([^/][^/]*\)\/*$/{
137 s//\1/
138 q
139 }
140 /^X\/\(\/\/\)$/{
141 s//\1/
142 q
143 }
144 /^X\/\(\/\).*/{
145 s//\1/
146 q
147 }
148 s/.*/./; q'`
ba479fd2 149
a6ccdbab
EC
150# CDPATH.
151$as_unset CDPATH
ba479fd2 152
ba479fd2 153
a6ccdbab
EC
154if test "x$CONFIG_SHELL" = x; then
155 if (eval ":") 2>/dev/null; then
156 as_have_required=yes
157else
158 as_have_required=no
b8ec3cc8
EC
159fi
160
a6ccdbab
EC
161 if test $as_have_required = yes && (eval ":
162(as_func_return () {
163 (exit \$1)
164}
165as_func_success () {
166 as_func_return 0
167}
168as_func_failure () {
169 as_func_return 1
170}
171as_func_ret_success () {
172 return 0
173}
174as_func_ret_failure () {
175 return 1
176}
b8ec3cc8 177
a6ccdbab
EC
178exitcode=0
179if as_func_success; then
180 :
181else
182 exitcode=1
183 echo as_func_success failed.
184fi
b8ec3cc8 185
a6ccdbab
EC
186if as_func_failure; then
187 exitcode=1
188 echo as_func_failure succeeded.
189fi
190
191if as_func_ret_success; then
192 :
193else
194 exitcode=1
195 echo as_func_ret_success failed.
196fi
197
198if as_func_ret_failure; then
199 exitcode=1
200 echo as_func_ret_failure succeeded.
201fi
202
203if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
204 :
205else
206 exitcode=1
207 echo positional parameters were not saved.
208fi
209
210test \$exitcode = 0) || { (exit 1); exit 1; }
211
212(
213 as_lineno_1=\$LINENO
214 as_lineno_2=\$LINENO
215 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
216 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
217") 2> /dev/null; then
218 :
219else
220 as_candidate_shells=
ba479fd2 221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
dd7f7a6e 222for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
ba479fd2
NN
223do
224 IFS=$as_save_IFS
225 test -z "$as_dir" && as_dir=.
a6ccdbab 226 case $as_dir in
ba479fd2 227 /*)
a6ccdbab
EC
228 for as_base in sh bash ksh sh5; do
229 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
230 done;;
231 esac
232done
233IFS=$as_save_IFS
234
235
236 for as_shell in $as_candidate_shells $SHELL; do
237 # Try only shells that exist, to save several forks.
238 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
239 { ("$as_shell") 2> /dev/null <<\_ASEOF
240if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
241 emulate sh
242 NULLCMD=:
243 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
244 # is contrary to our usage. Disable this feature.
245 alias -g '${1+"$@"}'='"$@"'
246 setopt NO_GLOB_SUBST
247else
248 case `(set -o) 2>/dev/null` in
249 *posix*) set -o posix ;;
250esac
251
252fi
253
254
255:
256_ASEOF
257}; then
258 CONFIG_SHELL=$as_shell
259 as_have_required=yes
260 if { "$as_shell" 2> /dev/null <<\_ASEOF
261if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
262 emulate sh
263 NULLCMD=:
264 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
265 # is contrary to our usage. Disable this feature.
266 alias -g '${1+"$@"}'='"$@"'
267 setopt NO_GLOB_SUBST
268else
269 case `(set -o) 2>/dev/null` in
270 *posix*) set -o posix ;;
271esac
272
273fi
274
275
276:
277(as_func_return () {
278 (exit $1)
279}
280as_func_success () {
281 as_func_return 0
282}
283as_func_failure () {
284 as_func_return 1
285}
286as_func_ret_success () {
287 return 0
288}
289as_func_ret_failure () {
290 return 1
291}
292
293exitcode=0
294if as_func_success; then
295 :
296else
297 exitcode=1
298 echo as_func_success failed.
299fi
300
301if as_func_failure; then
302 exitcode=1
303 echo as_func_failure succeeded.
304fi
305
306if as_func_ret_success; then
307 :
308else
309 exitcode=1
310 echo as_func_ret_success failed.
311fi
312
313if as_func_ret_failure; then
314 exitcode=1
315 echo as_func_ret_failure succeeded.
316fi
317
318if ( set x; as_func_ret_success y && test x = "$1" ); then
319 :
320else
321 exitcode=1
322 echo positional parameters were not saved.
323fi
324
325test $exitcode = 0) || { (exit 1); exit 1; }
326
327(
b8ec3cc8
EC
328 as_lineno_1=$LINENO
329 as_lineno_2=$LINENO
330 test "x$as_lineno_1" != "x$as_lineno_2" &&
a6ccdbab
EC
331 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
332
333_ASEOF
334}; then
335 break
336fi
337
338fi
339
340 done
341
342 if test "x$CONFIG_SHELL" != x; then
343 for as_var in BASH_ENV ENV
344 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
345 done
346 export CONFIG_SHELL
347 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
348fi
349
350
351 if test $as_have_required = no; then
352 echo This script requires a shell more modern than all the
353 echo shells that I found on your system. Please install a
354 echo modern shell, or manually run the script under such a
355 echo shell if you do have one.
356 { (exit 1); exit 1; }
357fi
358
359
360fi
361
362fi
363
364
365
366(eval "as_func_return () {
367 (exit \$1)
368}
369as_func_success () {
370 as_func_return 0
371}
372as_func_failure () {
373 as_func_return 1
374}
375as_func_ret_success () {
376 return 0
377}
378as_func_ret_failure () {
379 return 1
380}
381
382exitcode=0
383if as_func_success; then
384 :
385else
386 exitcode=1
387 echo as_func_success failed.
388fi
389
390if as_func_failure; then
391 exitcode=1
392 echo as_func_failure succeeded.
393fi
394
395if as_func_ret_success; then
396 :
397else
398 exitcode=1
399 echo as_func_ret_success failed.
400fi
401
402if as_func_ret_failure; then
403 exitcode=1
404 echo as_func_ret_failure succeeded.
405fi
406
407if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
408 :
409else
410 exitcode=1
411 echo positional parameters were not saved.
412fi
413
414test \$exitcode = 0") || {
415 echo No shell found that supports shell functions.
416 echo Please tell autoconf@gnu.org about your system,
417 echo including any error possibly output before this
418 echo message
419}
420
421
422
423 as_lineno_1=$LINENO
424 as_lineno_2=$LINENO
425 test "x$as_lineno_1" != "x$as_lineno_2" &&
426 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
ba479fd2
NN
427
428 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
429 # uniformly replaced by the line number. The first 'sed' inserts a
a6ccdbab
EC
430 # line-number line after each line using $LINENO; the second 'sed'
431 # does the real work. The second script uses 'N' to pair each
432 # line-number line with the line containing $LINENO, and appends
433 # trailing '-' during substitution so that $LINENO is not a special
434 # case at line end.
ba479fd2 435 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
a6ccdbab
EC
436 # scripts with optimization help from Paolo Bonzini. Blame Lee
437 # E. McMahon (1931-1989) for sed's syntax. :-)
438 sed -n '
439 p
440 /[$]LINENO/=
441 ' <$as_myself |
ba479fd2 442 sed '
a6ccdbab
EC
443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
ba479fd2 447 N
a6ccdbab
EC
448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
ba479fd2 450 t loop
a6ccdbab 451 s/-\n.*//
ba479fd2 452 ' >$as_me.lineno &&
a6ccdbab 453 chmod +x "$as_me.lineno" ||
ba479fd2
NN
454 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
455 { (exit 1); exit 1; }; }
456
457 # Don't try to exec as it changes $[0], causing all sort of problems
458 # (the dirname of $[0] is not the place where we might find the
a6ccdbab
EC
459 # original and so on. Autoconf is especially sensitive to this).
460 . "./$as_me.lineno"
ba479fd2
NN
461 # Exit status is that of the last command.
462 exit
463}
464
465
a6ccdbab
EC
466if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
467 as_dirname=dirname
468else
469 as_dirname=false
470fi
471
472ECHO_C= ECHO_N= ECHO_T=
473case `echo -n x` in
474-n*)
475 case `echo 'x\c'` in
476 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
477 *) ECHO_C='\c';;
478 esac;;
479*)
480 ECHO_N='-n';;
ba479fd2
NN
481esac
482
a6ccdbab
EC
483if expr a : '\(a\)' >/dev/null 2>&1 &&
484 test "X`expr 00001 : '.*\(...\)'`" = X001; then
ba479fd2
NN
485 as_expr=expr
486else
487 as_expr=false
488fi
489
490rm -f conf$$ conf$$.exe conf$$.file
a6ccdbab
EC
491if test -d conf$$.dir; then
492 rm -f conf$$.dir/conf$$.file
493else
494 rm -f conf$$.dir
495 mkdir conf$$.dir
496fi
ba479fd2
NN
497echo >conf$$.file
498if ln -s conf$$.file conf$$ 2>/dev/null; then
a6ccdbab
EC
499 as_ln_s='ln -s'
500 # ... but there are two gotchas:
501 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
502 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
503 # In both cases, we have to default to `cp -p'.
504 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
ba479fd2 505 as_ln_s='cp -p'
ba479fd2
NN
506elif ln conf$$.file conf$$ 2>/dev/null; then
507 as_ln_s=ln
508else
509 as_ln_s='cp -p'
510fi
a6ccdbab
EC
511rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
512rmdir conf$$.dir 2>/dev/null
861bb6c1 513
ba479fd2
NN
514if mkdir -p . 2>/dev/null; then
515 as_mkdir_p=:
516else
86da66b5 517 test -d ./-p && rmdir ./-p
ba479fd2
NN
518 as_mkdir_p=false
519fi
520
a6ccdbab
EC
521if test -x / >/dev/null 2>&1; then
522 as_test_x='test -x'
523else
524 if ls -dL / >/dev/null 2>&1; then
525 as_ls_L_option=L
526 else
527 as_ls_L_option=
528 fi
529 as_test_x='
530 eval sh -c '\''
531 if test -d "$1"; then
532 test -d "$1/.";
533 else
534 case $1 in
535 -*)set "./$1";;
536 esac;
537 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
538 ???[sx]*):;;*)false;;esac;fi
539 '\'' sh
540 '
541fi
542as_executable_p=$as_test_x
ba479fd2
NN
543
544# Sed expression to map a string onto a valid CPP name.
86da66b5 545as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
546
547# Sed expression to map a string onto a valid variable name.
86da66b5 548as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
549
550
ba479fd2 551
a6ccdbab 552exec 7<&0 </dev/null 6>&1
ba479fd2
NN
553
554# Name of the host.
555# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
556# so uname gets run too.
557ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
558
ba479fd2
NN
559#
560# Initializations.
561#
861bb6c1 562ac_default_prefix=/usr/local
a6ccdbab 563ac_clean_files=
ba479fd2 564ac_config_libobj_dir=.
a6ccdbab 565LIBOBJS=
ba479fd2
NN
566cross_compiling=no
567subdirs=
568MFLAGS=
569MAKEFLAGS=
570SHELL=${CONFIG_SHELL-/bin/sh}
571
ba479fd2
NN
572# Identity of this package.
573PACKAGE_NAME=
574PACKAGE_TARNAME=
575PACKAGE_VERSION=
576PACKAGE_STRING=
577PACKAGE_BUGREPORT=
578
579ac_unique_file="tree.c"
580# Factoring default headers for most tests.
581ac_includes_default="\
582#include <stdio.h>
a6ccdbab 583#ifdef HAVE_SYS_TYPES_H
ba479fd2
NN
584# include <sys/types.h>
585#endif
a6ccdbab 586#ifdef HAVE_SYS_STAT_H
ba479fd2
NN
587# include <sys/stat.h>
588#endif
a6ccdbab 589#ifdef STDC_HEADERS
ba479fd2
NN
590# include <stdlib.h>
591# include <stddef.h>
592#else
a6ccdbab 593# ifdef HAVE_STDLIB_H
ba479fd2
NN
594# include <stdlib.h>
595# endif
596#endif
a6ccdbab
EC
597#ifdef HAVE_STRING_H
598# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
ba479fd2
NN
599# include <memory.h>
600# endif
601# include <string.h>
602#endif
a6ccdbab 603#ifdef HAVE_STRINGS_H
ba479fd2
NN
604# include <strings.h>
605#endif
a6ccdbab 606#ifdef HAVE_INTTYPES_H
ba479fd2 607# include <inttypes.h>
ba479fd2 608#endif
a6ccdbab
EC
609#ifdef HAVE_STDINT_H
610# include <stdint.h>
611#endif
612#ifdef HAVE_UNISTD_H
ba479fd2
NN
613# include <unistd.h>
614#endif"
615
a6ccdbab
EC
616ac_subst_vars='SHELL
617PATH_SEPARATOR
618PACKAGE_NAME
619PACKAGE_TARNAME
620PACKAGE_VERSION
621PACKAGE_STRING
622PACKAGE_BUGREPORT
623exec_prefix
624prefix
625program_transform_name
626bindir
627sbindir
628libexecdir
629datarootdir
630datadir
631sysconfdir
632sharedstatedir
633localstatedir
634includedir
635oldincludedir
636docdir
637infodir
638htmldir
639dvidir
640pdfdir
641psdir
642libdir
643localedir
644mandir
645DEFS
646ECHO_C
647ECHO_N
648ECHO_T
649LIBS
650build_alias
651host_alias
652target_alias
653build
654build_cpu
655build_vendor
656build_os
657host
658host_cpu
659host_vendor
660host_os
661target
662target_cpu
663target_vendor
664target_os
665target_noncanonical
666build_libsubdir
667build_subdir
668host_subdir
669target_subdir
670GENINSRC
671CC
672CFLAGS
673LDFLAGS
674CPPFLAGS
675ac_ct_CC
676EXEEXT
677OBJEXT
678NO_MINUS_C_MINUS_O
679OUTPUT_OPTION
680CPP
681GREP
682EGREP
683strict1_warn
684cxx_compat_warn
685warn_cflags
686WERROR
687nocommon_flag
688TREEBROWSER
689valgrind_path
690valgrind_path_defines
691valgrind_command
692coverage_flags
693enable_multilib
694enable_decimal_float
695enable_shared
696TARGET_SYSTEM_ROOT
697TARGET_SYSTEM_ROOT_DEFINE
698CROSS_SYSTEM_HEADER_DIR
699onestep
700SET_MAKE
701AWK
702LN_S
703LN
704RANLIB
705ranlib_flags
706INSTALL
707INSTALL_PROGRAM
708INSTALL_DATA
709make_compare_target
710have_mktemp_command
711MAKEINFO
712BUILD_INFO
713GENERATED_MANPAGES
714FLEX
715BISON
716NM
717AR
718stage1_cflags
719COLLECT2_LIBS
720GNAT_LIBEXC
721LDEXP_LIB
722TARGET_GETGROUPS_T
723LIBICONV
724LTLIBICONV
725LIBICONV_DEP
726manext
727objext
728gthread_flags
729extra_modes_file
730extra_opt_files
731USE_NLS
732LIBINTL
733LIBINTL_DEP
734INCINTL
735XGETTEXT
736GMSGFMT
737POSUB
738CATALOGS
739DATADIRNAME
740INSTOBJEXT
741GENCAT
742CATOBJEXT
743host_cc_for_libada
744CROSS
745ALL
746SYSTEM_HEADER_DIR
747inhibit_libc
748CC_FOR_BUILD
749BUILD_CFLAGS
750STMP_FIXINC
751STMP_FIXPROTO
752collect2
753gcc_cv_as
754ORIGINAL_AS_FOR_TARGET
755gcc_cv_ld
756ORIGINAL_LD_FOR_TARGET
757gcc_cv_nm
758ORIGINAL_NM_FOR_TARGET
759gcc_cv_objdump
760libgcc_visibility
761GGC
762zlibdir
763zlibinc
764MAINT
765gcc_tooldir
766dollar
767slibdir
768objdir
769subdirs
770srcdir
771all_boot_languages
772all_compilers
773all_gtfiles
774all_gtfiles_files_langs
775all_gtfiles_files_files
776all_lang_makefrags
777all_lang_makefiles
778all_languages
779all_selected_languages
780all_stagestuff
781build_exeext
782build_install_headers_dir
783build_xm_file_list
784build_xm_include_list
785build_xm_defines
786check_languages
787cc_set_by_configure
788quoted_cc_set_by_configure
789cpp_install_dir
790xmake_file
791tmake_file
792extra_gcc_objs
793extra_headers_list
794extra_objs
795extra_parts
796extra_passes
797extra_programs
798float_h_file
799gcc_config_arguments
800gcc_gxx_include_dir
801host_exeext
802host_xm_file_list
803host_xm_include_list
804host_xm_defines
805out_host_hook_obj
806install
807lang_opt_files
808lang_specs_files
809lang_tree_files
810local_prefix
811md_file
812objc_boehm_gc
813out_file
814out_object_file
815stage_prefix_set_by_configure
816quoted_stage_prefix_set_by_configure
817thread_file
818tm_file_list
819tm_include_list
820tm_defines
821tm_p_file_list
822tm_p_include_list
823xm_file_list
824xm_include_list
825xm_defines
826c_target_objs
827cxx_target_objs
828target_cpu_default
829GMPLIBS
830GMPINC
831LIBOBJS
832LTLIBOBJS'
ba479fd2 833ac_subst_files='language_hooks'
a6ccdbab
EC
834 ac_precious_vars='build_alias
835host_alias
836target_alias
837CC
838CFLAGS
839LDFLAGS
840LIBS
841CPPFLAGS
842CPP
843GMPLIBS
844GMPINC'
845
861bb6c1
JL
846
847# Initialize some variables set by options.
ba479fd2
NN
848ac_init_help=
849ac_init_version=false
861bb6c1
JL
850# The variables have the same names as the options, with
851# dashes changed to underlines.
ba479fd2 852cache_file=/dev/null
861bb6c1 853exec_prefix=NONE
861bb6c1 854no_create=
861bb6c1
JL
855no_recursion=
856prefix=NONE
857program_prefix=NONE
858program_suffix=NONE
859program_transform_name=s,x,x,
860silent=
861site=
862srcdir=
861bb6c1
JL
863verbose=
864x_includes=NONE
865x_libraries=NONE
ba479fd2
NN
866
867# Installation directory options.
868# These are left unexpanded so users can "make install exec_prefix=/foo"
869# and all the variables that are supposed to be based on exec_prefix
870# by default will actually change.
871# Use braces instead of parens because sh, perl, etc. also accept them.
a6ccdbab 872# (The list follows the same order as the GNU Coding Standards.)
861bb6c1
JL
873bindir='${exec_prefix}/bin'
874sbindir='${exec_prefix}/sbin'
875libexecdir='${exec_prefix}/libexec'
a6ccdbab
EC
876datarootdir='${prefix}/share'
877datadir='${datarootdir}'
861bb6c1
JL
878sysconfdir='${prefix}/etc'
879sharedstatedir='${prefix}/com'
880localstatedir='${prefix}/var'
861bb6c1
JL
881includedir='${prefix}/include'
882oldincludedir='/usr/include'
a6ccdbab
EC
883docdir='${datarootdir}/doc/${PACKAGE}'
884infodir='${datarootdir}/info'
885htmldir='${docdir}'
886dvidir='${docdir}'
887pdfdir='${docdir}'
888psdir='${docdir}'
889libdir='${exec_prefix}/lib'
890localedir='${datarootdir}/locale'
891mandir='${datarootdir}/man'
861bb6c1 892
861bb6c1 893ac_prev=
a6ccdbab 894ac_dashdash=
861bb6c1
JL
895for ac_option
896do
861bb6c1
JL
897 # If the previous option needs an argument, assign it.
898 if test -n "$ac_prev"; then
a6ccdbab 899 eval $ac_prev=\$ac_option
861bb6c1
JL
900 ac_prev=
901 continue
902 fi
903
a6ccdbab
EC
904 case $ac_option in
905 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
906 *) ac_optarg=yes ;;
907 esac
861bb6c1
JL
908
909 # Accept the important Cygnus configure options, so we can diagnose typos.
910
a6ccdbab
EC
911 case $ac_dashdash$ac_option in
912 --)
913 ac_dashdash=yes ;;
861bb6c1
JL
914
915 -bindir | --bindir | --bindi | --bind | --bin | --bi)
916 ac_prev=bindir ;;
917 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
ba479fd2 918 bindir=$ac_optarg ;;
861bb6c1
JL
919
920 -build | --build | --buil | --bui | --bu)
ba479fd2 921 ac_prev=build_alias ;;
861bb6c1 922 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ba479fd2 923 build_alias=$ac_optarg ;;
861bb6c1
JL
924
925 -cache-file | --cache-file | --cache-fil | --cache-fi \
926 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
927 ac_prev=cache_file ;;
928 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
929 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
ba479fd2
NN
930 cache_file=$ac_optarg ;;
931
932 --config-cache | -C)
933 cache_file=config.cache ;;
861bb6c1 934
a6ccdbab 935 -datadir | --datadir | --datadi | --datad)
861bb6c1 936 ac_prev=datadir ;;
a6ccdbab 937 -datadir=* | --datadir=* | --datadi=* | --datad=*)
ba479fd2 938 datadir=$ac_optarg ;;
861bb6c1 939
a6ccdbab
EC
940 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
941 | --dataroo | --dataro | --datar)
942 ac_prev=datarootdir ;;
943 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
944 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
945 datarootdir=$ac_optarg ;;
946
861bb6c1 947 -disable-* | --disable-*)
ba479fd2 948 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
861bb6c1 949 # Reject names that are not valid shell variable names.
a6ccdbab 950 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
951 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
952 { (exit 1); exit 1; }; }
a6ccdbab
EC
953 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
954 eval enable_$ac_feature=no ;;
955
956 -docdir | --docdir | --docdi | --doc | --do)
957 ac_prev=docdir ;;
958 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
959 docdir=$ac_optarg ;;
960
961 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
962 ac_prev=dvidir ;;
963 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
964 dvidir=$ac_optarg ;;
861bb6c1
JL
965
966 -enable-* | --enable-*)
ba479fd2 967 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
861bb6c1 968 # Reject names that are not valid shell variable names.
a6ccdbab 969 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
970 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
971 { (exit 1); exit 1; }; }
a6ccdbab
EC
972 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
973 eval enable_$ac_feature=\$ac_optarg ;;
861bb6c1
JL
974
975 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
976 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
977 | --exec | --exe | --ex)
978 ac_prev=exec_prefix ;;
979 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
980 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
981 | --exec=* | --exe=* | --ex=*)
ba479fd2 982 exec_prefix=$ac_optarg ;;
861bb6c1
JL
983
984 -gas | --gas | --ga | --g)
985 # Obsolete; use --with-gas.
986 with_gas=yes ;;
987
ba479fd2
NN
988 -help | --help | --hel | --he | -h)
989 ac_init_help=long ;;
990 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
991 ac_init_help=recursive ;;
992 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
993 ac_init_help=short ;;
861bb6c1
JL
994
995 -host | --host | --hos | --ho)
ba479fd2 996 ac_prev=host_alias ;;
861bb6c1 997 -host=* | --host=* | --hos=* | --ho=*)
ba479fd2 998 host_alias=$ac_optarg ;;
861bb6c1 999
a6ccdbab
EC
1000 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1001 ac_prev=htmldir ;;
1002 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1003 | --ht=*)
1004 htmldir=$ac_optarg ;;
1005
861bb6c1
JL
1006 -includedir | --includedir | --includedi | --included | --include \
1007 | --includ | --inclu | --incl | --inc)
1008 ac_prev=includedir ;;
1009 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1010 | --includ=* | --inclu=* | --incl=* | --inc=*)
ba479fd2 1011 includedir=$ac_optarg ;;
861bb6c1
JL
1012
1013 -infodir | --infodir | --infodi | --infod | --info | --inf)
1014 ac_prev=infodir ;;
1015 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
ba479fd2 1016 infodir=$ac_optarg ;;
861bb6c1
JL
1017
1018 -libdir | --libdir | --libdi | --libd)
1019 ac_prev=libdir ;;
1020 -libdir=* | --libdir=* | --libdi=* | --libd=*)
ba479fd2 1021 libdir=$ac_optarg ;;
861bb6c1
JL
1022
1023 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1024 | --libexe | --libex | --libe)
1025 ac_prev=libexecdir ;;
1026 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1027 | --libexe=* | --libex=* | --libe=*)
ba479fd2 1028 libexecdir=$ac_optarg ;;
861bb6c1 1029
a6ccdbab
EC
1030 -localedir | --localedir | --localedi | --localed | --locale)
1031 ac_prev=localedir ;;
1032 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1033 localedir=$ac_optarg ;;
1034
861bb6c1 1035 -localstatedir | --localstatedir | --localstatedi | --localstated \
a6ccdbab 1036 | --localstate | --localstat | --localsta | --localst | --locals)
861bb6c1
JL
1037 ac_prev=localstatedir ;;
1038 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
a6ccdbab 1039 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
ba479fd2 1040 localstatedir=$ac_optarg ;;
861bb6c1
JL
1041
1042 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1043 ac_prev=mandir ;;
1044 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
ba479fd2 1045 mandir=$ac_optarg ;;
861bb6c1
JL
1046
1047 -nfp | --nfp | --nf)
1048 # Obsolete; use --without-fp.
1049 with_fp=no ;;
1050
1051 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
ba479fd2 1052 | --no-cr | --no-c | -n)
861bb6c1
JL
1053 no_create=yes ;;
1054
1055 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1056 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1057 no_recursion=yes ;;
1058
1059 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1060 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1061 | --oldin | --oldi | --old | --ol | --o)
1062 ac_prev=oldincludedir ;;
1063 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1064 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1065 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
ba479fd2 1066 oldincludedir=$ac_optarg ;;
861bb6c1
JL
1067
1068 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1069 ac_prev=prefix ;;
1070 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
ba479fd2 1071 prefix=$ac_optarg ;;
861bb6c1
JL
1072
1073 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1074 | --program-pre | --program-pr | --program-p)
1075 ac_prev=program_prefix ;;
1076 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1077 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
ba479fd2 1078 program_prefix=$ac_optarg ;;
861bb6c1
JL
1079
1080 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1081 | --program-suf | --program-su | --program-s)
1082 ac_prev=program_suffix ;;
1083 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1084 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
ba479fd2 1085 program_suffix=$ac_optarg ;;
861bb6c1
JL
1086
1087 -program-transform-name | --program-transform-name \
1088 | --program-transform-nam | --program-transform-na \
1089 | --program-transform-n | --program-transform- \
1090 | --program-transform | --program-transfor \
1091 | --program-transfo | --program-transf \
1092 | --program-trans | --program-tran \
1093 | --progr-tra | --program-tr | --program-t)
1094 ac_prev=program_transform_name ;;
1095 -program-transform-name=* | --program-transform-name=* \
1096 | --program-transform-nam=* | --program-transform-na=* \
1097 | --program-transform-n=* | --program-transform-=* \
1098 | --program-transform=* | --program-transfor=* \
1099 | --program-transfo=* | --program-transf=* \
1100 | --program-trans=* | --program-tran=* \
1101 | --progr-tra=* | --program-tr=* | --program-t=*)
ba479fd2 1102 program_transform_name=$ac_optarg ;;
861bb6c1 1103
a6ccdbab
EC
1104 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1105 ac_prev=pdfdir ;;
1106 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1107 pdfdir=$ac_optarg ;;
1108
1109 -psdir | --psdir | --psdi | --psd | --ps)
1110 ac_prev=psdir ;;
1111 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1112 psdir=$ac_optarg ;;
1113
861bb6c1
JL
1114 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1115 | -silent | --silent | --silen | --sile | --sil)
1116 silent=yes ;;
1117
1118 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1119 ac_prev=sbindir ;;
1120 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1121 | --sbi=* | --sb=*)
ba479fd2 1122 sbindir=$ac_optarg ;;
861bb6c1
JL
1123
1124 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1125 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1126 | --sharedst | --shareds | --shared | --share | --shar \
1127 | --sha | --sh)
1128 ac_prev=sharedstatedir ;;
1129 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1130 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1131 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1132 | --sha=* | --sh=*)
ba479fd2 1133 sharedstatedir=$ac_optarg ;;
861bb6c1
JL
1134
1135 -site | --site | --sit)
1136 ac_prev=site ;;
1137 -site=* | --site=* | --sit=*)
ba479fd2 1138 site=$ac_optarg ;;
861bb6c1
JL
1139
1140 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1141 ac_prev=srcdir ;;
1142 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
ba479fd2 1143 srcdir=$ac_optarg ;;
861bb6c1
JL
1144
1145 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1146 | --syscon | --sysco | --sysc | --sys | --sy)
1147 ac_prev=sysconfdir ;;
1148 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1149 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
ba479fd2 1150 sysconfdir=$ac_optarg ;;
861bb6c1
JL
1151
1152 -target | --target | --targe | --targ | --tar | --ta | --t)
ba479fd2 1153 ac_prev=target_alias ;;
861bb6c1 1154 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
ba479fd2 1155 target_alias=$ac_optarg ;;
861bb6c1
JL
1156
1157 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1158 verbose=yes ;;
1159
ba479fd2
NN
1160 -version | --version | --versio | --versi | --vers | -V)
1161 ac_init_version=: ;;
861bb6c1
JL
1162
1163 -with-* | --with-*)
ba479fd2 1164 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
861bb6c1 1165 # Reject names that are not valid shell variable names.
a6ccdbab 1166 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
1167 { echo "$as_me: error: invalid package name: $ac_package" >&2
1168 { (exit 1); exit 1; }; }
a6ccdbab
EC
1169 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1170 eval with_$ac_package=\$ac_optarg ;;
861bb6c1
JL
1171
1172 -without-* | --without-*)
ba479fd2 1173 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
861bb6c1 1174 # Reject names that are not valid shell variable names.
a6ccdbab 1175 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
1176 { echo "$as_me: error: invalid package name: $ac_package" >&2
1177 { (exit 1); exit 1; }; }
a6ccdbab
EC
1178 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1179 eval with_$ac_package=no ;;
861bb6c1
JL
1180
1181 --x)
1182 # Obsolete; use --with-x.
1183 with_x=yes ;;
1184
1185 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1186 | --x-incl | --x-inc | --x-in | --x-i)
1187 ac_prev=x_includes ;;
1188 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1189 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
ba479fd2 1190 x_includes=$ac_optarg ;;
861bb6c1
JL
1191
1192 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1193 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1194 ac_prev=x_libraries ;;
1195 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1196 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
ba479fd2 1197 x_libraries=$ac_optarg ;;
861bb6c1 1198
ba479fd2
NN
1199 -*) { echo "$as_me: error: unrecognized option: $ac_option
1200Try \`$0 --help' for more information." >&2
1201 { (exit 1); exit 1; }; }
861bb6c1
JL
1202 ;;
1203
ba479fd2
NN
1204 *=*)
1205 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1206 # Reject names that are not valid shell variable names.
1207 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1208 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1209 { (exit 1); exit 1; }; }
a6ccdbab 1210 eval $ac_envvar=\$ac_optarg
ba479fd2
NN
1211 export $ac_envvar ;;
1212
861bb6c1 1213 *)
ba479fd2
NN
1214 # FIXME: should be removed in autoconf 3.0.
1215 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1216 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1217 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1218 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
861bb6c1
JL
1219 ;;
1220
1221 esac
1222done
1223
1224if test -n "$ac_prev"; then
ba479fd2
NN
1225 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1226 { echo "$as_me: error: missing argument to $ac_option" >&2
1227 { (exit 1); exit 1; }; }
63cf211a 1228fi
63cf211a 1229
a6ccdbab
EC
1230# Be sure to have absolute directory names.
1231for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1232 datadir sysconfdir sharedstatedir localstatedir includedir \
1233 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1234 libdir localedir mandir
861bb6c1 1235do
a6ccdbab 1236 eval ac_val=\$$ac_var
ba479fd2 1237 case $ac_val in
a6ccdbab
EC
1238 [\\/$]* | ?:[\\/]* ) continue;;
1239 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
861bb6c1 1240 esac
a6ccdbab
EC
1241 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1242 { (exit 1); exit 1; }; }
861bb6c1
JL
1243done
1244
ba479fd2
NN
1245# There might be people who depend on the old broken behavior: `$host'
1246# used to hold the argument of --host etc.
1247# FIXME: To remove some day.
1248build=$build_alias
1249host=$host_alias
1250target=$target_alias
1251
1252# FIXME: To remove some day.
1253if test "x$host_alias" != x; then
1254 if test "x$build_alias" = x; then
1255 cross_compiling=maybe
1256 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1257 If a cross compiler is detected then cross compile mode will be used." >&2
1258 elif test "x$build_alias" != "x$host_alias"; then
1259 cross_compiling=yes
1260 fi
1261fi
6e3f3080 1262
ba479fd2
NN
1263ac_tool_prefix=
1264test -n "$host_alias" && ac_tool_prefix=$host_alias-
1265
1266test "$silent" = yes && exec 6>/dev/null
861bb6c1 1267
861bb6c1 1268
a6ccdbab
EC
1269ac_pwd=`pwd` && test -n "$ac_pwd" &&
1270ac_ls_di=`ls -di .` &&
1271ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1272 { echo "$as_me: error: Working directory cannot be determined" >&2
1273 { (exit 1); exit 1; }; }
1274test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1275 { echo "$as_me: error: pwd does not report name of working directory" >&2
1276 { (exit 1); exit 1; }; }
1277
1278
861bb6c1
JL
1279# Find the source files, if location was not specified.
1280if test -z "$srcdir"; then
1281 ac_srcdir_defaulted=yes
a6ccdbab
EC
1282 # Try the directory containing this script, then the parent directory.
1283 ac_confdir=`$as_dirname -- "$0" ||
ba479fd2 1284$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
1285 X"$0" : 'X\(//\)[^/]' \| \
1286 X"$0" : 'X\(//\)$' \| \
a6ccdbab 1287 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
ba479fd2 1288echo X"$0" |
a6ccdbab
EC
1289 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1290 s//\1/
1291 q
1292 }
1293 /^X\(\/\/\)[^/].*/{
1294 s//\1/
1295 q
1296 }
1297 /^X\(\/\/\)$/{
1298 s//\1/
1299 q
1300 }
1301 /^X\(\/\).*/{
1302 s//\1/
1303 q
1304 }
1305 s/.*/./; q'`
861bb6c1 1306 srcdir=$ac_confdir
a6ccdbab 1307 if test ! -r "$srcdir/$ac_unique_file"; then
861bb6c1
JL
1308 srcdir=..
1309 fi
1310else
1311 ac_srcdir_defaulted=no
1312fi
a6ccdbab
EC
1313if test ! -r "$srcdir/$ac_unique_file"; then
1314 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1315 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
ba479fd2 1316 { (exit 1); exit 1; }; }
dd7f7a6e 1317fi
a6ccdbab
EC
1318ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1319ac_abs_confdir=`(
1320 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
dd7f7a6e 1321 { (exit 1); exit 1; }; }
a6ccdbab
EC
1322 pwd)`
1323# When building in place, set srcdir=.
1324if test "$ac_abs_confdir" = "$ac_pwd"; then
1325 srcdir=.
1326fi
1327# Remove unnecessary trailing slashes from srcdir.
1328# Double slashes in file names in object file debugging info
1329# mess up M-x gdb in Emacs.
1330case $srcdir in
1331*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1332esac
1333for ac_var in $ac_precious_vars; do
1334 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1335 eval ac_env_${ac_var}_value=\$${ac_var}
1336 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1337 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1338done
63cf211a 1339
ba479fd2
NN
1340#
1341# Report the --help message.
1342#
1343if test "$ac_init_help" = "long"; then
1344 # Omit some internal or obsolete options to make the list less imposing.
1345 # This message is too long to be a string in the A/UX 3.1 sh.
1346 cat <<_ACEOF
1347\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 1348
ba479fd2 1349Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 1350
ba479fd2
NN
1351To assign environment variables (e.g., CC, CFLAGS...), specify them as
1352VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 1353
ba479fd2 1354Defaults for the options are specified in brackets.
861bb6c1 1355
ba479fd2
NN
1356Configuration:
1357 -h, --help display this help and exit
1358 --help=short display options specific to this package
1359 --help=recursive display the short help of all the included packages
1360 -V, --version display version information and exit
1361 -q, --quiet, --silent do not print \`checking...' messages
1362 --cache-file=FILE cache test results in FILE [disabled]
1363 -C, --config-cache alias for \`--cache-file=config.cache'
1364 -n, --no-create do not create output files
1365 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1366
ba479fd2
NN
1367Installation directories:
1368 --prefix=PREFIX install architecture-independent files in PREFIX
86da66b5 1369 [$ac_default_prefix]
ba479fd2 1370 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
86da66b5 1371 [PREFIX]
861bb6c1 1372
ba479fd2
NN
1373By default, \`make install' will install all the files in
1374\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1375an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1376for instance \`--prefix=\$HOME'.
13c22933 1377
ba479fd2 1378For better control, use the options below.
13c22933 1379
ba479fd2
NN
1380Fine tuning of the installation directories:
1381 --bindir=DIR user executables [EPREFIX/bin]
1382 --sbindir=DIR system admin executables [EPREFIX/sbin]
1383 --libexecdir=DIR program executables [EPREFIX/libexec]
ba479fd2
NN
1384 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1385 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1386 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1387 --libdir=DIR object code libraries [EPREFIX/lib]
1388 --includedir=DIR C header files [PREFIX/include]
1389 --oldincludedir=DIR C header files for non-gcc [/usr/include]
a6ccdbab
EC
1390 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1391 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1392 --infodir=DIR info documentation [DATAROOTDIR/info]
1393 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1394 --mandir=DIR man documentation [DATAROOTDIR/man]
1395 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1396 --htmldir=DIR html documentation [DOCDIR]
1397 --dvidir=DIR dvi documentation [DOCDIR]
1398 --pdfdir=DIR pdf documentation [DOCDIR]
1399 --psdir=DIR ps documentation [DOCDIR]
ba479fd2 1400_ACEOF
13c22933 1401
ba479fd2 1402 cat <<\_ACEOF
13c22933 1403
ba479fd2
NN
1404Program names:
1405 --program-prefix=PREFIX prepend PREFIX to installed program names
1406 --program-suffix=SUFFIX append SUFFIX to installed program names
1407 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 1408
ba479fd2
NN
1409System types:
1410 --build=BUILD configure for building on BUILD [guessed]
1411 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1412 --target=TARGET configure for building compilers for TARGET [HOST]
1413_ACEOF
13c22933
JJ
1414fi
1415
ba479fd2 1416if test -n "$ac_init_help"; then
13c22933 1417
ba479fd2 1418 cat <<\_ACEOF
13c22933 1419
ba479fd2
NN
1420Optional Features:
1421 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1422 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
1423 --enable-generated-files-in-srcdir
1424 put copies of generated files in source dir
1425 intended for creating source tarballs for users
1426 without texinfo bison or flex.
09a9c095 1427 --enable-werror-always enable -Werror always
ba479fd2
NN
1428 --enable-werror enable -Werror in bootstrap stage2 and later
1429 --enable-checking=LIST
1430 enable expensive run-time checks. With LIST,
1431 enable only specific categories of checks.
cdce5c16
NS
1432 Categories are: yes,no,all,none,release.
1433 Flags are: assert,fold,gc,gcac,misc,
1434 rtlflag,rtl,runtime,tree,valgrind.
74ee1642 1435 --enable-mapped-location location_t is fileline integer cookie
ba479fd2 1436 --enable-coverage=LEVEL
fb38008e 1437 enable compiler's code coverage collection.
ba479fd2
NN
1438 Use to measure compiler performance and locate
1439 unused parts of the compiler. With LEVEL, specify
1440 optimization. Values are opt, noopt,
1441 default is noopt
1442 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
1443 --enable-multilib enable library support for multiple ABIs
1444 --enable-__cxa_atexit enable __cxa_atexit for C++
486aa804 1445 --enable-decimal-float enable decimal float extension to C
ba479fd2
NN
1446 --enable-threads enable thread usage for target GCC
1447 --enable-threads=LIB use LIB thread package for target GCC
8dea1cca
DD
1448 --enable-tls enable or disable generation of tls code
1449 overriding the assembler check for tls support
ba479fd2
NN
1450 --enable-objc-gc enable the use of Boehm's garbage collector with
1451 the GNU Objective-C runtime
1452 --disable-shared don't provide a shared libgcc
1453 --enable-intermodule build the compiler in one step
f3c9f174 1454 --enable-languages=LIST specify which front-ends to build
dfb77e37 1455 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
1456 --enable-initfini-array use .init_array/.fini_array sections
1457 --enable-sjlj-exceptions
1458 arrange to use setjmp/longjmp exception handling
7f970b70 1459 --enable-secureplt enable -msecure-plt by default for PowerPC
ba479fd2
NN
1460 --disable-win32-registry
1461 disable lookup of installation paths in the
1462 Registry on Windows hosts
1463 --enable-win32-registry enable registry lookup (default)
1464 --enable-win32-registry=KEY
1465 use KEY instead of GCC version as the last portion
1466 of the registry key
1467 --enable-maintainer-mode
1468 enable make rules and dependencies not useful
1469 (and sometimes confusing) to the casual installer
1470 --enable-version-specific-runtime-libs
1471 specify that runtime libraries should be
1472 installed in a compiler-specific directory
093e61a6 1473
ba479fd2
NN
1474Optional Packages:
1475 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1476 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1546bb64 1477 --with-build-libsubdir=DIR Directory where to find libraries for build system
ba479fd2
NN
1478 --with-local-prefix=DIR specifies directory to put local include
1479 --with-gxx-include-dir=DIR
1480 specifies directory to put g++ header files
1481 --with-cpp-install-dir=DIR
1482 install the user visible C preprocessor in DIR
1483 (relative to PREFIX) as well as PREFIX/bin
1484 --with-gnu-ld arrange to work with GNU ld.
1485 --with-ld arrange to use the specified ld (full pathname)
d594623a 1486 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
1487 --with-gnu-as arrange to work with GNU as
1488 --with-as arrange to use the specified as (full pathname)
1489 --with-stabs arrange to use stabs instead of host debug format
1490 --with-dwarf2 force the default debug format to be DWARF 2
160633c6
MM
1491 --with-build-sysroot=sysroot
1492 use sysroot as the system root during the build
ba479fd2 1493 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
dfb77e37
KC
1494 --with-gnu-ld assume the C compiler uses GNU ld default=no
1495 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1496 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 1497 --with-system-libunwind use installed libunwind
ed965309 1498 --with-long-double-128 Use 128-bit long double by default.
59415997 1499 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
1500 with the compiler
1501 --with-system-zlib use installed libz
22482f74
MS
1502 --with-slibdir=DIR shared libraries in DIR [LIBDIR]
1503 --with-datarootdir=DIR Use DIR as the data root [PREFIX/share]
1504 --with-docdir=DIR Install documentation in DIR [DATAROOTDIR]
1505 --with-htmldir=DIR html documentation in in DIR [DOCDIR]
13c22933 1506
ba479fd2
NN
1507Some influential environment variables:
1508 CC C compiler command
1509 CFLAGS C compiler flags
1510 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1511 nonstandard directory <lib dir>
a6ccdbab
EC
1512 LIBS libraries to pass to the linker, e.g. -l<library>
1513 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1514 you have headers in a nonstandard directory <include dir>
ba479fd2 1515 CPP C preprocessor
6de9cd9a
DN
1516 GMPLIBS How to link GMP
1517 GMPINC How to find GMP include files
13c22933 1518
ba479fd2
NN
1519Use these variables to override the choices made by `configure' or to help
1520it to find libraries and programs with nonstandard names/locations.
73458fb7 1521
ba479fd2 1522_ACEOF
a6ccdbab 1523ac_status=$?
ba479fd2 1524fi
6e3f3080 1525
ba479fd2
NN
1526if test "$ac_init_help" = "recursive"; then
1527 # If there are subdirs, report their specific --help.
ba479fd2 1528 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
a6ccdbab 1529 test -d "$ac_dir" || continue
ba479fd2
NN
1530 ac_builddir=.
1531
a6ccdbab
EC
1532case "$ac_dir" in
1533.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1534*)
ba479fd2 1535 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
a6ccdbab
EC
1536 # A ".." for each directory in $ac_dir_suffix.
1537 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1538 case $ac_top_builddir_sub in
1539 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1540 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1541 esac ;;
1542esac
1543ac_abs_top_builddir=$ac_pwd
1544ac_abs_builddir=$ac_pwd$ac_dir_suffix
1545# for backward compatibility:
1546ac_top_builddir=$ac_top_build_prefix
ba479fd2
NN
1547
1548case $srcdir in
a6ccdbab 1549 .) # We are building in place.
ba479fd2 1550 ac_srcdir=.
a6ccdbab
EC
1551 ac_top_srcdir=$ac_top_builddir_sub
1552 ac_abs_top_srcdir=$ac_pwd ;;
1553 [\\/]* | ?:[\\/]* ) # Absolute name.
ba479fd2 1554 ac_srcdir=$srcdir$ac_dir_suffix;
a6ccdbab
EC
1555 ac_top_srcdir=$srcdir
1556 ac_abs_top_srcdir=$srcdir ;;
1557 *) # Relative name.
1558 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1559 ac_top_srcdir=$ac_top_build_prefix$srcdir
1560 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
86da66b5 1561esac
a6ccdbab
EC
1562ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1563
1564 cd "$ac_dir" || { ac_status=$?; continue; }
1565 # Check for guested configure.
1566 if test -f "$ac_srcdir/configure.gnu"; then
1567 echo &&
1568 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1569 elif test -f "$ac_srcdir/configure"; then
1570 echo &&
1571 $SHELL "$ac_srcdir/configure" --help=recursive
ba479fd2
NN
1572 else
1573 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
a6ccdbab
EC
1574 fi || ac_status=$?
1575 cd "$ac_pwd" || { ac_status=$?; break; }
ba479fd2
NN
1576 done
1577fi
1578
a6ccdbab 1579test -n "$ac_init_help" && exit $ac_status
ba479fd2
NN
1580if $ac_init_version; then
1581 cat <<\_ACEOF
a6ccdbab
EC
1582configure
1583generated by GNU Autoconf 2.61
ba479fd2 1584
a6ccdbab
EC
1585Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
15862002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
ba479fd2
NN
1587This configure script is free software; the Free Software Foundation
1588gives unlimited permission to copy, distribute and modify it.
1589_ACEOF
a6ccdbab 1590 exit
ba479fd2 1591fi
a6ccdbab 1592cat >config.log <<_ACEOF
ba479fd2
NN
1593This file contains any messages produced by compilers while
1594running configure, to aid debugging if configure makes a mistake.
1595
1596It was created by $as_me, which was
a6ccdbab 1597generated by GNU Autoconf 2.61. Invocation command line was
ba479fd2
NN
1598
1599 $ $0 $@
1600
1601_ACEOF
a6ccdbab 1602exec 5>>config.log
ba479fd2
NN
1603{
1604cat <<_ASUNAME
1605## --------- ##
1606## Platform. ##
1607## --------- ##
1608
1609hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1610uname -m = `(uname -m) 2>/dev/null || echo unknown`
1611uname -r = `(uname -r) 2>/dev/null || echo unknown`
1612uname -s = `(uname -s) 2>/dev/null || echo unknown`
1613uname -v = `(uname -v) 2>/dev/null || echo unknown`
1614
1615/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1616/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1617
1618/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1619/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1620/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
a6ccdbab 1621/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
ba479fd2
NN
1622/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1623/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1624/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1625
1626_ASUNAME
1627
1628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1629for as_dir in $PATH
1630do
1631 IFS=$as_save_IFS
1632 test -z "$as_dir" && as_dir=.
1633 echo "PATH: $as_dir"
1634done
a6ccdbab 1635IFS=$as_save_IFS
ba479fd2
NN
1636
1637} >&5
1638
1639cat >&5 <<_ACEOF
1640
1641
1642## ----------- ##
1643## Core tests. ##
1644## ----------- ##
1645
1646_ACEOF
1647
1648
1649# Keep a trace of the command line.
1650# Strip out --no-create and --no-recursion so they do not pile up.
1651# Strip out --silent because we don't want to record it for future runs.
1652# Also quote any args containing shell meta-characters.
1653# Make two passes to allow for proper duplicate-argument suppression.
1654ac_configure_args=
1655ac_configure_args0=
1656ac_configure_args1=
ba479fd2
NN
1657ac_must_keep_next=false
1658for ac_pass in 1 2
1659do
1660 for ac_arg
1661 do
1662 case $ac_arg in
1663 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1664 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1665 | -silent | --silent | --silen | --sile | --sil)
1666 continue ;;
a6ccdbab 1667 *\'*)
ba479fd2
NN
1668 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1669 esac
1670 case $ac_pass in
1671 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1672 2)
1673 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1674 if test $ac_must_keep_next = true; then
86da66b5 1675 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1676 else
86da66b5
HPN
1677 case $ac_arg in
1678 *=* | --config-cache | -C | -disable-* | --disable-* \
1679 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1680 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1681 | -with-* | --with-* | -without-* | --without-* | --x)
1682 case "$ac_configure_args0 " in
1683 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1684 esac
1685 ;;
1686 -* ) ac_must_keep_next=true ;;
1687 esac
ba479fd2 1688 fi
a6ccdbab 1689 ac_configure_args="$ac_configure_args '$ac_arg'"
ba479fd2
NN
1690 ;;
1691 esac
1692 done
1693done
1694$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1695$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1696
1697# When interrupted or exit'd, cleanup temporary files, and complete
1698# config.log. We remove comments because anyway the quotes in there
1699# would cause problems or look ugly.
a6ccdbab
EC
1700# WARNING: Use '\'' to represent an apostrophe within the trap.
1701# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
ba479fd2
NN
1702trap 'exit_status=$?
1703 # Save into config.log some information that might help in debugging.
1704 {
1705 echo
1706
1707 cat <<\_ASBOX
1708## ---------------- ##
1709## Cache variables. ##
1710## ---------------- ##
1711_ASBOX
1712 echo
1713 # The following way of writing the cache mishandles newlines in values,
a6ccdbab
EC
1714(
1715 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1716 eval ac_val=\$$ac_var
1717 case $ac_val in #(
1718 *${as_nl}*)
1719 case $ac_var in #(
1720 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1721echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1722 esac
1723 case $ac_var in #(
1724 _ | IFS | as_nl) ;; #(
1725 *) $as_unset $ac_var ;;
1726 esac ;;
1727 esac
1728 done
ba479fd2 1729 (set) 2>&1 |
a6ccdbab
EC
1730 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1731 *${as_nl}ac_space=\ *)
ba479fd2 1732 sed -n \
a6ccdbab
EC
1733 "s/'\''/'\''\\\\'\'''\''/g;
1734 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1735 ;; #(
ba479fd2 1736 *)
a6ccdbab 1737 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
ba479fd2 1738 ;;
a6ccdbab
EC
1739 esac |
1740 sort
1741)
ba479fd2
NN
1742 echo
1743
1744 cat <<\_ASBOX
1745## ----------------- ##
1746## Output variables. ##
1747## ----------------- ##
1748_ASBOX
1749 echo
1750 for ac_var in $ac_subst_vars
1751 do
a6ccdbab
EC
1752 eval ac_val=\$$ac_var
1753 case $ac_val in
1754 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1755 esac
1756 echo "$ac_var='\''$ac_val'\''"
ba479fd2
NN
1757 done | sort
1758 echo
1759
1760 if test -n "$ac_subst_files"; then
1761 cat <<\_ASBOX
a6ccdbab
EC
1762## ------------------- ##
1763## File substitutions. ##
1764## ------------------- ##
ba479fd2
NN
1765_ASBOX
1766 echo
1767 for ac_var in $ac_subst_files
1768 do
a6ccdbab
EC
1769 eval ac_val=\$$ac_var
1770 case $ac_val in
1771 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1772 esac
1773 echo "$ac_var='\''$ac_val'\''"
ba479fd2
NN
1774 done | sort
1775 echo
1776 fi
1777
1778 if test -s confdefs.h; then
1779 cat <<\_ASBOX
1780## ----------- ##
1781## confdefs.h. ##
1782## ----------- ##
1783_ASBOX
1784 echo
a6ccdbab 1785 cat confdefs.h
ba479fd2
NN
1786 echo
1787 fi
1788 test "$ac_signal" != 0 &&
1789 echo "$as_me: caught signal $ac_signal"
1790 echo "$as_me: exit $exit_status"
1791 } >&5
a6ccdbab
EC
1792 rm -f core *.core core.conftest.* &&
1793 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
ba479fd2 1794 exit $exit_status
a6ccdbab 1795' 0
ba479fd2
NN
1796for ac_signal in 1 2 13 15; do
1797 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1798done
1799ac_signal=0
1800
1801# confdefs.h avoids OS command line length limits that DEFS can exceed.
a6ccdbab 1802rm -f -r conftest* confdefs.h
ba479fd2
NN
1803
1804# Predefined preprocessor variables.
1805
1806cat >>confdefs.h <<_ACEOF
1807#define PACKAGE_NAME "$PACKAGE_NAME"
1808_ACEOF
1809
1810
1811cat >>confdefs.h <<_ACEOF
1812#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1813_ACEOF
1814
1815
1816cat >>confdefs.h <<_ACEOF
1817#define PACKAGE_VERSION "$PACKAGE_VERSION"
1818_ACEOF
1819
1820
1821cat >>confdefs.h <<_ACEOF
1822#define PACKAGE_STRING "$PACKAGE_STRING"
1823_ACEOF
1824
1825
1826cat >>confdefs.h <<_ACEOF
1827#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1828_ACEOF
1829
1830
1831# Let the site file select an alternate cache file if it wants to.
1832# Prefer explicitly selected file to automatically selected ones.
a6ccdbab
EC
1833if test -n "$CONFIG_SITE"; then
1834 set x "$CONFIG_SITE"
1835elif test "x$prefix" != xNONE; then
1836 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1837else
1838 set x "$ac_default_prefix/share/config.site" \
1839 "$ac_default_prefix/etc/config.site"
ba479fd2 1840fi
a6ccdbab
EC
1841shift
1842for ac_site_file
1843do
ba479fd2
NN
1844 if test -r "$ac_site_file"; then
1845 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1846echo "$as_me: loading site script $ac_site_file" >&6;}
1847 sed 's/^/| /' "$ac_site_file" >&5
1848 . "$ac_site_file"
1849 fi
1850done
1851
1852if test -r "$cache_file"; then
1853 # Some versions of bash will fail to source /dev/null (special
1854 # files actually), so we avoid doing that.
1855 if test -f "$cache_file"; then
1856 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1857echo "$as_me: loading cache $cache_file" >&6;}
1858 case $cache_file in
a6ccdbab
EC
1859 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1860 *) . "./$cache_file";;
ba479fd2
NN
1861 esac
1862 fi
1863else
1864 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1865echo "$as_me: creating cache $cache_file" >&6;}
1866 >$cache_file
1867fi
1868
1869# Check that the precious variables saved in the cache have kept the same
1870# value.
1871ac_cache_corrupted=false
a6ccdbab 1872for ac_var in $ac_precious_vars; do
ba479fd2
NN
1873 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1874 eval ac_new_set=\$ac_env_${ac_var}_set
a6ccdbab
EC
1875 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1876 eval ac_new_val=\$ac_env_${ac_var}_value
ba479fd2
NN
1877 case $ac_old_set,$ac_new_set in
1878 set,)
1879 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1880echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1881 ac_cache_corrupted=: ;;
1882 ,set)
1883 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1884echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1885 ac_cache_corrupted=: ;;
1886 ,);;
1887 *)
1888 if test "x$ac_old_val" != "x$ac_new_val"; then
86da66b5 1889 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1890echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
86da66b5 1891 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
ba479fd2 1892echo "$as_me: former value: $ac_old_val" >&2;}
86da66b5 1893 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
ba479fd2 1894echo "$as_me: current value: $ac_new_val" >&2;}
86da66b5 1895 ac_cache_corrupted=:
ba479fd2
NN
1896 fi;;
1897 esac
1898 # Pass precious variables to config.status.
1899 if test "$ac_new_set" = set; then
1900 case $ac_new_val in
a6ccdbab 1901 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
ba479fd2
NN
1902 *) ac_arg=$ac_var=$ac_new_val ;;
1903 esac
1904 case " $ac_configure_args " in
1905 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1906 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1907 esac
1908 fi
1909done
1910if $ac_cache_corrupted; then
1911 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1912echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1913 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1914echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1915 { (exit 1); exit 1; }; }
1916fi
1917
ba479fd2
NN
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
a6ccdbab
EC
1934ac_ext=c
1935ac_cpp='$CPP $CPPFLAGS'
1936ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1937ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1938ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba479fd2
NN
1939
1940
914c5af7 1941
a6ccdbab 1942ac_config_headers="$ac_config_headers auto-host.h:config.in"
ba479fd2
NN
1943
1944
9f18db39
PB
1945gcc_version=`cat $srcdir/BASE-VER`
1946
ba479fd2
NN
1947# Determine the host, build, and target systems
1948ac_aux_dir=
a6ccdbab
EC
1949for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
1950 if test -f "$ac_dir/install-sh"; then
ba479fd2
NN
1951 ac_aux_dir=$ac_dir
1952 ac_install_sh="$ac_aux_dir/install-sh -c"
1953 break
a6ccdbab 1954 elif test -f "$ac_dir/install.sh"; then
ba479fd2
NN
1955 ac_aux_dir=$ac_dir
1956 ac_install_sh="$ac_aux_dir/install.sh -c"
1957 break
a6ccdbab 1958 elif test -f "$ac_dir/shtool"; then
ba479fd2
NN
1959 ac_aux_dir=$ac_dir
1960 ac_install_sh="$ac_aux_dir/shtool install -c"
1961 break
1962 fi
1963done
1964if test -z "$ac_aux_dir"; then
a6ccdbab
EC
1965 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
1966echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
ba479fd2
NN
1967 { (exit 1); exit 1; }; }
1968fi
a6ccdbab
EC
1969
1970# These three variables are undocumented and unsupported,
1971# and are intended to be withdrawn in a future Autoconf release.
1972# They can cause serious problems if a builder's source tree is in a directory
1973# whose full name contains unusual characters.
1974ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
1975ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
1976ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
1977
ba479fd2
NN
1978
1979# Make sure we can run config.sub.
a6ccdbab
EC
1980$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
1981 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
1982echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
ba479fd2
NN
1983 { (exit 1); exit 1; }; }
1984
a6ccdbab
EC
1985{ echo "$as_me:$LINENO: checking build system type" >&5
1986echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
ba479fd2
NN
1987if test "${ac_cv_build+set}" = set; then
1988 echo $ECHO_N "(cached) $ECHO_C" >&6
1989else
a6ccdbab
EC
1990 ac_build_alias=$build_alias
1991test "x$ac_build_alias" = x &&
1992 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
1993test "x$ac_build_alias" = x &&
ba479fd2
NN
1994 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1995echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1996 { (exit 1); exit 1; }; }
a6ccdbab
EC
1997ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
1998 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
1999echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
ba479fd2
NN
2000 { (exit 1); exit 1; }; }
2001
2002fi
a6ccdbab
EC
2003{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2004echo "${ECHO_T}$ac_cv_build" >&6; }
2005case $ac_cv_build in
2006*-*-*) ;;
2007*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2008echo "$as_me: error: invalid value of canonical build" >&2;}
2009 { (exit 1); exit 1; }; };;
2010esac
ba479fd2 2011build=$ac_cv_build
a6ccdbab
EC
2012ac_save_IFS=$IFS; IFS='-'
2013set x $ac_cv_build
2014shift
2015build_cpu=$1
2016build_vendor=$2
2017shift; shift
2018# Remember, the first character of IFS is used to create $*,
2019# except with old shells:
2020build_os=$*
2021IFS=$ac_save_IFS
2022case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2023
2024
2025{ echo "$as_me:$LINENO: checking host system type" >&5
2026echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
ba479fd2
NN
2027if test "${ac_cv_host+set}" = set; then
2028 echo $ECHO_N "(cached) $ECHO_C" >&6
2029else
a6ccdbab
EC
2030 if test "x$host_alias" = x; then
2031 ac_cv_host=$ac_cv_build
2032else
2033 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2034 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2035echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
ba479fd2 2036 { (exit 1); exit 1; }; }
a6ccdbab 2037fi
ba479fd2
NN
2038
2039fi
a6ccdbab
EC
2040{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2041echo "${ECHO_T}$ac_cv_host" >&6; }
2042case $ac_cv_host in
2043*-*-*) ;;
2044*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2045echo "$as_me: error: invalid value of canonical host" >&2;}
2046 { (exit 1); exit 1; }; };;
2047esac
ba479fd2 2048host=$ac_cv_host
a6ccdbab
EC
2049ac_save_IFS=$IFS; IFS='-'
2050set x $ac_cv_host
2051shift
2052host_cpu=$1
2053host_vendor=$2
2054shift; shift
2055# Remember, the first character of IFS is used to create $*,
2056# except with old shells:
2057host_os=$*
2058IFS=$ac_save_IFS
2059case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2060
2061
2062{ echo "$as_me:$LINENO: checking target system type" >&5
2063echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
ba479fd2
NN
2064if test "${ac_cv_target+set}" = set; then
2065 echo $ECHO_N "(cached) $ECHO_C" >&6
2066else
a6ccdbab
EC
2067 if test "x$target_alias" = x; then
2068 ac_cv_target=$ac_cv_host
2069else
2070 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2071 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
2072echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
ba479fd2 2073 { (exit 1); exit 1; }; }
a6ccdbab 2074fi
ba479fd2
NN
2075
2076fi
a6ccdbab
EC
2077{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
2078echo "${ECHO_T}$ac_cv_target" >&6; }
2079case $ac_cv_target in
2080*-*-*) ;;
2081*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
2082echo "$as_me: error: invalid value of canonical target" >&2;}
2083 { (exit 1); exit 1; }; };;
2084esac
ba479fd2 2085target=$ac_cv_target
a6ccdbab
EC
2086ac_save_IFS=$IFS; IFS='-'
2087set x $ac_cv_target
2088shift
2089target_cpu=$1
2090target_vendor=$2
2091shift; shift
2092# Remember, the first character of IFS is used to create $*,
2093# except with old shells:
2094target_os=$*
2095IFS=$ac_save_IFS
2096case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
ba479fd2
NN
2097
2098
2099# The aliases save the names the user supplied, while $host etc.
2100# will get canonicalized.
2101test -n "$target_alias" &&
2102 test "$program_prefix$program_suffix$program_transform_name" = \
2103 NONENONEs,x,x, &&
2104 program_prefix=${target_alias}-
2105
2106# Determine the noncanonical target name, for directory use.
18fc9bd4
RG
2107 case ${build_alias} in
2108 "") build_noncanonical=${build} ;;
2109 *) build_noncanonical=${build_alias} ;;
2110esac
2111
2112 case ${host_alias} in
2113 "") host_noncanonical=${build_noncanonical} ;;
2114 *) host_noncanonical=${host_alias} ;;
2115esac
2116
2117 case ${target_alias} in
2118 "") target_noncanonical=${host_noncanonical} ;;
2119 *) target_noncanonical=${target_alias} ;;
2120esac
2121
2122
2123
8f1529e6
L
2124
2125# Determine the target- and build-specific subdirectories
57255173
PB
2126
2127# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
2128# have matching libraries, they should use host libraries: Makefile.tpl
2129# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
2130# However, they still use the build modules, because the corresponding
2131# host modules (e.g. bison) are only built for the host when bootstrap
2132# finishes. So:
2133# - build_subdir is where we find build modules, and never changes.
2134# - build_libsubdir is where we find build libraries, and can be overridden.
2135
2136# Prefix 'build-' so this never conflicts with target_subdir.
18fc9bd4 2137build_subdir="build-${build_noncanonical}"
1546bb64 2138
a6ccdbab 2139# Check whether --with-build-libsubdir was given.
1546bb64 2140if test "${with_build_libsubdir+set}" = set; then
a6ccdbab 2141 withval=$with_build_libsubdir; build_libsubdir="$withval"
1546bb64
PB
2142else
2143 build_libsubdir="$build_subdir"
a6ccdbab
EC
2144fi
2145
18fc9bd4
RG
2146# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
2147if ( test $srcdir = . && test -d gcc ) \
2148 || test -d $srcdir/../host-${host_noncanonical}; then
2149 host_subdir="host-${host_noncanonical}"
2150else
2151 host_subdir=.
2152fi
2153# No prefix.
2154target_subdir=${target_noncanonical}
2155
73458fb7 2156
093e61a6 2157# Set program_transform_name
13c22933 2158test "$program_prefix" != NONE &&
a6ccdbab 2159 program_transform_name="s&^&$program_prefix&;$program_transform_name"
13c22933
JJ
2160# Use a double $ so make ignores it.
2161test "$program_suffix" != NONE &&
a6ccdbab 2162 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba479fd2
NN
2163# Double any \ or $. echo might interpret backslashes.
2164# By default was `s,x,x', remove it if useless.
2165cat <<\_ACEOF >conftest.sed
2166s/[\\$]/&&/g;s/;s,x,x,$//
2167_ACEOF
2168program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
a6ccdbab 2169rm -f conftest.sed
13c22933
JJ
2170
2171
34a86c2b
NN
2172# Check for bogus environment variables.
2173# Test if LIBRARY_PATH contains the notation for the current directory
2174# since this would lead to problems installing/building glibc.
2175# LIBRARY_PATH contains the current directory if one of the following
2176# is true:
2177# - one of the terminals (":" and ";") is the first or last sign
2178# - two terminals occur directly after each other
2179# - the path contains an element with a dot in it
a6ccdbab
EC
2180{ echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
2181echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6; }
34a86c2b
NN
2182case ${LIBRARY_PATH} in
2183 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
2184 library_path_setting="contains current directory"
2185 ;;
2186 *)
2187 library_path_setting="ok"
2188 ;;
2189esac
a6ccdbab
EC
2190{ echo "$as_me:$LINENO: result: $library_path_setting" >&5
2191echo "${ECHO_T}$library_path_setting" >&6; }
34a86c2b 2192if test "$library_path_setting" != "ok"; then
ba479fd2 2193{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
2194*** LIBRARY_PATH shouldn't contain the current directory when
2195*** building gcc. Please change the environment variable
ba479fd2
NN
2196*** and run configure again." >&5
2197echo "$as_me: error:
2198*** LIBRARY_PATH shouldn't contain the current directory when
2199*** building gcc. Please change the environment variable
2200*** and run configure again." >&2;}
2201 { (exit 1); exit 1; }; }
e9a25f70
JL
2202fi
2203
34a86c2b
NN
2204# Test if GCC_EXEC_PREFIX contains the notation for the current directory
2205# since this would lead to problems installing/building glibc.
2206# GCC_EXEC_PREFIX contains the current directory if one of the following
2207# is true:
2208# - one of the terminals (":" and ";") is the first or last sign
2209# - two terminals occur directly after each other
2210# - the path contains an element with a dot in it
a6ccdbab
EC
2211{ echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
2212echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6; }
34a86c2b
NN
2213case ${GCC_EXEC_PREFIX} in
2214 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
2215 gcc_exec_prefix_setting="contains current directory"
2216 ;;
2217 *)
2218 gcc_exec_prefix_setting="ok"
2219 ;;
2220esac
a6ccdbab
EC
2221{ echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
2222echo "${ECHO_T}$gcc_exec_prefix_setting" >&6; }
34a86c2b 2223if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
2224{ { echo "$as_me:$LINENO: error:
2225*** GCC_EXEC_PREFIX shouldn't contain the current directory when
2226*** building gcc. Please change the environment variable
2227*** and run configure again." >&5
2228echo "$as_me: error:
cafe096b
EC
2229*** GCC_EXEC_PREFIX shouldn't contain the current directory when
2230*** building gcc. Please change the environment variable
ba479fd2
NN
2231*** and run configure again." >&2;}
2232 { (exit 1); exit 1; }; }
34a86c2b
NN
2233fi
2234
2235# -----------
2236# Directories
2237# -----------
2238
2239# Specify the local prefix
2240local_prefix=
ba479fd2 2241
a6ccdbab 2242# Check whether --with-local-prefix was given.
34a86c2b 2243if test "${with_local_prefix+set}" = set; then
a6ccdbab 2244 withval=$with_local_prefix; case "${withval}" in
ba479fd2
NN
2245yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
2246echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
2247 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
2248no) ;;
2249*) local_prefix=$with_local_prefix ;;
2250esac
a6ccdbab
EC
2251fi
2252
34a86c2b
NN
2253
2254# Default local prefix if it is empty
2255if test x$local_prefix = x; then
2256 local_prefix=/usr/local
2257fi
2258
2259# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
2260# passed in by the toplevel make and thus we'd get different behavior
2261# depending on where we built the sources.
2262gcc_gxx_include_dir=
2263# Specify the g++ header file directory
ba479fd2 2264
a6ccdbab 2265# Check whether --with-gxx-include-dir was given.
34a86c2b 2266if test "${with_gxx_include_dir+set}" = set; then
a6ccdbab 2267 withval=$with_gxx_include_dir; case "${withval}" in
ba479fd2
NN
2268yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
2269echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
2270 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
2271no) ;;
2272*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
2273esac
a6ccdbab
EC
2274fi
2275
34a86c2b 2276
0f57bf40 2277# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
34a86c2b
NN
2278if test x${gcc_gxx_include_dir} = x; then
2279 if test x${enable_version_specific_runtime_libs} = xyes; then
2280 gcc_gxx_include_dir='${libsubdir}/include/c++'
2281 else
0f57bf40
MM
2282 libstdcxx_incdir='include/c++/$(version)'
2283 if test x$host != x$target; then
2284 libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
2285 fi
2286 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/$libstdcxx_incdir"
34a86c2b
NN
2287 fi
2288fi
2289
ba479fd2 2290
a6ccdbab 2291# Check whether --with-cpp_install_dir was given.
34a86c2b 2292if test "${with_cpp_install_dir+set}" = set; then
a6ccdbab 2293 withval=$with_cpp_install_dir; if test x$withval = xyes; then
ba479fd2
NN
2294 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
2295echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
2296 { (exit 1); exit 1; }; }
34a86c2b
NN
2297elif test x$withval != xno; then
2298 cpp_install_dir=$withval
2299fi
a6ccdbab
EC
2300fi
2301
34a86c2b 2302
51b9ff45 2303# We would like to our source tree to be readonly. However when releases or
ba479fd2 2304# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 2305# various formats of manuals need to be included along with the rest of the
ba479fd2 2306# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
2307# just that.
2308
a6ccdbab
EC
2309{ echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
2310echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6; }
2311 # Check whether --enable-generated-files-in-srcdir was given.
51b9ff45 2312if test "${enable_generated_files_in_srcdir+set}" = set; then
a6ccdbab 2313 enableval=$enable_generated_files_in_srcdir; generated_files_in_srcdir=$enableval
51b9ff45 2314else
03787dfd 2315 generated_files_in_srcdir=no
a6ccdbab 2316fi
b8ec3cc8 2317
a6ccdbab
EC
2318
2319{ echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
2320echo "${ECHO_T}$generated_files_in_srcdir" >&6; }
03787dfd
KC
2321
2322if test "$generated_files_in_srcdir" = "yes"; then
2323 GENINSRC=''
03787dfd
KC
2324else
2325 GENINSRC='#'
03787dfd
KC
2326fi
2327
2328
34a86c2b
NN
2329# -------------------
2330# Find default linker
2331# -------------------
2332
2333# With GNU ld
ba479fd2 2334
a6ccdbab 2335# Check whether --with-gnu-ld was given.
34a86c2b 2336if test "${with_gnu_ld+set}" = set; then
a6ccdbab 2337 withval=$with_gnu_ld; gnu_ld_flag="$with_gnu_ld"
34a86c2b
NN
2338else
2339 gnu_ld_flag=no
a6ccdbab
EC
2340fi
2341
6e3f3080 2342
63cf211a 2343# With pre-defined ld
ba479fd2 2344
a6ccdbab 2345# Check whether --with-ld was given.
34a86c2b 2346if test "${with_ld+set}" = set; then
a6ccdbab
EC
2347 withval=$with_ld; DEFAULT_LINKER="$with_ld"
2348fi
2349
34a86c2b
NN
2350if test x"${DEFAULT_LINKER+set}" = x"set"; then
2351 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
2352 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
2353echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
2354 { (exit 1); exit 1; }; }
34a86c2b
NN
2355 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
2356 gnu_ld_flag=yes
2357 fi
ba479fd2
NN
2358
2359cat >>confdefs.h <<_ACEOF
34a86c2b 2360#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 2361_ACEOF
34a86c2b
NN
2362
2363fi
2364
a6ccdbab
EC
2365{ echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
2366echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6; }
34a86c2b
NN
2367if test x"${DEFAULT_LINKER+set}" = x"set"; then
2368 if test x"$gnu_ld_flag" = x"no"; then
a6ccdbab
EC
2369 { echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
2370echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6; }
34a86c2b 2371 else
a6ccdbab
EC
2372 { echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
2373echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6; }
34a86c2b
NN
2374 fi
2375else
a6ccdbab
EC
2376 { echo "$as_me:$LINENO: result: no" >&5
2377echo "${ECHO_T}no" >&6; }
34a86c2b
NN
2378fi
2379
d594623a
L
2380# With demangler in GNU ld
2381
a6ccdbab 2382# Check whether --with-demangler-in-ld was given.
d594623a 2383if test "${with_demangler_in_ld+set}" = set; then
a6ccdbab 2384 withval=$with_demangler_in_ld; demangler_in_ld="$with_demangler_in_ld"
d594623a
L
2385else
2386 demangler_in_ld=no
a6ccdbab
EC
2387fi
2388
d594623a 2389
34a86c2b
NN
2390# ----------------------
2391# Find default assembler
2392# ----------------------
2393
2394# With GNU as
ba479fd2 2395
a6ccdbab 2396# Check whether --with-gnu-as was given.
34a86c2b 2397if test "${with_gnu_as+set}" = set; then
a6ccdbab 2398 withval=$with_gnu_as; gas_flag="$with_gnu_as"
34a86c2b
NN
2399else
2400 gas_flag=no
a6ccdbab 2401fi
34a86c2b 2402
b8ec3cc8 2403
a6ccdbab
EC
2404
2405# Check whether --with-as was given.
34a86c2b 2406if test "${with_as+set}" = set; then
a6ccdbab
EC
2407 withval=$with_as; DEFAULT_ASSEMBLER="$with_as"
2408fi
2409
34a86c2b
NN
2410if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2411 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
2412 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
2413echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
2414 { (exit 1); exit 1; }; }
34a86c2b
NN
2415 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
2416 gas_flag=yes
2417 fi
ba479fd2
NN
2418
2419cat >>confdefs.h <<_ACEOF
34a86c2b 2420#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 2421_ACEOF
34a86c2b
NN
2422
2423fi
2424
a6ccdbab
EC
2425{ echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
2426echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6; }
34a86c2b
NN
2427if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2428 if test x"$gas_flag" = x"no"; then
a6ccdbab
EC
2429 { echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
2430echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6; }
34a86c2b 2431 else
a6ccdbab
EC
2432 { echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
2433echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6; }
34a86c2b
NN
2434 fi
2435else
a6ccdbab
EC
2436 { echo "$as_me:$LINENO: result: no" >&5
2437echo "${ECHO_T}no" >&6; }
34a86c2b
NN
2438fi
2439
2440# ---------------
2441# Find C compiler
2442# ---------------
2443
426ca3ca
RO
2444# If a non-executable a.out is present (e.g. created by GNU as above even if
2445# invoked with -v only), the IRIX 6 native ld just overwrites the existing
2446# file, even when creating an executable, so an execution test fails.
2447# Remove possible default executable files to avoid this.
2448#
2449# FIXME: This really belongs into AC_PROG_CC and can be removed once
2450# Autoconf includes it.
2451rm -f a.out a.exe b.out
2452
34a86c2b 2453# Find the native compiler
ba479fd2
NN
2454ac_ext=c
2455ac_cpp='$CPP $CPPFLAGS'
2456ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2457ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2458ac_compiler_gnu=$ac_cv_c_compiler_gnu
2459if test -n "$ac_tool_prefix"; then
2460 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2461set dummy ${ac_tool_prefix}gcc; ac_word=$2
a6ccdbab
EC
2462{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2463echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
2464if test "${ac_cv_prog_CC+set}" = set; then
2465 echo $ECHO_N "(cached) $ECHO_C" >&6
2466else
2467 if test -n "$CC"; then
2468 ac_cv_prog_CC="$CC" # Let the user override the test.
2469else
2470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2471for as_dir in $PATH
2472do
2473 IFS=$as_save_IFS
2474 test -z "$as_dir" && as_dir=.
2475 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 2476 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
2477 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2478 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2479 break 2
2480 fi
2481done
2482done
a6ccdbab 2483IFS=$as_save_IFS
ba479fd2
NN
2484
2485fi
2486fi
2487CC=$ac_cv_prog_CC
2488if test -n "$CC"; then
a6ccdbab
EC
2489 { echo "$as_me:$LINENO: result: $CC" >&5
2490echo "${ECHO_T}$CC" >&6; }
ba479fd2 2491else
a6ccdbab
EC
2492 { echo "$as_me:$LINENO: result: no" >&5
2493echo "${ECHO_T}no" >&6; }
ba479fd2
NN
2494fi
2495
a6ccdbab 2496
ba479fd2
NN
2497fi
2498if test -z "$ac_cv_prog_CC"; then
2499 ac_ct_CC=$CC
2500 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 2501set dummy gcc; ac_word=$2
a6ccdbab
EC
2502{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2503echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
2504if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2505 echo $ECHO_N "(cached) $ECHO_C" >&6
2506else
2507 if test -n "$ac_ct_CC"; then
2508 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2509else
2510as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2511for as_dir in $PATH
2512do
2513 IFS=$as_save_IFS
2514 test -z "$as_dir" && as_dir=.
2515 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 2516 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
2517 ac_cv_prog_ac_ct_CC="gcc"
2518 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2519 break 2
2520 fi
2521done
2522done
a6ccdbab 2523IFS=$as_save_IFS
ba479fd2
NN
2524
2525fi
2526fi
2527ac_ct_CC=$ac_cv_prog_ac_ct_CC
2528if test -n "$ac_ct_CC"; then
a6ccdbab
EC
2529 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2530echo "${ECHO_T}$ac_ct_CC" >&6; }
ba479fd2 2531else
a6ccdbab
EC
2532 { echo "$as_me:$LINENO: result: no" >&5
2533echo "${ECHO_T}no" >&6; }
ba479fd2
NN
2534fi
2535
a6ccdbab
EC
2536 if test "x$ac_ct_CC" = x; then
2537 CC=""
2538 else
2539 case $cross_compiling:$ac_tool_warned in
2540yes:)
2541{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2542whose name does not start with the host triplet. If you think this
2543configuration is useful to you, please write to autoconf@gnu.org." >&5
2544echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2545whose name does not start with the host triplet. If you think this
2546configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2547ac_tool_warned=yes ;;
2548esac
2549 CC=$ac_ct_CC
2550 fi
ba479fd2
NN
2551else
2552 CC="$ac_cv_prog_CC"
2553fi
2554
2555if test -z "$CC"; then
a6ccdbab
EC
2556 if test -n "$ac_tool_prefix"; then
2557 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
ba479fd2 2558set dummy ${ac_tool_prefix}cc; ac_word=$2
a6ccdbab
EC
2559{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2560echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
2561if test "${ac_cv_prog_CC+set}" = set; then
2562 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
2563else
2564 if test -n "$CC"; then
2565 ac_cv_prog_CC="$CC" # Let the user override the test.
2566else
ba479fd2
NN
2567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2568for as_dir in $PATH
2569do
2570 IFS=$as_save_IFS
2571 test -z "$as_dir" && as_dir=.
2572 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 2573 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
2574 ac_cv_prog_CC="${ac_tool_prefix}cc"
2575 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2576 break 2
2577 fi
2578done
2579done
a6ccdbab 2580IFS=$as_save_IFS
ba479fd2 2581
cd9e5e7c
MK
2582fi
2583fi
ba479fd2 2584CC=$ac_cv_prog_CC
cd9e5e7c 2585if test -n "$CC"; then
a6ccdbab
EC
2586 { echo "$as_me:$LINENO: result: $CC" >&5
2587echo "${ECHO_T}$CC" >&6; }
dd7f7a6e 2588else
a6ccdbab
EC
2589 { echo "$as_me:$LINENO: result: no" >&5
2590echo "${ECHO_T}no" >&6; }
dd7f7a6e
EC
2591fi
2592
dd7f7a6e 2593
a6ccdbab 2594 fi
ba479fd2 2595fi
6e3f3080
NN
2596if test -z "$CC"; then
2597 # Extract the first word of "cc", so it can be a program name with args.
2598set dummy cc; ac_word=$2
a6ccdbab
EC
2599{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2600echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
2601if test "${ac_cv_prog_CC+set}" = set; then
2602 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
2603else
2604 if test -n "$CC"; then
2605 ac_cv_prog_CC="$CC" # Let the user override the test.
2606else
2607 ac_prog_rejected=no
ba479fd2
NN
2608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2609for as_dir in $PATH
2610do
2611 IFS=$as_save_IFS
2612 test -z "$as_dir" && as_dir=.
2613 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 2614 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
2615 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2616 ac_prog_rejected=yes
2617 continue
2618 fi
2619 ac_cv_prog_CC="cc"
2620 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2621 break 2
2622 fi
2623done
2624done
a6ccdbab 2625IFS=$as_save_IFS
ba479fd2 2626
6e3f3080
NN
2627if test $ac_prog_rejected = yes; then
2628 # We found a bogon in the path, so make sure we never use it.
2629 set dummy $ac_cv_prog_CC
2630 shift
ba479fd2 2631 if test $# != 0; then
6e3f3080
NN
2632 # We chose a different compiler from the bogus one.
2633 # However, it has the same basename, so the bogon will be chosen
2634 # first if we set CC to just the basename; use the full file name.
2635 shift
ba479fd2 2636 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2637 fi
6e3f3080
NN
2638fi
2639fi
2640fi
ba479fd2 2641CC=$ac_cv_prog_CC
6e3f3080 2642if test -n "$CC"; then
a6ccdbab
EC
2643 { echo "$as_me:$LINENO: result: $CC" >&5
2644echo "${ECHO_T}$CC" >&6; }
e9a25f70 2645else
a6ccdbab
EC
2646 { echo "$as_me:$LINENO: result: no" >&5
2647echo "${ECHO_T}no" >&6; }
e9a25f70 2648fi
6e3f3080 2649
a6ccdbab 2650
ba479fd2
NN
2651fi
2652if test -z "$CC"; then
2653 if test -n "$ac_tool_prefix"; then
a6ccdbab 2654 for ac_prog in cl.exe
ba479fd2
NN
2655 do
2656 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2657set dummy $ac_tool_prefix$ac_prog; ac_word=$2
a6ccdbab
EC
2658{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2659echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
2660if test "${ac_cv_prog_CC+set}" = set; then
2661 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2662else
6e3f3080
NN
2663 if test -n "$CC"; then
2664 ac_cv_prog_CC="$CC" # Let the user override the test.
2665else
ba479fd2
NN
2666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2667for as_dir in $PATH
2668do
2669 IFS=$as_save_IFS
2670 test -z "$as_dir" && as_dir=.
2671 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 2672 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
2673 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2674 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2675 break 2
2676 fi
2677done
2678done
a6ccdbab 2679IFS=$as_save_IFS
ba479fd2 2680
093e61a6 2681fi
6e3f3080 2682fi
ba479fd2 2683CC=$ac_cv_prog_CC
6e3f3080 2684if test -n "$CC"; then
a6ccdbab
EC
2685 { echo "$as_me:$LINENO: result: $CC" >&5
2686echo "${ECHO_T}$CC" >&6; }
6e3f3080 2687else
a6ccdbab
EC
2688 { echo "$as_me:$LINENO: result: no" >&5
2689echo "${ECHO_T}no" >&6; }
093e61a6 2690fi
cafe096b 2691
a6ccdbab 2692
ba479fd2
NN
2693 test -n "$CC" && break
2694 done
2695fi
2696if test -z "$CC"; then
2697 ac_ct_CC=$CC
a6ccdbab 2698 for ac_prog in cl.exe
ba479fd2
NN
2699do
2700 # Extract the first word of "$ac_prog", so it can be a program name with args.
2701set dummy $ac_prog; ac_word=$2
a6ccdbab
EC
2702{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2703echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
2704if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2705 echo $ECHO_N "(cached) $ECHO_C" >&6
2706else
2707 if test -n "$ac_ct_CC"; then
2708 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2709else
2710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2711for as_dir in $PATH
2712do
2713 IFS=$as_save_IFS
2714 test -z "$as_dir" && as_dir=.
2715 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 2716 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
2717 ac_cv_prog_ac_ct_CC="$ac_prog"
2718 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2719 break 2
2720 fi
2721done
2722done
a6ccdbab 2723IFS=$as_save_IFS
6e3f3080 2724
ba479fd2
NN
2725fi
2726fi
2727ac_ct_CC=$ac_cv_prog_ac_ct_CC
2728if test -n "$ac_ct_CC"; then
a6ccdbab
EC
2729 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2730echo "${ECHO_T}$ac_ct_CC" >&6; }
ba479fd2 2731else
a6ccdbab
EC
2732 { echo "$as_me:$LINENO: result: no" >&5
2733echo "${ECHO_T}no" >&6; }
ba479fd2 2734fi
6e3f3080 2735
a6ccdbab 2736
ba479fd2
NN
2737 test -n "$ac_ct_CC" && break
2738done
63cf211a 2739
a6ccdbab
EC
2740 if test "x$ac_ct_CC" = x; then
2741 CC=""
2742 else
2743 case $cross_compiling:$ac_tool_warned in
2744yes:)
2745{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2746whose name does not start with the host triplet. If you think this
2747configuration is useful to you, please write to autoconf@gnu.org." >&5
2748echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2749whose name does not start with the host triplet. If you think this
2750configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2751ac_tool_warned=yes ;;
2752esac
2753 CC=$ac_ct_CC
2754 fi
ba479fd2
NN
2755fi
2756
2757fi
2758
2759
2760test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2761See \`config.log' for more details." >&5
2762echo "$as_me: error: no acceptable C compiler found in \$PATH
2763See \`config.log' for more details." >&2;}
2764 { (exit 1); exit 1; }; }
2765
2766# Provide some information about the compiler.
a6ccdbab 2767echo "$as_me:$LINENO: checking for C compiler version" >&5
ba479fd2 2768ac_compiler=`set X $ac_compile; echo $2`
a6ccdbab
EC
2769{ (ac_try="$ac_compiler --version >&5"
2770case "(($ac_try" in
2771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2772 *) ac_try_echo=$ac_try;;
2773esac
2774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2775 (eval "$ac_compiler --version >&5") 2>&5
ba479fd2
NN
2776 ac_status=$?
2777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2778 (exit $ac_status); }
a6ccdbab
EC
2779{ (ac_try="$ac_compiler -v >&5"
2780case "(($ac_try" in
2781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2782 *) ac_try_echo=$ac_try;;
2783esac
2784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2785 (eval "$ac_compiler -v >&5") 2>&5
ba479fd2
NN
2786 ac_status=$?
2787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2788 (exit $ac_status); }
a6ccdbab
EC
2789{ (ac_try="$ac_compiler -V >&5"
2790case "(($ac_try" in
2791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2792 *) ac_try_echo=$ac_try;;
2793esac
2794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2795 (eval "$ac_compiler -V >&5") 2>&5
ba479fd2
NN
2796 ac_status=$?
2797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2798 (exit $ac_status); }
2799
2800cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2801/* confdefs.h. */
2802_ACEOF
2803cat confdefs.h >>conftest.$ac_ext
2804cat >>conftest.$ac_ext <<_ACEOF
2805/* end confdefs.h. */
2806
2807int
2808main ()
2809{
63cf211a 2810
ba479fd2
NN
2811 ;
2812 return 0;
2813}
2814_ACEOF
2815ac_clean_files_save=$ac_clean_files
2816ac_clean_files="$ac_clean_files a.out a.exe b.out"
2817# Try to create an executable without -o first, disregard a.out.
2818# It will help us diagnose broken compilers, and finding out an intuition
2819# of exeext.
a6ccdbab
EC
2820{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2821echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
ba479fd2 2822ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
a6ccdbab
EC
2823#
2824# List of possible output files, starting from the most likely.
2825# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2826# only as a last resort. b.out is created by i960 compilers.
2827ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2828#
2829# The IRIX 6 linker writes into existing files which may not be
2830# executable, retaining their permissions. Remove them first so a
2831# subsequent execution test works.
2832ac_rmfiles=
2833for ac_file in $ac_files
2834do
2835 case $ac_file in
2836 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2837 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2838 esac
2839done
2840rm -f $ac_rmfiles
2841
2842if { (ac_try="$ac_link_default"
2843case "(($ac_try" in
2844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2845 *) ac_try_echo=$ac_try;;
2846esac
2847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2848 (eval "$ac_link_default") 2>&5
ba479fd2
NN
2849 ac_status=$?
2850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2851 (exit $ac_status); }; then
a6ccdbab
EC
2852 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2853# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2854# in a Makefile. We should not override ac_cv_exeext if it was cached,
2855# so that the user can short-circuit this test for compilers unknown to
2856# Autoconf.
2857for ac_file in $ac_files ''
ba479fd2
NN
2858do
2859 test -f "$ac_file" || continue
2860 case $ac_file in
a6ccdbab 2861 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
86da66b5 2862 ;;
ba479fd2 2863 [ab].out )
86da66b5
HPN
2864 # We found the default executable, but exeext='' is most
2865 # certainly right.
2866 break;;
ba479fd2 2867 *.* )
a6ccdbab
EC
2868 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2869 then :; else
2870 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2871 fi
2872 # We set ac_cv_exeext here because the later test for it is not
2873 # safe: cross compilers may not add the suffix if given an `-o'
2874 # argument, so we may need to know it at that point already.
2875 # Even if this section looks crufty: it has the advantage of
2876 # actually working.
86da66b5 2877 break;;
ba479fd2 2878 * )
86da66b5 2879 break;;
ba479fd2
NN
2880 esac
2881done
a6ccdbab
EC
2882test "$ac_cv_exeext" = no && ac_cv_exeext=
2883
ba479fd2 2884else
a6ccdbab
EC
2885 ac_file=''
2886fi
2887
2888{ echo "$as_me:$LINENO: result: $ac_file" >&5
2889echo "${ECHO_T}$ac_file" >&6; }
2890if test -z "$ac_file"; then
ba479fd2
NN
2891 echo "$as_me: failed program was:" >&5
2892sed 's/^/| /' conftest.$ac_ext >&5
2893
2894{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2895See \`config.log' for more details." >&5
2896echo "$as_me: error: C compiler cannot create executables
2897See \`config.log' for more details." >&2;}
2898 { (exit 77); exit 77; }; }
2899fi
2900
2901ac_exeext=$ac_cv_exeext
ba479fd2 2902
a6ccdbab 2903# Check that the compiler produces executables we can run. If not, either
ba479fd2 2904# the compiler is broken, or we cross compile.
a6ccdbab
EC
2905{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2906echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
ba479fd2
NN
2907# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2908# If not cross compiling, check that we can run a simple program.
2909if test "$cross_compiling" != yes; then
2910 if { ac_try='./$ac_file'
a6ccdbab
EC
2911 { (case "(($ac_try" in
2912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2913 *) ac_try_echo=$ac_try;;
2914esac
2915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2916 (eval "$ac_try") 2>&5
ba479fd2
NN
2917 ac_status=$?
2918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2919 (exit $ac_status); }; }; then
2920 cross_compiling=no
6e3f3080 2921 else
ba479fd2
NN
2922 if test "$cross_compiling" = maybe; then
2923 cross_compiling=yes
2924 else
2925 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2926If you meant to cross compile, use \`--host'.
2927See \`config.log' for more details." >&5
2928echo "$as_me: error: cannot run C compiled programs.
2929If you meant to cross compile, use \`--host'.
2930See \`config.log' for more details." >&2;}
2931 { (exit 1); exit 1; }; }
2932 fi
6e3f3080
NN
2933 fi
2934fi
a6ccdbab
EC
2935{ echo "$as_me:$LINENO: result: yes" >&5
2936echo "${ECHO_T}yes" >&6; }
ba479fd2
NN
2937
2938rm -f a.out a.exe conftest$ac_cv_exeext b.out
2939ac_clean_files=$ac_clean_files_save
a6ccdbab 2940# Check that the compiler produces executables we can run. If not, either
ba479fd2 2941# the compiler is broken, or we cross compile.
a6ccdbab
EC
2942{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2943echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2944{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2945echo "${ECHO_T}$cross_compiling" >&6; }
2946
2947{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2948echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2949if { (ac_try="$ac_link"
2950case "(($ac_try" in
2951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2952 *) ac_try_echo=$ac_try;;
2953esac
2954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2955 (eval "$ac_link") 2>&5
ba479fd2
NN
2956 ac_status=$?
2957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2958 (exit $ac_status); }; then
2959 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2960# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2961# work properly (i.e., refer to `conftest.exe'), while it won't with
2962# `rm'.
2963for ac_file in conftest.exe conftest conftest.*; do
2964 test -f "$ac_file" || continue
2965 case $ac_file in
a6ccdbab 2966 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
ba479fd2 2967 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
86da66b5 2968 break;;
ba479fd2
NN
2969 * ) break;;
2970 esac
2971done
e9a25f70 2972else
ba479fd2
NN
2973 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2974See \`config.log' for more details." >&5
2975echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2976See \`config.log' for more details." >&2;}
2977 { (exit 1); exit 1; }; }
2978fi
2979
2980rm -f conftest$ac_cv_exeext
a6ccdbab
EC
2981{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2982echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba479fd2
NN
2983
2984rm -f conftest.$ac_ext
2985EXEEXT=$ac_cv_exeext
2986ac_exeext=$EXEEXT
a6ccdbab
EC
2987{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2988echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
ba479fd2
NN
2989if test "${ac_cv_objext+set}" = set; then
2990 echo $ECHO_N "(cached) $ECHO_C" >&6
2991else
2992 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2993/* confdefs.h. */
2994_ACEOF
2995cat confdefs.h >>conftest.$ac_ext
2996cat >>conftest.$ac_ext <<_ACEOF
2997/* end confdefs.h. */
2998
2999int
3000main ()
3001{
6e3f3080 3002
ba479fd2
NN
3003 ;
3004 return 0;
3005}
3006_ACEOF
3007rm -f conftest.o conftest.obj
a6ccdbab
EC
3008if { (ac_try="$ac_compile"
3009case "(($ac_try" in
3010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3011 *) ac_try_echo=$ac_try;;
3012esac
3013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3014 (eval "$ac_compile") 2>&5
ba479fd2
NN
3015 ac_status=$?
3016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3017 (exit $ac_status); }; then
a6ccdbab
EC
3018 for ac_file in conftest.o conftest.obj conftest.*; do
3019 test -f "$ac_file" || continue;
ba479fd2 3020 case $ac_file in
a6ccdbab 3021 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
ba479fd2
NN
3022 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3023 break;;
3024 esac
3025done
63cf211a 3026else
ba479fd2
NN
3027 echo "$as_me: failed program was:" >&5
3028sed 's/^/| /' conftest.$ac_ext >&5
3029
3030{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3031See \`config.log' for more details." >&5
3032echo "$as_me: error: cannot compute suffix of object files: cannot compile
3033See \`config.log' for more details." >&2;}
3034 { (exit 1); exit 1; }; }
3035fi
3036
3037rm -f conftest.$ac_cv_objext conftest.$ac_ext
3038fi
a6ccdbab
EC
3039{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3040echo "${ECHO_T}$ac_cv_objext" >&6; }
ba479fd2
NN
3041OBJEXT=$ac_cv_objext
3042ac_objext=$OBJEXT
a6ccdbab
EC
3043{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3044echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
ba479fd2
NN
3045if test "${ac_cv_c_compiler_gnu+set}" = set; then
3046 echo $ECHO_N "(cached) $ECHO_C" >&6
3047else
3048 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3049/* confdefs.h. */
3050_ACEOF
3051cat confdefs.h >>conftest.$ac_ext
3052cat >>conftest.$ac_ext <<_ACEOF
3053/* end confdefs.h. */
3054
3055int
3056main ()
3057{
3058#ifndef __GNUC__
3059 choke me
3060#endif
6e3f3080 3061
ba479fd2
NN
3062 ;
3063 return 0;
3064}
3065_ACEOF
3066rm -f conftest.$ac_objext
a6ccdbab
EC
3067if { (ac_try="$ac_compile"
3068case "(($ac_try" in
3069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3070 *) ac_try_echo=$ac_try;;
3071esac
3072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3073 (eval "$ac_compile") 2>conftest.er1
ba479fd2 3074 ac_status=$?
86da66b5
HPN
3075 grep -v '^ *+' conftest.er1 >conftest.err
3076 rm -f conftest.er1
3077 cat conftest.err >&5
ba479fd2 3078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
3079 (exit $ac_status); } && {
3080 test -z "$ac_c_werror_flag" ||
3081 test ! -s conftest.err
3082 } && test -s conftest.$ac_objext; then
ba479fd2
NN
3083 ac_compiler_gnu=yes
3084else
3085 echo "$as_me: failed program was:" >&5
3086sed 's/^/| /' conftest.$ac_ext >&5
3087
a6ccdbab 3088 ac_compiler_gnu=no
ba479fd2 3089fi
a6ccdbab
EC
3090
3091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
3092ac_cv_c_compiler_gnu=$ac_compiler_gnu
3093
3094fi
a6ccdbab
EC
3095{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3096echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
ba479fd2
NN
3097GCC=`test $ac_compiler_gnu = yes && echo yes`
3098ac_test_CFLAGS=${CFLAGS+set}
3099ac_save_CFLAGS=$CFLAGS
a6ccdbab
EC
3100{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3101echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
ba479fd2
NN
3102if test "${ac_cv_prog_cc_g+set}" = set; then
3103 echo $ECHO_N "(cached) $ECHO_C" >&6
3104else
a6ccdbab
EC
3105 ac_save_c_werror_flag=$ac_c_werror_flag
3106 ac_c_werror_flag=yes
3107 ac_cv_prog_cc_g=no
3108 CFLAGS="-g"
3109 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3110/* confdefs.h. */
3111_ACEOF
3112cat confdefs.h >>conftest.$ac_ext
3113cat >>conftest.$ac_ext <<_ACEOF
3114/* end confdefs.h. */
3115
3116int
3117main ()
3118{
3119
3120 ;
3121 return 0;
3122}
3123_ACEOF
3124rm -f conftest.$ac_objext
a6ccdbab
EC
3125if { (ac_try="$ac_compile"
3126case "(($ac_try" in
3127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3128 *) ac_try_echo=$ac_try;;
3129esac
3130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3131 (eval "$ac_compile") 2>conftest.er1
ba479fd2 3132 ac_status=$?
86da66b5
HPN
3133 grep -v '^ *+' conftest.er1 >conftest.err
3134 rm -f conftest.er1
3135 cat conftest.err >&5
ba479fd2 3136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
3137 (exit $ac_status); } && {
3138 test -z "$ac_c_werror_flag" ||
3139 test ! -s conftest.err
3140 } && test -s conftest.$ac_objext; then
3141 ac_cv_prog_cc_g=yes
3142else
3143 echo "$as_me: failed program was:" >&5
3144sed 's/^/| /' conftest.$ac_ext >&5
3145
3146 CFLAGS=""
3147 cat >conftest.$ac_ext <<_ACEOF
3148/* confdefs.h. */
3149_ACEOF
3150cat confdefs.h >>conftest.$ac_ext
3151cat >>conftest.$ac_ext <<_ACEOF
3152/* end confdefs.h. */
3153
3154int
3155main ()
3156{
3157
3158 ;
3159 return 0;
3160}
3161_ACEOF
3162rm -f conftest.$ac_objext
3163if { (ac_try="$ac_compile"
3164case "(($ac_try" in
3165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3166 *) ac_try_echo=$ac_try;;
3167esac
3168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3169 (eval "$ac_compile") 2>conftest.er1
86da66b5 3170 ac_status=$?
a6ccdbab
EC
3171 grep -v '^ *+' conftest.er1 >conftest.err
3172 rm -f conftest.er1
3173 cat conftest.err >&5
86da66b5 3174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
3175 (exit $ac_status); } && {
3176 test -z "$ac_c_werror_flag" ||
3177 test ! -s conftest.err
3178 } && test -s conftest.$ac_objext; then
3179 :
3180else
3181 echo "$as_me: failed program was:" >&5
3182sed 's/^/| /' conftest.$ac_ext >&5
3183
3184 ac_c_werror_flag=$ac_save_c_werror_flag
3185 CFLAGS="-g"
3186 cat >conftest.$ac_ext <<_ACEOF
3187/* confdefs.h. */
3188_ACEOF
3189cat confdefs.h >>conftest.$ac_ext
3190cat >>conftest.$ac_ext <<_ACEOF
3191/* end confdefs.h. */
3192
3193int
3194main ()
3195{
3196
3197 ;
3198 return 0;
3199}
3200_ACEOF
3201rm -f conftest.$ac_objext
3202if { (ac_try="$ac_compile"
3203case "(($ac_try" in
3204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3205 *) ac_try_echo=$ac_try;;
3206esac
3207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3208 (eval "$ac_compile") 2>conftest.er1
ba479fd2 3209 ac_status=$?
a6ccdbab
EC
3210 grep -v '^ *+' conftest.er1 >conftest.err
3211 rm -f conftest.er1
3212 cat conftest.err >&5
ba479fd2 3213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
3214 (exit $ac_status); } && {
3215 test -z "$ac_c_werror_flag" ||
3216 test ! -s conftest.err
3217 } && test -s conftest.$ac_objext; then
6e3f3080
NN
3218 ac_cv_prog_cc_g=yes
3219else
ba479fd2
NN
3220 echo "$as_me: failed program was:" >&5
3221sed 's/^/| /' conftest.$ac_ext >&5
63cf211a 3222
a6ccdbab
EC
3223
3224fi
3225
3226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3227fi
3228
3229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
dd7f7a6e 3230fi
a6ccdbab
EC
3231
3232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3233 ac_c_werror_flag=$ac_save_c_werror_flag
dd7f7a6e 3234fi
a6ccdbab
EC
3235{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3236echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
dd7f7a6e
EC
3237if test "$ac_test_CFLAGS" = set; then
3238 CFLAGS=$ac_save_CFLAGS
3239elif test $ac_cv_prog_cc_g = yes; then
3240 if test "$GCC" = yes; then
3241 CFLAGS="-g -O2"
3242 else
3243 CFLAGS="-g"
3244 fi
3245else
3246 if test "$GCC" = yes; then
3247 CFLAGS="-O2"
3248 else
3249 CFLAGS=
3250 fi
3251fi
a6ccdbab
EC
3252{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3253echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3254if test "${ac_cv_prog_cc_c89+set}" = set; then
dd7f7a6e
EC
3255 echo $ECHO_N "(cached) $ECHO_C" >&6
3256else
a6ccdbab 3257 ac_cv_prog_cc_c89=no
dd7f7a6e
EC
3258ac_save_CC=$CC
3259cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3260/* confdefs.h. */
3261_ACEOF
3262cat confdefs.h >>conftest.$ac_ext
3263cat >>conftest.$ac_ext <<_ACEOF
3264/* end confdefs.h. */
dd7f7a6e
EC
3265#include <stdarg.h>
3266#include <stdio.h>
3267#include <sys/types.h>
3268#include <sys/stat.h>
3269/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3270struct buf { int x; };
3271FILE * (*rcsopen) (struct buf *, struct stat *, int);
3272static char *e (p, i)
3273 char **p;
3274 int i;
3275{
3276 return p[i];
3277}
3278static char *f (char * (*g) (char **, int), char **p, ...)
3279{
3280 char *s;
3281 va_list v;
3282 va_start (v,p);
3283 s = g (p, va_arg (v,int));
3284 va_end (v);
3285 return s;
3286}
86da66b5 3287
dd7f7a6e
EC
3288/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3289 function prototypes and stuff, but not '\xHH' hex character constants.
3290 These don't provoke an error unfortunately, instead are silently treated
a6ccdbab 3291 as 'x'. The following induces an error, until -std is added to get
dd7f7a6e
EC
3292 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3293 array size at least. It's necessary to write '\x00'==0 to get something
a6ccdbab 3294 that's true only with -std. */
dd7f7a6e
EC
3295int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3296
a6ccdbab
EC
3297/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3298 inside strings and character constants. */
3299#define FOO(x) 'x'
3300int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3301
dd7f7a6e
EC
3302int test (int i, double x);
3303struct s1 {int (*f) (int a);};
3304struct s2 {int (*f) (double a);};
3305int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3306int argc;
3307char **argv;
ba479fd2
NN
3308int
3309main ()
3310{
dd7f7a6e 3311return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
ba479fd2
NN
3312 ;
3313 return 0;
3314}
3315_ACEOF
a6ccdbab
EC
3316for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3317 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
dd7f7a6e
EC
3318do
3319 CC="$ac_save_CC $ac_arg"
3320 rm -f conftest.$ac_objext
a6ccdbab
EC
3321if { (ac_try="$ac_compile"
3322case "(($ac_try" in
3323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3324 *) ac_try_echo=$ac_try;;
3325esac
3326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3327 (eval "$ac_compile") 2>conftest.er1
ba479fd2 3328 ac_status=$?
86da66b5
HPN
3329 grep -v '^ *+' conftest.er1 >conftest.err
3330 rm -f conftest.er1
3331 cat conftest.err >&5
ba479fd2 3332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
3333 (exit $ac_status); } && {
3334 test -z "$ac_c_werror_flag" ||
3335 test ! -s conftest.err
3336 } && test -s conftest.$ac_objext; then
3337 ac_cv_prog_cc_c89=$ac_arg
ba479fd2
NN
3338else
3339 echo "$as_me: failed program was:" >&5
3340sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 3341
a6ccdbab 3342
dd7f7a6e 3343fi
a6ccdbab
EC
3344
3345rm -f core conftest.err conftest.$ac_objext
3346 test "x$ac_cv_prog_cc_c89" != "xno" && break
dd7f7a6e 3347done
a6ccdbab 3348rm -f conftest.$ac_ext
dd7f7a6e
EC
3349CC=$ac_save_CC
3350
3351fi
a6ccdbab
EC
3352# AC_CACHE_VAL
3353case "x$ac_cv_prog_cc_c89" in
3354 x)
3355 { echo "$as_me:$LINENO: result: none needed" >&5
3356echo "${ECHO_T}none needed" >&6; } ;;
3357 xno)
3358 { echo "$as_me:$LINENO: result: unsupported" >&5
3359echo "${ECHO_T}unsupported" >&6; } ;;
dd7f7a6e 3360 *)
a6ccdbab
EC
3361 CC="$CC $ac_cv_prog_cc_c89"
3362 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3363echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
dd7f7a6e
EC
3364esac
3365
ba479fd2 3366
ba479fd2
NN
3367ac_ext=c
3368ac_cpp='$CPP $CPPFLAGS'
3369ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3370ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3371ac_compiler_gnu=$ac_cv_c_compiler_gnu
3372
3373if test "x$CC" != xcc; then
a6ccdbab
EC
3374 { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
3375echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; }
ba479fd2 3376else
a6ccdbab
EC
3377 { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
3378echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; }
ba479fd2
NN
3379fi
3380set dummy $CC; ac_cc=`echo $2 |
3381 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
a6ccdbab 3382if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2
NN
3383 echo $ECHO_N "(cached) $ECHO_C" >&6
3384else
3385 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3386/* confdefs.h. */
3387_ACEOF
3388cat confdefs.h >>conftest.$ac_ext
3389cat >>conftest.$ac_ext <<_ACEOF
3390/* end confdefs.h. */
3391
3392int
3393main ()
3394{
3395
3396 ;
3397 return 0;
3398}
3399_ACEOF
3ec83fc2
RH
3400# Make sure it works both with $CC and with simple cc.
3401# We do the test twice because some compilers refuse to overwrite an
3402# existing .o file with -o, though they will create one.
a6ccdbab
EC
3403ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3404rm -f conftest2.*
3405if { (case "(($ac_try" in
3406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3407 *) ac_try_echo=$ac_try;;
3408esac
3409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3410 (eval "$ac_try") 2>&5
ba479fd2
NN
3411 ac_status=$?
3412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3413 (exit $ac_status); } &&
a6ccdbab
EC
3414 test -f conftest2.$ac_objext && { (case "(($ac_try" in
3415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3416 *) ac_try_echo=$ac_try;;
3417esac
3418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3419 (eval "$ac_try") 2>&5
ba479fd2
NN
3420 ac_status=$?
3421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3422 (exit $ac_status); };
3ec83fc2
RH
3423then
3424 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
3425 if test "x$CC" != xcc; then
3426 # Test first that cc exists at all.
ba479fd2 3427 if { ac_try='cc -c conftest.$ac_ext >&5'
a6ccdbab
EC
3428 { (case "(($ac_try" in
3429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3430 *) ac_try_echo=$ac_try;;
3431esac
3432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3433 (eval "$ac_try") 2>&5
ba479fd2
NN
3434 ac_status=$?
3435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3436 (exit $ac_status); }; }; then
a6ccdbab
EC
3437 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3438 rm -f conftest2.*
3439 if { (case "(($ac_try" in
3440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3441 *) ac_try_echo=$ac_try;;
3442esac
3443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3444 (eval "$ac_try") 2>&5
ba479fd2
NN
3445 ac_status=$?
3446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3447 (exit $ac_status); } &&
a6ccdbab
EC
3448 test -f conftest2.$ac_objext && { (case "(($ac_try" in
3449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3450 *) ac_try_echo=$ac_try;;
3451esac
3452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3453 (eval "$ac_try") 2>&5
ba479fd2
NN
3454 ac_status=$?
3455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3456 (exit $ac_status); };
3ec83fc2 3457 then
86da66b5
HPN
3458 # cc works too.
3459 :
3ec83fc2 3460 else
86da66b5
HPN
3461 # cc exists but doesn't like -o.
3462 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
3463 fi
3464 fi
3465 fi
3466else
3467 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3468fi
a6ccdbab 3469rm -f core conftest*
3ec83fc2
RH
3470
3471fi
a6ccdbab
EC
3472if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
3473 { echo "$as_me:$LINENO: result: yes" >&5
3474echo "${ECHO_T}yes" >&6; }
3ec83fc2 3475else
a6ccdbab
EC
3476 { echo "$as_me:$LINENO: result: no" >&5
3477echo "${ECHO_T}no" >&6; }
ba479fd2
NN
3478
3479cat >>confdefs.h <<\_ACEOF
3ec83fc2 3480#define NO_MINUS_C_MINUS_O 1
ba479fd2 3481_ACEOF
3ec83fc2
RH
3482
3483fi
3484
3b620440
KC
3485# expand $ac_aux_dir to an absolute path
3486am_aux_dir=`cd $ac_aux_dir && pwd`
3487
3488# FIXME: we rely on the cache variable name because
3489# there is no other way.
3490set dummy $CC
3491ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
3492if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
3493 # Losing compiler, so override with the script.
3494 # FIXME: It is wrong to rewrite CC.
3495 # But if we don't then we get into trouble of one sort or another.
3496 # A longer-term fix would be to have automake use am__CC in this case,
3497 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3498 CC="$am_aux_dir/compile $CC"
3499fi
3500
414d23ae
HPN
3501# autoconf is lame and doesn't give us any substitution variable for this.
3502if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
3503 NO_MINUS_C_MINUS_O=yes
3504else
3505 OUTPUT_OPTION='-o $@'
3506fi
3507
3508
3509
ec6c7392
PB
3510# Remove the -O2: for historical reasons, unless bootstrapping we prefer
3511# optimizations to be activated explicitly by the toplevel.
3512case "$CC" in
3513 */prev-gcc/xgcc*) ;;
3514 *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
3515esac
3516
3517
73458fb7
NN
3518# -------------------------
3519# Check C compiler features
3520# -------------------------
3521
ba479fd2
NN
3522ac_ext=c
3523ac_cpp='$CPP $CPPFLAGS'
3524ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3525ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3526ac_compiler_gnu=$ac_cv_c_compiler_gnu
a6ccdbab
EC
3527{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3528echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
84c041a1
ZW
3529# On Suns, sometimes $CPP names a directory.
3530if test -n "$CPP" && test -d "$CPP"; then
3531 CPP=
3532fi
3533if test -z "$CPP"; then
ba479fd2
NN
3534 if test "${ac_cv_prog_CPP+set}" = set; then
3535 echo $ECHO_N "(cached) $ECHO_C" >&6
3536else
3537 # Double quotes because CPP needs to be expanded
3538 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3539 do
3540 ac_preproc_ok=false
3541for ac_c_preproc_warn_flag in '' yes
3542do
3543 # Use a header file that comes with gcc, so configuring glibc
3544 # with a fresh cross-compiler works.
3545 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3546 # <limits.h> exists even on freestanding compilers.
84c041a1 3547 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
3548 # not just through cpp. "Syntax error" is here to catch this case.
3549 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3550/* confdefs.h. */
3551_ACEOF
3552cat confdefs.h >>conftest.$ac_ext
3553cat >>conftest.$ac_ext <<_ACEOF
3554/* end confdefs.h. */
3555#ifdef __STDC__
3556# include <limits.h>
3557#else
3558# include <assert.h>
3559#endif
86da66b5 3560 Syntax error
ba479fd2 3561_ACEOF
a6ccdbab
EC
3562if { (ac_try="$ac_cpp conftest.$ac_ext"
3563case "(($ac_try" in
3564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3565 *) ac_try_echo=$ac_try;;
3566esac
3567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3568 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
3569 ac_status=$?
3570 grep -v '^ *+' conftest.er1 >conftest.err
3571 rm -f conftest.er1
3572 cat conftest.err >&5
3573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
3574 (exit $ac_status); } >/dev/null && {
3575 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3576 test ! -s conftest.err
3577 }; then
093e61a6 3578 :
cafe096b 3579else
ba479fd2
NN
3580 echo "$as_me: failed program was:" >&5
3581sed 's/^/| /' conftest.$ac_ext >&5
3582
3583 # Broken: fails on valid input.
3584continue
3585fi
a6ccdbab 3586
ba479fd2
NN
3587rm -f conftest.err conftest.$ac_ext
3588
a6ccdbab 3589 # OK, works on sane cases. Now check whether nonexistent headers
ba479fd2
NN
3590 # can be detected and how.
3591 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3592/* confdefs.h. */
3593_ACEOF
3594cat confdefs.h >>conftest.$ac_ext
3595cat >>conftest.$ac_ext <<_ACEOF
3596/* end confdefs.h. */
3597#include <ac_nonexistent.h>
3598_ACEOF
a6ccdbab
EC
3599if { (ac_try="$ac_cpp conftest.$ac_ext"
3600case "(($ac_try" in
3601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3602 *) ac_try_echo=$ac_try;;
3603esac
3604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3605 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
3606 ac_status=$?
3607 grep -v '^ *+' conftest.er1 >conftest.err
3608 rm -f conftest.er1
3609 cat conftest.err >&5
3610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
3611 (exit $ac_status); } >/dev/null && {
3612 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3613 test ! -s conftest.err
3614 }; then
ba479fd2
NN
3615 # Broken: success on invalid input.
3616continue
3617else
3618 echo "$as_me: failed program was:" >&5
3619sed 's/^/| /' conftest.$ac_ext >&5
3620
3621 # Passes both tests.
3622ac_preproc_ok=:
3623break
3624fi
a6ccdbab 3625
ba479fd2
NN
3626rm -f conftest.err conftest.$ac_ext
3627
3628done
3629# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3630rm -f conftest.err conftest.$ac_ext
3631if $ac_preproc_ok; then
3632 break
3633fi
3634
3635 done
3636 ac_cv_prog_CPP=$CPP
3637
3638fi
3639 CPP=$ac_cv_prog_CPP
3640else
3641 ac_cv_prog_CPP=$CPP
3642fi
a6ccdbab
EC
3643{ echo "$as_me:$LINENO: result: $CPP" >&5
3644echo "${ECHO_T}$CPP" >&6; }
ba479fd2
NN
3645ac_preproc_ok=false
3646for ac_c_preproc_warn_flag in '' yes
3647do
3648 # Use a header file that comes with gcc, so configuring glibc
3649 # with a fresh cross-compiler works.
3650 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3651 # <limits.h> exists even on freestanding compilers.
3652 # On the NeXT, cc -E runs the code through the compiler's parser,
3653 # not just through cpp. "Syntax error" is here to catch this case.
3654 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3655/* confdefs.h. */
3656_ACEOF
3657cat confdefs.h >>conftest.$ac_ext
3658cat >>conftest.$ac_ext <<_ACEOF
3659/* end confdefs.h. */
3660#ifdef __STDC__
3661# include <limits.h>
3662#else
3663# include <assert.h>
3664#endif
86da66b5 3665 Syntax error
ba479fd2 3666_ACEOF
a6ccdbab
EC
3667if { (ac_try="$ac_cpp conftest.$ac_ext"
3668case "(($ac_try" in
3669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3670 *) ac_try_echo=$ac_try;;
3671esac
3672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3673 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
3674 ac_status=$?
3675 grep -v '^ *+' conftest.er1 >conftest.err
3676 rm -f conftest.er1
3677 cat conftest.err >&5
3678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
3679 (exit $ac_status); } >/dev/null && {
3680 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3681 test ! -s conftest.err
3682 }; then
6e3f3080 3683 :
414d23ae 3684else
ba479fd2
NN
3685 echo "$as_me: failed program was:" >&5
3686sed 's/^/| /' conftest.$ac_ext >&5
3687
3688 # Broken: fails on valid input.
3689continue
3690fi
a6ccdbab 3691
ba479fd2
NN
3692rm -f conftest.err conftest.$ac_ext
3693
a6ccdbab 3694 # OK, works on sane cases. Now check whether nonexistent headers
ba479fd2
NN
3695 # can be detected and how.
3696 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3697/* confdefs.h. */
3698_ACEOF
3699cat confdefs.h >>conftest.$ac_ext
3700cat >>conftest.$ac_ext <<_ACEOF
3701/* end confdefs.h. */
3702#include <ac_nonexistent.h>
3703_ACEOF
a6ccdbab
EC
3704if { (ac_try="$ac_cpp conftest.$ac_ext"
3705case "(($ac_try" in
3706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3707 *) ac_try_echo=$ac_try;;
3708esac
3709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3710 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
3711 ac_status=$?
3712 grep -v '^ *+' conftest.er1 >conftest.err
3713 rm -f conftest.er1
3714 cat conftest.err >&5
3715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
3716 (exit $ac_status); } >/dev/null && {
3717 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3718 test ! -s conftest.err
3719 }; then
ba479fd2
NN
3720 # Broken: success on invalid input.
3721continue
3722else
3723 echo "$as_me: failed program was:" >&5
3724sed 's/^/| /' conftest.$ac_ext >&5
3725
3726 # Passes both tests.
3727ac_preproc_ok=:
3728break
63cf211a 3729fi
a6ccdbab 3730
ba479fd2
NN
3731rm -f conftest.err conftest.$ac_ext
3732
3733done
3734# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3735rm -f conftest.err conftest.$ac_ext
3736if $ac_preproc_ok; then
3737 :
6e3f3080 3738else
ba479fd2
NN
3739 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3740See \`config.log' for more details." >&5
3741echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3742See \`config.log' for more details." >&2;}
3743 { (exit 1); exit 1; }; }
6e3f3080
NN
3744fi
3745
ba479fd2
NN
3746ac_ext=c
3747ac_cpp='$CPP $CPPFLAGS'
3748ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3749ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3750ac_compiler_gnu=$ac_cv_c_compiler_gnu
3751
b5472e1d 3752
a6ccdbab
EC
3753{ echo "$as_me:$LINENO: checking for inline" >&5
3754echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
ba479fd2
NN
3755if test "${ac_cv_c_inline+set}" = set; then
3756 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3757else
3758 ac_cv_c_inline=no
3759for ac_kw in inline __inline__ __inline; do
ba479fd2 3760 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3761/* confdefs.h. */
3762_ACEOF
3763cat confdefs.h >>conftest.$ac_ext
3764cat >>conftest.$ac_ext <<_ACEOF
3765/* end confdefs.h. */
3766#ifndef __cplusplus
3767typedef int foo_t;
3768static $ac_kw foo_t static_foo () {return 0; }
3769$ac_kw foo_t foo () {return 0; }
3770#endif
414d23ae 3771
ba479fd2
NN
3772_ACEOF
3773rm -f conftest.$ac_objext
a6ccdbab
EC
3774if { (ac_try="$ac_compile"
3775case "(($ac_try" in
3776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3777 *) ac_try_echo=$ac_try;;
3778esac
3779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3780 (eval "$ac_compile") 2>conftest.er1
ba479fd2 3781 ac_status=$?
86da66b5
HPN
3782 grep -v '^ *+' conftest.er1 >conftest.err
3783 rm -f conftest.er1
3784 cat conftest.err >&5
ba479fd2 3785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
3786 (exit $ac_status); } && {
3787 test -z "$ac_c_werror_flag" ||
3788 test ! -s conftest.err
3789 } && test -s conftest.$ac_objext; then
3790 ac_cv_c_inline=$ac_kw
414d23ae 3791else
ba479fd2
NN
3792 echo "$as_me: failed program was:" >&5
3793sed 's/^/| /' conftest.$ac_ext >&5
3794
a6ccdbab 3795
414d23ae 3796fi
a6ccdbab
EC
3797
3798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3799 test "$ac_cv_c_inline" != no && break
414d23ae
HPN
3800done
3801
3802fi
a6ccdbab
EC
3803{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3804echo "${ECHO_T}$ac_cv_c_inline" >&6; }
86da66b5
HPN
3805
3806
ba479fd2 3807case $ac_cv_c_inline in
414d23ae 3808 inline | yes) ;;
86da66b5
HPN
3809 *)
3810 case $ac_cv_c_inline in
3811 no) ac_val=;;
3812 *) ac_val=$ac_cv_c_inline;;
3813 esac
3814 cat >>confdefs.h <<_ACEOF
3815#ifndef __cplusplus
3816#define inline $ac_val
3817#endif
ba479fd2 3818_ACEOF
86da66b5 3819 ;;
414d23ae
HPN
3820esac
3821
414d23ae 3822
414d23ae 3823# sizeof(char) is 1 by definition.
bf3b7cd3 3824
a6ccdbab
EC
3825{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3826echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3827if test "${ac_cv_path_GREP+set}" = set; then
3828 echo $ECHO_N "(cached) $ECHO_C" >&6
3829else
3830 # Extract the first word of "grep ggrep" to use in msg output
3831if test -z "$GREP"; then
3832set dummy grep ggrep; ac_prog_name=$2
3833if test "${ac_cv_path_GREP+set}" = set; then
3834 echo $ECHO_N "(cached) $ECHO_C" >&6
3835else
3836 ac_path_GREP_found=false
3837# Loop through the user's path and test for each of PROGNAME-LIST
3838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3839for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3840do
3841 IFS=$as_save_IFS
3842 test -z "$as_dir" && as_dir=.
3843 for ac_prog in grep ggrep; do
3844 for ac_exec_ext in '' $ac_executable_extensions; do
3845 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3846 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3847 # Check for GNU ac_path_GREP and select it if it is found.
3848 # Check for GNU $ac_path_GREP
3849case `"$ac_path_GREP" --version 2>&1` in
3850*GNU*)
3851 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3852*)
3853 ac_count=0
3854 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3855 while :
3856 do
3857 cat "conftest.in" "conftest.in" >"conftest.tmp"
3858 mv "conftest.tmp" "conftest.in"
3859 cp "conftest.in" "conftest.nl"
3860 echo 'GREP' >> "conftest.nl"
3861 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3862 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3863 ac_count=`expr $ac_count + 1`
3864 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3865 # Best one so far, save it but keep looking for a better one
3866 ac_cv_path_GREP="$ac_path_GREP"
3867 ac_path_GREP_max=$ac_count
3868 fi
3869 # 10*(2^10) chars as input seems more than enough
3870 test $ac_count -gt 10 && break
3871 done
3872 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3873esac
3874
3875
3876 $ac_path_GREP_found && break 3
3877 done
3878done
3879
3880done
3881IFS=$as_save_IFS
3882
3883
3884fi
3885
3886GREP="$ac_cv_path_GREP"
3887if test -z "$GREP"; then
3888 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3889echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3890 { (exit 1); exit 1; }; }
3891fi
3892
3893else
3894 ac_cv_path_GREP=$GREP
3895fi
3896
3897
3898fi
3899{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3900echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3901 GREP="$ac_cv_path_GREP"
3902
3903
3904{ echo "$as_me:$LINENO: checking for egrep" >&5
3905echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3906if test "${ac_cv_path_EGREP+set}" = set; then
3907 echo $ECHO_N "(cached) $ECHO_C" >&6
3908else
3909 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3910 then ac_cv_path_EGREP="$GREP -E"
3911 else
3912 # Extract the first word of "egrep" to use in msg output
3913if test -z "$EGREP"; then
3914set dummy egrep; ac_prog_name=$2
3915if test "${ac_cv_path_EGREP+set}" = set; then
b8ec3cc8
EC
3916 echo $ECHO_N "(cached) $ECHO_C" >&6
3917else
a6ccdbab
EC
3918 ac_path_EGREP_found=false
3919# Loop through the user's path and test for each of PROGNAME-LIST
3920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3921for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3922do
3923 IFS=$as_save_IFS
3924 test -z "$as_dir" && as_dir=.
3925 for ac_prog in egrep; do
3926 for ac_exec_ext in '' $ac_executable_extensions; do
3927 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3928 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3929 # Check for GNU ac_path_EGREP and select it if it is found.
3930 # Check for GNU $ac_path_EGREP
3931case `"$ac_path_EGREP" --version 2>&1` in
3932*GNU*)
3933 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3934*)
3935 ac_count=0
3936 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3937 while :
3938 do
3939 cat "conftest.in" "conftest.in" >"conftest.tmp"
3940 mv "conftest.tmp" "conftest.in"
3941 cp "conftest.in" "conftest.nl"
3942 echo 'EGREP' >> "conftest.nl"
3943 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3944 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3945 ac_count=`expr $ac_count + 1`
3946 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3947 # Best one so far, save it but keep looking for a better one
3948 ac_cv_path_EGREP="$ac_path_EGREP"
3949 ac_path_EGREP_max=$ac_count
bf3b7cd3 3950 fi
a6ccdbab
EC
3951 # 10*(2^10) chars as input seems more than enough
3952 test $ac_count -gt 10 && break
3953 done
3954 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3955esac
3956
3957
3958 $ac_path_EGREP_found && break 3
3959 done
3960done
3961
3962done
3963IFS=$as_save_IFS
3964
3965
3966fi
3967
3968EGREP="$ac_cv_path_EGREP"
3969if test -z "$EGREP"; then
3970 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3971echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3972 { (exit 1); exit 1; }; }
3973fi
3974
3975else
3976 ac_cv_path_EGREP=$EGREP
3977fi
3978
3979
3980 fi
bf3b7cd3 3981fi
a6ccdbab
EC
3982{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3983echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3984 EGREP="$ac_cv_path_EGREP"
bf3b7cd3
JD
3985
3986
a6ccdbab
EC
3987{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3988echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
bf3b7cd3
JD
3989if test "${ac_cv_header_stdc+set}" = set; then
3990 echo $ECHO_N "(cached) $ECHO_C" >&6
3991else
3992 cat >conftest.$ac_ext <<_ACEOF
3993/* confdefs.h. */
3994_ACEOF
3995cat confdefs.h >>conftest.$ac_ext
3996cat >>conftest.$ac_ext <<_ACEOF
3997/* end confdefs.h. */
3998#include <stdlib.h>
3999#include <stdarg.h>
4000#include <string.h>
4001#include <float.h>
4002
4003int
4004main ()
4005{
4006
4007 ;
4008 return 0;
4009}
4010_ACEOF
4011rm -f conftest.$ac_objext
a6ccdbab
EC
4012if { (ac_try="$ac_compile"
4013case "(($ac_try" in
4014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4015 *) ac_try_echo=$ac_try;;
4016esac
4017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4018 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4019 ac_status=$?
4020 grep -v '^ *+' conftest.er1 >conftest.err
4021 rm -f conftest.er1
4022 cat conftest.err >&5
4023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
4024 (exit $ac_status); } && {
4025 test -z "$ac_c_werror_flag" ||
4026 test ! -s conftest.err
4027 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4028 ac_cv_header_stdc=yes
4029else
4030 echo "$as_me: failed program was:" >&5
4031sed 's/^/| /' conftest.$ac_ext >&5
4032
a6ccdbab 4033 ac_cv_header_stdc=no
bf3b7cd3 4034fi
a6ccdbab
EC
4035
4036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4037
4038if test $ac_cv_header_stdc = yes; then
4039 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4040 cat >conftest.$ac_ext <<_ACEOF
4041/* confdefs.h. */
4042_ACEOF
4043cat confdefs.h >>conftest.$ac_ext
4044cat >>conftest.$ac_ext <<_ACEOF
4045/* end confdefs.h. */
4046#include <string.h>
4047
4048_ACEOF
4049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4050 $EGREP "memchr" >/dev/null 2>&1; then
4051 :
4052else
4053 ac_cv_header_stdc=no
4054fi
4055rm -f conftest*
4056
4057fi
4058
4059if test $ac_cv_header_stdc = yes; then
4060 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4061 cat >conftest.$ac_ext <<_ACEOF
4062/* confdefs.h. */
4063_ACEOF
4064cat confdefs.h >>conftest.$ac_ext
4065cat >>conftest.$ac_ext <<_ACEOF
4066/* end confdefs.h. */
4067#include <stdlib.h>
4068
4069_ACEOF
4070if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4071 $EGREP "free" >/dev/null 2>&1; then
4072 :
4073else
4074 ac_cv_header_stdc=no
4075fi
4076rm -f conftest*
4077
4078fi
4079
4080if test $ac_cv_header_stdc = yes; then
4081 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4082 if test "$cross_compiling" = yes; then
4083 :
4084else
4085 cat >conftest.$ac_ext <<_ACEOF
4086/* confdefs.h. */
4087_ACEOF
4088cat confdefs.h >>conftest.$ac_ext
4089cat >>conftest.$ac_ext <<_ACEOF
4090/* end confdefs.h. */
4091#include <ctype.h>
a6ccdbab 4092#include <stdlib.h>
bf3b7cd3
JD
4093#if ((' ' & 0x0FF) == 0x020)
4094# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4095# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4096#else
4097# define ISLOWER(c) \
4098 (('a' <= (c) && (c) <= 'i') \
4099 || ('j' <= (c) && (c) <= 'r') \
4100 || ('s' <= (c) && (c) <= 'z'))
4101# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4102#endif
4103
4104#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4105int
4106main ()
4107{
4108 int i;
4109 for (i = 0; i < 256; i++)
4110 if (XOR (islower (i), ISLOWER (i))
4111 || toupper (i) != TOUPPER (i))
a6ccdbab
EC
4112 return 2;
4113 return 0;
bf3b7cd3
JD
4114}
4115_ACEOF
4116rm -f conftest$ac_exeext
a6ccdbab
EC
4117if { (ac_try="$ac_link"
4118case "(($ac_try" in
4119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4120 *) ac_try_echo=$ac_try;;
4121esac
4122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4123 (eval "$ac_link") 2>&5
bf3b7cd3
JD
4124 ac_status=$?
4125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4126 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a6ccdbab
EC
4127 { (case "(($ac_try" in
4128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4129 *) ac_try_echo=$ac_try;;
4130esac
4131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4132 (eval "$ac_try") 2>&5
bf3b7cd3
JD
4133 ac_status=$?
4134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4135 (exit $ac_status); }; }; then
4136 :
4137else
4138 echo "$as_me: program exited with status $ac_status" >&5
4139echo "$as_me: failed program was:" >&5
4140sed 's/^/| /' conftest.$ac_ext >&5
4141
4142( exit $ac_status )
4143ac_cv_header_stdc=no
4144fi
a6ccdbab 4145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4146fi
a6ccdbab
EC
4147
4148
bf3b7cd3
JD
4149fi
4150fi
a6ccdbab
EC
4151{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4152echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
bf3b7cd3
JD
4153if test $ac_cv_header_stdc = yes; then
4154
4155cat >>confdefs.h <<\_ACEOF
4156#define STDC_HEADERS 1
4157_ACEOF
4158
4159fi
4160
4161# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4172 inttypes.h stdint.h unistd.h
4173do
4174as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a6ccdbab
EC
4175{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4176echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4177if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
bf3b7cd3
JD
4178 echo $ECHO_N "(cached) $ECHO_C" >&6
4179else
4180 cat >conftest.$ac_ext <<_ACEOF
4181/* confdefs.h. */
4182_ACEOF
4183cat confdefs.h >>conftest.$ac_ext
4184cat >>conftest.$ac_ext <<_ACEOF
4185/* end confdefs.h. */
4186$ac_includes_default
4187
4188#include <$ac_header>
4189_ACEOF
4190rm -f conftest.$ac_objext
a6ccdbab
EC
4191if { (ac_try="$ac_compile"
4192case "(($ac_try" in
4193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4194 *) ac_try_echo=$ac_try;;
4195esac
4196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4197 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4198 ac_status=$?
4199 grep -v '^ *+' conftest.er1 >conftest.err
4200 rm -f conftest.er1
4201 cat conftest.err >&5
4202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
4203 (exit $ac_status); } && {
4204 test -z "$ac_c_werror_flag" ||
4205 test ! -s conftest.err
4206 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4207 eval "$as_ac_Header=yes"
4208else
4209 echo "$as_me: failed program was:" >&5
4210sed 's/^/| /' conftest.$ac_ext >&5
4211
a6ccdbab 4212 eval "$as_ac_Header=no"
bf3b7cd3 4213fi
a6ccdbab
EC
4214
4215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4216fi
a6ccdbab
EC
4217ac_res=`eval echo '${'$as_ac_Header'}'`
4218 { echo "$as_me:$LINENO: result: $ac_res" >&5
4219echo "${ECHO_T}$ac_res" >&6; }
bf3b7cd3
JD
4220if test `eval echo '${'$as_ac_Header'}'` = yes; then
4221 cat >>confdefs.h <<_ACEOF
4222#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4223_ACEOF
4224
4225fi
4226
4227done
4228
4229
a6ccdbab
EC
4230{ echo "$as_me:$LINENO: checking for void *" >&5
4231echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
bf3b7cd3
JD
4232if test "${ac_cv_type_void_p+set}" = set; then
4233 echo $ECHO_N "(cached) $ECHO_C" >&6
4234else
4235 cat >conftest.$ac_ext <<_ACEOF
4236/* confdefs.h. */
4237_ACEOF
4238cat confdefs.h >>conftest.$ac_ext
4239cat >>conftest.$ac_ext <<_ACEOF
4240/* end confdefs.h. */
4241$ac_includes_default
a6ccdbab 4242typedef void * ac__type_new_;
bf3b7cd3
JD
4243int
4244main ()
4245{
a6ccdbab 4246if ((ac__type_new_ *) 0)
bf3b7cd3 4247 return 0;
a6ccdbab 4248if (sizeof (ac__type_new_))
bf3b7cd3
JD
4249 return 0;
4250 ;
4251 return 0;
4252}
4253_ACEOF
4254rm -f conftest.$ac_objext
a6ccdbab
EC
4255if { (ac_try="$ac_compile"
4256case "(($ac_try" in
4257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4258 *) ac_try_echo=$ac_try;;
4259esac
4260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4261 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4262 ac_status=$?
4263 grep -v '^ *+' conftest.er1 >conftest.err
4264 rm -f conftest.er1
4265 cat conftest.err >&5
4266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
4267 (exit $ac_status); } && {
4268 test -z "$ac_c_werror_flag" ||
4269 test ! -s conftest.err
4270 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4271 ac_cv_type_void_p=yes
4272else
4273 echo "$as_me: failed program was:" >&5
4274sed 's/^/| /' conftest.$ac_ext >&5
4275
a6ccdbab 4276 ac_cv_type_void_p=no
bf3b7cd3 4277fi
a6ccdbab
EC
4278
4279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4280fi
a6ccdbab
EC
4281{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
4282echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
bf3b7cd3 4283
a6ccdbab
EC
4284# The cast to long int works around a bug in the HP C Compiler
4285# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4286# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4287# This bug is HP SR number 8606223364.
4288{ echo "$as_me:$LINENO: checking size of void *" >&5
4289echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
ba479fd2
NN
4290if test "${ac_cv_sizeof_void_p+set}" = set; then
4291 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 4292else
bf3b7cd3
JD
4293 if test "$cross_compiling" = yes; then
4294 # Depending upon the size, compute the lo and hi bounds.
4295cat >conftest.$ac_ext <<_ACEOF
4296/* confdefs.h. */
4297_ACEOF
4298cat confdefs.h >>conftest.$ac_ext
4299cat >>conftest.$ac_ext <<_ACEOF
4300/* end confdefs.h. */
4301$ac_includes_default
a6ccdbab 4302 typedef void * ac__type_sizeof_;
bf3b7cd3
JD
4303int
4304main ()
4305{
a6ccdbab 4306static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
bf3b7cd3
JD
4307test_array [0] = 0
4308
4309 ;
4310 return 0;
4311}
4312_ACEOF
4313rm -f conftest.$ac_objext
a6ccdbab
EC
4314if { (ac_try="$ac_compile"
4315case "(($ac_try" in
4316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4317 *) ac_try_echo=$ac_try;;
4318esac
4319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4320 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4321 ac_status=$?
4322 grep -v '^ *+' conftest.er1 >conftest.err
4323 rm -f conftest.er1
4324 cat conftest.err >&5
4325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
4326 (exit $ac_status); } && {
4327 test -z "$ac_c_werror_flag" ||
4328 test ! -s conftest.err
4329 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4330 ac_lo=0 ac_mid=0
4331 while :; do
4332 cat >conftest.$ac_ext <<_ACEOF
4333/* confdefs.h. */
4334_ACEOF
4335cat confdefs.h >>conftest.$ac_ext
4336cat >>conftest.$ac_ext <<_ACEOF
4337/* end confdefs.h. */
4338$ac_includes_default
a6ccdbab 4339 typedef void * ac__type_sizeof_;
bf3b7cd3
JD
4340int
4341main ()
4342{
a6ccdbab 4343static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
4344test_array [0] = 0
4345
4346 ;
4347 return 0;
4348}
4349_ACEOF
4350rm -f conftest.$ac_objext
a6ccdbab
EC
4351if { (ac_try="$ac_compile"
4352case "(($ac_try" in
4353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4354 *) ac_try_echo=$ac_try;;
4355esac
4356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4357 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4358 ac_status=$?
4359 grep -v '^ *+' conftest.er1 >conftest.err
4360 rm -f conftest.er1
4361 cat conftest.err >&5
4362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
4363 (exit $ac_status); } && {
4364 test -z "$ac_c_werror_flag" ||
4365 test ! -s conftest.err
4366 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4367 ac_hi=$ac_mid; break
4368else
4369 echo "$as_me: failed program was:" >&5
4370sed 's/^/| /' conftest.$ac_ext >&5
4371
a6ccdbab
EC
4372 ac_lo=`expr $ac_mid + 1`
4373 if test $ac_lo -le $ac_mid; then
4374 ac_lo= ac_hi=
4375 break
4376 fi
4377 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4378fi
a6ccdbab
EC
4379
4380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4381 done
4382else
4383 echo "$as_me: failed program was:" >&5
4384sed 's/^/| /' conftest.$ac_ext >&5
4385
a6ccdbab 4386 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4387/* confdefs.h. */
4388_ACEOF
4389cat confdefs.h >>conftest.$ac_ext
4390cat >>conftest.$ac_ext <<_ACEOF
4391/* end confdefs.h. */
4392$ac_includes_default
a6ccdbab 4393 typedef void * ac__type_sizeof_;
bf3b7cd3
JD
4394int
4395main ()
4396{
a6ccdbab 4397static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
bf3b7cd3
JD
4398test_array [0] = 0
4399
4400 ;
4401 return 0;
4402}
4403_ACEOF
4404rm -f conftest.$ac_objext
a6ccdbab
EC
4405if { (ac_try="$ac_compile"
4406case "(($ac_try" in
4407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4408 *) ac_try_echo=$ac_try;;
4409esac
4410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4411 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4412 ac_status=$?
4413 grep -v '^ *+' conftest.er1 >conftest.err
4414 rm -f conftest.er1
4415 cat conftest.err >&5
4416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
4417 (exit $ac_status); } && {
4418 test -z "$ac_c_werror_flag" ||
4419 test ! -s conftest.err
4420 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4421 ac_hi=-1 ac_mid=-1
4422 while :; do
4423 cat >conftest.$ac_ext <<_ACEOF
4424/* confdefs.h. */
4425_ACEOF
4426cat confdefs.h >>conftest.$ac_ext
4427cat >>conftest.$ac_ext <<_ACEOF
4428/* end confdefs.h. */
4429$ac_includes_default
a6ccdbab 4430 typedef void * ac__type_sizeof_;
bf3b7cd3
JD
4431int
4432main ()
4433{
a6ccdbab 4434static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
bf3b7cd3
JD
4435test_array [0] = 0
4436
4437 ;
4438 return 0;
4439}
4440_ACEOF
4441rm -f conftest.$ac_objext
a6ccdbab
EC
4442if { (ac_try="$ac_compile"
4443case "(($ac_try" in
4444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4445 *) ac_try_echo=$ac_try;;
4446esac
4447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4448 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4449 ac_status=$?
4450 grep -v '^ *+' conftest.er1 >conftest.err
4451 rm -f conftest.er1
4452 cat conftest.err >&5
4453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
4454 (exit $ac_status); } && {
4455 test -z "$ac_c_werror_flag" ||
4456 test ! -s conftest.err
4457 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4458 ac_lo=$ac_mid; break
4459else
4460 echo "$as_me: failed program was:" >&5
4461sed 's/^/| /' conftest.$ac_ext >&5
4462
a6ccdbab
EC
4463 ac_hi=`expr '(' $ac_mid ')' - 1`
4464 if test $ac_mid -le $ac_hi; then
4465 ac_lo= ac_hi=
4466 break
4467 fi
4468 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 4469fi
a6ccdbab
EC
4470
4471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4472 done
4473else
4474 echo "$as_me: failed program was:" >&5
4475sed 's/^/| /' conftest.$ac_ext >&5
4476
a6ccdbab 4477 ac_lo= ac_hi=
bf3b7cd3 4478fi
a6ccdbab
EC
4479
4480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4481fi
a6ccdbab
EC
4482
4483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4484# Binary search between lo and hi bounds.
4485while test "x$ac_lo" != "x$ac_hi"; do
4486 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4487 cat >conftest.$ac_ext <<_ACEOF
4488/* confdefs.h. */
4489_ACEOF
4490cat confdefs.h >>conftest.$ac_ext
4491cat >>conftest.$ac_ext <<_ACEOF
4492/* end confdefs.h. */
4493$ac_includes_default
a6ccdbab 4494 typedef void * ac__type_sizeof_;
bf3b7cd3
JD
4495int
4496main ()
4497{
a6ccdbab 4498static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
4499test_array [0] = 0
4500
4501 ;
4502 return 0;
4503}
4504_ACEOF
4505rm -f conftest.$ac_objext
a6ccdbab
EC
4506if { (ac_try="$ac_compile"
4507case "(($ac_try" in
4508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4509 *) ac_try_echo=$ac_try;;
4510esac
4511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4512 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4513 ac_status=$?
4514 grep -v '^ *+' conftest.er1 >conftest.err
4515 rm -f conftest.er1
4516 cat conftest.err >&5
4517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
4518 (exit $ac_status); } && {
4519 test -z "$ac_c_werror_flag" ||
4520 test ! -s conftest.err
4521 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4522 ac_hi=$ac_mid
4523else
4524 echo "$as_me: failed program was:" >&5
4525sed 's/^/| /' conftest.$ac_ext >&5
4526
a6ccdbab 4527 ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 4528fi
a6ccdbab
EC
4529
4530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4531done
4532case $ac_lo in
4533?*) ac_cv_sizeof_void_p=$ac_lo;;
a6ccdbab
EC
4534'') if test "$ac_cv_type_void_p" = yes; then
4535 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
bf3b7cd3 4536See \`config.log' for more details." >&5
a6ccdbab 4537echo "$as_me: error: cannot compute sizeof (void *)
bf3b7cd3 4538See \`config.log' for more details." >&2;}
a6ccdbab
EC
4539 { (exit 77); exit 77; }; }
4540 else
4541 ac_cv_sizeof_void_p=0
4542 fi ;;
bf3b7cd3 4543esac
bf3b7cd3
JD
4544else
4545 cat >conftest.$ac_ext <<_ACEOF
4546/* confdefs.h. */
4547_ACEOF
4548cat confdefs.h >>conftest.$ac_ext
4549cat >>conftest.$ac_ext <<_ACEOF
4550/* end confdefs.h. */
4551$ac_includes_default
a6ccdbab
EC
4552 typedef void * ac__type_sizeof_;
4553static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
4554static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
bf3b7cd3
JD
4555#include <stdio.h>
4556#include <stdlib.h>
4557int
4558main ()
4559{
4560
4561 FILE *f = fopen ("conftest.val", "w");
4562 if (! f)
a6ccdbab
EC
4563 return 1;
4564 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
bf3b7cd3 4565 {
a6ccdbab
EC
4566 long int i = longval ();
4567 if (i != ((long int) (sizeof (ac__type_sizeof_))))
4568 return 1;
bf3b7cd3
JD
4569 fprintf (f, "%ld\n", i);
4570 }
4571 else
4572 {
a6ccdbab
EC
4573 unsigned long int i = ulongval ();
4574 if (i != ((long int) (sizeof (ac__type_sizeof_))))
4575 return 1;
bf3b7cd3
JD
4576 fprintf (f, "%lu\n", i);
4577 }
a6ccdbab 4578 return ferror (f) || fclose (f) != 0;
bf3b7cd3
JD
4579
4580 ;
4581 return 0;
4582}
4583_ACEOF
4584rm -f conftest$ac_exeext
a6ccdbab
EC
4585if { (ac_try="$ac_link"
4586case "(($ac_try" in
4587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4588 *) ac_try_echo=$ac_try;;
4589esac
4590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4591 (eval "$ac_link") 2>&5
bf3b7cd3
JD
4592 ac_status=$?
4593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4594 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a6ccdbab
EC
4595 { (case "(($ac_try" in
4596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4597 *) ac_try_echo=$ac_try;;
4598esac
4599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4600 (eval "$ac_try") 2>&5
bf3b7cd3
JD
4601 ac_status=$?
4602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4603 (exit $ac_status); }; }; then
4604 ac_cv_sizeof_void_p=`cat conftest.val`
4605else
4606 echo "$as_me: program exited with status $ac_status" >&5
4607echo "$as_me: failed program was:" >&5
4608sed 's/^/| /' conftest.$ac_ext >&5
4609
4610( exit $ac_status )
a6ccdbab
EC
4611if test "$ac_cv_type_void_p" = yes; then
4612 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
bf3b7cd3 4613See \`config.log' for more details." >&5
a6ccdbab 4614echo "$as_me: error: cannot compute sizeof (void *)
bf3b7cd3 4615See \`config.log' for more details." >&2;}
a6ccdbab
EC
4616 { (exit 77); exit 77; }; }
4617 else
4618 ac_cv_sizeof_void_p=0
4619 fi
bf3b7cd3 4620fi
a6ccdbab 4621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4622fi
4623rm -f conftest.val
bf3b7cd3 4624fi
a6ccdbab
EC
4625{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
4626echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
4627
4628
4629
bf3b7cd3
JD
4630cat >>confdefs.h <<_ACEOF
4631#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4632_ACEOF
4633
4634
a6ccdbab
EC
4635{ echo "$as_me:$LINENO: checking for short" >&5
4636echo $ECHO_N "checking for short... $ECHO_C" >&6; }
bf3b7cd3
JD
4637if test "${ac_cv_type_short+set}" = set; then
4638 echo $ECHO_N "(cached) $ECHO_C" >&6
4639else
4640 cat >conftest.$ac_ext <<_ACEOF
4641/* confdefs.h. */
4642_ACEOF
4643cat confdefs.h >>conftest.$ac_ext
4644cat >>conftest.$ac_ext <<_ACEOF
4645/* end confdefs.h. */
4646$ac_includes_default
a6ccdbab 4647typedef short ac__type_new_;
bf3b7cd3
JD
4648int
4649main ()
4650{
a6ccdbab 4651if ((ac__type_new_ *) 0)
bf3b7cd3 4652 return 0;
a6ccdbab 4653if (sizeof (ac__type_new_))
bf3b7cd3
JD
4654 return 0;
4655 ;
4656 return 0;
4657}
4658_ACEOF
4659rm -f conftest.$ac_objext
a6ccdbab
EC
4660if { (ac_try="$ac_compile"
4661case "(($ac_try" in
4662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4663 *) ac_try_echo=$ac_try;;
4664esac
4665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4666 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4667 ac_status=$?
4668 grep -v '^ *+' conftest.er1 >conftest.err
4669 rm -f conftest.er1
4670 cat conftest.err >&5
4671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
4672 (exit $ac_status); } && {
4673 test -z "$ac_c_werror_flag" ||
4674 test ! -s conftest.err
4675 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4676 ac_cv_type_short=yes
4677else
4678 echo "$as_me: failed program was:" >&5
4679sed 's/^/| /' conftest.$ac_ext >&5
4680
a6ccdbab 4681 ac_cv_type_short=no
bf3b7cd3 4682fi
a6ccdbab
EC
4683
4684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4685fi
a6ccdbab
EC
4686{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
4687echo "${ECHO_T}$ac_cv_type_short" >&6; }
bf3b7cd3 4688
a6ccdbab
EC
4689# The cast to long int works around a bug in the HP C Compiler
4690# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4691# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4692# This bug is HP SR number 8606223364.
4693{ echo "$as_me:$LINENO: checking size of short" >&5
4694echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
bf3b7cd3
JD
4695if test "${ac_cv_sizeof_short+set}" = set; then
4696 echo $ECHO_N "(cached) $ECHO_C" >&6
4697else
bf3b7cd3
JD
4698 if test "$cross_compiling" = yes; then
4699 # Depending upon the size, compute the lo and hi bounds.
4700cat >conftest.$ac_ext <<_ACEOF
4701/* confdefs.h. */
4702_ACEOF
4703cat confdefs.h >>conftest.$ac_ext
4704cat >>conftest.$ac_ext <<_ACEOF
4705/* end confdefs.h. */
4706$ac_includes_default
a6ccdbab 4707 typedef short ac__type_sizeof_;
bf3b7cd3
JD
4708int
4709main ()
4710{
a6ccdbab 4711static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
bf3b7cd3
JD
4712test_array [0] = 0
4713
4714 ;
4715 return 0;
4716}
4717_ACEOF
4718rm -f conftest.$ac_objext
a6ccdbab
EC
4719if { (ac_try="$ac_compile"
4720case "(($ac_try" in
4721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4722 *) ac_try_echo=$ac_try;;
4723esac
4724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4725 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4726 ac_status=$?
4727 grep -v '^ *+' conftest.er1 >conftest.err
4728 rm -f conftest.er1
4729 cat conftest.err >&5
4730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
4731 (exit $ac_status); } && {
4732 test -z "$ac_c_werror_flag" ||
4733 test ! -s conftest.err
4734 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4735 ac_lo=0 ac_mid=0
4736 while :; do
4737 cat >conftest.$ac_ext <<_ACEOF
4738/* confdefs.h. */
4739_ACEOF
4740cat confdefs.h >>conftest.$ac_ext
4741cat >>conftest.$ac_ext <<_ACEOF
4742/* end confdefs.h. */
4743$ac_includes_default
a6ccdbab 4744 typedef short ac__type_sizeof_;
bf3b7cd3
JD
4745int
4746main ()
4747{
a6ccdbab 4748static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
4749test_array [0] = 0
4750
4751 ;
4752 return 0;
4753}
4754_ACEOF
4755rm -f conftest.$ac_objext
a6ccdbab
EC
4756if { (ac_try="$ac_compile"
4757case "(($ac_try" in
4758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4759 *) ac_try_echo=$ac_try;;
4760esac
4761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4762 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4763 ac_status=$?
4764 grep -v '^ *+' conftest.er1 >conftest.err
4765 rm -f conftest.er1
4766 cat conftest.err >&5
4767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
4768 (exit $ac_status); } && {
4769 test -z "$ac_c_werror_flag" ||
4770 test ! -s conftest.err
4771 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4772 ac_hi=$ac_mid; break
4773else
4774 echo "$as_me: failed program was:" >&5
4775sed 's/^/| /' conftest.$ac_ext >&5
4776
a6ccdbab
EC
4777 ac_lo=`expr $ac_mid + 1`
4778 if test $ac_lo -le $ac_mid; then
4779 ac_lo= ac_hi=
4780 break
4781 fi
4782 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4783fi
a6ccdbab
EC
4784
4785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4786 done
4787else
4788 echo "$as_me: failed program was:" >&5
4789sed 's/^/| /' conftest.$ac_ext >&5
4790
a6ccdbab 4791 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4792/* confdefs.h. */
4793_ACEOF
4794cat confdefs.h >>conftest.$ac_ext
4795cat >>conftest.$ac_ext <<_ACEOF
4796/* end confdefs.h. */
4797$ac_includes_default
a6ccdbab 4798 typedef short ac__type_sizeof_;
bf3b7cd3
JD
4799int
4800main ()
4801{
a6ccdbab 4802static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
bf3b7cd3
JD
4803test_array [0] = 0
4804
4805 ;
4806 return 0;
4807}
4808_ACEOF
4809rm -f conftest.$ac_objext
a6ccdbab
EC
4810if { (ac_try="$ac_compile"
4811case "(($ac_try" in
4812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4813 *) ac_try_echo=$ac_try;;
4814esac
4815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4816 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4817 ac_status=$?
4818 grep -v '^ *+' conftest.er1 >conftest.err
4819 rm -f conftest.er1
4820 cat conftest.err >&5
4821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
4822 (exit $ac_status); } && {
4823 test -z "$ac_c_werror_flag" ||
4824 test ! -s conftest.err
4825 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4826 ac_hi=-1 ac_mid=-1
4827 while :; do
4828 cat >conftest.$ac_ext <<_ACEOF
4829/* confdefs.h. */
4830_ACEOF
4831cat confdefs.h >>conftest.$ac_ext
4832cat >>conftest.$ac_ext <<_ACEOF
4833/* end confdefs.h. */
4834$ac_includes_default
a6ccdbab 4835 typedef short ac__type_sizeof_;
bf3b7cd3
JD
4836int
4837main ()
4838{
a6ccdbab 4839static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
bf3b7cd3
JD
4840test_array [0] = 0
4841
4842 ;
4843 return 0;
4844}
4845_ACEOF
4846rm -f conftest.$ac_objext
a6ccdbab
EC
4847if { (ac_try="$ac_compile"
4848case "(($ac_try" in
4849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4850 *) ac_try_echo=$ac_try;;
4851esac
4852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4853 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4854 ac_status=$?
4855 grep -v '^ *+' conftest.er1 >conftest.err
4856 rm -f conftest.er1
4857 cat conftest.err >&5
4858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
4859 (exit $ac_status); } && {
4860 test -z "$ac_c_werror_flag" ||
4861 test ! -s conftest.err
4862 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4863 ac_lo=$ac_mid; break
4864else
4865 echo "$as_me: failed program was:" >&5
4866sed 's/^/| /' conftest.$ac_ext >&5
4867
a6ccdbab
EC
4868 ac_hi=`expr '(' $ac_mid ')' - 1`
4869 if test $ac_mid -le $ac_hi; then
4870 ac_lo= ac_hi=
4871 break
4872 fi
4873 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 4874fi
a6ccdbab
EC
4875
4876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4877 done
4878else
4879 echo "$as_me: failed program was:" >&5
4880sed 's/^/| /' conftest.$ac_ext >&5
4881
a6ccdbab 4882 ac_lo= ac_hi=
bf3b7cd3 4883fi
a6ccdbab
EC
4884
4885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4886fi
a6ccdbab
EC
4887
4888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4889# Binary search between lo and hi bounds.
4890while test "x$ac_lo" != "x$ac_hi"; do
4891 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4892 cat >conftest.$ac_ext <<_ACEOF
4893/* confdefs.h. */
4894_ACEOF
4895cat confdefs.h >>conftest.$ac_ext
4896cat >>conftest.$ac_ext <<_ACEOF
4897/* end confdefs.h. */
4898$ac_includes_default
a6ccdbab 4899 typedef short ac__type_sizeof_;
bf3b7cd3
JD
4900int
4901main ()
4902{
a6ccdbab 4903static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
4904test_array [0] = 0
4905
4906 ;
4907 return 0;
4908}
4909_ACEOF
4910rm -f conftest.$ac_objext
a6ccdbab
EC
4911if { (ac_try="$ac_compile"
4912case "(($ac_try" in
4913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4914 *) ac_try_echo=$ac_try;;
4915esac
4916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4917 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4918 ac_status=$?
4919 grep -v '^ *+' conftest.er1 >conftest.err
4920 rm -f conftest.er1
4921 cat conftest.err >&5
4922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
4923 (exit $ac_status); } && {
4924 test -z "$ac_c_werror_flag" ||
4925 test ! -s conftest.err
4926 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4927 ac_hi=$ac_mid
4928else
4929 echo "$as_me: failed program was:" >&5
4930sed 's/^/| /' conftest.$ac_ext >&5
4931
a6ccdbab 4932 ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 4933fi
a6ccdbab
EC
4934
4935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4936done
4937case $ac_lo in
4938?*) ac_cv_sizeof_short=$ac_lo;;
a6ccdbab
EC
4939'') if test "$ac_cv_type_short" = yes; then
4940 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
bf3b7cd3 4941See \`config.log' for more details." >&5
a6ccdbab 4942echo "$as_me: error: cannot compute sizeof (short)
bf3b7cd3 4943See \`config.log' for more details." >&2;}
a6ccdbab
EC
4944 { (exit 77); exit 77; }; }
4945 else
4946 ac_cv_sizeof_short=0
4947 fi ;;
bf3b7cd3 4948esac
bf3b7cd3
JD
4949else
4950 cat >conftest.$ac_ext <<_ACEOF
4951/* confdefs.h. */
4952_ACEOF
4953cat confdefs.h >>conftest.$ac_ext
4954cat >>conftest.$ac_ext <<_ACEOF
4955/* end confdefs.h. */
4956$ac_includes_default
a6ccdbab
EC
4957 typedef short ac__type_sizeof_;
4958static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
4959static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
bf3b7cd3
JD
4960#include <stdio.h>
4961#include <stdlib.h>
4962int
4963main ()
4964{
4965
4966 FILE *f = fopen ("conftest.val", "w");
4967 if (! f)
a6ccdbab
EC
4968 return 1;
4969 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
bf3b7cd3 4970 {
a6ccdbab
EC
4971 long int i = longval ();
4972 if (i != ((long int) (sizeof (ac__type_sizeof_))))
4973 return 1;
bf3b7cd3
JD
4974 fprintf (f, "%ld\n", i);
4975 }
4976 else
4977 {
a6ccdbab
EC
4978 unsigned long int i = ulongval ();
4979 if (i != ((long int) (sizeof (ac__type_sizeof_))))
4980 return 1;
bf3b7cd3
JD
4981 fprintf (f, "%lu\n", i);
4982 }
a6ccdbab 4983 return ferror (f) || fclose (f) != 0;
bf3b7cd3
JD
4984
4985 ;
4986 return 0;
4987}
4988_ACEOF
4989rm -f conftest$ac_exeext
a6ccdbab
EC
4990if { (ac_try="$ac_link"
4991case "(($ac_try" in
4992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4993 *) ac_try_echo=$ac_try;;
4994esac
4995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4996 (eval "$ac_link") 2>&5
bf3b7cd3
JD
4997 ac_status=$?
4998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4999 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a6ccdbab
EC
5000 { (case "(($ac_try" in
5001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5002 *) ac_try_echo=$ac_try;;
5003esac
5004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5005 (eval "$ac_try") 2>&5
bf3b7cd3
JD
5006 ac_status=$?
5007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5008 (exit $ac_status); }; }; then
5009 ac_cv_sizeof_short=`cat conftest.val`
5010else
5011 echo "$as_me: program exited with status $ac_status" >&5
5012echo "$as_me: failed program was:" >&5
5013sed 's/^/| /' conftest.$ac_ext >&5
5014
5015( exit $ac_status )
a6ccdbab
EC
5016if test "$ac_cv_type_short" = yes; then
5017 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
bf3b7cd3 5018See \`config.log' for more details." >&5
a6ccdbab 5019echo "$as_me: error: cannot compute sizeof (short)
bf3b7cd3 5020See \`config.log' for more details." >&2;}
a6ccdbab
EC
5021 { (exit 77); exit 77; }; }
5022 else
5023 ac_cv_sizeof_short=0
5024 fi
bf3b7cd3 5025fi
a6ccdbab 5026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5027fi
5028rm -f conftest.val
bf3b7cd3 5029fi
a6ccdbab
EC
5030{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
5031echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
5032
5033
5034
bf3b7cd3
JD
5035cat >>confdefs.h <<_ACEOF
5036#define SIZEOF_SHORT $ac_cv_sizeof_short
5037_ACEOF
5038
5039
a6ccdbab
EC
5040{ echo "$as_me:$LINENO: checking for int" >&5
5041echo $ECHO_N "checking for int... $ECHO_C" >&6; }
bf3b7cd3
JD
5042if test "${ac_cv_type_int+set}" = set; then
5043 echo $ECHO_N "(cached) $ECHO_C" >&6
5044else
5045 cat >conftest.$ac_ext <<_ACEOF
5046/* confdefs.h. */
5047_ACEOF
5048cat confdefs.h >>conftest.$ac_ext
5049cat >>conftest.$ac_ext <<_ACEOF
5050/* end confdefs.h. */
5051$ac_includes_default
a6ccdbab 5052typedef int ac__type_new_;
bf3b7cd3
JD
5053int
5054main ()
5055{
a6ccdbab 5056if ((ac__type_new_ *) 0)
bf3b7cd3 5057 return 0;
a6ccdbab 5058if (sizeof (ac__type_new_))
bf3b7cd3
JD
5059 return 0;
5060 ;
5061 return 0;
5062}
5063_ACEOF
5064rm -f conftest.$ac_objext
a6ccdbab
EC
5065if { (ac_try="$ac_compile"
5066case "(($ac_try" in
5067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5068 *) ac_try_echo=$ac_try;;
5069esac
5070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5071 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5072 ac_status=$?
5073 grep -v '^ *+' conftest.er1 >conftest.err
5074 rm -f conftest.er1
5075 cat conftest.err >&5
5076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
5077 (exit $ac_status); } && {
5078 test -z "$ac_c_werror_flag" ||
5079 test ! -s conftest.err
5080 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5081 ac_cv_type_int=yes
5082else
5083 echo "$as_me: failed program was:" >&5
5084sed 's/^/| /' conftest.$ac_ext >&5
5085
a6ccdbab 5086 ac_cv_type_int=no
bf3b7cd3 5087fi
a6ccdbab
EC
5088
5089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5090fi
a6ccdbab
EC
5091{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5092echo "${ECHO_T}$ac_cv_type_int" >&6; }
bf3b7cd3 5093
a6ccdbab
EC
5094# The cast to long int works around a bug in the HP C Compiler
5095# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5096# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5097# This bug is HP SR number 8606223364.
5098{ echo "$as_me:$LINENO: checking size of int" >&5
5099echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
bf3b7cd3
JD
5100if test "${ac_cv_sizeof_int+set}" = set; then
5101 echo $ECHO_N "(cached) $ECHO_C" >&6
5102else
bf3b7cd3
JD
5103 if test "$cross_compiling" = yes; then
5104 # Depending upon the size, compute the lo and hi bounds.
5105cat >conftest.$ac_ext <<_ACEOF
5106/* confdefs.h. */
5107_ACEOF
5108cat confdefs.h >>conftest.$ac_ext
5109cat >>conftest.$ac_ext <<_ACEOF
5110/* end confdefs.h. */
5111$ac_includes_default
a6ccdbab 5112 typedef int ac__type_sizeof_;
bf3b7cd3
JD
5113int
5114main ()
5115{
a6ccdbab 5116static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
bf3b7cd3
JD
5117test_array [0] = 0
5118
5119 ;
5120 return 0;
5121}
5122_ACEOF
5123rm -f conftest.$ac_objext
a6ccdbab
EC
5124if { (ac_try="$ac_compile"
5125case "(($ac_try" in
5126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5127 *) ac_try_echo=$ac_try;;
5128esac
5129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5130 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5131 ac_status=$?
5132 grep -v '^ *+' conftest.er1 >conftest.err
5133 rm -f conftest.er1
5134 cat conftest.err >&5
5135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
5136 (exit $ac_status); } && {
5137 test -z "$ac_c_werror_flag" ||
5138 test ! -s conftest.err
5139 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5140 ac_lo=0 ac_mid=0
5141 while :; do
5142 cat >conftest.$ac_ext <<_ACEOF
5143/* confdefs.h. */
5144_ACEOF
5145cat confdefs.h >>conftest.$ac_ext
5146cat >>conftest.$ac_ext <<_ACEOF
5147/* end confdefs.h. */
5148$ac_includes_default
a6ccdbab 5149 typedef int ac__type_sizeof_;
bf3b7cd3
JD
5150int
5151main ()
5152{
a6ccdbab 5153static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
5154test_array [0] = 0
5155
5156 ;
5157 return 0;
5158}
5159_ACEOF
5160rm -f conftest.$ac_objext
a6ccdbab
EC
5161if { (ac_try="$ac_compile"
5162case "(($ac_try" in
5163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5164 *) ac_try_echo=$ac_try;;
5165esac
5166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5167 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5168 ac_status=$?
5169 grep -v '^ *+' conftest.er1 >conftest.err
5170 rm -f conftest.er1
5171 cat conftest.err >&5
5172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
5173 (exit $ac_status); } && {
5174 test -z "$ac_c_werror_flag" ||
5175 test ! -s conftest.err
5176 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5177 ac_hi=$ac_mid; break
5178else
5179 echo "$as_me: failed program was:" >&5
5180sed 's/^/| /' conftest.$ac_ext >&5
5181
a6ccdbab
EC
5182 ac_lo=`expr $ac_mid + 1`
5183 if test $ac_lo -le $ac_mid; then
5184 ac_lo= ac_hi=
5185 break
5186 fi
5187 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 5188fi
a6ccdbab
EC
5189
5190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5191 done
5192else
5193 echo "$as_me: failed program was:" >&5
5194sed 's/^/| /' conftest.$ac_ext >&5
5195
a6ccdbab 5196 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5197/* confdefs.h. */
5198_ACEOF
5199cat confdefs.h >>conftest.$ac_ext
5200cat >>conftest.$ac_ext <<_ACEOF
5201/* end confdefs.h. */
5202$ac_includes_default
a6ccdbab 5203 typedef int ac__type_sizeof_;
bf3b7cd3
JD
5204int
5205main ()
5206{
a6ccdbab 5207static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
bf3b7cd3
JD
5208test_array [0] = 0
5209
5210 ;
5211 return 0;
5212}
5213_ACEOF
5214rm -f conftest.$ac_objext
a6ccdbab
EC
5215if { (ac_try="$ac_compile"
5216case "(($ac_try" in
5217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5218 *) ac_try_echo=$ac_try;;
5219esac
5220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5221 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
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
a6ccdbab
EC
5227 (exit $ac_status); } && {
5228 test -z "$ac_c_werror_flag" ||
5229 test ! -s conftest.err
5230 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5231 ac_hi=-1 ac_mid=-1
5232 while :; do
5233 cat >conftest.$ac_ext <<_ACEOF
5234/* confdefs.h. */
5235_ACEOF
5236cat confdefs.h >>conftest.$ac_ext
5237cat >>conftest.$ac_ext <<_ACEOF
5238/* end confdefs.h. */
5239$ac_includes_default
a6ccdbab 5240 typedef int ac__type_sizeof_;
bf3b7cd3
JD
5241int
5242main ()
5243{
a6ccdbab 5244static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
bf3b7cd3
JD
5245test_array [0] = 0
5246
5247 ;
5248 return 0;
5249}
5250_ACEOF
5251rm -f conftest.$ac_objext
a6ccdbab
EC
5252if { (ac_try="$ac_compile"
5253case "(($ac_try" in
5254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5255 *) ac_try_echo=$ac_try;;
5256esac
5257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5258 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5259 ac_status=$?
5260 grep -v '^ *+' conftest.er1 >conftest.err
5261 rm -f conftest.er1
5262 cat conftest.err >&5
5263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
5264 (exit $ac_status); } && {
5265 test -z "$ac_c_werror_flag" ||
5266 test ! -s conftest.err
5267 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5268 ac_lo=$ac_mid; break
5269else
5270 echo "$as_me: failed program was:" >&5
5271sed 's/^/| /' conftest.$ac_ext >&5
5272
a6ccdbab
EC
5273 ac_hi=`expr '(' $ac_mid ')' - 1`
5274 if test $ac_mid -le $ac_hi; then
5275 ac_lo= ac_hi=
5276 break
5277 fi
5278 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5279fi
a6ccdbab
EC
5280
5281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5282 done
5283else
5284 echo "$as_me: failed program was:" >&5
5285sed 's/^/| /' conftest.$ac_ext >&5
5286
a6ccdbab 5287 ac_lo= ac_hi=
bf3b7cd3 5288fi
a6ccdbab
EC
5289
5290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5291fi
a6ccdbab
EC
5292
5293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5294# Binary search between lo and hi bounds.
5295while test "x$ac_lo" != "x$ac_hi"; do
5296 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5297 cat >conftest.$ac_ext <<_ACEOF
5298/* confdefs.h. */
5299_ACEOF
5300cat confdefs.h >>conftest.$ac_ext
5301cat >>conftest.$ac_ext <<_ACEOF
5302/* end confdefs.h. */
5303$ac_includes_default
a6ccdbab 5304 typedef int ac__type_sizeof_;
bf3b7cd3
JD
5305int
5306main ()
5307{
a6ccdbab 5308static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
5309test_array [0] = 0
5310
5311 ;
5312 return 0;
5313}
5314_ACEOF
5315rm -f conftest.$ac_objext
a6ccdbab
EC
5316if { (ac_try="$ac_compile"
5317case "(($ac_try" in
5318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5319 *) ac_try_echo=$ac_try;;
5320esac
5321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5322 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5323 ac_status=$?
5324 grep -v '^ *+' conftest.er1 >conftest.err
5325 rm -f conftest.er1
5326 cat conftest.err >&5
5327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
5328 (exit $ac_status); } && {
5329 test -z "$ac_c_werror_flag" ||
5330 test ! -s conftest.err
5331 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5332 ac_hi=$ac_mid
5333else
5334 echo "$as_me: failed program was:" >&5
5335sed 's/^/| /' conftest.$ac_ext >&5
5336
a6ccdbab 5337 ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5338fi
a6ccdbab
EC
5339
5340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5341done
5342case $ac_lo in
5343?*) ac_cv_sizeof_int=$ac_lo;;
a6ccdbab
EC
5344'') if test "$ac_cv_type_int" = yes; then
5345 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
bf3b7cd3 5346See \`config.log' for more details." >&5
a6ccdbab 5347echo "$as_me: error: cannot compute sizeof (int)
bf3b7cd3 5348See \`config.log' for more details." >&2;}
a6ccdbab
EC
5349 { (exit 77); exit 77; }; }
5350 else
5351 ac_cv_sizeof_int=0
5352 fi ;;
bf3b7cd3 5353esac
bf3b7cd3
JD
5354else
5355 cat >conftest.$ac_ext <<_ACEOF
5356/* confdefs.h. */
5357_ACEOF
5358cat confdefs.h >>conftest.$ac_ext
5359cat >>conftest.$ac_ext <<_ACEOF
5360/* end confdefs.h. */
5361$ac_includes_default
a6ccdbab
EC
5362 typedef int ac__type_sizeof_;
5363static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
5364static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
bf3b7cd3
JD
5365#include <stdio.h>
5366#include <stdlib.h>
5367int
5368main ()
5369{
5370
5371 FILE *f = fopen ("conftest.val", "w");
5372 if (! f)
a6ccdbab
EC
5373 return 1;
5374 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
bf3b7cd3 5375 {
a6ccdbab
EC
5376 long int i = longval ();
5377 if (i != ((long int) (sizeof (ac__type_sizeof_))))
5378 return 1;
bf3b7cd3
JD
5379 fprintf (f, "%ld\n", i);
5380 }
5381 else
5382 {
a6ccdbab
EC
5383 unsigned long int i = ulongval ();
5384 if (i != ((long int) (sizeof (ac__type_sizeof_))))
5385 return 1;
bf3b7cd3
JD
5386 fprintf (f, "%lu\n", i);
5387 }
a6ccdbab 5388 return ferror (f) || fclose (f) != 0;
bf3b7cd3
JD
5389
5390 ;
5391 return 0;
5392}
5393_ACEOF
5394rm -f conftest$ac_exeext
a6ccdbab
EC
5395if { (ac_try="$ac_link"
5396case "(($ac_try" in
5397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5398 *) ac_try_echo=$ac_try;;
5399esac
5400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5401 (eval "$ac_link") 2>&5
bf3b7cd3
JD
5402 ac_status=$?
5403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5404 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a6ccdbab
EC
5405 { (case "(($ac_try" in
5406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5407 *) ac_try_echo=$ac_try;;
5408esac
5409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5410 (eval "$ac_try") 2>&5
bf3b7cd3
JD
5411 ac_status=$?
5412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5413 (exit $ac_status); }; }; then
5414 ac_cv_sizeof_int=`cat conftest.val`
5415else
5416 echo "$as_me: program exited with status $ac_status" >&5
5417echo "$as_me: failed program was:" >&5
5418sed 's/^/| /' conftest.$ac_ext >&5
5419
5420( exit $ac_status )
a6ccdbab
EC
5421if test "$ac_cv_type_int" = yes; then
5422 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
bf3b7cd3 5423See \`config.log' for more details." >&5
a6ccdbab 5424echo "$as_me: error: cannot compute sizeof (int)
bf3b7cd3 5425See \`config.log' for more details." >&2;}
a6ccdbab
EC
5426 { (exit 77); exit 77; }; }
5427 else
5428 ac_cv_sizeof_int=0
5429 fi
bf3b7cd3 5430fi
a6ccdbab 5431rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5432fi
5433rm -f conftest.val
bf3b7cd3 5434fi
a6ccdbab
EC
5435{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5436echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
5437
5438
5439
bf3b7cd3
JD
5440cat >>confdefs.h <<_ACEOF
5441#define SIZEOF_INT $ac_cv_sizeof_int
5442_ACEOF
5443
5444
a6ccdbab
EC
5445{ echo "$as_me:$LINENO: checking for long" >&5
5446echo $ECHO_N "checking for long... $ECHO_C" >&6; }
bf3b7cd3
JD
5447if test "${ac_cv_type_long+set}" = set; then
5448 echo $ECHO_N "(cached) $ECHO_C" >&6
5449else
5450 cat >conftest.$ac_ext <<_ACEOF
5451/* confdefs.h. */
5452_ACEOF
5453cat confdefs.h >>conftest.$ac_ext
5454cat >>conftest.$ac_ext <<_ACEOF
5455/* end confdefs.h. */
5456$ac_includes_default
a6ccdbab 5457typedef long ac__type_new_;
bf3b7cd3
JD
5458int
5459main ()
5460{
a6ccdbab 5461if ((ac__type_new_ *) 0)
bf3b7cd3 5462 return 0;
a6ccdbab 5463if (sizeof (ac__type_new_))
bf3b7cd3
JD
5464 return 0;
5465 ;
5466 return 0;
5467}
5468_ACEOF
5469rm -f conftest.$ac_objext
a6ccdbab
EC
5470if { (ac_try="$ac_compile"
5471case "(($ac_try" in
5472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5473 *) ac_try_echo=$ac_try;;
5474esac
5475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5476 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5477 ac_status=$?
5478 grep -v '^ *+' conftest.er1 >conftest.err
5479 rm -f conftest.er1
5480 cat conftest.err >&5
5481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
5482 (exit $ac_status); } && {
5483 test -z "$ac_c_werror_flag" ||
5484 test ! -s conftest.err
5485 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5486 ac_cv_type_long=yes
5487else
5488 echo "$as_me: failed program was:" >&5
5489sed 's/^/| /' conftest.$ac_ext >&5
5490
a6ccdbab 5491 ac_cv_type_long=no
bf3b7cd3 5492fi
a6ccdbab
EC
5493
5494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5495fi
a6ccdbab
EC
5496{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5497echo "${ECHO_T}$ac_cv_type_long" >&6; }
bf3b7cd3 5498
a6ccdbab
EC
5499# The cast to long int works around a bug in the HP C Compiler
5500# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5501# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5502# This bug is HP SR number 8606223364.
5503{ echo "$as_me:$LINENO: checking size of long" >&5
5504echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
bf3b7cd3
JD
5505if test "${ac_cv_sizeof_long+set}" = set; then
5506 echo $ECHO_N "(cached) $ECHO_C" >&6
5507else
bf3b7cd3
JD
5508 if test "$cross_compiling" = yes; then
5509 # Depending upon the size, compute the lo and hi bounds.
5510cat >conftest.$ac_ext <<_ACEOF
5511/* confdefs.h. */
5512_ACEOF
5513cat confdefs.h >>conftest.$ac_ext
5514cat >>conftest.$ac_ext <<_ACEOF
5515/* end confdefs.h. */
5516$ac_includes_default
a6ccdbab 5517 typedef long ac__type_sizeof_;
bf3b7cd3
JD
5518int
5519main ()
5520{
a6ccdbab 5521static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
bf3b7cd3
JD
5522test_array [0] = 0
5523
5524 ;
5525 return 0;
5526}
5527_ACEOF
5528rm -f conftest.$ac_objext
a6ccdbab
EC
5529if { (ac_try="$ac_compile"
5530case "(($ac_try" in
5531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5532 *) ac_try_echo=$ac_try;;
5533esac
5534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5535 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5536 ac_status=$?
5537 grep -v '^ *+' conftest.er1 >conftest.err
5538 rm -f conftest.er1
5539 cat conftest.err >&5
5540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
5541 (exit $ac_status); } && {
5542 test -z "$ac_c_werror_flag" ||
5543 test ! -s conftest.err
5544 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5545 ac_lo=0 ac_mid=0
5546 while :; do
5547 cat >conftest.$ac_ext <<_ACEOF
5548/* confdefs.h. */
5549_ACEOF
5550cat confdefs.h >>conftest.$ac_ext
5551cat >>conftest.$ac_ext <<_ACEOF
5552/* end confdefs.h. */
5553$ac_includes_default
a6ccdbab 5554 typedef long ac__type_sizeof_;
bf3b7cd3
JD
5555int
5556main ()
5557{
a6ccdbab 5558static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
5559test_array [0] = 0
5560
5561 ;
5562 return 0;
5563}
5564_ACEOF
5565rm -f conftest.$ac_objext
a6ccdbab
EC
5566if { (ac_try="$ac_compile"
5567case "(($ac_try" in
5568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5569 *) ac_try_echo=$ac_try;;
5570esac
5571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5572 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5573 ac_status=$?
5574 grep -v '^ *+' conftest.er1 >conftest.err
5575 rm -f conftest.er1
5576 cat conftest.err >&5
5577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
5578 (exit $ac_status); } && {
5579 test -z "$ac_c_werror_flag" ||
5580 test ! -s conftest.err
5581 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5582 ac_hi=$ac_mid; break
5583else
5584 echo "$as_me: failed program was:" >&5
5585sed 's/^/| /' conftest.$ac_ext >&5
5586
a6ccdbab
EC
5587 ac_lo=`expr $ac_mid + 1`
5588 if test $ac_lo -le $ac_mid; then
5589 ac_lo= ac_hi=
5590 break
5591 fi
5592 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 5593fi
a6ccdbab
EC
5594
5595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5596 done
5597else
5598 echo "$as_me: failed program was:" >&5
5599sed 's/^/| /' conftest.$ac_ext >&5
5600
a6ccdbab 5601 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5602/* confdefs.h. */
5603_ACEOF
5604cat confdefs.h >>conftest.$ac_ext
5605cat >>conftest.$ac_ext <<_ACEOF
5606/* end confdefs.h. */
5607$ac_includes_default
a6ccdbab 5608 typedef long ac__type_sizeof_;
bf3b7cd3
JD
5609int
5610main ()
5611{
a6ccdbab 5612static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
bf3b7cd3
JD
5613test_array [0] = 0
5614
5615 ;
5616 return 0;
5617}
5618_ACEOF
5619rm -f conftest.$ac_objext
a6ccdbab
EC
5620if { (ac_try="$ac_compile"
5621case "(($ac_try" in
5622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5623 *) ac_try_echo=$ac_try;;
5624esac
5625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5626 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5627 ac_status=$?
5628 grep -v '^ *+' conftest.er1 >conftest.err
5629 rm -f conftest.er1
5630 cat conftest.err >&5
5631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
5632 (exit $ac_status); } && {
5633 test -z "$ac_c_werror_flag" ||
5634 test ! -s conftest.err
5635 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5636 ac_hi=-1 ac_mid=-1
5637 while :; do
5638 cat >conftest.$ac_ext <<_ACEOF
5639/* confdefs.h. */
5640_ACEOF
5641cat confdefs.h >>conftest.$ac_ext
5642cat >>conftest.$ac_ext <<_ACEOF
5643/* end confdefs.h. */
5644$ac_includes_default
a6ccdbab 5645 typedef long ac__type_sizeof_;
bf3b7cd3
JD
5646int
5647main ()
5648{
a6ccdbab 5649static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
bf3b7cd3
JD
5650test_array [0] = 0
5651
5652 ;
5653 return 0;
5654}
5655_ACEOF
5656rm -f conftest.$ac_objext
a6ccdbab
EC
5657if { (ac_try="$ac_compile"
5658case "(($ac_try" in
5659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5660 *) ac_try_echo=$ac_try;;
5661esac
5662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5663 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5664 ac_status=$?
5665 grep -v '^ *+' conftest.er1 >conftest.err
5666 rm -f conftest.er1
5667 cat conftest.err >&5
5668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
5669 (exit $ac_status); } && {
5670 test -z "$ac_c_werror_flag" ||
5671 test ! -s conftest.err
5672 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5673 ac_lo=$ac_mid; break
5674else
5675 echo "$as_me: failed program was:" >&5
5676sed 's/^/| /' conftest.$ac_ext >&5
5677
a6ccdbab
EC
5678 ac_hi=`expr '(' $ac_mid ')' - 1`
5679 if test $ac_mid -le $ac_hi; then
5680 ac_lo= ac_hi=
5681 break
5682 fi
5683 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5684fi
a6ccdbab
EC
5685
5686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5687 done
5688else
5689 echo "$as_me: failed program was:" >&5
5690sed 's/^/| /' conftest.$ac_ext >&5
5691
a6ccdbab 5692 ac_lo= ac_hi=
bf3b7cd3 5693fi
a6ccdbab
EC
5694
5695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5696fi
a6ccdbab
EC
5697
5698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5699# Binary search between lo and hi bounds.
5700while test "x$ac_lo" != "x$ac_hi"; do
5701 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5702 cat >conftest.$ac_ext <<_ACEOF
5703/* confdefs.h. */
5704_ACEOF
5705cat confdefs.h >>conftest.$ac_ext
5706cat >>conftest.$ac_ext <<_ACEOF
5707/* end confdefs.h. */
5708$ac_includes_default
a6ccdbab 5709 typedef long ac__type_sizeof_;
bf3b7cd3
JD
5710int
5711main ()
5712{
a6ccdbab 5713static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
5714test_array [0] = 0
5715
5716 ;
5717 return 0;
5718}
5719_ACEOF
5720rm -f conftest.$ac_objext
a6ccdbab
EC
5721if { (ac_try="$ac_compile"
5722case "(($ac_try" in
5723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5724 *) ac_try_echo=$ac_try;;
5725esac
5726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5727 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5728 ac_status=$?
5729 grep -v '^ *+' conftest.er1 >conftest.err
5730 rm -f conftest.er1
5731 cat conftest.err >&5
5732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
5733 (exit $ac_status); } && {
5734 test -z "$ac_c_werror_flag" ||
5735 test ! -s conftest.err
5736 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5737 ac_hi=$ac_mid
5738else
5739 echo "$as_me: failed program was:" >&5
5740sed 's/^/| /' conftest.$ac_ext >&5
5741
a6ccdbab 5742 ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5743fi
a6ccdbab
EC
5744
5745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5746done
5747case $ac_lo in
5748?*) ac_cv_sizeof_long=$ac_lo;;
a6ccdbab
EC
5749'') if test "$ac_cv_type_long" = yes; then
5750 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
bf3b7cd3 5751See \`config.log' for more details." >&5
a6ccdbab 5752echo "$as_me: error: cannot compute sizeof (long)
bf3b7cd3 5753See \`config.log' for more details." >&2;}
a6ccdbab
EC
5754 { (exit 77); exit 77; }; }
5755 else
5756 ac_cv_sizeof_long=0
5757 fi ;;
bf3b7cd3 5758esac
bf3b7cd3
JD
5759else
5760 cat >conftest.$ac_ext <<_ACEOF
5761/* confdefs.h. */
5762_ACEOF
5763cat confdefs.h >>conftest.$ac_ext
5764cat >>conftest.$ac_ext <<_ACEOF
5765/* end confdefs.h. */
5766$ac_includes_default
a6ccdbab
EC
5767 typedef long ac__type_sizeof_;
5768static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
5769static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
bf3b7cd3
JD
5770#include <stdio.h>
5771#include <stdlib.h>
5772int
5773main ()
5774{
5775
5776 FILE *f = fopen ("conftest.val", "w");
5777 if (! f)
a6ccdbab
EC
5778 return 1;
5779 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
bf3b7cd3 5780 {
a6ccdbab
EC
5781 long int i = longval ();
5782 if (i != ((long int) (sizeof (ac__type_sizeof_))))
5783 return 1;
bf3b7cd3
JD
5784 fprintf (f, "%ld\n", i);
5785 }
5786 else
5787 {
a6ccdbab
EC
5788 unsigned long int i = ulongval ();
5789 if (i != ((long int) (sizeof (ac__type_sizeof_))))
5790 return 1;
bf3b7cd3
JD
5791 fprintf (f, "%lu\n", i);
5792 }
a6ccdbab 5793 return ferror (f) || fclose (f) != 0;
bf3b7cd3
JD
5794
5795 ;
5796 return 0;
5797}
5798_ACEOF
5799rm -f conftest$ac_exeext
a6ccdbab
EC
5800if { (ac_try="$ac_link"
5801case "(($ac_try" in
5802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5803 *) ac_try_echo=$ac_try;;
5804esac
5805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5806 (eval "$ac_link") 2>&5
bf3b7cd3
JD
5807 ac_status=$?
5808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5809 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a6ccdbab
EC
5810 { (case "(($ac_try" in
5811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5812 *) ac_try_echo=$ac_try;;
5813esac
5814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5815 (eval "$ac_try") 2>&5
bf3b7cd3
JD
5816 ac_status=$?
5817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5818 (exit $ac_status); }; }; then
5819 ac_cv_sizeof_long=`cat conftest.val`
5820else
5821 echo "$as_me: program exited with status $ac_status" >&5
5822echo "$as_me: failed program was:" >&5
5823sed 's/^/| /' conftest.$ac_ext >&5
5824
5825( exit $ac_status )
a6ccdbab
EC
5826if test "$ac_cv_type_long" = yes; then
5827 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
bf3b7cd3 5828See \`config.log' for more details." >&5
a6ccdbab 5829echo "$as_me: error: cannot compute sizeof (long)
bf3b7cd3 5830See \`config.log' for more details." >&2;}
a6ccdbab
EC
5831 { (exit 77); exit 77; }; }
5832 else
5833 ac_cv_sizeof_long=0
5834 fi
bf3b7cd3 5835fi
a6ccdbab 5836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5837fi
5838rm -f conftest.val
bf3b7cd3 5839fi
a6ccdbab
EC
5840{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5841echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
5842
5843
5844
bf3b7cd3
JD
5845cat >>confdefs.h <<_ACEOF
5846#define SIZEOF_LONG $ac_cv_sizeof_long
5847_ACEOF
5848
5849
a6ccdbab
EC
5850{ echo "$as_me:$LINENO: checking for long long" >&5
5851echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
5ec1c5e6
KC
5852if test "${ac_cv_type_long_long+set}" = set; then
5853 echo $ECHO_N "(cached) $ECHO_C" >&6
5854else
5855 cat >conftest.$ac_ext <<_ACEOF
5856/* confdefs.h. */
5857_ACEOF
5858cat confdefs.h >>conftest.$ac_ext
5859cat >>conftest.$ac_ext <<_ACEOF
5860/* end confdefs.h. */
5861$ac_includes_default
a6ccdbab 5862typedef long long ac__type_new_;
5ec1c5e6
KC
5863int
5864main ()
5865{
a6ccdbab 5866if ((ac__type_new_ *) 0)
5ec1c5e6 5867 return 0;
a6ccdbab 5868if (sizeof (ac__type_new_))
5ec1c5e6
KC
5869 return 0;
5870 ;
5871 return 0;
5872}
5873_ACEOF
5874rm -f conftest.$ac_objext
a6ccdbab
EC
5875if { (ac_try="$ac_compile"
5876case "(($ac_try" in
5877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5878 *) ac_try_echo=$ac_try;;
5879esac
5880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5881 (eval "$ac_compile") 2>conftest.er1
5ec1c5e6
KC
5882 ac_status=$?
5883 grep -v '^ *+' conftest.er1 >conftest.err
5884 rm -f conftest.er1
5885 cat conftest.err >&5
5886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
5887 (exit $ac_status); } && {
5888 test -z "$ac_c_werror_flag" ||
5889 test ! -s conftest.err
5890 } && test -s conftest.$ac_objext; then
5ec1c5e6
KC
5891 ac_cv_type_long_long=yes
5892else
5893 echo "$as_me: failed program was:" >&5
5894sed 's/^/| /' conftest.$ac_ext >&5
5895
a6ccdbab 5896 ac_cv_type_long_long=no
5ec1c5e6 5897fi
a6ccdbab
EC
5898
5899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 5900fi
a6ccdbab
EC
5901{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5902echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
5ec1c5e6
KC
5903if test $ac_cv_type_long_long = yes; then
5904
5905cat >>confdefs.h <<_ACEOF
5906#define HAVE_LONG_LONG 1
5907_ACEOF
5908
a6ccdbab
EC
5909{ echo "$as_me:$LINENO: checking for long long" >&5
5910echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
bf3b7cd3
JD
5911if test "${ac_cv_type_long_long+set}" = set; then
5912 echo $ECHO_N "(cached) $ECHO_C" >&6
5913else
5914 cat >conftest.$ac_ext <<_ACEOF
5915/* confdefs.h. */
5916_ACEOF
5917cat confdefs.h >>conftest.$ac_ext
5918cat >>conftest.$ac_ext <<_ACEOF
5919/* end confdefs.h. */
5920$ac_includes_default
a6ccdbab 5921typedef long long ac__type_new_;
bf3b7cd3
JD
5922int
5923main ()
5924{
a6ccdbab 5925if ((ac__type_new_ *) 0)
bf3b7cd3 5926 return 0;
a6ccdbab 5927if (sizeof (ac__type_new_))
bf3b7cd3
JD
5928 return 0;
5929 ;
5930 return 0;
5931}
5932_ACEOF
5933rm -f conftest.$ac_objext
a6ccdbab
EC
5934if { (ac_try="$ac_compile"
5935case "(($ac_try" in
5936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5937 *) ac_try_echo=$ac_try;;
5938esac
5939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5940 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5941 ac_status=$?
5942 grep -v '^ *+' conftest.er1 >conftest.err
5943 rm -f conftest.er1
5944 cat conftest.err >&5
5945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
5946 (exit $ac_status); } && {
5947 test -z "$ac_c_werror_flag" ||
5948 test ! -s conftest.err
5949 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5950 ac_cv_type_long_long=yes
5951else
5952 echo "$as_me: failed program was:" >&5
5953sed 's/^/| /' conftest.$ac_ext >&5
5954
a6ccdbab 5955 ac_cv_type_long_long=no
bf3b7cd3 5956fi
a6ccdbab
EC
5957
5958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5959fi
a6ccdbab
EC
5960{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5961echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
bf3b7cd3 5962
a6ccdbab
EC
5963# The cast to long int works around a bug in the HP C Compiler
5964# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5965# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5966# This bug is HP SR number 8606223364.
5967{ echo "$as_me:$LINENO: checking size of long long" >&5
5968echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
bf3b7cd3
JD
5969if test "${ac_cv_sizeof_long_long+set}" = set; then
5970 echo $ECHO_N "(cached) $ECHO_C" >&6
5971else
bf3b7cd3
JD
5972 if test "$cross_compiling" = yes; then
5973 # Depending upon the size, compute the lo and hi bounds.
5974cat >conftest.$ac_ext <<_ACEOF
5975/* confdefs.h. */
5976_ACEOF
5977cat confdefs.h >>conftest.$ac_ext
5978cat >>conftest.$ac_ext <<_ACEOF
5979/* end confdefs.h. */
5980$ac_includes_default
a6ccdbab 5981 typedef long long ac__type_sizeof_;
bf3b7cd3
JD
5982int
5983main ()
5984{
a6ccdbab 5985static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
bf3b7cd3
JD
5986test_array [0] = 0
5987
5988 ;
5989 return 0;
5990}
5991_ACEOF
5992rm -f conftest.$ac_objext
a6ccdbab
EC
5993if { (ac_try="$ac_compile"
5994case "(($ac_try" in
5995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5996 *) ac_try_echo=$ac_try;;
5997esac
5998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5999 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
6000 ac_status=$?
6001 grep -v '^ *+' conftest.er1 >conftest.err
6002 rm -f conftest.er1
6003 cat conftest.err >&5
6004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
6005 (exit $ac_status); } && {
6006 test -z "$ac_c_werror_flag" ||
6007 test ! -s conftest.err
6008 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
6009 ac_lo=0 ac_mid=0
6010 while :; do
6011 cat >conftest.$ac_ext <<_ACEOF
6012/* confdefs.h. */
6013_ACEOF
6014cat confdefs.h >>conftest.$ac_ext
6015cat >>conftest.$ac_ext <<_ACEOF
6016/* end confdefs.h. */
6017$ac_includes_default
a6ccdbab 6018 typedef long long ac__type_sizeof_;
bf3b7cd3
JD
6019int
6020main ()
6021{
a6ccdbab 6022static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
6023test_array [0] = 0
6024
6025 ;
6026 return 0;
6027}
6028_ACEOF
6029rm -f conftest.$ac_objext
a6ccdbab
EC
6030if { (ac_try="$ac_compile"
6031case "(($ac_try" in
6032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6033 *) ac_try_echo=$ac_try;;
6034esac
6035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6036 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
6037 ac_status=$?
6038 grep -v '^ *+' conftest.er1 >conftest.err
6039 rm -f conftest.er1
6040 cat conftest.err >&5
6041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
6042 (exit $ac_status); } && {
6043 test -z "$ac_c_werror_flag" ||
6044 test ! -s conftest.err
6045 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
6046 ac_hi=$ac_mid; break
6047else
6048 echo "$as_me: failed program was:" >&5
6049sed 's/^/| /' conftest.$ac_ext >&5
6050
a6ccdbab
EC
6051 ac_lo=`expr $ac_mid + 1`
6052 if test $ac_lo -le $ac_mid; then
6053 ac_lo= ac_hi=
6054 break
6055 fi
6056 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 6057fi
a6ccdbab
EC
6058
6059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6060 done
6061else
6062 echo "$as_me: failed program was:" >&5
6063sed 's/^/| /' conftest.$ac_ext >&5
6064
a6ccdbab 6065 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
6066/* confdefs.h. */
6067_ACEOF
6068cat confdefs.h >>conftest.$ac_ext
6069cat >>conftest.$ac_ext <<_ACEOF
6070/* end confdefs.h. */
6071$ac_includes_default
a6ccdbab 6072 typedef long long ac__type_sizeof_;
bf3b7cd3
JD
6073int
6074main ()
6075{
a6ccdbab 6076static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
bf3b7cd3
JD
6077test_array [0] = 0
6078
6079 ;
6080 return 0;
6081}
6082_ACEOF
6083rm -f conftest.$ac_objext
a6ccdbab
EC
6084if { (ac_try="$ac_compile"
6085case "(($ac_try" in
6086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6087 *) ac_try_echo=$ac_try;;
6088esac
6089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6090 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
6091 ac_status=$?
6092 grep -v '^ *+' conftest.er1 >conftest.err
6093 rm -f conftest.er1
6094 cat conftest.err >&5
6095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
6096 (exit $ac_status); } && {
6097 test -z "$ac_c_werror_flag" ||
6098 test ! -s conftest.err
6099 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
6100 ac_hi=-1 ac_mid=-1
6101 while :; do
6102 cat >conftest.$ac_ext <<_ACEOF
6103/* confdefs.h. */
6104_ACEOF
6105cat confdefs.h >>conftest.$ac_ext
6106cat >>conftest.$ac_ext <<_ACEOF
6107/* end confdefs.h. */
6108$ac_includes_default
a6ccdbab 6109 typedef long long ac__type_sizeof_;
bf3b7cd3
JD
6110int
6111main ()
6112{
a6ccdbab 6113static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
bf3b7cd3
JD
6114test_array [0] = 0
6115
6116 ;
6117 return 0;
6118}
6119_ACEOF
6120rm -f conftest.$ac_objext
a6ccdbab
EC
6121if { (ac_try="$ac_compile"
6122case "(($ac_try" in
6123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6124 *) ac_try_echo=$ac_try;;
6125esac
6126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6127 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
6128 ac_status=$?
6129 grep -v '^ *+' conftest.er1 >conftest.err
6130 rm -f conftest.er1
6131 cat conftest.err >&5
6132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
6133 (exit $ac_status); } && {
6134 test -z "$ac_c_werror_flag" ||
6135 test ! -s conftest.err
6136 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
6137 ac_lo=$ac_mid; break
6138else
6139 echo "$as_me: failed program was:" >&5
6140sed 's/^/| /' conftest.$ac_ext >&5
6141
a6ccdbab
EC
6142 ac_hi=`expr '(' $ac_mid ')' - 1`
6143 if test $ac_mid -le $ac_hi; then
6144 ac_lo= ac_hi=
6145 break
6146 fi
6147 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 6148fi
a6ccdbab
EC
6149
6150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6151 done
6152else
6153 echo "$as_me: failed program was:" >&5
6154sed 's/^/| /' conftest.$ac_ext >&5
6155
a6ccdbab 6156 ac_lo= ac_hi=
bf3b7cd3 6157fi
a6ccdbab
EC
6158
6159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6160fi
a6ccdbab
EC
6161
6162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6163# Binary search between lo and hi bounds.
6164while test "x$ac_lo" != "x$ac_hi"; do
6165 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6166 cat >conftest.$ac_ext <<_ACEOF
6167/* confdefs.h. */
6168_ACEOF
6169cat confdefs.h >>conftest.$ac_ext
6170cat >>conftest.$ac_ext <<_ACEOF
6171/* end confdefs.h. */
6172$ac_includes_default
a6ccdbab 6173 typedef long long ac__type_sizeof_;
bf3b7cd3
JD
6174int
6175main ()
6176{
a6ccdbab 6177static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
6178test_array [0] = 0
6179
6180 ;
6181 return 0;
6182}
6183_ACEOF
6184rm -f conftest.$ac_objext
a6ccdbab
EC
6185if { (ac_try="$ac_compile"
6186case "(($ac_try" in
6187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6188 *) ac_try_echo=$ac_try;;
6189esac
6190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6191 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
6192 ac_status=$?
6193 grep -v '^ *+' conftest.er1 >conftest.err
6194 rm -f conftest.er1
6195 cat conftest.err >&5
6196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
6197 (exit $ac_status); } && {
6198 test -z "$ac_c_werror_flag" ||
6199 test ! -s conftest.err
6200 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
6201 ac_hi=$ac_mid
6202else
6203 echo "$as_me: failed program was:" >&5
6204sed 's/^/| /' conftest.$ac_ext >&5
6205
a6ccdbab 6206 ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 6207fi
a6ccdbab
EC
6208
6209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6210done
6211case $ac_lo in
6212?*) ac_cv_sizeof_long_long=$ac_lo;;
a6ccdbab
EC
6213'') if test "$ac_cv_type_long_long" = yes; then
6214 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
bf3b7cd3 6215See \`config.log' for more details." >&5
a6ccdbab 6216echo "$as_me: error: cannot compute sizeof (long long)
bf3b7cd3 6217See \`config.log' for more details." >&2;}
a6ccdbab
EC
6218 { (exit 77); exit 77; }; }
6219 else
6220 ac_cv_sizeof_long_long=0
6221 fi ;;
bf3b7cd3 6222esac
bf3b7cd3
JD
6223else
6224 cat >conftest.$ac_ext <<_ACEOF
6225/* confdefs.h. */
6226_ACEOF
6227cat confdefs.h >>conftest.$ac_ext
6228cat >>conftest.$ac_ext <<_ACEOF
6229/* end confdefs.h. */
6230$ac_includes_default
a6ccdbab
EC
6231 typedef long long ac__type_sizeof_;
6232static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
6233static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
bf3b7cd3
JD
6234#include <stdio.h>
6235#include <stdlib.h>
6236int
6237main ()
6238{
6239
6240 FILE *f = fopen ("conftest.val", "w");
6241 if (! f)
a6ccdbab
EC
6242 return 1;
6243 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
bf3b7cd3 6244 {
a6ccdbab
EC
6245 long int i = longval ();
6246 if (i != ((long int) (sizeof (ac__type_sizeof_))))
6247 return 1;
bf3b7cd3
JD
6248 fprintf (f, "%ld\n", i);
6249 }
6250 else
6251 {
a6ccdbab
EC
6252 unsigned long int i = ulongval ();
6253 if (i != ((long int) (sizeof (ac__type_sizeof_))))
6254 return 1;
bf3b7cd3
JD
6255 fprintf (f, "%lu\n", i);
6256 }
a6ccdbab 6257 return ferror (f) || fclose (f) != 0;
bf3b7cd3
JD
6258
6259 ;
6260 return 0;
6261}
6262_ACEOF
6263rm -f conftest$ac_exeext
a6ccdbab
EC
6264if { (ac_try="$ac_link"
6265case "(($ac_try" in
6266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6267 *) ac_try_echo=$ac_try;;
6268esac
6269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6270 (eval "$ac_link") 2>&5
bf3b7cd3
JD
6271 ac_status=$?
6272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6273 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a6ccdbab
EC
6274 { (case "(($ac_try" in
6275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6276 *) ac_try_echo=$ac_try;;
6277esac
6278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6279 (eval "$ac_try") 2>&5
bf3b7cd3
JD
6280 ac_status=$?
6281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6282 (exit $ac_status); }; }; then
6283 ac_cv_sizeof_long_long=`cat conftest.val`
6284else
6285 echo "$as_me: program exited with status $ac_status" >&5
6286echo "$as_me: failed program was:" >&5
6287sed 's/^/| /' conftest.$ac_ext >&5
6288
6289( exit $ac_status )
a6ccdbab
EC
6290if test "$ac_cv_type_long_long" = yes; then
6291 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
bf3b7cd3 6292See \`config.log' for more details." >&5
a6ccdbab 6293echo "$as_me: error: cannot compute sizeof (long long)
bf3b7cd3 6294See \`config.log' for more details." >&2;}
a6ccdbab
EC
6295 { (exit 77); exit 77; }; }
6296 else
6297 ac_cv_sizeof_long_long=0
6298 fi
bf3b7cd3 6299fi
a6ccdbab 6300rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6301fi
6302rm -f conftest.val
bf3b7cd3 6303fi
a6ccdbab
EC
6304{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
6305echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
6306
6307
6308
bf3b7cd3
JD
6309cat >>confdefs.h <<_ACEOF
6310#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
6311_ACEOF
6312
6313
6314fi
5ec1c5e6 6315
a6ccdbab
EC
6316{ echo "$as_me:$LINENO: checking for __int64" >&5
6317echo $ECHO_N "checking for __int64... $ECHO_C" >&6; }
5ec1c5e6
KC
6318if test "${ac_cv_type___int64+set}" = set; then
6319 echo $ECHO_N "(cached) $ECHO_C" >&6
6320else
6321 cat >conftest.$ac_ext <<_ACEOF
6322/* confdefs.h. */
6323_ACEOF
6324cat confdefs.h >>conftest.$ac_ext
6325cat >>conftest.$ac_ext <<_ACEOF
6326/* end confdefs.h. */
6327$ac_includes_default
a6ccdbab 6328typedef __int64 ac__type_new_;
5ec1c5e6
KC
6329int
6330main ()
6331{
a6ccdbab 6332if ((ac__type_new_ *) 0)
5ec1c5e6 6333 return 0;
a6ccdbab 6334if (sizeof (ac__type_new_))
5ec1c5e6
KC
6335 return 0;
6336 ;
6337 return 0;
6338}
6339_ACEOF
6340rm -f conftest.$ac_objext
a6ccdbab
EC
6341if { (ac_try="$ac_compile"
6342case "(($ac_try" in
6343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6344 *) ac_try_echo=$ac_try;;
6345esac
6346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6347 (eval "$ac_compile") 2>conftest.er1
5ec1c5e6
KC
6348 ac_status=$?
6349 grep -v '^ *+' conftest.er1 >conftest.err
6350 rm -f conftest.er1
6351 cat conftest.err >&5
6352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
6353 (exit $ac_status); } && {
6354 test -z "$ac_c_werror_flag" ||
6355 test ! -s conftest.err
6356 } && test -s conftest.$ac_objext; then
5ec1c5e6
KC
6357 ac_cv_type___int64=yes
6358else
6359 echo "$as_me: failed program was:" >&5
6360sed 's/^/| /' conftest.$ac_ext >&5
6361
a6ccdbab 6362 ac_cv_type___int64=no
5ec1c5e6 6363fi
a6ccdbab
EC
6364
6365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 6366fi
a6ccdbab
EC
6367{ echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
6368echo "${ECHO_T}$ac_cv_type___int64" >&6; }
5ec1c5e6
KC
6369if test $ac_cv_type___int64 = yes; then
6370
6371cat >>confdefs.h <<_ACEOF
6372#define HAVE___INT64 1
6373_ACEOF
6374
a6ccdbab
EC
6375{ echo "$as_me:$LINENO: checking for __int64" >&5
6376echo $ECHO_N "checking for __int64... $ECHO_C" >&6; }
bf3b7cd3
JD
6377if test "${ac_cv_type___int64+set}" = set; then
6378 echo $ECHO_N "(cached) $ECHO_C" >&6
6379else
ba479fd2 6380 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6381/* confdefs.h. */
6382_ACEOF
6383cat confdefs.h >>conftest.$ac_ext
6384cat >>conftest.$ac_ext <<_ACEOF
6385/* end confdefs.h. */
bf3b7cd3 6386$ac_includes_default
a6ccdbab 6387typedef __int64 ac__type_new_;
ba479fd2
NN
6388int
6389main ()
6390{
a6ccdbab 6391if ((ac__type_new_ *) 0)
bf3b7cd3 6392 return 0;
a6ccdbab 6393if (sizeof (ac__type_new_))
bf3b7cd3 6394 return 0;
ba479fd2
NN
6395 ;
6396 return 0;
6397}
6398_ACEOF
6399rm -f conftest.$ac_objext
a6ccdbab
EC
6400if { (ac_try="$ac_compile"
6401case "(($ac_try" in
6402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6403 *) ac_try_echo=$ac_try;;
6404esac
6405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6406 (eval "$ac_compile") 2>conftest.er1
ba479fd2 6407 ac_status=$?
86da66b5
HPN
6408 grep -v '^ *+' conftest.er1 >conftest.err
6409 rm -f conftest.er1
6410 cat conftest.err >&5
ba479fd2 6411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
6412 (exit $ac_status); } && {
6413 test -z "$ac_c_werror_flag" ||
6414 test ! -s conftest.err
6415 } && test -s conftest.$ac_objext; then
bf3b7cd3 6416 ac_cv_type___int64=yes
75b6f3fd 6417else
ba479fd2
NN
6418 echo "$as_me: failed program was:" >&5
6419sed 's/^/| /' conftest.$ac_ext >&5
6420
a6ccdbab 6421 ac_cv_type___int64=no
75b6f3fd 6422fi
a6ccdbab
EC
6423
6424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 6425fi
a6ccdbab
EC
6426{ echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
6427echo "${ECHO_T}$ac_cv_type___int64" >&6; }
75b6f3fd 6428
a6ccdbab
EC
6429# The cast to long int works around a bug in the HP C Compiler
6430# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6431# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6432# This bug is HP SR number 8606223364.
6433{ echo "$as_me:$LINENO: checking size of __int64" >&5
6434echo $ECHO_N "checking size of __int64... $ECHO_C" >&6; }
bf3b7cd3 6435if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 6436 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 6437else
bf3b7cd3
JD
6438 if test "$cross_compiling" = yes; then
6439 # Depending upon the size, compute the lo and hi bounds.
6440cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6441/* confdefs.h. */
6442_ACEOF
6443cat confdefs.h >>conftest.$ac_ext
6444cat >>conftest.$ac_ext <<_ACEOF
6445/* end confdefs.h. */
bf3b7cd3 6446$ac_includes_default
a6ccdbab 6447 typedef __int64 ac__type_sizeof_;
ba479fd2
NN
6448int
6449main ()
6450{
a6ccdbab 6451static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
bf3b7cd3
JD
6452test_array [0] = 0
6453
ba479fd2
NN
6454 ;
6455 return 0;
6456}
6457_ACEOF
6458rm -f conftest.$ac_objext
a6ccdbab
EC
6459if { (ac_try="$ac_compile"
6460case "(($ac_try" in
6461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6462 *) ac_try_echo=$ac_try;;
6463esac
6464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6465 (eval "$ac_compile") 2>conftest.er1
ba479fd2 6466 ac_status=$?
86da66b5
HPN
6467 grep -v '^ *+' conftest.er1 >conftest.err
6468 rm -f conftest.er1
6469 cat conftest.err >&5
ba479fd2 6470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
6471 (exit $ac_status); } && {
6472 test -z "$ac_c_werror_flag" ||
6473 test ! -s conftest.err
6474 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
6475 ac_lo=0 ac_mid=0
6476 while :; do
6477 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6478/* confdefs.h. */
6479_ACEOF
6480cat confdefs.h >>conftest.$ac_ext
6481cat >>conftest.$ac_ext <<_ACEOF
6482/* end confdefs.h. */
bf3b7cd3 6483$ac_includes_default
a6ccdbab 6484 typedef __int64 ac__type_sizeof_;
ba479fd2
NN
6485int
6486main ()
6487{
a6ccdbab 6488static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
6489test_array [0] = 0
6490
ba479fd2
NN
6491 ;
6492 return 0;
6493}
6494_ACEOF
6495rm -f conftest.$ac_objext
a6ccdbab
EC
6496if { (ac_try="$ac_compile"
6497case "(($ac_try" in
6498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6499 *) ac_try_echo=$ac_try;;
6500esac
6501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6502 (eval "$ac_compile") 2>conftest.er1
ba479fd2 6503 ac_status=$?
86da66b5
HPN
6504 grep -v '^ *+' conftest.er1 >conftest.err
6505 rm -f conftest.er1
6506 cat conftest.err >&5
ba479fd2 6507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
6508 (exit $ac_status); } && {
6509 test -z "$ac_c_werror_flag" ||
6510 test ! -s conftest.err
6511 } && test -s conftest.$ac_objext; then
bf3b7cd3 6512 ac_hi=$ac_mid; break
75e93faa 6513else
ba479fd2
NN
6514 echo "$as_me: failed program was:" >&5
6515sed 's/^/| /' conftest.$ac_ext >&5
6516
a6ccdbab
EC
6517 ac_lo=`expr $ac_mid + 1`
6518 if test $ac_lo -le $ac_mid; then
6519 ac_lo= ac_hi=
6520 break
6521 fi
6522 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 6523fi
a6ccdbab
EC
6524
6525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6526 done
75e93faa 6527else
bf3b7cd3
JD
6528 echo "$as_me: failed program was:" >&5
6529sed 's/^/| /' conftest.$ac_ext >&5
6530
a6ccdbab 6531 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6532/* confdefs.h. */
6533_ACEOF
6534cat confdefs.h >>conftest.$ac_ext
6535cat >>conftest.$ac_ext <<_ACEOF
6536/* end confdefs.h. */
bf3b7cd3 6537$ac_includes_default
a6ccdbab 6538 typedef __int64 ac__type_sizeof_;
ba479fd2
NN
6539int
6540main ()
6541{
a6ccdbab 6542static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
bf3b7cd3
JD
6543test_array [0] = 0
6544
ba479fd2
NN
6545 ;
6546 return 0;
6547}
6548_ACEOF
6549rm -f conftest.$ac_objext
a6ccdbab
EC
6550if { (ac_try="$ac_compile"
6551case "(($ac_try" in
6552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6553 *) ac_try_echo=$ac_try;;
6554esac
6555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6556 (eval "$ac_compile") 2>conftest.er1
ba479fd2 6557 ac_status=$?
86da66b5
HPN
6558 grep -v '^ *+' conftest.er1 >conftest.err
6559 rm -f conftest.er1
6560 cat conftest.err >&5
ba479fd2 6561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
6562 (exit $ac_status); } && {
6563 test -z "$ac_c_werror_flag" ||
6564 test ! -s conftest.err
6565 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
6566 ac_hi=-1 ac_mid=-1
6567 while :; do
6568 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6569/* confdefs.h. */
6570_ACEOF
6571cat confdefs.h >>conftest.$ac_ext
6572cat >>conftest.$ac_ext <<_ACEOF
6573/* end confdefs.h. */
bf3b7cd3 6574$ac_includes_default
a6ccdbab 6575 typedef __int64 ac__type_sizeof_;
ba479fd2
NN
6576int
6577main ()
6578{
a6ccdbab 6579static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
bf3b7cd3
JD
6580test_array [0] = 0
6581
ba479fd2
NN
6582 ;
6583 return 0;
6584}
6585_ACEOF
6586rm -f conftest.$ac_objext
a6ccdbab
EC
6587if { (ac_try="$ac_compile"
6588case "(($ac_try" in
6589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6590 *) ac_try_echo=$ac_try;;
6591esac
6592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6593 (eval "$ac_compile") 2>conftest.er1
ba479fd2 6594 ac_status=$?
86da66b5
HPN
6595 grep -v '^ *+' conftest.er1 >conftest.err
6596 rm -f conftest.er1
6597 cat conftest.err >&5
ba479fd2 6598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
6599 (exit $ac_status); } && {
6600 test -z "$ac_c_werror_flag" ||
6601 test ! -s conftest.err
6602 } && test -s conftest.$ac_objext; then
bf3b7cd3 6603 ac_lo=$ac_mid; break
04cabffc 6604else
ba479fd2
NN
6605 echo "$as_me: failed program was:" >&5
6606sed 's/^/| /' conftest.$ac_ext >&5
6607
a6ccdbab
EC
6608 ac_hi=`expr '(' $ac_mid ')' - 1`
6609 if test $ac_mid -le $ac_hi; then
6610 ac_lo= ac_hi=
6611 break
6612 fi
6613 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 6614fi
a6ccdbab
EC
6615
6616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6617 done
6618else
6619 echo "$as_me: failed program was:" >&5
6620sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 6621
a6ccdbab 6622 ac_lo= ac_hi=
414d23ae 6623fi
a6ccdbab
EC
6624
6625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6626fi
a6ccdbab
EC
6627
6628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6629# Binary search between lo and hi bounds.
6630while test "x$ac_lo" != "x$ac_hi"; do
6631 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 6632 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6633/* confdefs.h. */
6634_ACEOF
6635cat confdefs.h >>conftest.$ac_ext
6636cat >>conftest.$ac_ext <<_ACEOF
6637/* end confdefs.h. */
bf3b7cd3 6638$ac_includes_default
a6ccdbab 6639 typedef __int64 ac__type_sizeof_;
ba479fd2
NN
6640int
6641main ()
6642{
a6ccdbab 6643static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
6644test_array [0] = 0
6645
ba479fd2
NN
6646 ;
6647 return 0;
6648}
6649_ACEOF
6650rm -f conftest.$ac_objext
a6ccdbab
EC
6651if { (ac_try="$ac_compile"
6652case "(($ac_try" in
6653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6654 *) ac_try_echo=$ac_try;;
6655esac
6656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6657 (eval "$ac_compile") 2>conftest.er1
ba479fd2 6658 ac_status=$?
86da66b5
HPN
6659 grep -v '^ *+' conftest.er1 >conftest.err
6660 rm -f conftest.er1
6661 cat conftest.err >&5
ba479fd2 6662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
6663 (exit $ac_status); } && {
6664 test -z "$ac_c_werror_flag" ||
6665 test ! -s conftest.err
6666 } && test -s conftest.$ac_objext; then
bf3b7cd3 6667 ac_hi=$ac_mid
75e93faa 6668else
ba479fd2
NN
6669 echo "$as_me: failed program was:" >&5
6670sed 's/^/| /' conftest.$ac_ext >&5
6671
a6ccdbab 6672 ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 6673fi
a6ccdbab
EC
6674
6675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6676done
bf3b7cd3
JD
6677case $ac_lo in
6678?*) ac_cv_sizeof___int64=$ac_lo;;
a6ccdbab
EC
6679'') if test "$ac_cv_type___int64" = yes; then
6680 { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64)
bf3b7cd3 6681See \`config.log' for more details." >&5
a6ccdbab 6682echo "$as_me: error: cannot compute sizeof (__int64)
bf3b7cd3 6683See \`config.log' for more details." >&2;}
a6ccdbab
EC
6684 { (exit 77); exit 77; }; }
6685 else
6686 ac_cv_sizeof___int64=0
6687 fi ;;
bf3b7cd3 6688esac
bf3b7cd3
JD
6689else
6690 cat >conftest.$ac_ext <<_ACEOF
6691/* confdefs.h. */
6692_ACEOF
6693cat confdefs.h >>conftest.$ac_ext
6694cat >>conftest.$ac_ext <<_ACEOF
6695/* end confdefs.h. */
6696$ac_includes_default
a6ccdbab
EC
6697 typedef __int64 ac__type_sizeof_;
6698static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
6699static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
bf3b7cd3
JD
6700#include <stdio.h>
6701#include <stdlib.h>
6702int
6703main ()
6704{
414d23ae 6705
bf3b7cd3
JD
6706 FILE *f = fopen ("conftest.val", "w");
6707 if (! f)
a6ccdbab
EC
6708 return 1;
6709 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
bf3b7cd3 6710 {
a6ccdbab
EC
6711 long int i = longval ();
6712 if (i != ((long int) (sizeof (ac__type_sizeof_))))
6713 return 1;
bf3b7cd3
JD
6714 fprintf (f, "%ld\n", i);
6715 }
6716 else
6717 {
a6ccdbab
EC
6718 unsigned long int i = ulongval ();
6719 if (i != ((long int) (sizeof (ac__type_sizeof_))))
6720 return 1;
bf3b7cd3
JD
6721 fprintf (f, "%lu\n", i);
6722 }
a6ccdbab 6723 return ferror (f) || fclose (f) != 0;
bf3b7cd3
JD
6724
6725 ;
6726 return 0;
6727}
6728_ACEOF
6729rm -f conftest$ac_exeext
a6ccdbab
EC
6730if { (ac_try="$ac_link"
6731case "(($ac_try" in
6732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6733 *) ac_try_echo=$ac_try;;
6734esac
6735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6736 (eval "$ac_link") 2>&5
bf3b7cd3
JD
6737 ac_status=$?
6738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6739 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a6ccdbab
EC
6740 { (case "(($ac_try" in
6741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6742 *) ac_try_echo=$ac_try;;
6743esac
6744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6745 (eval "$ac_try") 2>&5
bf3b7cd3
JD
6746 ac_status=$?
6747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6748 (exit $ac_status); }; }; then
6749 ac_cv_sizeof___int64=`cat conftest.val`
6750else
6751 echo "$as_me: program exited with status $ac_status" >&5
6752echo "$as_me: failed program was:" >&5
6753sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 6754
bf3b7cd3 6755( exit $ac_status )
a6ccdbab
EC
6756if test "$ac_cv_type___int64" = yes; then
6757 { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64)
bf3b7cd3 6758See \`config.log' for more details." >&5
a6ccdbab 6759echo "$as_me: error: cannot compute sizeof (__int64)
bf3b7cd3 6760See \`config.log' for more details." >&2;}
a6ccdbab
EC
6761 { (exit 77); exit 77; }; }
6762 else
6763 ac_cv_sizeof___int64=0
6764 fi
bf3b7cd3 6765fi
a6ccdbab 6766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6767fi
6768rm -f conftest.val
bf3b7cd3 6769fi
a6ccdbab
EC
6770{ echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
6771echo "${ECHO_T}$ac_cv_sizeof___int64" >&6; }
6772
6773
6774
ba479fd2 6775cat >>confdefs.h <<_ACEOF
414d23ae 6776#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 6777_ACEOF
414d23ae 6778
cafe096b 6779
414d23ae
HPN
6780fi
6781
5ec1c5e6 6782
34a86c2b
NN
6783# ---------------------
6784# Warnings and checking
6785# ---------------------
6786
b5472e1d
NN
6787# Check $CC warning features (if it's GCC).
6788# We want to use -pedantic, but we don't want warnings about
6789# * 'long long'
6790# * variadic macros
89a42ac8 6791# * overlong strings
b5472e1d
NN
6792# So, we only use -pedantic if we can disable those warnings.
6793
a6ccdbab
EC
6794{ echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5
6795echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6; }
b5472e1d
NN
6796if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then
6797 echo $ECHO_N "(cached) $ECHO_C" >&6
6798else
6799 save_CFLAGS="$CFLAGS"
6800 CFLAGS="-Wno-long-long"
6801 cat >conftest.$ac_ext <<_ACEOF
6802/* confdefs.h. */
6803_ACEOF
6804cat confdefs.h >>conftest.$ac_ext
6805cat >>conftest.$ac_ext <<_ACEOF
6806/* end confdefs.h. */
6807
6808_ACEOF
6809rm -f conftest.$ac_objext
a6ccdbab
EC
6810if { (ac_try="$ac_compile"
6811case "(($ac_try" in
6812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6813 *) ac_try_echo=$ac_try;;
6814esac
6815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6816 (eval "$ac_compile") 2>conftest.er1
b5472e1d
NN
6817 ac_status=$?
6818 grep -v '^ *+' conftest.er1 >conftest.err
6819 rm -f conftest.er1
6820 cat conftest.err >&5
6821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
6822 (exit $ac_status); } && {
6823 test -z "$ac_c_werror_flag" ||
6824 test ! -s conftest.err
6825 } && test -s conftest.$ac_objext; then
b5472e1d
NN
6826 ac_cv_prog_cc_w_no_long_long=yes
6827else
6828 echo "$as_me: failed program was:" >&5
6829sed 's/^/| /' conftest.$ac_ext >&5
6830
a6ccdbab 6831 ac_cv_prog_cc_w_no_long_long=no
b5472e1d 6832fi
a6ccdbab
EC
6833
6834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5472e1d
NN
6835 CFLAGS="$save_CFLAGS"
6836
6837fi
a6ccdbab
EC
6838{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5
6839echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6; }
b5472e1d 6840
a6ccdbab
EC
6841{ echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5
6842echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6; }
b5472e1d
NN
6843if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then
6844 echo $ECHO_N "(cached) $ECHO_C" >&6
6845else
6846 save_CFLAGS="$CFLAGS"
6847 CFLAGS="-Wno-variadic-macros"
6848 cat >conftest.$ac_ext <<_ACEOF
6849/* confdefs.h. */
6850_ACEOF
6851cat confdefs.h >>conftest.$ac_ext
6852cat >>conftest.$ac_ext <<_ACEOF
6853/* end confdefs.h. */
6854
6855_ACEOF
6856rm -f conftest.$ac_objext
a6ccdbab
EC
6857if { (ac_try="$ac_compile"
6858case "(($ac_try" in
6859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6860 *) ac_try_echo=$ac_try;;
6861esac
6862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6863 (eval "$ac_compile") 2>conftest.er1
b5472e1d
NN
6864 ac_status=$?
6865 grep -v '^ *+' conftest.er1 >conftest.err
6866 rm -f conftest.er1
6867 cat conftest.err >&5
6868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
6869 (exit $ac_status); } && {
6870 test -z "$ac_c_werror_flag" ||
6871 test ! -s conftest.err
6872 } && test -s conftest.$ac_objext; then
b5472e1d
NN
6873 ac_cv_prog_cc_w_no_variadic_macros=yes
6874else
6875 echo "$as_me: failed program was:" >&5
6876sed 's/^/| /' conftest.$ac_ext >&5
6877
a6ccdbab 6878 ac_cv_prog_cc_w_no_variadic_macros=no
b5472e1d 6879fi
a6ccdbab
EC
6880
6881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5472e1d
NN
6882 CFLAGS="$save_CFLAGS"
6883
6884fi
a6ccdbab
EC
6885{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5
6886echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6; }
b5472e1d 6887
a6ccdbab
EC
6888{ echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-overlength-strings" >&5
6889echo $ECHO_N "checking whether ${CC} accepts -Wno-overlength-strings... $ECHO_C" >&6; }
89a42ac8
ZW
6890if test "${ac_cv_prog_cc_w_no_overlength_strings+set}" = set; then
6891 echo $ECHO_N "(cached) $ECHO_C" >&6
6892else
6893 save_CFLAGS="$CFLAGS"
6894 CFLAGS="-Wno-overlength-strings"
6895 cat >conftest.$ac_ext <<_ACEOF
6896/* confdefs.h. */
6897_ACEOF
6898cat confdefs.h >>conftest.$ac_ext
6899cat >>conftest.$ac_ext <<_ACEOF
6900/* end confdefs.h. */
6901
6902_ACEOF
6903rm -f conftest.$ac_objext
a6ccdbab
EC
6904if { (ac_try="$ac_compile"
6905case "(($ac_try" in
6906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6907 *) ac_try_echo=$ac_try;;
6908esac
6909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6910 (eval "$ac_compile") 2>conftest.er1
89a42ac8
ZW
6911 ac_status=$?
6912 grep -v '^ *+' conftest.er1 >conftest.err
6913 rm -f conftest.er1
6914 cat conftest.err >&5
6915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
6916 (exit $ac_status); } && {
6917 test -z "$ac_c_werror_flag" ||
6918 test ! -s conftest.err
6919 } && test -s conftest.$ac_objext; then
89a42ac8
ZW
6920 ac_cv_prog_cc_w_no_overlength_strings=yes
6921else
6922 echo "$as_me: failed program was:" >&5
6923sed 's/^/| /' conftest.$ac_ext >&5
6924
a6ccdbab 6925 ac_cv_prog_cc_w_no_overlength_strings=no
89a42ac8 6926fi
a6ccdbab
EC
6927
6928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
89a42ac8
ZW
6929 CFLAGS="$save_CFLAGS"
6930
6931fi
a6ccdbab
EC
6932{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_overlength_strings" >&5
6933echo "${ECHO_T}$ac_cv_prog_cc_w_no_overlength_strings" >&6; }
89a42ac8 6934
34a86c2b 6935strict1_warn=
b5472e1d 6936if test $ac_cv_prog_cc_w_no_long_long = yes \
89a42ac8
ZW
6937 && test $ac_cv_prog_cc_w_no_variadic_macros = yes \
6938 && test $ac_cv_prog_cc_w_no_overlength_strings = yes ; then
6939 strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings"
34a86c2b
NN
6940fi
6941
643d3bd2 6942# Add -Wold-style-definition if it's accepted
a6ccdbab
EC
6943{ echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5
6944echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6; }
643d3bd2
NN
6945if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then
6946 echo $ECHO_N "(cached) $ECHO_C" >&6
6947else
6948 save_CFLAGS="$CFLAGS"
6949 CFLAGS="-Wold-style-definition"
6950 cat >conftest.$ac_ext <<_ACEOF
6951/* confdefs.h. */
6952_ACEOF
6953cat confdefs.h >>conftest.$ac_ext
6954cat >>conftest.$ac_ext <<_ACEOF
6955/* end confdefs.h. */
6956
6957_ACEOF
6958rm -f conftest.$ac_objext
a6ccdbab
EC
6959if { (ac_try="$ac_compile"
6960case "(($ac_try" in
6961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6962 *) ac_try_echo=$ac_try;;
6963esac
6964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6965 (eval "$ac_compile") 2>conftest.er1
643d3bd2
NN
6966 ac_status=$?
6967 grep -v '^ *+' conftest.er1 >conftest.err
6968 rm -f conftest.er1
6969 cat conftest.err >&5
6970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
6971 (exit $ac_status); } && {
6972 test -z "$ac_c_werror_flag" ||
6973 test ! -s conftest.err
6974 } && test -s conftest.$ac_objext; then
643d3bd2
NN
6975 ac_cv_prog_cc_w_old_style_definition=yes
6976else
6977 echo "$as_me: failed program was:" >&5
6978sed 's/^/| /' conftest.$ac_ext >&5
6979
a6ccdbab 6980 ac_cv_prog_cc_w_old_style_definition=no
643d3bd2 6981fi
a6ccdbab
EC
6982
6983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
643d3bd2
NN
6984 CFLAGS="$save_CFLAGS"
6985
6986fi
a6ccdbab
EC
6987{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5
6988echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6; }
643d3bd2
NN
6989if test $ac_cv_prog_cc_w_old_style_definition = yes ; then
6990 strict1_warn="${strict1_warn} -Wold-style-definition"
6991fi
6992
ac0f3f39 6993# Add -Wmissing-format-attribute if it's accepted
a6ccdbab
EC
6994{ echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5
6995echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6; }
ac0f3f39
KG
6996if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then
6997 echo $ECHO_N "(cached) $ECHO_C" >&6
6998else
6999 save_CFLAGS="$CFLAGS"
7000 CFLAGS="-Wmissing-format-attribute"
7001 cat >conftest.$ac_ext <<_ACEOF
7002/* confdefs.h. */
7003_ACEOF
7004cat confdefs.h >>conftest.$ac_ext
7005cat >>conftest.$ac_ext <<_ACEOF
7006/* end confdefs.h. */
7007
7008_ACEOF
7009rm -f conftest.$ac_objext
a6ccdbab
EC
7010if { (ac_try="$ac_compile"
7011case "(($ac_try" in
7012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7013 *) ac_try_echo=$ac_try;;
7014esac
7015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7016 (eval "$ac_compile") 2>conftest.er1
ac0f3f39
KG
7017 ac_status=$?
7018 grep -v '^ *+' conftest.er1 >conftest.err
7019 rm -f conftest.er1
7020 cat conftest.err >&5
7021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
7022 (exit $ac_status); } && {
7023 test -z "$ac_c_werror_flag" ||
7024 test ! -s conftest.err
7025 } && test -s conftest.$ac_objext; then
ac0f3f39
KG
7026 ac_cv_prog_cc_w_missing_format_attribute=yes
7027else
7028 echo "$as_me: failed program was:" >&5
7029sed 's/^/| /' conftest.$ac_ext >&5
7030
a6ccdbab 7031 ac_cv_prog_cc_w_missing_format_attribute=no
ac0f3f39 7032fi
a6ccdbab
EC
7033
7034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac0f3f39
KG
7035 CFLAGS="$save_CFLAGS"
7036
7037fi
a6ccdbab
EC
7038{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5
7039echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6; }
ac0f3f39
KG
7040if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then
7041 strict1_warn="${strict1_warn} -Wmissing-format-attribute"
7042fi
7043
09a9c095 7044# Enable -Werror, period.
a6ccdbab 7045# Check whether --enable-werror_always was given.
09a9c095 7046if test "${enable_werror_always+set}" = set; then
a6ccdbab 7047 enableval=$enable_werror_always;
09a9c095
NN
7048else
7049 enable_werror_always=no
a6ccdbab
EC
7050fi
7051
09a9c095
NN
7052if test x${enable_werror_always} = xyes ; then
7053 strict1_warn="${strict1_warn} -Werror"
7054 WERROR=-Werror
7055fi
7056
ac0f3f39
KG
7057
7058
373477bb 7059# Get C++ compatibility warning flag, if supported.
a6ccdbab
EC
7060{ echo "$as_me:$LINENO: checking whether ${CC} accepts -Wc++-compat" >&5
7061echo $ECHO_N "checking whether ${CC} accepts -Wc++-compat... $ECHO_C" >&6; }
373477bb
GDR
7062if test "${ac_cv_prog_cc_w_cxx_compat+set}" = set; then
7063 echo $ECHO_N "(cached) $ECHO_C" >&6
7064else
7065 save_CFLAGS="$CFLAGS"
7066 CFLAGS="-Wc++-compat"
7067 cat >conftest.$ac_ext <<_ACEOF
7068/* confdefs.h. */
7069_ACEOF
7070cat confdefs.h >>conftest.$ac_ext
7071cat >>conftest.$ac_ext <<_ACEOF
7072/* end confdefs.h. */
7073
7074_ACEOF
7075rm -f conftest.$ac_objext
a6ccdbab
EC
7076if { (ac_try="$ac_compile"
7077case "(($ac_try" in
7078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7079 *) ac_try_echo=$ac_try;;
7080esac
7081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7082 (eval "$ac_compile") 2>conftest.er1
373477bb
GDR
7083 ac_status=$?
7084 grep -v '^ *+' conftest.er1 >conftest.err
7085 rm -f conftest.er1
7086 cat conftest.err >&5
7087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
7088 (exit $ac_status); } && {
7089 test -z "$ac_c_werror_flag" ||
7090 test ! -s conftest.err
7091 } && test -s conftest.$ac_objext; then
373477bb
GDR
7092 ac_cv_prog_cc_w_cxx_compat=yes
7093else
7094 echo "$as_me: failed program was:" >&5
7095sed 's/^/| /' conftest.$ac_ext >&5
7096
a6ccdbab 7097 ac_cv_prog_cc_w_cxx_compat=no
373477bb 7098fi
a6ccdbab
EC
7099
7100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
373477bb
GDR
7101 CFLAGS="$save_CFLAGS"
7102
7103fi
a6ccdbab
EC
7104{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_cxx_compat" >&5
7105echo "${ECHO_T}$ac_cv_prog_cc_w_cxx_compat" >&6; }
373477bb
GDR
7106if test x${ac_cv_prog_cc_w_cxx_compat} = xyes; then
7107 cxx_compat_warn="-Wc++-compat"
7108fi
7109
7110
7111
ba479fd2 7112# If the native compiler is GCC, we can enable warnings even in stage1.
414d23ae
HPN
7113# That's useful for people building cross-compilers, or just running a
7114# quick `make'.
7115warn_cflags=
7116if test "x$GCC" = "xyes"; then
7117 warn_cflags='$(GCC_WARN_CFLAGS)'
7118fi
7119
7120
dd859b8a 7121# Enable -Werror in bootstrap stage2 and later.
a1286ef5
ZW
7122is_release=
7123if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
7124 is_release=yes
7125fi
a6ccdbab 7126# Check whether --enable-werror was given.
dd859b8a 7127if test "${enable_werror+set}" = set; then
a6ccdbab 7128 enableval=$enable_werror;
dd859b8a 7129else
06c37c96
NS
7130 if test x$is_release = x ; then
7131 # Default to "yes" on development branches.
dd859b8a 7132 enable_werror=yes
06c37c96
NS
7133else
7134 # Default to "no" on release branches.
7135 enable_werror=no
7136fi
a6ccdbab
EC
7137fi
7138
dd859b8a
KG
7139if test x$enable_werror = xyes ; then
7140 WERROR=-Werror
7141fi
7142
7143
414d23ae 7144# Enable expensive internal checks
a6ccdbab 7145# Check whether --enable-checking was given.
414d23ae 7146if test "${enable_checking+set}" = set; then
a6ccdbab 7147 enableval=$enable_checking; ac_checking_flags="${enableval}"
e1bbfc5c
NS
7148else
7149
7150# Determine the default checks.
7151if test x$is_release = x ; then
7152 ac_checking_flags=yes
7153else
7154 ac_checking_flags=release
7155fi
a6ccdbab
EC
7156fi
7157
e1bbfc5c
NS
7158ac_assert_checking=1
7159ac_checking=
cdce5c16
NS
7160ac_fold_checking=
7161ac_gc_checking=
7162ac_gc_always_collect=
414d23ae
HPN
7163ac_rtl_checking=
7164ac_rtlflag_checking=
b53ef395 7165ac_runtime_checking=1
cdce5c16
NS
7166ac_tree_checking=
7167ac_valgrind_checking=
e1bbfc5c
NS
7168IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
7169for check in $ac_checking_flags
7170do
7171 case $check in
cdce5c16 7172 # these set all the flags to specific states
e1bbfc5c 7173 yes) ac_assert_checking=1 ; ac_checking=1 ;
cdce5c16
NS
7174 ac_fold_checking= ; ac_gc_checking=1 ;
7175 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 7176 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
cdce5c16
NS
7177 ac_tree_checking=1 ; ac_valgrind_checking= ;;
7178 no|none) ac_assert_checking= ; ac_checking= ;
7179 ac_fold_checking= ; ac_gc_checking= ;
7180 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 7181 ac_rtlflag_checking= ; ac_runtime_checking= ;
cdce5c16 7182 ac_tree_checking= ; ac_valgrind_checking= ;;
e1bbfc5c 7183 all) ac_assert_checking=1 ; ac_checking=1 ;
cdce5c16
NS
7184 ac_fold_checking=1 ; ac_gc_checking=1 ;
7185 ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
7186 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
7187 ac_tree_checking=1 ; ac_valgrind_checking= ;;
7188 release) ac_assert_checking=1 ; ac_checking= ;
7189 ac_fold_checking= ; ac_gc_checking= ;
7190 ac_gc_always_collect= ; ac_rtl_checking= ;
7191 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
7192 ac_tree_checking= ; ac_valgrind_checking= ;;
7193 # these enable particular checks
e1bbfc5c
NS
7194 assert) ac_assert_checking=1 ;;
7195 fold) ac_fold_checking=1 ;;
7196 gc) ac_gc_checking=1 ;;
7197 gcac) ac_gc_always_collect=1 ;;
7198 misc) ac_checking=1 ;;
e1bbfc5c 7199 rtl) ac_rtl_checking=1 ;;
cdce5c16 7200 rtlflag) ac_rtlflag_checking=1 ;;
b53ef395 7201 runtime) ac_runtime_checking=1 ;;
e1bbfc5c 7202 tree) ac_tree_checking=1 ;;
cdce5c16 7203 valgrind) ac_valgrind_checking=1 ;;
e1bbfc5c 7204 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
7205echo "$as_me: error: unknown check category $check" >&2;}
7206 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
7207 esac
7208done
7209IFS="$ac_save_IFS"
06c37c96 7210
ba479fd2
NN
7211nocommon_flag=""
7212if test x$ac_checking != x ; then
7213
7214cat >>confdefs.h <<\_ACEOF
7215#define ENABLE_CHECKING 1
7216_ACEOF
7217
7218 nocommon_flag=-fno-common
7219fi
7220
06c37c96
NS
7221if test x$ac_assert_checking != x ; then
7222
7223cat >>confdefs.h <<\_ACEOF
7224#define ENABLE_ASSERT_CHECKING 1
7225_ACEOF
7226
b53ef395 7227fi
232b67d9 7228
b53ef395
NS
7229if test x$ac_runtime_checking != x ; then
7230
7231cat >>confdefs.h <<\_ACEOF
7232#define ENABLE_RUNTIME_CHECKING 1
7233_ACEOF
7234
06c37c96 7235fi
ba479fd2
NN
7236if test x$ac_tree_checking != x ; then
7237
7238cat >>confdefs.h <<\_ACEOF
7239#define ENABLE_TREE_CHECKING 1
7240_ACEOF
7241
13f05fd0 7242 TREEBROWSER=tree-browser.o
ba479fd2 7243fi
13f05fd0 7244
ba479fd2
NN
7245if test x$ac_rtl_checking != x ; then
7246
7247cat >>confdefs.h <<\_ACEOF
7248#define ENABLE_RTL_CHECKING 1
7249_ACEOF
7250
7251fi
7252if test x$ac_rtlflag_checking != x ; then
7253
7254cat >>confdefs.h <<\_ACEOF
7255#define ENABLE_RTL_FLAG_CHECKING 1
7256_ACEOF
7257
7258fi
7259if test x$ac_gc_checking != x ; then
7260
7261cat >>confdefs.h <<\_ACEOF
7262#define ENABLE_GC_CHECKING 1
7263_ACEOF
7264
7265fi
7266if test x$ac_gc_always_collect != x ; then
7267
7268cat >>confdefs.h <<\_ACEOF
7269#define ENABLE_GC_ALWAYS_COLLECT 1
7270_ACEOF
7271
7272fi
7273if test x$ac_fold_checking != x ; then
7274
7275cat >>confdefs.h <<\_ACEOF
7276#define ENABLE_FOLD_CHECKING 1
7277_ACEOF
7278
7279fi
7280valgrind_path_defines=
7281valgrind_command=
7282
ba479fd2 7283if test "${ac_cv_header_valgrind_h+set}" = set; then
a6ccdbab
EC
7284 { echo "$as_me:$LINENO: checking for valgrind.h" >&5
7285echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6; }
ba479fd2
NN
7286if test "${ac_cv_header_valgrind_h+set}" = set; then
7287 echo $ECHO_N "(cached) $ECHO_C" >&6
7288fi
a6ccdbab
EC
7289{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
7290echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6; }
ba479fd2
NN
7291else
7292 # Is the header compilable?
a6ccdbab
EC
7293{ echo "$as_me:$LINENO: checking valgrind.h usability" >&5
7294echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6; }
ba479fd2 7295cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7296/* confdefs.h. */
7297_ACEOF
7298cat confdefs.h >>conftest.$ac_ext
7299cat >>conftest.$ac_ext <<_ACEOF
7300/* end confdefs.h. */
7301$ac_includes_default
63cf211a 7302#include <valgrind.h>
ba479fd2
NN
7303_ACEOF
7304rm -f conftest.$ac_objext
a6ccdbab
EC
7305if { (ac_try="$ac_compile"
7306case "(($ac_try" in
7307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7308 *) ac_try_echo=$ac_try;;
7309esac
7310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7311 (eval "$ac_compile") 2>conftest.er1
ba479fd2 7312 ac_status=$?
86da66b5
HPN
7313 grep -v '^ *+' conftest.er1 >conftest.err
7314 rm -f conftest.er1
7315 cat conftest.err >&5
ba479fd2 7316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
7317 (exit $ac_status); } && {
7318 test -z "$ac_c_werror_flag" ||
7319 test ! -s conftest.err
7320 } && test -s conftest.$ac_objext; then
ba479fd2
NN
7321 ac_header_compiler=yes
7322else
7323 echo "$as_me: failed program was:" >&5
7324sed 's/^/| /' conftest.$ac_ext >&5
7325
a6ccdbab 7326 ac_header_compiler=no
ba479fd2 7327fi
a6ccdbab
EC
7328
7329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7330{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7331echo "${ECHO_T}$ac_header_compiler" >&6; }
ba479fd2
NN
7332
7333# Is the header present?
a6ccdbab
EC
7334{ echo "$as_me:$LINENO: checking valgrind.h presence" >&5
7335echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6; }
ba479fd2 7336cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7337/* confdefs.h. */
7338_ACEOF
7339cat confdefs.h >>conftest.$ac_ext
7340cat >>conftest.$ac_ext <<_ACEOF
7341/* end confdefs.h. */
7342#include <valgrind.h>
7343_ACEOF
a6ccdbab
EC
7344if { (ac_try="$ac_cpp conftest.$ac_ext"
7345case "(($ac_try" in
7346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7347 *) ac_try_echo=$ac_try;;
7348esac
7349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7350 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
7351 ac_status=$?
7352 grep -v '^ *+' conftest.er1 >conftest.err
7353 rm -f conftest.er1
7354 cat conftest.err >&5
7355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
7356 (exit $ac_status); } >/dev/null && {
7357 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7358 test ! -s conftest.err
7359 }; then
ba479fd2
NN
7360 ac_header_preproc=yes
7361else
7362 echo "$as_me: failed program was:" >&5
7363sed 's/^/| /' conftest.$ac_ext >&5
7364
7365 ac_header_preproc=no
7366fi
a6ccdbab 7367
ba479fd2 7368rm -f conftest.err conftest.$ac_ext
a6ccdbab
EC
7369{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7370echo "${ECHO_T}$ac_header_preproc" >&6; }
ba479fd2
NN
7371
7372# So? What about this header?
86da66b5
HPN
7373case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7374 yes:no: )
ba479fd2
NN
7375 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
7376echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
7377 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
7378echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
7379 ac_header_preproc=yes
ba479fd2 7380 ;;
86da66b5 7381 no:yes:* )
ba479fd2
NN
7382 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
7383echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
7384 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
7385echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
7386 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
7387echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
7388 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
7389echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
7390 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
7391echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
7392 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
7393echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
a6ccdbab 7394
ba479fd2
NN
7395 ;;
7396esac
a6ccdbab
EC
7397{ echo "$as_me:$LINENO: checking for valgrind.h" >&5
7398echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6; }
ba479fd2
NN
7399if test "${ac_cv_header_valgrind_h+set}" = set; then
7400 echo $ECHO_N "(cached) $ECHO_C" >&6
7401else
7402 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 7403fi
a6ccdbab
EC
7404{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
7405echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6; }
ba479fd2 7406
6e3f3080 7407fi
ba479fd2 7408if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
7409 have_valgrind_h=yes
7410else
ba479fd2 7411 have_valgrind_h=no
6938ec6c
NN
7412fi
7413
7414
ba479fd2 7415
cdce5c16 7416if test x$ac_valgrind_checking != x ; then
414d23ae
HPN
7417 # It is certainly possible that there's valgrind but no valgrind.h.
7418 # GCC relies on making annotations so we must have both.
a6ccdbab
EC
7419 { echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
7420echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6; }
ba479fd2 7421 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7422/* confdefs.h. */
7423_ACEOF
7424cat confdefs.h >>conftest.$ac_ext
7425cat >>conftest.$ac_ext <<_ACEOF
7426/* end confdefs.h. */
a207b594 7427#include <valgrind/memcheck.h>
14011ca4
AJ
7428#ifndef VALGRIND_DISCARD
7429#error VALGRIND_DISCARD not defined
7430#endif
ba479fd2 7431_ACEOF
a6ccdbab
EC
7432if { (ac_try="$ac_cpp conftest.$ac_ext"
7433case "(($ac_try" in
7434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7435 *) ac_try_echo=$ac_try;;
7436esac
7437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7438 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
7439 ac_status=$?
7440 grep -v '^ *+' conftest.er1 >conftest.err
7441 rm -f conftest.er1
7442 cat conftest.err >&5
7443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
7444 (exit $ac_status); } >/dev/null && {
7445 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7446 test ! -s conftest.err
7447 }; then
a207b594
HPN
7448 gcc_cv_header_valgrind_memcheck_h=yes
7449else
ba479fd2
NN
7450 echo "$as_me: failed program was:" >&5
7451sed 's/^/| /' conftest.$ac_ext >&5
7452
a207b594
HPN
7453 gcc_cv_header_valgrind_memcheck_h=no
7454fi
a6ccdbab 7455
ba479fd2 7456rm -f conftest.err conftest.$ac_ext
a6ccdbab
EC
7457 { echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
7458echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6; }
7459 { echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
7460echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6; }
ba479fd2 7461 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7462/* confdefs.h. */
7463_ACEOF
7464cat confdefs.h >>conftest.$ac_ext
7465cat >>conftest.$ac_ext <<_ACEOF
7466/* end confdefs.h. */
a207b594
HPN
7467#include <memcheck.h>
7468#ifndef VALGRIND_DISCARD
7469#error VALGRIND_DISCARD not defined
7470#endif
ba479fd2 7471_ACEOF
a6ccdbab
EC
7472if { (ac_try="$ac_cpp conftest.$ac_ext"
7473case "(($ac_try" in
7474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7475 *) ac_try_echo=$ac_try;;
7476esac
7477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7478 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
7479 ac_status=$?
7480 grep -v '^ *+' conftest.er1 >conftest.err
7481 rm -f conftest.er1
7482 cat conftest.err >&5
7483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
7484 (exit $ac_status); } >/dev/null && {
7485 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7486 test ! -s conftest.err
7487 }; then
14011ca4
AJ
7488 gcc_cv_header_memcheck_h=yes
7489else
ba479fd2
NN
7490 echo "$as_me: failed program was:" >&5
7491sed 's/^/| /' conftest.$ac_ext >&5
7492
cafe096b
EC
7493 gcc_cv_header_memcheck_h=no
7494fi
a6ccdbab 7495
ba479fd2 7496rm -f conftest.err conftest.$ac_ext
a6ccdbab
EC
7497 { echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
7498echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6; }
ba479fd2 7499
56694dd9
ZW
7500# Prepare PATH_SEPARATOR.
7501# The user is always right.
7502if test "${PATH_SEPARATOR+set}" != set; then
7503 echo "#! /bin/sh" >conf$$.sh
7504 echo "exit 0" >>conf$$.sh
7505 chmod +x conf$$.sh
7506 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7507 PATH_SEPARATOR=';'
7508 else
7509 PATH_SEPARATOR=:
7510 fi
7511 rm -f conf$$.sh
7512fi
7513
7514# Find out how to test for executable files. Don't use a zero-byte file,
7515# as systems may use methods other than mode bits to determine executability.
7516cat >conf$$.file <<_ASEOF
7517#! /bin/sh
7518exit 0
7519_ASEOF
7520chmod +x conf$$.file
7521if test -x conf$$.file >/dev/null 2>&1; then
7522 ac_executable_p="test -x"
7523else
7524 ac_executable_p="test -f"
7525fi
7526rm -f conf$$.file
7527
7528# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 7529set dummy valgrind; ac_word=$2
a6ccdbab
EC
7530{ echo "$as_me:$LINENO: checking for $ac_word" >&5
7531echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
7532if test "${ac_cv_path_valgrind_path+set}" = set; then
7533 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
7534else
7535 case "$valgrind_path" in
56694dd9
ZW
7536 [\\/]* | ?:[\\/]*)
7537 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
7538 ;;
414d23ae 7539 *)
56694dd9
ZW
7540 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
7541 for ac_dir in $PATH; do
7542 IFS="$ac_save_IFS"
7543 test -z "$ac_dir" && ac_dir=.
7544 for ac_exec_ext in '' $ac_executable_extensions; do
7545 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
7546 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
7547 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
7548 break 2
7549 fi
7550 fi
7551 done
7552 done
7553 IFS="$ac_save_IFS"
7554 ;;
414d23ae 7555esac
75e93faa 7556fi
414d23ae
HPN
7557valgrind_path="$ac_cv_path_valgrind_path"
7558if test -n "$valgrind_path"; then
a6ccdbab
EC
7559 { echo "$as_me:$LINENO: result: $valgrind_path" >&5
7560echo "${ECHO_T}$valgrind_path" >&6; }
414d23ae 7561else
a6ccdbab
EC
7562 { echo "$as_me:$LINENO: result: no" >&5
7563echo "${ECHO_T}no" >&6; }
414d23ae
HPN
7564fi
7565
a207b594
HPN
7566 if test "x$valgrind_path" = "x" \
7567 || (test $have_valgrind_h = no \
7568 && test $gcc_cv_header_memcheck_h = no \
7569 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
7570 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
7571echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
7572 { (exit 1); exit 1; }; }
414d23ae
HPN
7573 fi
7574 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
7575 valgrind_command="$valgrind_path -q"
ba479fd2
NN
7576
7577cat >>confdefs.h <<\_ACEOF
414d23ae 7578#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 7579_ACEOF
75e93faa 7580
a207b594 7581 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
7582
7583cat >>confdefs.h <<\_ACEOF
a207b594 7584#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 7585_ACEOF
a207b594
HPN
7586
7587 fi
14011ca4 7588 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
7589
7590cat >>confdefs.h <<\_ACEOF
14011ca4 7591#define HAVE_MEMCHECK_H 1
ba479fd2 7592_ACEOF
14011ca4
AJ
7593
7594 fi
414d23ae 7595fi
75e93faa 7596
75e93faa
ZW
7597
7598
a6ccdbab 7599# Check whether --enable-mapped-location was given.
74ee1642 7600if test "${enable_mapped_location+set}" = set; then
a6ccdbab 7601 enableval=$enable_mapped_location;
74ee1642
PB
7602else
7603 enable_mapped_location=no
a6ccdbab
EC
7604fi
7605
74ee1642
PB
7606
7607if test "$enable_mapped_location" = yes ; then
7608
7609cat >>confdefs.h <<\_ACEOF
7610#define USE_MAPPED_LOCATION 1
7611_ACEOF
7612
7613fi
7614
414d23ae 7615# Enable code coverage collection
a6ccdbab 7616# Check whether --enable-coverage was given.
414d23ae 7617if test "${enable_coverage+set}" = set; then
a6ccdbab 7618 enableval=$enable_coverage; case "${enableval}" in
6dd297da
NN
7619 yes|noopt)
7620 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
7621 ;;
7622 opt)
7623 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
7624 ;;
7625 no)
7626 # a.k.a. --disable-coverage
7627 coverage_flags=""
7628 ;;
7629 *)
7630 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
7631echo "$as_me: error: unknown coverage setting $enableval" >&2;}
7632 { (exit 1); exit 1; }; }
6dd297da 7633 ;;
414d23ae 7634esac
75e93faa 7635else
414d23ae 7636 coverage_flags=""
a6ccdbab 7637fi
414d23ae 7638
ba479fd2 7639
dd7f7a6e 7640
a6ccdbab
EC
7641# Check whether --enable-gather-detailed-mem-stats was given.
7642if test "${enable_gather_detailed_mem_stats+set}" = set; then
7643 enableval=$enable_gather_detailed_mem_stats;
439a7e54
DN
7644else
7645 enable_gather_detailed_mem_stats=no
a6ccdbab
EC
7646fi
7647
439a7e54 7648if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
7649
7650cat >>confdefs.h <<\_ACEOF
439a7e54 7651#define GATHER_STATISTICS 1
ba479fd2 7652_ACEOF
439a7e54
DN
7653
7654fi
7655
73458fb7
NN
7656# -------------------------------
7657# Miscenalleous configure options
7658# -------------------------------
34a86c2b
NN
7659
7660# With stabs
ba479fd2 7661
a6ccdbab 7662# Check whether --with-stabs was given.
34a86c2b 7663if test "${with_stabs+set}" = set; then
a6ccdbab 7664 withval=$with_stabs; stabs="$with_stabs"
34a86c2b
NN
7665else
7666 stabs=no
a6ccdbab
EC
7667fi
7668
cafe096b 7669
34a86c2b 7670# Determine whether or not multilibs are enabled.
a6ccdbab 7671# Check whether --enable-multilib was given.
34a86c2b 7672if test "${enable_multilib+set}" = set; then
a6ccdbab 7673 enableval=$enable_multilib;
34a86c2b
NN
7674else
7675 enable_multilib=yes
a6ccdbab
EC
7676fi
7677
75e93faa 7678
34a86c2b 7679
414d23ae 7680# Enable __cxa_atexit for C++.
a6ccdbab 7681# Check whether --enable-__cxa_atexit was given.
414d23ae 7682if test "${enable___cxa_atexit+set}" = set; then
a6ccdbab
EC
7683 enableval=$enable___cxa_atexit;
7684fi
75e93faa
ZW
7685
7686
486aa804 7687# Enable C extension for decimal float if target supports it.
a6ccdbab 7688# Check whether --enable-decimal-float was given.
486aa804 7689if test "${enable_decimal_float+set}" = set; then
a6ccdbab 7690 enableval=$enable_decimal_float;
486aa804
BE
7691 if test x$enablevar = xyes ; then
7692 case $target in
7693 powerpc*-*-linux* | i?86*-*-linux*)
a4a9df5f 7694 enable_decimal_float=yes
486aa804
BE
7695 ;;
7696 *)
7697 { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5
7698echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
7699 enable_decimal_float=no
7700 ;;
7701 esac
7702 fi
7703
7704else
a4a9df5f 7705 enable_decimal_float=no
a6ccdbab
EC
7706fi
7707
486aa804
BE
7708
7709
7710
7711dfp=`if test $enable_decimal_float = yes; then echo 1; else echo 0; fi`
7712
7713cat >>confdefs.h <<_ACEOF
7714#define ENABLE_DECIMAL_FLOAT $dfp
7715_ACEOF
7716
7717
414d23ae
HPN
7718# Enable threads
7719# Pass with no value to take the default
7720# Pass with a value to specify a thread package
a6ccdbab 7721# Check whether --enable-threads was given.
414d23ae 7722if test "${enable_threads+set}" = set; then
a6ccdbab 7723 enableval=$enable_threads;
414d23ae
HPN
7724else
7725 enable_threads=''
a6ccdbab 7726fi
8dea1cca 7727
dd7f7a6e 7728
a6ccdbab
EC
7729# Check whether --enable-tls was given.
7730if test "${enable_tls+set}" = set; then
7731 enableval=$enable_tls;
8dea1cca
DD
7732 case $enable_tls in
7733 yes | no) ;;
7734 *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls.
7735Valid choices are 'yes' and 'no'." >&5
7736echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls.
7737Valid choices are 'yes' and 'no'." >&2;}
7738 { (exit 1); exit 1; }; } ;;
7739 esac
7740
7741else
7742 enable_tls=''
a6ccdbab
EC
7743fi
7744
b8ec3cc8 7745
a6ccdbab 7746# Check whether --enable-objc-gc was given.
414d23ae 7747if test "${enable_objc_gc+set}" = set; then
a6ccdbab 7748 enableval=$enable_objc_gc; if test x$enable_objc_gc = xno; then
414d23ae
HPN
7749 objc_boehm_gc=''
7750else
7751 objc_boehm_gc=1
7752fi
7753else
7754 objc_boehm_gc=''
a6ccdbab 7755fi
75e93faa
ZW
7756
7757
a6ccdbab
EC
7758
7759# Check whether --with-dwarf2 was given.
414d23ae 7760if test "${with_dwarf2+set}" = set; then
a6ccdbab 7761 withval=$with_dwarf2; dwarf2="$with_dwarf2"
75e93faa 7762else
414d23ae 7763 dwarf2=no
a6ccdbab 7764fi
ba479fd2 7765
dd7f7a6e 7766
a6ccdbab
EC
7767# Check whether --enable-shared was given.
7768if test "${enable_shared+set}" = set; then
7769 enableval=$enable_shared;
414d23ae
HPN
7770 case $enable_shared in
7771 yes | no) ;;
7772 *)
7773 enable_shared=no
7774 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
7775 for pkg in $enableval; do
7776 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
7777 enable_shared=yes
7778 fi
7779 done
7780 IFS="$ac_save_ifs"
7781 ;;
7782 esac
7783
75e93faa 7784else
414d23ae 7785 enable_shared=yes
a6ccdbab
EC
7786fi
7787
75e93faa 7788
75e93faa 7789
b8ec3cc8 7790
a6ccdbab 7791# Check whether --with-build-sysroot was given.
160633c6 7792if test "${with_build_sysroot+set}" = set; then
a6ccdbab
EC
7793 withval=$with_build_sysroot;
7794fi
160633c6 7795
160633c6
MM
7796
7797
a6ccdbab 7798# Check whether --with-sysroot was given.
4977bab6 7799if test "${with_sysroot+set}" = set; then
a6ccdbab 7800 withval=$with_sysroot;
4977bab6 7801 case ${with_sysroot} in
caa55b1e 7802 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
7803 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
7804 esac
ba479fd2 7805
4977bab6
ZW
7806 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
7807 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
7808
047d636f
DJ
7809 if test "x$exec_prefix" = xNONE; then
7810 if test "x$prefix" = xNONE; then
7811 test_prefix=/usr/local
7812 else
7813 test_prefix=$prefix
7814 fi
7815 else
7816 test_prefix=$exec_prefix
7817 fi
7818 case ${TARGET_SYSTEM_ROOT} in
91710e62
AO
7819 "${test_prefix}"|"${test_prefix}/"*|\
7820 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
7821 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
7822 TARGET_SYSTEM_ROOT_DEFINE="$t"
7823 ;;
7824 esac
7825
4977bab6 7826else
ba479fd2 7827
4977bab6 7828 TARGET_SYSTEM_ROOT=
db720d9a 7829 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
7830 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
7831
a6ccdbab
EC
7832fi
7833
4977bab6
ZW
7834
7835
7836
7837
d1bd0ded 7838# Build with intermodule optimisations
a6ccdbab 7839# Check whether --enable-intermodule was given.
d1bd0ded 7840if test "${enable_intermodule+set}" = set; then
a6ccdbab 7841 enableval=$enable_intermodule; case ${enable_intermodule} in
0c46c5c7
KC
7842 yes) onestep="-onestep";;
7843 *) onestep="";;
d1bd0ded 7844esac
0c46c5c7
KC
7845else
7846 onestep=""
a6ccdbab
EC
7847fi
7848
d1bd0ded
GK
7849
7850
f3c9f174
NN
7851# Sanity check enable_languages in case someone does not run the toplevel
7852# configure # script.
a6ccdbab 7853# Check whether --enable-languages was given.
f3c9f174 7854if test "${enable_languages+set}" = set; then
a6ccdbab 7855 enableval=$enable_languages; case ,${enable_languages}, in
f3c9f174
NN
7856 ,,|,yes,)
7857 # go safe -- we cannot be much sure without the toplevel
7858 # configure's
7859 # analysis of which target libs are present and usable
7860 enable_languages=c
7861 ;;
7862 *,all,*)
7863 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
7864echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
7865 { (exit 1); exit 1; }; }
7866 ;;
7867 *,c,*)
7868 ;;
7869 *)
7870 enable_languages=c,${enable_languages}
7871 ;;
7872esac
7873else
7874 enable_languages=c
a6ccdbab
EC
7875fi
7876
f3c9f174 7877
9288b845
CD
7878# Used by documentation targets
7879
7880
7881
f3c9f174 7882
73458fb7
NN
7883# -------------------------
7884# Checks for other programs
7885# -------------------------
5b67ad6f 7886
a6ccdbab
EC
7887{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7888echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
7889set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
7890if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2 7891 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 7892else
ba479fd2 7893 cat >conftest.make <<\_ACEOF
a6ccdbab 7894SHELL = /bin/sh
e9a25f70 7895all:
a6ccdbab 7896 @echo '@@@%%%=$(MAKE)=@@@%%%'
ba479fd2 7897_ACEOF
e9a25f70 7898# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
a6ccdbab
EC
7899case `${MAKE-make} -f conftest.make 2>/dev/null` in
7900 *@@@%%%=?*=@@@%%%*)
7901 eval ac_cv_prog_make_${ac_make}_set=yes;;
7902 *)
7903 eval ac_cv_prog_make_${ac_make}_set=no;;
7904esac
ba479fd2 7905rm -f conftest.make
e9a25f70 7906fi
a6ccdbab
EC
7907if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
7908 { echo "$as_me:$LINENO: result: yes" >&5
7909echo "${ECHO_T}yes" >&6; }
e9a25f70
JL
7910 SET_MAKE=
7911else
a6ccdbab
EC
7912 { echo "$as_me:$LINENO: result: no" >&5
7913echo "${ECHO_T}no" >&6; }
e9a25f70
JL
7914 SET_MAKE="MAKE=${MAKE-make}"
7915fi
7916
7917
861bb6c1 7918# Find some useful tools
ba479fd2 7919for ac_prog in gawk mawk nawk awk
861bb6c1 7920do
ba479fd2 7921 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 7922set dummy $ac_prog; ac_word=$2
a6ccdbab
EC
7923{ echo "$as_me:$LINENO: checking for $ac_word" >&5
7924echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
7925if test "${ac_cv_prog_AWK+set}" = set; then
7926 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7927else
7928 if test -n "$AWK"; then
7929 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7930else
ba479fd2
NN
7931as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7932for as_dir in $PATH
7933do
7934 IFS=$as_save_IFS
7935 test -z "$as_dir" && as_dir=.
7936 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 7937 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
7938 ac_cv_prog_AWK="$ac_prog"
7939 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7940 break 2
7941 fi
7942done
7943done
a6ccdbab 7944IFS=$as_save_IFS
ba479fd2 7945
861bb6c1
JL
7946fi
7947fi
ba479fd2 7948AWK=$ac_cv_prog_AWK
861bb6c1 7949if test -n "$AWK"; then
a6ccdbab
EC
7950 { echo "$as_me:$LINENO: result: $AWK" >&5
7951echo "${ECHO_T}$AWK" >&6; }
861bb6c1 7952else
a6ccdbab
EC
7953 { echo "$as_me:$LINENO: result: no" >&5
7954echo "${ECHO_T}no" >&6; }
861bb6c1
JL
7955fi
7956
a6ccdbab 7957
ba479fd2 7958 test -n "$AWK" && break
861bb6c1
JL
7959done
7960
776dc15d 7961# We need awk to create options.c and options.h.
2c4902b9
NN
7962# Bail out if it's missing.
7963case ${AWK} in
ba479fd2
NN
7964 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
7965echo "$as_me: error: can't build without awk, bailing out" >&2;}
7966 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
7967esac
7968
a6ccdbab
EC
7969{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
7970echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
ba479fd2
NN
7971if test "${gcc_cv_prog_LN_S+set}" = set; then
7972 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7973else
7974 rm -f conftestdata_t
7975echo >conftestdata_f
7976if ln -s conftestdata_f conftestdata_t 2>/dev/null
7977then
7978 gcc_cv_prog_LN_S="ln -s"
7979else
7980 if ln conftestdata_f conftestdata_t 2>/dev/null
7981 then
7982 gcc_cv_prog_LN_S=ln
7983 else
35f06ae4
PB
7984 if cp -p conftestdata_f conftestdata_t 2>/dev/null
7985 then
06c3418c 7986 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
7987 else
7988 gcc_cv_prog_LN_S=cp
7989 fi
0a4b6309
RL
7990 fi
7991fi
7992rm -f conftestdata_f conftestdata_t
7993
7994fi
7995LN_S="$gcc_cv_prog_LN_S"
7996if test "$gcc_cv_prog_LN_S" = "ln -s"; then
a6ccdbab
EC
7997 { echo "$as_me:$LINENO: result: yes" >&5
7998echo "${ECHO_T}yes" >&6; }
0a4b6309
RL
7999else
8000 if test "$gcc_cv_prog_LN_S" = "ln"; then
a6ccdbab
EC
8001 { echo "$as_me:$LINENO: result: no, using ln" >&5
8002echo "${ECHO_T}no, using ln" >&6; }
0a4b6309 8003 else
a6ccdbab
EC
8004 { echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
8005echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6; }
0a4b6309
RL
8006 fi
8007fi
8008
a6ccdbab
EC
8009{ echo "$as_me:$LINENO: checking whether ln works" >&5
8010echo $ECHO_N "checking whether ln works... $ECHO_C" >&6; }
18fc9bd4
RG
8011if test "${acx_cv_prog_LN+set}" = set; then
8012 echo $ECHO_N "(cached) $ECHO_C" >&6
8013else
8014 rm -f conftestdata_t
8015echo >conftestdata_f
8016if ln conftestdata_f conftestdata_t 2>/dev/null
8017then
8018 acx_cv_prog_LN=ln
8019else
8020 acx_cv_prog_LN=no
8021fi
8022rm -f conftestdata_f conftestdata_t
8023
8024fi
8025if test $acx_cv_prog_LN = no; then
8026 LN="$LN_S"
a6ccdbab
EC
8027 { echo "$as_me:$LINENO: result: no, using $LN" >&5
8028echo "${ECHO_T}no, using $LN" >&6; }
18fc9bd4
RG
8029else
8030 LN="$acx_cv_prog_LN"
a6ccdbab
EC
8031 { echo "$as_me:$LINENO: result: yes" >&5
8032echo "${ECHO_T}yes" >&6; }
18fc9bd4
RG
8033fi
8034
ba479fd2
NN
8035if test -n "$ac_tool_prefix"; then
8036 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8037set dummy ${ac_tool_prefix}ranlib; ac_word=$2
a6ccdbab
EC
8038{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8039echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
8040if test "${ac_cv_prog_RANLIB+set}" = set; then
8041 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
8042else
8043 if test -n "$RANLIB"; then
8044 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8045else
ba479fd2
NN
8046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8047for as_dir in $PATH
8048do
8049 IFS=$as_save_IFS
8050 test -z "$as_dir" && as_dir=.
8051 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 8052 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
8053 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8054 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8055 break 2
8056 fi
8057done
8058done
a6ccdbab 8059IFS=$as_save_IFS
ba479fd2 8060
6e3f3080
NN
8061fi
8062fi
ba479fd2 8063RANLIB=$ac_cv_prog_RANLIB
6e3f3080 8064if test -n "$RANLIB"; then
a6ccdbab
EC
8065 { echo "$as_me:$LINENO: result: $RANLIB" >&5
8066echo "${ECHO_T}$RANLIB" >&6; }
ba479fd2 8067else
a6ccdbab
EC
8068 { echo "$as_me:$LINENO: result: no" >&5
8069echo "${ECHO_T}no" >&6; }
ba479fd2
NN
8070fi
8071
a6ccdbab 8072
ba479fd2
NN
8073fi
8074if test -z "$ac_cv_prog_RANLIB"; then
8075 ac_ct_RANLIB=$RANLIB
8076 # Extract the first word of "ranlib", so it can be a program name with args.
8077set dummy ranlib; ac_word=$2
a6ccdbab
EC
8078{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8079echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
8080if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8081 echo $ECHO_N "(cached) $ECHO_C" >&6
8082else
8083 if test -n "$ac_ct_RANLIB"; then
8084 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8085else
8086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8087for as_dir in $PATH
8088do
8089 IFS=$as_save_IFS
8090 test -z "$as_dir" && as_dir=.
8091 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 8092 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
8093 ac_cv_prog_ac_ct_RANLIB="ranlib"
8094 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8095 break 2
8096 fi
8097done
8098done
a6ccdbab 8099IFS=$as_save_IFS
ba479fd2 8100
ba479fd2
NN
8101fi
8102fi
8103ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8104if test -n "$ac_ct_RANLIB"; then
a6ccdbab
EC
8105 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8106echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
6e3f3080 8107else
a6ccdbab
EC
8108 { echo "$as_me:$LINENO: result: no" >&5
8109echo "${ECHO_T}no" >&6; }
ba479fd2
NN
8110fi
8111
a6ccdbab
EC
8112 if test "x$ac_ct_RANLIB" = x; then
8113 RANLIB=":"
8114 else
8115 case $cross_compiling:$ac_tool_warned in
8116yes:)
8117{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
8118whose name does not start with the host triplet. If you think this
8119configuration is useful to you, please write to autoconf@gnu.org." >&5
8120echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
8121whose name does not start with the host triplet. If you think this
8122configuration is useful to you, please write to autoconf@gnu.org." >&2;}
8123ac_tool_warned=yes ;;
8124esac
8125 RANLIB=$ac_ct_RANLIB
8126 fi
ba479fd2
NN
8127else
8128 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
8129fi
8130
343a6100
MM
8131case "${host}" in
8132*-*-darwin*)
8133 # By default, the Darwin ranlib will not treat common symbols as
8134 # definitions when building the archive table of contents. Other
8135 # ranlibs do that; pass an option to the Darwin ranlib that makes
8136 # it behave similarly.
8137 ranlib_flags="-c"
8138 ;;
8139*)
8140 ranlib_flags=""
8141esac
8142
8143
0a4b6309
RL
8144# Find a good install program. We prefer a C program (faster),
8145# so one script is as good as another. But avoid the broken or
8146# incompatible versions:
8147# SysV /etc/install, /usr/sbin/install
8148# SunOS /usr/etc/install
8149# IRIX /sbin/install
8150# AIX /bin/install
8151# AFS /usr/afsws/bin/install, which mishandles nonexistent args
8152# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8153# ./install, which can be erroneously created by make from ./install.sh.
a6ccdbab
EC
8154{ echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
8155echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6; }
0a4b6309 8156if test -z "$INSTALL"; then
ba479fd2
NN
8157if test "${ac_cv_path_install+set}" = set; then
8158 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
8159else
8160 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
8161 for ac_dir in $PATH; do
8162 # Account for people who put trailing slashes in PATH elements.
8163 case "$ac_dir/" in
8164 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
8165 *)
8166 # OSF1 and SCO ODT 3.0 have their own names for install.
8167 for ac_prog in ginstall scoinst install; do
8168 if test -f $ac_dir/$ac_prog; then
8169 if test $ac_prog = install &&
8170 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
8171 # AIX install. It has an incompatible calling convention.
8172 # OSF/1 installbsd also uses dspmsg, but is usable.
8173 :
8174 else
8175 ac_cv_path_install="$ac_dir/$ac_prog -c"
8176 break 2
8177 fi
8178 fi
8179 done
8180 ;;
8181 esac
8182 done
8183 IFS="$ac_save_IFS"
8184
8185fi
8186 if test "${ac_cv_path_install+set}" = set; then
8187 INSTALL="$ac_cv_path_install"
8188 else
8189 # As a last resort, use the slow shell script. We don't cache a
8190 # path for INSTALL within a source directory, because that will
8191 # break other packages using the cache if that directory is
8192 # removed, or if the path is relative.
8193 INSTALL="$ac_install_sh"
8194 fi
8195fi
a6ccdbab
EC
8196{ echo "$as_me:$LINENO: result: $INSTALL" >&5
8197echo "${ECHO_T}$INSTALL" >&6; }
0a4b6309
RL
8198
8199# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8200# It thinks the first close brace ends the variable substitution.
8201test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8202
8203test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8204
861bb6c1 8205
3a000df0 8206# See if cmp has --ignore-initial.
a6ccdbab
EC
8207{ echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
8208echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6; }
ba479fd2
NN
8209if test "${gcc_cv_prog_cmp_skip+set}" = set; then
8210 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
8211else
8212 echo abfoo >t1
8213 echo cdfoo >t2
269a7343 8214 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
8215 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
8216 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 8217 :
3a000df0
KC
8218 else
8219 gcc_cv_prog_cmp_skip=gnucompare
8220 fi
269a7343
KG
8221 fi
8222 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
8223 if cmp t1 t2 2 2 > /dev/null 2>&1; then
8224 if cmp t1 t2 1 1 > /dev/null 2>&1; then
8225 :
8226 else
8227 gcc_cv_prog_cmp_skip=fastcompare
8228 fi
8229 fi
3a000df0
KC
8230 fi
8231 rm t1 t2
8232
8233fi
a6ccdbab
EC
8234{ echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
8235echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6; }
3a000df0
KC
8236make_compare_target=$gcc_cv_prog_cmp_skip
8237
8238
8239
73458fb7
NN
8240# See if we have the mktemp command.
8241# Extract the first word of "mktemp", so it can be a program name with args.
8242set dummy mktemp; ac_word=$2
a6ccdbab
EC
8243{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8244echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
8245if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
8246 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8247else
8248 if test -n "$have_mktemp_command"; then
8249 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
8250else
ba479fd2
NN
8251as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8252for as_dir in $PATH
8253do
8254 IFS=$as_save_IFS
8255 test -z "$as_dir" && as_dir=.
8256 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 8257 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
8258 ac_cv_prog_have_mktemp_command="yes"
8259 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8260 break 2
8261 fi
8262done
8263done
a6ccdbab 8264IFS=$as_save_IFS
ba479fd2 8265
73458fb7
NN
8266 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
8267fi
8268fi
ba479fd2 8269have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 8270if test -n "$have_mktemp_command"; then
a6ccdbab
EC
8271 { echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
8272echo "${ECHO_T}$have_mktemp_command" >&6; }
73458fb7 8273else
a6ccdbab
EC
8274 { echo "$as_me:$LINENO: result: no" >&5
8275echo "${ECHO_T}no" >&6; }
73458fb7
NN
8276fi
8277
8278
a6ccdbab 8279
7c27e184
PB
8280MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing"
8281
8282# See if makeinfo has been installed and is modern enough
8283# that we can use it.
9f18db39
PB
8284
8285ac_executable_extensions="$build_exeext"
8286
7c27e184 8287# Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 8288set dummy makeinfo; ac_word=$2
a6ccdbab
EC
8289{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8290echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
8291if test "${ac_cv_prog_MAKEINFO+set}" = set; then
8292 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8293else
8294 if test -n "$MAKEINFO"; then
8295 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
8296else
ba479fd2
NN
8297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8298for as_dir in $PATH
8299do
8300 IFS=$as_save_IFS
8301 test -z "$as_dir" && as_dir=.
8302 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 8303 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
8304 ac_cv_prog_MAKEINFO="makeinfo"
8305 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8306 break 2
8307 fi
8308done
8309done
a6ccdbab 8310IFS=$as_save_IFS
ba479fd2 8311
73458fb7
NN
8312fi
8313fi
ba479fd2 8314MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 8315if test -n "$MAKEINFO"; then
a6ccdbab
EC
8316 { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
8317echo "${ECHO_T}$MAKEINFO" >&6; }
73458fb7 8318else
a6ccdbab
EC
8319 { echo "$as_me:$LINENO: result: no" >&5
8320echo "${ECHO_T}no" >&6; }
73458fb7
NN
8321fi
8322
a6ccdbab 8323
73458fb7
NN
8324if test -n "$MAKEINFO"; then
8325 # Found it, now check the version.
a6ccdbab
EC
8326 { echo "$as_me:$LINENO: checking for modern makeinfo" >&5
8327echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6; }
ba479fd2
NN
8328if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
8329 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8330else
8331 ac_prog_version=`$MAKEINFO --version 2>&1 |
8332 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
a6ccdbab 8333 echo "configure:8333: version of makeinfo is $ac_prog_version" >&5
73458fb7
NN
8334 case $ac_prog_version in
8335 '') gcc_cv_prog_makeinfo_modern=no;;
1a598a97 8336 4.[4-9]*)
73458fb7
NN
8337 gcc_cv_prog_makeinfo_modern=yes;;
8338 *) gcc_cv_prog_makeinfo_modern=no;;
8339 esac
8340
8341fi
a6ccdbab
EC
8342{ echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
8343echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6; }
73458fb7
NN
8344else
8345 gcc_cv_prog_makeinfo_modern=no
8346fi
8347
73458fb7 8348if test $gcc_cv_prog_makeinfo_modern = no; then
7c27e184 8349 MAKEINFO="$MISSING makeinfo"
ba479fd2
NN
8350 { echo "$as_me:$LINENO: WARNING:
8351*** Makeinfo is missing or too old.
8352*** Info documentation will not be built." >&5
8353echo "$as_me: WARNING:
cafe096b 8354*** Makeinfo is missing or too old.
ba479fd2 8355*** Info documentation will not be built." >&2;}
73458fb7
NN
8356 BUILD_INFO=
8357else
ba479fd2 8358 BUILD_INFO=info
73458fb7
NN
8359fi
8360
7c27e184 8361
73458fb7 8362# Is pod2man recent enough to regenerate manpages?
a6ccdbab
EC
8363{ echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
8364echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6; }
73458fb7 8365if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
a6ccdbab
EC
8366 { echo "$as_me:$LINENO: result: yes" >&5
8367echo "${ECHO_T}yes" >&6; }
ba479fd2 8368 GENERATED_MANPAGES=generated-manpages
73458fb7 8369else
a6ccdbab
EC
8370 { echo "$as_me:$LINENO: result: no" >&5
8371echo "${ECHO_T}no" >&6; }
73458fb7
NN
8372 GENERATED_MANPAGES=
8373fi
8374
7c27e184 8375
73458fb7 8376# How about lex?
7c27e184
PB
8377for ac_prog in flex
8378do
8379 # Extract the first word of "$ac_prog", so it can be a program name with args.
8380set dummy $ac_prog; ac_word=$2
a6ccdbab
EC
8381{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8382echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
8383if test "${ac_cv_prog_FLEX+set}" = set; then
8384 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8385else
8386 if test -n "$FLEX"; then
8387 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
8388else
ba479fd2
NN
8389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8390for as_dir in $PATH
8391do
8392 IFS=$as_save_IFS
8393 test -z "$as_dir" && as_dir=.
8394 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 8395 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7c27e184 8396 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
8397 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8398 break 2
8399 fi
8400done
8401done
a6ccdbab 8402IFS=$as_save_IFS
ba479fd2 8403
73458fb7
NN
8404fi
8405fi
ba479fd2 8406FLEX=$ac_cv_prog_FLEX
73458fb7 8407if test -n "$FLEX"; then
a6ccdbab
EC
8408 { echo "$as_me:$LINENO: result: $FLEX" >&5
8409echo "${ECHO_T}$FLEX" >&6; }
73458fb7 8410else
a6ccdbab
EC
8411 { echo "$as_me:$LINENO: result: no" >&5
8412echo "${ECHO_T}no" >&6; }
73458fb7
NN
8413fi
8414
a6ccdbab 8415
7c27e184
PB
8416 test -n "$FLEX" && break
8417done
8418test -n "$FLEX" || FLEX="$MISSING flex"
8419
73458fb7
NN
8420
8421# Bison?
7c27e184
PB
8422for ac_prog in bison
8423do
8424 # Extract the first word of "$ac_prog", so it can be a program name with args.
8425set dummy $ac_prog; ac_word=$2
a6ccdbab
EC
8426{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8427echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
8428if test "${ac_cv_prog_BISON+set}" = set; then
8429 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8430else
8431 if test -n "$BISON"; then
8432 ac_cv_prog_BISON="$BISON" # Let the user override the test.
8433else
ba479fd2
NN
8434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8435for as_dir in $PATH
8436do
8437 IFS=$as_save_IFS
8438 test -z "$as_dir" && as_dir=.
8439 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 8440 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7c27e184 8441 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
8442 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8443 break 2
8444 fi
8445done
8446done
a6ccdbab 8447IFS=$as_save_IFS
ba479fd2 8448
73458fb7
NN
8449fi
8450fi
ba479fd2 8451BISON=$ac_cv_prog_BISON
73458fb7 8452if test -n "$BISON"; then
a6ccdbab
EC
8453 { echo "$as_me:$LINENO: result: $BISON" >&5
8454echo "${ECHO_T}$BISON" >&6; }
73458fb7 8455else
a6ccdbab
EC
8456 { echo "$as_me:$LINENO: result: no" >&5
8457echo "${ECHO_T}no" >&6; }
73458fb7
NN
8458fi
8459
a6ccdbab 8460
7c27e184
PB
8461 test -n "$BISON" && break
8462done
8463test -n "$BISON" || BISON="$MISSING bison"
8464
8465
8466# Binutils are not build modules, unlike bison/flex/makeinfo. So we
8467# check for build == host before using them.
73458fb7 8468
f6a874ac 8469# NM
414adbdd
GK
8470if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
8471 && test -d ../binutils ; then
f6a874ac
JW
8472 NM='$(objdir)/../binutils/nm-new'
8473else
8474 # Extract the first word of "nm", so it can be a program name with args.
8475set dummy nm; ac_word=$2
a6ccdbab
EC
8476{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8477echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
f6a874ac
JW
8478if test "${ac_cv_prog_NM+set}" = set; then
8479 echo $ECHO_N "(cached) $ECHO_C" >&6
8480else
8481 if test -n "$NM"; then
8482 ac_cv_prog_NM="$NM" # Let the user override the test.
8483else
8484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8485for as_dir in $PATH
8486do
8487 IFS=$as_save_IFS
8488 test -z "$as_dir" && as_dir=.
8489 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 8490 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
f6a874ac
JW
8491 ac_cv_prog_NM="nm"
8492 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8493 break 2
8494 fi
8495done
8496done
a6ccdbab 8497IFS=$as_save_IFS
f6a874ac
JW
8498
8499 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
8500fi
8501fi
8502NM=$ac_cv_prog_NM
8503if test -n "$NM"; then
a6ccdbab
EC
8504 { echo "$as_me:$LINENO: result: $NM" >&5
8505echo "${ECHO_T}$NM" >&6; }
f6a874ac 8506else
a6ccdbab
EC
8507 { echo "$as_me:$LINENO: result: no" >&5
8508echo "${ECHO_T}no" >&6; }
f6a874ac
JW
8509fi
8510
a6ccdbab 8511
f6a874ac
JW
8512fi
8513
8514# AR
414adbdd
GK
8515if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
8516 && test -d ../binutils ; then
f6a874ac
JW
8517 AR='$(objdir)/../binutils/ar'
8518else
8519 # Extract the first word of "ar", so it can be a program name with args.
8520set dummy ar; ac_word=$2
a6ccdbab
EC
8521{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8522echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
f6a874ac
JW
8523if test "${ac_cv_prog_AR+set}" = set; then
8524 echo $ECHO_N "(cached) $ECHO_C" >&6
8525else
8526 if test -n "$AR"; then
8527 ac_cv_prog_AR="$AR" # Let the user override the test.
8528else
8529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8530for as_dir in $PATH
8531do
8532 IFS=$as_save_IFS
8533 test -z "$as_dir" && as_dir=.
8534 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 8535 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
f6a874ac
JW
8536 ac_cv_prog_AR="ar"
8537 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8538 break 2
8539 fi
8540done
8541done
a6ccdbab 8542IFS=$as_save_IFS
f6a874ac
JW
8543
8544 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
8545fi
8546fi
8547AR=$ac_cv_prog_AR
8548if test -n "$AR"; then
a6ccdbab
EC
8549 { echo "$as_me:$LINENO: result: $AR" >&5
8550echo "${ECHO_T}$AR" >&6; }
f6a874ac 8551else
a6ccdbab
EC
8552 { echo "$as_me:$LINENO: result: no" >&5
8553echo "${ECHO_T}no" >&6; }
f6a874ac
JW
8554fi
8555
a6ccdbab 8556
f6a874ac
JW
8557fi
8558
8559
73458fb7
NN
8560# --------------------
8561# Checks for C headers
8562# --------------------
8563
a6ccdbab
EC
8564{ echo "$as_me:$LINENO: checking for GNU C library" >&5
8565echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6; }
ba479fd2
NN
8566if test "${gcc_cv_glibc+set}" = set; then
8567 echo $ECHO_N "(cached) $ECHO_C" >&6
8568else
8569 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8570/* confdefs.h. */
8571_ACEOF
8572cat confdefs.h >>conftest.$ac_ext
8573cat >>conftest.$ac_ext <<_ACEOF
8574/* end confdefs.h. */
73458fb7 8575#include <features.h>
ba479fd2
NN
8576int
8577main ()
8578{
73458fb7
NN
8579
8580#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
8581#error Not a GNU C library system
8582#endif
ba479fd2
NN
8583 ;
8584 return 0;
8585}
8586_ACEOF
8587rm -f conftest.$ac_objext
a6ccdbab
EC
8588if { (ac_try="$ac_compile"
8589case "(($ac_try" in
8590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8591 *) ac_try_echo=$ac_try;;
8592esac
8593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8594 (eval "$ac_compile") 2>conftest.er1
ba479fd2 8595 ac_status=$?
86da66b5
HPN
8596 grep -v '^ *+' conftest.er1 >conftest.err
8597 rm -f conftest.er1
8598 cat conftest.err >&5
ba479fd2 8599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
8600 (exit $ac_status); } && {
8601 test -z "$ac_c_werror_flag" ||
8602 test ! -s conftest.err
8603 } && test -s conftest.$ac_objext; then
73458fb7
NN
8604 gcc_cv_glibc=yes
8605else
ba479fd2
NN
8606 echo "$as_me: failed program was:" >&5
8607sed 's/^/| /' conftest.$ac_ext >&5
8608
a6ccdbab 8609 gcc_cv_glibc=no
73458fb7 8610fi
a6ccdbab
EC
8611
8612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
8613fi
8614
a6ccdbab
EC
8615{ echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
8616echo "${ECHO_T}$gcc_cv_glibc" >&6; }
73458fb7 8617if test $gcc_cv_glibc = yes; then
ba479fd2
NN
8618
8619cat >>confdefs.h <<\_ACEOF
73458fb7 8620#define _GNU_SOURCE 1
ba479fd2 8621_ACEOF
73458fb7
NN
8622
8623fi
8624
ca9bc441
NN
8625# Need to reject headers which give warnings, so that the -Werror bootstrap
8626# works later. *sigh* This needs to come before all header checks.
18fc9bd4 8627
ca9bc441
NN
8628ac_c_preproc_warn_flag=yes
8629
a6ccdbab
EC
8630{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
8631echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
ba479fd2
NN
8632if test "${ac_cv_header_stdc+set}" = set; then
8633 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8634else
ba479fd2 8635 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8636/* confdefs.h. */
8637_ACEOF
8638cat confdefs.h >>conftest.$ac_ext
8639cat >>conftest.$ac_ext <<_ACEOF
8640/* end confdefs.h. */
956d6950
JL
8641#include <stdlib.h>
8642#include <stdarg.h>
8643#include <string.h>
8644#include <float.h>
ba479fd2
NN
8645
8646int
8647main ()
8648{
8649
8650 ;
8651 return 0;
8652}
8653_ACEOF
8654rm -f conftest.$ac_objext
a6ccdbab
EC
8655if { (ac_try="$ac_compile"
8656case "(($ac_try" in
8657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8658 *) ac_try_echo=$ac_try;;
8659esac
8660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8661 (eval "$ac_compile") 2>conftest.er1
ba479fd2 8662 ac_status=$?
86da66b5
HPN
8663 grep -v '^ *+' conftest.er1 >conftest.err
8664 rm -f conftest.er1
8665 cat conftest.err >&5
ba479fd2 8666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
8667 (exit $ac_status); } && {
8668 test -z "$ac_c_werror_flag" ||
8669 test ! -s conftest.err
8670 } && test -s conftest.$ac_objext; then
956d6950
JL
8671 ac_cv_header_stdc=yes
8672else
ba479fd2
NN
8673 echo "$as_me: failed program was:" >&5
8674sed 's/^/| /' conftest.$ac_ext >&5
8675
a6ccdbab 8676 ac_cv_header_stdc=no
956d6950 8677fi
a6ccdbab
EC
8678
8679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
8680
8681if test $ac_cv_header_stdc = yes; then
8682 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 8683 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8684/* confdefs.h. */
8685_ACEOF
8686cat confdefs.h >>conftest.$ac_ext
8687cat >>conftest.$ac_ext <<_ACEOF
8688/* end confdefs.h. */
956d6950 8689#include <string.h>
ba479fd2
NN
8690
8691_ACEOF
956d6950 8692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8693 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
8694 :
8695else
956d6950
JL
8696 ac_cv_header_stdc=no
8697fi
8698rm -f conftest*
8699
8700fi
8701
8702if test $ac_cv_header_stdc = yes; then
8703 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 8704 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8705/* confdefs.h. */
8706_ACEOF
8707cat confdefs.h >>conftest.$ac_ext
8708cat >>conftest.$ac_ext <<_ACEOF
8709/* end confdefs.h. */
956d6950 8710#include <stdlib.h>
ba479fd2
NN
8711
8712_ACEOF
956d6950 8713if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8714 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
8715 :
8716else
956d6950
JL
8717 ac_cv_header_stdc=no
8718fi
8719rm -f conftest*
8720
8721fi
8722
8723if test $ac_cv_header_stdc = yes; then
8724 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 8725 if test "$cross_compiling" = yes; then
956d6950
JL
8726 :
8727else
ba479fd2 8728 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8729/* confdefs.h. */
8730_ACEOF
8731cat confdefs.h >>conftest.$ac_ext
8732cat >>conftest.$ac_ext <<_ACEOF
8733/* end confdefs.h. */
956d6950 8734#include <ctype.h>
a6ccdbab 8735#include <stdlib.h>
ba479fd2
NN
8736#if ((' ' & 0x0FF) == 0x020)
8737# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8738# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8739#else
8740# define ISLOWER(c) \
86da66b5
HPN
8741 (('a' <= (c) && (c) <= 'i') \
8742 || ('j' <= (c) && (c) <= 'r') \
8743 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
8744# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8745#endif
63cf211a 8746
ba479fd2
NN
8747#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8748int
8749main ()
8750{
8751 int i;
8752 for (i = 0; i < 256; i++)
8753 if (XOR (islower (i), ISLOWER (i))
86da66b5 8754 || toupper (i) != TOUPPER (i))
a6ccdbab
EC
8755 return 2;
8756 return 0;
ba479fd2
NN
8757}
8758_ACEOF
8759rm -f conftest$ac_exeext
a6ccdbab
EC
8760if { (ac_try="$ac_link"
8761case "(($ac_try" in
8762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8763 *) ac_try_echo=$ac_try;;
8764esac
8765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8766 (eval "$ac_link") 2>&5
ba479fd2
NN
8767 ac_status=$?
8768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8769 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a6ccdbab
EC
8770 { (case "(($ac_try" in
8771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8772 *) ac_try_echo=$ac_try;;
8773esac
8774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8775 (eval "$ac_try") 2>&5
ba479fd2
NN
8776 ac_status=$?
8777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8778 (exit $ac_status); }; }; then
956d6950
JL
8779 :
8780else
ba479fd2
NN
8781 echo "$as_me: program exited with status $ac_status" >&5
8782echo "$as_me: failed program was:" >&5
8783sed 's/^/| /' conftest.$ac_ext >&5
8784
8785( exit $ac_status )
8786ac_cv_header_stdc=no
956d6950 8787fi
a6ccdbab 8788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 8789fi
a6ccdbab
EC
8790
8791
956d6950
JL
8792fi
8793fi
a6ccdbab
EC
8794{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8795echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
63cf211a 8796if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
8797
8798cat >>confdefs.h <<\_ACEOF
956d6950 8799#define STDC_HEADERS 1
ba479fd2 8800_ACEOF
956d6950
JL
8801
8802fi
8803
a6ccdbab
EC
8804{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
8805echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
ba479fd2
NN
8806if test "${ac_cv_header_time+set}" = set; then
8807 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8808else
ba479fd2 8809 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8810/* confdefs.h. */
8811_ACEOF
8812cat confdefs.h >>conftest.$ac_ext
8813cat >>conftest.$ac_ext <<_ACEOF
8814/* end confdefs.h. */
956d6950
JL
8815#include <sys/types.h>
8816#include <sys/time.h>
8817#include <time.h>
ba479fd2
NN
8818
8819int
8820main ()
8821{
8822if ((struct tm *) 0)
8823return 0;
8824 ;
8825 return 0;
8826}
8827_ACEOF
8828rm -f conftest.$ac_objext
a6ccdbab
EC
8829if { (ac_try="$ac_compile"
8830case "(($ac_try" in
8831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8832 *) ac_try_echo=$ac_try;;
8833esac
8834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8835 (eval "$ac_compile") 2>conftest.er1
ba479fd2 8836 ac_status=$?
86da66b5
HPN
8837 grep -v '^ *+' conftest.er1 >conftest.err
8838 rm -f conftest.er1
8839 cat conftest.err >&5
ba479fd2 8840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
8841 (exit $ac_status); } && {
8842 test -z "$ac_c_werror_flag" ||
8843 test ! -s conftest.err
8844 } && test -s conftest.$ac_objext; then
956d6950
JL
8845 ac_cv_header_time=yes
8846else
ba479fd2
NN
8847 echo "$as_me: failed program was:" >&5
8848sed 's/^/| /' conftest.$ac_ext >&5
8849
a6ccdbab 8850 ac_cv_header_time=no
956d6950 8851fi
a6ccdbab
EC
8852
8853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 8854fi
a6ccdbab
EC
8855{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
8856echo "${ECHO_T}$ac_cv_header_time" >&6; }
63cf211a 8857if test $ac_cv_header_time = yes; then
ba479fd2
NN
8858
8859cat >>confdefs.h <<\_ACEOF
956d6950 8860#define TIME_WITH_SYS_TIME 1
ba479fd2 8861_ACEOF
956d6950
JL
8862
8863fi
8864
a6ccdbab
EC
8865{ echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
8866echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6; }
18fc9bd4
RG
8867if test "${gcc_cv_header_string+set}" = set; then
8868 echo $ECHO_N "(cached) $ECHO_C" >&6
8869else
8870 cat >conftest.$ac_ext <<_ACEOF
8871/* confdefs.h. */
8872_ACEOF
8873cat confdefs.h >>conftest.$ac_ext
8874cat >>conftest.$ac_ext <<_ACEOF
8875/* end confdefs.h. */
8876#include <string.h>
8877#include <strings.h>
8878int
8879main ()
8880{
8881
8882 ;
8883 return 0;
8884}
8885_ACEOF
8886rm -f conftest.$ac_objext
a6ccdbab
EC
8887if { (ac_try="$ac_compile"
8888case "(($ac_try" in
8889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8890 *) ac_try_echo=$ac_try;;
8891esac
8892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8893 (eval "$ac_compile") 2>conftest.er1
18fc9bd4
RG
8894 ac_status=$?
8895 grep -v '^ *+' conftest.er1 >conftest.err
8896 rm -f conftest.er1
8897 cat conftest.err >&5
8898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
8899 (exit $ac_status); } && {
8900 test -z "$ac_c_werror_flag" ||
8901 test ! -s conftest.err
8902 } && test -s conftest.$ac_objext; then
18fc9bd4
RG
8903 gcc_cv_header_string=yes
8904else
8905 echo "$as_me: failed program was:" >&5
8906sed 's/^/| /' conftest.$ac_ext >&5
8907
a6ccdbab 8908 gcc_cv_header_string=no
18fc9bd4 8909fi
a6ccdbab
EC
8910
8911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18fc9bd4 8912fi
a6ccdbab
EC
8913{ echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
8914echo "${ECHO_T}$gcc_cv_header_string" >&6; }
18fc9bd4
RG
8915if test $gcc_cv_header_string = yes; then
8916
8917cat >>confdefs.h <<\_ACEOF
8918#define STRING_WITH_STRINGS 1
8919_ACEOF
8920
8921fi
8922
a6ccdbab
EC
8923{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
8924echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
ba479fd2
NN
8925if test "${ac_cv_header_sys_wait_h+set}" = set; then
8926 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 8927else
ba479fd2 8928 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8929/* confdefs.h. */
8930_ACEOF
8931cat confdefs.h >>conftest.$ac_ext
8932cat >>conftest.$ac_ext <<_ACEOF
8933/* end confdefs.h. */
e9831ca0
KG
8934#include <sys/types.h>
8935#include <sys/wait.h>
8936#ifndef WEXITSTATUS
a6ccdbab 8937# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
e9831ca0
KG
8938#endif
8939#ifndef WIFEXITED
ba479fd2 8940# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 8941#endif
ba479fd2
NN
8942
8943int
8944main ()
8945{
8946 int s;
8947 wait (&s);
8948 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8949 ;
8950 return 0;
8951}
8952_ACEOF
8953rm -f conftest.$ac_objext
a6ccdbab
EC
8954if { (ac_try="$ac_compile"
8955case "(($ac_try" in
8956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8957 *) ac_try_echo=$ac_try;;
8958esac
8959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8960 (eval "$ac_compile") 2>conftest.er1
ba479fd2 8961 ac_status=$?
86da66b5
HPN
8962 grep -v '^ *+' conftest.er1 >conftest.err
8963 rm -f conftest.er1
8964 cat conftest.err >&5
ba479fd2 8965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
8966 (exit $ac_status); } && {
8967 test -z "$ac_c_werror_flag" ||
8968 test ! -s conftest.err
8969 } && test -s conftest.$ac_objext; then
e9831ca0
KG
8970 ac_cv_header_sys_wait_h=yes
8971else
ba479fd2
NN
8972 echo "$as_me: failed program was:" >&5
8973sed 's/^/| /' conftest.$ac_ext >&5
8974
a6ccdbab 8975 ac_cv_header_sys_wait_h=no
e9831ca0 8976fi
a6ccdbab
EC
8977
8978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 8979fi
a6ccdbab
EC
8980{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
8981echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
63cf211a 8982if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
8983
8984cat >>confdefs.h <<\_ACEOF
e9831ca0 8985#define HAVE_SYS_WAIT_H 1
ba479fd2 8986_ACEOF
6e3f3080 8987
63cf211a 8988fi
6e3f3080 8989
ba479fd2
NN
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
dfb77e37
KC
9011
9012for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 9013 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 9014 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 9015 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 9016do
ba479fd2 9017as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a6ccdbab
EC
9018{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9019echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9020if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2 9021 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9022else
18fc9bd4 9023 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9024/* confdefs.h. */
9025_ACEOF
9026cat confdefs.h >>conftest.$ac_ext
9027cat >>conftest.$ac_ext <<_ACEOF
9028/* end confdefs.h. */
9029#include <$ac_header>
9030_ACEOF
a6ccdbab
EC
9031if { (ac_try="$ac_cpp conftest.$ac_ext"
9032case "(($ac_try" in
9033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9034 *) ac_try_echo=$ac_try;;
9035esac
9036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9037 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
9038 ac_status=$?
9039 grep -v '^ *+' conftest.er1 >conftest.err
9040 rm -f conftest.er1
9041 cat conftest.err >&5
9042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
9043 (exit $ac_status); } >/dev/null && {
9044 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9045 test ! -s conftest.err
9046 }; then
18fc9bd4 9047 eval "$as_ac_Header=yes"
ba479fd2
NN
9048else
9049 echo "$as_me: failed program was:" >&5
9050sed 's/^/| /' conftest.$ac_ext >&5
9051
18fc9bd4 9052 eval "$as_ac_Header=no"
ba479fd2 9053fi
a6ccdbab 9054
ba479fd2 9055rm -f conftest.err conftest.$ac_ext
6e3f3080 9056fi
a6ccdbab
EC
9057ac_res=`eval echo '${'$as_ac_Header'}'`
9058 { echo "$as_me:$LINENO: result: $ac_res" >&5
9059echo "${ECHO_T}$ac_res" >&6; }
ba479fd2
NN
9060if test `eval echo '${'$as_ac_Header'}'` = yes; then
9061 cat >>confdefs.h <<_ACEOF
9062#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9063_ACEOF
9064
956d6950
JL
9065fi
9066done
9067
9068
f24af81b 9069# Check for thread headers.
a6ccdbab
EC
9070{ echo "$as_me:$LINENO: checking for thread.h" >&5
9071echo $ECHO_N "checking for thread.h... $ECHO_C" >&6; }
ba479fd2
NN
9072if test "${ac_cv_header_thread_h+set}" = set; then
9073 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9074else
18fc9bd4 9075 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9076/* confdefs.h. */
9077_ACEOF
9078cat confdefs.h >>conftest.$ac_ext
9079cat >>conftest.$ac_ext <<_ACEOF
9080/* end confdefs.h. */
9081#include <thread.h>
9082_ACEOF
a6ccdbab
EC
9083if { (ac_try="$ac_cpp conftest.$ac_ext"
9084case "(($ac_try" in
9085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9086 *) ac_try_echo=$ac_try;;
9087esac
9088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9089 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
9090 ac_status=$?
9091 grep -v '^ *+' conftest.er1 >conftest.err
9092 rm -f conftest.er1
9093 cat conftest.err >&5
9094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
9095 (exit $ac_status); } >/dev/null && {
9096 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9097 test ! -s conftest.err
9098 }; then
18fc9bd4 9099 ac_cv_header_thread_h=yes
ba479fd2
NN
9100else
9101 echo "$as_me: failed program was:" >&5
9102sed 's/^/| /' conftest.$ac_ext >&5
9103
18fc9bd4 9104 ac_cv_header_thread_h=no
ba479fd2 9105fi
a6ccdbab 9106
ba479fd2 9107rm -f conftest.err conftest.$ac_ext
6e3f3080 9108fi
a6ccdbab
EC
9109{ echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
9110echo "${ECHO_T}$ac_cv_header_thread_h" >&6; }
ba479fd2 9111if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
9112 have_thread_h=yes
9113else
ba479fd2 9114 have_thread_h=
f24af81b
TT
9115fi
9116
a6ccdbab
EC
9117{ echo "$as_me:$LINENO: checking for pthread.h" >&5
9118echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; }
ba479fd2
NN
9119if test "${ac_cv_header_pthread_h+set}" = set; then
9120 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 9121else
18fc9bd4 9122 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9123/* confdefs.h. */
9124_ACEOF
9125cat confdefs.h >>conftest.$ac_ext
9126cat >>conftest.$ac_ext <<_ACEOF
9127/* end confdefs.h. */
9128#include <pthread.h>
9129_ACEOF
a6ccdbab
EC
9130if { (ac_try="$ac_cpp conftest.$ac_ext"
9131case "(($ac_try" in
9132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9133 *) ac_try_echo=$ac_try;;
9134esac
9135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9136 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
9137 ac_status=$?
9138 grep -v '^ *+' conftest.er1 >conftest.err
9139 rm -f conftest.er1
9140 cat conftest.err >&5
9141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
9142 (exit $ac_status); } >/dev/null && {
9143 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9144 test ! -s conftest.err
9145 }; then
18fc9bd4 9146 ac_cv_header_pthread_h=yes
ba479fd2 9147else
18fc9bd4
RG
9148 echo "$as_me: failed program was:" >&5
9149sed 's/^/| /' conftest.$ac_ext >&5
9150
9151 ac_cv_header_pthread_h=no
9152fi
a6ccdbab 9153
18fc9bd4 9154rm -f conftest.err conftest.$ac_ext
6e3f3080 9155fi
a6ccdbab
EC
9156{ echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
9157echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; }
ba479fd2 9158if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
9159 have_pthread_h=yes
9160else
ba479fd2 9161 have_pthread_h=
f24af81b
TT
9162fi
9163
9164
84c041a1 9165# These tests can't be done till we know if we have limits.h.
a6ccdbab
EC
9166{ echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
9167echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6; }
ba479fd2
NN
9168if test "${gcc_cv_decl_char_bit+set}" = set; then
9169 echo $ECHO_N "(cached) $ECHO_C" >&6
9170else
9171 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9172/* confdefs.h. */
9173_ACEOF
9174cat confdefs.h >>conftest.$ac_ext
9175cat >>conftest.$ac_ext <<_ACEOF
9176/* end confdefs.h. */
75e93faa
ZW
9177#ifdef HAVE_LIMITS_H
9178#include <limits.h>
9179#endif
9180#ifdef CHAR_BIT
9181found
9182#endif
ba479fd2 9183_ACEOF
75e93faa 9184if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9185 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
9186 gcc_cv_decl_char_bit=yes
9187else
75e93faa
ZW
9188 gcc_cv_decl_char_bit=no
9189fi
9190rm -f conftest*
9191
9192
9193fi
a6ccdbab
EC
9194{ echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
9195echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6; }
75e93faa 9196if test $gcc_cv_decl_char_bit = no; then
a6ccdbab
EC
9197 { echo "$as_me:$LINENO: checking number of bits in a byte" >&5
9198echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6; }
ba479fd2
NN
9199if test "${gcc_cv_c_nbby+set}" = set; then
9200 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
9201else
9202 i=8
9203 gcc_cv_c_nbby=
9204 while test $i -lt 65; do
ba479fd2 9205 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9206/* confdefs.h. */
9207_ACEOF
9208cat confdefs.h >>conftest.$ac_ext
9209cat >>conftest.$ac_ext <<_ACEOF
9210/* end confdefs.h. */
9211
9212int
9213main ()
9214{
4e70264f
ZW
9215switch(0) {
9216 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
9217 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
9218 ; }
ba479fd2
NN
9219 ;
9220 return 0;
9221}
9222_ACEOF
9223rm -f conftest.$ac_objext
a6ccdbab
EC
9224if { (ac_try="$ac_compile"
9225case "(($ac_try" in
9226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9227 *) ac_try_echo=$ac_try;;
9228esac
9229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9230 (eval "$ac_compile") 2>conftest.er1
ba479fd2 9231 ac_status=$?
86da66b5
HPN
9232 grep -v '^ *+' conftest.er1 >conftest.err
9233 rm -f conftest.er1
9234 cat conftest.err >&5
ba479fd2 9235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
9236 (exit $ac_status); } && {
9237 test -z "$ac_c_werror_flag" ||
9238 test ! -s conftest.err
9239 } && test -s conftest.$ac_objext; then
4e70264f 9240 gcc_cv_c_nbby=$i; break
75e93faa 9241else
ba479fd2
NN
9242 echo "$as_me: failed program was:" >&5
9243sed 's/^/| /' conftest.$ac_ext >&5
9244
a6ccdbab 9245
75e93faa 9246fi
a6ccdbab
EC
9247
9248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
9249 i=`expr $i + 1`
9250 done
9251 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
9252
9253fi
a6ccdbab
EC
9254{ echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
9255echo "${ECHO_T}$gcc_cv_c_nbby" >&6; }
75e93faa 9256if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
9257 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
9258echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
9259 { (exit 1); exit 1; }; }
75e93faa 9260else
ba479fd2
NN
9261
9262cat >>confdefs.h <<_ACEOF
75e93faa 9263#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 9264_ACEOF
75e93faa
ZW
9265
9266fi
9267fi
a6ccdbab
EC
9268{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
9269echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
ba479fd2
NN
9270if test "${ac_cv_c_bigendian+set}" = set; then
9271 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 9272else
9791c75c 9273 # See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 9274cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9275/* confdefs.h. */
9276_ACEOF
9277cat confdefs.h >>conftest.$ac_ext
9278cat >>conftest.$ac_ext <<_ACEOF
9279/* end confdefs.h. */
4977bab6
ZW
9280#include <sys/types.h>
9281#include <sys/param.h>
9791c75c 9282
ba479fd2
NN
9283int
9284main ()
9285{
a6ccdbab
EC
9286#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
9287 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
4977bab6 9288 bogus endian macros
84c041a1 9289#endif
9791c75c 9290
ba479fd2
NN
9291 ;
9292 return 0;
9293}
9294_ACEOF
9295rm -f conftest.$ac_objext
a6ccdbab
EC
9296if { (ac_try="$ac_compile"
9297case "(($ac_try" in
9298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9299 *) ac_try_echo=$ac_try;;
9300esac
9301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9302 (eval "$ac_compile") 2>conftest.er1
ba479fd2 9303 ac_status=$?
86da66b5
HPN
9304 grep -v '^ *+' conftest.er1 >conftest.err
9305 rm -f conftest.er1
9306 cat conftest.err >&5
ba479fd2 9307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
9308 (exit $ac_status); } && {
9309 test -z "$ac_c_werror_flag" ||
9310 test ! -s conftest.err
9311 } && test -s conftest.$ac_objext; then
4977bab6 9312 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 9313cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9314/* confdefs.h. */
9315_ACEOF
9316cat confdefs.h >>conftest.$ac_ext
9317cat >>conftest.$ac_ext <<_ACEOF
9318/* end confdefs.h. */
4977bab6
ZW
9319#include <sys/types.h>
9320#include <sys/param.h>
9791c75c 9321
ba479fd2
NN
9322int
9323main ()
9324{
4977bab6
ZW
9325#if BYTE_ORDER != BIG_ENDIAN
9326 not big endian
84c041a1 9327#endif
9791c75c 9328
ba479fd2
NN
9329 ;
9330 return 0;
9331}
9332_ACEOF
9333rm -f conftest.$ac_objext
a6ccdbab
EC
9334if { (ac_try="$ac_compile"
9335case "(($ac_try" in
9336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9337 *) ac_try_echo=$ac_try;;
9338esac
9339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9340 (eval "$ac_compile") 2>conftest.er1
ba479fd2 9341 ac_status=$?
86da66b5
HPN
9342 grep -v '^ *+' conftest.er1 >conftest.err
9343 rm -f conftest.er1
9344 cat conftest.err >&5
ba479fd2 9345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
9346 (exit $ac_status); } && {
9347 test -z "$ac_c_werror_flag" ||
9348 test ! -s conftest.err
9349 } && test -s conftest.$ac_objext; then
4977bab6
ZW
9350 ac_cv_c_bigendian=yes
9351else
ba479fd2
NN
9352 echo "$as_me: failed program was:" >&5
9353sed 's/^/| /' conftest.$ac_ext >&5
9354
a6ccdbab 9355 ac_cv_c_bigendian=no
4977bab6 9356fi
a6ccdbab
EC
9357
9358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 9359else
ba479fd2
NN
9360 echo "$as_me: failed program was:" >&5
9361sed 's/^/| /' conftest.$ac_ext >&5
9362
a6ccdbab 9363 # It does not; compile a test program.
9791c75c
KC
9364if test "$cross_compiling" = yes; then
9365 # try to guess the endianness by grepping values into an object file
9366 ac_cv_c_bigendian=unknown
9367 cat >conftest.$ac_ext <<_ACEOF
9368/* confdefs.h. */
9369_ACEOF
9370cat confdefs.h >>conftest.$ac_ext
9371cat >>conftest.$ac_ext <<_ACEOF
9372/* end confdefs.h. */
a6ccdbab
EC
9373short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9374short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9791c75c 9375void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
a6ccdbab
EC
9376short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9377short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9791c75c
KC
9378void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
9379int
9380main ()
9381{
9382 _ascii (); _ebcdic ();
9383 ;
9384 return 0;
9385}
9386_ACEOF
9387rm -f conftest.$ac_objext
a6ccdbab
EC
9388if { (ac_try="$ac_compile"
9389case "(($ac_try" in
9390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9391 *) ac_try_echo=$ac_try;;
9392esac
9393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9394 (eval "$ac_compile") 2>conftest.er1
9791c75c
KC
9395 ac_status=$?
9396 grep -v '^ *+' conftest.er1 >conftest.err
9397 rm -f conftest.er1
9398 cat conftest.err >&5
9399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
9400 (exit $ac_status); } && {
9401 test -z "$ac_c_werror_flag" ||
9402 test ! -s conftest.err
9403 } && test -s conftest.$ac_objext; then
9791c75c
KC
9404 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
9405 ac_cv_c_bigendian=yes
9406fi
9407if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9408 if test "$ac_cv_c_bigendian" = unknown; then
9409 ac_cv_c_bigendian=no
9410 else
9411 # finding both strings is unlikely to happen, but who knows?
9412 ac_cv_c_bigendian=unknown
9413 fi
9414fi
9415else
9416 echo "$as_me: failed program was:" >&5
9417sed 's/^/| /' conftest.$ac_ext >&5
9418
a6ccdbab 9419
4977bab6 9420fi
a6ccdbab
EC
9421
9422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
9423else
9424 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9425/* confdefs.h. */
9426_ACEOF
9427cat confdefs.h >>conftest.$ac_ext
9428cat >>conftest.$ac_ext <<_ACEOF
9429/* end confdefs.h. */
a6ccdbab 9430$ac_includes_default
9791c75c
KC
9431int
9432main ()
9433{
a6ccdbab 9434
4977bab6
ZW
9435 /* Are we little or big endian? From Harbison&Steele. */
9436 union
9437 {
a6ccdbab
EC
9438 long int l;
9439 char c[sizeof (long int)];
4977bab6
ZW
9440 } u;
9441 u.l = 1;
a6ccdbab
EC
9442 return u.c[sizeof (long int) - 1] == 1;
9443
9444 ;
9445 return 0;
4977bab6 9446}
ba479fd2
NN
9447_ACEOF
9448rm -f conftest$ac_exeext
a6ccdbab
EC
9449if { (ac_try="$ac_link"
9450case "(($ac_try" in
9451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9452 *) ac_try_echo=$ac_try;;
9453esac
9454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9455 (eval "$ac_link") 2>&5
ba479fd2
NN
9456 ac_status=$?
9457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9458 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a6ccdbab
EC
9459 { (case "(($ac_try" in
9460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9461 *) ac_try_echo=$ac_try;;
9462esac
9463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9464 (eval "$ac_try") 2>&5
ba479fd2
NN
9465 ac_status=$?
9466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9467 (exit $ac_status); }; }; then
4977bab6
ZW
9468 ac_cv_c_bigendian=no
9469else
ba479fd2
NN
9470 echo "$as_me: program exited with status $ac_status" >&5
9471echo "$as_me: failed program was:" >&5
9472sed 's/^/| /' conftest.$ac_ext >&5
9473
9474( exit $ac_status )
9475ac_cv_c_bigendian=yes
4977bab6 9476fi
a6ccdbab 9477rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 9478fi
a6ccdbab
EC
9479
9480
4977bab6 9481fi
a6ccdbab
EC
9482
9483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 9484fi
a6ccdbab
EC
9485{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
9486echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
9791c75c
KC
9487case $ac_cv_c_bigendian in
9488 yes)
ba479fd2
NN
9489
9490cat >>confdefs.h <<\_ACEOF
4977bab6 9491#define WORDS_BIGENDIAN 1
ba479fd2 9492_ACEOF
9791c75c
KC
9493 ;;
9494 no)
9495 ;;
9496 *)
9497 { { echo "$as_me:$LINENO: error: unknown endianness
9498presetting ac_cv_c_bigendian=no (or yes) will help" >&5
9499echo "$as_me: error: unknown endianness
9500presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
9501 { (exit 1); exit 1; }; } ;;
9502esac
84c041a1 9503
75e93faa 9504
73458fb7
NN
9505# --------
9506# UNSORTED
9507# --------
1e608388 9508
73458fb7
NN
9509# Stage specific cflags for build.
9510stage1_cflags=
9511case $build in
9512vax-*-*)
9513 if test x$GCC = xyes
9514 then
9515 stage1_cflags="-Wa,-J"
9516 else
9517 stage1_cflags="-J"
9518 fi
9519 ;;
73458fb7 9520esac
1e608388 9521
1e608388 9522
4e70264f
ZW
9523# These libraries may be used by collect2.
9524# We may need a special search path to get them linked.
a6ccdbab
EC
9525{ echo "$as_me:$LINENO: checking for collect2 libraries" >&5
9526echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6; }
ba479fd2
NN
9527if test "${gcc_cv_collect2_libs+set}" = set; then
9528 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
9529else
9530 save_LIBS="$LIBS"
7f2749d4 9531for libs in '' -lld -lmld \
4e70264f
ZW
9532 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
9533 '-L/usr/lib/cmplrs/cc3.11 -lmld'
9534do
9535 LIBS="$libs"
ba479fd2 9536 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9537/* confdefs.h. */
9538_ACEOF
9539cat confdefs.h >>conftest.$ac_ext
9540cat >>conftest.$ac_ext <<_ACEOF
9541/* end confdefs.h. */
9542
a6ccdbab
EC
9543/* Override any GCC internal prototype to avoid an error.
9544 Use char because int might match the return type of a GCC
9545 builtin and then its argument prototype would still apply. */
ba479fd2
NN
9546#ifdef __cplusplus
9547extern "C"
9548#endif
ba479fd2
NN
9549char ldopen ();
9550int
9551main ()
9552{
a6ccdbab 9553return ldopen ();
ba479fd2
NN
9554 ;
9555 return 0;
9556}
9557_ACEOF
9558rm -f conftest.$ac_objext conftest$ac_exeext
a6ccdbab
EC
9559if { (ac_try="$ac_link"
9560case "(($ac_try" in
9561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9562 *) ac_try_echo=$ac_try;;
9563esac
9564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9565 (eval "$ac_link") 2>conftest.er1
ba479fd2 9566 ac_status=$?
86da66b5
HPN
9567 grep -v '^ *+' conftest.er1 >conftest.err
9568 rm -f conftest.er1
9569 cat conftest.err >&5
ba479fd2 9570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
9571 (exit $ac_status); } && {
9572 test -z "$ac_c_werror_flag" ||
9573 test ! -s conftest.err
9574 } && test -s conftest$ac_exeext &&
9575 $as_test_x conftest$ac_exeext; then
4e70264f
ZW
9576 gcc_cv_collect2_libs="$libs"; break
9577else
ba479fd2
NN
9578 echo "$as_me: failed program was:" >&5
9579sed 's/^/| /' conftest.$ac_ext >&5
9580
a6ccdbab 9581
4e70264f 9582fi
a6ccdbab
EC
9583
9584rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
86da66b5 9585 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
9586done
9587LIBS="$save_LIBS"
9588test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
9589fi
a6ccdbab
EC
9590{ echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
9591echo "${ECHO_T}$gcc_cv_collect2_libs" >&6; }
4e70264f
ZW
9592case $gcc_cv_collect2_libs in
9593 "none required") ;;
9594 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
9595esac
9596
9597
7f2749d4
RK
9598# When building Ada code on Alpha, we need exc_resume which is usually in
9599# -lexc. So test for it.
9600save_LIBS="$LIBS"
9601LIBS=
a6ccdbab
EC
9602{ echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
9603echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6; }
ba479fd2
NN
9604if test "${ac_cv_search_exc_resume+set}" = set; then
9605 echo $ECHO_N "(cached) $ECHO_C" >&6
9606else
9607 ac_func_search_save_LIBS=$LIBS
ba479fd2 9608cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9609/* confdefs.h. */
9610_ACEOF
9611cat confdefs.h >>conftest.$ac_ext
9612cat >>conftest.$ac_ext <<_ACEOF
9613/* end confdefs.h. */
7f2749d4 9614
a6ccdbab
EC
9615/* Override any GCC internal prototype to avoid an error.
9616 Use char because int might match the return type of a GCC
9617 builtin and then its argument prototype would still apply. */
ba479fd2
NN
9618#ifdef __cplusplus
9619extern "C"
9620#endif
ba479fd2
NN
9621char exc_resume ();
9622int
9623main ()
9624{
a6ccdbab 9625return exc_resume ();
ba479fd2
NN
9626 ;
9627 return 0;
9628}
9629_ACEOF
a6ccdbab
EC
9630for ac_lib in '' exc; do
9631 if test -z "$ac_lib"; then
9632 ac_res="none required"
9633 else
9634 ac_res=-l$ac_lib
9635 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9636 fi
9637 rm -f conftest.$ac_objext conftest$ac_exeext
9638if { (ac_try="$ac_link"
9639case "(($ac_try" in
9640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9641 *) ac_try_echo=$ac_try;;
9642esac
9643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9644 (eval "$ac_link") 2>conftest.er1
ba479fd2 9645 ac_status=$?
86da66b5
HPN
9646 grep -v '^ *+' conftest.er1 >conftest.err
9647 rm -f conftest.er1
9648 cat conftest.err >&5
ba479fd2 9649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
9650 (exit $ac_status); } && {
9651 test -z "$ac_c_werror_flag" ||
9652 test ! -s conftest.err
9653 } && test -s conftest$ac_exeext &&
9654 $as_test_x conftest$ac_exeext; then
9655 ac_cv_search_exc_resume=$ac_res
7f2749d4 9656else
ba479fd2
NN
9657 echo "$as_me: failed program was:" >&5
9658sed 's/^/| /' conftest.$ac_ext >&5
9659
62c9aa5f 9660
a6ccdbab 9661fi
ba479fd2 9662
a6ccdbab
EC
9663rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9664 conftest$ac_exeext
9665 if test "${ac_cv_search_exc_resume+set}" = set; then
9666 break
b8ec3cc8 9667fi
a6ccdbab
EC
9668done
9669if test "${ac_cv_search_exc_resume+set}" = set; then
9670 :
9671else
9672 ac_cv_search_exc_resume=no
b8ec3cc8 9673fi
a6ccdbab 9674rm conftest.$ac_ext
b8ec3cc8
EC
9675LIBS=$ac_func_search_save_LIBS
9676fi
a6ccdbab
EC
9677{ echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
9678echo "${ECHO_T}$ac_cv_search_exc_resume" >&6; }
9679ac_res=$ac_cv_search_exc_resume
9680if test "$ac_res" != no; then
9681 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b8ec3cc8
EC
9682
9683fi
9684
dd7f7a6e 9685GNAT_LIBEXC="$LIBS"
b8ec3cc8
EC
9686LIBS="$save_LIBS"
9687
9688
dd7f7a6e
EC
9689# Some systems put ldexp and frexp in libm instead of libc; assume
9690# they're both in the same place. jcf-dump needs them.
9691save_LIBS="$LIBS"
9692LIBS=
a6ccdbab
EC
9693{ echo "$as_me:$LINENO: checking for library containing ldexp" >&5
9694echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6; }
dd7f7a6e 9695if test "${ac_cv_search_ldexp+set}" = set; then
b8ec3cc8
EC
9696 echo $ECHO_N "(cached) $ECHO_C" >&6
9697else
dd7f7a6e 9698 ac_func_search_save_LIBS=$LIBS
dd7f7a6e 9699cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9700/* confdefs.h. */
9701_ACEOF
9702cat confdefs.h >>conftest.$ac_ext
9703cat >>conftest.$ac_ext <<_ACEOF
9704/* end confdefs.h. */
dd7f7a6e 9705
a6ccdbab
EC
9706/* Override any GCC internal prototype to avoid an error.
9707 Use char because int might match the return type of a GCC
9708 builtin and then its argument prototype would still apply. */
dd7f7a6e
EC
9709#ifdef __cplusplus
9710extern "C"
9711#endif
dd7f7a6e 9712char ldexp ();
ba479fd2
NN
9713int
9714main ()
9715{
a6ccdbab 9716return ldexp ();
ba479fd2
NN
9717 ;
9718 return 0;
9719}
9720_ACEOF
a6ccdbab
EC
9721for ac_lib in '' m; do
9722 if test -z "$ac_lib"; then
9723 ac_res="none required"
9724 else
9725 ac_res=-l$ac_lib
dd7f7a6e 9726 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
a6ccdbab
EC
9727 fi
9728 rm -f conftest.$ac_objext conftest$ac_exeext
9729if { (ac_try="$ac_link"
9730case "(($ac_try" in
9731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9732 *) ac_try_echo=$ac_try;;
9733esac
9734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9735 (eval "$ac_link") 2>conftest.er1
dd7f7a6e
EC
9736 ac_status=$?
9737 grep -v '^ *+' conftest.er1 >conftest.err
9738 rm -f conftest.er1
9739 cat conftest.err >&5
9740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
9741 (exit $ac_status); } && {
9742 test -z "$ac_c_werror_flag" ||
9743 test ! -s conftest.err
9744 } && test -s conftest$ac_exeext &&
9745 $as_test_x conftest$ac_exeext; then
9746 ac_cv_search_ldexp=$ac_res
dd7f7a6e
EC
9747else
9748 echo "$as_me: failed program was:" >&5
9749sed 's/^/| /' conftest.$ac_ext >&5
9750
a6ccdbab 9751
dd7f7a6e 9752fi
a6ccdbab
EC
9753
9754rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9755 conftest$ac_exeext
9756 if test "${ac_cv_search_ldexp+set}" = set; then
9757 break
9758fi
9759done
9760if test "${ac_cv_search_ldexp+set}" = set; then
9761 :
9762else
9763 ac_cv_search_ldexp=no
dd7f7a6e 9764fi
a6ccdbab 9765rm conftest.$ac_ext
dd7f7a6e
EC
9766LIBS=$ac_func_search_save_LIBS
9767fi
a6ccdbab
EC
9768{ echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
9769echo "${ECHO_T}$ac_cv_search_ldexp" >&6; }
9770ac_res=$ac_cv_search_ldexp
9771if test "$ac_res" != no; then
9772 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
dd7f7a6e
EC
9773
9774fi
9775
9776LDEXP_LIB="$LIBS"
9777LIBS="$save_LIBS"
9778
9779
9780# Use <inttypes.h> only if it exists,
9781# doesn't clash with <sys/types.h>, and declares intmax_t.
a6ccdbab
EC
9782{ echo "$as_me:$LINENO: checking for inttypes.h" >&5
9783echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6; }
dd7f7a6e
EC
9784if test "${gcc_cv_header_inttypes_h+set}" = set; then
9785 echo $ECHO_N "(cached) $ECHO_C" >&6
9786else
9787 cat >conftest.$ac_ext <<_ACEOF
9788/* confdefs.h. */
9789_ACEOF
9790cat confdefs.h >>conftest.$ac_ext
9791cat >>conftest.$ac_ext <<_ACEOF
9792/* end confdefs.h. */
9793#include <sys/types.h>
9794#include <inttypes.h>
9795int
9796main ()
9797{
9798intmax_t i = -1;
9799 ;
9800 return 0;
9801}
9802_ACEOF
9803rm -f conftest.$ac_objext
a6ccdbab
EC
9804if { (ac_try="$ac_compile"
9805case "(($ac_try" in
9806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9807 *) ac_try_echo=$ac_try;;
9808esac
9809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9810 (eval "$ac_compile") 2>conftest.er1
dd7f7a6e
EC
9811 ac_status=$?
9812 grep -v '^ *+' conftest.er1 >conftest.err
9813 rm -f conftest.er1
9814 cat conftest.err >&5
9815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
9816 (exit $ac_status); } && {
9817 test -z "$ac_c_werror_flag" ||
9818 test ! -s conftest.err
9819 } && test -s conftest.$ac_objext; then
dd7f7a6e
EC
9820 gcc_cv_header_inttypes_h=yes
9821else
9822 echo "$as_me: failed program was:" >&5
9823sed 's/^/| /' conftest.$ac_ext >&5
9824
a6ccdbab 9825 gcc_cv_header_inttypes_h=no
dd7f7a6e 9826fi
a6ccdbab
EC
9827
9828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
dd7f7a6e
EC
9829fi
9830
a6ccdbab
EC
9831{ echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
9832echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6; }
dd7f7a6e
EC
9833if test $gcc_cv_header_inttypes_h = yes; then
9834
9835cat >>confdefs.h <<\_ACEOF
9836#define HAVE_INTTYPES_H 1
9837_ACEOF
9838
0056a9b5 9839fi
956d6950 9840
c149cc37 9841
ba479fd2
NN
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
0d667716
KG
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
ba479fd2
NN
9870
9871
9872
9873
9874
9875
9876
9877
52a6edcc 9878for ac_func in times clock kill getrlimit setrlimit atoll atoq \
0d667716
KG
9879 sysconf strsignal getrusage nl_langinfo scandir alphasort \
9880 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
9881 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
956d6950 9882do
ba479fd2 9883as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
a6ccdbab
EC
9884{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9885echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9886if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2
NN
9887 echo $ECHO_N "(cached) $ECHO_C" >&6
9888else
9889 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9890/* confdefs.h. */
9891_ACEOF
9892cat confdefs.h >>conftest.$ac_ext
9893cat >>conftest.$ac_ext <<_ACEOF
9894/* end confdefs.h. */
86da66b5
HPN
9895/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9896 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9897#define $ac_func innocuous_$ac_func
9898
956d6950 9899/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9900 which can conflict with char $ac_func (); below.
9901 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9902 <limits.h> exists even on freestanding compilers. */
86da66b5 9903
ba479fd2
NN
9904#ifdef __STDC__
9905# include <limits.h>
9906#else
9907# include <assert.h>
9908#endif
86da66b5
HPN
9909
9910#undef $ac_func
9911
a6ccdbab
EC
9912/* Override any GCC internal prototype to avoid an error.
9913 Use char because int might match the return type of a GCC
9914 builtin and then its argument prototype would still apply. */
ba479fd2
NN
9915#ifdef __cplusplus
9916extern "C"
ba479fd2 9917#endif
ba479fd2 9918char $ac_func ();
956d6950
JL
9919/* The GNU C library defines this for functions which it implements
9920 to always fail with ENOSYS. Some functions are actually named
9921 something starting with __ and the normal name is an alias. */
a6ccdbab 9922#if defined __stub_$ac_func || defined __stub___$ac_func
956d6950 9923choke me
956d6950
JL
9924#endif
9925
ba479fd2
NN
9926int
9927main ()
9928{
a6ccdbab 9929return $ac_func ();
ba479fd2
NN
9930 ;
9931 return 0;
9932}
9933_ACEOF
9934rm -f conftest.$ac_objext conftest$ac_exeext
a6ccdbab
EC
9935if { (ac_try="$ac_link"
9936case "(($ac_try" in
9937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9938 *) ac_try_echo=$ac_try;;
9939esac
9940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9941 (eval "$ac_link") 2>conftest.er1
ba479fd2 9942 ac_status=$?
86da66b5
HPN
9943 grep -v '^ *+' conftest.er1 >conftest.err
9944 rm -f conftest.er1
9945 cat conftest.err >&5
ba479fd2 9946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
9947 (exit $ac_status); } && {
9948 test -z "$ac_c_werror_flag" ||
9949 test ! -s conftest.err
9950 } && test -s conftest$ac_exeext &&
9951 $as_test_x conftest$ac_exeext; then
ba479fd2
NN
9952 eval "$as_ac_var=yes"
9953else
9954 echo "$as_me: failed program was:" >&5
9955sed 's/^/| /' conftest.$ac_ext >&5
9956
a6ccdbab 9957 eval "$as_ac_var=no"
ba479fd2 9958fi
a6ccdbab
EC
9959
9960rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
86da66b5 9961 conftest$ac_exeext conftest.$ac_ext
ba479fd2 9962fi
a6ccdbab
EC
9963ac_res=`eval echo '${'$as_ac_var'}'`
9964 { echo "$as_me:$LINENO: result: $ac_res" >&5
9965echo "${ECHO_T}$ac_res" >&6; }
ba479fd2
NN
9966if test `eval echo '${'$as_ac_var'}'` = yes; then
9967 cat >>confdefs.h <<_ACEOF
9968#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9969_ACEOF
956d6950 9970
956d6950
JL
9971fi
9972done
9973
6885fc87 9974
39f6c4c8 9975if test x$ac_cv_func_mbstowcs = xyes; then
a6ccdbab
EC
9976 { echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
9977echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6; }
ba479fd2
NN
9978if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
9979 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
9980else
9981 if test "$cross_compiling" = yes; then
9982 gcc_cv_func_mbstowcs_works=yes
9983else
ba479fd2 9984 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9985/* confdefs.h. */
9986_ACEOF
9987cat confdefs.h >>conftest.$ac_ext
9988cat >>conftest.$ac_ext <<_ACEOF
9989/* end confdefs.h. */
39f6c4c8
KW
9990#include <stdlib.h>
9991int main()
9992{
9993 mbstowcs(0, "", 0);
9994 return 0;
9995}
ba479fd2
NN
9996_ACEOF
9997rm -f conftest$ac_exeext
a6ccdbab
EC
9998if { (ac_try="$ac_link"
9999case "(($ac_try" in
10000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10001 *) ac_try_echo=$ac_try;;
10002esac
10003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10004 (eval "$ac_link") 2>&5
ba479fd2
NN
10005 ac_status=$?
10006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10007 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a6ccdbab
EC
10008 { (case "(($ac_try" in
10009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10010 *) ac_try_echo=$ac_try;;
10011esac
10012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10013 (eval "$ac_try") 2>&5
ba479fd2
NN
10014 ac_status=$?
10015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10016 (exit $ac_status); }; }; then
39f6c4c8
KW
10017 gcc_cv_func_mbstowcs_works=yes
10018else
ba479fd2
NN
10019 echo "$as_me: program exited with status $ac_status" >&5
10020echo "$as_me: failed program was:" >&5
10021sed 's/^/| /' conftest.$ac_ext >&5
10022
10023( exit $ac_status )
10024gcc_cv_func_mbstowcs_works=no
39f6c4c8 10025fi
a6ccdbab 10026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 10027fi
a6ccdbab
EC
10028
10029
39f6c4c8 10030fi
a6ccdbab
EC
10031{ echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
10032echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6; }
63cf211a 10033 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
10034
10035cat >>confdefs.h <<\_ACEOF
39f6c4c8 10036#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 10037_ACEOF
39f6c4c8
KW
10038
10039 fi
10040fi
10041
a6ccdbab
EC
10042{ echo "$as_me:$LINENO: checking for ssize_t" >&5
10043echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
ba479fd2
NN
10044if test "${ac_cv_type_ssize_t+set}" = set; then
10045 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 10046else
ba479fd2 10047 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10048/* confdefs.h. */
10049_ACEOF
10050cat confdefs.h >>conftest.$ac_ext
10051cat >>conftest.$ac_ext <<_ACEOF
10052/* end confdefs.h. */
8b4fc07a 10053$ac_includes_default
a6ccdbab 10054typedef ssize_t ac__type_new_;
8b4fc07a
NN
10055int
10056main ()
10057{
a6ccdbab 10058if ((ac__type_new_ *) 0)
8b4fc07a 10059 return 0;
a6ccdbab 10060if (sizeof (ac__type_new_))
8b4fc07a
NN
10061 return 0;
10062 ;
10063 return 0;
10064}
ba479fd2 10065_ACEOF
8b4fc07a 10066rm -f conftest.$ac_objext
a6ccdbab
EC
10067if { (ac_try="$ac_compile"
10068case "(($ac_try" in
10069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10070 *) ac_try_echo=$ac_try;;
10071esac
10072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10073 (eval "$ac_compile") 2>conftest.er1
8b4fc07a 10074 ac_status=$?
86da66b5
HPN
10075 grep -v '^ *+' conftest.er1 >conftest.err
10076 rm -f conftest.er1
10077 cat conftest.err >&5
8b4fc07a 10078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
10079 (exit $ac_status); } && {
10080 test -z "$ac_c_werror_flag" ||
10081 test ! -s conftest.err
10082 } && test -s conftest.$ac_objext; then
cb65112a 10083 ac_cv_type_ssize_t=yes
f12bc141 10084else
8b4fc07a
NN
10085 echo "$as_me: failed program was:" >&5
10086sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 10087
a6ccdbab 10088 ac_cv_type_ssize_t=no
8b4fc07a 10089fi
a6ccdbab
EC
10090
10091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 10092fi
a6ccdbab
EC
10093{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
10094echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
8b4fc07a
NN
10095if test $ac_cv_type_ssize_t = yes; then
10096 :
10097else
ba479fd2 10098
8b4fc07a 10099cat >>confdefs.h <<_ACEOF
f12bc141 10100#define ssize_t int
ba479fd2 10101_ACEOF
f12bc141
ZW
10102
10103fi
10104
0b9d02c6 10105
e256b8b6
DA
10106# Try to determine the array type of the second argument of getgroups
10107# for the target system (int or gid_t).
a6ccdbab
EC
10108{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
10109echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
ba479fd2
NN
10110if test "${ac_cv_type_uid_t+set}" = set; then
10111 echo $ECHO_N "(cached) $ECHO_C" >&6
10112else
10113 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10114/* confdefs.h. */
10115_ACEOF
10116cat confdefs.h >>conftest.$ac_ext
10117cat >>conftest.$ac_ext <<_ACEOF
10118/* end confdefs.h. */
e256b8b6 10119#include <sys/types.h>
ba479fd2
NN
10120
10121_ACEOF
e256b8b6 10122if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 10123 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
10124 ac_cv_type_uid_t=yes
10125else
e256b8b6
DA
10126 ac_cv_type_uid_t=no
10127fi
10128rm -f conftest*
10129
10130fi
a6ccdbab
EC
10131{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
10132echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
63cf211a 10133if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
10134
10135cat >>confdefs.h <<\_ACEOF
e256b8b6 10136#define uid_t int
ba479fd2 10137_ACEOF
cafe096b 10138
ba479fd2
NN
10139
10140cat >>confdefs.h <<\_ACEOF
e256b8b6 10141#define gid_t int
ba479fd2 10142_ACEOF
e256b8b6
DA
10143
10144fi
10145
a6ccdbab
EC
10146{ echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
10147echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6; }
ba479fd2
NN
10148if test "${ac_cv_type_getgroups+set}" = set; then
10149 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
10150else
10151 if test "$cross_compiling" = yes; then
10152 ac_cv_type_getgroups=cross
10153else
ba479fd2 10154 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10155/* confdefs.h. */
10156_ACEOF
10157cat confdefs.h >>conftest.$ac_ext
10158cat >>conftest.$ac_ext <<_ACEOF
10159/* end confdefs.h. */
e256b8b6 10160/* Thanks to Mike Rendell for this test. */
a6ccdbab 10161$ac_includes_default
e256b8b6
DA
10162#define NGID 256
10163#undef MAX
10164#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
10165
10166int
10167main ()
e256b8b6
DA
10168{
10169 gid_t gidset[NGID];
10170 int i, n;
a6ccdbab 10171 union { gid_t gval; long int lval; } val;
e256b8b6
DA
10172
10173 val.lval = -1;
10174 for (i = 0; i < NGID; i++)
10175 gidset[i] = val.gval;
10176 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 10177 gidset);
e256b8b6 10178 /* Exit non-zero if getgroups seems to require an array of ints. This
a6ccdbab
EC
10179 happens when gid_t is short int but getgroups modifies an array
10180 of ints. */
10181 return n > 0 && gidset[n] != val.gval;
63cf211a 10182}
ba479fd2
NN
10183_ACEOF
10184rm -f conftest$ac_exeext
a6ccdbab
EC
10185if { (ac_try="$ac_link"
10186case "(($ac_try" in
10187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10188 *) ac_try_echo=$ac_try;;
10189esac
10190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10191 (eval "$ac_link") 2>&5
ba479fd2
NN
10192 ac_status=$?
10193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10194 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a6ccdbab
EC
10195 { (case "(($ac_try" in
10196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10197 *) ac_try_echo=$ac_try;;
10198esac
10199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10200 (eval "$ac_try") 2>&5
ba479fd2
NN
10201 ac_status=$?
10202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10203 (exit $ac_status); }; }; then
10204 ac_cv_type_getgroups=gid_t
63cf211a 10205else
ba479fd2
NN
10206 echo "$as_me: program exited with status $ac_status" >&5
10207echo "$as_me: failed program was:" >&5
10208sed 's/^/| /' conftest.$ac_ext >&5
10209
10210( exit $ac_status )
10211ac_cv_type_getgroups=int
e256b8b6 10212fi
a6ccdbab 10213rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 10214fi
a6ccdbab
EC
10215
10216
e256b8b6 10217if test $ac_cv_type_getgroups = cross; then
ba479fd2 10218 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10219/* confdefs.h. */
10220_ACEOF
10221cat confdefs.h >>conftest.$ac_ext
10222cat >>conftest.$ac_ext <<_ACEOF
10223/* end confdefs.h. */
e256b8b6 10224#include <unistd.h>
ba479fd2
NN
10225
10226_ACEOF
e256b8b6 10227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 10228 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
10229 ac_cv_type_getgroups=gid_t
10230else
e256b8b6
DA
10231 ac_cv_type_getgroups=int
10232fi
10233rm -f conftest*
10234
10235fi
10236fi
a6ccdbab
EC
10237{ echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
10238echo "${ECHO_T}$ac_cv_type_getgroups" >&6; }
e256b8b6 10239
ba479fd2 10240cat >>confdefs.h <<_ACEOF
e256b8b6 10241#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 10242_ACEOF
e256b8b6
DA
10243
10244
10245if test "${target}" = "${build}"; then
10246 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
10247else
10248 case "${target}" in
10249 # This condition may need some tweaking. It should include all
10250 # targets where the array type of the second argument of getgroups
10251 # is int and the type of gid_t is not equivalent to int.
10252 *-*-sunos* | *-*-ultrix*)
10253 TARGET_GETGROUPS_T=int
10254 ;;
10255 *)
10256 TARGET_GETGROUPS_T=gid_t
10257 ;;
10258 esac
10259fi
10260
10261
3b0727a0 10262
a6ccdbab
EC
10263{ echo "$as_me:$LINENO: checking for sys/mman.h" >&5
10264echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6; }
3b0727a0
MR
10265if test "${ac_cv_header_sys_mman_h+set}" = set; then
10266 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 10267else
18fc9bd4 10268 cat >conftest.$ac_ext <<_ACEOF
3b0727a0
MR
10269/* confdefs.h. */
10270_ACEOF
10271cat confdefs.h >>conftest.$ac_ext
10272cat >>conftest.$ac_ext <<_ACEOF
10273/* end confdefs.h. */
10274#include <sys/mman.h>
10275_ACEOF
a6ccdbab
EC
10276if { (ac_try="$ac_cpp conftest.$ac_ext"
10277case "(($ac_try" in
10278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10279 *) ac_try_echo=$ac_try;;
10280esac
10281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10282 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3b0727a0
MR
10283 ac_status=$?
10284 grep -v '^ *+' conftest.er1 >conftest.err
10285 rm -f conftest.er1
10286 cat conftest.err >&5
10287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
10288 (exit $ac_status); } >/dev/null && {
10289 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10290 test ! -s conftest.err
10291 }; then
18fc9bd4 10292 ac_cv_header_sys_mman_h=yes
3b0727a0
MR
10293else
10294 echo "$as_me: failed program was:" >&5
10295sed 's/^/| /' conftest.$ac_ext >&5
10296
18fc9bd4 10297 ac_cv_header_sys_mman_h=no
3b0727a0 10298fi
a6ccdbab 10299
3b0727a0
MR
10300rm -f conftest.err conftest.$ac_ext
10301fi
a6ccdbab
EC
10302{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
10303echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6; }
3b0727a0
MR
10304if test $ac_cv_header_sys_mman_h = yes; then
10305 gcc_header_sys_mman_h=yes
10306else
10307 gcc_header_sys_mman_h=no
10308fi
10309
a6ccdbab
EC
10310{ echo "$as_me:$LINENO: checking for mmap" >&5
10311echo $ECHO_N "checking for mmap... $ECHO_C" >&6; }
3b0727a0
MR
10312if test "${ac_cv_func_mmap+set}" = set; then
10313 echo $ECHO_N "(cached) $ECHO_C" >&6
10314else
10315 cat >conftest.$ac_ext <<_ACEOF
10316/* confdefs.h. */
10317_ACEOF
10318cat confdefs.h >>conftest.$ac_ext
10319cat >>conftest.$ac_ext <<_ACEOF
10320/* end confdefs.h. */
10321/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
10322 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10323#define mmap innocuous_mmap
10324
10325/* System header to define __stub macros and hopefully few prototypes,
10326 which can conflict with char mmap (); below.
10327 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10328 <limits.h> exists even on freestanding compilers. */
10329
10330#ifdef __STDC__
10331# include <limits.h>
10332#else
10333# include <assert.h>
10334#endif
10335
10336#undef mmap
10337
a6ccdbab
EC
10338/* Override any GCC internal prototype to avoid an error.
10339 Use char because int might match the return type of a GCC
10340 builtin and then its argument prototype would still apply. */
3b0727a0
MR
10341#ifdef __cplusplus
10342extern "C"
3b0727a0 10343#endif
3b0727a0
MR
10344char mmap ();
10345/* The GNU C library defines this for functions which it implements
10346 to always fail with ENOSYS. Some functions are actually named
10347 something starting with __ and the normal name is an alias. */
a6ccdbab 10348#if defined __stub_mmap || defined __stub___mmap
3b0727a0 10349choke me
3b0727a0
MR
10350#endif
10351
10352int
10353main ()
10354{
a6ccdbab 10355return mmap ();
3b0727a0
MR
10356 ;
10357 return 0;
10358}
10359_ACEOF
10360rm -f conftest.$ac_objext conftest$ac_exeext
a6ccdbab
EC
10361if { (ac_try="$ac_link"
10362case "(($ac_try" in
10363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10364 *) ac_try_echo=$ac_try;;
10365esac
10366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10367 (eval "$ac_link") 2>conftest.er1
3b0727a0
MR
10368 ac_status=$?
10369 grep -v '^ *+' conftest.er1 >conftest.err
10370 rm -f conftest.er1
10371 cat conftest.err >&5
10372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
10373 (exit $ac_status); } && {
10374 test -z "$ac_c_werror_flag" ||
10375 test ! -s conftest.err
10376 } && test -s conftest$ac_exeext &&
10377 $as_test_x conftest$ac_exeext; then
3b0727a0
MR
10378 ac_cv_func_mmap=yes
10379else
10380 echo "$as_me: failed program was:" >&5
10381sed 's/^/| /' conftest.$ac_ext >&5
10382
a6ccdbab 10383 ac_cv_func_mmap=no
3b0727a0 10384fi
a6ccdbab
EC
10385
10386rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3b0727a0
MR
10387 conftest$ac_exeext conftest.$ac_ext
10388fi
a6ccdbab
EC
10389{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
10390echo "${ECHO_T}$ac_cv_func_mmap" >&6; }
3b0727a0
MR
10391if test $ac_cv_func_mmap = yes; then
10392 gcc_func_mmap=yes
10393else
10394 gcc_func_mmap=no
10395fi
10396
10397if test "$gcc_header_sys_mman_h" != yes \
10398 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
10399 gcc_cv_func_mmap_file=no
10400 gcc_cv_func_mmap_dev_zero=no
10401 gcc_cv_func_mmap_anon=no
10402else
a6ccdbab
EC
10403 { echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
10404echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6; }
ba479fd2
NN
10405if test "${gcc_cv_func_mmap_file+set}" = set; then
10406 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 10407else
ba479fd2 10408 # Add a system to this blacklist if
1072ec3f
ZW
10409 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
10410 # memory area containing the same data that you'd get if you applied
10411 # read() to the same fd. The only system known to have a problem here
10412 # is VMS, where text files have record structure.
10413 case "$host_os" in
ba479fd2 10414 vms* | ultrix*)
1072ec3f
ZW
10415 gcc_cv_func_mmap_file=no ;;
10416 *)
10417 gcc_cv_func_mmap_file=yes;;
10418 esac
10419fi
a6ccdbab
EC
10420{ echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
10421echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6; }
10422 { echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
10423echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6; }
ba479fd2
NN
10424if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
10425 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
10426else
10427 # Add a system to this blacklist if it has mmap() but /dev/zero
10428 # does not exist, or if mmapping /dev/zero does not give anonymous
10429 # zeroed pages with both the following properties:
10430 # 1. If you map N consecutive pages in with one call, and then
10431 # unmap any subset of those pages, the pages that were not
10432 # explicitly unmapped remain accessible.
10433 # 2. If you map two adjacent blocks of memory and then unmap them
10434 # both at once, they must both go away.
10435 # Systems known to be in this category are Windows (all variants),
10436 # VMS, and Darwin.
10437 case "$host_os" in
2ce240d3 10438 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
10439 gcc_cv_func_mmap_dev_zero=no ;;
10440 *)
10441 gcc_cv_func_mmap_dev_zero=yes;;
10442 esac
10443fi
a6ccdbab
EC
10444{ echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
10445echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6; }
1072ec3f
ZW
10446
10447 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
a6ccdbab
EC
10448 { echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
10449echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6; }
ba479fd2
NN
10450if test "${gcc_cv_decl_map_anon+set}" = set; then
10451 echo $ECHO_N "(cached) $ECHO_C" >&6
10452else
10453 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10454/* confdefs.h. */
10455_ACEOF
10456cat confdefs.h >>conftest.$ac_ext
10457cat >>conftest.$ac_ext <<_ACEOF
10458/* end confdefs.h. */
1072ec3f
ZW
10459#include <sys/types.h>
10460#include <sys/mman.h>
10461#include <unistd.h>
10462
10463#ifndef MAP_ANONYMOUS
10464#define MAP_ANONYMOUS MAP_ANON
10465#endif
10466
ba479fd2
NN
10467int
10468main ()
10469{
1072ec3f 10470int n = MAP_ANONYMOUS;
ba479fd2
NN
10471 ;
10472 return 0;
10473}
10474_ACEOF
10475rm -f conftest.$ac_objext
a6ccdbab
EC
10476if { (ac_try="$ac_compile"
10477case "(($ac_try" in
10478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10479 *) ac_try_echo=$ac_try;;
10480esac
10481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10482 (eval "$ac_compile") 2>conftest.er1
ba479fd2 10483 ac_status=$?
86da66b5
HPN
10484 grep -v '^ *+' conftest.er1 >conftest.err
10485 rm -f conftest.er1
10486 cat conftest.err >&5
ba479fd2 10487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
10488 (exit $ac_status); } && {
10489 test -z "$ac_c_werror_flag" ||
10490 test ! -s conftest.err
10491 } && test -s conftest.$ac_objext; then
1072ec3f
ZW
10492 gcc_cv_decl_map_anon=yes
10493else
ba479fd2
NN
10494 echo "$as_me: failed program was:" >&5
10495sed 's/^/| /' conftest.$ac_ext >&5
10496
a6ccdbab 10497 gcc_cv_decl_map_anon=no
1072ec3f 10498fi
a6ccdbab
EC
10499
10500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 10501fi
a6ccdbab
EC
10502{ echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
10503echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6; }
1072ec3f
ZW
10504
10505 if test $gcc_cv_decl_map_anon = no; then
10506 gcc_cv_func_mmap_anon=no
10507 else
a6ccdbab
EC
10508 { echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
10509echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6; }
ba479fd2
NN
10510if test "${gcc_cv_func_mmap_anon+set}" = set; then
10511 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
10512else
10513 # Add a system to this blacklist if it has mmap() and MAP_ANON or
10514 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
10515 # doesn't give anonymous zeroed pages with the same properties listed
10516 # above for use of /dev/zero.
10517 # Systems known to be in this category are Windows, VMS, and SCO Unix.
10518 case "$host_os" in
10519 vms* | cygwin* | pe | mingw* | sco* | udk* )
10520 gcc_cv_func_mmap_anon=no ;;
10521 *)
10522 gcc_cv_func_mmap_anon=yes;;
10523 esac
10524fi
a6ccdbab
EC
10525{ echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
10526echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6; }
1072ec3f
ZW
10527 fi
10528fi
10529
10530if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
10531
10532cat >>confdefs.h <<\_ACEOF
1072ec3f 10533#define HAVE_MMAP_FILE 1
ba479fd2 10534_ACEOF
1072ec3f
ZW
10535
10536fi
10537if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
10538
10539cat >>confdefs.h <<\_ACEOF
1072ec3f 10540#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 10541_ACEOF
1072ec3f
ZW
10542
10543fi
10544if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
10545
10546cat >>confdefs.h <<\_ACEOF
1072ec3f 10547#define HAVE_MMAP_ANON 1
ba479fd2 10548_ACEOF
1072ec3f
ZW
10549
10550fi
10551
b27d2bd5
MK
10552
10553case "${host}" in
ee262b6f 10554*-*-*vms*)
ba479fd2 10555 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
10556 # won't work, and it isn't easily adaptable. It makes more sense to
10557 # just force it.
10558 ac_cv_func_vfork_works=yes
10559 ;;
b27d2bd5 10560esac
a6ccdbab
EC
10561{ echo "$as_me:$LINENO: checking for pid_t" >&5
10562echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
ba479fd2
NN
10563if test "${ac_cv_type_pid_t+set}" = set; then
10564 echo $ECHO_N "(cached) $ECHO_C" >&6
10565else
10566 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10567/* confdefs.h. */
10568_ACEOF
10569cat confdefs.h >>conftest.$ac_ext
10570cat >>conftest.$ac_ext <<_ACEOF
10571/* end confdefs.h. */
10572$ac_includes_default
a6ccdbab 10573typedef pid_t ac__type_new_;
ba479fd2
NN
10574int
10575main ()
10576{
a6ccdbab 10577if ((ac__type_new_ *) 0)
ba479fd2 10578 return 0;
a6ccdbab 10579if (sizeof (ac__type_new_))
ba479fd2
NN
10580 return 0;
10581 ;
10582 return 0;
10583}
10584_ACEOF
10585rm -f conftest.$ac_objext
a6ccdbab
EC
10586if { (ac_try="$ac_compile"
10587case "(($ac_try" in
10588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10589 *) ac_try_echo=$ac_try;;
10590esac
10591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10592 (eval "$ac_compile") 2>conftest.er1
ba479fd2 10593 ac_status=$?
86da66b5
HPN
10594 grep -v '^ *+' conftest.er1 >conftest.err
10595 rm -f conftest.er1
10596 cat conftest.err >&5
ba479fd2 10597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
10598 (exit $ac_status); } && {
10599 test -z "$ac_c_werror_flag" ||
10600 test ! -s conftest.err
10601 } && test -s conftest.$ac_objext; then
cb65112a 10602 ac_cv_type_pid_t=yes
c375c43b 10603else
ba479fd2
NN
10604 echo "$as_me: failed program was:" >&5
10605sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 10606
a6ccdbab 10607 ac_cv_type_pid_t=no
ba479fd2 10608fi
a6ccdbab
EC
10609
10610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 10611fi
a6ccdbab
EC
10612{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10613echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
ba479fd2
NN
10614if test $ac_cv_type_pid_t = yes; then
10615 :
10616else
10617
10618cat >>confdefs.h <<_ACEOF
c375c43b 10619#define pid_t int
ba479fd2 10620_ACEOF
c375c43b
KG
10621
10622fi
10623
ba479fd2 10624
a6ccdbab 10625for ac_header in vfork.h
ba479fd2
NN
10626do
10627as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
a6ccdbab
EC
10628{ echo "$as_me:$LINENO: checking for $ac_header" >&5
10629echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10630if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2 10631 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 10632else
18fc9bd4 10633 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10634/* confdefs.h. */
10635_ACEOF
10636cat confdefs.h >>conftest.$ac_ext
10637cat >>conftest.$ac_ext <<_ACEOF
10638/* end confdefs.h. */
10639#include <$ac_header>
10640_ACEOF
a6ccdbab
EC
10641if { (ac_try="$ac_cpp conftest.$ac_ext"
10642case "(($ac_try" in
10643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10644 *) ac_try_echo=$ac_try;;
10645esac
10646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10647 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
10648 ac_status=$?
10649 grep -v '^ *+' conftest.er1 >conftest.err
10650 rm -f conftest.er1
10651 cat conftest.err >&5
10652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
10653 (exit $ac_status); } >/dev/null && {
10654 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10655 test ! -s conftest.err
10656 }; then
18fc9bd4 10657 eval "$as_ac_Header=yes"
ba479fd2
NN
10658else
10659 echo "$as_me: failed program was:" >&5
10660sed 's/^/| /' conftest.$ac_ext >&5
10661
18fc9bd4 10662 eval "$as_ac_Header=no"
ba479fd2 10663fi
a6ccdbab 10664
ba479fd2 10665rm -f conftest.err conftest.$ac_ext
c375c43b 10666fi
a6ccdbab
EC
10667ac_res=`eval echo '${'$as_ac_Header'}'`
10668 { echo "$as_me:$LINENO: result: $ac_res" >&5
10669echo "${ECHO_T}$ac_res" >&6; }
ba479fd2
NN
10670if test `eval echo '${'$as_ac_Header'}'` = yes; then
10671 cat >>confdefs.h <<_ACEOF
10672#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10673_ACEOF
6e3f3080
NN
10674
10675fi
ba479fd2
NN
10676done
10677
10678
10679
10680for ac_func in fork vfork
10681do
10682as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
a6ccdbab
EC
10683{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10684echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10685if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2
NN
10686 echo $ECHO_N "(cached) $ECHO_C" >&6
10687else
10688 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10689/* confdefs.h. */
10690_ACEOF
10691cat confdefs.h >>conftest.$ac_ext
10692cat >>conftest.$ac_ext <<_ACEOF
10693/* end confdefs.h. */
86da66b5
HPN
10694/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10695 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10696#define $ac_func innocuous_$ac_func
10697
c375c43b 10698/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
10699 which can conflict with char $ac_func (); below.
10700 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10701 <limits.h> exists even on freestanding compilers. */
86da66b5 10702
ba479fd2
NN
10703#ifdef __STDC__
10704# include <limits.h>
10705#else
10706# include <assert.h>
10707#endif
86da66b5
HPN
10708
10709#undef $ac_func
10710
a6ccdbab
EC
10711/* Override any GCC internal prototype to avoid an error.
10712 Use char because int might match the return type of a GCC
10713 builtin and then its argument prototype would still apply. */
ba479fd2
NN
10714#ifdef __cplusplus
10715extern "C"
ba479fd2 10716#endif
ba479fd2 10717char $ac_func ();
c375c43b
KG
10718/* The GNU C library defines this for functions which it implements
10719 to always fail with ENOSYS. Some functions are actually named
10720 something starting with __ and the normal name is an alias. */
a6ccdbab 10721#if defined __stub_$ac_func || defined __stub___$ac_func
c375c43b 10722choke me
c375c43b
KG
10723#endif
10724
ba479fd2
NN
10725int
10726main ()
10727{
a6ccdbab 10728return $ac_func ();
ba479fd2
NN
10729 ;
10730 return 0;
10731}
10732_ACEOF
10733rm -f conftest.$ac_objext conftest$ac_exeext
a6ccdbab
EC
10734if { (ac_try="$ac_link"
10735case "(($ac_try" in
10736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10737 *) ac_try_echo=$ac_try;;
10738esac
10739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10740 (eval "$ac_link") 2>conftest.er1
ba479fd2 10741 ac_status=$?
86da66b5
HPN
10742 grep -v '^ *+' conftest.er1 >conftest.err
10743 rm -f conftest.er1
10744 cat conftest.err >&5
ba479fd2 10745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
10746 (exit $ac_status); } && {
10747 test -z "$ac_c_werror_flag" ||
10748 test ! -s conftest.err
10749 } && test -s conftest$ac_exeext &&
10750 $as_test_x conftest$ac_exeext; then
ba479fd2
NN
10751 eval "$as_ac_var=yes"
10752else
10753 echo "$as_me: failed program was:" >&5
10754sed 's/^/| /' conftest.$ac_ext >&5
10755
a6ccdbab 10756 eval "$as_ac_var=no"
ba479fd2 10757fi
a6ccdbab
EC
10758
10759rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
86da66b5 10760 conftest$ac_exeext conftest.$ac_ext
ba479fd2 10761fi
a6ccdbab
EC
10762ac_res=`eval echo '${'$as_ac_var'}'`
10763 { echo "$as_me:$LINENO: result: $ac_res" >&5
10764echo "${ECHO_T}$ac_res" >&6; }
ba479fd2
NN
10765if test `eval echo '${'$as_ac_var'}'` = yes; then
10766 cat >>confdefs.h <<_ACEOF
10767#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10768_ACEOF
10769
c375c43b 10770fi
ba479fd2 10771done
c375c43b 10772
ba479fd2 10773if test "x$ac_cv_func_fork" = xyes; then
a6ccdbab
EC
10774 { echo "$as_me:$LINENO: checking for working fork" >&5
10775echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
ba479fd2
NN
10776if test "${ac_cv_func_fork_works+set}" = set; then
10777 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10778else
ba479fd2
NN
10779 if test "$cross_compiling" = yes; then
10780 ac_cv_func_fork_works=cross
10781else
10782 cat >conftest.$ac_ext <<_ACEOF
a6ccdbab
EC
10783/* confdefs.h. */
10784_ACEOF
10785cat confdefs.h >>conftest.$ac_ext
10786cat >>conftest.$ac_ext <<_ACEOF
10787/* end confdefs.h. */
10788$ac_includes_default
10789int
10790main ()
10791{
10792
10793 /* By Ruediger Kuhlmann. */
10794 return fork () < 0;
10795
10796 ;
10797 return 0;
10798}
ba479fd2
NN
10799_ACEOF
10800rm -f conftest$ac_exeext
a6ccdbab
EC
10801if { (ac_try="$ac_link"
10802case "(($ac_try" in
10803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10804 *) ac_try_echo=$ac_try;;
10805esac
10806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10807 (eval "$ac_link") 2>&5
ba479fd2
NN
10808 ac_status=$?
10809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10810 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a6ccdbab
EC
10811 { (case "(($ac_try" in
10812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10813 *) ac_try_echo=$ac_try;;
10814esac
10815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10816 (eval "$ac_try") 2>&5
ba479fd2
NN
10817 ac_status=$?
10818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10819 (exit $ac_status); }; }; then
10820 ac_cv_func_fork_works=yes
10821else
10822 echo "$as_me: program exited with status $ac_status" >&5
10823echo "$as_me: failed program was:" >&5
10824sed 's/^/| /' conftest.$ac_ext >&5
10825
10826( exit $ac_status )
10827ac_cv_func_fork_works=no
10828fi
a6ccdbab 10829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2 10830fi
a6ccdbab
EC
10831
10832
ba479fd2 10833fi
a6ccdbab
EC
10834{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
10835echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
ba479fd2
NN
10836
10837else
10838 ac_cv_func_fork_works=$ac_cv_func_fork
10839fi
10840if test "x$ac_cv_func_fork_works" = xcross; then
10841 case $host in
10842 *-*-amigaos* | *-*-msdosdjgpp*)
10843 # Override, as these systems have only a dummy fork() stub
10844 ac_cv_func_fork_works=no
10845 ;;
10846 *)
10847 ac_cv_func_fork_works=yes
10848 ;;
10849 esac
10850 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10851echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 10852fi
c375c43b 10853ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2 10854if test "x$ac_cv_func_vfork" = xyes; then
a6ccdbab
EC
10855 { echo "$as_me:$LINENO: checking for working vfork" >&5
10856echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
ba479fd2
NN
10857if test "${ac_cv_func_vfork_works+set}" = set; then
10858 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10859else
ba479fd2
NN
10860 if test "$cross_compiling" = yes; then
10861 ac_cv_func_vfork_works=cross
10862else
10863 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10864/* confdefs.h. */
10865_ACEOF
10866cat confdefs.h >>conftest.$ac_ext
10867cat >>conftest.$ac_ext <<_ACEOF
10868/* end confdefs.h. */
c375c43b 10869/* Thanks to Paul Eggert for this test. */
a6ccdbab 10870$ac_includes_default
ba479fd2 10871#include <sys/wait.h>
a6ccdbab 10872#ifdef HAVE_VFORK_H
ba479fd2 10873# include <vfork.h>
c375c43b
KG
10874#endif
10875/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
10876 argument registers are propagated back to the parent. The compiler
10877 is told about this with #include <vfork.h>, but some compilers
10878 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10879 static variable whose address is put into a register that is
10880 clobbered by the vfork. */
10881static void
c375c43b
KG
10882#ifdef __cplusplus
10883sparc_address_test (int arg)
ba479fd2 10884# else
c375c43b
KG
10885sparc_address_test (arg) int arg;
10886#endif
10887{
10888 static pid_t child;
10889 if (!child) {
10890 child = vfork ();
10891 if (child < 0) {
10892 perror ("vfork");
10893 _exit(2);
10894 }
10895 if (!child) {
10896 arg = getpid();
10897 write(-1, "", 0);
10898 _exit (arg);
10899 }
10900 }
10901}
ba479fd2
NN
10902
10903int
10904main ()
10905{
c375c43b
KG
10906 pid_t parent = getpid ();
10907 pid_t child;
10908
ba479fd2 10909 sparc_address_test (0);
c375c43b
KG
10910
10911 child = vfork ();
10912
10913 if (child == 0) {
ba479fd2
NN
10914 /* Here is another test for sparc vfork register problems. This
10915 test uses lots of local variables, at least as many local
10916 variables as main has allocated so far including compiler
10917 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10918 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10919 reuse the register of parent for one of the local variables,
10920 since it will think that parent can't possibly be used any more
10921 in this routine. Assigning to the local variable will thus
10922 munge parent in the parent process. */
c375c43b
KG
10923 pid_t
10924 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10925 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10926 /* Convince the compiler that p..p7 are live; otherwise, it might
10927 use the same hardware register for all 8 local variables. */
10928 if (p != p1 || p != p2 || p != p3 || p != p4
10929 || p != p5 || p != p6 || p != p7)
10930 _exit(1);
10931
ba479fd2
NN
10932 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10933 from child file descriptors. If the child closes a descriptor
10934 before it execs or exits, this munges the parent's descriptor
10935 as well. Test for this by closing stdout in the child. */
c375c43b
KG
10936 _exit(close(fileno(stdout)) != 0);
10937 } else {
10938 int status;
10939 struct stat st;
10940
10941 while (wait(&status) != child)
10942 ;
a6ccdbab 10943 return (
c375c43b
KG
10944 /* Was there some problem with vforking? */
10945 child < 0
10946
10947 /* Did the child fail? (This shouldn't happen.) */
10948 || status
10949
10950 /* Did the vfork/compiler bug occur? */
10951 || parent != getpid()
10952
10953 /* Did the file descriptor bug occur? */
10954 || fstat(fileno(stdout), &st) != 0
10955 );
10956 }
10957}
ba479fd2
NN
10958_ACEOF
10959rm -f conftest$ac_exeext
a6ccdbab
EC
10960if { (ac_try="$ac_link"
10961case "(($ac_try" in
10962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10963 *) ac_try_echo=$ac_try;;
10964esac
10965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10966 (eval "$ac_link") 2>&5
ba479fd2
NN
10967 ac_status=$?
10968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10969 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a6ccdbab
EC
10970 { (case "(($ac_try" in
10971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10972 *) ac_try_echo=$ac_try;;
10973esac
10974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10975 (eval "$ac_try") 2>&5
ba479fd2
NN
10976 ac_status=$?
10977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10978 (exit $ac_status); }; }; then
c375c43b
KG
10979 ac_cv_func_vfork_works=yes
10980else
ba479fd2
NN
10981 echo "$as_me: program exited with status $ac_status" >&5
10982echo "$as_me: failed program was:" >&5
10983sed 's/^/| /' conftest.$ac_ext >&5
10984
10985( exit $ac_status )
10986ac_cv_func_vfork_works=no
cafe096b 10987fi
a6ccdbab 10988rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 10989fi
a6ccdbab
EC
10990
10991
ba479fd2 10992fi
a6ccdbab
EC
10993{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
10994echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
c375c43b 10995
ba479fd2
NN
10996fi;
10997if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 10998 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
10999 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11000echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
11001fi
11002
ba479fd2
NN
11003if test "x$ac_cv_func_vfork_works" = xyes; then
11004
11005cat >>confdefs.h <<\_ACEOF
11006#define HAVE_WORKING_VFORK 1
11007_ACEOF
11008
11009else
11010
11011cat >>confdefs.h <<\_ACEOF
c375c43b 11012#define vfork fork
ba479fd2 11013_ACEOF
c375c43b
KG
11014
11015fi
ba479fd2
NN
11016if test "x$ac_cv_func_fork_works" = xyes; then
11017
11018cat >>confdefs.h <<\_ACEOF
11019#define HAVE_WORKING_FORK 1
11020_ACEOF
11021
11022fi
11023
c375c43b 11024
81bf3d9e 11025
dfb77e37
KC
11026 if test "X$prefix" = "XNONE"; then
11027 acl_final_prefix="$ac_default_prefix"
11028 else
11029 acl_final_prefix="$prefix"
11030 fi
11031 if test "X$exec_prefix" = "XNONE"; then
11032 acl_final_exec_prefix='${prefix}'
11033 else
11034 acl_final_exec_prefix="$exec_prefix"
11035 fi
11036 acl_save_prefix="$prefix"
11037 prefix="$acl_final_prefix"
11038 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
11039 prefix="$acl_save_prefix"
f91abfce
TT
11040
11041
a6ccdbab 11042# Check whether --with-gnu-ld was given.
dfb77e37 11043if test "${with_gnu_ld+set}" = set; then
a6ccdbab 11044 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
ba479fd2 11045else
dfb77e37 11046 with_gnu_ld=no
a6ccdbab
EC
11047fi
11048
dfb77e37
KC
11049# Prepare PATH_SEPARATOR.
11050# The user is always right.
11051if test "${PATH_SEPARATOR+set}" != set; then
11052 echo "#! /bin/sh" >conf$$.sh
11053 echo "exit 0" >>conf$$.sh
11054 chmod +x conf$$.sh
11055 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11056 PATH_SEPARATOR=';'
ba479fd2 11057 else
dfb77e37 11058 PATH_SEPARATOR=:
ba479fd2 11059 fi
dfb77e37
KC
11060 rm -f conf$$.sh
11061fi
11062ac_prog=ld
11063if test "$GCC" = yes; then
11064 # Check if gcc -print-prog-name=ld gives a path.
a6ccdbab
EC
11065 { echo "$as_me:$LINENO: checking for ld used by GCC" >&5
11066echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; }
dfb77e37
KC
11067 case $host in
11068 *-*-mingw*)
11069 # gcc leaves a trailing carriage return which upsets mingw
11070 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
11071 *)
11072 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
11073 esac
11074 case $ac_prog in
11075 # Accept absolute paths.
11076 [\\/]* | [A-Za-z]:[\\/]*)
11077 re_direlt='/[^/][^/]*/\.\./'
11078 # Canonicalize the path of ld
11079 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
11080 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
11081 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
11082 done
11083 test -z "$LD" && LD="$ac_prog"
11084 ;;
11085 "")
11086 # If it fails, then pretend we aren't using GCC.
11087 ac_prog=ld
11088 ;;
11089 *)
11090 # If it is relative, then search for the first ld in PATH.
11091 with_gnu_ld=unknown
11092 ;;
11093 esac
11094elif test "$with_gnu_ld" = yes; then
a6ccdbab
EC
11095 { echo "$as_me:$LINENO: checking for GNU ld" >&5
11096echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
ba479fd2 11097else
a6ccdbab
EC
11098 { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
11099echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
ba479fd2 11100fi
dfb77e37
KC
11101if test "${acl_cv_path_LD+set}" = set; then
11102 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 11103else
dfb77e37
KC
11104 if test -z "$LD"; then
11105 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
11106 for ac_dir in $PATH; do
11107 test -z "$ac_dir" && ac_dir=.
11108 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
11109 acl_cv_path_LD="$ac_dir/$ac_prog"
11110 # Check to see if the program is GNU ld. I'd rather use --version,
11111 # but apparently some GNU ld's only accept -v.
11112 # Break only if it was the GNU/non-GNU ld that we prefer.
18fc9bd4
RG
11113 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
11114 test "$with_gnu_ld" != no && break
11115 else
11116 test "$with_gnu_ld" != yes && break
11117 fi
dfb77e37
KC
11118 fi
11119 done
11120 IFS="$ac_save_ifs"
11121else
11122 acl_cv_path_LD="$LD" # Let the user override the test with a path.
11123fi
11124fi
ba479fd2 11125
dfb77e37
KC
11126LD="$acl_cv_path_LD"
11127if test -n "$LD"; then
a6ccdbab
EC
11128 { echo "$as_me:$LINENO: result: $LD" >&5
11129echo "${ECHO_T}$LD" >&6; }
dfb77e37 11130else
a6ccdbab
EC
11131 { echo "$as_me:$LINENO: result: no" >&5
11132echo "${ECHO_T}no" >&6; }
ba479fd2 11133fi
dfb77e37
KC
11134test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
11135echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
11136 { (exit 1); exit 1; }; }
a6ccdbab
EC
11137{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
11138echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
dfb77e37
KC
11139if test "${acl_cv_prog_gnu_ld+set}" = set; then
11140 echo $ECHO_N "(cached) $ECHO_C" >&6
11141else
11142 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
18fc9bd4
RG
11143if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
11144 acl_cv_prog_gnu_ld=yes
11145else
11146 acl_cv_prog_gnu_ld=no
11147fi
dfb77e37 11148fi
a6ccdbab
EC
11149{ echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
11150echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; }
dfb77e37
KC
11151with_gnu_ld=$acl_cv_prog_gnu_ld
11152
11153
11154
a6ccdbab
EC
11155 { echo "$as_me:$LINENO: checking for shared library run path origin" >&5
11156echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; }
dfb77e37
KC
11157if test "${acl_cv_rpath+set}" = set; then
11158 echo $ECHO_N "(cached) $ECHO_C" >&6
11159else
11160
11161 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
11162 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
11163 . ./conftest.sh
11164 rm -f ./conftest.sh
11165 acl_cv_rpath=done
ba479fd2 11166
eb158727 11167fi
a6ccdbab
EC
11168{ echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
11169echo "${ECHO_T}$acl_cv_rpath" >&6; }
dfb77e37
KC
11170 wl="$acl_cv_wl"
11171 libext="$acl_cv_libext"
11172 shlibext="$acl_cv_shlibext"
11173 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
11174 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
11175 hardcode_direct="$acl_cv_hardcode_direct"
11176 hardcode_minus_L="$acl_cv_hardcode_minus_L"
a6ccdbab 11177 # Check whether --enable-rpath was given.
dfb77e37 11178if test "${enable_rpath+set}" = set; then
a6ccdbab 11179 enableval=$enable_rpath; :
dfb77e37
KC
11180else
11181 enable_rpath=yes
a6ccdbab
EC
11182fi
11183
dfb77e37
KC
11184
11185
11186
11187
11188
11189
11190
11191 use_additional=yes
11192
11193 acl_save_prefix="$prefix"
11194 prefix="$acl_final_prefix"
11195 acl_save_exec_prefix="$exec_prefix"
11196 exec_prefix="$acl_final_exec_prefix"
11197
11198 eval additional_includedir=\"$includedir\"
11199 eval additional_libdir=\"$libdir\"
11200
11201 exec_prefix="$acl_save_exec_prefix"
11202 prefix="$acl_save_prefix"
11203
11204
a6ccdbab 11205# Check whether --with-libiconv-prefix was given.
dfb77e37 11206if test "${with_libiconv_prefix+set}" = set; then
a6ccdbab 11207 withval=$with_libiconv_prefix;
dfb77e37
KC
11208 if test "X$withval" = "Xno"; then
11209 use_additional=no
11210 else
11211 if test "X$withval" = "X"; then
11212
11213 acl_save_prefix="$prefix"
11214 prefix="$acl_final_prefix"
11215 acl_save_exec_prefix="$exec_prefix"
11216 exec_prefix="$acl_final_exec_prefix"
11217
11218 eval additional_includedir=\"$includedir\"
11219 eval additional_libdir=\"$libdir\"
11220
11221 exec_prefix="$acl_save_exec_prefix"
11222 prefix="$acl_save_prefix"
11223
11224 else
11225 additional_includedir="$withval/include"
11226 additional_libdir="$withval/lib"
11227 fi
11228 fi
11229
a6ccdbab
EC
11230fi
11231
dfb77e37
KC
11232 LIBICONV=
11233 LTLIBICONV=
11234 INCICONV=
11235 rpathdirs=
11236 ltrpathdirs=
11237 names_already_handled=
11238 names_next_round='iconv '
11239 while test -n "$names_next_round"; do
11240 names_this_round="$names_next_round"
11241 names_next_round=
11242 for name in $names_this_round; do
11243 already_handled=
11244 for n in $names_already_handled; do
11245 if test "$n" = "$name"; then
11246 already_handled=yes
11247 break
11248 fi
11249 done
11250 if test -z "$already_handled"; then
11251 names_already_handled="$names_already_handled $name"
11252 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11253 eval value=\"\$HAVE_LIB$uppername\"
11254 if test -n "$value"; then
11255 if test "$value" = yes; then
11256 eval value=\"\$LIB$uppername\"
11257 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
11258 eval value=\"\$LTLIB$uppername\"
11259 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
11260 else
11261 :
11262 fi
11263 else
11264 found_dir=
11265 found_la=
11266 found_so=
11267 found_a=
11268 if test $use_additional = yes; then
11269 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11270 found_dir="$additional_libdir"
11271 found_so="$additional_libdir/lib$name.$shlibext"
11272 if test -f "$additional_libdir/lib$name.la"; then
11273 found_la="$additional_libdir/lib$name.la"
11274 fi
11275 else
11276 if test -f "$additional_libdir/lib$name.$libext"; then
11277 found_dir="$additional_libdir"
11278 found_a="$additional_libdir/lib$name.$libext"
11279 if test -f "$additional_libdir/lib$name.la"; then
11280 found_la="$additional_libdir/lib$name.la"
11281 fi
11282 fi
11283 fi
11284 fi
11285 if test "X$found_dir" = "X"; then
11286 for x in $LDFLAGS $LTLIBICONV; do
11287
11288 acl_save_prefix="$prefix"
11289 prefix="$acl_final_prefix"
11290 acl_save_exec_prefix="$exec_prefix"
11291 exec_prefix="$acl_final_exec_prefix"
11292 eval x=\"$x\"
11293 exec_prefix="$acl_save_exec_prefix"
11294 prefix="$acl_save_prefix"
11295
11296 case "$x" in
11297 -L*)
11298 dir=`echo "X$x" | sed -e 's/^X-L//'`
11299 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11300 found_dir="$dir"
11301 found_so="$dir/lib$name.$shlibext"
11302 if test -f "$dir/lib$name.la"; then
11303 found_la="$dir/lib$name.la"
11304 fi
11305 else
11306 if test -f "$dir/lib$name.$libext"; then
11307 found_dir="$dir"
11308 found_a="$dir/lib$name.$libext"
11309 if test -f "$dir/lib$name.la"; then
11310 found_la="$dir/lib$name.la"
11311 fi
11312 fi
11313 fi
11314 ;;
11315 esac
11316 if test "X$found_dir" != "X"; then
11317 break
11318 fi
11319 done
11320 fi
11321 if test "X$found_dir" != "X"; then
11322 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
11323 if test "X$found_so" != "X"; then
11324 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11325 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11326 else
11327 haveit=
11328 for x in $ltrpathdirs; do
11329 if test "X$x" = "X$found_dir"; then
11330 haveit=yes
11331 break
11332 fi
11333 done
11334 if test -z "$haveit"; then
11335 ltrpathdirs="$ltrpathdirs $found_dir"
11336 fi
11337 if test "$hardcode_direct" = yes; then
11338 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11339 else
11340 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11341 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11342 haveit=
11343 for x in $rpathdirs; do
11344 if test "X$x" = "X$found_dir"; then
11345 haveit=yes
11346 break
11347 fi
11348 done
11349 if test -z "$haveit"; then
11350 rpathdirs="$rpathdirs $found_dir"
11351 fi
11352 else
11353 haveit=
11354 for x in $LDFLAGS $LIBICONV; do
11355
11356 acl_save_prefix="$prefix"
11357 prefix="$acl_final_prefix"
11358 acl_save_exec_prefix="$exec_prefix"
11359 exec_prefix="$acl_final_exec_prefix"
11360 eval x=\"$x\"
11361 exec_prefix="$acl_save_exec_prefix"
11362 prefix="$acl_save_prefix"
11363
11364 if test "X$x" = "X-L$found_dir"; then
11365 haveit=yes
11366 break
11367 fi
11368 done
11369 if test -z "$haveit"; then
11370 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
11371 fi
11372 if test "$hardcode_minus_L" != no; then
11373 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11374 else
11375 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11376 fi
11377 fi
11378 fi
11379 fi
11380 else
11381 if test "X$found_a" != "X"; then
11382 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
11383 else
11384 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
11385 fi
11386 fi
11387 additional_includedir=
11388 case "$found_dir" in
11389 */lib | */lib/)
11390 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11391 additional_includedir="$basedir/include"
11392 ;;
11393 esac
11394 if test "X$additional_includedir" != "X"; then
11395 if test "X$additional_includedir" != "X/usr/include"; then
11396 haveit=
11397 if test "X$additional_includedir" = "X/usr/local/include"; then
11398 if test -n "$GCC"; then
11399 case $host_os in
18fc9bd4 11400 linux*) haveit=yes;;
dfb77e37
KC
11401 esac
11402 fi
11403 fi
11404 if test -z "$haveit"; then
11405 for x in $CPPFLAGS $INCICONV; do
11406
11407 acl_save_prefix="$prefix"
11408 prefix="$acl_final_prefix"
11409 acl_save_exec_prefix="$exec_prefix"
11410 exec_prefix="$acl_final_exec_prefix"
11411 eval x=\"$x\"
11412 exec_prefix="$acl_save_exec_prefix"
11413 prefix="$acl_save_prefix"
11414
11415 if test "X$x" = "X-I$additional_includedir"; then
11416 haveit=yes
11417 break
11418 fi
11419 done
11420 if test -z "$haveit"; then
11421 if test -d "$additional_includedir"; then
11422 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
11423 fi
11424 fi
11425 fi
11426 fi
11427 fi
11428 if test -n "$found_la"; then
11429 save_libdir="$libdir"
11430 case "$found_la" in
11431 */* | *\\*) . "$found_la" ;;
11432 *) . "./$found_la" ;;
11433 esac
11434 libdir="$save_libdir"
11435 for dep in $dependency_libs; do
11436 case "$dep" in
11437 -L*)
11438 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11439 if test "X$additional_libdir" != "X/usr/lib"; then
11440 haveit=
11441 if test "X$additional_libdir" = "X/usr/local/lib"; then
11442 if test -n "$GCC"; then
11443 case $host_os in
18fc9bd4 11444 linux*) haveit=yes;;
dfb77e37
KC
11445 esac
11446 fi
11447 fi
11448 if test -z "$haveit"; then
11449 haveit=
11450 for x in $LDFLAGS $LIBICONV; do
11451
11452 acl_save_prefix="$prefix"
11453 prefix="$acl_final_prefix"
11454 acl_save_exec_prefix="$exec_prefix"
11455 exec_prefix="$acl_final_exec_prefix"
11456 eval x=\"$x\"
11457 exec_prefix="$acl_save_exec_prefix"
11458 prefix="$acl_save_prefix"
11459
11460 if test "X$x" = "X-L$additional_libdir"; then
11461 haveit=yes
11462 break
11463 fi
11464 done
11465 if test -z "$haveit"; then
11466 if test -d "$additional_libdir"; then
11467 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
11468 fi
11469 fi
11470 haveit=
11471 for x in $LDFLAGS $LTLIBICONV; do
11472
11473 acl_save_prefix="$prefix"
11474 prefix="$acl_final_prefix"
11475 acl_save_exec_prefix="$exec_prefix"
11476 exec_prefix="$acl_final_exec_prefix"
11477 eval x=\"$x\"
11478 exec_prefix="$acl_save_exec_prefix"
11479 prefix="$acl_save_prefix"
11480
11481 if test "X$x" = "X-L$additional_libdir"; then
11482 haveit=yes
11483 break
11484 fi
11485 done
11486 if test -z "$haveit"; then
11487 if test -d "$additional_libdir"; then
11488 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
11489 fi
11490 fi
11491 fi
11492 fi
11493 ;;
11494 -R*)
11495 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11496 if test "$enable_rpath" != no; then
11497 haveit=
11498 for x in $rpathdirs; do
11499 if test "X$x" = "X$dir"; then
11500 haveit=yes
11501 break
11502 fi
11503 done
11504 if test -z "$haveit"; then
11505 rpathdirs="$rpathdirs $dir"
11506 fi
11507 haveit=
11508 for x in $ltrpathdirs; do
11509 if test "X$x" = "X$dir"; then
11510 haveit=yes
11511 break
11512 fi
11513 done
11514 if test -z "$haveit"; then
11515 ltrpathdirs="$ltrpathdirs $dir"
11516 fi
11517 fi
11518 ;;
11519 -l*)
11520 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11521 ;;
11522 *.la)
11523 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11524 ;;
11525 *)
11526 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
11527 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
11528 ;;
11529 esac
11530 done
11531 fi
11532 else
11533 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11534 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
11535 fi
11536 fi
11537 fi
11538 done
11539 done
11540 if test "X$rpathdirs" != "X"; then
11541 if test -n "$hardcode_libdir_separator"; then
11542 alldirs=
11543 for found_dir in $rpathdirs; do
11544 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11545 done
11546 acl_save_libdir="$libdir"
11547 libdir="$alldirs"
11548 eval flag=\"$hardcode_libdir_flag_spec\"
11549 libdir="$acl_save_libdir"
11550 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11551 else
11552 for found_dir in $rpathdirs; do
11553 acl_save_libdir="$libdir"
11554 libdir="$found_dir"
11555 eval flag=\"$hardcode_libdir_flag_spec\"
11556 libdir="$acl_save_libdir"
11557 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11558 done
11559 fi
11560 fi
11561 if test "X$ltrpathdirs" != "X"; then
11562 for found_dir in $ltrpathdirs; do
11563 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
11564 done
11565 fi
11566
11567
11568
11569
11570
11571
11572
11573 am_save_CPPFLAGS="$CPPFLAGS"
11574
11575 for element in $INCICONV; do
11576 haveit=
11577 for x in $CPPFLAGS; do
11578
11579 acl_save_prefix="$prefix"
11580 prefix="$acl_final_prefix"
11581 acl_save_exec_prefix="$exec_prefix"
11582 exec_prefix="$acl_final_exec_prefix"
11583 eval x=\"$x\"
11584 exec_prefix="$acl_save_exec_prefix"
11585 prefix="$acl_save_prefix"
11586
11587 if test "X$x" = "X$element"; then
11588 haveit=yes
11589 break
11590 fi
11591 done
11592 if test -z "$haveit"; then
11593 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11594 fi
11595 done
eb158727
ZW
11596
11597
a6ccdbab
EC
11598 { echo "$as_me:$LINENO: checking for iconv" >&5
11599echo $ECHO_N "checking for iconv... $ECHO_C" >&6; }
ba479fd2
NN
11600if test "${am_cv_func_iconv+set}" = set; then
11601 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11602else
ba479fd2 11603
f91abfce
TT
11604 am_cv_func_iconv="no, consider installing GNU libiconv"
11605 am_cv_lib_iconv=no
ba479fd2 11606 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11607/* confdefs.h. */
11608_ACEOF
11609cat confdefs.h >>conftest.$ac_ext
11610cat >>conftest.$ac_ext <<_ACEOF
11611/* end confdefs.h. */
f91abfce
TT
11612#include <stdlib.h>
11613#include <iconv.h>
ba479fd2
NN
11614int
11615main ()
11616{
f91abfce
TT
11617iconv_t cd = iconv_open("","");
11618 iconv(cd,NULL,NULL,NULL,NULL);
11619 iconv_close(cd);
ba479fd2
NN
11620 ;
11621 return 0;
11622}
11623_ACEOF
11624rm -f conftest.$ac_objext conftest$ac_exeext
a6ccdbab
EC
11625if { (ac_try="$ac_link"
11626case "(($ac_try" in
11627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11628 *) ac_try_echo=$ac_try;;
11629esac
11630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11631 (eval "$ac_link") 2>conftest.er1
ba479fd2 11632 ac_status=$?
86da66b5
HPN
11633 grep -v '^ *+' conftest.er1 >conftest.err
11634 rm -f conftest.er1
11635 cat conftest.err >&5
ba479fd2 11636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
11637 (exit $ac_status); } && {
11638 test -z "$ac_c_werror_flag" ||
11639 test ! -s conftest.err
11640 } && test -s conftest$ac_exeext &&
11641 $as_test_x conftest$ac_exeext; then
f91abfce
TT
11642 am_cv_func_iconv=yes
11643else
ba479fd2
NN
11644 echo "$as_me: failed program was:" >&5
11645sed 's/^/| /' conftest.$ac_ext >&5
11646
a6ccdbab 11647
f91abfce 11648fi
a6ccdbab
EC
11649
11650rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
86da66b5 11651 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11652 if test "$am_cv_func_iconv" != yes; then
11653 am_save_LIBS="$LIBS"
dfb77e37 11654 LIBS="$LIBS $LIBICONV"
ba479fd2 11655 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11656/* confdefs.h. */
11657_ACEOF
11658cat confdefs.h >>conftest.$ac_ext
11659cat >>conftest.$ac_ext <<_ACEOF
11660/* end confdefs.h. */
f91abfce
TT
11661#include <stdlib.h>
11662#include <iconv.h>
ba479fd2
NN
11663int
11664main ()
11665{
f91abfce
TT
11666iconv_t cd = iconv_open("","");
11667 iconv(cd,NULL,NULL,NULL,NULL);
11668 iconv_close(cd);
ba479fd2
NN
11669 ;
11670 return 0;
11671}
11672_ACEOF
11673rm -f conftest.$ac_objext conftest$ac_exeext
a6ccdbab
EC
11674if { (ac_try="$ac_link"
11675case "(($ac_try" in
11676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11677 *) ac_try_echo=$ac_try;;
11678esac
11679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11680 (eval "$ac_link") 2>conftest.er1
ba479fd2 11681 ac_status=$?
86da66b5
HPN
11682 grep -v '^ *+' conftest.er1 >conftest.err
11683 rm -f conftest.er1
11684 cat conftest.err >&5
ba479fd2 11685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
11686 (exit $ac_status); } && {
11687 test -z "$ac_c_werror_flag" ||
11688 test ! -s conftest.err
11689 } && test -s conftest$ac_exeext &&
11690 $as_test_x conftest$ac_exeext; then
f91abfce
TT
11691 am_cv_lib_iconv=yes
11692 am_cv_func_iconv=yes
11693else
ba479fd2
NN
11694 echo "$as_me: failed program was:" >&5
11695sed 's/^/| /' conftest.$ac_ext >&5
11696
a6ccdbab 11697
f91abfce 11698fi
a6ccdbab
EC
11699
11700rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
86da66b5 11701 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11702 LIBS="$am_save_LIBS"
11703 fi
6e3f3080 11704
ba479fd2 11705fi
a6ccdbab
EC
11706{ echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
11707echo "${ECHO_T}$am_cv_func_iconv" >&6; }
63cf211a 11708 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
11709
11710cat >>confdefs.h <<\_ACEOF
f91abfce 11711#define HAVE_ICONV 1
ba479fd2 11712_ACEOF
f91abfce 11713
dfb77e37
KC
11714 fi
11715 if test "$am_cv_lib_iconv" = yes; then
a6ccdbab
EC
11716 { echo "$as_me:$LINENO: checking how to link with libiconv" >&5
11717echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; }
11718 { echo "$as_me:$LINENO: result: $LIBICONV" >&5
11719echo "${ECHO_T}$LIBICONV" >&6; }
dfb77e37
KC
11720 else
11721 CPPFLAGS="$am_save_CPPFLAGS"
11722 LIBICONV=
11723 LTLIBICONV=
11724 fi
11725
11726
11727
11728 if test "$am_cv_func_iconv" = yes; then
a6ccdbab
EC
11729 { echo "$as_me:$LINENO: checking for iconv declaration" >&5
11730echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6; }
ba479fd2
NN
11731 if test "${am_cv_proto_iconv+set}" = set; then
11732 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11733else
ba479fd2
NN
11734
11735 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11736/* confdefs.h. */
11737_ACEOF
11738cat confdefs.h >>conftest.$ac_ext
11739cat >>conftest.$ac_ext <<_ACEOF
11740/* end confdefs.h. */
f91abfce
TT
11741
11742#include <stdlib.h>
11743#include <iconv.h>
11744extern
11745#ifdef __cplusplus
11746"C"
11747#endif
11748#if defined(__STDC__) || defined(__cplusplus)
11749size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11750#else
11751size_t iconv();
11752#endif
11753
ba479fd2
NN
11754int
11755main ()
11756{
f91abfce 11757
ba479fd2
NN
11758 ;
11759 return 0;
11760}
11761_ACEOF
11762rm -f conftest.$ac_objext
a6ccdbab
EC
11763if { (ac_try="$ac_compile"
11764case "(($ac_try" in
11765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11766 *) ac_try_echo=$ac_try;;
11767esac
11768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11769 (eval "$ac_compile") 2>conftest.er1
ba479fd2 11770 ac_status=$?
86da66b5
HPN
11771 grep -v '^ *+' conftest.er1 >conftest.err
11772 rm -f conftest.er1
11773 cat conftest.err >&5
ba479fd2 11774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
11775 (exit $ac_status); } && {
11776 test -z "$ac_c_werror_flag" ||
11777 test ! -s conftest.err
11778 } && test -s conftest.$ac_objext; then
f91abfce
TT
11779 am_cv_proto_iconv_arg1=""
11780else
ba479fd2
NN
11781 echo "$as_me: failed program was:" >&5
11782sed 's/^/| /' conftest.$ac_ext >&5
11783
a6ccdbab 11784 am_cv_proto_iconv_arg1="const"
f91abfce 11785fi
a6ccdbab
EC
11786
11787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
11788 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);"
11789fi
11790
11791 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
a6ccdbab 11792 { echo "$as_me:$LINENO: result: ${ac_t:-
ba479fd2
NN
11793 }$am_cv_proto_iconv" >&5
11794echo "${ECHO_T}${ac_t:-
a6ccdbab 11795 }$am_cv_proto_iconv" >&6; }
ba479fd2
NN
11796
11797cat >>confdefs.h <<_ACEOF
f91abfce 11798#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 11799_ACEOF
f91abfce
TT
11800
11801 fi
f91abfce 11802
56694dd9
ZW
11803# Until we have in-tree GNU iconv:
11804LIBICONV_DEP=
11805
11806
18fc9bd4 11807
a6ccdbab
EC
11808 { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
11809echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; }
18fc9bd4
RG
11810if test "${am_cv_val_LC_MESSAGES+set}" = set; then
11811 echo $ECHO_N "(cached) $ECHO_C" >&6
11812else
11813 cat >conftest.$ac_ext <<_ACEOF
11814/* confdefs.h. */
11815_ACEOF
11816cat confdefs.h >>conftest.$ac_ext
11817cat >>conftest.$ac_ext <<_ACEOF
11818/* end confdefs.h. */
11819#include <locale.h>
11820int
11821main ()
11822{
11823return LC_MESSAGES
11824 ;
11825 return 0;
11826}
11827_ACEOF
11828rm -f conftest.$ac_objext conftest$ac_exeext
a6ccdbab
EC
11829if { (ac_try="$ac_link"
11830case "(($ac_try" in
11831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11832 *) ac_try_echo=$ac_try;;
11833esac
11834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11835 (eval "$ac_link") 2>conftest.er1
18fc9bd4
RG
11836 ac_status=$?
11837 grep -v '^ *+' conftest.er1 >conftest.err
11838 rm -f conftest.er1
11839 cat conftest.err >&5
11840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
11841 (exit $ac_status); } && {
11842 test -z "$ac_c_werror_flag" ||
11843 test ! -s conftest.err
11844 } && test -s conftest$ac_exeext &&
11845 $as_test_x conftest$ac_exeext; then
18fc9bd4
RG
11846 am_cv_val_LC_MESSAGES=yes
11847else
11848 echo "$as_me: failed program was:" >&5
11849sed 's/^/| /' conftest.$ac_ext >&5
11850
a6ccdbab 11851 am_cv_val_LC_MESSAGES=no
18fc9bd4 11852fi
a6ccdbab
EC
11853
11854rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18fc9bd4
RG
11855 conftest$ac_exeext conftest.$ac_ext
11856fi
a6ccdbab
EC
11857{ echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
11858echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; }
18fc9bd4
RG
11859 if test $am_cv_val_LC_MESSAGES = yes; then
11860
11861cat >>confdefs.h <<\_ACEOF
11862#define HAVE_LC_MESSAGES 1
11863_ACEOF
11864
11865 fi
11866
f91abfce 11867
a03ea89b 11868
a6ccdbab
EC
11869 { echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
11870echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
a03ea89b
BM
11871if test "${am_cv_langinfo_codeset+set}" = set; then
11872 echo $ECHO_N "(cached) $ECHO_C" >&6
11873else
11874 cat >conftest.$ac_ext <<_ACEOF
11875/* confdefs.h. */
11876_ACEOF
11877cat confdefs.h >>conftest.$ac_ext
11878cat >>conftest.$ac_ext <<_ACEOF
11879/* end confdefs.h. */
11880#include <langinfo.h>
11881int
11882main ()
11883{
11884char* cs = nl_langinfo(CODESET);
11885 ;
11886 return 0;
11887}
11888_ACEOF
11889rm -f conftest.$ac_objext conftest$ac_exeext
a6ccdbab
EC
11890if { (ac_try="$ac_link"
11891case "(($ac_try" in
11892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11893 *) ac_try_echo=$ac_try;;
11894esac
11895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11896 (eval "$ac_link") 2>conftest.er1
a03ea89b
BM
11897 ac_status=$?
11898 grep -v '^ *+' conftest.er1 >conftest.err
11899 rm -f conftest.er1
11900 cat conftest.err >&5
11901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
11902 (exit $ac_status); } && {
11903 test -z "$ac_c_werror_flag" ||
11904 test ! -s conftest.err
11905 } && test -s conftest$ac_exeext &&
11906 $as_test_x conftest$ac_exeext; then
a03ea89b
BM
11907 am_cv_langinfo_codeset=yes
11908else
11909 echo "$as_me: failed program was:" >&5
11910sed 's/^/| /' conftest.$ac_ext >&5
11911
a6ccdbab 11912 am_cv_langinfo_codeset=no
a03ea89b 11913fi
a6ccdbab
EC
11914
11915rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
a03ea89b
BM
11916 conftest$ac_exeext conftest.$ac_ext
11917
11918fi
a6ccdbab
EC
11919{ echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
11920echo "${ECHO_T}$am_cv_langinfo_codeset" >&6; }
a03ea89b
BM
11921 if test $am_cv_langinfo_codeset = yes; then
11922
11923cat >>confdefs.h <<\_ACEOF
11924#define HAVE_LANGINFO_CODESET 1
11925_ACEOF
11926
11927 fi
11928
11929
86cf1cbd
KG
11930# We will need to find libiberty.h and ansidecl.h
11931saved_CFLAGS="$CFLAGS"
11932CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
6a257778 11954
ad6717df
PB
11955
11956
0d667716
KG
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
367e8319 11967
0d667716
KG
11968
11969
7391b66c 11970
ed5b9f96
GK
11971
11972for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
11973 strsignal strstr strverscmp \
11974 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 11975 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
81bf3d9e 11976do
ad6717df 11977 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
a6ccdbab
EC
11978{ echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11979echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; }
11980if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2
NN
11981 echo $ECHO_N "(cached) $ECHO_C" >&6
11982else
11983 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11984/* confdefs.h. */
11985_ACEOF
11986cat confdefs.h >>conftest.$ac_ext
11987cat >>conftest.$ac_ext <<_ACEOF
11988/* end confdefs.h. */
7afe8c41
KG
11989#undef $ac_tr_decl
11990#define $ac_tr_decl 1
ba479fd2 11991
d02af173 11992#include "ansidecl.h"
86cf1cbd 11993#include "system.h"
f31e826b 11994
ba479fd2
NN
11995int
11996main ()
11997{
86cf1cbd
KG
11998#ifndef $ac_func
11999char *(*pfn) = (char *(*)) $ac_func ;
12000#endif
ba479fd2
NN
12001 ;
12002 return 0;
12003}
12004_ACEOF
12005rm -f conftest.$ac_objext
a6ccdbab
EC
12006if { (ac_try="$ac_compile"
12007case "(($ac_try" in
12008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12009 *) ac_try_echo=$ac_try;;
12010esac
12011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12012 (eval "$ac_compile") 2>conftest.er1
ba479fd2 12013 ac_status=$?
86da66b5
HPN
12014 grep -v '^ *+' conftest.er1 >conftest.err
12015 rm -f conftest.er1
12016 cat conftest.err >&5
ba479fd2 12017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
12018 (exit $ac_status); } && {
12019 test -z "$ac_c_werror_flag" ||
12020 test ! -s conftest.err
12021 } && test -s conftest.$ac_objext; then
f31e826b 12022 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 12023else
ba479fd2
NN
12024 echo "$as_me: failed program was:" >&5
12025sed 's/^/| /' conftest.$ac_ext >&5
12026
a6ccdbab 12027 eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 12028fi
a6ccdbab
EC
12029
12030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
12031fi
12032
f31e826b 12033if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
a6ccdbab
EC
12034 { echo "$as_me:$LINENO: result: yes" >&5
12035echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF
86cf1cbd 12036#define $ac_tr_decl 1
ba479fd2
NN
12037_ACEOF
12038
81bf3d9e 12039else
a6ccdbab
EC
12040 { echo "$as_me:$LINENO: result: no" >&5
12041echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF
f31e826b 12042#define $ac_tr_decl 0
ba479fd2
NN
12043_ACEOF
12044
81bf3d9e
RH
12045fi
12046
12047done
ba479fd2 12048
ba479fd2 12049
ba479fd2 12050
81bf3d9e 12051
81bf3d9e
RH
12052
12053for ac_func in getrlimit setrlimit getrusage
12054do
ad6717df 12055 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
a6ccdbab
EC
12056{ echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12057echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; }
12058if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2
NN
12059 echo $ECHO_N "(cached) $ECHO_C" >&6
12060else
12061 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12062/* confdefs.h. */
12063_ACEOF
12064cat confdefs.h >>conftest.$ac_ext
12065cat >>conftest.$ac_ext <<_ACEOF
12066/* end confdefs.h. */
7afe8c41
KG
12067#undef $ac_tr_decl
12068#define $ac_tr_decl 1
ba479fd2 12069
d02af173 12070#include "ansidecl.h"
86cf1cbd 12071#include "system.h"
81bf3d9e
RH
12072#ifdef HAVE_SYS_RESOURCE_H
12073#include <sys/resource.h>
12074#endif
12075
f31e826b 12076
ba479fd2
NN
12077int
12078main ()
12079{
86cf1cbd
KG
12080#ifndef $ac_func
12081char *(*pfn) = (char *(*)) $ac_func ;
12082#endif
ba479fd2
NN
12083 ;
12084 return 0;
12085}
12086_ACEOF
12087rm -f conftest.$ac_objext
a6ccdbab
EC
12088if { (ac_try="$ac_compile"
12089case "(($ac_try" in
12090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12091 *) ac_try_echo=$ac_try;;
12092esac
12093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12094 (eval "$ac_compile") 2>conftest.er1
ba479fd2 12095 ac_status=$?
86da66b5
HPN
12096 grep -v '^ *+' conftest.er1 >conftest.err
12097 rm -f conftest.er1
12098 cat conftest.err >&5
ba479fd2 12099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
12100 (exit $ac_status); } && {
12101 test -z "$ac_c_werror_flag" ||
12102 test ! -s conftest.err
12103 } && test -s conftest.$ac_objext; then
f31e826b 12104 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 12105else
ba479fd2
NN
12106 echo "$as_me: failed program was:" >&5
12107sed 's/^/| /' conftest.$ac_ext >&5
12108
a6ccdbab 12109 eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 12110fi
a6ccdbab
EC
12111
12112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
12113fi
12114
f31e826b 12115if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
a6ccdbab
EC
12116 { echo "$as_me:$LINENO: result: yes" >&5
12117echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF
86cf1cbd 12118#define $ac_tr_decl 1
ba479fd2
NN
12119_ACEOF
12120
81bf3d9e 12121else
a6ccdbab
EC
12122 { echo "$as_me:$LINENO: result: no" >&5
12123echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF
f31e826b 12124#define $ac_tr_decl 0
ba479fd2
NN
12125_ACEOF
12126
81bf3d9e
RH
12127fi
12128
12129done
86cf1cbd 12130
81bf3d9e 12131
ba479fd2 12132cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12133/* confdefs.h. */
12134_ACEOF
12135cat confdefs.h >>conftest.$ac_ext
12136cat >>conftest.$ac_ext <<_ACEOF
12137/* end confdefs.h. */
b2522d2b
HPN
12138
12139#include "ansidecl.h"
12140#include "system.h"
12141#ifdef HAVE_SYS_RESOURCE_H
12142#include <sys/resource.h>
12143#endif
12144
ba479fd2
NN
12145int
12146main ()
12147{
b2522d2b 12148rlim_t l = 0;
ba479fd2
NN
12149 ;
12150 return 0;
12151}
12152_ACEOF
12153rm -f conftest.$ac_objext
a6ccdbab
EC
12154if { (ac_try="$ac_compile"
12155case "(($ac_try" in
12156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12157 *) ac_try_echo=$ac_try;;
12158esac
12159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12160 (eval "$ac_compile") 2>conftest.er1
ba479fd2 12161 ac_status=$?
86da66b5
HPN
12162 grep -v '^ *+' conftest.er1 >conftest.err
12163 rm -f conftest.er1
12164 cat conftest.err >&5
ba479fd2 12165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
12166 (exit $ac_status); } && {
12167 test -z "$ac_c_werror_flag" ||
12168 test ! -s conftest.err
12169 } && test -s conftest.$ac_objext; then
b2522d2b
HPN
12170 :
12171else
ba479fd2
NN
12172 echo "$as_me: failed program was:" >&5
12173sed 's/^/| /' conftest.$ac_ext >&5
12174
12175
12176cat >>confdefs.h <<\_ACEOF
b2522d2b 12177#define rlim_t long
ba479fd2 12178_ACEOF
b2522d2b
HPN
12179
12180fi
a6ccdbab
EC
12181
12182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 12183
2102b2fe
RS
12184# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
12185# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
12186# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
12187# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 12188
351df804 12189for ac_func in ldgetname
c1800ec8 12190do
ad6717df 12191 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
a6ccdbab
EC
12192{ echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12193echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; }
12194if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2
NN
12195 echo $ECHO_N "(cached) $ECHO_C" >&6
12196else
12197 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12198/* confdefs.h. */
12199_ACEOF
12200cat confdefs.h >>conftest.$ac_ext
12201cat >>conftest.$ac_ext <<_ACEOF
12202/* end confdefs.h. */
c1800ec8
ZW
12203#undef $ac_tr_decl
12204#define $ac_tr_decl 1
ba479fd2 12205
351df804
KG
12206#include "ansidecl.h"
12207#include "system.h"
12208#ifdef HAVE_LDFCN_H
2102b2fe
RS
12209#undef FREAD
12210#undef FWRITE
351df804
KG
12211#include <ldfcn.h>
12212#endif
12213
12214
ba479fd2
NN
12215int
12216main ()
12217{
351df804
KG
12218#ifndef $ac_func
12219char *(*pfn) = (char *(*)) $ac_func ;
12220#endif
ba479fd2
NN
12221 ;
12222 return 0;
12223}
12224_ACEOF
12225rm -f conftest.$ac_objext
a6ccdbab
EC
12226if { (ac_try="$ac_compile"
12227case "(($ac_try" in
12228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12229 *) ac_try_echo=$ac_try;;
12230esac
12231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12232 (eval "$ac_compile") 2>conftest.er1
ba479fd2 12233 ac_status=$?
86da66b5
HPN
12234 grep -v '^ *+' conftest.er1 >conftest.err
12235 rm -f conftest.er1
12236 cat conftest.err >&5
ba479fd2 12237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
12238 (exit $ac_status); } && {
12239 test -z "$ac_c_werror_flag" ||
12240 test ! -s conftest.err
12241 } && test -s conftest.$ac_objext; then
351df804
KG
12242 eval "gcc_cv_have_decl_$ac_func=yes"
12243else
ba479fd2
NN
12244 echo "$as_me: failed program was:" >&5
12245sed 's/^/| /' conftest.$ac_ext >&5
12246
a6ccdbab 12247 eval "gcc_cv_have_decl_$ac_func=no"
351df804 12248fi
a6ccdbab
EC
12249
12250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
12251fi
12252
12253if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
a6ccdbab
EC
12254 { echo "$as_me:$LINENO: result: yes" >&5
12255echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF
351df804 12256#define $ac_tr_decl 1
ba479fd2
NN
12257_ACEOF
12258
351df804 12259else
a6ccdbab
EC
12260 { echo "$as_me:$LINENO: result: no" >&5
12261echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF
351df804 12262#define $ac_tr_decl 0
ba479fd2
NN
12263_ACEOF
12264
351df804
KG
12265fi
12266
12267done
ba479fd2 12268
351df804
KG
12269
12270
12271for ac_func in times
12272do
ad6717df 12273 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
a6ccdbab
EC
12274{ echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12275echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; }
12276if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2
NN
12277 echo $ECHO_N "(cached) $ECHO_C" >&6
12278else
12279 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12280/* confdefs.h. */
12281_ACEOF
12282cat confdefs.h >>conftest.$ac_ext
12283cat >>conftest.$ac_ext <<_ACEOF
12284/* end confdefs.h. */
351df804
KG
12285#undef $ac_tr_decl
12286#define $ac_tr_decl 1
ba479fd2 12287
c1800ec8
ZW
12288#include "ansidecl.h"
12289#include "system.h"
12290#ifdef HAVE_SYS_TIMES_H
12291#include <sys/times.h>
12292#endif
12293
12294
ba479fd2
NN
12295int
12296main ()
12297{
c1800ec8
ZW
12298#ifndef $ac_func
12299char *(*pfn) = (char *(*)) $ac_func ;
12300#endif
ba479fd2
NN
12301 ;
12302 return 0;
12303}
12304_ACEOF
12305rm -f conftest.$ac_objext
a6ccdbab
EC
12306if { (ac_try="$ac_compile"
12307case "(($ac_try" in
12308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12309 *) ac_try_echo=$ac_try;;
12310esac
12311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12312 (eval "$ac_compile") 2>conftest.er1
ba479fd2 12313 ac_status=$?
86da66b5
HPN
12314 grep -v '^ *+' conftest.er1 >conftest.err
12315 rm -f conftest.er1
12316 cat conftest.err >&5
ba479fd2 12317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
12318 (exit $ac_status); } && {
12319 test -z "$ac_c_werror_flag" ||
12320 test ! -s conftest.err
12321 } && test -s conftest.$ac_objext; then
c1800ec8
ZW
12322 eval "gcc_cv_have_decl_$ac_func=yes"
12323else
ba479fd2
NN
12324 echo "$as_me: failed program was:" >&5
12325sed 's/^/| /' conftest.$ac_ext >&5
12326
a6ccdbab 12327 eval "gcc_cv_have_decl_$ac_func=no"
c1800ec8 12328fi
a6ccdbab
EC
12329
12330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
12331fi
12332
12333if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
a6ccdbab
EC
12334 { echo "$as_me:$LINENO: result: yes" >&5
12335echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF
c1800ec8 12336#define $ac_tr_decl 1
ba479fd2
NN
12337_ACEOF
12338
c1800ec8 12339else
a6ccdbab
EC
12340 { echo "$as_me:$LINENO: result: no" >&5
12341echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF
c1800ec8 12342#define $ac_tr_decl 0
ba479fd2
NN
12343_ACEOF
12344
c1800ec8
ZW
12345fi
12346
12347done
c1800ec8
ZW
12348
12349
4f6d8cc8
GK
12350
12351for ac_func in sigaltstack
12352do
12353 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
a6ccdbab
EC
12354{ echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12355echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; }
12356if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then
4f6d8cc8
GK
12357 echo $ECHO_N "(cached) $ECHO_C" >&6
12358else
12359 cat >conftest.$ac_ext <<_ACEOF
12360/* confdefs.h. */
12361_ACEOF
12362cat confdefs.h >>conftest.$ac_ext
12363cat >>conftest.$ac_ext <<_ACEOF
12364/* end confdefs.h. */
12365#undef $ac_tr_decl
12366#define $ac_tr_decl 1
12367
12368#include "ansidecl.h"
12369#include "system.h"
12370#include <signal.h>
12371
12372
12373int
12374main ()
12375{
12376#ifndef $ac_func
12377char *(*pfn) = (char *(*)) $ac_func ;
12378#endif
12379 ;
12380 return 0;
12381}
12382_ACEOF
12383rm -f conftest.$ac_objext
a6ccdbab
EC
12384if { (ac_try="$ac_compile"
12385case "(($ac_try" in
12386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12387 *) ac_try_echo=$ac_try;;
12388esac
12389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12390 (eval "$ac_compile") 2>conftest.er1
4f6d8cc8
GK
12391 ac_status=$?
12392 grep -v '^ *+' conftest.er1 >conftest.err
12393 rm -f conftest.er1
12394 cat conftest.err >&5
12395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
12396 (exit $ac_status); } && {
12397 test -z "$ac_c_werror_flag" ||
12398 test ! -s conftest.err
12399 } && test -s conftest.$ac_objext; then
4f6d8cc8
GK
12400 eval "gcc_cv_have_decl_$ac_func=yes"
12401else
12402 echo "$as_me: failed program was:" >&5
12403sed 's/^/| /' conftest.$ac_ext >&5
12404
a6ccdbab 12405 eval "gcc_cv_have_decl_$ac_func=no"
4f6d8cc8 12406fi
a6ccdbab
EC
12407
12408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8
GK
12409fi
12410
12411if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
a6ccdbab
EC
12412 { echo "$as_me:$LINENO: result: yes" >&5
12413echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
12414#define $ac_tr_decl 1
12415_ACEOF
12416
12417else
a6ccdbab
EC
12418 { echo "$as_me:$LINENO: result: no" >&5
12419echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
12420#define $ac_tr_decl 0
12421_ACEOF
12422
12423fi
12424
12425done
12426
12427
c1800ec8 12428# More time-related stuff.
a6ccdbab
EC
12429{ echo "$as_me:$LINENO: checking for struct tms" >&5
12430echo $ECHO_N "checking for struct tms... $ECHO_C" >&6; }
ba479fd2
NN
12431if test "${ac_cv_struct_tms+set}" = set; then
12432 echo $ECHO_N "(cached) $ECHO_C" >&6
12433else
12434
12435cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12436/* confdefs.h. */
12437_ACEOF
12438cat confdefs.h >>conftest.$ac_ext
12439cat >>conftest.$ac_ext <<_ACEOF
12440/* end confdefs.h. */
c1800ec8
ZW
12441
12442#include "ansidecl.h"
12443#include "system.h"
12444#ifdef HAVE_SYS_TIMES_H
12445#include <sys/times.h>
12446#endif
12447
ba479fd2
NN
12448int
12449main ()
12450{
c1800ec8 12451struct tms tms;
ba479fd2
NN
12452 ;
12453 return 0;
12454}
12455_ACEOF
12456rm -f conftest.$ac_objext
a6ccdbab
EC
12457if { (ac_try="$ac_compile"
12458case "(($ac_try" in
12459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12460 *) ac_try_echo=$ac_try;;
12461esac
12462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12463 (eval "$ac_compile") 2>conftest.er1
ba479fd2 12464 ac_status=$?
86da66b5
HPN
12465 grep -v '^ *+' conftest.er1 >conftest.err
12466 rm -f conftest.er1
12467 cat conftest.err >&5
ba479fd2 12468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
12469 (exit $ac_status); } && {
12470 test -z "$ac_c_werror_flag" ||
12471 test ! -s conftest.err
12472 } && test -s conftest.$ac_objext; then
c1800ec8
ZW
12473 ac_cv_struct_tms=yes
12474else
ba479fd2
NN
12475 echo "$as_me: failed program was:" >&5
12476sed 's/^/| /' conftest.$ac_ext >&5
12477
a6ccdbab 12478 ac_cv_struct_tms=no
c1800ec8 12479fi
a6ccdbab
EC
12480
12481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 12482fi
a6ccdbab
EC
12483{ echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
12484echo "${ECHO_T}$ac_cv_struct_tms" >&6; }
63cf211a 12485if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
12486
12487cat >>confdefs.h <<\_ACEOF
c1800ec8 12488#define HAVE_STRUCT_TMS 1
ba479fd2 12489_ACEOF
c1800ec8
ZW
12490
12491fi
12492
12493# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
12494# revisit after autoconf 2.50.
a6ccdbab
EC
12495{ echo "$as_me:$LINENO: checking for clock_t" >&5
12496echo $ECHO_N "checking for clock_t... $ECHO_C" >&6; }
ba479fd2
NN
12497if test "${gcc_cv_type_clock_t+set}" = set; then
12498 echo $ECHO_N "(cached) $ECHO_C" >&6
12499else
12500
12501cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12502/* confdefs.h. */
12503_ACEOF
12504cat confdefs.h >>conftest.$ac_ext
12505cat >>conftest.$ac_ext <<_ACEOF
12506/* end confdefs.h. */
c1800ec8
ZW
12507
12508#include "ansidecl.h"
12509#include "system.h"
12510
ba479fd2
NN
12511int
12512main ()
12513{
c1800ec8 12514clock_t x;
ba479fd2
NN
12515 ;
12516 return 0;
12517}
12518_ACEOF
12519rm -f conftest.$ac_objext
a6ccdbab
EC
12520if { (ac_try="$ac_compile"
12521case "(($ac_try" in
12522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12523 *) ac_try_echo=$ac_try;;
12524esac
12525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12526 (eval "$ac_compile") 2>conftest.er1
ba479fd2 12527 ac_status=$?
86da66b5
HPN
12528 grep -v '^ *+' conftest.er1 >conftest.err
12529 rm -f conftest.er1
12530 cat conftest.err >&5
ba479fd2 12531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
12532 (exit $ac_status); } && {
12533 test -z "$ac_c_werror_flag" ||
12534 test ! -s conftest.err
12535 } && test -s conftest.$ac_objext; then
c1800ec8
ZW
12536 gcc_cv_type_clock_t=yes
12537else
ba479fd2
NN
12538 echo "$as_me: failed program was:" >&5
12539sed 's/^/| /' conftest.$ac_ext >&5
12540
a6ccdbab 12541 gcc_cv_type_clock_t=no
c1800ec8 12542fi
a6ccdbab
EC
12543
12544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 12545fi
a6ccdbab
EC
12546{ echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
12547echo "${ECHO_T}$gcc_cv_type_clock_t" >&6; }
63cf211a 12548if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
12549
12550cat >>confdefs.h <<\_ACEOF
c1800ec8 12551#define HAVE_CLOCK_T 1
ba479fd2 12552_ACEOF
c1800ec8
ZW
12553
12554fi
12555
eb70d86d
AS
12556# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
12557CFLAGS="$saved_CFLAGS"
12558
a6ccdbab 12559# Check whether --enable-initfini-array was given.
07cf4226 12560if test "${enable_initfini_array+set}" = set; then
a6ccdbab 12561 enableval=$enable_initfini_array;
07cf4226 12562else
ba479fd2 12563
a6ccdbab
EC
12564{ echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
12565echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6; }
ba479fd2
NN
12566if test "${gcc_cv_initfini_array+set}" = set; then
12567 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 12568else
eb70d86d 12569 if test "$cross_compiling" = yes; then
918c4fe4 12570 gcc_cv_initfini_array=no
eb70d86d 12571else
ba479fd2 12572 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12573/* confdefs.h. */
12574_ACEOF
12575cat confdefs.h >>conftest.$ac_ext
12576cat >>conftest.$ac_ext <<_ACEOF
12577/* end confdefs.h. */
eb70d86d 12578
07cf4226
DM
12579static int x = -1;
12580int main (void) { return x; }
12581int foo (void) { x = 0; }
12582int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
12583_ACEOF
12584rm -f conftest$ac_exeext
a6ccdbab
EC
12585if { (ac_try="$ac_link"
12586case "(($ac_try" in
12587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12588 *) ac_try_echo=$ac_try;;
12589esac
12590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12591 (eval "$ac_link") 2>&5
ba479fd2
NN
12592 ac_status=$?
12593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12594 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
a6ccdbab
EC
12595 { (case "(($ac_try" in
12596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12597 *) ac_try_echo=$ac_try;;
12598esac
12599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12600 (eval "$ac_try") 2>&5
ba479fd2
NN
12601 ac_status=$?
12602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12603 (exit $ac_status); }; }; then
918c4fe4 12604 gcc_cv_initfini_array=yes
eb70d86d 12605else
ba479fd2
NN
12606 echo "$as_me: program exited with status $ac_status" >&5
12607echo "$as_me: failed program was:" >&5
12608sed 's/^/| /' conftest.$ac_ext >&5
12609
12610( exit $ac_status )
12611gcc_cv_initfini_array=no
eb70d86d 12612fi
a6ccdbab 12613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 12614fi
a6ccdbab
EC
12615
12616
07cf4226 12617fi
a6ccdbab
EC
12618{ echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
12619echo "${ECHO_T}$gcc_cv_initfini_array" >&6; }
eb70d86d 12620 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 12621
a6ccdbab
EC
12622fi
12623
63cf211a 12624if test $enable_initfini_array = yes; then
ba479fd2
NN
12625
12626cat >>confdefs.h <<\_ACEOF
eb70d86d 12627#define HAVE_INITFINI_ARRAY 1
ba479fd2 12628_ACEOF
07cf4226 12629
eb70d86d 12630fi
81bf3d9e 12631
ba479fd2 12632# mkdir takes a single argument on some systems.
a6ccdbab
EC
12633{ echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
12634echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6; }
ba479fd2
NN
12635if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
12636 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 12637else
ba479fd2 12638 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12639/* confdefs.h. */
12640_ACEOF
12641cat confdefs.h >>conftest.$ac_ext
12642cat >>conftest.$ac_ext <<_ACEOF
12643/* end confdefs.h. */
75923b2f
MK
12644
12645#include <sys/types.h>
12646#ifdef HAVE_SYS_STAT_H
12647# include <sys/stat.h>
12648#endif
12649#ifdef HAVE_UNISTD_H
12650# include <unistd.h>
12651#endif
12652#ifdef HAVE_DIRECT_H
12653# include <direct.h>
12654#endif
ba479fd2
NN
12655int
12656main ()
12657{
75923b2f 12658mkdir ("foo", 0);
ba479fd2
NN
12659 ;
12660 return 0;
12661}
12662_ACEOF
12663rm -f conftest.$ac_objext
a6ccdbab
EC
12664if { (ac_try="$ac_compile"
12665case "(($ac_try" in
12666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12667 *) ac_try_echo=$ac_try;;
12668esac
12669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12670 (eval "$ac_compile") 2>conftest.er1
ba479fd2 12671 ac_status=$?
86da66b5
HPN
12672 grep -v '^ *+' conftest.er1 >conftest.err
12673 rm -f conftest.er1
12674 cat conftest.err >&5
ba479fd2 12675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
12676 (exit $ac_status); } && {
12677 test -z "$ac_c_werror_flag" ||
12678 test ! -s conftest.err
12679 } && test -s conftest.$ac_objext; then
75923b2f
MK
12680 gcc_cv_mkdir_takes_one_arg=no
12681else
ba479fd2
NN
12682 echo "$as_me: failed program was:" >&5
12683sed 's/^/| /' conftest.$ac_ext >&5
12684
a6ccdbab 12685 gcc_cv_mkdir_takes_one_arg=yes
75923b2f 12686fi
a6ccdbab
EC
12687
12688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 12689fi
a6ccdbab
EC
12690{ echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
12691echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6; }
63cf211a 12692if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
12693
12694cat >>confdefs.h <<\_ACEOF
75923b2f 12695#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 12696_ACEOF
75923b2f
MK
12697
12698fi
12699
12700
861bb6c1
JL
12701# File extensions
12702manext='.1'
12703objext='.o'
12704
12705
12706
4977bab6 12707# With Setjmp/Longjmp based exception handling.
a6ccdbab 12708# Check whether --enable-sjlj-exceptions was given.
4977bab6 12709if test "${enable_sjlj_exceptions+set}" = set; then
a6ccdbab 12710 enableval=$enable_sjlj_exceptions; sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 12711
ba479fd2
NN
12712cat >>confdefs.h <<_ACEOF
12713#define CONFIG_SJLJ_EXCEPTIONS $sjlj
12714_ACEOF
4977bab6 12715
a6ccdbab
EC
12716fi
12717
4977bab6 12718
443728bb
L
12719# For platforms with the unwind ABI which includes an unwind library,
12720# libunwind, we can choose to use the system libunwind.
4977bab6 12721
a6ccdbab 12722# Check whether --with-system-libunwind was given.
443728bb 12723if test "${with_system_libunwind+set}" = set; then
a6ccdbab
EC
12724 withval=$with_system_libunwind;
12725fi
4977bab6 12726
4977bab6 12727
e64f5acf
SE
12728# config.gcc also contains tests of with_system_libunwind.
12729if test x$with_system_libunwind = xyes; then
12730
12731cat >>confdefs.h <<\_ACEOF
12732#define HAVE_GETIPINFO 1
12733_ACEOF
12734
12735fi
12736
34a86c2b
NN
12737# --------------------------------------------------------
12738# Build, host, and target specific configuration fragments
12739# --------------------------------------------------------
12740
5b28c537
NN
12741# Collect build-machine-specific information.
12742. ${srcdir}/config.build
12743
a89ea0df
NN
12744# Collect host-machine-specific information.
12745. ${srcdir}/config.host
12746
ef69da62 12747target_gtfiles=
a89ea0df
NN
12748
12749# Collect target-machine-specific information.
8ad9fb33 12750. ${srcdir}/config.gcc
861bb6c1
JL
12751
12752extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 12753extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
12754
12755# Default the target-machine variables that were not explicitly set.
75bffa71 12756if test x"$tm_file" = x
861bb6c1
JL
12757then tm_file=$cpu_type/$cpu_type.h; fi
12758
6b2adea9 12759if test x"$extra_headers" = x
861bb6c1
JL
12760then extra_headers=; fi
12761
75bffa71 12762if test x$md_file = x
e98e406f 12763then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 12764
75bffa71 12765if test x$out_file = x
861bb6c1
JL
12766then out_file=$cpu_type/$cpu_type.c; fi
12767
75bffa71 12768if test x"$tmake_file" = x
861bb6c1
JL
12769then tmake_file=$cpu_type/t-$cpu_type
12770fi
12771
90e6a802 12772if test x"$dwarf2" = xyes
756ee602 12773then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
12774fi
12775
861bb6c1 12776# Say what files are being used for the output code and MD file.
11642c3a 12777echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
12778echo "Using \`$srcdir/config/$md_file' as machine description file."
12779
11642c3a 12780# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
12781# about them and drop them.
12782
11642c3a
ZW
12783bx=
12784for x in $build_xm_file; do
12785 if test -f $srcdir/config/$x
12786 then bx="$bx $x"
ba479fd2
NN
12787 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12788echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12789 fi
12790done
12791build_xm_file="$bx"
12792
12793hx=
12794for x in $host_xm_file; do
12795 if test -f $srcdir/config/$x
12796 then hx="$hx $x"
ba479fd2
NN
12797 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12798echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12799 fi
12800done
12801host_xm_file="$hx"
12802
12803tx=
12804for x in $xm_file; do
12805 if test -f $srcdir/config/$x
12806 then tx="$tx $x"
ba479fd2
NN
12807 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12808echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12809 fi
12810done
12811xm_file="$tx"
12812
861bb6c1
JL
12813count=a
12814for f in $tm_file; do
12815 count=${count}x
12816done
75bffa71 12817if test $count = ax; then
861bb6c1
JL
12818 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
12819else
12820 echo "Using the following target machine macro files:"
12821 for f in $tm_file; do
12822 echo " $srcdir/config/$f"
12823 done
12824fi
12825
4977bab6 12826if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
12827
12828cat >>confdefs.h <<\_ACEOF
4977bab6 12829#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 12830_ACEOF
4977bab6
ZW
12831
12832fi
12833
99fa8911
AP
12834if test x$use_long_long_for_widest_fast_int = xyes; then
12835
12836cat >>confdefs.h <<\_ACEOF
12837#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
12838_ACEOF
12839
12840fi
12841
861bb6c1
JL
12842count=a
12843for f in $host_xm_file; do
12844 count=${count}x
12845done
11642c3a
ZW
12846if test $count = a; then
12847 :
12848elif test $count = ax; then
861bb6c1
JL
12849 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
12850else
12851 echo "Using the following host machine macro files:"
12852 for f in $host_xm_file; do
12853 echo " $srcdir/config/$f"
12854 done
12855fi
476d9098 12856echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 12857
75bffa71 12858if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
12859 count=a
12860 for f in $build_xm_file; do
12861 count=${count}x
12862 done
11642c3a
ZW
12863 if test $count = a; then
12864 :
12865 elif test $count = ax; then
861bb6c1
JL
12866 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
12867 else
12868 echo "Using the following build machine macro files:"
12869 for f in $build_xm_file; do
12870 echo " $srcdir/config/$f"
12871 done
12872 fi
12873fi
12874
4f6d8cc8 12875case ${host} in
b8ec3cc8 12876 powerpc*-*-darwin*)
a6ccdbab
EC
12877 { echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5
12878echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6; }
4f6d8cc8
GK
12879if test "${gcc_cv_mcontext_underscores+set}" = set; then
12880 echo $ECHO_N "(cached) $ECHO_C" >&6
12881else
12882 cat >conftest.$ac_ext <<_ACEOF
12883
de4fb767 12884#include <sys/signal.h>
4f6d8cc8
GK
12885#include <ucontext.h>
12886int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
12887
12888_ACEOF
12889rm -f conftest.$ac_objext
a6ccdbab
EC
12890if { (ac_try="$ac_compile"
12891case "(($ac_try" in
12892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12893 *) ac_try_echo=$ac_try;;
12894esac
12895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12896 (eval "$ac_compile") 2>conftest.er1
4f6d8cc8
GK
12897 ac_status=$?
12898 grep -v '^ *+' conftest.er1 >conftest.err
12899 rm -f conftest.er1
12900 cat conftest.err >&5
12901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
12902 (exit $ac_status); } && {
12903 test -z "$ac_c_werror_flag" ||
12904 test ! -s conftest.err
12905 } && test -s conftest.$ac_objext; then
4f6d8cc8
GK
12906 gcc_cv_mcontext_underscores=no
12907else
12908 echo "$as_me: failed program was:" >&5
12909sed 's/^/| /' conftest.$ac_ext >&5
12910
a6ccdbab 12911 gcc_cv_mcontext_underscores=yes
4f6d8cc8 12912fi
a6ccdbab
EC
12913
12914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8 12915fi
a6ccdbab
EC
12916{ echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5
12917echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6; }
4f6d8cc8
GK
12918 if test $gcc_cv_mcontext_underscores = yes; then
12919
12920cat >>confdefs.h <<\_ACEOF
12921#define HAS_MCONTEXT_T_UNDERSCORES
12922_ACEOF
12923
12924 fi
12925 ;;
12926esac
12927
8bb915b6
NN
12928# ---------
12929# Threading
12930# ---------
12931
c2e494a8 12932# Check if a valid thread package
615be2cf 12933case ${enable_threads} in
c2e494a8
NN
12934 "" | no)
12935 # No threads
12936 target_thread_file='single'
12937 ;;
12938 yes)
12939 # default
12940 target_thread_file='single'
12941 ;;
18167442 12942 aix | dce | gnat | irix | posix | posix95 | rtems | \
769e49eb 12943 single | solaris | vxworks | win32 )
615be2cf 12944 target_thread_file=${enable_threads}
c2e494a8
NN
12945 ;;
12946 *)
615be2cf 12947 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
12948 exit 1
12949 ;;
12950esac
12951
12952if test x${thread_file} = x; then
12953 # No thread file set by target-specific clauses in config.gcc,
12954 # so use file chosen by default logic above
12955 thread_file=${target_thread_file}
861bb6c1
JL
12956fi
12957
8bb915b6
NN
12958# Make gthr-default.h if we have a thread file.
12959gthread_flags=
12960if test $thread_file != single; then
12961 rm -f gthr-default.h
12962 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
12963 gthread_flags=-DHAVE_GTHR_DEFAULT
12964fi
12965
12966
12967# --------
12968# UNSORTED
12969# --------
12970
18fbf599 12971use_cxa_atexit=no
2121a768
JT
12972if test x$enable___cxa_atexit = xyes || \
12973 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599 12974 if test x$host = x$target; then
97388150
DS
12975 case $host in
12976 # mingw32 doesn't have __cxa_atexit but uses atexit registration
12977 # keyed to flag_use_cxa_atexit
12978 *-*-mingw32*)
12979 use_cxa_atexit=yes
12980 ;;
12981 *)
a6ccdbab
EC
12982 { echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
12983echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6; }
354b7da5
DH
12984if test "${ac_cv_func___cxa_atexit+set}" = set; then
12985 echo $ECHO_N "(cached) $ECHO_C" >&6
12986else
12987 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
12988/* confdefs.h. */
12989_ACEOF
12990cat confdefs.h >>conftest.$ac_ext
12991cat >>conftest.$ac_ext <<_ACEOF
12992/* end confdefs.h. */
86da66b5
HPN
12993/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
12994 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12995#define __cxa_atexit innocuous___cxa_atexit
12996
354b7da5
DH
12997/* System header to define __stub macros and hopefully few prototypes,
12998 which can conflict with char __cxa_atexit (); below.
12999 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13000 <limits.h> exists even on freestanding compilers. */
86da66b5 13001
354b7da5
DH
13002#ifdef __STDC__
13003# include <limits.h>
13004#else
13005# include <assert.h>
13006#endif
86da66b5
HPN
13007
13008#undef __cxa_atexit
13009
a6ccdbab
EC
13010/* Override any GCC internal prototype to avoid an error.
13011 Use char because int might match the return type of a GCC
13012 builtin and then its argument prototype would still apply. */
354b7da5
DH
13013#ifdef __cplusplus
13014extern "C"
354b7da5 13015#endif
354b7da5
DH
13016char __cxa_atexit ();
13017/* The GNU C library defines this for functions which it implements
13018 to always fail with ENOSYS. Some functions are actually named
13019 something starting with __ and the normal name is an alias. */
a6ccdbab 13020#if defined __stub___cxa_atexit || defined __stub_____cxa_atexit
354b7da5 13021choke me
354b7da5
DH
13022#endif
13023
13024int
13025main ()
13026{
a6ccdbab 13027return __cxa_atexit ();
354b7da5
DH
13028 ;
13029 return 0;
13030}
13031_ACEOF
13032rm -f conftest.$ac_objext conftest$ac_exeext
a6ccdbab
EC
13033if { (ac_try="$ac_link"
13034case "(($ac_try" in
13035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13036 *) ac_try_echo=$ac_try;;
13037esac
13038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13039 (eval "$ac_link") 2>conftest.er1
354b7da5 13040 ac_status=$?
86da66b5
HPN
13041 grep -v '^ *+' conftest.er1 >conftest.err
13042 rm -f conftest.er1
13043 cat conftest.err >&5
354b7da5 13044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
13045 (exit $ac_status); } && {
13046 test -z "$ac_c_werror_flag" ||
13047 test ! -s conftest.err
13048 } && test -s conftest$ac_exeext &&
13049 $as_test_x conftest$ac_exeext; then
354b7da5
DH
13050 ac_cv_func___cxa_atexit=yes
13051else
13052 echo "$as_me: failed program was:" >&5
13053sed 's/^/| /' conftest.$ac_ext >&5
13054
a6ccdbab 13055 ac_cv_func___cxa_atexit=no
354b7da5 13056fi
a6ccdbab
EC
13057
13058rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
86da66b5 13059 conftest$ac_exeext conftest.$ac_ext
354b7da5 13060fi
a6ccdbab
EC
13061{ echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
13062echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6; }
354b7da5 13063if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
13064 use_cxa_atexit=yes
13065else
13066 echo "__cxa_atexit can't be enabled on this target"
13067fi
13068
5f60e48f 13069 ;;
97388150 13070 esac
18fbf599
PB
13071 else
13072 # We can't check for __cxa_atexit when building a cross, so assume
13073 # it is available
13074 use_cxa_atexit=yes
13075 fi
13076 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
13077
13078cat >>confdefs.h <<\_ACEOF
c7b5e395 13079#define DEFAULT_USE_CXA_ATEXIT 2
ba479fd2 13080_ACEOF
2121a768 13081
18fbf599 13082 fi
2121a768
JT
13083fi
13084
e64f5acf
SE
13085use_getipinfo=yes
13086if test x$with_system_libunwind = xyes; then
13087 if test x$host = x$target; then
a6ccdbab
EC
13088 { echo "$as_me:$LINENO: checking for library containing _Unwind_GetIPInfo" >&5
13089echo $ECHO_N "checking for library containing _Unwind_GetIPInfo... $ECHO_C" >&6; }
e64f5acf
SE
13090if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then
13091 echo $ECHO_N "(cached) $ECHO_C" >&6
13092else
13093 ac_func_search_save_LIBS=$LIBS
e64f5acf
SE
13094cat >conftest.$ac_ext <<_ACEOF
13095/* confdefs.h. */
13096_ACEOF
13097cat confdefs.h >>conftest.$ac_ext
13098cat >>conftest.$ac_ext <<_ACEOF
13099/* end confdefs.h. */
13100
a6ccdbab
EC
13101/* Override any GCC internal prototype to avoid an error.
13102 Use char because int might match the return type of a GCC
13103 builtin and then its argument prototype would still apply. */
e64f5acf
SE
13104#ifdef __cplusplus
13105extern "C"
13106#endif
e64f5acf
SE
13107char _Unwind_GetIPInfo ();
13108int
13109main ()
13110{
a6ccdbab 13111return _Unwind_GetIPInfo ();
e64f5acf
SE
13112 ;
13113 return 0;
13114}
13115_ACEOF
a6ccdbab
EC
13116for ac_lib in '' unwind; do
13117 if test -z "$ac_lib"; then
13118 ac_res="none required"
13119 else
13120 ac_res=-l$ac_lib
13121 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13122 fi
13123 rm -f conftest.$ac_objext conftest$ac_exeext
13124if { (ac_try="$ac_link"
13125case "(($ac_try" in
13126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13127 *) ac_try_echo=$ac_try;;
13128esac
13129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13130 (eval "$ac_link") 2>conftest.er1
e64f5acf
SE
13131 ac_status=$?
13132 grep -v '^ *+' conftest.er1 >conftest.err
13133 rm -f conftest.er1
13134 cat conftest.err >&5
13135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
13136 (exit $ac_status); } && {
13137 test -z "$ac_c_werror_flag" ||
13138 test ! -s conftest.err
13139 } && test -s conftest$ac_exeext &&
13140 $as_test_x conftest$ac_exeext; then
13141 ac_cv_search__Unwind_GetIPInfo=$ac_res
e64f5acf
SE
13142else
13143 echo "$as_me: failed program was:" >&5
13144sed 's/^/| /' conftest.$ac_ext >&5
13145
a6ccdbab 13146
b8ec3cc8 13147fi
e64f5acf 13148
a6ccdbab
EC
13149rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13150 conftest$ac_exeext
13151 if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then
13152 break
13153fi
13154done
13155if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then
13156 :
13157else
13158 ac_cv_search__Unwind_GetIPInfo=no
13159fi
13160rm conftest.$ac_ext
13161LIBS=$ac_func_search_save_LIBS
13162fi
13163{ echo "$as_me:$LINENO: result: $ac_cv_search__Unwind_GetIPInfo" >&5
13164echo "${ECHO_T}$ac_cv_search__Unwind_GetIPInfo" >&6; }
13165ac_res=$ac_cv_search__Unwind_GetIPInfo
13166if test "$ac_res" != no; then
13167 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13168
13169else
13170 use_getipinfo=no
13171fi
13172
13173 fi
13174fi
13175
13176if test x$use_getipinfo = xyes; then
13177
13178cat >>confdefs.h <<\_ACEOF
13179#define HAVE_GETIPINFO 1
e64f5acf
SE
13180_ACEOF
13181
13182else
13183 echo "The system unwind library does not support _Unwind_GetIPInfo."
13184fi
13185
a5381466 13186# Look for a file containing extra machine modes.
1c0ca89d
ZW
13187if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
13188 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
13189
13190
13191cat >>confdefs.h <<_ACEOF
e22340b0 13192#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 13193_ACEOF
a5381466
ZW
13194
13195fi
13196
75685792
RS
13197# Convert extra_options into a form suitable for Makefile use.
13198extra_opt_files=
13199for f in $extra_options; do
13200 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
13201done
13202
13203
b7cb92ad 13204# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 13205# the first file included by config.h.
4977bab6 13206# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 13207# as well. If host!=build, we are in error and need to do more
db81d74a 13208# work to find out the build config parameters.
75bffa71 13209if test x$host = x$build
db81d74a 13210then
eaf4e618 13211 build_auto=auto-host.h
b7cb92ad
JL
13212else
13213 # We create a subdir, then run autoconf in the subdir.
13214 # To prevent recursion we set host and build for the new
13215 # invocation of configure to the build for this invocation
ba479fd2 13216 # of configure.
b7cb92ad
JL
13217 tempdir=build.$$
13218 rm -rf $tempdir
13219 mkdir $tempdir
13220 cd $tempdir
13221 case ${srcdir} in
255b8a49 13222 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
13223 *) realsrcdir=../${srcdir};;
13224 esac
d920e825
L
13225 saved_CFLAGS="${CFLAGS}"
13226 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
13227 ${realsrcdir}/configure \
33e70558 13228 --enable-languages=${enable_languages-all} \
534d0cc0 13229 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 13230 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
13231
13232 # We just finished tests for the build machine, so rename
13233 # the file auto-build.h in the gcc directory.
13234 mv auto-host.h ../auto-build.h
13235 cd ..
13236 rm -rf $tempdir
eaf4e618 13237 build_auto=auto-build.h
db81d74a
RH
13238fi
13239
06f0b04c 13240
eaf4e618 13241tm_file="${tm_file} defaults.h"
4977bab6
ZW
13242tm_p_file="${tm_p_file} tm-preds.h"
13243host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
13244build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 13245# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 13246# put this back in temporarily.
232b67d9 13247xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 13248
34a86c2b
NN
13249# --------
13250# UNSORTED
13251# --------
13252
cc1e60ea 13253# Compile in configure arguments.
8105825d 13254if test -f configargs.h ; then
cc1e60ea 13255 # Being re-configured.
022dae81 13256 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
13257 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
13258else
13259 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
13260fi
eeae7b41
DJ
13261
13262# Double all backslashes and backslash all quotes to turn
13263# gcc_config_arguments into a C string.
13264sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
13265$gcc_config_arguments
13266EOF
13267gcc_config_arguments_str=`cat conftest.out`
13268rm -f conftest.out
13269
cc1e60ea
JM
13270cat > configargs.h <<EOF
13271/* Generated automatically. */
eeae7b41 13272static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 13273static const char thread_model[] = "$thread_file";
7816bea0
DJ
13274
13275static const struct {
13276 const char *name, *value;
13277} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
13278EOF
13279
ab87f8c8 13280# Internationalization
18fc9bd4
RG
13281# If we haven't got the data from the intl directory,
13282# assume NLS is disabled.
13283USE_NLS=no
13284LIBINTL=
13285LIBINTL_DEP=
13286INCINTL=
13287XGETTEXT=
13288GMSGFMT=
13289POSUB=
13290
13291if test -f ../intl/config.intl; then
13292 . ../intl/config.intl
13293fi
a6ccdbab
EC
13294{ echo "$as_me:$LINENO: checking whether NLS is requested" >&5
13295echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6; }
18fc9bd4 13296if test x"$USE_NLS" != xyes; then
a6ccdbab
EC
13297 { echo "$as_me:$LINENO: result: no" >&5
13298echo "${ECHO_T}no" >&6; }
18fc9bd4 13299else
a6ccdbab
EC
13300 { echo "$as_me:$LINENO: result: yes" >&5
13301echo "${ECHO_T}yes" >&6; }
18fc9bd4
RG
13302
13303cat >>confdefs.h <<\_ACEOF
13304#define ENABLE_NLS 1
13305_ACEOF
13306
13307
a6ccdbab
EC
13308 { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
13309echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; }
18fc9bd4
RG
13310 # Look for .po and .gmo files in the source directory.
13311 CATALOGS=
13312 XLINGUAS=
13313 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
13314 # If there aren't any .gmo files the shell will give us the
13315 # literal string "../path/to/srcdir/po/*.gmo" which has to be
13316 # weeded out.
13317 case "$cat" in *\**)
13318 continue;;
13319 esac
13320 # The quadruple backslash is collapsed to a double backslash
13321 # by the backticks, then collapsed again by the double quotes,
13322 # leaving us with one backslash in the sed expression (right
13323 # before the dot that mustn't act as a wildcard).
13324 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
13325 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
13326 # The user is allowed to set LINGUAS to a list of languages to
13327 # install catalogs for. If it's empty that means "all of them."
13328 if test "x$LINGUAS" = x; then
13329 CATALOGS="$CATALOGS $cat"
13330 XLINGUAS="$XLINGUAS $lang"
13331 else
13332 case "$LINGUAS" in *$lang*)
13333 CATALOGS="$CATALOGS $cat"
13334 XLINGUAS="$XLINGUAS $lang"
13335 ;;
13336 esac
13337 fi
13338 done
13339 LINGUAS="$XLINGUAS"
a6ccdbab
EC
13340 { echo "$as_me:$LINENO: result: $LINGUAS" >&5
13341echo "${ECHO_T}$LINGUAS" >&6; }
18fc9bd4
RG
13342
13343
13344 DATADIRNAME=share
13345
13346 INSTOBJEXT=.mo
13347
13348 GENCAT=gencat
13349
13350 CATOBJEXT=.gmo
13351
13352fi
861bb6c1 13353
56694dd9
ZW
13354# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
13355# -liconv on the link line twice.
13356case "$LIBINTL" in *$LIBICONV*)
13357 LIBICONV= ;;
13358esac
dc6746e7 13359
a6ccdbab 13360# Check whether --enable-secureplt was given.
7f970b70 13361if test "${enable_secureplt+set}" = set; then
a6ccdbab
EC
13362 enableval=$enable_secureplt;
13363fi
7f970b70 13364
7f970b70 13365
56694dd9 13366# Windows32 Registry support for specifying GCC installation paths.
a6ccdbab 13367# Check whether --enable-win32-registry was given.
56694dd9 13368if test "${enable_win32_registry+set}" = set; then
a6ccdbab
EC
13369 enableval=$enable_win32_registry;
13370fi
dc6746e7 13371
ba479fd2 13372
a1286ef5
ZW
13373case $host_os in
13374 win32 | pe | cygwin* | mingw32* | uwin*)
13375 if test "x$enable_win32_registry" != xno; then
a6ccdbab
EC
13376 { echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
13377echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6; }
ba479fd2
NN
13378if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
13379 echo $ECHO_N "(cached) $ECHO_C" >&6
13380else
13381 ac_func_search_save_LIBS=$LIBS
ba479fd2 13382cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
13383/* confdefs.h. */
13384_ACEOF
13385cat confdefs.h >>conftest.$ac_ext
13386cat >>conftest.$ac_ext <<_ACEOF
13387/* end confdefs.h. */
861bb6c1 13388
a6ccdbab
EC
13389/* Override any GCC internal prototype to avoid an error.
13390 Use char because int might match the return type of a GCC
13391 builtin and then its argument prototype would still apply. */
ba479fd2
NN
13392#ifdef __cplusplus
13393extern "C"
13394#endif
ba479fd2
NN
13395char RegOpenKeyExA ();
13396int
13397main ()
13398{
a6ccdbab 13399return RegOpenKeyExA ();
ba479fd2
NN
13400 ;
13401 return 0;
13402}
13403_ACEOF
a6ccdbab
EC
13404for ac_lib in '' advapi32; do
13405 if test -z "$ac_lib"; then
13406 ac_res="none required"
13407 else
13408 ac_res=-l$ac_lib
13409 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13410 fi
13411 rm -f conftest.$ac_objext conftest$ac_exeext
13412if { (ac_try="$ac_link"
13413case "(($ac_try" in
13414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13415 *) ac_try_echo=$ac_try;;
13416esac
13417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13418 (eval "$ac_link") 2>conftest.er1
ba479fd2 13419 ac_status=$?
86da66b5
HPN
13420 grep -v '^ *+' conftest.er1 >conftest.err
13421 rm -f conftest.er1
13422 cat conftest.err >&5
ba479fd2 13423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
a6ccdbab
EC
13424 (exit $ac_status); } && {
13425 test -z "$ac_c_werror_flag" ||
13426 test ! -s conftest.err
13427 } && test -s conftest$ac_exeext &&
13428 $as_test_x conftest$ac_exeext; then
13429 ac_cv_search_RegOpenKeyExA=$ac_res
ab87f8c8 13430else
ba479fd2
NN
13431 echo "$as_me: failed program was:" >&5
13432sed 's/^/| /' conftest.$ac_ext >&5
13433
cafe096b 13434
a6ccdbab 13435fi
dd7f7a6e 13436
a6ccdbab
EC
13437rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13438 conftest$ac_exeext
13439 if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
13440 break
dd7f7a6e 13441fi
a6ccdbab
EC
13442done
13443if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
13444 :
13445else
13446 ac_cv_search_RegOpenKeyExA=no
dd7f7a6e 13447fi
a6ccdbab 13448rm conftest.$ac_ext
dd7f7a6e
EC
13449LIBS=$ac_func_search_save_LIBS
13450fi
a6ccdbab
EC
13451{ echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
13452echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6; }
13453ac_res=$ac_cv_search_RegOpenKeyExA
13454if test "$ac_res" != no; then
13455 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
dd7f7a6e
EC
13456
13457else
13458 enable_win32_registry=no
13459fi
13460
13461 fi
13462
13463 if test "x$enable_win32_registry" != xno; then
13464
13465cat >>confdefs.h <<\_ACEOF
13466#define ENABLE_WIN32_REGISTRY 1
13467_ACEOF
13468
13469
13470 if test "x$enable_win32_registry" != xyes \
13471 && test "x$enable_win32_registry" != x; then
13472
13473cat >>confdefs.h <<_ACEOF
13474#define WIN32_REGISTRY_KEY "$enable_win32_registry"
13475_ACEOF
13476
13477 fi
13478 fi
13479 ;;
13480esac
ab87f8c8 13481
56694dd9
ZW
13482# Get an absolute path to the GCC top-level source directory
13483holddir=`${PWDCMD-pwd}`
13484cd $srcdir
13485topdir=`${PWDCMD-pwd}`
13486cd $holddir
ab87f8c8 13487
56694dd9 13488# Conditionalize the makefile for this host machine.
2ed26f6b 13489xmake_file=
c406e779 13490for f in ${host_xmake_file}
56694dd9
ZW
13491do
13492 if test -f ${srcdir}/config/$f
13493 then
2ed26f6b 13494 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
13495 fi
13496done
093e61a6 13497
56694dd9 13498# Conditionalize the makefile for this target machine.
2ed26f6b 13499tmake_file_=
c406e779 13500for f in ${tmake_file}
56694dd9
ZW
13501do
13502 if test -f ${srcdir}/config/$f
13503 then
2ed26f6b 13504 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
13505 fi
13506done
2ed26f6b 13507tmake_file="${tmake_file_}"
71a94577 13508
ab87f8c8
JL
13509# If the host doesn't support symlinks, modify CC in
13510# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
13511# Otherwise, we can use "CC=$(CC)".
13512rm -f symtest.tem
35f06ae4
PB
13513case "$LN_S" in
13514 *-s*)
13515 cc_set_by_configure="\$(CC)"
13516 quoted_cc_set_by_configure="\$(CC)"
13517 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
13518 quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
13519 ;;
13520 *)
13521 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
13522 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
13523 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
13524 quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
13525 ;;
13526esac
ab87f8c8 13527
5395b47b
NN
13528# This is a terrible hack which will go away some day.
13529host_cc_for_libada=${CC}
1e3fad21
NN
13530
13531
ab87f8c8
JL
13532out_object_file=`basename $out_file .c`.o
13533
75685792
RS
13534tm_file_list="options.h"
13535tm_include_list="options.h"
ab87f8c8 13536for f in $tm_file; do
64ccbc99 13537 case $f in
d02af173 13538 defaults.h )
e22340b0
ZW
13539 tm_file_list="${tm_file_list} \$(srcdir)/$f"
13540 tm_include_list="${tm_include_list} $f"
13541 ;;
13542 * )
13543 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
13544 tm_include_list="${tm_include_list} config/$f"
13545 ;;
64ccbc99 13546 esac
ab87f8c8
JL
13547done
13548
11642c3a 13549tm_p_file_list=
e22340b0 13550tm_p_include_list=
11642c3a 13551for f in $tm_p_file; do
4977bab6
ZW
13552 case $f in
13553 tm-preds.h )
e22340b0
ZW
13554 tm_p_file_list="${tm_p_file_list} $f"
13555 tm_p_include_list="${tm_p_include_list} $f"
13556 ;;
13557 * )
13558 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
13559 tm_p_include_list="${tm_p_include_list} config/$f"
13560 esac
13561done
13562
13563xm_file_list=
13564xm_include_list=
13565for f in $xm_file; do
13566 case $f in
13567 ansidecl.h )
13568 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
13569 xm_include_list="${xm_include_list} $f"
13570 ;;
13571 auto-host.h )
13572 xm_file_list="${xm_file_list} $f"
13573 xm_include_list="${xm_include_list} $f"
13574 ;;
13575 * )
13576 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
13577 xm_include_list="${xm_include_list} config/$f"
13578 ;;
4977bab6 13579 esac
11642c3a
ZW
13580done
13581
ab87f8c8 13582host_xm_file_list=
e22340b0 13583host_xm_include_list=
ab87f8c8 13584for f in $host_xm_file; do
64ccbc99 13585 case $f in
d02af173 13586 ansidecl.h )
e22340b0
ZW
13587 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
13588 host_xm_include_list="${host_xm_include_list} $f"
13589 ;;
e2500fed 13590 auto-host.h )
e22340b0
ZW
13591 host_xm_file_list="${host_xm_file_list} $f"
13592 host_xm_include_list="${host_xm_include_list} $f"
13593 ;;
13594 * )
13595 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
13596 host_xm_include_list="${host_xm_include_list} config/$f"
13597 ;;
64ccbc99 13598 esac
ab87f8c8
JL
13599done
13600
13601build_xm_file_list=
13602for f in $build_xm_file; do
64ccbc99 13603 case $f in
d02af173 13604 ansidecl.h )
e22340b0
ZW
13605 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
13606 build_xm_include_list="${build_xm_include_list} $f"
13607 ;;
e2500fed 13608 auto-build.h | auto-host.h )
e22340b0
ZW
13609 build_xm_file_list="${build_xm_file_list} $f"
13610 build_xm_include_list="${build_xm_include_list} $f"
13611 ;;
13612 * )
13613 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
13614 build_xm_include_list="${build_xm_include_list} config/$f"
13615 ;;
64ccbc99 13616 esac
ab87f8c8
JL
13617done
13618
2989d30c
GK
13619# Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a
13620# cross-compiler which does not use the native headers and libraries.
a078a589 13621# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
13622CROSS=
13623ALL=all.internal
13624SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
13625
13626if test "x$with_build_sysroot" != x; then
13627 build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)'
13628else
13629 # This value is used, even on a native system, because
13630 # CROSS_SYSTEM_HEADER_DIR is just
13631 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
13632 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
13633fi
13634
ab87f8c8
JL
13635if test x$host != x$target
13636then
2989d30c 13637 CROSS="-DCROSS_DIRECTORY_STRUCTURE"
a078a589 13638 ALL=all.cross
160633c6 13639 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 13640 case "$host","$target" in
3a7e8b87
GK
13641 # Darwin crosses can use the host system's libraries and headers,
13642 # because of the fat library support. Of course, it must be the
13643 # same version of Darwin on both sides. Allow the user to
13644 # just say --target=foo-darwin without a version number to mean
13645 # "the version on this system".
13646 *-*-darwin*,*-*-darwin*)
13647 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
13648 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
13649 if test $hostos = $targetos -o $targetos = darwin ; then
13650 CROSS=
13651 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
13652 with_headers=yes
13653 fi
13654 ;;
13655
343f59d9
AM
13656 i?86-*-*,x86_64-*-* \
13657 | powerpc*-*-*,powerpc64*-*-*)
13658 CROSS="$CROSS -DNATIVE_CROSS" ;;
13659 esac
7a615b25 13660elif test "x$TARGET_SYSTEM_ROOT" != x; then
b28250ab 13661 SYSTEM_HEADER_DIR=$build_system_header_dir
ab87f8c8
JL
13662fi
13663
b39d221a
EC
13664# If this is a cross-compiler that does not
13665# have its own set of headers then define
13666# inhibit_libc
13667
dc06db20
R
13668# If this is using newlib, without having the headers available now,
13669# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
13670# This prevents libgcc2 from containing any code which requires libc
13671# support.
160633c6 13672inhibit_libc=false
dc06db20
R
13673if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
13674 test x$with_newlib = xyes ; } &&
e50084fa 13675 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 13676 inhibit_libc=true
b39d221a
EC
13677fi
13678
13679
a078a589
ZW
13680# When building gcc with a cross-compiler, we need to adjust things so
13681# that the generator programs are still built with the native compiler.
13682# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
13683
13684# These are the normal (build=host) settings:
ba479fd2
NN
13685CC_FOR_BUILD='$(CC)'
13686BUILD_CFLAGS='$(ALL_CFLAGS)'
ba479fd2 13687STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
13688
13689# Possibly disable fixproto, on a per-target basis.
13690case ${use_fixproto} in
13691 no)
13692 STMP_FIXPROTO=
13693 ;;
13694 yes)
13695 STMP_FIXPROTO=stmp-fixproto
13696 ;;
13697esac
13698
a078a589 13699
83599948
NS
13700# And these apply if build != host, or we are generating coverage data
13701if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 13702then
b11e4747 13703 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 13704
7a615b25 13705 if test "x$TARGET_SYSTEM_ROOT" = x; then
d8e5117d 13706 if test "x$STMP_FIXPROTO" != x; then
de253ca4
GK
13707 STMP_FIXPROTO=stmp-install-fixproto
13708 fi
7a615b25 13709 fi
ab87f8c8
JL
13710fi
13711
13712# Expand extra_headers to include complete path.
13713# This substitutes for lots of t-* files.
13714extra_headers_list=
b1ef58c8
NN
13715# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
13716for file in ${extra_headers} ; do
13717 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
13718done
ab87f8c8 13719
c38f02df
ILT
13720# Define collect2 in Makefile.
13721case $host_can_use_collect2 in
13722 no) collect2= ;;
13723 *) collect2='collect2$(exeext)' ;;
13724esac
13725
13726
ab87f8c8 13727# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
13728case $use_collect2 in
13729 no) use_collect2= ;;
13730 "") ;;
ba479fd2 13731 *)
34a86c2b
NN
13732 host_xm_defines="${host_xm_defines} USE_COLLECT2"
13733 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
13734 case $host_can_use_collect2 in
13735 no)
13736 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
13737echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
13738 { (exit 1); exit 1; }; }
13739 ;;
13740 esac
34a86c2b
NN
13741 ;;
13742esac
ab87f8c8 13743
8bb915b6
NN
13744# ---------------------------
13745# Assembler & linker features
13746# ---------------------------
13747
d869a8c4
NN
13748# Identify the assembler which will work hand-in-glove with the newly
13749# built GCC, so that we can examine its features. This is the assembler
13750# which will be driven by the driver program.
13751#
13752# If build != host, and we aren't building gas in-tree, we identify a
13753# build->target assembler and hope that it will have the same features
13754# as the host->target assembler we'll be using.
981d4858
JM
13755gcc_cv_gas_major_version=
13756gcc_cv_gas_minor_version=
ab87f8c8 13757gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
e8b05380
PB
13758
13759if test "${gcc_cv_as+set}" = set; then
13760 :
13761else
13762
ab87f8c8
JL
13763if test -x "$DEFAULT_ASSEMBLER"; then
13764 gcc_cv_as="$DEFAULT_ASSEMBLER"
34a86c2b 13765elif test -f $gcc_cv_as_gas_srcdir/configure.in \
08d105fa
AO
13766 && test -f ../gas/Makefile \
13767 && test x$build = x$host; then
e8b05380
PB
13768 gcc_cv_as=../gas/as-new$build_exeext
13769elif test -x as$build_exeext; then
13770 # Build using assembler in the current directory.
13771 gcc_cv_as=./as$build_exeext
13772elif test -x $AS_FOR_TARGET; then
13773 gcc_cv_as="$AS_FOR_TARGET"
13774else
13775 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
13776set dummy $AS_FOR_TARGET; ac_word=$2
a6ccdbab
EC
13777{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13778echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e8b05380
PB
13779if test "${ac_cv_path_gcc_cv_as+set}" = set; then
13780 echo $ECHO_N "(cached) $ECHO_C" >&6
13781else
13782 case $gcc_cv_as in
13783 [\\/]* | ?:[\\/]*)
13784 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
13785 ;;
13786 *)
13787 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13788for as_dir in $PATH
13789do
13790 IFS=$as_save_IFS
13791 test -z "$as_dir" && as_dir=.
13792 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 13793 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380
PB
13794 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
13795 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13796 break 2
13797 fi
13798done
13799done
a6ccdbab 13800IFS=$as_save_IFS
e8b05380
PB
13801
13802 ;;
13803esac
13804fi
13805gcc_cv_as=$ac_cv_path_gcc_cv_as
e8b05380 13806if test -n "$gcc_cv_as"; then
a6ccdbab
EC
13807 { echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13808echo "${ECHO_T}$gcc_cv_as" >&6; }
e8b05380 13809else
a6ccdbab
EC
13810 { echo "$as_me:$LINENO: result: no" >&5
13811echo "${ECHO_T}no" >&6; }
e8b05380
PB
13812fi
13813
a6ccdbab 13814
e8b05380
PB
13815fi
13816fi
13817
13818
13819ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
13820
13821
a6ccdbab
EC
13822{ echo "$as_me:$LINENO: checking what assembler to use" >&5
13823echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6; }
e8b05380 13824if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
08d105fa
AO
13825 # Single tree build which includes gas. We want to prefer it
13826 # over whatever linker top-level may have detected, since
13827 # we'll use what we're building after installation anyway.
a6ccdbab
EC
13828 { echo "$as_me:$LINENO: result: newly built gas" >&5
13829echo "${ECHO_T}newly built gas" >&6; }
ad9c4d9f
NN
13830 in_tree_gas=yes
13831 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
13832for f in $gcc_cv_as_bfd_srcdir/configure \
13833 $gcc_cv_as_gas_srcdir/configure \
13834 $gcc_cv_as_gas_srcdir/configure.in \
13835 $gcc_cv_as_gas_srcdir/Makefile.in ; do
58ea87a9 13836 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
ad9c4d9f
NN
13837 if test x$gcc_cv_gas_version != x; then
13838 break
13839 fi
13840done
13841gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
13842gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13843gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
13844case $gcc_cv_gas_patch_version in
13845 "") gcc_cv_gas_patch_version="0" ;;
13846esac
8ada417f
ZW
13847gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
13848 + $gcc_cv_gas_minor_version \) \* 1000 \
13849 + $gcc_cv_gas_patch_version`
ad9c4d9f 13850
5408ac6c
HPN
13851 in_tree_gas_is_elf=no
13852 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
13853 || (grep 'obj_format = multi' ../gas/Makefile \
13854 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
13855 then
13856 in_tree_gas_is_elf=yes
13857 fi
e8b05380 13858else
a6ccdbab
EC
13859 { echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13860echo "${ECHO_T}$gcc_cv_as" >&6; }
e8b05380 13861 in_tree_gas=no
981d4858 13862fi
9e423e6d 13863
e8b05380
PB
13864# Identify the linker which will work hand-in-glove with the newly
13865# built GCC, so that we can examine its features. This is the linker
13866# which will be driven by the driver program.
9f18db39 13867#
e8b05380
PB
13868# If build != host, and we aren't building gas in-tree, we identify a
13869# build->target linker and hope that it will have the same features
13870# as the host->target linker we'll be using.
13871gcc_cv_gld_major_version=
13872gcc_cv_gld_minor_version=
13873gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
13874gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
9f18db39 13875
e8b05380
PB
13876if test "${gcc_cv_ld+set}" = set; then
13877 :
9f18db39 13878else
9f18db39 13879
e8b05380
PB
13880if test -x "$DEFAULT_LINKER"; then
13881 gcc_cv_ld="$DEFAULT_LINKER"
13882elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
13883 && test -f ../ld/Makefile \
13884 && test x$build = x$host; then
13885 gcc_cv_ld=../ld/ld-new$build_exeext
13886elif test -x collect-ld$build_exeext; then
13887 # Build using linker in the current directory.
13888 gcc_cv_ld=./collect-ld$build_exeext
13889elif test -x $LD_FOR_TARGET; then
13890 gcc_cv_ld="$LD_FOR_TARGET"
13891else
13892 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
13893set dummy $LD_FOR_TARGET; ac_word=$2
a6ccdbab
EC
13894{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13895echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e8b05380 13896if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
d739199a
DJ
13897 echo $ECHO_N "(cached) $ECHO_C" >&6
13898else
e8b05380 13899 case $gcc_cv_ld in
d739199a 13900 [\\/]* | ?:[\\/]*)
e8b05380 13901 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
d739199a
DJ
13902 ;;
13903 *)
13904 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13905for as_dir in $PATH
13906do
13907 IFS=$as_save_IFS
13908 test -z "$as_dir" && as_dir=.
13909 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 13910 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380 13911 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
13912 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13913 break 2
13914 fi
13915done
13916done
a6ccdbab 13917IFS=$as_save_IFS
d739199a
DJ
13918
13919 ;;
13920esac
13921fi
e8b05380 13922gcc_cv_ld=$ac_cv_path_gcc_cv_ld
e8b05380 13923if test -n "$gcc_cv_ld"; then
a6ccdbab
EC
13924 { echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13925echo "${ECHO_T}$gcc_cv_ld" >&6; }
d739199a 13926else
a6ccdbab
EC
13927 { echo "$as_me:$LINENO: result: no" >&5
13928echo "${ECHO_T}no" >&6; }
d739199a
DJ
13929fi
13930
a6ccdbab 13931
d739199a 13932fi
e8b05380
PB
13933fi
13934
13935
13936ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
13937
13938
a6ccdbab
EC
13939{ echo "$as_me:$LINENO: checking what linker to use" >&5
13940echo $ECHO_N "checking what linker to use... $ECHO_C" >&6; }
e8b05380
PB
13941if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
13942 # Single tree build which includes ld. We want to prefer it
13943 # over whatever linker top-level may have detected, since
13944 # we'll use what we're building after installation anyway.
a6ccdbab
EC
13945 { echo "$as_me:$LINENO: result: newly built ld" >&5
13946echo "${ECHO_T}newly built ld" >&6; }
e8b05380
PB
13947 in_tree_ld=yes
13948 in_tree_ld_is_elf=no
13949 if (grep 'EMUL = .*elf' ../ld/Makefile \
13950 || grep 'EMUL = .*linux' ../ld/Makefile \
13951 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
13952 in_tree_ld_is_elf=yes
13953 fi
13954 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
13955 do
13956 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
13957 if test x$gcc_cv_gld_version != x; then
13958 break
13959 fi
13960 done
13961 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
13962 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13963else
a6ccdbab
EC
13964 { echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13965echo "${ECHO_T}$gcc_cv_ld" >&6; }
e8b05380
PB
13966 in_tree_ld=no
13967fi
13968
13969# Figure out what nm we will be using.
13970gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
13971if test "${gcc_cv_nm+set}" = set; then
13972 :
13973else
13974
13975if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
13976 && test -f ../binutils/Makefile \
13977 && test x$build = x$host; then
e8b05380
PB
13978 gcc_cv_nm=../binutils/nm-new$build_exeext
13979elif test -x nm$build_exeext; then
13980 gcc_cv_nm=./nm$build_exeext
13981elif test -x $NM_FOR_TARGET; then
13982 gcc_cv_nm="$NM_FOR_TARGET"
13983else
13984 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
13985set dummy $NM_FOR_TARGET; ac_word=$2
a6ccdbab
EC
13986{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13987echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e8b05380 13988if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
d739199a
DJ
13989 echo $ECHO_N "(cached) $ECHO_C" >&6
13990else
e8b05380 13991 case $gcc_cv_nm in
d739199a 13992 [\\/]* | ?:[\\/]*)
e8b05380 13993 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
d739199a
DJ
13994 ;;
13995 *)
13996 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13997for as_dir in $PATH
13998do
13999 IFS=$as_save_IFS
14000 test -z "$as_dir" && as_dir=.
14001 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 14002 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380 14003 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
14004 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14005 break 2
14006 fi
14007done
14008done
a6ccdbab 14009IFS=$as_save_IFS
d739199a
DJ
14010
14011 ;;
14012esac
14013fi
e8b05380 14014gcc_cv_nm=$ac_cv_path_gcc_cv_nm
e8b05380 14015if test -n "$gcc_cv_nm"; then
a6ccdbab
EC
14016 { echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
14017echo "${ECHO_T}$gcc_cv_nm" >&6; }
d739199a 14018else
a6ccdbab
EC
14019 { echo "$as_me:$LINENO: result: no" >&5
14020echo "${ECHO_T}no" >&6; }
d739199a
DJ
14021fi
14022
a6ccdbab 14023
d739199a 14024fi
e8b05380 14025fi
d739199a 14026
e8b05380 14027
a6ccdbab
EC
14028{ echo "$as_me:$LINENO: checking what nm to use" >&5
14029echo $ECHO_N "checking what nm to use... $ECHO_C" >&6; }
e8b05380
PB
14030if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
14031 # Single tree build which includes binutils.
a6ccdbab
EC
14032 { echo "$as_me:$LINENO: result: newly built nm" >&5
14033echo "${ECHO_T}newly built nm" >&6; }
e8b05380
PB
14034 in_tree_nm=yes
14035else
a6ccdbab
EC
14036 { echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
14037echo "${ECHO_T}$gcc_cv_nm" >&6; }
e8b05380
PB
14038 in_tree_nm=no
14039fi
14040
14041ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
14042
14043
14044# Figure out what objdump we will be using.
14045if test "${gcc_cv_objdump+set}" = set; then
14046 :
14047else
14048
14049if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
14050 && test -f ../binutils/Makefile \
14051 && test x$build = x$host; then
e8b05380
PB
14052 # Single tree build which includes binutils.
14053 gcc_cv_objdump=../binutils/objdump$build_exeext
14054elif test -x objdump$build_exeext; then
14055 gcc_cv_objdump=./objdump$build_exeext
14056elif test -x $OBJDUMP_FOR_TARGET; then
14057 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
14058else
14059 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
14060set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
a6ccdbab
EC
14061{ echo "$as_me:$LINENO: checking for $ac_word" >&5
14062echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e8b05380 14063if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
9f18db39
PB
14064 echo $ECHO_N "(cached) $ECHO_C" >&6
14065else
e8b05380 14066 case $gcc_cv_objdump in
9f18db39 14067 [\\/]* | ?:[\\/]*)
e8b05380 14068 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
9f18db39
PB
14069 ;;
14070 *)
14071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380 14072for as_dir in $PATH
9f18db39
PB
14073do
14074 IFS=$as_save_IFS
14075 test -z "$as_dir" && as_dir=.
14076 for ac_exec_ext in '' $ac_executable_extensions; do
a6ccdbab 14077 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380 14078 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
9f18db39
PB
14079 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14080 break 2
14081 fi
14082done
14083done
a6ccdbab 14084IFS=$as_save_IFS
779243f7 14085
9f18db39
PB
14086 ;;
14087esac
14088fi
e8b05380 14089gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
e8b05380 14090if test -n "$gcc_cv_objdump"; then
a6ccdbab
EC
14091 { echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
14092echo "${ECHO_T}$gcc_cv_objdump" >&6; }
9f18db39 14093else
a6ccdbab
EC
14094 { echo "$as_me:$LINENO: result: no" >&5
14095echo "${ECHO_T}no" >&6; }
9f18db39
PB
14096fi
14097
a6ccdbab 14098
e8b05380
PB
14099fi
14100fi
9f18db39 14101
e8b05380 14102
a6ccdbab
EC
14103{ echo "$as_me:$LINENO: checking what objdump to use" >&5
14104echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6; }
e8b05380
PB
14105if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
14106 # Single tree build which includes binutils.
a6ccdbab
EC
14107 { echo "$as_me:$LINENO: result: newly built objdump" >&5
14108echo "${ECHO_T}newly built objdump" >&6; }
e8b05380 14109elif test x$gcc_cv_objdump = x; then
a6ccdbab
EC
14110 { echo "$as_me:$LINENO: result: not found" >&5
14111echo "${ECHO_T}not found" >&6; }
e8b05380 14112else
a6ccdbab
EC
14113 { echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
14114echo "${ECHO_T}$gcc_cv_objdump" >&6; }
a2eafc76 14115fi
3cae5780 14116
981d4858 14117# Figure out what assembler alignment features are present.
a6ccdbab
EC
14118{ echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
14119echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6; }
ba479fd2
NN
14120if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
14121 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14122else
14123 gcc_cv_as_balign_and_p2align=no
14124 if test $in_tree_gas = yes; then
14125 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
14126 then gcc_cv_as_balign_and_p2align=yes
14127fi
14128 elif test x$gcc_cv_as != x; then
6e3f3080 14129 echo '.balign 4
8ada417f 14130.p2align 2' > conftest.s
ba479fd2
NN
14131 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14133 (eval $ac_try) 2>&5
14134 ac_status=$?
14135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14136 (exit $ac_status); }; }
8ada417f
ZW
14137 then
14138 gcc_cv_as_balign_and_p2align=yes
14139 else
14140 echo "configure: failed program was" >&5
14141 cat conftest.s >&5
14142 fi
14143 rm -f conftest.o conftest.s
14144 fi
14145fi
a6ccdbab
EC
14146{ echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
14147echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6; }
63cf211a 14148if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
14149
14150cat >>confdefs.h <<\_ACEOF
981d4858 14151#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 14152_ACEOF
981d4858 14153
ad9c4d9f
NN
14154fi
14155
a6ccdbab
EC
14156{ echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
14157echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6; }
ba479fd2
NN
14158if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
14159 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14160else
14161 gcc_cv_as_max_skip_p2align=no
14162 if test $in_tree_gas = yes; then
14163 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
14164 then gcc_cv_as_max_skip_p2align=yes
14165fi
14166 elif test x$gcc_cv_as != x; then
6e3f3080 14167 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
14168 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14170 (eval $ac_try) 2>&5
14171 ac_status=$?
14172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14173 (exit $ac_status); }; }
8ada417f
ZW
14174 then
14175 gcc_cv_as_max_skip_p2align=yes
14176 else
14177 echo "configure: failed program was" >&5
14178 cat conftest.s >&5
14179 fi
14180 rm -f conftest.o conftest.s
14181 fi
ad9c4d9f 14182fi
a6ccdbab
EC
14183{ echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
14184echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6; }
63cf211a 14185if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
14186
14187cat >>confdefs.h <<\_ACEOF
9e423e6d 14188#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 14189_ACEOF
9e423e6d 14190
9e423e6d 14191fi
ad9c4d9f 14192
a6ccdbab
EC
14193{ echo "$as_me:$LINENO: checking assembler for .literal16" >&5
14194echo $ECHO_N "checking assembler for .literal16... $ECHO_C" >&6; }
5708d18d
MS
14195if test "${gcc_cv_as_literal16+set}" = set; then
14196 echo $ECHO_N "(cached) $ECHO_C" >&6
14197else
14198 gcc_cv_as_literal16=no
14199 if test $in_tree_gas = yes; then
14200 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
14201 then gcc_cv_as_literal16=yes
14202fi
14203 elif test x$gcc_cv_as != x; then
14204 echo '.literal16' > conftest.s
14205 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14207 (eval $ac_try) 2>&5
14208 ac_status=$?
14209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14210 (exit $ac_status); }; }
14211 then
14212 gcc_cv_as_literal16=yes
14213 else
14214 echo "configure: failed program was" >&5
14215 cat conftest.s >&5
14216 fi
14217 rm -f conftest.o conftest.s
14218 fi
14219fi
a6ccdbab
EC
14220{ echo "$as_me:$LINENO: result: $gcc_cv_as_literal16" >&5
14221echo "${ECHO_T}$gcc_cv_as_literal16" >&6; }
5708d18d
MS
14222if test $gcc_cv_as_literal16 = yes; then
14223
14224cat >>confdefs.h <<\_ACEOF
14225#define HAVE_GAS_LITERAL16 1
14226_ACEOF
14227
14228fi
14229
a6ccdbab
EC
14230{ echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
14231echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6; }
ba479fd2
NN
14232if test "${gcc_cv_as_subsection_m1+set}" = set; then
14233 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14234else
14235 gcc_cv_as_subsection_m1=no
14236 if test $in_tree_gas = yes; then
14237 if test $in_tree_gas_is_elf = yes \
14238 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
14239 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 14240fi
8ada417f 14241 elif test x$gcc_cv_as != x; then
6e3f3080 14242 echo 'conftest_label1: .word 0
d1accaa3
JJ
14243.subsection -1
14244conftest_label2: .word 0
8ada417f 14245.previous' > conftest.s
ba479fd2
NN
14246 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14248 (eval $ac_try) 2>&5
14249 ac_status=$?
14250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14251 (exit $ac_status); }; }
8ada417f
ZW
14252 then
14253 if test x$gcc_cv_nm != x; then
14254 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
14255 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
14256 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
14257 then :
14258 else gcc_cv_as_subsection_m1=yes
14259 fi
14260 rm -f conftest.nm1 conftest.nm2
14261 fi
14262 else
14263 echo "configure: failed program was" >&5
14264 cat conftest.s >&5
14265 fi
14266 rm -f conftest.o conftest.s
14267 fi
981d4858 14268fi
a6ccdbab
EC
14269{ echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
14270echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6; }
63cf211a 14271if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
14272
14273cat >>confdefs.h <<\_ACEOF
981d4858 14274#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 14275_ACEOF
981d4858 14276
d1accaa3 14277fi
ad9c4d9f 14278
a6ccdbab
EC
14279{ echo "$as_me:$LINENO: checking assembler for .weak" >&5
14280echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6; }
ba479fd2
NN
14281if test "${gcc_cv_as_weak+set}" = set; then
14282 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14283else
14284 gcc_cv_as_weak=no
14285 if test $in_tree_gas = yes; then
14286 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
14287 then gcc_cv_as_weak=yes
ad9c4d9f 14288fi
8ada417f 14289 elif test x$gcc_cv_as != x; then
6e3f3080 14290 echo ' .weak foobar' > conftest.s
ba479fd2
NN
14291 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14293 (eval $ac_try) 2>&5
14294 ac_status=$?
14295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14296 (exit $ac_status); }; }
8ada417f
ZW
14297 then
14298 gcc_cv_as_weak=yes
14299 else
14300 echo "configure: failed program was" >&5
14301 cat conftest.s >&5
14302 fi
14303 rm -f conftest.o conftest.s
14304 fi
981d4858 14305fi
a6ccdbab
EC
14306{ echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
14307echo "${ECHO_T}$gcc_cv_as_weak" >&6; }
63cf211a 14308if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
14309
14310cat >>confdefs.h <<\_ACEOF
981d4858 14311#define HAVE_GAS_WEAK 1
ba479fd2 14312_ACEOF
981d4858 14313
12822146 14314fi
ad9c4d9f 14315
a6ccdbab
EC
14316{ echo "$as_me:$LINENO: checking assembler for .weakref" >&5
14317echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6; }
a0203ca7
AO
14318if test "${gcc_cv_as_weakref+set}" = set; then
14319 echo $ECHO_N "(cached) $ECHO_C" >&6
14320else
14321 gcc_cv_as_weakref=no
14322 if test $in_tree_gas = yes; then
14323 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
14324 then gcc_cv_as_weakref=yes
14325fi
14326 elif test x$gcc_cv_as != x; then
14327 echo ' .weakref foobar, barfnot' > conftest.s
14328 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14330 (eval $ac_try) 2>&5
14331 ac_status=$?
14332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14333 (exit $ac_status); }; }
14334 then
14335 gcc_cv_as_weakref=yes
14336 else
14337 echo "configure: failed program was" >&5
14338 cat conftest.s >&5
14339 fi
14340 rm -f conftest.o conftest.s
14341 fi
14342fi
a6ccdbab
EC
14343{ echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5
14344echo "${ECHO_T}$gcc_cv_as_weakref" >&6; }
a0203ca7
AO
14345if test $gcc_cv_as_weakref = yes; then
14346
14347cat >>confdefs.h <<\_ACEOF
14348#define HAVE_GAS_WEAKREF 1
14349_ACEOF
14350
14351fi
14352
a6ccdbab
EC
14353{ echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
14354echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6; }
e41f3691
JDA
14355if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
14356 echo $ECHO_N "(cached) $ECHO_C" >&6
14357else
14358 gcc_cv_as_nsubspa_comdat=no
14359 if test $in_tree_gas = yes; then
14360 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14361 then gcc_cv_as_nsubspa_comdat=yes
14362fi
14363 elif test x$gcc_cv_as != x; then
14364 echo ' .SPACE $TEXT$
14365 .NSUBSPA $CODE$,COMDAT' > conftest.s
14366 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14368 (eval $ac_try) 2>&5
14369 ac_status=$?
14370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14371 (exit $ac_status); }; }
14372 then
14373 gcc_cv_as_nsubspa_comdat=yes
14374 else
14375 echo "configure: failed program was" >&5
14376 cat conftest.s >&5
14377 fi
14378 rm -f conftest.o conftest.s
14379 fi
14380fi
a6ccdbab
EC
14381{ echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
14382echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6; }
e41f3691
JDA
14383if test $gcc_cv_as_nsubspa_comdat = yes; then
14384
14385cat >>confdefs.h <<\_ACEOF
14386#define HAVE_GAS_NSUBSPA_COMDAT 1
14387_ACEOF
14388
14389fi
14390
8ada417f
ZW
14391# .hidden needs to be supported in both the assembler and the linker,
14392# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
14393# This is irritatingly difficult to feature test for; we have to check the
14394# date string after the version number. If we've got an in-tree
14395# ld, we don't know its patchlevel version, so we set the baseline at 2.13
14396# to be safe.
14397# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
a6ccdbab
EC
14398{ echo "$as_me:$LINENO: checking assembler for .hidden" >&5
14399echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6; }
ba479fd2
NN
14400if test "${gcc_cv_as_hidden+set}" = set; then
14401 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14402else
14403 gcc_cv_as_hidden=no
14404 if test $in_tree_gas = yes; then
14405 if test $in_tree_gas_is_elf = yes \
14406 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
14407 then gcc_cv_as_hidden=yes
14408fi
14409 elif test x$gcc_cv_as != x; then
6e3f3080 14410 echo ' .hidden foobar
8ada417f 14411foobar:' > conftest.s
ba479fd2
NN
14412 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14414 (eval $ac_try) 2>&5
14415 ac_status=$?
14416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14417 (exit $ac_status); }; }
8ada417f
ZW
14418 then
14419 gcc_cv_as_hidden=yes
14420 else
14421 echo "configure: failed program was" >&5
14422 cat conftest.s >&5
14423 fi
14424 rm -f conftest.o conftest.s
14425 fi
14426fi
a6ccdbab
EC
14427{ echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
14428echo "${ECHO_T}$gcc_cv_as_hidden" >&6; }
63cf211a 14429
ad9c4d9f 14430
a6ccdbab
EC
14431{ echo "$as_me:$LINENO: checking linker for .hidden support" >&5
14432echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6; }
ba479fd2
NN
14433if test "${gcc_cv_ld_hidden+set}" = set; then
14434 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14435else
14436 if test $in_tree_ld = yes ; then
14437 gcc_cv_ld_hidden=no
14438 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 \
14439 && test $in_tree_ld_is_elf = yes; then
14440 gcc_cv_ld_hidden=yes
14441 fi
14442else
14443 gcc_cv_ld_hidden=yes
bace148a 14444 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
14445 if echo "$ld_ver" | grep GNU > /dev/null; then
14446 ld_vers=`echo $ld_ver | sed -n \
14447 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
14448 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
14449 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
14450 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
14451 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
11176d2a 14452 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
e8116f40 14453 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ -].*$,\1,p'`
8ada417f 14454 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'`
11176d2a
JB
14455 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
14456 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
14457 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
14458 if test 0"$ld_date" -lt 20020404; then
14459 if test -n "$ld_date"; then
14460 # If there was date string, but was earlier than 2002-04-04, fail
14461 gcc_cv_ld_hidden=no
14462 elif test -z "$ld_vers"; then
14463 # If there was no date string nor ld version number, something is wrong
14464 gcc_cv_ld_hidden=no
14465 else
8ada417f
ZW
14466 test -z "$ld_vers_patch" && ld_vers_patch=0
14467 if test "$ld_vers_major" -lt 2; then
14468 gcc_cv_ld_hidden=no
14469 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
14470 gcc_cv_ld_hidden="no"
14471 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
14472 gcc_cv_ld_hidden=no
c72931a6 14473 fi
8ada417f 14474 fi
789b7de5 14475 fi
8ada417f 14476 else
28690784 14477 case "${target}" in
b0fd7d27 14478 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
14479 gcc_cv_ld_hidden=yes
14480 ;;
14481 *)
14482 gcc_cv_ld_hidden=no
14483 ;;
14484 esac
8ada417f
ZW
14485 fi
14486fi
6d07784a 14487fi
a6ccdbab
EC
14488{ echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
14489echo "${ECHO_T}$gcc_cv_ld_hidden" >&6; }
8ada417f 14490libgcc_visibility=no
ad9c4d9f 14491
232b67d9 14492
8e3940b2 14493if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 14494 libgcc_visibility=yes
ba479fd2
NN
14495
14496cat >>confdefs.h <<\_ACEOF
8ada417f 14497#define HAVE_GAS_HIDDEN 1
ba479fd2 14498_ACEOF
ad9c4d9f
NN
14499
14500fi
14501
8ada417f 14502# Check if we have .[us]leb128, and support symbol arithmetic with it.
a6ccdbab
EC
14503{ echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
14504echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6; }
ba479fd2
NN
14505if test "${gcc_cv_as_leb128+set}" = set; then
14506 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14507else
14508 gcc_cv_as_leb128=no
14509 if test $in_tree_gas = yes; then
14510 if test $in_tree_gas_is_elf = yes \
14511 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14512 then gcc_cv_as_leb128=yes
14513fi
14514 elif test x$gcc_cv_as != x; then
6e3f3080 14515 echo ' .data
b7460f24
RH
14516 .uleb128 L2 - L1
14517L1:
14518 .uleb128 1280
14519 .sleb128 -1010
8ada417f 14520L2:' > conftest.s
ba479fd2
NN
14521 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14523 (eval $ac_try) 2>&5
14524 ac_status=$?
14525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14526 (exit $ac_status); }; }
8ada417f
ZW
14527 then
14528 # GAS versions before 2.11 do not support uleb128,
14529 # despite appearing to.
14530 # ??? There exists an elf-specific test that will crash
14531 # the assembler. Perhaps it's better to figure out whether
14532 # arbitrary sections are supported and try the test.
bace148a 14533 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
14534 if echo "$as_ver" | grep GNU > /dev/null; then
14535 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
14536 as_major=`echo $as_ver | sed 's/\..*//'`
14537 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
14538 if test $as_major -eq 2 && test $as_minor -lt 11
14539 then :
14540 else gcc_cv_as_leb128=yes
14541 fi
14542 fi
14543 else
14544 echo "configure: failed program was" >&5
14545 cat conftest.s >&5
14546 fi
14547 rm -f conftest.o conftest.s
14548 fi
b7460f24 14549fi
a6ccdbab
EC
14550{ echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
14551echo "${ECHO_T}$gcc_cv_as_leb128" >&6; }
63cf211a 14552if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
14553
14554cat >>confdefs.h <<\_ACEOF
b7460f24 14555#define HAVE_AS_LEB128 1
ba479fd2 14556_ACEOF
b7460f24
RH
14557
14558fi
ad9c4d9f 14559
8ada417f
ZW
14560# GAS versions up to and including 2.11.0 may mis-optimize
14561# .eh_frame data.
a6ccdbab
EC
14562{ echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
14563echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6; }
ba479fd2
NN
14564if test "${gcc_cv_as_eh_frame+set}" = set; then
14565 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14566else
14567 gcc_cv_as_eh_frame=no
14568 if test $in_tree_gas = yes; then
14569 if test $in_tree_gas_is_elf = yes \
14570 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14571 then gcc_cv_as_eh_frame=yes
ad9c4d9f 14572fi
8ada417f 14573 elif test x$gcc_cv_as != x; then
6e3f3080 14574 echo ' .text
c64688ae
RH
14575.LFB1:
14576 .4byte 0
14577.L1:
14578 .4byte 0
14579.LFE1:
14580 .section .eh_frame,"aw",@progbits
14581__FRAME_BEGIN__:
14582 .4byte .LECIE1-.LSCIE1
14583.LSCIE1:
14584 .4byte 0x0
14585 .byte 0x1
14586 .ascii "z\0"
14587 .byte 0x1
14588 .byte 0x78
14589 .byte 0x1a
14590 .byte 0x0
14591 .byte 0x4
14592 .4byte 1
14593 .p2align 1
14594.LECIE1:
14595.LSFDE1:
14596 .4byte .LEFDE1-.LASFDE1
14597.LASFDE1:
14598 .4byte .LASFDE1-__FRAME_BEGIN__
14599 .4byte .LFB1
14600 .4byte .LFE1-.LFB1
14601 .byte 0x4
14602 .4byte .LFE1-.LFB1
14603 .byte 0x4
14604 .4byte .L1-.LFB1
8ada417f 14605.LEFDE1:' > conftest.s
ba479fd2
NN
14606 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14608 (eval $ac_try) 2>&5
14609 ac_status=$?
14610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14611 (exit $ac_status); }; }
8ada417f
ZW
14612 then
14613 cat > conftest.lit <<EOF
c64688ae
RH
14614 0000 10000000 00000000 017a0001 781a0004 .........z..x...
14615 0010 01000000 12000000 18000000 00000000 ................
093e61a6 14616 0020 08000000 04080000 0044 .........D
01efb963 14617EOF
ba479fd2 14618cat > conftest.big <<EOF
01efb963
AS
14619 0000 00000010 00000000 017a0001 781a0004 .........z..x...
14620 0010 00000001 00000012 00000018 00000000 ................
093e61a6 14621 0020 00000008 04000000 0844 .........D
c64688ae 14622EOF
8ada417f
ZW
14623 # If the assembler didn't choke, and we can objdump,
14624 # and we got the correct data, then succeed.
dbc02e7f
AS
14625 # The text in the here-document typically retains its unix-style line
14626 # endings, while the output of objdump will use host line endings.
14627 # Therefore, use diff -b for the comparisons.
8ada417f
ZW
14628 if test x$gcc_cv_objdump != x \
14629 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
14630 | tail -3 > conftest.got \
dbc02e7f
AS
14631 && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
14632 || diff -b conftest.big conftest.got > /dev/null 2>&1; }
8ada417f
ZW
14633 then
14634 gcc_cv_as_eh_frame=yes
ba479fd2
NN
14635 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
14636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14637 (eval $ac_try) 2>&5
14638 ac_status=$?
14639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14640 (exit $ac_status); }; }; then
8ada417f
ZW
14641 gcc_cv_as_eh_frame=buggy
14642 else
14643 # Uh oh, what do we do now?
14644 gcc_cv_as_eh_frame=no
14645 fi
14646 else
14647 echo "configure: failed program was" >&5
14648 cat conftest.s >&5
14649 fi
14650 rm -f conftest.o conftest.s
14651 fi
c64688ae 14652fi
a6ccdbab
EC
14653{ echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
14654echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6; }
ad9c4d9f 14655
6e3f3080 14656
63cf211a 14657if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
14658
14659cat >>confdefs.h <<\_ACEOF
8ada417f 14660#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 14661_ACEOF
ad9c4d9f
NN
14662
14663fi
14664
a6ccdbab
EC
14665{ echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14666echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6; }
ba479fd2
NN
14667if test "${gcc_cv_as_shf_merge+set}" = set; then
14668 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14669else
14670 gcc_cv_as_shf_merge=no
14671 if test $in_tree_gas = yes; then
14672 if test $in_tree_gas_is_elf = yes \
14673 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14674 then gcc_cv_as_shf_merge=yes
14675fi
14676 elif test x$gcc_cv_as != x; then
6e3f3080 14677 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
14678 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14680 (eval $ac_try) 2>&5
14681 ac_status=$?
14682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14683 (exit $ac_status); }; }
8ada417f
ZW
14684 then
14685 gcc_cv_as_shf_merge=yes
14686 else
14687 echo "configure: failed program was" >&5
14688 cat conftest.s >&5
14689 fi
14690 rm -f conftest.o conftest.s
14691 fi
201556f0 14692fi
a6ccdbab
EC
14693{ echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14694echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6; }
8ada417f 14695
c18a5b6c 14696if test $gcc_cv_as_shf_merge = no; then
a6ccdbab
EC
14697 { echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14698echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6; }
c18a5b6c
MM
14699if test "${gcc_cv_as_shf_merge+set}" = set; then
14700 echo $ECHO_N "(cached) $ECHO_C" >&6
14701else
14702 gcc_cv_as_shf_merge=no
14703 if test $in_tree_gas = yes; then
14704 if test $in_tree_gas_is_elf = yes \
14705 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14706 then gcc_cv_as_shf_merge=yes
14707fi
14708 elif test x$gcc_cv_as != x; then
14709 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
14710 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14712 (eval $ac_try) 2>&5
14713 ac_status=$?
14714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14715 (exit $ac_status); }; }
14716 then
14717 gcc_cv_as_shf_merge=yes
14718 else
14719 echo "configure: failed program was" >&5
14720 cat conftest.s >&5
14721 fi
14722 rm -f conftest.o conftest.s
14723 fi
14724fi
a6ccdbab
EC
14725{ echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14726echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6; }
c18a5b6c
MM
14727
14728fi
8ad9fb33 14729
ba479fd2 14730cat >>confdefs.h <<_ACEOF
8ad9fb33 14731#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 14732_ACEOF
201556f0 14733
201556f0 14734
a6ccdbab
EC
14735{ echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14736echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6; }
c18a5b6c
MM
14737if test "${gcc_cv_as_comdat_group+set}" = set; then
14738 echo $ECHO_N "(cached) $ECHO_C" >&6
14739else
14740 gcc_cv_as_comdat_group=no
14741 if test $in_tree_gas = yes; then
14742 if test $in_tree_gas_is_elf = yes \
11176d2a 14743 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
14744 then gcc_cv_as_comdat_group=yes
14745fi
14746 elif test x$gcc_cv_as != x; then
14747 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
14748 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14750 (eval $ac_try) 2>&5
14751 ac_status=$?
14752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14753 (exit $ac_status); }; }
14754 then
14755 gcc_cv_as_comdat_group=yes
14756 else
14757 echo "configure: failed program was" >&5
14758 cat conftest.s >&5
14759 fi
14760 rm -f conftest.o conftest.s
14761 fi
14762fi
a6ccdbab
EC
14763{ echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
14764echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6; }
c18a5b6c
MM
14765
14766if test $gcc_cv_as_comdat_group = yes; then
14767 gcc_cv_as_comdat_group_percent=no
14768else
a6ccdbab
EC
14769 { echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14770echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6; }
c18a5b6c
MM
14771if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
14772 echo $ECHO_N "(cached) $ECHO_C" >&6
14773else
14774 gcc_cv_as_comdat_group_percent=no
14775 if test $in_tree_gas = yes; then
14776 if test $in_tree_gas_is_elf = yes \
11176d2a 14777 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
14778 then gcc_cv_as_comdat_group_percent=yes
14779fi
14780 elif test x$gcc_cv_as != x; then
14781 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
14782 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14784 (eval $ac_try) 2>&5
14785 ac_status=$?
14786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14787 (exit $ac_status); }; }
14788 then
14789 gcc_cv_as_comdat_group_percent=yes
14790 else
14791 echo "configure: failed program was" >&5
14792 cat conftest.s >&5
14793 fi
14794 rm -f conftest.o conftest.s
14795 fi
14796fi
a6ccdbab
EC
14797{ echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
14798echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6; }
c18a5b6c
MM
14799
14800fi
11176d2a
JB
14801if test $in_tree_ld != yes && test x"$ld_vers" != x; then
14802 comdat_group=yes
14803 if test 0"$ld_date" -lt 20050308; then
14804 if test -n "$ld_date"; then
14805 # If there was date string, but was earlier than 2005-03-08, fail
14806 comdat_group=no
14807 elif test "$ld_vers_major" -lt 2; then
14808 comdat_group=no
14809 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
14810 comdat_group=no
14811 fi
14812 fi
1cf0118d
RO
14813else
14814 # assume linkers other than GNU ld don't support COMDAT group
14815 comdat_group=no
14816fi
14817if test $comdat_group = no; then
14818 gcc_cv_as_comdat_group=no
14819 gcc_cv_as_comdat_group_percent=no
11176d2a 14820fi
c18a5b6c
MM
14821
14822cat >>confdefs.h <<_ACEOF
11176d2a 14823#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`
c18a5b6c
MM
14824_ACEOF
14825
14826
8ada417f 14827# Thread-local storage - the check is heavily parametrized.
f996902d
RH
14828conftest_s=
14829tls_first_major=
14830tls_first_minor=
9739c90c 14831tls_as_opt=
f996902d 14832case "$target" in
6f9b006d
RH
14833 alpha*-*-*)
14834 conftest_s='
14835 .section ".tdata","awT",@progbits
14836foo: .long 25
14837 .text
14838 ldq $27,__tls_get_addr($29) !literal!1
14839 lda $16,foo($29) !tlsgd!1
14840 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
14841 ldq $27,__tls_get_addr($29) !literal!2
14842 lda $16,foo($29) !tlsldm!2
14843 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
14844 ldq $1,foo($29) !gotdtprel
14845 ldah $2,foo($29) !dtprelhi
14846 lda $3,foo($2) !dtprello
14847 lda $4,foo($29) !dtprel
14848 ldq $1,foo($29) !gottprel
14849 ldah $2,foo($29) !tprelhi
14850 lda $3,foo($2) !tprello
14851 lda $4,foo($29) !tprel'
14852 tls_first_major=2
14853 tls_first_minor=13
2f3321ca 14854 tls_as_opt=--fatal-warnings
6f9b006d 14855 ;;
e4dd71de
AH
14856 frv*-*-*)
14857 conftest_s='
14858 .section ".tdata","awT",@progbits
14859x: .long 25
14860 .text
14861 call #gettlsoff(x)'
14862 tls_first_major=2
14863 tls_first_minor=14
14864 ;;
51076f96
RC
14865 hppa*-*-linux*)
14866 conftest_s='
14867t1: .reg %r20
14868t2: .reg %r21
14869gp: .reg %r19
14870 .section ".tdata","awT",@progbits
14871foo: .long 25
14872 .text
14873 .align 4
14874 addil LT%foo-$tls_gdidx$,gp
14875 ldo RT%foo-$tls_gdidx$(%r1),%arg0
14876 b __tls_get_addr
14877 nop
14878 addil LT%foo-$tls_ldidx$,gp
14879 b __tls_get_addr
14880 ldo RT%foo-$tls_ldidx$(%r1),%arg0
14881 addil LR%foo-$tls_dtpoff$,%ret0
14882 ldo RR%foo-$tls_dtpoff$(%r1),%t1
14883 mfctl %cr27,%t1
14884 addil LT%foo-$tls_ieoff$,gp
14885 ldw RT%foo-$tls_ieoff$(%r1),%t2
14886 add %t1,%t2,%t3
14887 mfctl %cr27,%t1
14888 addil LR%foo-$tls_leoff$,%t1
14889 ldo RR%foo-$tls_leoff$(%r1),%t2'
14890 tls_first_major=2
14891 tls_first_minor=15
14892 tls_as_opt=--fatal-warnings
14893 ;;
d3585b76
DJ
14894 arm*-*-*)
14895 conftest_s='
14896 .section ".tdata","awT",%progbits
14897foo: .long 25
14898 .text
14899.word foo(gottpoff)
14900.word foo(tpoff)
14901.word foo(tlsgd)
14902.word foo(tlsldm)
14903.word foo(tlsldo)'
14904 tls_first_major=2
14905 tls_first_minor=17
14906 ;;
f996902d
RH
14907 i[34567]86-*-*)
14908 conftest_s='
14909 .section ".tdata","awT",@progbits
14910foo: .long 25
14911 .text
14912 movl %gs:0, %eax
14913 leal foo@TLSGD(,%ebx,1), %eax
14914 leal foo@TLSLDM(%ebx), %eax
14915 leal foo@DTPOFF(%eax), %edx
14916 movl foo@GOTTPOFF(%ebx), %eax
14917 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
14918 addl foo@GOTNTPOFF(%ebx), %eax
14919 movl foo@INDNTPOFF, %eax
f996902d
RH
14920 movl $foo@TPOFF, %eax
14921 subl $foo@TPOFF, %eax
14922 leal foo@NTPOFF(%ecx), %eax'
14923 tls_first_major=2
75d38379 14924 tls_first_minor=14
2f3321ca 14925 tls_as_opt=--fatal-warnings
75d38379
JJ
14926 ;;
14927 x86_64-*-*)
14928 conftest_s='
14929 .section ".tdata","awT",@progbits
14930foo: .long 25
14931 .text
14932 movq %fs:0, %rax
14933 leaq foo@TLSGD(%rip), %rdi
14934 leaq foo@TLSLD(%rip), %rdi
14935 leaq foo@DTPOFF(%rax), %rdx
14936 movq foo@GOTTPOFF(%rip), %rax
14937 movq $foo@TPOFF, %rax'
14938 tls_first_major=2
14939 tls_first_minor=14
2f3321ca 14940 tls_as_opt=--fatal-warnings
f996902d 14941 ;;
7b6e506e
RH
14942 ia64-*-*)
14943 conftest_s='
14944 .section ".tdata","awT",@progbits
14945foo: data8 25
14946 .text
14947 addl r16 = @ltoff(@dtpmod(foo#)), gp
14948 addl r17 = @ltoff(@dtprel(foo#)), gp
14949 addl r18 = @ltoff(@tprel(foo#)), gp
14950 addl r19 = @dtprel(foo#), gp
14951 adds r21 = @dtprel(foo#), r13
14952 movl r23 = @dtprel(foo#)
14953 addl r20 = @tprel(foo#), gp
14954 adds r22 = @tprel(foo#), r13
14955 movl r24 = @tprel(foo#)'
14956 tls_first_major=2
14957 tls_first_minor=13
2f3321ca 14958 tls_as_opt=--fatal-warnings
7b6e506e 14959 ;;
69229b81
DJ
14960 mips*-*-*)
14961 conftest_s='
14962 .section .tdata,"awT",@progbits
14963x:
14964 .word 2
14965 .text
14966 addiu $4, $28, %tlsgd(x)
14967 addiu $4, $28, %tlsldm(x)
14968 lui $4, %dtprel_hi(x)
14969 addiu $4, $4, %dtprel_lo(x)
14970 lw $4, %gottprel(x)($28)
14971 lui $4, %tprel_hi(x)
14972 addiu $4, $4, %tprel_lo(x)'
14973 tls_first_major=2
14974 tls_first_minor=16
14975 tls_as_opt='-32 --fatal-warnings'
14976 ;;
c4501e62
JJ
14977 powerpc-*-*)
14978 conftest_s='
14979 .section ".tdata","awT",@progbits
14980 .align 2
14981ld0: .space 4
14982ld1: .space 4
14983x1: .space 4
14984x2: .space 4
14985x3: .space 4
14986 .text
14987 addi 3,31,ld0@got@tlsgd
14988 bl __tls_get_addr
14989 addi 3,31,x1@got@tlsld
14990 bl __tls_get_addr
14991 addi 9,3,x1@dtprel
14992 addis 9,3,x2@dtprel@ha
14993 addi 9,9,x2@dtprel@l
14994 lwz 9,x3@got@tprel(31)
14995 add 9,9,x@tls
14996 addi 9,2,x1@tprel
14997 addis 9,2,x2@tprel@ha
14998 addi 9,9,x2@tprel@l'
14999 tls_first_major=2
15000 tls_first_minor=14
2f3321ca 15001 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
15002 ;;
15003 powerpc64-*-*)
15004 conftest_s='
15005 .section ".tdata","awT",@progbits
15006 .align 3
15007ld0: .space 8
15008ld1: .space 8
15009x1: .space 8
15010x2: .space 8
15011x3: .space 8
15012 .text
15013 addi 3,2,ld0@got@tlsgd
15014 bl .__tls_get_addr
15015 nop
15016 addi 3,2,ld1@toc
15017 bl .__tls_get_addr
15018 nop
15019 addi 3,2,x1@got@tlsld
15020 bl .__tls_get_addr
15021 nop
15022 addi 9,3,x1@dtprel
15023 bl .__tls_get_addr
15024 nop
15025 addis 9,3,x2@dtprel@ha
15026 addi 9,9,x2@dtprel@l
15027 bl .__tls_get_addr
15028 nop
15029 ld 9,x3@got@dtprel(2)
15030 add 9,9,3
15031 bl .__tls_get_addr
15032 nop'
15033 tls_first_major=2
15034 tls_first_minor=14
2f3321ca 15035 tls_as_opt="-a64 --fatal-warnings"
c4501e62 15036 ;;
fd3cd001
UW
15037 s390-*-*)
15038 conftest_s='
15039 .section ".tdata","awT",@progbits
15040foo: .long 25
15041 .text
15042 .long foo@TLSGD
15043 .long foo@TLSLDM
15044 .long foo@DTPOFF
15045 .long foo@NTPOFF
15046 .long foo@GOTNTPOFF
15047 .long foo@INDNTPOFF
15048 l %r1,foo@GOTNTPOFF(%r12)
15049 l %r1,0(%r1):tls_load:foo
15050 bas %r14,0(%r1,%r13):tls_gdcall:foo
15051 bas %r14,0(%r1,%r13):tls_ldcall:foo'
15052 tls_first_major=2
15053 tls_first_minor=14
2f3321ca 15054 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
15055 ;;
15056 s390x-*-*)
15057 conftest_s='
15058 .section ".tdata","awT",@progbits
15059foo: .long 25
15060 .text
15061 .quad foo@TLSGD
15062 .quad foo@TLSLDM
15063 .quad foo@DTPOFF
15064 .quad foo@NTPOFF
15065 .quad foo@GOTNTPOFF
15066 lg %r1,foo@GOTNTPOFF(%r12)
15067 larl %r1,foo@INDNTPOFF
15068 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
15069 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
15070 tls_first_major=2
15071 tls_first_minor=14
2f3321ca 15072 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 15073 ;;
9ff13962
KK
15074 sh-*-* | sh[34]-*-*)
15075 conftest_s='
15076 .section ".tdata","awT",@progbits
15077foo: .long 25
15078 .text
15079 .long foo@TLSGD
15080 .long foo@TLSLDM
15081 .long foo@DTPOFF
15082 .long foo@GOTTPOFF
15083 .long foo@TPOFF'
15084 tls_first_major=2
15085 tls_first_minor=13
2f3321ca 15086 tls_as_opt=--fatal-warnings
9ff13962 15087 ;;
5751a10b 15088 sparc*-*-*)
2f3321ca 15089 case "$target" in
7935dc1b
EB
15090 sparc*-sun-solaris2.[56789]*)
15091 # TLS was introduced in the Solaris 9 4/04 release but
15092 # we do not enable it by default on Solaris 9 either.
15093 if test "x$enable_tls" = xyes ; then
15094 on_solaris=yes
15095 else
15096 enable_tls=no;
15097 fi
15098 ;;
2f3321ca
EB
15099 sparc*-sun-solaris2.*)
15100 on_solaris=yes
15101 ;;
15102 *)
15103 on_solaris=no
15104 ;;
15105 esac
15106 if test x$on_solaris = xyes && test x$gas_flag = xno; then
15107 conftest_s='
15108 .section ".tdata",#alloc,#write,#tls
15109foo: .long 25
15110 .text
15111 sethi %tgd_hi22(foo), %o0
15112 add %o0, %tgd_lo10(foo), %o1
15113 add %l7, %o1, %o0, %tgd_add(foo)
15114 call __tls_get_addr, %tgd_call(foo)
15115 sethi %tldm_hi22(foo), %l1
15116 add %l1, %tldm_lo10(foo), %l2
15117 add %l7, %l2, %o0, %tldm_add(foo)
15118 call __tls_get_addr, %tldm_call(foo)
15119 sethi %tldo_hix22(foo), %l3
15120 xor %l3, %tldo_lox10(foo), %l4
15121 add %o0, %l4, %l5, %tldo_add(foo)
15122 sethi %tie_hi22(foo), %o3
15123 add %o3, %tie_lo10(foo), %o3
15124 ld [%l7 + %o3], %o2, %tie_ld(foo)
15125 add %g7, %o2, %o4, %tie_add(foo)
15126 sethi %tle_hix22(foo), %l1
15127 xor %l1, %tle_lox10(foo), %o5
15128 ld [%g7 + %o5], %o1'
15129 tls_first_major=0
15130 tls_first_minor=0
15131 else
15132 conftest_s='
5751a10b
JJ
15133 .section ".tdata","awT",@progbits
15134foo: .long 25
15135 .text
15136 sethi %tgd_hi22(foo), %o0
15137 add %o0, %tgd_lo10(foo), %o1
15138 add %l7, %o1, %o0, %tgd_add(foo)
15139 call __tls_get_addr, %tgd_call(foo)
15140 sethi %tldm_hi22(foo), %l1
15141 add %l1, %tldm_lo10(foo), %l2
15142 add %l7, %l2, %o0, %tldm_add(foo)
15143 call __tls_get_addr, %tldm_call(foo)
15144 sethi %tldo_hix22(foo), %l3
15145 xor %l3, %tldo_lox10(foo), %l4
15146 add %o0, %l4, %l5, %tldo_add(foo)
15147 sethi %tie_hi22(foo), %o3
15148 add %o3, %tie_lo10(foo), %o3
15149 ld [%l7 + %o3], %o2, %tie_ld(foo)
15150 add %g7, %o2, %o4, %tie_add(foo)
15151 sethi %tle_hix22(foo), %l1
15152 xor %l1, %tle_lox10(foo), %o5
15153 ld [%g7 + %o5], %o1'
15154 tls_first_major=2
15155 tls_first_minor=14
2f3321ca
EB
15156 tls_as_opt="-32 --fatal-warnings"
15157 fi
5751a10b 15158 ;;
f996902d 15159esac
8dea1cca
DD
15160set_have_as_tls=no
15161if test "x$enable_tls" = xno ; then
15162 : # TLS explicitly disabled.
15163elif test "x$enable_tls" = xyes ; then
15164 set_have_as_tls=yes # TLS explicitly enabled.
15165elif test -z "$tls_first_major"; then
8ada417f
ZW
15166 : # If we don't have a check, assume no support.
15167else
a6ccdbab
EC
15168 { echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
15169echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6; }
ba479fd2
NN
15170if test "${gcc_cv_as_tls+set}" = set; then
15171 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15172else
15173 gcc_cv_as_tls=no
15174 if test $in_tree_gas = yes; then
15175 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
15176 then gcc_cv_as_tls=yes
ad9c4d9f 15177fi
8ada417f 15178 elif test x$gcc_cv_as != x; then
6e3f3080 15179 echo "$conftest_s" > conftest.s
2f3321ca 15180 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
15181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15182 (eval $ac_try) 2>&5
15183 ac_status=$?
15184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15185 (exit $ac_status); }; }
8ada417f
ZW
15186 then
15187 gcc_cv_as_tls=yes
15188 else
15189 echo "configure: failed program was" >&5
15190 cat conftest.s >&5
15191 fi
15192 rm -f conftest.o conftest.s
f996902d 15193 fi
f996902d 15194fi
a6ccdbab
EC
15195{ echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
15196echo "${ECHO_T}$gcc_cv_as_tls" >&6; }
63cf211a 15197if test $gcc_cv_as_tls = yes; then
8dea1cca
DD
15198 set_have_as_tls=yes
15199fi
15200fi
15201if test $set_have_as_tls = yes ; then
ba479fd2
NN
15202
15203cat >>confdefs.h <<\_ACEOF
f996902d 15204#define HAVE_AS_TLS 1
ba479fd2 15205_ACEOF
f996902d 15206
8ada417f
ZW
15207fi
15208
15209# Target-specific assembler checks.
f996902d 15210
a6ccdbab
EC
15211{ echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
15212echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6; }
7e9d8517
L
15213gcc_cv_ld_static_dynamic=no
15214if test $in_tree_ld = yes ; then
15215 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
15216 gcc_cv_ld_static_dynamic=yes
15217 fi
15218elif test x$gcc_cv_ld != x; then
15219 # Check if linker supports -Bstatic/-Bdynamic option
15220 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
15221 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
15222 gcc_cv_ld_static_dynamic=yes
15223 fi
15224fi
15225if test x"$gcc_cv_ld_static_dynamic" = xyes; then
15226
15227cat >>confdefs.h <<\_ACEOF
15228#define HAVE_LD_STATIC_DYNAMIC 1
15229_ACEOF
15230
15231fi
a6ccdbab
EC
15232{ echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
15233echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6; }
7e9d8517 15234
d594623a 15235if test x"$demangler_in_ld" = xyes; then
a6ccdbab
EC
15236 { echo "$as_me:$LINENO: checking linker --demangle support" >&5
15237echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6; }
d594623a
L
15238 gcc_cv_ld_demangle=no
15239 if test $in_tree_ld = yes; then
15240 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 \
15241 gcc_cv_ld_demangle=yes
15242 fi
15243 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
15244 # Check if the GNU linker supports --demangle option
15245 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
15246 gcc_cv_ld_demangle=yes
15247 fi
15248 fi
15249 if test x"$gcc_cv_ld_demangle" = xyes; then
15250
15251cat >>confdefs.h <<\_ACEOF
15252#define HAVE_LD_DEMANGLE 1
15253_ACEOF
15254
15255 fi
a6ccdbab
EC
15256 { echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
15257echo "${ECHO_T}$gcc_cv_ld_demangle" >&6; }
d594623a
L
15258fi
15259
3a37b08e
RH
15260case "$target" in
15261 # All TARGET_ABI_OSF targets.
15262 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
a6ccdbab
EC
15263 { echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
15264echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6; }
ba479fd2
NN
15265if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
15266 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 15267else
8ada417f
ZW
15268 gcc_cv_as_alpha_explicit_relocs=no
15269 if test $in_tree_gas = yes; then
15270 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
15271 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 15272fi
8ada417f 15273 elif test x$gcc_cv_as != x; then
6e3f3080 15274 echo ' .set nomacro
3a37b08e
RH
15275 .text
15276 extbl $3, $2, $3 !lituse_bytoff!1
15277 ldq $2, a($29) !literal!1
15278 ldq $4, b($29) !literal!2
15279 ldq_u $3, 0($2) !lituse_base!1
15280 ldq $27, f($29) !literal!5
15281 jsr $26, ($27), f !lituse_jsr!5
15282 ldah $29, 0($26) !gpdisp!3
15283 lda $0, c($29) !gprel
15284 ldah $1, d($29) !gprelhigh
15285 lda $1, d($1) !gprellow
8ada417f 15286 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
15287 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15289 (eval $ac_try) 2>&5
15290 ac_status=$?
15291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15292 (exit $ac_status); }; }
8ada417f
ZW
15293 then
15294 gcc_cv_as_alpha_explicit_relocs=yes
15295 else
15296 echo "configure: failed program was" >&5
15297 cat conftest.s >&5
15298 fi
15299 rm -f conftest.o conftest.s
15300 fi
cafe096b 15301fi
a6ccdbab
EC
15302{ echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
15303echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6; }
63cf211a 15304if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
15305
15306cat >>confdefs.h <<\_ACEOF
3a37b08e 15307#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 15308_ACEOF
3a37b08e 15309
d006f5eb 15310fi
a6ccdbab
EC
15311 { echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
15312echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6; }
d006f5eb
RH
15313if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
15314 echo $ECHO_N "(cached) $ECHO_C" >&6
15315else
15316 gcc_cv_as_alpha_jsrdirect_relocs=no
15317 if test $in_tree_gas = yes; then
15318 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
15319 then gcc_cv_as_alpha_jsrdirect_relocs=yes
15320fi
15321 elif test x$gcc_cv_as != x; then
15322 echo ' .set nomacro
15323 .text
15324 ldq $27, a($29) !literal!1
15325 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
15326 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15328 (eval $ac_try) 2>&5
15329 ac_status=$?
15330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15331 (exit $ac_status); }; }
15332 then
15333 gcc_cv_as_alpha_jsrdirect_relocs=yes
15334 else
15335 echo "configure: failed program was" >&5
15336 cat conftest.s >&5
15337 fi
15338 rm -f conftest.o conftest.s
15339 fi
15340fi
a6ccdbab
EC
15341{ echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
15342echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6; }
d006f5eb
RH
15343if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
15344
15345cat >>confdefs.h <<\_ACEOF
15346#define HAVE_AS_JSRDIRECT_RELOCS 1
15347_ACEOF
15348
86da66b5
HPN
15349fi
15350 ;;
15351
15352 cris-*-*)
a6ccdbab
EC
15353 { echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
15354echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6; }
86da66b5
HPN
15355if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
15356 echo $ECHO_N "(cached) $ECHO_C" >&6
15357else
15358 gcc_cv_as_cris_no_mul_bug=no
15359 if test $in_tree_gas = yes; then
15360 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
15361 then gcc_cv_as_cris_no_mul_bug=yes
15362fi
15363 elif test x$gcc_cv_as != x; then
15364 echo '.text' > conftest.s
15365 if { ac_try='$gcc_cv_as -no-mul-bug-abort -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_cris_no_mul_bug=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
15379fi
a6ccdbab
EC
15380{ echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
15381echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6; }
86da66b5
HPN
15382if test $gcc_cv_as_cris_no_mul_bug = yes; then
15383
15384cat >>confdefs.h <<\_ACEOF
15385#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
15386_ACEOF
15387
8ada417f 15388fi
3a37b08e 15389 ;;
8ada417f 15390
1cb36a98 15391 sparc*-*-*)
a6ccdbab
EC
15392 { echo "$as_me:$LINENO: checking assembler for .register" >&5
15393echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6; }
ba479fd2
NN
15394if test "${gcc_cv_as_sparc_register_op+set}" = set; then
15395 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 15396else
8ada417f
ZW
15397 gcc_cv_as_sparc_register_op=no
15398 if test x$gcc_cv_as != x; then
6e3f3080 15399 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
15400 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15402 (eval $ac_try) 2>&5
15403 ac_status=$?
15404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15405 (exit $ac_status); }; }
8ada417f
ZW
15406 then
15407 gcc_cv_as_sparc_register_op=yes
15408 else
15409 echo "configure: failed program was" >&5
15410 cat conftest.s >&5
15411 fi
15412 rm -f conftest.o conftest.s
15413 fi
cafe096b 15414fi
a6ccdbab
EC
15415{ echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
15416echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6; }
63cf211a 15417if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
15418
15419cat >>confdefs.h <<\_ACEOF
1cb36a98 15420#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 15421_ACEOF
1cb36a98 15422
8ada417f 15423fi
1cb36a98 15424
a6ccdbab
EC
15425 { echo "$as_me:$LINENO: checking assembler for -relax option" >&5
15426echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6; }
ba479fd2
NN
15427if test "${gcc_cv_as_sparc_relax+set}" = set; then
15428 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 15429else
8ada417f
ZW
15430 gcc_cv_as_sparc_relax=no
15431 if test x$gcc_cv_as != x; then
6e3f3080 15432 echo '.text' > conftest.s
ba479fd2
NN
15433 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
15434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15435 (eval $ac_try) 2>&5
15436 ac_status=$?
15437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15438 (exit $ac_status); }; }
8ada417f
ZW
15439 then
15440 gcc_cv_as_sparc_relax=yes
15441 else
15442 echo "configure: failed program was" >&5
15443 cat conftest.s >&5
15444 fi
15445 rm -f conftest.o conftest.s
15446 fi
cafe096b 15447fi
a6ccdbab
EC
15448{ echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
15449echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6; }
63cf211a 15450if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
15451
15452cat >>confdefs.h <<\_ACEOF
e95b1e6a 15453#define HAVE_AS_RELAX_OPTION 1
ba479fd2 15454_ACEOF
e95b1e6a 15455
8ada417f 15456fi
e95b1e6a 15457
a6ccdbab
EC
15458 { echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
15459echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6; }
ba479fd2
NN
15460if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
15461 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 15462else
8ada417f
ZW
15463 gcc_cv_as_sparc_ua_pcrel=no
15464 if test x$gcc_cv_as != x; then
6e3f3080 15465 echo '.text
8ada417f
ZW
15466foo:
15467 nop
15468.data
15469.align 4
15470.byte 0
15471.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
15472 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
15473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15474 (eval $ac_try) 2>&5
15475 ac_status=$?
15476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15477 (exit $ac_status); }; }
8ada417f
ZW
15478 then
15479 if test x$gcc_cv_ld != x \
15480 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
15481 gcc_cv_as_sparc_ua_pcrel=yes
15482 fi
15483 rm -f conftest
15484 else
15485 echo "configure: failed program was" >&5
15486 cat conftest.s >&5
15487 fi
15488 rm -f conftest.o conftest.s
15489 fi
cafe096b 15490fi
a6ccdbab
EC
15491{ echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
15492echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6; }
63cf211a 15493if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
15494
15495cat >>confdefs.h <<\_ACEOF
17e9e88c 15496#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 15497_ACEOF
17e9e88c 15498
17e9e88c 15499
a6ccdbab
EC
15500 { echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
15501echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6; }
ba479fd2
NN
15502if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
15503 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 15504else
8ada417f
ZW
15505 gcc_cv_as_sparc_ua_pcrel_hidden=no
15506 if test x$gcc_cv_as != x; then
6e3f3080 15507 echo '.data
8ada417f
ZW
15508.align 4
15509.byte 0x31
15510.uaword %r_disp32(foo)
15511.byte 0x32, 0x33, 0x34
15512.global foo
15513.hidden foo
15514foo:
15515.skip 4' > conftest.s
ba479fd2
NN
15516 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
15517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15518 (eval $ac_try) 2>&5
15519 ac_status=$?
15520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15521 (exit $ac_status); }; }
8ada417f
ZW
15522 then
15523 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
15524 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
15525 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
15526 | grep ' 31000000 07323334' > /dev/null 2>&1; then
15527 if $gcc_cv_objdump -R conftest 2> /dev/null \
15528 | grep 'DISP32' > /dev/null 2>&1; then
15529 :
15530 else
15531 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 15532 fi
8ada417f
ZW
15533 fi
15534 rm -f conftest
15535 else
15536 echo "configure: failed program was" >&5
15537 cat conftest.s >&5
15538 fi
15539 rm -f conftest.o conftest.s
15540 fi
cafe096b 15541fi
a6ccdbab
EC
15542{ echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
15543echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6; }
63cf211a 15544if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
15545
15546cat >>confdefs.h <<\_ACEOF
cf7b8b0d 15547#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 15548_ACEOF
cf7b8b0d 15549
8ada417f 15550fi
ba479fd2 15551
8ada417f 15552fi # unaligned pcrel relocs
cf7b8b0d 15553
a6ccdbab
EC
15554 { echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
15555echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6; }
ba479fd2
NN
15556if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
15557 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 15558else
8ada417f
ZW
15559 gcc_cv_as_sparc_offsetable_lo10=no
15560 if test x$gcc_cv_as != x; then
6e3f3080 15561 echo '.text
8ada417f
ZW
15562 or %g1, %lo(ab) + 12, %g1
15563 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
15564 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
15565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15566 (eval $ac_try) 2>&5
15567 ac_status=$?
15568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15569 (exit $ac_status); }; }
8ada417f
ZW
15570 then
15571 if test x$gcc_cv_objdump != x \
ecb0ccbc 15572 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 15573 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 15574 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
15575 fi
15576 else
15577 echo "configure: failed program was" >&5
15578 cat conftest.s >&5
15579 fi
15580 rm -f conftest.o conftest.s
15581 fi
cafe096b 15582fi
a6ccdbab
EC
15583{ echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
15584echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6; }
63cf211a 15585if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
15586
15587cat >>confdefs.h <<\_ACEOF
1cb36a98 15588#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 15589_ACEOF
1cb36a98 15590
8ada417f 15591fi
1cb36a98
RH
15592 ;;
15593
c307e6dd 15594 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
15595 case $target_os in
15596 cygwin* | pe | mingw32*)
15597 # Used for DWARF 2 in PE
a6ccdbab
EC
15598 { echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
15599echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6; }
d38bc601
BF
15600if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
15601 echo $ECHO_N "(cached) $ECHO_C" >&6
15602else
15603 gcc_cv_as_ix86_pe_secrel32=no
15604 if test $in_tree_gas = yes; then
15605 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
15606 then gcc_cv_as_ix86_pe_secrel32=yes
15607fi
15608 elif test x$gcc_cv_as != x; then
15609 echo '.text
15610foo: nop
15611.data
15612 .secrel32 foo' > conftest.s
15613 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15615 (eval $ac_try) 2>&5
15616 ac_status=$?
15617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15618 (exit $ac_status); }; }
15619 then
15620 if test x$gcc_cv_ld != x \
15621 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
15622 gcc_cv_as_ix86_pe_secrel32=yes
15623 fi
15624 rm -f conftest
15625 else
15626 echo "configure: failed program was" >&5
15627 cat conftest.s >&5
15628 fi
15629 rm -f conftest.o conftest.s
15630 fi
15631fi
a6ccdbab
EC
15632{ echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
15633echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6; }
d38bc601
BF
15634if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
15635
15636cat >>confdefs.h <<\_ACEOF
15637#define HAVE_GAS_PE_SECREL32_RELOC 1
15638_ACEOF
15639
15640fi
15641 ;;
15642 esac
15643
a6ccdbab
EC
15644 { echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
15645echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6; }
ba479fd2
NN
15646if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
15647 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15648else
15649 gcc_cv_as_ix86_filds_fists=no
15650 if test $in_tree_gas = yes; then
15651 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
15652 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 15653fi
8ada417f 15654 elif test x$gcc_cv_as != x; then
6e3f3080 15655 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
15656 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15658 (eval $ac_try) 2>&5
15659 ac_status=$?
15660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15661 (exit $ac_status); }; }
8ada417f
ZW
15662 then
15663 gcc_cv_as_ix86_filds_fists=yes
15664 else
15665 echo "configure: failed program was" >&5
15666 cat conftest.s >&5
981d4858 15667 fi
8ada417f
ZW
15668 rm -f conftest.o conftest.s
15669 fi
15670fi
a6ccdbab
EC
15671{ echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
15672echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6; }
63cf211a 15673if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
15674
15675cat >>confdefs.h <<\_ACEOF
8ada417f 15676#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 15677_ACEOF
ad9c4d9f 15678
f6f5dff2
RO
15679fi
15680
a6ccdbab
EC
15681 { echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
15682echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6; }
ba479fd2
NN
15683if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
15684 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
15685else
15686 gcc_cv_as_ix86_cmov_sun_syntax=no
15687 if test x$gcc_cv_as != x; then
6e3f3080 15688 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
15689 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15691 (eval $ac_try) 2>&5
15692 ac_status=$?
15693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15694 (exit $ac_status); }; }
f6f5dff2
RO
15695 then
15696 gcc_cv_as_ix86_cmov_sun_syntax=yes
15697 else
15698 echo "configure: failed program was" >&5
15699 cat conftest.s >&5
15700 fi
15701 rm -f conftest.o conftest.s
15702 fi
15703fi
a6ccdbab
EC
15704{ echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
15705echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6; }
63cf211a 15706if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
15707
15708cat >>confdefs.h <<\_ACEOF
f6f5dff2 15709#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 15710_ACEOF
f6f5dff2 15711
b6c03bcd
RS
15712fi
15713
a6ccdbab
EC
15714 { echo "$as_me:$LINENO: checking assembler for ffreep mnemonic" >&5
15715echo $ECHO_N "checking assembler for ffreep mnemonic... $ECHO_C" >&6; }
b6c03bcd
RS
15716if test "${gcc_cv_as_ix86_ffreep+set}" = set; then
15717 echo $ECHO_N "(cached) $ECHO_C" >&6
15718else
15719 gcc_cv_as_ix86_ffreep=no
15720 if test x$gcc_cv_as != x; then
15721 echo 'ffreep %st(1)' > conftest.s
15722 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15724 (eval $ac_try) 2>&5
15725 ac_status=$?
15726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15727 (exit $ac_status); }; }
15728 then
15729 gcc_cv_as_ix86_ffreep=yes
15730 else
15731 echo "configure: failed program was" >&5
15732 cat conftest.s >&5
15733 fi
15734 rm -f conftest.o conftest.s
15735 fi
15736fi
a6ccdbab
EC
15737{ echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_ffreep" >&5
15738echo "${ECHO_T}$gcc_cv_as_ix86_ffreep" >&6; }
b6c03bcd
RS
15739if test $gcc_cv_as_ix86_ffreep = yes; then
15740
15741cat >>confdefs.h <<\_ACEOF
15742#define HAVE_AS_IX86_FFREEP 1
15743_ACEOF
15744
68b92f78
RS
15745fi
15746
a6ccdbab
EC
15747 { echo "$as_me:$LINENO: checking assembler for different section symbol subtraction" >&5
15748echo $ECHO_N "checking assembler for different section symbol subtraction... $ECHO_C" >&6; }
68b92f78
RS
15749if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then
15750 echo $ECHO_N "(cached) $ECHO_C" >&6
15751else
15752 gcc_cv_as_ix86_diff_sect_delta=no
15753 if test x$gcc_cv_as != x; then
15754 echo '.section .rodata
15755.L1:
15756 .long .L2-.L1
15757 .long .L3-.L1
15758 .text
15759.L3: nop
15760.L2: nop' > conftest.s
15761 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15763 (eval $ac_try) 2>&5
15764 ac_status=$?
15765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15766 (exit $ac_status); }; }
15767 then
15768 gcc_cv_as_ix86_diff_sect_delta=yes
15769 else
15770 echo "configure: failed program was" >&5
15771 cat conftest.s >&5
15772 fi
15773 rm -f conftest.o conftest.s
15774 fi
15775fi
a6ccdbab
EC
15776{ echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_diff_sect_delta" >&5
15777echo "${ECHO_T}$gcc_cv_as_ix86_diff_sect_delta" >&6; }
68b92f78
RS
15778if test $gcc_cv_as_ix86_diff_sect_delta = yes; then
15779
15780cat >>confdefs.h <<\_ACEOF
15781#define HAVE_AS_IX86_DIFF_SECT_DELTA 1
15782_ACEOF
15783
ad9c4d9f
NN
15784fi
15785
6f3ca281
ZW
15786 # This one is used unconditionally by i386.[ch]; it is to be defined
15787 # to 1 if the feature is present, 0 otherwise.
a6ccdbab
EC
15788 { echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
15789echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6; }
ba479fd2
NN
15790if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
15791 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15792else
15793 gcc_cv_as_ix86_gotoff_in_data=no
15794 if test $in_tree_gas = yes; then
15795 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15796 then gcc_cv_as_ix86_gotoff_in_data=yes
15797fi
15798 elif test x$gcc_cv_as != x; then
6e3f3080 15799 echo ' .text
f88c65f7
RH
15800.L0:
15801 nop
15802 .data
8ada417f 15803 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
15804 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15806 (eval $ac_try) 2>&5
15807 ac_status=$?
15808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15809 (exit $ac_status); }; }
8ada417f
ZW
15810 then
15811 gcc_cv_as_ix86_gotoff_in_data=yes
15812 else
15813 echo "configure: failed program was" >&5
15814 cat conftest.s >&5
f88c65f7 15815 fi
8ada417f
ZW
15816 rm -f conftest.o conftest.s
15817 fi
15818fi
a6ccdbab
EC
15819{ echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
15820echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6; }
8ada417f 15821
6f3ca281 15822
ba479fd2 15823cat >>confdefs.h <<_ACEOF
6f3ca281 15824#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 15825_ACEOF
f88c65f7 15826
1cb36a98 15827 ;;
ef1ecf87
RH
15828
15829 ia64*-*-*)
a6ccdbab
EC
15830 { echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
15831echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6; }
ba479fd2
NN
15832if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
15833 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 15834else
8ada417f
ZW
15835 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
15836 if test $in_tree_gas = yes; then
15837 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15838 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 15839fi
8ada417f 15840 elif test x$gcc_cv_as != x; then
6e3f3080 15841 echo ' .text
ef1ecf87
RH
15842 addl r15 = @ltoffx(x#), gp
15843 ;;
cfa9ee99 15844 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
15845 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15847 (eval $ac_try) 2>&5
15848 ac_status=$?
15849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15850 (exit $ac_status); }; }
8ada417f 15851 then
cfa9ee99 15852 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
15853 else
15854 echo "configure: failed program was" >&5
15855 cat conftest.s >&5
2c4a9cff 15856 fi
8ada417f
ZW
15857 rm -f conftest.o conftest.s
15858 fi
15859fi
a6ccdbab
EC
15860{ echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
15861echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6; }
63cf211a 15862if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
15863
15864cat >>confdefs.h <<\_ACEOF
cfa9ee99 15865#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 15866_ACEOF
8ada417f 15867
cfa9ee99 15868fi
8ada417f 15869
2c4a9cff 15870 ;;
8ada417f 15871
2c4a9cff 15872 powerpc*-*-*)
8ada417f 15873 case $target in
432218ba
DE
15874 *-*-aix*) conftest_s=' .machine "pwr5"
15875 .csect .text[PR]
6b37db3c 15876 mfcr 3,128';;
8af4d362 15877 *-*-darwin*)
a6ccdbab
EC
15878 { echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
15879echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6; }
8af4d362
PB
15880if test "${gcc_cv_as_machine_directive+set}" = set; then
15881 echo $ECHO_N "(cached) $ECHO_C" >&6
15882else
15883 gcc_cv_as_machine_directive=no
15884 if test x$gcc_cv_as != x; then
15885 echo ' .machine ppc7400' > conftest.s
15886 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15888 (eval $ac_try) 2>&5
15889 ac_status=$?
15890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15891 (exit $ac_status); }; }
15892 then
15893 gcc_cv_as_machine_directive=yes
15894 else
15895 echo "configure: failed program was" >&5
15896 cat conftest.s >&5
15897 fi
15898 rm -f conftest.o conftest.s
15899 fi
15900fi
a6ccdbab
EC
15901{ echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
15902echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6; }
8af4d362
PB
15903
15904 if test x$gcc_cv_as_machine_directive != xyes; then
15905 echo "*** This target requires an assembler supporting \".machine\"" >&2
15906 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
15907 test x$build = x$target && exit 1
15908 fi
15909 conftest_s=' .text
6b37db3c 15910 mfcr r3,128';;
4c67db14 15911 *) conftest_s=' .machine power4
d2ab3e37 15912 .text
6b37db3c 15913 mfcr 3,128';;
8ada417f 15914 esac
8ada417f 15915
a6ccdbab
EC
15916 { echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
15917echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6; }
ba479fd2
NN
15918if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
15919 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 15920else
8ada417f
ZW
15921 gcc_cv_as_powerpc_mfcrf=no
15922 if test $in_tree_gas = yes; then
15923 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15924 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 15925fi
8ada417f 15926 elif test x$gcc_cv_as != x; then
6e3f3080 15927 echo "$conftest_s" > conftest.s
ba479fd2
NN
15928 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15930 (eval $ac_try) 2>&5
15931 ac_status=$?
15932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15933 (exit $ac_status); }; }
8ada417f
ZW
15934 then
15935 gcc_cv_as_powerpc_mfcrf=yes
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
2c4a9cff 15942fi
a6ccdbab
EC
15943{ echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
15944echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6; }
63cf211a 15945if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
15946
15947cat >>confdefs.h <<\_ACEOF
2c4a9cff 15948#define HAVE_AS_MFCRF 1
ba479fd2 15949_ACEOF
ef1ecf87 15950
8ada417f 15951fi
432218ba
DE
15952
15953 case $target in
15954 *-*-aix*) conftest_s=' .machine "pwr5"
15955 .csect .text[PR]
15956 popcntb 3,3';;
15957 *) conftest_s=' .machine power5
15958 .text
15959 popcntb 3,3';;
15960 esac
15961
a6ccdbab
EC
15962 { echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
15963echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6; }
432218ba
DE
15964if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
15965 echo $ECHO_N "(cached) $ECHO_C" >&6
15966else
15967 gcc_cv_as_powerpc_popcntb=no
15968 if test $in_tree_gas = yes; then
15969 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
15970 then gcc_cv_as_powerpc_popcntb=yes
15971fi
15972 elif test x$gcc_cv_as != x; then
15973 echo "$conftest_s" > conftest.s
15974 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15976 (eval $ac_try) 2>&5
15977 ac_status=$?
15978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15979 (exit $ac_status); }; }
15980 then
15981 gcc_cv_as_powerpc_popcntb=yes
15982 else
15983 echo "configure: failed program was" >&5
15984 cat conftest.s >&5
15985 fi
15986 rm -f conftest.o conftest.s
15987 fi
15988fi
a6ccdbab
EC
15989{ echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
15990echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6; }
432218ba
DE
15991if test $gcc_cv_as_powerpc_popcntb = yes; then
15992
15993cat >>confdefs.h <<\_ACEOF
15994#define HAVE_AS_POPCNTB 1
15995_ACEOF
15996
9719f3b7
DE
15997fi
15998
15999 case $target in
16000 *-*-aix*) conftest_s=' .machine "pwr5x"
16001 .csect .text[PR]
16002 frin 1,1';;
1e04bfdc 16003 *) conftest_s=' .machine power5
9719f3b7
DE
16004 .text
16005 frin 1,1';;
16006 esac
16007
a6ccdbab
EC
16008 { echo "$as_me:$LINENO: checking assembler for fp round support" >&5
16009echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6; }
9719f3b7
DE
16010if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then
16011 echo $ECHO_N "(cached) $ECHO_C" >&6
16012else
16013 gcc_cv_as_powerpc_fprnd=no
16014 if test $in_tree_gas = yes; then
16015 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
16016 then gcc_cv_as_powerpc_fprnd=yes
16017fi
16018 elif test x$gcc_cv_as != x; then
16019 echo "$conftest_s" > conftest.s
16020 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
16021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16022 (eval $ac_try) 2>&5
16023 ac_status=$?
16024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16025 (exit $ac_status); }; }
16026 then
16027 gcc_cv_as_powerpc_fprnd=yes
16028 else
16029 echo "configure: failed program was" >&5
16030 cat conftest.s >&5
16031 fi
16032 rm -f conftest.o conftest.s
16033 fi
16034fi
a6ccdbab
EC
16035{ echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5
16036echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6; }
9719f3b7
DE
16037if test $gcc_cv_as_powerpc_fprnd = yes; then
16038
16039cat >>confdefs.h <<\_ACEOF
16040#define HAVE_AS_FPRND 1
16041_ACEOF
16042
44cd321e
PS
16043fi
16044
16045 case $target in
16046 *-*-aix*) conftest_s=' .machine "pwr6"
16047 .csect .text[PR]
16048 mffgpr 1,3';;
16049 *) conftest_s=' .machine power6
16050 .text
16051 mffgpr 1,3';;
16052 esac
16053
a6ccdbab
EC
16054 { echo "$as_me:$LINENO: checking assembler for move fp gpr support" >&5
16055echo $ECHO_N "checking assembler for move fp gpr support... $ECHO_C" >&6; }
44cd321e
PS
16056if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then
16057 echo $ECHO_N "(cached) $ECHO_C" >&6
16058else
16059 gcc_cv_as_powerpc_mfpgpr=no
16060 if test $in_tree_gas = yes; then
16061 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
16062 then gcc_cv_as_powerpc_mfpgpr=yes
16063fi
16064 elif test x$gcc_cv_as != x; then
16065 echo "$conftest_s" > conftest.s
16066 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
16067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16068 (eval $ac_try) 2>&5
16069 ac_status=$?
16070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16071 (exit $ac_status); }; }
16072 then
16073 gcc_cv_as_powerpc_mfpgpr=yes
16074 else
16075 echo "configure: failed program was" >&5
16076 cat conftest.s >&5
16077 fi
16078 rm -f conftest.o conftest.s
16079 fi
16080fi
a6ccdbab
EC
16081{ echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfpgpr" >&5
16082echo "${ECHO_T}$gcc_cv_as_powerpc_mfpgpr" >&6; }
44cd321e
PS
16083if test $gcc_cv_as_powerpc_mfpgpr = yes; then
16084
16085cat >>confdefs.h <<\_ACEOF
16086#define HAVE_AS_MFPGPR 1
16087_ACEOF
16088
432218ba
DE
16089fi
16090
7f970b70
AM
16091 case $target in
16092 *-*-aix*) conftest_s=' .csect .text[PR]
16093LCF..0:
16094 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
16095 *-*-darwin*)
16096 conftest_s=' .text
16097LCF0:
16098 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
16099 *) conftest_s=' .text
16100.LCF0:
16101 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
16102 esac
16103
a6ccdbab
EC
16104 { echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
16105echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6; }
7f970b70
AM
16106if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
16107 echo $ECHO_N "(cached) $ECHO_C" >&6
16108else
16109 gcc_cv_as_powerpc_rel16=no
16110 if test $in_tree_gas = yes; then
16111 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
16112 then gcc_cv_as_powerpc_rel16=yes
16113fi
16114 elif test x$gcc_cv_as != x; then
16115 echo "$conftest_s" > conftest.s
16116 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
16117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16118 (eval $ac_try) 2>&5
16119 ac_status=$?
16120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16121 (exit $ac_status); }; }
16122 then
16123 gcc_cv_as_powerpc_rel16=yes
16124 else
16125 echo "configure: failed program was" >&5
16126 cat conftest.s >&5
16127 fi
16128 rm -f conftest.o conftest.s
16129 fi
16130fi
a6ccdbab
EC
16131{ echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
16132echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6; }
7f970b70
AM
16133if test $gcc_cv_as_powerpc_rel16 = yes; then
16134
16135cat >>confdefs.h <<\_ACEOF
16136#define HAVE_AS_REL16 1
16137_ACEOF
16138
16139fi
8ada417f
ZW
16140 ;;
16141
16142 mips*-*-*)
a6ccdbab
EC
16143 { echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
16144echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6; }
ba479fd2
NN
16145if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
16146 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
16147else
16148 gcc_cv_as_mips_explicit_relocs=no
16149 if test $in_tree_gas = yes; then
16150 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
16151 then gcc_cv_as_mips_explicit_relocs=yes
16152fi
16153 elif test x$gcc_cv_as != x; then
6e3f3080 16154 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
16155 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
16156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16157 (eval $ac_try) 2>&5
16158 ac_status=$?
16159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16160 (exit $ac_status); }; }
8ada417f
ZW
16161 then
16162 gcc_cv_as_mips_explicit_relocs=yes
16163 else
16164 echo "configure: failed program was" >&5
16165 cat conftest.s >&5
ef1ecf87 16166 fi
8ada417f
ZW
16167 rm -f conftest.o conftest.s
16168 fi
16169fi
a6ccdbab
EC
16170{ echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
16171echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6; }
8ada417f
ZW
16172if test $gcc_cv_as_mips_explicit_relocs = yes; then
16173 if test x$target_cpu_default = x
16174 then target_cpu_default=MASK_EXPLICIT_RELOCS
16175 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
16176 fi
4551169f 16177fi
a6ccdbab
EC
16178 { echo "$as_me:$LINENO: checking assembler for -mno-shared support" >&5
16179echo $ECHO_N "checking assembler for -mno-shared support... $ECHO_C" >&6; }
4551169f
RS
16180if test "${gcc_cv_as_mips_no_shared+set}" = set; then
16181 echo $ECHO_N "(cached) $ECHO_C" >&6
16182else
16183 gcc_cv_as_mips_no_shared=no
16184 if test $in_tree_gas = yes; then
16185 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
16186 then gcc_cv_as_mips_no_shared=yes
16187fi
16188 elif test x$gcc_cv_as != x; then
16189 echo 'nop' > conftest.s
16190 if { ac_try='$gcc_cv_as -mno-shared -o conftest.o conftest.s >&5'
16191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16192 (eval $ac_try) 2>&5
16193 ac_status=$?
16194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16195 (exit $ac_status); }; }
16196 then
16197 gcc_cv_as_mips_no_shared=yes
16198 else
16199 echo "configure: failed program was" >&5
16200 cat conftest.s >&5
16201 fi
16202 rm -f conftest.o conftest.s
16203 fi
16204fi
a6ccdbab
EC
16205{ echo "$as_me:$LINENO: result: $gcc_cv_as_mips_no_shared" >&5
16206echo "${ECHO_T}$gcc_cv_as_mips_no_shared" >&6; }
4551169f
RS
16207if test $gcc_cv_as_mips_no_shared = yes; then
16208
16209cat >>confdefs.h <<\_ACEOF
16210#define HAVE_AS_NO_SHARED 1
16211_ACEOF
16212
8ada417f 16213fi
dbad5e72
SE
16214 ;;
16215esac
8ada417f 16216
dbad5e72
SE
16217# Mips and HP-UX need the GNU assembler.
16218# Linux on IA64 might be able to use the Intel assembler.
16219
16220case "$target" in
16221 mips*-*-* | *-*-hpux* )
82563d35
RS
16222 if test x$gas_flag = xyes \
16223 || test x"$host" != x"$build" \
16224 || test ! -x "$gcc_cv_as" \
16225 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
16226 :
16227 else
16228 echo "*** This configuration requires the GNU assembler" >&2
16229 exit 1
16230 fi
ef1ecf87 16231 ;;
1cb36a98 16232esac
dbad5e72 16233
9d147085
RH
16234# ??? Not all targets support dwarf2 debug_line, even within a version
16235# of gas. Moreover, we need to emit a valid instruction to trigger any
16236# info to the output file. So, as supported targets are added to gas 2.11,
16237# add some instruction here to (also) show we expect this might work.
16238# ??? Once 2.11 is released, probably need to add first known working
16239# version to the per-target configury.
16240case "$target" in
80486e06 16241 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 16242 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
bdcee471 16243 | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-*)
9d147085
RH
16244 insn="nop"
16245 ;;
57116d8d 16246 ia64*-*-* | s390*-*-*)
9d147085
RH
16247 insn="nop 0"
16248 ;;
2853bc5a
HPN
16249 mmix-*-*)
16250 insn="swym 0"
16251 ;;
8ada417f
ZW
16252esac
16253if test x"$insn" != x; then
16254 conftest_s="\
16255 .file 1 \"conftest.s\"
16256 .loc 1 3 0
16257 $insn"
a6ccdbab
EC
16258 { echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
16259echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6; }
ba479fd2
NN
16260if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
16261 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
16262else
16263 gcc_cv_as_dwarf2_debug_line=no
16264 if test $in_tree_gas = yes; then
16265 if test $in_tree_gas_is_elf = yes \
16266 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
16267 then gcc_cv_as_dwarf2_debug_line=yes
16268fi
16269 elif test x$gcc_cv_as != x; then
6e3f3080 16270 echo "$conftest_s" > conftest.s
ba479fd2
NN
16271 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
16272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16273 (eval $ac_try) 2>&5
16274 ac_status=$?
16275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16276 (exit $ac_status); }; }
8ada417f 16277 then
080a5bb0
EB
16278 if test x$gcc_cv_objdump != x \
16279 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
16280 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
16281 gcc_cv_as_dwarf2_debug_line=yes
16282 fi
16283 else
16284 echo "configure: failed program was" >&5
16285 cat conftest.s >&5
16286 fi
16287 rm -f conftest.o conftest.s
16288 fi
16289fi
a6ccdbab
EC
16290{ echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
16291echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6; }
ad9c4d9f 16292
ad9c4d9f 16293
8ada417f
ZW
16294# The .debug_line file table must be in the exact order that
16295# we specified the files, since these indices are also used
16296# by DW_AT_decl_file. Approximate this test by testing if
16297# the assembler bitches if the same index is assigned twice.
a6ccdbab
EC
16298 { echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
16299echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6; }
ba479fd2
NN
16300if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
16301 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
16302else
16303 gcc_cv_as_dwarf2_file_buggy=no
16304 if test x$gcc_cv_as != x; then
6e3f3080 16305 echo ' .file 1 "foo.s"
8ada417f 16306 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
16307 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
16308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16309 (eval $ac_try) 2>&5
16310 ac_status=$?
16311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16312 (exit $ac_status); }; }
8ada417f
ZW
16313 then
16314 gcc_cv_as_dwarf2_file_buggy=yes
16315 else
16316 echo "configure: failed program was" >&5
16317 cat conftest.s >&5
16318 fi
16319 rm -f conftest.o conftest.s
16320 fi
ad9c4d9f 16321fi
a6ccdbab
EC
16322{ echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
16323echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6; }
8ada417f
ZW
16324
16325
16326 if test $gcc_cv_as_dwarf2_debug_line = yes \
16327 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
16328
16329cat >>confdefs.h <<\_ACEOF
9d147085 16330#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 16331_ACEOF
9d147085 16332
8ada417f 16333 fi
ad9c4d9f 16334
a6ccdbab
EC
16335 { echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
16336echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6; }
ba479fd2
NN
16337if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
16338 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
16339else
16340 gcc_cv_as_gdwarf2_flag=no
16341 if test $in_tree_gas = yes; then
16342 if test $in_tree_gas_is_elf = yes \
16343 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
16344 then gcc_cv_as_gdwarf2_flag=yes
16345fi
16346 elif test x$gcc_cv_as != x; then
6e3f3080 16347 echo "$insn" > conftest.s
ba479fd2
NN
16348 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
16349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16350 (eval $ac_try) 2>&5
16351 ac_status=$?
16352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16353 (exit $ac_status); }; }
8ada417f
ZW
16354 then
16355 gcc_cv_as_gdwarf2_flag=yes
16356 else
16357 echo "configure: failed program was" >&5
16358 cat conftest.s >&5
16359 fi
16360 rm -f conftest.o conftest.s
16361 fi
ad9c4d9f 16362fi
a6ccdbab
EC
16363{ echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
16364echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6; }
63cf211a 16365if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
16366
16367cat >>confdefs.h <<\_ACEOF
5f0e9ea2 16368#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 16369_ACEOF
5f0e9ea2
GK
16370
16371fi
ad9c4d9f 16372
a6ccdbab
EC
16373 { echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
16374echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6; }
ba479fd2
NN
16375if test "${gcc_cv_as_gstabs_flag+set}" = set; then
16376 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
16377else
16378 gcc_cv_as_gstabs_flag=no
16379 if test $in_tree_gas = yes; then
16380 if test $in_tree_gas_is_elf = yes \
16381 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
16382 then gcc_cv_as_gstabs_flag=yes
16383fi
16384 elif test x$gcc_cv_as != x; then
6e3f3080 16385 echo "$insn" > conftest.s
ba479fd2
NN
16386 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
16387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16388 (eval $ac_try) 2>&5
16389 ac_status=$?
16390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16391 (exit $ac_status); }; }
8ada417f
ZW
16392 then
16393 # The native Solaris 9/Intel assembler doesn't understand --gstabs
16394 # and warns about it, but still exits successfully. So check for
16395 # this.
ba479fd2
NN
16396 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
16397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16398 (eval $ac_try) 2>&5
16399 ac_status=$?
16400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16401 (exit $ac_status); }; }
8ada417f
ZW
16402 then :
16403 else gcc_cv_as_gstabs_flag=yes
16404 fi
16405 else
16406 echo "configure: failed program was" >&5
16407 cat conftest.s >&5
16408 fi
16409 rm -f conftest.o conftest.s
16410 fi
ad9c4d9f 16411fi
a6ccdbab
EC
16412{ echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
16413echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6; }
63cf211a 16414if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
16415
16416cat >>confdefs.h <<\_ACEOF
5f0e9ea2 16417#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 16418_ACEOF
5f0e9ea2
GK
16419
16420fi
8ada417f 16421fi
5f0e9ea2 16422
a6ccdbab
EC
16423{ echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
16424echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6; }
96d0f4dc 16425gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 16426if test $in_tree_ld = yes ; then
5408ac6c
HPN
16427 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 \
16428 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
16429 gcc_cv_ld_ro_rw_mix=read-write
16430 fi
16431elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
16432 echo '.section myfoosect, "a"' > conftest1.s
16433 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 16434 echo '.byte 1' >> conftest2.s
90e145da 16435 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 16436 echo '.byte 0' >> conftest3.s
6cd656d0
KC
16437 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
16438 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
16439 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 16440 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 16441 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 16442 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 16443 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
16444 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
16445 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
16446 gcc_cv_ld_ro_rw_mix=read-only
16447 else
16448 gcc_cv_ld_ro_rw_mix=read-write
16449 fi
16450 fi
16451 fi
16452 rm -f conftest.* conftest[123].*
16453fi
16454if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
16455
16456cat >>confdefs.h <<\_ACEOF
96d0f4dc 16457#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 16458_ACEOF
96d0f4dc
JJ
16459
16460fi
a6ccdbab
EC
16461{ echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
16462echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6; }
96d0f4dc 16463
a6ccdbab
EC
16464{ echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
16465echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6; }
275b60d6 16466gcc_cv_ld_eh_frame_hdr=no
34a86c2b 16467if test $in_tree_ld = yes ; then
5408ac6c
HPN
16468 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 \
16469 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
16470 gcc_cv_ld_eh_frame_hdr=yes
16471 fi
16472elif test x$gcc_cv_ld != x; then
16473 # Check if linker supports --eh-frame-hdr option
16474 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
16475 gcc_cv_ld_eh_frame_hdr=yes
16476 fi
16477fi
232b67d9 16478
275b60d6 16479if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
16480
16481cat >>confdefs.h <<\_ACEOF
275b60d6 16482#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 16483_ACEOF
275b60d6
JJ
16484
16485fi
a6ccdbab
EC
16486{ echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
16487echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6; }
275b60d6 16488
a6ccdbab
EC
16489{ echo "$as_me:$LINENO: checking linker position independent executable support" >&5
16490echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6; }
24a4dd31
JJ
16491gcc_cv_ld_pie=no
16492if test $in_tree_ld = yes ; then
5408ac6c
HPN
16493 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 \
16494 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
16495 gcc_cv_ld_pie=yes
16496 fi
16497elif test x$gcc_cv_ld != x; then
16498 # Check if linker supports -pie option
16499 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
16500 gcc_cv_ld_pie=yes
16501 fi
16502fi
16503if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
16504
16505cat >>confdefs.h <<\_ACEOF
24a4dd31 16506#define HAVE_LD_PIE 1
ba479fd2 16507_ACEOF
24a4dd31
JJ
16508
16509fi
a6ccdbab
EC
16510{ echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
16511echo "${ECHO_T}$gcc_cv_ld_pie" >&6; }
24a4dd31 16512
a6ccdbab
EC
16513{ echo "$as_me:$LINENO: checking linker EH-compatible garbage collection of sections" >&5
16514echo $ECHO_N "checking linker EH-compatible garbage collection of sections... $ECHO_C" >&6; }
22ba88ef
EB
16515gcc_cv_ld_eh_gc_sections=no
16516if test $in_tree_ld = yes ; then
16517 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 \
16518 && test $in_tree_ld_is_elf = yes; then
16519 gcc_cv_ld_eh_gc_sections=yes
16520 fi
16521elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
16522 cat > conftest.s <<EOF
16523 .section .text
16524.globl _start
16525 .type _start, @function
16526_start:
16527 .long foo
16528 .size _start, .-_start
16529 .section .text.foo,"ax",@progbits
16530 .type foo, @function
16531foo:
16532 .long 0
16533 .size foo, .-foo
16534 .section .gcc_except_table.foo,"a",@progbits
16535.L0:
16536 .long 0
16537 .section .eh_frame,"a",@progbits
16538 .long .L0
16539EOF
16540 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
16541 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
16542 | grep "gc-sections option ignored" > /dev/null; then
16543 gcc_cv_ld_eh_gc_sections=no
16544 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
16545 gcc_cv_ld_eh_gc_sections=yes
e9d207d9
EB
16546 # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections.
16547 if test x$gcc_cv_as_comdat_group != xyes; then
16548 gcc_cv_ld_eh_gc_sections=no
16549 cat > conftest.s <<EOF
16550 .section .text
16551.globl _start
16552 .type _start, @function
16553_start:
16554 .long foo
16555 .size _start, .-_start
16556 .section .gnu.linkonce.t.foo,"ax",@progbits
16557 .type foo, @function
16558foo:
16559 .long 0
16560 .size foo, .-foo
16561 .section .gcc_except_table.foo,"a",@progbits
16562.L0:
16563 .long 0
16564 .section .eh_frame,"a",@progbits
16565 .long .L0
16566EOF
16567 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
16568 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
16569 | grep "gc-sections option ignored" > /dev/null; then
16570 gcc_cv_ld_eh_gc_sections=no
16571 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
16572 gcc_cv_ld_eh_gc_sections=yes
16573 fi
16574 fi
16575 fi
22ba88ef
EB
16576 fi
16577 fi
16578 rm -f conftest.s conftest.o conftest
16579fi
e9d207d9
EB
16580case "$target" in
16581 hppa*-*-linux*)
16582 # ??? This apparently exposes a binutils bug with PC-relative relocations.
16583 gcc_cv_ld_eh_gc_sections=no
16584 ;;
16585esac
22ba88ef
EB
16586if test x$gcc_cv_ld_eh_gc_sections = xyes; then
16587
16588cat >>confdefs.h <<\_ACEOF
16589#define HAVE_LD_EH_GC_SECTIONS 1
16590_ACEOF
16591
16592fi
a6ccdbab
EC
16593{ echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_gc_sections" >&5
16594echo "${ECHO_T}$gcc_cv_ld_eh_gc_sections" >&6; }
22ba88ef 16595
8bb915b6
NN
16596# --------
16597# UNSORTED
16598# --------
16599
a6ccdbab
EC
16600{ echo "$as_me:$LINENO: checking linker --as-needed support" >&5
16601echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6; }
82e923f6
RS
16602if test "${gcc_cv_ld_as_needed+set}" = set; then
16603 echo $ECHO_N "(cached) $ECHO_C" >&6
16604else
16605 gcc_cv_ld_as_needed=no
765f1bf9
AM
16606if test $in_tree_ld = yes ; then
16607 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 \
16608 && test $in_tree_ld_is_elf = yes; then
16609 gcc_cv_ld_as_needed=yes
16610 fi
16611elif test x$gcc_cv_ld != x; then
16612 # Check if linker supports --as-needed and --no-as-needed options
16613 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
16614 gcc_cv_ld_as_needed=yes
16615 fi
16616fi
82e923f6
RS
16617
16618fi
a6ccdbab
EC
16619{ echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
16620echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6; }
765f1bf9
AM
16621if test x"$gcc_cv_ld_as_needed" = xyes; then
16622
16623cat >>confdefs.h <<\_ACEOF
16624#define HAVE_LD_AS_NEEDED 1
16625_ACEOF
16626
16627fi
765f1bf9 16628
d82bf747
AM
16629case "$target:$tm_file" in
16630 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
a6ccdbab
EC
16631 { echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
16632echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6; }
85b776df
AM
16633if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
16634 echo $ECHO_N "(cached) $ECHO_C" >&6
16635else
16636 gcc_cv_ld_no_dot_syms=no
16637 if test $in_tree_ld = yes ; then
16638 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
16639 gcc_cv_ld_no_dot_syms=yes
16640 fi
16641 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
16642 cat > conftest1.s <<EOF
16643 .text
16644 bl .foo
16645EOF
16646 cat > conftest2.s <<EOF
16647 .section ".opd","aw"
16648 .align 3
16649 .globl foo
16650 .type foo,@function
16651foo:
16652 .quad .LEfoo,.TOC.@tocbase,0
16653 .text
16654.LEfoo:
16655 blr
16656 .size foo,.-.LEfoo
16657EOF
16658 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
16659 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
16660 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
16661 gcc_cv_ld_no_dot_syms=yes
16662 fi
16663 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
16664 fi
16665
16666fi
a6ccdbab
EC
16667{ echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
16668echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6; }
85b776df
AM
16669 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
16670
16671cat >>confdefs.h <<\_ACEOF
16672#define HAVE_LD_NO_DOT_SYMS 1
16673_ACEOF
16674
16675 fi
16676 ;;
16677esac
16678
a6ccdbab
EC
16679{ echo "$as_me:$LINENO: checking linker --sysroot support" >&5
16680echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6; }
380e5ca4
MM
16681if test "${gcc_cv_ld_sysroot+set}" = set; then
16682 echo $ECHO_N "(cached) $ECHO_C" >&6
16683else
16684 gcc_cv_ld_sysroot=no
16685 if test $in_tree_ld = yes ; then
16686 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
7032df40 16687 gcc_cv_ld_sysroot=yes
380e5ca4
MM
16688 fi
16689 elif test x$gcc_cv_ld != x; then
16690 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
16691 gcc_cv_ld_sysroot=yes
16692 fi
16693 fi
16694fi
a6ccdbab
EC
16695{ echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
16696echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6; }
380e5ca4
MM
16697if test x"$gcc_cv_ld_sysroot" = xyes; then
16698
16699cat >>confdefs.h <<\_ACEOF
16700#define HAVE_LD_SYSROOT 1
16701_ACEOF
16702
16703fi
16704
9fb28a67 16705if test x$with_sysroot = x && test x$host = x$target \
c794c06f
CD
16706 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
16707 && test "$prefix" != "NONE"; then
ba479fd2
NN
16708
16709cat >>confdefs.h <<_ACEOF
793e9558 16710#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 16711_ACEOF
793e9558
PB
16712
16713fi
16714
77008252 16715# Test for stack protector support in target C library.
a6ccdbab
EC
16716{ echo "$as_me:$LINENO: checking __stack_chk_fail in target C library" >&5
16717echo $ECHO_N "checking __stack_chk_fail in target C library... $ECHO_C" >&6; }
77008252
JJ
16718if test "${gcc_cv_libc_provides_ssp+set}" = set; then
16719 echo $ECHO_N "(cached) $ECHO_C" >&6
16720else
16721 gcc_cv_libc_provides_ssp=no
a6ccdbab
EC
16722 case "$target" in
16723 *-*-linux*)
77008252
JJ
16724 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
16725 if test "x$with_sysroot" = x; then
16726 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
16727 elif test "x$with_sysroot" = xyes; then
16728 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
16729 else
16730 glibc_header_dir="${with_sysroot}/usr/include"
16731 fi
16732 else
16733 glibc_header_dir=/usr/include
16734 fi
16735 # glibc 2.4 and later provides __stack_chk_fail and
16736 # either __stack_chk_guard, or TLS access to stack guard canary.
16737 if test -f $glibc_header_dir/features.h \
16738 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
16739 $glibc_header_dir/features.h > /dev/null; then
16740 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
16741 $glibc_header_dir/features.h > /dev/null; then
16742 gcc_cv_libc_provides_ssp=yes
16743 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
16744 $glibc_header_dir/features.h > /dev/null \
16745 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
16746 $glibc_header_dir/features.h > /dev/null; then
16747 gcc_cv_libc_provides_ssp=yes
16748 fi
a6ccdbab
EC
16749 fi
16750 ;;
16751 *-*-darwin*)
16752 { echo "$as_me:$LINENO: checking for __stack_chk_fail" >&5
16753echo $ECHO_N "checking for __stack_chk_fail... $ECHO_C" >&6; }
16754if test "${ac_cv_func___stack_chk_fail+set}" = set; then
16755 echo $ECHO_N "(cached) $ECHO_C" >&6
16756else
16757 cat >conftest.$ac_ext <<_ACEOF
16758/* confdefs.h. */
16759_ACEOF
16760cat confdefs.h >>conftest.$ac_ext
16761cat >>conftest.$ac_ext <<_ACEOF
16762/* end confdefs.h. */
16763/* Define __stack_chk_fail to an innocuous variant, in case <limits.h> declares __stack_chk_fail.
16764 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16765#define __stack_chk_fail innocuous___stack_chk_fail
16766
16767/* System header to define __stub macros and hopefully few prototypes,
16768 which can conflict with char __stack_chk_fail (); below.
16769 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16770 <limits.h> exists even on freestanding compilers. */
16771
16772#ifdef __STDC__
16773# include <limits.h>
16774#else
16775# include <assert.h>
16776#endif
16777
16778#undef __stack_chk_fail
16779
16780/* Override any GCC internal prototype to avoid an error.
16781 Use char because int might match the return type of a GCC
16782 builtin and then its argument prototype would still apply. */
16783#ifdef __cplusplus
16784extern "C"
16785#endif
16786char __stack_chk_fail ();
16787/* The GNU C library defines this for functions which it implements
16788 to always fail with ENOSYS. Some functions are actually named
16789 something starting with __ and the normal name is an alias. */
16790#if defined __stub___stack_chk_fail || defined __stub_____stack_chk_fail
16791choke me
16792#endif
16793
16794int
16795main ()
16796{
16797return __stack_chk_fail ();
16798 ;
16799 return 0;
16800}
16801_ACEOF
16802rm -f conftest.$ac_objext conftest$ac_exeext
16803if { (ac_try="$ac_link"
16804case "(($ac_try" in
16805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16806 *) ac_try_echo=$ac_try;;
16807esac
16808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16809 (eval "$ac_link") 2>conftest.er1
16810 ac_status=$?
16811 grep -v '^ *+' conftest.er1 >conftest.err
16812 rm -f conftest.er1
16813 cat conftest.err >&5
16814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16815 (exit $ac_status); } && {
16816 test -z "$ac_c_werror_flag" ||
16817 test ! -s conftest.err
16818 } && test -s conftest$ac_exeext &&
16819 $as_test_x conftest$ac_exeext; then
16820 ac_cv_func___stack_chk_fail=yes
16821else
16822 echo "$as_me: failed program was:" >&5
16823sed 's/^/| /' conftest.$ac_ext >&5
16824
16825 ac_cv_func___stack_chk_fail=no
16826fi
16827
16828rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16829 conftest$ac_exeext conftest.$ac_ext
16830fi
16831{ echo "$as_me:$LINENO: result: $ac_cv_func___stack_chk_fail" >&5
16832echo "${ECHO_T}$ac_cv_func___stack_chk_fail" >&6; }
16833if test $ac_cv_func___stack_chk_fail = yes; then
16834 gcc_cv_libc_provides_ssp=yes
16835else
16836 echo "no __stack_chk_fail on this target"
77008252 16837fi
a6ccdbab
EC
16838
16839 ;;
77008252 16840 *) gcc_cv_libc_provides_ssp=no ;;
a6ccdbab
EC
16841 esac
16842fi
16843{ echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
16844echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6; }
16845
77008252
JJ
16846if test x$gcc_cv_libc_provides_ssp = xyes; then
16847
16848cat >>confdefs.h <<\_ACEOF
16849#define TARGET_LIBC_PROVIDES_SSP 1
16850_ACEOF
16851
16852fi
16853
ed965309
JJ
16854# Check if TFmode long double should be used by default or not.
16855# Some glibc targets used DFmode long double, but with glibc 2.4
16856# and later they can use TFmode.
16857case "$target" in
16858 powerpc*-*-*gnu* | \
16859 sparc*-*-linux* | \
16860 s390*-*-linux* | \
16861 alpha*-*-linux*)
16862
a6ccdbab 16863# Check whether --with-long-double-128 was given.
ed965309 16864if test "${with_long_double_128+set}" = set; then
a6ccdbab 16865 withval=$with_long_double_128; gcc_cv_target_ldbl128="$with_long_double_128"
ed965309
JJ
16866else
16867 gcc_cv_target_ldbl128=no
16868 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
16869 if test "x$with_sysroot" = x; then
16870 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
16871 elif test "x$with_sysroot" = xyes; then
16872 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
16873 else
16874 glibc_header_dir="${with_sysroot}/usr/include"
16875 fi
16876 else
16877 glibc_header_dir=/usr/include
16878 fi
65280f6c 16879 grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
ed965309
JJ
16880 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
16881 && gcc_cv_target_ldbl128=yes
65280f6c 16882
a6ccdbab
EC
16883fi
16884
ed965309
JJ
16885 ;;
16886esac
16887if test x$gcc_cv_target_ldbl128 = xyes; then
16888
16889cat >>confdefs.h <<\_ACEOF
16890#define TARGET_DEFAULT_LONG_DOUBLE_128 1
16891_ACEOF
16892
16893fi
16894
81bf3d9e 16895# Find out what GC implementation we want, or may, use.
ba479fd2 16896
a6ccdbab 16897# Check whether --with-gc was given.
81bf3d9e 16898if test "${with_gc+set}" = set; then
a6ccdbab 16899 withval=$with_gc; case "$withval" in
08cee789 16900 page)
81bf3d9e 16901 GGC=ggc-$withval
08cee789
DJ
16902 ;;
16903 zone)
16904 GGC=ggc-$withval
16905
16906cat >>confdefs.h <<\_ACEOF
16907#define GGC_ZONE 1
16908_ACEOF
16909
81bf3d9e
RH
16910 ;;
16911 *)
ba479fd2
NN
16912 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
16913echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
16914 { (exit 1); exit 1; }; }
81bf3d9e
RH
16915 ;;
16916esac
16917else
005537df 16918 GGC=ggc-page
a6ccdbab
EC
16919fi
16920
81bf3d9e
RH
16921
16922echo "Using $GGC for garbage collection."
16923
3c809ba4 16924# Use the system's zlib library.
b8dad04b
ZW
16925zlibdir=-L../zlib
16926zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 16927
a6ccdbab 16928# Check whether --with-system-zlib was given.
3c809ba4 16929if test "${with_system_zlib+set}" = set; then
a6ccdbab 16930 withval=$with_system_zlib; zlibdir=
3c809ba4
AG
16931zlibinc=
16932
a6ccdbab
EC
16933fi
16934
3c809ba4
AG
16935
16936
dc6746e7 16937
b8ec3cc8 16938
a6ccdbab
EC
16939{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
16940echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; }
16941 # Check whether --enable-maintainer-mode was given.
dc6746e7 16942if test "${enable_maintainer_mode+set}" = set; then
a6ccdbab 16943 enableval=$enable_maintainer_mode; maintainer_mode=$enableval
dc6746e7
PT
16944else
16945 maintainer_mode=no
a6ccdbab 16946fi
63cf211a 16947
a6ccdbab
EC
16948
16949{ echo "$as_me:$LINENO: result: $maintainer_mode" >&5
16950echo "${ECHO_T}$maintainer_mode" >&6; }
dc6746e7
PT
16951
16952if test "$maintainer_mode" = "yes"; then
16953 MAINT=''
16954else
16955 MAINT='#'
16956fi
16957
8bb915b6
NN
16958# --------------
16959# Language hooks
16960# --------------
16961
861bb6c1
JL
16962# Make empty files to contain the specs and options for each language.
16963# Then add #include lines to for a compiler that has specs and/or options.
16964
cc11cc9b 16965subdirs=
d7b42618 16966lang_opt_files=
861bb6c1 16967lang_specs_files=
3103b7db 16968lang_tree_files=
861bb6c1
JL
16969# These (without "all_") are set in each config-lang.in.
16970# `language' must be a single word so is spelled singularly.
16971all_languages=
16972all_boot_languages=
16973all_compilers=
16974all_stagestuff=
fa958513 16975all_outputs='Makefile gccbug libada-mk'
861bb6c1 16976# List of language makefile fragments.
2ed26f6b
ZW
16977all_lang_makefrags=
16978# List of language subdirectory makefiles. Deprecated.
861bb6c1 16979all_lang_makefiles=
e2500fed 16980# Files for gengtype
ef69da62 16981all_gtfiles="$target_gtfiles"
8ac9d31f
TJ
16982# Files for gengtype with language
16983all_gtfiles_files_langs=
16984all_gtfiles_files_files=
861bb6c1 16985
cc11cc9b
PB
16986# These are the languages that are set in --enable-languages,
16987# and are available in the GCC tree.
16988all_selected_languages=
16989
861bb6c1
JL
16990# Add the language fragments.
16991# Languages are added via two mechanisms. Some information must be
16992# recorded in makefile variables, these are defined in config-lang.in.
16993# We accumulate them and plug them into the main Makefile.
16994# The other mechanism is a set of hooks for each of the main targets
16995# like `clean', `install', etc.
16996
861bb6c1 16997language_hooks="Make-hooks"
861bb6c1 16998
cc11cc9b 16999for lang in ${srcdir}/*/config-lang.in
861bb6c1 17000do
1546bb64
PB
17001 test "$lang" = "${srcdir}/*/config-lang.in" && continue
17002
cc11cc9b
PB
17003 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
17004 if test "x$lang_alias" = x
17005 then
17006 echo "$lang doesn't set \$language." 1>&2
17007 exit 1
17008 fi
17009 subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
17010 subdirs="$subdirs $subdir"
17011 case ",$enable_languages," in
17012 *,$lang_alias,*)
17013 all_selected_languages="$all_selected_languages $lang_alias"
17014 if test -f $srcdir/$subdir/lang-specs.h; then
17015 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
17016 fi
17017 ;;
17018 esac
17019
cc11cc9b
PB
17020 language=
17021 boot_language=
17022 compilers=
17023 stagestuff=
17024 outputs=
17025 gtfiles=
1546bb64 17026 subdir_requires=
cc11cc9b
PB
17027 . ${srcdir}/$subdir/config-lang.in
17028 if test "x$language" = x
17029 then
17030 echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2
17031 exit 1
17032 fi
1546bb64
PB
17033
17034 ok=:
17035 case ",$enable_languages," in
17036 *,$lang_alias,*) ;;
17037 *)
17038 for i in $subdir_requires; do
b6348cb3 17039 test -f "${srcdir}/$i/config-lang.in" && continue
1546bb64
PB
17040 ok=false
17041 break
17042 done
17043 ;;
17044 esac
17045 $ok || continue
17046
cc11cc9b 17047 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in"
1546bb64
PB
17048 if test -f $srcdir/$subdir/lang.opt; then
17049 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
17050 fi
17051 if test -f $srcdir/$subdir/$subdir-tree.def; then
17052 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
17053 fi
cc11cc9b
PB
17054 if test -f ${srcdir}/$subdir/Makefile.in
17055 then all_lang_makefiles="$subdir/Makefile"
17056 fi
17057 all_languages="$all_languages $language"
17058 if test "x$boot_language" = xyes
17059 then
17060 all_boot_languages="$all_boot_languages $language"
17061 fi
17062 all_compilers="$all_compilers $compilers"
17063 all_stagestuff="$all_stagestuff $stagestuff"
17064 all_outputs="$all_outputs $outputs"
17065 all_gtfiles="$all_gtfiles $gtfiles"
1546bb64
PB
17066 for f in $gtfiles
17067 do
17068 all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} "
17069 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
17070 done
861bb6c1
JL
17071done
17072
8ac9d31f
TJ
17073# Pick up gtfiles for c
17074gtfiles=
cc11cc9b 17075subdir="c"
8ac9d31f
TJ
17076. ${srcdir}/c-config-lang.in
17077all_gtfiles="$all_gtfiles $gtfiles"
c406e779 17078for f in $gtfiles
8ac9d31f 17079do
cc11cc9b 17080 all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} "
8ac9d31f 17081 all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
8ac9d31f
TJ
17082done
17083
cbc59f01 17084check_languages=
cc11cc9b 17085for language in $all_selected_languages
cbc59f01 17086do
cc11cc9b 17087 check_languages="$check_languages check-$language"
cbc59f01
DD
17088done
17089
62b81e45 17090# We link each language in with a set of hooks, reached indirectly via
cc11cc9b 17091# lang.${target}. Only do so for selected languages.
861bb6c1
JL
17092
17093rm -f Make-hooks
17094touch Make-hooks
bd97af06 17095target_list="all.cross start.encap rest.encap tags \
b5422ad7 17096 install-common install-man install-info dvi pdf html \
a541f69d 17097 uninstall info man srcextra srcman srcinfo \
a03ad584 17098 mostlyclean clean distclean maintainer-clean \
8f231b5d 17099 stage1 stage2 stage3 stage4 stageprofile stagefeedback"
cc11cc9b 17100
861bb6c1
JL
17101for t in $target_list
17102do
17103 x=
cc11cc9b 17104 for lang in $all_selected_languages
861bb6c1 17105 do
cc11cc9b 17106 x="$x $lang.$t"
861bb6c1
JL
17107 done
17108 echo "lang.$t: $x" >> Make-hooks
17109done
17110
8bb915b6
NN
17111# --------
17112# UNSORTED
17113# --------
17114
cc06d68c 17115# Create .gdbinit.
861bb6c1 17116
cc06d68c
GP
17117echo "dir ." > .gdbinit
17118echo "dir ${srcdir}" >> .gdbinit
17119if test x$gdb_needs_out_file_path = xyes
17120then
17121 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
17122fi
17123if test "x$subdirs" != x; then
17124 for s in $subdirs
17125 do
17126 echo "dir ${srcdir}/$s" >> .gdbinit
17127 done
861bb6c1 17128fi
cc06d68c 17129echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 17130
8f8d3278
NC
17131# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
17132# absolute path for gcc_tooldir based on inserting the number of up-directory
17133# movements required to get from $(exec_prefix) to $(prefix) into the basic
17134# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
17135# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
17136# make and thus we'd get different behavior depending on where we built the
17137# sources.
5949a9fc 17138if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
caa55b1e 17139 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
d062c304 17140else
8f8d3278
NC
17141# An explanation of the sed strings:
17142# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
17143# -e 's|/$||' match a trailing forward slash and eliminates it
17144# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
ff7cc307 17145# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
8f8d3278
NC
17146#
17147# (*) Note this pattern overwrites the first character of the string
17148# with a forward slash if one is not already present. This is not a
17149# problem because the exact names of the sub-directories concerned is
17150# unimportant, just the number of them matters.
17151#
17152# The practical upshot of these patterns is like this:
17153#
17154# prefix exec_prefix result
17155# ------ ----------- ------
17156# /foo /foo/bar ../
17157# /foo/ /foo/bar ../
17158# /foo /foo/bar/ ../
17159# /foo/ /foo/bar/ ../
17160# /foo /foo/bar/ugg ../../
17161#
4c112cda 17162 dollar='$$'
caa55b1e 17163 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
d062c304
JL
17164fi
17165
17166
2ce3c6c6 17167
2bbea3a6
RH
17168# Find a directory in which to install a shared libgcc.
17169
a6ccdbab 17170# Check whether --enable-version-specific-runtime-libs was given.
2bbea3a6 17171if test "${enable_version_specific_runtime_libs+set}" = set; then
a6ccdbab
EC
17172 enableval=$enable_version_specific_runtime_libs;
17173fi
ba479fd2 17174
2bbea3a6
RH
17175
17176
a6ccdbab 17177# Check whether --with-slibdir was given.
5b15f277 17178if test "${with_slibdir+set}" = set; then
a6ccdbab 17179 withval=$with_slibdir; slibdir="$with_slibdir"
5b15f277
RH
17180else
17181 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 17182 slibdir='$(libsubdir)'
5b15f277 17183elif test "$host" != "$target"; then
2bbea3a6
RH
17184 slibdir='$(build_tooldir)/lib'
17185else
5b15f277 17186 slibdir='$(libdir)'
2bbea3a6 17187fi
a6ccdbab
EC
17188fi
17189
2bbea3a6
RH
17190
17191
1e6347d8 17192objdir=`${PWDCMD-pwd}`
7e717196
JL
17193
17194
22482f74 17195
a6ccdbab 17196# Check whether --with-datarootdir was given.
22482f74 17197if test "${with_datarootdir+set}" = set; then
a6ccdbab 17198 withval=$with_datarootdir; datarootdir="\${prefix}/$with_datarootdir"
22482f74
MS
17199else
17200 datarootdir='$(prefix)/share'
a6ccdbab 17201fi
22482f74
MS
17202
17203
17204
a6ccdbab
EC
17205
17206# Check whether --with-docdir was given.
22482f74 17207if test "${with_docdir+set}" = set; then
a6ccdbab 17208 withval=$with_docdir; docdir="\${prefix}/$with_docdir"
22482f74
MS
17209else
17210 docdir='$(datarootdir)'
a6ccdbab
EC
17211fi
17212
22482f74
MS
17213
17214
b8ec3cc8 17215
a6ccdbab 17216# Check whether --with-htmldir was given.
22482f74 17217if test "${with_htmldir+set}" = set; then
a6ccdbab 17218 withval=$with_htmldir; htmldir="\${prefix}/$with_htmldir"
22482f74
MS
17219else
17220 htmldir='$(docdir)'
a6ccdbab
EC
17221fi
17222
22482f74
MS
17223
17224
861bb6c1
JL
17225# Substitute configuration variables
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
9b16d2c4 17272
e9a25f70 17273
6e26218f 17274
c8724862 17275
e061d1ce 17276
d8bb17c8 17277
11642c3a
ZW
17278
17279
17280
17281
17282
17283
17284
3d9d2476 17285
e2500fed 17286
51b9ff45 17287
861bb6c1 17288
6e3f3080
NN
17289# Echo link setup.
17290if test x${build} = x${host} ; then
17291 if test x${host} = x${target} ; then
17292 echo "Links are now set up to build a native compiler for ${target}." 1>&2
17293 else
17294 echo "Links are now set up to build a cross-compiler" 1>&2
17295 echo " from ${host} to ${target}." 1>&2
17296 fi
17297else
17298 if test x${host} = x${target} ; then
17299 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
17300 echo " for ${target}." 1>&2
17301 else
17302 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
17303 echo " from ${host} to ${target}." 1>&2
17304 fi
17305fi
17306
6de9cd9a
DN
17307
17308
17309
6e3f3080
NN
17310# Configure the subdirectories
17311# AC_CONFIG_SUBDIRS($subdirs)
17312
17313# Create the Makefile
17314# and configure language subdirectories
a6ccdbab 17315ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
17316
17317
a6ccdbab 17318ac_config_commands="$ac_config_commands default"
914c5af7 17319
ba479fd2 17320cat >confcache <<\_ACEOF
6e3f3080
NN
17321# This file is a shell script that caches the results of configure
17322# tests run on this system so they can be shared between configure
ba479fd2
NN
17323# scripts and configure runs, see configure's option --config-cache.
17324# It is not useful on other systems. If it contains results you don't
17325# want to keep, you may remove or edit it.
6e3f3080 17326#
ba479fd2
NN
17327# config.status only pays attention to the cache file if you give it
17328# the --recheck option to rerun configure.
6e3f3080 17329#
ba479fd2
NN
17330# `ac_cv_env_foo' variables (set or unset) will be overridden when
17331# loading this file, other *unset* `ac_cv_foo' will be assigned the
17332# following values.
17333
17334_ACEOF
17335
6e3f3080
NN
17336# The following way of writing the cache mishandles newlines in values,
17337# but we know of no workaround that is simple, portable, and efficient.
a6ccdbab 17338# So, we kill variables containing newlines.
6e3f3080
NN
17339# Ultrix sh set writes to stderr and can't be redirected directly,
17340# and sets the high bit in the cache file unless we assign to the vars.
a6ccdbab
EC
17341(
17342 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17343 eval ac_val=\$$ac_var
17344 case $ac_val in #(
17345 *${as_nl}*)
17346 case $ac_var in #(
17347 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
17348echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
17349 esac
17350 case $ac_var in #(
17351 _ | IFS | as_nl) ;; #(
17352 *) $as_unset $ac_var ;;
17353 esac ;;
17354 esac
17355 done
17356
ba479fd2 17357 (set) 2>&1 |
a6ccdbab
EC
17358 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17359 *${as_nl}ac_space=\ *)
ba479fd2
NN
17360 # `set' does not quote correctly, so add quotes (double-quote
17361 # substitution turns \\\\ into \\, and sed turns \\ into \).
17362 sed -n \
86da66b5
HPN
17363 "s/'/'\\\\''/g;
17364 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
a6ccdbab 17365 ;; #(
ba479fd2
NN
17366 *)
17367 # `set' quotes correctly as required by POSIX, so do not add quotes.
a6ccdbab 17368 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
ba479fd2 17369 ;;
a6ccdbab
EC
17370 esac |
17371 sort
17372) |
ba479fd2 17373 sed '
a6ccdbab 17374 /^ac_cv_env_/b end
ba479fd2 17375 t clear
a6ccdbab 17376 :clear
ba479fd2
NN
17377 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17378 t end
a6ccdbab
EC
17379 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17380 :end' >>confcache
17381if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17382 if test -w "$cache_file"; then
17383 test "x$cache_file" != "x/dev/null" &&
17384 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
17385echo "$as_me: updating cache $cache_file" >&6;}
ba479fd2 17386 cat confcache >$cache_file
6e3f3080 17387 else
a6ccdbab
EC
17388 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
17389echo "$as_me: not updating unwritable cache $cache_file" >&6;}
6e3f3080
NN
17390 fi
17391fi
17392rm -f confcache
17393
17394test "x$prefix" = xNONE && prefix=$ac_default_prefix
17395# Let make expand exec_prefix.
17396test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17397
63cf211a 17398DEFS=-DHAVE_CONFIG_H
6e3f3080 17399
ba479fd2
NN
17400ac_libobjs=
17401ac_ltlibobjs=
17402for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17403 # 1. Remove the extension, and $U if already installed.
a6ccdbab
EC
17404 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17405 ac_i=`echo "$ac_i" | sed "$ac_script"`
17406 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17407 # will be set to the directory where LIBOBJS objects are built.
17408 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17409 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
ba479fd2
NN
17410done
17411LIBOBJS=$ac_libobjs
63cf211a 17412
ba479fd2
NN
17413LTLIBOBJS=$ac_ltlibobjs
17414
17415
17416
17417: ${CONFIG_STATUS=./config.status}
17418ac_clean_files_save=$ac_clean_files
17419ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17420{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17421echo "$as_me: creating $CONFIG_STATUS" >&6;}
17422cat >$CONFIG_STATUS <<_ACEOF
17423#! $SHELL
17424# Generated by $as_me.
6e3f3080
NN
17425# Run this file to recreate the current configuration.
17426# Compiler output produced by configure, useful for debugging
ba479fd2 17427# configure, is in config.log if it exists.
6e3f3080 17428
ba479fd2
NN
17429debug=false
17430ac_cs_recheck=false
17431ac_cs_silent=false
17432SHELL=\${CONFIG_SHELL-$SHELL}
17433_ACEOF
17434
17435cat >>$CONFIG_STATUS <<\_ACEOF
17436## --------------------- ##
17437## M4sh Initialization. ##
17438## --------------------- ##
17439
a6ccdbab
EC
17440# Be more Bourne compatible
17441DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
17442if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17443 emulate sh
17444 NULLCMD=:
17445 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17446 # is contrary to our usage. Disable this feature.
17447 alias -g '${1+"$@"}'='"$@"'
a6ccdbab
EC
17448 setopt NO_GLOB_SUBST
17449else
17450 case `(set -o) 2>/dev/null` in
17451 *posix*) set -o posix ;;
17452esac
17453
17454fi
17455
17456
17457
17458
17459# PATH needs CR
17460# Avoid depending upon Character Ranges.
17461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17464as_cr_digits='0123456789'
17465as_cr_alnum=$as_cr_Letters$as_cr_digits
17466
17467# The user is always right.
17468if test "${PATH_SEPARATOR+set}" != set; then
17469 echo "#! /bin/sh" >conf$$.sh
17470 echo "exit 0" >>conf$$.sh
17471 chmod +x conf$$.sh
17472 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
17473 PATH_SEPARATOR=';'
17474 else
17475 PATH_SEPARATOR=:
17476 fi
17477 rm -f conf$$.sh
ba479fd2
NN
17478fi
17479
17480# Support unset when possible.
86da66b5 17481if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
ba479fd2
NN
17482 as_unset=unset
17483else
17484 as_unset=false
17485fi
17486
17487
a6ccdbab
EC
17488# IFS
17489# We need space, tab and new line, in precisely that order. Quoting is
17490# there to prevent editors from complaining about space-tab.
17491# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17492# splitting by setting IFS to empty value.)
17493as_nl='
17494'
17495IFS=" "" $as_nl"
17496
17497# Find who we are. Look in the path if we contain no directory separator.
17498case $0 in
17499 *[\\/]* ) as_myself=$0 ;;
17500 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17501for as_dir in $PATH
17502do
17503 IFS=$as_save_IFS
17504 test -z "$as_dir" && as_dir=.
17505 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17506done
17507IFS=$as_save_IFS
17508
17509 ;;
17510esac
17511# We did not find ourselves, most probably we were run as `sh COMMAND'
17512# in which case we are not to be found in the path.
17513if test "x$as_myself" = x; then
17514 as_myself=$0
17515fi
17516if test ! -f "$as_myself"; then
17517 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17518 { (exit 1); exit 1; }
17519fi
17520
17521# Work around bugs in pre-3.0 UWIN ksh.
17522for as_var in ENV MAIL MAILPATH
17523do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
17524done
17525PS1='$ '
17526PS2='> '
ba479fd2
NN
17527PS4='+ '
17528
17529# NLS nuisances.
17530for as_var in \
17531 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
17532 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
17533 LC_TELEPHONE LC_TIME
6e3f3080 17534do
86da66b5 17535 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
ba479fd2
NN
17536 eval $as_var=C; export $as_var
17537 else
a6ccdbab 17538 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
ba479fd2 17539 fi
6e3f3080
NN
17540done
17541
ba479fd2 17542# Required to use basename.
a6ccdbab
EC
17543if expr a : '\(a\)' >/dev/null 2>&1 &&
17544 test "X`expr 00001 : '.*\(...\)'`" = X001; then
ba479fd2
NN
17545 as_expr=expr
17546else
17547 as_expr=false
17548fi
6e3f3080 17549
a6ccdbab 17550if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
ba479fd2
NN
17551 as_basename=basename
17552else
17553 as_basename=false
17554fi
6e3f3080
NN
17555
17556
ba479fd2 17557# Name of the executable.
a6ccdbab 17558as_me=`$as_basename -- "$0" ||
ba479fd2
NN
17559$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17560 X"$0" : 'X\(//\)$' \| \
a6ccdbab 17561 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
ba479fd2 17562echo X/"$0" |
a6ccdbab
EC
17563 sed '/^.*\/\([^/][^/]*\)\/*$/{
17564 s//\1/
17565 q
17566 }
17567 /^X\/\(\/\/\)$/{
17568 s//\1/
17569 q
17570 }
17571 /^X\/\(\/\).*/{
17572 s//\1/
17573 q
17574 }
17575 s/.*/./; q'`
6e3f3080 17576
a6ccdbab
EC
17577# CDPATH.
17578$as_unset CDPATH
dd7f7a6e
EC
17579
17580
ba479fd2
NN
17581
17582 as_lineno_1=$LINENO
17583 as_lineno_2=$LINENO
ba479fd2 17584 test "x$as_lineno_1" != "x$as_lineno_2" &&
a6ccdbab 17585 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
ba479fd2
NN
17586
17587 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17588 # uniformly replaced by the line number. The first 'sed' inserts a
a6ccdbab
EC
17589 # line-number line after each line using $LINENO; the second 'sed'
17590 # does the real work. The second script uses 'N' to pair each
17591 # line-number line with the line containing $LINENO, and appends
17592 # trailing '-' during substitution so that $LINENO is not a special
17593 # case at line end.
ba479fd2 17594 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
a6ccdbab
EC
17595 # scripts with optimization help from Paolo Bonzini. Blame Lee
17596 # E. McMahon (1931-1989) for sed's syntax. :-)
17597 sed -n '
17598 p
17599 /[$]LINENO/=
17600 ' <$as_myself |
ba479fd2 17601 sed '
a6ccdbab
EC
17602 s/[$]LINENO.*/&-/
17603 t lineno
17604 b
17605 :lineno
ba479fd2 17606 N
a6ccdbab
EC
17607 :loop
17608 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
ba479fd2 17609 t loop
a6ccdbab 17610 s/-\n.*//
ba479fd2 17611 ' >$as_me.lineno &&
a6ccdbab
EC
17612 chmod +x "$as_me.lineno" ||
17613 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
ba479fd2
NN
17614 { (exit 1); exit 1; }; }
17615
17616 # Don't try to exec as it changes $[0], causing all sort of problems
17617 # (the dirname of $[0] is not the place where we might find the
a6ccdbab
EC
17618 # original and so on. Autoconf is especially sensitive to this).
17619 . "./$as_me.lineno"
ba479fd2
NN
17620 # Exit status is that of the last command.
17621 exit
17622}
17623
17624
a6ccdbab
EC
17625if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17626 as_dirname=dirname
17627else
17628 as_dirname=false
17629fi
17630
17631ECHO_C= ECHO_N= ECHO_T=
17632case `echo -n x` in
17633-n*)
17634 case `echo 'x\c'` in
17635 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
17636 *) ECHO_C='\c';;
17637 esac;;
17638*)
17639 ECHO_N='-n';;
ba479fd2
NN
17640esac
17641
a6ccdbab
EC
17642if expr a : '\(a\)' >/dev/null 2>&1 &&
17643 test "X`expr 00001 : '.*\(...\)'`" = X001; then
ba479fd2
NN
17644 as_expr=expr
17645else
17646 as_expr=false
17647fi
17648
17649rm -f conf$$ conf$$.exe conf$$.file
a6ccdbab
EC
17650if test -d conf$$.dir; then
17651 rm -f conf$$.dir/conf$$.file
17652else
17653 rm -f conf$$.dir
17654 mkdir conf$$.dir
17655fi
ba479fd2
NN
17656echo >conf$$.file
17657if ln -s conf$$.file conf$$ 2>/dev/null; then
a6ccdbab
EC
17658 as_ln_s='ln -s'
17659 # ... but there are two gotchas:
17660 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17661 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17662 # In both cases, we have to default to `cp -p'.
17663 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
ba479fd2 17664 as_ln_s='cp -p'
ba479fd2
NN
17665elif ln conf$$.file conf$$ 2>/dev/null; then
17666 as_ln_s=ln
17667else
17668 as_ln_s='cp -p'
17669fi
a6ccdbab
EC
17670rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17671rmdir conf$$.dir 2>/dev/null
ba479fd2
NN
17672
17673if mkdir -p . 2>/dev/null; then
17674 as_mkdir_p=:
17675else
86da66b5 17676 test -d ./-p && rmdir ./-p
ba479fd2
NN
17677 as_mkdir_p=false
17678fi
17679
a6ccdbab
EC
17680if test -x / >/dev/null 2>&1; then
17681 as_test_x='test -x'
17682else
17683 if ls -dL / >/dev/null 2>&1; then
17684 as_ls_L_option=L
17685 else
17686 as_ls_L_option=
17687 fi
17688 as_test_x='
17689 eval sh -c '\''
17690 if test -d "$1"; then
17691 test -d "$1/.";
17692 else
17693 case $1 in
17694 -*)set "./$1";;
17695 esac;
17696 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
17697 ???[sx]*):;;*)false;;esac;fi
17698 '\'' sh
17699 '
17700fi
17701as_executable_p=$as_test_x
ba479fd2
NN
17702
17703# Sed expression to map a string onto a valid CPP name.
86da66b5 17704as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
17705
17706# Sed expression to map a string onto a valid variable name.
86da66b5 17707as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
17708
17709
ba479fd2
NN
17710exec 6>&1
17711
a6ccdbab 17712# Save the log message, to keep $[0] and so on meaningful, and to
ba479fd2 17713# report actual input values of CONFIG_FILES etc. instead of their
a6ccdbab
EC
17714# values after options handling.
17715ac_log="
ba479fd2 17716This file was extended by $as_me, which was
a6ccdbab 17717generated by GNU Autoconf 2.61. Invocation command line was
ba479fd2
NN
17718
17719 CONFIG_FILES = $CONFIG_FILES
17720 CONFIG_HEADERS = $CONFIG_HEADERS
17721 CONFIG_LINKS = $CONFIG_LINKS
17722 CONFIG_COMMANDS = $CONFIG_COMMANDS
17723 $ $0 $@
17724
a6ccdbab
EC
17725on `(hostname || uname -n) 2>/dev/null | sed 1q`
17726"
17727
ba479fd2
NN
17728_ACEOF
17729
a6ccdbab 17730cat >>$CONFIG_STATUS <<_ACEOF
ba479fd2 17731# Files that config.status was made for.
a6ccdbab
EC
17732config_files="$ac_config_files"
17733config_headers="$ac_config_headers"
17734config_commands="$ac_config_commands"
dd7f7a6e 17735
a6ccdbab 17736_ACEOF
ba479fd2
NN
17737
17738cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
17739ac_cs_usage="\
17740\`$as_me' instantiates files from templates according to the
17741current configuration.
17742
17743Usage: $0 [OPTIONS] [FILE]...
17744
17745 -h, --help print this help, then exit
a6ccdbab 17746 -V, --version print version number and configuration settings, then exit
ba479fd2
NN
17747 -q, --quiet do not print progress messages
17748 -d, --debug don't remove temporary files
17749 --recheck update $as_me by reconfiguring in the same conditions
17750 --file=FILE[:TEMPLATE]
86da66b5 17751 instantiate the configuration file FILE
ba479fd2 17752 --header=FILE[:TEMPLATE]
86da66b5 17753 instantiate the configuration header FILE
ba479fd2
NN
17754
17755Configuration files:
17756$config_files
17757
17758Configuration headers:
17759$config_headers
17760
17761Configuration commands:
17762$config_commands
17763
17764Report bugs to <bug-autoconf@gnu.org>."
dd7f7a6e 17765
a6ccdbab 17766_ACEOF
ba479fd2
NN
17767cat >>$CONFIG_STATUS <<_ACEOF
17768ac_cs_version="\\
17769config.status
a6ccdbab
EC
17770configured by $0, generated by GNU Autoconf 2.61,
17771 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
ba479fd2 17772
a6ccdbab 17773Copyright (C) 2006 Free Software Foundation, Inc.
ba479fd2
NN
17774This config.status script is free software; the Free Software Foundation
17775gives unlimited permission to copy, distribute and modify it."
a6ccdbab
EC
17776
17777ac_pwd='$ac_pwd'
17778srcdir='$srcdir'
ba479fd2
NN
17779_ACEOF
17780
17781cat >>$CONFIG_STATUS <<\_ACEOF
17782# If no file are specified by the user, then we need to provide default
17783# value. By we need to know if files were specified by the user.
17784ac_need_defaults=:
17785while test $# != 0
17786do
17787 case $1 in
17788 --*=*)
a6ccdbab
EC
17789 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17790 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ba479fd2
NN
17791 ac_shift=:
17792 ;;
a6ccdbab 17793 *)
ba479fd2
NN
17794 ac_option=$1
17795 ac_optarg=$2
17796 ac_shift=shift
17797 ;;
ba479fd2
NN
17798 esac
17799
17800 case $ac_option in
17801 # Handling of the options.
ba479fd2
NN
17802 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17803 ac_cs_recheck=: ;;
a6ccdbab
EC
17804 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17805 echo "$ac_cs_version"; exit ;;
17806 --debug | --debu | --deb | --de | --d | -d )
ba479fd2
NN
17807 debug=: ;;
17808 --file | --fil | --fi | --f )
17809 $ac_shift
17810 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
17811 ac_need_defaults=false;;
17812 --header | --heade | --head | --hea )
17813 $ac_shift
17814 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
17815 ac_need_defaults=false;;
a6ccdbab
EC
17816 --he | --h)
17817 # Conflict between --help and --header
17818 { echo "$as_me: error: ambiguous option: $1
17819Try \`$0 --help' for more information." >&2
17820 { (exit 1); exit 1; }; };;
17821 --help | --hel | -h )
17822 echo "$ac_cs_usage"; exit ;;
ba479fd2
NN
17823 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17824 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17825 ac_cs_silent=: ;;
17826
17827 # This is an error.
a6ccdbab
EC
17828 -*) { echo "$as_me: error: unrecognized option: $1
17829Try \`$0 --help' for more information." >&2
ba479fd2
NN
17830 { (exit 1); exit 1; }; } ;;
17831
a6ccdbab
EC
17832 *) ac_config_targets="$ac_config_targets $1"
17833 ac_need_defaults=false ;;
ba479fd2
NN
17834
17835 esac
17836 shift
6e3f3080 17837done
ba479fd2
NN
17838
17839ac_configure_extra_args=
17840
17841if $ac_cs_silent; then
17842 exec 6>/dev/null
17843 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
17844fi
17845
ba479fd2
NN
17846_ACEOF
17847cat >>$CONFIG_STATUS <<_ACEOF
17848if \$ac_cs_recheck; then
a6ccdbab
EC
17849 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
17850 CONFIG_SHELL=$SHELL
17851 export CONFIG_SHELL
17852 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
ba479fd2 17853fi
861bb6c1 17854
ba479fd2 17855_ACEOF
a6ccdbab
EC
17856cat >>$CONFIG_STATUS <<\_ACEOF
17857exec 5>>config.log
17858{
17859 echo
17860 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17861## Running $as_me. ##
17862_ASBOX
17863 echo "$ac_log"
17864} >&5
ba479fd2 17865
a6ccdbab 17866_ACEOF
ba479fd2
NN
17867cat >>$CONFIG_STATUS <<_ACEOF
17868#
a6ccdbab 17869# INIT-COMMANDS
ba479fd2 17870#
ba479fd2 17871subdirs='$subdirs'
ba479fd2
NN
17872
17873_ACEOF
17874
dd7f7a6e 17875cat >>$CONFIG_STATUS <<\_ACEOF
a6ccdbab
EC
17876
17877# Handling of arguments.
ba479fd2
NN
17878for ac_config_target in $ac_config_targets
17879do
a6ccdbab
EC
17880 case $ac_config_target in
17881 "auto-host.h") CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
17882 "$all_outputs") CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
17883 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17884
ba479fd2
NN
17885 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17886echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17887 { (exit 1); exit 1; }; };;
861bb6c1 17888 esac
ba479fd2
NN
17889done
17890
a6ccdbab 17891
ba479fd2
NN
17892# If the user did not use the arguments to specify the items to instantiate,
17893# then the envvar interface is used. Set only those that are not.
17894# We use the long form for the default assignment because of an extremely
17895# bizarre bug on SunOS 4.1.3.
17896if $ac_need_defaults; then
17897 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17898 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17899 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17900fi
17901
17902# Have a temporary directory for convenience. Make it in the build tree
a6ccdbab 17903# simply because there is no reason against having it here, and in addition,
ba479fd2 17904# creating and moving files from /tmp can sometimes cause problems.
a6ccdbab
EC
17905# Hook for its removal unless debugging.
17906# Note that there is a small window in which the directory will not be cleaned:
17907# after its creation but before its name has been assigned to `$tmp'.
ba479fd2
NN
17908$debug ||
17909{
a6ccdbab
EC
17910 tmp=
17911 trap 'exit_status=$?
17912 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
17913' 0
ba479fd2
NN
17914 trap '{ (exit 1); exit 1; }' 1 2 13 15
17915}
ba479fd2 17916# Create a (secure) tmp directory for tmp files.
6e3f3080 17917
ba479fd2 17918{
a6ccdbab 17919 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
ba479fd2
NN
17920 test -n "$tmp" && test -d "$tmp"
17921} ||
17922{
a6ccdbab
EC
17923 tmp=./conf$$-$RANDOM
17924 (umask 077 && mkdir "$tmp")
ba479fd2
NN
17925} ||
17926{
17927 echo "$me: cannot create a temporary directory in ." >&2
17928 { (exit 1); exit 1; }
17929}
17930
ba479fd2 17931#
a6ccdbab 17932# Set up the sed scripts for CONFIG_FILES section.
ba479fd2
NN
17933#
17934
17935# No need to generate the scripts if there are no CONFIG_FILES.
17936# This happens for instance when ./config.status config.h
a6ccdbab
EC
17937if test -n "$CONFIG_FILES"; then
17938
17939_ACEOF
17940
17941# Create sed commands to just substitute file output variables.
17942
17943# Remaining file output variables are in a fragment that also has non-file
17944# output varibles.
17945
17946
17947
17948ac_delim='%!_!# '
17949for ac_last_try in false false false false false :; do
17950 cat >conf$$subs.sed <<_ACEOF
17951SHELL!$SHELL$ac_delim
17952PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
17953PACKAGE_NAME!$PACKAGE_NAME$ac_delim
17954PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
17955PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
17956PACKAGE_STRING!$PACKAGE_STRING$ac_delim
17957PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
17958exec_prefix!$exec_prefix$ac_delim
17959prefix!$prefix$ac_delim
17960program_transform_name!$program_transform_name$ac_delim
17961bindir!$bindir$ac_delim
17962sbindir!$sbindir$ac_delim
17963libexecdir!$libexecdir$ac_delim
17964datarootdir!$datarootdir$ac_delim
17965datadir!$datadir$ac_delim
17966sysconfdir!$sysconfdir$ac_delim
17967sharedstatedir!$sharedstatedir$ac_delim
17968localstatedir!$localstatedir$ac_delim
17969includedir!$includedir$ac_delim
17970oldincludedir!$oldincludedir$ac_delim
17971docdir!$docdir$ac_delim
17972infodir!$infodir$ac_delim
17973htmldir!$htmldir$ac_delim
17974dvidir!$dvidir$ac_delim
17975pdfdir!$pdfdir$ac_delim
17976psdir!$psdir$ac_delim
17977libdir!$libdir$ac_delim
17978localedir!$localedir$ac_delim
17979mandir!$mandir$ac_delim
17980DEFS!$DEFS$ac_delim
17981ECHO_C!$ECHO_C$ac_delim
17982ECHO_N!$ECHO_N$ac_delim
17983ECHO_T!$ECHO_T$ac_delim
17984LIBS!$LIBS$ac_delim
17985build_alias!$build_alias$ac_delim
17986host_alias!$host_alias$ac_delim
17987target_alias!$target_alias$ac_delim
17988build!$build$ac_delim
17989build_cpu!$build_cpu$ac_delim
17990build_vendor!$build_vendor$ac_delim
17991build_os!$build_os$ac_delim
17992host!$host$ac_delim
17993host_cpu!$host_cpu$ac_delim
17994host_vendor!$host_vendor$ac_delim
17995host_os!$host_os$ac_delim
17996target!$target$ac_delim
17997target_cpu!$target_cpu$ac_delim
17998target_vendor!$target_vendor$ac_delim
17999target_os!$target_os$ac_delim
18000target_noncanonical!$target_noncanonical$ac_delim
18001build_libsubdir!$build_libsubdir$ac_delim
18002build_subdir!$build_subdir$ac_delim
18003host_subdir!$host_subdir$ac_delim
18004target_subdir!$target_subdir$ac_delim
18005GENINSRC!$GENINSRC$ac_delim
18006CC!$CC$ac_delim
18007CFLAGS!$CFLAGS$ac_delim
18008LDFLAGS!$LDFLAGS$ac_delim
18009CPPFLAGS!$CPPFLAGS$ac_delim
18010ac_ct_CC!$ac_ct_CC$ac_delim
18011EXEEXT!$EXEEXT$ac_delim
18012OBJEXT!$OBJEXT$ac_delim
18013NO_MINUS_C_MINUS_O!$NO_MINUS_C_MINUS_O$ac_delim
18014OUTPUT_OPTION!$OUTPUT_OPTION$ac_delim
18015CPP!$CPP$ac_delim
18016GREP!$GREP$ac_delim
18017EGREP!$EGREP$ac_delim
18018strict1_warn!$strict1_warn$ac_delim
18019cxx_compat_warn!$cxx_compat_warn$ac_delim
18020warn_cflags!$warn_cflags$ac_delim
18021WERROR!$WERROR$ac_delim
18022nocommon_flag!$nocommon_flag$ac_delim
18023TREEBROWSER!$TREEBROWSER$ac_delim
18024valgrind_path!$valgrind_path$ac_delim
18025valgrind_path_defines!$valgrind_path_defines$ac_delim
18026valgrind_command!$valgrind_command$ac_delim
18027coverage_flags!$coverage_flags$ac_delim
18028enable_multilib!$enable_multilib$ac_delim
18029enable_decimal_float!$enable_decimal_float$ac_delim
18030enable_shared!$enable_shared$ac_delim
18031TARGET_SYSTEM_ROOT!$TARGET_SYSTEM_ROOT$ac_delim
18032TARGET_SYSTEM_ROOT_DEFINE!$TARGET_SYSTEM_ROOT_DEFINE$ac_delim
18033CROSS_SYSTEM_HEADER_DIR!$CROSS_SYSTEM_HEADER_DIR$ac_delim
18034onestep!$onestep$ac_delim
18035SET_MAKE!$SET_MAKE$ac_delim
18036AWK!$AWK$ac_delim
18037LN_S!$LN_S$ac_delim
18038LN!$LN$ac_delim
18039RANLIB!$RANLIB$ac_delim
18040ranlib_flags!$ranlib_flags$ac_delim
18041INSTALL!$INSTALL$ac_delim
18042INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
18043INSTALL_DATA!$INSTALL_DATA$ac_delim
18044make_compare_target!$make_compare_target$ac_delim
18045_ACEOF
18046
18047 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 94; then
18048 break
18049 elif $ac_last_try; then
18050 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
18051echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
18052 { (exit 1); exit 1; }; }
18053 else
18054 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
b8ec3cc8 18055 fi
a6ccdbab
EC
18056done
18057
18058ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
18059if test -n "$ac_eof"; then
18060 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
18061 ac_eof=`expr $ac_eof + 1`
18062fi
18063
18064cat >>$CONFIG_STATUS <<_ACEOF
18065cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
18066/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18067/^[ ]*@language_hooks@[ ]*$/{
18068r $language_hooks
18069d
18070}
18071_ACEOF
18072sed '
18073s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
18074s/^/s,@/; s/!/@,|#_!!_#|/
18075:n
18076t n
18077s/'"$ac_delim"'$/,g/; t
18078s/$/\\/; p
18079N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
18080' >>$CONFIG_STATUS <conf$$subs.sed
18081rm -f conf$$subs.sed
18082cat >>$CONFIG_STATUS <<_ACEOF
18083CEOF$ac_eof
18084_ACEOF
18085
18086
18087ac_delim='%!_!# '
18088for ac_last_try in false false false false false :; do
18089 cat >conf$$subs.sed <<_ACEOF
18090have_mktemp_command!$have_mktemp_command$ac_delim
18091MAKEINFO!$MAKEINFO$ac_delim
18092BUILD_INFO!$BUILD_INFO$ac_delim
18093GENERATED_MANPAGES!$GENERATED_MANPAGES$ac_delim
18094FLEX!$FLEX$ac_delim
18095BISON!$BISON$ac_delim
18096NM!$NM$ac_delim
18097AR!$AR$ac_delim
18098stage1_cflags!$stage1_cflags$ac_delim
18099COLLECT2_LIBS!$COLLECT2_LIBS$ac_delim
18100GNAT_LIBEXC!$GNAT_LIBEXC$ac_delim
18101LDEXP_LIB!$LDEXP_LIB$ac_delim
18102TARGET_GETGROUPS_T!$TARGET_GETGROUPS_T$ac_delim
18103LIBICONV!$LIBICONV$ac_delim
18104LTLIBICONV!$LTLIBICONV$ac_delim
18105LIBICONV_DEP!$LIBICONV_DEP$ac_delim
18106manext!$manext$ac_delim
18107objext!$objext$ac_delim
18108gthread_flags!$gthread_flags$ac_delim
18109extra_modes_file!$extra_modes_file$ac_delim
18110extra_opt_files!$extra_opt_files$ac_delim
18111USE_NLS!$USE_NLS$ac_delim
18112LIBINTL!$LIBINTL$ac_delim
18113LIBINTL_DEP!$LIBINTL_DEP$ac_delim
18114INCINTL!$INCINTL$ac_delim
18115XGETTEXT!$XGETTEXT$ac_delim
18116GMSGFMT!$GMSGFMT$ac_delim
18117POSUB!$POSUB$ac_delim
18118CATALOGS!$CATALOGS$ac_delim
18119DATADIRNAME!$DATADIRNAME$ac_delim
18120INSTOBJEXT!$INSTOBJEXT$ac_delim
18121GENCAT!$GENCAT$ac_delim
18122CATOBJEXT!$CATOBJEXT$ac_delim
18123host_cc_for_libada!$host_cc_for_libada$ac_delim
18124CROSS!$CROSS$ac_delim
18125ALL!$ALL$ac_delim
18126SYSTEM_HEADER_DIR!$SYSTEM_HEADER_DIR$ac_delim
18127inhibit_libc!$inhibit_libc$ac_delim
18128CC_FOR_BUILD!$CC_FOR_BUILD$ac_delim
18129BUILD_CFLAGS!$BUILD_CFLAGS$ac_delim
18130STMP_FIXINC!$STMP_FIXINC$ac_delim
18131STMP_FIXPROTO!$STMP_FIXPROTO$ac_delim
18132collect2!$collect2$ac_delim
18133gcc_cv_as!$gcc_cv_as$ac_delim
18134ORIGINAL_AS_FOR_TARGET!$ORIGINAL_AS_FOR_TARGET$ac_delim
18135gcc_cv_ld!$gcc_cv_ld$ac_delim
18136ORIGINAL_LD_FOR_TARGET!$ORIGINAL_LD_FOR_TARGET$ac_delim
18137gcc_cv_nm!$gcc_cv_nm$ac_delim
18138ORIGINAL_NM_FOR_TARGET!$ORIGINAL_NM_FOR_TARGET$ac_delim
18139gcc_cv_objdump!$gcc_cv_objdump$ac_delim
18140libgcc_visibility!$libgcc_visibility$ac_delim
18141GGC!$GGC$ac_delim
18142zlibdir!$zlibdir$ac_delim
18143zlibinc!$zlibinc$ac_delim
18144MAINT!$MAINT$ac_delim
18145gcc_tooldir!$gcc_tooldir$ac_delim
18146dollar!$dollar$ac_delim
18147slibdir!$slibdir$ac_delim
18148objdir!$objdir$ac_delim
18149subdirs!$subdirs$ac_delim
18150srcdir!$srcdir$ac_delim
18151all_boot_languages!$all_boot_languages$ac_delim
18152all_compilers!$all_compilers$ac_delim
18153all_gtfiles!$all_gtfiles$ac_delim
18154all_gtfiles_files_langs!$all_gtfiles_files_langs$ac_delim
18155all_gtfiles_files_files!$all_gtfiles_files_files$ac_delim
18156all_lang_makefrags!$all_lang_makefrags$ac_delim
18157all_lang_makefiles!$all_lang_makefiles$ac_delim
18158all_languages!$all_languages$ac_delim
18159all_selected_languages!$all_selected_languages$ac_delim
18160all_stagestuff!$all_stagestuff$ac_delim
18161build_exeext!$build_exeext$ac_delim
18162build_install_headers_dir!$build_install_headers_dir$ac_delim
18163build_xm_file_list!$build_xm_file_list$ac_delim
18164build_xm_include_list!$build_xm_include_list$ac_delim
18165build_xm_defines!$build_xm_defines$ac_delim
18166check_languages!$check_languages$ac_delim
18167cc_set_by_configure!$cc_set_by_configure$ac_delim
18168quoted_cc_set_by_configure!$quoted_cc_set_by_configure$ac_delim
18169cpp_install_dir!$cpp_install_dir$ac_delim
18170xmake_file!$xmake_file$ac_delim
18171tmake_file!$tmake_file$ac_delim
18172extra_gcc_objs!$extra_gcc_objs$ac_delim
18173extra_headers_list!$extra_headers_list$ac_delim
18174extra_objs!$extra_objs$ac_delim
18175extra_parts!$extra_parts$ac_delim
18176extra_passes!$extra_passes$ac_delim
18177extra_programs!$extra_programs$ac_delim
18178float_h_file!$float_h_file$ac_delim
18179gcc_config_arguments!$gcc_config_arguments$ac_delim
18180gcc_gxx_include_dir!$gcc_gxx_include_dir$ac_delim
18181host_exeext!$host_exeext$ac_delim
18182host_xm_file_list!$host_xm_file_list$ac_delim
18183host_xm_include_list!$host_xm_include_list$ac_delim
18184host_xm_defines!$host_xm_defines$ac_delim
18185out_host_hook_obj!$out_host_hook_obj$ac_delim
18186install!$install$ac_delim
18187_ACEOF
18188
18189 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
18190 break
18191 elif $ac_last_try; then
18192 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
18193echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
18194 { (exit 1); exit 1; }; }
18195 else
18196 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18197 fi
18198done
18199
18200ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
18201if test -n "$ac_eof"; then
18202 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
18203 ac_eof=`expr $ac_eof + 1`
18204fi
b8ec3cc8 18205
a6ccdbab
EC
18206cat >>$CONFIG_STATUS <<_ACEOF
18207cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
18208/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
b8ec3cc8 18209_ACEOF
a6ccdbab
EC
18210sed '
18211s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
18212s/^/s,@/; s/!/@,|#_!!_#|/
18213:n
18214t n
18215s/'"$ac_delim"'$/,g/; t
18216s/$/\\/; p
18217N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
18218' >>$CONFIG_STATUS <conf$$subs.sed
18219rm -f conf$$subs.sed
18220cat >>$CONFIG_STATUS <<_ACEOF
18221CEOF$ac_eof
18222_ACEOF
18223
18224
18225ac_delim='%!_!# '
18226for ac_last_try in false false false false false :; do
18227 cat >conf$$subs.sed <<_ACEOF
18228lang_opt_files!$lang_opt_files$ac_delim
18229lang_specs_files!$lang_specs_files$ac_delim
18230lang_tree_files!$lang_tree_files$ac_delim
18231local_prefix!$local_prefix$ac_delim
18232md_file!$md_file$ac_delim
18233objc_boehm_gc!$objc_boehm_gc$ac_delim
18234out_file!$out_file$ac_delim
18235out_object_file!$out_object_file$ac_delim
18236stage_prefix_set_by_configure!$stage_prefix_set_by_configure$ac_delim
18237quoted_stage_prefix_set_by_configure!$quoted_stage_prefix_set_by_configure$ac_delim
18238thread_file!$thread_file$ac_delim
18239tm_file_list!$tm_file_list$ac_delim
18240tm_include_list!$tm_include_list$ac_delim
18241tm_defines!$tm_defines$ac_delim
18242tm_p_file_list!$tm_p_file_list$ac_delim
18243tm_p_include_list!$tm_p_include_list$ac_delim
18244xm_file_list!$xm_file_list$ac_delim
18245xm_include_list!$xm_include_list$ac_delim
18246xm_defines!$xm_defines$ac_delim
18247c_target_objs!$c_target_objs$ac_delim
18248cxx_target_objs!$cxx_target_objs$ac_delim
18249target_cpu_default!$target_cpu_default$ac_delim
18250GMPLIBS!$GMPLIBS$ac_delim
18251GMPINC!$GMPINC$ac_delim
18252LIBOBJS!$LIBOBJS$ac_delim
18253LTLIBOBJS!$LTLIBOBJS$ac_delim
18254_ACEOF
18255
18256 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 26; then
18257 break
18258 elif $ac_last_try; then
18259 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
18260echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
18261 { (exit 1); exit 1; }; }
18262 else
18263 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18264 fi
18265done
18266
18267ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
18268if test -n "$ac_eof"; then
18269 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
18270 ac_eof=`expr $ac_eof + 1`
18271fi
18272
18273cat >>$CONFIG_STATUS <<_ACEOF
18274cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof
18275/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
18276_ACEOF
18277sed '
18278s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
18279s/^/s,@/; s/!/@,|#_!!_#|/
18280:n
18281t n
18282s/'"$ac_delim"'$/,g/; t
18283s/$/\\/; p
18284N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
18285' >>$CONFIG_STATUS <conf$$subs.sed
18286rm -f conf$$subs.sed
18287cat >>$CONFIG_STATUS <<_ACEOF
18288:end
18289s/|#_!!_#|//g
18290CEOF$ac_eof
18291_ACEOF
18292
18293
18294# VPATH may cause trouble with some makes, so we remove $(srcdir),
18295# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18296# trailing colons and then remove the whole line if VPATH becomes empty
18297# (actually we leave an empty line to preserve line numbers).
18298if test "x$srcdir" = x.; then
18299 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18300s/:*\$(srcdir):*/:/
18301s/:*\${srcdir}:*/:/
18302s/:*@srcdir@:*/:/
18303s/^\([^=]*=[ ]*\):*/\1/
18304s/:*$//
18305s/^[^=]*=[ ]*$//
18306}'
18307fi
18308
ba479fd2 18309cat >>$CONFIG_STATUS <<\_ACEOF
a6ccdbab
EC
18310fi # test -n "$CONFIG_FILES"
18311
18312
18313for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
18314do
18315 case $ac_tag in
18316 :[FHLC]) ac_mode=$ac_tag; continue;;
18317 esac
18318 case $ac_mode$ac_tag in
18319 :[FHL]*:*);;
18320 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
18321echo "$as_me: error: Invalid tag $ac_tag." >&2;}
18322 { (exit 1); exit 1; }; };;
18323 :[FH]-) ac_tag=-:-;;
18324 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18325 esac
18326 ac_save_IFS=$IFS
18327 IFS=:
18328 set x $ac_tag
18329 IFS=$ac_save_IFS
18330 shift
18331 ac_file=$1
18332 shift
18333
18334 case $ac_mode in
18335 :L) ac_source=$1;;
18336 :[FH])
18337 ac_file_inputs=
18338 for ac_f
18339 do
18340 case $ac_f in
18341 -) ac_f="$tmp/stdin";;
18342 *) # Look for the file first in the build tree, then in the source tree
18343 # (if the path is not absolute). The absolute path cannot be DOS-style,
18344 # because $ac_f cannot contain `:'.
18345 test -f "$ac_f" ||
18346 case $ac_f in
18347 [\\/$]*) false;;
18348 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18349 esac ||
18350 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
18351echo "$as_me: error: cannot find input file: $ac_f" >&2;}
18352 { (exit 1); exit 1; }; };;
18353 esac
18354 ac_file_inputs="$ac_file_inputs $ac_f"
18355 done
18356
18357 # Let's still pretend it is `configure' which instantiates (i.e., don't
18358 # use $as_me), people would be surprised to read:
18359 # /* config.h. Generated by config.status. */
18360 configure_input="Generated from "`IFS=:
18361 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
18362 if test x"$ac_file" != x-; then
18363 configure_input="$ac_file. $configure_input"
18364 { echo "$as_me:$LINENO: creating $ac_file" >&5
18365echo "$as_me: creating $ac_file" >&6;}
18366 fi
18367
18368 case $ac_tag in
18369 *:-:* | *:-) cat >"$tmp/stdin";;
18370 esac
18371 ;;
63cf211a 18372 esac
cafe096b 18373
a6ccdbab 18374 ac_dir=`$as_dirname -- "$ac_file" ||
ba479fd2 18375$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
18376 X"$ac_file" : 'X\(//\)[^/]' \| \
18377 X"$ac_file" : 'X\(//\)$' \| \
a6ccdbab 18378 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
ba479fd2 18379echo X"$ac_file" |
a6ccdbab
EC
18380 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18381 s//\1/
18382 q
18383 }
18384 /^X\(\/\/\)[^/].*/{
18385 s//\1/
18386 q
18387 }
18388 /^X\(\/\/\)$/{
18389 s//\1/
18390 q
18391 }
18392 /^X\(\/\).*/{
18393 s//\1/
18394 q
18395 }
18396 s/.*/./; q'`
18397 { as_dir="$ac_dir"
18398 case $as_dir in #(
18399 -*) as_dir=./$as_dir;;
18400 esac
18401 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
ba479fd2 18402 as_dirs=
a6ccdbab
EC
18403 while :; do
18404 case $as_dir in #(
18405 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
18406 *) as_qdir=$as_dir;;
18407 esac
18408 as_dirs="'$as_qdir' $as_dirs"
18409 as_dir=`$as_dirname -- "$as_dir" ||
ba479fd2 18410$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
18411 X"$as_dir" : 'X\(//\)[^/]' \| \
18412 X"$as_dir" : 'X\(//\)$' \| \
a6ccdbab 18413 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
ba479fd2 18414echo X"$as_dir" |
a6ccdbab
EC
18415 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18416 s//\1/
18417 q
18418 }
18419 /^X\(\/\/\)[^/].*/{
18420 s//\1/
18421 q
18422 }
18423 /^X\(\/\/\)$/{
18424 s//\1/
18425 q
18426 }
18427 /^X\(\/\).*/{
18428 s//\1/
18429 q
18430 }
18431 s/.*/./; q'`
18432 test -d "$as_dir" && break
ba479fd2 18433 done
a6ccdbab
EC
18434 test -z "$as_dirs" || eval "mkdir $as_dirs"
18435 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
18436echo "$as_me: error: cannot create directory $as_dir" >&2;}
ba479fd2 18437 { (exit 1); exit 1; }; }; }
ba479fd2
NN
18438 ac_builddir=.
18439
a6ccdbab
EC
18440case "$ac_dir" in
18441.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18442*)
ba479fd2 18443 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
a6ccdbab
EC
18444 # A ".." for each directory in $ac_dir_suffix.
18445 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
18446 case $ac_top_builddir_sub in
18447 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18448 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18449 esac ;;
18450esac
18451ac_abs_top_builddir=$ac_pwd
18452ac_abs_builddir=$ac_pwd$ac_dir_suffix
18453# for backward compatibility:
18454ac_top_builddir=$ac_top_build_prefix
ba479fd2
NN
18455
18456case $srcdir in
a6ccdbab 18457 .) # We are building in place.
ba479fd2 18458 ac_srcdir=.
a6ccdbab
EC
18459 ac_top_srcdir=$ac_top_builddir_sub
18460 ac_abs_top_srcdir=$ac_pwd ;;
18461 [\\/]* | ?:[\\/]* ) # Absolute name.
ba479fd2 18462 ac_srcdir=$srcdir$ac_dir_suffix;
a6ccdbab
EC
18463 ac_top_srcdir=$srcdir
18464 ac_abs_top_srcdir=$srcdir ;;
18465 *) # Relative name.
18466 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18467 ac_top_srcdir=$ac_top_build_prefix$srcdir
18468 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
ba479fd2 18469esac
a6ccdbab 18470ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
ba479fd2
NN
18471
18472
a6ccdbab
EC
18473 case $ac_mode in
18474 :F)
18475 #
18476 # CONFIG_FILE
18477 #
ba479fd2 18478
a6ccdbab 18479_ACEOF
b8ec3cc8 18480
a6ccdbab
EC
18481cat >>$CONFIG_STATUS <<\_ACEOF
18482# If the template does not know about datarootdir, expand it.
18483# FIXME: This hack should be removed a few years after 2.60.
18484ac_datarootdir_hack=; ac_datarootdir_seen=
18485
18486case `sed -n '/datarootdir/ {
18487 p
18488 q
18489}
18490/@datadir@/p
18491/@docdir@/p
18492/@infodir@/p
18493/@localedir@/p
18494/@mandir@/p
18495' $ac_file_inputs` in
18496*datarootdir*) ac_datarootdir_seen=yes;;
18497*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18498 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18499echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
ba479fd2 18500_ACEOF
a6ccdbab
EC
18501cat >>$CONFIG_STATUS <<_ACEOF
18502 ac_datarootdir_hack='
18503 s&@datadir@&$datadir&g
18504 s&@docdir@&$docdir&g
18505 s&@infodir@&$infodir&g
18506 s&@localedir@&$localedir&g
18507 s&@mandir@&$mandir&g
18508 s&\\\${datarootdir}&$datarootdir&g' ;;
18509esac
18510_ACEOF
18511
18512# Neutralize VPATH when `$srcdir' = `.'.
18513# Shell code in configure.ac might set extrasub.
18514# FIXME: do we really want to maintain this feature?
ba479fd2
NN
18515cat >>$CONFIG_STATUS <<_ACEOF
18516 sed "$ac_vpsub
18517$extrasub
18518_ACEOF
18519cat >>$CONFIG_STATUS <<\_ACEOF
18520:t
18521/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
a6ccdbab
EC
18522s&@configure_input@&$configure_input&;t t
18523s&@top_builddir@&$ac_top_builddir_sub&;t t
18524s&@srcdir@&$ac_srcdir&;t t
18525s&@abs_srcdir@&$ac_abs_srcdir&;t t
18526s&@top_srcdir@&$ac_top_srcdir&;t t
18527s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18528s&@builddir@&$ac_builddir&;t t
18529s&@abs_builddir@&$ac_abs_builddir&;t t
18530s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18531$ac_datarootdir_hack
18532" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out
18533
18534test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18535 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
18536 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
18537 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18538which seems to be undefined. Please make sure it is defined." >&5
18539echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18540which seems to be undefined. Please make sure it is defined." >&2;}
18541
18542 rm -f "$tmp/stdin"
ba479fd2 18543 case $ac_file in
a6ccdbab
EC
18544 -) cat "$tmp/out"; rm -f "$tmp/out";;
18545 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
861bb6c1 18546 esac
a6ccdbab
EC
18547 ;;
18548 :H)
18549 #
18550 # CONFIG_HEADER
18551 #
18552_ACEOF
18553
18554# Transform confdefs.h into a sed script `conftest.defines', that
18555# substitutes the proper values into config.h.in to produce config.h.
18556rm -f conftest.defines conftest.tail
18557# First, append a space to every undef/define line, to ease matching.
18558echo 's/$/ /' >conftest.defines
18559# Then, protect against being on the right side of a sed subst, or in
18560# an unquoted here document, in config.status. If some macros were
18561# called several times there might be several #defines for the same
18562# symbol, which is useless. But do not sort them, since the last
18563# AC_DEFINE must be honored.
18564ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18565# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
18566# NAME is the cpp macro being defined, VALUE is the value it is being given.
18567# PARAMS is the parameter list in the macro definition--in most cases, it's
18568# just an empty string.
18569ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
18570ac_dB='\\)[ (].*,\\1define\\2'
18571ac_dC=' '
18572ac_dD=' ,'
18573
18574uniq confdefs.h |
18575 sed -n '
18576 t rset
18577 :rset
18578 s/^[ ]*#[ ]*define[ ][ ]*//
18579 t ok
18580 d
18581 :ok
18582 s/[\\&,]/\\&/g
18583 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
18584 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
18585 ' >>conftest.defines
18586
18587# Remove the space that was appended to ease matching.
18588# Then replace #undef with comments. This is necessary, for
861bb6c1
JL
18589# example, in the case of _POSIX_SOURCE, which is predefined and required
18590# on some systems where configure will not decide to define it.
a6ccdbab
EC
18591# (The regexp can be short, since the line contains either #define or #undef.)
18592echo 's/ $//
18593s,^[ #]*u.*,/* & */,' >>conftest.defines
18594
18595# Break up conftest.defines:
18596ac_max_sed_lines=50
18597
18598# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
18599# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
18600# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
18601# et cetera.
18602ac_in='$ac_file_inputs'
18603ac_out='"$tmp/out1"'
18604ac_nxt='"$tmp/out2"'
18605
18606while :
ba479fd2 18607do
a6ccdbab
EC
18608 # Write a here document:
18609 cat >>$CONFIG_STATUS <<_ACEOF
18610 # First, check the format of the line:
18611 cat >"\$tmp/defines.sed" <<\\CEOF
18612/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
18613/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
18614b
18615:def
18616_ACEOF
18617 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
ba479fd2 18618 echo 'CEOF
a6ccdbab
EC
18619 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
18620 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
18621 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
18622 grep . conftest.tail >/dev/null || break
ba479fd2
NN
18623 rm -f conftest.defines
18624 mv conftest.tail conftest.defines
18625done
a6ccdbab 18626rm -f conftest.defines conftest.tail
ba479fd2 18627
a6ccdbab 18628echo "ac_result=$ac_in" >>$CONFIG_STATUS
ba479fd2 18629cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2 18630 if test x"$ac_file" != x-; then
a6ccdbab
EC
18631 echo "/* $configure_input */" >"$tmp/config.h"
18632 cat "$ac_result" >>"$tmp/config.h"
18633 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
ba479fd2
NN
18634 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18635echo "$as_me: $ac_file is unchanged" >&6;}
18636 else
ba479fd2 18637 rm -f $ac_file
a6ccdbab 18638 mv "$tmp/config.h" $ac_file
ba479fd2
NN
18639 fi
18640 else
a6ccdbab
EC
18641 echo "/* $configure_input */"
18642 cat "$ac_result"
ba479fd2 18643 fi
a6ccdbab
EC
18644 rm -f "$tmp/out12"
18645 ;;
dd7f7a6e 18646
a6ccdbab
EC
18647 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
18648echo "$as_me: executing $ac_file commands" >&6;}
18649 ;;
18650 esac
dd7f7a6e
EC
18651
18652
a6ccdbab
EC
18653 case $ac_file$ac_mode in
18654 "default":C)
f1faaabd
NN
18655case ${CONFIG_HEADERS} in
18656 *auto-host.h:config.in*)
18657 echo > cstamp-h ;;
861bb6c1 18658esac
2ed26f6b 18659# Make sure all the subdirs exist.
3b620440 18660for d in $subdirs doc build
2ed26f6b 18661do
2ed26f6b 18662 test -d $d || mkdir $d
2ed26f6b 18663done
93cf819d
BK
18664# If the host supports symlinks, point stage[1234] at ../stage[1234] so
18665# bootstrapping and the installation procedure can still use
18666# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
18667# FLAGS_TO_PASS has been modified to solve the problem there.
18668# This is virtually a duplicate of what happens in configure.lang; we do
18669# an extra check to make sure this only happens if ln -s can be used.
35f06ae4
PB
18670case "$LN_S" in
18671 *-s*)
18672 for d in ${subdirs} ; do
1e6347d8 18673 STARTDIR=`${PWDCMD-pwd}`
4e8a434e 18674 cd $d
6a1b7268 18675 for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
4e8a434e
BK
18676 do
18677 rm -f $t
35f06ae4 18678 $LN_S ../$t $t 2>/dev/null
4e8a434e
BK
18679 done
18680 cd $STARTDIR
35f06ae4
PB
18681 done
18682 ;;
18683esac
ba479fd2 18684 ;;
a6ccdbab 18685
ba479fd2 18686 esac
a6ccdbab 18687done # for ac_tag
cafe096b 18688
ba479fd2
NN
18689
18690{ (exit 0); exit 0; }
18691_ACEOF
861bb6c1 18692chmod +x $CONFIG_STATUS
ba479fd2
NN
18693ac_clean_files=$ac_clean_files_save
18694
18695
18696# configure is writing to config.log, and then calls config.status.
18697# config.status does its own redirection, appending to config.log.
18698# Unfortunately, on DOS this fails, as config.log is still kept open
18699# by configure, so config.status won't be able to write to it; its
18700# output is simply discarded. So we exec the FD to /dev/null,
18701# effectively closing config.log, so it can be properly (re)opened and
18702# appended to by config.status. When coming back to configure, we
18703# need to make the FD available again.
18704if test "$no_create" != yes; then
18705 ac_cs_success=:
18706 ac_config_status_args=
18707 test "$silent" = yes &&
18708 ac_config_status_args="$ac_config_status_args --quiet"
18709 exec 5>/dev/null
18710 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18711 exec 5>>config.log
18712 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18713 # would make configure fail if this is the last instruction.
18714 $ac_cs_success || { (exit 1); exit 1; }
18715fi
861bb6c1 18716