]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure
i386.c (ix86_expand_clear): Use FLAGS_REG.
[thirdparty/gcc.git] / gcc / configure
CommitLineData
005537df 1#! /bin/sh
861bb6c1 2# Guess values for system-dependent variables and create Makefiles.
ab22c1fa 3# Generated by GNU Autoconf 2.61.
861bb6c1 4#
ab22c1fa
CF
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
ab22c1fa
CF
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+"$@"}'='"$@"'
ab22c1fa
CF
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
ab22c1fa
CF
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.
ab22c1fa
CF
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
ab22c1fa 111 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
ba479fd2
NN
112 fi
113done
114
115# Required to use basename.
ab22c1fa
CF
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
ab22c1fa 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.
ab22c1fa 131as_me=`$as_basename -- "$0" ||
ba479fd2
NN
132$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
133 X"$0" : 'X\(//\)$' \| \
ab22c1fa 134 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
ba479fd2 135echo X/"$0" |
ab22c1fa
CF
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
ab22c1fa
CF
150# CDPATH.
151$as_unset CDPATH
a6ccdbab 152
703d89ab 153
ab22c1fa
CF
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
703d89ab
ZW
159fi
160
ab22c1fa
CF
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}
703d89ab 177
ab22c1fa
CF
178exitcode=0
179if as_func_success; then
180 :
181else
182 exitcode=1
183 echo as_func_success failed.
184fi
703d89ab 185
ab22c1fa
CF
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=.
ab22c1fa 226 case $as_dir in
ba479fd2 227 /*)
ab22c1fa
CF
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(
703d89ab
ZW
328 as_lineno_1=$LINENO
329 as_lineno_2=$LINENO
330 test "x$as_lineno_1" != "x$as_lineno_2" &&
ab22c1fa
CF
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
ab22c1fa
CF
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
ab22c1fa
CF
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 '
ab22c1fa
CF
443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
ba479fd2 447 N
ab22c1fa
CF
448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
ba479fd2 450 t loop
ab22c1fa 451 s/-\n.*//
ba479fd2 452 ' >$as_me.lineno &&
ab22c1fa 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
ab22c1fa
CF
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
ab22c1fa
CF
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
ab22c1fa
CF
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
ab22c1fa
CF
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
ab22c1fa
CF
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
ab22c1fa
CF
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
ab22c1fa
CF
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
ab22c1fa 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
ab22c1fa 563ac_clean_files=
ba479fd2 564ac_config_libobj_dir=.
ab22c1fa 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>
ab22c1fa 583#ifdef HAVE_SYS_TYPES_H
ba479fd2
NN
584# include <sys/types.h>
585#endif
ab22c1fa 586#ifdef HAVE_SYS_STAT_H
ba479fd2
NN
587# include <sys/stat.h>
588#endif
ab22c1fa 589#ifdef STDC_HEADERS
ba479fd2
NN
590# include <stdlib.h>
591# include <stddef.h>
592#else
ab22c1fa 593# ifdef HAVE_STDLIB_H
ba479fd2
NN
594# include <stdlib.h>
595# endif
596#endif
ab22c1fa
CF
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
ab22c1fa 603#ifdef HAVE_STRINGS_H
ba479fd2
NN
604# include <strings.h>
605#endif
ab22c1fa 606#ifdef HAVE_INTTYPES_H
ba479fd2 607# include <inttypes.h>
ba479fd2 608#endif
ab22c1fa
CF
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
ab22c1fa
CF
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
683loose_warn
684cxx_compat_warn
685strict_warn
686warn_cflags
687nocommon_flag
688TREEBROWSER
689valgrind_path
690valgrind_path_defines
691valgrind_command
692coverage_flags
693enable_multilib
694enable_decimal_float
695enable_fixed_point
696enable_shared
697TARGET_SYSTEM_ROOT
698TARGET_SYSTEM_ROOT_DEFINE
699CROSS_SYSTEM_HEADER_DIR
700onestep
701SET_MAKE
702AWK
703LN_S
704LN
705RANLIB
706ranlib_flags
707INSTALL
708INSTALL_PROGRAM
709INSTALL_DATA
710make_compare_target
711have_mktemp_command
712MAKEINFO
713BUILD_INFO
714GENERATED_MANPAGES
715FLEX
716BISON
717NM
718AR
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_compilers
772all_gtfiles
773all_lang_makefrags
774all_lang_makefiles
775all_languages
776all_selected_languages
777build_exeext
778build_install_headers_dir
779build_xm_file_list
780build_xm_include_list
781build_xm_defines
782check_languages
783cpp_install_dir
784xmake_file
785tmake_file
786extra_gcc_objs
787extra_headers_list
788extra_objs
789extra_parts
790extra_passes
791extra_programs
792float_h_file
793gcc_config_arguments
794gcc_gxx_include_dir
795host_exeext
796host_xm_file_list
797host_xm_include_list
798host_xm_defines
799out_host_hook_obj
800install
801lang_opt_files
802lang_specs_files
803lang_tree_files
804local_prefix
805md_file
806objc_boehm_gc
807out_file
808out_object_file
809thread_file
810tm_file_list
811tm_include_list
812tm_defines
813tm_p_file_list
814tm_p_include_list
815xm_file_list
816xm_include_list
817xm_defines
818c_target_objs
819cxx_target_objs
820target_cpu_default
821GMPLIBS
822GMPINC
823LIBOBJS
824LTLIBOBJS'
ba479fd2 825ac_subst_files='language_hooks'
ab22c1fa
CF
826 ac_precious_vars='build_alias
827host_alias
828target_alias
829CC
830CFLAGS
831LDFLAGS
832LIBS
833CPPFLAGS
834CPP
835GMPLIBS
836GMPINC'
837
861bb6c1
JL
838
839# Initialize some variables set by options.
ba479fd2
NN
840ac_init_help=
841ac_init_version=false
861bb6c1
JL
842# The variables have the same names as the options, with
843# dashes changed to underlines.
ba479fd2 844cache_file=/dev/null
861bb6c1 845exec_prefix=NONE
861bb6c1 846no_create=
861bb6c1
JL
847no_recursion=
848prefix=NONE
849program_prefix=NONE
850program_suffix=NONE
851program_transform_name=s,x,x,
852silent=
853site=
854srcdir=
861bb6c1
JL
855verbose=
856x_includes=NONE
857x_libraries=NONE
ba479fd2
NN
858
859# Installation directory options.
860# These are left unexpanded so users can "make install exec_prefix=/foo"
861# and all the variables that are supposed to be based on exec_prefix
862# by default will actually change.
863# Use braces instead of parens because sh, perl, etc. also accept them.
ab22c1fa 864# (The list follows the same order as the GNU Coding Standards.)
861bb6c1
JL
865bindir='${exec_prefix}/bin'
866sbindir='${exec_prefix}/sbin'
867libexecdir='${exec_prefix}/libexec'
ab22c1fa
CF
868datarootdir='${prefix}/share'
869datadir='${datarootdir}'
861bb6c1
JL
870sysconfdir='${prefix}/etc'
871sharedstatedir='${prefix}/com'
872localstatedir='${prefix}/var'
861bb6c1
JL
873includedir='${prefix}/include'
874oldincludedir='/usr/include'
ab22c1fa
CF
875docdir='${datarootdir}/doc/${PACKAGE}'
876infodir='${datarootdir}/info'
877htmldir='${docdir}'
878dvidir='${docdir}'
879pdfdir='${docdir}'
880psdir='${docdir}'
881libdir='${exec_prefix}/lib'
882localedir='${datarootdir}/locale'
883mandir='${datarootdir}/man'
861bb6c1 884
861bb6c1 885ac_prev=
ab22c1fa 886ac_dashdash=
861bb6c1
JL
887for ac_option
888do
861bb6c1
JL
889 # If the previous option needs an argument, assign it.
890 if test -n "$ac_prev"; then
ab22c1fa 891 eval $ac_prev=\$ac_option
861bb6c1
JL
892 ac_prev=
893 continue
894 fi
895
ab22c1fa
CF
896 case $ac_option in
897 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
898 *) ac_optarg=yes ;;
899 esac
861bb6c1
JL
900
901 # Accept the important Cygnus configure options, so we can diagnose typos.
902
ab22c1fa
CF
903 case $ac_dashdash$ac_option in
904 --)
905 ac_dashdash=yes ;;
861bb6c1
JL
906
907 -bindir | --bindir | --bindi | --bind | --bin | --bi)
908 ac_prev=bindir ;;
909 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
ba479fd2 910 bindir=$ac_optarg ;;
861bb6c1
JL
911
912 -build | --build | --buil | --bui | --bu)
ba479fd2 913 ac_prev=build_alias ;;
861bb6c1 914 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ba479fd2 915 build_alias=$ac_optarg ;;
861bb6c1
JL
916
917 -cache-file | --cache-file | --cache-fil | --cache-fi \
918 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
919 ac_prev=cache_file ;;
920 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
921 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
ba479fd2
NN
922 cache_file=$ac_optarg ;;
923
924 --config-cache | -C)
925 cache_file=config.cache ;;
861bb6c1 926
ab22c1fa 927 -datadir | --datadir | --datadi | --datad)
861bb6c1 928 ac_prev=datadir ;;
ab22c1fa 929 -datadir=* | --datadir=* | --datadi=* | --datad=*)
ba479fd2 930 datadir=$ac_optarg ;;
861bb6c1 931
ab22c1fa
CF
932 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
933 | --dataroo | --dataro | --datar)
934 ac_prev=datarootdir ;;
935 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
936 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
937 datarootdir=$ac_optarg ;;
938
861bb6c1 939 -disable-* | --disable-*)
ba479fd2 940 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
861bb6c1 941 # Reject names that are not valid shell variable names.
ab22c1fa 942 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
943 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
944 { (exit 1); exit 1; }; }
ab22c1fa
CF
945 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
946 eval enable_$ac_feature=no ;;
947
948 -docdir | --docdir | --docdi | --doc | --do)
949 ac_prev=docdir ;;
950 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
951 docdir=$ac_optarg ;;
952
953 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
954 ac_prev=dvidir ;;
955 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
956 dvidir=$ac_optarg ;;
861bb6c1
JL
957
958 -enable-* | --enable-*)
ba479fd2 959 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
861bb6c1 960 # Reject names that are not valid shell variable names.
ab22c1fa 961 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
962 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
963 { (exit 1); exit 1; }; }
ab22c1fa
CF
964 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
965 eval enable_$ac_feature=\$ac_optarg ;;
861bb6c1
JL
966
967 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
968 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
969 | --exec | --exe | --ex)
970 ac_prev=exec_prefix ;;
971 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
972 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
973 | --exec=* | --exe=* | --ex=*)
ba479fd2 974 exec_prefix=$ac_optarg ;;
861bb6c1
JL
975
976 -gas | --gas | --ga | --g)
977 # Obsolete; use --with-gas.
978 with_gas=yes ;;
979
ba479fd2
NN
980 -help | --help | --hel | --he | -h)
981 ac_init_help=long ;;
982 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
983 ac_init_help=recursive ;;
984 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
985 ac_init_help=short ;;
861bb6c1
JL
986
987 -host | --host | --hos | --ho)
ba479fd2 988 ac_prev=host_alias ;;
861bb6c1 989 -host=* | --host=* | --hos=* | --ho=*)
ba479fd2 990 host_alias=$ac_optarg ;;
861bb6c1 991
ab22c1fa
CF
992 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
993 ac_prev=htmldir ;;
994 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
995 | --ht=*)
996 htmldir=$ac_optarg ;;
997
861bb6c1
JL
998 -includedir | --includedir | --includedi | --included | --include \
999 | --includ | --inclu | --incl | --inc)
1000 ac_prev=includedir ;;
1001 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1002 | --includ=* | --inclu=* | --incl=* | --inc=*)
ba479fd2 1003 includedir=$ac_optarg ;;
861bb6c1
JL
1004
1005 -infodir | --infodir | --infodi | --infod | --info | --inf)
1006 ac_prev=infodir ;;
1007 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
ba479fd2 1008 infodir=$ac_optarg ;;
861bb6c1
JL
1009
1010 -libdir | --libdir | --libdi | --libd)
1011 ac_prev=libdir ;;
1012 -libdir=* | --libdir=* | --libdi=* | --libd=*)
ba479fd2 1013 libdir=$ac_optarg ;;
861bb6c1
JL
1014
1015 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1016 | --libexe | --libex | --libe)
1017 ac_prev=libexecdir ;;
1018 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1019 | --libexe=* | --libex=* | --libe=*)
ba479fd2 1020 libexecdir=$ac_optarg ;;
861bb6c1 1021
ab22c1fa
CF
1022 -localedir | --localedir | --localedi | --localed | --locale)
1023 ac_prev=localedir ;;
1024 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1025 localedir=$ac_optarg ;;
1026
861bb6c1 1027 -localstatedir | --localstatedir | --localstatedi | --localstated \
ab22c1fa 1028 | --localstate | --localstat | --localsta | --localst | --locals)
861bb6c1
JL
1029 ac_prev=localstatedir ;;
1030 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
ab22c1fa 1031 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
ba479fd2 1032 localstatedir=$ac_optarg ;;
861bb6c1
JL
1033
1034 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1035 ac_prev=mandir ;;
1036 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
ba479fd2 1037 mandir=$ac_optarg ;;
861bb6c1
JL
1038
1039 -nfp | --nfp | --nf)
1040 # Obsolete; use --without-fp.
1041 with_fp=no ;;
1042
1043 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
ba479fd2 1044 | --no-cr | --no-c | -n)
861bb6c1
JL
1045 no_create=yes ;;
1046
1047 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1048 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1049 no_recursion=yes ;;
1050
1051 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1052 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1053 | --oldin | --oldi | --old | --ol | --o)
1054 ac_prev=oldincludedir ;;
1055 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1056 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1057 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
ba479fd2 1058 oldincludedir=$ac_optarg ;;
861bb6c1
JL
1059
1060 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1061 ac_prev=prefix ;;
1062 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
ba479fd2 1063 prefix=$ac_optarg ;;
861bb6c1
JL
1064
1065 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1066 | --program-pre | --program-pr | --program-p)
1067 ac_prev=program_prefix ;;
1068 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1069 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
ba479fd2 1070 program_prefix=$ac_optarg ;;
861bb6c1
JL
1071
1072 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1073 | --program-suf | --program-su | --program-s)
1074 ac_prev=program_suffix ;;
1075 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1076 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
ba479fd2 1077 program_suffix=$ac_optarg ;;
861bb6c1
JL
1078
1079 -program-transform-name | --program-transform-name \
1080 | --program-transform-nam | --program-transform-na \
1081 | --program-transform-n | --program-transform- \
1082 | --program-transform | --program-transfor \
1083 | --program-transfo | --program-transf \
1084 | --program-trans | --program-tran \
1085 | --progr-tra | --program-tr | --program-t)
1086 ac_prev=program_transform_name ;;
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=*)
ba479fd2 1094 program_transform_name=$ac_optarg ;;
861bb6c1 1095
ab22c1fa
CF
1096 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1097 ac_prev=pdfdir ;;
1098 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1099 pdfdir=$ac_optarg ;;
1100
1101 -psdir | --psdir | --psdi | --psd | --ps)
1102 ac_prev=psdir ;;
1103 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1104 psdir=$ac_optarg ;;
1105
861bb6c1
JL
1106 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1107 | -silent | --silent | --silen | --sile | --sil)
1108 silent=yes ;;
1109
1110 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1111 ac_prev=sbindir ;;
1112 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1113 | --sbi=* | --sb=*)
ba479fd2 1114 sbindir=$ac_optarg ;;
861bb6c1
JL
1115
1116 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1117 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1118 | --sharedst | --shareds | --shared | --share | --shar \
1119 | --sha | --sh)
1120 ac_prev=sharedstatedir ;;
1121 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1122 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1123 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1124 | --sha=* | --sh=*)
ba479fd2 1125 sharedstatedir=$ac_optarg ;;
861bb6c1
JL
1126
1127 -site | --site | --sit)
1128 ac_prev=site ;;
1129 -site=* | --site=* | --sit=*)
ba479fd2 1130 site=$ac_optarg ;;
861bb6c1
JL
1131
1132 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1133 ac_prev=srcdir ;;
1134 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
ba479fd2 1135 srcdir=$ac_optarg ;;
861bb6c1
JL
1136
1137 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1138 | --syscon | --sysco | --sysc | --sys | --sy)
1139 ac_prev=sysconfdir ;;
1140 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1141 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
ba479fd2 1142 sysconfdir=$ac_optarg ;;
861bb6c1
JL
1143
1144 -target | --target | --targe | --targ | --tar | --ta | --t)
ba479fd2 1145 ac_prev=target_alias ;;
861bb6c1 1146 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
ba479fd2 1147 target_alias=$ac_optarg ;;
861bb6c1
JL
1148
1149 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1150 verbose=yes ;;
1151
ba479fd2
NN
1152 -version | --version | --versio | --versi | --vers | -V)
1153 ac_init_version=: ;;
861bb6c1
JL
1154
1155 -with-* | --with-*)
ba479fd2 1156 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
861bb6c1 1157 # Reject names that are not valid shell variable names.
ab22c1fa 1158 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
1159 { echo "$as_me: error: invalid package name: $ac_package" >&2
1160 { (exit 1); exit 1; }; }
ab22c1fa
CF
1161 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1162 eval with_$ac_package=\$ac_optarg ;;
861bb6c1
JL
1163
1164 -without-* | --without-*)
ba479fd2 1165 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
861bb6c1 1166 # Reject names that are not valid shell variable names.
ab22c1fa 1167 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
ba479fd2
NN
1168 { echo "$as_me: error: invalid package name: $ac_package" >&2
1169 { (exit 1); exit 1; }; }
ab22c1fa
CF
1170 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1171 eval with_$ac_package=no ;;
861bb6c1
JL
1172
1173 --x)
1174 # Obsolete; use --with-x.
1175 with_x=yes ;;
1176
1177 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1178 | --x-incl | --x-inc | --x-in | --x-i)
1179 ac_prev=x_includes ;;
1180 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1181 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
ba479fd2 1182 x_includes=$ac_optarg ;;
861bb6c1
JL
1183
1184 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1185 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1186 ac_prev=x_libraries ;;
1187 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1188 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
ba479fd2 1189 x_libraries=$ac_optarg ;;
861bb6c1 1190
ba479fd2
NN
1191 -*) { echo "$as_me: error: unrecognized option: $ac_option
1192Try \`$0 --help' for more information." >&2
1193 { (exit 1); exit 1; }; }
861bb6c1
JL
1194 ;;
1195
ba479fd2
NN
1196 *=*)
1197 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1198 # Reject names that are not valid shell variable names.
1199 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1200 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1201 { (exit 1); exit 1; }; }
ab22c1fa 1202 eval $ac_envvar=\$ac_optarg
ba479fd2
NN
1203 export $ac_envvar ;;
1204
861bb6c1 1205 *)
ba479fd2
NN
1206 # FIXME: should be removed in autoconf 3.0.
1207 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1208 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1209 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1210 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
861bb6c1
JL
1211 ;;
1212
1213 esac
1214done
1215
1216if test -n "$ac_prev"; then
ba479fd2
NN
1217 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1218 { echo "$as_me: error: missing argument to $ac_option" >&2
1219 { (exit 1); exit 1; }; }
63cf211a 1220fi
63cf211a 1221
ab22c1fa
CF
1222# Be sure to have absolute directory names.
1223for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1224 datadir sysconfdir sharedstatedir localstatedir includedir \
1225 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1226 libdir localedir mandir
861bb6c1 1227do
ab22c1fa 1228 eval ac_val=\$$ac_var
ba479fd2 1229 case $ac_val in
ab22c1fa
CF
1230 [\\/$]* | ?:[\\/]* ) continue;;
1231 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
a3bba767 1232 esac
ab22c1fa
CF
1233 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1234 { (exit 1); exit 1; }; }
a3bba767
JJ
1235done
1236
1237# There might be people who depend on the old broken behavior: `$host'
1238# used to hold the argument of --host etc.
1239# FIXME: To remove some day.
1240build=$build_alias
1241host=$host_alias
ba479fd2
NN
1242target=$target_alias
1243
1244# FIXME: To remove some day.
1245if test "x$host_alias" != x; then
1246 if test "x$build_alias" = x; then
1247 cross_compiling=maybe
1248 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1249 If a cross compiler is detected then cross compile mode will be used." >&2
1250 elif test "x$build_alias" != "x$host_alias"; then
1251 cross_compiling=yes
1252 fi
1253fi
6e3f3080 1254
ba479fd2
NN
1255ac_tool_prefix=
1256test -n "$host_alias" && ac_tool_prefix=$host_alias-
1257
1258test "$silent" = yes && exec 6>/dev/null
861bb6c1 1259
861bb6c1 1260
ab22c1fa
CF
1261ac_pwd=`pwd` && test -n "$ac_pwd" &&
1262ac_ls_di=`ls -di .` &&
1263ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1264 { echo "$as_me: error: Working directory cannot be determined" >&2
1265 { (exit 1); exit 1; }; }
1266test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1267 { echo "$as_me: error: pwd does not report name of working directory" >&2
1268 { (exit 1); exit 1; }; }
1269
1270
861bb6c1
JL
1271# Find the source files, if location was not specified.
1272if test -z "$srcdir"; then
1273 ac_srcdir_defaulted=yes
ab22c1fa
CF
1274 # Try the directory containing this script, then the parent directory.
1275 ac_confdir=`$as_dirname -- "$0" ||
ba479fd2 1276$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
1277 X"$0" : 'X\(//\)[^/]' \| \
1278 X"$0" : 'X\(//\)$' \| \
ab22c1fa 1279 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
ba479fd2 1280echo X"$0" |
ab22c1fa
CF
1281 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1282 s//\1/
1283 q
1284 }
1285 /^X\(\/\/\)[^/].*/{
1286 s//\1/
1287 q
1288 }
1289 /^X\(\/\/\)$/{
1290 s//\1/
1291 q
1292 }
1293 /^X\(\/\).*/{
1294 s//\1/
1295 q
1296 }
1297 s/.*/./; q'`
861bb6c1 1298 srcdir=$ac_confdir
ab22c1fa 1299 if test ! -r "$srcdir/$ac_unique_file"; then
861bb6c1
JL
1300 srcdir=..
1301 fi
1302else
1303 ac_srcdir_defaulted=no
1304fi
ab22c1fa
CF
1305if test ! -r "$srcdir/$ac_unique_file"; then
1306 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1307 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
ba479fd2 1308 { (exit 1); exit 1; }; }
dd7f7a6e 1309fi
ab22c1fa
CF
1310ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1311ac_abs_confdir=`(
1312 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
dd7f7a6e 1313 { (exit 1); exit 1; }; }
ab22c1fa
CF
1314 pwd)`
1315# When building in place, set srcdir=.
1316if test "$ac_abs_confdir" = "$ac_pwd"; then
1317 srcdir=.
1318fi
1319# Remove unnecessary trailing slashes from srcdir.
1320# Double slashes in file names in object file debugging info
1321# mess up M-x gdb in Emacs.
1322case $srcdir in
1323*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1324esac
1325for ac_var in $ac_precious_vars; do
1326 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1327 eval ac_env_${ac_var}_value=\$${ac_var}
1328 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1329 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1330done
63cf211a 1331
ba479fd2
NN
1332#
1333# Report the --help message.
1334#
1335if test "$ac_init_help" = "long"; then
1336 # Omit some internal or obsolete options to make the list less imposing.
1337 # This message is too long to be a string in the A/UX 3.1 sh.
1338 cat <<_ACEOF
1339\`configure' configures this package to adapt to many kinds of systems.
861bb6c1 1340
ba479fd2 1341Usage: $0 [OPTION]... [VAR=VALUE]...
861bb6c1 1342
ba479fd2
NN
1343To assign environment variables (e.g., CC, CFLAGS...), specify them as
1344VAR=VALUE. See below for descriptions of some of the useful variables.
861bb6c1 1345
ba479fd2 1346Defaults for the options are specified in brackets.
861bb6c1 1347
ba479fd2
NN
1348Configuration:
1349 -h, --help display this help and exit
1350 --help=short display options specific to this package
1351 --help=recursive display the short help of all the included packages
1352 -V, --version display version information and exit
1353 -q, --quiet, --silent do not print \`checking...' messages
1354 --cache-file=FILE cache test results in FILE [disabled]
1355 -C, --config-cache alias for \`--cache-file=config.cache'
1356 -n, --no-create do not create output files
1357 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1358
ba479fd2
NN
1359Installation directories:
1360 --prefix=PREFIX install architecture-independent files in PREFIX
86da66b5 1361 [$ac_default_prefix]
ba479fd2 1362 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
86da66b5 1363 [PREFIX]
861bb6c1 1364
ba479fd2
NN
1365By default, \`make install' will install all the files in
1366\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1367an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1368for instance \`--prefix=\$HOME'.
13c22933 1369
ba479fd2 1370For better control, use the options below.
13c22933 1371
ba479fd2
NN
1372Fine tuning of the installation directories:
1373 --bindir=DIR user executables [EPREFIX/bin]
1374 --sbindir=DIR system admin executables [EPREFIX/sbin]
1375 --libexecdir=DIR program executables [EPREFIX/libexec]
ba479fd2
NN
1376 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1377 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1378 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1379 --libdir=DIR object code libraries [EPREFIX/lib]
1380 --includedir=DIR C header files [PREFIX/include]
1381 --oldincludedir=DIR C header files for non-gcc [/usr/include]
ab22c1fa
CF
1382 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1383 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1384 --infodir=DIR info documentation [DATAROOTDIR/info]
1385 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1386 --mandir=DIR man documentation [DATAROOTDIR/man]
1387 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1388 --htmldir=DIR html documentation [DOCDIR]
1389 --dvidir=DIR dvi documentation [DOCDIR]
1390 --pdfdir=DIR pdf documentation [DOCDIR]
1391 --psdir=DIR ps documentation [DOCDIR]
ba479fd2 1392_ACEOF
13c22933 1393
ba479fd2 1394 cat <<\_ACEOF
13c22933 1395
ba479fd2
NN
1396Program names:
1397 --program-prefix=PREFIX prepend PREFIX to installed program names
1398 --program-suffix=SUFFIX append SUFFIX to installed program names
1399 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
13c22933 1400
ba479fd2
NN
1401System types:
1402 --build=BUILD configure for building on BUILD [guessed]
1403 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1404 --target=TARGET configure for building compilers for TARGET [HOST]
1405_ACEOF
13c22933
JJ
1406fi
1407
ba479fd2 1408if test -n "$ac_init_help"; then
13c22933 1409
ba479fd2 1410 cat <<\_ACEOF
13c22933 1411
ba479fd2
NN
1412Optional Features:
1413 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1414 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
03787dfd
KC
1415 --enable-generated-files-in-srcdir
1416 put copies of generated files in source dir
1417 intended for creating source tarballs for users
1418 without texinfo bison or flex.
3bbd5a19 1419 --enable-werror-always enable -Werror despite compiler version
ba479fd2
NN
1420 --enable-checking=LIST
1421 enable expensive run-time checks. With LIST,
1422 enable only specific categories of checks.
cdce5c16 1423 Categories are: yes,no,all,none,release.
3089f8b5 1424 Flags are: assert,df,fold,gc,gcac,misc,
7e98624c 1425 rtlflag,rtl,runtime,tree,valgrind,types.
74ee1642 1426 --enable-mapped-location location_t is fileline integer cookie
ba479fd2 1427 --enable-coverage=LEVEL
fb38008e 1428 enable compiler's code coverage collection.
ba479fd2
NN
1429 Use to measure compiler performance and locate
1430 unused parts of the compiler. With LEVEL, specify
1431 optimization. Values are opt, noopt,
1432 default is noopt
1433 --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
1434 --enable-multilib enable library support for multiple ABIs
1435 --enable-__cxa_atexit enable __cxa_atexit for C++
79b87c74
MM
1436 --enable-decimal-float={no,yes,bid,dpd}
1437 enable decimal float extension to C. Selecting 'bid'
1438 or 'dpd' choses which decimal floating point format
1439 to use
ab22c1fa 1440 --enable-fixed-point enable fixed-point arithmetic extension to C
ba479fd2
NN
1441 --enable-threads enable thread usage for target GCC
1442 --enable-threads=LIB use LIB thread package for target GCC
8dea1cca
DD
1443 --enable-tls enable or disable generation of tls code
1444 overriding the assembler check for tls support
ba479fd2
NN
1445 --enable-objc-gc enable the use of Boehm's garbage collector with
1446 the GNU Objective-C runtime
1447 --disable-shared don't provide a shared libgcc
1448 --enable-intermodule build the compiler in one step
f3c9f174 1449 --enable-languages=LIST specify which front-ends to build
dfb77e37 1450 --disable-rpath do not hardcode runtime library paths
ba479fd2
NN
1451 --enable-initfini-array use .init_array/.fini_array sections
1452 --enable-sjlj-exceptions
1453 arrange to use setjmp/longjmp exception handling
7f970b70 1454 --enable-secureplt enable -msecure-plt by default for PowerPC
ba479fd2
NN
1455 --disable-win32-registry
1456 disable lookup of installation paths in the
1457 Registry on Windows hosts
1458 --enable-win32-registry enable registry lookup (default)
1459 --enable-win32-registry=KEY
1460 use KEY instead of GCC version as the last portion
1461 of the registry key
1462 --enable-maintainer-mode
1463 enable make rules and dependencies not useful
1464 (and sometimes confusing) to the casual installer
1465 --enable-version-specific-runtime-libs
1466 specify that runtime libraries should be
1467 installed in a compiler-specific directory
093e61a6 1468
ba479fd2
NN
1469Optional Packages:
1470 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1471 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1546bb64 1472 --with-build-libsubdir=DIR Directory where to find libraries for build system
ba479fd2
NN
1473 --with-local-prefix=DIR specifies directory to put local include
1474 --with-gxx-include-dir=DIR
1475 specifies directory to put g++ header files
1476 --with-cpp-install-dir=DIR
1477 install the user visible C preprocessor in DIR
1478 (relative to PREFIX) as well as PREFIX/bin
1479 --with-gnu-ld arrange to work with GNU ld.
1480 --with-ld arrange to use the specified ld (full pathname)
d594623a 1481 --with-demangler-in-ld try to use demangler in GNU ld.
ba479fd2
NN
1482 --with-gnu-as arrange to work with GNU as
1483 --with-as arrange to use the specified as (full pathname)
1484 --with-stabs arrange to use stabs instead of host debug format
1485 --with-dwarf2 force the default debug format to be DWARF 2
160633c6
MM
1486 --with-build-sysroot=sysroot
1487 use sysroot as the system root during the build
ba479fd2 1488 --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
dfb77e37
KC
1489 --with-gnu-ld assume the C compiler uses GNU ld default=no
1490 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1491 --without-libiconv-prefix don't search for libiconv in includedir and libdir
443728bb 1492 --with-system-libunwind use installed libunwind
ed965309 1493 --with-long-double-128 Use 128-bit long double by default.
59415997 1494 --with-gc={page,zone} choose the garbage collection mechanism to use
ba479fd2
NN
1495 with the compiler
1496 --with-system-zlib use installed libz
22482f74
MS
1497 --with-slibdir=DIR shared libraries in DIR [LIBDIR]
1498 --with-datarootdir=DIR Use DIR as the data root [PREFIX/share]
1499 --with-docdir=DIR Install documentation in DIR [DATAROOTDIR]
1500 --with-htmldir=DIR html documentation in in DIR [DOCDIR]
13c22933 1501
ba479fd2
NN
1502Some influential environment variables:
1503 CC C compiler command
1504 CFLAGS C compiler flags
1505 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1506 nonstandard directory <lib dir>
ab22c1fa
CF
1507 LIBS libraries to pass to the linker, e.g. -l<library>
1508 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1509 you have headers in a nonstandard directory <include dir>
ba479fd2 1510 CPP C preprocessor
6de9cd9a
DN
1511 GMPLIBS How to link GMP
1512 GMPINC How to find GMP include files
13c22933 1513
ba479fd2
NN
1514Use these variables to override the choices made by `configure' or to help
1515it to find libraries and programs with nonstandard names/locations.
73458fb7 1516
ba479fd2 1517_ACEOF
ab22c1fa 1518ac_status=$?
ba479fd2 1519fi
6e3f3080 1520
ba479fd2
NN
1521if test "$ac_init_help" = "recursive"; then
1522 # If there are subdirs, report their specific --help.
ba479fd2 1523 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
ab22c1fa 1524 test -d "$ac_dir" || continue
ba479fd2
NN
1525 ac_builddir=.
1526
ab22c1fa
CF
1527case "$ac_dir" in
1528.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1529*)
ba479fd2 1530 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ab22c1fa
CF
1531 # A ".." for each directory in $ac_dir_suffix.
1532 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1533 case $ac_top_builddir_sub in
1534 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1535 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1536 esac ;;
1537esac
1538ac_abs_top_builddir=$ac_pwd
1539ac_abs_builddir=$ac_pwd$ac_dir_suffix
1540# for backward compatibility:
1541ac_top_builddir=$ac_top_build_prefix
ba479fd2
NN
1542
1543case $srcdir in
ab22c1fa 1544 .) # We are building in place.
ba479fd2 1545 ac_srcdir=.
ab22c1fa
CF
1546 ac_top_srcdir=$ac_top_builddir_sub
1547 ac_abs_top_srcdir=$ac_pwd ;;
1548 [\\/]* | ?:[\\/]* ) # Absolute name.
ba479fd2 1549 ac_srcdir=$srcdir$ac_dir_suffix;
ab22c1fa
CF
1550 ac_top_srcdir=$srcdir
1551 ac_abs_top_srcdir=$srcdir ;;
1552 *) # Relative name.
1553 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1554 ac_top_srcdir=$ac_top_build_prefix$srcdir
1555 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
86da66b5 1556esac
ab22c1fa
CF
1557ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1558
1559 cd "$ac_dir" || { ac_status=$?; continue; }
1560 # Check for guested configure.
1561 if test -f "$ac_srcdir/configure.gnu"; then
1562 echo &&
1563 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1564 elif test -f "$ac_srcdir/configure"; then
1565 echo &&
1566 $SHELL "$ac_srcdir/configure" --help=recursive
ba479fd2
NN
1567 else
1568 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ab22c1fa
CF
1569 fi || ac_status=$?
1570 cd "$ac_pwd" || { ac_status=$?; break; }
ba479fd2
NN
1571 done
1572fi
1573
ab22c1fa 1574test -n "$ac_init_help" && exit $ac_status
ba479fd2
NN
1575if $ac_init_version; then
1576 cat <<\_ACEOF
ab22c1fa
CF
1577configure
1578generated by GNU Autoconf 2.61
ba479fd2 1579
ab22c1fa
CF
1580Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
15812002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
ba479fd2
NN
1582This configure script is free software; the Free Software Foundation
1583gives unlimited permission to copy, distribute and modify it.
1584_ACEOF
ab22c1fa 1585 exit
ba479fd2 1586fi
ab22c1fa 1587cat >config.log <<_ACEOF
ba479fd2
NN
1588This file contains any messages produced by compilers while
1589running configure, to aid debugging if configure makes a mistake.
1590
1591It was created by $as_me, which was
ab22c1fa 1592generated by GNU Autoconf 2.61. Invocation command line was
ba479fd2
NN
1593
1594 $ $0 $@
1595
1596_ACEOF
ab22c1fa 1597exec 5>>config.log
ba479fd2
NN
1598{
1599cat <<_ASUNAME
1600## --------- ##
1601## Platform. ##
1602## --------- ##
1603
1604hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1605uname -m = `(uname -m) 2>/dev/null || echo unknown`
1606uname -r = `(uname -r) 2>/dev/null || echo unknown`
1607uname -s = `(uname -s) 2>/dev/null || echo unknown`
1608uname -v = `(uname -v) 2>/dev/null || echo unknown`
1609
1610/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1611/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1612
1613/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1614/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1615/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
ab22c1fa 1616/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
ba479fd2
NN
1617/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1618/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1619/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1620
1621_ASUNAME
1622
1623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1624for as_dir in $PATH
1625do
1626 IFS=$as_save_IFS
1627 test -z "$as_dir" && as_dir=.
1628 echo "PATH: $as_dir"
1629done
ab22c1fa 1630IFS=$as_save_IFS
ba479fd2
NN
1631
1632} >&5
1633
1634cat >&5 <<_ACEOF
1635
1636
1637## ----------- ##
1638## Core tests. ##
1639## ----------- ##
1640
1641_ACEOF
1642
1643
1644# Keep a trace of the command line.
1645# Strip out --no-create and --no-recursion so they do not pile up.
1646# Strip out --silent because we don't want to record it for future runs.
1647# Also quote any args containing shell meta-characters.
1648# Make two passes to allow for proper duplicate-argument suppression.
1649ac_configure_args=
1650ac_configure_args0=
1651ac_configure_args1=
ba479fd2
NN
1652ac_must_keep_next=false
1653for ac_pass in 1 2
1654do
1655 for ac_arg
1656 do
1657 case $ac_arg in
1658 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1659 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1660 | -silent | --silent | --silen | --sile | --sil)
1661 continue ;;
ab22c1fa 1662 *\'*)
ba479fd2
NN
1663 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1664 esac
1665 case $ac_pass in
1666 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1667 2)
1668 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1669 if test $ac_must_keep_next = true; then
86da66b5 1670 ac_must_keep_next=false # Got value, back to normal.
ba479fd2 1671 else
86da66b5
HPN
1672 case $ac_arg in
1673 *=* | --config-cache | -C | -disable-* | --disable-* \
1674 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1675 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1676 | -with-* | --with-* | -without-* | --without-* | --x)
1677 case "$ac_configure_args0 " in
1678 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1679 esac
1680 ;;
1681 -* ) ac_must_keep_next=true ;;
1682 esac
ba479fd2 1683 fi
ab22c1fa 1684 ac_configure_args="$ac_configure_args '$ac_arg'"
ba479fd2
NN
1685 ;;
1686 esac
1687 done
1688done
1689$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1690$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1691
1692# When interrupted or exit'd, cleanup temporary files, and complete
1693# config.log. We remove comments because anyway the quotes in there
1694# would cause problems or look ugly.
ab22c1fa
CF
1695# WARNING: Use '\'' to represent an apostrophe within the trap.
1696# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
ba479fd2
NN
1697trap 'exit_status=$?
1698 # Save into config.log some information that might help in debugging.
1699 {
1700 echo
1701
1702 cat <<\_ASBOX
1703## ---------------- ##
1704## Cache variables. ##
1705## ---------------- ##
1706_ASBOX
1707 echo
1708 # The following way of writing the cache mishandles newlines in values,
ab22c1fa
CF
1709(
1710 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1711 eval ac_val=\$$ac_var
1712 case $ac_val in #(
1713 *${as_nl}*)
1714 case $ac_var in #(
1715 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1716echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1717 esac
1718 case $ac_var in #(
1719 _ | IFS | as_nl) ;; #(
1720 *) $as_unset $ac_var ;;
1721 esac ;;
1722 esac
1723 done
ba479fd2 1724 (set) 2>&1 |
ab22c1fa
CF
1725 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1726 *${as_nl}ac_space=\ *)
ba479fd2 1727 sed -n \
ab22c1fa
CF
1728 "s/'\''/'\''\\\\'\'''\''/g;
1729 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1730 ;; #(
ba479fd2 1731 *)
ab22c1fa 1732 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
ba479fd2 1733 ;;
ab22c1fa
CF
1734 esac |
1735 sort
1736)
ba479fd2
NN
1737 echo
1738
1739 cat <<\_ASBOX
1740## ----------------- ##
1741## Output variables. ##
1742## ----------------- ##
1743_ASBOX
1744 echo
1745 for ac_var in $ac_subst_vars
1746 do
ab22c1fa
CF
1747 eval ac_val=\$$ac_var
1748 case $ac_val in
1749 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1750 esac
1751 echo "$ac_var='\''$ac_val'\''"
ba479fd2
NN
1752 done | sort
1753 echo
1754
1755 if test -n "$ac_subst_files"; then
1756 cat <<\_ASBOX
ab22c1fa
CF
1757## ------------------- ##
1758## File substitutions. ##
1759## ------------------- ##
ba479fd2
NN
1760_ASBOX
1761 echo
1762 for ac_var in $ac_subst_files
1763 do
ab22c1fa
CF
1764 eval ac_val=\$$ac_var
1765 case $ac_val in
1766 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1767 esac
1768 echo "$ac_var='\''$ac_val'\''"
ba479fd2
NN
1769 done | sort
1770 echo
1771 fi
1772
1773 if test -s confdefs.h; then
1774 cat <<\_ASBOX
1775## ----------- ##
1776## confdefs.h. ##
1777## ----------- ##
1778_ASBOX
1779 echo
ab22c1fa 1780 cat confdefs.h
ba479fd2
NN
1781 echo
1782 fi
1783 test "$ac_signal" != 0 &&
1784 echo "$as_me: caught signal $ac_signal"
1785 echo "$as_me: exit $exit_status"
1786 } >&5
ab22c1fa
CF
1787 rm -f core *.core core.conftest.* &&
1788 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
ba479fd2 1789 exit $exit_status
ab22c1fa 1790' 0
ba479fd2
NN
1791for ac_signal in 1 2 13 15; do
1792 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1793done
1794ac_signal=0
1795
1796# confdefs.h avoids OS command line length limits that DEFS can exceed.
ab22c1fa 1797rm -f -r conftest* confdefs.h
ba479fd2
NN
1798
1799# Predefined preprocessor variables.
1800
1801cat >>confdefs.h <<_ACEOF
1802#define PACKAGE_NAME "$PACKAGE_NAME"
1803_ACEOF
1804
1805
1806cat >>confdefs.h <<_ACEOF
1807#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1808_ACEOF
1809
1810
1811cat >>confdefs.h <<_ACEOF
1812#define PACKAGE_VERSION "$PACKAGE_VERSION"
1813_ACEOF
1814
1815
1816cat >>confdefs.h <<_ACEOF
1817#define PACKAGE_STRING "$PACKAGE_STRING"
1818_ACEOF
1819
1820
1821cat >>confdefs.h <<_ACEOF
1822#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1823_ACEOF
1824
1825
1826# Let the site file select an alternate cache file if it wants to.
1827# Prefer explicitly selected file to automatically selected ones.
ab22c1fa
CF
1828if test -n "$CONFIG_SITE"; then
1829 set x "$CONFIG_SITE"
1830elif test "x$prefix" != xNONE; then
1831 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1832else
1833 set x "$ac_default_prefix/share/config.site" \
1834 "$ac_default_prefix/etc/config.site"
ba479fd2 1835fi
ab22c1fa
CF
1836shift
1837for ac_site_file
1838do
ba479fd2
NN
1839 if test -r "$ac_site_file"; then
1840 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1841echo "$as_me: loading site script $ac_site_file" >&6;}
1842 sed 's/^/| /' "$ac_site_file" >&5
1843 . "$ac_site_file"
1844 fi
1845done
1846
1847if test -r "$cache_file"; then
1848 # Some versions of bash will fail to source /dev/null (special
1849 # files actually), so we avoid doing that.
1850 if test -f "$cache_file"; then
1851 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1852echo "$as_me: loading cache $cache_file" >&6;}
1853 case $cache_file in
ab22c1fa
CF
1854 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1855 *) . "./$cache_file";;
ba479fd2
NN
1856 esac
1857 fi
1858else
1859 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1860echo "$as_me: creating cache $cache_file" >&6;}
1861 >$cache_file
1862fi
1863
1864# Check that the precious variables saved in the cache have kept the same
1865# value.
1866ac_cache_corrupted=false
ab22c1fa 1867for ac_var in $ac_precious_vars; do
ba479fd2
NN
1868 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1869 eval ac_new_set=\$ac_env_${ac_var}_set
ab22c1fa
CF
1870 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1871 eval ac_new_val=\$ac_env_${ac_var}_value
ba479fd2
NN
1872 case $ac_old_set,$ac_new_set in
1873 set,)
1874 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1875echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1876 ac_cache_corrupted=: ;;
1877 ,set)
1878 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1879echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1880 ac_cache_corrupted=: ;;
1881 ,);;
1882 *)
1883 if test "x$ac_old_val" != "x$ac_new_val"; then
86da66b5 1884 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ba479fd2 1885echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
86da66b5 1886 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
ba479fd2 1887echo "$as_me: former value: $ac_old_val" >&2;}
86da66b5 1888 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
ba479fd2 1889echo "$as_me: current value: $ac_new_val" >&2;}
86da66b5 1890 ac_cache_corrupted=:
ba479fd2
NN
1891 fi;;
1892 esac
1893 # Pass precious variables to config.status.
1894 if test "$ac_new_set" = set; then
1895 case $ac_new_val in
ab22c1fa 1896 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
ba479fd2
NN
1897 *) ac_arg=$ac_var=$ac_new_val ;;
1898 esac
1899 case " $ac_configure_args " in
1900 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1901 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1902 esac
1903 fi
1904done
1905if $ac_cache_corrupted; then
1906 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1907echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1908 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1909echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1910 { (exit 1); exit 1; }; }
1911fi
1912
ba479fd2
NN
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
ab22c1fa
CF
1929ac_ext=c
1930ac_cpp='$CPP $CPPFLAGS'
1931ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1932ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1933ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba479fd2
NN
1934
1935
914c5af7 1936
ab22c1fa 1937ac_config_headers="$ac_config_headers auto-host.h:config.in"
ba479fd2
NN
1938
1939
9f18db39
PB
1940gcc_version=`cat $srcdir/BASE-VER`
1941
ba479fd2
NN
1942# Determine the host, build, and target systems
1943ac_aux_dir=
ab22c1fa
CF
1944for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
1945 if test -f "$ac_dir/install-sh"; then
ba479fd2
NN
1946 ac_aux_dir=$ac_dir
1947 ac_install_sh="$ac_aux_dir/install-sh -c"
1948 break
ab22c1fa 1949 elif test -f "$ac_dir/install.sh"; then
ba479fd2
NN
1950 ac_aux_dir=$ac_dir
1951 ac_install_sh="$ac_aux_dir/install.sh -c"
1952 break
ab22c1fa 1953 elif test -f "$ac_dir/shtool"; then
ba479fd2
NN
1954 ac_aux_dir=$ac_dir
1955 ac_install_sh="$ac_aux_dir/shtool install -c"
1956 break
1957 fi
1958done
1959if test -z "$ac_aux_dir"; then
ab22c1fa
CF
1960 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
1961echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
ba479fd2
NN
1962 { (exit 1); exit 1; }; }
1963fi
ab22c1fa
CF
1964
1965# These three variables are undocumented and unsupported,
1966# and are intended to be withdrawn in a future Autoconf release.
1967# They can cause serious problems if a builder's source tree is in a directory
1968# whose full name contains unusual characters.
1969ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
1970ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
1971ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
1972
ba479fd2
NN
1973
1974# Make sure we can run config.sub.
ab22c1fa
CF
1975$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
1976 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
1977echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
ba479fd2
NN
1978 { (exit 1); exit 1; }; }
1979
ab22c1fa
CF
1980{ echo "$as_me:$LINENO: checking build system type" >&5
1981echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
ba479fd2
NN
1982if test "${ac_cv_build+set}" = set; then
1983 echo $ECHO_N "(cached) $ECHO_C" >&6
1984else
ab22c1fa
CF
1985 ac_build_alias=$build_alias
1986test "x$ac_build_alias" = x &&
1987 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
1988test "x$ac_build_alias" = x &&
ba479fd2
NN
1989 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1990echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1991 { (exit 1); exit 1; }; }
ab22c1fa
CF
1992ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
1993 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
1994echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
ba479fd2
NN
1995 { (exit 1); exit 1; }; }
1996
1997fi
ab22c1fa
CF
1998{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1999echo "${ECHO_T}$ac_cv_build" >&6; }
2000case $ac_cv_build in
2001*-*-*) ;;
2002*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2003echo "$as_me: error: invalid value of canonical build" >&2;}
2004 { (exit 1); exit 1; }; };;
2005esac
ba479fd2 2006build=$ac_cv_build
ab22c1fa
CF
2007ac_save_IFS=$IFS; IFS='-'
2008set x $ac_cv_build
2009shift
2010build_cpu=$1
2011build_vendor=$2
2012shift; shift
2013# Remember, the first character of IFS is used to create $*,
2014# except with old shells:
2015build_os=$*
2016IFS=$ac_save_IFS
2017case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2018
2019
2020{ echo "$as_me:$LINENO: checking host system type" >&5
2021echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
ba479fd2
NN
2022if test "${ac_cv_host+set}" = set; then
2023 echo $ECHO_N "(cached) $ECHO_C" >&6
2024else
ab22c1fa
CF
2025 if test "x$host_alias" = x; then
2026 ac_cv_host=$ac_cv_build
2027else
2028 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2029 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2030echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
ba479fd2 2031 { (exit 1); exit 1; }; }
ab22c1fa 2032fi
ba479fd2
NN
2033
2034fi
ab22c1fa
CF
2035{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2036echo "${ECHO_T}$ac_cv_host" >&6; }
2037case $ac_cv_host in
2038*-*-*) ;;
2039*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2040echo "$as_me: error: invalid value of canonical host" >&2;}
2041 { (exit 1); exit 1; }; };;
2042esac
ba479fd2 2043host=$ac_cv_host
ab22c1fa
CF
2044ac_save_IFS=$IFS; IFS='-'
2045set x $ac_cv_host
2046shift
2047host_cpu=$1
2048host_vendor=$2
2049shift; shift
2050# Remember, the first character of IFS is used to create $*,
2051# except with old shells:
2052host_os=$*
2053IFS=$ac_save_IFS
2054case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2055
2056
2057{ echo "$as_me:$LINENO: checking target system type" >&5
2058echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
ba479fd2
NN
2059if test "${ac_cv_target+set}" = set; then
2060 echo $ECHO_N "(cached) $ECHO_C" >&6
2061else
ab22c1fa
CF
2062 if test "x$target_alias" = x; then
2063 ac_cv_target=$ac_cv_host
2064else
2065 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2066 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
2067echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
ba479fd2 2068 { (exit 1); exit 1; }; }
ab22c1fa 2069fi
ba479fd2
NN
2070
2071fi
ab22c1fa
CF
2072{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
2073echo "${ECHO_T}$ac_cv_target" >&6; }
2074case $ac_cv_target in
2075*-*-*) ;;
2076*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
2077echo "$as_me: error: invalid value of canonical target" >&2;}
2078 { (exit 1); exit 1; }; };;
2079esac
ba479fd2 2080target=$ac_cv_target
ab22c1fa
CF
2081ac_save_IFS=$IFS; IFS='-'
2082set x $ac_cv_target
2083shift
2084target_cpu=$1
2085target_vendor=$2
2086shift; shift
2087# Remember, the first character of IFS is used to create $*,
2088# except with old shells:
2089target_os=$*
2090IFS=$ac_save_IFS
2091case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
ba479fd2
NN
2092
2093
2094# The aliases save the names the user supplied, while $host etc.
2095# will get canonicalized.
2096test -n "$target_alias" &&
2097 test "$program_prefix$program_suffix$program_transform_name" = \
2098 NONENONEs,x,x, &&
2099 program_prefix=${target_alias}-
2100
2101# Determine the noncanonical target name, for directory use.
18fc9bd4
RG
2102 case ${build_alias} in
2103 "") build_noncanonical=${build} ;;
2104 *) build_noncanonical=${build_alias} ;;
2105esac
2106
2107 case ${host_alias} in
2108 "") host_noncanonical=${build_noncanonical} ;;
2109 *) host_noncanonical=${host_alias} ;;
2110esac
2111
2112 case ${target_alias} in
2113 "") target_noncanonical=${host_noncanonical} ;;
2114 *) target_noncanonical=${target_alias} ;;
2115esac
2116
2117
2118
8f1529e6
L
2119
2120# Determine the target- and build-specific subdirectories
57255173
PB
2121
2122# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
2123# have matching libraries, they should use host libraries: Makefile.tpl
2124# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
2125# However, they still use the build modules, because the corresponding
2126# host modules (e.g. bison) are only built for the host when bootstrap
2127# finishes. So:
2128# - build_subdir is where we find build modules, and never changes.
2129# - build_libsubdir is where we find build libraries, and can be overridden.
2130
2131# Prefix 'build-' so this never conflicts with target_subdir.
18fc9bd4 2132build_subdir="build-${build_noncanonical}"
1546bb64 2133
ab22c1fa 2134# Check whether --with-build-libsubdir was given.
1546bb64 2135if test "${with_build_libsubdir+set}" = set; then
ab22c1fa 2136 withval=$with_build_libsubdir; build_libsubdir="$withval"
1546bb64
PB
2137else
2138 build_libsubdir="$build_subdir"
ab22c1fa
CF
2139fi
2140
18fc9bd4
RG
2141# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
2142if ( test $srcdir = . && test -d gcc ) \
2143 || test -d $srcdir/../host-${host_noncanonical}; then
2144 host_subdir="host-${host_noncanonical}"
2145else
2146 host_subdir=.
2147fi
2148# No prefix.
2149target_subdir=${target_noncanonical}
2150
73458fb7 2151
093e61a6 2152# Set program_transform_name
13c22933 2153test "$program_prefix" != NONE &&
ab22c1fa 2154 program_transform_name="s&^&$program_prefix&;$program_transform_name"
13c22933
JJ
2155# Use a double $ so make ignores it.
2156test "$program_suffix" != NONE &&
ab22c1fa 2157 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba479fd2
NN
2158# Double any \ or $. echo might interpret backslashes.
2159# By default was `s,x,x', remove it if useless.
2160cat <<\_ACEOF >conftest.sed
2161s/[\\$]/&&/g;s/;s,x,x,$//
2162_ACEOF
2163program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
ab22c1fa 2164rm -f conftest.sed
13c22933
JJ
2165
2166
34a86c2b
NN
2167# Check for bogus environment variables.
2168# Test if LIBRARY_PATH contains the notation for the current directory
2169# since this would lead to problems installing/building glibc.
2170# LIBRARY_PATH contains the current directory if one of the following
2171# is true:
2172# - one of the terminals (":" and ";") is the first or last sign
2173# - two terminals occur directly after each other
2174# - the path contains an element with a dot in it
ab22c1fa
CF
2175{ echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5
2176echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6; }
34a86c2b
NN
2177case ${LIBRARY_PATH} in
2178 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
2179 library_path_setting="contains current directory"
2180 ;;
2181 *)
2182 library_path_setting="ok"
2183 ;;
2184esac
ab22c1fa
CF
2185{ echo "$as_me:$LINENO: result: $library_path_setting" >&5
2186echo "${ECHO_T}$library_path_setting" >&6; }
34a86c2b 2187if test "$library_path_setting" != "ok"; then
ba479fd2 2188{ { echo "$as_me:$LINENO: error:
34a86c2b
NN
2189*** LIBRARY_PATH shouldn't contain the current directory when
2190*** building gcc. Please change the environment variable
ba479fd2
NN
2191*** and run configure again." >&5
2192echo "$as_me: error:
2193*** LIBRARY_PATH shouldn't contain the current directory when
2194*** building gcc. Please change the environment variable
2195*** and run configure again." >&2;}
2196 { (exit 1); exit 1; }; }
e9a25f70
JL
2197fi
2198
34a86c2b
NN
2199# Test if GCC_EXEC_PREFIX contains the notation for the current directory
2200# since this would lead to problems installing/building glibc.
2201# GCC_EXEC_PREFIX contains the current directory if one of the following
2202# is true:
2203# - one of the terminals (":" and ";") is the first or last sign
2204# - two terminals occur directly after each other
2205# - the path contains an element with a dot in it
ab22c1fa
CF
2206{ echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5
2207echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6; }
34a86c2b
NN
2208case ${GCC_EXEC_PREFIX} in
2209 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
2210 gcc_exec_prefix_setting="contains current directory"
2211 ;;
2212 *)
2213 gcc_exec_prefix_setting="ok"
2214 ;;
2215esac
ab22c1fa
CF
2216{ echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5
2217echo "${ECHO_T}$gcc_exec_prefix_setting" >&6; }
34a86c2b 2218if test "$gcc_exec_prefix_setting" != "ok"; then
ba479fd2
NN
2219{ { echo "$as_me:$LINENO: error:
2220*** GCC_EXEC_PREFIX shouldn't contain the current directory when
2221*** building gcc. Please change the environment variable
2222*** and run configure again." >&5
2223echo "$as_me: error:
cafe096b
EC
2224*** GCC_EXEC_PREFIX shouldn't contain the current directory when
2225*** building gcc. Please change the environment variable
ba479fd2
NN
2226*** and run configure again." >&2;}
2227 { (exit 1); exit 1; }; }
34a86c2b
NN
2228fi
2229
2230# -----------
2231# Directories
2232# -----------
2233
2234# Specify the local prefix
2235local_prefix=
ba479fd2 2236
ab22c1fa 2237# Check whether --with-local-prefix was given.
34a86c2b 2238if test "${with_local_prefix+set}" = set; then
ab22c1fa 2239 withval=$with_local_prefix; case "${withval}" in
ba479fd2
NN
2240yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5
2241echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;}
2242 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
2243no) ;;
2244*) local_prefix=$with_local_prefix ;;
2245esac
ab22c1fa
CF
2246fi
2247
34a86c2b
NN
2248
2249# Default local prefix if it is empty
2250if test x$local_prefix = x; then
2251 local_prefix=/usr/local
2252fi
2253
2254# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
2255# passed in by the toplevel make and thus we'd get different behavior
2256# depending on where we built the sources.
2257gcc_gxx_include_dir=
2258# Specify the g++ header file directory
ba479fd2 2259
ab22c1fa 2260# Check whether --with-gxx-include-dir was given.
34a86c2b 2261if test "${with_gxx_include_dir+set}" = set; then
ab22c1fa 2262 withval=$with_gxx_include_dir; case "${withval}" in
ba479fd2
NN
2263yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5
2264echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;}
2265 { (exit 1); exit 1; }; } ;;
34a86c2b
NN
2266no) ;;
2267*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
2268esac
ab22c1fa
CF
2269fi
2270
34a86c2b 2271
0f57bf40 2272# This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
34a86c2b
NN
2273if test x${gcc_gxx_include_dir} = x; then
2274 if test x${enable_version_specific_runtime_libs} = xyes; then
2275 gcc_gxx_include_dir='${libsubdir}/include/c++'
2276 else
0f57bf40
MM
2277 libstdcxx_incdir='include/c++/$(version)'
2278 if test x$host != x$target; then
2279 libstdcxx_incdir="$target_alias/$libstdcxx_incdir"
2280 fi
15c723f3 2281 gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir"
34a86c2b
NN
2282 fi
2283fi
2284
ba479fd2 2285
ab22c1fa 2286# Check whether --with-cpp_install_dir was given.
34a86c2b 2287if test "${with_cpp_install_dir+set}" = set; then
ab22c1fa 2288 withval=$with_cpp_install_dir; if test x$withval = xyes; then
ba479fd2
NN
2289 { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5
2290echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;}
2291 { (exit 1); exit 1; }; }
34a86c2b
NN
2292elif test x$withval != xno; then
2293 cpp_install_dir=$withval
2294fi
ab22c1fa
CF
2295fi
2296
34a86c2b 2297
51b9ff45 2298# We would like to our source tree to be readonly. However when releases or
ba479fd2 2299# pre-releases are generated, the flex/bison generated files as well as the
51b9ff45 2300# various formats of manuals need to be included along with the rest of the
ba479fd2 2301# sources. Therefore we have --enable-generated-files-in-srcdir to do
51b9ff45
KC
2302# just that.
2303
ab22c1fa
CF
2304{ echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5
2305echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6; }
2306 # Check whether --enable-generated-files-in-srcdir was given.
51b9ff45 2307if test "${enable_generated_files_in_srcdir+set}" = set; then
ab22c1fa 2308 enableval=$enable_generated_files_in_srcdir; generated_files_in_srcdir=$enableval
51b9ff45 2309else
03787dfd 2310 generated_files_in_srcdir=no
ab22c1fa 2311fi
703d89ab 2312
ab22c1fa
CF
2313
2314{ echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5
2315echo "${ECHO_T}$generated_files_in_srcdir" >&6; }
03787dfd
KC
2316
2317if test "$generated_files_in_srcdir" = "yes"; then
2318 GENINSRC=''
03787dfd
KC
2319else
2320 GENINSRC='#'
03787dfd
KC
2321fi
2322
2323
34a86c2b
NN
2324# -------------------
2325# Find default linker
2326# -------------------
2327
2328# With GNU ld
ba479fd2 2329
ab22c1fa 2330# Check whether --with-gnu-ld was given.
34a86c2b 2331if test "${with_gnu_ld+set}" = set; then
ab22c1fa 2332 withval=$with_gnu_ld; gnu_ld_flag="$with_gnu_ld"
34a86c2b
NN
2333else
2334 gnu_ld_flag=no
ab22c1fa
CF
2335fi
2336
6e3f3080 2337
63cf211a 2338# With pre-defined ld
ba479fd2 2339
ab22c1fa 2340# Check whether --with-ld was given.
34a86c2b 2341if test "${with_ld+set}" = set; then
ab22c1fa
CF
2342 withval=$with_ld; DEFAULT_LINKER="$with_ld"
2343fi
2344
34a86c2b
NN
2345if test x"${DEFAULT_LINKER+set}" = x"set"; then
2346 if test ! -x "$DEFAULT_LINKER"; then
99c012a8
BE
2347 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5
2348echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;}
2349 { (exit 1); exit 1; }; }
34a86c2b
NN
2350 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
2351 gnu_ld_flag=yes
2352 fi
ba479fd2
NN
2353
2354cat >>confdefs.h <<_ACEOF
34a86c2b 2355#define DEFAULT_LINKER "$DEFAULT_LINKER"
ba479fd2 2356_ACEOF
34a86c2b
NN
2357
2358fi
2359
2091ff66
NF
2360gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi`
2361
2362cat >>confdefs.h <<_ACEOF
2363#define HAVE_GNU_LD $gnu_ld
2364_ACEOF
2365
2366
ab22c1fa
CF
2367{ echo "$as_me:$LINENO: checking whether a default linker was specified" >&5
2368echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6; }
34a86c2b
NN
2369if test x"${DEFAULT_LINKER+set}" = x"set"; then
2370 if test x"$gnu_ld_flag" = x"no"; then
ab22c1fa
CF
2371 { echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5
2372echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6; }
34a86c2b 2373 else
ab22c1fa
CF
2374 { echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5
2375echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6; }
34a86c2b
NN
2376 fi
2377else
ab22c1fa
CF
2378 { echo "$as_me:$LINENO: result: no" >&5
2379echo "${ECHO_T}no" >&6; }
34a86c2b
NN
2380fi
2381
d594623a
L
2382# With demangler in GNU ld
2383
ab22c1fa 2384# Check whether --with-demangler-in-ld was given.
d594623a 2385if test "${with_demangler_in_ld+set}" = set; then
ab22c1fa 2386 withval=$with_demangler_in_ld; demangler_in_ld="$with_demangler_in_ld"
d594623a
L
2387else
2388 demangler_in_ld=no
ab22c1fa
CF
2389fi
2390
d594623a 2391
34a86c2b
NN
2392# ----------------------
2393# Find default assembler
2394# ----------------------
2395
2396# With GNU as
ba479fd2 2397
ab22c1fa 2398# Check whether --with-gnu-as was given.
34a86c2b 2399if test "${with_gnu_as+set}" = set; then
ab22c1fa 2400 withval=$with_gnu_as; gas_flag="$with_gnu_as"
34a86c2b
NN
2401else
2402 gas_flag=no
ab22c1fa 2403fi
a6ccdbab 2404
703d89ab 2405
ab22c1fa
CF
2406
2407# Check whether --with-as was given.
34a86c2b 2408if test "${with_as+set}" = set; then
ab22c1fa
CF
2409 withval=$with_as; DEFAULT_ASSEMBLER="$with_as"
2410fi
2411
34a86c2b
NN
2412if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2413 if test ! -x "$DEFAULT_ASSEMBLER"; then
99c012a8
BE
2414 { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5
2415echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;}
2416 { (exit 1); exit 1; }; }
34a86c2b
NN
2417 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
2418 gas_flag=yes
2419 fi
ba479fd2
NN
2420
2421cat >>confdefs.h <<_ACEOF
34a86c2b 2422#define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER"
ba479fd2 2423_ACEOF
34a86c2b
NN
2424
2425fi
2426
dc60b775
CD
2427gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi`
2428
2429cat >>confdefs.h <<_ACEOF
2430#define HAVE_GNU_AS $gnu_as
2431_ACEOF
2432
2433
ab22c1fa
CF
2434{ echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5
2435echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6; }
34a86c2b
NN
2436if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
2437 if test x"$gas_flag" = x"no"; then
ab22c1fa
CF
2438 { echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5
2439echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6; }
34a86c2b 2440 else
ab22c1fa
CF
2441 { echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5
2442echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6; }
34a86c2b
NN
2443 fi
2444else
ab22c1fa
CF
2445 { echo "$as_me:$LINENO: result: no" >&5
2446echo "${ECHO_T}no" >&6; }
34a86c2b
NN
2447fi
2448
2449# ---------------
2450# Find C compiler
2451# ---------------
2452
426ca3ca
RO
2453# If a non-executable a.out is present (e.g. created by GNU as above even if
2454# invoked with -v only), the IRIX 6 native ld just overwrites the existing
2455# file, even when creating an executable, so an execution test fails.
2456# Remove possible default executable files to avoid this.
2457#
2458# FIXME: This really belongs into AC_PROG_CC and can be removed once
2459# Autoconf includes it.
2460rm -f a.out a.exe b.out
2461
34a86c2b 2462# Find the native compiler
ba479fd2
NN
2463ac_ext=c
2464ac_cpp='$CPP $CPPFLAGS'
2465ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2466ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2467ac_compiler_gnu=$ac_cv_c_compiler_gnu
2468if test -n "$ac_tool_prefix"; then
2469 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2470set dummy ${ac_tool_prefix}gcc; ac_word=$2
ab22c1fa
CF
2471{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2472echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
2473if test "${ac_cv_prog_CC+set}" = set; then
2474 echo $ECHO_N "(cached) $ECHO_C" >&6
2475else
2476 if test -n "$CC"; then
2477 ac_cv_prog_CC="$CC" # Let the user override the test.
2478else
2479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2480for as_dir in $PATH
2481do
2482 IFS=$as_save_IFS
2483 test -z "$as_dir" && as_dir=.
2484 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 2485 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
2486 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2487 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2488 break 2
2489 fi
2490done
2491done
ab22c1fa 2492IFS=$as_save_IFS
ba479fd2
NN
2493
2494fi
2495fi
2496CC=$ac_cv_prog_CC
2497if test -n "$CC"; then
ab22c1fa
CF
2498 { echo "$as_me:$LINENO: result: $CC" >&5
2499echo "${ECHO_T}$CC" >&6; }
ba479fd2 2500else
ab22c1fa
CF
2501 { echo "$as_me:$LINENO: result: no" >&5
2502echo "${ECHO_T}no" >&6; }
ba479fd2
NN
2503fi
2504
ab22c1fa 2505
ba479fd2
NN
2506fi
2507if test -z "$ac_cv_prog_CC"; then
2508 ac_ct_CC=$CC
2509 # Extract the first word of "gcc", so it can be a program name with args.
6e3f3080 2510set dummy gcc; ac_word=$2
ab22c1fa
CF
2511{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2512echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
2513if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2514 echo $ECHO_N "(cached) $ECHO_C" >&6
2515else
2516 if test -n "$ac_ct_CC"; then
2517 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2518else
2519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2520for as_dir in $PATH
2521do
2522 IFS=$as_save_IFS
2523 test -z "$as_dir" && as_dir=.
2524 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 2525 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
2526 ac_cv_prog_ac_ct_CC="gcc"
2527 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2528 break 2
2529 fi
2530done
2531done
ab22c1fa 2532IFS=$as_save_IFS
ba479fd2
NN
2533
2534fi
2535fi
2536ac_ct_CC=$ac_cv_prog_ac_ct_CC
2537if test -n "$ac_ct_CC"; then
ab22c1fa
CF
2538 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2539echo "${ECHO_T}$ac_ct_CC" >&6; }
ba479fd2 2540else
ab22c1fa
CF
2541 { echo "$as_me:$LINENO: result: no" >&5
2542echo "${ECHO_T}no" >&6; }
ba479fd2
NN
2543fi
2544
ab22c1fa
CF
2545 if test "x$ac_ct_CC" = x; then
2546 CC=""
2547 else
2548 case $cross_compiling:$ac_tool_warned in
2549yes:)
2550{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2551whose name does not start with the host triplet. If you think this
2552configuration is useful to you, please write to autoconf@gnu.org." >&5
2553echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2554whose name does not start with the host triplet. If you think this
2555configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2556ac_tool_warned=yes ;;
2557esac
2558 CC=$ac_ct_CC
2559 fi
ba479fd2
NN
2560else
2561 CC="$ac_cv_prog_CC"
2562fi
2563
2564if test -z "$CC"; then
ab22c1fa
CF
2565 if test -n "$ac_tool_prefix"; then
2566 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
ba479fd2 2567set dummy ${ac_tool_prefix}cc; ac_word=$2
ab22c1fa
CF
2568{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2569echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
2570if test "${ac_cv_prog_CC+set}" = set; then
2571 echo $ECHO_N "(cached) $ECHO_C" >&6
cd9e5e7c
MK
2572else
2573 if test -n "$CC"; then
2574 ac_cv_prog_CC="$CC" # Let the user override the test.
2575else
ba479fd2
NN
2576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2577for as_dir in $PATH
2578do
2579 IFS=$as_save_IFS
2580 test -z "$as_dir" && as_dir=.
2581 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 2582 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
2583 ac_cv_prog_CC="${ac_tool_prefix}cc"
2584 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2585 break 2
2586 fi
2587done
2588done
ab22c1fa 2589IFS=$as_save_IFS
ba479fd2 2590
cd9e5e7c
MK
2591fi
2592fi
ba479fd2 2593CC=$ac_cv_prog_CC
cd9e5e7c 2594if test -n "$CC"; then
ab22c1fa
CF
2595 { echo "$as_me:$LINENO: result: $CC" >&5
2596echo "${ECHO_T}$CC" >&6; }
a3bba767 2597else
ab22c1fa
CF
2598 { echo "$as_me:$LINENO: result: no" >&5
2599echo "${ECHO_T}no" >&6; }
a3bba767
JJ
2600fi
2601
a3bba767 2602
ab22c1fa 2603 fi
ba479fd2 2604fi
6e3f3080
NN
2605if test -z "$CC"; then
2606 # Extract the first word of "cc", so it can be a program name with args.
2607set dummy cc; ac_word=$2
ab22c1fa
CF
2608{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2609echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
2610if test "${ac_cv_prog_CC+set}" = set; then
2611 echo $ECHO_N "(cached) $ECHO_C" >&6
6e3f3080
NN
2612else
2613 if test -n "$CC"; then
2614 ac_cv_prog_CC="$CC" # Let the user override the test.
2615else
2616 ac_prog_rejected=no
ba479fd2
NN
2617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2618for as_dir in $PATH
2619do
2620 IFS=$as_save_IFS
2621 test -z "$as_dir" && as_dir=.
2622 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 2623 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
2624 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2625 ac_prog_rejected=yes
2626 continue
2627 fi
2628 ac_cv_prog_CC="cc"
2629 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2630 break 2
2631 fi
2632done
2633done
ab22c1fa 2634IFS=$as_save_IFS
ba479fd2 2635
6e3f3080
NN
2636if test $ac_prog_rejected = yes; then
2637 # We found a bogon in the path, so make sure we never use it.
2638 set dummy $ac_cv_prog_CC
2639 shift
ba479fd2 2640 if test $# != 0; then
6e3f3080
NN
2641 # We chose a different compiler from the bogus one.
2642 # However, it has the same basename, so the bogon will be chosen
2643 # first if we set CC to just the basename; use the full file name.
2644 shift
ba479fd2 2645 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
e9a25f70 2646 fi
6e3f3080
NN
2647fi
2648fi
2649fi
ba479fd2 2650CC=$ac_cv_prog_CC
6e3f3080 2651if test -n "$CC"; then
ab22c1fa
CF
2652 { echo "$as_me:$LINENO: result: $CC" >&5
2653echo "${ECHO_T}$CC" >&6; }
e9a25f70 2654else
ab22c1fa
CF
2655 { echo "$as_me:$LINENO: result: no" >&5
2656echo "${ECHO_T}no" >&6; }
e9a25f70 2657fi
6e3f3080 2658
ab22c1fa 2659
ba479fd2
NN
2660fi
2661if test -z "$CC"; then
2662 if test -n "$ac_tool_prefix"; then
ab22c1fa 2663 for ac_prog in cl.exe
ba479fd2
NN
2664 do
2665 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2666set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ab22c1fa
CF
2667{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2668echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
2669if test "${ac_cv_prog_CC+set}" = set; then
2670 echo $ECHO_N "(cached) $ECHO_C" >&6
093e61a6 2671else
6e3f3080
NN
2672 if test -n "$CC"; then
2673 ac_cv_prog_CC="$CC" # Let the user override the test.
2674else
ba479fd2
NN
2675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2676for as_dir in $PATH
2677do
2678 IFS=$as_save_IFS
2679 test -z "$as_dir" && as_dir=.
2680 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 2681 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
2682 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2683 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2684 break 2
2685 fi
2686done
2687done
ab22c1fa 2688IFS=$as_save_IFS
ba479fd2 2689
093e61a6 2690fi
6e3f3080 2691fi
ba479fd2 2692CC=$ac_cv_prog_CC
6e3f3080 2693if test -n "$CC"; then
ab22c1fa
CF
2694 { echo "$as_me:$LINENO: result: $CC" >&5
2695echo "${ECHO_T}$CC" >&6; }
6e3f3080 2696else
ab22c1fa
CF
2697 { echo "$as_me:$LINENO: result: no" >&5
2698echo "${ECHO_T}no" >&6; }
093e61a6 2699fi
cafe096b 2700
ab22c1fa 2701
ba479fd2
NN
2702 test -n "$CC" && break
2703 done
2704fi
2705if test -z "$CC"; then
2706 ac_ct_CC=$CC
ab22c1fa 2707 for ac_prog in cl.exe
ba479fd2
NN
2708do
2709 # Extract the first word of "$ac_prog", so it can be a program name with args.
2710set dummy $ac_prog; ac_word=$2
ab22c1fa
CF
2711{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2712echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
2713if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2714 echo $ECHO_N "(cached) $ECHO_C" >&6
2715else
2716 if test -n "$ac_ct_CC"; then
2717 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2718else
2719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2720for as_dir in $PATH
2721do
2722 IFS=$as_save_IFS
2723 test -z "$as_dir" && as_dir=.
2724 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 2725 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
2726 ac_cv_prog_ac_ct_CC="$ac_prog"
2727 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2728 break 2
2729 fi
2730done
2731done
ab22c1fa 2732IFS=$as_save_IFS
6e3f3080 2733
ba479fd2
NN
2734fi
2735fi
2736ac_ct_CC=$ac_cv_prog_ac_ct_CC
2737if test -n "$ac_ct_CC"; then
ab22c1fa
CF
2738 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2739echo "${ECHO_T}$ac_ct_CC" >&6; }
ba479fd2 2740else
ab22c1fa
CF
2741 { echo "$as_me:$LINENO: result: no" >&5
2742echo "${ECHO_T}no" >&6; }
ba479fd2 2743fi
6e3f3080 2744
ab22c1fa 2745
ba479fd2
NN
2746 test -n "$ac_ct_CC" && break
2747done
63cf211a 2748
ab22c1fa
CF
2749 if test "x$ac_ct_CC" = x; then
2750 CC=""
2751 else
2752 case $cross_compiling:$ac_tool_warned in
2753yes:)
2754{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2755whose name does not start with the host triplet. If you think this
2756configuration is useful to you, please write to autoconf@gnu.org." >&5
2757echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2758whose name does not start with the host triplet. If you think this
2759configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2760ac_tool_warned=yes ;;
2761esac
2762 CC=$ac_ct_CC
2763 fi
ba479fd2
NN
2764fi
2765
2766fi
2767
2768
2769test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2770See \`config.log' for more details." >&5
2771echo "$as_me: error: no acceptable C compiler found in \$PATH
2772See \`config.log' for more details." >&2;}
2773 { (exit 1); exit 1; }; }
2774
2775# Provide some information about the compiler.
ab22c1fa 2776echo "$as_me:$LINENO: checking for C compiler version" >&5
ba479fd2 2777ac_compiler=`set X $ac_compile; echo $2`
ab22c1fa
CF
2778{ (ac_try="$ac_compiler --version >&5"
2779case "(($ac_try" in
2780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2781 *) ac_try_echo=$ac_try;;
2782esac
2783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2784 (eval "$ac_compiler --version >&5") 2>&5
ba479fd2
NN
2785 ac_status=$?
2786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2787 (exit $ac_status); }
ab22c1fa
CF
2788{ (ac_try="$ac_compiler -v >&5"
2789case "(($ac_try" in
2790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2791 *) ac_try_echo=$ac_try;;
2792esac
2793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2794 (eval "$ac_compiler -v >&5") 2>&5
ba479fd2
NN
2795 ac_status=$?
2796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2797 (exit $ac_status); }
ab22c1fa
CF
2798{ (ac_try="$ac_compiler -V >&5"
2799case "(($ac_try" in
2800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2801 *) ac_try_echo=$ac_try;;
2802esac
2803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2804 (eval "$ac_compiler -V >&5") 2>&5
ba479fd2
NN
2805 ac_status=$?
2806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2807 (exit $ac_status); }
2808
2809cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
2810/* confdefs.h. */
2811_ACEOF
2812cat confdefs.h >>conftest.$ac_ext
2813cat >>conftest.$ac_ext <<_ACEOF
2814/* end confdefs.h. */
2815
2816int
2817main ()
2818{
63cf211a 2819
ba479fd2
NN
2820 ;
2821 return 0;
2822}
2823_ACEOF
2824ac_clean_files_save=$ac_clean_files
2825ac_clean_files="$ac_clean_files a.out a.exe b.out"
2826# Try to create an executable without -o first, disregard a.out.
2827# It will help us diagnose broken compilers, and finding out an intuition
2828# of exeext.
ab22c1fa
CF
2829{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2830echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
ba479fd2 2831ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
ab22c1fa
CF
2832#
2833# List of possible output files, starting from the most likely.
2834# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2835# only as a last resort. b.out is created by i960 compilers.
2836ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2837#
2838# The IRIX 6 linker writes into existing files which may not be
2839# executable, retaining their permissions. Remove them first so a
2840# subsequent execution test works.
2841ac_rmfiles=
2842for ac_file in $ac_files
2843do
2844 case $ac_file in
2845 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2846 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2847 esac
2848done
2849rm -f $ac_rmfiles
2850
2851if { (ac_try="$ac_link_default"
2852case "(($ac_try" in
2853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2854 *) ac_try_echo=$ac_try;;
2855esac
2856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2857 (eval "$ac_link_default") 2>&5
ba479fd2
NN
2858 ac_status=$?
2859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2860 (exit $ac_status); }; then
ab22c1fa
CF
2861 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2862# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2863# in a Makefile. We should not override ac_cv_exeext if it was cached,
2864# so that the user can short-circuit this test for compilers unknown to
2865# Autoconf.
2866for ac_file in $ac_files ''
ba479fd2
NN
2867do
2868 test -f "$ac_file" || continue
2869 case $ac_file in
ab22c1fa 2870 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
86da66b5 2871 ;;
ba479fd2 2872 [ab].out )
86da66b5
HPN
2873 # We found the default executable, but exeext='' is most
2874 # certainly right.
2875 break;;
ba479fd2 2876 *.* )
ab22c1fa
CF
2877 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2878 then :; else
2879 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2880 fi
2881 # We set ac_cv_exeext here because the later test for it is not
2882 # safe: cross compilers may not add the suffix if given an `-o'
2883 # argument, so we may need to know it at that point already.
2884 # Even if this section looks crufty: it has the advantage of
2885 # actually working.
86da66b5 2886 break;;
ba479fd2 2887 * )
86da66b5 2888 break;;
ba479fd2
NN
2889 esac
2890done
ab22c1fa
CF
2891test "$ac_cv_exeext" = no && ac_cv_exeext=
2892
ba479fd2 2893else
ab22c1fa
CF
2894 ac_file=''
2895fi
2896
2897{ echo "$as_me:$LINENO: result: $ac_file" >&5
2898echo "${ECHO_T}$ac_file" >&6; }
2899if test -z "$ac_file"; then
ba479fd2
NN
2900 echo "$as_me: failed program was:" >&5
2901sed 's/^/| /' conftest.$ac_ext >&5
2902
2903{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2904See \`config.log' for more details." >&5
2905echo "$as_me: error: C compiler cannot create executables
2906See \`config.log' for more details." >&2;}
2907 { (exit 77); exit 77; }; }
2908fi
2909
2910ac_exeext=$ac_cv_exeext
ba479fd2 2911
ab22c1fa 2912# Check that the compiler produces executables we can run. If not, either
ba479fd2 2913# the compiler is broken, or we cross compile.
ab22c1fa
CF
2914{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2915echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
ba479fd2
NN
2916# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2917# If not cross compiling, check that we can run a simple program.
2918if test "$cross_compiling" != yes; then
2919 if { ac_try='./$ac_file'
ab22c1fa
CF
2920 { (case "(($ac_try" in
2921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2922 *) ac_try_echo=$ac_try;;
2923esac
2924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2925 (eval "$ac_try") 2>&5
ba479fd2
NN
2926 ac_status=$?
2927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2928 (exit $ac_status); }; }; then
2929 cross_compiling=no
6e3f3080 2930 else
ba479fd2
NN
2931 if test "$cross_compiling" = maybe; then
2932 cross_compiling=yes
2933 else
2934 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2935If you meant to cross compile, use \`--host'.
2936See \`config.log' for more details." >&5
2937echo "$as_me: error: cannot run C compiled programs.
2938If you meant to cross compile, use \`--host'.
2939See \`config.log' for more details." >&2;}
2940 { (exit 1); exit 1; }; }
2941 fi
6e3f3080
NN
2942 fi
2943fi
ab22c1fa
CF
2944{ echo "$as_me:$LINENO: result: yes" >&5
2945echo "${ECHO_T}yes" >&6; }
ba479fd2
NN
2946
2947rm -f a.out a.exe conftest$ac_cv_exeext b.out
2948ac_clean_files=$ac_clean_files_save
ab22c1fa 2949# Check that the compiler produces executables we can run. If not, either
ba479fd2 2950# the compiler is broken, or we cross compile.
ab22c1fa
CF
2951{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2952echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2953{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2954echo "${ECHO_T}$cross_compiling" >&6; }
2955
2956{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2957echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2958if { (ac_try="$ac_link"
2959case "(($ac_try" in
2960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2961 *) ac_try_echo=$ac_try;;
2962esac
2963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2964 (eval "$ac_link") 2>&5
ba479fd2
NN
2965 ac_status=$?
2966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2967 (exit $ac_status); }; then
2968 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2969# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2970# work properly (i.e., refer to `conftest.exe'), while it won't with
2971# `rm'.
2972for ac_file in conftest.exe conftest conftest.*; do
2973 test -f "$ac_file" || continue
2974 case $ac_file in
ab22c1fa 2975 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
ba479fd2 2976 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
86da66b5 2977 break;;
ba479fd2
NN
2978 * ) break;;
2979 esac
2980done
e9a25f70 2981else
ba479fd2
NN
2982 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2983See \`config.log' for more details." >&5
2984echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2985See \`config.log' for more details." >&2;}
2986 { (exit 1); exit 1; }; }
2987fi
2988
2989rm -f conftest$ac_cv_exeext
ab22c1fa
CF
2990{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2991echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba479fd2
NN
2992
2993rm -f conftest.$ac_ext
2994EXEEXT=$ac_cv_exeext
2995ac_exeext=$EXEEXT
ab22c1fa
CF
2996{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2997echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
ba479fd2
NN
2998if test "${ac_cv_objext+set}" = set; then
2999 echo $ECHO_N "(cached) $ECHO_C" >&6
3000else
3001 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3002/* confdefs.h. */
3003_ACEOF
3004cat confdefs.h >>conftest.$ac_ext
3005cat >>conftest.$ac_ext <<_ACEOF
3006/* end confdefs.h. */
3007
3008int
3009main ()
3010{
6e3f3080 3011
ba479fd2
NN
3012 ;
3013 return 0;
3014}
3015_ACEOF
3016rm -f conftest.o conftest.obj
ab22c1fa
CF
3017if { (ac_try="$ac_compile"
3018case "(($ac_try" in
3019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3020 *) ac_try_echo=$ac_try;;
3021esac
3022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3023 (eval "$ac_compile") 2>&5
ba479fd2
NN
3024 ac_status=$?
3025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3026 (exit $ac_status); }; then
ab22c1fa
CF
3027 for ac_file in conftest.o conftest.obj conftest.*; do
3028 test -f "$ac_file" || continue;
ba479fd2 3029 case $ac_file in
ab22c1fa 3030 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
ba479fd2
NN
3031 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3032 break;;
3033 esac
3034done
63cf211a 3035else
ba479fd2
NN
3036 echo "$as_me: failed program was:" >&5
3037sed 's/^/| /' conftest.$ac_ext >&5
3038
3039{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3040See \`config.log' for more details." >&5
3041echo "$as_me: error: cannot compute suffix of object files: cannot compile
3042See \`config.log' for more details." >&2;}
3043 { (exit 1); exit 1; }; }
3044fi
3045
3046rm -f conftest.$ac_cv_objext conftest.$ac_ext
3047fi
ab22c1fa
CF
3048{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3049echo "${ECHO_T}$ac_cv_objext" >&6; }
ba479fd2
NN
3050OBJEXT=$ac_cv_objext
3051ac_objext=$OBJEXT
ab22c1fa
CF
3052{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3053echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
ba479fd2
NN
3054if test "${ac_cv_c_compiler_gnu+set}" = set; then
3055 echo $ECHO_N "(cached) $ECHO_C" >&6
3056else
3057 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3058/* confdefs.h. */
3059_ACEOF
3060cat confdefs.h >>conftest.$ac_ext
3061cat >>conftest.$ac_ext <<_ACEOF
3062/* end confdefs.h. */
3063
3064int
3065main ()
3066{
3067#ifndef __GNUC__
3068 choke me
3069#endif
6e3f3080 3070
ba479fd2
NN
3071 ;
3072 return 0;
3073}
3074_ACEOF
3075rm -f conftest.$ac_objext
ab22c1fa
CF
3076if { (ac_try="$ac_compile"
3077case "(($ac_try" in
3078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3079 *) ac_try_echo=$ac_try;;
3080esac
3081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3082 (eval "$ac_compile") 2>conftest.er1
ba479fd2 3083 ac_status=$?
86da66b5
HPN
3084 grep -v '^ *+' conftest.er1 >conftest.err
3085 rm -f conftest.er1
3086 cat conftest.err >&5
ba479fd2 3087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
3088 (exit $ac_status); } && {
3089 test -z "$ac_c_werror_flag" ||
3090 test ! -s conftest.err
3091 } && test -s conftest.$ac_objext; then
ba479fd2
NN
3092 ac_compiler_gnu=yes
3093else
3094 echo "$as_me: failed program was:" >&5
3095sed 's/^/| /' conftest.$ac_ext >&5
3096
ab22c1fa 3097 ac_compiler_gnu=no
ba479fd2 3098fi
ab22c1fa
CF
3099
3100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
3101ac_cv_c_compiler_gnu=$ac_compiler_gnu
3102
3103fi
ab22c1fa
CF
3104{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3105echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
ba479fd2
NN
3106GCC=`test $ac_compiler_gnu = yes && echo yes`
3107ac_test_CFLAGS=${CFLAGS+set}
3108ac_save_CFLAGS=$CFLAGS
ab22c1fa
CF
3109{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3110echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
ba479fd2
NN
3111if test "${ac_cv_prog_cc_g+set}" = set; then
3112 echo $ECHO_N "(cached) $ECHO_C" >&6
3113else
ab22c1fa
CF
3114 ac_save_c_werror_flag=$ac_c_werror_flag
3115 ac_c_werror_flag=yes
3116 ac_cv_prog_cc_g=no
3117 CFLAGS="-g"
3118 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3119/* confdefs.h. */
3120_ACEOF
3121cat confdefs.h >>conftest.$ac_ext
3122cat >>conftest.$ac_ext <<_ACEOF
3123/* end confdefs.h. */
3124
3125int
3126main ()
3127{
3128
3129 ;
3130 return 0;
3131}
3132_ACEOF
3133rm -f conftest.$ac_objext
ab22c1fa
CF
3134if { (ac_try="$ac_compile"
3135case "(($ac_try" in
3136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3137 *) ac_try_echo=$ac_try;;
3138esac
3139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3140 (eval "$ac_compile") 2>conftest.er1
ba479fd2 3141 ac_status=$?
86da66b5
HPN
3142 grep -v '^ *+' conftest.er1 >conftest.err
3143 rm -f conftest.er1
3144 cat conftest.err >&5
ba479fd2 3145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
3146 (exit $ac_status); } && {
3147 test -z "$ac_c_werror_flag" ||
3148 test ! -s conftest.err
3149 } && test -s conftest.$ac_objext; then
3150 ac_cv_prog_cc_g=yes
3151else
3152 echo "$as_me: failed program was:" >&5
3153sed 's/^/| /' conftest.$ac_ext >&5
3154
3155 CFLAGS=""
3156 cat >conftest.$ac_ext <<_ACEOF
3157/* confdefs.h. */
3158_ACEOF
3159cat confdefs.h >>conftest.$ac_ext
3160cat >>conftest.$ac_ext <<_ACEOF
3161/* end confdefs.h. */
3162
3163int
3164main ()
3165{
3166
3167 ;
3168 return 0;
3169}
3170_ACEOF
3171rm -f conftest.$ac_objext
3172if { (ac_try="$ac_compile"
3173case "(($ac_try" in
3174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3175 *) ac_try_echo=$ac_try;;
3176esac
3177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3178 (eval "$ac_compile") 2>conftest.er1
a3bba767 3179 ac_status=$?
ab22c1fa
CF
3180 grep -v '^ *+' conftest.er1 >conftest.err
3181 rm -f conftest.er1
3182 cat conftest.err >&5
a3bba767 3183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
3184 (exit $ac_status); } && {
3185 test -z "$ac_c_werror_flag" ||
3186 test ! -s conftest.err
3187 } && test -s conftest.$ac_objext; then
3188 :
3189else
3190 echo "$as_me: failed program was:" >&5
3191sed 's/^/| /' conftest.$ac_ext >&5
3192
3193 ac_c_werror_flag=$ac_save_c_werror_flag
3194 CFLAGS="-g"
3195 cat >conftest.$ac_ext <<_ACEOF
3196/* confdefs.h. */
3197_ACEOF
3198cat confdefs.h >>conftest.$ac_ext
3199cat >>conftest.$ac_ext <<_ACEOF
3200/* end confdefs.h. */
3201
3202int
3203main ()
3204{
3205
3206 ;
3207 return 0;
3208}
3209_ACEOF
3210rm -f conftest.$ac_objext
3211if { (ac_try="$ac_compile"
3212case "(($ac_try" in
3213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3214 *) ac_try_echo=$ac_try;;
3215esac
3216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3217 (eval "$ac_compile") 2>conftest.er1
a3bba767 3218 ac_status=$?
ab22c1fa
CF
3219 grep -v '^ *+' conftest.er1 >conftest.err
3220 rm -f conftest.er1
3221 cat conftest.err >&5
a3bba767 3222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
3223 (exit $ac_status); } && {
3224 test -z "$ac_c_werror_flag" ||
3225 test ! -s conftest.err
3226 } && test -s conftest.$ac_objext; then
703d89ab
ZW
3227 ac_cv_prog_cc_g=yes
3228else
3229 echo "$as_me: failed program was:" >&5
3230sed 's/^/| /' conftest.$ac_ext >&5
3231
ab22c1fa
CF
3232
3233fi
3234
3235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3236fi
3237
3238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a3bba767 3239fi
ab22c1fa
CF
3240
3241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3242 ac_c_werror_flag=$ac_save_c_werror_flag
a3bba767 3243fi
ab22c1fa
CF
3244{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3245echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
a3bba767
JJ
3246if test "$ac_test_CFLAGS" = set; then
3247 CFLAGS=$ac_save_CFLAGS
3248elif test $ac_cv_prog_cc_g = yes; then
3249 if test "$GCC" = yes; then
3250 CFLAGS="-g -O2"
3251 else
3252 CFLAGS="-g"
3253 fi
3254else
3255 if test "$GCC" = yes; then
3256 CFLAGS="-O2"
3257 else
3258 CFLAGS=
3259 fi
3260fi
ab22c1fa
CF
3261{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3262echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3263if test "${ac_cv_prog_cc_c89+set}" = set; then
a3bba767
JJ
3264 echo $ECHO_N "(cached) $ECHO_C" >&6
3265else
ab22c1fa 3266 ac_cv_prog_cc_c89=no
a3bba767
JJ
3267ac_save_CC=$CC
3268cat >conftest.$ac_ext <<_ACEOF
703d89ab
ZW
3269/* confdefs.h. */
3270_ACEOF
3271cat confdefs.h >>conftest.$ac_ext
3272cat >>conftest.$ac_ext <<_ACEOF
3273/* end confdefs.h. */
a3bba767
JJ
3274#include <stdarg.h>
3275#include <stdio.h>
3276#include <sys/types.h>
3277#include <sys/stat.h>
3278/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3279struct buf { int x; };
3280FILE * (*rcsopen) (struct buf *, struct stat *, int);
3281static char *e (p, i)
3282 char **p;
3283 int i;
703d89ab 3284{
a3bba767 3285 return p[i];
703d89ab 3286}
a3bba767
JJ
3287static char *f (char * (*g) (char **, int), char **p, ...)
3288{
3289 char *s;
3290 va_list v;
3291 va_start (v,p);
3292 s = g (p, va_arg (v,int));
3293 va_end (v);
3294 return s;
3295}
3296
3297/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3298 function prototypes and stuff, but not '\xHH' hex character constants.
3299 These don't provoke an error unfortunately, instead are silently treated
ab22c1fa 3300 as 'x'. The following induces an error, until -std is added to get
a3bba767
JJ
3301 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3302 array size at least. It's necessary to write '\x00'==0 to get something
ab22c1fa 3303 that's true only with -std. */
a3bba767
JJ
3304int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3305
ab22c1fa
CF
3306/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3307 inside strings and character constants. */
3308#define FOO(x) 'x'
3309int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3310
a3bba767
JJ
3311int test (int i, double x);
3312struct s1 {int (*f) (int a);};
3313struct s2 {int (*f) (double a);};
3314int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3315int argc;
3316char **argv;
3317int
3318main ()
3319{
3320return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3321 ;
3322 return 0;
3323}
3324_ACEOF
ab22c1fa
CF
3325for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3326 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
a3bba767
JJ
3327do
3328 CC="$ac_save_CC $ac_arg"
3329 rm -f conftest.$ac_objext
ab22c1fa
CF
3330if { (ac_try="$ac_compile"
3331case "(($ac_try" in
3332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3333 *) ac_try_echo=$ac_try;;
3334esac
3335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3336 (eval "$ac_compile") 2>conftest.er1
a3bba767 3337 ac_status=$?
703d89ab
ZW
3338 grep -v '^ *+' conftest.er1 >conftest.err
3339 rm -f conftest.er1
3340 cat conftest.err >&5
8b1f719a 3341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
3342 (exit $ac_status); } && {
3343 test -z "$ac_c_werror_flag" ||
3344 test ! -s conftest.err
3345 } && test -s conftest.$ac_objext; then
3346 ac_cv_prog_cc_c89=$ac_arg
703d89ab
ZW
3347else
3348 echo "$as_me: failed program was:" >&5
3349sed 's/^/| /' conftest.$ac_ext >&5
3350
ab22c1fa 3351
a3bba767 3352fi
ab22c1fa
CF
3353
3354rm -f core conftest.err conftest.$ac_objext
3355 test "x$ac_cv_prog_cc_c89" != "xno" && break
a3bba767 3356done
ab22c1fa 3357rm -f conftest.$ac_ext
a3bba767
JJ
3358CC=$ac_save_CC
3359
3360fi
ab22c1fa
CF
3361# AC_CACHE_VAL
3362case "x$ac_cv_prog_cc_c89" in
3363 x)
3364 { echo "$as_me:$LINENO: result: none needed" >&5
3365echo "${ECHO_T}none needed" >&6; } ;;
3366 xno)
3367 { echo "$as_me:$LINENO: result: unsupported" >&5
3368echo "${ECHO_T}unsupported" >&6; } ;;
a3bba767 3369 *)
ab22c1fa
CF
3370 CC="$CC $ac_cv_prog_cc_c89"
3371 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3372echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
a3bba767
JJ
3373esac
3374
ba479fd2 3375
ba479fd2
NN
3376ac_ext=c
3377ac_cpp='$CPP $CPPFLAGS'
3378ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3379ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3380ac_compiler_gnu=$ac_cv_c_compiler_gnu
3381
3382if test "x$CC" != xcc; then
ab22c1fa
CF
3383 { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
3384echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; }
ba479fd2 3385else
ab22c1fa
CF
3386 { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
3387echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; }
ba479fd2
NN
3388fi
3389set dummy $CC; ac_cc=`echo $2 |
3390 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
ab22c1fa 3391if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2
NN
3392 echo $ECHO_N "(cached) $ECHO_C" >&6
3393else
3394 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3395/* confdefs.h. */
3396_ACEOF
3397cat confdefs.h >>conftest.$ac_ext
3398cat >>conftest.$ac_ext <<_ACEOF
3399/* end confdefs.h. */
3400
3401int
3402main ()
3403{
3404
3405 ;
3406 return 0;
3407}
3408_ACEOF
3ec83fc2
RH
3409# Make sure it works both with $CC and with simple cc.
3410# We do the test twice because some compilers refuse to overwrite an
3411# existing .o file with -o, though they will create one.
ab22c1fa
CF
3412ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3413rm -f conftest2.*
3414if { (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); } &&
ab22c1fa
CF
3423 test -f conftest2.$ac_objext && { (case "(($ac_try" in
3424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3425 *) ac_try_echo=$ac_try;;
3426esac
3427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3428 (eval "$ac_try") 2>&5
ba479fd2
NN
3429 ac_status=$?
3430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3431 (exit $ac_status); };
3ec83fc2
RH
3432then
3433 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
3434 if test "x$CC" != xcc; then
3435 # Test first that cc exists at all.
ba479fd2 3436 if { ac_try='cc -c conftest.$ac_ext >&5'
ab22c1fa
CF
3437 { (case "(($ac_try" in
3438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3439 *) ac_try_echo=$ac_try;;
3440esac
3441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3442 (eval "$ac_try") 2>&5
ba479fd2
NN
3443 ac_status=$?
3444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3445 (exit $ac_status); }; }; then
ab22c1fa
CF
3446 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3447 rm -f conftest2.*
3448 if { (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); } &&
ab22c1fa
CF
3457 test -f conftest2.$ac_objext && { (case "(($ac_try" in
3458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3459 *) ac_try_echo=$ac_try;;
3460esac
3461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3462 (eval "$ac_try") 2>&5
ba479fd2
NN
3463 ac_status=$?
3464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3465 (exit $ac_status); };
3ec83fc2 3466 then
86da66b5
HPN
3467 # cc works too.
3468 :
3ec83fc2 3469 else
86da66b5
HPN
3470 # cc exists but doesn't like -o.
3471 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3ec83fc2
RH
3472 fi
3473 fi
3474 fi
3475else
3476 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3477fi
ab22c1fa 3478rm -f core conftest*
3ec83fc2
RH
3479
3480fi
ab22c1fa
CF
3481if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
3482 { echo "$as_me:$LINENO: result: yes" >&5
3483echo "${ECHO_T}yes" >&6; }
3ec83fc2 3484else
ab22c1fa
CF
3485 { echo "$as_me:$LINENO: result: no" >&5
3486echo "${ECHO_T}no" >&6; }
ba479fd2
NN
3487
3488cat >>confdefs.h <<\_ACEOF
3ec83fc2 3489#define NO_MINUS_C_MINUS_O 1
ba479fd2 3490_ACEOF
3ec83fc2
RH
3491
3492fi
3493
3b620440
KC
3494# expand $ac_aux_dir to an absolute path
3495am_aux_dir=`cd $ac_aux_dir && pwd`
3496
3497# FIXME: we rely on the cache variable name because
3498# there is no other way.
3499set dummy $CC
3500ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
3501if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
3502 # Losing compiler, so override with the script.
3503 # FIXME: It is wrong to rewrite CC.
3504 # But if we don't then we get into trouble of one sort or another.
3505 # A longer-term fix would be to have automake use am__CC in this case,
3506 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3507 CC="$am_aux_dir/compile $CC"
3508fi
3509
414d23ae
HPN
3510# autoconf is lame and doesn't give us any substitution variable for this.
3511if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
3512 NO_MINUS_C_MINUS_O=yes
3513else
3514 OUTPUT_OPTION='-o $@'
3515fi
3516
3517
3518
ec6c7392
PB
3519# Remove the -O2: for historical reasons, unless bootstrapping we prefer
3520# optimizations to be activated explicitly by the toplevel.
3521case "$CC" in
3522 */prev-gcc/xgcc*) ;;
3523 *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
3524esac
3525
3526
73458fb7
NN
3527# -------------------------
3528# Check C compiler features
3529# -------------------------
3530
ba479fd2
NN
3531ac_ext=c
3532ac_cpp='$CPP $CPPFLAGS'
3533ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3534ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3535ac_compiler_gnu=$ac_cv_c_compiler_gnu
ab22c1fa
CF
3536{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3537echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
84c041a1
ZW
3538# On Suns, sometimes $CPP names a directory.
3539if test -n "$CPP" && test -d "$CPP"; then
3540 CPP=
3541fi
3542if test -z "$CPP"; then
ba479fd2
NN
3543 if test "${ac_cv_prog_CPP+set}" = set; then
3544 echo $ECHO_N "(cached) $ECHO_C" >&6
3545else
3546 # Double quotes because CPP needs to be expanded
3547 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3548 do
3549 ac_preproc_ok=false
3550for ac_c_preproc_warn_flag in '' yes
3551do
3552 # Use a header file that comes with gcc, so configuring glibc
3553 # with a fresh cross-compiler works.
3554 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3555 # <limits.h> exists even on freestanding compilers.
84c041a1 3556 # On the NeXT, cc -E runs the code through the compiler's parser,
ba479fd2
NN
3557 # not just through cpp. "Syntax error" is here to catch this case.
3558 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3559/* confdefs.h. */
3560_ACEOF
3561cat confdefs.h >>conftest.$ac_ext
3562cat >>conftest.$ac_ext <<_ACEOF
3563/* end confdefs.h. */
3564#ifdef __STDC__
3565# include <limits.h>
3566#else
3567# include <assert.h>
3568#endif
86da66b5 3569 Syntax error
ba479fd2 3570_ACEOF
ab22c1fa
CF
3571if { (ac_try="$ac_cpp conftest.$ac_ext"
3572case "(($ac_try" in
3573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3574 *) ac_try_echo=$ac_try;;
3575esac
3576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3577 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
3578 ac_status=$?
3579 grep -v '^ *+' conftest.er1 >conftest.err
3580 rm -f conftest.er1
3581 cat conftest.err >&5
3582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
3583 (exit $ac_status); } >/dev/null && {
3584 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3585 test ! -s conftest.err
3586 }; then
093e61a6 3587 :
cafe096b 3588else
ba479fd2
NN
3589 echo "$as_me: failed program was:" >&5
3590sed 's/^/| /' conftest.$ac_ext >&5
3591
3592 # Broken: fails on valid input.
3593continue
3594fi
ab22c1fa 3595
ba479fd2
NN
3596rm -f conftest.err conftest.$ac_ext
3597
ab22c1fa 3598 # OK, works on sane cases. Now check whether nonexistent headers
ba479fd2
NN
3599 # can be detected and how.
3600 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3601/* confdefs.h. */
3602_ACEOF
3603cat confdefs.h >>conftest.$ac_ext
3604cat >>conftest.$ac_ext <<_ACEOF
3605/* end confdefs.h. */
3606#include <ac_nonexistent.h>
3607_ACEOF
ab22c1fa
CF
3608if { (ac_try="$ac_cpp conftest.$ac_ext"
3609case "(($ac_try" in
3610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3611 *) ac_try_echo=$ac_try;;
3612esac
3613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3614 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
3615 ac_status=$?
3616 grep -v '^ *+' conftest.er1 >conftest.err
3617 rm -f conftest.er1
3618 cat conftest.err >&5
3619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
3620 (exit $ac_status); } >/dev/null && {
3621 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3622 test ! -s conftest.err
3623 }; then
ba479fd2
NN
3624 # Broken: success on invalid input.
3625continue
3626else
3627 echo "$as_me: failed program was:" >&5
3628sed 's/^/| /' conftest.$ac_ext >&5
3629
3630 # Passes both tests.
3631ac_preproc_ok=:
3632break
3633fi
ab22c1fa 3634
ba479fd2
NN
3635rm -f conftest.err conftest.$ac_ext
3636
3637done
3638# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3639rm -f conftest.err conftest.$ac_ext
3640if $ac_preproc_ok; then
3641 break
3642fi
3643
3644 done
3645 ac_cv_prog_CPP=$CPP
3646
3647fi
3648 CPP=$ac_cv_prog_CPP
3649else
3650 ac_cv_prog_CPP=$CPP
3651fi
ab22c1fa
CF
3652{ echo "$as_me:$LINENO: result: $CPP" >&5
3653echo "${ECHO_T}$CPP" >&6; }
ba479fd2
NN
3654ac_preproc_ok=false
3655for ac_c_preproc_warn_flag in '' yes
3656do
3657 # Use a header file that comes with gcc, so configuring glibc
3658 # with a fresh cross-compiler works.
3659 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3660 # <limits.h> exists even on freestanding compilers.
3661 # On the NeXT, cc -E runs the code through the compiler's parser,
3662 # not just through cpp. "Syntax error" is here to catch this case.
3663 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3664/* confdefs.h. */
3665_ACEOF
3666cat confdefs.h >>conftest.$ac_ext
3667cat >>conftest.$ac_ext <<_ACEOF
3668/* end confdefs.h. */
3669#ifdef __STDC__
3670# include <limits.h>
3671#else
3672# include <assert.h>
3673#endif
86da66b5 3674 Syntax error
ba479fd2 3675_ACEOF
ab22c1fa
CF
3676if { (ac_try="$ac_cpp conftest.$ac_ext"
3677case "(($ac_try" in
3678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3679 *) ac_try_echo=$ac_try;;
3680esac
3681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3682 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
3683 ac_status=$?
3684 grep -v '^ *+' conftest.er1 >conftest.err
3685 rm -f conftest.er1
3686 cat conftest.err >&5
3687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
3688 (exit $ac_status); } >/dev/null && {
3689 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3690 test ! -s conftest.err
3691 }; then
6e3f3080 3692 :
414d23ae 3693else
ba479fd2
NN
3694 echo "$as_me: failed program was:" >&5
3695sed 's/^/| /' conftest.$ac_ext >&5
3696
3697 # Broken: fails on valid input.
3698continue
3699fi
ab22c1fa 3700
ba479fd2
NN
3701rm -f conftest.err conftest.$ac_ext
3702
ab22c1fa 3703 # OK, works on sane cases. Now check whether nonexistent headers
ba479fd2
NN
3704 # can be detected and how.
3705 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3706/* confdefs.h. */
3707_ACEOF
3708cat confdefs.h >>conftest.$ac_ext
3709cat >>conftest.$ac_ext <<_ACEOF
3710/* end confdefs.h. */
3711#include <ac_nonexistent.h>
3712_ACEOF
ab22c1fa
CF
3713if { (ac_try="$ac_cpp conftest.$ac_ext"
3714case "(($ac_try" in
3715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3716 *) ac_try_echo=$ac_try;;
3717esac
3718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3719 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
3720 ac_status=$?
3721 grep -v '^ *+' conftest.er1 >conftest.err
3722 rm -f conftest.er1
3723 cat conftest.err >&5
3724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
3725 (exit $ac_status); } >/dev/null && {
3726 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3727 test ! -s conftest.err
3728 }; then
ba479fd2
NN
3729 # Broken: success on invalid input.
3730continue
3731else
3732 echo "$as_me: failed program was:" >&5
3733sed 's/^/| /' conftest.$ac_ext >&5
3734
3735 # Passes both tests.
3736ac_preproc_ok=:
3737break
63cf211a 3738fi
ab22c1fa 3739
ba479fd2
NN
3740rm -f conftest.err conftest.$ac_ext
3741
3742done
3743# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3744rm -f conftest.err conftest.$ac_ext
3745if $ac_preproc_ok; then
3746 :
6e3f3080 3747else
ba479fd2
NN
3748 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3749See \`config.log' for more details." >&5
3750echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3751See \`config.log' for more details." >&2;}
3752 { (exit 1); exit 1; }; }
6e3f3080
NN
3753fi
3754
ba479fd2
NN
3755ac_ext=c
3756ac_cpp='$CPP $CPPFLAGS'
3757ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3758ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3759ac_compiler_gnu=$ac_cv_c_compiler_gnu
3760
b5472e1d 3761
ab22c1fa
CF
3762{ echo "$as_me:$LINENO: checking for inline" >&5
3763echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
ba479fd2
NN
3764if test "${ac_cv_c_inline+set}" = set; then
3765 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
3766else
3767 ac_cv_c_inline=no
3768for ac_kw in inline __inline__ __inline; do
ba479fd2 3769 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
3770/* confdefs.h. */
3771_ACEOF
3772cat confdefs.h >>conftest.$ac_ext
3773cat >>conftest.$ac_ext <<_ACEOF
3774/* end confdefs.h. */
3775#ifndef __cplusplus
3776typedef int foo_t;
3777static $ac_kw foo_t static_foo () {return 0; }
3778$ac_kw foo_t foo () {return 0; }
3779#endif
414d23ae 3780
ba479fd2
NN
3781_ACEOF
3782rm -f conftest.$ac_objext
ab22c1fa
CF
3783if { (ac_try="$ac_compile"
3784case "(($ac_try" in
3785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3786 *) ac_try_echo=$ac_try;;
3787esac
3788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3789 (eval "$ac_compile") 2>conftest.er1
ba479fd2 3790 ac_status=$?
86da66b5
HPN
3791 grep -v '^ *+' conftest.er1 >conftest.err
3792 rm -f conftest.er1
3793 cat conftest.err >&5
ba479fd2 3794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
3795 (exit $ac_status); } && {
3796 test -z "$ac_c_werror_flag" ||
3797 test ! -s conftest.err
3798 } && test -s conftest.$ac_objext; then
3799 ac_cv_c_inline=$ac_kw
414d23ae 3800else
ba479fd2
NN
3801 echo "$as_me: failed program was:" >&5
3802sed 's/^/| /' conftest.$ac_ext >&5
3803
ab22c1fa 3804
414d23ae 3805fi
ab22c1fa
CF
3806
3807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3808 test "$ac_cv_c_inline" != no && break
414d23ae
HPN
3809done
3810
3811fi
ab22c1fa
CF
3812{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3813echo "${ECHO_T}$ac_cv_c_inline" >&6; }
86da66b5
HPN
3814
3815
ba479fd2 3816case $ac_cv_c_inline in
414d23ae 3817 inline | yes) ;;
86da66b5
HPN
3818 *)
3819 case $ac_cv_c_inline in
3820 no) ac_val=;;
3821 *) ac_val=$ac_cv_c_inline;;
3822 esac
3823 cat >>confdefs.h <<_ACEOF
3824#ifndef __cplusplus
3825#define inline $ac_val
3826#endif
ba479fd2 3827_ACEOF
86da66b5 3828 ;;
414d23ae
HPN
3829esac
3830
414d23ae 3831
414d23ae 3832# sizeof(char) is 1 by definition.
bf3b7cd3 3833
ab22c1fa
CF
3834{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3835echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3836if test "${ac_cv_path_GREP+set}" = set; then
3837 echo $ECHO_N "(cached) $ECHO_C" >&6
3838else
3839 # Extract the first word of "grep ggrep" to use in msg output
3840if test -z "$GREP"; then
3841set dummy grep ggrep; ac_prog_name=$2
3842if test "${ac_cv_path_GREP+set}" = set; then
3843 echo $ECHO_N "(cached) $ECHO_C" >&6
3844else
3845 ac_path_GREP_found=false
3846# Loop through the user's path and test for each of PROGNAME-LIST
3847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3848for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3849do
3850 IFS=$as_save_IFS
3851 test -z "$as_dir" && as_dir=.
3852 for ac_prog in grep ggrep; do
3853 for ac_exec_ext in '' $ac_executable_extensions; do
3854 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3855 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3856 # Check for GNU ac_path_GREP and select it if it is found.
3857 # Check for GNU $ac_path_GREP
3858case `"$ac_path_GREP" --version 2>&1` in
3859*GNU*)
3860 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3861*)
3862 ac_count=0
3863 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3864 while :
3865 do
3866 cat "conftest.in" "conftest.in" >"conftest.tmp"
3867 mv "conftest.tmp" "conftest.in"
3868 cp "conftest.in" "conftest.nl"
3869 echo 'GREP' >> "conftest.nl"
3870 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3871 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3872 ac_count=`expr $ac_count + 1`
3873 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3874 # Best one so far, save it but keep looking for a better one
3875 ac_cv_path_GREP="$ac_path_GREP"
3876 ac_path_GREP_max=$ac_count
3877 fi
3878 # 10*(2^10) chars as input seems more than enough
3879 test $ac_count -gt 10 && break
3880 done
3881 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3882esac
3883
3884
3885 $ac_path_GREP_found && break 3
3886 done
3887done
3888
3889done
3890IFS=$as_save_IFS
3891
3892
3893fi
3894
3895GREP="$ac_cv_path_GREP"
3896if test -z "$GREP"; then
3897 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3898echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3899 { (exit 1); exit 1; }; }
3900fi
3901
3902else
3903 ac_cv_path_GREP=$GREP
3904fi
3905
3906
3907fi
3908{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3909echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3910 GREP="$ac_cv_path_GREP"
3911
3912
3913{ echo "$as_me:$LINENO: checking for egrep" >&5
3914echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3915if test "${ac_cv_path_EGREP+set}" = set; then
3916 echo $ECHO_N "(cached) $ECHO_C" >&6
3917else
3918 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3919 then ac_cv_path_EGREP="$GREP -E"
3920 else
3921 # Extract the first word of "egrep" to use in msg output
3922if test -z "$EGREP"; then
3923set dummy egrep; ac_prog_name=$2
3924if test "${ac_cv_path_EGREP+set}" = set; then
703d89ab
ZW
3925 echo $ECHO_N "(cached) $ECHO_C" >&6
3926else
ab22c1fa
CF
3927 ac_path_EGREP_found=false
3928# Loop through the user's path and test for each of PROGNAME-LIST
3929as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3930for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3931do
3932 IFS=$as_save_IFS
3933 test -z "$as_dir" && as_dir=.
3934 for ac_prog in egrep; do
3935 for ac_exec_ext in '' $ac_executable_extensions; do
3936 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3937 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3938 # Check for GNU ac_path_EGREP and select it if it is found.
3939 # Check for GNU $ac_path_EGREP
3940case `"$ac_path_EGREP" --version 2>&1` in
3941*GNU*)
3942 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3943*)
3944 ac_count=0
3945 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3946 while :
3947 do
3948 cat "conftest.in" "conftest.in" >"conftest.tmp"
3949 mv "conftest.tmp" "conftest.in"
3950 cp "conftest.in" "conftest.nl"
3951 echo 'EGREP' >> "conftest.nl"
3952 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3953 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3954 ac_count=`expr $ac_count + 1`
3955 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3956 # Best one so far, save it but keep looking for a better one
3957 ac_cv_path_EGREP="$ac_path_EGREP"
3958 ac_path_EGREP_max=$ac_count
703d89ab 3959 fi
ab22c1fa
CF
3960 # 10*(2^10) chars as input seems more than enough
3961 test $ac_count -gt 10 && break
3962 done
3963 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3964esac
3965
3966
3967 $ac_path_EGREP_found && break 3
3968 done
3969done
3970
3971done
3972IFS=$as_save_IFS
3973
3974
3975fi
3976
3977EGREP="$ac_cv_path_EGREP"
3978if test -z "$EGREP"; then
3979 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3980echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3981 { (exit 1); exit 1; }; }
3982fi
3983
3984else
3985 ac_cv_path_EGREP=$EGREP
3986fi
3987
3988
3989 fi
a3bba767 3990fi
ab22c1fa
CF
3991{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3992echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3993 EGREP="$ac_cv_path_EGREP"
703d89ab
ZW
3994
3995
ab22c1fa
CF
3996{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3997echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
bf3b7cd3
JD
3998if test "${ac_cv_header_stdc+set}" = set; then
3999 echo $ECHO_N "(cached) $ECHO_C" >&6
4000else
4001 cat >conftest.$ac_ext <<_ACEOF
4002/* confdefs.h. */
4003_ACEOF
4004cat confdefs.h >>conftest.$ac_ext
4005cat >>conftest.$ac_ext <<_ACEOF
4006/* end confdefs.h. */
4007#include <stdlib.h>
4008#include <stdarg.h>
4009#include <string.h>
4010#include <float.h>
4011
4012int
4013main ()
4014{
4015
4016 ;
4017 return 0;
4018}
4019_ACEOF
4020rm -f conftest.$ac_objext
ab22c1fa
CF
4021if { (ac_try="$ac_compile"
4022case "(($ac_try" in
4023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4024 *) ac_try_echo=$ac_try;;
4025esac
4026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4027 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4028 ac_status=$?
4029 grep -v '^ *+' conftest.er1 >conftest.err
4030 rm -f conftest.er1
4031 cat conftest.err >&5
4032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
4033 (exit $ac_status); } && {
4034 test -z "$ac_c_werror_flag" ||
4035 test ! -s conftest.err
4036 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4037 ac_cv_header_stdc=yes
4038else
4039 echo "$as_me: failed program was:" >&5
4040sed 's/^/| /' conftest.$ac_ext >&5
4041
ab22c1fa 4042 ac_cv_header_stdc=no
bf3b7cd3 4043fi
ab22c1fa
CF
4044
4045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4046
4047if test $ac_cv_header_stdc = yes; then
4048 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4049 cat >conftest.$ac_ext <<_ACEOF
4050/* confdefs.h. */
4051_ACEOF
4052cat confdefs.h >>conftest.$ac_ext
4053cat >>conftest.$ac_ext <<_ACEOF
4054/* end confdefs.h. */
4055#include <string.h>
4056
4057_ACEOF
4058if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4059 $EGREP "memchr" >/dev/null 2>&1; then
4060 :
4061else
4062 ac_cv_header_stdc=no
4063fi
4064rm -f conftest*
4065
4066fi
4067
4068if test $ac_cv_header_stdc = yes; then
4069 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4070 cat >conftest.$ac_ext <<_ACEOF
4071/* confdefs.h. */
4072_ACEOF
4073cat confdefs.h >>conftest.$ac_ext
4074cat >>conftest.$ac_ext <<_ACEOF
4075/* end confdefs.h. */
4076#include <stdlib.h>
4077
4078_ACEOF
4079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4080 $EGREP "free" >/dev/null 2>&1; then
4081 :
4082else
4083 ac_cv_header_stdc=no
4084fi
4085rm -f conftest*
4086
4087fi
4088
4089if test $ac_cv_header_stdc = yes; then
4090 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4091 if test "$cross_compiling" = yes; then
4092 :
4093else
4094 cat >conftest.$ac_ext <<_ACEOF
4095/* confdefs.h. */
4096_ACEOF
4097cat confdefs.h >>conftest.$ac_ext
4098cat >>conftest.$ac_ext <<_ACEOF
4099/* end confdefs.h. */
4100#include <ctype.h>
ab22c1fa 4101#include <stdlib.h>
bf3b7cd3
JD
4102#if ((' ' & 0x0FF) == 0x020)
4103# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4104# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4105#else
4106# define ISLOWER(c) \
4107 (('a' <= (c) && (c) <= 'i') \
4108 || ('j' <= (c) && (c) <= 'r') \
4109 || ('s' <= (c) && (c) <= 'z'))
4110# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4111#endif
4112
4113#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4114int
4115main ()
4116{
4117 int i;
4118 for (i = 0; i < 256; i++)
4119 if (XOR (islower (i), ISLOWER (i))
4120 || toupper (i) != TOUPPER (i))
ab22c1fa
CF
4121 return 2;
4122 return 0;
bf3b7cd3
JD
4123}
4124_ACEOF
4125rm -f conftest$ac_exeext
ab22c1fa
CF
4126if { (ac_try="$ac_link"
4127case "(($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_link") 2>&5
bf3b7cd3
JD
4133 ac_status=$?
4134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4135 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ab22c1fa
CF
4136 { (case "(($ac_try" in
4137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4138 *) ac_try_echo=$ac_try;;
4139esac
4140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4141 (eval "$ac_try") 2>&5
bf3b7cd3
JD
4142 ac_status=$?
4143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4144 (exit $ac_status); }; }; then
4145 :
4146else
4147 echo "$as_me: program exited with status $ac_status" >&5
4148echo "$as_me: failed program was:" >&5
4149sed 's/^/| /' conftest.$ac_ext >&5
4150
4151( exit $ac_status )
4152ac_cv_header_stdc=no
4153fi
ab22c1fa 4154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4155fi
ab22c1fa
CF
4156
4157
703d89ab 4158fi
ab22c1fa
CF
4159fi
4160{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4161echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
bf3b7cd3
JD
4162if test $ac_cv_header_stdc = yes; then
4163
4164cat >>confdefs.h <<\_ACEOF
4165#define STDC_HEADERS 1
4166_ACEOF
4167
4168fi
4169
4170# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4181 inttypes.h stdint.h unistd.h
4182do
4183as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ab22c1fa
CF
4184{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4185echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4186if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
bf3b7cd3
JD
4187 echo $ECHO_N "(cached) $ECHO_C" >&6
4188else
4189 cat >conftest.$ac_ext <<_ACEOF
4190/* confdefs.h. */
4191_ACEOF
4192cat confdefs.h >>conftest.$ac_ext
4193cat >>conftest.$ac_ext <<_ACEOF
4194/* end confdefs.h. */
4195$ac_includes_default
4196
4197#include <$ac_header>
4198_ACEOF
4199rm -f conftest.$ac_objext
ab22c1fa
CF
4200if { (ac_try="$ac_compile"
4201case "(($ac_try" in
4202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4203 *) ac_try_echo=$ac_try;;
4204esac
4205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4206 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4207 ac_status=$?
4208 grep -v '^ *+' conftest.er1 >conftest.err
4209 rm -f conftest.er1
4210 cat conftest.err >&5
4211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
4212 (exit $ac_status); } && {
4213 test -z "$ac_c_werror_flag" ||
4214 test ! -s conftest.err
4215 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4216 eval "$as_ac_Header=yes"
4217else
4218 echo "$as_me: failed program was:" >&5
4219sed 's/^/| /' conftest.$ac_ext >&5
4220
ab22c1fa 4221 eval "$as_ac_Header=no"
bf3b7cd3 4222fi
ab22c1fa
CF
4223
4224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4225fi
ab22c1fa
CF
4226ac_res=`eval echo '${'$as_ac_Header'}'`
4227 { echo "$as_me:$LINENO: result: $ac_res" >&5
4228echo "${ECHO_T}$ac_res" >&6; }
bf3b7cd3
JD
4229if test `eval echo '${'$as_ac_Header'}'` = yes; then
4230 cat >>confdefs.h <<_ACEOF
4231#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4232_ACEOF
4233
4234fi
4235
4236done
4237
4238
ab22c1fa
CF
4239{ echo "$as_me:$LINENO: checking for void *" >&5
4240echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
bf3b7cd3
JD
4241if test "${ac_cv_type_void_p+set}" = set; then
4242 echo $ECHO_N "(cached) $ECHO_C" >&6
4243else
4244 cat >conftest.$ac_ext <<_ACEOF
4245/* confdefs.h. */
4246_ACEOF
4247cat confdefs.h >>conftest.$ac_ext
4248cat >>conftest.$ac_ext <<_ACEOF
4249/* end confdefs.h. */
4250$ac_includes_default
ab22c1fa 4251typedef void * ac__type_new_;
bf3b7cd3
JD
4252int
4253main ()
4254{
ab22c1fa 4255if ((ac__type_new_ *) 0)
bf3b7cd3 4256 return 0;
ab22c1fa 4257if (sizeof (ac__type_new_))
bf3b7cd3
JD
4258 return 0;
4259 ;
4260 return 0;
4261}
4262_ACEOF
4263rm -f conftest.$ac_objext
ab22c1fa
CF
4264if { (ac_try="$ac_compile"
4265case "(($ac_try" in
4266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4267 *) ac_try_echo=$ac_try;;
4268esac
4269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4270 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4271 ac_status=$?
4272 grep -v '^ *+' conftest.er1 >conftest.err
4273 rm -f conftest.er1
4274 cat conftest.err >&5
4275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
4276 (exit $ac_status); } && {
4277 test -z "$ac_c_werror_flag" ||
4278 test ! -s conftest.err
4279 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4280 ac_cv_type_void_p=yes
4281else
4282 echo "$as_me: failed program was:" >&5
4283sed 's/^/| /' conftest.$ac_ext >&5
4284
ab22c1fa 4285 ac_cv_type_void_p=no
bf3b7cd3 4286fi
ab22c1fa
CF
4287
4288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4289fi
ab22c1fa
CF
4290{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
4291echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
bf3b7cd3 4292
ab22c1fa
CF
4293# The cast to long int works around a bug in the HP C Compiler
4294# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4295# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4296# This bug is HP SR number 8606223364.
4297{ echo "$as_me:$LINENO: checking size of void *" >&5
4298echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
ba479fd2
NN
4299if test "${ac_cv_sizeof_void_p+set}" = set; then
4300 echo $ECHO_N "(cached) $ECHO_C" >&6
75b6f3fd 4301else
bf3b7cd3
JD
4302 if test "$cross_compiling" = yes; then
4303 # Depending upon the size, compute the lo and hi bounds.
4304cat >conftest.$ac_ext <<_ACEOF
4305/* confdefs.h. */
4306_ACEOF
4307cat confdefs.h >>conftest.$ac_ext
4308cat >>conftest.$ac_ext <<_ACEOF
4309/* end confdefs.h. */
4310$ac_includes_default
ab22c1fa 4311 typedef void * ac__type_sizeof_;
bf3b7cd3
JD
4312int
4313main ()
4314{
ab22c1fa 4315static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
bf3b7cd3
JD
4316test_array [0] = 0
4317
4318 ;
4319 return 0;
4320}
4321_ACEOF
4322rm -f conftest.$ac_objext
ab22c1fa
CF
4323if { (ac_try="$ac_compile"
4324case "(($ac_try" in
4325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4326 *) ac_try_echo=$ac_try;;
4327esac
4328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4329 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4330 ac_status=$?
4331 grep -v '^ *+' conftest.er1 >conftest.err
4332 rm -f conftest.er1
4333 cat conftest.err >&5
4334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
4335 (exit $ac_status); } && {
4336 test -z "$ac_c_werror_flag" ||
4337 test ! -s conftest.err
4338 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4339 ac_lo=0 ac_mid=0
4340 while :; do
4341 cat >conftest.$ac_ext <<_ACEOF
4342/* confdefs.h. */
4343_ACEOF
4344cat confdefs.h >>conftest.$ac_ext
4345cat >>conftest.$ac_ext <<_ACEOF
4346/* end confdefs.h. */
4347$ac_includes_default
ab22c1fa 4348 typedef void * ac__type_sizeof_;
bf3b7cd3
JD
4349int
4350main ()
4351{
ab22c1fa 4352static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
4353test_array [0] = 0
4354
4355 ;
4356 return 0;
4357}
4358_ACEOF
4359rm -f conftest.$ac_objext
ab22c1fa
CF
4360if { (ac_try="$ac_compile"
4361case "(($ac_try" in
4362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4363 *) ac_try_echo=$ac_try;;
4364esac
4365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4366 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4367 ac_status=$?
4368 grep -v '^ *+' conftest.er1 >conftest.err
4369 rm -f conftest.er1
4370 cat conftest.err >&5
4371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
4372 (exit $ac_status); } && {
4373 test -z "$ac_c_werror_flag" ||
4374 test ! -s conftest.err
4375 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4376 ac_hi=$ac_mid; break
4377else
4378 echo "$as_me: failed program was:" >&5
4379sed 's/^/| /' conftest.$ac_ext >&5
4380
ab22c1fa
CF
4381 ac_lo=`expr $ac_mid + 1`
4382 if test $ac_lo -le $ac_mid; then
4383 ac_lo= ac_hi=
4384 break
4385 fi
4386 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4387fi
ab22c1fa
CF
4388
4389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4390 done
4391else
4392 echo "$as_me: failed program was:" >&5
4393sed 's/^/| /' conftest.$ac_ext >&5
4394
ab22c1fa 4395 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4396/* confdefs.h. */
4397_ACEOF
4398cat confdefs.h >>conftest.$ac_ext
4399cat >>conftest.$ac_ext <<_ACEOF
4400/* end confdefs.h. */
4401$ac_includes_default
ab22c1fa 4402 typedef void * ac__type_sizeof_;
bf3b7cd3
JD
4403int
4404main ()
4405{
ab22c1fa 4406static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
bf3b7cd3
JD
4407test_array [0] = 0
4408
4409 ;
4410 return 0;
4411}
4412_ACEOF
4413rm -f conftest.$ac_objext
ab22c1fa
CF
4414if { (ac_try="$ac_compile"
4415case "(($ac_try" in
4416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4417 *) ac_try_echo=$ac_try;;
4418esac
4419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4420 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4421 ac_status=$?
4422 grep -v '^ *+' conftest.er1 >conftest.err
4423 rm -f conftest.er1
4424 cat conftest.err >&5
4425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
4426 (exit $ac_status); } && {
4427 test -z "$ac_c_werror_flag" ||
4428 test ! -s conftest.err
4429 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4430 ac_hi=-1 ac_mid=-1
4431 while :; do
4432 cat >conftest.$ac_ext <<_ACEOF
4433/* confdefs.h. */
4434_ACEOF
4435cat confdefs.h >>conftest.$ac_ext
4436cat >>conftest.$ac_ext <<_ACEOF
4437/* end confdefs.h. */
4438$ac_includes_default
ab22c1fa 4439 typedef void * ac__type_sizeof_;
bf3b7cd3
JD
4440int
4441main ()
4442{
ab22c1fa 4443static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
bf3b7cd3
JD
4444test_array [0] = 0
4445
4446 ;
4447 return 0;
4448}
4449_ACEOF
4450rm -f conftest.$ac_objext
ab22c1fa
CF
4451if { (ac_try="$ac_compile"
4452case "(($ac_try" in
4453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4454 *) ac_try_echo=$ac_try;;
4455esac
4456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4457 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4458 ac_status=$?
4459 grep -v '^ *+' conftest.er1 >conftest.err
4460 rm -f conftest.er1
4461 cat conftest.err >&5
4462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
4463 (exit $ac_status); } && {
4464 test -z "$ac_c_werror_flag" ||
4465 test ! -s conftest.err
4466 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4467 ac_lo=$ac_mid; break
4468else
4469 echo "$as_me: failed program was:" >&5
4470sed 's/^/| /' conftest.$ac_ext >&5
4471
ab22c1fa
CF
4472 ac_hi=`expr '(' $ac_mid ')' - 1`
4473 if test $ac_mid -le $ac_hi; then
4474 ac_lo= ac_hi=
4475 break
4476 fi
4477 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 4478fi
ab22c1fa
CF
4479
4480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4481 done
4482else
4483 echo "$as_me: failed program was:" >&5
4484sed 's/^/| /' conftest.$ac_ext >&5
4485
ab22c1fa 4486 ac_lo= ac_hi=
bf3b7cd3 4487fi
ab22c1fa
CF
4488
4489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4490fi
ab22c1fa
CF
4491
4492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4493# Binary search between lo and hi bounds.
4494while test "x$ac_lo" != "x$ac_hi"; do
4495 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4496 cat >conftest.$ac_ext <<_ACEOF
4497/* confdefs.h. */
4498_ACEOF
4499cat confdefs.h >>conftest.$ac_ext
4500cat >>conftest.$ac_ext <<_ACEOF
4501/* end confdefs.h. */
4502$ac_includes_default
ab22c1fa 4503 typedef void * ac__type_sizeof_;
bf3b7cd3
JD
4504int
4505main ()
4506{
ab22c1fa 4507static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
4508test_array [0] = 0
4509
4510 ;
4511 return 0;
4512}
4513_ACEOF
4514rm -f conftest.$ac_objext
ab22c1fa
CF
4515if { (ac_try="$ac_compile"
4516case "(($ac_try" in
4517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4518 *) ac_try_echo=$ac_try;;
4519esac
4520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4521 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4522 ac_status=$?
4523 grep -v '^ *+' conftest.er1 >conftest.err
4524 rm -f conftest.er1
4525 cat conftest.err >&5
4526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
4527 (exit $ac_status); } && {
4528 test -z "$ac_c_werror_flag" ||
4529 test ! -s conftest.err
4530 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4531 ac_hi=$ac_mid
4532else
4533 echo "$as_me: failed program was:" >&5
4534sed 's/^/| /' conftest.$ac_ext >&5
4535
ab22c1fa 4536 ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 4537fi
ab22c1fa
CF
4538
4539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4540done
4541case $ac_lo in
4542?*) ac_cv_sizeof_void_p=$ac_lo;;
ab22c1fa
CF
4543'') if test "$ac_cv_type_void_p" = yes; then
4544 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
bf3b7cd3 4545See \`config.log' for more details." >&5
ab22c1fa 4546echo "$as_me: error: cannot compute sizeof (void *)
bf3b7cd3 4547See \`config.log' for more details." >&2;}
ab22c1fa
CF
4548 { (exit 77); exit 77; }; }
4549 else
4550 ac_cv_sizeof_void_p=0
4551 fi ;;
bf3b7cd3 4552esac
bf3b7cd3
JD
4553else
4554 cat >conftest.$ac_ext <<_ACEOF
4555/* confdefs.h. */
4556_ACEOF
4557cat confdefs.h >>conftest.$ac_ext
4558cat >>conftest.$ac_ext <<_ACEOF
4559/* end confdefs.h. */
4560$ac_includes_default
ab22c1fa
CF
4561 typedef void * ac__type_sizeof_;
4562static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
4563static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
bf3b7cd3
JD
4564#include <stdio.h>
4565#include <stdlib.h>
4566int
4567main ()
4568{
4569
4570 FILE *f = fopen ("conftest.val", "w");
4571 if (! f)
ab22c1fa
CF
4572 return 1;
4573 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
bf3b7cd3 4574 {
ab22c1fa
CF
4575 long int i = longval ();
4576 if (i != ((long int) (sizeof (ac__type_sizeof_))))
4577 return 1;
bf3b7cd3
JD
4578 fprintf (f, "%ld\n", i);
4579 }
4580 else
4581 {
ab22c1fa
CF
4582 unsigned long int i = ulongval ();
4583 if (i != ((long int) (sizeof (ac__type_sizeof_))))
4584 return 1;
bf3b7cd3
JD
4585 fprintf (f, "%lu\n", i);
4586 }
ab22c1fa 4587 return ferror (f) || fclose (f) != 0;
bf3b7cd3
JD
4588
4589 ;
4590 return 0;
4591}
4592_ACEOF
4593rm -f conftest$ac_exeext
ab22c1fa
CF
4594if { (ac_try="$ac_link"
4595case "(($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_link") 2>&5
bf3b7cd3
JD
4601 ac_status=$?
4602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4603 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ab22c1fa
CF
4604 { (case "(($ac_try" in
4605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4606 *) ac_try_echo=$ac_try;;
4607esac
4608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4609 (eval "$ac_try") 2>&5
bf3b7cd3
JD
4610 ac_status=$?
4611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4612 (exit $ac_status); }; }; then
4613 ac_cv_sizeof_void_p=`cat conftest.val`
4614else
4615 echo "$as_me: program exited with status $ac_status" >&5
4616echo "$as_me: failed program was:" >&5
4617sed 's/^/| /' conftest.$ac_ext >&5
4618
4619( exit $ac_status )
ab22c1fa
CF
4620if test "$ac_cv_type_void_p" = yes; then
4621 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
bf3b7cd3 4622See \`config.log' for more details." >&5
ab22c1fa 4623echo "$as_me: error: cannot compute sizeof (void *)
bf3b7cd3 4624See \`config.log' for more details." >&2;}
ab22c1fa
CF
4625 { (exit 77); exit 77; }; }
4626 else
4627 ac_cv_sizeof_void_p=0
4628 fi
bf3b7cd3 4629fi
ab22c1fa 4630rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4631fi
4632rm -f conftest.val
bf3b7cd3 4633fi
ab22c1fa
CF
4634{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
4635echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
4636
4637
4638
bf3b7cd3
JD
4639cat >>confdefs.h <<_ACEOF
4640#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4641_ACEOF
4642
4643
ab22c1fa
CF
4644{ echo "$as_me:$LINENO: checking for short" >&5
4645echo $ECHO_N "checking for short... $ECHO_C" >&6; }
bf3b7cd3
JD
4646if test "${ac_cv_type_short+set}" = set; then
4647 echo $ECHO_N "(cached) $ECHO_C" >&6
4648else
4649 cat >conftest.$ac_ext <<_ACEOF
4650/* confdefs.h. */
4651_ACEOF
4652cat confdefs.h >>conftest.$ac_ext
4653cat >>conftest.$ac_ext <<_ACEOF
4654/* end confdefs.h. */
4655$ac_includes_default
ab22c1fa 4656typedef short ac__type_new_;
bf3b7cd3
JD
4657int
4658main ()
4659{
ab22c1fa 4660if ((ac__type_new_ *) 0)
bf3b7cd3 4661 return 0;
ab22c1fa 4662if (sizeof (ac__type_new_))
bf3b7cd3
JD
4663 return 0;
4664 ;
4665 return 0;
4666}
4667_ACEOF
4668rm -f conftest.$ac_objext
ab22c1fa
CF
4669if { (ac_try="$ac_compile"
4670case "(($ac_try" in
4671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4672 *) ac_try_echo=$ac_try;;
4673esac
4674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4675 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4676 ac_status=$?
4677 grep -v '^ *+' conftest.er1 >conftest.err
4678 rm -f conftest.er1
4679 cat conftest.err >&5
4680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
4681 (exit $ac_status); } && {
4682 test -z "$ac_c_werror_flag" ||
4683 test ! -s conftest.err
4684 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4685 ac_cv_type_short=yes
4686else
4687 echo "$as_me: failed program was:" >&5
4688sed 's/^/| /' conftest.$ac_ext >&5
4689
ab22c1fa 4690 ac_cv_type_short=no
bf3b7cd3 4691fi
ab22c1fa
CF
4692
4693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4694fi
ab22c1fa
CF
4695{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
4696echo "${ECHO_T}$ac_cv_type_short" >&6; }
bf3b7cd3 4697
ab22c1fa
CF
4698# The cast to long int works around a bug in the HP C Compiler
4699# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4700# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4701# This bug is HP SR number 8606223364.
4702{ echo "$as_me:$LINENO: checking size of short" >&5
4703echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
bf3b7cd3
JD
4704if test "${ac_cv_sizeof_short+set}" = set; then
4705 echo $ECHO_N "(cached) $ECHO_C" >&6
4706else
bf3b7cd3
JD
4707 if test "$cross_compiling" = yes; then
4708 # Depending upon the size, compute the lo and hi bounds.
4709cat >conftest.$ac_ext <<_ACEOF
4710/* confdefs.h. */
4711_ACEOF
4712cat confdefs.h >>conftest.$ac_ext
4713cat >>conftest.$ac_ext <<_ACEOF
4714/* end confdefs.h. */
4715$ac_includes_default
ab22c1fa 4716 typedef short ac__type_sizeof_;
bf3b7cd3
JD
4717int
4718main ()
4719{
ab22c1fa 4720static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
bf3b7cd3
JD
4721test_array [0] = 0
4722
4723 ;
4724 return 0;
4725}
4726_ACEOF
4727rm -f conftest.$ac_objext
ab22c1fa
CF
4728if { (ac_try="$ac_compile"
4729case "(($ac_try" in
4730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4731 *) ac_try_echo=$ac_try;;
4732esac
4733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4734 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4735 ac_status=$?
4736 grep -v '^ *+' conftest.er1 >conftest.err
4737 rm -f conftest.er1
4738 cat conftest.err >&5
4739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
4740 (exit $ac_status); } && {
4741 test -z "$ac_c_werror_flag" ||
4742 test ! -s conftest.err
4743 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4744 ac_lo=0 ac_mid=0
4745 while :; do
4746 cat >conftest.$ac_ext <<_ACEOF
4747/* confdefs.h. */
4748_ACEOF
4749cat confdefs.h >>conftest.$ac_ext
4750cat >>conftest.$ac_ext <<_ACEOF
4751/* end confdefs.h. */
4752$ac_includes_default
ab22c1fa 4753 typedef short ac__type_sizeof_;
bf3b7cd3
JD
4754int
4755main ()
4756{
ab22c1fa 4757static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
4758test_array [0] = 0
4759
4760 ;
4761 return 0;
4762}
4763_ACEOF
4764rm -f conftest.$ac_objext
ab22c1fa
CF
4765if { (ac_try="$ac_compile"
4766case "(($ac_try" in
4767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4768 *) ac_try_echo=$ac_try;;
4769esac
4770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4771 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4772 ac_status=$?
4773 grep -v '^ *+' conftest.er1 >conftest.err
4774 rm -f conftest.er1
4775 cat conftest.err >&5
4776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
4777 (exit $ac_status); } && {
4778 test -z "$ac_c_werror_flag" ||
4779 test ! -s conftest.err
4780 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4781 ac_hi=$ac_mid; break
4782else
4783 echo "$as_me: failed program was:" >&5
4784sed 's/^/| /' conftest.$ac_ext >&5
4785
ab22c1fa
CF
4786 ac_lo=`expr $ac_mid + 1`
4787 if test $ac_lo -le $ac_mid; then
4788 ac_lo= ac_hi=
4789 break
4790 fi
4791 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 4792fi
ab22c1fa
CF
4793
4794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4795 done
4796else
4797 echo "$as_me: failed program was:" >&5
4798sed 's/^/| /' conftest.$ac_ext >&5
4799
ab22c1fa 4800 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4801/* confdefs.h. */
4802_ACEOF
4803cat confdefs.h >>conftest.$ac_ext
4804cat >>conftest.$ac_ext <<_ACEOF
4805/* end confdefs.h. */
4806$ac_includes_default
ab22c1fa 4807 typedef short ac__type_sizeof_;
bf3b7cd3
JD
4808int
4809main ()
4810{
ab22c1fa 4811static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
bf3b7cd3
JD
4812test_array [0] = 0
4813
4814 ;
4815 return 0;
4816}
4817_ACEOF
4818rm -f conftest.$ac_objext
ab22c1fa
CF
4819if { (ac_try="$ac_compile"
4820case "(($ac_try" in
4821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4822 *) ac_try_echo=$ac_try;;
4823esac
4824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4825 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4826 ac_status=$?
4827 grep -v '^ *+' conftest.er1 >conftest.err
4828 rm -f conftest.er1
4829 cat conftest.err >&5
4830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
4831 (exit $ac_status); } && {
4832 test -z "$ac_c_werror_flag" ||
4833 test ! -s conftest.err
4834 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4835 ac_hi=-1 ac_mid=-1
4836 while :; do
4837 cat >conftest.$ac_ext <<_ACEOF
4838/* confdefs.h. */
4839_ACEOF
4840cat confdefs.h >>conftest.$ac_ext
4841cat >>conftest.$ac_ext <<_ACEOF
4842/* end confdefs.h. */
4843$ac_includes_default
ab22c1fa 4844 typedef short ac__type_sizeof_;
bf3b7cd3
JD
4845int
4846main ()
4847{
ab22c1fa 4848static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
bf3b7cd3
JD
4849test_array [0] = 0
4850
4851 ;
4852 return 0;
4853}
4854_ACEOF
4855rm -f conftest.$ac_objext
ab22c1fa
CF
4856if { (ac_try="$ac_compile"
4857case "(($ac_try" in
4858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4859 *) ac_try_echo=$ac_try;;
4860esac
4861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4862 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4863 ac_status=$?
4864 grep -v '^ *+' conftest.er1 >conftest.err
4865 rm -f conftest.er1
4866 cat conftest.err >&5
4867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
4868 (exit $ac_status); } && {
4869 test -z "$ac_c_werror_flag" ||
4870 test ! -s conftest.err
4871 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4872 ac_lo=$ac_mid; break
4873else
4874 echo "$as_me: failed program was:" >&5
4875sed 's/^/| /' conftest.$ac_ext >&5
4876
ab22c1fa
CF
4877 ac_hi=`expr '(' $ac_mid ')' - 1`
4878 if test $ac_mid -le $ac_hi; then
4879 ac_lo= ac_hi=
4880 break
4881 fi
4882 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 4883fi
ab22c1fa
CF
4884
4885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4886 done
4887else
4888 echo "$as_me: failed program was:" >&5
4889sed 's/^/| /' conftest.$ac_ext >&5
4890
ab22c1fa 4891 ac_lo= ac_hi=
bf3b7cd3 4892fi
ab22c1fa
CF
4893
4894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 4895fi
ab22c1fa
CF
4896
4897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4898# Binary search between lo and hi bounds.
4899while test "x$ac_lo" != "x$ac_hi"; do
4900 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4901 cat >conftest.$ac_ext <<_ACEOF
4902/* confdefs.h. */
4903_ACEOF
4904cat confdefs.h >>conftest.$ac_ext
4905cat >>conftest.$ac_ext <<_ACEOF
4906/* end confdefs.h. */
4907$ac_includes_default
ab22c1fa 4908 typedef short ac__type_sizeof_;
bf3b7cd3
JD
4909int
4910main ()
4911{
ab22c1fa 4912static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
4913test_array [0] = 0
4914
4915 ;
4916 return 0;
4917}
4918_ACEOF
4919rm -f conftest.$ac_objext
ab22c1fa
CF
4920if { (ac_try="$ac_compile"
4921case "(($ac_try" in
4922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4923 *) ac_try_echo=$ac_try;;
4924esac
4925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4926 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
4927 ac_status=$?
4928 grep -v '^ *+' conftest.er1 >conftest.err
4929 rm -f conftest.er1
4930 cat conftest.err >&5
4931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
4932 (exit $ac_status); } && {
4933 test -z "$ac_c_werror_flag" ||
4934 test ! -s conftest.err
4935 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
4936 ac_hi=$ac_mid
4937else
4938 echo "$as_me: failed program was:" >&5
4939sed 's/^/| /' conftest.$ac_ext >&5
4940
ab22c1fa 4941 ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 4942fi
ab22c1fa
CF
4943
4944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
4945done
4946case $ac_lo in
4947?*) ac_cv_sizeof_short=$ac_lo;;
ab22c1fa
CF
4948'') if test "$ac_cv_type_short" = yes; then
4949 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
bf3b7cd3 4950See \`config.log' for more details." >&5
ab22c1fa 4951echo "$as_me: error: cannot compute sizeof (short)
bf3b7cd3 4952See \`config.log' for more details." >&2;}
ab22c1fa
CF
4953 { (exit 77); exit 77; }; }
4954 else
4955 ac_cv_sizeof_short=0
4956 fi ;;
bf3b7cd3 4957esac
8b1f719a
PB
4958else
4959 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
4960/* confdefs.h. */
4961_ACEOF
4962cat confdefs.h >>conftest.$ac_ext
4963cat >>conftest.$ac_ext <<_ACEOF
4964/* end confdefs.h. */
4965$ac_includes_default
ab22c1fa
CF
4966 typedef short ac__type_sizeof_;
4967static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
4968static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
bf3b7cd3
JD
4969#include <stdio.h>
4970#include <stdlib.h>
4971int
4972main ()
4973{
4974
4975 FILE *f = fopen ("conftest.val", "w");
4976 if (! f)
ab22c1fa
CF
4977 return 1;
4978 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
bf3b7cd3 4979 {
ab22c1fa
CF
4980 long int i = longval ();
4981 if (i != ((long int) (sizeof (ac__type_sizeof_))))
4982 return 1;
bf3b7cd3
JD
4983 fprintf (f, "%ld\n", i);
4984 }
4985 else
4986 {
ab22c1fa
CF
4987 unsigned long int i = ulongval ();
4988 if (i != ((long int) (sizeof (ac__type_sizeof_))))
4989 return 1;
bf3b7cd3
JD
4990 fprintf (f, "%lu\n", i);
4991 }
ab22c1fa 4992 return ferror (f) || fclose (f) != 0;
bf3b7cd3
JD
4993
4994 ;
4995 return 0;
4996}
4997_ACEOF
4998rm -f conftest$ac_exeext
ab22c1fa
CF
4999if { (ac_try="$ac_link"
5000case "(($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_link") 2>&5
bf3b7cd3
JD
5006 ac_status=$?
5007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5008 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ab22c1fa
CF
5009 { (case "(($ac_try" in
5010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5011 *) ac_try_echo=$ac_try;;
5012esac
5013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5014 (eval "$ac_try") 2>&5
bf3b7cd3
JD
5015 ac_status=$?
5016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5017 (exit $ac_status); }; }; then
5018 ac_cv_sizeof_short=`cat conftest.val`
5019else
5020 echo "$as_me: program exited with status $ac_status" >&5
5021echo "$as_me: failed program was:" >&5
5022sed 's/^/| /' conftest.$ac_ext >&5
5023
5024( exit $ac_status )
ab22c1fa
CF
5025if test "$ac_cv_type_short" = yes; then
5026 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
bf3b7cd3 5027See \`config.log' for more details." >&5
ab22c1fa 5028echo "$as_me: error: cannot compute sizeof (short)
bf3b7cd3 5029See \`config.log' for more details." >&2;}
ab22c1fa
CF
5030 { (exit 77); exit 77; }; }
5031 else
5032 ac_cv_sizeof_short=0
5033 fi
bf3b7cd3 5034fi
ab22c1fa 5035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5036fi
5037rm -f conftest.val
bf3b7cd3 5038fi
ab22c1fa
CF
5039{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
5040echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
5041
5042
5043
bf3b7cd3
JD
5044cat >>confdefs.h <<_ACEOF
5045#define SIZEOF_SHORT $ac_cv_sizeof_short
5046_ACEOF
5047
5048
ab22c1fa
CF
5049{ echo "$as_me:$LINENO: checking for int" >&5
5050echo $ECHO_N "checking for int... $ECHO_C" >&6; }
bf3b7cd3
JD
5051if test "${ac_cv_type_int+set}" = set; then
5052 echo $ECHO_N "(cached) $ECHO_C" >&6
5053else
5054 cat >conftest.$ac_ext <<_ACEOF
5055/* confdefs.h. */
5056_ACEOF
5057cat confdefs.h >>conftest.$ac_ext
5058cat >>conftest.$ac_ext <<_ACEOF
5059/* end confdefs.h. */
5060$ac_includes_default
ab22c1fa 5061typedef int ac__type_new_;
bf3b7cd3
JD
5062int
5063main ()
5064{
ab22c1fa 5065if ((ac__type_new_ *) 0)
bf3b7cd3 5066 return 0;
ab22c1fa 5067if (sizeof (ac__type_new_))
bf3b7cd3
JD
5068 return 0;
5069 ;
5070 return 0;
5071}
5072_ACEOF
5073rm -f conftest.$ac_objext
ab22c1fa
CF
5074if { (ac_try="$ac_compile"
5075case "(($ac_try" in
5076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5077 *) ac_try_echo=$ac_try;;
5078esac
5079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5080 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5081 ac_status=$?
5082 grep -v '^ *+' conftest.er1 >conftest.err
5083 rm -f conftest.er1
5084 cat conftest.err >&5
5085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
5086 (exit $ac_status); } && {
5087 test -z "$ac_c_werror_flag" ||
5088 test ! -s conftest.err
5089 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5090 ac_cv_type_int=yes
5091else
5092 echo "$as_me: failed program was:" >&5
5093sed 's/^/| /' conftest.$ac_ext >&5
5094
ab22c1fa 5095 ac_cv_type_int=no
bf3b7cd3 5096fi
ab22c1fa
CF
5097
5098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5099fi
ab22c1fa
CF
5100{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5101echo "${ECHO_T}$ac_cv_type_int" >&6; }
bf3b7cd3 5102
ab22c1fa
CF
5103# The cast to long int works around a bug in the HP C Compiler
5104# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5105# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5106# This bug is HP SR number 8606223364.
5107{ echo "$as_me:$LINENO: checking size of int" >&5
5108echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
bf3b7cd3
JD
5109if test "${ac_cv_sizeof_int+set}" = set; then
5110 echo $ECHO_N "(cached) $ECHO_C" >&6
5111else
bf3b7cd3
JD
5112 if test "$cross_compiling" = yes; then
5113 # Depending upon the size, compute the lo and hi bounds.
5114cat >conftest.$ac_ext <<_ACEOF
5115/* confdefs.h. */
5116_ACEOF
5117cat confdefs.h >>conftest.$ac_ext
5118cat >>conftest.$ac_ext <<_ACEOF
5119/* end confdefs.h. */
5120$ac_includes_default
ab22c1fa 5121 typedef int ac__type_sizeof_;
bf3b7cd3
JD
5122int
5123main ()
5124{
ab22c1fa 5125static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
bf3b7cd3
JD
5126test_array [0] = 0
5127
5128 ;
5129 return 0;
5130}
5131_ACEOF
5132rm -f conftest.$ac_objext
ab22c1fa
CF
5133if { (ac_try="$ac_compile"
5134case "(($ac_try" in
5135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5136 *) ac_try_echo=$ac_try;;
5137esac
5138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5139 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5140 ac_status=$?
5141 grep -v '^ *+' conftest.er1 >conftest.err
5142 rm -f conftest.er1
5143 cat conftest.err >&5
5144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
5145 (exit $ac_status); } && {
5146 test -z "$ac_c_werror_flag" ||
5147 test ! -s conftest.err
5148 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5149 ac_lo=0 ac_mid=0
5150 while :; do
5151 cat >conftest.$ac_ext <<_ACEOF
5152/* confdefs.h. */
5153_ACEOF
5154cat confdefs.h >>conftest.$ac_ext
5155cat >>conftest.$ac_ext <<_ACEOF
5156/* end confdefs.h. */
5157$ac_includes_default
ab22c1fa 5158 typedef int ac__type_sizeof_;
bf3b7cd3
JD
5159int
5160main ()
5161{
ab22c1fa 5162static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
5163test_array [0] = 0
5164
5165 ;
5166 return 0;
5167}
5168_ACEOF
5169rm -f conftest.$ac_objext
ab22c1fa
CF
5170if { (ac_try="$ac_compile"
5171case "(($ac_try" in
5172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5173 *) ac_try_echo=$ac_try;;
5174esac
5175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5176 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5177 ac_status=$?
5178 grep -v '^ *+' conftest.er1 >conftest.err
5179 rm -f conftest.er1
5180 cat conftest.err >&5
5181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
5182 (exit $ac_status); } && {
5183 test -z "$ac_c_werror_flag" ||
5184 test ! -s conftest.err
5185 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5186 ac_hi=$ac_mid; break
5187else
5188 echo "$as_me: failed program was:" >&5
5189sed 's/^/| /' conftest.$ac_ext >&5
5190
ab22c1fa
CF
5191 ac_lo=`expr $ac_mid + 1`
5192 if test $ac_lo -le $ac_mid; then
5193 ac_lo= ac_hi=
5194 break
5195 fi
5196 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 5197fi
ab22c1fa
CF
5198
5199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5200 done
5201else
5202 echo "$as_me: failed program was:" >&5
5203sed 's/^/| /' conftest.$ac_ext >&5
5204
ab22c1fa 5205 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5206/* confdefs.h. */
5207_ACEOF
5208cat confdefs.h >>conftest.$ac_ext
5209cat >>conftest.$ac_ext <<_ACEOF
5210/* end confdefs.h. */
5211$ac_includes_default
ab22c1fa 5212 typedef int ac__type_sizeof_;
bf3b7cd3
JD
5213int
5214main ()
5215{
ab22c1fa 5216static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
bf3b7cd3
JD
5217test_array [0] = 0
5218
5219 ;
5220 return 0;
5221}
5222_ACEOF
5223rm -f conftest.$ac_objext
ab22c1fa
CF
5224if { (ac_try="$ac_compile"
5225case "(($ac_try" in
5226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5227 *) ac_try_echo=$ac_try;;
5228esac
5229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5230 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5231 ac_status=$?
5232 grep -v '^ *+' conftest.er1 >conftest.err
5233 rm -f conftest.er1
5234 cat conftest.err >&5
5235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
5236 (exit $ac_status); } && {
5237 test -z "$ac_c_werror_flag" ||
5238 test ! -s conftest.err
5239 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5240 ac_hi=-1 ac_mid=-1
5241 while :; do
5242 cat >conftest.$ac_ext <<_ACEOF
5243/* confdefs.h. */
5244_ACEOF
5245cat confdefs.h >>conftest.$ac_ext
5246cat >>conftest.$ac_ext <<_ACEOF
5247/* end confdefs.h. */
5248$ac_includes_default
ab22c1fa 5249 typedef int ac__type_sizeof_;
bf3b7cd3
JD
5250int
5251main ()
5252{
ab22c1fa 5253static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
bf3b7cd3
JD
5254test_array [0] = 0
5255
5256 ;
5257 return 0;
5258}
5259_ACEOF
5260rm -f conftest.$ac_objext
ab22c1fa
CF
5261if { (ac_try="$ac_compile"
5262case "(($ac_try" in
5263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5264 *) ac_try_echo=$ac_try;;
5265esac
5266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5267 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5268 ac_status=$?
5269 grep -v '^ *+' conftest.er1 >conftest.err
5270 rm -f conftest.er1
5271 cat conftest.err >&5
5272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
5273 (exit $ac_status); } && {
5274 test -z "$ac_c_werror_flag" ||
5275 test ! -s conftest.err
5276 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5277 ac_lo=$ac_mid; break
5278else
5279 echo "$as_me: failed program was:" >&5
5280sed 's/^/| /' conftest.$ac_ext >&5
5281
ab22c1fa
CF
5282 ac_hi=`expr '(' $ac_mid ')' - 1`
5283 if test $ac_mid -le $ac_hi; then
5284 ac_lo= ac_hi=
5285 break
5286 fi
5287 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5288fi
ab22c1fa
CF
5289
5290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5291 done
5292else
5293 echo "$as_me: failed program was:" >&5
5294sed 's/^/| /' conftest.$ac_ext >&5
5295
ab22c1fa 5296 ac_lo= ac_hi=
bf3b7cd3 5297fi
ab22c1fa
CF
5298
5299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5300fi
ab22c1fa
CF
5301
5302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5303# Binary search between lo and hi bounds.
5304while test "x$ac_lo" != "x$ac_hi"; do
5305 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5306 cat >conftest.$ac_ext <<_ACEOF
5307/* confdefs.h. */
5308_ACEOF
5309cat confdefs.h >>conftest.$ac_ext
5310cat >>conftest.$ac_ext <<_ACEOF
5311/* end confdefs.h. */
5312$ac_includes_default
ab22c1fa 5313 typedef int ac__type_sizeof_;
bf3b7cd3
JD
5314int
5315main ()
5316{
ab22c1fa 5317static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
5318test_array [0] = 0
5319
5320 ;
5321 return 0;
5322}
5323_ACEOF
5324rm -f conftest.$ac_objext
ab22c1fa
CF
5325if { (ac_try="$ac_compile"
5326case "(($ac_try" in
5327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5328 *) ac_try_echo=$ac_try;;
5329esac
5330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5331 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5332 ac_status=$?
5333 grep -v '^ *+' conftest.er1 >conftest.err
5334 rm -f conftest.er1
5335 cat conftest.err >&5
5336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
5337 (exit $ac_status); } && {
5338 test -z "$ac_c_werror_flag" ||
5339 test ! -s conftest.err
5340 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5341 ac_hi=$ac_mid
5342else
5343 echo "$as_me: failed program was:" >&5
5344sed 's/^/| /' conftest.$ac_ext >&5
5345
ab22c1fa 5346 ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5347fi
ab22c1fa
CF
5348
5349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5350done
5351case $ac_lo in
5352?*) ac_cv_sizeof_int=$ac_lo;;
ab22c1fa
CF
5353'') if test "$ac_cv_type_int" = yes; then
5354 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
bf3b7cd3 5355See \`config.log' for more details." >&5
ab22c1fa 5356echo "$as_me: error: cannot compute sizeof (int)
bf3b7cd3 5357See \`config.log' for more details." >&2;}
ab22c1fa
CF
5358 { (exit 77); exit 77; }; }
5359 else
5360 ac_cv_sizeof_int=0
5361 fi ;;
bf3b7cd3 5362esac
bf3b7cd3
JD
5363else
5364 cat >conftest.$ac_ext <<_ACEOF
5365/* confdefs.h. */
5366_ACEOF
5367cat confdefs.h >>conftest.$ac_ext
5368cat >>conftest.$ac_ext <<_ACEOF
5369/* end confdefs.h. */
5370$ac_includes_default
ab22c1fa
CF
5371 typedef int ac__type_sizeof_;
5372static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
5373static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
bf3b7cd3
JD
5374#include <stdio.h>
5375#include <stdlib.h>
5376int
5377main ()
5378{
5379
5380 FILE *f = fopen ("conftest.val", "w");
5381 if (! f)
ab22c1fa
CF
5382 return 1;
5383 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
bf3b7cd3 5384 {
ab22c1fa
CF
5385 long int i = longval ();
5386 if (i != ((long int) (sizeof (ac__type_sizeof_))))
5387 return 1;
bf3b7cd3
JD
5388 fprintf (f, "%ld\n", i);
5389 }
5390 else
5391 {
ab22c1fa
CF
5392 unsigned long int i = ulongval ();
5393 if (i != ((long int) (sizeof (ac__type_sizeof_))))
5394 return 1;
bf3b7cd3
JD
5395 fprintf (f, "%lu\n", i);
5396 }
ab22c1fa 5397 return ferror (f) || fclose (f) != 0;
bf3b7cd3
JD
5398
5399 ;
5400 return 0;
5401}
5402_ACEOF
5403rm -f conftest$ac_exeext
ab22c1fa
CF
5404if { (ac_try="$ac_link"
5405case "(($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_link") 2>&5
bf3b7cd3
JD
5411 ac_status=$?
5412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5413 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ab22c1fa
CF
5414 { (case "(($ac_try" in
5415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5416 *) ac_try_echo=$ac_try;;
5417esac
5418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5419 (eval "$ac_try") 2>&5
bf3b7cd3
JD
5420 ac_status=$?
5421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5422 (exit $ac_status); }; }; then
5423 ac_cv_sizeof_int=`cat conftest.val`
5424else
5425 echo "$as_me: program exited with status $ac_status" >&5
5426echo "$as_me: failed program was:" >&5
5427sed 's/^/| /' conftest.$ac_ext >&5
5428
5429( exit $ac_status )
ab22c1fa
CF
5430if test "$ac_cv_type_int" = yes; then
5431 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
bf3b7cd3 5432See \`config.log' for more details." >&5
ab22c1fa 5433echo "$as_me: error: cannot compute sizeof (int)
bf3b7cd3 5434See \`config.log' for more details." >&2;}
ab22c1fa
CF
5435 { (exit 77); exit 77; }; }
5436 else
5437 ac_cv_sizeof_int=0
5438 fi
bf3b7cd3 5439fi
ab22c1fa 5440rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5441fi
5442rm -f conftest.val
bf3b7cd3 5443fi
ab22c1fa
CF
5444{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5445echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
5446
5447
5448
bf3b7cd3
JD
5449cat >>confdefs.h <<_ACEOF
5450#define SIZEOF_INT $ac_cv_sizeof_int
5451_ACEOF
5452
5453
ab22c1fa
CF
5454{ echo "$as_me:$LINENO: checking for long" >&5
5455echo $ECHO_N "checking for long... $ECHO_C" >&6; }
bf3b7cd3
JD
5456if test "${ac_cv_type_long+set}" = set; then
5457 echo $ECHO_N "(cached) $ECHO_C" >&6
5458else
5459 cat >conftest.$ac_ext <<_ACEOF
5460/* confdefs.h. */
5461_ACEOF
5462cat confdefs.h >>conftest.$ac_ext
5463cat >>conftest.$ac_ext <<_ACEOF
5464/* end confdefs.h. */
5465$ac_includes_default
ab22c1fa 5466typedef long ac__type_new_;
bf3b7cd3
JD
5467int
5468main ()
5469{
ab22c1fa 5470if ((ac__type_new_ *) 0)
bf3b7cd3 5471 return 0;
ab22c1fa 5472if (sizeof (ac__type_new_))
bf3b7cd3
JD
5473 return 0;
5474 ;
5475 return 0;
5476}
5477_ACEOF
5478rm -f conftest.$ac_objext
ab22c1fa
CF
5479if { (ac_try="$ac_compile"
5480case "(($ac_try" in
5481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5482 *) ac_try_echo=$ac_try;;
5483esac
5484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5485 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5486 ac_status=$?
5487 grep -v '^ *+' conftest.er1 >conftest.err
5488 rm -f conftest.er1
5489 cat conftest.err >&5
5490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
5491 (exit $ac_status); } && {
5492 test -z "$ac_c_werror_flag" ||
5493 test ! -s conftest.err
5494 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5495 ac_cv_type_long=yes
5496else
5497 echo "$as_me: failed program was:" >&5
5498sed 's/^/| /' conftest.$ac_ext >&5
5499
ab22c1fa 5500 ac_cv_type_long=no
bf3b7cd3 5501fi
ab22c1fa
CF
5502
5503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5504fi
ab22c1fa
CF
5505{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5506echo "${ECHO_T}$ac_cv_type_long" >&6; }
bf3b7cd3 5507
ab22c1fa
CF
5508# The cast to long int works around a bug in the HP C Compiler
5509# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5510# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5511# This bug is HP SR number 8606223364.
5512{ echo "$as_me:$LINENO: checking size of long" >&5
5513echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
bf3b7cd3
JD
5514if test "${ac_cv_sizeof_long+set}" = set; then
5515 echo $ECHO_N "(cached) $ECHO_C" >&6
5516else
bf3b7cd3
JD
5517 if test "$cross_compiling" = yes; then
5518 # Depending upon the size, compute the lo and hi bounds.
5519cat >conftest.$ac_ext <<_ACEOF
5520/* confdefs.h. */
5521_ACEOF
5522cat confdefs.h >>conftest.$ac_ext
5523cat >>conftest.$ac_ext <<_ACEOF
5524/* end confdefs.h. */
5525$ac_includes_default
ab22c1fa 5526 typedef long ac__type_sizeof_;
bf3b7cd3
JD
5527int
5528main ()
5529{
ab22c1fa 5530static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
bf3b7cd3
JD
5531test_array [0] = 0
5532
5533 ;
5534 return 0;
5535}
5536_ACEOF
5537rm -f conftest.$ac_objext
ab22c1fa
CF
5538if { (ac_try="$ac_compile"
5539case "(($ac_try" in
5540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5541 *) ac_try_echo=$ac_try;;
5542esac
5543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5544 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5545 ac_status=$?
5546 grep -v '^ *+' conftest.er1 >conftest.err
5547 rm -f conftest.er1
5548 cat conftest.err >&5
5549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
5550 (exit $ac_status); } && {
5551 test -z "$ac_c_werror_flag" ||
5552 test ! -s conftest.err
5553 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5554 ac_lo=0 ac_mid=0
5555 while :; do
5556 cat >conftest.$ac_ext <<_ACEOF
5557/* confdefs.h. */
5558_ACEOF
5559cat confdefs.h >>conftest.$ac_ext
5560cat >>conftest.$ac_ext <<_ACEOF
5561/* end confdefs.h. */
5562$ac_includes_default
ab22c1fa 5563 typedef long ac__type_sizeof_;
bf3b7cd3
JD
5564int
5565main ()
5566{
ab22c1fa 5567static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
5568test_array [0] = 0
5569
5570 ;
5571 return 0;
5572}
5573_ACEOF
5574rm -f conftest.$ac_objext
ab22c1fa
CF
5575if { (ac_try="$ac_compile"
5576case "(($ac_try" in
5577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5578 *) ac_try_echo=$ac_try;;
5579esac
5580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5581 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5582 ac_status=$?
5583 grep -v '^ *+' conftest.er1 >conftest.err
5584 rm -f conftest.er1
5585 cat conftest.err >&5
5586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
5587 (exit $ac_status); } && {
5588 test -z "$ac_c_werror_flag" ||
5589 test ! -s conftest.err
5590 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5591 ac_hi=$ac_mid; break
5592else
5593 echo "$as_me: failed program was:" >&5
5594sed 's/^/| /' conftest.$ac_ext >&5
5595
ab22c1fa
CF
5596 ac_lo=`expr $ac_mid + 1`
5597 if test $ac_lo -le $ac_mid; then
5598 ac_lo= ac_hi=
5599 break
5600 fi
5601 ac_mid=`expr 2 '*' $ac_mid + 1`
bf3b7cd3 5602fi
ab22c1fa
CF
5603
5604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5605 done
5606else
5607 echo "$as_me: failed program was:" >&5
5608sed 's/^/| /' conftest.$ac_ext >&5
5609
ab22c1fa 5610 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
5611/* confdefs.h. */
5612_ACEOF
5613cat confdefs.h >>conftest.$ac_ext
5614cat >>conftest.$ac_ext <<_ACEOF
5615/* end confdefs.h. */
5616$ac_includes_default
ab22c1fa 5617 typedef long ac__type_sizeof_;
bf3b7cd3
JD
5618int
5619main ()
5620{
ab22c1fa 5621static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
bf3b7cd3
JD
5622test_array [0] = 0
5623
5624 ;
5625 return 0;
5626}
5627_ACEOF
5628rm -f conftest.$ac_objext
ab22c1fa
CF
5629if { (ac_try="$ac_compile"
5630case "(($ac_try" in
5631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5632 *) ac_try_echo=$ac_try;;
5633esac
5634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5635 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5636 ac_status=$?
5637 grep -v '^ *+' conftest.er1 >conftest.err
5638 rm -f conftest.er1
5639 cat conftest.err >&5
5640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
5641 (exit $ac_status); } && {
5642 test -z "$ac_c_werror_flag" ||
5643 test ! -s conftest.err
5644 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5645 ac_hi=-1 ac_mid=-1
5646 while :; do
5647 cat >conftest.$ac_ext <<_ACEOF
5648/* confdefs.h. */
5649_ACEOF
5650cat confdefs.h >>conftest.$ac_ext
5651cat >>conftest.$ac_ext <<_ACEOF
5652/* end confdefs.h. */
5653$ac_includes_default
ab22c1fa 5654 typedef long ac__type_sizeof_;
bf3b7cd3
JD
5655int
5656main ()
5657{
ab22c1fa 5658static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
bf3b7cd3
JD
5659test_array [0] = 0
5660
5661 ;
5662 return 0;
5663}
5664_ACEOF
5665rm -f conftest.$ac_objext
ab22c1fa
CF
5666if { (ac_try="$ac_compile"
5667case "(($ac_try" in
5668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5669 *) ac_try_echo=$ac_try;;
5670esac
5671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5672 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5673 ac_status=$?
5674 grep -v '^ *+' conftest.er1 >conftest.err
5675 rm -f conftest.er1
5676 cat conftest.err >&5
5677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
5678 (exit $ac_status); } && {
5679 test -z "$ac_c_werror_flag" ||
5680 test ! -s conftest.err
5681 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5682 ac_lo=$ac_mid; break
5683else
5684 echo "$as_me: failed program was:" >&5
5685sed 's/^/| /' conftest.$ac_ext >&5
5686
ab22c1fa
CF
5687 ac_hi=`expr '(' $ac_mid ')' - 1`
5688 if test $ac_mid -le $ac_hi; then
5689 ac_lo= ac_hi=
5690 break
5691 fi
5692 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 5693fi
ab22c1fa
CF
5694
5695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5696 done
5697else
5698 echo "$as_me: failed program was:" >&5
5699sed 's/^/| /' conftest.$ac_ext >&5
5700
ab22c1fa 5701 ac_lo= ac_hi=
bf3b7cd3 5702fi
ab22c1fa
CF
5703
5704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5705fi
ab22c1fa
CF
5706
5707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5708# Binary search between lo and hi bounds.
5709while test "x$ac_lo" != "x$ac_hi"; do
5710 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5711 cat >conftest.$ac_ext <<_ACEOF
5712/* confdefs.h. */
5713_ACEOF
5714cat confdefs.h >>conftest.$ac_ext
5715cat >>conftest.$ac_ext <<_ACEOF
5716/* end confdefs.h. */
5717$ac_includes_default
ab22c1fa 5718 typedef long ac__type_sizeof_;
bf3b7cd3
JD
5719int
5720main ()
5721{
ab22c1fa 5722static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
5723test_array [0] = 0
5724
5725 ;
5726 return 0;
5727}
5728_ACEOF
5729rm -f conftest.$ac_objext
ab22c1fa
CF
5730if { (ac_try="$ac_compile"
5731case "(($ac_try" in
5732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5733 *) ac_try_echo=$ac_try;;
5734esac
5735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5736 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5737 ac_status=$?
5738 grep -v '^ *+' conftest.er1 >conftest.err
5739 rm -f conftest.er1
5740 cat conftest.err >&5
5741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
5742 (exit $ac_status); } && {
5743 test -z "$ac_c_werror_flag" ||
5744 test ! -s conftest.err
5745 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
5746 ac_hi=$ac_mid
5747else
5748 echo "$as_me: failed program was:" >&5
5749sed 's/^/| /' conftest.$ac_ext >&5
5750
ab22c1fa 5751 ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 5752fi
ab22c1fa
CF
5753
5754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5755done
5756case $ac_lo in
5757?*) ac_cv_sizeof_long=$ac_lo;;
ab22c1fa
CF
5758'') if test "$ac_cv_type_long" = yes; then
5759 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
bf3b7cd3 5760See \`config.log' for more details." >&5
ab22c1fa 5761echo "$as_me: error: cannot compute sizeof (long)
bf3b7cd3 5762See \`config.log' for more details." >&2;}
ab22c1fa
CF
5763 { (exit 77); exit 77; }; }
5764 else
5765 ac_cv_sizeof_long=0
5766 fi ;;
bf3b7cd3 5767esac
bf3b7cd3
JD
5768else
5769 cat >conftest.$ac_ext <<_ACEOF
5770/* confdefs.h. */
5771_ACEOF
5772cat confdefs.h >>conftest.$ac_ext
5773cat >>conftest.$ac_ext <<_ACEOF
5774/* end confdefs.h. */
5775$ac_includes_default
ab22c1fa
CF
5776 typedef long ac__type_sizeof_;
5777static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
5778static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
bf3b7cd3
JD
5779#include <stdio.h>
5780#include <stdlib.h>
5781int
5782main ()
5783{
5784
5785 FILE *f = fopen ("conftest.val", "w");
5786 if (! f)
ab22c1fa
CF
5787 return 1;
5788 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
bf3b7cd3 5789 {
ab22c1fa
CF
5790 long int i = longval ();
5791 if (i != ((long int) (sizeof (ac__type_sizeof_))))
5792 return 1;
bf3b7cd3
JD
5793 fprintf (f, "%ld\n", i);
5794 }
5795 else
5796 {
ab22c1fa
CF
5797 unsigned long int i = ulongval ();
5798 if (i != ((long int) (sizeof (ac__type_sizeof_))))
5799 return 1;
bf3b7cd3
JD
5800 fprintf (f, "%lu\n", i);
5801 }
ab22c1fa 5802 return ferror (f) || fclose (f) != 0;
bf3b7cd3
JD
5803
5804 ;
5805 return 0;
5806}
5807_ACEOF
5808rm -f conftest$ac_exeext
ab22c1fa
CF
5809if { (ac_try="$ac_link"
5810case "(($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_link") 2>&5
bf3b7cd3
JD
5816 ac_status=$?
5817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5818 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ab22c1fa
CF
5819 { (case "(($ac_try" in
5820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5821 *) ac_try_echo=$ac_try;;
5822esac
5823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5824 (eval "$ac_try") 2>&5
bf3b7cd3
JD
5825 ac_status=$?
5826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5827 (exit $ac_status); }; }; then
5828 ac_cv_sizeof_long=`cat conftest.val`
5829else
5830 echo "$as_me: program exited with status $ac_status" >&5
5831echo "$as_me: failed program was:" >&5
5832sed 's/^/| /' conftest.$ac_ext >&5
5833
5834( exit $ac_status )
ab22c1fa
CF
5835if test "$ac_cv_type_long" = yes; then
5836 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
bf3b7cd3 5837See \`config.log' for more details." >&5
ab22c1fa 5838echo "$as_me: error: cannot compute sizeof (long)
bf3b7cd3 5839See \`config.log' for more details." >&2;}
ab22c1fa
CF
5840 { (exit 77); exit 77; }; }
5841 else
5842 ac_cv_sizeof_long=0
5843 fi
bf3b7cd3 5844fi
ab22c1fa 5845rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
5846fi
5847rm -f conftest.val
bf3b7cd3 5848fi
ab22c1fa
CF
5849{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5850echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
5851
5852
5853
bf3b7cd3
JD
5854cat >>confdefs.h <<_ACEOF
5855#define SIZEOF_LONG $ac_cv_sizeof_long
5856_ACEOF
5857
5858
ab22c1fa
CF
5859{ echo "$as_me:$LINENO: checking for long long" >&5
5860echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
5ec1c5e6
KC
5861if test "${ac_cv_type_long_long+set}" = set; then
5862 echo $ECHO_N "(cached) $ECHO_C" >&6
5863else
5864 cat >conftest.$ac_ext <<_ACEOF
5865/* confdefs.h. */
5866_ACEOF
5867cat confdefs.h >>conftest.$ac_ext
5868cat >>conftest.$ac_ext <<_ACEOF
5869/* end confdefs.h. */
5870$ac_includes_default
ab22c1fa 5871typedef long long ac__type_new_;
5ec1c5e6
KC
5872int
5873main ()
5874{
ab22c1fa 5875if ((ac__type_new_ *) 0)
5ec1c5e6 5876 return 0;
ab22c1fa 5877if (sizeof (ac__type_new_))
5ec1c5e6
KC
5878 return 0;
5879 ;
5880 return 0;
5881}
5882_ACEOF
5883rm -f conftest.$ac_objext
ab22c1fa
CF
5884if { (ac_try="$ac_compile"
5885case "(($ac_try" in
5886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5887 *) ac_try_echo=$ac_try;;
5888esac
5889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5890 (eval "$ac_compile") 2>conftest.er1
5ec1c5e6
KC
5891 ac_status=$?
5892 grep -v '^ *+' conftest.er1 >conftest.err
5893 rm -f conftest.er1
5894 cat conftest.err >&5
5895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
5896 (exit $ac_status); } && {
5897 test -z "$ac_c_werror_flag" ||
5898 test ! -s conftest.err
5899 } && test -s conftest.$ac_objext; then
5ec1c5e6
KC
5900 ac_cv_type_long_long=yes
5901else
5902 echo "$as_me: failed program was:" >&5
5903sed 's/^/| /' conftest.$ac_ext >&5
5904
ab22c1fa 5905 ac_cv_type_long_long=no
5ec1c5e6 5906fi
ab22c1fa
CF
5907
5908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 5909fi
ab22c1fa
CF
5910{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5911echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
5ec1c5e6
KC
5912if test $ac_cv_type_long_long = yes; then
5913
5914cat >>confdefs.h <<_ACEOF
5915#define HAVE_LONG_LONG 1
5916_ACEOF
5917
ab22c1fa
CF
5918{ echo "$as_me:$LINENO: checking for long long" >&5
5919echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
bf3b7cd3
JD
5920if test "${ac_cv_type_long_long+set}" = set; then
5921 echo $ECHO_N "(cached) $ECHO_C" >&6
5922else
5923 cat >conftest.$ac_ext <<_ACEOF
5924/* confdefs.h. */
5925_ACEOF
5926cat confdefs.h >>conftest.$ac_ext
5927cat >>conftest.$ac_ext <<_ACEOF
5928/* end confdefs.h. */
5929$ac_includes_default
ab22c1fa 5930typedef long long ac__type_new_;
bf3b7cd3
JD
5931int
5932main ()
5933{
ab22c1fa 5934if ((ac__type_new_ *) 0)
bf3b7cd3 5935 return 0;
ab22c1fa 5936if (sizeof (ac__type_new_))
bf3b7cd3
JD
5937 return 0;
5938 ;
5939 return 0;
5940}
5941_ACEOF
5942rm -f conftest.$ac_objext
ab22c1fa
CF
5943if { (ac_try="$ac_compile"
5944case "(($ac_try" in
5945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5946 *) ac_try_echo=$ac_try;;
5947esac
5948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5949 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
5950 ac_status=$?
5951 grep -v '^ *+' conftest.er1 >conftest.err
5952 rm -f conftest.er1
5953 cat conftest.err >&5
5954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
5955 (exit $ac_status); } && {
5956 test -z "$ac_c_werror_flag" ||
5957 test ! -s conftest.err
5958 } && test -s conftest.$ac_objext; then
a3bba767
JJ
5959 ac_cv_type_long_long=yes
5960else
bf3b7cd3
JD
5961 echo "$as_me: failed program was:" >&5
5962sed 's/^/| /' conftest.$ac_ext >&5
5963
ab22c1fa 5964 ac_cv_type_long_long=no
bf3b7cd3 5965fi
ab22c1fa
CF
5966
5967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 5968fi
ab22c1fa
CF
5969{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
5970echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
bf3b7cd3 5971
ab22c1fa
CF
5972# The cast to long int works around a bug in the HP C Compiler
5973# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5974# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5975# This bug is HP SR number 8606223364.
5976{ echo "$as_me:$LINENO: checking size of long long" >&5
5977echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
bf3b7cd3
JD
5978if test "${ac_cv_sizeof_long_long+set}" = set; then
5979 echo $ECHO_N "(cached) $ECHO_C" >&6
5980else
bf3b7cd3
JD
5981 if test "$cross_compiling" = yes; then
5982 # Depending upon the size, compute the lo and hi bounds.
5983cat >conftest.$ac_ext <<_ACEOF
5984/* confdefs.h. */
5985_ACEOF
5986cat confdefs.h >>conftest.$ac_ext
5987cat >>conftest.$ac_ext <<_ACEOF
5988/* end confdefs.h. */
5989$ac_includes_default
ab22c1fa 5990 typedef long long ac__type_sizeof_;
bf3b7cd3
JD
5991int
5992main ()
5993{
ab22c1fa 5994static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
bf3b7cd3
JD
5995test_array [0] = 0
5996
5997 ;
5998 return 0;
5999}
6000_ACEOF
6001rm -f conftest.$ac_objext
ab22c1fa
CF
6002if { (ac_try="$ac_compile"
6003case "(($ac_try" in
6004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6005 *) ac_try_echo=$ac_try;;
6006esac
6007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6008 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
6009 ac_status=$?
6010 grep -v '^ *+' conftest.er1 >conftest.err
6011 rm -f conftest.er1
6012 cat conftest.err >&5
6013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
6014 (exit $ac_status); } && {
6015 test -z "$ac_c_werror_flag" ||
6016 test ! -s conftest.err
6017 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
6018 ac_lo=0 ac_mid=0
6019 while :; do
6020 cat >conftest.$ac_ext <<_ACEOF
6021/* confdefs.h. */
6022_ACEOF
6023cat confdefs.h >>conftest.$ac_ext
6024cat >>conftest.$ac_ext <<_ACEOF
6025/* end confdefs.h. */
6026$ac_includes_default
ab22c1fa 6027 typedef long long ac__type_sizeof_;
bf3b7cd3
JD
6028int
6029main ()
6030{
ab22c1fa 6031static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
6032test_array [0] = 0
6033
6034 ;
6035 return 0;
6036}
6037_ACEOF
6038rm -f conftest.$ac_objext
ab22c1fa
CF
6039if { (ac_try="$ac_compile"
6040case "(($ac_try" in
6041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6042 *) ac_try_echo=$ac_try;;
6043esac
6044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6045 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
6046 ac_status=$?
6047 grep -v '^ *+' conftest.er1 >conftest.err
6048 rm -f conftest.er1
6049 cat conftest.err >&5
6050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
6051 (exit $ac_status); } && {
6052 test -z "$ac_c_werror_flag" ||
6053 test ! -s conftest.err
6054 } && test -s conftest.$ac_objext; then
8b1f719a 6055 ac_hi=$ac_mid; break
bf3b7cd3
JD
6056else
6057 echo "$as_me: failed program was:" >&5
6058sed 's/^/| /' conftest.$ac_ext >&5
6059
ab22c1fa
CF
6060 ac_lo=`expr $ac_mid + 1`
6061 if test $ac_lo -le $ac_mid; then
6062 ac_lo= ac_hi=
6063 break
6064 fi
6065 ac_mid=`expr 2 '*' $ac_mid + 1`
8b1f719a 6066fi
ab22c1fa
CF
6067
6068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8b1f719a
PB
6069 done
6070else
6071 echo "$as_me: failed program was:" >&5
6072sed 's/^/| /' conftest.$ac_ext >&5
6073
ab22c1fa 6074 cat >conftest.$ac_ext <<_ACEOF
bf3b7cd3
JD
6075/* confdefs.h. */
6076_ACEOF
6077cat confdefs.h >>conftest.$ac_ext
6078cat >>conftest.$ac_ext <<_ACEOF
6079/* end confdefs.h. */
6080$ac_includes_default
ab22c1fa 6081 typedef long long ac__type_sizeof_;
bf3b7cd3
JD
6082int
6083main ()
6084{
ab22c1fa 6085static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
bf3b7cd3
JD
6086test_array [0] = 0
6087
6088 ;
6089 return 0;
6090}
6091_ACEOF
6092rm -f conftest.$ac_objext
ab22c1fa
CF
6093if { (ac_try="$ac_compile"
6094case "(($ac_try" in
6095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6096 *) ac_try_echo=$ac_try;;
6097esac
6098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6099 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
6100 ac_status=$?
6101 grep -v '^ *+' conftest.er1 >conftest.err
6102 rm -f conftest.er1
6103 cat conftest.err >&5
6104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
6105 (exit $ac_status); } && {
6106 test -z "$ac_c_werror_flag" ||
6107 test ! -s conftest.err
6108 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
6109 ac_hi=-1 ac_mid=-1
6110 while :; do
6111 cat >conftest.$ac_ext <<_ACEOF
6112/* confdefs.h. */
6113_ACEOF
6114cat confdefs.h >>conftest.$ac_ext
6115cat >>conftest.$ac_ext <<_ACEOF
6116/* end confdefs.h. */
6117$ac_includes_default
ab22c1fa 6118 typedef long long ac__type_sizeof_;
bf3b7cd3
JD
6119int
6120main ()
6121{
ab22c1fa 6122static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
bf3b7cd3
JD
6123test_array [0] = 0
6124
6125 ;
6126 return 0;
6127}
6128_ACEOF
6129rm -f conftest.$ac_objext
ab22c1fa
CF
6130if { (ac_try="$ac_compile"
6131case "(($ac_try" in
6132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6133 *) ac_try_echo=$ac_try;;
6134esac
6135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6136 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
6137 ac_status=$?
6138 grep -v '^ *+' conftest.er1 >conftest.err
6139 rm -f conftest.er1
6140 cat conftest.err >&5
6141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
6142 (exit $ac_status); } && {
6143 test -z "$ac_c_werror_flag" ||
6144 test ! -s conftest.err
6145 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
6146 ac_lo=$ac_mid; break
6147else
6148 echo "$as_me: failed program was:" >&5
6149sed 's/^/| /' conftest.$ac_ext >&5
6150
ab22c1fa
CF
6151 ac_hi=`expr '(' $ac_mid ')' - 1`
6152 if test $ac_mid -le $ac_hi; then
6153 ac_lo= ac_hi=
6154 break
6155 fi
6156 ac_mid=`expr 2 '*' $ac_mid`
bf3b7cd3 6157fi
ab22c1fa
CF
6158
6159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6160 done
6161else
6162 echo "$as_me: failed program was:" >&5
6163sed 's/^/| /' conftest.$ac_ext >&5
6164
ab22c1fa 6165 ac_lo= ac_hi=
bf3b7cd3 6166fi
ab22c1fa
CF
6167
6168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6169fi
ab22c1fa
CF
6170
6171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6172# Binary search between lo and hi bounds.
6173while test "x$ac_lo" != "x$ac_hi"; do
6174 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6175 cat >conftest.$ac_ext <<_ACEOF
6176/* confdefs.h. */
6177_ACEOF
6178cat confdefs.h >>conftest.$ac_ext
6179cat >>conftest.$ac_ext <<_ACEOF
6180/* end confdefs.h. */
6181$ac_includes_default
ab22c1fa 6182 typedef long long ac__type_sizeof_;
bf3b7cd3
JD
6183int
6184main ()
6185{
ab22c1fa 6186static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
6187test_array [0] = 0
6188
6189 ;
6190 return 0;
6191}
6192_ACEOF
6193rm -f conftest.$ac_objext
ab22c1fa
CF
6194if { (ac_try="$ac_compile"
6195case "(($ac_try" in
6196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6197 *) ac_try_echo=$ac_try;;
6198esac
6199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6200 (eval "$ac_compile") 2>conftest.er1
bf3b7cd3
JD
6201 ac_status=$?
6202 grep -v '^ *+' conftest.er1 >conftest.err
6203 rm -f conftest.er1
6204 cat conftest.err >&5
6205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
6206 (exit $ac_status); } && {
6207 test -z "$ac_c_werror_flag" ||
6208 test ! -s conftest.err
6209 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
6210 ac_hi=$ac_mid
6211else
6212 echo "$as_me: failed program was:" >&5
6213sed 's/^/| /' conftest.$ac_ext >&5
6214
ab22c1fa 6215 ac_lo=`expr '(' $ac_mid ')' + 1`
bf3b7cd3 6216fi
ab22c1fa
CF
6217
6218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6219done
6220case $ac_lo in
6221?*) ac_cv_sizeof_long_long=$ac_lo;;
ab22c1fa
CF
6222'') if test "$ac_cv_type_long_long" = yes; then
6223 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
bf3b7cd3 6224See \`config.log' for more details." >&5
ab22c1fa 6225echo "$as_me: error: cannot compute sizeof (long long)
bf3b7cd3 6226See \`config.log' for more details." >&2;}
ab22c1fa
CF
6227 { (exit 77); exit 77; }; }
6228 else
6229 ac_cv_sizeof_long_long=0
6230 fi ;;
bf3b7cd3 6231esac
bf3b7cd3
JD
6232else
6233 cat >conftest.$ac_ext <<_ACEOF
6234/* confdefs.h. */
6235_ACEOF
6236cat confdefs.h >>conftest.$ac_ext
6237cat >>conftest.$ac_ext <<_ACEOF
6238/* end confdefs.h. */
6239$ac_includes_default
ab22c1fa
CF
6240 typedef long long ac__type_sizeof_;
6241static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
6242static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
bf3b7cd3
JD
6243#include <stdio.h>
6244#include <stdlib.h>
6245int
6246main ()
6247{
6248
6249 FILE *f = fopen ("conftest.val", "w");
6250 if (! f)
ab22c1fa
CF
6251 return 1;
6252 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
bf3b7cd3 6253 {
ab22c1fa
CF
6254 long int i = longval ();
6255 if (i != ((long int) (sizeof (ac__type_sizeof_))))
6256 return 1;
bf3b7cd3
JD
6257 fprintf (f, "%ld\n", i);
6258 }
6259 else
6260 {
ab22c1fa
CF
6261 unsigned long int i = ulongval ();
6262 if (i != ((long int) (sizeof (ac__type_sizeof_))))
6263 return 1;
bf3b7cd3
JD
6264 fprintf (f, "%lu\n", i);
6265 }
ab22c1fa 6266 return ferror (f) || fclose (f) != 0;
bf3b7cd3
JD
6267
6268 ;
6269 return 0;
6270}
6271_ACEOF
6272rm -f conftest$ac_exeext
ab22c1fa
CF
6273if { (ac_try="$ac_link"
6274case "(($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_link") 2>&5
bf3b7cd3
JD
6280 ac_status=$?
6281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6282 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ab22c1fa
CF
6283 { (case "(($ac_try" in
6284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6285 *) ac_try_echo=$ac_try;;
6286esac
6287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6288 (eval "$ac_try") 2>&5
bf3b7cd3
JD
6289 ac_status=$?
6290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6291 (exit $ac_status); }; }; then
6292 ac_cv_sizeof_long_long=`cat conftest.val`
6293else
6294 echo "$as_me: program exited with status $ac_status" >&5
6295echo "$as_me: failed program was:" >&5
6296sed 's/^/| /' conftest.$ac_ext >&5
6297
6298( exit $ac_status )
ab22c1fa
CF
6299if test "$ac_cv_type_long_long" = yes; then
6300 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
bf3b7cd3 6301See \`config.log' for more details." >&5
ab22c1fa 6302echo "$as_me: error: cannot compute sizeof (long long)
bf3b7cd3 6303See \`config.log' for more details." >&2;}
ab22c1fa
CF
6304 { (exit 77); exit 77; }; }
6305 else
6306 ac_cv_sizeof_long_long=0
6307 fi
bf3b7cd3 6308fi
ab22c1fa 6309rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6310fi
6311rm -f conftest.val
a3bba767 6312fi
ab22c1fa
CF
6313{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
6314echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
6315
6316
6317
bf3b7cd3
JD
6318cat >>confdefs.h <<_ACEOF
6319#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
6320_ACEOF
6321
6322
6323fi
5ec1c5e6 6324
ab22c1fa
CF
6325{ echo "$as_me:$LINENO: checking for __int64" >&5
6326echo $ECHO_N "checking for __int64... $ECHO_C" >&6; }
5ec1c5e6
KC
6327if test "${ac_cv_type___int64+set}" = set; then
6328 echo $ECHO_N "(cached) $ECHO_C" >&6
6329else
6330 cat >conftest.$ac_ext <<_ACEOF
6331/* confdefs.h. */
6332_ACEOF
6333cat confdefs.h >>conftest.$ac_ext
6334cat >>conftest.$ac_ext <<_ACEOF
6335/* end confdefs.h. */
6336$ac_includes_default
ab22c1fa 6337typedef __int64 ac__type_new_;
5ec1c5e6
KC
6338int
6339main ()
6340{
ab22c1fa 6341if ((ac__type_new_ *) 0)
5ec1c5e6 6342 return 0;
ab22c1fa 6343if (sizeof (ac__type_new_))
5ec1c5e6
KC
6344 return 0;
6345 ;
6346 return 0;
6347}
6348_ACEOF
6349rm -f conftest.$ac_objext
ab22c1fa
CF
6350if { (ac_try="$ac_compile"
6351case "(($ac_try" in
6352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6353 *) ac_try_echo=$ac_try;;
6354esac
6355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6356 (eval "$ac_compile") 2>conftest.er1
5ec1c5e6
KC
6357 ac_status=$?
6358 grep -v '^ *+' conftest.er1 >conftest.err
6359 rm -f conftest.er1
6360 cat conftest.err >&5
6361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
6362 (exit $ac_status); } && {
6363 test -z "$ac_c_werror_flag" ||
6364 test ! -s conftest.err
6365 } && test -s conftest.$ac_objext; then
5ec1c5e6
KC
6366 ac_cv_type___int64=yes
6367else
6368 echo "$as_me: failed program was:" >&5
6369sed 's/^/| /' conftest.$ac_ext >&5
6370
ab22c1fa 6371 ac_cv_type___int64=no
5ec1c5e6 6372fi
ab22c1fa
CF
6373
6374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5ec1c5e6 6375fi
ab22c1fa
CF
6376{ echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
6377echo "${ECHO_T}$ac_cv_type___int64" >&6; }
5ec1c5e6
KC
6378if test $ac_cv_type___int64 = yes; then
6379
6380cat >>confdefs.h <<_ACEOF
6381#define HAVE___INT64 1
6382_ACEOF
6383
ab22c1fa
CF
6384{ echo "$as_me:$LINENO: checking for __int64" >&5
6385echo $ECHO_N "checking for __int64... $ECHO_C" >&6; }
bf3b7cd3
JD
6386if test "${ac_cv_type___int64+set}" = set; then
6387 echo $ECHO_N "(cached) $ECHO_C" >&6
6388else
ba479fd2 6389 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6390/* confdefs.h. */
6391_ACEOF
6392cat confdefs.h >>conftest.$ac_ext
6393cat >>conftest.$ac_ext <<_ACEOF
6394/* end confdefs.h. */
bf3b7cd3 6395$ac_includes_default
ab22c1fa 6396typedef __int64 ac__type_new_;
ba479fd2
NN
6397int
6398main ()
6399{
ab22c1fa 6400if ((ac__type_new_ *) 0)
bf3b7cd3 6401 return 0;
ab22c1fa 6402if (sizeof (ac__type_new_))
bf3b7cd3 6403 return 0;
ba479fd2
NN
6404 ;
6405 return 0;
6406}
6407_ACEOF
6408rm -f conftest.$ac_objext
ab22c1fa
CF
6409if { (ac_try="$ac_compile"
6410case "(($ac_try" in
6411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6412 *) ac_try_echo=$ac_try;;
6413esac
6414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6415 (eval "$ac_compile") 2>conftest.er1
ba479fd2 6416 ac_status=$?
86da66b5
HPN
6417 grep -v '^ *+' conftest.er1 >conftest.err
6418 rm -f conftest.er1
6419 cat conftest.err >&5
ba479fd2 6420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
6421 (exit $ac_status); } && {
6422 test -z "$ac_c_werror_flag" ||
6423 test ! -s conftest.err
6424 } && test -s conftest.$ac_objext; then
bf3b7cd3 6425 ac_cv_type___int64=yes
75b6f3fd 6426else
ba479fd2
NN
6427 echo "$as_me: failed program was:" >&5
6428sed 's/^/| /' conftest.$ac_ext >&5
6429
ab22c1fa 6430 ac_cv_type___int64=no
75b6f3fd 6431fi
ab22c1fa
CF
6432
6433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75b6f3fd 6434fi
ab22c1fa
CF
6435{ echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
6436echo "${ECHO_T}$ac_cv_type___int64" >&6; }
75b6f3fd 6437
ab22c1fa
CF
6438# The cast to long int works around a bug in the HP C Compiler
6439# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6440# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6441# This bug is HP SR number 8606223364.
6442{ echo "$as_me:$LINENO: checking size of __int64" >&5
6443echo $ECHO_N "checking size of __int64... $ECHO_C" >&6; }
bf3b7cd3 6444if test "${ac_cv_sizeof___int64+set}" = set; then
ba479fd2 6445 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae 6446else
bf3b7cd3
JD
6447 if test "$cross_compiling" = yes; then
6448 # Depending upon the size, compute the lo and hi bounds.
6449cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6450/* confdefs.h. */
6451_ACEOF
6452cat confdefs.h >>conftest.$ac_ext
6453cat >>conftest.$ac_ext <<_ACEOF
6454/* end confdefs.h. */
bf3b7cd3 6455$ac_includes_default
ab22c1fa 6456 typedef __int64 ac__type_sizeof_;
ba479fd2
NN
6457int
6458main ()
6459{
ab22c1fa 6460static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
bf3b7cd3
JD
6461test_array [0] = 0
6462
ba479fd2
NN
6463 ;
6464 return 0;
6465}
6466_ACEOF
6467rm -f conftest.$ac_objext
ab22c1fa
CF
6468if { (ac_try="$ac_compile"
6469case "(($ac_try" in
6470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6471 *) ac_try_echo=$ac_try;;
6472esac
6473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6474 (eval "$ac_compile") 2>conftest.er1
ba479fd2 6475 ac_status=$?
86da66b5
HPN
6476 grep -v '^ *+' conftest.er1 >conftest.err
6477 rm -f conftest.er1
6478 cat conftest.err >&5
ba479fd2 6479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
6480 (exit $ac_status); } && {
6481 test -z "$ac_c_werror_flag" ||
6482 test ! -s conftest.err
6483 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
6484 ac_lo=0 ac_mid=0
6485 while :; do
6486 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6487/* confdefs.h. */
6488_ACEOF
6489cat confdefs.h >>conftest.$ac_ext
6490cat >>conftest.$ac_ext <<_ACEOF
6491/* end confdefs.h. */
bf3b7cd3 6492$ac_includes_default
ab22c1fa 6493 typedef __int64 ac__type_sizeof_;
ba479fd2
NN
6494int
6495main ()
6496{
ab22c1fa 6497static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
6498test_array [0] = 0
6499
ba479fd2
NN
6500 ;
6501 return 0;
6502}
6503_ACEOF
6504rm -f conftest.$ac_objext
ab22c1fa
CF
6505if { (ac_try="$ac_compile"
6506case "(($ac_try" in
6507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6508 *) ac_try_echo=$ac_try;;
6509esac
6510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6511 (eval "$ac_compile") 2>conftest.er1
ba479fd2 6512 ac_status=$?
86da66b5
HPN
6513 grep -v '^ *+' conftest.er1 >conftest.err
6514 rm -f conftest.er1
6515 cat conftest.err >&5
ba479fd2 6516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
6517 (exit $ac_status); } && {
6518 test -z "$ac_c_werror_flag" ||
6519 test ! -s conftest.err
6520 } && test -s conftest.$ac_objext; then
bf3b7cd3 6521 ac_hi=$ac_mid; break
75e93faa 6522else
ba479fd2
NN
6523 echo "$as_me: failed program was:" >&5
6524sed 's/^/| /' conftest.$ac_ext >&5
6525
ab22c1fa
CF
6526 ac_lo=`expr $ac_mid + 1`
6527 if test $ac_lo -le $ac_mid; then
6528 ac_lo= ac_hi=
6529 break
6530 fi
6531 ac_mid=`expr 2 '*' $ac_mid + 1`
75e93faa 6532fi
ab22c1fa
CF
6533
6534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3 6535 done
75e93faa 6536else
bf3b7cd3
JD
6537 echo "$as_me: failed program was:" >&5
6538sed 's/^/| /' conftest.$ac_ext >&5
6539
ab22c1fa 6540 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6541/* confdefs.h. */
6542_ACEOF
6543cat confdefs.h >>conftest.$ac_ext
6544cat >>conftest.$ac_ext <<_ACEOF
6545/* end confdefs.h. */
bf3b7cd3 6546$ac_includes_default
ab22c1fa 6547 typedef __int64 ac__type_sizeof_;
ba479fd2
NN
6548int
6549main ()
6550{
ab22c1fa 6551static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
bf3b7cd3
JD
6552test_array [0] = 0
6553
ba479fd2
NN
6554 ;
6555 return 0;
6556}
6557_ACEOF
6558rm -f conftest.$ac_objext
ab22c1fa
CF
6559if { (ac_try="$ac_compile"
6560case "(($ac_try" in
6561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6562 *) ac_try_echo=$ac_try;;
6563esac
6564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6565 (eval "$ac_compile") 2>conftest.er1
ba479fd2 6566 ac_status=$?
86da66b5
HPN
6567 grep -v '^ *+' conftest.er1 >conftest.err
6568 rm -f conftest.er1
6569 cat conftest.err >&5
ba479fd2 6570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
6571 (exit $ac_status); } && {
6572 test -z "$ac_c_werror_flag" ||
6573 test ! -s conftest.err
6574 } && test -s conftest.$ac_objext; then
bf3b7cd3
JD
6575 ac_hi=-1 ac_mid=-1
6576 while :; do
6577 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6578/* confdefs.h. */
6579_ACEOF
6580cat confdefs.h >>conftest.$ac_ext
6581cat >>conftest.$ac_ext <<_ACEOF
6582/* end confdefs.h. */
bf3b7cd3 6583$ac_includes_default
ab22c1fa 6584 typedef __int64 ac__type_sizeof_;
ba479fd2
NN
6585int
6586main ()
6587{
ab22c1fa 6588static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
bf3b7cd3
JD
6589test_array [0] = 0
6590
ba479fd2
NN
6591 ;
6592 return 0;
6593}
6594_ACEOF
6595rm -f conftest.$ac_objext
ab22c1fa
CF
6596if { (ac_try="$ac_compile"
6597case "(($ac_try" in
6598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6599 *) ac_try_echo=$ac_try;;
6600esac
6601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6602 (eval "$ac_compile") 2>conftest.er1
ba479fd2 6603 ac_status=$?
86da66b5
HPN
6604 grep -v '^ *+' conftest.er1 >conftest.err
6605 rm -f conftest.er1
6606 cat conftest.err >&5
ba479fd2 6607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
6608 (exit $ac_status); } && {
6609 test -z "$ac_c_werror_flag" ||
6610 test ! -s conftest.err
6611 } && test -s conftest.$ac_objext; then
bf3b7cd3 6612 ac_lo=$ac_mid; break
04cabffc 6613else
ba479fd2
NN
6614 echo "$as_me: failed program was:" >&5
6615sed 's/^/| /' conftest.$ac_ext >&5
6616
ab22c1fa
CF
6617 ac_hi=`expr '(' $ac_mid ')' - 1`
6618 if test $ac_mid -le $ac_hi; then
6619 ac_lo= ac_hi=
6620 break
6621 fi
6622 ac_mid=`expr 2 '*' $ac_mid`
04cabffc 6623fi
ab22c1fa
CF
6624
6625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6626 done
6627else
6628 echo "$as_me: failed program was:" >&5
6629sed 's/^/| /' conftest.$ac_ext >&5
04cabffc 6630
ab22c1fa 6631 ac_lo= ac_hi=
414d23ae 6632fi
ab22c1fa
CF
6633
6634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6635fi
ab22c1fa
CF
6636
6637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6638# Binary search between lo and hi bounds.
6639while test "x$ac_lo" != "x$ac_hi"; do
6640 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
ba479fd2 6641 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
6642/* confdefs.h. */
6643_ACEOF
6644cat confdefs.h >>conftest.$ac_ext
6645cat >>conftest.$ac_ext <<_ACEOF
6646/* end confdefs.h. */
bf3b7cd3 6647$ac_includes_default
ab22c1fa 6648 typedef __int64 ac__type_sizeof_;
ba479fd2
NN
6649int
6650main ()
6651{
ab22c1fa 6652static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
bf3b7cd3
JD
6653test_array [0] = 0
6654
ba479fd2
NN
6655 ;
6656 return 0;
6657}
6658_ACEOF
6659rm -f conftest.$ac_objext
ab22c1fa
CF
6660if { (ac_try="$ac_compile"
6661case "(($ac_try" in
6662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6663 *) ac_try_echo=$ac_try;;
6664esac
6665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6666 (eval "$ac_compile") 2>conftest.er1
ba479fd2 6667 ac_status=$?
86da66b5
HPN
6668 grep -v '^ *+' conftest.er1 >conftest.err
6669 rm -f conftest.er1
6670 cat conftest.err >&5
ba479fd2 6671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
6672 (exit $ac_status); } && {
6673 test -z "$ac_c_werror_flag" ||
6674 test ! -s conftest.err
6675 } && test -s conftest.$ac_objext; then
bf3b7cd3 6676 ac_hi=$ac_mid
75e93faa 6677else
ba479fd2
NN
6678 echo "$as_me: failed program was:" >&5
6679sed 's/^/| /' conftest.$ac_ext >&5
6680
ab22c1fa 6681 ac_lo=`expr '(' $ac_mid ')' + 1`
75e93faa 6682fi
ab22c1fa
CF
6683
6684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
414d23ae 6685done
bf3b7cd3
JD
6686case $ac_lo in
6687?*) ac_cv_sizeof___int64=$ac_lo;;
ab22c1fa
CF
6688'') if test "$ac_cv_type___int64" = yes; then
6689 { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64)
bf3b7cd3 6690See \`config.log' for more details." >&5
ab22c1fa 6691echo "$as_me: error: cannot compute sizeof (__int64)
bf3b7cd3 6692See \`config.log' for more details." >&2;}
ab22c1fa
CF
6693 { (exit 77); exit 77; }; }
6694 else
6695 ac_cv_sizeof___int64=0
6696 fi ;;
bf3b7cd3 6697esac
bf3b7cd3
JD
6698else
6699 cat >conftest.$ac_ext <<_ACEOF
6700/* confdefs.h. */
6701_ACEOF
6702cat confdefs.h >>conftest.$ac_ext
6703cat >>conftest.$ac_ext <<_ACEOF
6704/* end confdefs.h. */
6705$ac_includes_default
ab22c1fa
CF
6706 typedef __int64 ac__type_sizeof_;
6707static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
6708static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
bf3b7cd3
JD
6709#include <stdio.h>
6710#include <stdlib.h>
6711int
6712main ()
6713{
414d23ae 6714
bf3b7cd3
JD
6715 FILE *f = fopen ("conftest.val", "w");
6716 if (! f)
ab22c1fa
CF
6717 return 1;
6718 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
bf3b7cd3 6719 {
ab22c1fa
CF
6720 long int i = longval ();
6721 if (i != ((long int) (sizeof (ac__type_sizeof_))))
6722 return 1;
bf3b7cd3
JD
6723 fprintf (f, "%ld\n", i);
6724 }
6725 else
6726 {
ab22c1fa
CF
6727 unsigned long int i = ulongval ();
6728 if (i != ((long int) (sizeof (ac__type_sizeof_))))
6729 return 1;
bf3b7cd3
JD
6730 fprintf (f, "%lu\n", i);
6731 }
ab22c1fa 6732 return ferror (f) || fclose (f) != 0;
bf3b7cd3
JD
6733
6734 ;
6735 return 0;
6736}
6737_ACEOF
6738rm -f conftest$ac_exeext
ab22c1fa
CF
6739if { (ac_try="$ac_link"
6740case "(($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_link") 2>&5
bf3b7cd3
JD
6746 ac_status=$?
6747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6748 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ab22c1fa
CF
6749 { (case "(($ac_try" in
6750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6751 *) ac_try_echo=$ac_try;;
6752esac
6753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6754 (eval "$ac_try") 2>&5
bf3b7cd3
JD
6755 ac_status=$?
6756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6757 (exit $ac_status); }; }; then
6758 ac_cv_sizeof___int64=`cat conftest.val`
6759else
6760 echo "$as_me: program exited with status $ac_status" >&5
6761echo "$as_me: failed program was:" >&5
6762sed 's/^/| /' conftest.$ac_ext >&5
75e93faa 6763
bf3b7cd3 6764( exit $ac_status )
ab22c1fa
CF
6765if test "$ac_cv_type___int64" = yes; then
6766 { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64)
bf3b7cd3 6767See \`config.log' for more details." >&5
ab22c1fa 6768echo "$as_me: error: cannot compute sizeof (__int64)
bf3b7cd3 6769See \`config.log' for more details." >&2;}
ab22c1fa
CF
6770 { (exit 77); exit 77; }; }
6771 else
6772 ac_cv_sizeof___int64=0
6773 fi
bf3b7cd3 6774fi
ab22c1fa 6775rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
bf3b7cd3
JD
6776fi
6777rm -f conftest.val
bf3b7cd3 6778fi
ab22c1fa
CF
6779{ echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
6780echo "${ECHO_T}$ac_cv_sizeof___int64" >&6; }
6781
6782
6783
ba479fd2 6784cat >>confdefs.h <<_ACEOF
414d23ae 6785#define SIZEOF___INT64 $ac_cv_sizeof___int64
ba479fd2 6786_ACEOF
414d23ae 6787
cafe096b 6788
414d23ae
HPN
6789fi
6790
5ec1c5e6 6791
34a86c2b
NN
6792# ---------------------
6793# Warnings and checking
6794# ---------------------
6795
b5472e1d
NN
6796# Check $CC warning features (if it's GCC).
6797# We want to use -pedantic, but we don't want warnings about
6798# * 'long long'
6799# * variadic macros
89a42ac8 6800# * overlong strings
b5472e1d
NN
6801# So, we only use -pedantic if we can disable those warnings.
6802
3bbd5a19
PB
6803loose_warn=
6804save_CFLAGS="$CFLAGS"
6805for option in -W -Wall -Wwrite-strings -Wstrict-prototypes \
6806 -Wmissing-prototypes; do
6807 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
6808
ab22c1fa
CF
6809 { echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
6810echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6; }
6811if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then
b5472e1d
NN
6812 echo $ECHO_N "(cached) $ECHO_C" >&6
6813else
3bbd5a19
PB
6814 CFLAGS="$option"
6815 cat >conftest.$ac_ext <<_ACEOF
b5472e1d
NN
6816/* confdefs.h. */
6817_ACEOF
6818cat confdefs.h >>conftest.$ac_ext
6819cat >>conftest.$ac_ext <<_ACEOF
6820/* end confdefs.h. */
6821
3bbd5a19
PB
6822int
6823main ()
6824{
6825
6826 ;
6827 return 0;
6828}
b5472e1d
NN
6829_ACEOF
6830rm -f conftest.$ac_objext
ab22c1fa
CF
6831if { (ac_try="$ac_compile"
6832case "(($ac_try" in
6833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6834 *) ac_try_echo=$ac_try;;
6835esac
6836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6837 (eval "$ac_compile") 2>conftest.er1
b5472e1d
NN
6838 ac_status=$?
6839 grep -v '^ *+' conftest.er1 >conftest.err
6840 rm -f conftest.er1
6841 cat conftest.err >&5
6842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
6843 (exit $ac_status); } && {
6844 test -z "$ac_c_werror_flag" ||
6845 test ! -s conftest.err
6846 } && test -s conftest.$ac_objext; then
3bbd5a19 6847 eval "$as_acx_Woption=yes"
b5472e1d
NN
6848else
6849 echo "$as_me: failed program was:" >&5
6850sed 's/^/| /' conftest.$ac_ext >&5
6851
ab22c1fa 6852 eval "$as_acx_Woption=no"
b5472e1d 6853fi
ab22c1fa
CF
6854
6855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5472e1d
NN
6856
6857fi
ab22c1fa
CF
6858ac_res=`eval echo '${'$as_acx_Woption'}'`
6859 { echo "$as_me:$LINENO: result: $ac_res" >&5
6860echo "${ECHO_T}$ac_res" >&6; }
3bbd5a19
PB
6861 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
6862 loose_warn="$loose_warn${loose_warn:+ }$option"
6863fi
6864
6865 done
6866CFLAGS="$save_CFLAGS"
6867
6868cxx_compat_warn=
6869save_CFLAGS="$CFLAGS"
6870for option in -Wc++-compat; do
6871 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
b5472e1d 6872
ab22c1fa
CF
6873 { echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
6874echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6; }
6875if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then
b5472e1d
NN
6876 echo $ECHO_N "(cached) $ECHO_C" >&6
6877else
3bbd5a19
PB
6878 CFLAGS="$option"
6879 cat >conftest.$ac_ext <<_ACEOF
b5472e1d
NN
6880/* confdefs.h. */
6881_ACEOF
6882cat confdefs.h >>conftest.$ac_ext
6883cat >>conftest.$ac_ext <<_ACEOF
6884/* end confdefs.h. */
6885
3bbd5a19
PB
6886int
6887main ()
6888{
6889
6890 ;
6891 return 0;
6892}
b5472e1d
NN
6893_ACEOF
6894rm -f conftest.$ac_objext
ab22c1fa
CF
6895if { (ac_try="$ac_compile"
6896case "(($ac_try" in
6897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6898 *) ac_try_echo=$ac_try;;
6899esac
6900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6901 (eval "$ac_compile") 2>conftest.er1
b5472e1d
NN
6902 ac_status=$?
6903 grep -v '^ *+' conftest.er1 >conftest.err
6904 rm -f conftest.er1
6905 cat conftest.err >&5
6906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
6907 (exit $ac_status); } && {
6908 test -z "$ac_c_werror_flag" ||
6909 test ! -s conftest.err
6910 } && test -s conftest.$ac_objext; then
3bbd5a19 6911 eval "$as_acx_Woption=yes"
b5472e1d
NN
6912else
6913 echo "$as_me: failed program was:" >&5
6914sed 's/^/| /' conftest.$ac_ext >&5
6915
ab22c1fa 6916 eval "$as_acx_Woption=no"
b5472e1d 6917fi
ab22c1fa
CF
6918
6919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5472e1d
NN
6920
6921fi
ab22c1fa
CF
6922ac_res=`eval echo '${'$as_acx_Woption'}'`
6923 { echo "$as_me:$LINENO: result: $ac_res" >&5
6924echo "${ECHO_T}$ac_res" >&6; }
3bbd5a19
PB
6925 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
6926 cxx_compat_warn="$cxx_compat_warn${cxx_compat_warn:+ }$option"
6927fi
6928
6929 done
6930CFLAGS="$save_CFLAGS"
b5472e1d 6931
3bbd5a19
PB
6932strict_warn=
6933save_CFLAGS="$CFLAGS"
6934for option in -Wold-style-definition \
6935 -Wmissing-format-attribute; do
6936 as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
6937
ab22c1fa
CF
6938 { echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
6939echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6; }
6940if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then
89a42ac8
ZW
6941 echo $ECHO_N "(cached) $ECHO_C" >&6
6942else
3bbd5a19
PB
6943 CFLAGS="$option"
6944 cat >conftest.$ac_ext <<_ACEOF
89a42ac8
ZW
6945/* confdefs.h. */
6946_ACEOF
6947cat confdefs.h >>conftest.$ac_ext
6948cat >>conftest.$ac_ext <<_ACEOF
6949/* end confdefs.h. */
6950
3bbd5a19
PB
6951int
6952main ()
6953{
6954
6955 ;
6956 return 0;
6957}
89a42ac8
ZW
6958_ACEOF
6959rm -f conftest.$ac_objext
ab22c1fa
CF
6960if { (ac_try="$ac_compile"
6961case "(($ac_try" in
6962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6963 *) ac_try_echo=$ac_try;;
6964esac
6965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6966 (eval "$ac_compile") 2>conftest.er1
89a42ac8
ZW
6967 ac_status=$?
6968 grep -v '^ *+' conftest.er1 >conftest.err
6969 rm -f conftest.er1
6970 cat conftest.err >&5
6971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
6972 (exit $ac_status); } && {
6973 test -z "$ac_c_werror_flag" ||
6974 test ! -s conftest.err
6975 } && test -s conftest.$ac_objext; then
3bbd5a19 6976 eval "$as_acx_Woption=yes"
89a42ac8
ZW
6977else
6978 echo "$as_me: failed program was:" >&5
6979sed 's/^/| /' conftest.$ac_ext >&5
6980
ab22c1fa 6981 eval "$as_acx_Woption=no"
89a42ac8 6982fi
ab22c1fa
CF
6983
6984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
89a42ac8
ZW
6985
6986fi
ab22c1fa
CF
6987ac_res=`eval echo '${'$as_acx_Woption'}'`
6988 { echo "$as_me:$LINENO: result: $ac_res" >&5
6989echo "${ECHO_T}$ac_res" >&6; }
3bbd5a19
PB
6990 if test `eval echo '${'$as_acx_Woption'}'` = yes; then
6991 strict_warn="$strict_warn${strict_warn:+ }$option"
34a86c2b
NN
6992fi
6993
3bbd5a19
PB
6994 done
6995CFLAGS="$save_CFLAGS"
6996
6997if test "$GCC" = yes; then
ab22c1fa 6998 { echo "$as_me:$LINENO: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros \
3bbd5a19
PB
6999 -Wno-overlength-strings" >&5
7000echo $ECHO_N "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros \
ab22c1fa 7001 -Wno-overlength-strings... $ECHO_C" >&6; }
3bbd5a19 7002if test "${acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings+set}" = set; then
643d3bd2
NN
7003 echo $ECHO_N "(cached) $ECHO_C" >&6
7004else
7005 save_CFLAGS="$CFLAGS"
3bbd5a19
PB
7006CFLAGS="-pedantic -Wno-long-long -Wno-variadic-macros \
7007 -Wno-overlength-strings"
7008cat >conftest.$ac_ext <<_ACEOF
643d3bd2
NN
7009/* confdefs.h. */
7010_ACEOF
7011cat confdefs.h >>conftest.$ac_ext
7012cat >>conftest.$ac_ext <<_ACEOF
7013/* end confdefs.h. */
7014
3bbd5a19
PB
7015int
7016main ()
7017{
7018
7019 ;
7020 return 0;
7021}
643d3bd2
NN
7022_ACEOF
7023rm -f conftest.$ac_objext
ab22c1fa
CF
7024if { (ac_try="$ac_compile"
7025case "(($ac_try" in
7026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7027 *) ac_try_echo=$ac_try;;
7028esac
7029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7030 (eval "$ac_compile") 2>conftest.er1
643d3bd2
NN
7031 ac_status=$?
7032 grep -v '^ *+' conftest.er1 >conftest.err
7033 rm -f conftest.er1
7034 cat conftest.err >&5
7035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
7036 (exit $ac_status); } && {
7037 test -z "$ac_c_werror_flag" ||
7038 test ! -s conftest.err
7039 } && test -s conftest.$ac_objext; then
3bbd5a19 7040 acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=yes
643d3bd2
NN
7041else
7042 echo "$as_me: failed program was:" >&5
7043sed 's/^/| /' conftest.$ac_ext >&5
7044
ab22c1fa 7045 acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=no
643d3bd2 7046fi
ab22c1fa
CF
7047
7048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3bbd5a19 7049CFLAGS="$save_CFLAGS"
643d3bd2 7050fi
ab22c1fa
CF
7051{ echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings" >&5
7052echo "${ECHO_T}$acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings" >&6; }
3bbd5a19
PB
7053if test $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings = yes; then
7054 strict_warn="$strict_warn${strict_warn:+ }-pedantic -Wno-long-long -Wno-variadic-macros \
7055 -Wno-overlength-strings"
643d3bd2
NN
7056fi
7057
ac0f3f39 7058
ac0f3f39 7059fi
ac0f3f39 7060
ac0f3f39 7061
ab22c1fa 7062# Check whether --enable-werror-always was given.
09a9c095 7063if test "${enable_werror_always+set}" = set; then
ab22c1fa 7064 enableval=$enable_werror_always;
09a9c095
NN
7065else
7066 enable_werror_always=no
ab22c1fa
CF
7067fi
7068
3bbd5a19
PB
7069if test $enable_werror_always = yes; then
7070 strict_warn="$strict_warn${strict_warn:+ }-Werror"
373477bb 7071fi
373477bb 7072
373477bb
GDR
7073
7074
7075
3bbd5a19
PB
7076# The above macros do nothing if the compiler is not GCC. However, the
7077# Makefile has more goo to add other flags, so this variabl is used to
7078# enables warnings only for GCC.
414d23ae
HPN
7079warn_cflags=
7080if test "x$GCC" = "xyes"; then
7081 warn_cflags='$(GCC_WARN_CFLAGS)'
7082fi
7083
7084
8b1f719a 7085# Enable expensive internal checks
a1286ef5
ZW
7086is_release=
7087if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
7088 is_release=yes
7089fi
a6ccdbab 7090
ab22c1fa 7091# Check whether --enable-checking was given.
414d23ae 7092if test "${enable_checking+set}" = set; then
ab22c1fa 7093 enableval=$enable_checking; ac_checking_flags="${enableval}"
e1bbfc5c
NS
7094else
7095
7096# Determine the default checks.
7097if test x$is_release = x ; then
7098 ac_checking_flags=yes
7099else
7100 ac_checking_flags=release
7101fi
ab22c1fa
CF
7102fi
7103
e1bbfc5c 7104IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
04c3028a 7105for check in release $ac_checking_flags
e1bbfc5c
NS
7106do
7107 case $check in
cdce5c16 7108 # these set all the flags to specific states
0d475361 7109 yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
cdce5c16
NS
7110 ac_fold_checking= ; ac_gc_checking=1 ;
7111 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 7112 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
7e98624c
RG
7113 ac_tree_checking=1 ; ac_valgrind_checking= ;
7114 ac_types_checking= ;;
3089f8b5 7115 no|none) ac_assert_checking= ; ac_checking= ; ac_df_checking= ;
cdce5c16
NS
7116 ac_fold_checking= ; ac_gc_checking= ;
7117 ac_gc_always_collect= ; ac_rtl_checking= ;
232b67d9 7118 ac_rtlflag_checking= ; ac_runtime_checking= ;
7e98624c
RG
7119 ac_tree_checking= ; ac_valgrind_checking= ;
7120 ac_types_checking= ;;
3089f8b5 7121 all) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
cdce5c16
NS
7122 ac_fold_checking=1 ; ac_gc_checking=1 ;
7123 ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
7124 ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
7e98624c
RG
7125 ac_tree_checking=1 ; ac_valgrind_checking= ;
7126 ac_types_checking=1 ;;
3089f8b5 7127 release) ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ;
cdce5c16
NS
7128 ac_fold_checking= ; ac_gc_checking= ;
7129 ac_gc_always_collect= ; ac_rtl_checking= ;
7130 ac_rtlflag_checking= ; ac_runtime_checking=1 ;
7e98624c
RG
7131 ac_tree_checking= ; ac_valgrind_checking= ;
7132 ac_types_checking= ;;
cdce5c16 7133 # these enable particular checks
e1bbfc5c 7134 assert) ac_assert_checking=1 ;;
3089f8b5 7135 df) ac_df_checking=1 ;;
e1bbfc5c
NS
7136 fold) ac_fold_checking=1 ;;
7137 gc) ac_gc_checking=1 ;;
7138 gcac) ac_gc_always_collect=1 ;;
7139 misc) ac_checking=1 ;;
e1bbfc5c 7140 rtl) ac_rtl_checking=1 ;;
cdce5c16 7141 rtlflag) ac_rtlflag_checking=1 ;;
b53ef395 7142 runtime) ac_runtime_checking=1 ;;
e1bbfc5c 7143 tree) ac_tree_checking=1 ;;
7e98624c 7144 types) ac_types_checking=1 ;;
cdce5c16 7145 valgrind) ac_valgrind_checking=1 ;;
e1bbfc5c 7146 *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
ba479fd2
NN
7147echo "$as_me: error: unknown check category $check" >&2;}
7148 { (exit 1); exit 1; }; } ;;
e1bbfc5c
NS
7149 esac
7150done
7151IFS="$ac_save_IFS"
06c37c96 7152
ba479fd2
NN
7153nocommon_flag=""
7154if test x$ac_checking != x ; then
7155
7156cat >>confdefs.h <<\_ACEOF
7157#define ENABLE_CHECKING 1
7158_ACEOF
7159
7160 nocommon_flag=-fno-common
7161fi
3bbd5a19 7162
3089f8b5
PB
7163if test x$ac_df_checking != x ; then
7164
7165cat >>confdefs.h <<\_ACEOF
7166#define ENABLE_DF_CHECKING 1
7167_ACEOF
7168
7169fi
06c37c96
NS
7170if test x$ac_assert_checking != x ; then
7171
7172cat >>confdefs.h <<\_ACEOF
7173#define ENABLE_ASSERT_CHECKING 1
7174_ACEOF
7175
b53ef395 7176fi
232b67d9 7177
b53ef395
NS
7178if test x$ac_runtime_checking != x ; then
7179
7180cat >>confdefs.h <<\_ACEOF
7181#define ENABLE_RUNTIME_CHECKING 1
7182_ACEOF
7183
06c37c96 7184fi
ba479fd2
NN
7185if test x$ac_tree_checking != x ; then
7186
7187cat >>confdefs.h <<\_ACEOF
7188#define ENABLE_TREE_CHECKING 1
7189_ACEOF
7190
13f05fd0 7191 TREEBROWSER=tree-browser.o
ba479fd2 7192fi
7e98624c
RG
7193if test x$ac_types_checking != x ; then
7194
7195cat >>confdefs.h <<\_ACEOF
7196#define ENABLE_TYPES_CHECKING 1
7197_ACEOF
7198
7199fi
13f05fd0 7200
ba479fd2
NN
7201if test x$ac_rtl_checking != x ; then
7202
7203cat >>confdefs.h <<\_ACEOF
7204#define ENABLE_RTL_CHECKING 1
7205_ACEOF
7206
7207fi
7208if test x$ac_rtlflag_checking != x ; then
7209
7210cat >>confdefs.h <<\_ACEOF
7211#define ENABLE_RTL_FLAG_CHECKING 1
7212_ACEOF
7213
7214fi
7215if test x$ac_gc_checking != x ; then
7216
7217cat >>confdefs.h <<\_ACEOF
7218#define ENABLE_GC_CHECKING 1
7219_ACEOF
7220
7221fi
7222if test x$ac_gc_always_collect != x ; then
7223
7224cat >>confdefs.h <<\_ACEOF
7225#define ENABLE_GC_ALWAYS_COLLECT 1
7226_ACEOF
7227
7228fi
7229if test x$ac_fold_checking != x ; then
7230
7231cat >>confdefs.h <<\_ACEOF
7232#define ENABLE_FOLD_CHECKING 1
7233_ACEOF
7234
7235fi
7236valgrind_path_defines=
7237valgrind_command=
7238
ba479fd2 7239if test "${ac_cv_header_valgrind_h+set}" = set; then
ab22c1fa
CF
7240 { echo "$as_me:$LINENO: checking for valgrind.h" >&5
7241echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6; }
ba479fd2
NN
7242if test "${ac_cv_header_valgrind_h+set}" = set; then
7243 echo $ECHO_N "(cached) $ECHO_C" >&6
7244fi
ab22c1fa
CF
7245{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
7246echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6; }
ba479fd2
NN
7247else
7248 # Is the header compilable?
ab22c1fa
CF
7249{ echo "$as_me:$LINENO: checking valgrind.h usability" >&5
7250echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6; }
ba479fd2 7251cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7252/* confdefs.h. */
7253_ACEOF
7254cat confdefs.h >>conftest.$ac_ext
7255cat >>conftest.$ac_ext <<_ACEOF
7256/* end confdefs.h. */
7257$ac_includes_default
63cf211a 7258#include <valgrind.h>
ba479fd2
NN
7259_ACEOF
7260rm -f conftest.$ac_objext
ab22c1fa
CF
7261if { (ac_try="$ac_compile"
7262case "(($ac_try" in
7263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7264 *) ac_try_echo=$ac_try;;
7265esac
7266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7267 (eval "$ac_compile") 2>conftest.er1
ba479fd2 7268 ac_status=$?
86da66b5
HPN
7269 grep -v '^ *+' conftest.er1 >conftest.err
7270 rm -f conftest.er1
7271 cat conftest.err >&5
ba479fd2 7272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
7273 (exit $ac_status); } && {
7274 test -z "$ac_c_werror_flag" ||
7275 test ! -s conftest.err
7276 } && test -s conftest.$ac_objext; then
ba479fd2
NN
7277 ac_header_compiler=yes
7278else
7279 echo "$as_me: failed program was:" >&5
7280sed 's/^/| /' conftest.$ac_ext >&5
7281
ab22c1fa 7282 ac_header_compiler=no
ba479fd2 7283fi
ab22c1fa
CF
7284
7285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7286{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7287echo "${ECHO_T}$ac_header_compiler" >&6; }
ba479fd2
NN
7288
7289# Is the header present?
ab22c1fa
CF
7290{ echo "$as_me:$LINENO: checking valgrind.h presence" >&5
7291echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6; }
ba479fd2 7292cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7293/* confdefs.h. */
7294_ACEOF
7295cat confdefs.h >>conftest.$ac_ext
7296cat >>conftest.$ac_ext <<_ACEOF
7297/* end confdefs.h. */
7298#include <valgrind.h>
7299_ACEOF
ab22c1fa
CF
7300if { (ac_try="$ac_cpp conftest.$ac_ext"
7301case "(($ac_try" in
7302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7303 *) ac_try_echo=$ac_try;;
7304esac
7305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7306 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
7307 ac_status=$?
7308 grep -v '^ *+' conftest.er1 >conftest.err
7309 rm -f conftest.er1
7310 cat conftest.err >&5
7311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
7312 (exit $ac_status); } >/dev/null && {
7313 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7314 test ! -s conftest.err
7315 }; then
ba479fd2
NN
7316 ac_header_preproc=yes
7317else
7318 echo "$as_me: failed program was:" >&5
7319sed 's/^/| /' conftest.$ac_ext >&5
7320
7321 ac_header_preproc=no
7322fi
ab22c1fa 7323
ba479fd2 7324rm -f conftest.err conftest.$ac_ext
ab22c1fa
CF
7325{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7326echo "${ECHO_T}$ac_header_preproc" >&6; }
ba479fd2
NN
7327
7328# So? What about this header?
86da66b5
HPN
7329case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7330 yes:no: )
ba479fd2
NN
7331 { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
7332echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
86da66b5
HPN
7333 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5
7334echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;}
7335 ac_header_preproc=yes
ba479fd2 7336 ;;
86da66b5 7337 no:yes:* )
ba479fd2
NN
7338 { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5
7339echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;}
86da66b5
HPN
7340 { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5
7341echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;}
7342 { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5
7343echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;}
7344 { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
7345echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
ba479fd2
NN
7346 { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5
7347echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;}
86da66b5
HPN
7348 { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5
7349echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;}
ab22c1fa 7350
ba479fd2
NN
7351 ;;
7352esac
ab22c1fa
CF
7353{ echo "$as_me:$LINENO: checking for valgrind.h" >&5
7354echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6; }
ba479fd2
NN
7355if test "${ac_cv_header_valgrind_h+set}" = set; then
7356 echo $ECHO_N "(cached) $ECHO_C" >&6
7357else
7358 ac_cv_header_valgrind_h=$ac_header_preproc
6938ec6c 7359fi
ab22c1fa
CF
7360{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5
7361echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6; }
ba479fd2 7362
6e3f3080 7363fi
ba479fd2 7364if test $ac_cv_header_valgrind_h = yes; then
6938ec6c
NN
7365 have_valgrind_h=yes
7366else
ba479fd2 7367 have_valgrind_h=no
6938ec6c
NN
7368fi
7369
7370
ba479fd2 7371
cdce5c16 7372if test x$ac_valgrind_checking != x ; then
414d23ae
HPN
7373 # It is certainly possible that there's valgrind but no valgrind.h.
7374 # GCC relies on making annotations so we must have both.
ab22c1fa
CF
7375 { echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
7376echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6; }
ba479fd2 7377 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7378/* confdefs.h. */
7379_ACEOF
7380cat confdefs.h >>conftest.$ac_ext
7381cat >>conftest.$ac_ext <<_ACEOF
7382/* end confdefs.h. */
a207b594 7383#include <valgrind/memcheck.h>
14011ca4
AJ
7384#ifndef VALGRIND_DISCARD
7385#error VALGRIND_DISCARD not defined
7386#endif
ba479fd2 7387_ACEOF
ab22c1fa
CF
7388if { (ac_try="$ac_cpp conftest.$ac_ext"
7389case "(($ac_try" in
7390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7391 *) ac_try_echo=$ac_try;;
7392esac
7393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7394 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
7395 ac_status=$?
7396 grep -v '^ *+' conftest.er1 >conftest.err
7397 rm -f conftest.er1
7398 cat conftest.err >&5
7399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
7400 (exit $ac_status); } >/dev/null && {
7401 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7402 test ! -s conftest.err
7403 }; then
a207b594
HPN
7404 gcc_cv_header_valgrind_memcheck_h=yes
7405else
ba479fd2
NN
7406 echo "$as_me: failed program was:" >&5
7407sed 's/^/| /' conftest.$ac_ext >&5
7408
a207b594
HPN
7409 gcc_cv_header_valgrind_memcheck_h=no
7410fi
ab22c1fa 7411
ba479fd2 7412rm -f conftest.err conftest.$ac_ext
ab22c1fa
CF
7413 { echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5
7414echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6; }
7415 { echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
7416echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6; }
ba479fd2 7417 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
7418/* confdefs.h. */
7419_ACEOF
7420cat confdefs.h >>conftest.$ac_ext
7421cat >>conftest.$ac_ext <<_ACEOF
7422/* end confdefs.h. */
a207b594
HPN
7423#include <memcheck.h>
7424#ifndef VALGRIND_DISCARD
7425#error VALGRIND_DISCARD not defined
7426#endif
ba479fd2 7427_ACEOF
ab22c1fa
CF
7428if { (ac_try="$ac_cpp conftest.$ac_ext"
7429case "(($ac_try" in
7430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7431 *) ac_try_echo=$ac_try;;
7432esac
7433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7434 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
7435 ac_status=$?
7436 grep -v '^ *+' conftest.er1 >conftest.err
7437 rm -f conftest.er1
7438 cat conftest.err >&5
7439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
7440 (exit $ac_status); } >/dev/null && {
7441 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7442 test ! -s conftest.err
7443 }; then
14011ca4
AJ
7444 gcc_cv_header_memcheck_h=yes
7445else
ba479fd2
NN
7446 echo "$as_me: failed program was:" >&5
7447sed 's/^/| /' conftest.$ac_ext >&5
7448
cafe096b
EC
7449 gcc_cv_header_memcheck_h=no
7450fi
ab22c1fa 7451
ba479fd2 7452rm -f conftest.err conftest.$ac_ext
ab22c1fa
CF
7453 { echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5
7454echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6; }
ba479fd2 7455
56694dd9
ZW
7456# Prepare PATH_SEPARATOR.
7457# The user is always right.
7458if test "${PATH_SEPARATOR+set}" != set; then
7459 echo "#! /bin/sh" >conf$$.sh
7460 echo "exit 0" >>conf$$.sh
7461 chmod +x conf$$.sh
7462 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7463 PATH_SEPARATOR=';'
7464 else
7465 PATH_SEPARATOR=:
7466 fi
7467 rm -f conf$$.sh
7468fi
7469
7470# Find out how to test for executable files. Don't use a zero-byte file,
7471# as systems may use methods other than mode bits to determine executability.
7472cat >conf$$.file <<_ASEOF
7473#! /bin/sh
7474exit 0
7475_ASEOF
7476chmod +x conf$$.file
7477if test -x conf$$.file >/dev/null 2>&1; then
7478 ac_executable_p="test -x"
7479else
7480 ac_executable_p="test -f"
7481fi
7482rm -f conf$$.file
7483
7484# Extract the first word of "valgrind", so it can be a program name with args.
414d23ae 7485set dummy valgrind; ac_word=$2
ab22c1fa
CF
7486{ echo "$as_me:$LINENO: checking for $ac_word" >&5
7487echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
7488if test "${ac_cv_path_valgrind_path+set}" = set; then
7489 echo $ECHO_N "(cached) $ECHO_C" >&6
414d23ae
HPN
7490else
7491 case "$valgrind_path" in
56694dd9
ZW
7492 [\\/]* | ?:[\\/]*)
7493 ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path.
7494 ;;
414d23ae 7495 *)
56694dd9
ZW
7496 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
7497 for ac_dir in $PATH; do
7498 IFS="$ac_save_IFS"
7499 test -z "$ac_dir" && ac_dir=.
7500 for ac_exec_ext in '' $ac_executable_extensions; do
7501 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
7502 if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then
7503 ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext"
7504 break 2
7505 fi
7506 fi
7507 done
7508 done
7509 IFS="$ac_save_IFS"
7510 ;;
414d23ae 7511esac
75e93faa 7512fi
414d23ae
HPN
7513valgrind_path="$ac_cv_path_valgrind_path"
7514if test -n "$valgrind_path"; then
ab22c1fa
CF
7515 { echo "$as_me:$LINENO: result: $valgrind_path" >&5
7516echo "${ECHO_T}$valgrind_path" >&6; }
414d23ae 7517else
ab22c1fa
CF
7518 { echo "$as_me:$LINENO: result: no" >&5
7519echo "${ECHO_T}no" >&6; }
414d23ae
HPN
7520fi
7521
a207b594
HPN
7522 if test "x$valgrind_path" = "x" \
7523 || (test $have_valgrind_h = no \
7524 && test $gcc_cv_header_memcheck_h = no \
7525 && test $gcc_cv_header_valgrind_memcheck_h = no); then
ba479fd2
NN
7526 { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5
7527echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;}
7528 { (exit 1); exit 1; }; }
414d23ae
HPN
7529 fi
7530 valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
7531 valgrind_command="$valgrind_path -q"
ba479fd2
NN
7532
7533cat >>confdefs.h <<\_ACEOF
414d23ae 7534#define ENABLE_VALGRIND_CHECKING 1
ba479fd2 7535_ACEOF
75e93faa 7536
a207b594 7537 if test $gcc_cv_header_valgrind_memcheck_h = yes; then
ba479fd2
NN
7538
7539cat >>confdefs.h <<\_ACEOF
a207b594 7540#define HAVE_VALGRIND_MEMCHECK_H 1
ba479fd2 7541_ACEOF
a207b594
HPN
7542
7543 fi
14011ca4 7544 if test $gcc_cv_header_memcheck_h = yes; then
ba479fd2
NN
7545
7546cat >>confdefs.h <<\_ACEOF
14011ca4 7547#define HAVE_MEMCHECK_H 1
ba479fd2 7548_ACEOF
14011ca4
AJ
7549
7550 fi
414d23ae 7551fi
75e93faa 7552
75e93faa
ZW
7553
7554
ab22c1fa 7555# Check whether --enable-mapped-location was given.
74ee1642 7556if test "${enable_mapped_location+set}" = set; then
ab22c1fa 7557 enableval=$enable_mapped_location;
74ee1642
PB
7558else
7559 enable_mapped_location=no
ab22c1fa
CF
7560fi
7561
74ee1642
PB
7562
7563if test "$enable_mapped_location" = yes ; then
7564
7565cat >>confdefs.h <<\_ACEOF
7566#define USE_MAPPED_LOCATION 1
7567_ACEOF
7568
7569fi
7570
414d23ae 7571# Enable code coverage collection
ab22c1fa 7572# Check whether --enable-coverage was given.
414d23ae 7573if test "${enable_coverage+set}" = set; then
ab22c1fa 7574 enableval=$enable_coverage; case "${enableval}" in
6dd297da
NN
7575 yes|noopt)
7576 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0"
7577 ;;
7578 opt)
7579 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2"
7580 ;;
7581 no)
7582 # a.k.a. --disable-coverage
7583 coverage_flags=""
7584 ;;
7585 *)
7586 { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5
ba479fd2
NN
7587echo "$as_me: error: unknown coverage setting $enableval" >&2;}
7588 { (exit 1); exit 1; }; }
6dd297da 7589 ;;
414d23ae 7590esac
75e93faa 7591else
414d23ae 7592 coverage_flags=""
ab22c1fa 7593fi
dd7f7a6e 7594
8b1f719a 7595
a3bba767 7596
ab22c1fa
CF
7597# Check whether --enable-gather-detailed-mem-stats was given.
7598if test "${enable_gather_detailed_mem_stats+set}" = set; then
7599 enableval=$enable_gather_detailed_mem_stats;
439a7e54
DN
7600else
7601 enable_gather_detailed_mem_stats=no
ab22c1fa
CF
7602fi
7603
439a7e54 7604if test x$enable_gather_detailed_mem_stats = xyes ; then
ba479fd2
NN
7605
7606cat >>confdefs.h <<\_ACEOF
439a7e54 7607#define GATHER_STATISTICS 1
ba479fd2 7608_ACEOF
439a7e54
DN
7609
7610fi
7611
73458fb7
NN
7612# -------------------------------
7613# Miscenalleous configure options
7614# -------------------------------
34a86c2b
NN
7615
7616# With stabs
ba479fd2 7617
ab22c1fa 7618# Check whether --with-stabs was given.
34a86c2b 7619if test "${with_stabs+set}" = set; then
ab22c1fa 7620 withval=$with_stabs; stabs="$with_stabs"
34a86c2b
NN
7621else
7622 stabs=no
ab22c1fa
CF
7623fi
7624
cafe096b 7625
34a86c2b 7626# Determine whether or not multilibs are enabled.
ab22c1fa 7627# Check whether --enable-multilib was given.
34a86c2b 7628if test "${enable_multilib+set}" = set; then
ab22c1fa 7629 enableval=$enable_multilib;
34a86c2b
NN
7630else
7631 enable_multilib=yes
ab22c1fa
CF
7632fi
7633
75e93faa 7634
34a86c2b 7635
414d23ae 7636# Enable __cxa_atexit for C++.
ab22c1fa 7637# Check whether --enable-__cxa_atexit was given.
414d23ae 7638if test "${enable___cxa_atexit+set}" = set; then
ab22c1fa
CF
7639 enableval=$enable___cxa_atexit;
7640fi
75e93faa
ZW
7641
7642
486aa804 7643# Enable C extension for decimal float if target supports it.
ab22c1fa 7644# Check whether --enable-decimal-float was given.
486aa804 7645if test "${enable_decimal_float+set}" = set; then
ab22c1fa 7646 enableval=$enable_decimal_float;
79b87c74
MM
7647 case $enable_decimal_float in
7648 yes | no | bid | dpd) ;;
7649 *) { { echo "$as_me:$LINENO: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
7650Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&5
7651echo "$as_me: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float.
7652Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&2;}
7653 { (exit 1); exit 1; }; } ;;
7654 esac
7655
7656else
7657
7658 case $target in
7659 powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
a4a9df5f 7660 enable_decimal_float=yes
486aa804
BE
7661 ;;
7662 *)
7663 { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5
7664echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
7665 enable_decimal_float=no
7666 ;;
79b87c74 7667 esac
486aa804 7668
ab22c1fa
CF
7669fi
7670
486aa804 7671
79b87c74
MM
7672dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
7673
7674cat >>confdefs.h <<_ACEOF
7675#define ENABLE_DECIMAL_FLOAT $dfp
7676_ACEOF
7677
7678
7679# x86's use BID format instead of DPD
7680case x$enable_decimal_float in
7681 xyes)
7682 case $target in
7683 i?86*-*-linux* | x86_64*-*-linux*)
7684 enable_decimal_float=bid
7685 ;;
7686 *)
7687 enable_decimal_float=dpd
7688 ;;
7689 esac
7690 ;;
7691 xno)
7692 # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
7693 # dependency on libdecnumber.
7694 enable_decimal_float=dpd
7695 ;;
7696esac
486aa804
BE
7697
7698
79b87c74 7699bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi`
486aa804
BE
7700
7701cat >>confdefs.h <<_ACEOF
79b87c74 7702#define ENABLE_DECIMAL_BID_FORMAT $bid
486aa804
BE
7703_ACEOF
7704
7705
ab22c1fa
CF
7706# Enable C extension for fixed-point arithmetic.
7707# Check whether --enable-fixed-point was given.
7708if test "${enable_fixed_point+set}" = set; then
7709 enableval=$enable_fixed_point;
7710
7711else
7712
7713 case $target in
7714 mips*-*-*)
7715 enable_fixed_point=yes
7716 ;;
7717 *)
7718 { echo "$as_me:$LINENO: WARNING: fixed-point is not supported for this target" >&5
7719echo "$as_me: WARNING: fixed-point is not supported for this target" >&2;}
7720 enable_fixed_point=no
7721 ;;
7722 esac
7723
7724fi
7725
7726
7727
7728fixedpoint=`if test $enable_fixed_point = yes; then echo 1; else echo 0; fi`
7729
7730cat >>confdefs.h <<_ACEOF
7731#define ENABLE_FIXED_POINT $fixedpoint
7732_ACEOF
7733
7734
414d23ae
HPN
7735# Enable threads
7736# Pass with no value to take the default
7737# Pass with a value to specify a thread package
ab22c1fa 7738# Check whether --enable-threads was given.
414d23ae 7739if test "${enable_threads+set}" = set; then
ab22c1fa 7740 enableval=$enable_threads;
414d23ae
HPN
7741else
7742 enable_threads=''
ab22c1fa 7743fi
8b1f719a 7744
a3bba767 7745
ab22c1fa
CF
7746# Check whether --enable-tls was given.
7747if test "${enable_tls+set}" = set; then
7748 enableval=$enable_tls;
8dea1cca
DD
7749 case $enable_tls in
7750 yes | no) ;;
7751 *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls.
7752Valid choices are 'yes' and 'no'." >&5
7753echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls.
7754Valid choices are 'yes' and 'no'." >&2;}
7755 { (exit 1); exit 1; }; } ;;
7756 esac
7757
7758else
7759 enable_tls=''
ab22c1fa 7760fi
703d89ab 7761
ab22c1fa
CF
7762
7763# Check whether --enable-objc-gc was given.
414d23ae 7764if test "${enable_objc_gc+set}" = set; then
ab22c1fa 7765 enableval=$enable_objc_gc; if test x$enable_objc_gc = xno; then
414d23ae
HPN
7766 objc_boehm_gc=''
7767else
7768 objc_boehm_gc=1
7769fi
7770else
7771 objc_boehm_gc=''
ab22c1fa
CF
7772fi
7773
75e93faa 7774
a6ccdbab 7775
ab22c1fa 7776# Check whether --with-dwarf2 was given.
414d23ae 7777if test "${with_dwarf2+set}" = set; then
ab22c1fa 7778 withval=$with_dwarf2; dwarf2="$with_dwarf2"
75e93faa 7779else
414d23ae 7780 dwarf2=no
ab22c1fa 7781fi
8b1f719a 7782
a3bba767 7783
ab22c1fa
CF
7784# Check whether --enable-shared was given.
7785if test "${enable_shared+set}" = set; then
7786 enableval=$enable_shared;
414d23ae
HPN
7787 case $enable_shared in
7788 yes | no) ;;
7789 *)
7790 enable_shared=no
7791 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
7792 for pkg in $enableval; do
7793 if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
7794 enable_shared=yes
7795 fi
7796 done
7797 IFS="$ac_save_ifs"
7798 ;;
7799 esac
7800
75e93faa 7801else
414d23ae 7802 enable_shared=yes
ab22c1fa 7803fi
75e93faa 7804
b8ec3cc8 7805
703d89ab 7806
ab22c1fa
CF
7807
7808# Check whether --with-build-sysroot was given.
160633c6 7809if test "${with_build_sysroot+set}" = set; then
ab22c1fa
CF
7810 withval=$with_build_sysroot;
7811fi
160633c6 7812
160633c6
MM
7813
7814
ab22c1fa 7815# Check whether --with-sysroot was given.
4977bab6 7816if test "${with_sysroot+set}" = set; then
ab22c1fa 7817 withval=$with_sysroot;
4977bab6 7818 case ${with_sysroot} in
caa55b1e 7819 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
4977bab6
ZW
7820 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
7821 esac
ba479fd2 7822
4977bab6 7823 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
14da6073 7824 CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
4977bab6 7825
748670c2
RS
7826 if test "x$prefix" = xNONE; then
7827 test_prefix=/usr/local
7828 else
7829 test_prefix=$prefix
7830 fi
047d636f 7831 if test "x$exec_prefix" = xNONE; then
748670c2 7832 test_exec_prefix=$test_prefix
047d636f 7833 else
748670c2 7834 test_exec_prefix=$exec_prefix
047d636f
DJ
7835 fi
7836 case ${TARGET_SYSTEM_ROOT} in
91710e62 7837 "${test_prefix}"|"${test_prefix}/"*|\
748670c2
RS
7838 "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
7839 '${prefix}'|'${prefix}/'*|\
91710e62 7840 '${exec_prefix}'|'${exec_prefix}/'*)
047d636f
DJ
7841 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
7842 TARGET_SYSTEM_ROOT_DEFINE="$t"
7843 ;;
7844 esac
7845
4977bab6 7846else
ba479fd2 7847
4977bab6 7848 TARGET_SYSTEM_ROOT=
db720d9a 7849 TARGET_SYSTEM_ROOT_DEFINE=
4977bab6
ZW
7850 CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include'
7851
ab22c1fa
CF
7852fi
7853
4977bab6
ZW
7854
7855
7856
7857
d1bd0ded 7858# Build with intermodule optimisations
ab22c1fa 7859# Check whether --enable-intermodule was given.
d1bd0ded 7860if test "${enable_intermodule+set}" = set; then
ab22c1fa 7861 enableval=$enable_intermodule; case ${enable_intermodule} in
0c46c5c7
KC
7862 yes) onestep="-onestep";;
7863 *) onestep="";;
d1bd0ded 7864esac
0c46c5c7
KC
7865else
7866 onestep=""
ab22c1fa
CF
7867fi
7868
d1bd0ded
GK
7869
7870
f3c9f174
NN
7871# Sanity check enable_languages in case someone does not run the toplevel
7872# configure # script.
ab22c1fa 7873# Check whether --enable-languages was given.
f3c9f174 7874if test "${enable_languages+set}" = set; then
ab22c1fa 7875 enableval=$enable_languages; case ,${enable_languages}, in
f3c9f174
NN
7876 ,,|,yes,)
7877 # go safe -- we cannot be much sure without the toplevel
7878 # configure's
7879 # analysis of which target libs are present and usable
7880 enable_languages=c
7881 ;;
7882 *,all,*)
7883 { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5
7884echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;}
7885 { (exit 1); exit 1; }; }
7886 ;;
7887 *,c,*)
7888 ;;
7889 *)
7890 enable_languages=c,${enable_languages}
7891 ;;
7892esac
7893else
7894 enable_languages=c
ab22c1fa
CF
7895fi
7896
f3c9f174 7897
9288b845
CD
7898# Used by documentation targets
7899
7900
7901
f3c9f174 7902
73458fb7
NN
7903# -------------------------
7904# Checks for other programs
7905# -------------------------
5b67ad6f 7906
ab22c1fa
CF
7907{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7908echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
7909set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
7910if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2 7911 echo $ECHO_N "(cached) $ECHO_C" >&6
e9a25f70 7912else
ba479fd2 7913 cat >conftest.make <<\_ACEOF
ab22c1fa 7914SHELL = /bin/sh
e9a25f70 7915all:
ab22c1fa 7916 @echo '@@@%%%=$(MAKE)=@@@%%%'
ba479fd2 7917_ACEOF
e9a25f70 7918# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ab22c1fa
CF
7919case `${MAKE-make} -f conftest.make 2>/dev/null` in
7920 *@@@%%%=?*=@@@%%%*)
7921 eval ac_cv_prog_make_${ac_make}_set=yes;;
7922 *)
7923 eval ac_cv_prog_make_${ac_make}_set=no;;
7924esac
ba479fd2 7925rm -f conftest.make
e9a25f70 7926fi
ab22c1fa
CF
7927if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
7928 { echo "$as_me:$LINENO: result: yes" >&5
7929echo "${ECHO_T}yes" >&6; }
e9a25f70
JL
7930 SET_MAKE=
7931else
ab22c1fa
CF
7932 { echo "$as_me:$LINENO: result: no" >&5
7933echo "${ECHO_T}no" >&6; }
e9a25f70
JL
7934 SET_MAKE="MAKE=${MAKE-make}"
7935fi
7936
7937
861bb6c1 7938# Find some useful tools
ba479fd2 7939for ac_prog in gawk mawk nawk awk
861bb6c1 7940do
ba479fd2 7941 # Extract the first word of "$ac_prog", so it can be a program name with args.
861bb6c1 7942set dummy $ac_prog; ac_word=$2
ab22c1fa
CF
7943{ echo "$as_me:$LINENO: checking for $ac_word" >&5
7944echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
7945if test "${ac_cv_prog_AWK+set}" = set; then
7946 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
7947else
7948 if test -n "$AWK"; then
7949 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7950else
ba479fd2
NN
7951as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7952for as_dir in $PATH
7953do
7954 IFS=$as_save_IFS
7955 test -z "$as_dir" && as_dir=.
7956 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 7957 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
7958 ac_cv_prog_AWK="$ac_prog"
7959 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7960 break 2
7961 fi
7962done
7963done
ab22c1fa 7964IFS=$as_save_IFS
ba479fd2 7965
861bb6c1
JL
7966fi
7967fi
ba479fd2 7968AWK=$ac_cv_prog_AWK
861bb6c1 7969if test -n "$AWK"; then
ab22c1fa
CF
7970 { echo "$as_me:$LINENO: result: $AWK" >&5
7971echo "${ECHO_T}$AWK" >&6; }
861bb6c1 7972else
ab22c1fa
CF
7973 { echo "$as_me:$LINENO: result: no" >&5
7974echo "${ECHO_T}no" >&6; }
861bb6c1
JL
7975fi
7976
ab22c1fa 7977
ba479fd2 7978 test -n "$AWK" && break
861bb6c1
JL
7979done
7980
776dc15d 7981# We need awk to create options.c and options.h.
2c4902b9
NN
7982# Bail out if it's missing.
7983case ${AWK} in
ba479fd2
NN
7984 "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5
7985echo "$as_me: error: can't build without awk, bailing out" >&2;}
7986 { (exit 1); exit 1; }; } ;;
2c4902b9
NN
7987esac
7988
ab22c1fa
CF
7989{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
7990echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
ba479fd2
NN
7991if test "${gcc_cv_prog_LN_S+set}" = set; then
7992 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
7993else
7994 rm -f conftestdata_t
7995echo >conftestdata_f
7996if ln -s conftestdata_f conftestdata_t 2>/dev/null
7997then
7998 gcc_cv_prog_LN_S="ln -s"
7999else
8000 if ln conftestdata_f conftestdata_t 2>/dev/null
8001 then
8002 gcc_cv_prog_LN_S=ln
8003 else
35f06ae4
PB
8004 if cp -p conftestdata_f conftestdata_t 2>/dev/null
8005 then
06c3418c 8006 gcc_cv_prog_LN_S="cp -p"
35f06ae4
PB
8007 else
8008 gcc_cv_prog_LN_S=cp
8009 fi
0a4b6309
RL
8010 fi
8011fi
8012rm -f conftestdata_f conftestdata_t
8013
8014fi
8015LN_S="$gcc_cv_prog_LN_S"
8016if test "$gcc_cv_prog_LN_S" = "ln -s"; then
ab22c1fa
CF
8017 { echo "$as_me:$LINENO: result: yes" >&5
8018echo "${ECHO_T}yes" >&6; }
0a4b6309
RL
8019else
8020 if test "$gcc_cv_prog_LN_S" = "ln"; then
ab22c1fa
CF
8021 { echo "$as_me:$LINENO: result: no, using ln" >&5
8022echo "${ECHO_T}no, using ln" >&6; }
0a4b6309 8023 else
ab22c1fa
CF
8024 { echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5
8025echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6; }
0a4b6309
RL
8026 fi
8027fi
8028
ab22c1fa
CF
8029{ echo "$as_me:$LINENO: checking whether ln works" >&5
8030echo $ECHO_N "checking whether ln works... $ECHO_C" >&6; }
18fc9bd4
RG
8031if test "${acx_cv_prog_LN+set}" = set; then
8032 echo $ECHO_N "(cached) $ECHO_C" >&6
8033else
8034 rm -f conftestdata_t
8035echo >conftestdata_f
8036if ln conftestdata_f conftestdata_t 2>/dev/null
8037then
8038 acx_cv_prog_LN=ln
8039else
8040 acx_cv_prog_LN=no
8041fi
8042rm -f conftestdata_f conftestdata_t
8043
8044fi
8045if test $acx_cv_prog_LN = no; then
8046 LN="$LN_S"
ab22c1fa
CF
8047 { echo "$as_me:$LINENO: result: no, using $LN" >&5
8048echo "${ECHO_T}no, using $LN" >&6; }
18fc9bd4
RG
8049else
8050 LN="$acx_cv_prog_LN"
ab22c1fa
CF
8051 { echo "$as_me:$LINENO: result: yes" >&5
8052echo "${ECHO_T}yes" >&6; }
18fc9bd4
RG
8053fi
8054
ba479fd2
NN
8055if test -n "$ac_tool_prefix"; then
8056 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8057set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ab22c1fa
CF
8058{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8059echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
8060if test "${ac_cv_prog_RANLIB+set}" = set; then
8061 echo $ECHO_N "(cached) $ECHO_C" >&6
861bb6c1
JL
8062else
8063 if test -n "$RANLIB"; then
8064 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8065else
ba479fd2
NN
8066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8067for as_dir in $PATH
8068do
8069 IFS=$as_save_IFS
8070 test -z "$as_dir" && as_dir=.
8071 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 8072 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
8073 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8074 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8075 break 2
8076 fi
8077done
8078done
ab22c1fa 8079IFS=$as_save_IFS
ba479fd2 8080
6e3f3080
NN
8081fi
8082fi
ba479fd2 8083RANLIB=$ac_cv_prog_RANLIB
6e3f3080 8084if test -n "$RANLIB"; then
ab22c1fa
CF
8085 { echo "$as_me:$LINENO: result: $RANLIB" >&5
8086echo "${ECHO_T}$RANLIB" >&6; }
ba479fd2 8087else
ab22c1fa
CF
8088 { echo "$as_me:$LINENO: result: no" >&5
8089echo "${ECHO_T}no" >&6; }
ba479fd2
NN
8090fi
8091
ab22c1fa 8092
ba479fd2
NN
8093fi
8094if test -z "$ac_cv_prog_RANLIB"; then
8095 ac_ct_RANLIB=$RANLIB
8096 # Extract the first word of "ranlib", so it can be a program name with args.
8097set dummy ranlib; ac_word=$2
ab22c1fa
CF
8098{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8099echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
8100if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8101 echo $ECHO_N "(cached) $ECHO_C" >&6
8102else
8103 if test -n "$ac_ct_RANLIB"; then
8104 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8105else
8106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8107for as_dir in $PATH
8108do
8109 IFS=$as_save_IFS
8110 test -z "$as_dir" && as_dir=.
8111 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 8112 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
8113 ac_cv_prog_ac_ct_RANLIB="ranlib"
8114 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8115 break 2
8116 fi
8117done
8118done
ab22c1fa 8119IFS=$as_save_IFS
ba479fd2 8120
ba479fd2
NN
8121fi
8122fi
8123ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8124if test -n "$ac_ct_RANLIB"; then
ab22c1fa
CF
8125 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8126echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
6e3f3080 8127else
ab22c1fa
CF
8128 { echo "$as_me:$LINENO: result: no" >&5
8129echo "${ECHO_T}no" >&6; }
ba479fd2
NN
8130fi
8131
ab22c1fa
CF
8132 if test "x$ac_ct_RANLIB" = x; then
8133 RANLIB=":"
8134 else
8135 case $cross_compiling:$ac_tool_warned in
8136yes:)
8137{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
8138whose name does not start with the host triplet. If you think this
8139configuration is useful to you, please write to autoconf@gnu.org." >&5
8140echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
8141whose name does not start with the host triplet. If you think this
8142configuration is useful to you, please write to autoconf@gnu.org." >&2;}
8143ac_tool_warned=yes ;;
8144esac
8145 RANLIB=$ac_ct_RANLIB
8146 fi
ba479fd2
NN
8147else
8148 RANLIB="$ac_cv_prog_RANLIB"
861bb6c1
JL
8149fi
8150
343a6100
MM
8151case "${host}" in
8152*-*-darwin*)
8153 # By default, the Darwin ranlib will not treat common symbols as
8154 # definitions when building the archive table of contents. Other
8155 # ranlibs do that; pass an option to the Darwin ranlib that makes
8156 # it behave similarly.
8157 ranlib_flags="-c"
8158 ;;
8159*)
8160 ranlib_flags=""
8161esac
8162
8163
0a4b6309
RL
8164# Find a good install program. We prefer a C program (faster),
8165# so one script is as good as another. But avoid the broken or
8166# incompatible versions:
8167# SysV /etc/install, /usr/sbin/install
8168# SunOS /usr/etc/install
8169# IRIX /sbin/install
8170# AIX /bin/install
8171# AFS /usr/afsws/bin/install, which mishandles nonexistent args
8172# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8173# ./install, which can be erroneously created by make from ./install.sh.
ab22c1fa
CF
8174{ echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
8175echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6; }
0a4b6309 8176if test -z "$INSTALL"; then
ba479fd2
NN
8177if test "${ac_cv_path_install+set}" = set; then
8178 echo $ECHO_N "(cached) $ECHO_C" >&6
0a4b6309
RL
8179else
8180 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
8181 for ac_dir in $PATH; do
8182 # Account for people who put trailing slashes in PATH elements.
8183 case "$ac_dir/" in
8184 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
8185 *)
8186 # OSF1 and SCO ODT 3.0 have their own names for install.
8187 for ac_prog in ginstall scoinst install; do
8188 if test -f $ac_dir/$ac_prog; then
8189 if test $ac_prog = install &&
8190 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
8191 # AIX install. It has an incompatible calling convention.
8192 # OSF/1 installbsd also uses dspmsg, but is usable.
8193 :
8194 else
8195 ac_cv_path_install="$ac_dir/$ac_prog -c"
8196 break 2
8197 fi
8198 fi
8199 done
8200 ;;
8201 esac
8202 done
8203 IFS="$ac_save_IFS"
8204
8205fi
8206 if test "${ac_cv_path_install+set}" = set; then
8207 INSTALL="$ac_cv_path_install"
8208 else
8209 # As a last resort, use the slow shell script. We don't cache a
8210 # path for INSTALL within a source directory, because that will
8211 # break other packages using the cache if that directory is
8212 # removed, or if the path is relative.
8213 INSTALL="$ac_install_sh"
8214 fi
8215fi
ab22c1fa
CF
8216{ echo "$as_me:$LINENO: result: $INSTALL" >&5
8217echo "${ECHO_T}$INSTALL" >&6; }
0a4b6309
RL
8218
8219# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8220# It thinks the first close brace ends the variable substitution.
8221test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8222
8223test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8224
861bb6c1 8225
3a000df0 8226# See if cmp has --ignore-initial.
ab22c1fa
CF
8227{ echo "$as_me:$LINENO: checking for cmp's capabilities" >&5
8228echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6; }
ba479fd2
NN
8229if test "${gcc_cv_prog_cmp_skip+set}" = set; then
8230 echo $ECHO_N "(cached) $ECHO_C" >&6
3a000df0
KC
8231else
8232 echo abfoo >t1
8233 echo cdfoo >t2
269a7343 8234 gcc_cv_prog_cmp_skip=slowcompare
3a000df0
KC
8235 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
8236 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
269a7343 8237 :
3a000df0
KC
8238 else
8239 gcc_cv_prog_cmp_skip=gnucompare
8240 fi
269a7343
KG
8241 fi
8242 if test $gcc_cv_prog_cmp_skip = slowcompare ; then
8243 if cmp t1 t2 2 2 > /dev/null 2>&1; then
8244 if cmp t1 t2 1 1 > /dev/null 2>&1; then
8245 :
8246 else
8247 gcc_cv_prog_cmp_skip=fastcompare
8248 fi
8249 fi
3a000df0
KC
8250 fi
8251 rm t1 t2
8252
8253fi
ab22c1fa
CF
8254{ echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
8255echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6; }
3a000df0
KC
8256make_compare_target=$gcc_cv_prog_cmp_skip
8257
8258
8259
73458fb7
NN
8260# See if we have the mktemp command.
8261# Extract the first word of "mktemp", so it can be a program name with args.
8262set dummy mktemp; ac_word=$2
ab22c1fa
CF
8263{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8264echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
8265if test "${ac_cv_prog_have_mktemp_command+set}" = set; then
8266 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8267else
8268 if test -n "$have_mktemp_command"; then
8269 ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test.
8270else
ba479fd2
NN
8271as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8272for as_dir in $PATH
8273do
8274 IFS=$as_save_IFS
8275 test -z "$as_dir" && as_dir=.
8276 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 8277 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
8278 ac_cv_prog_have_mktemp_command="yes"
8279 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8280 break 2
8281 fi
8282done
8283done
ab22c1fa 8284IFS=$as_save_IFS
ba479fd2 8285
73458fb7
NN
8286 test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no"
8287fi
8288fi
ba479fd2 8289have_mktemp_command=$ac_cv_prog_have_mktemp_command
73458fb7 8290if test -n "$have_mktemp_command"; then
ab22c1fa
CF
8291 { echo "$as_me:$LINENO: result: $have_mktemp_command" >&5
8292echo "${ECHO_T}$have_mktemp_command" >&6; }
73458fb7 8293else
ab22c1fa
CF
8294 { echo "$as_me:$LINENO: result: no" >&5
8295echo "${ECHO_T}no" >&6; }
73458fb7
NN
8296fi
8297
8298
ab22c1fa 8299
7c27e184
PB
8300# See if makeinfo has been installed and is modern enough
8301# that we can use it.
9f18db39 8302
3bbd5a19 8303 # Extract the first word of "makeinfo", so it can be a program name with args.
73458fb7 8304set dummy makeinfo; ac_word=$2
ab22c1fa
CF
8305{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8306echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
8307if test "${ac_cv_prog_MAKEINFO+set}" = set; then
8308 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8309else
8310 if test -n "$MAKEINFO"; then
8311 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
8312else
ba479fd2
NN
8313as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8314for as_dir in $PATH
8315do
8316 IFS=$as_save_IFS
8317 test -z "$as_dir" && as_dir=.
8318 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 8319 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ba479fd2
NN
8320 ac_cv_prog_MAKEINFO="makeinfo"
8321 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8322 break 2
8323 fi
8324done
8325done
ab22c1fa 8326IFS=$as_save_IFS
ba479fd2 8327
73458fb7
NN
8328fi
8329fi
ba479fd2 8330MAKEINFO=$ac_cv_prog_MAKEINFO
73458fb7 8331if test -n "$MAKEINFO"; then
ab22c1fa
CF
8332 { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
8333echo "${ECHO_T}$MAKEINFO" >&6; }
73458fb7 8334else
ab22c1fa
CF
8335 { echo "$as_me:$LINENO: result: no" >&5
8336echo "${ECHO_T}no" >&6; }
73458fb7
NN
8337fi
8338
ab22c1fa 8339
3bbd5a19
PB
8340 if test -n "$MAKEINFO"; then
8341 # Found it, now check the version.
ab22c1fa
CF
8342 { echo "$as_me:$LINENO: checking for modern makeinfo" >&5
8343echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6; }
ba479fd2
NN
8344if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
8345 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7 8346else
3bbd5a19
PB
8347 ac_prog_version=`eval $MAKEINFO --version 2>&1 |
8348 sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
8349
8350 case $ac_prog_version in
8351 '') gcc_cv_prog_makeinfo_modern=no;;
8352 4.[4-9]*) gcc_cv_prog_makeinfo_modern=yes;;
8353 *) gcc_cv_prog_makeinfo_modern=no;;
8354 esac
73458fb7
NN
8355
8356fi
ab22c1fa
CF
8357{ echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5
8358echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6; }
3bbd5a19
PB
8359 else
8360 gcc_cv_prog_makeinfo_modern=no
8361 fi
8362 if test $gcc_cv_prog_makeinfo_modern = no; then
8363 MAKEINFO="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing makeinfo"
8364 fi
73458fb7 8365
73458fb7 8366if test $gcc_cv_prog_makeinfo_modern = no; then
ba479fd2
NN
8367 { echo "$as_me:$LINENO: WARNING:
8368*** Makeinfo is missing or too old.
8369*** Info documentation will not be built." >&5
8370echo "$as_me: WARNING:
cafe096b 8371*** Makeinfo is missing or too old.
ba479fd2 8372*** Info documentation will not be built." >&2;}
73458fb7
NN
8373 BUILD_INFO=
8374else
ba479fd2 8375 BUILD_INFO=info
73458fb7
NN
8376fi
8377
7c27e184 8378
73458fb7 8379# Is pod2man recent enough to regenerate manpages?
ab22c1fa
CF
8380{ echo "$as_me:$LINENO: checking for recent Pod::Man" >&5
8381echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6; }
73458fb7 8382if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
ab22c1fa
CF
8383 { echo "$as_me:$LINENO: result: yes" >&5
8384echo "${ECHO_T}yes" >&6; }
ba479fd2 8385 GENERATED_MANPAGES=generated-manpages
73458fb7 8386else
ab22c1fa
CF
8387 { echo "$as_me:$LINENO: result: no" >&5
8388echo "${ECHO_T}no" >&6; }
73458fb7
NN
8389 GENERATED_MANPAGES=
8390fi
8391
7c27e184 8392
3bbd5a19
PB
8393MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing"
8394
73458fb7 8395# How about lex?
7c27e184
PB
8396for ac_prog in flex
8397do
8398 # Extract the first word of "$ac_prog", so it can be a program name with args.
8399set dummy $ac_prog; ac_word=$2
ab22c1fa
CF
8400{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8401echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
8402if test "${ac_cv_prog_FLEX+set}" = set; then
8403 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8404else
8405 if test -n "$FLEX"; then
8406 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
8407else
ba479fd2
NN
8408as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8409for as_dir in $PATH
8410do
8411 IFS=$as_save_IFS
8412 test -z "$as_dir" && as_dir=.
8413 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 8414 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7c27e184 8415 ac_cv_prog_FLEX="$ac_prog"
ba479fd2
NN
8416 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8417 break 2
8418 fi
8419done
8420done
ab22c1fa 8421IFS=$as_save_IFS
ba479fd2 8422
73458fb7
NN
8423fi
8424fi
ba479fd2 8425FLEX=$ac_cv_prog_FLEX
73458fb7 8426if test -n "$FLEX"; then
ab22c1fa
CF
8427 { echo "$as_me:$LINENO: result: $FLEX" >&5
8428echo "${ECHO_T}$FLEX" >&6; }
73458fb7 8429else
ab22c1fa
CF
8430 { echo "$as_me:$LINENO: result: no" >&5
8431echo "${ECHO_T}no" >&6; }
73458fb7
NN
8432fi
8433
ab22c1fa 8434
7c27e184
PB
8435 test -n "$FLEX" && break
8436done
8437test -n "$FLEX" || FLEX="$MISSING flex"
8438
73458fb7
NN
8439
8440# Bison?
7c27e184
PB
8441for ac_prog in bison
8442do
8443 # Extract the first word of "$ac_prog", so it can be a program name with args.
8444set dummy $ac_prog; ac_word=$2
ab22c1fa
CF
8445{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8446echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
ba479fd2
NN
8447if test "${ac_cv_prog_BISON+set}" = set; then
8448 echo $ECHO_N "(cached) $ECHO_C" >&6
73458fb7
NN
8449else
8450 if test -n "$BISON"; then
8451 ac_cv_prog_BISON="$BISON" # Let the user override the test.
8452else
ba479fd2
NN
8453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8454for as_dir in $PATH
8455do
8456 IFS=$as_save_IFS
8457 test -z "$as_dir" && as_dir=.
8458 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 8459 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7c27e184 8460 ac_cv_prog_BISON="$ac_prog"
ba479fd2
NN
8461 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8462 break 2
8463 fi
8464done
8465done
ab22c1fa 8466IFS=$as_save_IFS
ba479fd2 8467
73458fb7
NN
8468fi
8469fi
ba479fd2 8470BISON=$ac_cv_prog_BISON
73458fb7 8471if test -n "$BISON"; then
ab22c1fa
CF
8472 { echo "$as_me:$LINENO: result: $BISON" >&5
8473echo "${ECHO_T}$BISON" >&6; }
73458fb7 8474else
ab22c1fa
CF
8475 { echo "$as_me:$LINENO: result: no" >&5
8476echo "${ECHO_T}no" >&6; }
73458fb7
NN
8477fi
8478
ab22c1fa 8479
7c27e184
PB
8480 test -n "$BISON" && break
8481done
8482test -n "$BISON" || BISON="$MISSING bison"
8483
8484
8485# Binutils are not build modules, unlike bison/flex/makeinfo. So we
8486# check for build == host before using them.
73458fb7 8487
f6a874ac 8488# NM
414adbdd
GK
8489if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \
8490 && test -d ../binutils ; then
f6a874ac
JW
8491 NM='$(objdir)/../binutils/nm-new'
8492else
8493 # Extract the first word of "nm", so it can be a program name with args.
8494set dummy nm; ac_word=$2
ab22c1fa
CF
8495{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8496echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
f6a874ac
JW
8497if test "${ac_cv_prog_NM+set}" = set; then
8498 echo $ECHO_N "(cached) $ECHO_C" >&6
8499else
8500 if test -n "$NM"; then
8501 ac_cv_prog_NM="$NM" # Let the user override the test.
8502else
8503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8504for as_dir in $PATH
8505do
8506 IFS=$as_save_IFS
8507 test -z "$as_dir" && as_dir=.
8508 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 8509 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
f6a874ac
JW
8510 ac_cv_prog_NM="nm"
8511 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8512 break 2
8513 fi
8514done
8515done
ab22c1fa 8516IFS=$as_save_IFS
f6a874ac
JW
8517
8518 test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm"
8519fi
8520fi
8521NM=$ac_cv_prog_NM
8522if test -n "$NM"; then
ab22c1fa
CF
8523 { echo "$as_me:$LINENO: result: $NM" >&5
8524echo "${ECHO_T}$NM" >&6; }
f6a874ac 8525else
ab22c1fa
CF
8526 { echo "$as_me:$LINENO: result: no" >&5
8527echo "${ECHO_T}no" >&6; }
f6a874ac
JW
8528fi
8529
ab22c1fa 8530
f6a874ac
JW
8531fi
8532
8533# AR
414adbdd
GK
8534if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \
8535 && test -d ../binutils ; then
f6a874ac
JW
8536 AR='$(objdir)/../binutils/ar'
8537else
8538 # Extract the first word of "ar", so it can be a program name with args.
8539set dummy ar; ac_word=$2
ab22c1fa
CF
8540{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8541echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
f6a874ac
JW
8542if test "${ac_cv_prog_AR+set}" = set; then
8543 echo $ECHO_N "(cached) $ECHO_C" >&6
8544else
8545 if test -n "$AR"; then
8546 ac_cv_prog_AR="$AR" # Let the user override the test.
8547else
8548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8549for as_dir in $PATH
8550do
8551 IFS=$as_save_IFS
8552 test -z "$as_dir" && as_dir=.
8553 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 8554 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
f6a874ac
JW
8555 ac_cv_prog_AR="ar"
8556 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8557 break 2
8558 fi
8559done
8560done
ab22c1fa 8561IFS=$as_save_IFS
f6a874ac
JW
8562
8563 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar"
8564fi
8565fi
8566AR=$ac_cv_prog_AR
8567if test -n "$AR"; then
ab22c1fa
CF
8568 { echo "$as_me:$LINENO: result: $AR" >&5
8569echo "${ECHO_T}$AR" >&6; }
f6a874ac 8570else
ab22c1fa
CF
8571 { echo "$as_me:$LINENO: result: no" >&5
8572echo "${ECHO_T}no" >&6; }
f6a874ac
JW
8573fi
8574
ab22c1fa 8575
f6a874ac
JW
8576fi
8577
8578
73458fb7
NN
8579# --------------------
8580# Checks for C headers
8581# --------------------
8582
ab22c1fa
CF
8583{ echo "$as_me:$LINENO: checking for GNU C library" >&5
8584echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6; }
ba479fd2
NN
8585if test "${gcc_cv_glibc+set}" = set; then
8586 echo $ECHO_N "(cached) $ECHO_C" >&6
8587else
8588 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8589/* confdefs.h. */
8590_ACEOF
8591cat confdefs.h >>conftest.$ac_ext
8592cat >>conftest.$ac_ext <<_ACEOF
8593/* end confdefs.h. */
73458fb7 8594#include <features.h>
ba479fd2
NN
8595int
8596main ()
8597{
73458fb7
NN
8598
8599#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
8600#error Not a GNU C library system
8601#endif
ba479fd2
NN
8602 ;
8603 return 0;
8604}
8605_ACEOF
8606rm -f conftest.$ac_objext
ab22c1fa
CF
8607if { (ac_try="$ac_compile"
8608case "(($ac_try" in
8609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8610 *) ac_try_echo=$ac_try;;
8611esac
8612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8613 (eval "$ac_compile") 2>conftest.er1
ba479fd2 8614 ac_status=$?
86da66b5
HPN
8615 grep -v '^ *+' conftest.er1 >conftest.err
8616 rm -f conftest.er1
8617 cat conftest.err >&5
ba479fd2 8618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
8619 (exit $ac_status); } && {
8620 test -z "$ac_c_werror_flag" ||
8621 test ! -s conftest.err
8622 } && test -s conftest.$ac_objext; then
73458fb7
NN
8623 gcc_cv_glibc=yes
8624else
ba479fd2
NN
8625 echo "$as_me: failed program was:" >&5
8626sed 's/^/| /' conftest.$ac_ext >&5
8627
ab22c1fa 8628 gcc_cv_glibc=no
73458fb7 8629fi
ab22c1fa
CF
8630
8631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
73458fb7
NN
8632fi
8633
ab22c1fa
CF
8634{ echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5
8635echo "${ECHO_T}$gcc_cv_glibc" >&6; }
73458fb7 8636if test $gcc_cv_glibc = yes; then
ba479fd2
NN
8637
8638cat >>confdefs.h <<\_ACEOF
73458fb7 8639#define _GNU_SOURCE 1
ba479fd2 8640_ACEOF
73458fb7
NN
8641
8642fi
8643
ca9bc441
NN
8644# Need to reject headers which give warnings, so that the -Werror bootstrap
8645# works later. *sigh* This needs to come before all header checks.
18fc9bd4 8646
ca9bc441
NN
8647ac_c_preproc_warn_flag=yes
8648
ab22c1fa
CF
8649{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
8650echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
ba479fd2
NN
8651if test "${ac_cv_header_stdc+set}" = set; then
8652 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8653else
ba479fd2 8654 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8655/* confdefs.h. */
8656_ACEOF
8657cat confdefs.h >>conftest.$ac_ext
8658cat >>conftest.$ac_ext <<_ACEOF
8659/* end confdefs.h. */
956d6950
JL
8660#include <stdlib.h>
8661#include <stdarg.h>
8662#include <string.h>
8663#include <float.h>
ba479fd2
NN
8664
8665int
8666main ()
8667{
8668
8669 ;
8670 return 0;
8671}
8672_ACEOF
8673rm -f conftest.$ac_objext
ab22c1fa
CF
8674if { (ac_try="$ac_compile"
8675case "(($ac_try" in
8676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8677 *) ac_try_echo=$ac_try;;
8678esac
8679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8680 (eval "$ac_compile") 2>conftest.er1
ba479fd2 8681 ac_status=$?
86da66b5
HPN
8682 grep -v '^ *+' conftest.er1 >conftest.err
8683 rm -f conftest.er1
8684 cat conftest.err >&5
ba479fd2 8685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
8686 (exit $ac_status); } && {
8687 test -z "$ac_c_werror_flag" ||
8688 test ! -s conftest.err
8689 } && test -s conftest.$ac_objext; then
956d6950
JL
8690 ac_cv_header_stdc=yes
8691else
ba479fd2
NN
8692 echo "$as_me: failed program was:" >&5
8693sed 's/^/| /' conftest.$ac_ext >&5
8694
ab22c1fa 8695 ac_cv_header_stdc=no
956d6950 8696fi
ab22c1fa
CF
8697
8698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950
JL
8699
8700if test $ac_cv_header_stdc = yes; then
8701 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ba479fd2 8702 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8703/* confdefs.h. */
8704_ACEOF
8705cat confdefs.h >>conftest.$ac_ext
8706cat >>conftest.$ac_ext <<_ACEOF
8707/* end confdefs.h. */
956d6950 8708#include <string.h>
ba479fd2
NN
8709
8710_ACEOF
956d6950 8711if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8712 $EGREP "memchr" >/dev/null 2>&1; then
956d6950
JL
8713 :
8714else
956d6950
JL
8715 ac_cv_header_stdc=no
8716fi
8717rm -f conftest*
8718
8719fi
8720
8721if test $ac_cv_header_stdc = yes; then
8722 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ba479fd2 8723 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8724/* confdefs.h. */
8725_ACEOF
8726cat confdefs.h >>conftest.$ac_ext
8727cat >>conftest.$ac_ext <<_ACEOF
8728/* end confdefs.h. */
956d6950 8729#include <stdlib.h>
ba479fd2
NN
8730
8731_ACEOF
956d6950 8732if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 8733 $EGREP "free" >/dev/null 2>&1; then
956d6950
JL
8734 :
8735else
956d6950
JL
8736 ac_cv_header_stdc=no
8737fi
8738rm -f conftest*
8739
8740fi
8741
8742if test $ac_cv_header_stdc = yes; then
8743 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ba479fd2 8744 if test "$cross_compiling" = yes; then
956d6950
JL
8745 :
8746else
ba479fd2 8747 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8748/* confdefs.h. */
8749_ACEOF
8750cat confdefs.h >>conftest.$ac_ext
8751cat >>conftest.$ac_ext <<_ACEOF
8752/* end confdefs.h. */
956d6950 8753#include <ctype.h>
ab22c1fa 8754#include <stdlib.h>
ba479fd2
NN
8755#if ((' ' & 0x0FF) == 0x020)
8756# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8757# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8758#else
8759# define ISLOWER(c) \
86da66b5
HPN
8760 (('a' <= (c) && (c) <= 'i') \
8761 || ('j' <= (c) && (c) <= 'r') \
8762 || ('s' <= (c) && (c) <= 'z'))
ba479fd2
NN
8763# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8764#endif
63cf211a 8765
ba479fd2
NN
8766#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8767int
8768main ()
8769{
8770 int i;
8771 for (i = 0; i < 256; i++)
8772 if (XOR (islower (i), ISLOWER (i))
86da66b5 8773 || toupper (i) != TOUPPER (i))
ab22c1fa
CF
8774 return 2;
8775 return 0;
ba479fd2
NN
8776}
8777_ACEOF
8778rm -f conftest$ac_exeext
ab22c1fa
CF
8779if { (ac_try="$ac_link"
8780case "(($ac_try" in
8781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8782 *) ac_try_echo=$ac_try;;
8783esac
8784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8785 (eval "$ac_link") 2>&5
ba479fd2
NN
8786 ac_status=$?
8787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8788 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ab22c1fa
CF
8789 { (case "(($ac_try" in
8790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8791 *) ac_try_echo=$ac_try;;
8792esac
8793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8794 (eval "$ac_try") 2>&5
ba479fd2
NN
8795 ac_status=$?
8796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8797 (exit $ac_status); }; }; then
956d6950
JL
8798 :
8799else
ba479fd2
NN
8800 echo "$as_me: program exited with status $ac_status" >&5
8801echo "$as_me: failed program was:" >&5
8802sed 's/^/| /' conftest.$ac_ext >&5
8803
8804( exit $ac_status )
8805ac_cv_header_stdc=no
956d6950 8806fi
ab22c1fa 8807rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
956d6950 8808fi
ab22c1fa
CF
8809
8810
956d6950
JL
8811fi
8812fi
ab22c1fa
CF
8813{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8814echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
63cf211a 8815if test $ac_cv_header_stdc = yes; then
ba479fd2
NN
8816
8817cat >>confdefs.h <<\_ACEOF
956d6950 8818#define STDC_HEADERS 1
ba479fd2 8819_ACEOF
956d6950
JL
8820
8821fi
8822
ab22c1fa
CF
8823{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
8824echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
ba479fd2
NN
8825if test "${ac_cv_header_time+set}" = set; then
8826 echo $ECHO_N "(cached) $ECHO_C" >&6
956d6950 8827else
ba479fd2 8828 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8829/* confdefs.h. */
8830_ACEOF
8831cat confdefs.h >>conftest.$ac_ext
8832cat >>conftest.$ac_ext <<_ACEOF
8833/* end confdefs.h. */
956d6950
JL
8834#include <sys/types.h>
8835#include <sys/time.h>
8836#include <time.h>
ba479fd2
NN
8837
8838int
8839main ()
8840{
8841if ((struct tm *) 0)
8842return 0;
8843 ;
8844 return 0;
8845}
8846_ACEOF
8847rm -f conftest.$ac_objext
ab22c1fa
CF
8848if { (ac_try="$ac_compile"
8849case "(($ac_try" in
8850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8851 *) ac_try_echo=$ac_try;;
8852esac
8853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8854 (eval "$ac_compile") 2>conftest.er1
ba479fd2 8855 ac_status=$?
86da66b5
HPN
8856 grep -v '^ *+' conftest.er1 >conftest.err
8857 rm -f conftest.er1
8858 cat conftest.err >&5
ba479fd2 8859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
8860 (exit $ac_status); } && {
8861 test -z "$ac_c_werror_flag" ||
8862 test ! -s conftest.err
8863 } && test -s conftest.$ac_objext; then
956d6950
JL
8864 ac_cv_header_time=yes
8865else
ba479fd2
NN
8866 echo "$as_me: failed program was:" >&5
8867sed 's/^/| /' conftest.$ac_ext >&5
8868
ab22c1fa 8869 ac_cv_header_time=no
956d6950 8870fi
ab22c1fa
CF
8871
8872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
956d6950 8873fi
ab22c1fa
CF
8874{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
8875echo "${ECHO_T}$ac_cv_header_time" >&6; }
63cf211a 8876if test $ac_cv_header_time = yes; then
ba479fd2
NN
8877
8878cat >>confdefs.h <<\_ACEOF
956d6950 8879#define TIME_WITH_SYS_TIME 1
ba479fd2 8880_ACEOF
956d6950
JL
8881
8882fi
8883
ab22c1fa
CF
8884{ echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5
8885echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6; }
18fc9bd4
RG
8886if test "${gcc_cv_header_string+set}" = set; then
8887 echo $ECHO_N "(cached) $ECHO_C" >&6
8888else
8889 cat >conftest.$ac_ext <<_ACEOF
8890/* confdefs.h. */
8891_ACEOF
8892cat confdefs.h >>conftest.$ac_ext
8893cat >>conftest.$ac_ext <<_ACEOF
8894/* end confdefs.h. */
8895#include <string.h>
8896#include <strings.h>
8897int
8898main ()
8899{
8900
8901 ;
8902 return 0;
8903}
8904_ACEOF
8905rm -f conftest.$ac_objext
ab22c1fa
CF
8906if { (ac_try="$ac_compile"
8907case "(($ac_try" in
8908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8909 *) ac_try_echo=$ac_try;;
8910esac
8911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8912 (eval "$ac_compile") 2>conftest.er1
18fc9bd4
RG
8913 ac_status=$?
8914 grep -v '^ *+' conftest.er1 >conftest.err
8915 rm -f conftest.er1
8916 cat conftest.err >&5
8917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
8918 (exit $ac_status); } && {
8919 test -z "$ac_c_werror_flag" ||
8920 test ! -s conftest.err
8921 } && test -s conftest.$ac_objext; then
18fc9bd4
RG
8922 gcc_cv_header_string=yes
8923else
8924 echo "$as_me: failed program was:" >&5
8925sed 's/^/| /' conftest.$ac_ext >&5
8926
ab22c1fa 8927 gcc_cv_header_string=no
18fc9bd4 8928fi
ab22c1fa
CF
8929
8930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18fc9bd4 8931fi
ab22c1fa
CF
8932{ echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5
8933echo "${ECHO_T}$gcc_cv_header_string" >&6; }
18fc9bd4
RG
8934if test $gcc_cv_header_string = yes; then
8935
8936cat >>confdefs.h <<\_ACEOF
8937#define STRING_WITH_STRINGS 1
8938_ACEOF
8939
8940fi
8941
ab22c1fa
CF
8942{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
8943echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
ba479fd2
NN
8944if test "${ac_cv_header_sys_wait_h+set}" = set; then
8945 echo $ECHO_N "(cached) $ECHO_C" >&6
e9831ca0 8946else
ba479fd2 8947 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
8948/* confdefs.h. */
8949_ACEOF
8950cat confdefs.h >>conftest.$ac_ext
8951cat >>conftest.$ac_ext <<_ACEOF
8952/* end confdefs.h. */
e9831ca0
KG
8953#include <sys/types.h>
8954#include <sys/wait.h>
8955#ifndef WEXITSTATUS
ab22c1fa 8956# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
e9831ca0
KG
8957#endif
8958#ifndef WIFEXITED
ba479fd2 8959# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
e9831ca0 8960#endif
ba479fd2
NN
8961
8962int
8963main ()
8964{
8965 int s;
8966 wait (&s);
8967 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8968 ;
8969 return 0;
8970}
8971_ACEOF
8972rm -f conftest.$ac_objext
ab22c1fa
CF
8973if { (ac_try="$ac_compile"
8974case "(($ac_try" in
8975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8976 *) ac_try_echo=$ac_try;;
8977esac
8978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8979 (eval "$ac_compile") 2>conftest.er1
ba479fd2 8980 ac_status=$?
86da66b5
HPN
8981 grep -v '^ *+' conftest.er1 >conftest.err
8982 rm -f conftest.er1
8983 cat conftest.err >&5
ba479fd2 8984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
8985 (exit $ac_status); } && {
8986 test -z "$ac_c_werror_flag" ||
8987 test ! -s conftest.err
8988 } && test -s conftest.$ac_objext; then
e9831ca0
KG
8989 ac_cv_header_sys_wait_h=yes
8990else
ba479fd2
NN
8991 echo "$as_me: failed program was:" >&5
8992sed 's/^/| /' conftest.$ac_ext >&5
8993
ab22c1fa 8994 ac_cv_header_sys_wait_h=no
e9831ca0 8995fi
ab22c1fa
CF
8996
8997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
e9831ca0 8998fi
ab22c1fa
CF
8999{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
9000echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
63cf211a 9001if test $ac_cv_header_sys_wait_h = yes; then
ba479fd2
NN
9002
9003cat >>confdefs.h <<\_ACEOF
e9831ca0 9004#define HAVE_SYS_WAIT_H 1
ba479fd2 9005_ACEOF
6e3f3080 9006
63cf211a 9007fi
6e3f3080 9008
ba479fd2
NN
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
dfb77e37
KC
9030
9031for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
1072ec3f 9032 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
03c41c05 9033 sys/resource.h sys/param.h sys/times.h sys/stat.h \
56694dd9 9034 direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
861bb6c1 9035do
ba479fd2 9036as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ab22c1fa
CF
9037{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9038echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9039if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2 9040 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9041else
18fc9bd4 9042 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9043/* confdefs.h. */
9044_ACEOF
9045cat confdefs.h >>conftest.$ac_ext
9046cat >>conftest.$ac_ext <<_ACEOF
9047/* end confdefs.h. */
9048#include <$ac_header>
9049_ACEOF
ab22c1fa
CF
9050if { (ac_try="$ac_cpp conftest.$ac_ext"
9051case "(($ac_try" in
9052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9053 *) ac_try_echo=$ac_try;;
9054esac
9055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9056 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
9057 ac_status=$?
9058 grep -v '^ *+' conftest.er1 >conftest.err
9059 rm -f conftest.er1
9060 cat conftest.err >&5
9061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
9062 (exit $ac_status); } >/dev/null && {
9063 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9064 test ! -s conftest.err
9065 }; then
18fc9bd4 9066 eval "$as_ac_Header=yes"
ba479fd2
NN
9067else
9068 echo "$as_me: failed program was:" >&5
9069sed 's/^/| /' conftest.$ac_ext >&5
9070
18fc9bd4 9071 eval "$as_ac_Header=no"
ba479fd2 9072fi
ab22c1fa 9073
ba479fd2 9074rm -f conftest.err conftest.$ac_ext
6e3f3080 9075fi
ab22c1fa
CF
9076ac_res=`eval echo '${'$as_ac_Header'}'`
9077 { echo "$as_me:$LINENO: result: $ac_res" >&5
9078echo "${ECHO_T}$ac_res" >&6; }
ba479fd2
NN
9079if test `eval echo '${'$as_ac_Header'}'` = yes; then
9080 cat >>confdefs.h <<_ACEOF
9081#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9082_ACEOF
9083
956d6950
JL
9084fi
9085done
9086
9087
f24af81b 9088# Check for thread headers.
ab22c1fa
CF
9089{ echo "$as_me:$LINENO: checking for thread.h" >&5
9090echo $ECHO_N "checking for thread.h... $ECHO_C" >&6; }
ba479fd2
NN
9091if test "${ac_cv_header_thread_h+set}" = set; then
9092 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 9093else
18fc9bd4 9094 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9095/* confdefs.h. */
9096_ACEOF
9097cat confdefs.h >>conftest.$ac_ext
9098cat >>conftest.$ac_ext <<_ACEOF
9099/* end confdefs.h. */
9100#include <thread.h>
9101_ACEOF
ab22c1fa
CF
9102if { (ac_try="$ac_cpp conftest.$ac_ext"
9103case "(($ac_try" in
9104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9105 *) ac_try_echo=$ac_try;;
9106esac
9107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9108 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
9109 ac_status=$?
9110 grep -v '^ *+' conftest.er1 >conftest.err
9111 rm -f conftest.er1
9112 cat conftest.err >&5
9113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
9114 (exit $ac_status); } >/dev/null && {
9115 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9116 test ! -s conftest.err
9117 }; then
18fc9bd4 9118 ac_cv_header_thread_h=yes
ba479fd2
NN
9119else
9120 echo "$as_me: failed program was:" >&5
9121sed 's/^/| /' conftest.$ac_ext >&5
9122
18fc9bd4 9123 ac_cv_header_thread_h=no
ba479fd2 9124fi
ab22c1fa 9125
ba479fd2 9126rm -f conftest.err conftest.$ac_ext
6e3f3080 9127fi
ab22c1fa
CF
9128{ echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5
9129echo "${ECHO_T}$ac_cv_header_thread_h" >&6; }
ba479fd2 9130if test $ac_cv_header_thread_h = yes; then
f24af81b
TT
9131 have_thread_h=yes
9132else
ba479fd2 9133 have_thread_h=
f24af81b
TT
9134fi
9135
ab22c1fa
CF
9136{ echo "$as_me:$LINENO: checking for pthread.h" >&5
9137echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; }
ba479fd2
NN
9138if test "${ac_cv_header_pthread_h+set}" = set; then
9139 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 9140else
18fc9bd4 9141 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9142/* confdefs.h. */
9143_ACEOF
9144cat confdefs.h >>conftest.$ac_ext
9145cat >>conftest.$ac_ext <<_ACEOF
9146/* end confdefs.h. */
9147#include <pthread.h>
9148_ACEOF
ab22c1fa
CF
9149if { (ac_try="$ac_cpp conftest.$ac_ext"
9150case "(($ac_try" in
9151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9152 *) ac_try_echo=$ac_try;;
9153esac
9154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9155 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
9156 ac_status=$?
9157 grep -v '^ *+' conftest.er1 >conftest.err
9158 rm -f conftest.er1
9159 cat conftest.err >&5
9160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
9161 (exit $ac_status); } >/dev/null && {
9162 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9163 test ! -s conftest.err
9164 }; then
18fc9bd4 9165 ac_cv_header_pthread_h=yes
ba479fd2 9166else
18fc9bd4
RG
9167 echo "$as_me: failed program was:" >&5
9168sed 's/^/| /' conftest.$ac_ext >&5
9169
9170 ac_cv_header_pthread_h=no
9171fi
ab22c1fa 9172
18fc9bd4 9173rm -f conftest.err conftest.$ac_ext
6e3f3080 9174fi
ab22c1fa
CF
9175{ echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
9176echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; }
ba479fd2 9177if test $ac_cv_header_pthread_h = yes; then
f24af81b
TT
9178 have_pthread_h=yes
9179else
ba479fd2 9180 have_pthread_h=
f24af81b
TT
9181fi
9182
9183
84c041a1 9184# These tests can't be done till we know if we have limits.h.
ab22c1fa
CF
9185{ echo "$as_me:$LINENO: checking for CHAR_BIT" >&5
9186echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6; }
ba479fd2
NN
9187if test "${gcc_cv_decl_char_bit+set}" = set; then
9188 echo $ECHO_N "(cached) $ECHO_C" >&6
9189else
9190 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9191/* confdefs.h. */
9192_ACEOF
9193cat confdefs.h >>conftest.$ac_ext
9194cat >>conftest.$ac_ext <<_ACEOF
9195/* end confdefs.h. */
75e93faa
ZW
9196#ifdef HAVE_LIMITS_H
9197#include <limits.h>
9198#endif
9199#ifdef CHAR_BIT
9200found
9201#endif
ba479fd2 9202_ACEOF
75e93faa 9203if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 9204 $EGREP "found" >/dev/null 2>&1; then
75e93faa
ZW
9205 gcc_cv_decl_char_bit=yes
9206else
75e93faa
ZW
9207 gcc_cv_decl_char_bit=no
9208fi
9209rm -f conftest*
9210
9211
9212fi
ab22c1fa
CF
9213{ echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5
9214echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6; }
75e93faa 9215if test $gcc_cv_decl_char_bit = no; then
ab22c1fa
CF
9216 { echo "$as_me:$LINENO: checking number of bits in a byte" >&5
9217echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6; }
ba479fd2
NN
9218if test "${gcc_cv_c_nbby+set}" = set; then
9219 echo $ECHO_N "(cached) $ECHO_C" >&6
75e93faa
ZW
9220else
9221 i=8
9222 gcc_cv_c_nbby=
9223 while test $i -lt 65; do
ba479fd2 9224 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9225/* confdefs.h. */
9226_ACEOF
9227cat confdefs.h >>conftest.$ac_ext
9228cat >>conftest.$ac_ext <<_ACEOF
9229/* end confdefs.h. */
9230
9231int
9232main ()
9233{
4e70264f
ZW
9234switch(0) {
9235 case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
9236 case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
9237 ; }
ba479fd2
NN
9238 ;
9239 return 0;
9240}
9241_ACEOF
9242rm -f conftest.$ac_objext
ab22c1fa
CF
9243if { (ac_try="$ac_compile"
9244case "(($ac_try" in
9245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9246 *) ac_try_echo=$ac_try;;
9247esac
9248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9249 (eval "$ac_compile") 2>conftest.er1
ba479fd2 9250 ac_status=$?
86da66b5
HPN
9251 grep -v '^ *+' conftest.er1 >conftest.err
9252 rm -f conftest.er1
9253 cat conftest.err >&5
ba479fd2 9254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
9255 (exit $ac_status); } && {
9256 test -z "$ac_c_werror_flag" ||
9257 test ! -s conftest.err
9258 } && test -s conftest.$ac_objext; then
4e70264f 9259 gcc_cv_c_nbby=$i; break
75e93faa 9260else
ba479fd2
NN
9261 echo "$as_me: failed program was:" >&5
9262sed 's/^/| /' conftest.$ac_ext >&5
9263
ab22c1fa 9264
75e93faa 9265fi
ab22c1fa
CF
9266
9267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75e93faa
ZW
9268 i=`expr $i + 1`
9269 done
9270 test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
9271
9272fi
ab22c1fa
CF
9273{ echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5
9274echo "${ECHO_T}$gcc_cv_c_nbby" >&6; }
75e93faa 9275if test $gcc_cv_c_nbby = failed; then
ba479fd2
NN
9276 { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5
9277echo "$as_me: error: cannot determine number of bits in a byte" >&2;}
9278 { (exit 1); exit 1; }; }
75e93faa 9279else
ba479fd2
NN
9280
9281cat >>confdefs.h <<_ACEOF
75e93faa 9282#define CHAR_BIT $gcc_cv_c_nbby
ba479fd2 9283_ACEOF
75e93faa
ZW
9284
9285fi
9286fi
ab22c1fa
CF
9287{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
9288echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
ba479fd2
NN
9289if test "${ac_cv_c_bigendian+set}" = set; then
9290 echo $ECHO_N "(cached) $ECHO_C" >&6
84c041a1 9291else
9791c75c 9292 # See if sys/param.h defines the BYTE_ORDER macro.
ba479fd2 9293cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9294/* confdefs.h. */
9295_ACEOF
9296cat confdefs.h >>conftest.$ac_ext
9297cat >>conftest.$ac_ext <<_ACEOF
9298/* end confdefs.h. */
4977bab6
ZW
9299#include <sys/types.h>
9300#include <sys/param.h>
9791c75c 9301
ba479fd2
NN
9302int
9303main ()
9304{
ab22c1fa
CF
9305#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
9306 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
4977bab6 9307 bogus endian macros
84c041a1 9308#endif
9791c75c 9309
ba479fd2
NN
9310 ;
9311 return 0;
9312}
9313_ACEOF
9314rm -f conftest.$ac_objext
ab22c1fa
CF
9315if { (ac_try="$ac_compile"
9316case "(($ac_try" in
9317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9318 *) ac_try_echo=$ac_try;;
9319esac
9320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9321 (eval "$ac_compile") 2>conftest.er1
ba479fd2 9322 ac_status=$?
86da66b5
HPN
9323 grep -v '^ *+' conftest.er1 >conftest.err
9324 rm -f conftest.er1
9325 cat conftest.err >&5
ba479fd2 9326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
9327 (exit $ac_status); } && {
9328 test -z "$ac_c_werror_flag" ||
9329 test ! -s conftest.err
9330 } && test -s conftest.$ac_objext; then
4977bab6 9331 # It does; now see whether it defined to BIG_ENDIAN or not.
ba479fd2 9332cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9333/* confdefs.h. */
9334_ACEOF
9335cat confdefs.h >>conftest.$ac_ext
9336cat >>conftest.$ac_ext <<_ACEOF
9337/* end confdefs.h. */
4977bab6
ZW
9338#include <sys/types.h>
9339#include <sys/param.h>
9791c75c 9340
ba479fd2
NN
9341int
9342main ()
9343{
4977bab6
ZW
9344#if BYTE_ORDER != BIG_ENDIAN
9345 not big endian
84c041a1 9346#endif
9791c75c 9347
ba479fd2
NN
9348 ;
9349 return 0;
9350}
9351_ACEOF
9352rm -f conftest.$ac_objext
ab22c1fa
CF
9353if { (ac_try="$ac_compile"
9354case "(($ac_try" in
9355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9356 *) ac_try_echo=$ac_try;;
9357esac
9358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9359 (eval "$ac_compile") 2>conftest.er1
ba479fd2 9360 ac_status=$?
86da66b5
HPN
9361 grep -v '^ *+' conftest.er1 >conftest.err
9362 rm -f conftest.er1
9363 cat conftest.err >&5
ba479fd2 9364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
9365 (exit $ac_status); } && {
9366 test -z "$ac_c_werror_flag" ||
9367 test ! -s conftest.err
9368 } && test -s conftest.$ac_objext; then
4977bab6
ZW
9369 ac_cv_c_bigendian=yes
9370else
ba479fd2
NN
9371 echo "$as_me: failed program was:" >&5
9372sed 's/^/| /' conftest.$ac_ext >&5
9373
ab22c1fa 9374 ac_cv_c_bigendian=no
4977bab6 9375fi
ab22c1fa
CF
9376
9377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 9378else
ba479fd2
NN
9379 echo "$as_me: failed program was:" >&5
9380sed 's/^/| /' conftest.$ac_ext >&5
9381
ab22c1fa 9382 # It does not; compile a test program.
9791c75c
KC
9383if test "$cross_compiling" = yes; then
9384 # try to guess the endianness by grepping values into an object file
9385 ac_cv_c_bigendian=unknown
9386 cat >conftest.$ac_ext <<_ACEOF
9387/* confdefs.h. */
9388_ACEOF
9389cat confdefs.h >>conftest.$ac_ext
9390cat >>conftest.$ac_ext <<_ACEOF
9391/* end confdefs.h. */
ab22c1fa
CF
9392short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
9393short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
9791c75c 9394void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
ab22c1fa
CF
9395short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
9396short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
9791c75c
KC
9397void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
9398int
9399main ()
9400{
9401 _ascii (); _ebcdic ();
9402 ;
9403 return 0;
9404}
9405_ACEOF
9406rm -f conftest.$ac_objext
ab22c1fa
CF
9407if { (ac_try="$ac_compile"
9408case "(($ac_try" in
9409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9410 *) ac_try_echo=$ac_try;;
9411esac
9412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9413 (eval "$ac_compile") 2>conftest.er1
9791c75c
KC
9414 ac_status=$?
9415 grep -v '^ *+' conftest.er1 >conftest.err
9416 rm -f conftest.er1
9417 cat conftest.err >&5
9418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
9419 (exit $ac_status); } && {
9420 test -z "$ac_c_werror_flag" ||
9421 test ! -s conftest.err
9422 } && test -s conftest.$ac_objext; then
8b1f719a
PB
9423 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
9424 ac_cv_c_bigendian=yes
9425fi
9791c75c
KC
9426if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
9427 if test "$ac_cv_c_bigendian" = unknown; then
9428 ac_cv_c_bigendian=no
9429 else
9430 # finding both strings is unlikely to happen, but who knows?
9431 ac_cv_c_bigendian=unknown
9432 fi
9433fi
9434else
9435 echo "$as_me: failed program was:" >&5
9436sed 's/^/| /' conftest.$ac_ext >&5
9437
ab22c1fa 9438
4977bab6 9439fi
ab22c1fa
CF
9440
9441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba479fd2
NN
9442else
9443 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9444/* confdefs.h. */
9445_ACEOF
9446cat confdefs.h >>conftest.$ac_ext
9447cat >>conftest.$ac_ext <<_ACEOF
9448/* end confdefs.h. */
ab22c1fa 9449$ac_includes_default
9791c75c
KC
9450int
9451main ()
9452{
ab22c1fa 9453
4977bab6
ZW
9454 /* Are we little or big endian? From Harbison&Steele. */
9455 union
9456 {
ab22c1fa
CF
9457 long int l;
9458 char c[sizeof (long int)];
4977bab6
ZW
9459 } u;
9460 u.l = 1;
ab22c1fa
CF
9461 return u.c[sizeof (long int) - 1] == 1;
9462
9463 ;
9464 return 0;
4977bab6 9465}
ba479fd2
NN
9466_ACEOF
9467rm -f conftest$ac_exeext
ab22c1fa
CF
9468if { (ac_try="$ac_link"
9469case "(($ac_try" in
9470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9471 *) ac_try_echo=$ac_try;;
9472esac
9473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9474 (eval "$ac_link") 2>&5
ba479fd2
NN
9475 ac_status=$?
9476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9477 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ab22c1fa
CF
9478 { (case "(($ac_try" in
9479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9480 *) ac_try_echo=$ac_try;;
9481esac
9482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9483 (eval "$ac_try") 2>&5
ba479fd2
NN
9484 ac_status=$?
9485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9486 (exit $ac_status); }; }; then
4977bab6
ZW
9487 ac_cv_c_bigendian=no
9488else
ba479fd2
NN
9489 echo "$as_me: program exited with status $ac_status" >&5
9490echo "$as_me: failed program was:" >&5
9491sed 's/^/| /' conftest.$ac_ext >&5
9492
9493( exit $ac_status )
9494ac_cv_c_bigendian=yes
4977bab6 9495fi
ab22c1fa 9496rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
84c041a1 9497fi
ab22c1fa
CF
9498
9499
4977bab6 9500fi
ab22c1fa
CF
9501
9502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4977bab6 9503fi
ab22c1fa
CF
9504{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
9505echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
9791c75c
KC
9506case $ac_cv_c_bigendian in
9507 yes)
ba479fd2
NN
9508
9509cat >>confdefs.h <<\_ACEOF
4977bab6 9510#define WORDS_BIGENDIAN 1
ba479fd2 9511_ACEOF
9791c75c
KC
9512 ;;
9513 no)
9514 ;;
9515 *)
9516 { { echo "$as_me:$LINENO: error: unknown endianness
9517presetting ac_cv_c_bigendian=no (or yes) will help" >&5
9518echo "$as_me: error: unknown endianness
9519presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
9520 { (exit 1); exit 1; }; } ;;
9521esac
84c041a1 9522
75e93faa 9523
73458fb7
NN
9524# --------
9525# UNSORTED
9526# --------
1e608388 9527
1e608388 9528
4e70264f
ZW
9529# These libraries may be used by collect2.
9530# We may need a special search path to get them linked.
ab22c1fa
CF
9531{ echo "$as_me:$LINENO: checking for collect2 libraries" >&5
9532echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6; }
ba479fd2
NN
9533if test "${gcc_cv_collect2_libs+set}" = set; then
9534 echo $ECHO_N "(cached) $ECHO_C" >&6
4e70264f
ZW
9535else
9536 save_LIBS="$LIBS"
7f2749d4 9537for libs in '' -lld -lmld \
4e70264f
ZW
9538 '-L/usr/lib/cmplrs/cc2.11 -lmld' \
9539 '-L/usr/lib/cmplrs/cc3.11 -lmld'
9540do
9541 LIBS="$libs"
ba479fd2 9542 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9543/* confdefs.h. */
9544_ACEOF
9545cat confdefs.h >>conftest.$ac_ext
9546cat >>conftest.$ac_ext <<_ACEOF
9547/* end confdefs.h. */
9548
ab22c1fa
CF
9549/* Override any GCC internal prototype to avoid an error.
9550 Use char because int might match the return type of a GCC
9551 builtin and then its argument prototype would still apply. */
ba479fd2
NN
9552#ifdef __cplusplus
9553extern "C"
9554#endif
ba479fd2
NN
9555char ldopen ();
9556int
9557main ()
9558{
ab22c1fa 9559return ldopen ();
ba479fd2
NN
9560 ;
9561 return 0;
9562}
9563_ACEOF
9564rm -f conftest.$ac_objext conftest$ac_exeext
ab22c1fa
CF
9565if { (ac_try="$ac_link"
9566case "(($ac_try" in
9567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9568 *) ac_try_echo=$ac_try;;
9569esac
9570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9571 (eval "$ac_link") 2>conftest.er1
ba479fd2 9572 ac_status=$?
86da66b5
HPN
9573 grep -v '^ *+' conftest.er1 >conftest.err
9574 rm -f conftest.er1
9575 cat conftest.err >&5
ba479fd2 9576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
9577 (exit $ac_status); } && {
9578 test -z "$ac_c_werror_flag" ||
9579 test ! -s conftest.err
9580 } && test -s conftest$ac_exeext &&
9581 $as_test_x conftest$ac_exeext; then
4e70264f
ZW
9582 gcc_cv_collect2_libs="$libs"; break
9583else
ba479fd2
NN
9584 echo "$as_me: failed program was:" >&5
9585sed 's/^/| /' conftest.$ac_ext >&5
9586
ab22c1fa 9587
4e70264f 9588fi
ab22c1fa
CF
9589
9590rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
86da66b5 9591 conftest$ac_exeext conftest.$ac_ext
4e70264f
ZW
9592done
9593LIBS="$save_LIBS"
9594test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required'
9595fi
ab22c1fa
CF
9596{ echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5
9597echo "${ECHO_T}$gcc_cv_collect2_libs" >&6; }
4e70264f
ZW
9598case $gcc_cv_collect2_libs in
9599 "none required") ;;
9600 *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;;
9601esac
9602
9603
7f2749d4
RK
9604# When building Ada code on Alpha, we need exc_resume which is usually in
9605# -lexc. So test for it.
9606save_LIBS="$LIBS"
9607LIBS=
ab22c1fa
CF
9608{ echo "$as_me:$LINENO: checking for library containing exc_resume" >&5
9609echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6; }
ba479fd2
NN
9610if test "${ac_cv_search_exc_resume+set}" = set; then
9611 echo $ECHO_N "(cached) $ECHO_C" >&6
9612else
9613 ac_func_search_save_LIBS=$LIBS
ba479fd2 9614cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9615/* confdefs.h. */
9616_ACEOF
9617cat confdefs.h >>conftest.$ac_ext
9618cat >>conftest.$ac_ext <<_ACEOF
9619/* end confdefs.h. */
7f2749d4 9620
ab22c1fa
CF
9621/* Override any GCC internal prototype to avoid an error.
9622 Use char because int might match the return type of a GCC
9623 builtin and then its argument prototype would still apply. */
ba479fd2
NN
9624#ifdef __cplusplus
9625extern "C"
9626#endif
ba479fd2
NN
9627char exc_resume ();
9628int
9629main ()
9630{
ab22c1fa 9631return exc_resume ();
ba479fd2
NN
9632 ;
9633 return 0;
9634}
9635_ACEOF
ab22c1fa
CF
9636for ac_lib in '' exc; do
9637 if test -z "$ac_lib"; then
9638 ac_res="none required"
9639 else
9640 ac_res=-l$ac_lib
9641 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9642 fi
9643 rm -f conftest.$ac_objext conftest$ac_exeext
9644if { (ac_try="$ac_link"
9645case "(($ac_try" in
9646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9647 *) ac_try_echo=$ac_try;;
9648esac
9649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9650 (eval "$ac_link") 2>conftest.er1
ba479fd2 9651 ac_status=$?
86da66b5
HPN
9652 grep -v '^ *+' conftest.er1 >conftest.err
9653 rm -f conftest.er1
9654 cat conftest.err >&5
ba479fd2 9655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
9656 (exit $ac_status); } && {
9657 test -z "$ac_c_werror_flag" ||
9658 test ! -s conftest.err
9659 } && test -s conftest$ac_exeext &&
9660 $as_test_x conftest$ac_exeext; then
9661 ac_cv_search_exc_resume=$ac_res
7f2749d4 9662else
ba479fd2
NN
9663 echo "$as_me: failed program was:" >&5
9664sed 's/^/| /' conftest.$ac_ext >&5
9665
8b1f719a 9666
ab22c1fa 9667fi
a3bba767 9668
ab22c1fa
CF
9669rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9670 conftest$ac_exeext
9671 if test "${ac_cv_search_exc_resume+set}" = set; then
9672 break
a3bba767 9673fi
ab22c1fa
CF
9674done
9675if test "${ac_cv_search_exc_resume+set}" = set; then
9676 :
9677else
9678 ac_cv_search_exc_resume=no
b8ec3cc8 9679fi
ab22c1fa 9680rm conftest.$ac_ext
b8ec3cc8
EC
9681LIBS=$ac_func_search_save_LIBS
9682fi
ab22c1fa
CF
9683{ echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5
9684echo "${ECHO_T}$ac_cv_search_exc_resume" >&6; }
9685ac_res=$ac_cv_search_exc_resume
9686if test "$ac_res" != no; then
9687 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b8ec3cc8
EC
9688
9689fi
9690
dd7f7a6e 9691GNAT_LIBEXC="$LIBS"
b8ec3cc8
EC
9692LIBS="$save_LIBS"
9693
9694
dd7f7a6e
EC
9695# Some systems put ldexp and frexp in libm instead of libc; assume
9696# they're both in the same place. jcf-dump needs them.
9697save_LIBS="$LIBS"
9698LIBS=
ab22c1fa
CF
9699{ echo "$as_me:$LINENO: checking for library containing ldexp" >&5
9700echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6; }
dd7f7a6e 9701if test "${ac_cv_search_ldexp+set}" = set; then
b8ec3cc8
EC
9702 echo $ECHO_N "(cached) $ECHO_C" >&6
9703else
dd7f7a6e 9704 ac_func_search_save_LIBS=$LIBS
dd7f7a6e 9705cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9706/* confdefs.h. */
9707_ACEOF
9708cat confdefs.h >>conftest.$ac_ext
9709cat >>conftest.$ac_ext <<_ACEOF
9710/* end confdefs.h. */
dd7f7a6e 9711
ab22c1fa
CF
9712/* Override any GCC internal prototype to avoid an error.
9713 Use char because int might match the return type of a GCC
9714 builtin and then its argument prototype would still apply. */
dd7f7a6e
EC
9715#ifdef __cplusplus
9716extern "C"
9717#endif
dd7f7a6e 9718char ldexp ();
ba479fd2
NN
9719int
9720main ()
9721{
ab22c1fa 9722return ldexp ();
ba479fd2
NN
9723 ;
9724 return 0;
9725}
9726_ACEOF
ab22c1fa
CF
9727for ac_lib in '' m; do
9728 if test -z "$ac_lib"; then
9729 ac_res="none required"
9730 else
9731 ac_res=-l$ac_lib
9732 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9733 fi
9734 rm -f conftest.$ac_objext conftest$ac_exeext
9735if { (ac_try="$ac_link"
9736case "(($ac_try" in
9737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9738 *) ac_try_echo=$ac_try;;
9739esac
9740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9741 (eval "$ac_link") 2>conftest.er1
dd7f7a6e
EC
9742 ac_status=$?
9743 grep -v '^ *+' conftest.er1 >conftest.err
9744 rm -f conftest.er1
9745 cat conftest.err >&5
9746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
9747 (exit $ac_status); } && {
9748 test -z "$ac_c_werror_flag" ||
9749 test ! -s conftest.err
9750 } && test -s conftest$ac_exeext &&
9751 $as_test_x conftest$ac_exeext; then
9752 ac_cv_search_ldexp=$ac_res
dd7f7a6e
EC
9753else
9754 echo "$as_me: failed program was:" >&5
9755sed 's/^/| /' conftest.$ac_ext >&5
9756
8b1f719a 9757
ab22c1fa 9758fi
a3bba767 9759
ab22c1fa
CF
9760rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9761 conftest$ac_exeext
9762 if test "${ac_cv_search_ldexp+set}" = set; then
9763 break
a3bba767 9764fi
ab22c1fa
CF
9765done
9766if test "${ac_cv_search_ldexp+set}" = set; then
9767 :
9768else
9769 ac_cv_search_ldexp=no
dd7f7a6e 9770fi
ab22c1fa 9771rm conftest.$ac_ext
dd7f7a6e
EC
9772LIBS=$ac_func_search_save_LIBS
9773fi
ab22c1fa
CF
9774{ echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5
9775echo "${ECHO_T}$ac_cv_search_ldexp" >&6; }
9776ac_res=$ac_cv_search_ldexp
9777if test "$ac_res" != no; then
9778 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
dd7f7a6e
EC
9779
9780fi
9781
9782LDEXP_LIB="$LIBS"
9783LIBS="$save_LIBS"
9784
9785
9786# Use <inttypes.h> only if it exists,
9787# doesn't clash with <sys/types.h>, and declares intmax_t.
ab22c1fa
CF
9788{ echo "$as_me:$LINENO: checking for inttypes.h" >&5
9789echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6; }
dd7f7a6e
EC
9790if test "${gcc_cv_header_inttypes_h+set}" = set; then
9791 echo $ECHO_N "(cached) $ECHO_C" >&6
9792else
9793 cat >conftest.$ac_ext <<_ACEOF
9794/* confdefs.h. */
9795_ACEOF
9796cat confdefs.h >>conftest.$ac_ext
9797cat >>conftest.$ac_ext <<_ACEOF
9798/* end confdefs.h. */
9799#include <sys/types.h>
9800#include <inttypes.h>
9801int
9802main ()
9803{
9804intmax_t i = -1;
9805 ;
9806 return 0;
9807}
9808_ACEOF
9809rm -f conftest.$ac_objext
ab22c1fa
CF
9810if { (ac_try="$ac_compile"
9811case "(($ac_try" in
9812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9813 *) ac_try_echo=$ac_try;;
9814esac
9815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9816 (eval "$ac_compile") 2>conftest.er1
dd7f7a6e
EC
9817 ac_status=$?
9818 grep -v '^ *+' conftest.er1 >conftest.err
9819 rm -f conftest.er1
9820 cat conftest.err >&5
9821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
9822 (exit $ac_status); } && {
9823 test -z "$ac_c_werror_flag" ||
9824 test ! -s conftest.err
9825 } && test -s conftest.$ac_objext; then
dd7f7a6e
EC
9826 gcc_cv_header_inttypes_h=yes
9827else
9828 echo "$as_me: failed program was:" >&5
9829sed 's/^/| /' conftest.$ac_ext >&5
9830
ab22c1fa 9831 gcc_cv_header_inttypes_h=no
dd7f7a6e 9832fi
ab22c1fa
CF
9833
9834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
dd7f7a6e
EC
9835fi
9836
ab22c1fa
CF
9837{ echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5
9838echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6; }
dd7f7a6e
EC
9839if test $gcc_cv_header_inttypes_h = yes; then
9840
9841cat >>confdefs.h <<\_ACEOF
9842#define HAVE_INTTYPES_H 1
9843_ACEOF
9844
0056a9b5 9845fi
956d6950 9846
c149cc37 9847
ba479fd2
NN
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
0d667716
KG
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
ba479fd2
NN
9876
9877
9878
9879
9880
9881
9882
9883
52a6edcc 9884for ac_func in times clock kill getrlimit setrlimit atoll atoq \
0d667716
KG
9885 sysconf strsignal getrusage nl_langinfo scandir alphasort \
9886 gettimeofday mbstowcs wcswidth mmap mincore setlocale \
9887 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 9888do
ba479fd2 9889as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ab22c1fa
CF
9890{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9891echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9892if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2
NN
9893 echo $ECHO_N "(cached) $ECHO_C" >&6
9894else
9895 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9896/* confdefs.h. */
9897_ACEOF
9898cat confdefs.h >>conftest.$ac_ext
9899cat >>conftest.$ac_ext <<_ACEOF
9900/* end confdefs.h. */
86da66b5
HPN
9901/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9902 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9903#define $ac_func innocuous_$ac_func
9904
956d6950 9905/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
9906 which can conflict with char $ac_func (); below.
9907 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9908 <limits.h> exists even on freestanding compilers. */
86da66b5 9909
ba479fd2
NN
9910#ifdef __STDC__
9911# include <limits.h>
9912#else
9913# include <assert.h>
9914#endif
86da66b5
HPN
9915
9916#undef $ac_func
9917
ab22c1fa
CF
9918/* Override any GCC internal prototype to avoid an error.
9919 Use char because int might match the return type of a GCC
9920 builtin and then its argument prototype would still apply. */
ba479fd2
NN
9921#ifdef __cplusplus
9922extern "C"
ba479fd2 9923#endif
ba479fd2 9924char $ac_func ();
956d6950
JL
9925/* The GNU C library defines this for functions which it implements
9926 to always fail with ENOSYS. Some functions are actually named
9927 something starting with __ and the normal name is an alias. */
ab22c1fa 9928#if defined __stub_$ac_func || defined __stub___$ac_func
956d6950 9929choke me
956d6950
JL
9930#endif
9931
ba479fd2
NN
9932int
9933main ()
9934{
ab22c1fa 9935return $ac_func ();
ba479fd2
NN
9936 ;
9937 return 0;
9938}
9939_ACEOF
9940rm -f conftest.$ac_objext conftest$ac_exeext
ab22c1fa
CF
9941if { (ac_try="$ac_link"
9942case "(($ac_try" in
9943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9944 *) ac_try_echo=$ac_try;;
9945esac
9946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9947 (eval "$ac_link") 2>conftest.er1
ba479fd2 9948 ac_status=$?
86da66b5
HPN
9949 grep -v '^ *+' conftest.er1 >conftest.err
9950 rm -f conftest.er1
9951 cat conftest.err >&5
ba479fd2 9952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
9953 (exit $ac_status); } && {
9954 test -z "$ac_c_werror_flag" ||
9955 test ! -s conftest.err
9956 } && test -s conftest$ac_exeext &&
9957 $as_test_x conftest$ac_exeext; then
ba479fd2
NN
9958 eval "$as_ac_var=yes"
9959else
9960 echo "$as_me: failed program was:" >&5
9961sed 's/^/| /' conftest.$ac_ext >&5
9962
ab22c1fa 9963 eval "$as_ac_var=no"
ba479fd2 9964fi
ab22c1fa
CF
9965
9966rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
86da66b5 9967 conftest$ac_exeext conftest.$ac_ext
ba479fd2 9968fi
ab22c1fa
CF
9969ac_res=`eval echo '${'$as_ac_var'}'`
9970 { echo "$as_me:$LINENO: result: $ac_res" >&5
9971echo "${ECHO_T}$ac_res" >&6; }
ba479fd2
NN
9972if test `eval echo '${'$as_ac_var'}'` = yes; then
9973 cat >>confdefs.h <<_ACEOF
9974#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9975_ACEOF
956d6950 9976
956d6950
JL
9977fi
9978done
9979
6885fc87 9980
39f6c4c8 9981if test x$ac_cv_func_mbstowcs = xyes; then
ab22c1fa
CF
9982 { echo "$as_me:$LINENO: checking whether mbstowcs works" >&5
9983echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6; }
ba479fd2
NN
9984if test "${gcc_cv_func_mbstowcs_works+set}" = set; then
9985 echo $ECHO_N "(cached) $ECHO_C" >&6
39f6c4c8
KW
9986else
9987 if test "$cross_compiling" = yes; then
9988 gcc_cv_func_mbstowcs_works=yes
9989else
ba479fd2 9990 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
9991/* confdefs.h. */
9992_ACEOF
9993cat confdefs.h >>conftest.$ac_ext
9994cat >>conftest.$ac_ext <<_ACEOF
9995/* end confdefs.h. */
39f6c4c8
KW
9996#include <stdlib.h>
9997int main()
9998{
9999 mbstowcs(0, "", 0);
10000 return 0;
10001}
ba479fd2
NN
10002_ACEOF
10003rm -f conftest$ac_exeext
ab22c1fa
CF
10004if { (ac_try="$ac_link"
10005case "(($ac_try" in
10006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10007 *) ac_try_echo=$ac_try;;
10008esac
10009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10010 (eval "$ac_link") 2>&5
ba479fd2
NN
10011 ac_status=$?
10012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10013 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ab22c1fa
CF
10014 { (case "(($ac_try" in
10015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10016 *) ac_try_echo=$ac_try;;
10017esac
10018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10019 (eval "$ac_try") 2>&5
ba479fd2
NN
10020 ac_status=$?
10021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10022 (exit $ac_status); }; }; then
39f6c4c8
KW
10023 gcc_cv_func_mbstowcs_works=yes
10024else
ba479fd2
NN
10025 echo "$as_me: program exited with status $ac_status" >&5
10026echo "$as_me: failed program was:" >&5
10027sed 's/^/| /' conftest.$ac_ext >&5
10028
10029( exit $ac_status )
10030gcc_cv_func_mbstowcs_works=no
39f6c4c8 10031fi
ab22c1fa 10032rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
39f6c4c8 10033fi
ab22c1fa
CF
10034
10035
39f6c4c8 10036fi
ab22c1fa
CF
10037{ echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5
10038echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6; }
63cf211a 10039 if test x$gcc_cv_func_mbstowcs_works = xyes; then
ba479fd2
NN
10040
10041cat >>confdefs.h <<\_ACEOF
39f6c4c8 10042#define HAVE_WORKING_MBSTOWCS 1
ba479fd2 10043_ACEOF
39f6c4c8
KW
10044
10045 fi
10046fi
10047
ab22c1fa
CF
10048{ echo "$as_me:$LINENO: checking for ssize_t" >&5
10049echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
ba479fd2
NN
10050if test "${ac_cv_type_ssize_t+set}" = set; then
10051 echo $ECHO_N "(cached) $ECHO_C" >&6
63cf211a 10052else
ba479fd2 10053 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10054/* confdefs.h. */
10055_ACEOF
10056cat confdefs.h >>conftest.$ac_ext
10057cat >>conftest.$ac_ext <<_ACEOF
10058/* end confdefs.h. */
8b4fc07a 10059$ac_includes_default
ab22c1fa 10060typedef ssize_t ac__type_new_;
8b4fc07a
NN
10061int
10062main ()
10063{
ab22c1fa 10064if ((ac__type_new_ *) 0)
8b4fc07a 10065 return 0;
ab22c1fa 10066if (sizeof (ac__type_new_))
8b4fc07a
NN
10067 return 0;
10068 ;
10069 return 0;
10070}
ba479fd2 10071_ACEOF
8b4fc07a 10072rm -f conftest.$ac_objext
ab22c1fa
CF
10073if { (ac_try="$ac_compile"
10074case "(($ac_try" in
10075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10076 *) ac_try_echo=$ac_try;;
10077esac
10078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10079 (eval "$ac_compile") 2>conftest.er1
8b4fc07a 10080 ac_status=$?
86da66b5
HPN
10081 grep -v '^ *+' conftest.er1 >conftest.err
10082 rm -f conftest.er1
10083 cat conftest.err >&5
8b4fc07a 10084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
10085 (exit $ac_status); } && {
10086 test -z "$ac_c_werror_flag" ||
10087 test ! -s conftest.err
10088 } && test -s conftest.$ac_objext; then
cb65112a 10089 ac_cv_type_ssize_t=yes
f12bc141 10090else
8b4fc07a
NN
10091 echo "$as_me: failed program was:" >&5
10092sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 10093
ab22c1fa 10094 ac_cv_type_ssize_t=no
8b4fc07a 10095fi
ab22c1fa
CF
10096
10097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 10098fi
ab22c1fa
CF
10099{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
10100echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
8b4fc07a
NN
10101if test $ac_cv_type_ssize_t = yes; then
10102 :
10103else
ba479fd2 10104
8b4fc07a 10105cat >>confdefs.h <<_ACEOF
f12bc141 10106#define ssize_t int
ba479fd2 10107_ACEOF
f12bc141
ZW
10108
10109fi
10110
0b9d02c6 10111
e256b8b6
DA
10112# Try to determine the array type of the second argument of getgroups
10113# for the target system (int or gid_t).
ab22c1fa
CF
10114{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
10115echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
ba479fd2
NN
10116if test "${ac_cv_type_uid_t+set}" = set; then
10117 echo $ECHO_N "(cached) $ECHO_C" >&6
10118else
10119 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10120/* confdefs.h. */
10121_ACEOF
10122cat confdefs.h >>conftest.$ac_ext
10123cat >>conftest.$ac_ext <<_ACEOF
10124/* end confdefs.h. */
e256b8b6 10125#include <sys/types.h>
ba479fd2
NN
10126
10127_ACEOF
e256b8b6 10128if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 10129 $EGREP "uid_t" >/dev/null 2>&1; then
e256b8b6
DA
10130 ac_cv_type_uid_t=yes
10131else
e256b8b6
DA
10132 ac_cv_type_uid_t=no
10133fi
10134rm -f conftest*
10135
10136fi
ab22c1fa
CF
10137{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
10138echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
63cf211a 10139if test $ac_cv_type_uid_t = no; then
ba479fd2
NN
10140
10141cat >>confdefs.h <<\_ACEOF
e256b8b6 10142#define uid_t int
ba479fd2 10143_ACEOF
cafe096b 10144
ba479fd2
NN
10145
10146cat >>confdefs.h <<\_ACEOF
e256b8b6 10147#define gid_t int
ba479fd2 10148_ACEOF
e256b8b6
DA
10149
10150fi
10151
ab22c1fa
CF
10152{ echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
10153echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6; }
ba479fd2
NN
10154if test "${ac_cv_type_getgroups+set}" = set; then
10155 echo $ECHO_N "(cached) $ECHO_C" >&6
e256b8b6
DA
10156else
10157 if test "$cross_compiling" = yes; then
10158 ac_cv_type_getgroups=cross
10159else
ba479fd2 10160 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10161/* confdefs.h. */
10162_ACEOF
10163cat confdefs.h >>conftest.$ac_ext
10164cat >>conftest.$ac_ext <<_ACEOF
10165/* end confdefs.h. */
e256b8b6 10166/* Thanks to Mike Rendell for this test. */
ab22c1fa 10167$ac_includes_default
e256b8b6
DA
10168#define NGID 256
10169#undef MAX
10170#define MAX(x, y) ((x) > (y) ? (x) : (y))
ba479fd2
NN
10171
10172int
10173main ()
e256b8b6
DA
10174{
10175 gid_t gidset[NGID];
10176 int i, n;
ab22c1fa 10177 union { gid_t gval; long int lval; } val;
e256b8b6
DA
10178
10179 val.lval = -1;
10180 for (i = 0; i < NGID; i++)
10181 gidset[i] = val.gval;
10182 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
86da66b5 10183 gidset);
e256b8b6 10184 /* Exit non-zero if getgroups seems to require an array of ints. This
ab22c1fa
CF
10185 happens when gid_t is short int but getgroups modifies an array
10186 of ints. */
10187 return n > 0 && gidset[n] != val.gval;
63cf211a 10188}
ba479fd2
NN
10189_ACEOF
10190rm -f conftest$ac_exeext
ab22c1fa
CF
10191if { (ac_try="$ac_link"
10192case "(($ac_try" in
10193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10194 *) ac_try_echo=$ac_try;;
10195esac
10196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10197 (eval "$ac_link") 2>&5
ba479fd2
NN
10198 ac_status=$?
10199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10200 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ab22c1fa
CF
10201 { (case "(($ac_try" in
10202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10203 *) ac_try_echo=$ac_try;;
10204esac
10205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10206 (eval "$ac_try") 2>&5
ba479fd2
NN
10207 ac_status=$?
10208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10209 (exit $ac_status); }; }; then
10210 ac_cv_type_getgroups=gid_t
63cf211a 10211else
ba479fd2
NN
10212 echo "$as_me: program exited with status $ac_status" >&5
10213echo "$as_me: failed program was:" >&5
10214sed 's/^/| /' conftest.$ac_ext >&5
10215
10216( exit $ac_status )
10217ac_cv_type_getgroups=int
e256b8b6 10218fi
ab22c1fa 10219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
e256b8b6 10220fi
ab22c1fa
CF
10221
10222
e256b8b6 10223if test $ac_cv_type_getgroups = cross; then
ba479fd2 10224 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10225/* confdefs.h. */
10226_ACEOF
10227cat confdefs.h >>conftest.$ac_ext
10228cat >>conftest.$ac_ext <<_ACEOF
10229/* end confdefs.h. */
e256b8b6 10230#include <unistd.h>
ba479fd2
NN
10231
10232_ACEOF
e256b8b6 10233if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ba479fd2 10234 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
e256b8b6
DA
10235 ac_cv_type_getgroups=gid_t
10236else
e256b8b6
DA
10237 ac_cv_type_getgroups=int
10238fi
10239rm -f conftest*
10240
10241fi
10242fi
ab22c1fa
CF
10243{ echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
10244echo "${ECHO_T}$ac_cv_type_getgroups" >&6; }
e256b8b6 10245
ba479fd2 10246cat >>confdefs.h <<_ACEOF
e256b8b6 10247#define GETGROUPS_T $ac_cv_type_getgroups
ba479fd2 10248_ACEOF
e256b8b6
DA
10249
10250
10251if test "${target}" = "${build}"; then
10252 TARGET_GETGROUPS_T=$ac_cv_type_getgroups
10253else
10254 case "${target}" in
10255 # This condition may need some tweaking. It should include all
10256 # targets where the array type of the second argument of getgroups
10257 # is int and the type of gid_t is not equivalent to int.
10258 *-*-sunos* | *-*-ultrix*)
10259 TARGET_GETGROUPS_T=int
10260 ;;
10261 *)
10262 TARGET_GETGROUPS_T=gid_t
10263 ;;
10264 esac
10265fi
10266
10267
3b0727a0 10268
ab22c1fa
CF
10269{ echo "$as_me:$LINENO: checking for sys/mman.h" >&5
10270echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6; }
3b0727a0
MR
10271if test "${ac_cv_header_sys_mman_h+set}" = set; then
10272 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 10273else
18fc9bd4 10274 cat >conftest.$ac_ext <<_ACEOF
3b0727a0
MR
10275/* confdefs.h. */
10276_ACEOF
10277cat confdefs.h >>conftest.$ac_ext
10278cat >>conftest.$ac_ext <<_ACEOF
10279/* end confdefs.h. */
10280#include <sys/mman.h>
10281_ACEOF
ab22c1fa
CF
10282if { (ac_try="$ac_cpp conftest.$ac_ext"
10283case "(($ac_try" in
10284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10285 *) ac_try_echo=$ac_try;;
10286esac
10287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10288 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3b0727a0
MR
10289 ac_status=$?
10290 grep -v '^ *+' conftest.er1 >conftest.err
10291 rm -f conftest.er1
10292 cat conftest.err >&5
10293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
10294 (exit $ac_status); } >/dev/null && {
10295 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10296 test ! -s conftest.err
10297 }; then
18fc9bd4 10298 ac_cv_header_sys_mman_h=yes
3b0727a0
MR
10299else
10300 echo "$as_me: failed program was:" >&5
10301sed 's/^/| /' conftest.$ac_ext >&5
10302
18fc9bd4 10303 ac_cv_header_sys_mman_h=no
3b0727a0 10304fi
ab22c1fa 10305
3b0727a0
MR
10306rm -f conftest.err conftest.$ac_ext
10307fi
ab22c1fa
CF
10308{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
10309echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6; }
3b0727a0
MR
10310if test $ac_cv_header_sys_mman_h = yes; then
10311 gcc_header_sys_mman_h=yes
10312else
10313 gcc_header_sys_mman_h=no
10314fi
10315
ab22c1fa
CF
10316{ echo "$as_me:$LINENO: checking for mmap" >&5
10317echo $ECHO_N "checking for mmap... $ECHO_C" >&6; }
3b0727a0
MR
10318if test "${ac_cv_func_mmap+set}" = set; then
10319 echo $ECHO_N "(cached) $ECHO_C" >&6
10320else
10321 cat >conftest.$ac_ext <<_ACEOF
10322/* confdefs.h. */
10323_ACEOF
10324cat confdefs.h >>conftest.$ac_ext
10325cat >>conftest.$ac_ext <<_ACEOF
10326/* end confdefs.h. */
10327/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
10328 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10329#define mmap innocuous_mmap
10330
10331/* System header to define __stub macros and hopefully few prototypes,
10332 which can conflict with char mmap (); below.
10333 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10334 <limits.h> exists even on freestanding compilers. */
10335
10336#ifdef __STDC__
10337# include <limits.h>
10338#else
10339# include <assert.h>
10340#endif
10341
10342#undef mmap
10343
ab22c1fa
CF
10344/* Override any GCC internal prototype to avoid an error.
10345 Use char because int might match the return type of a GCC
10346 builtin and then its argument prototype would still apply. */
3b0727a0
MR
10347#ifdef __cplusplus
10348extern "C"
3b0727a0 10349#endif
3b0727a0
MR
10350char mmap ();
10351/* The GNU C library defines this for functions which it implements
10352 to always fail with ENOSYS. Some functions are actually named
10353 something starting with __ and the normal name is an alias. */
ab22c1fa 10354#if defined __stub_mmap || defined __stub___mmap
3b0727a0 10355choke me
3b0727a0
MR
10356#endif
10357
10358int
10359main ()
10360{
ab22c1fa 10361return mmap ();
3b0727a0
MR
10362 ;
10363 return 0;
10364}
10365_ACEOF
10366rm -f conftest.$ac_objext conftest$ac_exeext
ab22c1fa
CF
10367if { (ac_try="$ac_link"
10368case "(($ac_try" in
10369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10370 *) ac_try_echo=$ac_try;;
10371esac
10372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10373 (eval "$ac_link") 2>conftest.er1
3b0727a0
MR
10374 ac_status=$?
10375 grep -v '^ *+' conftest.er1 >conftest.err
10376 rm -f conftest.er1
10377 cat conftest.err >&5
10378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
10379 (exit $ac_status); } && {
10380 test -z "$ac_c_werror_flag" ||
10381 test ! -s conftest.err
10382 } && test -s conftest$ac_exeext &&
10383 $as_test_x conftest$ac_exeext; then
8b1f719a
PB
10384 ac_cv_func_mmap=yes
10385else
10386 echo "$as_me: failed program was:" >&5
10387sed 's/^/| /' conftest.$ac_ext >&5
a6ccdbab 10388
ab22c1fa 10389 ac_cv_func_mmap=no
8b1f719a 10390fi
ab22c1fa
CF
10391
10392rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3b0727a0
MR
10393 conftest$ac_exeext conftest.$ac_ext
10394fi
ab22c1fa
CF
10395{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
10396echo "${ECHO_T}$ac_cv_func_mmap" >&6; }
3b0727a0
MR
10397if test $ac_cv_func_mmap = yes; then
10398 gcc_func_mmap=yes
10399else
10400 gcc_func_mmap=no
10401fi
10402
10403if test "$gcc_header_sys_mman_h" != yes \
10404 || test "$gcc_func_mmap" != yes; then
1072ec3f
ZW
10405 gcc_cv_func_mmap_file=no
10406 gcc_cv_func_mmap_dev_zero=no
10407 gcc_cv_func_mmap_anon=no
10408else
ab22c1fa
CF
10409 { echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
10410echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6; }
ba479fd2
NN
10411if test "${gcc_cv_func_mmap_file+set}" = set; then
10412 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f 10413else
ba479fd2 10414 # Add a system to this blacklist if
1072ec3f
ZW
10415 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
10416 # memory area containing the same data that you'd get if you applied
10417 # read() to the same fd. The only system known to have a problem here
10418 # is VMS, where text files have record structure.
10419 case "$host_os" in
ba479fd2 10420 vms* | ultrix*)
1072ec3f
ZW
10421 gcc_cv_func_mmap_file=no ;;
10422 *)
10423 gcc_cv_func_mmap_file=yes;;
10424 esac
10425fi
ab22c1fa
CF
10426{ echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
10427echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6; }
10428 { echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
10429echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6; }
ba479fd2
NN
10430if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
10431 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
10432else
10433 # Add a system to this blacklist if it has mmap() but /dev/zero
10434 # does not exist, or if mmapping /dev/zero does not give anonymous
10435 # zeroed pages with both the following properties:
10436 # 1. If you map N consecutive pages in with one call, and then
10437 # unmap any subset of those pages, the pages that were not
10438 # explicitly unmapped remain accessible.
10439 # 2. If you map two adjacent blocks of memory and then unmap them
10440 # both at once, they must both go away.
10441 # Systems known to be in this category are Windows (all variants),
10442 # VMS, and Darwin.
10443 case "$host_os" in
2ce240d3 10444 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
1072ec3f
ZW
10445 gcc_cv_func_mmap_dev_zero=no ;;
10446 *)
10447 gcc_cv_func_mmap_dev_zero=yes;;
10448 esac
10449fi
ab22c1fa
CF
10450{ echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
10451echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6; }
1072ec3f
ZW
10452
10453 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
ab22c1fa
CF
10454 { echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
10455echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6; }
ba479fd2
NN
10456if test "${gcc_cv_decl_map_anon+set}" = set; then
10457 echo $ECHO_N "(cached) $ECHO_C" >&6
10458else
10459 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10460/* confdefs.h. */
10461_ACEOF
10462cat confdefs.h >>conftest.$ac_ext
10463cat >>conftest.$ac_ext <<_ACEOF
10464/* end confdefs.h. */
1072ec3f
ZW
10465#include <sys/types.h>
10466#include <sys/mman.h>
10467#include <unistd.h>
10468
10469#ifndef MAP_ANONYMOUS
10470#define MAP_ANONYMOUS MAP_ANON
10471#endif
10472
ba479fd2
NN
10473int
10474main ()
10475{
1072ec3f 10476int n = MAP_ANONYMOUS;
ba479fd2
NN
10477 ;
10478 return 0;
10479}
10480_ACEOF
10481rm -f conftest.$ac_objext
ab22c1fa
CF
10482if { (ac_try="$ac_compile"
10483case "(($ac_try" in
10484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10485 *) ac_try_echo=$ac_try;;
10486esac
10487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10488 (eval "$ac_compile") 2>conftest.er1
ba479fd2 10489 ac_status=$?
86da66b5
HPN
10490 grep -v '^ *+' conftest.er1 >conftest.err
10491 rm -f conftest.er1
10492 cat conftest.err >&5
ba479fd2 10493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
10494 (exit $ac_status); } && {
10495 test -z "$ac_c_werror_flag" ||
10496 test ! -s conftest.err
10497 } && test -s conftest.$ac_objext; then
1072ec3f
ZW
10498 gcc_cv_decl_map_anon=yes
10499else
ba479fd2
NN
10500 echo "$as_me: failed program was:" >&5
10501sed 's/^/| /' conftest.$ac_ext >&5
10502
ab22c1fa 10503 gcc_cv_decl_map_anon=no
1072ec3f 10504fi
ab22c1fa
CF
10505
10506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1072ec3f 10507fi
ab22c1fa
CF
10508{ echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
10509echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6; }
1072ec3f
ZW
10510
10511 if test $gcc_cv_decl_map_anon = no; then
10512 gcc_cv_func_mmap_anon=no
10513 else
ab22c1fa
CF
10514 { echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
10515echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6; }
ba479fd2
NN
10516if test "${gcc_cv_func_mmap_anon+set}" = set; then
10517 echo $ECHO_N "(cached) $ECHO_C" >&6
1072ec3f
ZW
10518else
10519 # Add a system to this blacklist if it has mmap() and MAP_ANON or
10520 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
10521 # doesn't give anonymous zeroed pages with the same properties listed
10522 # above for use of /dev/zero.
10523 # Systems known to be in this category are Windows, VMS, and SCO Unix.
10524 case "$host_os" in
10525 vms* | cygwin* | pe | mingw* | sco* | udk* )
10526 gcc_cv_func_mmap_anon=no ;;
10527 *)
10528 gcc_cv_func_mmap_anon=yes;;
10529 esac
10530fi
ab22c1fa
CF
10531{ echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
10532echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6; }
1072ec3f
ZW
10533 fi
10534fi
10535
10536if test $gcc_cv_func_mmap_file = yes; then
ba479fd2
NN
10537
10538cat >>confdefs.h <<\_ACEOF
1072ec3f 10539#define HAVE_MMAP_FILE 1
ba479fd2 10540_ACEOF
1072ec3f
ZW
10541
10542fi
10543if test $gcc_cv_func_mmap_dev_zero = yes; then
ba479fd2
NN
10544
10545cat >>confdefs.h <<\_ACEOF
1072ec3f 10546#define HAVE_MMAP_DEV_ZERO 1
ba479fd2 10547_ACEOF
1072ec3f
ZW
10548
10549fi
10550if test $gcc_cv_func_mmap_anon = yes; then
ba479fd2
NN
10551
10552cat >>confdefs.h <<\_ACEOF
1072ec3f 10553#define HAVE_MMAP_ANON 1
ba479fd2 10554_ACEOF
1072ec3f
ZW
10555
10556fi
10557
b27d2bd5
MK
10558
10559case "${host}" in
ee262b6f 10560*-*-*vms*)
ba479fd2 10561 # Under VMS, vfork works very differently than on Unix. The standard test
ee262b6f
DR
10562 # won't work, and it isn't easily adaptable. It makes more sense to
10563 # just force it.
10564 ac_cv_func_vfork_works=yes
10565 ;;
b27d2bd5 10566esac
ab22c1fa
CF
10567{ echo "$as_me:$LINENO: checking for pid_t" >&5
10568echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
ba479fd2
NN
10569if test "${ac_cv_type_pid_t+set}" = set; then
10570 echo $ECHO_N "(cached) $ECHO_C" >&6
10571else
10572 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10573/* confdefs.h. */
10574_ACEOF
10575cat confdefs.h >>conftest.$ac_ext
10576cat >>conftest.$ac_ext <<_ACEOF
10577/* end confdefs.h. */
10578$ac_includes_default
ab22c1fa 10579typedef pid_t ac__type_new_;
ba479fd2
NN
10580int
10581main ()
10582{
ab22c1fa 10583if ((ac__type_new_ *) 0)
ba479fd2 10584 return 0;
ab22c1fa 10585if (sizeof (ac__type_new_))
ba479fd2
NN
10586 return 0;
10587 ;
10588 return 0;
10589}
10590_ACEOF
10591rm -f conftest.$ac_objext
ab22c1fa
CF
10592if { (ac_try="$ac_compile"
10593case "(($ac_try" in
10594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10595 *) ac_try_echo=$ac_try;;
10596esac
10597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10598 (eval "$ac_compile") 2>conftest.er1
ba479fd2 10599 ac_status=$?
86da66b5
HPN
10600 grep -v '^ *+' conftest.er1 >conftest.err
10601 rm -f conftest.er1
10602 cat conftest.err >&5
ba479fd2 10603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
10604 (exit $ac_status); } && {
10605 test -z "$ac_c_werror_flag" ||
10606 test ! -s conftest.err
10607 } && test -s conftest.$ac_objext; then
cb65112a 10608 ac_cv_type_pid_t=yes
c375c43b 10609else
ba479fd2
NN
10610 echo "$as_me: failed program was:" >&5
10611sed 's/^/| /' conftest.$ac_ext >&5
6e3f3080 10612
ab22c1fa 10613 ac_cv_type_pid_t=no
ba479fd2 10614fi
ab22c1fa
CF
10615
10616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
63cf211a 10617fi
ab22c1fa
CF
10618{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10619echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
ba479fd2
NN
10620if test $ac_cv_type_pid_t = yes; then
10621 :
10622else
10623
10624cat >>confdefs.h <<_ACEOF
c375c43b 10625#define pid_t int
ba479fd2 10626_ACEOF
c375c43b
KG
10627
10628fi
10629
ba479fd2 10630
ab22c1fa 10631for ac_header in vfork.h
ba479fd2
NN
10632do
10633as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ab22c1fa
CF
10634{ echo "$as_me:$LINENO: checking for $ac_header" >&5
10635echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10636if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2 10637 echo $ECHO_N "(cached) $ECHO_C" >&6
0f57bf40 10638else
18fc9bd4 10639 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10640/* confdefs.h. */
10641_ACEOF
10642cat confdefs.h >>conftest.$ac_ext
10643cat >>conftest.$ac_ext <<_ACEOF
10644/* end confdefs.h. */
10645#include <$ac_header>
10646_ACEOF
ab22c1fa
CF
10647if { (ac_try="$ac_cpp conftest.$ac_ext"
10648case "(($ac_try" in
10649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10650 *) ac_try_echo=$ac_try;;
10651esac
10652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10653 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ba479fd2
NN
10654 ac_status=$?
10655 grep -v '^ *+' conftest.er1 >conftest.err
10656 rm -f conftest.er1
10657 cat conftest.err >&5
10658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
10659 (exit $ac_status); } >/dev/null && {
10660 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10661 test ! -s conftest.err
10662 }; then
18fc9bd4 10663 eval "$as_ac_Header=yes"
ba479fd2
NN
10664else
10665 echo "$as_me: failed program was:" >&5
10666sed 's/^/| /' conftest.$ac_ext >&5
10667
18fc9bd4 10668 eval "$as_ac_Header=no"
ba479fd2 10669fi
ab22c1fa 10670
ba479fd2 10671rm -f conftest.err conftest.$ac_ext
c375c43b 10672fi
ab22c1fa
CF
10673ac_res=`eval echo '${'$as_ac_Header'}'`
10674 { echo "$as_me:$LINENO: result: $ac_res" >&5
10675echo "${ECHO_T}$ac_res" >&6; }
ba479fd2
NN
10676if test `eval echo '${'$as_ac_Header'}'` = yes; then
10677 cat >>confdefs.h <<_ACEOF
10678#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10679_ACEOF
6e3f3080
NN
10680
10681fi
ba479fd2
NN
10682done
10683
10684
10685
10686for ac_func in fork vfork
10687do
10688as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ab22c1fa
CF
10689{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10690echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10691if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2
NN
10692 echo $ECHO_N "(cached) $ECHO_C" >&6
10693else
10694 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10695/* confdefs.h. */
10696_ACEOF
10697cat confdefs.h >>conftest.$ac_ext
10698cat >>conftest.$ac_ext <<_ACEOF
10699/* end confdefs.h. */
86da66b5
HPN
10700/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10701 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10702#define $ac_func innocuous_$ac_func
10703
c375c43b 10704/* System header to define __stub macros and hopefully few prototypes,
ba479fd2
NN
10705 which can conflict with char $ac_func (); below.
10706 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10707 <limits.h> exists even on freestanding compilers. */
86da66b5 10708
ba479fd2
NN
10709#ifdef __STDC__
10710# include <limits.h>
10711#else
10712# include <assert.h>
10713#endif
86da66b5
HPN
10714
10715#undef $ac_func
10716
ab22c1fa
CF
10717/* Override any GCC internal prototype to avoid an error.
10718 Use char because int might match the return type of a GCC
10719 builtin and then its argument prototype would still apply. */
ba479fd2
NN
10720#ifdef __cplusplus
10721extern "C"
ba479fd2 10722#endif
ba479fd2 10723char $ac_func ();
c375c43b
KG
10724/* The GNU C library defines this for functions which it implements
10725 to always fail with ENOSYS. Some functions are actually named
10726 something starting with __ and the normal name is an alias. */
ab22c1fa 10727#if defined __stub_$ac_func || defined __stub___$ac_func
c375c43b 10728choke me
c375c43b
KG
10729#endif
10730
ba479fd2
NN
10731int
10732main ()
10733{
ab22c1fa 10734return $ac_func ();
ba479fd2
NN
10735 ;
10736 return 0;
10737}
10738_ACEOF
10739rm -f conftest.$ac_objext conftest$ac_exeext
ab22c1fa
CF
10740if { (ac_try="$ac_link"
10741case "(($ac_try" in
10742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10743 *) ac_try_echo=$ac_try;;
10744esac
10745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10746 (eval "$ac_link") 2>conftest.er1
ba479fd2 10747 ac_status=$?
86da66b5
HPN
10748 grep -v '^ *+' conftest.er1 >conftest.err
10749 rm -f conftest.er1
10750 cat conftest.err >&5
ba479fd2 10751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
10752 (exit $ac_status); } && {
10753 test -z "$ac_c_werror_flag" ||
10754 test ! -s conftest.err
10755 } && test -s conftest$ac_exeext &&
10756 $as_test_x conftest$ac_exeext; then
ba479fd2
NN
10757 eval "$as_ac_var=yes"
10758else
10759 echo "$as_me: failed program was:" >&5
10760sed 's/^/| /' conftest.$ac_ext >&5
10761
ab22c1fa 10762 eval "$as_ac_var=no"
ba479fd2 10763fi
ab22c1fa
CF
10764
10765rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
86da66b5 10766 conftest$ac_exeext conftest.$ac_ext
ba479fd2 10767fi
ab22c1fa
CF
10768ac_res=`eval echo '${'$as_ac_var'}'`
10769 { echo "$as_me:$LINENO: result: $ac_res" >&5
10770echo "${ECHO_T}$ac_res" >&6; }
ba479fd2
NN
10771if test `eval echo '${'$as_ac_var'}'` = yes; then
10772 cat >>confdefs.h <<_ACEOF
10773#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10774_ACEOF
10775
c375c43b 10776fi
ba479fd2 10777done
c375c43b 10778
ba479fd2 10779if test "x$ac_cv_func_fork" = xyes; then
ab22c1fa
CF
10780 { echo "$as_me:$LINENO: checking for working fork" >&5
10781echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
ba479fd2
NN
10782if test "${ac_cv_func_fork_works+set}" = set; then
10783 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10784else
ba479fd2
NN
10785 if test "$cross_compiling" = yes; then
10786 ac_cv_func_fork_works=cross
10787else
10788 cat >conftest.$ac_ext <<_ACEOF
ab22c1fa
CF
10789/* confdefs.h. */
10790_ACEOF
10791cat confdefs.h >>conftest.$ac_ext
10792cat >>conftest.$ac_ext <<_ACEOF
10793/* end confdefs.h. */
10794$ac_includes_default
10795int
10796main ()
10797{
10798
10799 /* By Ruediger Kuhlmann. */
10800 return fork () < 0;
10801
10802 ;
10803 return 0;
10804}
ba479fd2
NN
10805_ACEOF
10806rm -f conftest$ac_exeext
ab22c1fa
CF
10807if { (ac_try="$ac_link"
10808case "(($ac_try" in
10809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10810 *) ac_try_echo=$ac_try;;
10811esac
10812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10813 (eval "$ac_link") 2>&5
ba479fd2
NN
10814 ac_status=$?
10815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10816 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ab22c1fa
CF
10817 { (case "(($ac_try" in
10818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10819 *) ac_try_echo=$ac_try;;
10820esac
10821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10822 (eval "$ac_try") 2>&5
ba479fd2
NN
10823 ac_status=$?
10824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10825 (exit $ac_status); }; }; then
10826 ac_cv_func_fork_works=yes
10827else
10828 echo "$as_me: program exited with status $ac_status" >&5
10829echo "$as_me: failed program was:" >&5
10830sed 's/^/| /' conftest.$ac_ext >&5
10831
10832( exit $ac_status )
10833ac_cv_func_fork_works=no
10834fi
ab22c1fa 10835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba479fd2 10836fi
ab22c1fa
CF
10837
10838
ba479fd2 10839fi
ab22c1fa
CF
10840{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
10841echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
ba479fd2
NN
10842
10843else
10844 ac_cv_func_fork_works=$ac_cv_func_fork
10845fi
10846if test "x$ac_cv_func_fork_works" = xcross; then
10847 case $host in
10848 *-*-amigaos* | *-*-msdosdjgpp*)
10849 # Override, as these systems have only a dummy fork() stub
10850 ac_cv_func_fork_works=no
10851 ;;
10852 *)
10853 ac_cv_func_fork_works=yes
10854 ;;
10855 esac
10856 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
10857echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
c375c43b 10858fi
c375c43b 10859ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2 10860if test "x$ac_cv_func_vfork" = xyes; then
ab22c1fa
CF
10861 { echo "$as_me:$LINENO: checking for working vfork" >&5
10862echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
ba479fd2
NN
10863if test "${ac_cv_func_vfork_works+set}" = set; then
10864 echo $ECHO_N "(cached) $ECHO_C" >&6
c375c43b 10865else
ba479fd2
NN
10866 if test "$cross_compiling" = yes; then
10867 ac_cv_func_vfork_works=cross
10868else
10869 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
10870/* confdefs.h. */
10871_ACEOF
10872cat confdefs.h >>conftest.$ac_ext
10873cat >>conftest.$ac_ext <<_ACEOF
10874/* end confdefs.h. */
c375c43b 10875/* Thanks to Paul Eggert for this test. */
ab22c1fa 10876$ac_includes_default
ba479fd2 10877#include <sys/wait.h>
ab22c1fa 10878#ifdef HAVE_VFORK_H
ba479fd2 10879# include <vfork.h>
c375c43b
KG
10880#endif
10881/* On some sparc systems, changes by the child to local and incoming
ba479fd2
NN
10882 argument registers are propagated back to the parent. The compiler
10883 is told about this with #include <vfork.h>, but some compilers
10884 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
10885 static variable whose address is put into a register that is
10886 clobbered by the vfork. */
10887static void
c375c43b
KG
10888#ifdef __cplusplus
10889sparc_address_test (int arg)
ba479fd2 10890# else
c375c43b
KG
10891sparc_address_test (arg) int arg;
10892#endif
10893{
10894 static pid_t child;
10895 if (!child) {
10896 child = vfork ();
10897 if (child < 0) {
10898 perror ("vfork");
10899 _exit(2);
10900 }
10901 if (!child) {
10902 arg = getpid();
10903 write(-1, "", 0);
10904 _exit (arg);
10905 }
10906 }
10907}
ba479fd2
NN
10908
10909int
10910main ()
10911{
c375c43b
KG
10912 pid_t parent = getpid ();
10913 pid_t child;
10914
ba479fd2 10915 sparc_address_test (0);
c375c43b
KG
10916
10917 child = vfork ();
10918
10919 if (child == 0) {
ba479fd2
NN
10920 /* Here is another test for sparc vfork register problems. This
10921 test uses lots of local variables, at least as many local
10922 variables as main has allocated so far including compiler
10923 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
10924 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
10925 reuse the register of parent for one of the local variables,
10926 since it will think that parent can't possibly be used any more
10927 in this routine. Assigning to the local variable will thus
10928 munge parent in the parent process. */
c375c43b
KG
10929 pid_t
10930 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10931 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10932 /* Convince the compiler that p..p7 are live; otherwise, it might
10933 use the same hardware register for all 8 local variables. */
10934 if (p != p1 || p != p2 || p != p3 || p != p4
10935 || p != p5 || p != p6 || p != p7)
10936 _exit(1);
10937
ba479fd2
NN
10938 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
10939 from child file descriptors. If the child closes a descriptor
10940 before it execs or exits, this munges the parent's descriptor
10941 as well. Test for this by closing stdout in the child. */
c375c43b
KG
10942 _exit(close(fileno(stdout)) != 0);
10943 } else {
10944 int status;
10945 struct stat st;
10946
10947 while (wait(&status) != child)
10948 ;
ab22c1fa 10949 return (
c375c43b
KG
10950 /* Was there some problem with vforking? */
10951 child < 0
10952
10953 /* Did the child fail? (This shouldn't happen.) */
10954 || status
10955
10956 /* Did the vfork/compiler bug occur? */
10957 || parent != getpid()
10958
10959 /* Did the file descriptor bug occur? */
10960 || fstat(fileno(stdout), &st) != 0
10961 );
10962 }
10963}
ba479fd2
NN
10964_ACEOF
10965rm -f conftest$ac_exeext
ab22c1fa
CF
10966if { (ac_try="$ac_link"
10967case "(($ac_try" in
10968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10969 *) ac_try_echo=$ac_try;;
10970esac
10971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10972 (eval "$ac_link") 2>&5
ba479fd2
NN
10973 ac_status=$?
10974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10975 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ab22c1fa
CF
10976 { (case "(($ac_try" in
10977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10978 *) ac_try_echo=$ac_try;;
10979esac
10980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10981 (eval "$ac_try") 2>&5
ba479fd2
NN
10982 ac_status=$?
10983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10984 (exit $ac_status); }; }; then
c375c43b
KG
10985 ac_cv_func_vfork_works=yes
10986else
ba479fd2
NN
10987 echo "$as_me: program exited with status $ac_status" >&5
10988echo "$as_me: failed program was:" >&5
10989sed 's/^/| /' conftest.$ac_ext >&5
10990
10991( exit $ac_status )
10992ac_cv_func_vfork_works=no
cafe096b 10993fi
ab22c1fa 10994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6e3f3080 10995fi
ab22c1fa
CF
10996
10997
ba479fd2 10998fi
ab22c1fa
CF
10999{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
11000echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
c375c43b 11001
ba479fd2
NN
11002fi;
11003if test "x$ac_cv_func_fork_works" = xcross; then
86da66b5 11004 ac_cv_func_vfork_works=$ac_cv_func_vfork
ba479fd2
NN
11005 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
11006echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
c375c43b
KG
11007fi
11008
ba479fd2
NN
11009if test "x$ac_cv_func_vfork_works" = xyes; then
11010
11011cat >>confdefs.h <<\_ACEOF
11012#define HAVE_WORKING_VFORK 1
11013_ACEOF
11014
11015else
11016
11017cat >>confdefs.h <<\_ACEOF
c375c43b 11018#define vfork fork
ba479fd2 11019_ACEOF
c375c43b
KG
11020
11021fi
ba479fd2
NN
11022if test "x$ac_cv_func_fork_works" = xyes; then
11023
11024cat >>confdefs.h <<\_ACEOF
11025#define HAVE_WORKING_FORK 1
11026_ACEOF
11027
11028fi
11029
c375c43b 11030
81bf3d9e 11031
dfb77e37
KC
11032 if test "X$prefix" = "XNONE"; then
11033 acl_final_prefix="$ac_default_prefix"
11034 else
11035 acl_final_prefix="$prefix"
11036 fi
11037 if test "X$exec_prefix" = "XNONE"; then
11038 acl_final_exec_prefix='${prefix}'
11039 else
11040 acl_final_exec_prefix="$exec_prefix"
11041 fi
11042 acl_save_prefix="$prefix"
11043 prefix="$acl_final_prefix"
11044 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
11045 prefix="$acl_save_prefix"
f91abfce
TT
11046
11047
ab22c1fa 11048# Check whether --with-gnu-ld was given.
dfb77e37 11049if test "${with_gnu_ld+set}" = set; then
ab22c1fa 11050 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
ba479fd2 11051else
dfb77e37 11052 with_gnu_ld=no
ab22c1fa
CF
11053fi
11054
dfb77e37
KC
11055# Prepare PATH_SEPARATOR.
11056# The user is always right.
11057if test "${PATH_SEPARATOR+set}" != set; then
11058 echo "#! /bin/sh" >conf$$.sh
11059 echo "exit 0" >>conf$$.sh
11060 chmod +x conf$$.sh
11061 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11062 PATH_SEPARATOR=';'
ba479fd2 11063 else
dfb77e37 11064 PATH_SEPARATOR=:
ba479fd2 11065 fi
dfb77e37
KC
11066 rm -f conf$$.sh
11067fi
11068ac_prog=ld
11069if test "$GCC" = yes; then
11070 # Check if gcc -print-prog-name=ld gives a path.
ab22c1fa
CF
11071 { echo "$as_me:$LINENO: checking for ld used by GCC" >&5
11072echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; }
dfb77e37
KC
11073 case $host in
11074 *-*-mingw*)
11075 # gcc leaves a trailing carriage return which upsets mingw
11076 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
11077 *)
11078 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
11079 esac
11080 case $ac_prog in
11081 # Accept absolute paths.
11082 [\\/]* | [A-Za-z]:[\\/]*)
11083 re_direlt='/[^/][^/]*/\.\./'
11084 # Canonicalize the path of ld
11085 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
11086 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
11087 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
11088 done
11089 test -z "$LD" && LD="$ac_prog"
11090 ;;
11091 "")
11092 # If it fails, then pretend we aren't using GCC.
11093 ac_prog=ld
11094 ;;
11095 *)
11096 # If it is relative, then search for the first ld in PATH.
11097 with_gnu_ld=unknown
11098 ;;
11099 esac
11100elif test "$with_gnu_ld" = yes; then
ab22c1fa
CF
11101 { echo "$as_me:$LINENO: checking for GNU ld" >&5
11102echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
ba479fd2 11103else
ab22c1fa
CF
11104 { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
11105echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
ba479fd2 11106fi
dfb77e37
KC
11107if test "${acl_cv_path_LD+set}" = set; then
11108 echo $ECHO_N "(cached) $ECHO_C" >&6
ba479fd2 11109else
dfb77e37
KC
11110 if test -z "$LD"; then
11111 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
11112 for ac_dir in $PATH; do
11113 test -z "$ac_dir" && ac_dir=.
11114 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
11115 acl_cv_path_LD="$ac_dir/$ac_prog"
11116 # Check to see if the program is GNU ld. I'd rather use --version,
11117 # but apparently some GNU ld's only accept -v.
11118 # Break only if it was the GNU/non-GNU ld that we prefer.
18fc9bd4
RG
11119 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
11120 test "$with_gnu_ld" != no && break
11121 else
11122 test "$with_gnu_ld" != yes && break
11123 fi
dfb77e37
KC
11124 fi
11125 done
11126 IFS="$ac_save_ifs"
11127else
11128 acl_cv_path_LD="$LD" # Let the user override the test with a path.
11129fi
11130fi
ba479fd2 11131
dfb77e37
KC
11132LD="$acl_cv_path_LD"
11133if test -n "$LD"; then
ab22c1fa
CF
11134 { echo "$as_me:$LINENO: result: $LD" >&5
11135echo "${ECHO_T}$LD" >&6; }
dfb77e37 11136else
ab22c1fa
CF
11137 { echo "$as_me:$LINENO: result: no" >&5
11138echo "${ECHO_T}no" >&6; }
ba479fd2 11139fi
dfb77e37
KC
11140test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
11141echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
11142 { (exit 1); exit 1; }; }
ab22c1fa
CF
11143{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
11144echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
dfb77e37
KC
11145if test "${acl_cv_prog_gnu_ld+set}" = set; then
11146 echo $ECHO_N "(cached) $ECHO_C" >&6
11147else
11148 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
18fc9bd4
RG
11149if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
11150 acl_cv_prog_gnu_ld=yes
11151else
11152 acl_cv_prog_gnu_ld=no
11153fi
dfb77e37 11154fi
ab22c1fa
CF
11155{ echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
11156echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; }
dfb77e37
KC
11157with_gnu_ld=$acl_cv_prog_gnu_ld
11158
11159
11160
ab22c1fa
CF
11161 { echo "$as_me:$LINENO: checking for shared library run path origin" >&5
11162echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; }
dfb77e37
KC
11163if test "${acl_cv_rpath+set}" = set; then
11164 echo $ECHO_N "(cached) $ECHO_C" >&6
11165else
11166
11167 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
11168 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
11169 . ./conftest.sh
11170 rm -f ./conftest.sh
11171 acl_cv_rpath=done
ba479fd2 11172
eb158727 11173fi
ab22c1fa
CF
11174{ echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
11175echo "${ECHO_T}$acl_cv_rpath" >&6; }
dfb77e37
KC
11176 wl="$acl_cv_wl"
11177 libext="$acl_cv_libext"
11178 shlibext="$acl_cv_shlibext"
11179 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
11180 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
11181 hardcode_direct="$acl_cv_hardcode_direct"
11182 hardcode_minus_L="$acl_cv_hardcode_minus_L"
ab22c1fa 11183 # Check whether --enable-rpath was given.
dfb77e37 11184if test "${enable_rpath+set}" = set; then
ab22c1fa 11185 enableval=$enable_rpath; :
dfb77e37
KC
11186else
11187 enable_rpath=yes
ab22c1fa
CF
11188fi
11189
8b1f719a 11190
a6ccdbab 11191
dfb77e37
KC
11192
11193
11194
11195
11196
b639c3c2
JJ
11197 use_additional=yes
11198
11199 acl_save_prefix="$prefix"
11200 prefix="$acl_final_prefix"
11201 acl_save_exec_prefix="$exec_prefix"
11202 exec_prefix="$acl_final_exec_prefix"
11203
11204 eval additional_includedir=\"$includedir\"
11205 eval additional_libdir=\"$libdir\"
11206
11207 exec_prefix="$acl_save_exec_prefix"
11208 prefix="$acl_save_prefix"
dfb77e37
KC
11209
11210
ab22c1fa 11211# Check whether --with-libiconv-prefix was given.
8b1f719a 11212if test "${with_libiconv_prefix+set}" = set; then
ab22c1fa 11213 withval=$with_libiconv_prefix;
8b1f719a 11214 if test "X$withval" = "Xno"; then
b639c3c2 11215 use_additional=no
8b1f719a
PB
11216 else
11217 if test "X$withval" = "X"; then
dfb77e37
KC
11218
11219 acl_save_prefix="$prefix"
11220 prefix="$acl_final_prefix"
11221 acl_save_exec_prefix="$exec_prefix"
11222 exec_prefix="$acl_final_exec_prefix"
11223
b639c3c2
JJ
11224 eval additional_includedir=\"$includedir\"
11225 eval additional_libdir=\"$libdir\"
dfb77e37
KC
11226
11227 exec_prefix="$acl_save_exec_prefix"
11228 prefix="$acl_save_prefix"
11229
8b1f719a 11230 else
b639c3c2
JJ
11231 additional_includedir="$withval/include"
11232 additional_libdir="$withval/lib"
8b1f719a
PB
11233 fi
11234 fi
11235
ab22c1fa
CF
11236fi
11237
dfb77e37
KC
11238 LIBICONV=
11239 LTLIBICONV=
11240 INCICONV=
11241 rpathdirs=
11242 ltrpathdirs=
11243 names_already_handled=
11244 names_next_round='iconv '
11245 while test -n "$names_next_round"; do
11246 names_this_round="$names_next_round"
11247 names_next_round=
11248 for name in $names_this_round; do
11249 already_handled=
11250 for n in $names_already_handled; do
11251 if test "$n" = "$name"; then
11252 already_handled=yes
11253 break
11254 fi
11255 done
11256 if test -z "$already_handled"; then
11257 names_already_handled="$names_already_handled $name"
11258 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11259 eval value=\"\$HAVE_LIB$uppername\"
11260 if test -n "$value"; then
11261 if test "$value" = yes; then
11262 eval value=\"\$LIB$uppername\"
11263 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
11264 eval value=\"\$LTLIB$uppername\"
11265 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
11266 else
11267 :
11268 fi
11269 else
11270 found_dir=
11271 found_la=
11272 found_so=
11273 found_a=
b639c3c2
JJ
11274 if test $use_additional = yes; then
11275 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
11276 found_dir="$additional_libdir"
11277 found_so="$additional_libdir/lib$name.$shlibext"
11278 if test -f "$additional_libdir/lib$name.la"; then
11279 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
11280 fi
11281 else
b639c3c2
JJ
11282 if test -f "$additional_libdir/lib$name.$libext"; then
11283 found_dir="$additional_libdir"
11284 found_a="$additional_libdir/lib$name.$libext"
11285 if test -f "$additional_libdir/lib$name.la"; then
11286 found_la="$additional_libdir/lib$name.la"
dfb77e37
KC
11287 fi
11288 fi
11289 fi
11290 fi
11291 if test "X$found_dir" = "X"; then
11292 for x in $LDFLAGS $LTLIBICONV; do
11293
11294 acl_save_prefix="$prefix"
11295 prefix="$acl_final_prefix"
11296 acl_save_exec_prefix="$exec_prefix"
11297 exec_prefix="$acl_final_exec_prefix"
11298 eval x=\"$x\"
11299 exec_prefix="$acl_save_exec_prefix"
11300 prefix="$acl_save_prefix"
11301
11302 case "$x" in
11303 -L*)
11304 dir=`echo "X$x" | sed -e 's/^X-L//'`
11305 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
11306 found_dir="$dir"
11307 found_so="$dir/lib$name.$shlibext"
11308 if test -f "$dir/lib$name.la"; then
11309 found_la="$dir/lib$name.la"
11310 fi
11311 else
11312 if test -f "$dir/lib$name.$libext"; then
11313 found_dir="$dir"
11314 found_a="$dir/lib$name.$libext"
11315 if test -f "$dir/lib$name.la"; then
11316 found_la="$dir/lib$name.la"
11317 fi
11318 fi
11319 fi
11320 ;;
11321 esac
11322 if test "X$found_dir" != "X"; then
11323 break
11324 fi
11325 done
11326 fi
11327 if test "X$found_dir" != "X"; then
11328 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
11329 if test "X$found_so" != "X"; then
11330 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
11331 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11332 else
11333 haveit=
11334 for x in $ltrpathdirs; do
11335 if test "X$x" = "X$found_dir"; then
11336 haveit=yes
11337 break
11338 fi
11339 done
11340 if test -z "$haveit"; then
11341 ltrpathdirs="$ltrpathdirs $found_dir"
11342 fi
11343 if test "$hardcode_direct" = yes; then
11344 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11345 else
11346 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
11347 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11348 haveit=
11349 for x in $rpathdirs; do
11350 if test "X$x" = "X$found_dir"; then
11351 haveit=yes
11352 break
11353 fi
11354 done
11355 if test -z "$haveit"; then
11356 rpathdirs="$rpathdirs $found_dir"
11357 fi
11358 else
11359 haveit=
11360 for x in $LDFLAGS $LIBICONV; do
11361
11362 acl_save_prefix="$prefix"
11363 prefix="$acl_final_prefix"
11364 acl_save_exec_prefix="$exec_prefix"
11365 exec_prefix="$acl_final_exec_prefix"
11366 eval x=\"$x\"
11367 exec_prefix="$acl_save_exec_prefix"
11368 prefix="$acl_save_prefix"
11369
11370 if test "X$x" = "X-L$found_dir"; then
11371 haveit=yes
11372 break
11373 fi
11374 done
11375 if test -z "$haveit"; then
11376 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
11377 fi
11378 if test "$hardcode_minus_L" != no; then
11379 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11380 else
11381 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11382 fi
11383 fi
11384 fi
11385 fi
11386 else
11387 if test "X$found_a" != "X"; then
11388 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
11389 else
11390 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
11391 fi
11392 fi
11393 additional_includedir=
11394 case "$found_dir" in
11395 */lib | */lib/)
11396 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
11397 additional_includedir="$basedir/include"
11398 ;;
11399 esac
11400 if test "X$additional_includedir" != "X"; then
11401 if test "X$additional_includedir" != "X/usr/include"; then
11402 haveit=
11403 if test "X$additional_includedir" = "X/usr/local/include"; then
11404 if test -n "$GCC"; then
11405 case $host_os in
18fc9bd4 11406 linux*) haveit=yes;;
dfb77e37
KC
11407 esac
11408 fi
11409 fi
11410 if test -z "$haveit"; then
11411 for x in $CPPFLAGS $INCICONV; do
11412
11413 acl_save_prefix="$prefix"
11414 prefix="$acl_final_prefix"
11415 acl_save_exec_prefix="$exec_prefix"
11416 exec_prefix="$acl_final_exec_prefix"
11417 eval x=\"$x\"
11418 exec_prefix="$acl_save_exec_prefix"
11419 prefix="$acl_save_prefix"
11420
11421 if test "X$x" = "X-I$additional_includedir"; then
11422 haveit=yes
11423 break
11424 fi
11425 done
11426 if test -z "$haveit"; then
11427 if test -d "$additional_includedir"; then
11428 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
11429 fi
11430 fi
11431 fi
11432 fi
11433 fi
11434 if test -n "$found_la"; then
11435 save_libdir="$libdir"
11436 case "$found_la" in
11437 */* | *\\*) . "$found_la" ;;
11438 *) . "./$found_la" ;;
11439 esac
11440 libdir="$save_libdir"
11441 for dep in $dependency_libs; do
11442 case "$dep" in
11443 -L*)
11444 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11445 if test "X$additional_libdir" != "X/usr/lib"; then
11446 haveit=
11447 if test "X$additional_libdir" = "X/usr/local/lib"; then
11448 if test -n "$GCC"; then
11449 case $host_os in
18fc9bd4 11450 linux*) haveit=yes;;
dfb77e37
KC
11451 esac
11452 fi
11453 fi
11454 if test -z "$haveit"; then
11455 haveit=
11456 for x in $LDFLAGS $LIBICONV; do
11457
11458 acl_save_prefix="$prefix"
11459 prefix="$acl_final_prefix"
11460 acl_save_exec_prefix="$exec_prefix"
11461 exec_prefix="$acl_final_exec_prefix"
11462 eval x=\"$x\"
11463 exec_prefix="$acl_save_exec_prefix"
11464 prefix="$acl_save_prefix"
11465
11466 if test "X$x" = "X-L$additional_libdir"; then
11467 haveit=yes
11468 break
11469 fi
11470 done
11471 if test -z "$haveit"; then
11472 if test -d "$additional_libdir"; then
11473 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
11474 fi
11475 fi
11476 haveit=
11477 for x in $LDFLAGS $LTLIBICONV; do
11478
11479 acl_save_prefix="$prefix"
11480 prefix="$acl_final_prefix"
11481 acl_save_exec_prefix="$exec_prefix"
11482 exec_prefix="$acl_final_exec_prefix"
11483 eval x=\"$x\"
11484 exec_prefix="$acl_save_exec_prefix"
11485 prefix="$acl_save_prefix"
11486
11487 if test "X$x" = "X-L$additional_libdir"; then
11488 haveit=yes
11489 break
11490 fi
11491 done
11492 if test -z "$haveit"; then
11493 if test -d "$additional_libdir"; then
11494 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
11495 fi
11496 fi
11497 fi
11498 fi
11499 ;;
11500 -R*)
11501 dir=`echo "X$dep" | sed -e 's/^X-R//'`
11502 if test "$enable_rpath" != no; then
11503 haveit=
11504 for x in $rpathdirs; do
11505 if test "X$x" = "X$dir"; then
11506 haveit=yes
11507 break
11508 fi
11509 done
11510 if test -z "$haveit"; then
11511 rpathdirs="$rpathdirs $dir"
11512 fi
11513 haveit=
11514 for x in $ltrpathdirs; do
11515 if test "X$x" = "X$dir"; then
11516 haveit=yes
11517 break
11518 fi
11519 done
11520 if test -z "$haveit"; then
11521 ltrpathdirs="$ltrpathdirs $dir"
11522 fi
11523 fi
11524 ;;
11525 -l*)
11526 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11527 ;;
11528 *.la)
11529 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11530 ;;
11531 *)
11532 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
11533 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
11534 ;;
11535 esac
11536 done
11537 fi
11538 else
11539 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11540 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
11541 fi
11542 fi
11543 fi
11544 done
11545 done
11546 if test "X$rpathdirs" != "X"; then
11547 if test -n "$hardcode_libdir_separator"; then
11548 alldirs=
11549 for found_dir in $rpathdirs; do
11550 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
11551 done
11552 acl_save_libdir="$libdir"
11553 libdir="$alldirs"
11554 eval flag=\"$hardcode_libdir_flag_spec\"
11555 libdir="$acl_save_libdir"
11556 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11557 else
11558 for found_dir in $rpathdirs; do
11559 acl_save_libdir="$libdir"
11560 libdir="$found_dir"
11561 eval flag=\"$hardcode_libdir_flag_spec\"
11562 libdir="$acl_save_libdir"
11563 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11564 done
11565 fi
11566 fi
11567 if test "X$ltrpathdirs" != "X"; then
11568 for found_dir in $ltrpathdirs; do
11569 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
11570 done
11571 fi
11572
11573
11574
11575
11576
11577
11578
11579 am_save_CPPFLAGS="$CPPFLAGS"
11580
11581 for element in $INCICONV; do
11582 haveit=
11583 for x in $CPPFLAGS; do
11584
11585 acl_save_prefix="$prefix"
11586 prefix="$acl_final_prefix"
11587 acl_save_exec_prefix="$exec_prefix"
11588 exec_prefix="$acl_final_exec_prefix"
11589 eval x=\"$x\"
11590 exec_prefix="$acl_save_exec_prefix"
11591 prefix="$acl_save_prefix"
11592
11593 if test "X$x" = "X$element"; then
11594 haveit=yes
11595 break
11596 fi
11597 done
11598 if test -z "$haveit"; then
11599 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11600 fi
11601 done
eb158727
ZW
11602
11603
ab22c1fa
CF
11604 { echo "$as_me:$LINENO: checking for iconv" >&5
11605echo $ECHO_N "checking for iconv... $ECHO_C" >&6; }
ba479fd2
NN
11606if test "${am_cv_func_iconv+set}" = set; then
11607 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11608else
ba479fd2 11609
f91abfce
TT
11610 am_cv_func_iconv="no, consider installing GNU libiconv"
11611 am_cv_lib_iconv=no
ba479fd2 11612 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11613/* confdefs.h. */
11614_ACEOF
11615cat confdefs.h >>conftest.$ac_ext
11616cat >>conftest.$ac_ext <<_ACEOF
11617/* end confdefs.h. */
f91abfce
TT
11618#include <stdlib.h>
11619#include <iconv.h>
ba479fd2
NN
11620int
11621main ()
11622{
f91abfce
TT
11623iconv_t cd = iconv_open("","");
11624 iconv(cd,NULL,NULL,NULL,NULL);
11625 iconv_close(cd);
ba479fd2
NN
11626 ;
11627 return 0;
11628}
11629_ACEOF
11630rm -f conftest.$ac_objext conftest$ac_exeext
ab22c1fa
CF
11631if { (ac_try="$ac_link"
11632case "(($ac_try" in
11633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11634 *) ac_try_echo=$ac_try;;
11635esac
11636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11637 (eval "$ac_link") 2>conftest.er1
ba479fd2 11638 ac_status=$?
86da66b5
HPN
11639 grep -v '^ *+' conftest.er1 >conftest.err
11640 rm -f conftest.er1
11641 cat conftest.err >&5
ba479fd2 11642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
11643 (exit $ac_status); } && {
11644 test -z "$ac_c_werror_flag" ||
11645 test ! -s conftest.err
11646 } && test -s conftest$ac_exeext &&
11647 $as_test_x conftest$ac_exeext; then
f91abfce
TT
11648 am_cv_func_iconv=yes
11649else
ba479fd2
NN
11650 echo "$as_me: failed program was:" >&5
11651sed 's/^/| /' conftest.$ac_ext >&5
11652
ab22c1fa 11653
f91abfce 11654fi
ab22c1fa
CF
11655
11656rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
86da66b5 11657 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11658 if test "$am_cv_func_iconv" != yes; then
11659 am_save_LIBS="$LIBS"
dfb77e37 11660 LIBS="$LIBS $LIBICONV"
ba479fd2 11661 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11662/* confdefs.h. */
11663_ACEOF
11664cat confdefs.h >>conftest.$ac_ext
11665cat >>conftest.$ac_ext <<_ACEOF
11666/* end confdefs.h. */
f91abfce
TT
11667#include <stdlib.h>
11668#include <iconv.h>
ba479fd2
NN
11669int
11670main ()
11671{
f91abfce
TT
11672iconv_t cd = iconv_open("","");
11673 iconv(cd,NULL,NULL,NULL,NULL);
11674 iconv_close(cd);
ba479fd2
NN
11675 ;
11676 return 0;
11677}
11678_ACEOF
11679rm -f conftest.$ac_objext conftest$ac_exeext
ab22c1fa
CF
11680if { (ac_try="$ac_link"
11681case "(($ac_try" in
11682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11683 *) ac_try_echo=$ac_try;;
11684esac
11685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11686 (eval "$ac_link") 2>conftest.er1
ba479fd2 11687 ac_status=$?
86da66b5
HPN
11688 grep -v '^ *+' conftest.er1 >conftest.err
11689 rm -f conftest.er1
11690 cat conftest.err >&5
ba479fd2 11691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
11692 (exit $ac_status); } && {
11693 test -z "$ac_c_werror_flag" ||
11694 test ! -s conftest.err
11695 } && test -s conftest$ac_exeext &&
11696 $as_test_x conftest$ac_exeext; then
f91abfce
TT
11697 am_cv_lib_iconv=yes
11698 am_cv_func_iconv=yes
11699else
ba479fd2
NN
11700 echo "$as_me: failed program was:" >&5
11701sed 's/^/| /' conftest.$ac_ext >&5
11702
ab22c1fa 11703
f91abfce 11704fi
ab22c1fa
CF
11705
11706rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
86da66b5 11707 conftest$ac_exeext conftest.$ac_ext
f91abfce
TT
11708 LIBS="$am_save_LIBS"
11709 fi
6e3f3080 11710
ba479fd2 11711fi
ab22c1fa
CF
11712{ echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
11713echo "${ECHO_T}$am_cv_func_iconv" >&6; }
63cf211a 11714 if test "$am_cv_func_iconv" = yes; then
ba479fd2
NN
11715
11716cat >>confdefs.h <<\_ACEOF
f91abfce 11717#define HAVE_ICONV 1
ba479fd2 11718_ACEOF
f91abfce 11719
dfb77e37
KC
11720 fi
11721 if test "$am_cv_lib_iconv" = yes; then
ab22c1fa
CF
11722 { echo "$as_me:$LINENO: checking how to link with libiconv" >&5
11723echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; }
11724 { echo "$as_me:$LINENO: result: $LIBICONV" >&5
11725echo "${ECHO_T}$LIBICONV" >&6; }
dfb77e37
KC
11726 else
11727 CPPFLAGS="$am_save_CPPFLAGS"
11728 LIBICONV=
11729 LTLIBICONV=
11730 fi
11731
11732
11733
11734 if test "$am_cv_func_iconv" = yes; then
ab22c1fa
CF
11735 { echo "$as_me:$LINENO: checking for iconv declaration" >&5
11736echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6; }
ba479fd2
NN
11737 if test "${am_cv_proto_iconv+set}" = set; then
11738 echo $ECHO_N "(cached) $ECHO_C" >&6
f91abfce 11739else
ba479fd2
NN
11740
11741 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11742/* confdefs.h. */
11743_ACEOF
11744cat confdefs.h >>conftest.$ac_ext
11745cat >>conftest.$ac_ext <<_ACEOF
11746/* end confdefs.h. */
f91abfce
TT
11747
11748#include <stdlib.h>
11749#include <iconv.h>
11750extern
11751#ifdef __cplusplus
11752"C"
11753#endif
11754#if defined(__STDC__) || defined(__cplusplus)
11755size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11756#else
11757size_t iconv();
11758#endif
11759
ba479fd2
NN
11760int
11761main ()
11762{
f91abfce 11763
ba479fd2
NN
11764 ;
11765 return 0;
11766}
11767_ACEOF
11768rm -f conftest.$ac_objext
ab22c1fa
CF
11769if { (ac_try="$ac_compile"
11770case "(($ac_try" in
11771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11772 *) ac_try_echo=$ac_try;;
11773esac
11774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11775 (eval "$ac_compile") 2>conftest.er1
ba479fd2 11776 ac_status=$?
86da66b5
HPN
11777 grep -v '^ *+' conftest.er1 >conftest.err
11778 rm -f conftest.er1
11779 cat conftest.err >&5
ba479fd2 11780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
11781 (exit $ac_status); } && {
11782 test -z "$ac_c_werror_flag" ||
11783 test ! -s conftest.err
11784 } && test -s conftest.$ac_objext; then
f91abfce
TT
11785 am_cv_proto_iconv_arg1=""
11786else
ba479fd2
NN
11787 echo "$as_me: failed program was:" >&5
11788sed 's/^/| /' conftest.$ac_ext >&5
11789
ab22c1fa 11790 am_cv_proto_iconv_arg1="const"
f91abfce 11791fi
ab22c1fa
CF
11792
11793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f91abfce
TT
11794 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);"
11795fi
11796
11797 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
ab22c1fa 11798 { echo "$as_me:$LINENO: result: ${ac_t:-
ba479fd2
NN
11799 }$am_cv_proto_iconv" >&5
11800echo "${ECHO_T}${ac_t:-
ab22c1fa 11801 }$am_cv_proto_iconv" >&6; }
ba479fd2
NN
11802
11803cat >>confdefs.h <<_ACEOF
f91abfce 11804#define ICONV_CONST $am_cv_proto_iconv_arg1
ba479fd2 11805_ACEOF
f91abfce
TT
11806
11807 fi
f91abfce 11808
56694dd9
ZW
11809# Until we have in-tree GNU iconv:
11810LIBICONV_DEP=
11811
11812
18fc9bd4 11813
ab22c1fa
CF
11814 { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
11815echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; }
18fc9bd4
RG
11816if test "${am_cv_val_LC_MESSAGES+set}" = set; then
11817 echo $ECHO_N "(cached) $ECHO_C" >&6
11818else
11819 cat >conftest.$ac_ext <<_ACEOF
11820/* confdefs.h. */
11821_ACEOF
11822cat confdefs.h >>conftest.$ac_ext
11823cat >>conftest.$ac_ext <<_ACEOF
11824/* end confdefs.h. */
11825#include <locale.h>
11826int
11827main ()
11828{
11829return LC_MESSAGES
11830 ;
11831 return 0;
11832}
11833_ACEOF
11834rm -f conftest.$ac_objext conftest$ac_exeext
ab22c1fa
CF
11835if { (ac_try="$ac_link"
11836case "(($ac_try" in
11837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11838 *) ac_try_echo=$ac_try;;
11839esac
11840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11841 (eval "$ac_link") 2>conftest.er1
18fc9bd4
RG
11842 ac_status=$?
11843 grep -v '^ *+' conftest.er1 >conftest.err
11844 rm -f conftest.er1
11845 cat conftest.err >&5
11846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
11847 (exit $ac_status); } && {
11848 test -z "$ac_c_werror_flag" ||
11849 test ! -s conftest.err
11850 } && test -s conftest$ac_exeext &&
11851 $as_test_x conftest$ac_exeext; then
18fc9bd4
RG
11852 am_cv_val_LC_MESSAGES=yes
11853else
11854 echo "$as_me: failed program was:" >&5
11855sed 's/^/| /' conftest.$ac_ext >&5
11856
ab22c1fa 11857 am_cv_val_LC_MESSAGES=no
18fc9bd4 11858fi
ab22c1fa
CF
11859
11860rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18fc9bd4
RG
11861 conftest$ac_exeext conftest.$ac_ext
11862fi
ab22c1fa
CF
11863{ echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
11864echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; }
18fc9bd4
RG
11865 if test $am_cv_val_LC_MESSAGES = yes; then
11866
11867cat >>confdefs.h <<\_ACEOF
11868#define HAVE_LC_MESSAGES 1
11869_ACEOF
11870
11871 fi
11872
f91abfce 11873
a03ea89b 11874
ab22c1fa
CF
11875 { echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
11876echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
a03ea89b
BM
11877if test "${am_cv_langinfo_codeset+set}" = set; then
11878 echo $ECHO_N "(cached) $ECHO_C" >&6
11879else
11880 cat >conftest.$ac_ext <<_ACEOF
11881/* confdefs.h. */
11882_ACEOF
11883cat confdefs.h >>conftest.$ac_ext
11884cat >>conftest.$ac_ext <<_ACEOF
11885/* end confdefs.h. */
11886#include <langinfo.h>
11887int
11888main ()
11889{
11890char* cs = nl_langinfo(CODESET);
11891 ;
11892 return 0;
11893}
11894_ACEOF
11895rm -f conftest.$ac_objext conftest$ac_exeext
ab22c1fa
CF
11896if { (ac_try="$ac_link"
11897case "(($ac_try" in
11898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11899 *) ac_try_echo=$ac_try;;
11900esac
11901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11902 (eval "$ac_link") 2>conftest.er1
a03ea89b
BM
11903 ac_status=$?
11904 grep -v '^ *+' conftest.er1 >conftest.err
11905 rm -f conftest.er1
11906 cat conftest.err >&5
11907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
11908 (exit $ac_status); } && {
11909 test -z "$ac_c_werror_flag" ||
11910 test ! -s conftest.err
11911 } && test -s conftest$ac_exeext &&
11912 $as_test_x conftest$ac_exeext; then
a03ea89b
BM
11913 am_cv_langinfo_codeset=yes
11914else
11915 echo "$as_me: failed program was:" >&5
11916sed 's/^/| /' conftest.$ac_ext >&5
11917
ab22c1fa 11918 am_cv_langinfo_codeset=no
a03ea89b 11919fi
ab22c1fa
CF
11920
11921rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
a03ea89b
BM
11922 conftest$ac_exeext conftest.$ac_ext
11923
11924fi
ab22c1fa
CF
11925{ echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
11926echo "${ECHO_T}$am_cv_langinfo_codeset" >&6; }
a03ea89b
BM
11927 if test $am_cv_langinfo_codeset = yes; then
11928
11929cat >>confdefs.h <<\_ACEOF
11930#define HAVE_LANGINFO_CODESET 1
11931_ACEOF
11932
11933 fi
11934
11935
86cf1cbd
KG
11936# We will need to find libiberty.h and ansidecl.h
11937saved_CFLAGS="$CFLAGS"
11938CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
ad6717df
PB
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
6a257778 11960
ad6717df
PB
11961
11962
0d667716
KG
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
367e8319 11973
0d667716
KG
11974
11975
7391b66c 11976
ed5b9f96
GK
11977
11978for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
11979 strsignal strstr strverscmp \
11980 errno snprintf vsnprintf vasprintf malloc realloc calloc \
367e8319 11981 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 11982do
ad6717df 11983 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ab22c1fa
CF
11984{ echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
11985echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; }
11986if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2
NN
11987 echo $ECHO_N "(cached) $ECHO_C" >&6
11988else
11989 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
11990/* confdefs.h. */
11991_ACEOF
11992cat confdefs.h >>conftest.$ac_ext
11993cat >>conftest.$ac_ext <<_ACEOF
11994/* end confdefs.h. */
7afe8c41
KG
11995#undef $ac_tr_decl
11996#define $ac_tr_decl 1
ba479fd2 11997
d02af173 11998#include "ansidecl.h"
86cf1cbd 11999#include "system.h"
f31e826b 12000
ba479fd2
NN
12001int
12002main ()
12003{
86cf1cbd
KG
12004#ifndef $ac_func
12005char *(*pfn) = (char *(*)) $ac_func ;
12006#endif
ba479fd2
NN
12007 ;
12008 return 0;
12009}
12010_ACEOF
12011rm -f conftest.$ac_objext
ab22c1fa
CF
12012if { (ac_try="$ac_compile"
12013case "(($ac_try" in
12014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12015 *) ac_try_echo=$ac_try;;
12016esac
12017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12018 (eval "$ac_compile") 2>conftest.er1
ba479fd2 12019 ac_status=$?
86da66b5
HPN
12020 grep -v '^ *+' conftest.er1 >conftest.err
12021 rm -f conftest.er1
12022 cat conftest.err >&5
ba479fd2 12023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
12024 (exit $ac_status); } && {
12025 test -z "$ac_c_werror_flag" ||
12026 test ! -s conftest.err
12027 } && test -s conftest.$ac_objext; then
f31e826b 12028 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 12029else
ba479fd2
NN
12030 echo "$as_me: failed program was:" >&5
12031sed 's/^/| /' conftest.$ac_ext >&5
12032
ab22c1fa 12033 eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 12034fi
ab22c1fa
CF
12035
12036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
12037fi
12038
f31e826b 12039if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ab22c1fa
CF
12040 { echo "$as_me:$LINENO: result: yes" >&5
12041echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF
86cf1cbd 12042#define $ac_tr_decl 1
ba479fd2
NN
12043_ACEOF
12044
81bf3d9e 12045else
ab22c1fa
CF
12046 { echo "$as_me:$LINENO: result: no" >&5
12047echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF
f31e826b 12048#define $ac_tr_decl 0
ba479fd2
NN
12049_ACEOF
12050
81bf3d9e
RH
12051fi
12052
12053done
ba479fd2 12054
ba479fd2 12055
ba479fd2 12056
81bf3d9e 12057
81bf3d9e
RH
12058
12059for ac_func in getrlimit setrlimit getrusage
12060do
ad6717df 12061 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ab22c1fa
CF
12062{ echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12063echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; }
12064if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2
NN
12065 echo $ECHO_N "(cached) $ECHO_C" >&6
12066else
12067 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12068/* confdefs.h. */
12069_ACEOF
12070cat confdefs.h >>conftest.$ac_ext
12071cat >>conftest.$ac_ext <<_ACEOF
12072/* end confdefs.h. */
7afe8c41
KG
12073#undef $ac_tr_decl
12074#define $ac_tr_decl 1
ba479fd2 12075
d02af173 12076#include "ansidecl.h"
86cf1cbd 12077#include "system.h"
81bf3d9e
RH
12078#ifdef HAVE_SYS_RESOURCE_H
12079#include <sys/resource.h>
12080#endif
12081
f31e826b 12082
ba479fd2
NN
12083int
12084main ()
12085{
86cf1cbd
KG
12086#ifndef $ac_func
12087char *(*pfn) = (char *(*)) $ac_func ;
12088#endif
ba479fd2
NN
12089 ;
12090 return 0;
12091}
12092_ACEOF
12093rm -f conftest.$ac_objext
ab22c1fa
CF
12094if { (ac_try="$ac_compile"
12095case "(($ac_try" in
12096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12097 *) ac_try_echo=$ac_try;;
12098esac
12099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12100 (eval "$ac_compile") 2>conftest.er1
ba479fd2 12101 ac_status=$?
86da66b5
HPN
12102 grep -v '^ *+' conftest.er1 >conftest.err
12103 rm -f conftest.er1
12104 cat conftest.err >&5
ba479fd2 12105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
12106 (exit $ac_status); } && {
12107 test -z "$ac_c_werror_flag" ||
12108 test ! -s conftest.err
12109 } && test -s conftest.$ac_objext; then
f31e826b 12110 eval "gcc_cv_have_decl_$ac_func=yes"
81bf3d9e 12111else
ba479fd2
NN
12112 echo "$as_me: failed program was:" >&5
12113sed 's/^/| /' conftest.$ac_ext >&5
12114
ab22c1fa 12115 eval "gcc_cv_have_decl_$ac_func=no"
81bf3d9e 12116fi
ab22c1fa
CF
12117
12118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
81bf3d9e
RH
12119fi
12120
f31e826b 12121if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ab22c1fa
CF
12122 { echo "$as_me:$LINENO: result: yes" >&5
12123echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF
86cf1cbd 12124#define $ac_tr_decl 1
ba479fd2
NN
12125_ACEOF
12126
81bf3d9e 12127else
ab22c1fa
CF
12128 { echo "$as_me:$LINENO: result: no" >&5
12129echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF
f31e826b 12130#define $ac_tr_decl 0
ba479fd2
NN
12131_ACEOF
12132
81bf3d9e
RH
12133fi
12134
12135done
86cf1cbd 12136
81bf3d9e 12137
ba479fd2 12138cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12139/* confdefs.h. */
12140_ACEOF
12141cat confdefs.h >>conftest.$ac_ext
12142cat >>conftest.$ac_ext <<_ACEOF
12143/* end confdefs.h. */
b2522d2b
HPN
12144
12145#include "ansidecl.h"
12146#include "system.h"
12147#ifdef HAVE_SYS_RESOURCE_H
12148#include <sys/resource.h>
12149#endif
12150
ba479fd2
NN
12151int
12152main ()
12153{
b2522d2b 12154rlim_t l = 0;
ba479fd2
NN
12155 ;
12156 return 0;
12157}
12158_ACEOF
12159rm -f conftest.$ac_objext
ab22c1fa
CF
12160if { (ac_try="$ac_compile"
12161case "(($ac_try" in
12162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12163 *) ac_try_echo=$ac_try;;
12164esac
12165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12166 (eval "$ac_compile") 2>conftest.er1
ba479fd2 12167 ac_status=$?
86da66b5
HPN
12168 grep -v '^ *+' conftest.er1 >conftest.err
12169 rm -f conftest.er1
12170 cat conftest.err >&5
ba479fd2 12171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
12172 (exit $ac_status); } && {
12173 test -z "$ac_c_werror_flag" ||
12174 test ! -s conftest.err
12175 } && test -s conftest.$ac_objext; then
b2522d2b
HPN
12176 :
12177else
ba479fd2
NN
12178 echo "$as_me: failed program was:" >&5
12179sed 's/^/| /' conftest.$ac_ext >&5
12180
12181
12182cat >>confdefs.h <<\_ACEOF
b2522d2b 12183#define rlim_t long
ba479fd2 12184_ACEOF
b2522d2b
HPN
12185
12186fi
ab22c1fa
CF
12187
12188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b2522d2b 12189
2102b2fe
RS
12190# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
12191# FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname
12192# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
12193# to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
ad6717df 12194
351df804 12195for ac_func in ldgetname
c1800ec8 12196do
ad6717df 12197 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ab22c1fa
CF
12198{ echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12199echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; }
12200if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2
NN
12201 echo $ECHO_N "(cached) $ECHO_C" >&6
12202else
12203 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12204/* confdefs.h. */
12205_ACEOF
12206cat confdefs.h >>conftest.$ac_ext
12207cat >>conftest.$ac_ext <<_ACEOF
12208/* end confdefs.h. */
c1800ec8
ZW
12209#undef $ac_tr_decl
12210#define $ac_tr_decl 1
ba479fd2 12211
351df804
KG
12212#include "ansidecl.h"
12213#include "system.h"
12214#ifdef HAVE_LDFCN_H
2102b2fe
RS
12215#undef FREAD
12216#undef FWRITE
351df804
KG
12217#include <ldfcn.h>
12218#endif
12219
12220
ba479fd2
NN
12221int
12222main ()
12223{
351df804
KG
12224#ifndef $ac_func
12225char *(*pfn) = (char *(*)) $ac_func ;
12226#endif
ba479fd2
NN
12227 ;
12228 return 0;
12229}
12230_ACEOF
12231rm -f conftest.$ac_objext
ab22c1fa
CF
12232if { (ac_try="$ac_compile"
12233case "(($ac_try" in
12234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12235 *) ac_try_echo=$ac_try;;
12236esac
12237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12238 (eval "$ac_compile") 2>conftest.er1
ba479fd2 12239 ac_status=$?
86da66b5
HPN
12240 grep -v '^ *+' conftest.er1 >conftest.err
12241 rm -f conftest.er1
12242 cat conftest.err >&5
ba479fd2 12243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
12244 (exit $ac_status); } && {
12245 test -z "$ac_c_werror_flag" ||
12246 test ! -s conftest.err
12247 } && test -s conftest.$ac_objext; then
351df804
KG
12248 eval "gcc_cv_have_decl_$ac_func=yes"
12249else
ba479fd2
NN
12250 echo "$as_me: failed program was:" >&5
12251sed 's/^/| /' conftest.$ac_ext >&5
12252
ab22c1fa 12253 eval "gcc_cv_have_decl_$ac_func=no"
351df804 12254fi
ab22c1fa
CF
12255
12256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
351df804
KG
12257fi
12258
12259if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ab22c1fa
CF
12260 { echo "$as_me:$LINENO: result: yes" >&5
12261echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF
351df804 12262#define $ac_tr_decl 1
ba479fd2
NN
12263_ACEOF
12264
351df804 12265else
ab22c1fa
CF
12266 { echo "$as_me:$LINENO: result: no" >&5
12267echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF
351df804 12268#define $ac_tr_decl 0
ba479fd2
NN
12269_ACEOF
12270
351df804
KG
12271fi
12272
12273done
ba479fd2 12274
351df804
KG
12275
12276
12277for ac_func in times
12278do
ad6717df 12279 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ab22c1fa
CF
12280{ echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12281echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; }
12282if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then
ba479fd2
NN
12283 echo $ECHO_N "(cached) $ECHO_C" >&6
12284else
12285 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12286/* confdefs.h. */
12287_ACEOF
12288cat confdefs.h >>conftest.$ac_ext
12289cat >>conftest.$ac_ext <<_ACEOF
12290/* end confdefs.h. */
351df804
KG
12291#undef $ac_tr_decl
12292#define $ac_tr_decl 1
ba479fd2 12293
c1800ec8
ZW
12294#include "ansidecl.h"
12295#include "system.h"
12296#ifdef HAVE_SYS_TIMES_H
12297#include <sys/times.h>
12298#endif
12299
12300
ba479fd2
NN
12301int
12302main ()
12303{
c1800ec8
ZW
12304#ifndef $ac_func
12305char *(*pfn) = (char *(*)) $ac_func ;
12306#endif
ba479fd2
NN
12307 ;
12308 return 0;
12309}
12310_ACEOF
12311rm -f conftest.$ac_objext
ab22c1fa
CF
12312if { (ac_try="$ac_compile"
12313case "(($ac_try" in
12314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12315 *) ac_try_echo=$ac_try;;
12316esac
12317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12318 (eval "$ac_compile") 2>conftest.er1
ba479fd2 12319 ac_status=$?
86da66b5
HPN
12320 grep -v '^ *+' conftest.er1 >conftest.err
12321 rm -f conftest.er1
12322 cat conftest.err >&5
ba479fd2 12323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
12324 (exit $ac_status); } && {
12325 test -z "$ac_c_werror_flag" ||
12326 test ! -s conftest.err
12327 } && test -s conftest.$ac_objext; then
a3bba767
JJ
12328 eval "gcc_cv_have_decl_$ac_func=yes"
12329else
12330 echo "$as_me: failed program was:" >&5
12331sed 's/^/| /' conftest.$ac_ext >&5
703d89ab 12332
ab22c1fa 12333 eval "gcc_cv_have_decl_$ac_func=no"
a3bba767 12334fi
ab22c1fa
CF
12335
12336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8
ZW
12337fi
12338
12339if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ab22c1fa
CF
12340 { echo "$as_me:$LINENO: result: yes" >&5
12341echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF
c1800ec8 12342#define $ac_tr_decl 1
ba479fd2
NN
12343_ACEOF
12344
c1800ec8 12345else
ab22c1fa
CF
12346 { echo "$as_me:$LINENO: result: no" >&5
12347echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF
c1800ec8 12348#define $ac_tr_decl 0
ba479fd2
NN
12349_ACEOF
12350
c1800ec8
ZW
12351fi
12352
12353done
c1800ec8
ZW
12354
12355
4f6d8cc8
GK
12356
12357for ac_func in sigaltstack
12358do
12359 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
ab22c1fa
CF
12360{ echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
12361echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; }
12362if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then
4f6d8cc8
GK
12363 echo $ECHO_N "(cached) $ECHO_C" >&6
12364else
12365 cat >conftest.$ac_ext <<_ACEOF
12366/* confdefs.h. */
12367_ACEOF
12368cat confdefs.h >>conftest.$ac_ext
12369cat >>conftest.$ac_ext <<_ACEOF
12370/* end confdefs.h. */
12371#undef $ac_tr_decl
12372#define $ac_tr_decl 1
12373
12374#include "ansidecl.h"
12375#include "system.h"
12376#include <signal.h>
12377
12378
12379int
12380main ()
12381{
12382#ifndef $ac_func
12383char *(*pfn) = (char *(*)) $ac_func ;
12384#endif
12385 ;
12386 return 0;
12387}
12388_ACEOF
12389rm -f conftest.$ac_objext
ab22c1fa
CF
12390if { (ac_try="$ac_compile"
12391case "(($ac_try" in
12392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12393 *) ac_try_echo=$ac_try;;
12394esac
12395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12396 (eval "$ac_compile") 2>conftest.er1
4f6d8cc8
GK
12397 ac_status=$?
12398 grep -v '^ *+' conftest.er1 >conftest.err
12399 rm -f conftest.er1
12400 cat conftest.err >&5
12401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
12402 (exit $ac_status); } && {
12403 test -z "$ac_c_werror_flag" ||
12404 test ! -s conftest.err
12405 } && test -s conftest.$ac_objext; then
8b1f719a
PB
12406 eval "gcc_cv_have_decl_$ac_func=yes"
12407else
12408 echo "$as_me: failed program was:" >&5
12409sed 's/^/| /' conftest.$ac_ext >&5
4f6d8cc8 12410
ab22c1fa 12411 eval "gcc_cv_have_decl_$ac_func=no"
4f6d8cc8 12412fi
ab22c1fa
CF
12413
12414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8
GK
12415fi
12416
12417if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
ab22c1fa
CF
12418 { echo "$as_me:$LINENO: result: yes" >&5
12419echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
12420#define $ac_tr_decl 1
12421_ACEOF
12422
12423else
ab22c1fa
CF
12424 { echo "$as_me:$LINENO: result: no" >&5
12425echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF
4f6d8cc8
GK
12426#define $ac_tr_decl 0
12427_ACEOF
12428
12429fi
12430
12431done
12432
12433
c1800ec8 12434# More time-related stuff.
ab22c1fa
CF
12435{ echo "$as_me:$LINENO: checking for struct tms" >&5
12436echo $ECHO_N "checking for struct tms... $ECHO_C" >&6; }
ba479fd2
NN
12437if test "${ac_cv_struct_tms+set}" = set; then
12438 echo $ECHO_N "(cached) $ECHO_C" >&6
12439else
12440
12441cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12442/* confdefs.h. */
12443_ACEOF
12444cat confdefs.h >>conftest.$ac_ext
12445cat >>conftest.$ac_ext <<_ACEOF
12446/* end confdefs.h. */
c1800ec8
ZW
12447
12448#include "ansidecl.h"
12449#include "system.h"
12450#ifdef HAVE_SYS_TIMES_H
12451#include <sys/times.h>
12452#endif
12453
ba479fd2
NN
12454int
12455main ()
12456{
c1800ec8 12457struct tms tms;
ba479fd2
NN
12458 ;
12459 return 0;
12460}
12461_ACEOF
12462rm -f conftest.$ac_objext
ab22c1fa
CF
12463if { (ac_try="$ac_compile"
12464case "(($ac_try" in
12465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12466 *) ac_try_echo=$ac_try;;
12467esac
12468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12469 (eval "$ac_compile") 2>conftest.er1
ba479fd2 12470 ac_status=$?
86da66b5
HPN
12471 grep -v '^ *+' conftest.er1 >conftest.err
12472 rm -f conftest.er1
12473 cat conftest.err >&5
ba479fd2 12474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
12475 (exit $ac_status); } && {
12476 test -z "$ac_c_werror_flag" ||
12477 test ! -s conftest.err
12478 } && test -s conftest.$ac_objext; then
c1800ec8
ZW
12479 ac_cv_struct_tms=yes
12480else
ba479fd2
NN
12481 echo "$as_me: failed program was:" >&5
12482sed 's/^/| /' conftest.$ac_ext >&5
12483
ab22c1fa 12484 ac_cv_struct_tms=no
c1800ec8 12485fi
ab22c1fa
CF
12486
12487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 12488fi
ab22c1fa
CF
12489{ echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5
12490echo "${ECHO_T}$ac_cv_struct_tms" >&6; }
63cf211a 12491if test $ac_cv_struct_tms = yes; then
ba479fd2
NN
12492
12493cat >>confdefs.h <<\_ACEOF
c1800ec8 12494#define HAVE_STRUCT_TMS 1
ba479fd2 12495_ACEOF
c1800ec8
ZW
12496
12497fi
12498
12499# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
12500# revisit after autoconf 2.50.
ab22c1fa
CF
12501{ echo "$as_me:$LINENO: checking for clock_t" >&5
12502echo $ECHO_N "checking for clock_t... $ECHO_C" >&6; }
ba479fd2
NN
12503if test "${gcc_cv_type_clock_t+set}" = set; then
12504 echo $ECHO_N "(cached) $ECHO_C" >&6
12505else
12506
12507cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12508/* confdefs.h. */
12509_ACEOF
12510cat confdefs.h >>conftest.$ac_ext
12511cat >>conftest.$ac_ext <<_ACEOF
12512/* end confdefs.h. */
c1800ec8
ZW
12513
12514#include "ansidecl.h"
12515#include "system.h"
12516
ba479fd2
NN
12517int
12518main ()
12519{
c1800ec8 12520clock_t x;
ba479fd2
NN
12521 ;
12522 return 0;
12523}
12524_ACEOF
12525rm -f conftest.$ac_objext
ab22c1fa
CF
12526if { (ac_try="$ac_compile"
12527case "(($ac_try" in
12528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12529 *) ac_try_echo=$ac_try;;
12530esac
12531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12532 (eval "$ac_compile") 2>conftest.er1
ba479fd2 12533 ac_status=$?
86da66b5
HPN
12534 grep -v '^ *+' conftest.er1 >conftest.err
12535 rm -f conftest.er1
12536 cat conftest.err >&5
ba479fd2 12537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
12538 (exit $ac_status); } && {
12539 test -z "$ac_c_werror_flag" ||
12540 test ! -s conftest.err
12541 } && test -s conftest.$ac_objext; then
c1800ec8
ZW
12542 gcc_cv_type_clock_t=yes
12543else
ba479fd2
NN
12544 echo "$as_me: failed program was:" >&5
12545sed 's/^/| /' conftest.$ac_ext >&5
12546
ab22c1fa 12547 gcc_cv_type_clock_t=no
c1800ec8 12548fi
ab22c1fa
CF
12549
12550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c1800ec8 12551fi
ab22c1fa
CF
12552{ echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5
12553echo "${ECHO_T}$gcc_cv_type_clock_t" >&6; }
63cf211a 12554if test $gcc_cv_type_clock_t = yes; then
ba479fd2
NN
12555
12556cat >>confdefs.h <<\_ACEOF
c1800ec8 12557#define HAVE_CLOCK_T 1
ba479fd2 12558_ACEOF
c1800ec8
ZW
12559
12560fi
12561
eb70d86d
AS
12562# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
12563CFLAGS="$saved_CFLAGS"
12564
ab22c1fa 12565# Check whether --enable-initfini-array was given.
07cf4226 12566if test "${enable_initfini_array+set}" = set; then
ab22c1fa 12567 enableval=$enable_initfini_array;
07cf4226 12568else
ba479fd2 12569
ab22c1fa
CF
12570{ echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
12571echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6; }
ba479fd2
NN
12572if test "${gcc_cv_initfini_array+set}" = set; then
12573 echo $ECHO_N "(cached) $ECHO_C" >&6
07cf4226 12574else
eb70d86d 12575 if test "$cross_compiling" = yes; then
918c4fe4 12576 gcc_cv_initfini_array=no
eb70d86d 12577else
ba479fd2 12578 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12579/* confdefs.h. */
12580_ACEOF
12581cat confdefs.h >>conftest.$ac_ext
12582cat >>conftest.$ac_ext <<_ACEOF
12583/* end confdefs.h. */
eb70d86d 12584
07cf4226
DM
12585static int x = -1;
12586int main (void) { return x; }
12587int foo (void) { x = 0; }
12588int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;
ba479fd2
NN
12589_ACEOF
12590rm -f conftest$ac_exeext
ab22c1fa
CF
12591if { (ac_try="$ac_link"
12592case "(($ac_try" in
12593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12594 *) ac_try_echo=$ac_try;;
12595esac
12596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12597 (eval "$ac_link") 2>&5
ba479fd2
NN
12598 ac_status=$?
12599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12600 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ab22c1fa
CF
12601 { (case "(($ac_try" in
12602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12603 *) ac_try_echo=$ac_try;;
12604esac
12605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12606 (eval "$ac_try") 2>&5
ba479fd2
NN
12607 ac_status=$?
12608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12609 (exit $ac_status); }; }; then
918c4fe4 12610 gcc_cv_initfini_array=yes
eb70d86d 12611else
ba479fd2
NN
12612 echo "$as_me: program exited with status $ac_status" >&5
12613echo "$as_me: failed program was:" >&5
12614sed 's/^/| /' conftest.$ac_ext >&5
12615
12616( exit $ac_status )
12617gcc_cv_initfini_array=no
eb70d86d 12618fi
ab22c1fa 12619rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
eb70d86d 12620fi
ab22c1fa
CF
12621
12622
07cf4226 12623fi
ab22c1fa
CF
12624{ echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5
12625echo "${ECHO_T}$gcc_cv_initfini_array" >&6; }
eb70d86d 12626 enable_initfini_array=$gcc_cv_initfini_array
07cf4226 12627
ab22c1fa
CF
12628fi
12629
63cf211a 12630if test $enable_initfini_array = yes; then
ba479fd2
NN
12631
12632cat >>confdefs.h <<\_ACEOF
eb70d86d 12633#define HAVE_INITFINI_ARRAY 1
ba479fd2 12634_ACEOF
07cf4226 12635
eb70d86d 12636fi
81bf3d9e 12637
ba479fd2 12638# mkdir takes a single argument on some systems.
ab22c1fa
CF
12639{ echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5
12640echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6; }
ba479fd2
NN
12641if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then
12642 echo $ECHO_N "(cached) $ECHO_C" >&6
75923b2f 12643else
ba479fd2 12644 cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
12645/* confdefs.h. */
12646_ACEOF
12647cat confdefs.h >>conftest.$ac_ext
12648cat >>conftest.$ac_ext <<_ACEOF
12649/* end confdefs.h. */
75923b2f
MK
12650
12651#include <sys/types.h>
12652#ifdef HAVE_SYS_STAT_H
12653# include <sys/stat.h>
12654#endif
12655#ifdef HAVE_UNISTD_H
12656# include <unistd.h>
12657#endif
12658#ifdef HAVE_DIRECT_H
12659# include <direct.h>
12660#endif
ba479fd2
NN
12661int
12662main ()
12663{
75923b2f 12664mkdir ("foo", 0);
ba479fd2
NN
12665 ;
12666 return 0;
12667}
12668_ACEOF
12669rm -f conftest.$ac_objext
ab22c1fa
CF
12670if { (ac_try="$ac_compile"
12671case "(($ac_try" in
12672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12673 *) ac_try_echo=$ac_try;;
12674esac
12675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12676 (eval "$ac_compile") 2>conftest.er1
ba479fd2 12677 ac_status=$?
86da66b5
HPN
12678 grep -v '^ *+' conftest.er1 >conftest.err
12679 rm -f conftest.er1
12680 cat conftest.err >&5
ba479fd2 12681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
12682 (exit $ac_status); } && {
12683 test -z "$ac_c_werror_flag" ||
12684 test ! -s conftest.err
12685 } && test -s conftest.$ac_objext; then
75923b2f
MK
12686 gcc_cv_mkdir_takes_one_arg=no
12687else
ba479fd2
NN
12688 echo "$as_me: failed program was:" >&5
12689sed 's/^/| /' conftest.$ac_ext >&5
12690
ab22c1fa 12691 gcc_cv_mkdir_takes_one_arg=yes
75923b2f 12692fi
ab22c1fa
CF
12693
12694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75923b2f 12695fi
ab22c1fa
CF
12696{ echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5
12697echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6; }
63cf211a 12698if test $gcc_cv_mkdir_takes_one_arg = yes ; then
ba479fd2
NN
12699
12700cat >>confdefs.h <<\_ACEOF
75923b2f 12701#define MKDIR_TAKES_ONE_ARG 1
ba479fd2 12702_ACEOF
75923b2f
MK
12703
12704fi
12705
12706
861bb6c1
JL
12707# File extensions
12708manext='.1'
12709objext='.o'
12710
12711
12712
4977bab6 12713# With Setjmp/Longjmp based exception handling.
ab22c1fa 12714# Check whether --enable-sjlj-exceptions was given.
4977bab6 12715if test "${enable_sjlj_exceptions+set}" = set; then
ab22c1fa 12716 enableval=$enable_sjlj_exceptions; sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
63cf211a 12717
ba479fd2
NN
12718cat >>confdefs.h <<_ACEOF
12719#define CONFIG_SJLJ_EXCEPTIONS $sjlj
12720_ACEOF
4977bab6 12721
ab22c1fa
CF
12722fi
12723
4977bab6 12724
443728bb
L
12725# For platforms with the unwind ABI which includes an unwind library,
12726# libunwind, we can choose to use the system libunwind.
4977bab6 12727
ab22c1fa 12728# Check whether --with-system-libunwind was given.
443728bb 12729if test "${with_system_libunwind+set}" = set; then
ab22c1fa
CF
12730 withval=$with_system_libunwind;
12731fi
4977bab6 12732
4977bab6 12733
e64f5acf
SE
12734# config.gcc also contains tests of with_system_libunwind.
12735if test x$with_system_libunwind = xyes; then
12736
12737cat >>confdefs.h <<\_ACEOF
12738#define HAVE_GETIPINFO 1
12739_ACEOF
12740
12741fi
12742
34a86c2b
NN
12743# --------------------------------------------------------
12744# Build, host, and target specific configuration fragments
12745# --------------------------------------------------------
12746
5b28c537
NN
12747# Collect build-machine-specific information.
12748. ${srcdir}/config.build
12749
a89ea0df
NN
12750# Collect host-machine-specific information.
12751. ${srcdir}/config.host
12752
ef69da62 12753target_gtfiles=
a89ea0df
NN
12754
12755# Collect target-machine-specific information.
8ad9fb33 12756. ${srcdir}/config.gcc
861bb6c1
JL
12757
12758extra_objs="${host_extra_objs} ${extra_objs}"
30500d84 12759extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}"
861bb6c1
JL
12760
12761# Default the target-machine variables that were not explicitly set.
75bffa71 12762if test x"$tm_file" = x
861bb6c1
JL
12763then tm_file=$cpu_type/$cpu_type.h; fi
12764
6b2adea9 12765if test x"$extra_headers" = x
861bb6c1
JL
12766then extra_headers=; fi
12767
75bffa71 12768if test x$md_file = x
e98e406f 12769then md_file=$cpu_type/$cpu_type.md; fi
861bb6c1 12770
75bffa71 12771if test x$out_file = x
861bb6c1
JL
12772then out_file=$cpu_type/$cpu_type.c; fi
12773
75bffa71 12774if test x"$tmake_file" = x
861bb6c1
JL
12775then tmake_file=$cpu_type/t-$cpu_type
12776fi
12777
90e6a802 12778if test x"$dwarf2" = xyes
756ee602 12779then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
12780fi
12781
861bb6c1 12782# Say what files are being used for the output code and MD file.
11642c3a 12783echo "Using \`$srcdir/config/$out_file' for machine-specific logic."
861bb6c1
JL
12784echo "Using \`$srcdir/config/$md_file' as machine description file."
12785
11642c3a 12786# If any of the xm_file variables contain nonexistent files, warn
4dc0535b
ZW
12787# about them and drop them.
12788
11642c3a
ZW
12789bx=
12790for x in $build_xm_file; do
12791 if test -f $srcdir/config/$x
12792 then bx="$bx $x"
ba479fd2
NN
12793 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12794echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12795 fi
12796done
12797build_xm_file="$bx"
12798
12799hx=
12800for x in $host_xm_file; do
12801 if test -f $srcdir/config/$x
12802 then hx="$hx $x"
ba479fd2
NN
12803 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12804echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12805 fi
12806done
12807host_xm_file="$hx"
12808
12809tx=
12810for x in $xm_file; do
12811 if test -f $srcdir/config/$x
12812 then tx="$tx $x"
ba479fd2
NN
12813 else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5
12814echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;}
11642c3a
ZW
12815 fi
12816done
12817xm_file="$tx"
12818
861bb6c1
JL
12819count=a
12820for f in $tm_file; do
12821 count=${count}x
12822done
75bffa71 12823if test $count = ax; then
861bb6c1
JL
12824 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
12825else
12826 echo "Using the following target machine macro files:"
12827 for f in $tm_file; do
12828 echo " $srcdir/config/$f"
12829 done
12830fi
12831
4977bab6 12832if test x$need_64bit_hwint = xyes; then
ba479fd2
NN
12833
12834cat >>confdefs.h <<\_ACEOF
4977bab6 12835#define NEED_64BIT_HOST_WIDE_INT 1
ba479fd2 12836_ACEOF
4977bab6
ZW
12837
12838fi
12839
99fa8911
AP
12840if test x$use_long_long_for_widest_fast_int = xyes; then
12841
12842cat >>confdefs.h <<\_ACEOF
12843#define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1
12844_ACEOF
12845
12846fi
12847
861bb6c1
JL
12848count=a
12849for f in $host_xm_file; do
12850 count=${count}x
12851done
11642c3a
ZW
12852if test $count = a; then
12853 :
12854elif test $count = ax; then
861bb6c1
JL
12855 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
12856else
12857 echo "Using the following host machine macro files:"
12858 for f in $host_xm_file; do
12859 echo " $srcdir/config/$f"
12860 done
12861fi
476d9098 12862echo "Using ${out_host_hook_obj} for host machine hooks."
861bb6c1 12863
75bffa71 12864if test "$host_xm_file" != "$build_xm_file"; then
861bb6c1
JL
12865 count=a
12866 for f in $build_xm_file; do
12867 count=${count}x
12868 done
11642c3a
ZW
12869 if test $count = a; then
12870 :
12871 elif test $count = ax; then
861bb6c1
JL
12872 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
12873 else
12874 echo "Using the following build machine macro files:"
12875 for f in $build_xm_file; do
12876 echo " $srcdir/config/$f"
12877 done
12878 fi
12879fi
12880
4f6d8cc8 12881case ${host} in
b8ec3cc8 12882 powerpc*-*-darwin*)
ab22c1fa
CF
12883 { echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5
12884echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6; }
4f6d8cc8
GK
12885if test "${gcc_cv_mcontext_underscores+set}" = set; then
12886 echo $ECHO_N "(cached) $ECHO_C" >&6
12887else
12888 cat >conftest.$ac_ext <<_ACEOF
12889
ba7da42a 12890#include <sys/cdefs.h>
de4fb767 12891#include <sys/signal.h>
4f6d8cc8
GK
12892#include <ucontext.h>
12893int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
12894
12895_ACEOF
12896rm -f conftest.$ac_objext
ab22c1fa
CF
12897if { (ac_try="$ac_compile"
12898case "(($ac_try" in
12899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12900 *) ac_try_echo=$ac_try;;
12901esac
12902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12903 (eval "$ac_compile") 2>conftest.er1
4f6d8cc8
GK
12904 ac_status=$?
12905 grep -v '^ *+' conftest.er1 >conftest.err
12906 rm -f conftest.er1
12907 cat conftest.err >&5
12908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
12909 (exit $ac_status); } && {
12910 test -z "$ac_c_werror_flag" ||
12911 test ! -s conftest.err
12912 } && test -s conftest.$ac_objext; then
4f6d8cc8
GK
12913 gcc_cv_mcontext_underscores=no
12914else
12915 echo "$as_me: failed program was:" >&5
12916sed 's/^/| /' conftest.$ac_ext >&5
12917
ab22c1fa 12918 gcc_cv_mcontext_underscores=yes
4f6d8cc8 12919fi
ab22c1fa
CF
12920
12921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4f6d8cc8 12922fi
ab22c1fa
CF
12923{ echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5
12924echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6; }
4f6d8cc8
GK
12925 if test $gcc_cv_mcontext_underscores = yes; then
12926
12927cat >>confdefs.h <<\_ACEOF
12928#define HAS_MCONTEXT_T_UNDERSCORES
12929_ACEOF
12930
12931 fi
12932 ;;
12933esac
12934
8bb915b6
NN
12935# ---------
12936# Threading
12937# ---------
12938
c2e494a8 12939# Check if a valid thread package
615be2cf 12940case ${enable_threads} in
c2e494a8
NN
12941 "" | no)
12942 # No threads
12943 target_thread_file='single'
12944 ;;
12945 yes)
12946 # default
12947 target_thread_file='single'
12948 ;;
18167442 12949 aix | dce | gnat | irix | posix | posix95 | rtems | \
769e49eb 12950 single | solaris | vxworks | win32 )
615be2cf 12951 target_thread_file=${enable_threads}
c2e494a8
NN
12952 ;;
12953 *)
615be2cf 12954 echo "${enable_threads} is an unknown thread package" 1>&2
c2e494a8
NN
12955 exit 1
12956 ;;
12957esac
12958
12959if test x${thread_file} = x; then
12960 # No thread file set by target-specific clauses in config.gcc,
12961 # so use file chosen by default logic above
12962 thread_file=${target_thread_file}
861bb6c1
JL
12963fi
12964
8bb915b6
NN
12965# Make gthr-default.h if we have a thread file.
12966gthread_flags=
12967if test $thread_file != single; then
12968 rm -f gthr-default.h
12969 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
12970 gthread_flags=-DHAVE_GTHR_DEFAULT
12971fi
12972
12973
12974# --------
12975# UNSORTED
12976# --------
12977
18fbf599 12978use_cxa_atexit=no
2121a768
JT
12979if test x$enable___cxa_atexit = xyes || \
12980 test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then
18fbf599 12981 if test x$host = x$target; then
97388150
DS
12982 case $host in
12983 # mingw32 doesn't have __cxa_atexit but uses atexit registration
12984 # keyed to flag_use_cxa_atexit
12985 *-*-mingw32*)
12986 use_cxa_atexit=yes
12987 ;;
12988 *)
ab22c1fa
CF
12989 { echo "$as_me:$LINENO: checking for __cxa_atexit" >&5
12990echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6; }
354b7da5
DH
12991if test "${ac_cv_func___cxa_atexit+set}" = set; then
12992 echo $ECHO_N "(cached) $ECHO_C" >&6
12993else
12994 cat >conftest.$ac_ext <<_ACEOF
354b7da5
DH
12995/* confdefs.h. */
12996_ACEOF
12997cat confdefs.h >>conftest.$ac_ext
12998cat >>conftest.$ac_ext <<_ACEOF
12999/* end confdefs.h. */
86da66b5
HPN
13000/* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit.
13001 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13002#define __cxa_atexit innocuous___cxa_atexit
13003
354b7da5
DH
13004/* System header to define __stub macros and hopefully few prototypes,
13005 which can conflict with char __cxa_atexit (); below.
13006 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13007 <limits.h> exists even on freestanding compilers. */
86da66b5 13008
354b7da5
DH
13009#ifdef __STDC__
13010# include <limits.h>
13011#else
13012# include <assert.h>
13013#endif
86da66b5
HPN
13014
13015#undef __cxa_atexit
13016
ab22c1fa
CF
13017/* Override any GCC internal prototype to avoid an error.
13018 Use char because int might match the return type of a GCC
13019 builtin and then its argument prototype would still apply. */
354b7da5
DH
13020#ifdef __cplusplus
13021extern "C"
354b7da5 13022#endif
354b7da5
DH
13023char __cxa_atexit ();
13024/* The GNU C library defines this for functions which it implements
13025 to always fail with ENOSYS. Some functions are actually named
13026 something starting with __ and the normal name is an alias. */
ab22c1fa 13027#if defined __stub___cxa_atexit || defined __stub_____cxa_atexit
354b7da5 13028choke me
354b7da5
DH
13029#endif
13030
13031int
13032main ()
13033{
ab22c1fa 13034return __cxa_atexit ();
354b7da5
DH
13035 ;
13036 return 0;
13037}
13038_ACEOF
13039rm -f conftest.$ac_objext conftest$ac_exeext
ab22c1fa
CF
13040if { (ac_try="$ac_link"
13041case "(($ac_try" in
13042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13043 *) ac_try_echo=$ac_try;;
13044esac
13045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13046 (eval "$ac_link") 2>conftest.er1
354b7da5 13047 ac_status=$?
86da66b5
HPN
13048 grep -v '^ *+' conftest.er1 >conftest.err
13049 rm -f conftest.er1
13050 cat conftest.err >&5
354b7da5 13051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
13052 (exit $ac_status); } && {
13053 test -z "$ac_c_werror_flag" ||
13054 test ! -s conftest.err
13055 } && test -s conftest$ac_exeext &&
13056 $as_test_x conftest$ac_exeext; then
354b7da5
DH
13057 ac_cv_func___cxa_atexit=yes
13058else
13059 echo "$as_me: failed program was:" >&5
13060sed 's/^/| /' conftest.$ac_ext >&5
13061
ab22c1fa 13062 ac_cv_func___cxa_atexit=no
354b7da5 13063fi
ab22c1fa
CF
13064
13065rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
86da66b5 13066 conftest$ac_exeext conftest.$ac_ext
354b7da5 13067fi
ab22c1fa
CF
13068{ echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5
13069echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6; }
354b7da5 13070if test $ac_cv_func___cxa_atexit = yes; then
18fbf599
PB
13071 use_cxa_atexit=yes
13072else
13073 echo "__cxa_atexit can't be enabled on this target"
13074fi
13075
5f60e48f 13076 ;;
97388150 13077 esac
18fbf599
PB
13078 else
13079 # We can't check for __cxa_atexit when building a cross, so assume
13080 # it is available
13081 use_cxa_atexit=yes
13082 fi
13083 if test x$use_cxa_atexit = xyes; then
ba479fd2
NN
13084
13085cat >>confdefs.h <<\_ACEOF
c7b5e395 13086#define DEFAULT_USE_CXA_ATEXIT 2
ba479fd2 13087_ACEOF
2121a768 13088
18fbf599 13089 fi
2121a768
JT
13090fi
13091
e64f5acf
SE
13092use_getipinfo=yes
13093if test x$with_system_libunwind = xyes; then
13094 if test x$host = x$target; then
ab22c1fa
CF
13095 { echo "$as_me:$LINENO: checking for library containing _Unwind_GetIPInfo" >&5
13096echo $ECHO_N "checking for library containing _Unwind_GetIPInfo... $ECHO_C" >&6; }
e64f5acf
SE
13097if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then
13098 echo $ECHO_N "(cached) $ECHO_C" >&6
13099else
13100 ac_func_search_save_LIBS=$LIBS
e64f5acf
SE
13101cat >conftest.$ac_ext <<_ACEOF
13102/* confdefs.h. */
13103_ACEOF
13104cat confdefs.h >>conftest.$ac_ext
13105cat >>conftest.$ac_ext <<_ACEOF
13106/* end confdefs.h. */
13107
ab22c1fa
CF
13108/* Override any GCC internal prototype to avoid an error.
13109 Use char because int might match the return type of a GCC
13110 builtin and then its argument prototype would still apply. */
e64f5acf
SE
13111#ifdef __cplusplus
13112extern "C"
13113#endif
e64f5acf
SE
13114char _Unwind_GetIPInfo ();
13115int
13116main ()
13117{
ab22c1fa 13118return _Unwind_GetIPInfo ();
e64f5acf
SE
13119 ;
13120 return 0;
13121}
13122_ACEOF
ab22c1fa
CF
13123for ac_lib in '' unwind; do
13124 if test -z "$ac_lib"; then
13125 ac_res="none required"
13126 else
13127 ac_res=-l$ac_lib
13128 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13129 fi
13130 rm -f conftest.$ac_objext conftest$ac_exeext
13131if { (ac_try="$ac_link"
13132case "(($ac_try" in
13133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13134 *) ac_try_echo=$ac_try;;
13135esac
13136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13137 (eval "$ac_link") 2>conftest.er1
e64f5acf
SE
13138 ac_status=$?
13139 grep -v '^ *+' conftest.er1 >conftest.err
13140 rm -f conftest.er1
13141 cat conftest.err >&5
13142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
13143 (exit $ac_status); } && {
13144 test -z "$ac_c_werror_flag" ||
13145 test ! -s conftest.err
13146 } && test -s conftest$ac_exeext &&
13147 $as_test_x conftest$ac_exeext; then
13148 ac_cv_search__Unwind_GetIPInfo=$ac_res
e64f5acf
SE
13149else
13150 echo "$as_me: failed program was:" >&5
13151sed 's/^/| /' conftest.$ac_ext >&5
13152
8b1f719a 13153
ab22c1fa 13154fi
a3bba767 13155
ab22c1fa
CF
13156rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13157 conftest$ac_exeext
13158 if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then
13159 break
a3bba767 13160fi
ab22c1fa
CF
13161done
13162if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then
13163 :
13164else
13165 ac_cv_search__Unwind_GetIPInfo=no
a6ccdbab 13166fi
ab22c1fa 13167rm conftest.$ac_ext
a6ccdbab
EC
13168LIBS=$ac_func_search_save_LIBS
13169fi
ab22c1fa
CF
13170{ echo "$as_me:$LINENO: result: $ac_cv_search__Unwind_GetIPInfo" >&5
13171echo "${ECHO_T}$ac_cv_search__Unwind_GetIPInfo" >&6; }
13172ac_res=$ac_cv_search__Unwind_GetIPInfo
13173if test "$ac_res" != no; then
13174 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
a6ccdbab
EC
13175
13176else
13177 use_getipinfo=no
13178fi
13179
13180 fi
13181fi
13182
13183if test x$use_getipinfo = xyes; then
13184
13185cat >>confdefs.h <<\_ACEOF
13186#define HAVE_GETIPINFO 1
e64f5acf
SE
13187_ACEOF
13188
13189else
13190 echo "The system unwind library does not support _Unwind_GetIPInfo."
13191fi
13192
a5381466 13193# Look for a file containing extra machine modes.
1c0ca89d
ZW
13194if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then
13195 extra_modes_file='$(srcdir)'/config/${extra_modes}
ba479fd2
NN
13196
13197
13198cat >>confdefs.h <<_ACEOF
e22340b0 13199#define EXTRA_MODES_FILE "config/$extra_modes"
ba479fd2 13200_ACEOF
a5381466
ZW
13201
13202fi
13203
75685792
RS
13204# Convert extra_options into a form suitable for Makefile use.
13205extra_opt_files=
13206for f in $extra_options; do
13207 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
13208done
13209
13210
b7cb92ad 13211# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 13212# the first file included by config.h.
4977bab6 13213# If host=build, it is correct to have bconfig include auto-host.h
ba479fd2 13214# as well. If host!=build, we are in error and need to do more
db81d74a 13215# work to find out the build config parameters.
75bffa71 13216if test x$host = x$build
db81d74a 13217then
eaf4e618 13218 build_auto=auto-host.h
b7cb92ad
JL
13219else
13220 # We create a subdir, then run autoconf in the subdir.
13221 # To prevent recursion we set host and build for the new
13222 # invocation of configure to the build for this invocation
ba479fd2 13223 # of configure.
b7cb92ad
JL
13224 tempdir=build.$$
13225 rm -rf $tempdir
13226 mkdir $tempdir
13227 cd $tempdir
13228 case ${srcdir} in
255b8a49 13229 /* | A-Za-z:\\/* ) realsrcdir=${srcdir};;
b7cb92ad
JL
13230 *) realsrcdir=../${srcdir};;
13231 esac
d920e825
L
13232 saved_CFLAGS="${CFLAGS}"
13233 CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
13234 ${realsrcdir}/configure \
33e70558 13235 --enable-languages=${enable_languages-all} \
534d0cc0 13236 --target=$target_alias --host=$build_alias --build=$build_alias
d920e825 13237 CFLAGS="${saved_CFLAGS}"
b7cb92ad
JL
13238
13239 # We just finished tests for the build machine, so rename
13240 # the file auto-build.h in the gcc directory.
13241 mv auto-host.h ../auto-build.h
13242 cd ..
13243 rm -rf $tempdir
eaf4e618 13244 build_auto=auto-build.h
db81d74a
RH
13245fi
13246
06f0b04c 13247
eaf4e618 13248tm_file="${tm_file} defaults.h"
4977bab6
ZW
13249tm_p_file="${tm_p_file} tm-preds.h"
13250host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
13251build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
49691411 13252# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
b4862477 13253# put this back in temporarily.
232b67d9 13254xm_file="auto-host.h ansidecl.h ${xm_file}"
0056a9b5 13255
34a86c2b
NN
13256# --------
13257# UNSORTED
13258# --------
13259
cc1e60ea 13260# Compile in configure arguments.
8105825d 13261if test -f configargs.h ; then
cc1e60ea 13262 # Being re-configured.
022dae81 13263 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
cc1e60ea
JM
13264 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
13265else
13266 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
13267fi
eeae7b41
DJ
13268
13269# Double all backslashes and backslash all quotes to turn
13270# gcc_config_arguments into a C string.
13271sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out
13272$gcc_config_arguments
13273EOF
13274gcc_config_arguments_str=`cat conftest.out`
13275rm -f conftest.out
13276
cc1e60ea
JM
13277cat > configargs.h <<EOF
13278/* Generated automatically. */
eeae7b41 13279static const char configuration_arguments[] = "$gcc_config_arguments_str";
a6687d2b 13280static const char thread_model[] = "$thread_file";
7816bea0
DJ
13281
13282static const struct {
13283 const char *name, *value;
13284} configure_default_options[] = $configure_default_options;
cc1e60ea
JM
13285EOF
13286
ab87f8c8 13287# Internationalization
18fc9bd4
RG
13288# If we haven't got the data from the intl directory,
13289# assume NLS is disabled.
13290USE_NLS=no
13291LIBINTL=
13292LIBINTL_DEP=
13293INCINTL=
13294XGETTEXT=
13295GMSGFMT=
13296POSUB=
13297
13298if test -f ../intl/config.intl; then
13299 . ../intl/config.intl
13300fi
ab22c1fa
CF
13301{ echo "$as_me:$LINENO: checking whether NLS is requested" >&5
13302echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6; }
18fc9bd4 13303if test x"$USE_NLS" != xyes; then
ab22c1fa
CF
13304 { echo "$as_me:$LINENO: result: no" >&5
13305echo "${ECHO_T}no" >&6; }
18fc9bd4 13306else
ab22c1fa
CF
13307 { echo "$as_me:$LINENO: result: yes" >&5
13308echo "${ECHO_T}yes" >&6; }
18fc9bd4
RG
13309
13310cat >>confdefs.h <<\_ACEOF
13311#define ENABLE_NLS 1
13312_ACEOF
13313
13314
ab22c1fa
CF
13315 { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
13316echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; }
18fc9bd4
RG
13317 # Look for .po and .gmo files in the source directory.
13318 CATALOGS=
13319 XLINGUAS=
13320 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
13321 # If there aren't any .gmo files the shell will give us the
13322 # literal string "../path/to/srcdir/po/*.gmo" which has to be
13323 # weeded out.
13324 case "$cat" in *\**)
13325 continue;;
13326 esac
13327 # The quadruple backslash is collapsed to a double backslash
13328 # by the backticks, then collapsed again by the double quotes,
13329 # leaving us with one backslash in the sed expression (right
13330 # before the dot that mustn't act as a wildcard).
13331 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
13332 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
13333 # The user is allowed to set LINGUAS to a list of languages to
13334 # install catalogs for. If it's empty that means "all of them."
13335 if test "x$LINGUAS" = x; then
13336 CATALOGS="$CATALOGS $cat"
13337 XLINGUAS="$XLINGUAS $lang"
13338 else
13339 case "$LINGUAS" in *$lang*)
13340 CATALOGS="$CATALOGS $cat"
13341 XLINGUAS="$XLINGUAS $lang"
13342 ;;
13343 esac
13344 fi
13345 done
13346 LINGUAS="$XLINGUAS"
ab22c1fa
CF
13347 { echo "$as_me:$LINENO: result: $LINGUAS" >&5
13348echo "${ECHO_T}$LINGUAS" >&6; }
18fc9bd4
RG
13349
13350
13351 DATADIRNAME=share
13352
13353 INSTOBJEXT=.mo
13354
13355 GENCAT=gencat
13356
13357 CATOBJEXT=.gmo
13358
13359fi
861bb6c1 13360
56694dd9
ZW
13361# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
13362# -liconv on the link line twice.
13363case "$LIBINTL" in *$LIBICONV*)
13364 LIBICONV= ;;
13365esac
dc6746e7 13366
ab22c1fa 13367# Check whether --enable-secureplt was given.
7f970b70 13368if test "${enable_secureplt+set}" = set; then
ab22c1fa
CF
13369 enableval=$enable_secureplt;
13370fi
7f970b70 13371
7f970b70 13372
56694dd9 13373# Windows32 Registry support for specifying GCC installation paths.
ab22c1fa 13374# Check whether --enable-win32-registry was given.
56694dd9 13375if test "${enable_win32_registry+set}" = set; then
ab22c1fa
CF
13376 enableval=$enable_win32_registry;
13377fi
dc6746e7 13378
ba479fd2 13379
a1286ef5
ZW
13380case $host_os in
13381 win32 | pe | cygwin* | mingw32* | uwin*)
13382 if test "x$enable_win32_registry" != xno; then
ab22c1fa
CF
13383 { echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5
13384echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6; }
ba479fd2
NN
13385if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
13386 echo $ECHO_N "(cached) $ECHO_C" >&6
13387else
13388 ac_func_search_save_LIBS=$LIBS
ba479fd2 13389cat >conftest.$ac_ext <<_ACEOF
ba479fd2
NN
13390/* confdefs.h. */
13391_ACEOF
13392cat confdefs.h >>conftest.$ac_ext
13393cat >>conftest.$ac_ext <<_ACEOF
13394/* end confdefs.h. */
861bb6c1 13395
ab22c1fa
CF
13396/* Override any GCC internal prototype to avoid an error.
13397 Use char because int might match the return type of a GCC
13398 builtin and then its argument prototype would still apply. */
ba479fd2
NN
13399#ifdef __cplusplus
13400extern "C"
13401#endif
ba479fd2
NN
13402char RegOpenKeyExA ();
13403int
13404main ()
13405{
ab22c1fa 13406return RegOpenKeyExA ();
ba479fd2
NN
13407 ;
13408 return 0;
13409}
13410_ACEOF
ab22c1fa
CF
13411for ac_lib in '' advapi32; do
13412 if test -z "$ac_lib"; then
13413 ac_res="none required"
13414 else
13415 ac_res=-l$ac_lib
13416 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13417 fi
13418 rm -f conftest.$ac_objext conftest$ac_exeext
13419if { (ac_try="$ac_link"
13420case "(($ac_try" in
13421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13422 *) ac_try_echo=$ac_try;;
13423esac
13424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13425 (eval "$ac_link") 2>conftest.er1
ba479fd2 13426 ac_status=$?
86da66b5
HPN
13427 grep -v '^ *+' conftest.er1 >conftest.err
13428 rm -f conftest.er1
13429 cat conftest.err >&5
ba479fd2 13430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
13431 (exit $ac_status); } && {
13432 test -z "$ac_c_werror_flag" ||
13433 test ! -s conftest.err
13434 } && test -s conftest$ac_exeext &&
13435 $as_test_x conftest$ac_exeext; then
13436 ac_cv_search_RegOpenKeyExA=$ac_res
ab87f8c8 13437else
ba479fd2
NN
13438 echo "$as_me: failed program was:" >&5
13439sed 's/^/| /' conftest.$ac_ext >&5
13440
8b1f719a 13441
ab22c1fa 13442fi
a3bba767 13443
ab22c1fa
CF
13444rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13445 conftest$ac_exeext
13446 if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
13447 break
a3bba767 13448fi
ab22c1fa
CF
13449done
13450if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then
13451 :
13452else
13453 ac_cv_search_RegOpenKeyExA=no
dd7f7a6e 13454fi
ab22c1fa 13455rm conftest.$ac_ext
dd7f7a6e
EC
13456LIBS=$ac_func_search_save_LIBS
13457fi
ab22c1fa
CF
13458{ echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5
13459echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6; }
13460ac_res=$ac_cv_search_RegOpenKeyExA
13461if test "$ac_res" != no; then
13462 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
dd7f7a6e
EC
13463
13464else
13465 enable_win32_registry=no
13466fi
13467
13468 fi
13469
13470 if test "x$enable_win32_registry" != xno; then
13471
13472cat >>confdefs.h <<\_ACEOF
13473#define ENABLE_WIN32_REGISTRY 1
13474_ACEOF
13475
13476
13477 if test "x$enable_win32_registry" != xyes \
13478 && test "x$enable_win32_registry" != x; then
13479
13480cat >>confdefs.h <<_ACEOF
13481#define WIN32_REGISTRY_KEY "$enable_win32_registry"
13482_ACEOF
13483
13484 fi
13485 fi
13486 ;;
13487esac
ab87f8c8 13488
56694dd9
ZW
13489# Get an absolute path to the GCC top-level source directory
13490holddir=`${PWDCMD-pwd}`
13491cd $srcdir
13492topdir=`${PWDCMD-pwd}`
13493cd $holddir
ab87f8c8 13494
56694dd9 13495# Conditionalize the makefile for this host machine.
2ed26f6b 13496xmake_file=
c406e779 13497for f in ${host_xmake_file}
56694dd9
ZW
13498do
13499 if test -f ${srcdir}/config/$f
13500 then
2ed26f6b 13501 xmake_file="${xmake_file} \$(srcdir)/config/$f"
56694dd9
ZW
13502 fi
13503done
093e61a6 13504
56694dd9 13505# Conditionalize the makefile for this target machine.
2ed26f6b 13506tmake_file_=
c406e779 13507for f in ${tmake_file}
56694dd9
ZW
13508do
13509 if test -f ${srcdir}/config/$f
13510 then
2ed26f6b 13511 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
56694dd9
ZW
13512 fi
13513done
2ed26f6b 13514tmake_file="${tmake_file_}"
71a94577 13515
5395b47b
NN
13516# This is a terrible hack which will go away some day.
13517host_cc_for_libada=${CC}
1e3fad21
NN
13518
13519
ab87f8c8
JL
13520out_object_file=`basename $out_file .c`.o
13521
75685792
RS
13522tm_file_list="options.h"
13523tm_include_list="options.h"
ab87f8c8 13524for f in $tm_file; do
64ccbc99 13525 case $f in
3ca43df7
RS
13526 ./* )
13527 f=`echo $f | sed 's/^..//'`
13528 tm_file_list="${tm_file_list} $f"
13529 tm_include_list="${tm_include_list} $f"
13530 ;;
d02af173 13531 defaults.h )
e22340b0
ZW
13532 tm_file_list="${tm_file_list} \$(srcdir)/$f"
13533 tm_include_list="${tm_include_list} $f"
13534 ;;
13535 * )
13536 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
13537 tm_include_list="${tm_include_list} config/$f"
13538 ;;
64ccbc99 13539 esac
ab87f8c8
JL
13540done
13541
11642c3a 13542tm_p_file_list=
e22340b0 13543tm_p_include_list=
11642c3a 13544for f in $tm_p_file; do
4977bab6
ZW
13545 case $f in
13546 tm-preds.h )
e22340b0
ZW
13547 tm_p_file_list="${tm_p_file_list} $f"
13548 tm_p_include_list="${tm_p_include_list} $f"
13549 ;;
13550 * )
13551 tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f"
13552 tm_p_include_list="${tm_p_include_list} config/$f"
13553 esac
13554done
13555
13556xm_file_list=
13557xm_include_list=
13558for f in $xm_file; do
13559 case $f in
13560 ansidecl.h )
13561 xm_file_list="${xm_file_list} \$(srcdir)/../include/$f"
13562 xm_include_list="${xm_include_list} $f"
13563 ;;
13564 auto-host.h )
13565 xm_file_list="${xm_file_list} $f"
13566 xm_include_list="${xm_include_list} $f"
13567 ;;
13568 * )
13569 xm_file_list="${xm_file_list} \$(srcdir)/config/$f"
13570 xm_include_list="${xm_include_list} config/$f"
13571 ;;
4977bab6 13572 esac
11642c3a
ZW
13573done
13574
ab87f8c8 13575host_xm_file_list=
e22340b0 13576host_xm_include_list=
ab87f8c8 13577for f in $host_xm_file; do
64ccbc99 13578 case $f in
d02af173 13579 ansidecl.h )
e22340b0
ZW
13580 host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f"
13581 host_xm_include_list="${host_xm_include_list} $f"
13582 ;;
e2500fed 13583 auto-host.h )
e22340b0
ZW
13584 host_xm_file_list="${host_xm_file_list} $f"
13585 host_xm_include_list="${host_xm_include_list} $f"
13586 ;;
13587 * )
13588 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
13589 host_xm_include_list="${host_xm_include_list} config/$f"
13590 ;;
64ccbc99 13591 esac
ab87f8c8
JL
13592done
13593
13594build_xm_file_list=
13595for f in $build_xm_file; do
64ccbc99 13596 case $f in
d02af173 13597 ansidecl.h )
e22340b0
ZW
13598 build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f"
13599 build_xm_include_list="${build_xm_include_list} $f"
13600 ;;
e2500fed 13601 auto-build.h | auto-host.h )
e22340b0
ZW
13602 build_xm_file_list="${build_xm_file_list} $f"
13603 build_xm_include_list="${build_xm_include_list} $f"
13604 ;;
13605 * )
13606 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
13607 build_xm_include_list="${build_xm_include_list} config/$f"
13608 ;;
64ccbc99 13609 esac
ab87f8c8
JL
13610done
13611
2989d30c
GK
13612# Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a
13613# cross-compiler which does not use the native headers and libraries.
a078a589 13614# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
ba479fd2
NN
13615CROSS=
13616ALL=all.internal
13617SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
13618
13619if test "x$with_build_sysroot" != x; then
14da6073 13620 build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
b28250ab
MM
13621else
13622 # This value is used, even on a native system, because
13623 # CROSS_SYSTEM_HEADER_DIR is just
13624 # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
13625 build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
13626fi
13627
ab87f8c8
JL
13628if test x$host != x$target
13629then
2989d30c 13630 CROSS="-DCROSS_DIRECTORY_STRUCTURE"
a078a589 13631 ALL=all.cross
160633c6 13632 SYSTEM_HEADER_DIR=$build_system_header_dir
343f59d9 13633 case "$host","$target" in
3a7e8b87
GK
13634 # Darwin crosses can use the host system's libraries and headers,
13635 # because of the fat library support. Of course, it must be the
13636 # same version of Darwin on both sides. Allow the user to
13637 # just say --target=foo-darwin without a version number to mean
13638 # "the version on this system".
13639 *-*-darwin*,*-*-darwin*)
13640 hostos=`echo $host | sed 's/.*-darwin/darwin/'`
13641 targetos=`echo $target | sed 's/.*-darwin/darwin/'`
13642 if test $hostos = $targetos -o $targetos = darwin ; then
13643 CROSS=
13644 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
13645 with_headers=yes
13646 fi
13647 ;;
13648
343f59d9
AM
13649 i?86-*-*,x86_64-*-* \
13650 | powerpc*-*-*,powerpc64*-*-*)
13651 CROSS="$CROSS -DNATIVE_CROSS" ;;
13652 esac
7a615b25 13653elif test "x$TARGET_SYSTEM_ROOT" != x; then
b28250ab 13654 SYSTEM_HEADER_DIR=$build_system_header_dir
ab87f8c8
JL
13655fi
13656
b39d221a
EC
13657# If this is a cross-compiler that does not
13658# have its own set of headers then define
13659# inhibit_libc
13660
dc06db20
R
13661# If this is using newlib, without having the headers available now,
13662# then define inhibit_libc in LIBGCC2_CFLAGS.
fecd6201
ZW
13663# This prevents libgcc2 from containing any code which requires libc
13664# support.
160633c6 13665inhibit_libc=false
dc06db20
R
13666if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
13667 test x$with_newlib = xyes ; } &&
e50084fa 13668 { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
160633c6 13669 inhibit_libc=true
b39d221a
EC
13670fi
13671
13672
a078a589
ZW
13673# When building gcc with a cross-compiler, we need to adjust things so
13674# that the generator programs are still built with the native compiler.
13675# Also, we cannot run fixincludes or fix-header.
a078a589
ZW
13676
13677# These are the normal (build=host) settings:
ba479fd2
NN
13678CC_FOR_BUILD='$(CC)'
13679BUILD_CFLAGS='$(ALL_CFLAGS)'
ba479fd2 13680STMP_FIXINC=stmp-fixinc
8ad9fb33
AP
13681
13682# Possibly disable fixproto, on a per-target basis.
13683case ${use_fixproto} in
13684 no)
13685 STMP_FIXPROTO=
13686 ;;
13687 yes)
13688 STMP_FIXPROTO=stmp-fixproto
13689 ;;
13690esac
13691
a078a589 13692
83599948
NS
13693# And these apply if build != host, or we are generating coverage data
13694if test x$build != x$host || test "x$coverage_flags" != x
ab87f8c8 13695then
b11e4747 13696 BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
a078a589 13697
7a615b25 13698 if test "x$TARGET_SYSTEM_ROOT" = x; then
d8e5117d 13699 if test "x$STMP_FIXPROTO" != x; then
de253ca4
GK
13700 STMP_FIXPROTO=stmp-install-fixproto
13701 fi
7a615b25 13702 fi
ab87f8c8
JL
13703fi
13704
13705# Expand extra_headers to include complete path.
13706# This substitutes for lots of t-* files.
13707extra_headers_list=
b1ef58c8
NN
13708# Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers.
13709for file in ${extra_headers} ; do
13710 extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
13711done
ab87f8c8 13712
1617e5ee
GK
13713# If use_gcc_tgmath is set, append ginclude/tgmath.h.
13714if test x"$use_gcc_tgmath" = xyes
13715then extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/tgmath.h"
13716fi
13717
c38f02df
ILT
13718# Define collect2 in Makefile.
13719case $host_can_use_collect2 in
13720 no) collect2= ;;
13721 *) collect2='collect2$(exeext)' ;;
13722esac
13723
13724
ab87f8c8 13725# Add a definition of USE_COLLECT2 if system wants one.
34a86c2b
NN
13726case $use_collect2 in
13727 no) use_collect2= ;;
13728 "") ;;
ba479fd2 13729 *)
34a86c2b
NN
13730 host_xm_defines="${host_xm_defines} USE_COLLECT2"
13731 xm_defines="${xm_defines} USE_COLLECT2"
c38f02df
ILT
13732 case $host_can_use_collect2 in
13733 no)
13734 { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5
13735echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;}
13736 { (exit 1); exit 1; }; }
13737 ;;
13738 esac
34a86c2b
NN
13739 ;;
13740esac
ab87f8c8 13741
8bb915b6
NN
13742# ---------------------------
13743# Assembler & linker features
13744# ---------------------------
13745
d869a8c4
NN
13746# Identify the assembler which will work hand-in-glove with the newly
13747# built GCC, so that we can examine its features. This is the assembler
13748# which will be driven by the driver program.
13749#
13750# If build != host, and we aren't building gas in-tree, we identify a
13751# build->target assembler and hope that it will have the same features
13752# as the host->target assembler we'll be using.
981d4858
JM
13753gcc_cv_gas_major_version=
13754gcc_cv_gas_minor_version=
ab87f8c8 13755gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
e8b05380
PB
13756
13757if test "${gcc_cv_as+set}" = set; then
13758 :
13759else
13760
ab87f8c8
JL
13761if test -x "$DEFAULT_ASSEMBLER"; then
13762 gcc_cv_as="$DEFAULT_ASSEMBLER"
34a86c2b 13763elif test -f $gcc_cv_as_gas_srcdir/configure.in \
08d105fa
AO
13764 && test -f ../gas/Makefile \
13765 && test x$build = x$host; then
e8b05380
PB
13766 gcc_cv_as=../gas/as-new$build_exeext
13767elif test -x as$build_exeext; then
13768 # Build using assembler in the current directory.
13769 gcc_cv_as=./as$build_exeext
13770elif test -x $AS_FOR_TARGET; then
13771 gcc_cv_as="$AS_FOR_TARGET"
13772else
13773 # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args.
13774set dummy $AS_FOR_TARGET; ac_word=$2
ab22c1fa
CF
13775{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13776echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e8b05380
PB
13777if test "${ac_cv_path_gcc_cv_as+set}" = set; then
13778 echo $ECHO_N "(cached) $ECHO_C" >&6
13779else
13780 case $gcc_cv_as in
13781 [\\/]* | ?:[\\/]*)
13782 ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path.
13783 ;;
13784 *)
13785 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13786for as_dir in $PATH
13787do
13788 IFS=$as_save_IFS
13789 test -z "$as_dir" && as_dir=.
13790 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 13791 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380
PB
13792 ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext"
13793 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13794 break 2
13795 fi
13796done
13797done
ab22c1fa 13798IFS=$as_save_IFS
e8b05380
PB
13799
13800 ;;
13801esac
13802fi
13803gcc_cv_as=$ac_cv_path_gcc_cv_as
e8b05380 13804if test -n "$gcc_cv_as"; then
ab22c1fa
CF
13805 { echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13806echo "${ECHO_T}$gcc_cv_as" >&6; }
e8b05380 13807else
ab22c1fa
CF
13808 { echo "$as_me:$LINENO: result: no" >&5
13809echo "${ECHO_T}no" >&6; }
e8b05380
PB
13810fi
13811
ab22c1fa 13812
e8b05380
PB
13813fi
13814fi
13815
13816
13817ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
13818
be0fe523
PB
13819case "$ORIGINAL_AS_FOR_TARGET" in
13820 ./as | ./as$build_exeext) ;;
ab22c1fa 13821 *) ac_config_files="$ac_config_files as:exec-tool.in"
be0fe523
PB
13822 ;;
13823esac
e8b05380 13824
ab22c1fa
CF
13825{ echo "$as_me:$LINENO: checking what assembler to use" >&5
13826echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6; }
e8b05380 13827if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
08d105fa
AO
13828 # Single tree build which includes gas. We want to prefer it
13829 # over whatever linker top-level may have detected, since
13830 # we'll use what we're building after installation anyway.
ab22c1fa
CF
13831 { echo "$as_me:$LINENO: result: newly built gas" >&5
13832echo "${ECHO_T}newly built gas" >&6; }
ad9c4d9f
NN
13833 in_tree_gas=yes
13834 gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
13835for f in $gcc_cv_as_bfd_srcdir/configure \
13836 $gcc_cv_as_gas_srcdir/configure \
13837 $gcc_cv_as_gas_srcdir/configure.in \
13838 $gcc_cv_as_gas_srcdir/Makefile.in ; do
58ea87a9 13839 gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
ad9c4d9f
NN
13840 if test x$gcc_cv_gas_version != x; then
13841 break
13842 fi
13843done
13844gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
13845gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13846gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
5aaaf0e8
NN
13847case $gcc_cv_gas_patch_version in
13848 "") gcc_cv_gas_patch_version="0" ;;
13849esac
8ada417f
ZW
13850gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
13851 + $gcc_cv_gas_minor_version \) \* 1000 \
13852 + $gcc_cv_gas_patch_version`
ad9c4d9f 13853
5408ac6c
HPN
13854 in_tree_gas_is_elf=no
13855 if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
13856 || (grep 'obj_format = multi' ../gas/Makefile \
13857 && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
13858 then
13859 in_tree_gas_is_elf=yes
13860 fi
e8b05380 13861else
ab22c1fa
CF
13862 { echo "$as_me:$LINENO: result: $gcc_cv_as" >&5
13863echo "${ECHO_T}$gcc_cv_as" >&6; }
e8b05380 13864 in_tree_gas=no
981d4858 13865fi
9e423e6d 13866
e8b05380
PB
13867# Identify the linker which will work hand-in-glove with the newly
13868# built GCC, so that we can examine its features. This is the linker
13869# which will be driven by the driver program.
9f18db39 13870#
e8b05380
PB
13871# If build != host, and we aren't building gas in-tree, we identify a
13872# build->target linker and hope that it will have the same features
13873# as the host->target linker we'll be using.
13874gcc_cv_gld_major_version=
13875gcc_cv_gld_minor_version=
13876gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
13877gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
9f18db39 13878
e8b05380
PB
13879if test "${gcc_cv_ld+set}" = set; then
13880 :
9f18db39 13881else
9f18db39 13882
e8b05380
PB
13883if test -x "$DEFAULT_LINKER"; then
13884 gcc_cv_ld="$DEFAULT_LINKER"
13885elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
13886 && test -f ../ld/Makefile \
13887 && test x$build = x$host; then
13888 gcc_cv_ld=../ld/ld-new$build_exeext
13889elif test -x collect-ld$build_exeext; then
13890 # Build using linker in the current directory.
13891 gcc_cv_ld=./collect-ld$build_exeext
13892elif test -x $LD_FOR_TARGET; then
13893 gcc_cv_ld="$LD_FOR_TARGET"
13894else
13895 # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args.
13896set dummy $LD_FOR_TARGET; ac_word=$2
ab22c1fa
CF
13897{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13898echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e8b05380 13899if test "${ac_cv_path_gcc_cv_ld+set}" = set; then
d739199a
DJ
13900 echo $ECHO_N "(cached) $ECHO_C" >&6
13901else
e8b05380 13902 case $gcc_cv_ld in
d739199a 13903 [\\/]* | ?:[\\/]*)
e8b05380 13904 ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path.
d739199a
DJ
13905 ;;
13906 *)
13907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13908for as_dir in $PATH
13909do
13910 IFS=$as_save_IFS
13911 test -z "$as_dir" && as_dir=.
13912 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 13913 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380 13914 ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
13915 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13916 break 2
13917 fi
13918done
13919done
ab22c1fa 13920IFS=$as_save_IFS
d739199a
DJ
13921
13922 ;;
13923esac
13924fi
e8b05380 13925gcc_cv_ld=$ac_cv_path_gcc_cv_ld
e8b05380 13926if test -n "$gcc_cv_ld"; then
ab22c1fa
CF
13927 { echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13928echo "${ECHO_T}$gcc_cv_ld" >&6; }
d739199a 13929else
ab22c1fa
CF
13930 { echo "$as_me:$LINENO: result: no" >&5
13931echo "${ECHO_T}no" >&6; }
d739199a
DJ
13932fi
13933
ab22c1fa 13934
d739199a 13935fi
e8b05380
PB
13936fi
13937
13938
13939ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
13940
be0fe523
PB
13941case "$ORIGINAL_LD_FOR_TARGET" in
13942 ./collect-ld | ./collect-ld$build_exeext) ;;
ab22c1fa 13943 *) ac_config_files="$ac_config_files collect-ld:exec-tool.in"
be0fe523
PB
13944 ;;
13945esac
e8b05380 13946
ab22c1fa
CF
13947{ echo "$as_me:$LINENO: checking what linker to use" >&5
13948echo $ECHO_N "checking what linker to use... $ECHO_C" >&6; }
e8b05380
PB
13949if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
13950 # Single tree build which includes ld. We want to prefer it
13951 # over whatever linker top-level may have detected, since
13952 # we'll use what we're building after installation anyway.
ab22c1fa
CF
13953 { echo "$as_me:$LINENO: result: newly built ld" >&5
13954echo "${ECHO_T}newly built ld" >&6; }
e8b05380
PB
13955 in_tree_ld=yes
13956 in_tree_ld_is_elf=no
13957 if (grep 'EMUL = .*elf' ../ld/Makefile \
13958 || grep 'EMUL = .*linux' ../ld/Makefile \
13959 || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then
13960 in_tree_ld_is_elf=yes
13961 fi
13962 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
13963 do
13964 gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
13965 if test x$gcc_cv_gld_version != x; then
13966 break
13967 fi
13968 done
13969 gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
13970 gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
13971else
ab22c1fa
CF
13972 { echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5
13973echo "${ECHO_T}$gcc_cv_ld" >&6; }
e8b05380
PB
13974 in_tree_ld=no
13975fi
13976
13977# Figure out what nm we will be using.
13978gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
13979if test "${gcc_cv_nm+set}" = set; then
13980 :
13981else
13982
13983if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
13984 && test -f ../binutils/Makefile \
13985 && test x$build = x$host; then
e8b05380
PB
13986 gcc_cv_nm=../binutils/nm-new$build_exeext
13987elif test -x nm$build_exeext; then
13988 gcc_cv_nm=./nm$build_exeext
13989elif test -x $NM_FOR_TARGET; then
13990 gcc_cv_nm="$NM_FOR_TARGET"
13991else
13992 # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args.
13993set dummy $NM_FOR_TARGET; ac_word=$2
ab22c1fa
CF
13994{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13995echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e8b05380 13996if test "${ac_cv_path_gcc_cv_nm+set}" = set; then
d739199a
DJ
13997 echo $ECHO_N "(cached) $ECHO_C" >&6
13998else
e8b05380 13999 case $gcc_cv_nm in
d739199a 14000 [\\/]* | ?:[\\/]*)
e8b05380 14001 ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path.
d739199a
DJ
14002 ;;
14003 *)
14004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14005for as_dir in $PATH
14006do
14007 IFS=$as_save_IFS
14008 test -z "$as_dir" && as_dir=.
14009 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 14010 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380 14011 ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext"
d739199a
DJ
14012 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14013 break 2
14014 fi
14015done
14016done
ab22c1fa 14017IFS=$as_save_IFS
d739199a
DJ
14018
14019 ;;
14020esac
14021fi
e8b05380 14022gcc_cv_nm=$ac_cv_path_gcc_cv_nm
e8b05380 14023if test -n "$gcc_cv_nm"; then
ab22c1fa
CF
14024 { echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
14025echo "${ECHO_T}$gcc_cv_nm" >&6; }
d739199a 14026else
ab22c1fa
CF
14027 { echo "$as_me:$LINENO: result: no" >&5
14028echo "${ECHO_T}no" >&6; }
d739199a
DJ
14029fi
14030
ab22c1fa 14031
d739199a 14032fi
e8b05380 14033fi
d739199a 14034
e8b05380 14035
ab22c1fa
CF
14036{ echo "$as_me:$LINENO: checking what nm to use" >&5
14037echo $ECHO_N "checking what nm to use... $ECHO_C" >&6; }
e8b05380
PB
14038if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
14039 # Single tree build which includes binutils.
ab22c1fa
CF
14040 { echo "$as_me:$LINENO: result: newly built nm" >&5
14041echo "${ECHO_T}newly built nm" >&6; }
e8b05380
PB
14042 in_tree_nm=yes
14043else
ab22c1fa
CF
14044 { echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5
14045echo "${ECHO_T}$gcc_cv_nm" >&6; }
e8b05380
PB
14046 in_tree_nm=no
14047fi
14048
14049ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
14050
be0fe523
PB
14051case "$ORIGINAL_NM_FOR_TARGET" in
14052 ./nm | ./nm$build_exeext) ;;
ab22c1fa 14053 *) ac_config_files="$ac_config_files nm:exec-tool.in"
be0fe523
PB
14054 ;;
14055esac
14056
e8b05380
PB
14057
14058# Figure out what objdump we will be using.
14059if test "${gcc_cv_objdump+set}" = set; then
14060 :
14061else
14062
14063if test -f $gcc_cv_binutils_srcdir/configure.in \
c15b113b
DD
14064 && test -f ../binutils/Makefile \
14065 && test x$build = x$host; then
e8b05380
PB
14066 # Single tree build which includes binutils.
14067 gcc_cv_objdump=../binutils/objdump$build_exeext
14068elif test -x objdump$build_exeext; then
14069 gcc_cv_objdump=./objdump$build_exeext
14070elif test -x $OBJDUMP_FOR_TARGET; then
14071 gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
14072else
14073 # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args.
14074set dummy $OBJDUMP_FOR_TARGET; ac_word=$2
ab22c1fa
CF
14075{ echo "$as_me:$LINENO: checking for $ac_word" >&5
14076echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e8b05380 14077if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then
9f18db39
PB
14078 echo $ECHO_N "(cached) $ECHO_C" >&6
14079else
e8b05380 14080 case $gcc_cv_objdump in
9f18db39 14081 [\\/]* | ?:[\\/]*)
e8b05380 14082 ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path.
9f18db39
PB
14083 ;;
14084 *)
14085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e8b05380 14086for as_dir in $PATH
9f18db39
PB
14087do
14088 IFS=$as_save_IFS
14089 test -z "$as_dir" && as_dir=.
14090 for ac_exec_ext in '' $ac_executable_extensions; do
ab22c1fa 14091 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e8b05380 14092 ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext"
9f18db39
PB
14093 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14094 break 2
14095 fi
14096done
14097done
ab22c1fa 14098IFS=$as_save_IFS
779243f7 14099
9f18db39
PB
14100 ;;
14101esac
14102fi
e8b05380 14103gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump
e8b05380 14104if test -n "$gcc_cv_objdump"; then
ab22c1fa
CF
14105 { echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
14106echo "${ECHO_T}$gcc_cv_objdump" >&6; }
9f18db39 14107else
ab22c1fa
CF
14108 { echo "$as_me:$LINENO: result: no" >&5
14109echo "${ECHO_T}no" >&6; }
9f18db39
PB
14110fi
14111
ab22c1fa 14112
e8b05380
PB
14113fi
14114fi
9f18db39 14115
e8b05380 14116
ab22c1fa
CF
14117{ echo "$as_me:$LINENO: checking what objdump to use" >&5
14118echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6; }
e8b05380
PB
14119if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
14120 # Single tree build which includes binutils.
ab22c1fa
CF
14121 { echo "$as_me:$LINENO: result: newly built objdump" >&5
14122echo "${ECHO_T}newly built objdump" >&6; }
e8b05380 14123elif test x$gcc_cv_objdump = x; then
ab22c1fa
CF
14124 { echo "$as_me:$LINENO: result: not found" >&5
14125echo "${ECHO_T}not found" >&6; }
e8b05380 14126else
ab22c1fa
CF
14127 { echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5
14128echo "${ECHO_T}$gcc_cv_objdump" >&6; }
a2eafc76 14129fi
3cae5780 14130
981d4858 14131# Figure out what assembler alignment features are present.
ab22c1fa
CF
14132{ echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5
14133echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6; }
ba479fd2
NN
14134if test "${gcc_cv_as_balign_and_p2align+set}" = set; then
14135 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14136else
14137 gcc_cv_as_balign_and_p2align=no
14138 if test $in_tree_gas = yes; then
14139 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
14140 then gcc_cv_as_balign_and_p2align=yes
14141fi
14142 elif test x$gcc_cv_as != x; then
6e3f3080 14143 echo '.balign 4
8ada417f 14144.p2align 2' > conftest.s
ba479fd2
NN
14145 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14147 (eval $ac_try) 2>&5
14148 ac_status=$?
14149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14150 (exit $ac_status); }; }
8ada417f
ZW
14151 then
14152 gcc_cv_as_balign_and_p2align=yes
14153 else
14154 echo "configure: failed program was" >&5
14155 cat conftest.s >&5
14156 fi
14157 rm -f conftest.o conftest.s
14158 fi
14159fi
ab22c1fa
CF
14160{ echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5
14161echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6; }
63cf211a 14162if test $gcc_cv_as_balign_and_p2align = yes; then
ba479fd2
NN
14163
14164cat >>confdefs.h <<\_ACEOF
981d4858 14165#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
ba479fd2 14166_ACEOF
981d4858 14167
ad9c4d9f
NN
14168fi
14169
ab22c1fa
CF
14170{ echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5
14171echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6; }
ba479fd2
NN
14172if test "${gcc_cv_as_max_skip_p2align+set}" = set; then
14173 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14174else
14175 gcc_cv_as_max_skip_p2align=no
14176 if test $in_tree_gas = yes; then
14177 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
14178 then gcc_cv_as_max_skip_p2align=yes
14179fi
14180 elif test x$gcc_cv_as != x; then
6e3f3080 14181 echo '.p2align 4,,7' > conftest.s
ba479fd2
NN
14182 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14184 (eval $ac_try) 2>&5
14185 ac_status=$?
14186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14187 (exit $ac_status); }; }
8ada417f
ZW
14188 then
14189 gcc_cv_as_max_skip_p2align=yes
14190 else
14191 echo "configure: failed program was" >&5
14192 cat conftest.s >&5
14193 fi
14194 rm -f conftest.o conftest.s
14195 fi
ad9c4d9f 14196fi
ab22c1fa
CF
14197{ echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5
14198echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6; }
63cf211a 14199if test $gcc_cv_as_max_skip_p2align = yes; then
ba479fd2
NN
14200
14201cat >>confdefs.h <<\_ACEOF
9e423e6d 14202#define HAVE_GAS_MAX_SKIP_P2ALIGN 1
ba479fd2 14203_ACEOF
9e423e6d 14204
9e423e6d 14205fi
ad9c4d9f 14206
ab22c1fa
CF
14207{ echo "$as_me:$LINENO: checking assembler for .literal16" >&5
14208echo $ECHO_N "checking assembler for .literal16... $ECHO_C" >&6; }
5708d18d
MS
14209if test "${gcc_cv_as_literal16+set}" = set; then
14210 echo $ECHO_N "(cached) $ECHO_C" >&6
14211else
14212 gcc_cv_as_literal16=no
14213 if test $in_tree_gas = yes; then
14214 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
14215 then gcc_cv_as_literal16=yes
14216fi
14217 elif test x$gcc_cv_as != x; then
14218 echo '.literal16' > conftest.s
14219 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14221 (eval $ac_try) 2>&5
14222 ac_status=$?
14223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14224 (exit $ac_status); }; }
14225 then
14226 gcc_cv_as_literal16=yes
14227 else
14228 echo "configure: failed program was" >&5
14229 cat conftest.s >&5
14230 fi
14231 rm -f conftest.o conftest.s
14232 fi
14233fi
ab22c1fa
CF
14234{ echo "$as_me:$LINENO: result: $gcc_cv_as_literal16" >&5
14235echo "${ECHO_T}$gcc_cv_as_literal16" >&6; }
5708d18d
MS
14236if test $gcc_cv_as_literal16 = yes; then
14237
14238cat >>confdefs.h <<\_ACEOF
14239#define HAVE_GAS_LITERAL16 1
14240_ACEOF
14241
14242fi
14243
ab22c1fa
CF
14244{ echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5
14245echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6; }
ba479fd2
NN
14246if test "${gcc_cv_as_subsection_m1+set}" = set; then
14247 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14248else
14249 gcc_cv_as_subsection_m1=no
14250 if test $in_tree_gas = yes; then
14251 if test $in_tree_gas_is_elf = yes \
14252 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
14253 then gcc_cv_as_subsection_m1=yes
ad9c4d9f 14254fi
8ada417f 14255 elif test x$gcc_cv_as != x; then
6e3f3080 14256 echo 'conftest_label1: .word 0
d1accaa3
JJ
14257.subsection -1
14258conftest_label2: .word 0
8ada417f 14259.previous' > conftest.s
ba479fd2
NN
14260 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14262 (eval $ac_try) 2>&5
14263 ac_status=$?
14264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14265 (exit $ac_status); }; }
8ada417f
ZW
14266 then
14267 if test x$gcc_cv_nm != x; then
14268 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
14269 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
14270 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
14271 then :
14272 else gcc_cv_as_subsection_m1=yes
14273 fi
14274 rm -f conftest.nm1 conftest.nm2
14275 fi
14276 else
14277 echo "configure: failed program was" >&5
14278 cat conftest.s >&5
14279 fi
14280 rm -f conftest.o conftest.s
14281 fi
981d4858 14282fi
ab22c1fa
CF
14283{ echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5
14284echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6; }
63cf211a 14285if test $gcc_cv_as_subsection_m1 = yes; then
ba479fd2
NN
14286
14287cat >>confdefs.h <<\_ACEOF
981d4858 14288#define HAVE_GAS_SUBSECTION_ORDERING 1
ba479fd2 14289_ACEOF
981d4858 14290
d1accaa3 14291fi
ad9c4d9f 14292
ab22c1fa
CF
14293{ echo "$as_me:$LINENO: checking assembler for .weak" >&5
14294echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6; }
ba479fd2
NN
14295if test "${gcc_cv_as_weak+set}" = set; then
14296 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14297else
14298 gcc_cv_as_weak=no
14299 if test $in_tree_gas = yes; then
14300 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
14301 then gcc_cv_as_weak=yes
ad9c4d9f 14302fi
8ada417f 14303 elif test x$gcc_cv_as != x; then
6e3f3080 14304 echo ' .weak foobar' > conftest.s
ba479fd2
NN
14305 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14307 (eval $ac_try) 2>&5
14308 ac_status=$?
14309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14310 (exit $ac_status); }; }
8ada417f
ZW
14311 then
14312 gcc_cv_as_weak=yes
14313 else
14314 echo "configure: failed program was" >&5
14315 cat conftest.s >&5
14316 fi
14317 rm -f conftest.o conftest.s
14318 fi
981d4858 14319fi
ab22c1fa
CF
14320{ echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5
14321echo "${ECHO_T}$gcc_cv_as_weak" >&6; }
63cf211a 14322if test $gcc_cv_as_weak = yes; then
ba479fd2
NN
14323
14324cat >>confdefs.h <<\_ACEOF
981d4858 14325#define HAVE_GAS_WEAK 1
ba479fd2 14326_ACEOF
981d4858 14327
12822146 14328fi
ad9c4d9f 14329
ab22c1fa
CF
14330{ echo "$as_me:$LINENO: checking assembler for .weakref" >&5
14331echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6; }
a0203ca7
AO
14332if test "${gcc_cv_as_weakref+set}" = set; then
14333 echo $ECHO_N "(cached) $ECHO_C" >&6
14334else
14335 gcc_cv_as_weakref=no
14336 if test $in_tree_gas = yes; then
14337 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
14338 then gcc_cv_as_weakref=yes
14339fi
14340 elif test x$gcc_cv_as != x; then
14341 echo ' .weakref foobar, barfnot' > conftest.s
14342 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14344 (eval $ac_try) 2>&5
14345 ac_status=$?
14346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14347 (exit $ac_status); }; }
14348 then
14349 gcc_cv_as_weakref=yes
14350 else
14351 echo "configure: failed program was" >&5
14352 cat conftest.s >&5
14353 fi
14354 rm -f conftest.o conftest.s
14355 fi
14356fi
ab22c1fa
CF
14357{ echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5
14358echo "${ECHO_T}$gcc_cv_as_weakref" >&6; }
a0203ca7
AO
14359if test $gcc_cv_as_weakref = yes; then
14360
14361cat >>confdefs.h <<\_ACEOF
14362#define HAVE_GAS_WEAKREF 1
14363_ACEOF
14364
14365fi
14366
ab22c1fa
CF
14367{ echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5
14368echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6; }
e41f3691
JDA
14369if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then
14370 echo $ECHO_N "(cached) $ECHO_C" >&6
14371else
14372 gcc_cv_as_nsubspa_comdat=no
14373 if test $in_tree_gas = yes; then
14374 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
14375 then gcc_cv_as_nsubspa_comdat=yes
14376fi
14377 elif test x$gcc_cv_as != x; then
14378 echo ' .SPACE $TEXT$
14379 .NSUBSPA $CODE$,COMDAT' > conftest.s
14380 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14382 (eval $ac_try) 2>&5
14383 ac_status=$?
14384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14385 (exit $ac_status); }; }
14386 then
14387 gcc_cv_as_nsubspa_comdat=yes
14388 else
14389 echo "configure: failed program was" >&5
14390 cat conftest.s >&5
14391 fi
14392 rm -f conftest.o conftest.s
14393 fi
14394fi
ab22c1fa
CF
14395{ echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5
14396echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6; }
e41f3691
JDA
14397if test $gcc_cv_as_nsubspa_comdat = yes; then
14398
14399cat >>confdefs.h <<\_ACEOF
14400#define HAVE_GAS_NSUBSPA_COMDAT 1
14401_ACEOF
14402
14403fi
14404
8ada417f
ZW
14405# .hidden needs to be supported in both the assembler and the linker,
14406# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
14407# This is irritatingly difficult to feature test for; we have to check the
14408# date string after the version number. If we've got an in-tree
14409# ld, we don't know its patchlevel version, so we set the baseline at 2.13
14410# to be safe.
14411# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
ab22c1fa
CF
14412{ echo "$as_me:$LINENO: checking assembler for .hidden" >&5
14413echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6; }
ba479fd2
NN
14414if test "${gcc_cv_as_hidden+set}" = set; then
14415 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14416else
14417 gcc_cv_as_hidden=no
14418 if test $in_tree_gas = yes; then
14419 if test $in_tree_gas_is_elf = yes \
14420 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
14421 then gcc_cv_as_hidden=yes
14422fi
14423 elif test x$gcc_cv_as != x; then
6e3f3080 14424 echo ' .hidden foobar
8ada417f 14425foobar:' > conftest.s
ba479fd2
NN
14426 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14428 (eval $ac_try) 2>&5
14429 ac_status=$?
14430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14431 (exit $ac_status); }; }
8ada417f
ZW
14432 then
14433 gcc_cv_as_hidden=yes
14434 else
14435 echo "configure: failed program was" >&5
14436 cat conftest.s >&5
14437 fi
14438 rm -f conftest.o conftest.s
14439 fi
14440fi
ab22c1fa
CF
14441{ echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5
14442echo "${ECHO_T}$gcc_cv_as_hidden" >&6; }
63cf211a 14443
ad9c4d9f 14444
ab22c1fa
CF
14445{ echo "$as_me:$LINENO: checking linker for .hidden support" >&5
14446echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6; }
ba479fd2
NN
14447if test "${gcc_cv_ld_hidden+set}" = set; then
14448 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14449else
14450 if test $in_tree_ld = yes ; then
14451 gcc_cv_ld_hidden=no
14452 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 \
14453 && test $in_tree_ld_is_elf = yes; then
14454 gcc_cv_ld_hidden=yes
14455 fi
14456else
14457 gcc_cv_ld_hidden=yes
bace148a 14458 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
8ada417f
ZW
14459 if echo "$ld_ver" | grep GNU > /dev/null; then
14460 ld_vers=`echo $ld_ver | sed -n \
14461 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
14462 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
14463 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
14464 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
14465 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
11176d2a 14466 -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
e8116f40 14467 -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 14468 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
14469 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
14470 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
14471 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
8ada417f
ZW
14472 if test 0"$ld_date" -lt 20020404; then
14473 if test -n "$ld_date"; then
14474 # If there was date string, but was earlier than 2002-04-04, fail
14475 gcc_cv_ld_hidden=no
14476 elif test -z "$ld_vers"; then
14477 # If there was no date string nor ld version number, something is wrong
14478 gcc_cv_ld_hidden=no
14479 else
8ada417f
ZW
14480 test -z "$ld_vers_patch" && ld_vers_patch=0
14481 if test "$ld_vers_major" -lt 2; then
14482 gcc_cv_ld_hidden=no
14483 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
14484 gcc_cv_ld_hidden="no"
14485 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
14486 gcc_cv_ld_hidden=no
c72931a6 14487 fi
8ada417f 14488 fi
789b7de5 14489 fi
8ada417f 14490 else
28690784 14491 case "${target}" in
b0fd7d27 14492 hppa64*-*-hpux* | ia64*-*-hpux*)
28690784
JDA
14493 gcc_cv_ld_hidden=yes
14494 ;;
14495 *)
14496 gcc_cv_ld_hidden=no
14497 ;;
14498 esac
8ada417f
ZW
14499 fi
14500fi
6d07784a 14501fi
ab22c1fa
CF
14502{ echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
14503echo "${ECHO_T}$gcc_cv_ld_hidden" >&6; }
8ada417f 14504libgcc_visibility=no
ad9c4d9f 14505
232b67d9 14506
8e3940b2 14507if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
8ada417f 14508 libgcc_visibility=yes
ba479fd2
NN
14509
14510cat >>confdefs.h <<\_ACEOF
8ada417f 14511#define HAVE_GAS_HIDDEN 1
ba479fd2 14512_ACEOF
ad9c4d9f
NN
14513
14514fi
14515
8ada417f 14516# Check if we have .[us]leb128, and support symbol arithmetic with it.
ab22c1fa
CF
14517{ echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5
14518echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6; }
ba479fd2
NN
14519if test "${gcc_cv_as_leb128+set}" = set; then
14520 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14521else
14522 gcc_cv_as_leb128=no
14523 if test $in_tree_gas = yes; then
14524 if test $in_tree_gas_is_elf = yes \
14525 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
14526 then gcc_cv_as_leb128=yes
14527fi
14528 elif test x$gcc_cv_as != x; then
6e3f3080 14529 echo ' .data
b7460f24
RH
14530 .uleb128 L2 - L1
14531L1:
14532 .uleb128 1280
14533 .sleb128 -1010
8ada417f 14534L2:' > conftest.s
ba479fd2
NN
14535 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14537 (eval $ac_try) 2>&5
14538 ac_status=$?
14539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14540 (exit $ac_status); }; }
8ada417f
ZW
14541 then
14542 # GAS versions before 2.11 do not support uleb128,
14543 # despite appearing to.
14544 # ??? There exists an elf-specific test that will crash
14545 # the assembler. Perhaps it's better to figure out whether
14546 # arbitrary sections are supported and try the test.
bace148a 14547 as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
8ada417f
ZW
14548 if echo "$as_ver" | grep GNU > /dev/null; then
14549 as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
14550 as_major=`echo $as_ver | sed 's/\..*//'`
14551 as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
14552 if test $as_major -eq 2 && test $as_minor -lt 11
14553 then :
14554 else gcc_cv_as_leb128=yes
14555 fi
14556 fi
14557 else
14558 echo "configure: failed program was" >&5
14559 cat conftest.s >&5
14560 fi
14561 rm -f conftest.o conftest.s
14562 fi
b7460f24 14563fi
ab22c1fa
CF
14564{ echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5
14565echo "${ECHO_T}$gcc_cv_as_leb128" >&6; }
63cf211a 14566if test $gcc_cv_as_leb128 = yes; then
ba479fd2
NN
14567
14568cat >>confdefs.h <<\_ACEOF
b7460f24 14569#define HAVE_AS_LEB128 1
ba479fd2 14570_ACEOF
b7460f24
RH
14571
14572fi
ad9c4d9f 14573
8ada417f
ZW
14574# GAS versions up to and including 2.11.0 may mis-optimize
14575# .eh_frame data.
ab22c1fa
CF
14576{ echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
14577echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6; }
ba479fd2
NN
14578if test "${gcc_cv_as_eh_frame+set}" = set; then
14579 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14580else
14581 gcc_cv_as_eh_frame=no
14582 if test $in_tree_gas = yes; then
14583 if test $in_tree_gas_is_elf = yes \
14584 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14585 then gcc_cv_as_eh_frame=yes
ad9c4d9f 14586fi
8ada417f 14587 elif test x$gcc_cv_as != x; then
6e3f3080 14588 echo ' .text
c64688ae
RH
14589.LFB1:
14590 .4byte 0
14591.L1:
14592 .4byte 0
14593.LFE1:
14594 .section .eh_frame,"aw",@progbits
14595__FRAME_BEGIN__:
14596 .4byte .LECIE1-.LSCIE1
14597.LSCIE1:
14598 .4byte 0x0
14599 .byte 0x1
14600 .ascii "z\0"
14601 .byte 0x1
14602 .byte 0x78
14603 .byte 0x1a
14604 .byte 0x0
14605 .byte 0x4
14606 .4byte 1
14607 .p2align 1
14608.LECIE1:
14609.LSFDE1:
14610 .4byte .LEFDE1-.LASFDE1
14611.LASFDE1:
14612 .4byte .LASFDE1-__FRAME_BEGIN__
14613 .4byte .LFB1
14614 .4byte .LFE1-.LFB1
14615 .byte 0x4
14616 .4byte .LFE1-.LFB1
14617 .byte 0x4
14618 .4byte .L1-.LFB1
8ada417f 14619.LEFDE1:' > conftest.s
ba479fd2
NN
14620 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
14621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14622 (eval $ac_try) 2>&5
14623 ac_status=$?
14624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14625 (exit $ac_status); }; }
8ada417f
ZW
14626 then
14627 cat > conftest.lit <<EOF
c64688ae
RH
14628 0000 10000000 00000000 017a0001 781a0004 .........z..x...
14629 0010 01000000 12000000 18000000 00000000 ................
093e61a6 14630 0020 08000000 04080000 0044 .........D
01efb963 14631EOF
ba479fd2 14632cat > conftest.big <<EOF
01efb963
AS
14633 0000 00000010 00000000 017a0001 781a0004 .........z..x...
14634 0010 00000001 00000012 00000018 00000000 ................
093e61a6 14635 0020 00000008 04000000 0844 .........D
c64688ae 14636EOF
8ada417f
ZW
14637 # If the assembler didn't choke, and we can objdump,
14638 # and we got the correct data, then succeed.
dbc02e7f
AS
14639 # The text in the here-document typically retains its unix-style line
14640 # endings, while the output of objdump will use host line endings.
14641 # Therefore, use diff -b for the comparisons.
8ada417f
ZW
14642 if test x$gcc_cv_objdump != x \
14643 && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
14644 | tail -3 > conftest.got \
dbc02e7f
AS
14645 && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
14646 || diff -b conftest.big conftest.got > /dev/null 2>&1; }
8ada417f
ZW
14647 then
14648 gcc_cv_as_eh_frame=yes
ba479fd2
NN
14649 elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'
14650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14651 (eval $ac_try) 2>&5
14652 ac_status=$?
14653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14654 (exit $ac_status); }; }; then
8ada417f
ZW
14655 gcc_cv_as_eh_frame=buggy
14656 else
14657 # Uh oh, what do we do now?
14658 gcc_cv_as_eh_frame=no
14659 fi
14660 else
14661 echo "configure: failed program was" >&5
14662 cat conftest.s >&5
14663 fi
14664 rm -f conftest.o conftest.s
14665 fi
c64688ae 14666fi
ab22c1fa
CF
14667{ echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5
14668echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6; }
ad9c4d9f 14669
6e3f3080 14670
63cf211a 14671if test $gcc_cv_as_eh_frame = buggy; then
ba479fd2
NN
14672
14673cat >>confdefs.h <<\_ACEOF
8ada417f 14674#define USE_AS_TRADITIONAL_FORMAT 1
ba479fd2 14675_ACEOF
ad9c4d9f
NN
14676
14677fi
14678
ab22c1fa
CF
14679{ echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14680echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6; }
ba479fd2
NN
14681if test "${gcc_cv_as_shf_merge+set}" = set; then
14682 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
14683else
14684 gcc_cv_as_shf_merge=no
14685 if test $in_tree_gas = yes; then
14686 if test $in_tree_gas_is_elf = yes \
14687 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14688 then gcc_cv_as_shf_merge=yes
14689fi
14690 elif test x$gcc_cv_as != x; then
6e3f3080 14691 echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
ba479fd2
NN
14692 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14694 (eval $ac_try) 2>&5
14695 ac_status=$?
14696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14697 (exit $ac_status); }; }
8ada417f
ZW
14698 then
14699 gcc_cv_as_shf_merge=yes
14700 else
14701 echo "configure: failed program was" >&5
14702 cat conftest.s >&5
14703 fi
14704 rm -f conftest.o conftest.s
14705 fi
201556f0 14706fi
ab22c1fa
CF
14707{ echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14708echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6; }
8ada417f 14709
c18a5b6c 14710if test $gcc_cv_as_shf_merge = no; then
ab22c1fa
CF
14711 { echo "$as_me:$LINENO: checking assembler for section merging support" >&5
14712echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6; }
c18a5b6c
MM
14713if test "${gcc_cv_as_shf_merge+set}" = set; then
14714 echo $ECHO_N "(cached) $ECHO_C" >&6
14715else
14716 gcc_cv_as_shf_merge=no
14717 if test $in_tree_gas = yes; then
14718 if test $in_tree_gas_is_elf = yes \
14719 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
14720 then gcc_cv_as_shf_merge=yes
14721fi
14722 elif test x$gcc_cv_as != x; then
14723 echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s
14724 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14726 (eval $ac_try) 2>&5
14727 ac_status=$?
14728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14729 (exit $ac_status); }; }
14730 then
14731 gcc_cv_as_shf_merge=yes
14732 else
14733 echo "configure: failed program was" >&5
14734 cat conftest.s >&5
14735 fi
14736 rm -f conftest.o conftest.s
14737 fi
14738fi
ab22c1fa
CF
14739{ echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5
14740echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6; }
c18a5b6c
MM
14741
14742fi
8ad9fb33 14743
ba479fd2 14744cat >>confdefs.h <<_ACEOF
8ad9fb33 14745#define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`
ba479fd2 14746_ACEOF
201556f0 14747
201556f0 14748
ab22c1fa
CF
14749{ echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14750echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6; }
c18a5b6c
MM
14751if test "${gcc_cv_as_comdat_group+set}" = set; then
14752 echo $ECHO_N "(cached) $ECHO_C" >&6
14753else
14754 gcc_cv_as_comdat_group=no
14755 if test $in_tree_gas = yes; then
14756 if test $in_tree_gas_is_elf = yes \
11176d2a 14757 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
14758 then gcc_cv_as_comdat_group=yes
14759fi
14760 elif test x$gcc_cv_as != x; then
14761 echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s
14762 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14764 (eval $ac_try) 2>&5
14765 ac_status=$?
14766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14767 (exit $ac_status); }; }
14768 then
14769 gcc_cv_as_comdat_group=yes
14770 else
14771 echo "configure: failed program was" >&5
14772 cat conftest.s >&5
14773 fi
14774 rm -f conftest.o conftest.s
14775 fi
14776fi
ab22c1fa
CF
14777{ echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5
14778echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6; }
c18a5b6c
MM
14779
14780if test $gcc_cv_as_comdat_group = yes; then
14781 gcc_cv_as_comdat_group_percent=no
14782else
ab22c1fa
CF
14783 { echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5
14784echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6; }
c18a5b6c
MM
14785if test "${gcc_cv_as_comdat_group_percent+set}" = set; then
14786 echo $ECHO_N "(cached) $ECHO_C" >&6
14787else
14788 gcc_cv_as_comdat_group_percent=no
14789 if test $in_tree_gas = yes; then
14790 if test $in_tree_gas_is_elf = yes \
11176d2a 14791 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
c18a5b6c
MM
14792 then gcc_cv_as_comdat_group_percent=yes
14793fi
14794 elif test x$gcc_cv_as != x; then
14795 echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s
14796 if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'
14797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14798 (eval $ac_try) 2>&5
14799 ac_status=$?
14800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14801 (exit $ac_status); }; }
14802 then
14803 gcc_cv_as_comdat_group_percent=yes
14804 else
14805 echo "configure: failed program was" >&5
14806 cat conftest.s >&5
14807 fi
14808 rm -f conftest.o conftest.s
14809 fi
14810fi
ab22c1fa
CF
14811{ echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5
14812echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6; }
c18a5b6c
MM
14813
14814fi
11176d2a
JB
14815if test $in_tree_ld != yes && test x"$ld_vers" != x; then
14816 comdat_group=yes
14817 if test 0"$ld_date" -lt 20050308; then
14818 if test -n "$ld_date"; then
14819 # If there was date string, but was earlier than 2005-03-08, fail
14820 comdat_group=no
14821 elif test "$ld_vers_major" -lt 2; then
14822 comdat_group=no
14823 elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
14824 comdat_group=no
14825 fi
14826 fi
1cf0118d
RO
14827else
14828 # assume linkers other than GNU ld don't support COMDAT group
14829 comdat_group=no
14830fi
14831if test $comdat_group = no; then
14832 gcc_cv_as_comdat_group=no
14833 gcc_cv_as_comdat_group_percent=no
11176d2a 14834fi
c18a5b6c
MM
14835
14836cat >>confdefs.h <<_ACEOF
11176d2a 14837#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
14838_ACEOF
14839
14840
8ada417f 14841# Thread-local storage - the check is heavily parametrized.
f996902d
RH
14842conftest_s=
14843tls_first_major=
14844tls_first_minor=
9739c90c 14845tls_as_opt=
f996902d 14846case "$target" in
6f9b006d
RH
14847 alpha*-*-*)
14848 conftest_s='
14849 .section ".tdata","awT",@progbits
14850foo: .long 25
14851 .text
14852 ldq $27,__tls_get_addr($29) !literal!1
14853 lda $16,foo($29) !tlsgd!1
14854 jsr $26,($27),__tls_get_addr !lituse_tlsgd!1
14855 ldq $27,__tls_get_addr($29) !literal!2
14856 lda $16,foo($29) !tlsldm!2
14857 jsr $26,($27),__tls_get_addr !lituse_tlsldm!2
14858 ldq $1,foo($29) !gotdtprel
14859 ldah $2,foo($29) !dtprelhi
14860 lda $3,foo($2) !dtprello
14861 lda $4,foo($29) !dtprel
14862 ldq $1,foo($29) !gottprel
14863 ldah $2,foo($29) !tprelhi
14864 lda $3,foo($2) !tprello
14865 lda $4,foo($29) !tprel'
14866 tls_first_major=2
14867 tls_first_minor=13
2f3321ca 14868 tls_as_opt=--fatal-warnings
6f9b006d 14869 ;;
e4dd71de
AH
14870 frv*-*-*)
14871 conftest_s='
14872 .section ".tdata","awT",@progbits
14873x: .long 25
14874 .text
14875 call #gettlsoff(x)'
14876 tls_first_major=2
14877 tls_first_minor=14
14878 ;;
51076f96
RC
14879 hppa*-*-linux*)
14880 conftest_s='
14881t1: .reg %r20
14882t2: .reg %r21
14883gp: .reg %r19
14884 .section ".tdata","awT",@progbits
14885foo: .long 25
14886 .text
14887 .align 4
14888 addil LT%foo-$tls_gdidx$,gp
14889 ldo RT%foo-$tls_gdidx$(%r1),%arg0
14890 b __tls_get_addr
14891 nop
14892 addil LT%foo-$tls_ldidx$,gp
14893 b __tls_get_addr
14894 ldo RT%foo-$tls_ldidx$(%r1),%arg0
14895 addil LR%foo-$tls_dtpoff$,%ret0
14896 ldo RR%foo-$tls_dtpoff$(%r1),%t1
14897 mfctl %cr27,%t1
14898 addil LT%foo-$tls_ieoff$,gp
14899 ldw RT%foo-$tls_ieoff$(%r1),%t2
14900 add %t1,%t2,%t3
14901 mfctl %cr27,%t1
14902 addil LR%foo-$tls_leoff$,%t1
14903 ldo RR%foo-$tls_leoff$(%r1),%t2'
14904 tls_first_major=2
14905 tls_first_minor=15
14906 tls_as_opt=--fatal-warnings
14907 ;;
d3585b76
DJ
14908 arm*-*-*)
14909 conftest_s='
14910 .section ".tdata","awT",%progbits
14911foo: .long 25
14912 .text
14913.word foo(gottpoff)
14914.word foo(tpoff)
14915.word foo(tlsgd)
14916.word foo(tlsldm)
14917.word foo(tlsldo)'
14918 tls_first_major=2
14919 tls_first_minor=17
14920 ;;
f996902d
RH
14921 i[34567]86-*-*)
14922 conftest_s='
14923 .section ".tdata","awT",@progbits
14924foo: .long 25
14925 .text
14926 movl %gs:0, %eax
14927 leal foo@TLSGD(,%ebx,1), %eax
14928 leal foo@TLSLDM(%ebx), %eax
14929 leal foo@DTPOFF(%eax), %edx
14930 movl foo@GOTTPOFF(%ebx), %eax
14931 subl foo@GOTTPOFF(%ebx), %eax
75d38379
JJ
14932 addl foo@GOTNTPOFF(%ebx), %eax
14933 movl foo@INDNTPOFF, %eax
f996902d
RH
14934 movl $foo@TPOFF, %eax
14935 subl $foo@TPOFF, %eax
14936 leal foo@NTPOFF(%ecx), %eax'
14937 tls_first_major=2
75d38379 14938 tls_first_minor=14
2f3321ca 14939 tls_as_opt=--fatal-warnings
75d38379
JJ
14940 ;;
14941 x86_64-*-*)
14942 conftest_s='
14943 .section ".tdata","awT",@progbits
14944foo: .long 25
14945 .text
14946 movq %fs:0, %rax
14947 leaq foo@TLSGD(%rip), %rdi
14948 leaq foo@TLSLD(%rip), %rdi
14949 leaq foo@DTPOFF(%rax), %rdx
14950 movq foo@GOTTPOFF(%rip), %rax
14951 movq $foo@TPOFF, %rax'
14952 tls_first_major=2
14953 tls_first_minor=14
2f3321ca 14954 tls_as_opt=--fatal-warnings
f996902d 14955 ;;
7b6e506e
RH
14956 ia64-*-*)
14957 conftest_s='
14958 .section ".tdata","awT",@progbits
14959foo: data8 25
14960 .text
14961 addl r16 = @ltoff(@dtpmod(foo#)), gp
14962 addl r17 = @ltoff(@dtprel(foo#)), gp
14963 addl r18 = @ltoff(@tprel(foo#)), gp
14964 addl r19 = @dtprel(foo#), gp
14965 adds r21 = @dtprel(foo#), r13
14966 movl r23 = @dtprel(foo#)
14967 addl r20 = @tprel(foo#), gp
14968 adds r22 = @tprel(foo#), r13
14969 movl r24 = @tprel(foo#)'
14970 tls_first_major=2
14971 tls_first_minor=13
2f3321ca 14972 tls_as_opt=--fatal-warnings
7b6e506e 14973 ;;
69229b81
DJ
14974 mips*-*-*)
14975 conftest_s='
14976 .section .tdata,"awT",@progbits
14977x:
14978 .word 2
14979 .text
14980 addiu $4, $28, %tlsgd(x)
14981 addiu $4, $28, %tlsldm(x)
14982 lui $4, %dtprel_hi(x)
14983 addiu $4, $4, %dtprel_lo(x)
14984 lw $4, %gottprel(x)($28)
14985 lui $4, %tprel_hi(x)
14986 addiu $4, $4, %tprel_lo(x)'
14987 tls_first_major=2
14988 tls_first_minor=16
14989 tls_as_opt='-32 --fatal-warnings'
14990 ;;
c4501e62
JJ
14991 powerpc-*-*)
14992 conftest_s='
14993 .section ".tdata","awT",@progbits
14994 .align 2
14995ld0: .space 4
14996ld1: .space 4
14997x1: .space 4
14998x2: .space 4
14999x3: .space 4
15000 .text
15001 addi 3,31,ld0@got@tlsgd
15002 bl __tls_get_addr
15003 addi 3,31,x1@got@tlsld
15004 bl __tls_get_addr
15005 addi 9,3,x1@dtprel
15006 addis 9,3,x2@dtprel@ha
15007 addi 9,9,x2@dtprel@l
15008 lwz 9,x3@got@tprel(31)
15009 add 9,9,x@tls
15010 addi 9,2,x1@tprel
15011 addis 9,2,x2@tprel@ha
15012 addi 9,9,x2@tprel@l'
15013 tls_first_major=2
15014 tls_first_minor=14
2f3321ca 15015 tls_as_opt="-a32 --fatal-warnings"
c4501e62
JJ
15016 ;;
15017 powerpc64-*-*)
15018 conftest_s='
15019 .section ".tdata","awT",@progbits
15020 .align 3
15021ld0: .space 8
15022ld1: .space 8
15023x1: .space 8
15024x2: .space 8
15025x3: .space 8
15026 .text
15027 addi 3,2,ld0@got@tlsgd
15028 bl .__tls_get_addr
15029 nop
15030 addi 3,2,ld1@toc
15031 bl .__tls_get_addr
15032 nop
15033 addi 3,2,x1@got@tlsld
15034 bl .__tls_get_addr
15035 nop
15036 addi 9,3,x1@dtprel
15037 bl .__tls_get_addr
15038 nop
15039 addis 9,3,x2@dtprel@ha
15040 addi 9,9,x2@dtprel@l
15041 bl .__tls_get_addr
15042 nop
15043 ld 9,x3@got@dtprel(2)
15044 add 9,9,3
15045 bl .__tls_get_addr
15046 nop'
15047 tls_first_major=2
15048 tls_first_minor=14
2f3321ca 15049 tls_as_opt="-a64 --fatal-warnings"
c4501e62 15050 ;;
fd3cd001
UW
15051 s390-*-*)
15052 conftest_s='
15053 .section ".tdata","awT",@progbits
15054foo: .long 25
15055 .text
15056 .long foo@TLSGD
15057 .long foo@TLSLDM
15058 .long foo@DTPOFF
15059 .long foo@NTPOFF
15060 .long foo@GOTNTPOFF
15061 .long foo@INDNTPOFF
15062 l %r1,foo@GOTNTPOFF(%r12)
15063 l %r1,0(%r1):tls_load:foo
15064 bas %r14,0(%r1,%r13):tls_gdcall:foo
15065 bas %r14,0(%r1,%r13):tls_ldcall:foo'
15066 tls_first_major=2
15067 tls_first_minor=14
2f3321ca 15068 tls_as_opt="-m31 --fatal-warnings"
fd3cd001
UW
15069 ;;
15070 s390x-*-*)
15071 conftest_s='
15072 .section ".tdata","awT",@progbits
15073foo: .long 25
15074 .text
15075 .quad foo@TLSGD
15076 .quad foo@TLSLDM
15077 .quad foo@DTPOFF
15078 .quad foo@NTPOFF
15079 .quad foo@GOTNTPOFF
15080 lg %r1,foo@GOTNTPOFF(%r12)
15081 larl %r1,foo@INDNTPOFF
15082 brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo
15083 brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo'
15084 tls_first_major=2
15085 tls_first_minor=14
2f3321ca 15086 tls_as_opt="-m64 -Aesame --fatal-warnings"
fd3cd001 15087 ;;
9ff13962
KK
15088 sh-*-* | sh[34]-*-*)
15089 conftest_s='
15090 .section ".tdata","awT",@progbits
15091foo: .long 25
15092 .text
15093 .long foo@TLSGD
15094 .long foo@TLSLDM
15095 .long foo@DTPOFF
15096 .long foo@GOTTPOFF
15097 .long foo@TPOFF'
15098 tls_first_major=2
15099 tls_first_minor=13
2f3321ca 15100 tls_as_opt=--fatal-warnings
9ff13962 15101 ;;
5751a10b 15102 sparc*-*-*)
2f3321ca 15103 case "$target" in
7935dc1b
EB
15104 sparc*-sun-solaris2.[56789]*)
15105 # TLS was introduced in the Solaris 9 4/04 release but
15106 # we do not enable it by default on Solaris 9 either.
15107 if test "x$enable_tls" = xyes ; then
15108 on_solaris=yes
15109 else
15110 enable_tls=no;
15111 fi
15112 ;;
2f3321ca
EB
15113 sparc*-sun-solaris2.*)
15114 on_solaris=yes
15115 ;;
15116 *)
15117 on_solaris=no
15118 ;;
15119 esac
15120 if test x$on_solaris = xyes && test x$gas_flag = xno; then
15121 conftest_s='
15122 .section ".tdata",#alloc,#write,#tls
15123foo: .long 25
15124 .text
15125 sethi %tgd_hi22(foo), %o0
15126 add %o0, %tgd_lo10(foo), %o1
15127 add %l7, %o1, %o0, %tgd_add(foo)
15128 call __tls_get_addr, %tgd_call(foo)
15129 sethi %tldm_hi22(foo), %l1
15130 add %l1, %tldm_lo10(foo), %l2
15131 add %l7, %l2, %o0, %tldm_add(foo)
15132 call __tls_get_addr, %tldm_call(foo)
15133 sethi %tldo_hix22(foo), %l3
15134 xor %l3, %tldo_lox10(foo), %l4
15135 add %o0, %l4, %l5, %tldo_add(foo)
15136 sethi %tie_hi22(foo), %o3
15137 add %o3, %tie_lo10(foo), %o3
15138 ld [%l7 + %o3], %o2, %tie_ld(foo)
15139 add %g7, %o2, %o4, %tie_add(foo)
15140 sethi %tle_hix22(foo), %l1
15141 xor %l1, %tle_lox10(foo), %o5
15142 ld [%g7 + %o5], %o1'
15143 tls_first_major=0
15144 tls_first_minor=0
15145 else
15146 conftest_s='
5751a10b
JJ
15147 .section ".tdata","awT",@progbits
15148foo: .long 25
15149 .text
15150 sethi %tgd_hi22(foo), %o0
15151 add %o0, %tgd_lo10(foo), %o1
15152 add %l7, %o1, %o0, %tgd_add(foo)
15153 call __tls_get_addr, %tgd_call(foo)
15154 sethi %tldm_hi22(foo), %l1
15155 add %l1, %tldm_lo10(foo), %l2
15156 add %l7, %l2, %o0, %tldm_add(foo)
15157 call __tls_get_addr, %tldm_call(foo)
15158 sethi %tldo_hix22(foo), %l3
15159 xor %l3, %tldo_lox10(foo), %l4
15160 add %o0, %l4, %l5, %tldo_add(foo)
15161 sethi %tie_hi22(foo), %o3
15162 add %o3, %tie_lo10(foo), %o3
15163 ld [%l7 + %o3], %o2, %tie_ld(foo)
15164 add %g7, %o2, %o4, %tie_add(foo)
15165 sethi %tle_hix22(foo), %l1
15166 xor %l1, %tle_lox10(foo), %o5
15167 ld [%g7 + %o5], %o1'
15168 tls_first_major=2
15169 tls_first_minor=14
2f3321ca
EB
15170 tls_as_opt="-32 --fatal-warnings"
15171 fi
5751a10b 15172 ;;
f996902d 15173esac
8dea1cca
DD
15174set_have_as_tls=no
15175if test "x$enable_tls" = xno ; then
15176 : # TLS explicitly disabled.
15177elif test "x$enable_tls" = xyes ; then
15178 set_have_as_tls=yes # TLS explicitly enabled.
15179elif test -z "$tls_first_major"; then
8ada417f
ZW
15180 : # If we don't have a check, assume no support.
15181else
ab22c1fa
CF
15182 { echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5
15183echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6; }
ba479fd2
NN
15184if test "${gcc_cv_as_tls+set}" = set; then
15185 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15186else
15187 gcc_cv_as_tls=no
15188 if test $in_tree_gas = yes; then
15189 if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
15190 then gcc_cv_as_tls=yes
ad9c4d9f 15191fi
8ada417f 15192 elif test x$gcc_cv_as != x; then
6e3f3080 15193 echo "$conftest_s" > conftest.s
2f3321ca 15194 if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5'
ba479fd2
NN
15195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15196 (eval $ac_try) 2>&5
15197 ac_status=$?
15198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15199 (exit $ac_status); }; }
8ada417f
ZW
15200 then
15201 gcc_cv_as_tls=yes
15202 else
15203 echo "configure: failed program was" >&5
15204 cat conftest.s >&5
15205 fi
15206 rm -f conftest.o conftest.s
f996902d 15207 fi
f996902d 15208fi
ab22c1fa
CF
15209{ echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5
15210echo "${ECHO_T}$gcc_cv_as_tls" >&6; }
63cf211a 15211if test $gcc_cv_as_tls = yes; then
8dea1cca
DD
15212 set_have_as_tls=yes
15213fi
15214fi
15215if test $set_have_as_tls = yes ; then
ba479fd2
NN
15216
15217cat >>confdefs.h <<\_ACEOF
f996902d 15218#define HAVE_AS_TLS 1
ba479fd2 15219_ACEOF
f996902d 15220
8ada417f
ZW
15221fi
15222
15223# Target-specific assembler checks.
f996902d 15224
ab22c1fa
CF
15225{ echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5
15226echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6; }
7e9d8517
L
15227gcc_cv_ld_static_dynamic=no
15228if test $in_tree_ld = yes ; then
15229 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
15230 gcc_cv_ld_static_dynamic=yes
15231 fi
15232elif test x$gcc_cv_ld != x; then
15233 # Check if linker supports -Bstatic/-Bdynamic option
15234 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
15235 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
15236 gcc_cv_ld_static_dynamic=yes
15237 fi
15238fi
15239if test x"$gcc_cv_ld_static_dynamic" = xyes; then
15240
15241cat >>confdefs.h <<\_ACEOF
15242#define HAVE_LD_STATIC_DYNAMIC 1
15243_ACEOF
15244
15245fi
ab22c1fa
CF
15246{ echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5
15247echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6; }
7e9d8517 15248
d594623a 15249if test x"$demangler_in_ld" = xyes; then
ab22c1fa
CF
15250 { echo "$as_me:$LINENO: checking linker --demangle support" >&5
15251echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6; }
d594623a
L
15252 gcc_cv_ld_demangle=no
15253 if test $in_tree_ld = yes; then
15254 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 \
15255 gcc_cv_ld_demangle=yes
15256 fi
15257 elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then
15258 # Check if the GNU linker supports --demangle option
15259 if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then
15260 gcc_cv_ld_demangle=yes
15261 fi
15262 fi
15263 if test x"$gcc_cv_ld_demangle" = xyes; then
15264
15265cat >>confdefs.h <<\_ACEOF
15266#define HAVE_LD_DEMANGLE 1
15267_ACEOF
15268
15269 fi
ab22c1fa
CF
15270 { echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5
15271echo "${ECHO_T}$gcc_cv_ld_demangle" >&6; }
d594623a
L
15272fi
15273
3a37b08e
RH
15274case "$target" in
15275 # All TARGET_ABI_OSF targets.
15276 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
ab22c1fa
CF
15277 { echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
15278echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6; }
ba479fd2
NN
15279if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then
15280 echo $ECHO_N "(cached) $ECHO_C" >&6
3a37b08e 15281else
8ada417f
ZW
15282 gcc_cv_as_alpha_explicit_relocs=no
15283 if test $in_tree_gas = yes; then
15284 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
15285 then gcc_cv_as_alpha_explicit_relocs=yes
ad9c4d9f 15286fi
8ada417f 15287 elif test x$gcc_cv_as != x; then
6e3f3080 15288 echo ' .set nomacro
3a37b08e
RH
15289 .text
15290 extbl $3, $2, $3 !lituse_bytoff!1
15291 ldq $2, a($29) !literal!1
15292 ldq $4, b($29) !literal!2
15293 ldq_u $3, 0($2) !lituse_base!1
15294 ldq $27, f($29) !literal!5
15295 jsr $26, ($27), f !lituse_jsr!5
15296 ldah $29, 0($26) !gpdisp!3
15297 lda $0, c($29) !gprel
15298 ldah $1, d($29) !gprelhigh
15299 lda $1, d($1) !gprellow
8ada417f 15300 lda $29, 0($29) !gpdisp!3' > conftest.s
ba479fd2
NN
15301 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15303 (eval $ac_try) 2>&5
15304 ac_status=$?
15305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15306 (exit $ac_status); }; }
8ada417f
ZW
15307 then
15308 gcc_cv_as_alpha_explicit_relocs=yes
15309 else
15310 echo "configure: failed program was" >&5
15311 cat conftest.s >&5
15312 fi
15313 rm -f conftest.o conftest.s
15314 fi
cafe096b 15315fi
ab22c1fa
CF
15316{ echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5
15317echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6; }
63cf211a 15318if test $gcc_cv_as_alpha_explicit_relocs = yes; then
ba479fd2
NN
15319
15320cat >>confdefs.h <<\_ACEOF
3a37b08e 15321#define HAVE_AS_EXPLICIT_RELOCS 1
ba479fd2 15322_ACEOF
3a37b08e 15323
d006f5eb 15324fi
ab22c1fa
CF
15325 { echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
15326echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6; }
d006f5eb
RH
15327if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
15328 echo $ECHO_N "(cached) $ECHO_C" >&6
15329else
15330 gcc_cv_as_alpha_jsrdirect_relocs=no
15331 if test $in_tree_gas = yes; then
15332 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
15333 then gcc_cv_as_alpha_jsrdirect_relocs=yes
15334fi
15335 elif test x$gcc_cv_as != x; then
15336 echo ' .set nomacro
15337 .text
15338 ldq $27, a($29) !literal!1
15339 jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
15340 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15342 (eval $ac_try) 2>&5
15343 ac_status=$?
15344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15345 (exit $ac_status); }; }
15346 then
15347 gcc_cv_as_alpha_jsrdirect_relocs=yes
15348 else
15349 echo "configure: failed program was" >&5
15350 cat conftest.s >&5
15351 fi
15352 rm -f conftest.o conftest.s
15353 fi
15354fi
ab22c1fa
CF
15355{ echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
15356echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6; }
d006f5eb
RH
15357if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
15358
15359cat >>confdefs.h <<\_ACEOF
15360#define HAVE_AS_JSRDIRECT_RELOCS 1
15361_ACEOF
15362
86da66b5
HPN
15363fi
15364 ;;
15365
15366 cris-*-*)
ab22c1fa
CF
15367 { echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5
15368echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6; }
86da66b5
HPN
15369if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then
15370 echo $ECHO_N "(cached) $ECHO_C" >&6
15371else
15372 gcc_cv_as_cris_no_mul_bug=no
15373 if test $in_tree_gas = yes; then
15374 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
15375 then gcc_cv_as_cris_no_mul_bug=yes
15376fi
15377 elif test x$gcc_cv_as != x; then
15378 echo '.text' > conftest.s
15379 if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5'
15380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15381 (eval $ac_try) 2>&5
15382 ac_status=$?
15383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15384 (exit $ac_status); }; }
15385 then
15386 gcc_cv_as_cris_no_mul_bug=yes
15387 else
15388 echo "configure: failed program was" >&5
15389 cat conftest.s >&5
15390 fi
15391 rm -f conftest.o conftest.s
15392 fi
15393fi
ab22c1fa
CF
15394{ echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5
15395echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6; }
86da66b5
HPN
15396if test $gcc_cv_as_cris_no_mul_bug = yes; then
15397
15398cat >>confdefs.h <<\_ACEOF
15399#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1
15400_ACEOF
15401
8ada417f 15402fi
3a37b08e 15403 ;;
8ada417f 15404
1cb36a98 15405 sparc*-*-*)
ab22c1fa
CF
15406 { echo "$as_me:$LINENO: checking assembler for .register" >&5
15407echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6; }
ba479fd2
NN
15408if test "${gcc_cv_as_sparc_register_op+set}" = set; then
15409 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 15410else
8ada417f
ZW
15411 gcc_cv_as_sparc_register_op=no
15412 if test x$gcc_cv_as != x; then
6e3f3080 15413 echo '.register %g2, #scratch' > conftest.s
ba479fd2
NN
15414 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15416 (eval $ac_try) 2>&5
15417 ac_status=$?
15418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15419 (exit $ac_status); }; }
8ada417f
ZW
15420 then
15421 gcc_cv_as_sparc_register_op=yes
15422 else
15423 echo "configure: failed program was" >&5
15424 cat conftest.s >&5
15425 fi
15426 rm -f conftest.o conftest.s
15427 fi
cafe096b 15428fi
ab22c1fa
CF
15429{ echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5
15430echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6; }
63cf211a 15431if test $gcc_cv_as_sparc_register_op = yes; then
ba479fd2
NN
15432
15433cat >>confdefs.h <<\_ACEOF
1cb36a98 15434#define HAVE_AS_REGISTER_PSEUDO_OP 1
ba479fd2 15435_ACEOF
1cb36a98 15436
8ada417f 15437fi
1cb36a98 15438
ab22c1fa
CF
15439 { echo "$as_me:$LINENO: checking assembler for -relax option" >&5
15440echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6; }
ba479fd2
NN
15441if test "${gcc_cv_as_sparc_relax+set}" = set; then
15442 echo $ECHO_N "(cached) $ECHO_C" >&6
e95b1e6a 15443else
8ada417f
ZW
15444 gcc_cv_as_sparc_relax=no
15445 if test x$gcc_cv_as != x; then
6e3f3080 15446 echo '.text' > conftest.s
ba479fd2
NN
15447 if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'
15448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15449 (eval $ac_try) 2>&5
15450 ac_status=$?
15451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15452 (exit $ac_status); }; }
8ada417f
ZW
15453 then
15454 gcc_cv_as_sparc_relax=yes
15455 else
15456 echo "configure: failed program was" >&5
15457 cat conftest.s >&5
15458 fi
15459 rm -f conftest.o conftest.s
15460 fi
cafe096b 15461fi
ab22c1fa
CF
15462{ echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5
15463echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6; }
63cf211a 15464if test $gcc_cv_as_sparc_relax = yes; then
ba479fd2
NN
15465
15466cat >>confdefs.h <<\_ACEOF
e95b1e6a 15467#define HAVE_AS_RELAX_OPTION 1
ba479fd2 15468_ACEOF
e95b1e6a 15469
8ada417f 15470fi
e95b1e6a 15471
ab22c1fa
CF
15472 { echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5
15473echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6; }
ba479fd2
NN
15474if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then
15475 echo $ECHO_N "(cached) $ECHO_C" >&6
17e9e88c 15476else
8ada417f
ZW
15477 gcc_cv_as_sparc_ua_pcrel=no
15478 if test x$gcc_cv_as != x; then
6e3f3080 15479 echo '.text
8ada417f
ZW
15480foo:
15481 nop
15482.data
15483.align 4
15484.byte 0
15485.uaword %r_disp32(foo)' > conftest.s
ba479fd2
NN
15486 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
15487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15488 (eval $ac_try) 2>&5
15489 ac_status=$?
15490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15491 (exit $ac_status); }; }
8ada417f
ZW
15492 then
15493 if test x$gcc_cv_ld != x \
15494 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
15495 gcc_cv_as_sparc_ua_pcrel=yes
15496 fi
15497 rm -f conftest
15498 else
15499 echo "configure: failed program was" >&5
15500 cat conftest.s >&5
15501 fi
15502 rm -f conftest.o conftest.s
15503 fi
cafe096b 15504fi
ab22c1fa
CF
15505{ echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5
15506echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6; }
63cf211a 15507if test $gcc_cv_as_sparc_ua_pcrel = yes; then
ba479fd2
NN
15508
15509cat >>confdefs.h <<\_ACEOF
17e9e88c 15510#define HAVE_AS_SPARC_UA_PCREL 1
ba479fd2 15511_ACEOF
17e9e88c 15512
17e9e88c 15513
ab22c1fa
CF
15514 { echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
15515echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6; }
ba479fd2
NN
15516if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then
15517 echo $ECHO_N "(cached) $ECHO_C" >&6
cf7b8b0d 15518else
8ada417f
ZW
15519 gcc_cv_as_sparc_ua_pcrel_hidden=no
15520 if test x$gcc_cv_as != x; then
6e3f3080 15521 echo '.data
8ada417f
ZW
15522.align 4
15523.byte 0x31
15524.uaword %r_disp32(foo)
15525.byte 0x32, 0x33, 0x34
15526.global foo
15527.hidden foo
15528foo:
15529.skip 4' > conftest.s
ba479fd2
NN
15530 if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'
15531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15532 (eval $ac_try) 2>&5
15533 ac_status=$?
15534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15535 (exit $ac_status); }; }
8ada417f
ZW
15536 then
15537 if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
15538 && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
15539 && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
15540 | grep ' 31000000 07323334' > /dev/null 2>&1; then
15541 if $gcc_cv_objdump -R conftest 2> /dev/null \
15542 | grep 'DISP32' > /dev/null 2>&1; then
15543 :
15544 else
15545 gcc_cv_as_sparc_ua_pcrel_hidden=yes
cf7b8b0d 15546 fi
8ada417f
ZW
15547 fi
15548 rm -f conftest
15549 else
15550 echo "configure: failed program was" >&5
15551 cat conftest.s >&5
15552 fi
15553 rm -f conftest.o conftest.s
15554 fi
cafe096b 15555fi
ab22c1fa
CF
15556{ echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5
15557echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6; }
63cf211a 15558if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
ba479fd2
NN
15559
15560cat >>confdefs.h <<\_ACEOF
cf7b8b0d 15561#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
ba479fd2 15562_ACEOF
cf7b8b0d 15563
8ada417f 15564fi
ba479fd2 15565
8ada417f 15566fi # unaligned pcrel relocs
cf7b8b0d 15567
ab22c1fa
CF
15568 { echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5
15569echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6; }
ba479fd2
NN
15570if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then
15571 echo $ECHO_N "(cached) $ECHO_C" >&6
5b68c389 15572else
8ada417f
ZW
15573 gcc_cv_as_sparc_offsetable_lo10=no
15574 if test x$gcc_cv_as != x; then
6e3f3080 15575 echo '.text
8ada417f
ZW
15576 or %g1, %lo(ab) + 12, %g1
15577 or %g1, %lo(ab + 12), %g1' > conftest.s
ba479fd2
NN
15578 if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'
15579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15580 (eval $ac_try) 2>&5
15581 ac_status=$?
15582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15583 (exit $ac_status); }; }
8ada417f
ZW
15584 then
15585 if test x$gcc_cv_objdump != x \
ecb0ccbc 15586 && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
8ada417f 15587 | grep ' 82106000 82106000' > /dev/null 2>&1; then
1b5c0152 15588 gcc_cv_as_sparc_offsetable_lo10=yes
8ada417f
ZW
15589 fi
15590 else
15591 echo "configure: failed program was" >&5
15592 cat conftest.s >&5
15593 fi
15594 rm -f conftest.o conftest.s
15595 fi
cafe096b 15596fi
ab22c1fa
CF
15597{ echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5
15598echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6; }
63cf211a 15599if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
ba479fd2
NN
15600
15601cat >>confdefs.h <<\_ACEOF
1cb36a98 15602#define HAVE_AS_OFFSETABLE_LO10 1
ba479fd2 15603_ACEOF
1cb36a98 15604
8ada417f 15605fi
1cb36a98
RH
15606 ;;
15607
c307e6dd 15608 i[34567]86-*-* | x86_64-*-*)
d38bc601
BF
15609 case $target_os in
15610 cygwin* | pe | mingw32*)
15611 # Used for DWARF 2 in PE
ab22c1fa
CF
15612 { echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5
15613echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6; }
d38bc601
BF
15614if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then
15615 echo $ECHO_N "(cached) $ECHO_C" >&6
15616else
15617 gcc_cv_as_ix86_pe_secrel32=no
15618 if test $in_tree_gas = yes; then
15619 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91`
15620 then gcc_cv_as_ix86_pe_secrel32=yes
15621fi
15622 elif test x$gcc_cv_as != x; then
15623 echo '.text
15624foo: nop
15625.data
15626 .secrel32 foo' > conftest.s
15627 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15629 (eval $ac_try) 2>&5
15630 ac_status=$?
15631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15632 (exit $ac_status); }; }
15633 then
15634 if test x$gcc_cv_ld != x \
15635 && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then
15636 gcc_cv_as_ix86_pe_secrel32=yes
15637 fi
15638 rm -f conftest
15639 else
15640 echo "configure: failed program was" >&5
15641 cat conftest.s >&5
15642 fi
15643 rm -f conftest.o conftest.s
15644 fi
15645fi
ab22c1fa
CF
15646{ echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5
15647echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6; }
d38bc601
BF
15648if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
15649
15650cat >>confdefs.h <<\_ACEOF
15651#define HAVE_GAS_PE_SECREL32_RELOC 1
15652_ACEOF
15653
15654fi
15655 ;;
15656 esac
15657
ab22c1fa
CF
15658 { echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5
15659echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6; }
ba479fd2
NN
15660if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then
15661 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15662else
15663 gcc_cv_as_ix86_filds_fists=no
15664 if test $in_tree_gas = yes; then
15665 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
15666 then gcc_cv_as_ix86_filds_fists=yes
ad9c4d9f 15667fi
8ada417f 15668 elif test x$gcc_cv_as != x; then
6e3f3080 15669 echo 'filds mem; fists mem' > conftest.s
ba479fd2
NN
15670 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15672 (eval $ac_try) 2>&5
15673 ac_status=$?
15674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15675 (exit $ac_status); }; }
8ada417f
ZW
15676 then
15677 gcc_cv_as_ix86_filds_fists=yes
15678 else
15679 echo "configure: failed program was" >&5
15680 cat conftest.s >&5
981d4858 15681 fi
8ada417f
ZW
15682 rm -f conftest.o conftest.s
15683 fi
15684fi
ab22c1fa
CF
15685{ echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5
15686echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6; }
63cf211a 15687if test $gcc_cv_as_ix86_filds_fists = yes; then
ba479fd2
NN
15688
15689cat >>confdefs.h <<\_ACEOF
8ada417f 15690#define HAVE_GAS_FILDS_FISTS 1
ba479fd2 15691_ACEOF
ad9c4d9f 15692
f6f5dff2
RO
15693fi
15694
ab22c1fa
CF
15695 { echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5
15696echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6; }
ba479fd2
NN
15697if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then
15698 echo $ECHO_N "(cached) $ECHO_C" >&6
f6f5dff2
RO
15699else
15700 gcc_cv_as_ix86_cmov_sun_syntax=no
15701 if test x$gcc_cv_as != x; then
6e3f3080 15702 echo 'cmovl.l %edx, %eax' > conftest.s
ba479fd2
NN
15703 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15705 (eval $ac_try) 2>&5
15706 ac_status=$?
15707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15708 (exit $ac_status); }; }
f6f5dff2
RO
15709 then
15710 gcc_cv_as_ix86_cmov_sun_syntax=yes
15711 else
15712 echo "configure: failed program was" >&5
15713 cat conftest.s >&5
15714 fi
15715 rm -f conftest.o conftest.s
15716 fi
15717fi
ab22c1fa
CF
15718{ echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5
15719echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6; }
63cf211a 15720if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then
ba479fd2
NN
15721
15722cat >>confdefs.h <<\_ACEOF
f6f5dff2 15723#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1
ba479fd2 15724_ACEOF
f6f5dff2 15725
b6c03bcd
RS
15726fi
15727
ab22c1fa
CF
15728 { echo "$as_me:$LINENO: checking assembler for ffreep mnemonic" >&5
15729echo $ECHO_N "checking assembler for ffreep mnemonic... $ECHO_C" >&6; }
b6c03bcd
RS
15730if test "${gcc_cv_as_ix86_ffreep+set}" = set; then
15731 echo $ECHO_N "(cached) $ECHO_C" >&6
15732else
15733 gcc_cv_as_ix86_ffreep=no
15734 if test x$gcc_cv_as != x; then
15735 echo 'ffreep %st(1)' > conftest.s
15736 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15738 (eval $ac_try) 2>&5
15739 ac_status=$?
15740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15741 (exit $ac_status); }; }
15742 then
15743 gcc_cv_as_ix86_ffreep=yes
15744 else
15745 echo "configure: failed program was" >&5
15746 cat conftest.s >&5
15747 fi
15748 rm -f conftest.o conftest.s
15749 fi
15750fi
ab22c1fa
CF
15751{ echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_ffreep" >&5
15752echo "${ECHO_T}$gcc_cv_as_ix86_ffreep" >&6; }
b6c03bcd
RS
15753if test $gcc_cv_as_ix86_ffreep = yes; then
15754
15755cat >>confdefs.h <<\_ACEOF
15756#define HAVE_AS_IX86_FFREEP 1
15757_ACEOF
15758
38ca3765
UB
15759fi
15760
ab22c1fa
CF
15761 { echo "$as_me:$LINENO: checking assembler for sahf mnemonic" >&5
15762echo $ECHO_N "checking assembler for sahf mnemonic... $ECHO_C" >&6; }
38ca3765
UB
15763if test "${gcc_cv_as_ix86_sahf+set}" = set; then
15764 echo $ECHO_N "(cached) $ECHO_C" >&6
15765else
15766 gcc_cv_as_ix86_sahf=no
15767 if test x$gcc_cv_as != x; then
15768 echo 'sahf' > conftest.s
15769 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15771 (eval $ac_try) 2>&5
15772 ac_status=$?
15773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15774 (exit $ac_status); }; }
15775 then
15776 gcc_cv_as_ix86_sahf=yes
15777 else
15778 echo "configure: failed program was" >&5
15779 cat conftest.s >&5
15780 fi
15781 rm -f conftest.o conftest.s
15782 fi
15783fi
ab22c1fa
CF
15784{ echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_sahf" >&5
15785echo "${ECHO_T}$gcc_cv_as_ix86_sahf" >&6; }
38ca3765
UB
15786if test $gcc_cv_as_ix86_sahf = yes; then
15787
15788cat >>confdefs.h <<\_ACEOF
15789#define HAVE_AS_IX86_SAHF 1
15790_ACEOF
15791
68b92f78
RS
15792fi
15793
ab22c1fa
CF
15794 { echo "$as_me:$LINENO: checking assembler for different section symbol subtraction" >&5
15795echo $ECHO_N "checking assembler for different section symbol subtraction... $ECHO_C" >&6; }
68b92f78
RS
15796if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then
15797 echo $ECHO_N "(cached) $ECHO_C" >&6
15798else
15799 gcc_cv_as_ix86_diff_sect_delta=no
15800 if test x$gcc_cv_as != x; then
15801 echo '.section .rodata
15802.L1:
15803 .long .L2-.L1
15804 .long .L3-.L1
15805 .text
15806.L3: nop
15807.L2: nop' > conftest.s
15808 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15810 (eval $ac_try) 2>&5
15811 ac_status=$?
15812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15813 (exit $ac_status); }; }
15814 then
15815 gcc_cv_as_ix86_diff_sect_delta=yes
15816 else
15817 echo "configure: failed program was" >&5
15818 cat conftest.s >&5
15819 fi
15820 rm -f conftest.o conftest.s
15821 fi
15822fi
ab22c1fa
CF
15823{ echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_diff_sect_delta" >&5
15824echo "${ECHO_T}$gcc_cv_as_ix86_diff_sect_delta" >&6; }
68b92f78
RS
15825if test $gcc_cv_as_ix86_diff_sect_delta = yes; then
15826
15827cat >>confdefs.h <<\_ACEOF
15828#define HAVE_AS_IX86_DIFF_SECT_DELTA 1
15829_ACEOF
15830
ad9c4d9f
NN
15831fi
15832
6f3ca281
ZW
15833 # This one is used unconditionally by i386.[ch]; it is to be defined
15834 # to 1 if the feature is present, 0 otherwise.
ab22c1fa
CF
15835 { echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5
15836echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6; }
ba479fd2
NN
15837if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then
15838 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
15839else
15840 gcc_cv_as_ix86_gotoff_in_data=no
15841 if test $in_tree_gas = yes; then
15842 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
15843 then gcc_cv_as_ix86_gotoff_in_data=yes
15844fi
15845 elif test x$gcc_cv_as != x; then
6e3f3080 15846 echo ' .text
f88c65f7
RH
15847.L0:
15848 nop
15849 .data
8ada417f 15850 .long .L0@GOTOFF' > conftest.s
ba479fd2
NN
15851 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15853 (eval $ac_try) 2>&5
15854 ac_status=$?
15855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15856 (exit $ac_status); }; }
8ada417f
ZW
15857 then
15858 gcc_cv_as_ix86_gotoff_in_data=yes
15859 else
15860 echo "configure: failed program was" >&5
15861 cat conftest.s >&5
f88c65f7 15862 fi
8ada417f
ZW
15863 rm -f conftest.o conftest.s
15864 fi
15865fi
ab22c1fa
CF
15866{ echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5
15867echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6; }
8ada417f 15868
6f3ca281 15869
ba479fd2 15870cat >>confdefs.h <<_ACEOF
6f3ca281 15871#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
ba479fd2 15872_ACEOF
f88c65f7 15873
1cb36a98 15874 ;;
ef1ecf87
RH
15875
15876 ia64*-*-*)
ab22c1fa
CF
15877 { echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5
15878echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6; }
ba479fd2
NN
15879if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then
15880 echo $ECHO_N "(cached) $ECHO_C" >&6
ef1ecf87 15881else
8ada417f
ZW
15882 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
15883 if test $in_tree_gas = yes; then
15884 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15885 then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
ad9c4d9f 15886fi
8ada417f 15887 elif test x$gcc_cv_as != x; then
6e3f3080 15888 echo ' .text
ef1ecf87
RH
15889 addl r15 = @ltoffx(x#), gp
15890 ;;
cfa9ee99 15891 ld8.mov r16 = [r15], x#' > conftest.s
ba479fd2
NN
15892 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15894 (eval $ac_try) 2>&5
15895 ac_status=$?
15896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15897 (exit $ac_status); }; }
8ada417f 15898 then
cfa9ee99 15899 gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
8ada417f
ZW
15900 else
15901 echo "configure: failed program was" >&5
15902 cat conftest.s >&5
2c4a9cff 15903 fi
8ada417f
ZW
15904 rm -f conftest.o conftest.s
15905 fi
15906fi
ab22c1fa
CF
15907{ echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5
15908echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6; }
63cf211a 15909if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then
ba479fd2
NN
15910
15911cat >>confdefs.h <<\_ACEOF
cfa9ee99 15912#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
ba479fd2 15913_ACEOF
8ada417f 15914
cfa9ee99 15915fi
8ada417f 15916
2c4a9cff 15917 ;;
8ada417f 15918
2c4a9cff 15919 powerpc*-*-*)
8ada417f 15920 case $target in
432218ba
DE
15921 *-*-aix*) conftest_s=' .machine "pwr5"
15922 .csect .text[PR]
6b37db3c 15923 mfcr 3,128';;
8af4d362 15924 *-*-darwin*)
ab22c1fa
CF
15925 { echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5
15926echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6; }
8af4d362
PB
15927if test "${gcc_cv_as_machine_directive+set}" = set; then
15928 echo $ECHO_N "(cached) $ECHO_C" >&6
15929else
15930 gcc_cv_as_machine_directive=no
15931 if test x$gcc_cv_as != x; then
15932 echo ' .machine ppc7400' > conftest.s
15933 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15935 (eval $ac_try) 2>&5
15936 ac_status=$?
15937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15938 (exit $ac_status); }; }
15939 then
15940 gcc_cv_as_machine_directive=yes
15941 else
15942 echo "configure: failed program was" >&5
15943 cat conftest.s >&5
15944 fi
15945 rm -f conftest.o conftest.s
15946 fi
15947fi
ab22c1fa
CF
15948{ echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5
15949echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6; }
8af4d362
PB
15950
15951 if test x$gcc_cv_as_machine_directive != xyes; then
15952 echo "*** This target requires an assembler supporting \".machine\"" >&2
15953 echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
15954 test x$build = x$target && exit 1
15955 fi
15956 conftest_s=' .text
6b37db3c 15957 mfcr r3,128';;
4c67db14 15958 *) conftest_s=' .machine power4
d2ab3e37 15959 .text
6b37db3c 15960 mfcr 3,128';;
8ada417f 15961 esac
8ada417f 15962
ab22c1fa
CF
15963 { echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5
15964echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6; }
ba479fd2
NN
15965if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then
15966 echo $ECHO_N "(cached) $ECHO_C" >&6
2c4a9cff 15967else
8ada417f
ZW
15968 gcc_cv_as_powerpc_mfcrf=no
15969 if test $in_tree_gas = yes; then
15970 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
15971 then gcc_cv_as_powerpc_mfcrf=yes
2c4a9cff 15972fi
8ada417f 15973 elif test x$gcc_cv_as != x; then
6e3f3080 15974 echo "$conftest_s" > conftest.s
ba479fd2
NN
15975 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
15976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15977 (eval $ac_try) 2>&5
15978 ac_status=$?
15979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15980 (exit $ac_status); }; }
8ada417f
ZW
15981 then
15982 gcc_cv_as_powerpc_mfcrf=yes
15983 else
15984 echo "configure: failed program was" >&5
15985 cat conftest.s >&5
15986 fi
15987 rm -f conftest.o conftest.s
15988 fi
2c4a9cff 15989fi
ab22c1fa
CF
15990{ echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5
15991echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6; }
63cf211a 15992if test $gcc_cv_as_powerpc_mfcrf = yes; then
ba479fd2
NN
15993
15994cat >>confdefs.h <<\_ACEOF
2c4a9cff 15995#define HAVE_AS_MFCRF 1
ba479fd2 15996_ACEOF
ef1ecf87 15997
8ada417f 15998fi
432218ba
DE
15999
16000 case $target in
16001 *-*-aix*) conftest_s=' .machine "pwr5"
16002 .csect .text[PR]
16003 popcntb 3,3';;
16004 *) conftest_s=' .machine power5
16005 .text
16006 popcntb 3,3';;
16007 esac
16008
ab22c1fa
CF
16009 { echo "$as_me:$LINENO: checking assembler for popcntb support" >&5
16010echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6; }
432218ba
DE
16011if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then
16012 echo $ECHO_N "(cached) $ECHO_C" >&6
16013else
16014 gcc_cv_as_powerpc_popcntb=no
16015 if test $in_tree_gas = yes; then
16016 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
16017 then gcc_cv_as_powerpc_popcntb=yes
16018fi
16019 elif test x$gcc_cv_as != x; then
16020 echo "$conftest_s" > conftest.s
16021 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
16022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16023 (eval $ac_try) 2>&5
16024 ac_status=$?
16025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16026 (exit $ac_status); }; }
16027 then
16028 gcc_cv_as_powerpc_popcntb=yes
16029 else
16030 echo "configure: failed program was" >&5
16031 cat conftest.s >&5
16032 fi
16033 rm -f conftest.o conftest.s
16034 fi
16035fi
ab22c1fa
CF
16036{ echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5
16037echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6; }
432218ba
DE
16038if test $gcc_cv_as_powerpc_popcntb = yes; then
16039
16040cat >>confdefs.h <<\_ACEOF
16041#define HAVE_AS_POPCNTB 1
16042_ACEOF
16043
9719f3b7
DE
16044fi
16045
16046 case $target in
16047 *-*-aix*) conftest_s=' .machine "pwr5x"
16048 .csect .text[PR]
16049 frin 1,1';;
1e04bfdc 16050 *) conftest_s=' .machine power5
9719f3b7
DE
16051 .text
16052 frin 1,1';;
16053 esac
16054
ab22c1fa
CF
16055 { echo "$as_me:$LINENO: checking assembler for fp round support" >&5
16056echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6; }
9719f3b7
DE
16057if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then
16058 echo $ECHO_N "(cached) $ECHO_C" >&6
16059else
16060 gcc_cv_as_powerpc_fprnd=no
16061 if test $in_tree_gas = yes; then
16062 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
16063 then gcc_cv_as_powerpc_fprnd=yes
16064fi
16065 elif test x$gcc_cv_as != x; then
16066 echo "$conftest_s" > conftest.s
16067 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
16068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16069 (eval $ac_try) 2>&5
16070 ac_status=$?
16071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16072 (exit $ac_status); }; }
16073 then
16074 gcc_cv_as_powerpc_fprnd=yes
16075 else
16076 echo "configure: failed program was" >&5
16077 cat conftest.s >&5
16078 fi
16079 rm -f conftest.o conftest.s
16080 fi
16081fi
ab22c1fa
CF
16082{ echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5
16083echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6; }
9719f3b7
DE
16084if test $gcc_cv_as_powerpc_fprnd = yes; then
16085
16086cat >>confdefs.h <<\_ACEOF
16087#define HAVE_AS_FPRND 1
16088_ACEOF
16089
44cd321e
PS
16090fi
16091
16092 case $target in
16093 *-*-aix*) conftest_s=' .machine "pwr6"
16094 .csect .text[PR]
16095 mffgpr 1,3';;
16096 *) conftest_s=' .machine power6
16097 .text
16098 mffgpr 1,3';;
16099 esac
16100
ab22c1fa
CF
16101 { echo "$as_me:$LINENO: checking assembler for move fp gpr support" >&5
16102echo $ECHO_N "checking assembler for move fp gpr support... $ECHO_C" >&6; }
44cd321e
PS
16103if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then
16104 echo $ECHO_N "(cached) $ECHO_C" >&6
16105else
16106 gcc_cv_as_powerpc_mfpgpr=no
16107 if test $in_tree_gas = yes; then
16108 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
16109 then gcc_cv_as_powerpc_mfpgpr=yes
16110fi
16111 elif test x$gcc_cv_as != x; then
16112 echo "$conftest_s" > conftest.s
16113 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
16114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16115 (eval $ac_try) 2>&5
16116 ac_status=$?
16117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16118 (exit $ac_status); }; }
16119 then
16120 gcc_cv_as_powerpc_mfpgpr=yes
16121 else
16122 echo "configure: failed program was" >&5
16123 cat conftest.s >&5
16124 fi
16125 rm -f conftest.o conftest.s
16126 fi
16127fi
ab22c1fa
CF
16128{ echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfpgpr" >&5
16129echo "${ECHO_T}$gcc_cv_as_powerpc_mfpgpr" >&6; }
44cd321e
PS
16130if test $gcc_cv_as_powerpc_mfpgpr = yes; then
16131
16132cat >>confdefs.h <<\_ACEOF
16133#define HAVE_AS_MFPGPR 1
16134_ACEOF
16135
432218ba
DE
16136fi
16137
7f970b70
AM
16138 case $target in
16139 *-*-aix*) conftest_s=' .csect .text[PR]
16140LCF..0:
16141 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';;
16142 *-*-darwin*)
16143 conftest_s=' .text
16144LCF0:
16145 addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';;
16146 *) conftest_s=' .text
16147.LCF0:
16148 addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';;
16149 esac
16150
ab22c1fa
CF
16151 { echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5
16152echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6; }
695d8830
AS
16153if test "${gcc_cv_as_powerpc_rel16+set}" = set; then
16154 echo $ECHO_N "(cached) $ECHO_C" >&6
16155else
16156 gcc_cv_as_powerpc_rel16=no
16157 if test $in_tree_gas = yes; then
16158 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
16159 then gcc_cv_as_powerpc_rel16=yes
16160fi
16161 elif test x$gcc_cv_as != x; then
16162 echo "$conftest_s" > conftest.s
16163 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
16164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16165 (eval $ac_try) 2>&5
16166 ac_status=$?
16167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16168 (exit $ac_status); }; }
16169 then
16170 gcc_cv_as_powerpc_rel16=yes
16171 else
16172 echo "configure: failed program was" >&5
16173 cat conftest.s >&5
16174 fi
16175 rm -f conftest.o conftest.s
16176 fi
16177fi
ab22c1fa
CF
16178{ echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5
16179echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6; }
695d8830
AS
16180if test $gcc_cv_as_powerpc_rel16 = yes; then
16181
16182cat >>confdefs.h <<\_ACEOF
16183#define HAVE_AS_REL16 1
16184_ACEOF
16185
16186fi
16187
b639c3c2
JJ
16188 case $target in
16189 *-*-aix*) conftest_s=' .machine "pwr6"
16190 .csect .text[PR]
16191 cmpb 3,4,5';;
16192 *) conftest_s=' .machine power6
16193 .text
16194 cmpb 3,4,5';;
16195 esac
16196
ab22c1fa
CF
16197 { echo "$as_me:$LINENO: checking assembler for compare bytes support" >&5
16198echo $ECHO_N "checking assembler for compare bytes support... $ECHO_C" >&6; }
b639c3c2
JJ
16199if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then
16200 echo $ECHO_N "(cached) $ECHO_C" >&6
16201else
16202 gcc_cv_as_powerpc_cmpb=no
16203 if test $in_tree_gas = yes; then
16204 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
16205 then gcc_cv_as_powerpc_cmpb=yes
16206fi
16207 elif test x$gcc_cv_as != x; then
16208 echo "$conftest_s" > conftest.s
16209 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
16210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16211 (eval $ac_try) 2>&5
16212 ac_status=$?
16213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16214 (exit $ac_status); }; }
16215 then
16216 gcc_cv_as_powerpc_cmpb=yes
16217 else
16218 echo "configure: failed program was" >&5
16219 cat conftest.s >&5
16220 fi
16221 rm -f conftest.o conftest.s
16222 fi
16223fi
ab22c1fa
CF
16224{ echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_cmpb" >&5
16225echo "${ECHO_T}$gcc_cv_as_powerpc_cmpb" >&6; }
b639c3c2
JJ
16226if test $gcc_cv_as_powerpc_cmpb = yes; then
16227
16228cat >>confdefs.h <<\_ACEOF
16229#define HAVE_AS_CMPB 1
16230_ACEOF
16231
16232fi
16233
16234 case $target in
16235 *-*-aix*) conftest_s=' .machine "pwr6"
16236 .csect .text[PR]
0d74c0ee 16237 dadd 1,2,3';;
b639c3c2
JJ
16238 *) conftest_s=' .machine power6
16239 .text
0d74c0ee 16240 dadd 1,2,3';;
b639c3c2
JJ
16241 esac
16242
ab22c1fa
CF
16243 { echo "$as_me:$LINENO: checking assembler for decimal float support" >&5
16244echo $ECHO_N "checking assembler for decimal float support... $ECHO_C" >&6; }
b639c3c2
JJ
16245if test "${gcc_cv_as_powerpc_dfp+set}" = set; then
16246 echo $ECHO_N "(cached) $ECHO_C" >&6
16247else
16248 gcc_cv_as_powerpc_dfp=no
16249 if test $in_tree_gas = yes; then
16250 if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0`
16251 then gcc_cv_as_powerpc_dfp=yes
16252fi
16253 elif test x$gcc_cv_as != x; then
16254 echo "$conftest_s" > conftest.s
16255 if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5'
16256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16257 (eval $ac_try) 2>&5
16258 ac_status=$?
16259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16260 (exit $ac_status); }; }
16261 then
16262 gcc_cv_as_powerpc_dfp=yes
16263 else
16264 echo "configure: failed program was" >&5
16265 cat conftest.s >&5
16266 fi
16267 rm -f conftest.o conftest.s
16268 fi
16269fi
ab22c1fa
CF
16270{ echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_dfp" >&5
16271echo "${ECHO_T}$gcc_cv_as_powerpc_dfp" >&6; }
b639c3c2
JJ
16272if test $gcc_cv_as_powerpc_dfp = yes; then
16273
16274cat >>confdefs.h <<\_ACEOF
16275#define HAVE_AS_DFP 1
16276_ACEOF
16277
e51917ae
JM
16278fi
16279
ab22c1fa
CF
16280 { echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
16281echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6; }
e51917ae
JM
16282if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then
16283 echo $ECHO_N "(cached) $ECHO_C" >&6
16284else
16285 gcc_cv_as_powerpc_gnu_attribute=no
16286 if test $in_tree_gas = yes; then
16287 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
16288 then gcc_cv_as_powerpc_gnu_attribute=yes
16289fi
16290 elif test x$gcc_cv_as != x; then
16291 echo '.gnu_attribute 4,1' > conftest.s
16292 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
16293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16294 (eval $ac_try) 2>&5
16295 ac_status=$?
16296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16297 (exit $ac_status); }; }
16298 then
16299 gcc_cv_as_powerpc_gnu_attribute=yes
16300 else
16301 echo "configure: failed program was" >&5
16302 cat conftest.s >&5
16303 fi
16304 rm -f conftest.o conftest.s
16305 fi
16306fi
ab22c1fa
CF
16307{ echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_gnu_attribute" >&5
16308echo "${ECHO_T}$gcc_cv_as_powerpc_gnu_attribute" >&6; }
e51917ae
JM
16309if test $gcc_cv_as_powerpc_gnu_attribute = yes; then
16310
16311cat >>confdefs.h <<\_ACEOF
16312#define HAVE_AS_GNU_ATTRIBUTE 1
16313_ACEOF
16314
7f970b70 16315fi
8ada417f
ZW
16316 ;;
16317
16318 mips*-*-*)
ab22c1fa
CF
16319 { echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5
16320echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6; }
ba479fd2
NN
16321if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then
16322 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
16323else
16324 gcc_cv_as_mips_explicit_relocs=no
16325 if test $in_tree_gas = yes; then
16326 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
16327 then gcc_cv_as_mips_explicit_relocs=yes
16328fi
16329 elif test x$gcc_cv_as != x; then
6e3f3080 16330 echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
ba479fd2
NN
16331 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
16332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16333 (eval $ac_try) 2>&5
16334 ac_status=$?
16335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16336 (exit $ac_status); }; }
8ada417f
ZW
16337 then
16338 gcc_cv_as_mips_explicit_relocs=yes
16339 else
16340 echo "configure: failed program was" >&5
16341 cat conftest.s >&5
ef1ecf87 16342 fi
8ada417f
ZW
16343 rm -f conftest.o conftest.s
16344 fi
16345fi
ab22c1fa
CF
16346{ echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5
16347echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6; }
8ada417f
ZW
16348if test $gcc_cv_as_mips_explicit_relocs = yes; then
16349 if test x$target_cpu_default = x
16350 then target_cpu_default=MASK_EXPLICIT_RELOCS
16351 else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
16352 fi
4551169f 16353fi
ab22c1fa
CF
16354 { echo "$as_me:$LINENO: checking assembler for -mno-shared support" >&5
16355echo $ECHO_N "checking assembler for -mno-shared support... $ECHO_C" >&6; }
4551169f
RS
16356if test "${gcc_cv_as_mips_no_shared+set}" = set; then
16357 echo $ECHO_N "(cached) $ECHO_C" >&6
16358else
16359 gcc_cv_as_mips_no_shared=no
16360 if test $in_tree_gas = yes; then
16361 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0`
16362 then gcc_cv_as_mips_no_shared=yes
16363fi
16364 elif test x$gcc_cv_as != x; then
16365 echo 'nop' > conftest.s
16366 if { ac_try='$gcc_cv_as -mno-shared -o conftest.o conftest.s >&5'
16367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16368 (eval $ac_try) 2>&5
16369 ac_status=$?
16370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16371 (exit $ac_status); }; }
16372 then
16373 gcc_cv_as_mips_no_shared=yes
16374 else
16375 echo "configure: failed program was" >&5
16376 cat conftest.s >&5
16377 fi
16378 rm -f conftest.o conftest.s
16379 fi
16380fi
ab22c1fa
CF
16381{ echo "$as_me:$LINENO: result: $gcc_cv_as_mips_no_shared" >&5
16382echo "${ECHO_T}$gcc_cv_as_mips_no_shared" >&6; }
4551169f
RS
16383if test $gcc_cv_as_mips_no_shared = yes; then
16384
16385cat >>confdefs.h <<\_ACEOF
16386#define HAVE_AS_NO_SHARED 1
16387_ACEOF
16388
dcb957d9
JM
16389fi
16390
ab22c1fa
CF
16391 { echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5
16392echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6; }
dcb957d9
JM
16393if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then
16394 echo $ECHO_N "(cached) $ECHO_C" >&6
16395else
16396 gcc_cv_as_mips_gnu_attribute=no
16397 if test $in_tree_gas = yes; then
16398 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
16399 then gcc_cv_as_mips_gnu_attribute=yes
16400fi
16401 elif test x$gcc_cv_as != x; then
16402 echo '.gnu_attribute 4,1' > conftest.s
16403 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
16404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16405 (eval $ac_try) 2>&5
16406 ac_status=$?
16407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16408 (exit $ac_status); }; }
16409 then
16410 gcc_cv_as_mips_gnu_attribute=yes
16411 else
16412 echo "configure: failed program was" >&5
16413 cat conftest.s >&5
16414 fi
16415 rm -f conftest.o conftest.s
16416 fi
16417fi
ab22c1fa
CF
16418{ echo "$as_me:$LINENO: result: $gcc_cv_as_mips_gnu_attribute" >&5
16419echo "${ECHO_T}$gcc_cv_as_mips_gnu_attribute" >&6; }
dcb957d9
JM
16420if test $gcc_cv_as_mips_gnu_attribute = yes; then
16421
16422cat >>confdefs.h <<\_ACEOF
16423#define HAVE_AS_GNU_ATTRIBUTE 1
16424_ACEOF
16425
a44380d2
JM
16426fi
16427
ab22c1fa
CF
16428 { echo "$as_me:$LINENO: checking assembler for .dtprelword support" >&5
16429echo $ECHO_N "checking assembler for .dtprelword support... $ECHO_C" >&6; }
a44380d2
JM
16430if test "${gcc_cv_as_mips_dtprelword+set}" = set; then
16431 echo $ECHO_N "(cached) $ECHO_C" >&6
16432else
16433 gcc_cv_as_mips_dtprelword=no
16434 if test $in_tree_gas = yes; then
16435 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0`
16436 then gcc_cv_as_mips_dtprelword=yes
16437fi
16438 elif test x$gcc_cv_as != x; then
16439 echo '.section .tdata,"awT",@progbits
16440x:
16441 .word 2
16442 .text
16443 .dtprelword x+0x8000' > conftest.s
16444 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
16445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16446 (eval $ac_try) 2>&5
16447 ac_status=$?
16448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16449 (exit $ac_status); }; }
16450 then
16451 gcc_cv_as_mips_dtprelword=yes
16452 else
16453 echo "configure: failed program was" >&5
16454 cat conftest.s >&5
16455 fi
16456 rm -f conftest.o conftest.s
16457 fi
16458fi
ab22c1fa
CF
16459{ echo "$as_me:$LINENO: result: $gcc_cv_as_mips_dtprelword" >&5
16460echo "${ECHO_T}$gcc_cv_as_mips_dtprelword" >&6; }
a44380d2
JM
16461if test $gcc_cv_as_mips_dtprelword = yes; then
16462
16463cat >>confdefs.h <<\_ACEOF
16464#define HAVE_AS_DTPRELWORD 1
16465_ACEOF
16466
8ada417f 16467fi
dbad5e72
SE
16468 ;;
16469esac
8ada417f 16470
dbad5e72
SE
16471# Mips and HP-UX need the GNU assembler.
16472# Linux on IA64 might be able to use the Intel assembler.
16473
16474case "$target" in
16475 mips*-*-* | *-*-hpux* )
82563d35
RS
16476 if test x$gas_flag = xyes \
16477 || test x"$host" != x"$build" \
16478 || test ! -x "$gcc_cv_as" \
16479 || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then
16480 :
16481 else
16482 echo "*** This configuration requires the GNU assembler" >&2
16483 exit 1
16484 fi
ef1ecf87 16485 ;;
1cb36a98 16486esac
dbad5e72 16487
9d147085
RH
16488# ??? Not all targets support dwarf2 debug_line, even within a version
16489# of gas. Moreover, we need to emit a valid instruction to trigger any
16490# info to the output file. So, as supported targets are added to gas 2.11,
16491# add some instruction here to (also) show we expect this might work.
16492# ??? Once 2.11 is released, probably need to add first known working
16493# version to the per-target configury.
16494case "$target" in
80486e06 16495 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
2853bc5a 16496 | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
714f737f 16497 | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-* | spu-*-*)
9d147085
RH
16498 insn="nop"
16499 ;;
57116d8d 16500 ia64*-*-* | s390*-*-*)
9d147085
RH
16501 insn="nop 0"
16502 ;;
2853bc5a
HPN
16503 mmix-*-*)
16504 insn="swym 0"
16505 ;;
8ada417f
ZW
16506esac
16507if test x"$insn" != x; then
16508 conftest_s="\
16509 .file 1 \"conftest.s\"
16510 .loc 1 3 0
16511 $insn"
ab22c1fa
CF
16512 { echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5
16513echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6; }
ba479fd2
NN
16514if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then
16515 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
16516else
16517 gcc_cv_as_dwarf2_debug_line=no
16518 if test $in_tree_gas = yes; then
16519 if test $in_tree_gas_is_elf = yes \
16520 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
16521 then gcc_cv_as_dwarf2_debug_line=yes
16522fi
16523 elif test x$gcc_cv_as != x; then
6e3f3080 16524 echo "$conftest_s" > conftest.s
ba479fd2
NN
16525 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
16526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16527 (eval $ac_try) 2>&5
16528 ac_status=$?
16529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16530 (exit $ac_status); }; }
8ada417f 16531 then
080a5bb0
EB
16532 if test x$gcc_cv_objdump != x \
16533 && $gcc_cv_objdump -h conftest.o 2> /dev/null \
16534 | grep debug_line > /dev/null 2>&1; then
8ada417f
ZW
16535 gcc_cv_as_dwarf2_debug_line=yes
16536 fi
16537 else
16538 echo "configure: failed program was" >&5
16539 cat conftest.s >&5
16540 fi
16541 rm -f conftest.o conftest.s
16542 fi
16543fi
ab22c1fa
CF
16544{ echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5
16545echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6; }
ad9c4d9f 16546
ad9c4d9f 16547
8ada417f
ZW
16548# The .debug_line file table must be in the exact order that
16549# we specified the files, since these indices are also used
16550# by DW_AT_decl_file. Approximate this test by testing if
16551# the assembler bitches if the same index is assigned twice.
ab22c1fa
CF
16552 { echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5
16553echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6; }
ba479fd2
NN
16554if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then
16555 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
16556else
16557 gcc_cv_as_dwarf2_file_buggy=no
16558 if test x$gcc_cv_as != x; then
6e3f3080 16559 echo ' .file 1 "foo.s"
8ada417f 16560 .file 1 "bar.s"' > conftest.s
ba479fd2
NN
16561 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
16562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16563 (eval $ac_try) 2>&5
16564 ac_status=$?
16565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16566 (exit $ac_status); }; }
8ada417f
ZW
16567 then
16568 gcc_cv_as_dwarf2_file_buggy=yes
16569 else
16570 echo "configure: failed program was" >&5
16571 cat conftest.s >&5
16572 fi
16573 rm -f conftest.o conftest.s
16574 fi
ad9c4d9f 16575fi
ab22c1fa
CF
16576{ echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5
16577echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6; }
8ada417f
ZW
16578
16579
16580 if test $gcc_cv_as_dwarf2_debug_line = yes \
16581 && test $gcc_cv_as_dwarf2_file_buggy = no; then
ba479fd2
NN
16582
16583cat >>confdefs.h <<\_ACEOF
9d147085 16584#define HAVE_AS_DWARF2_DEBUG_LINE 1
ba479fd2 16585_ACEOF
9d147085 16586
8ada417f 16587 fi
ad9c4d9f 16588
ab22c1fa
CF
16589 { echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5
16590echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6; }
ba479fd2
NN
16591if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then
16592 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
16593else
16594 gcc_cv_as_gdwarf2_flag=no
16595 if test $in_tree_gas = yes; then
16596 if test $in_tree_gas_is_elf = yes \
16597 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
16598 then gcc_cv_as_gdwarf2_flag=yes
16599fi
16600 elif test x$gcc_cv_as != x; then
6e3f3080 16601 echo "$insn" > conftest.s
ba479fd2
NN
16602 if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'
16603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16604 (eval $ac_try) 2>&5
16605 ac_status=$?
16606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16607 (exit $ac_status); }; }
8ada417f
ZW
16608 then
16609 gcc_cv_as_gdwarf2_flag=yes
16610 else
16611 echo "configure: failed program was" >&5
16612 cat conftest.s >&5
16613 fi
16614 rm -f conftest.o conftest.s
16615 fi
ad9c4d9f 16616fi
ab22c1fa
CF
16617{ echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5
16618echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6; }
63cf211a 16619if test $gcc_cv_as_gdwarf2_flag = yes; then
ba479fd2
NN
16620
16621cat >>confdefs.h <<\_ACEOF
5f0e9ea2 16622#define HAVE_AS_GDWARF2_DEBUG_FLAG 1
ba479fd2 16623_ACEOF
5f0e9ea2
GK
16624
16625fi
ad9c4d9f 16626
ab22c1fa
CF
16627 { echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5
16628echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6; }
ba479fd2
NN
16629if test "${gcc_cv_as_gstabs_flag+set}" = set; then
16630 echo $ECHO_N "(cached) $ECHO_C" >&6
8ada417f
ZW
16631else
16632 gcc_cv_as_gstabs_flag=no
16633 if test $in_tree_gas = yes; then
16634 if test $in_tree_gas_is_elf = yes \
16635 && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
16636 then gcc_cv_as_gstabs_flag=yes
16637fi
16638 elif test x$gcc_cv_as != x; then
6e3f3080 16639 echo "$insn" > conftest.s
ba479fd2
NN
16640 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'
16641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16642 (eval $ac_try) 2>&5
16643 ac_status=$?
16644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16645 (exit $ac_status); }; }
8ada417f
ZW
16646 then
16647 # The native Solaris 9/Intel assembler doesn't understand --gstabs
16648 # and warns about it, but still exits successfully. So check for
16649 # this.
ba479fd2
NN
16650 if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'
16651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16652 (eval $ac_try) 2>&5
16653 ac_status=$?
16654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16655 (exit $ac_status); }; }
8ada417f
ZW
16656 then :
16657 else gcc_cv_as_gstabs_flag=yes
16658 fi
16659 else
16660 echo "configure: failed program was" >&5
16661 cat conftest.s >&5
16662 fi
16663 rm -f conftest.o conftest.s
16664 fi
ad9c4d9f 16665fi
ab22c1fa
CF
16666{ echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5
16667echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6; }
63cf211a 16668if test $gcc_cv_as_gstabs_flag = yes; then
ba479fd2
NN
16669
16670cat >>confdefs.h <<\_ACEOF
5f0e9ea2 16671#define HAVE_AS_GSTABS_DEBUG_FLAG 1
ba479fd2 16672_ACEOF
5f0e9ea2 16673
c8aea42c
PB
16674fi
16675
ab22c1fa
CF
16676 { echo "$as_me:$LINENO: checking assembler for --debug-prefix-map option" >&5
16677echo $ECHO_N "checking assembler for --debug-prefix-map option... $ECHO_C" >&6; }
c8aea42c
PB
16678if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then
16679 echo $ECHO_N "(cached) $ECHO_C" >&6
16680else
16681 gcc_cv_as_debug_prefix_map_flag=no
16682 if test $in_tree_gas = yes; then
16683 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 0`
16684 then gcc_cv_as_debug_prefix_map_flag=yes
16685fi
16686 elif test x$gcc_cv_as != x; then
16687 echo "$insn" > conftest.s
16688 if { ac_try='$gcc_cv_as --debug-prefix-map /a=/b -o conftest.o conftest.s >&5'
16689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16690 (eval $ac_try) 2>&5
16691 ac_status=$?
16692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16693 (exit $ac_status); }; }
16694 then
16695 gcc_cv_as_debug_prefix_map_flag=yes
16696 else
16697 echo "configure: failed program was" >&5
16698 cat conftest.s >&5
16699 fi
16700 rm -f conftest.o conftest.s
16701 fi
16702fi
ab22c1fa
CF
16703{ echo "$as_me:$LINENO: result: $gcc_cv_as_debug_prefix_map_flag" >&5
16704echo "${ECHO_T}$gcc_cv_as_debug_prefix_map_flag" >&6; }
c8aea42c
PB
16705if test $gcc_cv_as_debug_prefix_map_flag = yes; then
16706
16707cat >>confdefs.h <<\_ACEOF
16708#define HAVE_AS_DEBUG_PREFIX_MAP 1
16709_ACEOF
16710
5f0e9ea2 16711fi
8ada417f 16712fi
5f0e9ea2 16713
ab22c1fa
CF
16714{ echo "$as_me:$LINENO: checking assembler for tolerance to line number 0" >&5
16715echo $ECHO_N "checking assembler for tolerance to line number 0... $ECHO_C" >&6; }
03943c05
AO
16716if test "${gcc_cv_as_line_zero+set}" = set; then
16717 echo $ECHO_N "(cached) $ECHO_C" >&6
16718else
16719 gcc_cv_as_line_zero=no
16720 if test $in_tree_gas = yes; then
cf0eb7a1
AO
16721 if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91`
16722 then gcc_cv_as_line_zero=yes
03943c05
AO
16723fi
16724 elif test "x$gcc_cv_as" != x; then
16725 { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s
16726 if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out'
16727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16728 (eval $ac_try) 2>&5
16729 ac_status=$?
16730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16731 (exit $ac_status); }; } &&
16732 test "x`cat conftest.out`" = x
16733 then
16734 gcc_cv_as_line_zero=yes
16735 else
16736 echo "configure: failed program was" >&5
16737 cat conftest.s >&5
16738 echo "configure: error output was" >&5
16739 cat conftest.out >&5
16740 fi
16741 rm -f conftest.o conftest.s conftest.out
16742 fi
16743fi
ab22c1fa
CF
16744{ echo "$as_me:$LINENO: result: $gcc_cv_as_line_zero" >&5
16745echo "${ECHO_T}$gcc_cv_as_line_zero" >&6; }
03943c05
AO
16746if test "x$gcc_cv_as_line_zero" = xyes; then
16747
16748cat >>confdefs.h <<\_ACEOF
16749#define HAVE_AS_LINE_ZERO 1
16750_ACEOF
16751
16752fi
16753
ab22c1fa
CF
16754{ echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5
16755echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6; }
96d0f4dc 16756gcc_cv_ld_ro_rw_mix=unknown
34a86c2b 16757if test $in_tree_ld = yes ; then
5408ac6c
HPN
16758 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 \
16759 && test $in_tree_ld_is_elf = yes; then
96d0f4dc
JJ
16760 gcc_cv_ld_ro_rw_mix=read-write
16761 fi
16762elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
90e145da
KC
16763 echo '.section myfoosect, "a"' > conftest1.s
16764 echo '.section myfoosect, "aw"' > conftest2.s
96d0f4dc 16765 echo '.byte 1' >> conftest2.s
90e145da 16766 echo '.section myfoosect, "a"' > conftest3.s
96d0f4dc 16767 echo '.byte 0' >> conftest3.s
6cd656d0
KC
16768 if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
16769 && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
16770 && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
96d0f4dc 16771 && $gcc_cv_ld -shared -o conftest1.so conftest1.o \
c6cc7e13 16772 conftest2.o conftest3.o > /dev/null 2>&1; then
96d0f4dc 16773 gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
c6cc7e13 16774 | sed -e '/myfoosect/!d' -e N`
96d0f4dc
JJ
16775 if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
16776 if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
16777 gcc_cv_ld_ro_rw_mix=read-only
16778 else
16779 gcc_cv_ld_ro_rw_mix=read-write
16780 fi
16781 fi
16782 fi
16783 rm -f conftest.* conftest[123].*
16784fi
16785if test x$gcc_cv_ld_ro_rw_mix = xread-write; then
ba479fd2
NN
16786
16787cat >>confdefs.h <<\_ACEOF
96d0f4dc 16788#define HAVE_LD_RO_RW_SECTION_MIXING 1
ba479fd2 16789_ACEOF
96d0f4dc
JJ
16790
16791fi
ab22c1fa
CF
16792{ echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5
16793echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6; }
96d0f4dc 16794
ab22c1fa
CF
16795{ echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5
16796echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6; }
275b60d6 16797gcc_cv_ld_eh_frame_hdr=no
34a86c2b 16798if test $in_tree_ld = yes ; then
5408ac6c
HPN
16799 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 \
16800 && test $in_tree_ld_is_elf = yes; then
275b60d6
JJ
16801 gcc_cv_ld_eh_frame_hdr=yes
16802 fi
16803elif test x$gcc_cv_ld != x; then
16804 # Check if linker supports --eh-frame-hdr option
16805 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
16806 gcc_cv_ld_eh_frame_hdr=yes
16807 fi
16808fi
232b67d9 16809
275b60d6 16810if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
ba479fd2
NN
16811
16812cat >>confdefs.h <<\_ACEOF
275b60d6 16813#define HAVE_LD_EH_FRAME_HDR 1
ba479fd2 16814_ACEOF
275b60d6
JJ
16815
16816fi
ab22c1fa
CF
16817{ echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5
16818echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6; }
275b60d6 16819
ab22c1fa
CF
16820{ echo "$as_me:$LINENO: checking linker position independent executable support" >&5
16821echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6; }
24a4dd31
JJ
16822gcc_cv_ld_pie=no
16823if test $in_tree_ld = yes ; then
5408ac6c
HPN
16824 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 \
16825 && test $in_tree_ld_is_elf = yes; then
24a4dd31
JJ
16826 gcc_cv_ld_pie=yes
16827 fi
16828elif test x$gcc_cv_ld != x; then
16829 # Check if linker supports -pie option
16830 if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then
16831 gcc_cv_ld_pie=yes
16832 fi
16833fi
16834if test x"$gcc_cv_ld_pie" = xyes; then
ba479fd2
NN
16835
16836cat >>confdefs.h <<\_ACEOF
24a4dd31 16837#define HAVE_LD_PIE 1
ba479fd2 16838_ACEOF
24a4dd31
JJ
16839
16840fi
ab22c1fa
CF
16841{ echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5
16842echo "${ECHO_T}$gcc_cv_ld_pie" >&6; }
24a4dd31 16843
ab22c1fa
CF
16844{ echo "$as_me:$LINENO: checking linker EH-compatible garbage collection of sections" >&5
16845echo $ECHO_N "checking linker EH-compatible garbage collection of sections... $ECHO_C" >&6; }
22ba88ef 16846gcc_cv_ld_eh_gc_sections=no
b639c3c2
JJ
16847if test $in_tree_ld = yes ; then
16848 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 \
16849 && test $in_tree_ld_is_elf = yes; then
16850 gcc_cv_ld_eh_gc_sections=yes
16851 fi
16852elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
16853 cat > conftest.s <<EOF
16854 .section .text
16855.globl _start
16856 .type _start, @function
16857_start:
16858 .long foo
16859 .size _start, .-_start
16860 .section .text.foo,"ax",@progbits
16861 .type foo, @function
16862foo:
16863 .long 0
16864 .size foo, .-foo
16865 .section .gcc_except_table.foo,"a",@progbits
16866.L0:
16867 .long 0
16868 .section .eh_frame,"a",@progbits
16869 .long .L0
16870EOF
16871 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
16872 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
16873 | grep "gc-sections option ignored" > /dev/null; then
16874 gcc_cv_ld_eh_gc_sections=no
16875 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
16876 gcc_cv_ld_eh_gc_sections=yes
16877 # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections.
16878 if test x$gcc_cv_as_comdat_group != xyes; then
16879 gcc_cv_ld_eh_gc_sections=no
16880 cat > conftest.s <<EOF
16881 .section .text
16882.globl _start
16883 .type _start, @function
16884_start:
16885 .long foo
16886 .size _start, .-_start
16887 .section .gnu.linkonce.t.foo,"ax",@progbits
16888 .type foo, @function
16889foo:
16890 .long 0
16891 .size foo, .-foo
16892 .section .gcc_except_table.foo,"a",@progbits
16893.L0:
16894 .long 0
16895 .section .eh_frame,"a",@progbits
16896 .long .L0
16897EOF
16898 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
16899 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \
16900 | grep "gc-sections option ignored" > /dev/null; then
16901 gcc_cv_ld_eh_gc_sections=no
16902 elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then
16903 gcc_cv_ld_eh_gc_sections=yes
16904 fi
16905 fi
16906 fi
16907 fi
16908 fi
16909 rm -f conftest.s conftest.o conftest
16910fi
e9d207d9
EB
16911case "$target" in
16912 hppa*-*-linux*)
16913 # ??? This apparently exposes a binutils bug with PC-relative relocations.
16914 gcc_cv_ld_eh_gc_sections=no
16915 ;;
16916esac
22ba88ef
EB
16917if test x$gcc_cv_ld_eh_gc_sections = xyes; then
16918
16919cat >>confdefs.h <<\_ACEOF
16920#define HAVE_LD_EH_GC_SECTIONS 1
16921_ACEOF
16922
16923fi
ab22c1fa
CF
16924{ echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_gc_sections" >&5
16925echo "${ECHO_T}$gcc_cv_ld_eh_gc_sections" >&6; }
22ba88ef 16926
8bb915b6
NN
16927# --------
16928# UNSORTED
16929# --------
16930
ab22c1fa
CF
16931{ echo "$as_me:$LINENO: checking linker --as-needed support" >&5
16932echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6; }
82e923f6
RS
16933if test "${gcc_cv_ld_as_needed+set}" = set; then
16934 echo $ECHO_N "(cached) $ECHO_C" >&6
16935else
16936 gcc_cv_ld_as_needed=no
765f1bf9
AM
16937if test $in_tree_ld = yes ; then
16938 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 \
16939 && test $in_tree_ld_is_elf = yes; then
16940 gcc_cv_ld_as_needed=yes
16941 fi
16942elif test x$gcc_cv_ld != x; then
16943 # Check if linker supports --as-needed and --no-as-needed options
16944 if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
16945 gcc_cv_ld_as_needed=yes
16946 fi
16947fi
82e923f6
RS
16948
16949fi
ab22c1fa
CF
16950{ echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5
16951echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6; }
765f1bf9
AM
16952if test x"$gcc_cv_ld_as_needed" = xyes; then
16953
16954cat >>confdefs.h <<\_ACEOF
16955#define HAVE_LD_AS_NEEDED 1
16956_ACEOF
16957
16958fi
765f1bf9 16959
d82bf747
AM
16960case "$target:$tm_file" in
16961 powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
ab22c1fa
CF
16962 { echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5
16963echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6; }
85b776df
AM
16964if test "${gcc_cv_ld_no_dot_syms+set}" = set; then
16965 echo $ECHO_N "(cached) $ECHO_C" >&6
16966else
16967 gcc_cv_ld_no_dot_syms=no
16968 if test $in_tree_ld = yes ; then
16969 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
16970 gcc_cv_ld_no_dot_syms=yes
16971 fi
16972 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
16973 cat > conftest1.s <<EOF
16974 .text
16975 bl .foo
16976EOF
16977 cat > conftest2.s <<EOF
16978 .section ".opd","aw"
16979 .align 3
16980 .globl foo
16981 .type foo,@function
16982foo:
16983 .quad .LEfoo,.TOC.@tocbase,0
16984 .text
16985.LEfoo:
16986 blr
16987 .size foo,.-.LEfoo
16988EOF
16989 if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \
16990 && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \
16991 && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then
16992 gcc_cv_ld_no_dot_syms=yes
16993 fi
16994 rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s
16995 fi
16996
16997fi
ab22c1fa
CF
16998{ echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5
16999echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6; }
85b776df
AM
17000 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then
17001
17002cat >>confdefs.h <<\_ACEOF
17003#define HAVE_LD_NO_DOT_SYMS 1
17004_ACEOF
17005
17006 fi
17007 ;;
17008esac
17009
ab22c1fa
CF
17010{ echo "$as_me:$LINENO: checking linker --sysroot support" >&5
17011echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6; }
380e5ca4
MM
17012if test "${gcc_cv_ld_sysroot+set}" = set; then
17013 echo $ECHO_N "(cached) $ECHO_C" >&6
17014else
17015 gcc_cv_ld_sysroot=no
17016 if test $in_tree_ld = yes ; then
17017 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 17018 gcc_cv_ld_sysroot=yes
380e5ca4
MM
17019 fi
17020 elif test x$gcc_cv_ld != x; then
17021 if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then
17022 gcc_cv_ld_sysroot=yes
17023 fi
17024 fi
17025fi
ab22c1fa
CF
17026{ echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5
17027echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6; }
380e5ca4
MM
17028if test x"$gcc_cv_ld_sysroot" = xyes; then
17029
17030cat >>confdefs.h <<\_ACEOF
17031#define HAVE_LD_SYSROOT 1
17032_ACEOF
17033
17034fi
17035
9fb28a67 17036if test x$with_sysroot = x && test x$host = x$target \
c794c06f
CD
17037 && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
17038 && test "$prefix" != "NONE"; then
ba479fd2
NN
17039
17040cat >>confdefs.h <<_ACEOF
793e9558 17041#define PREFIX_INCLUDE_DIR "$prefix/include"
ba479fd2 17042_ACEOF
793e9558
PB
17043
17044fi
17045
77008252 17046# Test for stack protector support in target C library.
ab22c1fa
CF
17047{ echo "$as_me:$LINENO: checking __stack_chk_fail in target C library" >&5
17048echo $ECHO_N "checking __stack_chk_fail in target C library... $ECHO_C" >&6; }
77008252
JJ
17049if test "${gcc_cv_libc_provides_ssp+set}" = set; then
17050 echo $ECHO_N "(cached) $ECHO_C" >&6
17051else
17052 gcc_cv_libc_provides_ssp=no
a6ccdbab
EC
17053 case "$target" in
17054 *-*-linux*)
77008252
JJ
17055 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
17056 if test "x$with_sysroot" = x; then
17057 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
17058 elif test "x$with_build_sysroot" != "x"; then
17059 glibc_header_dir="${with_build_sysroot}/usr/include"
77008252
JJ
17060 elif test "x$with_sysroot" = xyes; then
17061 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
17062 else
17063 glibc_header_dir="${with_sysroot}/usr/include"
17064 fi
17065 else
17066 glibc_header_dir=/usr/include
17067 fi
17068 # glibc 2.4 and later provides __stack_chk_fail and
17069 # either __stack_chk_guard, or TLS access to stack guard canary.
17070 if test -f $glibc_header_dir/features.h \
17071 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
17072 $glibc_header_dir/features.h > /dev/null; then
17073 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \
17074 $glibc_header_dir/features.h > /dev/null; then
17075 gcc_cv_libc_provides_ssp=yes
17076 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \
17077 $glibc_header_dir/features.h > /dev/null \
17078 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \
17079 $glibc_header_dir/features.h > /dev/null; then
17080 gcc_cv_libc_provides_ssp=yes
17081 fi
a6ccdbab
EC
17082 fi
17083 ;;
17084 *-*-darwin*)
ab22c1fa
CF
17085 { echo "$as_me:$LINENO: checking for __stack_chk_fail" >&5
17086echo $ECHO_N "checking for __stack_chk_fail... $ECHO_C" >&6; }
a6ccdbab
EC
17087if test "${ac_cv_func___stack_chk_fail+set}" = set; then
17088 echo $ECHO_N "(cached) $ECHO_C" >&6
17089else
17090 cat >conftest.$ac_ext <<_ACEOF
17091/* confdefs.h. */
17092_ACEOF
17093cat confdefs.h >>conftest.$ac_ext
17094cat >>conftest.$ac_ext <<_ACEOF
17095/* end confdefs.h. */
17096/* Define __stack_chk_fail to an innocuous variant, in case <limits.h> declares __stack_chk_fail.
17097 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17098#define __stack_chk_fail innocuous___stack_chk_fail
17099
17100/* System header to define __stub macros and hopefully few prototypes,
17101 which can conflict with char __stack_chk_fail (); below.
17102 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17103 <limits.h> exists even on freestanding compilers. */
17104
17105#ifdef __STDC__
17106# include <limits.h>
17107#else
17108# include <assert.h>
17109#endif
17110
17111#undef __stack_chk_fail
17112
ab22c1fa
CF
17113/* Override any GCC internal prototype to avoid an error.
17114 Use char because int might match the return type of a GCC
17115 builtin and then its argument prototype would still apply. */
a6ccdbab
EC
17116#ifdef __cplusplus
17117extern "C"
17118#endif
17119char __stack_chk_fail ();
17120/* The GNU C library defines this for functions which it implements
17121 to always fail with ENOSYS. Some functions are actually named
17122 something starting with __ and the normal name is an alias. */
ab22c1fa 17123#if defined __stub___stack_chk_fail || defined __stub_____stack_chk_fail
a6ccdbab
EC
17124choke me
17125#endif
17126
17127int
17128main ()
17129{
ab22c1fa 17130return __stack_chk_fail ();
a6ccdbab
EC
17131 ;
17132 return 0;
17133}
17134_ACEOF
17135rm -f conftest.$ac_objext conftest$ac_exeext
ab22c1fa
CF
17136if { (ac_try="$ac_link"
17137case "(($ac_try" in
17138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17139 *) ac_try_echo=$ac_try;;
17140esac
17141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17142 (eval "$ac_link") 2>conftest.er1
a6ccdbab
EC
17143 ac_status=$?
17144 grep -v '^ *+' conftest.er1 >conftest.err
17145 rm -f conftest.er1
17146 cat conftest.err >&5
17147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
ab22c1fa
CF
17148 (exit $ac_status); } && {
17149 test -z "$ac_c_werror_flag" ||
17150 test ! -s conftest.err
17151 } && test -s conftest$ac_exeext &&
17152 $as_test_x conftest$ac_exeext; then
8b1f719a
PB
17153 ac_cv_func___stack_chk_fail=yes
17154else
a6ccdbab
EC
17155 echo "$as_me: failed program was:" >&5
17156sed 's/^/| /' conftest.$ac_ext >&5
17157
ab22c1fa 17158 ac_cv_func___stack_chk_fail=no
a6ccdbab 17159fi
ab22c1fa
CF
17160
17161rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
a6ccdbab
EC
17162 conftest$ac_exeext conftest.$ac_ext
17163fi
ab22c1fa
CF
17164{ echo "$as_me:$LINENO: result: $ac_cv_func___stack_chk_fail" >&5
17165echo "${ECHO_T}$ac_cv_func___stack_chk_fail" >&6; }
a6ccdbab
EC
17166if test $ac_cv_func___stack_chk_fail = yes; then
17167 gcc_cv_libc_provides_ssp=yes
17168else
17169 echo "no __stack_chk_fail on this target"
77008252 17170fi
a6ccdbab
EC
17171
17172 ;;
77008252 17173 *) gcc_cv_libc_provides_ssp=no ;;
a6ccdbab
EC
17174 esac
17175fi
ab22c1fa
CF
17176{ echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5
17177echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6; }
a6ccdbab 17178
77008252
JJ
17179if test x$gcc_cv_libc_provides_ssp = xyes; then
17180
17181cat >>confdefs.h <<\_ACEOF
17182#define TARGET_LIBC_PROVIDES_SSP 1
17183_ACEOF
17184
17185fi
17186
ed965309
JJ
17187# Check if TFmode long double should be used by default or not.
17188# Some glibc targets used DFmode long double, but with glibc 2.4
17189# and later they can use TFmode.
17190case "$target" in
f7cc5390
JM
17191 powerpc*-*-linux* | \
17192 powerpc*-*-gnu* | \
ed965309
JJ
17193 sparc*-*-linux* | \
17194 s390*-*-linux* | \
17195 alpha*-*-linux*)
17196
ab22c1fa 17197# Check whether --with-long-double-128 was given.
ed965309 17198if test "${with_long_double_128+set}" = set; then
ab22c1fa 17199 withval=$with_long_double_128; gcc_cv_target_ldbl128="$with_long_double_128"
ed965309
JJ
17200else
17201 gcc_cv_target_ldbl128=no
17202 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
17203 if test "x$with_sysroot" = x; then
17204 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
c9ecbf86
JM
17205 elif test "x$with_build_sysroot" != "x"; then
17206 glibc_header_dir="${with_build_sysroot}/usr/include"
ed965309
JJ
17207 elif test "x$with_sysroot" = xyes; then
17208 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
17209 else
17210 glibc_header_dir="${with_sysroot}/usr/include"
17211 fi
17212 else
17213 glibc_header_dir=/usr/include
17214 fi
65280f6c 17215 grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
ed965309
JJ
17216 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
17217 && gcc_cv_target_ldbl128=yes
65280f6c 17218
ab22c1fa
CF
17219fi
17220
ed965309
JJ
17221 ;;
17222esac
17223if test x$gcc_cv_target_ldbl128 = xyes; then
17224
17225cat >>confdefs.h <<\_ACEOF
17226#define TARGET_DEFAULT_LONG_DOUBLE_128 1
17227_ACEOF
17228
17229fi
17230
81bf3d9e 17231# Find out what GC implementation we want, or may, use.
ba479fd2 17232
ab22c1fa 17233# Check whether --with-gc was given.
81bf3d9e 17234if test "${with_gc+set}" = set; then
ab22c1fa 17235 withval=$with_gc; case "$withval" in
08cee789 17236 page)
81bf3d9e 17237 GGC=ggc-$withval
08cee789
DJ
17238 ;;
17239 zone)
17240 GGC=ggc-$withval
17241
17242cat >>confdefs.h <<\_ACEOF
17243#define GGC_ZONE 1
17244_ACEOF
17245
81bf3d9e
RH
17246 ;;
17247 *)
ba479fd2
NN
17248 { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5
17249echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;}
17250 { (exit 1); exit 1; }; }
81bf3d9e
RH
17251 ;;
17252esac
17253else
005537df 17254 GGC=ggc-page
ab22c1fa
CF
17255fi
17256
81bf3d9e
RH
17257
17258echo "Using $GGC for garbage collection."
17259
3c809ba4 17260# Use the system's zlib library.
b8dad04b
ZW
17261zlibdir=-L../zlib
17262zlibinc="-I\$(srcdir)/../zlib"
ba479fd2 17263
ab22c1fa 17264# Check whether --with-system-zlib was given.
3c809ba4 17265if test "${with_system_zlib+set}" = set; then
ab22c1fa 17266 withval=$with_system_zlib; zlibdir=
3c809ba4
AG
17267zlibinc=
17268
ab22c1fa 17269fi
3c809ba4 17270
dc6746e7 17271
b8ec3cc8 17272
703d89ab 17273
ab22c1fa
CF
17274
17275{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
17276echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; }
17277 # Check whether --enable-maintainer-mode was given.
dc6746e7 17278if test "${enable_maintainer_mode+set}" = set; then
ab22c1fa 17279 enableval=$enable_maintainer_mode; maintainer_mode=$enableval
dc6746e7
PT
17280else
17281 maintainer_mode=no
ab22c1fa
CF
17282fi
17283
a6ccdbab 17284
ab22c1fa
CF
17285{ echo "$as_me:$LINENO: result: $maintainer_mode" >&5
17286echo "${ECHO_T}$maintainer_mode" >&6; }
dc6746e7
PT
17287
17288if test "$maintainer_mode" = "yes"; then
17289 MAINT=''
17290else
17291 MAINT='#'
17292fi
17293
8bb915b6
NN
17294# --------------
17295# Language hooks
17296# --------------
17297
861bb6c1
JL
17298# Make empty files to contain the specs and options for each language.
17299# Then add #include lines to for a compiler that has specs and/or options.
17300
cc11cc9b 17301subdirs=
d7b42618 17302lang_opt_files=
861bb6c1 17303lang_specs_files=
3103b7db 17304lang_tree_files=
861bb6c1
JL
17305# These (without "all_") are set in each config-lang.in.
17306# `language' must be a single word so is spelled singularly.
17307all_languages=
861bb6c1 17308all_compilers=
fa958513 17309all_outputs='Makefile gccbug libada-mk'
861bb6c1 17310# List of language makefile fragments.
2ed26f6b
ZW
17311all_lang_makefrags=
17312# List of language subdirectory makefiles. Deprecated.
861bb6c1 17313all_lang_makefiles=
703d89ab 17314# Additional files for gengtype
ef69da62 17315all_gtfiles="$target_gtfiles"
861bb6c1 17316
cc11cc9b
PB
17317# These are the languages that are set in --enable-languages,
17318# and are available in the GCC tree.
17319all_selected_languages=
17320
861bb6c1
JL
17321# Add the language fragments.
17322# Languages are added via two mechanisms. Some information must be
17323# recorded in makefile variables, these are defined in config-lang.in.
17324# We accumulate them and plug them into the main Makefile.
17325# The other mechanism is a set of hooks for each of the main targets
17326# like `clean', `install', etc.
17327
861bb6c1 17328language_hooks="Make-hooks"
861bb6c1 17329
cc11cc9b 17330for lang in ${srcdir}/*/config-lang.in
861bb6c1 17331do
1546bb64
PB
17332 test "$lang" = "${srcdir}/*/config-lang.in" && continue
17333
cc11cc9b
PB
17334 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
17335 if test "x$lang_alias" = x
17336 then
17337 echo "$lang doesn't set \$language." 1>&2
17338 exit 1
17339 fi
17340 subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
17341 subdirs="$subdirs $subdir"
17342 case ",$enable_languages," in
17343 *,$lang_alias,*)
17344 all_selected_languages="$all_selected_languages $lang_alias"
17345 if test -f $srcdir/$subdir/lang-specs.h; then
17346 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
17347 fi
17348 ;;
17349 esac
17350
cc11cc9b
PB
17351 language=
17352 boot_language=
17353 compilers=
cc11cc9b
PB
17354 outputs=
17355 gtfiles=
1546bb64 17356 subdir_requires=
cc11cc9b
PB
17357 . ${srcdir}/$subdir/config-lang.in
17358 if test "x$language" = x
17359 then
17360 echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2
17361 exit 1
17362 fi
1546bb64
PB
17363
17364 ok=:
17365 case ",$enable_languages," in
17366 *,$lang_alias,*) ;;
17367 *)
17368 for i in $subdir_requires; do
b6348cb3 17369 test -f "${srcdir}/$i/config-lang.in" && continue
1546bb64
PB
17370 ok=false
17371 break
17372 done
17373 ;;
17374 esac
17375 $ok || continue
17376
cc11cc9b 17377 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in"
1546bb64
PB
17378 if test -f $srcdir/$subdir/lang.opt; then
17379 lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt"
17380 fi
17381 if test -f $srcdir/$subdir/$subdir-tree.def; then
17382 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
17383 fi
cc11cc9b
PB
17384 if test -f ${srcdir}/$subdir/Makefile.in
17385 then all_lang_makefiles="$subdir/Makefile"
17386 fi
17387 all_languages="$all_languages $language"
cc11cc9b 17388 all_compilers="$all_compilers $compilers"
cc11cc9b 17389 all_outputs="$all_outputs $outputs"
703d89ab 17390 all_gtfiles="$all_gtfiles [$subdir] $gtfiles"
861bb6c1
JL
17391done
17392
8ac9d31f
TJ
17393# Pick up gtfiles for c
17394gtfiles=
8ac9d31f 17395. ${srcdir}/c-config-lang.in
703d89ab 17396all_gtfiles="$all_gtfiles [c] $gtfiles"
8ac9d31f 17397
cbc59f01 17398check_languages=
cc11cc9b 17399for language in $all_selected_languages
cbc59f01 17400do
cc11cc9b 17401 check_languages="$check_languages check-$language"
cbc59f01
DD
17402done
17403
62b81e45 17404# We link each language in with a set of hooks, reached indirectly via
cc11cc9b 17405# lang.${target}. Only do so for selected languages.
861bb6c1
JL
17406
17407rm -f Make-hooks
17408touch Make-hooks
bd97af06 17409target_list="all.cross start.encap rest.encap tags \
bcc3d150
BM
17410 install-common install-man install-info install-pdf dvi pdf \
17411 html uninstall info man srcextra srcman srcinfo \
8b1f719a 17412 mostlyclean clean distclean maintainer-clean"
cc11cc9b 17413
861bb6c1
JL
17414for t in $target_list
17415do
17416 x=
cc11cc9b 17417 for lang in $all_selected_languages
861bb6c1 17418 do
cc11cc9b 17419 x="$x $lang.$t"
861bb6c1
JL
17420 done
17421 echo "lang.$t: $x" >> Make-hooks
17422done
17423
8bb915b6
NN
17424# --------
17425# UNSORTED
17426# --------
17427
cc06d68c 17428# Create .gdbinit.
861bb6c1 17429
cc06d68c
GP
17430echo "dir ." > .gdbinit
17431echo "dir ${srcdir}" >> .gdbinit
17432if test x$gdb_needs_out_file_path = xyes
17433then
17434 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
17435fi
17436if test "x$subdirs" != x; then
17437 for s in $subdirs
17438 do
17439 echo "dir ${srcdir}/$s" >> .gdbinit
17440 done
861bb6c1 17441fi
cc06d68c 17442echo "source ${srcdir}/gdbinit.in" >> .gdbinit
861bb6c1 17443
15c723f3 17444gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)'
d062c304
JL
17445
17446
2ce3c6c6 17447
2bbea3a6
RH
17448# Find a directory in which to install a shared libgcc.
17449
ab22c1fa 17450# Check whether --enable-version-specific-runtime-libs was given.
2bbea3a6 17451if test "${enable_version_specific_runtime_libs+set}" = set; then
ab22c1fa
CF
17452 enableval=$enable_version_specific_runtime_libs;
17453fi
ba479fd2 17454
2bbea3a6
RH
17455
17456
ab22c1fa 17457# Check whether --with-slibdir was given.
5b15f277 17458if test "${with_slibdir+set}" = set; then
ab22c1fa 17459 withval=$with_slibdir; slibdir="$with_slibdir"
5b15f277
RH
17460else
17461 if test "${enable_version_specific_runtime_libs+set}" = set; then
2bbea3a6 17462 slibdir='$(libsubdir)'
5b15f277 17463elif test "$host" != "$target"; then
2bbea3a6
RH
17464 slibdir='$(build_tooldir)/lib'
17465else
5b15f277 17466 slibdir='$(libdir)'
2bbea3a6 17467fi
ab22c1fa
CF
17468fi
17469
2bbea3a6
RH
17470
17471
1e6347d8 17472objdir=`${PWDCMD-pwd}`
7e717196
JL
17473
17474
22482f74 17475
ab22c1fa 17476# Check whether --with-datarootdir was given.
22482f74 17477if test "${with_datarootdir+set}" = set; then
ab22c1fa 17478 withval=$with_datarootdir; datarootdir="\${prefix}/$with_datarootdir"
22482f74
MS
17479else
17480 datarootdir='$(prefix)/share'
ab22c1fa
CF
17481fi
17482
22482f74
MS
17483
17484
a6ccdbab 17485
ab22c1fa 17486# Check whether --with-docdir was given.
22482f74 17487if test "${with_docdir+set}" = set; then
ab22c1fa 17488 withval=$with_docdir; docdir="\${prefix}/$with_docdir"
22482f74
MS
17489else
17490 docdir='$(datarootdir)'
ab22c1fa 17491fi
22482f74 17492
b8ec3cc8 17493
703d89ab 17494
ab22c1fa
CF
17495
17496# Check whether --with-htmldir was given.
22482f74 17497if test "${with_htmldir+set}" = set; then
ab22c1fa 17498 withval=$with_htmldir; htmldir="\${prefix}/$with_htmldir"
22482f74
MS
17499else
17500 htmldir='$(docdir)'
ab22c1fa
CF
17501fi
17502
861bb6c1
JL
17503
17504
703d89ab 17505# Substitute configuration variables
861bb6c1
JL
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
9b16d2c4 17550
e9a25f70 17551
6e26218f 17552
c8724862 17553
11642c3a
ZW
17554
17555
17556
3d9d2476 17557
e2500fed 17558
51b9ff45 17559
861bb6c1 17560
6e3f3080
NN
17561# Echo link setup.
17562if test x${build} = x${host} ; then
17563 if test x${host} = x${target} ; then
17564 echo "Links are now set up to build a native compiler for ${target}." 1>&2
17565 else
17566 echo "Links are now set up to build a cross-compiler" 1>&2
17567 echo " from ${host} to ${target}." 1>&2
17568 fi
17569else
17570 if test x${host} = x${target} ; then
17571 echo "Links are now set up to build (on ${build}) a native compiler" 1>&2
17572 echo " for ${target}." 1>&2
17573 else
17574 echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2
17575 echo " from ${host} to ${target}." 1>&2
17576 fi
17577fi
17578
6de9cd9a
DN
17579
17580
17581
6e3f3080
NN
17582# Configure the subdirectories
17583# AC_CONFIG_SUBDIRS($subdirs)
17584
17585# Create the Makefile
17586# and configure language subdirectories
ab22c1fa 17587ac_config_files="$ac_config_files $all_outputs"
914c5af7
NN
17588
17589
ab22c1fa 17590ac_config_commands="$ac_config_commands default"
914c5af7 17591
ba479fd2 17592cat >confcache <<\_ACEOF
6e3f3080
NN
17593# This file is a shell script that caches the results of configure
17594# tests run on this system so they can be shared between configure
ba479fd2
NN
17595# scripts and configure runs, see configure's option --config-cache.
17596# It is not useful on other systems. If it contains results you don't
17597# want to keep, you may remove or edit it.
6e3f3080 17598#
ba479fd2
NN
17599# config.status only pays attention to the cache file if you give it
17600# the --recheck option to rerun configure.
6e3f3080 17601#
ba479fd2
NN
17602# `ac_cv_env_foo' variables (set or unset) will be overridden when
17603# loading this file, other *unset* `ac_cv_foo' will be assigned the
17604# following values.
17605
17606_ACEOF
17607
6e3f3080
NN
17608# The following way of writing the cache mishandles newlines in values,
17609# but we know of no workaround that is simple, portable, and efficient.
ab22c1fa 17610# So, we kill variables containing newlines.
6e3f3080
NN
17611# Ultrix sh set writes to stderr and can't be redirected directly,
17612# and sets the high bit in the cache file unless we assign to the vars.
ab22c1fa
CF
17613(
17614 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17615 eval ac_val=\$$ac_var
17616 case $ac_val in #(
17617 *${as_nl}*)
17618 case $ac_var in #(
17619 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
17620echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
17621 esac
17622 case $ac_var in #(
17623 _ | IFS | as_nl) ;; #(
17624 *) $as_unset $ac_var ;;
17625 esac ;;
17626 esac
17627 done
17628
ba479fd2 17629 (set) 2>&1 |
ab22c1fa
CF
17630 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17631 *${as_nl}ac_space=\ *)
ba479fd2
NN
17632 # `set' does not quote correctly, so add quotes (double-quote
17633 # substitution turns \\\\ into \\, and sed turns \\ into \).
17634 sed -n \
86da66b5
HPN
17635 "s/'/'\\\\''/g;
17636 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ab22c1fa 17637 ;; #(
ba479fd2
NN
17638 *)
17639 # `set' quotes correctly as required by POSIX, so do not add quotes.
ab22c1fa 17640 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
ba479fd2 17641 ;;
ab22c1fa
CF
17642 esac |
17643 sort
17644) |
ba479fd2 17645 sed '
ab22c1fa 17646 /^ac_cv_env_/b end
ba479fd2 17647 t clear
ab22c1fa 17648 :clear
ba479fd2
NN
17649 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17650 t end
ab22c1fa
CF
17651 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17652 :end' >>confcache
17653if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17654 if test -w "$cache_file"; then
17655 test "x$cache_file" != "x/dev/null" &&
17656 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
17657echo "$as_me: updating cache $cache_file" >&6;}
ba479fd2 17658 cat confcache >$cache_file
6e3f3080 17659 else
ab22c1fa
CF
17660 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
17661echo "$as_me: not updating unwritable cache $cache_file" >&6;}
6e3f3080
NN
17662 fi
17663fi
17664rm -f confcache
17665
17666test "x$prefix" = xNONE && prefix=$ac_default_prefix
17667# Let make expand exec_prefix.
17668test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17669
63cf211a 17670DEFS=-DHAVE_CONFIG_H
6e3f3080 17671
ba479fd2
NN
17672ac_libobjs=
17673ac_ltlibobjs=
17674for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17675 # 1. Remove the extension, and $U if already installed.
ab22c1fa
CF
17676 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17677 ac_i=`echo "$ac_i" | sed "$ac_script"`
17678 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17679 # will be set to the directory where LIBOBJS objects are built.
17680 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17681 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
ba479fd2
NN
17682done
17683LIBOBJS=$ac_libobjs
63cf211a 17684
ba479fd2
NN
17685LTLIBOBJS=$ac_ltlibobjs
17686
17687
17688
17689: ${CONFIG_STATUS=./config.status}
17690ac_clean_files_save=$ac_clean_files
17691ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17692{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17693echo "$as_me: creating $CONFIG_STATUS" >&6;}
17694cat >$CONFIG_STATUS <<_ACEOF
17695#! $SHELL
17696# Generated by $as_me.
6e3f3080
NN
17697# Run this file to recreate the current configuration.
17698# Compiler output produced by configure, useful for debugging
ba479fd2 17699# configure, is in config.log if it exists.
6e3f3080 17700
ba479fd2
NN
17701debug=false
17702ac_cs_recheck=false
17703ac_cs_silent=false
17704SHELL=\${CONFIG_SHELL-$SHELL}
17705_ACEOF
17706
17707cat >>$CONFIG_STATUS <<\_ACEOF
17708## --------------------- ##
17709## M4sh Initialization. ##
17710## --------------------- ##
17711
ab22c1fa
CF
17712# Be more Bourne compatible
17713DUALCASE=1; export DUALCASE # for MKS sh
ba479fd2
NN
17714if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17715 emulate sh
17716 NULLCMD=:
17717 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17718 # is contrary to our usage. Disable this feature.
17719 alias -g '${1+"$@"}'='"$@"'
ab22c1fa 17720 setopt NO_GLOB_SUBST
703d89ab 17721else
ab22c1fa
CF
17722 case `(set -o) 2>/dev/null` in
17723 *posix*) set -o posix ;;
17724esac
17725
703d89ab
ZW
17726fi
17727
17728
ba479fd2 17729
6e3f3080 17730
ab22c1fa 17731# PATH needs CR
a3bba767
JJ
17732# Avoid depending upon Character Ranges.
17733as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17734as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17735as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17736as_cr_digits='0123456789'
17737as_cr_alnum=$as_cr_Letters$as_cr_digits
17738
17739# The user is always right.
17740if test "${PATH_SEPARATOR+set}" != set; then
17741 echo "#! /bin/sh" >conf$$.sh
17742 echo "exit 0" >>conf$$.sh
17743 chmod +x conf$$.sh
17744 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
17745 PATH_SEPARATOR=';'
17746 else
17747 PATH_SEPARATOR=:
17748 fi
17749 rm -f conf$$.sh
17750fi
dd7f7a6e 17751
ab22c1fa
CF
17752# Support unset when possible.
17753if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
17754 as_unset=unset
17755else
17756 as_unset=false
17757fi
17758
8b1f719a 17759
ab22c1fa
CF
17760# IFS
17761# We need space, tab and new line, in precisely that order. Quoting is
17762# there to prevent editors from complaining about space-tab.
17763# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17764# splitting by setting IFS to empty value.)
17765as_nl='
17766'
17767IFS=" "" $as_nl"
17768
17769# Find who we are. Look in the path if we contain no directory separator.
17770case $0 in
17771 *[\\/]* ) as_myself=$0 ;;
17772 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
a3bba767
JJ
17773for as_dir in $PATH
17774do
17775 IFS=$as_save_IFS
17776 test -z "$as_dir" && as_dir=.
17777 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17778done
ab22c1fa 17779IFS=$as_save_IFS
8b1f719a 17780
ab22c1fa
CF
17781 ;;
17782esac
17783# We did not find ourselves, most probably we were run as `sh COMMAND'
17784# in which case we are not to be found in the path.
17785if test "x$as_myself" = x; then
17786 as_myself=$0
17787fi
17788if test ! -f "$as_myself"; then
17789 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17790 { (exit 1); exit 1; }
17791fi
17792
17793# Work around bugs in pre-3.0 UWIN ksh.
17794for as_var in ENV MAIL MAILPATH
17795do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
17796done
17797PS1='$ '
17798PS2='> '
17799PS4='+ '
17800
17801# NLS nuisances.
17802for as_var in \
17803 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
17804 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
17805 LC_TELEPHONE LC_TIME
a3bba767 17806do
ab22c1fa
CF
17807 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
17808 eval $as_var=C; export $as_var
17809 else
17810 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
17811 fi
17812done
17813
17814# Required to use basename.
17815if expr a : '\(a\)' >/dev/null 2>&1 &&
17816 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17817 as_expr=expr
17818else
17819 as_expr=false
17820fi
17821
17822if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17823 as_basename=basename
17824else
17825 as_basename=false
17826fi
17827
17828
17829# Name of the executable.
17830as_me=`$as_basename -- "$0" ||
17831$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17832 X"$0" : 'X\(//\)$' \| \
17833 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
17834echo X/"$0" |
17835 sed '/^.*\/\([^/][^/]*\)\/*$/{
17836 s//\1/
17837 q
17838 }
17839 /^X\/\(\/\/\)$/{
17840 s//\1/
17841 q
17842 }
17843 /^X\/\(\/\).*/{
17844 s//\1/
17845 q
17846 }
17847 s/.*/./; q'`
17848
17849# CDPATH.
17850$as_unset CDPATH
17851
17852
17853
8b1f719a
PB
17854 as_lineno_1=$LINENO
17855 as_lineno_2=$LINENO
8b1f719a 17856 test "x$as_lineno_1" != "x$as_lineno_2" &&
ab22c1fa 17857 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
ba479fd2
NN
17858
17859 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17860 # uniformly replaced by the line number. The first 'sed' inserts a
ab22c1fa
CF
17861 # line-number line after each line using $LINENO; the second 'sed'
17862 # does the real work. The second script uses 'N' to pair each
17863 # line-number line with the line containing $LINENO, and appends
17864 # trailing '-' during substitution so that $LINENO is not a special
17865 # case at line end.
ba479fd2 17866 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ab22c1fa
CF
17867 # scripts with optimization help from Paolo Bonzini. Blame Lee
17868 # E. McMahon (1931-1989) for sed's syntax. :-)
17869 sed -n '
17870 p
17871 /[$]LINENO/=
17872 ' <$as_myself |
ba479fd2 17873 sed '
ab22c1fa
CF
17874 s/[$]LINENO.*/&-/
17875 t lineno
17876 b
17877 :lineno
ba479fd2 17878 N
ab22c1fa
CF
17879 :loop
17880 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
ba479fd2 17881 t loop
ab22c1fa 17882 s/-\n.*//
ba479fd2 17883 ' >$as_me.lineno &&
ab22c1fa
CF
17884 chmod +x "$as_me.lineno" ||
17885 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
ba479fd2
NN
17886 { (exit 1); exit 1; }; }
17887
17888 # Don't try to exec as it changes $[0], causing all sort of problems
17889 # (the dirname of $[0] is not the place where we might find the
ab22c1fa
CF
17890 # original and so on. Autoconf is especially sensitive to this).
17891 . "./$as_me.lineno"
ba479fd2
NN
17892 # Exit status is that of the last command.
17893 exit
17894}
17895
17896
ab22c1fa
CF
17897if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17898 as_dirname=dirname
17899else
17900 as_dirname=false
17901fi
17902
17903ECHO_C= ECHO_N= ECHO_T=
17904case `echo -n x` in
17905-n*)
17906 case `echo 'x\c'` in
17907 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
17908 *) ECHO_C='\c';;
17909 esac;;
17910*)
17911 ECHO_N='-n';;
ba479fd2
NN
17912esac
17913
ab22c1fa
CF
17914if expr a : '\(a\)' >/dev/null 2>&1 &&
17915 test "X`expr 00001 : '.*\(...\)'`" = X001; then
ba479fd2
NN
17916 as_expr=expr
17917else
17918 as_expr=false
17919fi
17920
17921rm -f conf$$ conf$$.exe conf$$.file
ab22c1fa
CF
17922if test -d conf$$.dir; then
17923 rm -f conf$$.dir/conf$$.file
17924else
17925 rm -f conf$$.dir
17926 mkdir conf$$.dir
17927fi
ba479fd2
NN
17928echo >conf$$.file
17929if ln -s conf$$.file conf$$ 2>/dev/null; then
ab22c1fa
CF
17930 as_ln_s='ln -s'
17931 # ... but there are two gotchas:
17932 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17933 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17934 # In both cases, we have to default to `cp -p'.
17935 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
ba479fd2 17936 as_ln_s='cp -p'
ba479fd2
NN
17937elif ln conf$$.file conf$$ 2>/dev/null; then
17938 as_ln_s=ln
17939else
17940 as_ln_s='cp -p'
17941fi
ab22c1fa
CF
17942rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17943rmdir conf$$.dir 2>/dev/null
ba479fd2
NN
17944
17945if mkdir -p . 2>/dev/null; then
17946 as_mkdir_p=:
17947else
86da66b5 17948 test -d ./-p && rmdir ./-p
ba479fd2
NN
17949 as_mkdir_p=false
17950fi
17951
ab22c1fa
CF
17952if test -x / >/dev/null 2>&1; then
17953 as_test_x='test -x'
17954else
17955 if ls -dL / >/dev/null 2>&1; then
17956 as_ls_L_option=L
17957 else
17958 as_ls_L_option=
17959 fi
17960 as_test_x='
17961 eval sh -c '\''
17962 if test -d "$1"; then
17963 test -d "$1/.";
17964 else
17965 case $1 in
17966 -*)set "./$1";;
17967 esac;
17968 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
17969 ???[sx]*):;;*)false;;esac;fi
17970 '\'' sh
17971 '
17972fi
17973as_executable_p=$as_test_x
ba479fd2
NN
17974
17975# Sed expression to map a string onto a valid CPP name.
86da66b5 17976as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
17977
17978# Sed expression to map a string onto a valid variable name.
86da66b5 17979as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
ba479fd2
NN
17980
17981
ba479fd2
NN
17982exec 6>&1
17983
ab22c1fa 17984# Save the log message, to keep $[0] and so on meaningful, and to
ba479fd2 17985# report actual input values of CONFIG_FILES etc. instead of their
ab22c1fa
CF
17986# values after options handling.
17987ac_log="
ba479fd2 17988This file was extended by $as_me, which was
ab22c1fa 17989generated by GNU Autoconf 2.61. Invocation command line was
ba479fd2
NN
17990
17991 CONFIG_FILES = $CONFIG_FILES
17992 CONFIG_HEADERS = $CONFIG_HEADERS
17993 CONFIG_LINKS = $CONFIG_LINKS
17994 CONFIG_COMMANDS = $CONFIG_COMMANDS
17995 $ $0 $@
17996
ab22c1fa
CF
17997on `(hostname || uname -n) 2>/dev/null | sed 1q`
17998"
17999
ba479fd2
NN
18000_ACEOF
18001
ab22c1fa 18002cat >>$CONFIG_STATUS <<_ACEOF
ba479fd2 18003# Files that config.status was made for.
ab22c1fa
CF
18004config_files="$ac_config_files"
18005config_headers="$ac_config_headers"
18006config_commands="$ac_config_commands"
a3bba767 18007
ab22c1fa 18008_ACEOF
ba479fd2
NN
18009
18010cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2
NN
18011ac_cs_usage="\
18012\`$as_me' instantiates files from templates according to the
18013current configuration.
18014
18015Usage: $0 [OPTIONS] [FILE]...
18016
18017 -h, --help print this help, then exit
ab22c1fa 18018 -V, --version print version number and configuration settings, then exit
ba479fd2
NN
18019 -q, --quiet do not print progress messages
18020 -d, --debug don't remove temporary files
18021 --recheck update $as_me by reconfiguring in the same conditions
18022 --file=FILE[:TEMPLATE]
86da66b5 18023 instantiate the configuration file FILE
ba479fd2 18024 --header=FILE[:TEMPLATE]
86da66b5 18025 instantiate the configuration header FILE
ba479fd2
NN
18026
18027Configuration files:
18028$config_files
18029
18030Configuration headers:
18031$config_headers
18032
18033Configuration commands:
18034$config_commands
18035
18036Report bugs to <bug-autoconf@gnu.org>."
a3bba767 18037
ab22c1fa 18038_ACEOF
ba479fd2
NN
18039cat >>$CONFIG_STATUS <<_ACEOF
18040ac_cs_version="\\
18041config.status
ab22c1fa
CF
18042configured by $0, generated by GNU Autoconf 2.61,
18043 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
ba479fd2 18044
ab22c1fa 18045Copyright (C) 2006 Free Software Foundation, Inc.
ba479fd2
NN
18046This config.status script is free software; the Free Software Foundation
18047gives unlimited permission to copy, distribute and modify it."
ab22c1fa
CF
18048
18049ac_pwd='$ac_pwd'
18050srcdir='$srcdir'
ba479fd2
NN
18051_ACEOF
18052
18053cat >>$CONFIG_STATUS <<\_ACEOF
18054# If no file are specified by the user, then we need to provide default
18055# value. By we need to know if files were specified by the user.
18056ac_need_defaults=:
18057while test $# != 0
18058do
18059 case $1 in
18060 --*=*)
ab22c1fa
CF
18061 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18062 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ba479fd2
NN
18063 ac_shift=:
18064 ;;
ab22c1fa 18065 *)
ba479fd2
NN
18066 ac_option=$1
18067 ac_optarg=$2
18068 ac_shift=shift
18069 ;;
ba479fd2
NN
18070 esac
18071
18072 case $ac_option in
18073 # Handling of the options.
ba479fd2
NN
18074 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18075 ac_cs_recheck=: ;;
ab22c1fa
CF
18076 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18077 echo "$ac_cs_version"; exit ;;
18078 --debug | --debu | --deb | --de | --d | -d )
ba479fd2
NN
18079 debug=: ;;
18080 --file | --fil | --fi | --f )
18081 $ac_shift
18082 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
18083 ac_need_defaults=false;;
18084 --header | --heade | --head | --hea )
18085 $ac_shift
18086 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
18087 ac_need_defaults=false;;
ab22c1fa
CF
18088 --he | --h)
18089 # Conflict between --help and --header
18090 { echo "$as_me: error: ambiguous option: $1
18091Try \`$0 --help' for more information." >&2
18092 { (exit 1); exit 1; }; };;
18093 --help | --hel | -h )
18094 echo "$ac_cs_usage"; exit ;;
ba479fd2
NN
18095 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18096 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18097 ac_cs_silent=: ;;
18098
18099 # This is an error.
ab22c1fa
CF
18100 -*) { echo "$as_me: error: unrecognized option: $1
18101Try \`$0 --help' for more information." >&2
ba479fd2
NN
18102 { (exit 1); exit 1; }; } ;;
18103
ab22c1fa
CF
18104 *) ac_config_targets="$ac_config_targets $1"
18105 ac_need_defaults=false ;;
ba479fd2
NN
18106
18107 esac
18108 shift
6e3f3080 18109done
ba479fd2
NN
18110
18111ac_configure_extra_args=
18112
18113if $ac_cs_silent; then
18114 exec 6>/dev/null
18115 ac_configure_extra_args="$ac_configure_extra_args --silent"
861bb6c1
JL
18116fi
18117
ba479fd2
NN
18118_ACEOF
18119cat >>$CONFIG_STATUS <<_ACEOF
18120if \$ac_cs_recheck; then
ab22c1fa
CF
18121 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18122 CONFIG_SHELL=$SHELL
18123 export CONFIG_SHELL
18124 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
ba479fd2 18125fi
861bb6c1 18126
ba479fd2 18127_ACEOF
ab22c1fa
CF
18128cat >>$CONFIG_STATUS <<\_ACEOF
18129exec 5>>config.log
18130{
18131 echo
18132 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18133## Running $as_me. ##
18134_ASBOX
18135 echo "$ac_log"
18136} >&5
ba479fd2 18137
ab22c1fa 18138_ACEOF
ba479fd2
NN
18139cat >>$CONFIG_STATUS <<_ACEOF
18140#
ab22c1fa 18141# INIT-COMMANDS
ba479fd2 18142#
ba479fd2 18143subdirs='$subdirs'
ba479fd2
NN
18144
18145_ACEOF
18146
a3bba767 18147cat >>$CONFIG_STATUS <<\_ACEOF
ab22c1fa
CF
18148
18149# Handling of arguments.
ba479fd2
NN
18150for ac_config_target in $ac_config_targets
18151do
ab22c1fa
CF
18152 case $ac_config_target in
18153 "auto-host.h") CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
18154 "as") CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;;
18155 "collect-ld") CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;;
18156 "nm") CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;;
18157 "$all_outputs") CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
18158 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18159
ba479fd2
NN
18160 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18161echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18162 { (exit 1); exit 1; }; };;
861bb6c1 18163 esac
ba479fd2
NN
18164done
18165
ab22c1fa 18166
ba479fd2
NN
18167# If the user did not use the arguments to specify the items to instantiate,
18168# then the envvar interface is used. Set only those that are not.
18169# We use the long form for the default assignment because of an extremely
18170# bizarre bug on SunOS 4.1.3.
18171if $ac_need_defaults; then
18172 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18173 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18174 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18175fi
18176
18177# Have a temporary directory for convenience. Make it in the build tree
ab22c1fa 18178# simply because there is no reason against having it here, and in addition,
ba479fd2 18179# creating and moving files from /tmp can sometimes cause problems.
ab22c1fa
CF
18180# Hook for its removal unless debugging.
18181# Note that there is a small window in which the directory will not be cleaned:
18182# after its creation but before its name has been assigned to `$tmp'.
ba479fd2
NN
18183$debug ||
18184{
ab22c1fa
CF
18185 tmp=
18186 trap 'exit_status=$?
18187 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
18188' 0
ba479fd2
NN
18189 trap '{ (exit 1); exit 1; }' 1 2 13 15
18190}
ba479fd2 18191# Create a (secure) tmp directory for tmp files.
6e3f3080 18192
ba479fd2 18193{
ab22c1fa 18194 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
ba479fd2
NN
18195 test -n "$tmp" && test -d "$tmp"
18196} ||
18197{
ab22c1fa
CF
18198 tmp=./conf$$-$RANDOM
18199 (umask 077 && mkdir "$tmp")
ba479fd2
NN
18200} ||
18201{
18202 echo "$me: cannot create a temporary directory in ." >&2
18203 { (exit 1); exit 1; }
18204}
18205
ba479fd2 18206#
ab22c1fa 18207# Set up the sed scripts for CONFIG_FILES section.
ba479fd2
NN
18208#
18209
18210# No need to generate the scripts if there are no CONFIG_FILES.
18211# This happens for instance when ./config.status config.h
ab22c1fa
CF
18212if test -n "$CONFIG_FILES"; then
18213
18214_ACEOF
18215
18216# Create sed commands to just substitute file output variables.
18217
18218# Remaining file output variables are in a fragment that also has non-file
18219# output varibles.
18220
18221
18222
18223ac_delim='%!_!# '
18224for ac_last_try in false false false false false :; do
18225 cat >conf$$subs.sed <<_ACEOF
18226SHELL!$SHELL$ac_delim
18227PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
18228PACKAGE_NAME!$PACKAGE_NAME$ac_delim
18229PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
18230PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
18231PACKAGE_STRING!$PACKAGE_STRING$ac_delim
18232PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
18233exec_prefix!$exec_prefix$ac_delim
18234prefix!$prefix$ac_delim
18235program_transform_name!$program_transform_name$ac_delim
18236bindir!$bindir$ac_delim
18237sbindir!$sbindir$ac_delim
18238libexecdir!$libexecdir$ac_delim
18239datarootdir!$datarootdir$ac_delim
18240datadir!$datadir$ac_delim
18241sysconfdir!$sysconfdir$ac_delim
18242sharedstatedir!$sharedstatedir$ac_delim
18243localstatedir!$localstatedir$ac_delim
18244includedir!$includedir$ac_delim
18245oldincludedir!$oldincludedir$ac_delim
18246docdir!$docdir$ac_delim
18247infodir!$infodir$ac_delim
18248htmldir!$htmldir$ac_delim
18249dvidir!$dvidir$ac_delim
18250pdfdir!$pdfdir$ac_delim
18251psdir!$psdir$ac_delim
18252libdir!$libdir$ac_delim
18253localedir!$localedir$ac_delim
18254mandir!$mandir$ac_delim
18255DEFS!$DEFS$ac_delim
18256ECHO_C!$ECHO_C$ac_delim
18257ECHO_N!$ECHO_N$ac_delim
18258ECHO_T!$ECHO_T$ac_delim
18259LIBS!$LIBS$ac_delim
18260build_alias!$build_alias$ac_delim
18261host_alias!$host_alias$ac_delim
18262target_alias!$target_alias$ac_delim
18263build!$build$ac_delim
18264build_cpu!$build_cpu$ac_delim
18265build_vendor!$build_vendor$ac_delim
18266build_os!$build_os$ac_delim
18267host!$host$ac_delim
18268host_cpu!$host_cpu$ac_delim
18269host_vendor!$host_vendor$ac_delim
18270host_os!$host_os$ac_delim
18271target!$target$ac_delim
18272target_cpu!$target_cpu$ac_delim
18273target_vendor!$target_vendor$ac_delim
18274target_os!$target_os$ac_delim
18275target_noncanonical!$target_noncanonical$ac_delim
18276build_libsubdir!$build_libsubdir$ac_delim
18277build_subdir!$build_subdir$ac_delim
18278host_subdir!$host_subdir$ac_delim
18279target_subdir!$target_subdir$ac_delim
18280GENINSRC!$GENINSRC$ac_delim
18281CC!$CC$ac_delim
18282CFLAGS!$CFLAGS$ac_delim
18283LDFLAGS!$LDFLAGS$ac_delim
18284CPPFLAGS!$CPPFLAGS$ac_delim
18285ac_ct_CC!$ac_ct_CC$ac_delim
18286EXEEXT!$EXEEXT$ac_delim
18287OBJEXT!$OBJEXT$ac_delim
18288NO_MINUS_C_MINUS_O!$NO_MINUS_C_MINUS_O$ac_delim
18289OUTPUT_OPTION!$OUTPUT_OPTION$ac_delim
18290CPP!$CPP$ac_delim
18291GREP!$GREP$ac_delim
18292EGREP!$EGREP$ac_delim
18293loose_warn!$loose_warn$ac_delim
18294cxx_compat_warn!$cxx_compat_warn$ac_delim
18295strict_warn!$strict_warn$ac_delim
18296warn_cflags!$warn_cflags$ac_delim
18297nocommon_flag!$nocommon_flag$ac_delim
18298TREEBROWSER!$TREEBROWSER$ac_delim
18299valgrind_path!$valgrind_path$ac_delim
18300valgrind_path_defines!$valgrind_path_defines$ac_delim
18301valgrind_command!$valgrind_command$ac_delim
18302coverage_flags!$coverage_flags$ac_delim
18303enable_multilib!$enable_multilib$ac_delim
18304enable_decimal_float!$enable_decimal_float$ac_delim
18305enable_fixed_point!$enable_fixed_point$ac_delim
18306enable_shared!$enable_shared$ac_delim
18307TARGET_SYSTEM_ROOT!$TARGET_SYSTEM_ROOT$ac_delim
18308TARGET_SYSTEM_ROOT_DEFINE!$TARGET_SYSTEM_ROOT_DEFINE$ac_delim
18309CROSS_SYSTEM_HEADER_DIR!$CROSS_SYSTEM_HEADER_DIR$ac_delim
18310onestep!$onestep$ac_delim
18311SET_MAKE!$SET_MAKE$ac_delim
18312AWK!$AWK$ac_delim
18313LN_S!$LN_S$ac_delim
18314LN!$LN$ac_delim
18315RANLIB!$RANLIB$ac_delim
18316ranlib_flags!$ranlib_flags$ac_delim
18317INSTALL!$INSTALL$ac_delim
18318INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
18319INSTALL_DATA!$INSTALL_DATA$ac_delim
18320_ACEOF
18321
18322 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 94; then
18323 break
18324 elif $ac_last_try; then
18325 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
18326echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
18327 { (exit 1); exit 1; }; }
18328 else
18329 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
703d89ab 18330 fi
ab22c1fa 18331done
703d89ab 18332
ab22c1fa
CF
18333ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
18334if test -n "$ac_eof"; then
18335 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
18336 ac_eof=`expr $ac_eof + 1`
18337fi
18338
18339cat >>$CONFIG_STATUS <<_ACEOF
18340cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
18341/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18342/^[ ]*@language_hooks@[ ]*$/{
18343r $language_hooks
18344d
18345}
b8ec3cc8 18346_ACEOF
ab22c1fa
CF
18347sed '
18348s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
18349s/^/s,@/; s/!/@,|#_!!_#|/
18350:n
18351t n
18352s/'"$ac_delim"'$/,g/; t
18353s/$/\\/; p
18354N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
18355' >>$CONFIG_STATUS <conf$$subs.sed
18356rm -f conf$$subs.sed
18357cat >>$CONFIG_STATUS <<_ACEOF
18358CEOF$ac_eof
18359_ACEOF
18360
18361
18362ac_delim='%!_!# '
18363for ac_last_try in false false false false false :; do
18364 cat >conf$$subs.sed <<_ACEOF
18365make_compare_target!$make_compare_target$ac_delim
18366have_mktemp_command!$have_mktemp_command$ac_delim
18367MAKEINFO!$MAKEINFO$ac_delim
18368BUILD_INFO!$BUILD_INFO$ac_delim
18369GENERATED_MANPAGES!$GENERATED_MANPAGES$ac_delim
18370FLEX!$FLEX$ac_delim
18371BISON!$BISON$ac_delim
18372NM!$NM$ac_delim
18373AR!$AR$ac_delim
18374COLLECT2_LIBS!$COLLECT2_LIBS$ac_delim
18375GNAT_LIBEXC!$GNAT_LIBEXC$ac_delim
18376LDEXP_LIB!$LDEXP_LIB$ac_delim
18377TARGET_GETGROUPS_T!$TARGET_GETGROUPS_T$ac_delim
18378LIBICONV!$LIBICONV$ac_delim
18379LTLIBICONV!$LTLIBICONV$ac_delim
18380LIBICONV_DEP!$LIBICONV_DEP$ac_delim
18381manext!$manext$ac_delim
18382objext!$objext$ac_delim
18383gthread_flags!$gthread_flags$ac_delim
18384extra_modes_file!$extra_modes_file$ac_delim
18385extra_opt_files!$extra_opt_files$ac_delim
18386USE_NLS!$USE_NLS$ac_delim
18387LIBINTL!$LIBINTL$ac_delim
18388LIBINTL_DEP!$LIBINTL_DEP$ac_delim
18389INCINTL!$INCINTL$ac_delim
18390XGETTEXT!$XGETTEXT$ac_delim
18391GMSGFMT!$GMSGFMT$ac_delim
18392POSUB!$POSUB$ac_delim
18393CATALOGS!$CATALOGS$ac_delim
18394DATADIRNAME!$DATADIRNAME$ac_delim
18395INSTOBJEXT!$INSTOBJEXT$ac_delim
18396GENCAT!$GENCAT$ac_delim
18397CATOBJEXT!$CATOBJEXT$ac_delim
18398host_cc_for_libada!$host_cc_for_libada$ac_delim
18399CROSS!$CROSS$ac_delim
18400ALL!$ALL$ac_delim
18401SYSTEM_HEADER_DIR!$SYSTEM_HEADER_DIR$ac_delim
18402inhibit_libc!$inhibit_libc$ac_delim
18403CC_FOR_BUILD!$CC_FOR_BUILD$ac_delim
18404BUILD_CFLAGS!$BUILD_CFLAGS$ac_delim
18405STMP_FIXINC!$STMP_FIXINC$ac_delim
18406STMP_FIXPROTO!$STMP_FIXPROTO$ac_delim
18407collect2!$collect2$ac_delim
18408gcc_cv_as!$gcc_cv_as$ac_delim
18409ORIGINAL_AS_FOR_TARGET!$ORIGINAL_AS_FOR_TARGET$ac_delim
18410gcc_cv_ld!$gcc_cv_ld$ac_delim
18411ORIGINAL_LD_FOR_TARGET!$ORIGINAL_LD_FOR_TARGET$ac_delim
18412gcc_cv_nm!$gcc_cv_nm$ac_delim
18413ORIGINAL_NM_FOR_TARGET!$ORIGINAL_NM_FOR_TARGET$ac_delim
18414gcc_cv_objdump!$gcc_cv_objdump$ac_delim
18415libgcc_visibility!$libgcc_visibility$ac_delim
18416GGC!$GGC$ac_delim
18417zlibdir!$zlibdir$ac_delim
18418zlibinc!$zlibinc$ac_delim
18419MAINT!$MAINT$ac_delim
18420gcc_tooldir!$gcc_tooldir$ac_delim
18421dollar!$dollar$ac_delim
18422slibdir!$slibdir$ac_delim
18423objdir!$objdir$ac_delim
18424subdirs!$subdirs$ac_delim
18425srcdir!$srcdir$ac_delim
18426all_compilers!$all_compilers$ac_delim
18427all_gtfiles!$all_gtfiles$ac_delim
18428all_lang_makefrags!$all_lang_makefrags$ac_delim
18429all_lang_makefiles!$all_lang_makefiles$ac_delim
18430all_languages!$all_languages$ac_delim
18431all_selected_languages!$all_selected_languages$ac_delim
18432build_exeext!$build_exeext$ac_delim
18433build_install_headers_dir!$build_install_headers_dir$ac_delim
18434build_xm_file_list!$build_xm_file_list$ac_delim
18435build_xm_include_list!$build_xm_include_list$ac_delim
18436build_xm_defines!$build_xm_defines$ac_delim
18437check_languages!$check_languages$ac_delim
18438cpp_install_dir!$cpp_install_dir$ac_delim
18439xmake_file!$xmake_file$ac_delim
18440tmake_file!$tmake_file$ac_delim
18441extra_gcc_objs!$extra_gcc_objs$ac_delim
18442extra_headers_list!$extra_headers_list$ac_delim
18443extra_objs!$extra_objs$ac_delim
18444extra_parts!$extra_parts$ac_delim
18445extra_passes!$extra_passes$ac_delim
18446extra_programs!$extra_programs$ac_delim
18447float_h_file!$float_h_file$ac_delim
18448gcc_config_arguments!$gcc_config_arguments$ac_delim
18449gcc_gxx_include_dir!$gcc_gxx_include_dir$ac_delim
18450host_exeext!$host_exeext$ac_delim
18451host_xm_file_list!$host_xm_file_list$ac_delim
18452host_xm_include_list!$host_xm_include_list$ac_delim
18453host_xm_defines!$host_xm_defines$ac_delim
18454out_host_hook_obj!$out_host_hook_obj$ac_delim
18455install!$install$ac_delim
18456lang_opt_files!$lang_opt_files$ac_delim
18457lang_specs_files!$lang_specs_files$ac_delim
18458lang_tree_files!$lang_tree_files$ac_delim
18459local_prefix!$local_prefix$ac_delim
18460md_file!$md_file$ac_delim
18461objc_boehm_gc!$objc_boehm_gc$ac_delim
18462_ACEOF
18463
18464 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
18465 break
18466 elif $ac_last_try; then
18467 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
18468echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
18469 { (exit 1); exit 1; }; }
18470 else
18471 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18472 fi
18473done
18474
18475ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
18476if test -n "$ac_eof"; then
18477 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
18478 ac_eof=`expr $ac_eof + 1`
18479fi
18480
18481cat >>$CONFIG_STATUS <<_ACEOF
18482cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
18483/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18484_ACEOF
18485sed '
18486s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
18487s/^/s,@/; s/!/@,|#_!!_#|/
18488:n
18489t n
18490s/'"$ac_delim"'$/,g/; t
18491s/$/\\/; p
18492N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
18493' >>$CONFIG_STATUS <conf$$subs.sed
18494rm -f conf$$subs.sed
18495cat >>$CONFIG_STATUS <<_ACEOF
18496CEOF$ac_eof
18497_ACEOF
18498
18499
18500ac_delim='%!_!# '
18501for ac_last_try in false false false false false :; do
18502 cat >conf$$subs.sed <<_ACEOF
18503out_file!$out_file$ac_delim
18504out_object_file!$out_object_file$ac_delim
18505thread_file!$thread_file$ac_delim
18506tm_file_list!$tm_file_list$ac_delim
18507tm_include_list!$tm_include_list$ac_delim
18508tm_defines!$tm_defines$ac_delim
18509tm_p_file_list!$tm_p_file_list$ac_delim
18510tm_p_include_list!$tm_p_include_list$ac_delim
18511xm_file_list!$xm_file_list$ac_delim
18512xm_include_list!$xm_include_list$ac_delim
18513xm_defines!$xm_defines$ac_delim
18514c_target_objs!$c_target_objs$ac_delim
18515cxx_target_objs!$cxx_target_objs$ac_delim
18516target_cpu_default!$target_cpu_default$ac_delim
18517GMPLIBS!$GMPLIBS$ac_delim
18518GMPINC!$GMPINC$ac_delim
18519LIBOBJS!$LIBOBJS$ac_delim
18520LTLIBOBJS!$LTLIBOBJS$ac_delim
18521_ACEOF
18522
18523 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 18; then
18524 break
18525 elif $ac_last_try; then
18526 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
18527echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
18528 { (exit 1); exit 1; }; }
18529 else
18530 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18531 fi
18532done
18533
18534ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
18535if test -n "$ac_eof"; then
18536 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
18537 ac_eof=`expr $ac_eof + 1`
18538fi
18539
18540cat >>$CONFIG_STATUS <<_ACEOF
18541cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof
18542/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
18543_ACEOF
18544sed '
18545s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
18546s/^/s,@/; s/!/@,|#_!!_#|/
18547:n
18548t n
18549s/'"$ac_delim"'$/,g/; t
18550s/$/\\/; p
18551N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
18552' >>$CONFIG_STATUS <conf$$subs.sed
18553rm -f conf$$subs.sed
18554cat >>$CONFIG_STATUS <<_ACEOF
18555:end
18556s/|#_!!_#|//g
18557CEOF$ac_eof
18558_ACEOF
18559
18560
18561# VPATH may cause trouble with some makes, so we remove $(srcdir),
18562# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18563# trailing colons and then remove the whole line if VPATH becomes empty
18564# (actually we leave an empty line to preserve line numbers).
18565if test "x$srcdir" = x.; then
18566 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18567s/:*\$(srcdir):*/:/
18568s/:*\${srcdir}:*/:/
18569s/:*@srcdir@:*/:/
18570s/^\([^=]*=[ ]*\):*/\1/
18571s/:*$//
18572s/^[^=]*=[ ]*$//
18573}'
18574fi
18575
ba479fd2 18576cat >>$CONFIG_STATUS <<\_ACEOF
ab22c1fa
CF
18577fi # test -n "$CONFIG_FILES"
18578
18579
18580for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
18581do
18582 case $ac_tag in
18583 :[FHLC]) ac_mode=$ac_tag; continue;;
18584 esac
18585 case $ac_mode$ac_tag in
18586 :[FHL]*:*);;
18587 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
18588echo "$as_me: error: Invalid tag $ac_tag." >&2;}
18589 { (exit 1); exit 1; }; };;
18590 :[FH]-) ac_tag=-:-;;
18591 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18592 esac
18593 ac_save_IFS=$IFS
18594 IFS=:
18595 set x $ac_tag
18596 IFS=$ac_save_IFS
18597 shift
18598 ac_file=$1
18599 shift
18600
18601 case $ac_mode in
18602 :L) ac_source=$1;;
18603 :[FH])
18604 ac_file_inputs=
18605 for ac_f
18606 do
18607 case $ac_f in
18608 -) ac_f="$tmp/stdin";;
18609 *) # Look for the file first in the build tree, then in the source tree
18610 # (if the path is not absolute). The absolute path cannot be DOS-style,
18611 # because $ac_f cannot contain `:'.
18612 test -f "$ac_f" ||
18613 case $ac_f in
18614 [\\/$]*) false;;
18615 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18616 esac ||
18617 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
18618echo "$as_me: error: cannot find input file: $ac_f" >&2;}
18619 { (exit 1); exit 1; }; };;
18620 esac
18621 ac_file_inputs="$ac_file_inputs $ac_f"
18622 done
18623
18624 # Let's still pretend it is `configure' which instantiates (i.e., don't
18625 # use $as_me), people would be surprised to read:
18626 # /* config.h. Generated by config.status. */
18627 configure_input="Generated from "`IFS=:
18628 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
18629 if test x"$ac_file" != x-; then
18630 configure_input="$ac_file. $configure_input"
18631 { echo "$as_me:$LINENO: creating $ac_file" >&5
18632echo "$as_me: creating $ac_file" >&6;}
18633 fi
18634
18635 case $ac_tag in
18636 *:-:* | *:-) cat >"$tmp/stdin";;
18637 esac
18638 ;;
703d89ab
ZW
18639 esac
18640
ab22c1fa 18641 ac_dir=`$as_dirname -- "$ac_file" ||
ba479fd2 18642$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
18643 X"$ac_file" : 'X\(//\)[^/]' \| \
18644 X"$ac_file" : 'X\(//\)$' \| \
ab22c1fa 18645 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
ba479fd2 18646echo X"$ac_file" |
ab22c1fa
CF
18647 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18648 s//\1/
18649 q
18650 }
18651 /^X\(\/\/\)[^/].*/{
18652 s//\1/
18653 q
18654 }
18655 /^X\(\/\/\)$/{
18656 s//\1/
18657 q
18658 }
18659 /^X\(\/\).*/{
18660 s//\1/
18661 q
18662 }
18663 s/.*/./; q'`
18664 { as_dir="$ac_dir"
18665 case $as_dir in #(
18666 -*) as_dir=./$as_dir;;
18667 esac
18668 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
ba479fd2 18669 as_dirs=
ab22c1fa
CF
18670 while :; do
18671 case $as_dir in #(
18672 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
18673 *) as_qdir=$as_dir;;
18674 esac
18675 as_dirs="'$as_qdir' $as_dirs"
18676 as_dir=`$as_dirname -- "$as_dir" ||
ba479fd2 18677$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
86da66b5
HPN
18678 X"$as_dir" : 'X\(//\)[^/]' \| \
18679 X"$as_dir" : 'X\(//\)$' \| \
ab22c1fa 18680 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
ba479fd2 18681echo X"$as_dir" |
ab22c1fa
CF
18682 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18683 s//\1/
18684 q
18685 }
18686 /^X\(\/\/\)[^/].*/{
18687 s//\1/
18688 q
18689 }
18690 /^X\(\/\/\)$/{
18691 s//\1/
18692 q
18693 }
18694 /^X\(\/\).*/{
18695 s//\1/
18696 q
18697 }
18698 s/.*/./; q'`
18699 test -d "$as_dir" && break
ba479fd2 18700 done
ab22c1fa
CF
18701 test -z "$as_dirs" || eval "mkdir $as_dirs"
18702 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
18703echo "$as_me: error: cannot create directory $as_dir" >&2;}
ba479fd2 18704 { (exit 1); exit 1; }; }; }
ba479fd2
NN
18705 ac_builddir=.
18706
ab22c1fa
CF
18707case "$ac_dir" in
18708.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18709*)
ba479fd2 18710 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ab22c1fa
CF
18711 # A ".." for each directory in $ac_dir_suffix.
18712 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
18713 case $ac_top_builddir_sub in
18714 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18715 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18716 esac ;;
18717esac
18718ac_abs_top_builddir=$ac_pwd
18719ac_abs_builddir=$ac_pwd$ac_dir_suffix
18720# for backward compatibility:
18721ac_top_builddir=$ac_top_build_prefix
ba479fd2
NN
18722
18723case $srcdir in
ab22c1fa 18724 .) # We are building in place.
ba479fd2 18725 ac_srcdir=.
ab22c1fa
CF
18726 ac_top_srcdir=$ac_top_builddir_sub
18727 ac_abs_top_srcdir=$ac_pwd ;;
18728 [\\/]* | ?:[\\/]* ) # Absolute name.
ba479fd2 18729 ac_srcdir=$srcdir$ac_dir_suffix;
ab22c1fa
CF
18730 ac_top_srcdir=$srcdir
18731 ac_abs_top_srcdir=$srcdir ;;
18732 *) # Relative name.
18733 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18734 ac_top_srcdir=$ac_top_build_prefix$srcdir
18735 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
ba479fd2 18736esac
ab22c1fa 18737ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
ba479fd2
NN
18738
18739
ab22c1fa
CF
18740 case $ac_mode in
18741 :F)
18742 #
18743 # CONFIG_FILE
18744 #
a6ccdbab 18745
ab22c1fa 18746_ACEOF
703d89ab 18747
ab22c1fa
CF
18748cat >>$CONFIG_STATUS <<\_ACEOF
18749# If the template does not know about datarootdir, expand it.
18750# FIXME: This hack should be removed a few years after 2.60.
18751ac_datarootdir_hack=; ac_datarootdir_seen=
18752
18753case `sed -n '/datarootdir/ {
18754 p
18755 q
18756}
18757/@datadir@/p
18758/@docdir@/p
18759/@infodir@/p
18760/@localedir@/p
18761/@mandir@/p
18762' $ac_file_inputs` in
18763*datarootdir*) ac_datarootdir_seen=yes;;
18764*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18765 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18766echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18767_ACEOF
18768cat >>$CONFIG_STATUS <<_ACEOF
18769 ac_datarootdir_hack='
18770 s&@datadir@&$datadir&g
18771 s&@docdir@&$docdir&g
18772 s&@infodir@&$infodir&g
18773 s&@localedir@&$localedir&g
18774 s&@mandir@&$mandir&g
18775 s&\\\${datarootdir}&$datarootdir&g' ;;
18776esac
a6ccdbab 18777_ACEOF
ab22c1fa
CF
18778
18779# Neutralize VPATH when `$srcdir' = `.'.
18780# Shell code in configure.ac might set extrasub.
18781# FIXME: do we really want to maintain this feature?
ba479fd2
NN
18782cat >>$CONFIG_STATUS <<_ACEOF
18783 sed "$ac_vpsub
18784$extrasub
18785_ACEOF
18786cat >>$CONFIG_STATUS <<\_ACEOF
18787:t
18788/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
ab22c1fa
CF
18789s&@configure_input@&$configure_input&;t t
18790s&@top_builddir@&$ac_top_builddir_sub&;t t
18791s&@srcdir@&$ac_srcdir&;t t
18792s&@abs_srcdir@&$ac_abs_srcdir&;t t
18793s&@top_srcdir@&$ac_top_srcdir&;t t
18794s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18795s&@builddir@&$ac_builddir&;t t
18796s&@abs_builddir@&$ac_abs_builddir&;t t
18797s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18798$ac_datarootdir_hack
18799" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out
18800
18801test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18802 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
18803 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
18804 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18805which seems to be undefined. Please make sure it is defined." >&5
18806echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18807which seems to be undefined. Please make sure it is defined." >&2;}
18808
18809 rm -f "$tmp/stdin"
be0fe523 18810 case $ac_file in
ab22c1fa
CF
18811 -) cat "$tmp/out"; rm -f "$tmp/out";;
18812 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
be0fe523 18813 esac
ab22c1fa
CF
18814 ;;
18815 :H)
18816 #
18817 # CONFIG_HEADER
18818 #
18819_ACEOF
18820
18821# Transform confdefs.h into a sed script `conftest.defines', that
18822# substitutes the proper values into config.h.in to produce config.h.
18823rm -f conftest.defines conftest.tail
18824# First, append a space to every undef/define line, to ease matching.
18825echo 's/$/ /' >conftest.defines
18826# Then, protect against being on the right side of a sed subst, or in
18827# an unquoted here document, in config.status. If some macros were
18828# called several times there might be several #defines for the same
18829# symbol, which is useless. But do not sort them, since the last
18830# AC_DEFINE must be honored.
18831ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18832# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
18833# NAME is the cpp macro being defined, VALUE is the value it is being given.
18834# PARAMS is the parameter list in the macro definition--in most cases, it's
18835# just an empty string.
18836ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
18837ac_dB='\\)[ (].*,\\1define\\2'
a3bba767 18838ac_dC=' '
ab22c1fa
CF
18839ac_dD=' ,'
18840
18841uniq confdefs.h |
18842 sed -n '
18843 t rset
18844 :rset
18845 s/^[ ]*#[ ]*define[ ][ ]*//
18846 t ok
18847 d
18848 :ok
18849 s/[\\&,]/\\&/g
18850 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
18851 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
18852 ' >>conftest.defines
18853
18854# Remove the space that was appended to ease matching.
18855# Then replace #undef with comments. This is necessary, for
861bb6c1
JL
18856# example, in the case of _POSIX_SOURCE, which is predefined and required
18857# on some systems where configure will not decide to define it.
ab22c1fa
CF
18858# (The regexp can be short, since the line contains either #define or #undef.)
18859echo 's/ $//
18860s,^[ #]*u.*,/* & */,' >>conftest.defines
18861
18862# Break up conftest.defines:
18863ac_max_sed_lines=50
18864
18865# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
18866# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
18867# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
18868# et cetera.
18869ac_in='$ac_file_inputs'
18870ac_out='"$tmp/out1"'
18871ac_nxt='"$tmp/out2"'
18872
18873while :
ba479fd2 18874do
ab22c1fa
CF
18875 # Write a here document:
18876 cat >>$CONFIG_STATUS <<_ACEOF
18877 # First, check the format of the line:
18878 cat >"\$tmp/defines.sed" <<\\CEOF
18879/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
18880/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
18881b
18882:def
18883_ACEOF
18884 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
ba479fd2 18885 echo 'CEOF
ab22c1fa
CF
18886 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
18887 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
18888 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
18889 grep . conftest.tail >/dev/null || break
ba479fd2
NN
18890 rm -f conftest.defines
18891 mv conftest.tail conftest.defines
18892done
ab22c1fa 18893rm -f conftest.defines conftest.tail
ba479fd2 18894
ab22c1fa 18895echo "ac_result=$ac_in" >>$CONFIG_STATUS
ba479fd2 18896cat >>$CONFIG_STATUS <<\_ACEOF
ba479fd2 18897 if test x"$ac_file" != x-; then
ab22c1fa
CF
18898 echo "/* $configure_input */" >"$tmp/config.h"
18899 cat "$ac_result" >>"$tmp/config.h"
18900 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
ba479fd2
NN
18901 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18902echo "$as_me: $ac_file is unchanged" >&6;}
18903 else
ba479fd2 18904 rm -f $ac_file
ab22c1fa 18905 mv "$tmp/config.h" $ac_file
ba479fd2
NN
18906 fi
18907 else
ab22c1fa
CF
18908 echo "/* $configure_input */"
18909 cat "$ac_result"
ba479fd2 18910 fi
ab22c1fa
CF
18911 rm -f "$tmp/out12"
18912 ;;
a3bba767 18913
ab22c1fa
CF
18914 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
18915echo "$as_me: executing $ac_file commands" >&6;}
18916 ;;
18917 esac
a3bba767
JJ
18918
18919
ab22c1fa
CF
18920 case $ac_file$ac_mode in
18921 "as":F) chmod +x as ;;
18922 "collect-ld":F) chmod +x collect-ld ;;
18923 "nm":F) chmod +x nm ;;
18924 "default":C)
f1faaabd
NN
18925case ${CONFIG_HEADERS} in
18926 *auto-host.h:config.in*)
18927 echo > cstamp-h ;;
861bb6c1 18928esac
2ed26f6b 18929# Make sure all the subdirs exist.
3b620440 18930for d in $subdirs doc build
2ed26f6b 18931do
2ed26f6b 18932 test -d $d || mkdir $d
2ed26f6b 18933done
ba479fd2 18934 ;;
ab22c1fa 18935
ba479fd2 18936 esac
ab22c1fa 18937done # for ac_tag
cafe096b 18938
ba479fd2
NN
18939
18940{ (exit 0); exit 0; }
18941_ACEOF
861bb6c1 18942chmod +x $CONFIG_STATUS
ba479fd2
NN
18943ac_clean_files=$ac_clean_files_save
18944
18945
18946# configure is writing to config.log, and then calls config.status.
18947# config.status does its own redirection, appending to config.log.
18948# Unfortunately, on DOS this fails, as config.log is still kept open
18949# by configure, so config.status won't be able to write to it; its
18950# output is simply discarded. So we exec the FD to /dev/null,
18951# effectively closing config.log, so it can be properly (re)opened and
18952# appended to by config.status. When coming back to configure, we
18953# need to make the FD available again.
18954if test "$no_create" != yes; then
18955 ac_cs_success=:
18956 ac_config_status_args=
18957 test "$silent" = yes &&
18958 ac_config_status_args="$ac_config_status_args --quiet"
18959 exec 5>/dev/null
18960 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18961 exec 5>>config.log
18962 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18963 # would make configure fail if this is the last instruction.
18964 $ac_cs_success || { (exit 1); exit 1; }
18965fi
861bb6c1 18966