]>
Commit | Line | Data |
---|---|---|
005537df | 1 | #! /bin/sh |
861bb6c1 | 2 | # Guess values for system-dependent variables and create Makefiles. |
8ab705be | 3 | # Generated by GNU Autoconf 2.59. |
861bb6c1 | 4 | # |
86da66b5 | 5 | # Copyright (C) 2003 Free Software Foundation, Inc. |
861bb6c1 JL |
6 | # This configure script is free software; the Free Software Foundation |
7 | # gives unlimited permission to copy, distribute and modify it. | |
ba479fd2 NN |
8 | ## --------------------- ## |
9 | ## M4sh Initialization. ## | |
10 | ## --------------------- ## | |
11 | ||
12 | # Be Bourne compatible | |
13 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
14 | emulate sh | |
15 | NULLCMD=: | |
16 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
17 | # is contrary to our usage. Disable this feature. | |
18 | alias -g '${1+"$@"}'='"$@"' | |
19 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
20 | set -o posix | |
21 | fi | |
86da66b5 | 22 | DUALCASE=1; export DUALCASE # for MKS sh |
ba479fd2 NN |
23 | |
24 | # Support unset when possible. | |
86da66b5 | 25 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then |
ba479fd2 NN |
26 | as_unset=unset |
27 | else | |
28 | as_unset=false | |
29 | fi | |
30 | ||
31 | ||
32 | # Work around bugs in pre-3.0 UWIN ksh. | |
33 | $as_unset ENV MAIL MAILPATH | |
34 | PS1='$ ' | |
35 | PS2='> ' | |
36 | PS4='+ ' | |
37 | ||
38 | # NLS nuisances. | |
39 | for as_var in \ | |
40 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
41 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
42 | LC_TELEPHONE LC_TIME | |
43 | do | |
86da66b5 | 44 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
ba479fd2 NN |
45 | eval $as_var=C; export $as_var |
46 | else | |
47 | $as_unset $as_var | |
48 | fi | |
49 | done | |
50 | ||
51 | # Required to use basename. | |
52 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
53 | as_expr=expr | |
54 | else | |
55 | as_expr=false | |
56 | fi | |
57 | ||
58 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then | |
59 | as_basename=basename | |
60 | else | |
61 | as_basename=false | |
62 | fi | |
63 | ||
64 | ||
65 | # Name of the executable. | |
66 | as_me=`$as_basename "$0" || | |
67 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
68 | X"$0" : 'X\(//\)$' \| \ | |
69 | X"$0" : 'X\(/\)$' \| \ | |
70 | . : '\(.\)' 2>/dev/null || | |
71 | echo X/"$0" | | |
72 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | |
73 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
74 | /^X\/\(\/\).*/{ s//\1/; q; } | |
75 | s/.*/./; q'` | |
76 | ||
77 | ||
78 | # PATH needs CR, and LINENO needs CR and PATH. | |
79 | # Avoid depending upon Character Ranges. | |
80 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
81 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
82 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
83 | as_cr_digits='0123456789' | |
84 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
85 | ||
86 | # The user is always right. | |
87 | if test "${PATH_SEPARATOR+set}" != set; then | |
88 | echo "#! /bin/sh" >conf$$.sh | |
89 | echo "exit 0" >>conf$$.sh | |
90 | chmod +x conf$$.sh | |
91 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
92 | PATH_SEPARATOR=';' | |
93 | else | |
94 | PATH_SEPARATOR=: | |
95 | fi | |
96 | rm -f conf$$.sh | |
97 | fi | |
98 | ||
99 | ||
100 | as_lineno_1=$LINENO | |
101 | as_lineno_2=$LINENO | |
102 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
103 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
104 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
105 | # Find who we are. Look in the path if we contain no path at all | |
106 | # relative or not. | |
107 | case $0 in | |
108 | *[\\/]* ) as_myself=$0 ;; | |
109 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
110 | for as_dir in $PATH | |
111 | do | |
112 | IFS=$as_save_IFS | |
113 | test -z "$as_dir" && as_dir=. | |
114 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
115 | done | |
116 | ||
117 | ;; | |
118 | esac | |
119 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
120 | # in which case we are not to be found in the path. | |
121 | if test "x$as_myself" = x; then | |
122 | as_myself=$0 | |
123 | fi | |
124 | if test ! -f "$as_myself"; then | |
125 | { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 | |
126 | { (exit 1); exit 1; }; } | |
127 | fi | |
128 | case $CONFIG_SHELL in | |
129 | '') | |
130 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
131 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
132 | do | |
133 | IFS=$as_save_IFS | |
134 | test -z "$as_dir" && as_dir=. | |
135 | for as_base in sh bash ksh sh5; do | |
136 | case $as_dir in | |
137 | /*) | |
138 | if ("$as_dir/$as_base" -c ' | |
139 | as_lineno_1=$LINENO | |
140 | as_lineno_2=$LINENO | |
141 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
142 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
143 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | |
144 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
145 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
146 | CONFIG_SHELL=$as_dir/$as_base | |
147 | export CONFIG_SHELL | |
148 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
149 | fi;; | |
150 | esac | |
151 | done | |
152 | done | |
153 | ;; | |
154 | esac | |
155 | ||
156 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
157 | # uniformly replaced by the line number. The first 'sed' inserts a | |
158 | # line-number line before each line; the second 'sed' does the real | |
159 | # work. The second script uses 'N' to pair each line-number line | |
160 | # with the numbered line, and appends trailing '-' during | |
161 | # substitution so that $LINENO is not a special case at line end. | |
162 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | |
163 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | |
164 | sed '=' <$as_myself | | |
165 | sed ' | |
166 | N | |
167 | s,$,-, | |
168 | : loop | |
169 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
170 | t loop | |
171 | s,-$,, | |
172 | s,^['$as_cr_digits']*\n,, | |
173 | ' >$as_me.lineno && | |
174 | chmod +x $as_me.lineno || | |
175 | { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 | |
176 | { (exit 1); exit 1; }; } | |
177 | ||
178 | # Don't try to exec as it changes $[0], causing all sort of problems | |
179 | # (the dirname of $[0] is not the place where we might find the | |
180 | # original and so on. Autoconf is especially sensible to this). | |
181 | . ./$as_me.lineno | |
182 | # Exit status is that of the last command. | |
183 | exit | |
184 | } | |
185 | ||
186 | ||
187 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | |
188 | *c*,-n*) ECHO_N= ECHO_C=' | |
189 | ' ECHO_T=' ' ;; | |
190 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
191 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
192 | esac | |
193 | ||
194 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
195 | as_expr=expr | |
196 | else | |
197 | as_expr=false | |
198 | fi | |
199 | ||
200 | rm -f conf$$ conf$$.exe conf$$.file | |
201 | echo >conf$$.file | |
202 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
203 | # We could just check for DJGPP; but this test a) works b) is more generic | |
204 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
205 | if test -f conf$$.exe; then | |
206 | # Don't use ln at all; we don't have any links | |
207 | as_ln_s='cp -p' | |
208 | else | |
209 | as_ln_s='ln -s' | |
210 | fi | |
211 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
212 | as_ln_s=ln | |
213 | else | |
214 | as_ln_s='cp -p' | |
215 | fi | |
216 | rm -f conf$$ conf$$.exe conf$$.file | |
861bb6c1 | 217 | |
ba479fd2 NN |
218 | if mkdir -p . 2>/dev/null; then |
219 | as_mkdir_p=: | |
220 | else | |
86da66b5 | 221 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
222 | as_mkdir_p=false |
223 | fi | |
224 | ||
225 | as_executable_p="test -f" | |
226 | ||
227 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 228 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
229 | |
230 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 231 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
232 | |
233 | ||
234 | # IFS | |
235 | # We need space, tab and new line, in precisely that order. | |
236 | as_nl=' | |
237 | ' | |
238 | IFS=" $as_nl" | |
239 | ||
240 | # CDPATH. | |
241 | $as_unset CDPATH | |
242 | ||
243 | ||
244 | # Name of the host. | |
245 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | |
246 | # so uname gets run too. | |
247 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
248 | ||
249 | exec 6>&1 | |
250 | ||
251 | # | |
252 | # Initializations. | |
253 | # | |
861bb6c1 | 254 | ac_default_prefix=/usr/local |
ba479fd2 NN |
255 | ac_config_libobj_dir=. |
256 | cross_compiling=no | |
257 | subdirs= | |
258 | MFLAGS= | |
259 | MAKEFLAGS= | |
260 | SHELL=${CONFIG_SHELL-/bin/sh} | |
261 | ||
262 | # Maximum number of lines to put in a shell here document. | |
263 | # This variable seems obsolete. It should probably be removed, and | |
264 | # only ac_max_sed_lines should be used. | |
265 | : ${ac_max_here_lines=38} | |
266 | ||
267 | # Identity of this package. | |
268 | PACKAGE_NAME= | |
269 | PACKAGE_TARNAME= | |
270 | PACKAGE_VERSION= | |
271 | PACKAGE_STRING= | |
272 | PACKAGE_BUGREPORT= | |
273 | ||
274 | ac_unique_file="tree.c" | |
275 | # Factoring default headers for most tests. | |
276 | ac_includes_default="\ | |
277 | #include <stdio.h> | |
278 | #if HAVE_SYS_TYPES_H | |
279 | # include <sys/types.h> | |
280 | #endif | |
281 | #if HAVE_SYS_STAT_H | |
282 | # include <sys/stat.h> | |
283 | #endif | |
284 | #if STDC_HEADERS | |
285 | # include <stdlib.h> | |
286 | # include <stddef.h> | |
287 | #else | |
288 | # if HAVE_STDLIB_H | |
289 | # include <stdlib.h> | |
290 | # endif | |
291 | #endif | |
292 | #if HAVE_STRING_H | |
293 | # if !STDC_HEADERS && HAVE_MEMORY_H | |
294 | # include <memory.h> | |
295 | # endif | |
296 | # include <string.h> | |
297 | #endif | |
298 | #if HAVE_STRINGS_H | |
299 | # include <strings.h> | |
300 | #endif | |
301 | #if HAVE_INTTYPES_H | |
302 | # include <inttypes.h> | |
303 | #else | |
304 | # if HAVE_STDINT_H | |
305 | # include <stdint.h> | |
306 | # endif | |
307 | #endif | |
308 | #if HAVE_UNISTD_H | |
309 | # include <unistd.h> | |
310 | #endif" | |
311 | ||
d739199a | 312 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump ORIGINAL_OBJDUMP_FOR_TARGET libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' |
ba479fd2 | 313 | ac_subst_files='language_hooks' |
861bb6c1 JL |
314 | |
315 | # Initialize some variables set by options. | |
ba479fd2 NN |
316 | ac_init_help= |
317 | ac_init_version=false | |
861bb6c1 JL |
318 | # The variables have the same names as the options, with |
319 | # dashes changed to underlines. | |
ba479fd2 | 320 | cache_file=/dev/null |
861bb6c1 | 321 | exec_prefix=NONE |
861bb6c1 | 322 | no_create= |
861bb6c1 JL |
323 | no_recursion= |
324 | prefix=NONE | |
325 | program_prefix=NONE | |
326 | program_suffix=NONE | |
327 | program_transform_name=s,x,x, | |
328 | silent= | |
329 | site= | |
330 | srcdir= | |
861bb6c1 JL |
331 | verbose= |
332 | x_includes=NONE | |
333 | x_libraries=NONE | |
ba479fd2 NN |
334 | |
335 | # Installation directory options. | |
336 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
337 | # and all the variables that are supposed to be based on exec_prefix | |
338 | # by default will actually change. | |
339 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
861bb6c1 JL |
340 | bindir='${exec_prefix}/bin' |
341 | sbindir='${exec_prefix}/sbin' | |
342 | libexecdir='${exec_prefix}/libexec' | |
343 | datadir='${prefix}/share' | |
344 | sysconfdir='${prefix}/etc' | |
345 | sharedstatedir='${prefix}/com' | |
346 | localstatedir='${prefix}/var' | |
347 | libdir='${exec_prefix}/lib' | |
348 | includedir='${prefix}/include' | |
349 | oldincludedir='/usr/include' | |
350 | infodir='${prefix}/info' | |
351 | mandir='${prefix}/man' | |
352 | ||
861bb6c1 JL |
353 | ac_prev= |
354 | for ac_option | |
355 | do | |
861bb6c1 JL |
356 | # If the previous option needs an argument, assign it. |
357 | if test -n "$ac_prev"; then | |
358 | eval "$ac_prev=\$ac_option" | |
359 | ac_prev= | |
360 | continue | |
361 | fi | |
362 | ||
ba479fd2 | 363 | ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` |
861bb6c1 JL |
364 | |
365 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
366 | ||
ba479fd2 | 367 | case $ac_option in |
861bb6c1 JL |
368 | |
369 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
370 | ac_prev=bindir ;; | |
371 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
ba479fd2 | 372 | bindir=$ac_optarg ;; |
861bb6c1 JL |
373 | |
374 | -build | --build | --buil | --bui | --bu) | |
ba479fd2 | 375 | ac_prev=build_alias ;; |
861bb6c1 | 376 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
ba479fd2 | 377 | build_alias=$ac_optarg ;; |
861bb6c1 JL |
378 | |
379 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
380 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
381 | ac_prev=cache_file ;; | |
382 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
383 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
ba479fd2 NN |
384 | cache_file=$ac_optarg ;; |
385 | ||
386 | --config-cache | -C) | |
387 | cache_file=config.cache ;; | |
861bb6c1 JL |
388 | |
389 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
390 | ac_prev=datadir ;; | |
391 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
392 | | --da=*) | |
ba479fd2 | 393 | datadir=$ac_optarg ;; |
861bb6c1 JL |
394 | |
395 | -disable-* | --disable-*) | |
ba479fd2 | 396 | ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
861bb6c1 | 397 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
398 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && |
399 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 | |
400 | { (exit 1); exit 1; }; } | |
401 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` | |
402 | eval "enable_$ac_feature=no" ;; | |
861bb6c1 JL |
403 | |
404 | -enable-* | --enable-*) | |
ba479fd2 | 405 | ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
861bb6c1 | 406 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
407 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && |
408 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 | |
409 | { (exit 1); exit 1; }; } | |
410 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` | |
411 | case $ac_option in | |
412 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | |
861bb6c1 JL |
413 | *) ac_optarg=yes ;; |
414 | esac | |
ba479fd2 | 415 | eval "enable_$ac_feature='$ac_optarg'" ;; |
861bb6c1 JL |
416 | |
417 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
418 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
419 | | --exec | --exe | --ex) | |
420 | ac_prev=exec_prefix ;; | |
421 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
422 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
423 | | --exec=* | --exe=* | --ex=*) | |
ba479fd2 | 424 | exec_prefix=$ac_optarg ;; |
861bb6c1 JL |
425 | |
426 | -gas | --gas | --ga | --g) | |
427 | # Obsolete; use --with-gas. | |
428 | with_gas=yes ;; | |
429 | ||
ba479fd2 NN |
430 | -help | --help | --hel | --he | -h) |
431 | ac_init_help=long ;; | |
432 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
433 | ac_init_help=recursive ;; | |
434 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
435 | ac_init_help=short ;; | |
861bb6c1 JL |
436 | |
437 | -host | --host | --hos | --ho) | |
ba479fd2 | 438 | ac_prev=host_alias ;; |
861bb6c1 | 439 | -host=* | --host=* | --hos=* | --ho=*) |
ba479fd2 | 440 | host_alias=$ac_optarg ;; |
861bb6c1 JL |
441 | |
442 | -includedir | --includedir | --includedi | --included | --include \ | |
443 | | --includ | --inclu | --incl | --inc) | |
444 | ac_prev=includedir ;; | |
445 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
446 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
ba479fd2 | 447 | includedir=$ac_optarg ;; |
861bb6c1 JL |
448 | |
449 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
450 | ac_prev=infodir ;; | |
451 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
ba479fd2 | 452 | infodir=$ac_optarg ;; |
861bb6c1 JL |
453 | |
454 | -libdir | --libdir | --libdi | --libd) | |
455 | ac_prev=libdir ;; | |
456 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
ba479fd2 | 457 | libdir=$ac_optarg ;; |
861bb6c1 JL |
458 | |
459 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
460 | | --libexe | --libex | --libe) | |
461 | ac_prev=libexecdir ;; | |
462 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
463 | | --libexe=* | --libex=* | --libe=*) | |
ba479fd2 | 464 | libexecdir=$ac_optarg ;; |
861bb6c1 JL |
465 | |
466 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
467 | | --localstate | --localstat | --localsta | --localst \ | |
468 | | --locals | --local | --loca | --loc | --lo) | |
469 | ac_prev=localstatedir ;; | |
470 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
471 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
472 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
ba479fd2 | 473 | localstatedir=$ac_optarg ;; |
861bb6c1 JL |
474 | |
475 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
476 | ac_prev=mandir ;; | |
477 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
ba479fd2 | 478 | mandir=$ac_optarg ;; |
861bb6c1 JL |
479 | |
480 | -nfp | --nfp | --nf) | |
481 | # Obsolete; use --without-fp. | |
482 | with_fp=no ;; | |
483 | ||
484 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
ba479fd2 | 485 | | --no-cr | --no-c | -n) |
861bb6c1 JL |
486 | no_create=yes ;; |
487 | ||
488 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
489 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
490 | no_recursion=yes ;; | |
491 | ||
492 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
493 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
494 | | --oldin | --oldi | --old | --ol | --o) | |
495 | ac_prev=oldincludedir ;; | |
496 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
497 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
498 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
ba479fd2 | 499 | oldincludedir=$ac_optarg ;; |
861bb6c1 JL |
500 | |
501 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
502 | ac_prev=prefix ;; | |
503 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
ba479fd2 | 504 | prefix=$ac_optarg ;; |
861bb6c1 JL |
505 | |
506 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
507 | | --program-pre | --program-pr | --program-p) | |
508 | ac_prev=program_prefix ;; | |
509 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
510 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
ba479fd2 | 511 | program_prefix=$ac_optarg ;; |
861bb6c1 JL |
512 | |
513 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
514 | | --program-suf | --program-su | --program-s) | |
515 | ac_prev=program_suffix ;; | |
516 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
517 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
ba479fd2 | 518 | program_suffix=$ac_optarg ;; |
861bb6c1 JL |
519 | |
520 | -program-transform-name | --program-transform-name \ | |
521 | | --program-transform-nam | --program-transform-na \ | |
522 | | --program-transform-n | --program-transform- \ | |
523 | | --program-transform | --program-transfor \ | |
524 | | --program-transfo | --program-transf \ | |
525 | | --program-trans | --program-tran \ | |
526 | | --progr-tra | --program-tr | --program-t) | |
527 | ac_prev=program_transform_name ;; | |
528 | -program-transform-name=* | --program-transform-name=* \ | |
529 | | --program-transform-nam=* | --program-transform-na=* \ | |
530 | | --program-transform-n=* | --program-transform-=* \ | |
531 | | --program-transform=* | --program-transfor=* \ | |
532 | | --program-transfo=* | --program-transf=* \ | |
533 | | --program-trans=* | --program-tran=* \ | |
534 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
ba479fd2 | 535 | program_transform_name=$ac_optarg ;; |
861bb6c1 JL |
536 | |
537 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
538 | | -silent | --silent | --silen | --sile | --sil) | |
539 | silent=yes ;; | |
540 | ||
541 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
542 | ac_prev=sbindir ;; | |
543 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
544 | | --sbi=* | --sb=*) | |
ba479fd2 | 545 | sbindir=$ac_optarg ;; |
861bb6c1 JL |
546 | |
547 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
548 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
549 | | --sharedst | --shareds | --shared | --share | --shar \ | |
550 | | --sha | --sh) | |
551 | ac_prev=sharedstatedir ;; | |
552 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
553 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
554 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
555 | | --sha=* | --sh=*) | |
ba479fd2 | 556 | sharedstatedir=$ac_optarg ;; |
861bb6c1 JL |
557 | |
558 | -site | --site | --sit) | |
559 | ac_prev=site ;; | |
560 | -site=* | --site=* | --sit=*) | |
ba479fd2 | 561 | site=$ac_optarg ;; |
861bb6c1 JL |
562 | |
563 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
564 | ac_prev=srcdir ;; | |
565 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
ba479fd2 | 566 | srcdir=$ac_optarg ;; |
861bb6c1 JL |
567 | |
568 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
569 | | --syscon | --sysco | --sysc | --sys | --sy) | |
570 | ac_prev=sysconfdir ;; | |
571 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
572 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
ba479fd2 | 573 | sysconfdir=$ac_optarg ;; |
861bb6c1 JL |
574 | |
575 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
ba479fd2 | 576 | ac_prev=target_alias ;; |
861bb6c1 | 577 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
ba479fd2 | 578 | target_alias=$ac_optarg ;; |
861bb6c1 JL |
579 | |
580 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
581 | verbose=yes ;; | |
582 | ||
ba479fd2 NN |
583 | -version | --version | --versio | --versi | --vers | -V) |
584 | ac_init_version=: ;; | |
861bb6c1 JL |
585 | |
586 | -with-* | --with-*) | |
ba479fd2 | 587 | ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
861bb6c1 | 588 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
589 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && |
590 | { echo "$as_me: error: invalid package name: $ac_package" >&2 | |
591 | { (exit 1); exit 1; }; } | |
861bb6c1 | 592 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
ba479fd2 NN |
593 | case $ac_option in |
594 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | |
861bb6c1 JL |
595 | *) ac_optarg=yes ;; |
596 | esac | |
ba479fd2 | 597 | eval "with_$ac_package='$ac_optarg'" ;; |
861bb6c1 JL |
598 | |
599 | -without-* | --without-*) | |
ba479fd2 | 600 | ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
861bb6c1 | 601 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
602 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && |
603 | { echo "$as_me: error: invalid package name: $ac_package" >&2 | |
604 | { (exit 1); exit 1; }; } | |
605 | ac_package=`echo $ac_package | sed 's/-/_/g'` | |
606 | eval "with_$ac_package=no" ;; | |
861bb6c1 JL |
607 | |
608 | --x) | |
609 | # Obsolete; use --with-x. | |
610 | with_x=yes ;; | |
611 | ||
612 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
613 | | --x-incl | --x-inc | --x-in | --x-i) | |
614 | ac_prev=x_includes ;; | |
615 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
616 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
ba479fd2 | 617 | x_includes=$ac_optarg ;; |
861bb6c1 JL |
618 | |
619 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
620 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
621 | ac_prev=x_libraries ;; | |
622 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
623 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
ba479fd2 | 624 | x_libraries=$ac_optarg ;; |
861bb6c1 | 625 | |
ba479fd2 NN |
626 | -*) { echo "$as_me: error: unrecognized option: $ac_option |
627 | Try \`$0 --help' for more information." >&2 | |
628 | { (exit 1); exit 1; }; } | |
861bb6c1 JL |
629 | ;; |
630 | ||
ba479fd2 NN |
631 | *=*) |
632 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
633 | # Reject names that are not valid shell variable names. | |
634 | expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && | |
635 | { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 | |
636 | { (exit 1); exit 1; }; } | |
637 | ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` | |
638 | eval "$ac_envvar='$ac_optarg'" | |
639 | export $ac_envvar ;; | |
640 | ||
861bb6c1 | 641 | *) |
ba479fd2 NN |
642 | # FIXME: should be removed in autoconf 3.0. |
643 | echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
644 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
645 | echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
646 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} | |
861bb6c1 JL |
647 | ;; |
648 | ||
649 | esac | |
650 | done | |
651 | ||
652 | if test -n "$ac_prev"; then | |
ba479fd2 NN |
653 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
654 | { echo "$as_me: error: missing argument to $ac_option" >&2 | |
655 | { (exit 1); exit 1; }; } | |
63cf211a | 656 | fi |
63cf211a | 657 | |
ba479fd2 NN |
658 | # Be sure to have absolute paths. |
659 | for ac_var in exec_prefix prefix | |
660 | do | |
661 | eval ac_val=$`echo $ac_var` | |
662 | case $ac_val in | |
663 | [\\/$]* | ?:[\\/]* | NONE | '' ) ;; | |
664 | *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | |
665 | { (exit 1); exit 1; }; };; | |
666 | esac | |
667 | done | |
093e61a6 | 668 | |
ba479fd2 NN |
669 | # Be sure to have absolute paths. |
670 | for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ | |
86da66b5 | 671 | localstatedir libdir includedir oldincludedir infodir mandir |
861bb6c1 | 672 | do |
ba479fd2 NN |
673 | eval ac_val=$`echo $ac_var` |
674 | case $ac_val in | |
675 | [\\/$]* | ?:[\\/]* ) ;; | |
676 | *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | |
677 | { (exit 1); exit 1; }; };; | |
861bb6c1 JL |
678 | esac |
679 | done | |
680 | ||
ba479fd2 NN |
681 | # There might be people who depend on the old broken behavior: `$host' |
682 | # used to hold the argument of --host etc. | |
683 | # FIXME: To remove some day. | |
684 | build=$build_alias | |
685 | host=$host_alias | |
686 | target=$target_alias | |
687 | ||
688 | # FIXME: To remove some day. | |
689 | if test "x$host_alias" != x; then | |
690 | if test "x$build_alias" = x; then | |
691 | cross_compiling=maybe | |
692 | echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. | |
693 | If a cross compiler is detected then cross compile mode will be used." >&2 | |
694 | elif test "x$build_alias" != "x$host_alias"; then | |
695 | cross_compiling=yes | |
696 | fi | |
697 | fi | |
6e3f3080 | 698 | |
ba479fd2 NN |
699 | ac_tool_prefix= |
700 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
701 | ||
702 | test "$silent" = yes && exec 6>/dev/null | |
861bb6c1 | 703 | |
861bb6c1 JL |
704 | |
705 | # Find the source files, if location was not specified. | |
706 | if test -z "$srcdir"; then | |
707 | ac_srcdir_defaulted=yes | |
708 | # Try the directory containing this script, then its parent. | |
ba479fd2 NN |
709 | ac_confdir=`(dirname "$0") 2>/dev/null || |
710 | $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
711 | X"$0" : 'X\(//\)[^/]' \| \ |
712 | X"$0" : 'X\(//\)$' \| \ | |
713 | X"$0" : 'X\(/\)' \| \ | |
714 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
715 | echo X"$0" | |
716 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
717 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
718 | /^X\(\/\/\)$/{ s//\1/; q; } | |
719 | /^X\(\/\).*/{ s//\1/; q; } | |
720 | s/.*/./; q'` | |
861bb6c1 JL |
721 | srcdir=$ac_confdir |
722 | if test ! -r $srcdir/$ac_unique_file; then | |
723 | srcdir=.. | |
724 | fi | |
725 | else | |
726 | ac_srcdir_defaulted=no | |
727 | fi | |
728 | if test ! -r $srcdir/$ac_unique_file; then | |
729 | if test "$ac_srcdir_defaulted" = yes; then | |
ba479fd2 NN |
730 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 |
731 | { (exit 1); exit 1; }; } | |
63cf211a | 732 | else |
ba479fd2 NN |
733 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 |
734 | { (exit 1); exit 1; }; } | |
63cf211a NN |
735 | fi |
736 | fi | |
ba479fd2 NN |
737 | (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || |
738 | { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 | |
739 | { (exit 1); exit 1; }; } | |
740 | srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` | |
741 | ac_env_build_alias_set=${build_alias+set} | |
742 | ac_env_build_alias_value=$build_alias | |
743 | ac_cv_env_build_alias_set=${build_alias+set} | |
744 | ac_cv_env_build_alias_value=$build_alias | |
745 | ac_env_host_alias_set=${host_alias+set} | |
746 | ac_env_host_alias_value=$host_alias | |
747 | ac_cv_env_host_alias_set=${host_alias+set} | |
748 | ac_cv_env_host_alias_value=$host_alias | |
749 | ac_env_target_alias_set=${target_alias+set} | |
750 | ac_env_target_alias_value=$target_alias | |
751 | ac_cv_env_target_alias_set=${target_alias+set} | |
752 | ac_cv_env_target_alias_value=$target_alias | |
753 | ac_env_CC_set=${CC+set} | |
754 | ac_env_CC_value=$CC | |
755 | ac_cv_env_CC_set=${CC+set} | |
756 | ac_cv_env_CC_value=$CC | |
757 | ac_env_CFLAGS_set=${CFLAGS+set} | |
758 | ac_env_CFLAGS_value=$CFLAGS | |
759 | ac_cv_env_CFLAGS_set=${CFLAGS+set} | |
760 | ac_cv_env_CFLAGS_value=$CFLAGS | |
761 | ac_env_LDFLAGS_set=${LDFLAGS+set} | |
762 | ac_env_LDFLAGS_value=$LDFLAGS | |
763 | ac_cv_env_LDFLAGS_set=${LDFLAGS+set} | |
764 | ac_cv_env_LDFLAGS_value=$LDFLAGS | |
765 | ac_env_CPPFLAGS_set=${CPPFLAGS+set} | |
766 | ac_env_CPPFLAGS_value=$CPPFLAGS | |
767 | ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} | |
768 | ac_cv_env_CPPFLAGS_value=$CPPFLAGS | |
769 | ac_env_CPP_set=${CPP+set} | |
770 | ac_env_CPP_value=$CPP | |
771 | ac_cv_env_CPP_set=${CPP+set} | |
772 | ac_cv_env_CPP_value=$CPP | |
6de9cd9a DN |
773 | ac_env_GMPLIBS_set=${GMPLIBS+set} |
774 | ac_env_GMPLIBS_value=$GMPLIBS | |
775 | ac_cv_env_GMPLIBS_set=${GMPLIBS+set} | |
776 | ac_cv_env_GMPLIBS_value=$GMPLIBS | |
777 | ac_env_GMPINC_set=${GMPINC+set} | |
778 | ac_env_GMPINC_value=$GMPINC | |
779 | ac_cv_env_GMPINC_set=${GMPINC+set} | |
780 | ac_cv_env_GMPINC_value=$GMPINC | |
63cf211a | 781 | |
ba479fd2 NN |
782 | # |
783 | # Report the --help message. | |
784 | # | |
785 | if test "$ac_init_help" = "long"; then | |
786 | # Omit some internal or obsolete options to make the list less imposing. | |
787 | # This message is too long to be a string in the A/UX 3.1 sh. | |
788 | cat <<_ACEOF | |
789 | \`configure' configures this package to adapt to many kinds of systems. | |
861bb6c1 | 790 | |
ba479fd2 | 791 | Usage: $0 [OPTION]... [VAR=VALUE]... |
861bb6c1 | 792 | |
ba479fd2 NN |
793 | To assign environment variables (e.g., CC, CFLAGS...), specify them as |
794 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
861bb6c1 | 795 | |
ba479fd2 | 796 | Defaults for the options are specified in brackets. |
861bb6c1 | 797 | |
ba479fd2 NN |
798 | Configuration: |
799 | -h, --help display this help and exit | |
800 | --help=short display options specific to this package | |
801 | --help=recursive display the short help of all the included packages | |
802 | -V, --version display version information and exit | |
803 | -q, --quiet, --silent do not print \`checking...' messages | |
804 | --cache-file=FILE cache test results in FILE [disabled] | |
805 | -C, --config-cache alias for \`--cache-file=config.cache' | |
806 | -n, --no-create do not create output files | |
807 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
808 | ||
809 | _ACEOF | |
810 | ||
811 | cat <<_ACEOF | |
812 | Installation directories: | |
813 | --prefix=PREFIX install architecture-independent files in PREFIX | |
86da66b5 | 814 | [$ac_default_prefix] |
ba479fd2 | 815 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
86da66b5 | 816 | [PREFIX] |
861bb6c1 | 817 | |
ba479fd2 NN |
818 | By default, \`make install' will install all the files in |
819 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
820 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
821 | for instance \`--prefix=\$HOME'. | |
13c22933 | 822 | |
ba479fd2 | 823 | For better control, use the options below. |
13c22933 | 824 | |
ba479fd2 NN |
825 | Fine tuning of the installation directories: |
826 | --bindir=DIR user executables [EPREFIX/bin] | |
827 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
828 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
829 | --datadir=DIR read-only architecture-independent data [PREFIX/share] | |
830 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
831 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
832 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
833 | --libdir=DIR object code libraries [EPREFIX/lib] | |
834 | --includedir=DIR C header files [PREFIX/include] | |
835 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
836 | --infodir=DIR info documentation [PREFIX/info] | |
837 | --mandir=DIR man documentation [PREFIX/man] | |
838 | _ACEOF | |
13c22933 | 839 | |
ba479fd2 | 840 | cat <<\_ACEOF |
13c22933 | 841 | |
ba479fd2 NN |
842 | Program names: |
843 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
844 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
845 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
13c22933 | 846 | |
ba479fd2 NN |
847 | System types: |
848 | --build=BUILD configure for building on BUILD [guessed] | |
849 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
850 | --target=TARGET configure for building compilers for TARGET [HOST] | |
851 | _ACEOF | |
13c22933 JJ |
852 | fi |
853 | ||
ba479fd2 | 854 | if test -n "$ac_init_help"; then |
13c22933 | 855 | |
ba479fd2 | 856 | cat <<\_ACEOF |
13c22933 | 857 | |
ba479fd2 NN |
858 | Optional Features: |
859 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
860 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
03787dfd KC |
861 | --enable-generated-files-in-srcdir |
862 | put copies of generated files in source dir | |
863 | intended for creating source tarballs for users | |
864 | without texinfo bison or flex. | |
09a9c095 | 865 | --enable-werror-always enable -Werror always |
ba479fd2 NN |
866 | --enable-werror enable -Werror in bootstrap stage2 and later |
867 | --enable-checking=LIST | |
868 | enable expensive run-time checks. With LIST, | |
869 | enable only specific categories of checks. | |
cdce5c16 NS |
870 | Categories are: yes,no,all,none,release. |
871 | Flags are: assert,fold,gc,gcac,misc, | |
872 | rtlflag,rtl,runtime,tree,valgrind. | |
74ee1642 | 873 | --enable-mapped-location location_t is fileline integer cookie |
ba479fd2 | 874 | --enable-coverage=LEVEL |
fb38008e | 875 | enable compiler's code coverage collection. |
ba479fd2 NN |
876 | Use to measure compiler performance and locate |
877 | unused parts of the compiler. With LEVEL, specify | |
878 | optimization. Values are opt, noopt, | |
879 | default is noopt | |
880 | --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering | |
881 | --enable-multilib enable library support for multiple ABIs | |
882 | --enable-__cxa_atexit enable __cxa_atexit for C++ | |
883 | --enable-threads enable thread usage for target GCC | |
884 | --enable-threads=LIB use LIB thread package for target GCC | |
885 | --enable-objc-gc enable the use of Boehm's garbage collector with | |
886 | the GNU Objective-C runtime | |
887 | --disable-shared don't provide a shared libgcc | |
888 | --enable-intermodule build the compiler in one step | |
f3c9f174 | 889 | --enable-languages=LIST specify which front-ends to build |
dfb77e37 | 890 | --disable-rpath do not hardcode runtime library paths |
ba479fd2 NN |
891 | --enable-initfini-array use .init_array/.fini_array sections |
892 | --enable-sjlj-exceptions | |
893 | arrange to use setjmp/longjmp exception handling | |
7f970b70 | 894 | --enable-secureplt enable -msecure-plt by default for PowerPC |
ba479fd2 NN |
895 | --disable-win32-registry |
896 | disable lookup of installation paths in the | |
897 | Registry on Windows hosts | |
898 | --enable-win32-registry enable registry lookup (default) | |
899 | --enable-win32-registry=KEY | |
900 | use KEY instead of GCC version as the last portion | |
901 | of the registry key | |
902 | --enable-maintainer-mode | |
903 | enable make rules and dependencies not useful | |
904 | (and sometimes confusing) to the casual installer | |
905 | --enable-version-specific-runtime-libs | |
906 | specify that runtime libraries should be | |
907 | installed in a compiler-specific directory | |
093e61a6 | 908 | |
ba479fd2 NN |
909 | Optional Packages: |
910 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
911 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
912 | --with-local-prefix=DIR specifies directory to put local include | |
913 | --with-gxx-include-dir=DIR | |
914 | specifies directory to put g++ header files | |
915 | --with-cpp-install-dir=DIR | |
916 | install the user visible C preprocessor in DIR | |
917 | (relative to PREFIX) as well as PREFIX/bin | |
918 | --with-gnu-ld arrange to work with GNU ld. | |
919 | --with-ld arrange to use the specified ld (full pathname) | |
d594623a | 920 | --with-demangler-in-ld try to use demangler in GNU ld. |
ba479fd2 NN |
921 | --with-gnu-as arrange to work with GNU as |
922 | --with-as arrange to use the specified as (full pathname) | |
923 | --with-stabs arrange to use stabs instead of host debug format | |
924 | --with-dwarf2 force the default debug format to be DWARF 2 | |
160633c6 MM |
925 | --with-build-sysroot=sysroot |
926 | use sysroot as the system root during the build | |
ba479fd2 | 927 | --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR. |
dfb77e37 KC |
928 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
929 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
930 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
443728bb | 931 | --with-system-libunwind use installed libunwind |
59415997 | 932 | --with-gc={page,zone} choose the garbage collection mechanism to use |
ba479fd2 NN |
933 | with the compiler |
934 | --with-system-zlib use installed libz | |
935 | --with-slibdir=DIR shared libraries in DIR LIBDIR | |
13c22933 | 936 | |
ba479fd2 NN |
937 | Some influential environment variables: |
938 | CC C compiler command | |
939 | CFLAGS C compiler flags | |
940 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
941 | nonstandard directory <lib dir> | |
942 | CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have | |
943 | headers in a nonstandard directory <include dir> | |
944 | CPP C preprocessor | |
6de9cd9a DN |
945 | GMPLIBS How to link GMP |
946 | GMPINC How to find GMP include files | |
13c22933 | 947 | |
ba479fd2 NN |
948 | Use these variables to override the choices made by `configure' or to help |
949 | it to find libraries and programs with nonstandard names/locations. | |
73458fb7 | 950 | |
ba479fd2 NN |
951 | _ACEOF |
952 | fi | |
6e3f3080 | 953 | |
ba479fd2 NN |
954 | if test "$ac_init_help" = "recursive"; then |
955 | # If there are subdirs, report their specific --help. | |
956 | ac_popdir=`pwd` | |
957 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
958 | test -d $ac_dir || continue | |
959 | ac_builddir=. | |
960 | ||
961 | if test "$ac_dir" != .; then | |
962 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
963 | # A "../" for each directory in $ac_dir_suffix. | |
964 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
965 | else | |
966 | ac_dir_suffix= ac_top_builddir= | |
967 | fi | |
968 | ||
969 | case $srcdir in | |
970 | .) # No --srcdir option. We are building in place. | |
971 | ac_srcdir=. | |
972 | if test -z "$ac_top_builddir"; then | |
973 | ac_top_srcdir=. | |
974 | else | |
975 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
976 | fi ;; | |
977 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
978 | ac_srcdir=$srcdir$ac_dir_suffix; | |
979 | ac_top_srcdir=$srcdir ;; | |
980 | *) # Relative path. | |
981 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
982 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
983 | esac | |
8ab705be KC |
984 | |
985 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
986 | # the directories may not exist. | |
987 | case `pwd` in | |
988 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 989 | *) |
8ab705be KC |
990 | case "$ac_dir" in |
991 | .) ac_abs_builddir=`pwd`;; | |
992 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
993 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
994 | esac;; |
995 | esac | |
8ab705be | 996 | case $ac_abs_builddir in |
86da66b5 HPN |
997 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
998 | *) | |
999 | case ${ac_top_builddir}. in | |
8ab705be | 1000 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 1001 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 1002 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
1003 | esac;; |
1004 | esac | |
8ab705be | 1005 | case $ac_abs_builddir in |
86da66b5 HPN |
1006 | .) ac_abs_srcdir=$ac_srcdir;; |
1007 | *) | |
1008 | case $ac_srcdir in | |
8ab705be | 1009 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 1010 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 1011 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
1012 | esac;; |
1013 | esac | |
8ab705be | 1014 | case $ac_abs_builddir in |
86da66b5 HPN |
1015 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
1016 | *) | |
1017 | case $ac_top_srcdir in | |
8ab705be | 1018 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 1019 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 1020 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
1021 | esac;; |
1022 | esac | |
ba479fd2 NN |
1023 | |
1024 | cd $ac_dir | |
1025 | # Check for guested configure; otherwise get Cygnus style configure. | |
1026 | if test -f $ac_srcdir/configure.gnu; then | |
1027 | echo | |
1028 | $SHELL $ac_srcdir/configure.gnu --help=recursive | |
1029 | elif test -f $ac_srcdir/configure; then | |
1030 | echo | |
1031 | $SHELL $ac_srcdir/configure --help=recursive | |
1032 | elif test -f $ac_srcdir/configure.ac || | |
86da66b5 | 1033 | test -f $ac_srcdir/configure.in; then |
ba479fd2 NN |
1034 | echo |
1035 | $ac_configure --help | |
1036 | else | |
1037 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
1038 | fi | |
dbad5e72 | 1039 | cd $ac_popdir |
ba479fd2 NN |
1040 | done |
1041 | fi | |
1042 | ||
1043 | test -n "$ac_init_help" && exit 0 | |
1044 | if $ac_init_version; then | |
1045 | cat <<\_ACEOF | |
1046 | ||
86da66b5 | 1047 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
1048 | This configure script is free software; the Free Software Foundation |
1049 | gives unlimited permission to copy, distribute and modify it. | |
1050 | _ACEOF | |
1051 | exit 0 | |
1052 | fi | |
1053 | exec 5>config.log | |
1054 | cat >&5 <<_ACEOF | |
1055 | This file contains any messages produced by compilers while | |
1056 | running configure, to aid debugging if configure makes a mistake. | |
1057 | ||
1058 | It was created by $as_me, which was | |
8ab705be | 1059 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
1060 | |
1061 | $ $0 $@ | |
1062 | ||
1063 | _ACEOF | |
1064 | { | |
1065 | cat <<_ASUNAME | |
1066 | ## --------- ## | |
1067 | ## Platform. ## | |
1068 | ## --------- ## | |
1069 | ||
1070 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
1071 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1072 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1073 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1074 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1075 | ||
1076 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
1077 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
1078 | ||
1079 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
1080 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
1081 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
1082 | hostinfo = `(hostinfo) 2>/dev/null || echo unknown` | |
1083 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
1084 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
1085 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
1086 | ||
1087 | _ASUNAME | |
1088 | ||
1089 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1090 | for as_dir in $PATH | |
1091 | do | |
1092 | IFS=$as_save_IFS | |
1093 | test -z "$as_dir" && as_dir=. | |
1094 | echo "PATH: $as_dir" | |
1095 | done | |
1096 | ||
1097 | } >&5 | |
1098 | ||
1099 | cat >&5 <<_ACEOF | |
1100 | ||
1101 | ||
1102 | ## ----------- ## | |
1103 | ## Core tests. ## | |
1104 | ## ----------- ## | |
1105 | ||
1106 | _ACEOF | |
1107 | ||
1108 | ||
1109 | # Keep a trace of the command line. | |
1110 | # Strip out --no-create and --no-recursion so they do not pile up. | |
1111 | # Strip out --silent because we don't want to record it for future runs. | |
1112 | # Also quote any args containing shell meta-characters. | |
1113 | # Make two passes to allow for proper duplicate-argument suppression. | |
1114 | ac_configure_args= | |
1115 | ac_configure_args0= | |
1116 | ac_configure_args1= | |
1117 | ac_sep= | |
1118 | ac_must_keep_next=false | |
1119 | for ac_pass in 1 2 | |
1120 | do | |
1121 | for ac_arg | |
1122 | do | |
1123 | case $ac_arg in | |
1124 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
1125 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1126 | | -silent | --silent | --silen | --sile | --sil) | |
1127 | continue ;; | |
1128 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1129 | ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1130 | esac | |
1131 | case $ac_pass in | |
1132 | 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; | |
1133 | 2) | |
1134 | ac_configure_args1="$ac_configure_args1 '$ac_arg'" | |
1135 | if test $ac_must_keep_next = true; then | |
86da66b5 | 1136 | ac_must_keep_next=false # Got value, back to normal. |
ba479fd2 | 1137 | else |
86da66b5 HPN |
1138 | case $ac_arg in |
1139 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
1140 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
1141 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
1142 | | -with-* | --with-* | -without-* | --without-* | --x) | |
1143 | case "$ac_configure_args0 " in | |
1144 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
1145 | esac | |
1146 | ;; | |
1147 | -* ) ac_must_keep_next=true ;; | |
1148 | esac | |
ba479fd2 NN |
1149 | fi |
1150 | ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" | |
1151 | # Get rid of the leading space. | |
1152 | ac_sep=" " | |
1153 | ;; | |
1154 | esac | |
1155 | done | |
1156 | done | |
1157 | $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } | |
1158 | $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } | |
1159 | ||
1160 | # When interrupted or exit'd, cleanup temporary files, and complete | |
1161 | # config.log. We remove comments because anyway the quotes in there | |
1162 | # would cause problems or look ugly. | |
1163 | # WARNING: Be sure not to use single quotes in there, as some shells, | |
1164 | # such as our DU 5.0 friend, will then `close' the trap. | |
1165 | trap 'exit_status=$? | |
1166 | # Save into config.log some information that might help in debugging. | |
1167 | { | |
1168 | echo | |
1169 | ||
1170 | cat <<\_ASBOX | |
1171 | ## ---------------- ## | |
1172 | ## Cache variables. ## | |
1173 | ## ---------------- ## | |
1174 | _ASBOX | |
1175 | echo | |
1176 | # The following way of writing the cache mishandles newlines in values, | |
1177 | { | |
1178 | (set) 2>&1 | | |
1179 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in | |
1180 | *ac_space=\ *) | |
1181 | sed -n \ | |
86da66b5 HPN |
1182 | "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; |
1183 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" | |
ba479fd2 NN |
1184 | ;; |
1185 | *) | |
1186 | sed -n \ | |
86da66b5 | 1187 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
ba479fd2 NN |
1188 | ;; |
1189 | esac; | |
1190 | } | |
1191 | echo | |
1192 | ||
1193 | cat <<\_ASBOX | |
1194 | ## ----------------- ## | |
1195 | ## Output variables. ## | |
1196 | ## ----------------- ## | |
1197 | _ASBOX | |
1198 | echo | |
1199 | for ac_var in $ac_subst_vars | |
1200 | do | |
1201 | eval ac_val=$`echo $ac_var` | |
1202 | echo "$ac_var='"'"'$ac_val'"'"'" | |
1203 | done | sort | |
1204 | echo | |
1205 | ||
1206 | if test -n "$ac_subst_files"; then | |
1207 | cat <<\_ASBOX | |
1208 | ## ------------- ## | |
1209 | ## Output files. ## | |
1210 | ## ------------- ## | |
1211 | _ASBOX | |
1212 | echo | |
1213 | for ac_var in $ac_subst_files | |
1214 | do | |
1215 | eval ac_val=$`echo $ac_var` | |
86da66b5 | 1216 | echo "$ac_var='"'"'$ac_val'"'"'" |
ba479fd2 NN |
1217 | done | sort |
1218 | echo | |
1219 | fi | |
1220 | ||
1221 | if test -s confdefs.h; then | |
1222 | cat <<\_ASBOX | |
1223 | ## ----------- ## | |
1224 | ## confdefs.h. ## | |
1225 | ## ----------- ## | |
1226 | _ASBOX | |
1227 | echo | |
1228 | sed "/^$/d" confdefs.h | sort | |
1229 | echo | |
1230 | fi | |
1231 | test "$ac_signal" != 0 && | |
1232 | echo "$as_me: caught signal $ac_signal" | |
1233 | echo "$as_me: exit $exit_status" | |
1234 | } >&5 | |
86da66b5 | 1235 | rm -f core *.core && |
ba479fd2 NN |
1236 | rm -rf conftest* confdefs* conf$$* $ac_clean_files && |
1237 | exit $exit_status | |
1238 | ' 0 | |
1239 | for ac_signal in 1 2 13 15; do | |
1240 | trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal | |
1241 | done | |
1242 | ac_signal=0 | |
1243 | ||
1244 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
1245 | rm -rf conftest* confdefs.h | |
1246 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
1247 | echo >confdefs.h | |
1248 | ||
1249 | # Predefined preprocessor variables. | |
1250 | ||
1251 | cat >>confdefs.h <<_ACEOF | |
1252 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
1253 | _ACEOF | |
1254 | ||
1255 | ||
1256 | cat >>confdefs.h <<_ACEOF | |
1257 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
1258 | _ACEOF | |
1259 | ||
1260 | ||
1261 | cat >>confdefs.h <<_ACEOF | |
1262 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
1263 | _ACEOF | |
1264 | ||
1265 | ||
1266 | cat >>confdefs.h <<_ACEOF | |
1267 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
1268 | _ACEOF | |
1269 | ||
1270 | ||
1271 | cat >>confdefs.h <<_ACEOF | |
1272 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
1273 | _ACEOF | |
1274 | ||
1275 | ||
1276 | # Let the site file select an alternate cache file if it wants to. | |
1277 | # Prefer explicitly selected file to automatically selected ones. | |
1278 | if test -z "$CONFIG_SITE"; then | |
1279 | if test "x$prefix" != xNONE; then | |
1280 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
1281 | else | |
1282 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
1283 | fi | |
1284 | fi | |
1285 | for ac_site_file in $CONFIG_SITE; do | |
1286 | if test -r "$ac_site_file"; then | |
1287 | { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 | |
1288 | echo "$as_me: loading site script $ac_site_file" >&6;} | |
1289 | sed 's/^/| /' "$ac_site_file" >&5 | |
1290 | . "$ac_site_file" | |
1291 | fi | |
1292 | done | |
1293 | ||
1294 | if test -r "$cache_file"; then | |
1295 | # Some versions of bash will fail to source /dev/null (special | |
1296 | # files actually), so we avoid doing that. | |
1297 | if test -f "$cache_file"; then | |
1298 | { echo "$as_me:$LINENO: loading cache $cache_file" >&5 | |
1299 | echo "$as_me: loading cache $cache_file" >&6;} | |
1300 | case $cache_file in | |
1301 | [\\/]* | ?:[\\/]* ) . $cache_file;; | |
1302 | *) . ./$cache_file;; | |
1303 | esac | |
1304 | fi | |
1305 | else | |
1306 | { echo "$as_me:$LINENO: creating cache $cache_file" >&5 | |
1307 | echo "$as_me: creating cache $cache_file" >&6;} | |
1308 | >$cache_file | |
1309 | fi | |
1310 | ||
1311 | # Check that the precious variables saved in the cache have kept the same | |
1312 | # value. | |
1313 | ac_cache_corrupted=false | |
1314 | for ac_var in `(set) 2>&1 | | |
86da66b5 | 1315 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do |
ba479fd2 NN |
1316 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
1317 | eval ac_new_set=\$ac_env_${ac_var}_set | |
1318 | eval ac_old_val="\$ac_cv_env_${ac_var}_value" | |
1319 | eval ac_new_val="\$ac_env_${ac_var}_value" | |
1320 | case $ac_old_set,$ac_new_set in | |
1321 | set,) | |
1322 | { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
1323 | echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
1324 | ac_cache_corrupted=: ;; | |
1325 | ,set) | |
1326 | { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 | |
1327 | echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
1328 | ac_cache_corrupted=: ;; | |
1329 | ,);; | |
1330 | *) | |
1331 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
86da66b5 | 1332 | { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 |
ba479fd2 | 1333 | echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} |
86da66b5 | 1334 | { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 |
ba479fd2 | 1335 | echo "$as_me: former value: $ac_old_val" >&2;} |
86da66b5 | 1336 | { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 |
ba479fd2 | 1337 | echo "$as_me: current value: $ac_new_val" >&2;} |
86da66b5 | 1338 | ac_cache_corrupted=: |
ba479fd2 NN |
1339 | fi;; |
1340 | esac | |
1341 | # Pass precious variables to config.status. | |
1342 | if test "$ac_new_set" = set; then | |
1343 | case $ac_new_val in | |
1344 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1345 | ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1346 | *) ac_arg=$ac_var=$ac_new_val ;; | |
1347 | esac | |
1348 | case " $ac_configure_args " in | |
1349 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
1350 | *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
1351 | esac | |
1352 | fi | |
1353 | done | |
1354 | if $ac_cache_corrupted; then | |
1355 | { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 | |
1356 | echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
1357 | { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 | |
1358 | echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} | |
1359 | { (exit 1); exit 1; }; } | |
1360 | fi | |
1361 | ||
1362 | ac_ext=c | |
1363 | ac_cpp='$CPP $CPPFLAGS' | |
1364 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1365 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1366 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1367 | ||
1368 | ||
1369 | ||
1370 | ||
1371 | ||
1372 | ||
1373 | ||
1374 | ||
1375 | ||
1376 | ||
1377 | ||
1378 | ||
1379 | ||
1380 | ||
1381 | ||
1382 | ||
1383 | ||
1384 | ||
1385 | ||
914c5af7 | 1386 | |
ba479fd2 NN |
1387 | ac_config_headers="$ac_config_headers auto-host.h:config.in" |
1388 | ||
1389 | ||
9f18db39 PB |
1390 | gcc_version=`cat $srcdir/BASE-VER` |
1391 | ||
ba479fd2 NN |
1392 | # Determine the host, build, and target systems |
1393 | ac_aux_dir= | |
1394 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
1395 | if test -f $ac_dir/install-sh; then | |
1396 | ac_aux_dir=$ac_dir | |
1397 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1398 | break | |
1399 | elif test -f $ac_dir/install.sh; then | |
1400 | ac_aux_dir=$ac_dir | |
1401 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1402 | break | |
1403 | elif test -f $ac_dir/shtool; then | |
1404 | ac_aux_dir=$ac_dir | |
1405 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
1406 | break | |
1407 | fi | |
1408 | done | |
1409 | if test -z "$ac_aux_dir"; then | |
1410 | { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 | |
1411 | echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} | |
1412 | { (exit 1); exit 1; }; } | |
1413 | fi | |
1414 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" | |
1415 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" | |
1416 | ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. | |
1417 | ||
1418 | # Make sure we can run config.sub. | |
1419 | $ac_config_sub sun4 >/dev/null 2>&1 || | |
1420 | { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 | |
1421 | echo "$as_me: error: cannot run $ac_config_sub" >&2;} | |
1422 | { (exit 1); exit 1; }; } | |
1423 | ||
1424 | echo "$as_me:$LINENO: checking build system type" >&5 | |
1425 | echo $ECHO_N "checking build system type... $ECHO_C" >&6 | |
1426 | if test "${ac_cv_build+set}" = set; then | |
1427 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1428 | else | |
1429 | ac_cv_build_alias=$build_alias | |
1430 | test -z "$ac_cv_build_alias" && | |
1431 | ac_cv_build_alias=`$ac_config_guess` | |
1432 | test -z "$ac_cv_build_alias" && | |
1433 | { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 | |
1434 | echo "$as_me: error: cannot guess build type; you must specify one" >&2;} | |
1435 | { (exit 1); exit 1; }; } | |
1436 | ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || | |
1437 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 | |
1438 | echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} | |
1439 | { (exit 1); exit 1; }; } | |
1440 | ||
1441 | fi | |
1442 | echo "$as_me:$LINENO: result: $ac_cv_build" >&5 | |
1443 | echo "${ECHO_T}$ac_cv_build" >&6 | |
1444 | build=$ac_cv_build | |
1445 | build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1446 | build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1447 | build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1448 | ||
1449 | ||
1450 | echo "$as_me:$LINENO: checking host system type" >&5 | |
1451 | echo $ECHO_N "checking host system type... $ECHO_C" >&6 | |
1452 | if test "${ac_cv_host+set}" = set; then | |
1453 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1454 | else | |
1455 | ac_cv_host_alias=$host_alias | |
1456 | test -z "$ac_cv_host_alias" && | |
1457 | ac_cv_host_alias=$ac_cv_build_alias | |
1458 | ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || | |
1459 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 | |
1460 | echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} | |
1461 | { (exit 1); exit 1; }; } | |
1462 | ||
1463 | fi | |
1464 | echo "$as_me:$LINENO: result: $ac_cv_host" >&5 | |
1465 | echo "${ECHO_T}$ac_cv_host" >&6 | |
1466 | host=$ac_cv_host | |
1467 | host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1468 | host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1469 | host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1470 | ||
1471 | ||
1472 | echo "$as_me:$LINENO: checking target system type" >&5 | |
1473 | echo $ECHO_N "checking target system type... $ECHO_C" >&6 | |
1474 | if test "${ac_cv_target+set}" = set; then | |
1475 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1476 | else | |
1477 | ac_cv_target_alias=$target_alias | |
1478 | test "x$ac_cv_target_alias" = "x" && | |
1479 | ac_cv_target_alias=$ac_cv_host_alias | |
1480 | ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || | |
1481 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 | |
1482 | echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} | |
1483 | { (exit 1); exit 1; }; } | |
1484 | ||
1485 | fi | |
1486 | echo "$as_me:$LINENO: result: $ac_cv_target" >&5 | |
1487 | echo "${ECHO_T}$ac_cv_target" >&6 | |
1488 | target=$ac_cv_target | |
1489 | target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1490 | target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1491 | target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1492 | ||
1493 | ||
1494 | # The aliases save the names the user supplied, while $host etc. | |
1495 | # will get canonicalized. | |
1496 | test -n "$target_alias" && | |
1497 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1498 | NONENONEs,x,x, && | |
1499 | program_prefix=${target_alias}- | |
1500 | ||
1501 | # Determine the noncanonical target name, for directory use. | |
1502 | case ${build_alias} in | |
1503 | "") build_noncanonical=${build} ;; | |
6e3f3080 NN |
1504 | *) build_noncanonical=${build_alias} ;; |
1505 | esac | |
73458fb7 | 1506 | |
4665e56c NN |
1507 | case ${host_alias} in |
1508 | "") host_noncanonical=${build_noncanonical} ;; | |
1509 | *) host_noncanonical=${host_alias} ;; | |
1510 | esac | |
73458fb7 | 1511 | |
4665e56c NN |
1512 | case ${target_alias} in |
1513 | "") target_noncanonical=${host_noncanonical} ;; | |
1514 | *) target_noncanonical=${target_alias} ;; | |
1515 | esac | |
093e61a6 | 1516 | |
8f1529e6 L |
1517 | |
1518 | ||
1519 | ||
1520 | # Determine the target- and build-specific subdirectories | |
4665e56c NN |
1521 | # Prefix 'build-' so this never conflicts with target_subdir. |
1522 | build_subdir="build-${build_noncanonical}" | |
215c351a PB |
1523 | # --srcdir=. covers the toplevel, while "test -d" covers the subdirectories |
1524 | if ( test $srcdir = . && test -d gcc ) \ | |
1525 | || test -d $srcdir/../host-${host_noncanonical}; then | |
1526 | host_subdir="host-${host_noncanonical}" | |
1527 | else | |
1528 | host_subdir=. | |
1529 | fi | |
4665e56c NN |
1530 | # No prefix. |
1531 | target_subdir=${target_noncanonical} | |
ba479fd2 | 1532 | |
73458fb7 | 1533 | |
093e61a6 | 1534 | # Set program_transform_name |
13c22933 | 1535 | test "$program_prefix" != NONE && |
ba479fd2 | 1536 | program_transform_name="s,^,$program_prefix,;$program_transform_name" |
13c22933 JJ |
1537 | # Use a double $ so make ignores it. |
1538 | test "$program_suffix" != NONE && | |
ba479fd2 NN |
1539 | program_transform_name="s,\$,$program_suffix,;$program_transform_name" |
1540 | # Double any \ or $. echo might interpret backslashes. | |
1541 | # By default was `s,x,x', remove it if useless. | |
1542 | cat <<\_ACEOF >conftest.sed | |
1543 | s/[\\$]/&&/g;s/;s,x,x,$// | |
1544 | _ACEOF | |
1545 | program_transform_name=`echo $program_transform_name | sed -f conftest.sed` | |
1546 | rm conftest.sed | |
13c22933 JJ |
1547 | |
1548 | ||
34a86c2b NN |
1549 | # Check for bogus environment variables. |
1550 | # Test if LIBRARY_PATH contains the notation for the current directory | |
1551 | # since this would lead to problems installing/building glibc. | |
1552 | # LIBRARY_PATH contains the current directory if one of the following | |
1553 | # is true: | |
1554 | # - one of the terminals (":" and ";") is the first or last sign | |
1555 | # - two terminals occur directly after each other | |
1556 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1557 | echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5 |
1558 | echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6 | |
34a86c2b NN |
1559 | case ${LIBRARY_PATH} in |
1560 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1561 | library_path_setting="contains current directory" | |
1562 | ;; | |
1563 | *) | |
1564 | library_path_setting="ok" | |
1565 | ;; | |
1566 | esac | |
ba479fd2 NN |
1567 | echo "$as_me:$LINENO: result: $library_path_setting" >&5 |
1568 | echo "${ECHO_T}$library_path_setting" >&6 | |
34a86c2b | 1569 | if test "$library_path_setting" != "ok"; then |
ba479fd2 | 1570 | { { echo "$as_me:$LINENO: error: |
34a86c2b NN |
1571 | *** LIBRARY_PATH shouldn't contain the current directory when |
1572 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1573 | *** and run configure again." >&5 |
1574 | echo "$as_me: error: | |
1575 | *** LIBRARY_PATH shouldn't contain the current directory when | |
1576 | *** building gcc. Please change the environment variable | |
1577 | *** and run configure again." >&2;} | |
1578 | { (exit 1); exit 1; }; } | |
e9a25f70 JL |
1579 | fi |
1580 | ||
34a86c2b NN |
1581 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
1582 | # since this would lead to problems installing/building glibc. | |
1583 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
1584 | # is true: | |
1585 | # - one of the terminals (":" and ";") is the first or last sign | |
1586 | # - two terminals occur directly after each other | |
1587 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1588 | echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5 |
1589 | echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6 | |
34a86c2b NN |
1590 | case ${GCC_EXEC_PREFIX} in |
1591 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1592 | gcc_exec_prefix_setting="contains current directory" | |
1593 | ;; | |
1594 | *) | |
1595 | gcc_exec_prefix_setting="ok" | |
1596 | ;; | |
1597 | esac | |
ba479fd2 NN |
1598 | echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5 |
1599 | echo "${ECHO_T}$gcc_exec_prefix_setting" >&6 | |
34a86c2b | 1600 | if test "$gcc_exec_prefix_setting" != "ok"; then |
ba479fd2 NN |
1601 | { { echo "$as_me:$LINENO: error: |
1602 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
1603 | *** building gcc. Please change the environment variable | |
1604 | *** and run configure again." >&5 | |
1605 | echo "$as_me: error: | |
cafe096b EC |
1606 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
1607 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1608 | *** and run configure again." >&2;} |
1609 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1610 | fi |
1611 | ||
1612 | # ----------- | |
1613 | # Directories | |
1614 | # ----------- | |
1615 | ||
1616 | # Specify the local prefix | |
1617 | local_prefix= | |
ba479fd2 | 1618 | |
34a86c2b NN |
1619 | # Check whether --with-local-prefix or --without-local-prefix was given. |
1620 | if test "${with_local_prefix+set}" = set; then | |
1621 | withval="$with_local_prefix" | |
1622 | case "${withval}" in | |
ba479fd2 NN |
1623 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5 |
1624 | echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;} | |
1625 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1626 | no) ;; |
1627 | *) local_prefix=$with_local_prefix ;; | |
1628 | esac | |
ba479fd2 | 1629 | fi; |
34a86c2b NN |
1630 | |
1631 | # Default local prefix if it is empty | |
1632 | if test x$local_prefix = x; then | |
1633 | local_prefix=/usr/local | |
1634 | fi | |
1635 | ||
1636 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
1637 | # passed in by the toplevel make and thus we'd get different behavior | |
1638 | # depending on where we built the sources. | |
1639 | gcc_gxx_include_dir= | |
1640 | # Specify the g++ header file directory | |
ba479fd2 | 1641 | |
34a86c2b NN |
1642 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. |
1643 | if test "${with_gxx_include_dir+set}" = set; then | |
1644 | withval="$with_gxx_include_dir" | |
1645 | case "${withval}" in | |
ba479fd2 NN |
1646 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5 |
1647 | echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;} | |
1648 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1649 | no) ;; |
1650 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
1651 | esac | |
ba479fd2 | 1652 | fi; |
34a86c2b NN |
1653 | |
1654 | if test x${gcc_gxx_include_dir} = x; then | |
1655 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
1656 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
1657 | else | |
a1286ef5 | 1658 | libstdcxx_incdir='c++/$(version)' |
34a86c2b NN |
1659 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} |
1660 | fi | |
1661 | fi | |
1662 | ||
ba479fd2 | 1663 | |
34a86c2b NN |
1664 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. |
1665 | if test "${with_cpp_install_dir+set}" = set; then | |
1666 | withval="$with_cpp_install_dir" | |
1667 | if test x$withval = xyes; then | |
ba479fd2 NN |
1668 | { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5 |
1669 | echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;} | |
1670 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1671 | elif test x$withval != xno; then |
1672 | cpp_install_dir=$withval | |
1673 | fi | |
ba479fd2 | 1674 | fi; |
34a86c2b | 1675 | |
51b9ff45 | 1676 | # We would like to our source tree to be readonly. However when releases or |
ba479fd2 | 1677 | # pre-releases are generated, the flex/bison generated files as well as the |
51b9ff45 | 1678 | # various formats of manuals need to be included along with the rest of the |
ba479fd2 | 1679 | # sources. Therefore we have --enable-generated-files-in-srcdir to do |
51b9ff45 KC |
1680 | # just that. |
1681 | ||
03787dfd KC |
1682 | echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5 |
1683 | echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6 | |
1684 | # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given. | |
51b9ff45 KC |
1685 | if test "${enable_generated_files_in_srcdir+set}" = set; then |
1686 | enableval="$enable_generated_files_in_srcdir" | |
03787dfd | 1687 | generated_files_in_srcdir=$enableval |
51b9ff45 | 1688 | else |
03787dfd | 1689 | generated_files_in_srcdir=no |
ba479fd2 | 1690 | fi; |
51b9ff45 | 1691 | |
03787dfd KC |
1692 | echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5 |
1693 | echo "${ECHO_T}$generated_files_in_srcdir" >&6 | |
1694 | ||
1695 | if test "$generated_files_in_srcdir" = "yes"; then | |
1696 | GENINSRC='' | |
03787dfd KC |
1697 | else |
1698 | GENINSRC='#' | |
03787dfd KC |
1699 | fi |
1700 | ||
1701 | ||
34a86c2b NN |
1702 | # ------------------- |
1703 | # Find default linker | |
1704 | # ------------------- | |
1705 | ||
1706 | # With GNU ld | |
ba479fd2 | 1707 | |
34a86c2b NN |
1708 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
1709 | if test "${with_gnu_ld+set}" = set; then | |
1710 | withval="$with_gnu_ld" | |
1711 | gnu_ld_flag="$with_gnu_ld" | |
1712 | else | |
1713 | gnu_ld_flag=no | |
ba479fd2 | 1714 | fi; |
6e3f3080 | 1715 | |
63cf211a | 1716 | # With pre-defined ld |
ba479fd2 | 1717 | |
34a86c2b NN |
1718 | # Check whether --with-ld or --without-ld was given. |
1719 | if test "${with_ld+set}" = set; then | |
1720 | withval="$with_ld" | |
1721 | DEFAULT_LINKER="$with_ld" | |
ba479fd2 | 1722 | fi; |
34a86c2b NN |
1723 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1724 | if test ! -x "$DEFAULT_LINKER"; then | |
99c012a8 BE |
1725 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5 |
1726 | echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;} | |
1727 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1728 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1729 | gnu_ld_flag=yes | |
1730 | fi | |
ba479fd2 NN |
1731 | |
1732 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1733 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
ba479fd2 | 1734 | _ACEOF |
34a86c2b NN |
1735 | |
1736 | fi | |
1737 | ||
ba479fd2 NN |
1738 | echo "$as_me:$LINENO: checking whether a default linker was specified" >&5 |
1739 | echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1740 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1741 | if test x"$gnu_ld_flag" = x"no"; then | |
ba479fd2 NN |
1742 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5 |
1743 | echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6 | |
34a86c2b | 1744 | else |
ba479fd2 NN |
1745 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5 |
1746 | echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6 | |
34a86c2b NN |
1747 | fi |
1748 | else | |
ba479fd2 NN |
1749 | echo "$as_me:$LINENO: result: no" >&5 |
1750 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1751 | fi |
1752 | ||
d594623a L |
1753 | # With demangler in GNU ld |
1754 | ||
1755 | # Check whether --with-demangler-in-ld or --without-demangler-in-ld was given. | |
1756 | if test "${with_demangler_in_ld+set}" = set; then | |
1757 | withval="$with_demangler_in_ld" | |
1758 | demangler_in_ld="$with_demangler_in_ld" | |
1759 | else | |
1760 | demangler_in_ld=no | |
1761 | fi; | |
1762 | ||
34a86c2b NN |
1763 | # ---------------------- |
1764 | # Find default assembler | |
1765 | # ---------------------- | |
1766 | ||
1767 | # With GNU as | |
ba479fd2 | 1768 | |
34a86c2b NN |
1769 | # Check whether --with-gnu-as or --without-gnu-as was given. |
1770 | if test "${with_gnu_as+set}" = set; then | |
1771 | withval="$with_gnu_as" | |
1772 | gas_flag="$with_gnu_as" | |
1773 | else | |
1774 | gas_flag=no | |
ba479fd2 | 1775 | fi; |
34a86c2b NN |
1776 | |
1777 | ||
1778 | # Check whether --with-as or --without-as was given. | |
1779 | if test "${with_as+set}" = set; then | |
1780 | withval="$with_as" | |
1781 | DEFAULT_ASSEMBLER="$with_as" | |
ba479fd2 | 1782 | fi; |
34a86c2b NN |
1783 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1784 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
99c012a8 BE |
1785 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5 |
1786 | echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;} | |
1787 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1788 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1789 | gas_flag=yes | |
1790 | fi | |
ba479fd2 NN |
1791 | |
1792 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1793 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
ba479fd2 | 1794 | _ACEOF |
34a86c2b NN |
1795 | |
1796 | fi | |
1797 | ||
ba479fd2 NN |
1798 | echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5 |
1799 | echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1800 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1801 | if test x"$gas_flag" = x"no"; then | |
ba479fd2 NN |
1802 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5 |
1803 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6 | |
34a86c2b | 1804 | else |
ba479fd2 NN |
1805 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 |
1806 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6 | |
34a86c2b NN |
1807 | fi |
1808 | else | |
ba479fd2 NN |
1809 | echo "$as_me:$LINENO: result: no" >&5 |
1810 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1811 | fi |
1812 | ||
1813 | # --------------- | |
1814 | # Find C compiler | |
1815 | # --------------- | |
1816 | ||
426ca3ca RO |
1817 | # If a non-executable a.out is present (e.g. created by GNU as above even if |
1818 | # invoked with -v only), the IRIX 6 native ld just overwrites the existing | |
1819 | # file, even when creating an executable, so an execution test fails. | |
1820 | # Remove possible default executable files to avoid this. | |
1821 | # | |
1822 | # FIXME: This really belongs into AC_PROG_CC and can be removed once | |
1823 | # Autoconf includes it. | |
1824 | rm -f a.out a.exe b.out | |
1825 | ||
34a86c2b | 1826 | # Find the native compiler |
ba479fd2 NN |
1827 | ac_ext=c |
1828 | ac_cpp='$CPP $CPPFLAGS' | |
1829 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1830 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1831 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1832 | if test -n "$ac_tool_prefix"; then | |
1833 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
1834 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
1835 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1836 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1837 | if test "${ac_cv_prog_CC+set}" = set; then | |
1838 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1839 | else | |
1840 | if test -n "$CC"; then | |
1841 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1842 | else | |
1843 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1844 | for as_dir in $PATH | |
1845 | do | |
1846 | IFS=$as_save_IFS | |
1847 | test -z "$as_dir" && as_dir=. | |
1848 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1849 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1850 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
1851 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1852 | break 2 | |
1853 | fi | |
1854 | done | |
1855 | done | |
1856 | ||
1857 | fi | |
1858 | fi | |
1859 | CC=$ac_cv_prog_CC | |
1860 | if test -n "$CC"; then | |
1861 | echo "$as_me:$LINENO: result: $CC" >&5 | |
1862 | echo "${ECHO_T}$CC" >&6 | |
1863 | else | |
1864 | echo "$as_me:$LINENO: result: no" >&5 | |
1865 | echo "${ECHO_T}no" >&6 | |
1866 | fi | |
1867 | ||
1868 | fi | |
1869 | if test -z "$ac_cv_prog_CC"; then | |
1870 | ac_ct_CC=$CC | |
1871 | # Extract the first word of "gcc", so it can be a program name with args. | |
6e3f3080 | 1872 | set dummy gcc; ac_word=$2 |
ba479fd2 NN |
1873 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1874 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1875 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1876 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1877 | else | |
1878 | if test -n "$ac_ct_CC"; then | |
1879 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1880 | else | |
1881 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1882 | for as_dir in $PATH | |
1883 | do | |
1884 | IFS=$as_save_IFS | |
1885 | test -z "$as_dir" && as_dir=. | |
1886 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1887 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1888 | ac_cv_prog_ac_ct_CC="gcc" | |
1889 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1890 | break 2 | |
1891 | fi | |
1892 | done | |
1893 | done | |
1894 | ||
1895 | fi | |
1896 | fi | |
1897 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1898 | if test -n "$ac_ct_CC"; then | |
1899 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1900 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1901 | else | |
1902 | echo "$as_me:$LINENO: result: no" >&5 | |
1903 | echo "${ECHO_T}no" >&6 | |
1904 | fi | |
1905 | ||
1906 | CC=$ac_ct_CC | |
1907 | else | |
1908 | CC="$ac_cv_prog_CC" | |
1909 | fi | |
1910 | ||
1911 | if test -z "$CC"; then | |
1912 | if test -n "$ac_tool_prefix"; then | |
1913 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
1914 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
1915 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1916 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1917 | if test "${ac_cv_prog_CC+set}" = set; then | |
1918 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cd9e5e7c MK |
1919 | else |
1920 | if test -n "$CC"; then | |
1921 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1922 | else | |
ba479fd2 NN |
1923 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1924 | for as_dir in $PATH | |
1925 | do | |
1926 | IFS=$as_save_IFS | |
1927 | test -z "$as_dir" && as_dir=. | |
1928 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1929 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1930 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
1931 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1932 | break 2 | |
1933 | fi | |
1934 | done | |
1935 | done | |
1936 | ||
cd9e5e7c MK |
1937 | fi |
1938 | fi | |
ba479fd2 | 1939 | CC=$ac_cv_prog_CC |
cd9e5e7c | 1940 | if test -n "$CC"; then |
ba479fd2 NN |
1941 | echo "$as_me:$LINENO: result: $CC" >&5 |
1942 | echo "${ECHO_T}$CC" >&6 | |
1943 | else | |
1944 | echo "$as_me:$LINENO: result: no" >&5 | |
1945 | echo "${ECHO_T}no" >&6 | |
1946 | fi | |
1947 | ||
1948 | fi | |
1949 | if test -z "$ac_cv_prog_CC"; then | |
1950 | ac_ct_CC=$CC | |
1951 | # Extract the first word of "cc", so it can be a program name with args. | |
1952 | set dummy cc; ac_word=$2 | |
1953 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1954 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1955 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1956 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1957 | else | |
1958 | if test -n "$ac_ct_CC"; then | |
1959 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1960 | else | |
1961 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1962 | for as_dir in $PATH | |
1963 | do | |
1964 | IFS=$as_save_IFS | |
1965 | test -z "$as_dir" && as_dir=. | |
1966 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1967 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1968 | ac_cv_prog_ac_ct_CC="cc" | |
1969 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1970 | break 2 | |
1971 | fi | |
1972 | done | |
1973 | done | |
1974 | ||
1975 | fi | |
1976 | fi | |
1977 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1978 | if test -n "$ac_ct_CC"; then | |
1979 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1980 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1981 | else | |
1982 | echo "$as_me:$LINENO: result: no" >&5 | |
1983 | echo "${ECHO_T}no" >&6 | |
1984 | fi | |
1985 | ||
1986 | CC=$ac_ct_CC | |
cd9e5e7c | 1987 | else |
ba479fd2 | 1988 | CC="$ac_cv_prog_CC" |
e9a25f70 | 1989 | fi |
6e3f3080 | 1990 | |
ba479fd2 | 1991 | fi |
6e3f3080 NN |
1992 | if test -z "$CC"; then |
1993 | # Extract the first word of "cc", so it can be a program name with args. | |
1994 | set dummy cc; ac_word=$2 | |
ba479fd2 NN |
1995 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1996 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1997 | if test "${ac_cv_prog_CC+set}" = set; then | |
1998 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6e3f3080 NN |
1999 | else |
2000 | if test -n "$CC"; then | |
2001 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2002 | else | |
2003 | ac_prog_rejected=no | |
ba479fd2 NN |
2004 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2005 | for as_dir in $PATH | |
2006 | do | |
2007 | IFS=$as_save_IFS | |
2008 | test -z "$as_dir" && as_dir=. | |
2009 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2010 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2011 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2012 | ac_prog_rejected=yes | |
2013 | continue | |
2014 | fi | |
2015 | ac_cv_prog_CC="cc" | |
2016 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2017 | break 2 | |
2018 | fi | |
2019 | done | |
2020 | done | |
2021 | ||
6e3f3080 NN |
2022 | if test $ac_prog_rejected = yes; then |
2023 | # We found a bogon in the path, so make sure we never use it. | |
2024 | set dummy $ac_cv_prog_CC | |
2025 | shift | |
ba479fd2 | 2026 | if test $# != 0; then |
6e3f3080 NN |
2027 | # We chose a different compiler from the bogus one. |
2028 | # However, it has the same basename, so the bogon will be chosen | |
2029 | # first if we set CC to just the basename; use the full file name. | |
2030 | shift | |
ba479fd2 | 2031 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
e9a25f70 | 2032 | fi |
6e3f3080 NN |
2033 | fi |
2034 | fi | |
2035 | fi | |
ba479fd2 | 2036 | CC=$ac_cv_prog_CC |
6e3f3080 | 2037 | if test -n "$CC"; then |
ba479fd2 NN |
2038 | echo "$as_me:$LINENO: result: $CC" >&5 |
2039 | echo "${ECHO_T}$CC" >&6 | |
e9a25f70 | 2040 | else |
ba479fd2 NN |
2041 | echo "$as_me:$LINENO: result: no" >&5 |
2042 | echo "${ECHO_T}no" >&6 | |
e9a25f70 | 2043 | fi |
6e3f3080 | 2044 | |
ba479fd2 NN |
2045 | fi |
2046 | if test -z "$CC"; then | |
2047 | if test -n "$ac_tool_prefix"; then | |
2048 | for ac_prog in cl | |
2049 | do | |
2050 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2051 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
2052 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2053 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2054 | if test "${ac_cv_prog_CC+set}" = set; then | |
2055 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
093e61a6 | 2056 | else |
6e3f3080 NN |
2057 | if test -n "$CC"; then |
2058 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2059 | else | |
ba479fd2 NN |
2060 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2061 | for as_dir in $PATH | |
2062 | do | |
2063 | IFS=$as_save_IFS | |
2064 | test -z "$as_dir" && as_dir=. | |
2065 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2066 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2067 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
2068 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2069 | break 2 | |
2070 | fi | |
2071 | done | |
2072 | done | |
2073 | ||
093e61a6 | 2074 | fi |
6e3f3080 | 2075 | fi |
ba479fd2 | 2076 | CC=$ac_cv_prog_CC |
6e3f3080 | 2077 | if test -n "$CC"; then |
ba479fd2 NN |
2078 | echo "$as_me:$LINENO: result: $CC" >&5 |
2079 | echo "${ECHO_T}$CC" >&6 | |
6e3f3080 | 2080 | else |
ba479fd2 NN |
2081 | echo "$as_me:$LINENO: result: no" >&5 |
2082 | echo "${ECHO_T}no" >&6 | |
093e61a6 | 2083 | fi |
cafe096b | 2084 | |
ba479fd2 NN |
2085 | test -n "$CC" && break |
2086 | done | |
2087 | fi | |
2088 | if test -z "$CC"; then | |
2089 | ac_ct_CC=$CC | |
2090 | for ac_prog in cl | |
2091 | do | |
2092 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2093 | set dummy $ac_prog; ac_word=$2 | |
2094 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2095 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2096 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
2097 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2098 | else | |
2099 | if test -n "$ac_ct_CC"; then | |
2100 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2101 | else | |
2102 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2103 | for as_dir in $PATH | |
2104 | do | |
2105 | IFS=$as_save_IFS | |
2106 | test -z "$as_dir" && as_dir=. | |
2107 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2108 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2109 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
2110 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2111 | break 2 | |
2112 | fi | |
2113 | done | |
2114 | done | |
6e3f3080 | 2115 | |
ba479fd2 NN |
2116 | fi |
2117 | fi | |
2118 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2119 | if test -n "$ac_ct_CC"; then | |
2120 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
2121 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
2122 | else | |
2123 | echo "$as_me:$LINENO: result: no" >&5 | |
2124 | echo "${ECHO_T}no" >&6 | |
2125 | fi | |
6e3f3080 | 2126 | |
ba479fd2 NN |
2127 | test -n "$ac_ct_CC" && break |
2128 | done | |
63cf211a | 2129 | |
ba479fd2 NN |
2130 | CC=$ac_ct_CC |
2131 | fi | |
2132 | ||
2133 | fi | |
2134 | ||
2135 | ||
2136 | test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH | |
2137 | See \`config.log' for more details." >&5 | |
2138 | echo "$as_me: error: no acceptable C compiler found in \$PATH | |
2139 | See \`config.log' for more details." >&2;} | |
2140 | { (exit 1); exit 1; }; } | |
2141 | ||
2142 | # Provide some information about the compiler. | |
2143 | echo "$as_me:$LINENO:" \ | |
2144 | "checking for C compiler version" >&5 | |
2145 | ac_compiler=`set X $ac_compile; echo $2` | |
2146 | { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 | |
2147 | (eval $ac_compiler --version </dev/null >&5) 2>&5 | |
2148 | ac_status=$? | |
2149 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2150 | (exit $ac_status); } | |
2151 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 | |
2152 | (eval $ac_compiler -v </dev/null >&5) 2>&5 | |
2153 | ac_status=$? | |
2154 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2155 | (exit $ac_status); } | |
2156 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 | |
2157 | (eval $ac_compiler -V </dev/null >&5) 2>&5 | |
2158 | ac_status=$? | |
2159 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2160 | (exit $ac_status); } | |
2161 | ||
2162 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2163 | /* confdefs.h. */ |
2164 | _ACEOF | |
2165 | cat confdefs.h >>conftest.$ac_ext | |
2166 | cat >>conftest.$ac_ext <<_ACEOF | |
2167 | /* end confdefs.h. */ | |
2168 | ||
2169 | int | |
2170 | main () | |
2171 | { | |
63cf211a | 2172 | |
ba479fd2 NN |
2173 | ; |
2174 | return 0; | |
2175 | } | |
2176 | _ACEOF | |
2177 | ac_clean_files_save=$ac_clean_files | |
2178 | ac_clean_files="$ac_clean_files a.out a.exe b.out" | |
2179 | # Try to create an executable without -o first, disregard a.out. | |
2180 | # It will help us diagnose broken compilers, and finding out an intuition | |
2181 | # of exeext. | |
86da66b5 HPN |
2182 | echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 |
2183 | echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 | |
ba479fd2 NN |
2184 | ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
2185 | if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 | |
2186 | (eval $ac_link_default) 2>&5 | |
2187 | ac_status=$? | |
2188 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2189 | (exit $ac_status); }; then | |
2190 | # Find the output, starting from the most likely. This scheme is | |
2191 | # not robust to junk in `.', hence go to wildcards (a.*) only as a last | |
2192 | # resort. | |
2193 | ||
2194 | # Be careful to initialize this variable, since it used to be cached. | |
2195 | # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. | |
2196 | ac_cv_exeext= | |
2197 | # b.out is created by i960 compilers. | |
2198 | for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out | |
2199 | do | |
2200 | test -f "$ac_file" || continue | |
2201 | case $ac_file in | |
2202 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) | |
86da66b5 | 2203 | ;; |
ba479fd2 | 2204 | conftest.$ac_ext ) |
86da66b5 HPN |
2205 | # This is the source file. |
2206 | ;; | |
ba479fd2 | 2207 | [ab].out ) |
86da66b5 HPN |
2208 | # We found the default executable, but exeext='' is most |
2209 | # certainly right. | |
2210 | break;; | |
ba479fd2 | 2211 | *.* ) |
86da66b5 HPN |
2212 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
2213 | # FIXME: I believe we export ac_cv_exeext for Libtool, | |
2214 | # but it would be cool to find out if it's true. Does anybody | |
2215 | # maintain Libtool? --akim. | |
2216 | export ac_cv_exeext | |
2217 | break;; | |
ba479fd2 | 2218 | * ) |
86da66b5 | 2219 | break;; |
ba479fd2 NN |
2220 | esac |
2221 | done | |
2222 | else | |
2223 | echo "$as_me: failed program was:" >&5 | |
2224 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2225 | ||
2226 | { { echo "$as_me:$LINENO: error: C compiler cannot create executables | |
2227 | See \`config.log' for more details." >&5 | |
2228 | echo "$as_me: error: C compiler cannot create executables | |
2229 | See \`config.log' for more details." >&2;} | |
2230 | { (exit 77); exit 77; }; } | |
2231 | fi | |
2232 | ||
2233 | ac_exeext=$ac_cv_exeext | |
2234 | echo "$as_me:$LINENO: result: $ac_file" >&5 | |
2235 | echo "${ECHO_T}$ac_file" >&6 | |
2236 | ||
2237 | # Check the compiler produces executables we can run. If not, either | |
2238 | # the compiler is broken, or we cross compile. | |
2239 | echo "$as_me:$LINENO: checking whether the C compiler works" >&5 | |
2240 | echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 | |
2241 | # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 | |
2242 | # If not cross compiling, check that we can run a simple program. | |
2243 | if test "$cross_compiling" != yes; then | |
2244 | if { ac_try='./$ac_file' | |
2245 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2246 | (eval $ac_try) 2>&5 | |
2247 | ac_status=$? | |
2248 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2249 | (exit $ac_status); }; }; then | |
2250 | cross_compiling=no | |
6e3f3080 | 2251 | else |
ba479fd2 NN |
2252 | if test "$cross_compiling" = maybe; then |
2253 | cross_compiling=yes | |
2254 | else | |
2255 | { { echo "$as_me:$LINENO: error: cannot run C compiled programs. | |
2256 | If you meant to cross compile, use \`--host'. | |
2257 | See \`config.log' for more details." >&5 | |
2258 | echo "$as_me: error: cannot run C compiled programs. | |
2259 | If you meant to cross compile, use \`--host'. | |
2260 | See \`config.log' for more details." >&2;} | |
2261 | { (exit 1); exit 1; }; } | |
2262 | fi | |
6e3f3080 NN |
2263 | fi |
2264 | fi | |
ba479fd2 NN |
2265 | echo "$as_me:$LINENO: result: yes" >&5 |
2266 | echo "${ECHO_T}yes" >&6 | |
2267 | ||
2268 | rm -f a.out a.exe conftest$ac_cv_exeext b.out | |
2269 | ac_clean_files=$ac_clean_files_save | |
2270 | # Check the compiler produces executables we can run. If not, either | |
2271 | # the compiler is broken, or we cross compile. | |
2272 | echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 | |
2273 | echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 | |
2274 | echo "$as_me:$LINENO: result: $cross_compiling" >&5 | |
2275 | echo "${ECHO_T}$cross_compiling" >&6 | |
2276 | ||
2277 | echo "$as_me:$LINENO: checking for suffix of executables" >&5 | |
2278 | echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 | |
2279 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
2280 | (eval $ac_link) 2>&5 | |
2281 | ac_status=$? | |
2282 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2283 | (exit $ac_status); }; then | |
2284 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
2285 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
2286 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
2287 | # `rm'. | |
2288 | for ac_file in conftest.exe conftest conftest.*; do | |
2289 | test -f "$ac_file" || continue | |
2290 | case $ac_file in | |
2291 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; | |
2292 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
86da66b5 HPN |
2293 | export ac_cv_exeext |
2294 | break;; | |
ba479fd2 NN |
2295 | * ) break;; |
2296 | esac | |
2297 | done | |
e9a25f70 | 2298 | else |
ba479fd2 NN |
2299 | { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link |
2300 | See \`config.log' for more details." >&5 | |
2301 | echo "$as_me: error: cannot compute suffix of executables: cannot compile and link | |
2302 | See \`config.log' for more details." >&2;} | |
2303 | { (exit 1); exit 1; }; } | |
2304 | fi | |
2305 | ||
2306 | rm -f conftest$ac_cv_exeext | |
2307 | echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 | |
2308 | echo "${ECHO_T}$ac_cv_exeext" >&6 | |
2309 | ||
2310 | rm -f conftest.$ac_ext | |
2311 | EXEEXT=$ac_cv_exeext | |
2312 | ac_exeext=$EXEEXT | |
2313 | echo "$as_me:$LINENO: checking for suffix of object files" >&5 | |
2314 | echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 | |
2315 | if test "${ac_cv_objext+set}" = set; then | |
2316 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2317 | else | |
2318 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2319 | /* confdefs.h. */ |
2320 | _ACEOF | |
2321 | cat confdefs.h >>conftest.$ac_ext | |
2322 | cat >>conftest.$ac_ext <<_ACEOF | |
2323 | /* end confdefs.h. */ | |
2324 | ||
2325 | int | |
2326 | main () | |
2327 | { | |
6e3f3080 | 2328 | |
ba479fd2 NN |
2329 | ; |
2330 | return 0; | |
2331 | } | |
2332 | _ACEOF | |
2333 | rm -f conftest.o conftest.obj | |
2334 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2335 | (eval $ac_compile) 2>&5 | |
2336 | ac_status=$? | |
2337 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2338 | (exit $ac_status); }; then | |
2339 | for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do | |
2340 | case $ac_file in | |
2341 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; | |
2342 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
2343 | break;; | |
2344 | esac | |
2345 | done | |
63cf211a | 2346 | else |
ba479fd2 NN |
2347 | echo "$as_me: failed program was:" >&5 |
2348 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2349 | ||
2350 | { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile | |
2351 | See \`config.log' for more details." >&5 | |
2352 | echo "$as_me: error: cannot compute suffix of object files: cannot compile | |
2353 | See \`config.log' for more details." >&2;} | |
2354 | { (exit 1); exit 1; }; } | |
2355 | fi | |
2356 | ||
2357 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
2358 | fi | |
2359 | echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 | |
2360 | echo "${ECHO_T}$ac_cv_objext" >&6 | |
2361 | OBJEXT=$ac_cv_objext | |
2362 | ac_objext=$OBJEXT | |
2363 | echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 | |
2364 | echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 | |
2365 | if test "${ac_cv_c_compiler_gnu+set}" = set; then | |
2366 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2367 | else | |
2368 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2369 | /* confdefs.h. */ |
2370 | _ACEOF | |
2371 | cat confdefs.h >>conftest.$ac_ext | |
2372 | cat >>conftest.$ac_ext <<_ACEOF | |
2373 | /* end confdefs.h. */ | |
2374 | ||
2375 | int | |
2376 | main () | |
2377 | { | |
2378 | #ifndef __GNUC__ | |
2379 | choke me | |
2380 | #endif | |
6e3f3080 | 2381 | |
ba479fd2 NN |
2382 | ; |
2383 | return 0; | |
2384 | } | |
2385 | _ACEOF | |
2386 | rm -f conftest.$ac_objext | |
2387 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2388 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2389 | ac_status=$? |
86da66b5 HPN |
2390 | grep -v '^ *+' conftest.er1 >conftest.err |
2391 | rm -f conftest.er1 | |
2392 | cat conftest.err >&5 | |
ba479fd2 NN |
2393 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2394 | (exit $ac_status); } && | |
dbad5e72 SE |
2395 | { ac_try='test -z "$ac_c_werror_flag" |
2396 | || test ! -s conftest.err' | |
86da66b5 HPN |
2397 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2398 | (eval $ac_try) 2>&5 | |
2399 | ac_status=$? | |
2400 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2401 | (exit $ac_status); }; } && | |
2402 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2403 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2404 | (eval $ac_try) 2>&5 | |
2405 | ac_status=$? | |
2406 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2407 | (exit $ac_status); }; }; then | |
2408 | ac_compiler_gnu=yes | |
2409 | else | |
2410 | echo "$as_me: failed program was:" >&5 | |
2411 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2412 | ||
2413 | ac_compiler_gnu=no | |
2414 | fi | |
86da66b5 | 2415 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2416 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
2417 | ||
2418 | fi | |
2419 | echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 | |
2420 | echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 | |
2421 | GCC=`test $ac_compiler_gnu = yes && echo yes` | |
2422 | ac_test_CFLAGS=${CFLAGS+set} | |
2423 | ac_save_CFLAGS=$CFLAGS | |
2424 | CFLAGS="-g" | |
2425 | echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 | |
2426 | echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 | |
2427 | if test "${ac_cv_prog_cc_g+set}" = set; then | |
2428 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2429 | else | |
2430 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2431 | /* confdefs.h. */ |
2432 | _ACEOF | |
2433 | cat confdefs.h >>conftest.$ac_ext | |
2434 | cat >>conftest.$ac_ext <<_ACEOF | |
2435 | /* end confdefs.h. */ | |
2436 | ||
2437 | int | |
2438 | main () | |
2439 | { | |
2440 | ||
2441 | ; | |
2442 | return 0; | |
2443 | } | |
2444 | _ACEOF | |
2445 | rm -f conftest.$ac_objext | |
2446 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2447 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2448 | ac_status=$? |
86da66b5 HPN |
2449 | grep -v '^ *+' conftest.er1 >conftest.err |
2450 | rm -f conftest.er1 | |
2451 | cat conftest.err >&5 | |
ba479fd2 NN |
2452 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2453 | (exit $ac_status); } && | |
dbad5e72 SE |
2454 | { ac_try='test -z "$ac_c_werror_flag" |
2455 | || test ! -s conftest.err' | |
86da66b5 HPN |
2456 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2457 | (eval $ac_try) 2>&5 | |
2458 | ac_status=$? | |
2459 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2460 | (exit $ac_status); }; } && | |
2461 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2462 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2463 | (eval $ac_try) 2>&5 | |
2464 | ac_status=$? | |
2465 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2466 | (exit $ac_status); }; }; then | |
6e3f3080 NN |
2467 | ac_cv_prog_cc_g=yes |
2468 | else | |
ba479fd2 NN |
2469 | echo "$as_me: failed program was:" >&5 |
2470 | sed 's/^/| /' conftest.$ac_ext >&5 | |
63cf211a | 2471 | |
ba479fd2 | 2472 | ac_cv_prog_cc_g=no |
6e3f3080 | 2473 | fi |
86da66b5 | 2474 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2475 | fi |
2476 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 | |
2477 | echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 | |
cd9e5e7c | 2478 | if test "$ac_test_CFLAGS" = set; then |
ba479fd2 | 2479 | CFLAGS=$ac_save_CFLAGS |
cd9e5e7c MK |
2480 | elif test $ac_cv_prog_cc_g = yes; then |
2481 | if test "$GCC" = yes; then | |
e9a25f70 JL |
2482 | CFLAGS="-g -O2" |
2483 | else | |
cd9e5e7c | 2484 | CFLAGS="-g" |
81814e35 | 2485 | fi |
3723cad9 | 2486 | else |
cd9e5e7c MK |
2487 | if test "$GCC" = yes; then |
2488 | CFLAGS="-O2" | |
2489 | else | |
2490 | CFLAGS= | |
2491 | fi | |
e9a25f70 | 2492 | fi |
ba479fd2 NN |
2493 | echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 |
2494 | echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 | |
2495 | if test "${ac_cv_prog_cc_stdc+set}" = set; then | |
2496 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2497 | else | |
2498 | ac_cv_prog_cc_stdc=no | |
2499 | ac_save_CC=$CC | |
2500 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2501 | /* confdefs.h. */ |
2502 | _ACEOF | |
2503 | cat confdefs.h >>conftest.$ac_ext | |
2504 | cat >>conftest.$ac_ext <<_ACEOF | |
2505 | /* end confdefs.h. */ | |
2506 | #include <stdarg.h> | |
2507 | #include <stdio.h> | |
2508 | #include <sys/types.h> | |
2509 | #include <sys/stat.h> | |
2510 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
2511 | struct buf { int x; }; | |
2512 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
2513 | static char *e (p, i) | |
2514 | char **p; | |
2515 | int i; | |
2516 | { | |
2517 | return p[i]; | |
2518 | } | |
2519 | static char *f (char * (*g) (char **, int), char **p, ...) | |
2520 | { | |
2521 | char *s; | |
2522 | va_list v; | |
2523 | va_start (v,p); | |
2524 | s = g (p, va_arg (v,int)); | |
2525 | va_end (v); | |
2526 | return s; | |
2527 | } | |
86da66b5 HPN |
2528 | |
2529 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
2530 | function prototypes and stuff, but not '\xHH' hex character constants. | |
2531 | These don't provoke an error unfortunately, instead are silently treated | |
2532 | as 'x'. The following induces an error, until -std1 is added to get | |
2533 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
2534 | array size at least. It's necessary to write '\x00'==0 to get something | |
2535 | that's true only with -std1. */ | |
2536 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
2537 | ||
ba479fd2 NN |
2538 | int test (int i, double x); |
2539 | struct s1 {int (*f) (int a);}; | |
2540 | struct s2 {int (*f) (double a);}; | |
2541 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
2542 | int argc; | |
2543 | char **argv; | |
2544 | int | |
2545 | main () | |
2546 | { | |
2547 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
2548 | ; | |
2549 | return 0; | |
2550 | } | |
2551 | _ACEOF | |
2552 | # Don't try gcc -ansi; that turns off useful extensions and | |
2553 | # breaks some systems' header files. | |
2554 | # AIX -qlanglvl=ansi | |
2555 | # Ultrix and OSF/1 -std1 | |
2556 | # HP-UX 10.20 and later -Ae | |
2557 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
2558 | # SVR4 -Xc -D__EXTENSIONS__ | |
2559 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
2560 | do | |
2561 | CC="$ac_save_CC $ac_arg" | |
2562 | rm -f conftest.$ac_objext | |
2563 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2564 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2565 | ac_status=$? |
86da66b5 HPN |
2566 | grep -v '^ *+' conftest.er1 >conftest.err |
2567 | rm -f conftest.er1 | |
2568 | cat conftest.err >&5 | |
ba479fd2 NN |
2569 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2570 | (exit $ac_status); } && | |
dbad5e72 SE |
2571 | { ac_try='test -z "$ac_c_werror_flag" |
2572 | || test ! -s conftest.err' | |
86da66b5 HPN |
2573 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2574 | (eval $ac_try) 2>&5 | |
2575 | ac_status=$? | |
2576 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2577 | (exit $ac_status); }; } && | |
2578 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2579 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2580 | (eval $ac_try) 2>&5 | |
2581 | ac_status=$? | |
2582 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2583 | (exit $ac_status); }; }; then | |
2584 | ac_cv_prog_cc_stdc=$ac_arg | |
2585 | break | |
2586 | else | |
2587 | echo "$as_me: failed program was:" >&5 | |
2588 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 2589 | |
ba479fd2 | 2590 | fi |
86da66b5 | 2591 | rm -f conftest.err conftest.$ac_objext |
ba479fd2 NN |
2592 | done |
2593 | rm -f conftest.$ac_ext conftest.$ac_objext | |
2594 | CC=$ac_save_CC | |
2595 | ||
2596 | fi | |
2597 | ||
2598 | case "x$ac_cv_prog_cc_stdc" in | |
2599 | x|xno) | |
2600 | echo "$as_me:$LINENO: result: none needed" >&5 | |
2601 | echo "${ECHO_T}none needed" >&6 ;; | |
2602 | *) | |
2603 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 | |
2604 | echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 | |
2605 | CC="$CC $ac_cv_prog_cc_stdc" ;; | |
2606 | esac | |
2607 | ||
2608 | # Some people use a C++ compiler to compile C. Since we use `exit', | |
2609 | # in C++ we need to declare it. In case someone uses the same compiler | |
2610 | # for both compiling C and C++ we need to have the C++ compiler decide | |
2611 | # the declaration of exit, since it's the most demanding environment. | |
2612 | cat >conftest.$ac_ext <<_ACEOF | |
2613 | #ifndef __cplusplus | |
2614 | choke me | |
2615 | #endif | |
2616 | _ACEOF | |
2617 | rm -f conftest.$ac_objext | |
2618 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2619 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2620 | ac_status=$? |
86da66b5 HPN |
2621 | grep -v '^ *+' conftest.er1 >conftest.err |
2622 | rm -f conftest.er1 | |
2623 | cat conftest.err >&5 | |
ba479fd2 NN |
2624 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2625 | (exit $ac_status); } && | |
dbad5e72 SE |
2626 | { ac_try='test -z "$ac_c_werror_flag" |
2627 | || test ! -s conftest.err' | |
86da66b5 HPN |
2628 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2629 | (eval $ac_try) 2>&5 | |
2630 | ac_status=$? | |
2631 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2632 | (exit $ac_status); }; } && | |
2633 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2634 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2635 | (eval $ac_try) 2>&5 | |
2636 | ac_status=$? | |
2637 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2638 | (exit $ac_status); }; }; then | |
2639 | for ac_declaration in \ | |
86da66b5 | 2640 | '' \ |
ba479fd2 NN |
2641 | 'extern "C" void std::exit (int) throw (); using std::exit;' \ |
2642 | 'extern "C" void std::exit (int); using std::exit;' \ | |
2643 | 'extern "C" void exit (int) throw ();' \ | |
2644 | 'extern "C" void exit (int);' \ | |
2645 | 'void exit (int);' | |
2646 | do | |
2647 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2648 | /* confdefs.h. */ |
2649 | _ACEOF | |
2650 | cat confdefs.h >>conftest.$ac_ext | |
2651 | cat >>conftest.$ac_ext <<_ACEOF | |
2652 | /* end confdefs.h. */ | |
33e70558 | 2653 | $ac_declaration |
86da66b5 | 2654 | #include <stdlib.h> |
ba479fd2 NN |
2655 | int |
2656 | main () | |
2657 | { | |
2658 | exit (42); | |
2659 | ; | |
2660 | return 0; | |
2661 | } | |
2662 | _ACEOF | |
2663 | rm -f conftest.$ac_objext | |
2664 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2665 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2666 | ac_status=$? |
86da66b5 HPN |
2667 | grep -v '^ *+' conftest.er1 >conftest.err |
2668 | rm -f conftest.er1 | |
2669 | cat conftest.err >&5 | |
ba479fd2 NN |
2670 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2671 | (exit $ac_status); } && | |
dbad5e72 SE |
2672 | { ac_try='test -z "$ac_c_werror_flag" |
2673 | || test ! -s conftest.err' | |
86da66b5 HPN |
2674 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2675 | (eval $ac_try) 2>&5 | |
2676 | ac_status=$? | |
2677 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2678 | (exit $ac_status); }; } && | |
2679 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2680 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2681 | (eval $ac_try) 2>&5 | |
2682 | ac_status=$? | |
2683 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2684 | (exit $ac_status); }; }; then | |
2685 | : | |
2686 | else | |
2687 | echo "$as_me: failed program was:" >&5 | |
2688 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2689 | ||
2690 | continue | |
2691 | fi | |
86da66b5 | 2692 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 | 2693 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
2694 | /* confdefs.h. */ |
2695 | _ACEOF | |
2696 | cat confdefs.h >>conftest.$ac_ext | |
2697 | cat >>conftest.$ac_ext <<_ACEOF | |
2698 | /* end confdefs.h. */ | |
2699 | $ac_declaration | |
2700 | int | |
2701 | main () | |
2702 | { | |
2703 | exit (42); | |
2704 | ; | |
2705 | return 0; | |
2706 | } | |
2707 | _ACEOF | |
2708 | rm -f conftest.$ac_objext | |
2709 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2710 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2711 | ac_status=$? |
86da66b5 HPN |
2712 | grep -v '^ *+' conftest.er1 >conftest.err |
2713 | rm -f conftest.er1 | |
2714 | cat conftest.err >&5 | |
ba479fd2 NN |
2715 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2716 | (exit $ac_status); } && | |
dbad5e72 SE |
2717 | { ac_try='test -z "$ac_c_werror_flag" |
2718 | || test ! -s conftest.err' | |
86da66b5 HPN |
2719 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2720 | (eval $ac_try) 2>&5 | |
2721 | ac_status=$? | |
2722 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2723 | (exit $ac_status); }; } && | |
2724 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2725 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2726 | (eval $ac_try) 2>&5 | |
2727 | ac_status=$? | |
2728 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2729 | (exit $ac_status); }; }; then | |
2730 | break | |
3ec83fc2 | 2731 | else |
ba479fd2 NN |
2732 | echo "$as_me: failed program was:" >&5 |
2733 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2734 | ||
6e3f3080 | 2735 | fi |
86da66b5 | 2736 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2737 | done |
2738 | rm -f conftest* | |
2739 | if test -n "$ac_declaration"; then | |
2740 | echo '#ifdef __cplusplus' >>confdefs.h | |
2741 | echo $ac_declaration >>confdefs.h | |
2742 | echo '#endif' >>confdefs.h | |
2743 | fi | |
2744 | ||
3ec83fc2 | 2745 | else |
ba479fd2 NN |
2746 | echo "$as_me: failed program was:" >&5 |
2747 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2748 | ||
2749 | fi | |
86da66b5 | 2750 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2751 | ac_ext=c |
2752 | ac_cpp='$CPP $CPPFLAGS' | |
2753 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2754 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2755 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2756 | ||
2757 | if test "x$CC" != xcc; then | |
2758 | echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 | |
2759 | echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 | |
2760 | else | |
2761 | echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 | |
2762 | echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 | |
2763 | fi | |
2764 | set dummy $CC; ac_cc=`echo $2 | | |
2765 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2766 | if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then | |
2767 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2768 | else | |
2769 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2770 | /* confdefs.h. */ |
2771 | _ACEOF | |
2772 | cat confdefs.h >>conftest.$ac_ext | |
2773 | cat >>conftest.$ac_ext <<_ACEOF | |
2774 | /* end confdefs.h. */ | |
2775 | ||
2776 | int | |
2777 | main () | |
2778 | { | |
2779 | ||
2780 | ; | |
2781 | return 0; | |
2782 | } | |
2783 | _ACEOF | |
3ec83fc2 RH |
2784 | # Make sure it works both with $CC and with simple cc. |
2785 | # We do the test twice because some compilers refuse to overwrite an | |
2786 | # existing .o file with -o, though they will create one. | |
ba479fd2 NN |
2787 | ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' |
2788 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2789 | (eval $ac_try) 2>&5 | |
2790 | ac_status=$? | |
2791 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2792 | (exit $ac_status); } && | |
2793 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2794 | (eval $ac_try) 2>&5 | |
2795 | ac_status=$? | |
2796 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2797 | (exit $ac_status); }; | |
3ec83fc2 RH |
2798 | then |
2799 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
2800 | if test "x$CC" != xcc; then | |
2801 | # Test first that cc exists at all. | |
ba479fd2 NN |
2802 | if { ac_try='cc -c conftest.$ac_ext >&5' |
2803 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2804 | (eval $ac_try) 2>&5 | |
2805 | ac_status=$? | |
2806 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2807 | (exit $ac_status); }; }; then | |
2808 | ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' | |
2809 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2810 | (eval $ac_try) 2>&5 | |
2811 | ac_status=$? | |
2812 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2813 | (exit $ac_status); } && | |
2814 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2815 | (eval $ac_try) 2>&5 | |
2816 | ac_status=$? | |
2817 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2818 | (exit $ac_status); }; | |
3ec83fc2 | 2819 | then |
86da66b5 HPN |
2820 | # cc works too. |
2821 | : | |
3ec83fc2 | 2822 | else |
86da66b5 HPN |
2823 | # cc exists but doesn't like -o. |
2824 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3ec83fc2 RH |
2825 | fi |
2826 | fi | |
2827 | fi | |
2828 | else | |
2829 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
2830 | fi | |
2831 | rm -f conftest* | |
2832 | ||
2833 | fi | |
2834 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
ba479fd2 NN |
2835 | echo "$as_me:$LINENO: result: yes" >&5 |
2836 | echo "${ECHO_T}yes" >&6 | |
3ec83fc2 | 2837 | else |
ba479fd2 NN |
2838 | echo "$as_me:$LINENO: result: no" >&5 |
2839 | echo "${ECHO_T}no" >&6 | |
2840 | ||
2841 | cat >>confdefs.h <<\_ACEOF | |
3ec83fc2 | 2842 | #define NO_MINUS_C_MINUS_O 1 |
ba479fd2 | 2843 | _ACEOF |
3ec83fc2 RH |
2844 | |
2845 | fi | |
2846 | ||
3b620440 KC |
2847 | # expand $ac_aux_dir to an absolute path |
2848 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
2849 | ||
2850 | # FIXME: we rely on the cache variable name because | |
2851 | # there is no other way. | |
2852 | set dummy $CC | |
2853 | ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2854 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then | |
2855 | # Losing compiler, so override with the script. | |
2856 | # FIXME: It is wrong to rewrite CC. | |
2857 | # But if we don't then we get into trouble of one sort or another. | |
2858 | # A longer-term fix would be to have automake use am__CC in this case, | |
2859 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
2860 | CC="$am_aux_dir/compile $CC" | |
2861 | fi | |
2862 | ||
414d23ae HPN |
2863 | # autoconf is lame and doesn't give us any substitution variable for this. |
2864 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
2865 | NO_MINUS_C_MINUS_O=yes | |
2866 | else | |
2867 | OUTPUT_OPTION='-o $@' | |
2868 | fi | |
2869 | ||
2870 | ||
2871 | ||
73458fb7 NN |
2872 | # ------------------------- |
2873 | # Check C compiler features | |
2874 | # ------------------------- | |
2875 | ||
ba479fd2 NN |
2876 | ac_ext=c |
2877 | ac_cpp='$CPP $CPPFLAGS' | |
2878 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2879 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2880 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2881 | echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 | |
2882 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 | |
84c041a1 ZW |
2883 | # On Suns, sometimes $CPP names a directory. |
2884 | if test -n "$CPP" && test -d "$CPP"; then | |
2885 | CPP= | |
2886 | fi | |
2887 | if test -z "$CPP"; then | |
ba479fd2 NN |
2888 | if test "${ac_cv_prog_CPP+set}" = set; then |
2889 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2890 | else | |
2891 | # Double quotes because CPP needs to be expanded | |
2892 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
2893 | do | |
2894 | ac_preproc_ok=false | |
2895 | for ac_c_preproc_warn_flag in '' yes | |
2896 | do | |
2897 | # Use a header file that comes with gcc, so configuring glibc | |
2898 | # with a fresh cross-compiler works. | |
2899 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2900 | # <limits.h> exists even on freestanding compilers. | |
84c041a1 | 2901 | # On the NeXT, cc -E runs the code through the compiler's parser, |
ba479fd2 NN |
2902 | # not just through cpp. "Syntax error" is here to catch this case. |
2903 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2904 | /* confdefs.h. */ |
2905 | _ACEOF | |
2906 | cat confdefs.h >>conftest.$ac_ext | |
2907 | cat >>conftest.$ac_ext <<_ACEOF | |
2908 | /* end confdefs.h. */ | |
2909 | #ifdef __STDC__ | |
2910 | # include <limits.h> | |
2911 | #else | |
2912 | # include <assert.h> | |
2913 | #endif | |
86da66b5 | 2914 | Syntax error |
ba479fd2 NN |
2915 | _ACEOF |
2916 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2917 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2918 | ac_status=$? | |
2919 | grep -v '^ *+' conftest.er1 >conftest.err | |
2920 | rm -f conftest.er1 | |
2921 | cat conftest.err >&5 | |
2922 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2923 | (exit $ac_status); } >/dev/null; then | |
2924 | if test -s conftest.err; then | |
2925 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2926 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2927 | else |
2928 | ac_cpp_err= | |
2929 | fi | |
2930 | else | |
2931 | ac_cpp_err=yes | |
2932 | fi | |
2933 | if test -z "$ac_cpp_err"; then | |
093e61a6 | 2934 | : |
cafe096b | 2935 | else |
ba479fd2 NN |
2936 | echo "$as_me: failed program was:" >&5 |
2937 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2938 | ||
2939 | # Broken: fails on valid input. | |
2940 | continue | |
2941 | fi | |
2942 | rm -f conftest.err conftest.$ac_ext | |
2943 | ||
2944 | # OK, works on sane cases. Now check whether non-existent headers | |
2945 | # can be detected and how. | |
2946 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2947 | /* confdefs.h. */ |
2948 | _ACEOF | |
2949 | cat confdefs.h >>conftest.$ac_ext | |
2950 | cat >>conftest.$ac_ext <<_ACEOF | |
2951 | /* end confdefs.h. */ | |
2952 | #include <ac_nonexistent.h> | |
2953 | _ACEOF | |
2954 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2955 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2956 | ac_status=$? | |
2957 | grep -v '^ *+' conftest.er1 >conftest.err | |
2958 | rm -f conftest.er1 | |
2959 | cat conftest.err >&5 | |
2960 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2961 | (exit $ac_status); } >/dev/null; then | |
2962 | if test -s conftest.err; then | |
2963 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2964 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2965 | else |
2966 | ac_cpp_err= | |
2967 | fi | |
2968 | else | |
2969 | ac_cpp_err=yes | |
2970 | fi | |
2971 | if test -z "$ac_cpp_err"; then | |
2972 | # Broken: success on invalid input. | |
2973 | continue | |
2974 | else | |
2975 | echo "$as_me: failed program was:" >&5 | |
2976 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2977 | ||
2978 | # Passes both tests. | |
2979 | ac_preproc_ok=: | |
2980 | break | |
2981 | fi | |
2982 | rm -f conftest.err conftest.$ac_ext | |
2983 | ||
2984 | done | |
2985 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2986 | rm -f conftest.err conftest.$ac_ext | |
2987 | if $ac_preproc_ok; then | |
2988 | break | |
2989 | fi | |
2990 | ||
2991 | done | |
2992 | ac_cv_prog_CPP=$CPP | |
2993 | ||
2994 | fi | |
2995 | CPP=$ac_cv_prog_CPP | |
2996 | else | |
2997 | ac_cv_prog_CPP=$CPP | |
2998 | fi | |
2999 | echo "$as_me:$LINENO: result: $CPP" >&5 | |
3000 | echo "${ECHO_T}$CPP" >&6 | |
3001 | ac_preproc_ok=false | |
3002 | for ac_c_preproc_warn_flag in '' yes | |
3003 | do | |
3004 | # Use a header file that comes with gcc, so configuring glibc | |
3005 | # with a fresh cross-compiler works. | |
3006 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3007 | # <limits.h> exists even on freestanding compilers. | |
3008 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3009 | # not just through cpp. "Syntax error" is here to catch this case. | |
3010 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3011 | /* confdefs.h. */ |
3012 | _ACEOF | |
3013 | cat confdefs.h >>conftest.$ac_ext | |
3014 | cat >>conftest.$ac_ext <<_ACEOF | |
3015 | /* end confdefs.h. */ | |
3016 | #ifdef __STDC__ | |
3017 | # include <limits.h> | |
3018 | #else | |
3019 | # include <assert.h> | |
3020 | #endif | |
86da66b5 | 3021 | Syntax error |
ba479fd2 NN |
3022 | _ACEOF |
3023 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3024 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3025 | ac_status=$? | |
3026 | grep -v '^ *+' conftest.er1 >conftest.err | |
3027 | rm -f conftest.er1 | |
3028 | cat conftest.err >&5 | |
3029 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3030 | (exit $ac_status); } >/dev/null; then | |
3031 | if test -s conftest.err; then | |
3032 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 3033 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
3034 | else |
3035 | ac_cpp_err= | |
3036 | fi | |
3037 | else | |
3038 | ac_cpp_err=yes | |
3039 | fi | |
3040 | if test -z "$ac_cpp_err"; then | |
6e3f3080 | 3041 | : |
414d23ae | 3042 | else |
ba479fd2 NN |
3043 | echo "$as_me: failed program was:" >&5 |
3044 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3045 | ||
3046 | # Broken: fails on valid input. | |
3047 | continue | |
3048 | fi | |
3049 | rm -f conftest.err conftest.$ac_ext | |
3050 | ||
3051 | # OK, works on sane cases. Now check whether non-existent headers | |
3052 | # can be detected and how. | |
3053 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3054 | /* confdefs.h. */ |
3055 | _ACEOF | |
3056 | cat confdefs.h >>conftest.$ac_ext | |
3057 | cat >>conftest.$ac_ext <<_ACEOF | |
3058 | /* end confdefs.h. */ | |
3059 | #include <ac_nonexistent.h> | |
3060 | _ACEOF | |
3061 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3062 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3063 | ac_status=$? | |
3064 | grep -v '^ *+' conftest.er1 >conftest.err | |
3065 | rm -f conftest.er1 | |
3066 | cat conftest.err >&5 | |
3067 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3068 | (exit $ac_status); } >/dev/null; then | |
3069 | if test -s conftest.err; then | |
3070 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 3071 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
3072 | else |
3073 | ac_cpp_err= | |
3074 | fi | |
6e3f3080 | 3075 | else |
ba479fd2 | 3076 | ac_cpp_err=yes |
63cf211a | 3077 | fi |
ba479fd2 NN |
3078 | if test -z "$ac_cpp_err"; then |
3079 | # Broken: success on invalid input. | |
3080 | continue | |
3081 | else | |
3082 | echo "$as_me: failed program was:" >&5 | |
3083 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3084 | ||
3085 | # Passes both tests. | |
3086 | ac_preproc_ok=: | |
3087 | break | |
63cf211a | 3088 | fi |
ba479fd2 NN |
3089 | rm -f conftest.err conftest.$ac_ext |
3090 | ||
3091 | done | |
3092 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3093 | rm -f conftest.err conftest.$ac_ext | |
3094 | if $ac_preproc_ok; then | |
3095 | : | |
6e3f3080 | 3096 | else |
ba479fd2 NN |
3097 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check |
3098 | See \`config.log' for more details." >&5 | |
3099 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check | |
3100 | See \`config.log' for more details." >&2;} | |
3101 | { (exit 1); exit 1; }; } | |
6e3f3080 NN |
3102 | fi |
3103 | ||
ba479fd2 NN |
3104 | ac_ext=c |
3105 | ac_cpp='$CPP $CPPFLAGS' | |
3106 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3107 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3108 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3109 | ||
b5472e1d | 3110 | |
ba479fd2 NN |
3111 | echo "$as_me:$LINENO: checking for inline" >&5 |
3112 | echo $ECHO_N "checking for inline... $ECHO_C" >&6 | |
3113 | if test "${ac_cv_c_inline+set}" = set; then | |
3114 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
3115 | else |
3116 | ac_cv_c_inline=no | |
3117 | for ac_kw in inline __inline__ __inline; do | |
ba479fd2 | 3118 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3119 | /* confdefs.h. */ |
3120 | _ACEOF | |
3121 | cat confdefs.h >>conftest.$ac_ext | |
3122 | cat >>conftest.$ac_ext <<_ACEOF | |
3123 | /* end confdefs.h. */ | |
3124 | #ifndef __cplusplus | |
3125 | typedef int foo_t; | |
3126 | static $ac_kw foo_t static_foo () {return 0; } | |
3127 | $ac_kw foo_t foo () {return 0; } | |
3128 | #endif | |
414d23ae | 3129 | |
ba479fd2 NN |
3130 | _ACEOF |
3131 | rm -f conftest.$ac_objext | |
3132 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3133 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3134 | ac_status=$? |
86da66b5 HPN |
3135 | grep -v '^ *+' conftest.er1 >conftest.err |
3136 | rm -f conftest.er1 | |
3137 | cat conftest.err >&5 | |
ba479fd2 NN |
3138 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3139 | (exit $ac_status); } && | |
dbad5e72 SE |
3140 | { ac_try='test -z "$ac_c_werror_flag" |
3141 | || test ! -s conftest.err' | |
86da66b5 HPN |
3142 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3143 | (eval $ac_try) 2>&5 | |
3144 | ac_status=$? | |
3145 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3146 | (exit $ac_status); }; } && | |
3147 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3148 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3149 | (eval $ac_try) 2>&5 | |
3150 | ac_status=$? | |
3151 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3152 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3153 | ac_cv_c_inline=$ac_kw; break |
3154 | else | |
ba479fd2 NN |
3155 | echo "$as_me: failed program was:" >&5 |
3156 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3157 | ||
414d23ae | 3158 | fi |
86da66b5 | 3159 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3160 | done |
3161 | ||
3162 | fi | |
ba479fd2 NN |
3163 | echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 |
3164 | echo "${ECHO_T}$ac_cv_c_inline" >&6 | |
86da66b5 HPN |
3165 | |
3166 | ||
ba479fd2 | 3167 | case $ac_cv_c_inline in |
414d23ae | 3168 | inline | yes) ;; |
86da66b5 HPN |
3169 | *) |
3170 | case $ac_cv_c_inline in | |
3171 | no) ac_val=;; | |
3172 | *) ac_val=$ac_cv_c_inline;; | |
3173 | esac | |
3174 | cat >>confdefs.h <<_ACEOF | |
3175 | #ifndef __cplusplus | |
3176 | #define inline $ac_val | |
3177 | #endif | |
ba479fd2 | 3178 | _ACEOF |
86da66b5 | 3179 | ;; |
414d23ae HPN |
3180 | esac |
3181 | ||
414d23ae | 3182 | |
414d23ae | 3183 | # sizeof(char) is 1 by definition. |
bf3b7cd3 JD |
3184 | |
3185 | echo "$as_me:$LINENO: checking for egrep" >&5 | |
3186 | echo $ECHO_N "checking for egrep... $ECHO_C" >&6 | |
3187 | if test "${ac_cv_prog_egrep+set}" = set; then | |
3188 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3189 | else | |
3190 | if echo a | (grep -E '(a|b)') >/dev/null 2>&1 | |
3191 | then ac_cv_prog_egrep='grep -E' | |
3192 | else ac_cv_prog_egrep='egrep' | |
3193 | fi | |
3194 | fi | |
3195 | echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 | |
3196 | echo "${ECHO_T}$ac_cv_prog_egrep" >&6 | |
3197 | EGREP=$ac_cv_prog_egrep | |
3198 | ||
3199 | ||
3200 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 | |
3201 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
3202 | if test "${ac_cv_header_stdc+set}" = set; then | |
3203 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3204 | else | |
3205 | cat >conftest.$ac_ext <<_ACEOF | |
3206 | /* confdefs.h. */ | |
3207 | _ACEOF | |
3208 | cat confdefs.h >>conftest.$ac_ext | |
3209 | cat >>conftest.$ac_ext <<_ACEOF | |
3210 | /* end confdefs.h. */ | |
3211 | #include <stdlib.h> | |
3212 | #include <stdarg.h> | |
3213 | #include <string.h> | |
3214 | #include <float.h> | |
3215 | ||
3216 | int | |
3217 | main () | |
3218 | { | |
3219 | ||
3220 | ; | |
3221 | return 0; | |
3222 | } | |
3223 | _ACEOF | |
3224 | rm -f conftest.$ac_objext | |
3225 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3226 | (eval $ac_compile) 2>conftest.er1 | |
3227 | ac_status=$? | |
3228 | grep -v '^ *+' conftest.er1 >conftest.err | |
3229 | rm -f conftest.er1 | |
3230 | cat conftest.err >&5 | |
3231 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3232 | (exit $ac_status); } && | |
dbad5e72 SE |
3233 | { ac_try='test -z "$ac_c_werror_flag" |
3234 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3235 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3236 | (eval $ac_try) 2>&5 | |
3237 | ac_status=$? | |
3238 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3239 | (exit $ac_status); }; } && | |
3240 | { ac_try='test -s conftest.$ac_objext' | |
3241 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3242 | (eval $ac_try) 2>&5 | |
3243 | ac_status=$? | |
3244 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3245 | (exit $ac_status); }; }; then | |
3246 | ac_cv_header_stdc=yes | |
3247 | else | |
3248 | echo "$as_me: failed program was:" >&5 | |
3249 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3250 | ||
3251 | ac_cv_header_stdc=no | |
3252 | fi | |
3253 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3254 | ||
3255 | if test $ac_cv_header_stdc = yes; then | |
3256 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3257 | cat >conftest.$ac_ext <<_ACEOF | |
3258 | /* confdefs.h. */ | |
3259 | _ACEOF | |
3260 | cat confdefs.h >>conftest.$ac_ext | |
3261 | cat >>conftest.$ac_ext <<_ACEOF | |
3262 | /* end confdefs.h. */ | |
3263 | #include <string.h> | |
3264 | ||
3265 | _ACEOF | |
3266 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3267 | $EGREP "memchr" >/dev/null 2>&1; then | |
3268 | : | |
3269 | else | |
3270 | ac_cv_header_stdc=no | |
3271 | fi | |
3272 | rm -f conftest* | |
3273 | ||
3274 | fi | |
3275 | ||
3276 | if test $ac_cv_header_stdc = yes; then | |
3277 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3278 | cat >conftest.$ac_ext <<_ACEOF | |
3279 | /* confdefs.h. */ | |
3280 | _ACEOF | |
3281 | cat confdefs.h >>conftest.$ac_ext | |
3282 | cat >>conftest.$ac_ext <<_ACEOF | |
3283 | /* end confdefs.h. */ | |
3284 | #include <stdlib.h> | |
3285 | ||
3286 | _ACEOF | |
3287 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3288 | $EGREP "free" >/dev/null 2>&1; then | |
3289 | : | |
3290 | else | |
3291 | ac_cv_header_stdc=no | |
3292 | fi | |
3293 | rm -f conftest* | |
3294 | ||
3295 | fi | |
3296 | ||
3297 | if test $ac_cv_header_stdc = yes; then | |
3298 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3299 | if test "$cross_compiling" = yes; then | |
3300 | : | |
3301 | else | |
3302 | cat >conftest.$ac_ext <<_ACEOF | |
3303 | /* confdefs.h. */ | |
3304 | _ACEOF | |
3305 | cat confdefs.h >>conftest.$ac_ext | |
3306 | cat >>conftest.$ac_ext <<_ACEOF | |
3307 | /* end confdefs.h. */ | |
3308 | #include <ctype.h> | |
3309 | #if ((' ' & 0x0FF) == 0x020) | |
3310 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3311 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3312 | #else | |
3313 | # define ISLOWER(c) \ | |
3314 | (('a' <= (c) && (c) <= 'i') \ | |
3315 | || ('j' <= (c) && (c) <= 'r') \ | |
3316 | || ('s' <= (c) && (c) <= 'z')) | |
3317 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
3318 | #endif | |
3319 | ||
3320 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3321 | int | |
3322 | main () | |
3323 | { | |
3324 | int i; | |
3325 | for (i = 0; i < 256; i++) | |
3326 | if (XOR (islower (i), ISLOWER (i)) | |
3327 | || toupper (i) != TOUPPER (i)) | |
3328 | exit(2); | |
3329 | exit (0); | |
3330 | } | |
3331 | _ACEOF | |
3332 | rm -f conftest$ac_exeext | |
3333 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3334 | (eval $ac_link) 2>&5 | |
3335 | ac_status=$? | |
3336 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3337 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
3338 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3339 | (eval $ac_try) 2>&5 | |
3340 | ac_status=$? | |
3341 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3342 | (exit $ac_status); }; }; then | |
3343 | : | |
3344 | else | |
3345 | echo "$as_me: program exited with status $ac_status" >&5 | |
3346 | echo "$as_me: failed program was:" >&5 | |
3347 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3348 | ||
3349 | ( exit $ac_status ) | |
3350 | ac_cv_header_stdc=no | |
3351 | fi | |
3352 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
3353 | fi | |
3354 | fi | |
3355 | fi | |
3356 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 | |
3357 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
3358 | if test $ac_cv_header_stdc = yes; then | |
3359 | ||
3360 | cat >>confdefs.h <<\_ACEOF | |
3361 | #define STDC_HEADERS 1 | |
3362 | _ACEOF | |
3363 | ||
3364 | fi | |
3365 | ||
3366 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
3367 | ||
3368 | ||
3369 | ||
3370 | ||
3371 | ||
3372 | ||
3373 | ||
3374 | ||
3375 | ||
3376 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
3377 | inttypes.h stdint.h unistd.h | |
3378 | do | |
3379 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
3380 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
3381 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
3382 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
3383 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3384 | else | |
3385 | cat >conftest.$ac_ext <<_ACEOF | |
3386 | /* confdefs.h. */ | |
3387 | _ACEOF | |
3388 | cat confdefs.h >>conftest.$ac_ext | |
3389 | cat >>conftest.$ac_ext <<_ACEOF | |
3390 | /* end confdefs.h. */ | |
3391 | $ac_includes_default | |
3392 | ||
3393 | #include <$ac_header> | |
3394 | _ACEOF | |
3395 | rm -f conftest.$ac_objext | |
3396 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3397 | (eval $ac_compile) 2>conftest.er1 | |
3398 | ac_status=$? | |
3399 | grep -v '^ *+' conftest.er1 >conftest.err | |
3400 | rm -f conftest.er1 | |
3401 | cat conftest.err >&5 | |
3402 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3403 | (exit $ac_status); } && | |
dbad5e72 SE |
3404 | { ac_try='test -z "$ac_c_werror_flag" |
3405 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3406 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3407 | (eval $ac_try) 2>&5 | |
3408 | ac_status=$? | |
3409 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3410 | (exit $ac_status); }; } && | |
3411 | { ac_try='test -s conftest.$ac_objext' | |
3412 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3413 | (eval $ac_try) 2>&5 | |
3414 | ac_status=$? | |
3415 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3416 | (exit $ac_status); }; }; then | |
3417 | eval "$as_ac_Header=yes" | |
3418 | else | |
3419 | echo "$as_me: failed program was:" >&5 | |
3420 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3421 | ||
3422 | eval "$as_ac_Header=no" | |
3423 | fi | |
3424 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3425 | fi | |
3426 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
3427 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
3428 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
3429 | cat >>confdefs.h <<_ACEOF | |
3430 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
3431 | _ACEOF | |
3432 | ||
3433 | fi | |
3434 | ||
3435 | done | |
3436 | ||
3437 | ||
3438 | echo "$as_me:$LINENO: checking for void *" >&5 | |
3439 | echo $ECHO_N "checking for void *... $ECHO_C" >&6 | |
3440 | if test "${ac_cv_type_void_p+set}" = set; then | |
3441 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3442 | else | |
3443 | cat >conftest.$ac_ext <<_ACEOF | |
3444 | /* confdefs.h. */ | |
3445 | _ACEOF | |
3446 | cat confdefs.h >>conftest.$ac_ext | |
3447 | cat >>conftest.$ac_ext <<_ACEOF | |
3448 | /* end confdefs.h. */ | |
3449 | $ac_includes_default | |
3450 | int | |
3451 | main () | |
3452 | { | |
3453 | if ((void * *) 0) | |
3454 | return 0; | |
3455 | if (sizeof (void *)) | |
3456 | return 0; | |
3457 | ; | |
3458 | return 0; | |
3459 | } | |
3460 | _ACEOF | |
3461 | rm -f conftest.$ac_objext | |
3462 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3463 | (eval $ac_compile) 2>conftest.er1 | |
3464 | ac_status=$? | |
3465 | grep -v '^ *+' conftest.er1 >conftest.err | |
3466 | rm -f conftest.er1 | |
3467 | cat conftest.err >&5 | |
3468 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3469 | (exit $ac_status); } && | |
dbad5e72 SE |
3470 | { ac_try='test -z "$ac_c_werror_flag" |
3471 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3472 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3473 | (eval $ac_try) 2>&5 | |
3474 | ac_status=$? | |
3475 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3476 | (exit $ac_status); }; } && | |
3477 | { ac_try='test -s conftest.$ac_objext' | |
3478 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3479 | (eval $ac_try) 2>&5 | |
3480 | ac_status=$? | |
3481 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3482 | (exit $ac_status); }; }; then | |
3483 | ac_cv_type_void_p=yes | |
3484 | else | |
3485 | echo "$as_me: failed program was:" >&5 | |
3486 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3487 | ||
3488 | ac_cv_type_void_p=no | |
3489 | fi | |
3490 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3491 | fi | |
3492 | echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 | |
3493 | echo "${ECHO_T}$ac_cv_type_void_p" >&6 | |
3494 | ||
ba479fd2 NN |
3495 | echo "$as_me:$LINENO: checking size of void *" >&5 |
3496 | echo $ECHO_N "checking size of void *... $ECHO_C" >&6 | |
3497 | if test "${ac_cv_sizeof_void_p+set}" = set; then | |
3498 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75b6f3fd | 3499 | else |
bf3b7cd3 JD |
3500 | if test "$ac_cv_type_void_p" = yes; then |
3501 | # The cast to unsigned long works around a bug in the HP C Compiler | |
3502 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
3503 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
3504 | # This bug is HP SR number 8606223364. | |
3505 | if test "$cross_compiling" = yes; then | |
3506 | # Depending upon the size, compute the lo and hi bounds. | |
3507 | cat >conftest.$ac_ext <<_ACEOF | |
3508 | /* confdefs.h. */ | |
3509 | _ACEOF | |
3510 | cat confdefs.h >>conftest.$ac_ext | |
3511 | cat >>conftest.$ac_ext <<_ACEOF | |
3512 | /* end confdefs.h. */ | |
3513 | $ac_includes_default | |
3514 | int | |
3515 | main () | |
3516 | { | |
3517 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)]; | |
3518 | test_array [0] = 0 | |
3519 | ||
3520 | ; | |
3521 | return 0; | |
3522 | } | |
3523 | _ACEOF | |
3524 | rm -f conftest.$ac_objext | |
3525 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3526 | (eval $ac_compile) 2>conftest.er1 | |
3527 | ac_status=$? | |
3528 | grep -v '^ *+' conftest.er1 >conftest.err | |
3529 | rm -f conftest.er1 | |
3530 | cat conftest.err >&5 | |
3531 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3532 | (exit $ac_status); } && | |
dbad5e72 SE |
3533 | { ac_try='test -z "$ac_c_werror_flag" |
3534 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3535 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3536 | (eval $ac_try) 2>&5 | |
3537 | ac_status=$? | |
3538 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3539 | (exit $ac_status); }; } && | |
3540 | { ac_try='test -s conftest.$ac_objext' | |
3541 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3542 | (eval $ac_try) 2>&5 | |
3543 | ac_status=$? | |
3544 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3545 | (exit $ac_status); }; }; then | |
3546 | ac_lo=0 ac_mid=0 | |
3547 | while :; do | |
3548 | cat >conftest.$ac_ext <<_ACEOF | |
3549 | /* confdefs.h. */ | |
3550 | _ACEOF | |
3551 | cat confdefs.h >>conftest.$ac_ext | |
3552 | cat >>conftest.$ac_ext <<_ACEOF | |
3553 | /* end confdefs.h. */ | |
3554 | $ac_includes_default | |
3555 | int | |
3556 | main () | |
3557 | { | |
3558 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; | |
3559 | test_array [0] = 0 | |
3560 | ||
3561 | ; | |
3562 | return 0; | |
3563 | } | |
3564 | _ACEOF | |
3565 | rm -f conftest.$ac_objext | |
3566 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3567 | (eval $ac_compile) 2>conftest.er1 | |
3568 | ac_status=$? | |
3569 | grep -v '^ *+' conftest.er1 >conftest.err | |
3570 | rm -f conftest.er1 | |
3571 | cat conftest.err >&5 | |
3572 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3573 | (exit $ac_status); } && | |
dbad5e72 SE |
3574 | { ac_try='test -z "$ac_c_werror_flag" |
3575 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3576 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3577 | (eval $ac_try) 2>&5 | |
3578 | ac_status=$? | |
3579 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3580 | (exit $ac_status); }; } && | |
3581 | { ac_try='test -s conftest.$ac_objext' | |
3582 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3583 | (eval $ac_try) 2>&5 | |
3584 | ac_status=$? | |
3585 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3586 | (exit $ac_status); }; }; then | |
3587 | ac_hi=$ac_mid; break | |
3588 | else | |
3589 | echo "$as_me: failed program was:" >&5 | |
3590 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3591 | ||
3592 | ac_lo=`expr $ac_mid + 1` | |
3593 | if test $ac_lo -le $ac_mid; then | |
3594 | ac_lo= ac_hi= | |
3595 | break | |
3596 | fi | |
3597 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
3598 | fi | |
3599 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3600 | done | |
3601 | else | |
3602 | echo "$as_me: failed program was:" >&5 | |
3603 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3604 | ||
3605 | cat >conftest.$ac_ext <<_ACEOF | |
3606 | /* confdefs.h. */ | |
3607 | _ACEOF | |
3608 | cat confdefs.h >>conftest.$ac_ext | |
3609 | cat >>conftest.$ac_ext <<_ACEOF | |
3610 | /* end confdefs.h. */ | |
3611 | $ac_includes_default | |
3612 | int | |
3613 | main () | |
3614 | { | |
3615 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)]; | |
3616 | test_array [0] = 0 | |
3617 | ||
3618 | ; | |
3619 | return 0; | |
3620 | } | |
3621 | _ACEOF | |
3622 | rm -f conftest.$ac_objext | |
3623 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3624 | (eval $ac_compile) 2>conftest.er1 | |
3625 | ac_status=$? | |
3626 | grep -v '^ *+' conftest.er1 >conftest.err | |
3627 | rm -f conftest.er1 | |
3628 | cat conftest.err >&5 | |
3629 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3630 | (exit $ac_status); } && | |
dbad5e72 SE |
3631 | { ac_try='test -z "$ac_c_werror_flag" |
3632 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3633 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3634 | (eval $ac_try) 2>&5 | |
3635 | ac_status=$? | |
3636 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3637 | (exit $ac_status); }; } && | |
3638 | { ac_try='test -s conftest.$ac_objext' | |
3639 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3640 | (eval $ac_try) 2>&5 | |
3641 | ac_status=$? | |
3642 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3643 | (exit $ac_status); }; }; then | |
3644 | ac_hi=-1 ac_mid=-1 | |
3645 | while :; do | |
3646 | cat >conftest.$ac_ext <<_ACEOF | |
3647 | /* confdefs.h. */ | |
3648 | _ACEOF | |
3649 | cat confdefs.h >>conftest.$ac_ext | |
3650 | cat >>conftest.$ac_ext <<_ACEOF | |
3651 | /* end confdefs.h. */ | |
3652 | $ac_includes_default | |
3653 | int | |
3654 | main () | |
3655 | { | |
3656 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)]; | |
3657 | test_array [0] = 0 | |
3658 | ||
3659 | ; | |
3660 | return 0; | |
3661 | } | |
3662 | _ACEOF | |
3663 | rm -f conftest.$ac_objext | |
3664 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3665 | (eval $ac_compile) 2>conftest.er1 | |
3666 | ac_status=$? | |
3667 | grep -v '^ *+' conftest.er1 >conftest.err | |
3668 | rm -f conftest.er1 | |
3669 | cat conftest.err >&5 | |
3670 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3671 | (exit $ac_status); } && | |
dbad5e72 SE |
3672 | { ac_try='test -z "$ac_c_werror_flag" |
3673 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3674 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3675 | (eval $ac_try) 2>&5 | |
3676 | ac_status=$? | |
3677 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3678 | (exit $ac_status); }; } && | |
3679 | { ac_try='test -s conftest.$ac_objext' | |
3680 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3681 | (eval $ac_try) 2>&5 | |
3682 | ac_status=$? | |
3683 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3684 | (exit $ac_status); }; }; then | |
3685 | ac_lo=$ac_mid; break | |
3686 | else | |
3687 | echo "$as_me: failed program was:" >&5 | |
3688 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3689 | ||
3690 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
3691 | if test $ac_mid -le $ac_hi; then | |
3692 | ac_lo= ac_hi= | |
3693 | break | |
3694 | fi | |
3695 | ac_mid=`expr 2 '*' $ac_mid` | |
3696 | fi | |
3697 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3698 | done | |
3699 | else | |
3700 | echo "$as_me: failed program was:" >&5 | |
3701 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3702 | ||
3703 | ac_lo= ac_hi= | |
3704 | fi | |
3705 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3706 | fi | |
3707 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3708 | # Binary search between lo and hi bounds. | |
3709 | while test "x$ac_lo" != "x$ac_hi"; do | |
3710 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
3711 | cat >conftest.$ac_ext <<_ACEOF | |
3712 | /* confdefs.h. */ | |
3713 | _ACEOF | |
3714 | cat confdefs.h >>conftest.$ac_ext | |
3715 | cat >>conftest.$ac_ext <<_ACEOF | |
3716 | /* end confdefs.h. */ | |
3717 | $ac_includes_default | |
3718 | int | |
3719 | main () | |
3720 | { | |
3721 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; | |
3722 | test_array [0] = 0 | |
3723 | ||
3724 | ; | |
3725 | return 0; | |
3726 | } | |
3727 | _ACEOF | |
3728 | rm -f conftest.$ac_objext | |
3729 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3730 | (eval $ac_compile) 2>conftest.er1 | |
3731 | ac_status=$? | |
3732 | grep -v '^ *+' conftest.er1 >conftest.err | |
3733 | rm -f conftest.er1 | |
3734 | cat conftest.err >&5 | |
3735 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3736 | (exit $ac_status); } && | |
dbad5e72 SE |
3737 | { ac_try='test -z "$ac_c_werror_flag" |
3738 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3739 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3740 | (eval $ac_try) 2>&5 | |
3741 | ac_status=$? | |
3742 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3743 | (exit $ac_status); }; } && | |
3744 | { ac_try='test -s conftest.$ac_objext' | |
3745 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3746 | (eval $ac_try) 2>&5 | |
3747 | ac_status=$? | |
3748 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3749 | (exit $ac_status); }; }; then | |
3750 | ac_hi=$ac_mid | |
3751 | else | |
3752 | echo "$as_me: failed program was:" >&5 | |
3753 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3754 | ||
3755 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
3756 | fi | |
3757 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3758 | done | |
3759 | case $ac_lo in | |
3760 | ?*) ac_cv_sizeof_void_p=$ac_lo;; | |
3761 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 | |
3762 | See \`config.log' for more details." >&5 | |
3763 | echo "$as_me: error: cannot compute sizeof (void *), 77 | |
3764 | See \`config.log' for more details." >&2;} | |
3765 | { (exit 1); exit 1; }; } ;; | |
3766 | esac | |
3767 | else | |
3768 | if test "$cross_compiling" = yes; then | |
dbad5e72 SE |
3769 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
3770 | See \`config.log' for more details." >&5 | |
3771 | echo "$as_me: error: cannot run test program while cross compiling | |
3772 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
3773 | { (exit 1); exit 1; }; } |
3774 | else | |
3775 | cat >conftest.$ac_ext <<_ACEOF | |
3776 | /* confdefs.h. */ | |
3777 | _ACEOF | |
3778 | cat confdefs.h >>conftest.$ac_ext | |
3779 | cat >>conftest.$ac_ext <<_ACEOF | |
3780 | /* end confdefs.h. */ | |
3781 | $ac_includes_default | |
3782 | long longval () { return (long) (sizeof (void *)); } | |
3783 | unsigned long ulongval () { return (long) (sizeof (void *)); } | |
3784 | #include <stdio.h> | |
3785 | #include <stdlib.h> | |
3786 | int | |
3787 | main () | |
3788 | { | |
3789 | ||
3790 | FILE *f = fopen ("conftest.val", "w"); | |
3791 | if (! f) | |
3792 | exit (1); | |
3793 | if (((long) (sizeof (void *))) < 0) | |
3794 | { | |
3795 | long i = longval (); | |
3796 | if (i != ((long) (sizeof (void *)))) | |
3797 | exit (1); | |
3798 | fprintf (f, "%ld\n", i); | |
3799 | } | |
3800 | else | |
3801 | { | |
3802 | unsigned long i = ulongval (); | |
3803 | if (i != ((long) (sizeof (void *)))) | |
3804 | exit (1); | |
3805 | fprintf (f, "%lu\n", i); | |
3806 | } | |
3807 | exit (ferror (f) || fclose (f) != 0); | |
3808 | ||
3809 | ; | |
3810 | return 0; | |
3811 | } | |
3812 | _ACEOF | |
3813 | rm -f conftest$ac_exeext | |
3814 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3815 | (eval $ac_link) 2>&5 | |
3816 | ac_status=$? | |
3817 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3818 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
3819 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3820 | (eval $ac_try) 2>&5 | |
3821 | ac_status=$? | |
3822 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3823 | (exit $ac_status); }; }; then | |
3824 | ac_cv_sizeof_void_p=`cat conftest.val` | |
3825 | else | |
3826 | echo "$as_me: program exited with status $ac_status" >&5 | |
3827 | echo "$as_me: failed program was:" >&5 | |
3828 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3829 | ||
3830 | ( exit $ac_status ) | |
3831 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 | |
3832 | See \`config.log' for more details." >&5 | |
3833 | echo "$as_me: error: cannot compute sizeof (void *), 77 | |
3834 | See \`config.log' for more details." >&2;} | |
3835 | { (exit 1); exit 1; }; } | |
3836 | fi | |
3837 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
3838 | fi | |
3839 | fi | |
3840 | rm -f conftest.val | |
3841 | else | |
3842 | ac_cv_sizeof_void_p=0 | |
3843 | fi | |
3844 | fi | |
3845 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 | |
3846 | echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 | |
3847 | cat >>confdefs.h <<_ACEOF | |
3848 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p | |
3849 | _ACEOF | |
3850 | ||
3851 | ||
3852 | echo "$as_me:$LINENO: checking for short" >&5 | |
3853 | echo $ECHO_N "checking for short... $ECHO_C" >&6 | |
3854 | if test "${ac_cv_type_short+set}" = set; then | |
3855 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3856 | else | |
3857 | cat >conftest.$ac_ext <<_ACEOF | |
3858 | /* confdefs.h. */ | |
3859 | _ACEOF | |
3860 | cat confdefs.h >>conftest.$ac_ext | |
3861 | cat >>conftest.$ac_ext <<_ACEOF | |
3862 | /* end confdefs.h. */ | |
3863 | $ac_includes_default | |
3864 | int | |
3865 | main () | |
3866 | { | |
3867 | if ((short *) 0) | |
3868 | return 0; | |
3869 | if (sizeof (short)) | |
3870 | return 0; | |
3871 | ; | |
3872 | return 0; | |
3873 | } | |
3874 | _ACEOF | |
3875 | rm -f conftest.$ac_objext | |
3876 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3877 | (eval $ac_compile) 2>conftest.er1 | |
3878 | ac_status=$? | |
3879 | grep -v '^ *+' conftest.er1 >conftest.err | |
3880 | rm -f conftest.er1 | |
3881 | cat conftest.err >&5 | |
3882 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3883 | (exit $ac_status); } && | |
dbad5e72 SE |
3884 | { ac_try='test -z "$ac_c_werror_flag" |
3885 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3886 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3887 | (eval $ac_try) 2>&5 | |
3888 | ac_status=$? | |
3889 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3890 | (exit $ac_status); }; } && | |
3891 | { ac_try='test -s conftest.$ac_objext' | |
3892 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3893 | (eval $ac_try) 2>&5 | |
3894 | ac_status=$? | |
3895 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3896 | (exit $ac_status); }; }; then | |
3897 | ac_cv_type_short=yes | |
3898 | else | |
3899 | echo "$as_me: failed program was:" >&5 | |
3900 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3901 | ||
3902 | ac_cv_type_short=no | |
3903 | fi | |
3904 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3905 | fi | |
3906 | echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 | |
3907 | echo "${ECHO_T}$ac_cv_type_short" >&6 | |
3908 | ||
3909 | echo "$as_me:$LINENO: checking size of short" >&5 | |
3910 | echo $ECHO_N "checking size of short... $ECHO_C" >&6 | |
3911 | if test "${ac_cv_sizeof_short+set}" = set; then | |
3912 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3913 | else | |
3914 | if test "$ac_cv_type_short" = yes; then | |
3915 | # The cast to unsigned long works around a bug in the HP C Compiler | |
3916 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
3917 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
3918 | # This bug is HP SR number 8606223364. | |
3919 | if test "$cross_compiling" = yes; then | |
3920 | # Depending upon the size, compute the lo and hi bounds. | |
3921 | cat >conftest.$ac_ext <<_ACEOF | |
3922 | /* confdefs.h. */ | |
3923 | _ACEOF | |
3924 | cat confdefs.h >>conftest.$ac_ext | |
3925 | cat >>conftest.$ac_ext <<_ACEOF | |
3926 | /* end confdefs.h. */ | |
3927 | $ac_includes_default | |
3928 | int | |
3929 | main () | |
3930 | { | |
3931 | static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; | |
3932 | test_array [0] = 0 | |
3933 | ||
3934 | ; | |
3935 | return 0; | |
3936 | } | |
3937 | _ACEOF | |
3938 | rm -f conftest.$ac_objext | |
3939 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3940 | (eval $ac_compile) 2>conftest.er1 | |
3941 | ac_status=$? | |
3942 | grep -v '^ *+' conftest.er1 >conftest.err | |
3943 | rm -f conftest.er1 | |
3944 | cat conftest.err >&5 | |
3945 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3946 | (exit $ac_status); } && | |
dbad5e72 SE |
3947 | { ac_try='test -z "$ac_c_werror_flag" |
3948 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3949 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3950 | (eval $ac_try) 2>&5 | |
3951 | ac_status=$? | |
3952 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3953 | (exit $ac_status); }; } && | |
3954 | { ac_try='test -s conftest.$ac_objext' | |
3955 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3956 | (eval $ac_try) 2>&5 | |
3957 | ac_status=$? | |
3958 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3959 | (exit $ac_status); }; }; then | |
3960 | ac_lo=0 ac_mid=0 | |
3961 | while :; do | |
3962 | cat >conftest.$ac_ext <<_ACEOF | |
3963 | /* confdefs.h. */ | |
3964 | _ACEOF | |
3965 | cat confdefs.h >>conftest.$ac_ext | |
3966 | cat >>conftest.$ac_ext <<_ACEOF | |
3967 | /* end confdefs.h. */ | |
3968 | $ac_includes_default | |
3969 | int | |
3970 | main () | |
3971 | { | |
3972 | static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; | |
3973 | test_array [0] = 0 | |
3974 | ||
3975 | ; | |
3976 | return 0; | |
3977 | } | |
3978 | _ACEOF | |
3979 | rm -f conftest.$ac_objext | |
3980 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3981 | (eval $ac_compile) 2>conftest.er1 | |
3982 | ac_status=$? | |
3983 | grep -v '^ *+' conftest.er1 >conftest.err | |
3984 | rm -f conftest.er1 | |
3985 | cat conftest.err >&5 | |
3986 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3987 | (exit $ac_status); } && | |
dbad5e72 SE |
3988 | { ac_try='test -z "$ac_c_werror_flag" |
3989 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3990 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3991 | (eval $ac_try) 2>&5 | |
3992 | ac_status=$? | |
3993 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3994 | (exit $ac_status); }; } && | |
3995 | { ac_try='test -s conftest.$ac_objext' | |
3996 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3997 | (eval $ac_try) 2>&5 | |
3998 | ac_status=$? | |
3999 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4000 | (exit $ac_status); }; }; then | |
4001 | ac_hi=$ac_mid; break | |
4002 | else | |
4003 | echo "$as_me: failed program was:" >&5 | |
4004 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4005 | ||
4006 | ac_lo=`expr $ac_mid + 1` | |
4007 | if test $ac_lo -le $ac_mid; then | |
4008 | ac_lo= ac_hi= | |
4009 | break | |
4010 | fi | |
4011 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4012 | fi | |
4013 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4014 | done | |
4015 | else | |
4016 | echo "$as_me: failed program was:" >&5 | |
4017 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4018 | ||
4019 | cat >conftest.$ac_ext <<_ACEOF | |
4020 | /* confdefs.h. */ | |
4021 | _ACEOF | |
4022 | cat confdefs.h >>conftest.$ac_ext | |
4023 | cat >>conftest.$ac_ext <<_ACEOF | |
4024 | /* end confdefs.h. */ | |
4025 | $ac_includes_default | |
4026 | int | |
4027 | main () | |
4028 | { | |
4029 | static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; | |
4030 | test_array [0] = 0 | |
4031 | ||
4032 | ; | |
4033 | return 0; | |
4034 | } | |
4035 | _ACEOF | |
4036 | rm -f conftest.$ac_objext | |
4037 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4038 | (eval $ac_compile) 2>conftest.er1 | |
4039 | ac_status=$? | |
4040 | grep -v '^ *+' conftest.er1 >conftest.err | |
4041 | rm -f conftest.er1 | |
4042 | cat conftest.err >&5 | |
4043 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4044 | (exit $ac_status); } && | |
dbad5e72 SE |
4045 | { ac_try='test -z "$ac_c_werror_flag" |
4046 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4047 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4048 | (eval $ac_try) 2>&5 | |
4049 | ac_status=$? | |
4050 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4051 | (exit $ac_status); }; } && | |
4052 | { ac_try='test -s conftest.$ac_objext' | |
4053 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4054 | (eval $ac_try) 2>&5 | |
4055 | ac_status=$? | |
4056 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4057 | (exit $ac_status); }; }; then | |
4058 | ac_hi=-1 ac_mid=-1 | |
4059 | while :; do | |
4060 | cat >conftest.$ac_ext <<_ACEOF | |
4061 | /* confdefs.h. */ | |
4062 | _ACEOF | |
4063 | cat confdefs.h >>conftest.$ac_ext | |
4064 | cat >>conftest.$ac_ext <<_ACEOF | |
4065 | /* end confdefs.h. */ | |
4066 | $ac_includes_default | |
4067 | int | |
4068 | main () | |
4069 | { | |
4070 | static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; | |
4071 | test_array [0] = 0 | |
4072 | ||
4073 | ; | |
4074 | return 0; | |
4075 | } | |
4076 | _ACEOF | |
4077 | rm -f conftest.$ac_objext | |
4078 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4079 | (eval $ac_compile) 2>conftest.er1 | |
4080 | ac_status=$? | |
4081 | grep -v '^ *+' conftest.er1 >conftest.err | |
4082 | rm -f conftest.er1 | |
4083 | cat conftest.err >&5 | |
4084 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4085 | (exit $ac_status); } && | |
dbad5e72 SE |
4086 | { ac_try='test -z "$ac_c_werror_flag" |
4087 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4088 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4089 | (eval $ac_try) 2>&5 | |
4090 | ac_status=$? | |
4091 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4092 | (exit $ac_status); }; } && | |
4093 | { ac_try='test -s conftest.$ac_objext' | |
4094 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4095 | (eval $ac_try) 2>&5 | |
4096 | ac_status=$? | |
4097 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4098 | (exit $ac_status); }; }; then | |
4099 | ac_lo=$ac_mid; break | |
4100 | else | |
4101 | echo "$as_me: failed program was:" >&5 | |
4102 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4103 | ||
4104 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4105 | if test $ac_mid -le $ac_hi; then | |
4106 | ac_lo= ac_hi= | |
4107 | break | |
4108 | fi | |
4109 | ac_mid=`expr 2 '*' $ac_mid` | |
4110 | fi | |
4111 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4112 | done | |
4113 | else | |
4114 | echo "$as_me: failed program was:" >&5 | |
4115 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4116 | ||
4117 | ac_lo= ac_hi= | |
4118 | fi | |
4119 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4120 | fi | |
4121 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4122 | # Binary search between lo and hi bounds. | |
4123 | while test "x$ac_lo" != "x$ac_hi"; do | |
4124 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4125 | cat >conftest.$ac_ext <<_ACEOF | |
4126 | /* confdefs.h. */ | |
4127 | _ACEOF | |
4128 | cat confdefs.h >>conftest.$ac_ext | |
4129 | cat >>conftest.$ac_ext <<_ACEOF | |
4130 | /* end confdefs.h. */ | |
4131 | $ac_includes_default | |
4132 | int | |
4133 | main () | |
4134 | { | |
4135 | static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; | |
4136 | test_array [0] = 0 | |
4137 | ||
4138 | ; | |
4139 | return 0; | |
4140 | } | |
4141 | _ACEOF | |
4142 | rm -f conftest.$ac_objext | |
4143 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4144 | (eval $ac_compile) 2>conftest.er1 | |
4145 | ac_status=$? | |
4146 | grep -v '^ *+' conftest.er1 >conftest.err | |
4147 | rm -f conftest.er1 | |
4148 | cat conftest.err >&5 | |
4149 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4150 | (exit $ac_status); } && | |
dbad5e72 SE |
4151 | { ac_try='test -z "$ac_c_werror_flag" |
4152 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4153 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4154 | (eval $ac_try) 2>&5 | |
4155 | ac_status=$? | |
4156 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4157 | (exit $ac_status); }; } && | |
4158 | { ac_try='test -s conftest.$ac_objext' | |
4159 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4160 | (eval $ac_try) 2>&5 | |
4161 | ac_status=$? | |
4162 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4163 | (exit $ac_status); }; }; then | |
4164 | ac_hi=$ac_mid | |
4165 | else | |
4166 | echo "$as_me: failed program was:" >&5 | |
4167 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4168 | ||
4169 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4170 | fi | |
4171 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4172 | done | |
4173 | case $ac_lo in | |
4174 | ?*) ac_cv_sizeof_short=$ac_lo;; | |
4175 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 | |
4176 | See \`config.log' for more details." >&5 | |
4177 | echo "$as_me: error: cannot compute sizeof (short), 77 | |
4178 | See \`config.log' for more details." >&2;} | |
4179 | { (exit 1); exit 1; }; } ;; | |
4180 | esac | |
4181 | else | |
4182 | if test "$cross_compiling" = yes; then | |
dbad5e72 SE |
4183 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
4184 | See \`config.log' for more details." >&5 | |
4185 | echo "$as_me: error: cannot run test program while cross compiling | |
4186 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
4187 | { (exit 1); exit 1; }; } |
4188 | else | |
4189 | cat >conftest.$ac_ext <<_ACEOF | |
4190 | /* confdefs.h. */ | |
4191 | _ACEOF | |
4192 | cat confdefs.h >>conftest.$ac_ext | |
4193 | cat >>conftest.$ac_ext <<_ACEOF | |
4194 | /* end confdefs.h. */ | |
4195 | $ac_includes_default | |
4196 | long longval () { return (long) (sizeof (short)); } | |
4197 | unsigned long ulongval () { return (long) (sizeof (short)); } | |
4198 | #include <stdio.h> | |
4199 | #include <stdlib.h> | |
4200 | int | |
4201 | main () | |
4202 | { | |
4203 | ||
4204 | FILE *f = fopen ("conftest.val", "w"); | |
4205 | if (! f) | |
4206 | exit (1); | |
4207 | if (((long) (sizeof (short))) < 0) | |
4208 | { | |
4209 | long i = longval (); | |
4210 | if (i != ((long) (sizeof (short)))) | |
4211 | exit (1); | |
4212 | fprintf (f, "%ld\n", i); | |
4213 | } | |
4214 | else | |
4215 | { | |
4216 | unsigned long i = ulongval (); | |
4217 | if (i != ((long) (sizeof (short)))) | |
4218 | exit (1); | |
4219 | fprintf (f, "%lu\n", i); | |
4220 | } | |
4221 | exit (ferror (f) || fclose (f) != 0); | |
4222 | ||
4223 | ; | |
4224 | return 0; | |
4225 | } | |
4226 | _ACEOF | |
4227 | rm -f conftest$ac_exeext | |
4228 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4229 | (eval $ac_link) 2>&5 | |
4230 | ac_status=$? | |
4231 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4232 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4233 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4234 | (eval $ac_try) 2>&5 | |
4235 | ac_status=$? | |
4236 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4237 | (exit $ac_status); }; }; then | |
4238 | ac_cv_sizeof_short=`cat conftest.val` | |
4239 | else | |
4240 | echo "$as_me: program exited with status $ac_status" >&5 | |
4241 | echo "$as_me: failed program was:" >&5 | |
4242 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4243 | ||
4244 | ( exit $ac_status ) | |
4245 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 | |
4246 | See \`config.log' for more details." >&5 | |
4247 | echo "$as_me: error: cannot compute sizeof (short), 77 | |
4248 | See \`config.log' for more details." >&2;} | |
4249 | { (exit 1); exit 1; }; } | |
4250 | fi | |
4251 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
4252 | fi | |
4253 | fi | |
4254 | rm -f conftest.val | |
4255 | else | |
4256 | ac_cv_sizeof_short=0 | |
4257 | fi | |
4258 | fi | |
4259 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 | |
4260 | echo "${ECHO_T}$ac_cv_sizeof_short" >&6 | |
4261 | cat >>confdefs.h <<_ACEOF | |
4262 | #define SIZEOF_SHORT $ac_cv_sizeof_short | |
4263 | _ACEOF | |
4264 | ||
4265 | ||
4266 | echo "$as_me:$LINENO: checking for int" >&5 | |
4267 | echo $ECHO_N "checking for int... $ECHO_C" >&6 | |
4268 | if test "${ac_cv_type_int+set}" = set; then | |
4269 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4270 | else | |
4271 | cat >conftest.$ac_ext <<_ACEOF | |
4272 | /* confdefs.h. */ | |
4273 | _ACEOF | |
4274 | cat confdefs.h >>conftest.$ac_ext | |
4275 | cat >>conftest.$ac_ext <<_ACEOF | |
4276 | /* end confdefs.h. */ | |
4277 | $ac_includes_default | |
4278 | int | |
4279 | main () | |
4280 | { | |
4281 | if ((int *) 0) | |
4282 | return 0; | |
4283 | if (sizeof (int)) | |
4284 | return 0; | |
4285 | ; | |
4286 | return 0; | |
4287 | } | |
4288 | _ACEOF | |
4289 | rm -f conftest.$ac_objext | |
4290 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4291 | (eval $ac_compile) 2>conftest.er1 | |
4292 | ac_status=$? | |
4293 | grep -v '^ *+' conftest.er1 >conftest.err | |
4294 | rm -f conftest.er1 | |
4295 | cat conftest.err >&5 | |
4296 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4297 | (exit $ac_status); } && | |
dbad5e72 SE |
4298 | { ac_try='test -z "$ac_c_werror_flag" |
4299 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4300 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4301 | (eval $ac_try) 2>&5 | |
4302 | ac_status=$? | |
4303 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4304 | (exit $ac_status); }; } && | |
4305 | { ac_try='test -s conftest.$ac_objext' | |
4306 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4307 | (eval $ac_try) 2>&5 | |
4308 | ac_status=$? | |
4309 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4310 | (exit $ac_status); }; }; then | |
4311 | ac_cv_type_int=yes | |
4312 | else | |
4313 | echo "$as_me: failed program was:" >&5 | |
4314 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4315 | ||
4316 | ac_cv_type_int=no | |
4317 | fi | |
4318 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4319 | fi | |
4320 | echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 | |
4321 | echo "${ECHO_T}$ac_cv_type_int" >&6 | |
4322 | ||
4323 | echo "$as_me:$LINENO: checking size of int" >&5 | |
4324 | echo $ECHO_N "checking size of int... $ECHO_C" >&6 | |
4325 | if test "${ac_cv_sizeof_int+set}" = set; then | |
4326 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4327 | else | |
4328 | if test "$ac_cv_type_int" = yes; then | |
4329 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4330 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4331 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4332 | # This bug is HP SR number 8606223364. | |
4333 | if test "$cross_compiling" = yes; then | |
4334 | # Depending upon the size, compute the lo and hi bounds. | |
4335 | cat >conftest.$ac_ext <<_ACEOF | |
4336 | /* confdefs.h. */ | |
4337 | _ACEOF | |
4338 | cat confdefs.h >>conftest.$ac_ext | |
4339 | cat >>conftest.$ac_ext <<_ACEOF | |
4340 | /* end confdefs.h. */ | |
4341 | $ac_includes_default | |
4342 | int | |
4343 | main () | |
4344 | { | |
4345 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; | |
4346 | test_array [0] = 0 | |
4347 | ||
4348 | ; | |
4349 | return 0; | |
4350 | } | |
4351 | _ACEOF | |
4352 | rm -f conftest.$ac_objext | |
4353 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4354 | (eval $ac_compile) 2>conftest.er1 | |
4355 | ac_status=$? | |
4356 | grep -v '^ *+' conftest.er1 >conftest.err | |
4357 | rm -f conftest.er1 | |
4358 | cat conftest.err >&5 | |
4359 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4360 | (exit $ac_status); } && | |
dbad5e72 SE |
4361 | { ac_try='test -z "$ac_c_werror_flag" |
4362 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4363 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4364 | (eval $ac_try) 2>&5 | |
4365 | ac_status=$? | |
4366 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4367 | (exit $ac_status); }; } && | |
4368 | { ac_try='test -s conftest.$ac_objext' | |
4369 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4370 | (eval $ac_try) 2>&5 | |
4371 | ac_status=$? | |
4372 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4373 | (exit $ac_status); }; }; then | |
4374 | ac_lo=0 ac_mid=0 | |
4375 | while :; do | |
4376 | cat >conftest.$ac_ext <<_ACEOF | |
4377 | /* confdefs.h. */ | |
4378 | _ACEOF | |
4379 | cat confdefs.h >>conftest.$ac_ext | |
4380 | cat >>conftest.$ac_ext <<_ACEOF | |
4381 | /* end confdefs.h. */ | |
4382 | $ac_includes_default | |
4383 | int | |
4384 | main () | |
4385 | { | |
4386 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; | |
4387 | test_array [0] = 0 | |
4388 | ||
4389 | ; | |
4390 | return 0; | |
4391 | } | |
4392 | _ACEOF | |
4393 | rm -f conftest.$ac_objext | |
4394 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4395 | (eval $ac_compile) 2>conftest.er1 | |
4396 | ac_status=$? | |
4397 | grep -v '^ *+' conftest.er1 >conftest.err | |
4398 | rm -f conftest.er1 | |
4399 | cat conftest.err >&5 | |
4400 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4401 | (exit $ac_status); } && | |
dbad5e72 SE |
4402 | { ac_try='test -z "$ac_c_werror_flag" |
4403 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4404 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4405 | (eval $ac_try) 2>&5 | |
4406 | ac_status=$? | |
4407 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4408 | (exit $ac_status); }; } && | |
4409 | { ac_try='test -s conftest.$ac_objext' | |
4410 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4411 | (eval $ac_try) 2>&5 | |
4412 | ac_status=$? | |
4413 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4414 | (exit $ac_status); }; }; then | |
4415 | ac_hi=$ac_mid; break | |
4416 | else | |
4417 | echo "$as_me: failed program was:" >&5 | |
4418 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4419 | ||
4420 | ac_lo=`expr $ac_mid + 1` | |
4421 | if test $ac_lo -le $ac_mid; then | |
4422 | ac_lo= ac_hi= | |
4423 | break | |
4424 | fi | |
4425 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4426 | fi | |
4427 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4428 | done | |
4429 | else | |
4430 | echo "$as_me: failed program was:" >&5 | |
4431 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4432 | ||
4433 | cat >conftest.$ac_ext <<_ACEOF | |
4434 | /* confdefs.h. */ | |
4435 | _ACEOF | |
4436 | cat confdefs.h >>conftest.$ac_ext | |
4437 | cat >>conftest.$ac_ext <<_ACEOF | |
4438 | /* end confdefs.h. */ | |
4439 | $ac_includes_default | |
4440 | int | |
4441 | main () | |
4442 | { | |
4443 | static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; | |
4444 | test_array [0] = 0 | |
4445 | ||
4446 | ; | |
4447 | return 0; | |
4448 | } | |
4449 | _ACEOF | |
4450 | rm -f conftest.$ac_objext | |
4451 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4452 | (eval $ac_compile) 2>conftest.er1 | |
4453 | ac_status=$? | |
4454 | grep -v '^ *+' conftest.er1 >conftest.err | |
4455 | rm -f conftest.er1 | |
4456 | cat conftest.err >&5 | |
4457 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4458 | (exit $ac_status); } && | |
dbad5e72 SE |
4459 | { ac_try='test -z "$ac_c_werror_flag" |
4460 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4461 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4462 | (eval $ac_try) 2>&5 | |
4463 | ac_status=$? | |
4464 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4465 | (exit $ac_status); }; } && | |
4466 | { ac_try='test -s conftest.$ac_objext' | |
4467 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4468 | (eval $ac_try) 2>&5 | |
4469 | ac_status=$? | |
4470 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4471 | (exit $ac_status); }; }; then | |
4472 | ac_hi=-1 ac_mid=-1 | |
4473 | while :; do | |
4474 | cat >conftest.$ac_ext <<_ACEOF | |
4475 | /* confdefs.h. */ | |
4476 | _ACEOF | |
4477 | cat confdefs.h >>conftest.$ac_ext | |
4478 | cat >>conftest.$ac_ext <<_ACEOF | |
4479 | /* end confdefs.h. */ | |
4480 | $ac_includes_default | |
4481 | int | |
4482 | main () | |
4483 | { | |
4484 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; | |
4485 | test_array [0] = 0 | |
4486 | ||
4487 | ; | |
4488 | return 0; | |
4489 | } | |
4490 | _ACEOF | |
4491 | rm -f conftest.$ac_objext | |
4492 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4493 | (eval $ac_compile) 2>conftest.er1 | |
4494 | ac_status=$? | |
4495 | grep -v '^ *+' conftest.er1 >conftest.err | |
4496 | rm -f conftest.er1 | |
4497 | cat conftest.err >&5 | |
4498 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4499 | (exit $ac_status); } && | |
dbad5e72 SE |
4500 | { ac_try='test -z "$ac_c_werror_flag" |
4501 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4502 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4503 | (eval $ac_try) 2>&5 | |
4504 | ac_status=$? | |
4505 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4506 | (exit $ac_status); }; } && | |
4507 | { ac_try='test -s conftest.$ac_objext' | |
4508 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4509 | (eval $ac_try) 2>&5 | |
4510 | ac_status=$? | |
4511 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4512 | (exit $ac_status); }; }; then | |
4513 | ac_lo=$ac_mid; break | |
4514 | else | |
4515 | echo "$as_me: failed program was:" >&5 | |
4516 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4517 | ||
4518 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4519 | if test $ac_mid -le $ac_hi; then | |
4520 | ac_lo= ac_hi= | |
4521 | break | |
4522 | fi | |
4523 | ac_mid=`expr 2 '*' $ac_mid` | |
4524 | fi | |
4525 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4526 | done | |
4527 | else | |
4528 | echo "$as_me: failed program was:" >&5 | |
4529 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4530 | ||
4531 | ac_lo= ac_hi= | |
4532 | fi | |
4533 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4534 | fi | |
4535 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4536 | # Binary search between lo and hi bounds. | |
4537 | while test "x$ac_lo" != "x$ac_hi"; do | |
4538 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4539 | cat >conftest.$ac_ext <<_ACEOF | |
4540 | /* confdefs.h. */ | |
4541 | _ACEOF | |
4542 | cat confdefs.h >>conftest.$ac_ext | |
4543 | cat >>conftest.$ac_ext <<_ACEOF | |
4544 | /* end confdefs.h. */ | |
4545 | $ac_includes_default | |
4546 | int | |
4547 | main () | |
4548 | { | |
4549 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; | |
4550 | test_array [0] = 0 | |
4551 | ||
4552 | ; | |
4553 | return 0; | |
4554 | } | |
4555 | _ACEOF | |
4556 | rm -f conftest.$ac_objext | |
4557 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4558 | (eval $ac_compile) 2>conftest.er1 | |
4559 | ac_status=$? | |
4560 | grep -v '^ *+' conftest.er1 >conftest.err | |
4561 | rm -f conftest.er1 | |
4562 | cat conftest.err >&5 | |
4563 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4564 | (exit $ac_status); } && | |
dbad5e72 SE |
4565 | { ac_try='test -z "$ac_c_werror_flag" |
4566 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4567 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4568 | (eval $ac_try) 2>&5 | |
4569 | ac_status=$? | |
4570 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4571 | (exit $ac_status); }; } && | |
4572 | { ac_try='test -s conftest.$ac_objext' | |
4573 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4574 | (eval $ac_try) 2>&5 | |
4575 | ac_status=$? | |
4576 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4577 | (exit $ac_status); }; }; then | |
4578 | ac_hi=$ac_mid | |
4579 | else | |
4580 | echo "$as_me: failed program was:" >&5 | |
4581 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4582 | ||
4583 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4584 | fi | |
4585 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4586 | done | |
4587 | case $ac_lo in | |
4588 | ?*) ac_cv_sizeof_int=$ac_lo;; | |
4589 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 | |
4590 | See \`config.log' for more details." >&5 | |
4591 | echo "$as_me: error: cannot compute sizeof (int), 77 | |
4592 | See \`config.log' for more details." >&2;} | |
4593 | { (exit 1); exit 1; }; } ;; | |
4594 | esac | |
4595 | else | |
4596 | if test "$cross_compiling" = yes; then | |
dbad5e72 SE |
4597 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
4598 | See \`config.log' for more details." >&5 | |
4599 | echo "$as_me: error: cannot run test program while cross compiling | |
4600 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
4601 | { (exit 1); exit 1; }; } |
4602 | else | |
4603 | cat >conftest.$ac_ext <<_ACEOF | |
4604 | /* confdefs.h. */ | |
4605 | _ACEOF | |
4606 | cat confdefs.h >>conftest.$ac_ext | |
4607 | cat >>conftest.$ac_ext <<_ACEOF | |
4608 | /* end confdefs.h. */ | |
4609 | $ac_includes_default | |
4610 | long longval () { return (long) (sizeof (int)); } | |
4611 | unsigned long ulongval () { return (long) (sizeof (int)); } | |
4612 | #include <stdio.h> | |
4613 | #include <stdlib.h> | |
4614 | int | |
4615 | main () | |
4616 | { | |
4617 | ||
4618 | FILE *f = fopen ("conftest.val", "w"); | |
4619 | if (! f) | |
4620 | exit (1); | |
4621 | if (((long) (sizeof (int))) < 0) | |
4622 | { | |
4623 | long i = longval (); | |
4624 | if (i != ((long) (sizeof (int)))) | |
4625 | exit (1); | |
4626 | fprintf (f, "%ld\n", i); | |
4627 | } | |
4628 | else | |
4629 | { | |
4630 | unsigned long i = ulongval (); | |
4631 | if (i != ((long) (sizeof (int)))) | |
4632 | exit (1); | |
4633 | fprintf (f, "%lu\n", i); | |
4634 | } | |
4635 | exit (ferror (f) || fclose (f) != 0); | |
4636 | ||
4637 | ; | |
4638 | return 0; | |
4639 | } | |
4640 | _ACEOF | |
4641 | rm -f conftest$ac_exeext | |
4642 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4643 | (eval $ac_link) 2>&5 | |
4644 | ac_status=$? | |
4645 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4646 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4647 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4648 | (eval $ac_try) 2>&5 | |
4649 | ac_status=$? | |
4650 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4651 | (exit $ac_status); }; }; then | |
4652 | ac_cv_sizeof_int=`cat conftest.val` | |
4653 | else | |
4654 | echo "$as_me: program exited with status $ac_status" >&5 | |
4655 | echo "$as_me: failed program was:" >&5 | |
4656 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4657 | ||
4658 | ( exit $ac_status ) | |
4659 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 | |
4660 | See \`config.log' for more details." >&5 | |
4661 | echo "$as_me: error: cannot compute sizeof (int), 77 | |
4662 | See \`config.log' for more details." >&2;} | |
4663 | { (exit 1); exit 1; }; } | |
4664 | fi | |
4665 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
4666 | fi | |
4667 | fi | |
4668 | rm -f conftest.val | |
4669 | else | |
4670 | ac_cv_sizeof_int=0 | |
4671 | fi | |
4672 | fi | |
4673 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 | |
4674 | echo "${ECHO_T}$ac_cv_sizeof_int" >&6 | |
4675 | cat >>confdefs.h <<_ACEOF | |
4676 | #define SIZEOF_INT $ac_cv_sizeof_int | |
4677 | _ACEOF | |
4678 | ||
4679 | ||
4680 | echo "$as_me:$LINENO: checking for long" >&5 | |
4681 | echo $ECHO_N "checking for long... $ECHO_C" >&6 | |
4682 | if test "${ac_cv_type_long+set}" = set; then | |
4683 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4684 | else | |
4685 | cat >conftest.$ac_ext <<_ACEOF | |
4686 | /* confdefs.h. */ | |
4687 | _ACEOF | |
4688 | cat confdefs.h >>conftest.$ac_ext | |
4689 | cat >>conftest.$ac_ext <<_ACEOF | |
4690 | /* end confdefs.h. */ | |
4691 | $ac_includes_default | |
4692 | int | |
4693 | main () | |
4694 | { | |
4695 | if ((long *) 0) | |
4696 | return 0; | |
4697 | if (sizeof (long)) | |
4698 | return 0; | |
4699 | ; | |
4700 | return 0; | |
4701 | } | |
4702 | _ACEOF | |
4703 | rm -f conftest.$ac_objext | |
4704 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4705 | (eval $ac_compile) 2>conftest.er1 | |
4706 | ac_status=$? | |
4707 | grep -v '^ *+' conftest.er1 >conftest.err | |
4708 | rm -f conftest.er1 | |
4709 | cat conftest.err >&5 | |
4710 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4711 | (exit $ac_status); } && | |
dbad5e72 SE |
4712 | { ac_try='test -z "$ac_c_werror_flag" |
4713 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4714 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4715 | (eval $ac_try) 2>&5 | |
4716 | ac_status=$? | |
4717 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4718 | (exit $ac_status); }; } && | |
4719 | { ac_try='test -s conftest.$ac_objext' | |
4720 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4721 | (eval $ac_try) 2>&5 | |
4722 | ac_status=$? | |
4723 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4724 | (exit $ac_status); }; }; then | |
4725 | ac_cv_type_long=yes | |
4726 | else | |
4727 | echo "$as_me: failed program was:" >&5 | |
4728 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4729 | ||
4730 | ac_cv_type_long=no | |
4731 | fi | |
4732 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4733 | fi | |
4734 | echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 | |
4735 | echo "${ECHO_T}$ac_cv_type_long" >&6 | |
4736 | ||
4737 | echo "$as_me:$LINENO: checking size of long" >&5 | |
4738 | echo $ECHO_N "checking size of long... $ECHO_C" >&6 | |
4739 | if test "${ac_cv_sizeof_long+set}" = set; then | |
4740 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4741 | else | |
4742 | if test "$ac_cv_type_long" = yes; then | |
4743 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4744 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4745 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4746 | # This bug is HP SR number 8606223364. | |
4747 | if test "$cross_compiling" = yes; then | |
4748 | # Depending upon the size, compute the lo and hi bounds. | |
4749 | cat >conftest.$ac_ext <<_ACEOF | |
4750 | /* confdefs.h. */ | |
4751 | _ACEOF | |
4752 | cat confdefs.h >>conftest.$ac_ext | |
4753 | cat >>conftest.$ac_ext <<_ACEOF | |
4754 | /* end confdefs.h. */ | |
4755 | $ac_includes_default | |
4756 | int | |
4757 | main () | |
4758 | { | |
4759 | static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; | |
4760 | test_array [0] = 0 | |
4761 | ||
4762 | ; | |
4763 | return 0; | |
4764 | } | |
4765 | _ACEOF | |
4766 | rm -f conftest.$ac_objext | |
4767 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4768 | (eval $ac_compile) 2>conftest.er1 | |
4769 | ac_status=$? | |
4770 | grep -v '^ *+' conftest.er1 >conftest.err | |
4771 | rm -f conftest.er1 | |
4772 | cat conftest.err >&5 | |
4773 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4774 | (exit $ac_status); } && | |
dbad5e72 SE |
4775 | { ac_try='test -z "$ac_c_werror_flag" |
4776 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4777 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4778 | (eval $ac_try) 2>&5 | |
4779 | ac_status=$? | |
4780 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4781 | (exit $ac_status); }; } && | |
4782 | { ac_try='test -s conftest.$ac_objext' | |
4783 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4784 | (eval $ac_try) 2>&5 | |
4785 | ac_status=$? | |
4786 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4787 | (exit $ac_status); }; }; then | |
4788 | ac_lo=0 ac_mid=0 | |
4789 | while :; do | |
4790 | cat >conftest.$ac_ext <<_ACEOF | |
4791 | /* confdefs.h. */ | |
4792 | _ACEOF | |
4793 | cat confdefs.h >>conftest.$ac_ext | |
4794 | cat >>conftest.$ac_ext <<_ACEOF | |
4795 | /* end confdefs.h. */ | |
4796 | $ac_includes_default | |
4797 | int | |
4798 | main () | |
4799 | { | |
4800 | static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; | |
4801 | test_array [0] = 0 | |
4802 | ||
4803 | ; | |
4804 | return 0; | |
4805 | } | |
4806 | _ACEOF | |
4807 | rm -f conftest.$ac_objext | |
4808 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4809 | (eval $ac_compile) 2>conftest.er1 | |
4810 | ac_status=$? | |
4811 | grep -v '^ *+' conftest.er1 >conftest.err | |
4812 | rm -f conftest.er1 | |
4813 | cat conftest.err >&5 | |
4814 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4815 | (exit $ac_status); } && | |
dbad5e72 SE |
4816 | { ac_try='test -z "$ac_c_werror_flag" |
4817 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4818 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4819 | (eval $ac_try) 2>&5 | |
4820 | ac_status=$? | |
4821 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4822 | (exit $ac_status); }; } && | |
4823 | { ac_try='test -s conftest.$ac_objext' | |
4824 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4825 | (eval $ac_try) 2>&5 | |
4826 | ac_status=$? | |
4827 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4828 | (exit $ac_status); }; }; then | |
4829 | ac_hi=$ac_mid; break | |
4830 | else | |
4831 | echo "$as_me: failed program was:" >&5 | |
4832 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4833 | ||
4834 | ac_lo=`expr $ac_mid + 1` | |
4835 | if test $ac_lo -le $ac_mid; then | |
4836 | ac_lo= ac_hi= | |
4837 | break | |
4838 | fi | |
4839 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4840 | fi | |
4841 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4842 | done | |
4843 | else | |
4844 | echo "$as_me: failed program was:" >&5 | |
4845 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4846 | ||
4847 | cat >conftest.$ac_ext <<_ACEOF | |
4848 | /* confdefs.h. */ | |
4849 | _ACEOF | |
4850 | cat confdefs.h >>conftest.$ac_ext | |
4851 | cat >>conftest.$ac_ext <<_ACEOF | |
4852 | /* end confdefs.h. */ | |
4853 | $ac_includes_default | |
4854 | int | |
4855 | main () | |
4856 | { | |
4857 | static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; | |
4858 | test_array [0] = 0 | |
4859 | ||
4860 | ; | |
4861 | return 0; | |
4862 | } | |
4863 | _ACEOF | |
4864 | rm -f conftest.$ac_objext | |
4865 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4866 | (eval $ac_compile) 2>conftest.er1 | |
4867 | ac_status=$? | |
4868 | grep -v '^ *+' conftest.er1 >conftest.err | |
4869 | rm -f conftest.er1 | |
4870 | cat conftest.err >&5 | |
4871 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4872 | (exit $ac_status); } && | |
dbad5e72 SE |
4873 | { ac_try='test -z "$ac_c_werror_flag" |
4874 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4875 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4876 | (eval $ac_try) 2>&5 | |
4877 | ac_status=$? | |
4878 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4879 | (exit $ac_status); }; } && | |
4880 | { ac_try='test -s conftest.$ac_objext' | |
4881 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4882 | (eval $ac_try) 2>&5 | |
4883 | ac_status=$? | |
4884 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4885 | (exit $ac_status); }; }; then | |
4886 | ac_hi=-1 ac_mid=-1 | |
4887 | while :; do | |
4888 | cat >conftest.$ac_ext <<_ACEOF | |
4889 | /* confdefs.h. */ | |
4890 | _ACEOF | |
4891 | cat confdefs.h >>conftest.$ac_ext | |
4892 | cat >>conftest.$ac_ext <<_ACEOF | |
4893 | /* end confdefs.h. */ | |
4894 | $ac_includes_default | |
4895 | int | |
4896 | main () | |
4897 | { | |
4898 | static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; | |
4899 | test_array [0] = 0 | |
4900 | ||
4901 | ; | |
4902 | return 0; | |
4903 | } | |
4904 | _ACEOF | |
4905 | rm -f conftest.$ac_objext | |
4906 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4907 | (eval $ac_compile) 2>conftest.er1 | |
4908 | ac_status=$? | |
4909 | grep -v '^ *+' conftest.er1 >conftest.err | |
4910 | rm -f conftest.er1 | |
4911 | cat conftest.err >&5 | |
4912 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4913 | (exit $ac_status); } && | |
dbad5e72 SE |
4914 | { ac_try='test -z "$ac_c_werror_flag" |
4915 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4916 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4917 | (eval $ac_try) 2>&5 | |
4918 | ac_status=$? | |
4919 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4920 | (exit $ac_status); }; } && | |
4921 | { ac_try='test -s conftest.$ac_objext' | |
4922 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4923 | (eval $ac_try) 2>&5 | |
4924 | ac_status=$? | |
4925 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4926 | (exit $ac_status); }; }; then | |
4927 | ac_lo=$ac_mid; break | |
4928 | else | |
4929 | echo "$as_me: failed program was:" >&5 | |
4930 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4931 | ||
4932 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4933 | if test $ac_mid -le $ac_hi; then | |
4934 | ac_lo= ac_hi= | |
4935 | break | |
4936 | fi | |
4937 | ac_mid=`expr 2 '*' $ac_mid` | |
4938 | fi | |
4939 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4940 | done | |
4941 | else | |
4942 | echo "$as_me: failed program was:" >&5 | |
4943 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4944 | ||
4945 | ac_lo= ac_hi= | |
4946 | fi | |
4947 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4948 | fi | |
4949 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4950 | # Binary search between lo and hi bounds. | |
4951 | while test "x$ac_lo" != "x$ac_hi"; do | |
4952 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4953 | cat >conftest.$ac_ext <<_ACEOF | |
4954 | /* confdefs.h. */ | |
4955 | _ACEOF | |
4956 | cat confdefs.h >>conftest.$ac_ext | |
4957 | cat >>conftest.$ac_ext <<_ACEOF | |
4958 | /* end confdefs.h. */ | |
4959 | $ac_includes_default | |
4960 | int | |
4961 | main () | |
4962 | { | |
4963 | static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; | |
4964 | test_array [0] = 0 | |
4965 | ||
4966 | ; | |
4967 | return 0; | |
4968 | } | |
4969 | _ACEOF | |
4970 | rm -f conftest.$ac_objext | |
4971 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4972 | (eval $ac_compile) 2>conftest.er1 | |
4973 | ac_status=$? | |
4974 | grep -v '^ *+' conftest.er1 >conftest.err | |
4975 | rm -f conftest.er1 | |
4976 | cat conftest.err >&5 | |
4977 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4978 | (exit $ac_status); } && | |
dbad5e72 SE |
4979 | { ac_try='test -z "$ac_c_werror_flag" |
4980 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4981 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4982 | (eval $ac_try) 2>&5 | |
4983 | ac_status=$? | |
4984 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4985 | (exit $ac_status); }; } && | |
4986 | { ac_try='test -s conftest.$ac_objext' | |
4987 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4988 | (eval $ac_try) 2>&5 | |
4989 | ac_status=$? | |
4990 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4991 | (exit $ac_status); }; }; then | |
4992 | ac_hi=$ac_mid | |
4993 | else | |
4994 | echo "$as_me: failed program was:" >&5 | |
4995 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4996 | ||
4997 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4998 | fi | |
4999 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5000 | done | |
5001 | case $ac_lo in | |
5002 | ?*) ac_cv_sizeof_long=$ac_lo;; | |
5003 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 | |
5004 | See \`config.log' for more details." >&5 | |
5005 | echo "$as_me: error: cannot compute sizeof (long), 77 | |
5006 | See \`config.log' for more details." >&2;} | |
5007 | { (exit 1); exit 1; }; } ;; | |
5008 | esac | |
5009 | else | |
5010 | if test "$cross_compiling" = yes; then | |
dbad5e72 SE |
5011 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
5012 | See \`config.log' for more details." >&5 | |
5013 | echo "$as_me: error: cannot run test program while cross compiling | |
5014 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
5015 | { (exit 1); exit 1; }; } |
5016 | else | |
5017 | cat >conftest.$ac_ext <<_ACEOF | |
5018 | /* confdefs.h. */ | |
5019 | _ACEOF | |
5020 | cat confdefs.h >>conftest.$ac_ext | |
5021 | cat >>conftest.$ac_ext <<_ACEOF | |
5022 | /* end confdefs.h. */ | |
5023 | $ac_includes_default | |
5024 | long longval () { return (long) (sizeof (long)); } | |
5025 | unsigned long ulongval () { return (long) (sizeof (long)); } | |
5026 | #include <stdio.h> | |
5027 | #include <stdlib.h> | |
5028 | int | |
5029 | main () | |
5030 | { | |
5031 | ||
5032 | FILE *f = fopen ("conftest.val", "w"); | |
5033 | if (! f) | |
5034 | exit (1); | |
5035 | if (((long) (sizeof (long))) < 0) | |
5036 | { | |
5037 | long i = longval (); | |
5038 | if (i != ((long) (sizeof (long)))) | |
5039 | exit (1); | |
5040 | fprintf (f, "%ld\n", i); | |
5041 | } | |
5042 | else | |
5043 | { | |
5044 | unsigned long i = ulongval (); | |
5045 | if (i != ((long) (sizeof (long)))) | |
5046 | exit (1); | |
5047 | fprintf (f, "%lu\n", i); | |
5048 | } | |
5049 | exit (ferror (f) || fclose (f) != 0); | |
5050 | ||
5051 | ; | |
5052 | return 0; | |
5053 | } | |
5054 | _ACEOF | |
5055 | rm -f conftest$ac_exeext | |
5056 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5057 | (eval $ac_link) 2>&5 | |
5058 | ac_status=$? | |
5059 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5060 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5061 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5062 | (eval $ac_try) 2>&5 | |
5063 | ac_status=$? | |
5064 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5065 | (exit $ac_status); }; }; then | |
5066 | ac_cv_sizeof_long=`cat conftest.val` | |
5067 | else | |
5068 | echo "$as_me: program exited with status $ac_status" >&5 | |
5069 | echo "$as_me: failed program was:" >&5 | |
5070 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5071 | ||
5072 | ( exit $ac_status ) | |
5073 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 | |
5074 | See \`config.log' for more details." >&5 | |
5075 | echo "$as_me: error: cannot compute sizeof (long), 77 | |
5076 | See \`config.log' for more details." >&2;} | |
5077 | { (exit 1); exit 1; }; } | |
5078 | fi | |
5079 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
5080 | fi | |
5081 | fi | |
5082 | rm -f conftest.val | |
5083 | else | |
5084 | ac_cv_sizeof_long=0 | |
5085 | fi | |
5086 | fi | |
5087 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 | |
5088 | echo "${ECHO_T}$ac_cv_sizeof_long" >&6 | |
5089 | cat >>confdefs.h <<_ACEOF | |
5090 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5091 | _ACEOF | |
5092 | ||
5093 | ||
5ec1c5e6 KC |
5094 | echo "$as_me:$LINENO: checking for long long" >&5 |
5095 | echo $ECHO_N "checking for long long... $ECHO_C" >&6 | |
5096 | if test "${ac_cv_type_long_long+set}" = set; then | |
5097 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5098 | else | |
5099 | cat >conftest.$ac_ext <<_ACEOF | |
5100 | /* confdefs.h. */ | |
5101 | _ACEOF | |
5102 | cat confdefs.h >>conftest.$ac_ext | |
5103 | cat >>conftest.$ac_ext <<_ACEOF | |
5104 | /* end confdefs.h. */ | |
5105 | $ac_includes_default | |
5106 | int | |
5107 | main () | |
5108 | { | |
5109 | if ((long long *) 0) | |
5110 | return 0; | |
5111 | if (sizeof (long long)) | |
5112 | return 0; | |
5113 | ; | |
5114 | return 0; | |
5115 | } | |
5116 | _ACEOF | |
5117 | rm -f conftest.$ac_objext | |
5118 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5119 | (eval $ac_compile) 2>conftest.er1 | |
5120 | ac_status=$? | |
5121 | grep -v '^ *+' conftest.er1 >conftest.err | |
5122 | rm -f conftest.er1 | |
5123 | cat conftest.err >&5 | |
5124 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5125 | (exit $ac_status); } && | |
dbad5e72 SE |
5126 | { ac_try='test -z "$ac_c_werror_flag" |
5127 | || test ! -s conftest.err' | |
5ec1c5e6 KC |
5128 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5129 | (eval $ac_try) 2>&5 | |
5130 | ac_status=$? | |
5131 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5132 | (exit $ac_status); }; } && | |
5133 | { ac_try='test -s conftest.$ac_objext' | |
5134 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5135 | (eval $ac_try) 2>&5 | |
5136 | ac_status=$? | |
5137 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5138 | (exit $ac_status); }; }; then | |
5139 | ac_cv_type_long_long=yes | |
5140 | else | |
5141 | echo "$as_me: failed program was:" >&5 | |
5142 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5143 | ||
5144 | ac_cv_type_long_long=no | |
5145 | fi | |
5146 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5147 | fi | |
5148 | echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 | |
5149 | echo "${ECHO_T}$ac_cv_type_long_long" >&6 | |
5150 | if test $ac_cv_type_long_long = yes; then | |
5151 | ||
5152 | cat >>confdefs.h <<_ACEOF | |
5153 | #define HAVE_LONG_LONG 1 | |
5154 | _ACEOF | |
5155 | ||
5156 | echo "$as_me:$LINENO: checking for long long" >&5 | |
bf3b7cd3 JD |
5157 | echo $ECHO_N "checking for long long... $ECHO_C" >&6 |
5158 | if test "${ac_cv_type_long_long+set}" = set; then | |
5159 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5160 | else | |
5161 | cat >conftest.$ac_ext <<_ACEOF | |
5162 | /* confdefs.h. */ | |
5163 | _ACEOF | |
5164 | cat confdefs.h >>conftest.$ac_ext | |
5165 | cat >>conftest.$ac_ext <<_ACEOF | |
5166 | /* end confdefs.h. */ | |
5167 | $ac_includes_default | |
5168 | int | |
5169 | main () | |
5170 | { | |
5171 | if ((long long *) 0) | |
5172 | return 0; | |
5173 | if (sizeof (long long)) | |
5174 | return 0; | |
5175 | ; | |
5176 | return 0; | |
5177 | } | |
5178 | _ACEOF | |
5179 | rm -f conftest.$ac_objext | |
5180 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5181 | (eval $ac_compile) 2>conftest.er1 | |
5182 | ac_status=$? | |
5183 | grep -v '^ *+' conftest.er1 >conftest.err | |
5184 | rm -f conftest.er1 | |
5185 | cat conftest.err >&5 | |
5186 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5187 | (exit $ac_status); } && | |
dbad5e72 SE |
5188 | { ac_try='test -z "$ac_c_werror_flag" |
5189 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5190 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5191 | (eval $ac_try) 2>&5 | |
5192 | ac_status=$? | |
5193 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5194 | (exit $ac_status); }; } && | |
5195 | { ac_try='test -s conftest.$ac_objext' | |
5196 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5197 | (eval $ac_try) 2>&5 | |
5198 | ac_status=$? | |
5199 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5200 | (exit $ac_status); }; }; then | |
5201 | ac_cv_type_long_long=yes | |
5202 | else | |
5203 | echo "$as_me: failed program was:" >&5 | |
5204 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5205 | ||
5206 | ac_cv_type_long_long=no | |
5207 | fi | |
5208 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5209 | fi | |
5210 | echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 | |
5211 | echo "${ECHO_T}$ac_cv_type_long_long" >&6 | |
5212 | ||
5213 | echo "$as_me:$LINENO: checking size of long long" >&5 | |
5214 | echo $ECHO_N "checking size of long long... $ECHO_C" >&6 | |
5215 | if test "${ac_cv_sizeof_long_long+set}" = set; then | |
5216 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5217 | else | |
5218 | if test "$ac_cv_type_long_long" = yes; then | |
5219 | # The cast to unsigned long works around a bug in the HP C Compiler | |
5220 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5221 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5222 | # This bug is HP SR number 8606223364. | |
5223 | if test "$cross_compiling" = yes; then | |
5224 | # Depending upon the size, compute the lo and hi bounds. | |
5225 | cat >conftest.$ac_ext <<_ACEOF | |
5226 | /* confdefs.h. */ | |
5227 | _ACEOF | |
5228 | cat confdefs.h >>conftest.$ac_ext | |
5229 | cat >>conftest.$ac_ext <<_ACEOF | |
5230 | /* end confdefs.h. */ | |
5231 | $ac_includes_default | |
5232 | int | |
5233 | main () | |
5234 | { | |
5235 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; | |
5236 | test_array [0] = 0 | |
5237 | ||
5238 | ; | |
5239 | return 0; | |
5240 | } | |
5241 | _ACEOF | |
5242 | rm -f conftest.$ac_objext | |
5243 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5244 | (eval $ac_compile) 2>conftest.er1 | |
5245 | ac_status=$? | |
5246 | grep -v '^ *+' conftest.er1 >conftest.err | |
5247 | rm -f conftest.er1 | |
5248 | cat conftest.err >&5 | |
5249 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5250 | (exit $ac_status); } && | |
dbad5e72 SE |
5251 | { ac_try='test -z "$ac_c_werror_flag" |
5252 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5253 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5254 | (eval $ac_try) 2>&5 | |
5255 | ac_status=$? | |
5256 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5257 | (exit $ac_status); }; } && | |
5258 | { ac_try='test -s conftest.$ac_objext' | |
5259 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5260 | (eval $ac_try) 2>&5 | |
5261 | ac_status=$? | |
5262 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5263 | (exit $ac_status); }; }; then | |
5264 | ac_lo=0 ac_mid=0 | |
5265 | while :; do | |
5266 | cat >conftest.$ac_ext <<_ACEOF | |
5267 | /* confdefs.h. */ | |
5268 | _ACEOF | |
5269 | cat confdefs.h >>conftest.$ac_ext | |
5270 | cat >>conftest.$ac_ext <<_ACEOF | |
5271 | /* end confdefs.h. */ | |
5272 | $ac_includes_default | |
5273 | int | |
5274 | main () | |
5275 | { | |
5276 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; | |
5277 | test_array [0] = 0 | |
5278 | ||
5279 | ; | |
5280 | return 0; | |
5281 | } | |
5282 | _ACEOF | |
5283 | rm -f conftest.$ac_objext | |
5284 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5285 | (eval $ac_compile) 2>conftest.er1 | |
5286 | ac_status=$? | |
5287 | grep -v '^ *+' conftest.er1 >conftest.err | |
5288 | rm -f conftest.er1 | |
5289 | cat conftest.err >&5 | |
5290 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5291 | (exit $ac_status); } && | |
dbad5e72 SE |
5292 | { ac_try='test -z "$ac_c_werror_flag" |
5293 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5294 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5295 | (eval $ac_try) 2>&5 | |
5296 | ac_status=$? | |
5297 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5298 | (exit $ac_status); }; } && | |
5299 | { ac_try='test -s conftest.$ac_objext' | |
5300 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5301 | (eval $ac_try) 2>&5 | |
5302 | ac_status=$? | |
5303 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5304 | (exit $ac_status); }; }; then | |
5305 | ac_hi=$ac_mid; break | |
5306 | else | |
5307 | echo "$as_me: failed program was:" >&5 | |
5308 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5309 | ||
5310 | ac_lo=`expr $ac_mid + 1` | |
5311 | if test $ac_lo -le $ac_mid; then | |
5312 | ac_lo= ac_hi= | |
5313 | break | |
5314 | fi | |
5315 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
5316 | fi | |
5317 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5318 | done | |
5319 | else | |
5320 | echo "$as_me: failed program was:" >&5 | |
5321 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5322 | ||
5323 | cat >conftest.$ac_ext <<_ACEOF | |
5324 | /* confdefs.h. */ | |
5325 | _ACEOF | |
5326 | cat confdefs.h >>conftest.$ac_ext | |
5327 | cat >>conftest.$ac_ext <<_ACEOF | |
5328 | /* end confdefs.h. */ | |
5329 | $ac_includes_default | |
5330 | int | |
5331 | main () | |
5332 | { | |
5333 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)]; | |
5334 | test_array [0] = 0 | |
5335 | ||
5336 | ; | |
5337 | return 0; | |
5338 | } | |
5339 | _ACEOF | |
5340 | rm -f conftest.$ac_objext | |
5341 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5342 | (eval $ac_compile) 2>conftest.er1 | |
5343 | ac_status=$? | |
5344 | grep -v '^ *+' conftest.er1 >conftest.err | |
5345 | rm -f conftest.er1 | |
5346 | cat conftest.err >&5 | |
5347 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5348 | (exit $ac_status); } && | |
dbad5e72 SE |
5349 | { ac_try='test -z "$ac_c_werror_flag" |
5350 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5351 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5352 | (eval $ac_try) 2>&5 | |
5353 | ac_status=$? | |
5354 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5355 | (exit $ac_status); }; } && | |
5356 | { ac_try='test -s conftest.$ac_objext' | |
5357 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5358 | (eval $ac_try) 2>&5 | |
5359 | ac_status=$? | |
5360 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5361 | (exit $ac_status); }; }; then | |
5362 | ac_hi=-1 ac_mid=-1 | |
5363 | while :; do | |
5364 | cat >conftest.$ac_ext <<_ACEOF | |
5365 | /* confdefs.h. */ | |
5366 | _ACEOF | |
5367 | cat confdefs.h >>conftest.$ac_ext | |
5368 | cat >>conftest.$ac_ext <<_ACEOF | |
5369 | /* end confdefs.h. */ | |
5370 | $ac_includes_default | |
5371 | int | |
5372 | main () | |
5373 | { | |
5374 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; | |
5375 | test_array [0] = 0 | |
5376 | ||
5377 | ; | |
5378 | return 0; | |
5379 | } | |
5380 | _ACEOF | |
5381 | rm -f conftest.$ac_objext | |
5382 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5383 | (eval $ac_compile) 2>conftest.er1 | |
5384 | ac_status=$? | |
5385 | grep -v '^ *+' conftest.er1 >conftest.err | |
5386 | rm -f conftest.er1 | |
5387 | cat conftest.err >&5 | |
5388 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5389 | (exit $ac_status); } && | |
dbad5e72 SE |
5390 | { ac_try='test -z "$ac_c_werror_flag" |
5391 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5392 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5393 | (eval $ac_try) 2>&5 | |
5394 | ac_status=$? | |
5395 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5396 | (exit $ac_status); }; } && | |
5397 | { ac_try='test -s conftest.$ac_objext' | |
5398 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5399 | (eval $ac_try) 2>&5 | |
5400 | ac_status=$? | |
5401 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5402 | (exit $ac_status); }; }; then | |
5403 | ac_lo=$ac_mid; break | |
5404 | else | |
5405 | echo "$as_me: failed program was:" >&5 | |
5406 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5407 | ||
5408 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
5409 | if test $ac_mid -le $ac_hi; then | |
5410 | ac_lo= ac_hi= | |
5411 | break | |
5412 | fi | |
5413 | ac_mid=`expr 2 '*' $ac_mid` | |
5414 | fi | |
5415 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5416 | done | |
5417 | else | |
5418 | echo "$as_me: failed program was:" >&5 | |
5419 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5420 | ||
5421 | ac_lo= ac_hi= | |
5422 | fi | |
5423 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5424 | fi | |
5425 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5426 | # Binary search between lo and hi bounds. | |
5427 | while test "x$ac_lo" != "x$ac_hi"; do | |
5428 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
5429 | cat >conftest.$ac_ext <<_ACEOF | |
5430 | /* confdefs.h. */ | |
5431 | _ACEOF | |
5432 | cat confdefs.h >>conftest.$ac_ext | |
5433 | cat >>conftest.$ac_ext <<_ACEOF | |
5434 | /* end confdefs.h. */ | |
5435 | $ac_includes_default | |
5436 | int | |
5437 | main () | |
5438 | { | |
5439 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; | |
5440 | test_array [0] = 0 | |
5441 | ||
5442 | ; | |
5443 | return 0; | |
5444 | } | |
5445 | _ACEOF | |
5446 | rm -f conftest.$ac_objext | |
5447 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5448 | (eval $ac_compile) 2>conftest.er1 | |
5449 | ac_status=$? | |
5450 | grep -v '^ *+' conftest.er1 >conftest.err | |
5451 | rm -f conftest.er1 | |
5452 | cat conftest.err >&5 | |
5453 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5454 | (exit $ac_status); } && | |
dbad5e72 SE |
5455 | { ac_try='test -z "$ac_c_werror_flag" |
5456 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5457 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5458 | (eval $ac_try) 2>&5 | |
5459 | ac_status=$? | |
5460 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5461 | (exit $ac_status); }; } && | |
5462 | { ac_try='test -s conftest.$ac_objext' | |
5463 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5464 | (eval $ac_try) 2>&5 | |
5465 | ac_status=$? | |
5466 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5467 | (exit $ac_status); }; }; then | |
5468 | ac_hi=$ac_mid | |
5469 | else | |
5470 | echo "$as_me: failed program was:" >&5 | |
5471 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5472 | ||
5473 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
5474 | fi | |
5475 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5476 | done | |
5477 | case $ac_lo in | |
5478 | ?*) ac_cv_sizeof_long_long=$ac_lo;; | |
5479 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 | |
5480 | See \`config.log' for more details." >&5 | |
5481 | echo "$as_me: error: cannot compute sizeof (long long), 77 | |
5482 | See \`config.log' for more details." >&2;} | |
5483 | { (exit 1); exit 1; }; } ;; | |
5484 | esac | |
5485 | else | |
5486 | if test "$cross_compiling" = yes; then | |
dbad5e72 SE |
5487 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
5488 | See \`config.log' for more details." >&5 | |
5489 | echo "$as_me: error: cannot run test program while cross compiling | |
5490 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
5491 | { (exit 1); exit 1; }; } |
5492 | else | |
5493 | cat >conftest.$ac_ext <<_ACEOF | |
5494 | /* confdefs.h. */ | |
5495 | _ACEOF | |
5496 | cat confdefs.h >>conftest.$ac_ext | |
5497 | cat >>conftest.$ac_ext <<_ACEOF | |
5498 | /* end confdefs.h. */ | |
5499 | $ac_includes_default | |
5500 | long longval () { return (long) (sizeof (long long)); } | |
5501 | unsigned long ulongval () { return (long) (sizeof (long long)); } | |
5502 | #include <stdio.h> | |
5503 | #include <stdlib.h> | |
5504 | int | |
5505 | main () | |
5506 | { | |
5507 | ||
5508 | FILE *f = fopen ("conftest.val", "w"); | |
5509 | if (! f) | |
5510 | exit (1); | |
5511 | if (((long) (sizeof (long long))) < 0) | |
5512 | { | |
5513 | long i = longval (); | |
5514 | if (i != ((long) (sizeof (long long)))) | |
5515 | exit (1); | |
5516 | fprintf (f, "%ld\n", i); | |
5517 | } | |
5518 | else | |
5519 | { | |
5520 | unsigned long i = ulongval (); | |
5521 | if (i != ((long) (sizeof (long long)))) | |
5522 | exit (1); | |
5523 | fprintf (f, "%lu\n", i); | |
5524 | } | |
5525 | exit (ferror (f) || fclose (f) != 0); | |
5526 | ||
5527 | ; | |
5528 | return 0; | |
5529 | } | |
5530 | _ACEOF | |
5531 | rm -f conftest$ac_exeext | |
5532 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5533 | (eval $ac_link) 2>&5 | |
5534 | ac_status=$? | |
5535 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5536 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5537 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5538 | (eval $ac_try) 2>&5 | |
5539 | ac_status=$? | |
5540 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5541 | (exit $ac_status); }; }; then | |
5542 | ac_cv_sizeof_long_long=`cat conftest.val` | |
5543 | else | |
5544 | echo "$as_me: program exited with status $ac_status" >&5 | |
5545 | echo "$as_me: failed program was:" >&5 | |
5546 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5547 | ||
5548 | ( exit $ac_status ) | |
5549 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 | |
5550 | See \`config.log' for more details." >&5 | |
5551 | echo "$as_me: error: cannot compute sizeof (long long), 77 | |
5552 | See \`config.log' for more details." >&2;} | |
5553 | { (exit 1); exit 1; }; } | |
5554 | fi | |
5555 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
5556 | fi | |
5557 | fi | |
5558 | rm -f conftest.val | |
5559 | else | |
5560 | ac_cv_sizeof_long_long=0 | |
5561 | fi | |
5562 | fi | |
5563 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 | |
5564 | echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 | |
5565 | cat >>confdefs.h <<_ACEOF | |
5566 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
5567 | _ACEOF | |
5568 | ||
5569 | ||
5570 | fi | |
5ec1c5e6 KC |
5571 | |
5572 | echo "$as_me:$LINENO: checking for __int64" >&5 | |
5573 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 | |
5574 | if test "${ac_cv_type___int64+set}" = set; then | |
5575 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5576 | else | |
5577 | cat >conftest.$ac_ext <<_ACEOF | |
5578 | /* confdefs.h. */ | |
5579 | _ACEOF | |
5580 | cat confdefs.h >>conftest.$ac_ext | |
5581 | cat >>conftest.$ac_ext <<_ACEOF | |
5582 | /* end confdefs.h. */ | |
5583 | $ac_includes_default | |
5584 | int | |
5585 | main () | |
5586 | { | |
5587 | if ((__int64 *) 0) | |
5588 | return 0; | |
5589 | if (sizeof (__int64)) | |
5590 | return 0; | |
5591 | ; | |
5592 | return 0; | |
5593 | } | |
5594 | _ACEOF | |
5595 | rm -f conftest.$ac_objext | |
5596 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5597 | (eval $ac_compile) 2>conftest.er1 | |
5598 | ac_status=$? | |
5599 | grep -v '^ *+' conftest.er1 >conftest.err | |
5600 | rm -f conftest.er1 | |
5601 | cat conftest.err >&5 | |
5602 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5603 | (exit $ac_status); } && | |
dbad5e72 SE |
5604 | { ac_try='test -z "$ac_c_werror_flag" |
5605 | || test ! -s conftest.err' | |
5ec1c5e6 KC |
5606 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5607 | (eval $ac_try) 2>&5 | |
5608 | ac_status=$? | |
5609 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5610 | (exit $ac_status); }; } && | |
5611 | { ac_try='test -s conftest.$ac_objext' | |
5612 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5613 | (eval $ac_try) 2>&5 | |
5614 | ac_status=$? | |
5615 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5616 | (exit $ac_status); }; }; then | |
5617 | ac_cv_type___int64=yes | |
5618 | else | |
5619 | echo "$as_me: failed program was:" >&5 | |
5620 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5621 | ||
5622 | ac_cv_type___int64=no | |
5623 | fi | |
5624 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5625 | fi | |
5626 | echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 | |
5627 | echo "${ECHO_T}$ac_cv_type___int64" >&6 | |
5628 | if test $ac_cv_type___int64 = yes; then | |
5629 | ||
5630 | cat >>confdefs.h <<_ACEOF | |
5631 | #define HAVE___INT64 1 | |
5632 | _ACEOF | |
5633 | ||
5634 | echo "$as_me:$LINENO: checking for __int64" >&5 | |
bf3b7cd3 JD |
5635 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 |
5636 | if test "${ac_cv_type___int64+set}" = set; then | |
5637 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5638 | else | |
ba479fd2 | 5639 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5640 | /* confdefs.h. */ |
5641 | _ACEOF | |
5642 | cat confdefs.h >>conftest.$ac_ext | |
5643 | cat >>conftest.$ac_ext <<_ACEOF | |
5644 | /* end confdefs.h. */ | |
bf3b7cd3 | 5645 | $ac_includes_default |
ba479fd2 NN |
5646 | int |
5647 | main () | |
5648 | { | |
bf3b7cd3 JD |
5649 | if ((__int64 *) 0) |
5650 | return 0; | |
5651 | if (sizeof (__int64)) | |
5652 | return 0; | |
ba479fd2 NN |
5653 | ; |
5654 | return 0; | |
5655 | } | |
5656 | _ACEOF | |
5657 | rm -f conftest.$ac_objext | |
5658 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5659 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5660 | ac_status=$? |
86da66b5 HPN |
5661 | grep -v '^ *+' conftest.er1 >conftest.err |
5662 | rm -f conftest.er1 | |
5663 | cat conftest.err >&5 | |
ba479fd2 NN |
5664 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5665 | (exit $ac_status); } && | |
dbad5e72 SE |
5666 | { ac_try='test -z "$ac_c_werror_flag" |
5667 | || test ! -s conftest.err' | |
86da66b5 HPN |
5668 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5669 | (eval $ac_try) 2>&5 | |
5670 | ac_status=$? | |
5671 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5672 | (exit $ac_status); }; } && | |
5673 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5674 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5675 | (eval $ac_try) 2>&5 | |
5676 | ac_status=$? | |
5677 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5678 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5679 | ac_cv_type___int64=yes |
75b6f3fd | 5680 | else |
ba479fd2 NN |
5681 | echo "$as_me: failed program was:" >&5 |
5682 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5683 | ||
bf3b7cd3 | 5684 | ac_cv_type___int64=no |
75b6f3fd | 5685 | fi |
86da66b5 | 5686 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75b6f3fd | 5687 | fi |
bf3b7cd3 JD |
5688 | echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 |
5689 | echo "${ECHO_T}$ac_cv_type___int64" >&6 | |
75b6f3fd | 5690 | |
bf3b7cd3 JD |
5691 | echo "$as_me:$LINENO: checking size of __int64" >&5 |
5692 | echo $ECHO_N "checking size of __int64... $ECHO_C" >&6 | |
5693 | if test "${ac_cv_sizeof___int64+set}" = set; then | |
ba479fd2 | 5694 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
414d23ae | 5695 | else |
bf3b7cd3 JD |
5696 | if test "$ac_cv_type___int64" = yes; then |
5697 | # The cast to unsigned long works around a bug in the HP C Compiler | |
5698 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5699 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5700 | # This bug is HP SR number 8606223364. | |
5701 | if test "$cross_compiling" = yes; then | |
5702 | # Depending upon the size, compute the lo and hi bounds. | |
5703 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5704 | /* confdefs.h. */ |
5705 | _ACEOF | |
5706 | cat confdefs.h >>conftest.$ac_ext | |
5707 | cat >>conftest.$ac_ext <<_ACEOF | |
5708 | /* end confdefs.h. */ | |
bf3b7cd3 | 5709 | $ac_includes_default |
ba479fd2 NN |
5710 | int |
5711 | main () | |
5712 | { | |
bf3b7cd3 JD |
5713 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)]; |
5714 | test_array [0] = 0 | |
5715 | ||
ba479fd2 NN |
5716 | ; |
5717 | return 0; | |
5718 | } | |
5719 | _ACEOF | |
5720 | rm -f conftest.$ac_objext | |
5721 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5722 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5723 | ac_status=$? |
86da66b5 HPN |
5724 | grep -v '^ *+' conftest.er1 >conftest.err |
5725 | rm -f conftest.er1 | |
5726 | cat conftest.err >&5 | |
ba479fd2 NN |
5727 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5728 | (exit $ac_status); } && | |
dbad5e72 SE |
5729 | { ac_try='test -z "$ac_c_werror_flag" |
5730 | || test ! -s conftest.err' | |
86da66b5 HPN |
5731 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5732 | (eval $ac_try) 2>&5 | |
5733 | ac_status=$? | |
5734 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5735 | (exit $ac_status); }; } && | |
5736 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5737 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5738 | (eval $ac_try) 2>&5 | |
5739 | ac_status=$? | |
5740 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5741 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5742 | ac_lo=0 ac_mid=0 |
5743 | while :; do | |
5744 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5745 | /* confdefs.h. */ |
5746 | _ACEOF | |
5747 | cat confdefs.h >>conftest.$ac_ext | |
5748 | cat >>conftest.$ac_ext <<_ACEOF | |
5749 | /* end confdefs.h. */ | |
bf3b7cd3 | 5750 | $ac_includes_default |
ba479fd2 NN |
5751 | int |
5752 | main () | |
5753 | { | |
bf3b7cd3 JD |
5754 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; |
5755 | test_array [0] = 0 | |
5756 | ||
ba479fd2 NN |
5757 | ; |
5758 | return 0; | |
5759 | } | |
5760 | _ACEOF | |
5761 | rm -f conftest.$ac_objext | |
5762 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5763 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5764 | ac_status=$? |
86da66b5 HPN |
5765 | grep -v '^ *+' conftest.er1 >conftest.err |
5766 | rm -f conftest.er1 | |
5767 | cat conftest.err >&5 | |
ba479fd2 NN |
5768 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5769 | (exit $ac_status); } && | |
dbad5e72 SE |
5770 | { ac_try='test -z "$ac_c_werror_flag" |
5771 | || test ! -s conftest.err' | |
86da66b5 HPN |
5772 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5773 | (eval $ac_try) 2>&5 | |
5774 | ac_status=$? | |
5775 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5776 | (exit $ac_status); }; } && | |
5777 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5778 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5779 | (eval $ac_try) 2>&5 | |
5780 | ac_status=$? | |
5781 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5782 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5783 | ac_hi=$ac_mid; break |
75e93faa | 5784 | else |
ba479fd2 NN |
5785 | echo "$as_me: failed program was:" >&5 |
5786 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5787 | ||
bf3b7cd3 JD |
5788 | ac_lo=`expr $ac_mid + 1` |
5789 | if test $ac_lo -le $ac_mid; then | |
5790 | ac_lo= ac_hi= | |
5791 | break | |
5792 | fi | |
5793 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
75e93faa | 5794 | fi |
86da66b5 | 5795 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 5796 | done |
75e93faa | 5797 | else |
bf3b7cd3 JD |
5798 | echo "$as_me: failed program was:" >&5 |
5799 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5800 | ||
5801 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5802 | /* confdefs.h. */ |
5803 | _ACEOF | |
5804 | cat confdefs.h >>conftest.$ac_ext | |
5805 | cat >>conftest.$ac_ext <<_ACEOF | |
5806 | /* end confdefs.h. */ | |
bf3b7cd3 | 5807 | $ac_includes_default |
ba479fd2 NN |
5808 | int |
5809 | main () | |
5810 | { | |
bf3b7cd3 JD |
5811 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)]; |
5812 | test_array [0] = 0 | |
5813 | ||
ba479fd2 NN |
5814 | ; |
5815 | return 0; | |
5816 | } | |
5817 | _ACEOF | |
5818 | rm -f conftest.$ac_objext | |
5819 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5820 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5821 | ac_status=$? |
86da66b5 HPN |
5822 | grep -v '^ *+' conftest.er1 >conftest.err |
5823 | rm -f conftest.er1 | |
5824 | cat conftest.err >&5 | |
ba479fd2 NN |
5825 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5826 | (exit $ac_status); } && | |
dbad5e72 SE |
5827 | { ac_try='test -z "$ac_c_werror_flag" |
5828 | || test ! -s conftest.err' | |
86da66b5 HPN |
5829 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5830 | (eval $ac_try) 2>&5 | |
5831 | ac_status=$? | |
5832 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5833 | (exit $ac_status); }; } && | |
5834 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5835 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5836 | (eval $ac_try) 2>&5 | |
5837 | ac_status=$? | |
5838 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5839 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5840 | ac_hi=-1 ac_mid=-1 |
5841 | while :; do | |
5842 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5843 | /* confdefs.h. */ |
5844 | _ACEOF | |
5845 | cat confdefs.h >>conftest.$ac_ext | |
5846 | cat >>conftest.$ac_ext <<_ACEOF | |
5847 | /* end confdefs.h. */ | |
bf3b7cd3 | 5848 | $ac_includes_default |
ba479fd2 NN |
5849 | int |
5850 | main () | |
5851 | { | |
bf3b7cd3 JD |
5852 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)]; |
5853 | test_array [0] = 0 | |
5854 | ||
ba479fd2 NN |
5855 | ; |
5856 | return 0; | |
5857 | } | |
5858 | _ACEOF | |
5859 | rm -f conftest.$ac_objext | |
5860 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5861 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5862 | ac_status=$? |
86da66b5 HPN |
5863 | grep -v '^ *+' conftest.er1 >conftest.err |
5864 | rm -f conftest.er1 | |
5865 | cat conftest.err >&5 | |
ba479fd2 NN |
5866 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5867 | (exit $ac_status); } && | |
dbad5e72 SE |
5868 | { ac_try='test -z "$ac_c_werror_flag" |
5869 | || test ! -s conftest.err' | |
86da66b5 HPN |
5870 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5871 | (eval $ac_try) 2>&5 | |
5872 | ac_status=$? | |
5873 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5874 | (exit $ac_status); }; } && | |
5875 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5876 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5877 | (eval $ac_try) 2>&5 | |
5878 | ac_status=$? | |
5879 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5880 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5881 | ac_lo=$ac_mid; break |
04cabffc | 5882 | else |
ba479fd2 NN |
5883 | echo "$as_me: failed program was:" >&5 |
5884 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5885 | ||
bf3b7cd3 JD |
5886 | ac_hi=`expr '(' $ac_mid ')' - 1` |
5887 | if test $ac_mid -le $ac_hi; then | |
5888 | ac_lo= ac_hi= | |
5889 | break | |
5890 | fi | |
5891 | ac_mid=`expr 2 '*' $ac_mid` | |
04cabffc | 5892 | fi |
86da66b5 | 5893 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5894 | done |
5895 | else | |
5896 | echo "$as_me: failed program was:" >&5 | |
5897 | sed 's/^/| /' conftest.$ac_ext >&5 | |
04cabffc | 5898 | |
bf3b7cd3 | 5899 | ac_lo= ac_hi= |
414d23ae | 5900 | fi |
bf3b7cd3 | 5901 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 5902 | fi |
bf3b7cd3 JD |
5903 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
5904 | # Binary search between lo and hi bounds. | |
5905 | while test "x$ac_lo" != "x$ac_hi"; do | |
5906 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
ba479fd2 | 5907 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5908 | /* confdefs.h. */ |
5909 | _ACEOF | |
5910 | cat confdefs.h >>conftest.$ac_ext | |
5911 | cat >>conftest.$ac_ext <<_ACEOF | |
5912 | /* end confdefs.h. */ | |
bf3b7cd3 | 5913 | $ac_includes_default |
ba479fd2 NN |
5914 | int |
5915 | main () | |
5916 | { | |
bf3b7cd3 JD |
5917 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; |
5918 | test_array [0] = 0 | |
5919 | ||
ba479fd2 NN |
5920 | ; |
5921 | return 0; | |
5922 | } | |
5923 | _ACEOF | |
5924 | rm -f conftest.$ac_objext | |
5925 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5926 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5927 | ac_status=$? |
86da66b5 HPN |
5928 | grep -v '^ *+' conftest.er1 >conftest.err |
5929 | rm -f conftest.er1 | |
5930 | cat conftest.err >&5 | |
ba479fd2 NN |
5931 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5932 | (exit $ac_status); } && | |
dbad5e72 SE |
5933 | { ac_try='test -z "$ac_c_werror_flag" |
5934 | || test ! -s conftest.err' | |
86da66b5 HPN |
5935 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5936 | (eval $ac_try) 2>&5 | |
5937 | ac_status=$? | |
5938 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5939 | (exit $ac_status); }; } && | |
5940 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5941 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5942 | (eval $ac_try) 2>&5 | |
5943 | ac_status=$? | |
5944 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5945 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5946 | ac_hi=$ac_mid |
75e93faa | 5947 | else |
ba479fd2 NN |
5948 | echo "$as_me: failed program was:" >&5 |
5949 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5950 | ||
bf3b7cd3 | 5951 | ac_lo=`expr '(' $ac_mid ')' + 1` |
75e93faa | 5952 | fi |
86da66b5 | 5953 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 5954 | done |
bf3b7cd3 JD |
5955 | case $ac_lo in |
5956 | ?*) ac_cv_sizeof___int64=$ac_lo;; | |
5957 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 | |
5958 | See \`config.log' for more details." >&5 | |
5959 | echo "$as_me: error: cannot compute sizeof (__int64), 77 | |
5960 | See \`config.log' for more details." >&2;} | |
5961 | { (exit 1); exit 1; }; } ;; | |
5962 | esac | |
5963 | else | |
5964 | if test "$cross_compiling" = yes; then | |
dbad5e72 SE |
5965 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
5966 | See \`config.log' for more details." >&5 | |
5967 | echo "$as_me: error: cannot run test program while cross compiling | |
5968 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
5969 | { (exit 1); exit 1; }; } |
5970 | else | |
5971 | cat >conftest.$ac_ext <<_ACEOF | |
5972 | /* confdefs.h. */ | |
5973 | _ACEOF | |
5974 | cat confdefs.h >>conftest.$ac_ext | |
5975 | cat >>conftest.$ac_ext <<_ACEOF | |
5976 | /* end confdefs.h. */ | |
5977 | $ac_includes_default | |
5978 | long longval () { return (long) (sizeof (__int64)); } | |
5979 | unsigned long ulongval () { return (long) (sizeof (__int64)); } | |
5980 | #include <stdio.h> | |
5981 | #include <stdlib.h> | |
5982 | int | |
5983 | main () | |
5984 | { | |
414d23ae | 5985 | |
bf3b7cd3 JD |
5986 | FILE *f = fopen ("conftest.val", "w"); |
5987 | if (! f) | |
5988 | exit (1); | |
5989 | if (((long) (sizeof (__int64))) < 0) | |
5990 | { | |
5991 | long i = longval (); | |
5992 | if (i != ((long) (sizeof (__int64)))) | |
5993 | exit (1); | |
5994 | fprintf (f, "%ld\n", i); | |
5995 | } | |
5996 | else | |
5997 | { | |
5998 | unsigned long i = ulongval (); | |
5999 | if (i != ((long) (sizeof (__int64)))) | |
6000 | exit (1); | |
6001 | fprintf (f, "%lu\n", i); | |
6002 | } | |
6003 | exit (ferror (f) || fclose (f) != 0); | |
6004 | ||
6005 | ; | |
6006 | return 0; | |
6007 | } | |
6008 | _ACEOF | |
6009 | rm -f conftest$ac_exeext | |
6010 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6011 | (eval $ac_link) 2>&5 | |
6012 | ac_status=$? | |
6013 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6014 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6015 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6016 | (eval $ac_try) 2>&5 | |
6017 | ac_status=$? | |
6018 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6019 | (exit $ac_status); }; }; then | |
6020 | ac_cv_sizeof___int64=`cat conftest.val` | |
6021 | else | |
6022 | echo "$as_me: program exited with status $ac_status" >&5 | |
6023 | echo "$as_me: failed program was:" >&5 | |
6024 | sed 's/^/| /' conftest.$ac_ext >&5 | |
75e93faa | 6025 | |
bf3b7cd3 JD |
6026 | ( exit $ac_status ) |
6027 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 | |
6028 | See \`config.log' for more details." >&5 | |
6029 | echo "$as_me: error: cannot compute sizeof (__int64), 77 | |
6030 | See \`config.log' for more details." >&2;} | |
ba479fd2 | 6031 | { (exit 1); exit 1; }; } |
414d23ae | 6032 | fi |
bf3b7cd3 JD |
6033 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6034 | fi | |
6035 | fi | |
6036 | rm -f conftest.val | |
6037 | else | |
6038 | ac_cv_sizeof___int64=0 | |
6039 | fi | |
6040 | fi | |
ba479fd2 NN |
6041 | echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 |
6042 | echo "${ECHO_T}$ac_cv_sizeof___int64" >&6 | |
ba479fd2 | 6043 | cat >>confdefs.h <<_ACEOF |
414d23ae | 6044 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
ba479fd2 | 6045 | _ACEOF |
414d23ae | 6046 | |
cafe096b | 6047 | |
414d23ae HPN |
6048 | fi |
6049 | ||
5ec1c5e6 | 6050 | |
34a86c2b NN |
6051 | # --------------------- |
6052 | # Warnings and checking | |
6053 | # --------------------- | |
6054 | ||
b5472e1d NN |
6055 | # Check $CC warning features (if it's GCC). |
6056 | # We want to use -pedantic, but we don't want warnings about | |
6057 | # * 'long long' | |
6058 | # * variadic macros | |
6059 | # So, we only use -pedantic if we can disable those warnings. | |
6060 | ||
6061 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5 | |
6062 | echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6 | |
6063 | if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then | |
6064 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6065 | else | |
6066 | save_CFLAGS="$CFLAGS" | |
6067 | CFLAGS="-Wno-long-long" | |
6068 | cat >conftest.$ac_ext <<_ACEOF | |
6069 | /* confdefs.h. */ | |
6070 | _ACEOF | |
6071 | cat confdefs.h >>conftest.$ac_ext | |
6072 | cat >>conftest.$ac_ext <<_ACEOF | |
6073 | /* end confdefs.h. */ | |
6074 | ||
6075 | _ACEOF | |
6076 | rm -f conftest.$ac_objext | |
6077 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6078 | (eval $ac_compile) 2>conftest.er1 | |
6079 | ac_status=$? | |
6080 | grep -v '^ *+' conftest.er1 >conftest.err | |
6081 | rm -f conftest.er1 | |
6082 | cat conftest.err >&5 | |
6083 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6084 | (exit $ac_status); } && | |
dbad5e72 SE |
6085 | { ac_try='test -z "$ac_c_werror_flag" |
6086 | || test ! -s conftest.err' | |
b5472e1d NN |
6087 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6088 | (eval $ac_try) 2>&5 | |
6089 | ac_status=$? | |
6090 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6091 | (exit $ac_status); }; } && | |
6092 | { ac_try='test -s conftest.$ac_objext' | |
6093 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6094 | (eval $ac_try) 2>&5 | |
6095 | ac_status=$? | |
6096 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6097 | (exit $ac_status); }; }; then | |
6098 | ac_cv_prog_cc_w_no_long_long=yes | |
6099 | else | |
6100 | echo "$as_me: failed program was:" >&5 | |
6101 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6102 | ||
6103 | ac_cv_prog_cc_w_no_long_long=no | |
6104 | fi | |
6105 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6106 | CFLAGS="$save_CFLAGS" | |
6107 | ||
6108 | fi | |
6109 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5 | |
6110 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6 | |
6111 | ||
6112 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5 | |
6113 | echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6 | |
6114 | if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then | |
6115 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6116 | else | |
6117 | save_CFLAGS="$CFLAGS" | |
6118 | CFLAGS="-Wno-variadic-macros" | |
6119 | cat >conftest.$ac_ext <<_ACEOF | |
6120 | /* confdefs.h. */ | |
6121 | _ACEOF | |
6122 | cat confdefs.h >>conftest.$ac_ext | |
6123 | cat >>conftest.$ac_ext <<_ACEOF | |
6124 | /* end confdefs.h. */ | |
6125 | ||
6126 | _ACEOF | |
6127 | rm -f conftest.$ac_objext | |
6128 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6129 | (eval $ac_compile) 2>conftest.er1 | |
6130 | ac_status=$? | |
6131 | grep -v '^ *+' conftest.er1 >conftest.err | |
6132 | rm -f conftest.er1 | |
6133 | cat conftest.err >&5 | |
6134 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6135 | (exit $ac_status); } && | |
dbad5e72 SE |
6136 | { ac_try='test -z "$ac_c_werror_flag" |
6137 | || test ! -s conftest.err' | |
b5472e1d NN |
6138 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6139 | (eval $ac_try) 2>&5 | |
6140 | ac_status=$? | |
6141 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6142 | (exit $ac_status); }; } && | |
6143 | { ac_try='test -s conftest.$ac_objext' | |
6144 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6145 | (eval $ac_try) 2>&5 | |
6146 | ac_status=$? | |
6147 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6148 | (exit $ac_status); }; }; then | |
6149 | ac_cv_prog_cc_w_no_variadic_macros=yes | |
6150 | else | |
6151 | echo "$as_me: failed program was:" >&5 | |
6152 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6153 | ||
6154 | ac_cv_prog_cc_w_no_variadic_macros=no | |
6155 | fi | |
6156 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6157 | CFLAGS="$save_CFLAGS" | |
6158 | ||
6159 | fi | |
6160 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5 | |
6161 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6 | |
6162 | ||
34a86c2b | 6163 | strict1_warn= |
b5472e1d NN |
6164 | if test $ac_cv_prog_cc_w_no_long_long = yes \ |
6165 | && test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then | |
6166 | strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros" | |
34a86c2b NN |
6167 | fi |
6168 | ||
643d3bd2 NN |
6169 | # Add -Wold-style-definition if it's accepted |
6170 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5 | |
6171 | echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6 | |
6172 | if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then | |
6173 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6174 | else | |
6175 | save_CFLAGS="$CFLAGS" | |
6176 | CFLAGS="-Wold-style-definition" | |
6177 | cat >conftest.$ac_ext <<_ACEOF | |
6178 | /* confdefs.h. */ | |
6179 | _ACEOF | |
6180 | cat confdefs.h >>conftest.$ac_ext | |
6181 | cat >>conftest.$ac_ext <<_ACEOF | |
6182 | /* end confdefs.h. */ | |
6183 | ||
6184 | _ACEOF | |
6185 | rm -f conftest.$ac_objext | |
6186 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6187 | (eval $ac_compile) 2>conftest.er1 | |
6188 | ac_status=$? | |
6189 | grep -v '^ *+' conftest.er1 >conftest.err | |
6190 | rm -f conftest.er1 | |
6191 | cat conftest.err >&5 | |
6192 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6193 | (exit $ac_status); } && | |
dbad5e72 SE |
6194 | { ac_try='test -z "$ac_c_werror_flag" |
6195 | || test ! -s conftest.err' | |
643d3bd2 NN |
6196 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6197 | (eval $ac_try) 2>&5 | |
6198 | ac_status=$? | |
6199 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6200 | (exit $ac_status); }; } && | |
6201 | { ac_try='test -s conftest.$ac_objext' | |
6202 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6203 | (eval $ac_try) 2>&5 | |
6204 | ac_status=$? | |
6205 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6206 | (exit $ac_status); }; }; then | |
6207 | ac_cv_prog_cc_w_old_style_definition=yes | |
6208 | else | |
6209 | echo "$as_me: failed program was:" >&5 | |
6210 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6211 | ||
6212 | ac_cv_prog_cc_w_old_style_definition=no | |
6213 | fi | |
6214 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6215 | CFLAGS="$save_CFLAGS" | |
6216 | ||
6217 | fi | |
6218 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5 | |
6219 | echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6 | |
6220 | if test $ac_cv_prog_cc_w_old_style_definition = yes ; then | |
6221 | strict1_warn="${strict1_warn} -Wold-style-definition" | |
6222 | fi | |
6223 | ||
ac0f3f39 KG |
6224 | # Add -Wmissing-format-attribute if it's accepted |
6225 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5 | |
6226 | echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6 | |
6227 | if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then | |
6228 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6229 | else | |
6230 | save_CFLAGS="$CFLAGS" | |
6231 | CFLAGS="-Wmissing-format-attribute" | |
6232 | cat >conftest.$ac_ext <<_ACEOF | |
6233 | /* confdefs.h. */ | |
6234 | _ACEOF | |
6235 | cat confdefs.h >>conftest.$ac_ext | |
6236 | cat >>conftest.$ac_ext <<_ACEOF | |
6237 | /* end confdefs.h. */ | |
6238 | ||
6239 | _ACEOF | |
6240 | rm -f conftest.$ac_objext | |
6241 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6242 | (eval $ac_compile) 2>conftest.er1 | |
6243 | ac_status=$? | |
6244 | grep -v '^ *+' conftest.er1 >conftest.err | |
6245 | rm -f conftest.er1 | |
6246 | cat conftest.err >&5 | |
6247 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6248 | (exit $ac_status); } && | |
dbad5e72 SE |
6249 | { ac_try='test -z "$ac_c_werror_flag" |
6250 | || test ! -s conftest.err' | |
ac0f3f39 KG |
6251 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6252 | (eval $ac_try) 2>&5 | |
6253 | ac_status=$? | |
6254 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6255 | (exit $ac_status); }; } && | |
6256 | { ac_try='test -s conftest.$ac_objext' | |
6257 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6258 | (eval $ac_try) 2>&5 | |
6259 | ac_status=$? | |
6260 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6261 | (exit $ac_status); }; }; then | |
6262 | ac_cv_prog_cc_w_missing_format_attribute=yes | |
6263 | else | |
6264 | echo "$as_me: failed program was:" >&5 | |
6265 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6266 | ||
6267 | ac_cv_prog_cc_w_missing_format_attribute=no | |
6268 | fi | |
6269 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6270 | CFLAGS="$save_CFLAGS" | |
6271 | ||
6272 | fi | |
6273 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5 | |
6274 | echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6 | |
6275 | if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then | |
6276 | strict1_warn="${strict1_warn} -Wmissing-format-attribute" | |
6277 | fi | |
6278 | ||
09a9c095 NN |
6279 | # Enable -Werror, period. |
6280 | # Check whether --enable-werror_always or --disable-werror_always was given. | |
6281 | if test "${enable_werror_always+set}" = set; then | |
6282 | enableval="$enable_werror_always" | |
6283 | ||
6284 | else | |
6285 | enable_werror_always=no | |
6286 | fi; | |
6287 | if test x${enable_werror_always} = xyes ; then | |
6288 | strict1_warn="${strict1_warn} -Werror" | |
6289 | WERROR=-Werror | |
6290 | fi | |
6291 | ||
ac0f3f39 KG |
6292 | |
6293 | ||
ba479fd2 | 6294 | # If the native compiler is GCC, we can enable warnings even in stage1. |
414d23ae HPN |
6295 | # That's useful for people building cross-compilers, or just running a |
6296 | # quick `make'. | |
6297 | warn_cflags= | |
6298 | if test "x$GCC" = "xyes"; then | |
6299 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
6300 | fi | |
6301 | ||
6302 | ||
dd859b8a | 6303 | # Enable -Werror in bootstrap stage2 and later. |
a1286ef5 ZW |
6304 | is_release= |
6305 | if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then | |
6306 | is_release=yes | |
6307 | fi | |
dd859b8a KG |
6308 | # Check whether --enable-werror or --disable-werror was given. |
6309 | if test "${enable_werror+set}" = set; then | |
6310 | enableval="$enable_werror" | |
ba479fd2 | 6311 | |
dd859b8a | 6312 | else |
06c37c96 NS |
6313 | if test x$is_release = x ; then |
6314 | # Default to "yes" on development branches. | |
dd859b8a | 6315 | enable_werror=yes |
06c37c96 NS |
6316 | else |
6317 | # Default to "no" on release branches. | |
6318 | enable_werror=no | |
6319 | fi | |
ba479fd2 | 6320 | fi; |
dd859b8a KG |
6321 | if test x$enable_werror = xyes ; then |
6322 | WERROR=-Werror | |
6323 | fi | |
6324 | ||
6325 | ||
414d23ae HPN |
6326 | # Enable expensive internal checks |
6327 | # Check whether --enable-checking or --disable-checking was given. | |
6328 | if test "${enable_checking+set}" = set; then | |
6329 | enableval="$enable_checking" | |
e1bbfc5c NS |
6330 | ac_checking_flags="${enableval}" |
6331 | else | |
6332 | ||
6333 | # Determine the default checks. | |
6334 | if test x$is_release = x ; then | |
6335 | ac_checking_flags=yes | |
6336 | else | |
6337 | ac_checking_flags=release | |
6338 | fi | |
6339 | fi; | |
6340 | ac_assert_checking=1 | |
6341 | ac_checking= | |
cdce5c16 NS |
6342 | ac_fold_checking= |
6343 | ac_gc_checking= | |
6344 | ac_gc_always_collect= | |
414d23ae HPN |
6345 | ac_rtl_checking= |
6346 | ac_rtlflag_checking= | |
b53ef395 | 6347 | ac_runtime_checking=1 |
cdce5c16 NS |
6348 | ac_tree_checking= |
6349 | ac_valgrind_checking= | |
e1bbfc5c NS |
6350 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," |
6351 | for check in $ac_checking_flags | |
6352 | do | |
6353 | case $check in | |
cdce5c16 | 6354 | # these set all the flags to specific states |
e1bbfc5c | 6355 | yes) ac_assert_checking=1 ; ac_checking=1 ; |
cdce5c16 NS |
6356 | ac_fold_checking= ; ac_gc_checking=1 ; |
6357 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 6358 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; |
cdce5c16 NS |
6359 | ac_tree_checking=1 ; ac_valgrind_checking= ;; |
6360 | no|none) ac_assert_checking= ; ac_checking= ; | |
6361 | ac_fold_checking= ; ac_gc_checking= ; | |
6362 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 6363 | ac_rtlflag_checking= ; ac_runtime_checking= ; |
cdce5c16 | 6364 | ac_tree_checking= ; ac_valgrind_checking= ;; |
e1bbfc5c | 6365 | all) ac_assert_checking=1 ; ac_checking=1 ; |
cdce5c16 NS |
6366 | ac_fold_checking=1 ; ac_gc_checking=1 ; |
6367 | ac_gc_always_collect=1 ; ac_rtl_checking=1 ; | |
6368 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; | |
6369 | ac_tree_checking=1 ; ac_valgrind_checking= ;; | |
6370 | release) ac_assert_checking=1 ; ac_checking= ; | |
6371 | ac_fold_checking= ; ac_gc_checking= ; | |
6372 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
6373 | ac_rtlflag_checking= ; ac_runtime_checking=1 ; | |
6374 | ac_tree_checking= ; ac_valgrind_checking= ;; | |
6375 | # these enable particular checks | |
e1bbfc5c NS |
6376 | assert) ac_assert_checking=1 ;; |
6377 | fold) ac_fold_checking=1 ;; | |
6378 | gc) ac_gc_checking=1 ;; | |
6379 | gcac) ac_gc_always_collect=1 ;; | |
6380 | misc) ac_checking=1 ;; | |
e1bbfc5c | 6381 | rtl) ac_rtl_checking=1 ;; |
cdce5c16 | 6382 | rtlflag) ac_rtlflag_checking=1 ;; |
b53ef395 | 6383 | runtime) ac_runtime_checking=1 ;; |
e1bbfc5c | 6384 | tree) ac_tree_checking=1 ;; |
cdce5c16 | 6385 | valgrind) ac_valgrind_checking=1 ;; |
e1bbfc5c | 6386 | *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 |
ba479fd2 NN |
6387 | echo "$as_me: error: unknown check category $check" >&2;} |
6388 | { (exit 1); exit 1; }; } ;; | |
e1bbfc5c NS |
6389 | esac |
6390 | done | |
6391 | IFS="$ac_save_IFS" | |
06c37c96 | 6392 | |
ba479fd2 NN |
6393 | nocommon_flag="" |
6394 | if test x$ac_checking != x ; then | |
6395 | ||
6396 | cat >>confdefs.h <<\_ACEOF | |
6397 | #define ENABLE_CHECKING 1 | |
6398 | _ACEOF | |
6399 | ||
6400 | nocommon_flag=-fno-common | |
6401 | fi | |
6402 | ||
06c37c96 NS |
6403 | if test x$ac_assert_checking != x ; then |
6404 | ||
6405 | cat >>confdefs.h <<\_ACEOF | |
6406 | #define ENABLE_ASSERT_CHECKING 1 | |
6407 | _ACEOF | |
6408 | ||
b53ef395 | 6409 | fi |
232b67d9 | 6410 | |
b53ef395 NS |
6411 | if test x$ac_runtime_checking != x ; then |
6412 | ||
6413 | cat >>confdefs.h <<\_ACEOF | |
6414 | #define ENABLE_RUNTIME_CHECKING 1 | |
6415 | _ACEOF | |
6416 | ||
06c37c96 | 6417 | fi |
ba479fd2 NN |
6418 | if test x$ac_tree_checking != x ; then |
6419 | ||
6420 | cat >>confdefs.h <<\_ACEOF | |
6421 | #define ENABLE_TREE_CHECKING 1 | |
6422 | _ACEOF | |
6423 | ||
13f05fd0 | 6424 | TREEBROWSER=tree-browser.o |
ba479fd2 | 6425 | fi |
13f05fd0 | 6426 | |
ba479fd2 NN |
6427 | if test x$ac_rtl_checking != x ; then |
6428 | ||
6429 | cat >>confdefs.h <<\_ACEOF | |
6430 | #define ENABLE_RTL_CHECKING 1 | |
6431 | _ACEOF | |
6432 | ||
6433 | fi | |
6434 | if test x$ac_rtlflag_checking != x ; then | |
6435 | ||
6436 | cat >>confdefs.h <<\_ACEOF | |
6437 | #define ENABLE_RTL_FLAG_CHECKING 1 | |
6438 | _ACEOF | |
6439 | ||
6440 | fi | |
6441 | if test x$ac_gc_checking != x ; then | |
6442 | ||
6443 | cat >>confdefs.h <<\_ACEOF | |
6444 | #define ENABLE_GC_CHECKING 1 | |
6445 | _ACEOF | |
6446 | ||
6447 | fi | |
6448 | if test x$ac_gc_always_collect != x ; then | |
6449 | ||
6450 | cat >>confdefs.h <<\_ACEOF | |
6451 | #define ENABLE_GC_ALWAYS_COLLECT 1 | |
6452 | _ACEOF | |
6453 | ||
6454 | fi | |
6455 | if test x$ac_fold_checking != x ; then | |
6456 | ||
6457 | cat >>confdefs.h <<\_ACEOF | |
6458 | #define ENABLE_FOLD_CHECKING 1 | |
6459 | _ACEOF | |
6460 | ||
6461 | fi | |
6462 | valgrind_path_defines= | |
6463 | valgrind_command= | |
6464 | ||
ba479fd2 NN |
6465 | if test "${ac_cv_header_valgrind_h+set}" = set; then |
6466 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
6467 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
6468 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
6469 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6470 | fi | |
6471 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 | |
6472 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
6473 | else | |
6474 | # Is the header compilable? | |
6475 | echo "$as_me:$LINENO: checking valgrind.h usability" >&5 | |
6476 | echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6 | |
6477 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6478 | /* confdefs.h. */ |
6479 | _ACEOF | |
6480 | cat confdefs.h >>conftest.$ac_ext | |
6481 | cat >>conftest.$ac_ext <<_ACEOF | |
6482 | /* end confdefs.h. */ | |
6483 | $ac_includes_default | |
63cf211a | 6484 | #include <valgrind.h> |
ba479fd2 NN |
6485 | _ACEOF |
6486 | rm -f conftest.$ac_objext | |
6487 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 6488 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 6489 | ac_status=$? |
86da66b5 HPN |
6490 | grep -v '^ *+' conftest.er1 >conftest.err |
6491 | rm -f conftest.er1 | |
6492 | cat conftest.err >&5 | |
ba479fd2 NN |
6493 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6494 | (exit $ac_status); } && | |
dbad5e72 SE |
6495 | { ac_try='test -z "$ac_c_werror_flag" |
6496 | || test ! -s conftest.err' | |
86da66b5 HPN |
6497 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6498 | (eval $ac_try) 2>&5 | |
6499 | ac_status=$? | |
6500 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6501 | (exit $ac_status); }; } && | |
6502 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
6503 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6504 | (eval $ac_try) 2>&5 | |
6505 | ac_status=$? | |
6506 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6507 | (exit $ac_status); }; }; then | |
6508 | ac_header_compiler=yes | |
6509 | else | |
6510 | echo "$as_me: failed program was:" >&5 | |
6511 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6512 | ||
6513 | ac_header_compiler=no | |
6514 | fi | |
86da66b5 | 6515 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
6516 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 |
6517 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
6518 | ||
6519 | # Is the header present? | |
6520 | echo "$as_me:$LINENO: checking valgrind.h presence" >&5 | |
6521 | echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6 | |
6522 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6523 | /* confdefs.h. */ |
6524 | _ACEOF | |
6525 | cat confdefs.h >>conftest.$ac_ext | |
6526 | cat >>conftest.$ac_ext <<_ACEOF | |
6527 | /* end confdefs.h. */ | |
6528 | #include <valgrind.h> | |
6529 | _ACEOF | |
6530 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6531 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6532 | ac_status=$? | |
6533 | grep -v '^ *+' conftest.er1 >conftest.err | |
6534 | rm -f conftest.er1 | |
6535 | cat conftest.err >&5 | |
6536 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6537 | (exit $ac_status); } >/dev/null; then | |
6538 | if test -s conftest.err; then | |
6539 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6540 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6541 | else |
6542 | ac_cpp_err= | |
6543 | fi | |
6544 | else | |
6545 | ac_cpp_err=yes | |
6546 | fi | |
6547 | if test -z "$ac_cpp_err"; then | |
6548 | ac_header_preproc=yes | |
6549 | else | |
6550 | echo "$as_me: failed program was:" >&5 | |
6551 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6552 | ||
6553 | ac_header_preproc=no | |
6554 | fi | |
6555 | rm -f conftest.err conftest.$ac_ext | |
6556 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
6557 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
6558 | ||
6559 | # So? What about this header? | |
86da66b5 HPN |
6560 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in |
6561 | yes:no: ) | |
ba479fd2 NN |
6562 | { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 |
6563 | echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
86da66b5 HPN |
6564 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5 |
6565 | echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;} | |
6566 | ac_header_preproc=yes | |
ba479fd2 | 6567 | ;; |
86da66b5 | 6568 | no:yes:* ) |
ba479fd2 NN |
6569 | { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 |
6570 | echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} | |
86da66b5 HPN |
6571 | { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 |
6572 | echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} | |
6573 | { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5 | |
6574 | echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;} | |
6575 | { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5 | |
6576 | echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;} | |
ba479fd2 NN |
6577 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 |
6578 | echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} | |
86da66b5 HPN |
6579 | { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 |
6580 | echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;} | |
ba479fd2 NN |
6581 | ( |
6582 | cat <<\_ASBOX | |
86da66b5 HPN |
6583 | ## ------------------------------------------ ## |
6584 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
6585 | ## ------------------------------------------ ## | |
ba479fd2 NN |
6586 | _ASBOX |
6587 | ) | | |
6588 | sed "s/^/$as_me: WARNING: /" >&2 | |
6589 | ;; | |
6590 | esac | |
6591 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
6592 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
6593 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
6594 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6595 | else | |
6596 | ac_cv_header_valgrind_h=$ac_header_preproc | |
6938ec6c | 6597 | fi |
ba479fd2 NN |
6598 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 |
6599 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
6600 | ||
6e3f3080 | 6601 | fi |
ba479fd2 | 6602 | if test $ac_cv_header_valgrind_h = yes; then |
6938ec6c NN |
6603 | have_valgrind_h=yes |
6604 | else | |
ba479fd2 | 6605 | have_valgrind_h=no |
6938ec6c NN |
6606 | fi |
6607 | ||
6608 | ||
ba479fd2 | 6609 | |
cdce5c16 | 6610 | if test x$ac_valgrind_checking != x ; then |
414d23ae HPN |
6611 | # It is certainly possible that there's valgrind but no valgrind.h. |
6612 | # GCC relies on making annotations so we must have both. | |
ba479fd2 NN |
6613 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 |
6614 | echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6 | |
6615 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6616 | /* confdefs.h. */ |
6617 | _ACEOF | |
6618 | cat confdefs.h >>conftest.$ac_ext | |
6619 | cat >>conftest.$ac_ext <<_ACEOF | |
6620 | /* end confdefs.h. */ | |
a207b594 | 6621 | #include <valgrind/memcheck.h> |
14011ca4 AJ |
6622 | #ifndef VALGRIND_DISCARD |
6623 | #error VALGRIND_DISCARD not defined | |
6624 | #endif | |
ba479fd2 NN |
6625 | _ACEOF |
6626 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6627 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6628 | ac_status=$? | |
6629 | grep -v '^ *+' conftest.er1 >conftest.err | |
6630 | rm -f conftest.er1 | |
6631 | cat conftest.err >&5 | |
6632 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6633 | (exit $ac_status); } >/dev/null; then | |
6634 | if test -s conftest.err; then | |
6635 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6636 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6637 | else |
6638 | ac_cpp_err= | |
6639 | fi | |
6640 | else | |
6641 | ac_cpp_err=yes | |
6642 | fi | |
6643 | if test -z "$ac_cpp_err"; then | |
a207b594 HPN |
6644 | gcc_cv_header_valgrind_memcheck_h=yes |
6645 | else | |
ba479fd2 NN |
6646 | echo "$as_me: failed program was:" >&5 |
6647 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6648 | ||
a207b594 HPN |
6649 | gcc_cv_header_valgrind_memcheck_h=no |
6650 | fi | |
ba479fd2 NN |
6651 | rm -f conftest.err conftest.$ac_ext |
6652 | echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5 | |
6653 | echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6 | |
6654 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 | |
6655 | echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6 | |
6656 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6657 | /* confdefs.h. */ |
6658 | _ACEOF | |
6659 | cat confdefs.h >>conftest.$ac_ext | |
6660 | cat >>conftest.$ac_ext <<_ACEOF | |
6661 | /* end confdefs.h. */ | |
a207b594 HPN |
6662 | #include <memcheck.h> |
6663 | #ifndef VALGRIND_DISCARD | |
6664 | #error VALGRIND_DISCARD not defined | |
6665 | #endif | |
ba479fd2 NN |
6666 | _ACEOF |
6667 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6668 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6669 | ac_status=$? | |
6670 | grep -v '^ *+' conftest.er1 >conftest.err | |
6671 | rm -f conftest.er1 | |
6672 | cat conftest.err >&5 | |
6673 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6674 | (exit $ac_status); } >/dev/null; then | |
6675 | if test -s conftest.err; then | |
6676 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6677 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6678 | else |
6679 | ac_cpp_err= | |
6680 | fi | |
6681 | else | |
6682 | ac_cpp_err=yes | |
6683 | fi | |
6684 | if test -z "$ac_cpp_err"; then | |
14011ca4 AJ |
6685 | gcc_cv_header_memcheck_h=yes |
6686 | else | |
ba479fd2 NN |
6687 | echo "$as_me: failed program was:" >&5 |
6688 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6689 | ||
cafe096b EC |
6690 | gcc_cv_header_memcheck_h=no |
6691 | fi | |
ba479fd2 NN |
6692 | rm -f conftest.err conftest.$ac_ext |
6693 | echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5 | |
6694 | echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6 | |
6695 | ||
56694dd9 ZW |
6696 | # Prepare PATH_SEPARATOR. |
6697 | # The user is always right. | |
6698 | if test "${PATH_SEPARATOR+set}" != set; then | |
6699 | echo "#! /bin/sh" >conf$$.sh | |
6700 | echo "exit 0" >>conf$$.sh | |
6701 | chmod +x conf$$.sh | |
6702 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6703 | PATH_SEPARATOR=';' | |
6704 | else | |
6705 | PATH_SEPARATOR=: | |
6706 | fi | |
6707 | rm -f conf$$.sh | |
6708 | fi | |
6709 | ||
6710 | # Find out how to test for executable files. Don't use a zero-byte file, | |
6711 | # as systems may use methods other than mode bits to determine executability. | |
6712 | cat >conf$$.file <<_ASEOF | |
6713 | #! /bin/sh | |
6714 | exit 0 | |
6715 | _ASEOF | |
6716 | chmod +x conf$$.file | |
6717 | if test -x conf$$.file >/dev/null 2>&1; then | |
6718 | ac_executable_p="test -x" | |
6719 | else | |
6720 | ac_executable_p="test -f" | |
6721 | fi | |
6722 | rm -f conf$$.file | |
6723 | ||
6724 | # Extract the first word of "valgrind", so it can be a program name with args. | |
414d23ae | 6725 | set dummy valgrind; ac_word=$2 |
ba479fd2 NN |
6726 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
6727 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
6728 | if test "${ac_cv_path_valgrind_path+set}" = set; then | |
6729 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
6730 | else |
6731 | case "$valgrind_path" in | |
56694dd9 ZW |
6732 | [\\/]* | ?:[\\/]*) |
6733 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
6734 | ;; | |
414d23ae | 6735 | *) |
56694dd9 ZW |
6736 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR |
6737 | for ac_dir in $PATH; do | |
6738 | IFS="$ac_save_IFS" | |
6739 | test -z "$ac_dir" && ac_dir=. | |
6740 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6741 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
6742 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
6743 | ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext" | |
6744 | break 2 | |
6745 | fi | |
6746 | fi | |
6747 | done | |
6748 | done | |
6749 | IFS="$ac_save_IFS" | |
6750 | ;; | |
414d23ae | 6751 | esac |
75e93faa | 6752 | fi |
414d23ae HPN |
6753 | valgrind_path="$ac_cv_path_valgrind_path" |
6754 | if test -n "$valgrind_path"; then | |
ba479fd2 NN |
6755 | echo "$as_me:$LINENO: result: $valgrind_path" >&5 |
6756 | echo "${ECHO_T}$valgrind_path" >&6 | |
414d23ae | 6757 | else |
ba479fd2 NN |
6758 | echo "$as_me:$LINENO: result: no" >&5 |
6759 | echo "${ECHO_T}no" >&6 | |
414d23ae HPN |
6760 | fi |
6761 | ||
a207b594 HPN |
6762 | if test "x$valgrind_path" = "x" \ |
6763 | || (test $have_valgrind_h = no \ | |
6764 | && test $gcc_cv_header_memcheck_h = no \ | |
6765 | && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
ba479fd2 NN |
6766 | { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5 |
6767 | echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;} | |
6768 | { (exit 1); exit 1; }; } | |
414d23ae HPN |
6769 | fi |
6770 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
6771 | valgrind_command="$valgrind_path -q" | |
ba479fd2 NN |
6772 | |
6773 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 6774 | #define ENABLE_VALGRIND_CHECKING 1 |
ba479fd2 | 6775 | _ACEOF |
75e93faa | 6776 | |
a207b594 | 6777 | if test $gcc_cv_header_valgrind_memcheck_h = yes; then |
ba479fd2 NN |
6778 | |
6779 | cat >>confdefs.h <<\_ACEOF | |
a207b594 | 6780 | #define HAVE_VALGRIND_MEMCHECK_H 1 |
ba479fd2 | 6781 | _ACEOF |
a207b594 HPN |
6782 | |
6783 | fi | |
14011ca4 | 6784 | if test $gcc_cv_header_memcheck_h = yes; then |
ba479fd2 NN |
6785 | |
6786 | cat >>confdefs.h <<\_ACEOF | |
14011ca4 | 6787 | #define HAVE_MEMCHECK_H 1 |
ba479fd2 | 6788 | _ACEOF |
14011ca4 AJ |
6789 | |
6790 | fi | |
414d23ae | 6791 | fi |
75e93faa | 6792 | |
75e93faa ZW |
6793 | |
6794 | ||
74ee1642 PB |
6795 | # Check whether --enable-mapped-location or --disable-mapped-location was given. |
6796 | if test "${enable_mapped_location+set}" = set; then | |
6797 | enableval="$enable_mapped_location" | |
6798 | ||
6799 | else | |
6800 | enable_mapped_location=no | |
6801 | fi; | |
6802 | ||
6803 | if test "$enable_mapped_location" = yes ; then | |
6804 | ||
6805 | cat >>confdefs.h <<\_ACEOF | |
6806 | #define USE_MAPPED_LOCATION 1 | |
6807 | _ACEOF | |
6808 | ||
6809 | fi | |
6810 | ||
414d23ae HPN |
6811 | # Enable code coverage collection |
6812 | # Check whether --enable-coverage or --disable-coverage was given. | |
6813 | if test "${enable_coverage+set}" = set; then | |
6814 | enableval="$enable_coverage" | |
6815 | case "${enableval}" in | |
6dd297da NN |
6816 | yes|noopt) |
6817 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" | |
6818 | ;; | |
6819 | opt) | |
6820 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" | |
6821 | ;; | |
6822 | no) | |
6823 | # a.k.a. --disable-coverage | |
6824 | coverage_flags="" | |
6825 | ;; | |
6826 | *) | |
6827 | { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5 | |
ba479fd2 NN |
6828 | echo "$as_me: error: unknown coverage setting $enableval" >&2;} |
6829 | { (exit 1); exit 1; }; } | |
6dd297da | 6830 | ;; |
414d23ae | 6831 | esac |
75e93faa | 6832 | else |
414d23ae | 6833 | coverage_flags="" |
ba479fd2 | 6834 | fi; |
5c3bc9fb | 6835 | |
414d23ae | 6836 | |
439a7e54 DN |
6837 | # Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given. |
6838 | if test "${enable_gather_detailed_mem_stats+set}" = set; then | |
6839 | enableval="$enable_gather_detailed_mem_stats" | |
ba479fd2 | 6840 | |
439a7e54 DN |
6841 | else |
6842 | enable_gather_detailed_mem_stats=no | |
ba479fd2 | 6843 | fi; |
439a7e54 | 6844 | if test x$enable_gather_detailed_mem_stats = xyes ; then |
ba479fd2 NN |
6845 | |
6846 | cat >>confdefs.h <<\_ACEOF | |
439a7e54 | 6847 | #define GATHER_STATISTICS 1 |
ba479fd2 | 6848 | _ACEOF |
439a7e54 DN |
6849 | |
6850 | fi | |
6851 | ||
73458fb7 NN |
6852 | # ------------------------------- |
6853 | # Miscenalleous configure options | |
6854 | # ------------------------------- | |
34a86c2b NN |
6855 | |
6856 | # With stabs | |
ba479fd2 | 6857 | |
34a86c2b NN |
6858 | # Check whether --with-stabs or --without-stabs was given. |
6859 | if test "${with_stabs+set}" = set; then | |
6860 | withval="$with_stabs" | |
6861 | stabs="$with_stabs" | |
6862 | else | |
6863 | stabs=no | |
ba479fd2 | 6864 | fi; |
cafe096b | 6865 | |
34a86c2b NN |
6866 | # Determine whether or not multilibs are enabled. |
6867 | # Check whether --enable-multilib or --disable-multilib was given. | |
6868 | if test "${enable_multilib+set}" = set; then | |
6869 | enableval="$enable_multilib" | |
ba479fd2 | 6870 | |
34a86c2b NN |
6871 | else |
6872 | enable_multilib=yes | |
ba479fd2 | 6873 | fi; |
75e93faa | 6874 | |
34a86c2b | 6875 | |
414d23ae HPN |
6876 | # Enable __cxa_atexit for C++. |
6877 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. | |
6878 | if test "${enable___cxa_atexit+set}" = set; then | |
6879 | enableval="$enable___cxa_atexit" | |
75e93faa | 6880 | |
ba479fd2 | 6881 | fi; |
75e93faa | 6882 | |
414d23ae HPN |
6883 | # Enable threads |
6884 | # Pass with no value to take the default | |
6885 | # Pass with a value to specify a thread package | |
6886 | # Check whether --enable-threads or --disable-threads was given. | |
6887 | if test "${enable_threads+set}" = set; then | |
6888 | enableval="$enable_threads" | |
ba479fd2 | 6889 | |
414d23ae HPN |
6890 | else |
6891 | enable_threads='' | |
ba479fd2 | 6892 | fi; |
414d23ae HPN |
6893 | |
6894 | # Check whether --enable-objc-gc or --disable-objc-gc was given. | |
6895 | if test "${enable_objc_gc+set}" = set; then | |
6896 | enableval="$enable_objc_gc" | |
6897 | if test x$enable_objc_gc = xno; then | |
6898 | objc_boehm_gc='' | |
6899 | else | |
6900 | objc_boehm_gc=1 | |
6901 | fi | |
6902 | else | |
6903 | objc_boehm_gc='' | |
ba479fd2 | 6904 | fi; |
75e93faa ZW |
6905 | |
6906 | ||
414d23ae HPN |
6907 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
6908 | if test "${with_dwarf2+set}" = set; then | |
6909 | withval="$with_dwarf2" | |
6910 | dwarf2="$with_dwarf2" | |
75e93faa | 6911 | else |
414d23ae | 6912 | dwarf2=no |
ba479fd2 | 6913 | fi; |
75e93faa | 6914 | |
414d23ae HPN |
6915 | # Check whether --enable-shared or --disable-shared was given. |
6916 | if test "${enable_shared+set}" = set; then | |
6917 | enableval="$enable_shared" | |
ba479fd2 | 6918 | |
414d23ae HPN |
6919 | case $enable_shared in |
6920 | yes | no) ;; | |
6921 | *) | |
6922 | enable_shared=no | |
6923 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
6924 | for pkg in $enableval; do | |
6925 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
6926 | enable_shared=yes | |
6927 | fi | |
6928 | done | |
6929 | IFS="$ac_save_ifs" | |
6930 | ;; | |
6931 | esac | |
6932 | ||
75e93faa | 6933 | else |
414d23ae | 6934 | enable_shared=yes |
ba479fd2 | 6935 | fi; |
75e93faa | 6936 | |
75e93faa | 6937 | |
75e93faa | 6938 | |
160633c6 MM |
6939 | # Check whether --with-build-sysroot or --without-build-sysroot was given. |
6940 | if test "${with_build_sysroot+set}" = set; then | |
6941 | withval="$with_build_sysroot" | |
6942 | ||
6943 | fi; | |
6944 | ||
6945 | ||
4977bab6 ZW |
6946 | # Check whether --with-sysroot or --without-sysroot was given. |
6947 | if test "${with_sysroot+set}" = set; then | |
6948 | withval="$with_sysroot" | |
ba479fd2 | 6949 | |
4977bab6 | 6950 | case ${with_sysroot} in |
caa55b1e | 6951 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; |
4977bab6 ZW |
6952 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
6953 | esac | |
ba479fd2 | 6954 | |
4977bab6 ZW |
6955 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
6956 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)' | |
6957 | ||
047d636f DJ |
6958 | if test "x$exec_prefix" = xNONE; then |
6959 | if test "x$prefix" = xNONE; then | |
6960 | test_prefix=/usr/local | |
6961 | else | |
6962 | test_prefix=$prefix | |
6963 | fi | |
6964 | else | |
6965 | test_prefix=$exec_prefix | |
6966 | fi | |
6967 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 AO |
6968 | "${test_prefix}"|"${test_prefix}/"*|\ |
6969 | '${exec_prefix}'|'${exec_prefix}/'*) | |
047d636f DJ |
6970 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
6971 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
6972 | ;; | |
6973 | esac | |
6974 | ||
4977bab6 | 6975 | else |
ba479fd2 | 6976 | |
4977bab6 | 6977 | TARGET_SYSTEM_ROOT= |
db720d9a | 6978 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
6979 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
6980 | ||
ba479fd2 | 6981 | fi; |
4977bab6 ZW |
6982 | |
6983 | ||
6984 | ||
6985 | ||
d1bd0ded | 6986 | # Build with intermodule optimisations |
d1bd0ded GK |
6987 | # Check whether --enable-intermodule or --disable-intermodule was given. |
6988 | if test "${enable_intermodule+set}" = set; then | |
6989 | enableval="$enable_intermodule" | |
0c46c5c7 KC |
6990 | case ${enable_intermodule} in |
6991 | yes) onestep="-onestep";; | |
6992 | *) onestep="";; | |
d1bd0ded | 6993 | esac |
0c46c5c7 KC |
6994 | else |
6995 | onestep="" | |
ba479fd2 | 6996 | fi; |
d1bd0ded GK |
6997 | |
6998 | ||
f3c9f174 NN |
6999 | # Sanity check enable_languages in case someone does not run the toplevel |
7000 | # configure # script. | |
7001 | # Check whether --enable-languages or --disable-languages was given. | |
7002 | if test "${enable_languages+set}" = set; then | |
7003 | enableval="$enable_languages" | |
7004 | case ,${enable_languages}, in | |
7005 | ,,|,yes,) | |
7006 | # go safe -- we cannot be much sure without the toplevel | |
7007 | # configure's | |
7008 | # analysis of which target libs are present and usable | |
7009 | enable_languages=c | |
7010 | ;; | |
7011 | *,all,*) | |
7012 | { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5 | |
7013 | echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;} | |
7014 | { (exit 1); exit 1; }; } | |
7015 | ;; | |
7016 | *,c,*) | |
7017 | ;; | |
7018 | *) | |
7019 | enable_languages=c,${enable_languages} | |
7020 | ;; | |
7021 | esac | |
7022 | else | |
7023 | enable_languages=c | |
7024 | fi; | |
7025 | ||
7026 | subdirs= | |
7027 | for lang in ${srcdir}/*/config-lang.in | |
7028 | do | |
7029 | case $lang in | |
7030 | # The odd quoting in the next line works around | |
7031 | # an apparent bug in bash 1.12 on linux. | |
7032 | ${srcdir}/[*]/config-lang.in) ;; | |
7033 | *) | |
7034 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
7035 | if test "x$lang_alias" = x | |
7036 | then | |
7037 | echo "$lang doesn't set \$language." 1>&2 | |
7038 | exit 1 | |
7039 | fi | |
7040 | case ",$enable_languages," in | |
7041 | *,$lang_alias,*) | |
7042 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;; | |
7043 | esac | |
7044 | ;; | |
7045 | esac | |
7046 | done | |
7047 | ||
7048 | ||
73458fb7 NN |
7049 | # ------------------------- |
7050 | # Checks for other programs | |
7051 | # ------------------------- | |
5b67ad6f | 7052 | |
ba479fd2 NN |
7053 | echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
7054 | echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 | |
86da66b5 | 7055 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` |
ba479fd2 NN |
7056 | if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then |
7057 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9a25f70 | 7058 | else |
ba479fd2 | 7059 | cat >conftest.make <<\_ACEOF |
e9a25f70 | 7060 | all: |
ba479fd2 NN |
7061 | @echo 'ac_maketemp="$(MAKE)"' |
7062 | _ACEOF | |
e9a25f70 | 7063 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
ba479fd2 | 7064 | eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` |
e9a25f70 JL |
7065 | if test -n "$ac_maketemp"; then |
7066 | eval ac_cv_prog_make_${ac_make}_set=yes | |
7067 | else | |
7068 | eval ac_cv_prog_make_${ac_make}_set=no | |
7069 | fi | |
ba479fd2 | 7070 | rm -f conftest.make |
e9a25f70 JL |
7071 | fi |
7072 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
ba479fd2 NN |
7073 | echo "$as_me:$LINENO: result: yes" >&5 |
7074 | echo "${ECHO_T}yes" >&6 | |
e9a25f70 JL |
7075 | SET_MAKE= |
7076 | else | |
ba479fd2 NN |
7077 | echo "$as_me:$LINENO: result: no" >&5 |
7078 | echo "${ECHO_T}no" >&6 | |
e9a25f70 JL |
7079 | SET_MAKE="MAKE=${MAKE-make}" |
7080 | fi | |
7081 | ||
7082 | ||
861bb6c1 | 7083 | # Find some useful tools |
ba479fd2 | 7084 | for ac_prog in gawk mawk nawk awk |
861bb6c1 | 7085 | do |
ba479fd2 | 7086 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 7087 | set dummy $ac_prog; ac_word=$2 |
ba479fd2 NN |
7088 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7089 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7090 | if test "${ac_cv_prog_AWK+set}" = set; then | |
7091 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7092 | else |
7093 | if test -n "$AWK"; then | |
7094 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7095 | else | |
ba479fd2 NN |
7096 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7097 | for as_dir in $PATH | |
7098 | do | |
7099 | IFS=$as_save_IFS | |
7100 | test -z "$as_dir" && as_dir=. | |
7101 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7102 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7103 | ac_cv_prog_AWK="$ac_prog" | |
7104 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7105 | break 2 | |
7106 | fi | |
7107 | done | |
7108 | done | |
7109 | ||
861bb6c1 JL |
7110 | fi |
7111 | fi | |
ba479fd2 | 7112 | AWK=$ac_cv_prog_AWK |
861bb6c1 | 7113 | if test -n "$AWK"; then |
ba479fd2 NN |
7114 | echo "$as_me:$LINENO: result: $AWK" >&5 |
7115 | echo "${ECHO_T}$AWK" >&6 | |
861bb6c1 | 7116 | else |
ba479fd2 NN |
7117 | echo "$as_me:$LINENO: result: no" >&5 |
7118 | echo "${ECHO_T}no" >&6 | |
861bb6c1 JL |
7119 | fi |
7120 | ||
ba479fd2 | 7121 | test -n "$AWK" && break |
861bb6c1 JL |
7122 | done |
7123 | ||
776dc15d | 7124 | # We need awk to create options.c and options.h. |
2c4902b9 NN |
7125 | # Bail out if it's missing. |
7126 | case ${AWK} in | |
ba479fd2 NN |
7127 | "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5 |
7128 | echo "$as_me: error: can't build without awk, bailing out" >&2;} | |
7129 | { (exit 1); exit 1; }; } ;; | |
2c4902b9 NN |
7130 | esac |
7131 | ||
ba479fd2 NN |
7132 | echo "$as_me:$LINENO: checking whether ln -s works" >&5 |
7133 | echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 | |
7134 | if test "${gcc_cv_prog_LN_S+set}" = set; then | |
7135 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7136 | else |
7137 | rm -f conftestdata_t | |
7138 | echo >conftestdata_f | |
7139 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
7140 | then | |
7141 | gcc_cv_prog_LN_S="ln -s" | |
7142 | else | |
7143 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7144 | then | |
7145 | gcc_cv_prog_LN_S=ln | |
7146 | else | |
35f06ae4 PB |
7147 | if cp -p conftestdata_f conftestdata_t 2>/dev/null |
7148 | then | |
06c3418c | 7149 | gcc_cv_prog_LN_S="cp -p" |
35f06ae4 PB |
7150 | else |
7151 | gcc_cv_prog_LN_S=cp | |
7152 | fi | |
0a4b6309 RL |
7153 | fi |
7154 | fi | |
7155 | rm -f conftestdata_f conftestdata_t | |
7156 | ||
7157 | fi | |
7158 | LN_S="$gcc_cv_prog_LN_S" | |
7159 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
ba479fd2 NN |
7160 | echo "$as_me:$LINENO: result: yes" >&5 |
7161 | echo "${ECHO_T}yes" >&6 | |
0a4b6309 RL |
7162 | else |
7163 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
ba479fd2 NN |
7164 | echo "$as_me:$LINENO: result: no, using ln" >&5 |
7165 | echo "${ECHO_T}no, using ln" >&6 | |
0a4b6309 | 7166 | else |
35f06ae4 PB |
7167 | echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5 |
7168 | echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6 | |
0a4b6309 RL |
7169 | fi |
7170 | fi | |
7171 | ||
41e622a8 AP |
7172 | echo "$as_me:$LINENO: checking whether ln works" >&5 |
7173 | echo $ECHO_N "checking whether ln works... $ECHO_C" >&6 | |
7174 | if test "${acx_cv_prog_LN+set}" = set; then | |
7175 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7176 | else | |
7177 | rm -f conftestdata_t | |
7178 | echo >conftestdata_f | |
7179 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7180 | then | |
7181 | acx_cv_prog_LN=ln | |
7182 | else | |
7183 | acx_cv_prog_LN=no | |
7184 | fi | |
7185 | rm -f conftestdata_f conftestdata_t | |
7186 | ||
7187 | fi | |
7188 | if test $acx_cv_prog_LN = no; then | |
7189 | LN="$LN_S" | |
7190 | echo "$as_me:$LINENO: result: no, using $LN" >&5 | |
7191 | echo "${ECHO_T}no, using $LN" >&6 | |
7192 | else | |
7193 | LN="$acx_cv_prog_LN" | |
7194 | echo "$as_me:$LINENO: result: yes" >&5 | |
7195 | echo "${ECHO_T}yes" >&6 | |
7196 | fi | |
7197 | ||
ba479fd2 NN |
7198 | if test -n "$ac_tool_prefix"; then |
7199 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7200 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
7201 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7202 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7203 | if test "${ac_cv_prog_RANLIB+set}" = set; then | |
7204 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7205 | else |
7206 | if test -n "$RANLIB"; then | |
7207 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7208 | else | |
ba479fd2 NN |
7209 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7210 | for as_dir in $PATH | |
7211 | do | |
7212 | IFS=$as_save_IFS | |
7213 | test -z "$as_dir" && as_dir=. | |
7214 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7215 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7216 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
7217 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7218 | break 2 | |
7219 | fi | |
7220 | done | |
7221 | done | |
7222 | ||
6e3f3080 NN |
7223 | fi |
7224 | fi | |
ba479fd2 | 7225 | RANLIB=$ac_cv_prog_RANLIB |
6e3f3080 | 7226 | if test -n "$RANLIB"; then |
ba479fd2 NN |
7227 | echo "$as_me:$LINENO: result: $RANLIB" >&5 |
7228 | echo "${ECHO_T}$RANLIB" >&6 | |
7229 | else | |
7230 | echo "$as_me:$LINENO: result: no" >&5 | |
7231 | echo "${ECHO_T}no" >&6 | |
7232 | fi | |
7233 | ||
7234 | fi | |
7235 | if test -z "$ac_cv_prog_RANLIB"; then | |
7236 | ac_ct_RANLIB=$RANLIB | |
7237 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7238 | set dummy ranlib; ac_word=$2 | |
7239 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7240 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7241 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then | |
7242 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7243 | else | |
7244 | if test -n "$ac_ct_RANLIB"; then | |
7245 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7246 | else | |
7247 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7248 | for as_dir in $PATH | |
7249 | do | |
7250 | IFS=$as_save_IFS | |
7251 | test -z "$as_dir" && as_dir=. | |
7252 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7253 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7254 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
7255 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7256 | break 2 | |
7257 | fi | |
7258 | done | |
7259 | done | |
7260 | ||
7261 | test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" | |
7262 | fi | |
7263 | fi | |
7264 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7265 | if test -n "$ac_ct_RANLIB"; then | |
7266 | echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 | |
7267 | echo "${ECHO_T}$ac_ct_RANLIB" >&6 | |
6e3f3080 | 7268 | else |
ba479fd2 NN |
7269 | echo "$as_me:$LINENO: result: no" >&5 |
7270 | echo "${ECHO_T}no" >&6 | |
7271 | fi | |
7272 | ||
7273 | RANLIB=$ac_ct_RANLIB | |
7274 | else | |
7275 | RANLIB="$ac_cv_prog_RANLIB" | |
861bb6c1 JL |
7276 | fi |
7277 | ||
343a6100 MM |
7278 | case "${host}" in |
7279 | *-*-darwin*) | |
7280 | # By default, the Darwin ranlib will not treat common symbols as | |
7281 | # definitions when building the archive table of contents. Other | |
7282 | # ranlibs do that; pass an option to the Darwin ranlib that makes | |
7283 | # it behave similarly. | |
7284 | ranlib_flags="-c" | |
7285 | ;; | |
7286 | *) | |
7287 | ranlib_flags="" | |
7288 | esac | |
7289 | ||
7290 | ||
0a4b6309 RL |
7291 | # Find a good install program. We prefer a C program (faster), |
7292 | # so one script is as good as another. But avoid the broken or | |
7293 | # incompatible versions: | |
7294 | # SysV /etc/install, /usr/sbin/install | |
7295 | # SunOS /usr/etc/install | |
7296 | # IRIX /sbin/install | |
7297 | # AIX /bin/install | |
7298 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7299 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7300 | # ./install, which can be erroneously created by make from ./install.sh. | |
ba479fd2 NN |
7301 | echo "$as_me:$LINENO: checking for a BSD compatible install" >&5 |
7302 | echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 | |
0a4b6309 | 7303 | if test -z "$INSTALL"; then |
ba479fd2 NN |
7304 | if test "${ac_cv_path_install+set}" = set; then |
7305 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7306 | else |
7307 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
7308 | for ac_dir in $PATH; do | |
7309 | # Account for people who put trailing slashes in PATH elements. | |
7310 | case "$ac_dir/" in | |
7311 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
7312 | *) | |
7313 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7314 | for ac_prog in ginstall scoinst install; do | |
7315 | if test -f $ac_dir/$ac_prog; then | |
7316 | if test $ac_prog = install && | |
7317 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
7318 | # AIX install. It has an incompatible calling convention. | |
7319 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
7320 | : | |
7321 | else | |
7322 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
7323 | break 2 | |
7324 | fi | |
7325 | fi | |
7326 | done | |
7327 | ;; | |
7328 | esac | |
7329 | done | |
7330 | IFS="$ac_save_IFS" | |
7331 | ||
7332 | fi | |
7333 | if test "${ac_cv_path_install+set}" = set; then | |
7334 | INSTALL="$ac_cv_path_install" | |
7335 | else | |
7336 | # As a last resort, use the slow shell script. We don't cache a | |
7337 | # path for INSTALL within a source directory, because that will | |
7338 | # break other packages using the cache if that directory is | |
7339 | # removed, or if the path is relative. | |
7340 | INSTALL="$ac_install_sh" | |
7341 | fi | |
7342 | fi | |
ba479fd2 NN |
7343 | echo "$as_me:$LINENO: result: $INSTALL" >&5 |
7344 | echo "${ECHO_T}$INSTALL" >&6 | |
0a4b6309 RL |
7345 | |
7346 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7347 | # It thinks the first close brace ends the variable substitution. | |
7348 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7349 | ||
7350 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
7351 | ||
861bb6c1 | 7352 | |
3a000df0 | 7353 | # See if cmp has --ignore-initial. |
ba479fd2 NN |
7354 | echo "$as_me:$LINENO: checking for cmp's capabilities" >&5 |
7355 | echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6 | |
7356 | if test "${gcc_cv_prog_cmp_skip+set}" = set; then | |
7357 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a000df0 KC |
7358 | else |
7359 | echo abfoo >t1 | |
7360 | echo cdfoo >t2 | |
269a7343 | 7361 | gcc_cv_prog_cmp_skip=slowcompare |
3a000df0 KC |
7362 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then |
7363 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
269a7343 | 7364 | : |
3a000df0 KC |
7365 | else |
7366 | gcc_cv_prog_cmp_skip=gnucompare | |
7367 | fi | |
269a7343 KG |
7368 | fi |
7369 | if test $gcc_cv_prog_cmp_skip = slowcompare ; then | |
7370 | if cmp t1 t2 2 2 > /dev/null 2>&1; then | |
7371 | if cmp t1 t2 1 1 > /dev/null 2>&1; then | |
7372 | : | |
7373 | else | |
7374 | gcc_cv_prog_cmp_skip=fastcompare | |
7375 | fi | |
7376 | fi | |
3a000df0 KC |
7377 | fi |
7378 | rm t1 t2 | |
7379 | ||
7380 | fi | |
ba479fd2 NN |
7381 | echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5 |
7382 | echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6 | |
3a000df0 KC |
7383 | make_compare_target=$gcc_cv_prog_cmp_skip |
7384 | ||
7385 | ||
7386 | ||
73458fb7 NN |
7387 | # See if we have the mktemp command. |
7388 | # Extract the first word of "mktemp", so it can be a program name with args. | |
7389 | set dummy mktemp; ac_word=$2 | |
ba479fd2 NN |
7390 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7391 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7392 | if test "${ac_cv_prog_have_mktemp_command+set}" = set; then | |
7393 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7394 | else |
7395 | if test -n "$have_mktemp_command"; then | |
7396 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
7397 | else | |
ba479fd2 NN |
7398 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7399 | for as_dir in $PATH | |
7400 | do | |
7401 | IFS=$as_save_IFS | |
7402 | test -z "$as_dir" && as_dir=. | |
7403 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7404 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7405 | ac_cv_prog_have_mktemp_command="yes" | |
7406 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7407 | break 2 | |
7408 | fi | |
7409 | done | |
7410 | done | |
7411 | ||
73458fb7 NN |
7412 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
7413 | fi | |
7414 | fi | |
ba479fd2 | 7415 | have_mktemp_command=$ac_cv_prog_have_mktemp_command |
73458fb7 | 7416 | if test -n "$have_mktemp_command"; then |
ba479fd2 NN |
7417 | echo "$as_me:$LINENO: result: $have_mktemp_command" >&5 |
7418 | echo "${ECHO_T}$have_mktemp_command" >&6 | |
73458fb7 | 7419 | else |
ba479fd2 NN |
7420 | echo "$as_me:$LINENO: result: no" >&5 |
7421 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7422 | fi |
7423 | ||
7424 | ||
7c27e184 PB |
7425 | MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing" |
7426 | ||
7427 | # See if makeinfo has been installed and is modern enough | |
7428 | # that we can use it. | |
9f18db39 PB |
7429 | |
7430 | ac_executable_extensions="$build_exeext" | |
7431 | ||
7c27e184 | 7432 | # Extract the first word of "makeinfo", so it can be a program name with args. |
73458fb7 | 7433 | set dummy makeinfo; ac_word=$2 |
ba479fd2 NN |
7434 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7435 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7436 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then | |
7437 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7438 | else |
7439 | if test -n "$MAKEINFO"; then | |
7440 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
7441 | else | |
ba479fd2 NN |
7442 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7443 | for as_dir in $PATH | |
7444 | do | |
7445 | IFS=$as_save_IFS | |
7446 | test -z "$as_dir" && as_dir=. | |
7447 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7448 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7449 | ac_cv_prog_MAKEINFO="makeinfo" | |
7450 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7451 | break 2 | |
7452 | fi | |
7453 | done | |
7454 | done | |
7455 | ||
73458fb7 NN |
7456 | fi |
7457 | fi | |
ba479fd2 | 7458 | MAKEINFO=$ac_cv_prog_MAKEINFO |
73458fb7 | 7459 | if test -n "$MAKEINFO"; then |
ba479fd2 NN |
7460 | echo "$as_me:$LINENO: result: $MAKEINFO" >&5 |
7461 | echo "${ECHO_T}$MAKEINFO" >&6 | |
73458fb7 | 7462 | else |
ba479fd2 NN |
7463 | echo "$as_me:$LINENO: result: no" >&5 |
7464 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7465 | fi |
7466 | ||
7467 | if test -n "$MAKEINFO"; then | |
7468 | # Found it, now check the version. | |
ba479fd2 NN |
7469 | echo "$as_me:$LINENO: checking for modern makeinfo" >&5 |
7470 | echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6 | |
7471 | if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then | |
7472 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7473 | else |
7474 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
7475 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
dbad5e72 | 7476 | echo "configure:7476: version of makeinfo is $ac_prog_version" >&5 |
73458fb7 NN |
7477 | case $ac_prog_version in |
7478 | '') gcc_cv_prog_makeinfo_modern=no;; | |
7479 | 4.[2-9]*) | |
7480 | gcc_cv_prog_makeinfo_modern=yes;; | |
7481 | *) gcc_cv_prog_makeinfo_modern=no;; | |
7482 | esac | |
7483 | ||
7484 | fi | |
ba479fd2 NN |
7485 | echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5 |
7486 | echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6 | |
73458fb7 NN |
7487 | else |
7488 | gcc_cv_prog_makeinfo_modern=no | |
7489 | fi | |
7490 | ||
73458fb7 | 7491 | if test $gcc_cv_prog_makeinfo_modern = no; then |
7c27e184 | 7492 | MAKEINFO="$MISSING makeinfo" |
ba479fd2 NN |
7493 | { echo "$as_me:$LINENO: WARNING: |
7494 | *** Makeinfo is missing or too old. | |
7495 | *** Info documentation will not be built." >&5 | |
7496 | echo "$as_me: WARNING: | |
cafe096b | 7497 | *** Makeinfo is missing or too old. |
ba479fd2 | 7498 | *** Info documentation will not be built." >&2;} |
73458fb7 NN |
7499 | BUILD_INFO= |
7500 | else | |
ba479fd2 | 7501 | BUILD_INFO=info |
73458fb7 NN |
7502 | fi |
7503 | ||
7c27e184 | 7504 | |
73458fb7 | 7505 | # Is pod2man recent enough to regenerate manpages? |
ba479fd2 NN |
7506 | echo "$as_me:$LINENO: checking for recent Pod::Man" >&5 |
7507 | echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6 | |
73458fb7 | 7508 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
ba479fd2 NN |
7509 | echo "$as_me:$LINENO: result: yes" >&5 |
7510 | echo "${ECHO_T}yes" >&6 | |
7511 | GENERATED_MANPAGES=generated-manpages | |
73458fb7 | 7512 | else |
ba479fd2 NN |
7513 | echo "$as_me:$LINENO: result: no" >&5 |
7514 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7515 | GENERATED_MANPAGES= |
7516 | fi | |
7517 | ||
7c27e184 | 7518 | |
73458fb7 | 7519 | # How about lex? |
7c27e184 PB |
7520 | for ac_prog in flex |
7521 | do | |
7522 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7523 | set dummy $ac_prog; ac_word=$2 | |
ba479fd2 NN |
7524 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7525 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7526 | if test "${ac_cv_prog_FLEX+set}" = set; then | |
7527 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7528 | else |
7529 | if test -n "$FLEX"; then | |
7530 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
7531 | else | |
ba479fd2 NN |
7532 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7533 | for as_dir in $PATH | |
7534 | do | |
7535 | IFS=$as_save_IFS | |
7536 | test -z "$as_dir" && as_dir=. | |
7537 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7538 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7c27e184 | 7539 | ac_cv_prog_FLEX="$ac_prog" |
ba479fd2 NN |
7540 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7541 | break 2 | |
7542 | fi | |
7543 | done | |
7544 | done | |
7545 | ||
73458fb7 NN |
7546 | fi |
7547 | fi | |
ba479fd2 | 7548 | FLEX=$ac_cv_prog_FLEX |
73458fb7 | 7549 | if test -n "$FLEX"; then |
ba479fd2 NN |
7550 | echo "$as_me:$LINENO: result: $FLEX" >&5 |
7551 | echo "${ECHO_T}$FLEX" >&6 | |
73458fb7 | 7552 | else |
ba479fd2 NN |
7553 | echo "$as_me:$LINENO: result: no" >&5 |
7554 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7555 | fi |
7556 | ||
7c27e184 PB |
7557 | test -n "$FLEX" && break |
7558 | done | |
7559 | test -n "$FLEX" || FLEX="$MISSING flex" | |
7560 | ||
73458fb7 NN |
7561 | |
7562 | # Bison? | |
7c27e184 PB |
7563 | for ac_prog in bison |
7564 | do | |
7565 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7566 | set dummy $ac_prog; ac_word=$2 | |
ba479fd2 NN |
7567 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7568 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7569 | if test "${ac_cv_prog_BISON+set}" = set; then | |
7570 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7571 | else |
7572 | if test -n "$BISON"; then | |
7573 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
7574 | else | |
ba479fd2 NN |
7575 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7576 | for as_dir in $PATH | |
7577 | do | |
7578 | IFS=$as_save_IFS | |
7579 | test -z "$as_dir" && as_dir=. | |
7580 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7581 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7c27e184 | 7582 | ac_cv_prog_BISON="$ac_prog" |
ba479fd2 NN |
7583 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7584 | break 2 | |
7585 | fi | |
7586 | done | |
7587 | done | |
7588 | ||
73458fb7 NN |
7589 | fi |
7590 | fi | |
ba479fd2 | 7591 | BISON=$ac_cv_prog_BISON |
73458fb7 | 7592 | if test -n "$BISON"; then |
ba479fd2 NN |
7593 | echo "$as_me:$LINENO: result: $BISON" >&5 |
7594 | echo "${ECHO_T}$BISON" >&6 | |
73458fb7 | 7595 | else |
ba479fd2 NN |
7596 | echo "$as_me:$LINENO: result: no" >&5 |
7597 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7598 | fi |
7599 | ||
7c27e184 PB |
7600 | test -n "$BISON" && break |
7601 | done | |
7602 | test -n "$BISON" || BISON="$MISSING bison" | |
7603 | ||
7604 | ||
7605 | # Binutils are not build modules, unlike bison/flex/makeinfo. So we | |
7606 | # check for build == host before using them. | |
73458fb7 | 7607 | |
f6a874ac | 7608 | # NM |
414adbdd GK |
7609 | if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ |
7610 | && test -d ../binutils ; then | |
f6a874ac JW |
7611 | NM='$(objdir)/../binutils/nm-new' |
7612 | else | |
7613 | # Extract the first word of "nm", so it can be a program name with args. | |
7614 | set dummy nm; ac_word=$2 | |
7615 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7616 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7617 | if test "${ac_cv_prog_NM+set}" = set; then | |
7618 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7619 | else | |
7620 | if test -n "$NM"; then | |
7621 | ac_cv_prog_NM="$NM" # Let the user override the test. | |
7622 | else | |
7623 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7624 | for as_dir in $PATH | |
7625 | do | |
7626 | IFS=$as_save_IFS | |
7627 | test -z "$as_dir" && as_dir=. | |
7628 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7629 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7630 | ac_cv_prog_NM="nm" | |
7631 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7632 | break 2 | |
7633 | fi | |
7634 | done | |
7635 | done | |
7636 | ||
7637 | test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm" | |
7638 | fi | |
7639 | fi | |
7640 | NM=$ac_cv_prog_NM | |
7641 | if test -n "$NM"; then | |
7642 | echo "$as_me:$LINENO: result: $NM" >&5 | |
7643 | echo "${ECHO_T}$NM" >&6 | |
7644 | else | |
7645 | echo "$as_me:$LINENO: result: no" >&5 | |
7646 | echo "${ECHO_T}no" >&6 | |
7647 | fi | |
7648 | ||
7649 | fi | |
7650 | ||
7651 | # AR | |
414adbdd GK |
7652 | if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ |
7653 | && test -d ../binutils ; then | |
f6a874ac JW |
7654 | AR='$(objdir)/../binutils/ar' |
7655 | else | |
7656 | # Extract the first word of "ar", so it can be a program name with args. | |
7657 | set dummy ar; ac_word=$2 | |
7658 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7659 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7660 | if test "${ac_cv_prog_AR+set}" = set; then | |
7661 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7662 | else | |
7663 | if test -n "$AR"; then | |
7664 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7665 | else | |
7666 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7667 | for as_dir in $PATH | |
7668 | do | |
7669 | IFS=$as_save_IFS | |
7670 | test -z "$as_dir" && as_dir=. | |
7671 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7672 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7673 | ac_cv_prog_AR="ar" | |
7674 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7675 | break 2 | |
7676 | fi | |
7677 | done | |
7678 | done | |
7679 | ||
7680 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar" | |
7681 | fi | |
7682 | fi | |
7683 | AR=$ac_cv_prog_AR | |
7684 | if test -n "$AR"; then | |
7685 | echo "$as_me:$LINENO: result: $AR" >&5 | |
7686 | echo "${ECHO_T}$AR" >&6 | |
7687 | else | |
7688 | echo "$as_me:$LINENO: result: no" >&5 | |
7689 | echo "${ECHO_T}no" >&6 | |
7690 | fi | |
7691 | ||
7692 | fi | |
7693 | ||
7694 | ||
73458fb7 NN |
7695 | # -------------------- |
7696 | # Checks for C headers | |
7697 | # -------------------- | |
7698 | ||
ba479fd2 NN |
7699 | echo "$as_me:$LINENO: checking for GNU C library" >&5 |
7700 | echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6 | |
7701 | if test "${gcc_cv_glibc+set}" = set; then | |
7702 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7703 | else | |
7704 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7705 | /* confdefs.h. */ |
7706 | _ACEOF | |
7707 | cat confdefs.h >>conftest.$ac_ext | |
7708 | cat >>conftest.$ac_ext <<_ACEOF | |
7709 | /* end confdefs.h. */ | |
73458fb7 | 7710 | #include <features.h> |
ba479fd2 NN |
7711 | int |
7712 | main () | |
7713 | { | |
73458fb7 NN |
7714 | |
7715 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
7716 | #error Not a GNU C library system | |
7717 | #endif | |
ba479fd2 NN |
7718 | ; |
7719 | return 0; | |
7720 | } | |
7721 | _ACEOF | |
7722 | rm -f conftest.$ac_objext | |
7723 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7724 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7725 | ac_status=$? |
86da66b5 HPN |
7726 | grep -v '^ *+' conftest.er1 >conftest.err |
7727 | rm -f conftest.er1 | |
7728 | cat conftest.err >&5 | |
ba479fd2 NN |
7729 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7730 | (exit $ac_status); } && | |
dbad5e72 SE |
7731 | { ac_try='test -z "$ac_c_werror_flag" |
7732 | || test ! -s conftest.err' | |
86da66b5 HPN |
7733 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7734 | (eval $ac_try) 2>&5 | |
7735 | ac_status=$? | |
7736 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7737 | (exit $ac_status); }; } && | |
7738 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7739 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7740 | (eval $ac_try) 2>&5 | |
7741 | ac_status=$? | |
7742 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7743 | (exit $ac_status); }; }; then | |
73458fb7 NN |
7744 | gcc_cv_glibc=yes |
7745 | else | |
ba479fd2 NN |
7746 | echo "$as_me: failed program was:" >&5 |
7747 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7748 | ||
7749 | gcc_cv_glibc=no | |
73458fb7 | 7750 | fi |
86da66b5 | 7751 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
73458fb7 NN |
7752 | fi |
7753 | ||
ba479fd2 NN |
7754 | echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5 |
7755 | echo "${ECHO_T}$gcc_cv_glibc" >&6 | |
73458fb7 | 7756 | if test $gcc_cv_glibc = yes; then |
ba479fd2 NN |
7757 | |
7758 | cat >>confdefs.h <<\_ACEOF | |
73458fb7 | 7759 | #define _GNU_SOURCE 1 |
ba479fd2 | 7760 | _ACEOF |
73458fb7 NN |
7761 | |
7762 | fi | |
7763 | ||
ca9bc441 NN |
7764 | # Need to reject headers which give warnings, so that the -Werror bootstrap |
7765 | # works later. *sigh* This needs to come before all header checks. | |
7766 | ||
7767 | ac_c_preproc_warn_flag=yes | |
7768 | ||
ba479fd2 NN |
7769 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
7770 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
7771 | if test "${ac_cv_header_stdc+set}" = set; then | |
7772 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 7773 | else |
ba479fd2 | 7774 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7775 | /* confdefs.h. */ |
7776 | _ACEOF | |
7777 | cat confdefs.h >>conftest.$ac_ext | |
7778 | cat >>conftest.$ac_ext <<_ACEOF | |
7779 | /* end confdefs.h. */ | |
956d6950 JL |
7780 | #include <stdlib.h> |
7781 | #include <stdarg.h> | |
7782 | #include <string.h> | |
7783 | #include <float.h> | |
ba479fd2 NN |
7784 | |
7785 | int | |
7786 | main () | |
7787 | { | |
7788 | ||
7789 | ; | |
7790 | return 0; | |
7791 | } | |
7792 | _ACEOF | |
7793 | rm -f conftest.$ac_objext | |
7794 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7795 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7796 | ac_status=$? |
86da66b5 HPN |
7797 | grep -v '^ *+' conftest.er1 >conftest.err |
7798 | rm -f conftest.er1 | |
7799 | cat conftest.err >&5 | |
ba479fd2 NN |
7800 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7801 | (exit $ac_status); } && | |
dbad5e72 SE |
7802 | { ac_try='test -z "$ac_c_werror_flag" |
7803 | || test ! -s conftest.err' | |
86da66b5 HPN |
7804 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7805 | (eval $ac_try) 2>&5 | |
7806 | ac_status=$? | |
7807 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7808 | (exit $ac_status); }; } && | |
7809 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7810 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7811 | (eval $ac_try) 2>&5 | |
7812 | ac_status=$? | |
7813 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7814 | (exit $ac_status); }; }; then | |
956d6950 JL |
7815 | ac_cv_header_stdc=yes |
7816 | else | |
ba479fd2 NN |
7817 | echo "$as_me: failed program was:" >&5 |
7818 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7819 | ||
7820 | ac_cv_header_stdc=no | |
956d6950 | 7821 | fi |
86da66b5 | 7822 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
7823 | |
7824 | if test $ac_cv_header_stdc = yes; then | |
7825 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
ba479fd2 | 7826 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7827 | /* confdefs.h. */ |
7828 | _ACEOF | |
7829 | cat confdefs.h >>conftest.$ac_ext | |
7830 | cat >>conftest.$ac_ext <<_ACEOF | |
7831 | /* end confdefs.h. */ | |
956d6950 | 7832 | #include <string.h> |
ba479fd2 NN |
7833 | |
7834 | _ACEOF | |
956d6950 | 7835 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 7836 | $EGREP "memchr" >/dev/null 2>&1; then |
956d6950 JL |
7837 | : |
7838 | else | |
956d6950 JL |
7839 | ac_cv_header_stdc=no |
7840 | fi | |
7841 | rm -f conftest* | |
7842 | ||
7843 | fi | |
7844 | ||
7845 | if test $ac_cv_header_stdc = yes; then | |
7846 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
ba479fd2 | 7847 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7848 | /* confdefs.h. */ |
7849 | _ACEOF | |
7850 | cat confdefs.h >>conftest.$ac_ext | |
7851 | cat >>conftest.$ac_ext <<_ACEOF | |
7852 | /* end confdefs.h. */ | |
956d6950 | 7853 | #include <stdlib.h> |
ba479fd2 NN |
7854 | |
7855 | _ACEOF | |
956d6950 | 7856 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 7857 | $EGREP "free" >/dev/null 2>&1; then |
956d6950 JL |
7858 | : |
7859 | else | |
956d6950 JL |
7860 | ac_cv_header_stdc=no |
7861 | fi | |
7862 | rm -f conftest* | |
7863 | ||
7864 | fi | |
7865 | ||
7866 | if test $ac_cv_header_stdc = yes; then | |
7867 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
ba479fd2 | 7868 | if test "$cross_compiling" = yes; then |
956d6950 JL |
7869 | : |
7870 | else | |
ba479fd2 | 7871 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7872 | /* confdefs.h. */ |
7873 | _ACEOF | |
7874 | cat confdefs.h >>conftest.$ac_ext | |
7875 | cat >>conftest.$ac_ext <<_ACEOF | |
7876 | /* end confdefs.h. */ | |
956d6950 | 7877 | #include <ctype.h> |
ba479fd2 NN |
7878 | #if ((' ' & 0x0FF) == 0x020) |
7879 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
7880 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
7881 | #else | |
7882 | # define ISLOWER(c) \ | |
86da66b5 HPN |
7883 | (('a' <= (c) && (c) <= 'i') \ |
7884 | || ('j' <= (c) && (c) <= 'r') \ | |
7885 | || ('s' <= (c) && (c) <= 'z')) | |
ba479fd2 NN |
7886 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
7887 | #endif | |
63cf211a | 7888 | |
ba479fd2 NN |
7889 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
7890 | int | |
7891 | main () | |
7892 | { | |
7893 | int i; | |
7894 | for (i = 0; i < 256; i++) | |
7895 | if (XOR (islower (i), ISLOWER (i)) | |
86da66b5 | 7896 | || toupper (i) != TOUPPER (i)) |
ba479fd2 NN |
7897 | exit(2); |
7898 | exit (0); | |
7899 | } | |
7900 | _ACEOF | |
7901 | rm -f conftest$ac_exeext | |
7902 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7903 | (eval $ac_link) 2>&5 | |
7904 | ac_status=$? | |
7905 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7906 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
7907 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7908 | (eval $ac_try) 2>&5 | |
7909 | ac_status=$? | |
7910 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7911 | (exit $ac_status); }; }; then | |
956d6950 JL |
7912 | : |
7913 | else | |
ba479fd2 NN |
7914 | echo "$as_me: program exited with status $ac_status" >&5 |
7915 | echo "$as_me: failed program was:" >&5 | |
7916 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7917 | ||
7918 | ( exit $ac_status ) | |
7919 | ac_cv_header_stdc=no | |
956d6950 | 7920 | fi |
86da66b5 | 7921 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
956d6950 | 7922 | fi |
956d6950 JL |
7923 | fi |
7924 | fi | |
ba479fd2 NN |
7925 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 |
7926 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
63cf211a | 7927 | if test $ac_cv_header_stdc = yes; then |
ba479fd2 NN |
7928 | |
7929 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 7930 | #define STDC_HEADERS 1 |
ba479fd2 | 7931 | _ACEOF |
956d6950 JL |
7932 | |
7933 | fi | |
7934 | ||
ba479fd2 NN |
7935 | echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 |
7936 | echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 | |
7937 | if test "${ac_cv_header_time+set}" = set; then | |
7938 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 7939 | else |
ba479fd2 | 7940 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7941 | /* confdefs.h. */ |
7942 | _ACEOF | |
7943 | cat confdefs.h >>conftest.$ac_ext | |
7944 | cat >>conftest.$ac_ext <<_ACEOF | |
7945 | /* end confdefs.h. */ | |
956d6950 JL |
7946 | #include <sys/types.h> |
7947 | #include <sys/time.h> | |
7948 | #include <time.h> | |
ba479fd2 NN |
7949 | |
7950 | int | |
7951 | main () | |
7952 | { | |
7953 | if ((struct tm *) 0) | |
7954 | return 0; | |
7955 | ; | |
7956 | return 0; | |
7957 | } | |
7958 | _ACEOF | |
7959 | rm -f conftest.$ac_objext | |
7960 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7961 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7962 | ac_status=$? |
86da66b5 HPN |
7963 | grep -v '^ *+' conftest.er1 >conftest.err |
7964 | rm -f conftest.er1 | |
7965 | cat conftest.err >&5 | |
ba479fd2 NN |
7966 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7967 | (exit $ac_status); } && | |
dbad5e72 SE |
7968 | { ac_try='test -z "$ac_c_werror_flag" |
7969 | || test ! -s conftest.err' | |
86da66b5 HPN |
7970 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7971 | (eval $ac_try) 2>&5 | |
7972 | ac_status=$? | |
7973 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7974 | (exit $ac_status); }; } && | |
7975 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7976 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7977 | (eval $ac_try) 2>&5 | |
7978 | ac_status=$? | |
7979 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7980 | (exit $ac_status); }; }; then | |
956d6950 JL |
7981 | ac_cv_header_time=yes |
7982 | else | |
ba479fd2 NN |
7983 | echo "$as_me: failed program was:" >&5 |
7984 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7985 | ||
7986 | ac_cv_header_time=no | |
956d6950 | 7987 | fi |
86da66b5 | 7988 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 | 7989 | fi |
ba479fd2 NN |
7990 | echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 |
7991 | echo "${ECHO_T}$ac_cv_header_time" >&6 | |
63cf211a | 7992 | if test $ac_cv_header_time = yes; then |
ba479fd2 NN |
7993 | |
7994 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 7995 | #define TIME_WITH_SYS_TIME 1 |
ba479fd2 | 7996 | _ACEOF |
956d6950 JL |
7997 | |
7998 | fi | |
7999 | ||
41e622a8 AP |
8000 | echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 |
8001 | echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6 | |
8002 | if test "${gcc_cv_header_string+set}" = set; then | |
8003 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8004 | else | |
8005 | cat >conftest.$ac_ext <<_ACEOF | |
8006 | /* confdefs.h. */ | |
8007 | _ACEOF | |
8008 | cat confdefs.h >>conftest.$ac_ext | |
8009 | cat >>conftest.$ac_ext <<_ACEOF | |
8010 | /* end confdefs.h. */ | |
8011 | #include <string.h> | |
8012 | #include <strings.h> | |
8013 | int | |
8014 | main () | |
8015 | { | |
8016 | ||
8017 | ; | |
8018 | return 0; | |
8019 | } | |
8020 | _ACEOF | |
8021 | rm -f conftest.$ac_objext | |
8022 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8023 | (eval $ac_compile) 2>conftest.er1 | |
8024 | ac_status=$? | |
8025 | grep -v '^ *+' conftest.er1 >conftest.err | |
8026 | rm -f conftest.er1 | |
8027 | cat conftest.err >&5 | |
8028 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8029 | (exit $ac_status); } && | |
dbad5e72 SE |
8030 | { ac_try='test -z "$ac_c_werror_flag" |
8031 | || test ! -s conftest.err' | |
41e622a8 AP |
8032 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8033 | (eval $ac_try) 2>&5 | |
8034 | ac_status=$? | |
8035 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8036 | (exit $ac_status); }; } && | |
8037 | { ac_try='test -s conftest.$ac_objext' | |
8038 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8039 | (eval $ac_try) 2>&5 | |
8040 | ac_status=$? | |
8041 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8042 | (exit $ac_status); }; }; then | |
8043 | gcc_cv_header_string=yes | |
8044 | else | |
8045 | echo "$as_me: failed program was:" >&5 | |
8046 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8047 | ||
8048 | gcc_cv_header_string=no | |
8049 | fi | |
8050 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
8051 | fi | |
8052 | echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 | |
8053 | echo "${ECHO_T}$gcc_cv_header_string" >&6 | |
8054 | if test $gcc_cv_header_string = yes; then | |
8055 | ||
8056 | cat >>confdefs.h <<\_ACEOF | |
8057 | #define STRING_WITH_STRINGS 1 | |
8058 | _ACEOF | |
8059 | ||
8060 | fi | |
8061 | ||
ba479fd2 NN |
8062 | echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
8063 | echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 | |
8064 | if test "${ac_cv_header_sys_wait_h+set}" = set; then | |
8065 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9831ca0 | 8066 | else |
ba479fd2 | 8067 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8068 | /* confdefs.h. */ |
8069 | _ACEOF | |
8070 | cat confdefs.h >>conftest.$ac_ext | |
8071 | cat >>conftest.$ac_ext <<_ACEOF | |
8072 | /* end confdefs.h. */ | |
e9831ca0 KG |
8073 | #include <sys/types.h> |
8074 | #include <sys/wait.h> | |
8075 | #ifndef WEXITSTATUS | |
ba479fd2 | 8076 | # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
e9831ca0 KG |
8077 | #endif |
8078 | #ifndef WIFEXITED | |
ba479fd2 | 8079 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 8080 | #endif |
ba479fd2 NN |
8081 | |
8082 | int | |
8083 | main () | |
8084 | { | |
8085 | int s; | |
8086 | wait (&s); | |
8087 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
8088 | ; | |
8089 | return 0; | |
8090 | } | |
8091 | _ACEOF | |
8092 | rm -f conftest.$ac_objext | |
8093 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8094 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8095 | ac_status=$? |
86da66b5 HPN |
8096 | grep -v '^ *+' conftest.er1 >conftest.err |
8097 | rm -f conftest.er1 | |
8098 | cat conftest.err >&5 | |
ba479fd2 NN |
8099 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8100 | (exit $ac_status); } && | |
dbad5e72 SE |
8101 | { ac_try='test -z "$ac_c_werror_flag" |
8102 | || test ! -s conftest.err' | |
86da66b5 HPN |
8103 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8104 | (eval $ac_try) 2>&5 | |
8105 | ac_status=$? | |
8106 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8107 | (exit $ac_status); }; } && | |
8108 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8109 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8110 | (eval $ac_try) 2>&5 | |
8111 | ac_status=$? | |
8112 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8113 | (exit $ac_status); }; }; then | |
e9831ca0 KG |
8114 | ac_cv_header_sys_wait_h=yes |
8115 | else | |
ba479fd2 NN |
8116 | echo "$as_me: failed program was:" >&5 |
8117 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8118 | ||
8119 | ac_cv_header_sys_wait_h=no | |
e9831ca0 | 8120 | fi |
86da66b5 | 8121 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
e9831ca0 | 8122 | fi |
ba479fd2 NN |
8123 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 |
8124 | echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 | |
63cf211a | 8125 | if test $ac_cv_header_sys_wait_h = yes; then |
ba479fd2 NN |
8126 | |
8127 | cat >>confdefs.h <<\_ACEOF | |
e9831ca0 | 8128 | #define HAVE_SYS_WAIT_H 1 |
ba479fd2 | 8129 | _ACEOF |
6e3f3080 | 8130 | |
63cf211a | 8131 | fi |
6e3f3080 | 8132 | |
ba479fd2 NN |
8133 | |
8134 | ||
8135 | ||
8136 | ||
8137 | ||
8138 | ||
8139 | ||
8140 | ||
8141 | ||
8142 | ||
8143 | ||
8144 | ||
8145 | ||
8146 | ||
8147 | ||
8148 | ||
8149 | ||
8150 | ||
8151 | ||
8152 | ||
8153 | ||
dfb77e37 KC |
8154 | |
8155 | for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \ | |
1072ec3f | 8156 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 8157 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
56694dd9 | 8158 | direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h |
861bb6c1 | 8159 | do |
ba479fd2 | 8160 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
ca9bc441 | 8161 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
8162 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
8163 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
8164 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 8165 | else |
ca9bc441 | 8166 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8167 | /* confdefs.h. */ |
8168 | _ACEOF | |
8169 | cat confdefs.h >>conftest.$ac_ext | |
8170 | cat >>conftest.$ac_ext <<_ACEOF | |
8171 | /* end confdefs.h. */ | |
8172 | #include <$ac_header> | |
8173 | _ACEOF | |
8174 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8175 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8176 | ac_status=$? | |
8177 | grep -v '^ *+' conftest.er1 >conftest.err | |
8178 | rm -f conftest.er1 | |
8179 | cat conftest.err >&5 | |
8180 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8181 | (exit $ac_status); } >/dev/null; then | |
8182 | if test -s conftest.err; then | |
8183 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8184 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8185 | else |
8186 | ac_cpp_err= | |
8187 | fi | |
8188 | else | |
8189 | ac_cpp_err=yes | |
8190 | fi | |
8191 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 8192 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
8193 | else |
8194 | echo "$as_me: failed program was:" >&5 | |
8195 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8196 | ||
ca9bc441 | 8197 | eval "$as_ac_Header=no" |
ba479fd2 NN |
8198 | fi |
8199 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8200 | fi |
ba479fd2 NN |
8201 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
8202 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
8203 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
8204 | cat >>confdefs.h <<_ACEOF | |
8205 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8206 | _ACEOF | |
8207 | ||
956d6950 JL |
8208 | fi |
8209 | done | |
8210 | ||
8211 | ||
f24af81b | 8212 | # Check for thread headers. |
ca9bc441 | 8213 | echo "$as_me:$LINENO: checking for thread.h" >&5 |
ba479fd2 NN |
8214 | echo $ECHO_N "checking for thread.h... $ECHO_C" >&6 |
8215 | if test "${ac_cv_header_thread_h+set}" = set; then | |
8216 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 8217 | else |
ca9bc441 | 8218 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8219 | /* confdefs.h. */ |
8220 | _ACEOF | |
8221 | cat confdefs.h >>conftest.$ac_ext | |
8222 | cat >>conftest.$ac_ext <<_ACEOF | |
8223 | /* end confdefs.h. */ | |
8224 | #include <thread.h> | |
8225 | _ACEOF | |
8226 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8227 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8228 | ac_status=$? | |
8229 | grep -v '^ *+' conftest.er1 >conftest.err | |
8230 | rm -f conftest.er1 | |
8231 | cat conftest.err >&5 | |
8232 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8233 | (exit $ac_status); } >/dev/null; then | |
8234 | if test -s conftest.err; then | |
8235 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8236 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8237 | else |
8238 | ac_cpp_err= | |
8239 | fi | |
8240 | else | |
8241 | ac_cpp_err=yes | |
8242 | fi | |
8243 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 8244 | ac_cv_header_thread_h=yes |
ba479fd2 NN |
8245 | else |
8246 | echo "$as_me: failed program was:" >&5 | |
8247 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8248 | ||
ca9bc441 | 8249 | ac_cv_header_thread_h=no |
ba479fd2 NN |
8250 | fi |
8251 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8252 | fi |
ba479fd2 NN |
8253 | echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5 |
8254 | echo "${ECHO_T}$ac_cv_header_thread_h" >&6 | |
ba479fd2 | 8255 | if test $ac_cv_header_thread_h = yes; then |
f24af81b TT |
8256 | have_thread_h=yes |
8257 | else | |
ba479fd2 | 8258 | have_thread_h= |
f24af81b TT |
8259 | fi |
8260 | ||
ca9bc441 | 8261 | echo "$as_me:$LINENO: checking for pthread.h" >&5 |
ba479fd2 NN |
8262 | echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 |
8263 | if test "${ac_cv_header_pthread_h+set}" = set; then | |
8264 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f24af81b | 8265 | else |
ca9bc441 | 8266 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8267 | /* confdefs.h. */ |
8268 | _ACEOF | |
8269 | cat confdefs.h >>conftest.$ac_ext | |
8270 | cat >>conftest.$ac_ext <<_ACEOF | |
8271 | /* end confdefs.h. */ | |
8272 | #include <pthread.h> | |
8273 | _ACEOF | |
8274 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8275 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8276 | ac_status=$? | |
8277 | grep -v '^ *+' conftest.er1 >conftest.err | |
8278 | rm -f conftest.er1 | |
8279 | cat conftest.err >&5 | |
8280 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8281 | (exit $ac_status); } >/dev/null; then | |
8282 | if test -s conftest.err; then | |
8283 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8284 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8285 | else |
8286 | ac_cpp_err= | |
8287 | fi | |
8288 | else | |
8289 | ac_cpp_err=yes | |
8290 | fi | |
8291 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 8292 | ac_cv_header_pthread_h=yes |
ba479fd2 NN |
8293 | else |
8294 | echo "$as_me: failed program was:" >&5 | |
8295 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8296 | ||
ca9bc441 | 8297 | ac_cv_header_pthread_h=no |
ba479fd2 NN |
8298 | fi |
8299 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8300 | fi |
ba479fd2 NN |
8301 | echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 |
8302 | echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 | |
ba479fd2 | 8303 | if test $ac_cv_header_pthread_h = yes; then |
f24af81b TT |
8304 | have_pthread_h=yes |
8305 | else | |
ba479fd2 | 8306 | have_pthread_h= |
f24af81b TT |
8307 | fi |
8308 | ||
8309 | ||
84c041a1 | 8310 | # These tests can't be done till we know if we have limits.h. |
ba479fd2 NN |
8311 | echo "$as_me:$LINENO: checking for CHAR_BIT" >&5 |
8312 | echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6 | |
8313 | if test "${gcc_cv_decl_char_bit+set}" = set; then | |
8314 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8315 | else | |
8316 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8317 | /* confdefs.h. */ |
8318 | _ACEOF | |
8319 | cat confdefs.h >>conftest.$ac_ext | |
8320 | cat >>conftest.$ac_ext <<_ACEOF | |
8321 | /* end confdefs.h. */ | |
75e93faa ZW |
8322 | #ifdef HAVE_LIMITS_H |
8323 | #include <limits.h> | |
8324 | #endif | |
8325 | #ifdef CHAR_BIT | |
8326 | found | |
8327 | #endif | |
ba479fd2 | 8328 | _ACEOF |
75e93faa | 8329 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8330 | $EGREP "found" >/dev/null 2>&1; then |
75e93faa ZW |
8331 | gcc_cv_decl_char_bit=yes |
8332 | else | |
75e93faa ZW |
8333 | gcc_cv_decl_char_bit=no |
8334 | fi | |
8335 | rm -f conftest* | |
8336 | ||
8337 | ||
8338 | fi | |
ba479fd2 NN |
8339 | echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5 |
8340 | echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6 | |
75e93faa | 8341 | if test $gcc_cv_decl_char_bit = no; then |
ba479fd2 NN |
8342 | echo "$as_me:$LINENO: checking number of bits in a byte" >&5 |
8343 | echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6 | |
8344 | if test "${gcc_cv_c_nbby+set}" = set; then | |
8345 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa ZW |
8346 | else |
8347 | i=8 | |
8348 | gcc_cv_c_nbby= | |
8349 | while test $i -lt 65; do | |
ba479fd2 | 8350 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8351 | /* confdefs.h. */ |
8352 | _ACEOF | |
8353 | cat confdefs.h >>conftest.$ac_ext | |
8354 | cat >>conftest.$ac_ext <<_ACEOF | |
8355 | /* end confdefs.h. */ | |
8356 | ||
8357 | int | |
8358 | main () | |
8359 | { | |
4e70264f ZW |
8360 | switch(0) { |
8361 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
8362 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
8363 | ; } | |
ba479fd2 NN |
8364 | ; |
8365 | return 0; | |
8366 | } | |
8367 | _ACEOF | |
8368 | rm -f conftest.$ac_objext | |
8369 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8370 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8371 | ac_status=$? |
86da66b5 HPN |
8372 | grep -v '^ *+' conftest.er1 >conftest.err |
8373 | rm -f conftest.er1 | |
8374 | cat conftest.err >&5 | |
ba479fd2 NN |
8375 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8376 | (exit $ac_status); } && | |
dbad5e72 SE |
8377 | { ac_try='test -z "$ac_c_werror_flag" |
8378 | || test ! -s conftest.err' | |
86da66b5 HPN |
8379 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8380 | (eval $ac_try) 2>&5 | |
8381 | ac_status=$? | |
8382 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8383 | (exit $ac_status); }; } && | |
8384 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8385 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8386 | (eval $ac_try) 2>&5 | |
8387 | ac_status=$? | |
8388 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8389 | (exit $ac_status); }; }; then | |
4e70264f | 8390 | gcc_cv_c_nbby=$i; break |
75e93faa | 8391 | else |
ba479fd2 NN |
8392 | echo "$as_me: failed program was:" >&5 |
8393 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8394 | ||
75e93faa | 8395 | fi |
86da66b5 | 8396 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75e93faa ZW |
8397 | i=`expr $i + 1` |
8398 | done | |
8399 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
8400 | ||
8401 | fi | |
ba479fd2 NN |
8402 | echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5 |
8403 | echo "${ECHO_T}$gcc_cv_c_nbby" >&6 | |
75e93faa | 8404 | if test $gcc_cv_c_nbby = failed; then |
ba479fd2 NN |
8405 | { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5 |
8406 | echo "$as_me: error: cannot determine number of bits in a byte" >&2;} | |
8407 | { (exit 1); exit 1; }; } | |
75e93faa | 8408 | else |
ba479fd2 NN |
8409 | |
8410 | cat >>confdefs.h <<_ACEOF | |
75e93faa | 8411 | #define CHAR_BIT $gcc_cv_c_nbby |
ba479fd2 | 8412 | _ACEOF |
75e93faa ZW |
8413 | |
8414 | fi | |
8415 | fi | |
ba479fd2 NN |
8416 | echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 |
8417 | echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 | |
8418 | if test "${ac_cv_c_bigendian+set}" = set; then | |
8419 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
84c041a1 | 8420 | else |
9791c75c | 8421 | # See if sys/param.h defines the BYTE_ORDER macro. |
ba479fd2 | 8422 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8423 | /* confdefs.h. */ |
8424 | _ACEOF | |
8425 | cat confdefs.h >>conftest.$ac_ext | |
8426 | cat >>conftest.$ac_ext <<_ACEOF | |
8427 | /* end confdefs.h. */ | |
4977bab6 ZW |
8428 | #include <sys/types.h> |
8429 | #include <sys/param.h> | |
9791c75c | 8430 | |
ba479fd2 NN |
8431 | int |
8432 | main () | |
8433 | { | |
4977bab6 ZW |
8434 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
8435 | bogus endian macros | |
84c041a1 | 8436 | #endif |
9791c75c | 8437 | |
ba479fd2 NN |
8438 | ; |
8439 | return 0; | |
8440 | } | |
8441 | _ACEOF | |
8442 | rm -f conftest.$ac_objext | |
8443 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8444 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8445 | ac_status=$? |
86da66b5 HPN |
8446 | grep -v '^ *+' conftest.er1 >conftest.err |
8447 | rm -f conftest.er1 | |
8448 | cat conftest.err >&5 | |
ba479fd2 NN |
8449 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8450 | (exit $ac_status); } && | |
dbad5e72 SE |
8451 | { ac_try='test -z "$ac_c_werror_flag" |
8452 | || test ! -s conftest.err' | |
86da66b5 HPN |
8453 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8454 | (eval $ac_try) 2>&5 | |
8455 | ac_status=$? | |
8456 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8457 | (exit $ac_status); }; } && | |
8458 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8459 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8460 | (eval $ac_try) 2>&5 | |
8461 | ac_status=$? | |
8462 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8463 | (exit $ac_status); }; }; then | |
4977bab6 | 8464 | # It does; now see whether it defined to BIG_ENDIAN or not. |
ba479fd2 | 8465 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8466 | /* confdefs.h. */ |
8467 | _ACEOF | |
8468 | cat confdefs.h >>conftest.$ac_ext | |
8469 | cat >>conftest.$ac_ext <<_ACEOF | |
8470 | /* end confdefs.h. */ | |
4977bab6 ZW |
8471 | #include <sys/types.h> |
8472 | #include <sys/param.h> | |
9791c75c | 8473 | |
ba479fd2 NN |
8474 | int |
8475 | main () | |
8476 | { | |
4977bab6 ZW |
8477 | #if BYTE_ORDER != BIG_ENDIAN |
8478 | not big endian | |
84c041a1 | 8479 | #endif |
9791c75c | 8480 | |
ba479fd2 NN |
8481 | ; |
8482 | return 0; | |
8483 | } | |
8484 | _ACEOF | |
8485 | rm -f conftest.$ac_objext | |
8486 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8487 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8488 | ac_status=$? |
86da66b5 HPN |
8489 | grep -v '^ *+' conftest.er1 >conftest.err |
8490 | rm -f conftest.er1 | |
8491 | cat conftest.err >&5 | |
ba479fd2 NN |
8492 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8493 | (exit $ac_status); } && | |
dbad5e72 SE |
8494 | { ac_try='test -z "$ac_c_werror_flag" |
8495 | || test ! -s conftest.err' | |
86da66b5 HPN |
8496 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8497 | (eval $ac_try) 2>&5 | |
8498 | ac_status=$? | |
8499 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8500 | (exit $ac_status); }; } && | |
8501 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8502 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8503 | (eval $ac_try) 2>&5 | |
8504 | ac_status=$? | |
8505 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8506 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
8507 | ac_cv_c_bigendian=yes |
8508 | else | |
ba479fd2 NN |
8509 | echo "$as_me: failed program was:" >&5 |
8510 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8511 | ||
8512 | ac_cv_c_bigendian=no | |
4977bab6 | 8513 | fi |
86da66b5 | 8514 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 8515 | else |
ba479fd2 NN |
8516 | echo "$as_me: failed program was:" >&5 |
8517 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8518 | ||
9791c75c KC |
8519 | # It does not; compile a test program. |
8520 | if test "$cross_compiling" = yes; then | |
8521 | # try to guess the endianness by grepping values into an object file | |
8522 | ac_cv_c_bigendian=unknown | |
8523 | cat >conftest.$ac_ext <<_ACEOF | |
8524 | /* confdefs.h. */ | |
8525 | _ACEOF | |
8526 | cat confdefs.h >>conftest.$ac_ext | |
8527 | cat >>conftest.$ac_ext <<_ACEOF | |
8528 | /* end confdefs.h. */ | |
8529 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
8530 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
8531 | void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } | |
8532 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
8533 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
8534 | void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } | |
8535 | int | |
8536 | main () | |
8537 | { | |
8538 | _ascii (); _ebcdic (); | |
8539 | ; | |
8540 | return 0; | |
8541 | } | |
8542 | _ACEOF | |
8543 | rm -f conftest.$ac_objext | |
8544 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8545 | (eval $ac_compile) 2>conftest.er1 | |
8546 | ac_status=$? | |
8547 | grep -v '^ *+' conftest.er1 >conftest.err | |
8548 | rm -f conftest.er1 | |
8549 | cat conftest.err >&5 | |
8550 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8551 | (exit $ac_status); } && | |
dbad5e72 SE |
8552 | { ac_try='test -z "$ac_c_werror_flag" |
8553 | || test ! -s conftest.err' | |
9791c75c KC |
8554 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8555 | (eval $ac_try) 2>&5 | |
8556 | ac_status=$? | |
8557 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8558 | (exit $ac_status); }; } && | |
8559 | { ac_try='test -s conftest.$ac_objext' | |
8560 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8561 | (eval $ac_try) 2>&5 | |
8562 | ac_status=$? | |
8563 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8564 | (exit $ac_status); }; }; then | |
8565 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then | |
8566 | ac_cv_c_bigendian=yes | |
8567 | fi | |
8568 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
8569 | if test "$ac_cv_c_bigendian" = unknown; then | |
8570 | ac_cv_c_bigendian=no | |
8571 | else | |
8572 | # finding both strings is unlikely to happen, but who knows? | |
8573 | ac_cv_c_bigendian=unknown | |
8574 | fi | |
8575 | fi | |
8576 | else | |
8577 | echo "$as_me: failed program was:" >&5 | |
8578 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8579 | ||
4977bab6 | 8580 | fi |
86da66b5 | 8581 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
8582 | else |
8583 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8584 | /* confdefs.h. */ |
8585 | _ACEOF | |
8586 | cat confdefs.h >>conftest.$ac_ext | |
8587 | cat >>conftest.$ac_ext <<_ACEOF | |
8588 | /* end confdefs.h. */ | |
9791c75c KC |
8589 | int |
8590 | main () | |
8591 | { | |
4977bab6 ZW |
8592 | /* Are we little or big endian? From Harbison&Steele. */ |
8593 | union | |
8594 | { | |
8595 | long l; | |
8596 | char c[sizeof (long)]; | |
8597 | } u; | |
8598 | u.l = 1; | |
8599 | exit (u.c[sizeof (long) - 1] == 1); | |
8600 | } | |
ba479fd2 NN |
8601 | _ACEOF |
8602 | rm -f conftest$ac_exeext | |
8603 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8604 | (eval $ac_link) 2>&5 | |
8605 | ac_status=$? | |
8606 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8607 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
8608 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8609 | (eval $ac_try) 2>&5 | |
8610 | ac_status=$? | |
8611 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8612 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
8613 | ac_cv_c_bigendian=no |
8614 | else | |
ba479fd2 NN |
8615 | echo "$as_me: program exited with status $ac_status" >&5 |
8616 | echo "$as_me: failed program was:" >&5 | |
8617 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8618 | ||
8619 | ( exit $ac_status ) | |
8620 | ac_cv_c_bigendian=yes | |
4977bab6 | 8621 | fi |
86da66b5 | 8622 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
84c041a1 | 8623 | fi |
4977bab6 | 8624 | fi |
9791c75c | 8625 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 8626 | fi |
ba479fd2 NN |
8627 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 |
8628 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
9791c75c KC |
8629 | case $ac_cv_c_bigendian in |
8630 | yes) | |
ba479fd2 NN |
8631 | |
8632 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 8633 | #define WORDS_BIGENDIAN 1 |
ba479fd2 | 8634 | _ACEOF |
9791c75c KC |
8635 | ;; |
8636 | no) | |
8637 | ;; | |
8638 | *) | |
8639 | { { echo "$as_me:$LINENO: error: unknown endianness | |
8640 | presetting ac_cv_c_bigendian=no (or yes) will help" >&5 | |
8641 | echo "$as_me: error: unknown endianness | |
8642 | presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} | |
8643 | { (exit 1); exit 1; }; } ;; | |
8644 | esac | |
84c041a1 | 8645 | |
75e93faa | 8646 | |
73458fb7 NN |
8647 | # -------- |
8648 | # UNSORTED | |
8649 | # -------- | |
1e608388 | 8650 | |
73458fb7 NN |
8651 | # Stage specific cflags for build. |
8652 | stage1_cflags= | |
8653 | case $build in | |
8654 | vax-*-*) | |
8655 | if test x$GCC = xyes | |
8656 | then | |
8657 | stage1_cflags="-Wa,-J" | |
8658 | else | |
8659 | stage1_cflags="-J" | |
8660 | fi | |
8661 | ;; | |
8662 | powerpc-*-darwin*) | |
8663 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
8664 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
8665 | # Apple's GCC has bugs in designated initializer handling, so disable | |
8666 | # that too. | |
8667 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
8668 | ;; | |
8669 | esac | |
1e608388 | 8670 | |
1e608388 | 8671 | |
4e70264f ZW |
8672 | # These libraries may be used by collect2. |
8673 | # We may need a special search path to get them linked. | |
ba479fd2 NN |
8674 | echo "$as_me:$LINENO: checking for collect2 libraries" >&5 |
8675 | echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6 | |
8676 | if test "${gcc_cv_collect2_libs+set}" = set; then | |
8677 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4e70264f ZW |
8678 | else |
8679 | save_LIBS="$LIBS" | |
7f2749d4 | 8680 | for libs in '' -lld -lmld \ |
4e70264f ZW |
8681 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
8682 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
8683 | do | |
8684 | LIBS="$libs" | |
ba479fd2 | 8685 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8686 | /* confdefs.h. */ |
8687 | _ACEOF | |
8688 | cat confdefs.h >>conftest.$ac_ext | |
8689 | cat >>conftest.$ac_ext <<_ACEOF | |
8690 | /* end confdefs.h. */ | |
8691 | ||
4e70264f | 8692 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8693 | #ifdef __cplusplus |
8694 | extern "C" | |
8695 | #endif | |
4e70264f | 8696 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8697 | builtin and then its argument prototype would still apply. */ |
8698 | char ldopen (); | |
8699 | int | |
8700 | main () | |
8701 | { | |
8702 | ldopen (); | |
8703 | ; | |
8704 | return 0; | |
8705 | } | |
8706 | _ACEOF | |
8707 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8708 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8709 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8710 | ac_status=$? |
86da66b5 HPN |
8711 | grep -v '^ *+' conftest.er1 >conftest.err |
8712 | rm -f conftest.er1 | |
8713 | cat conftest.err >&5 | |
ba479fd2 NN |
8714 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8715 | (exit $ac_status); } && | |
dbad5e72 SE |
8716 | { ac_try='test -z "$ac_c_werror_flag" |
8717 | || test ! -s conftest.err' | |
86da66b5 HPN |
8718 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8719 | (eval $ac_try) 2>&5 | |
8720 | ac_status=$? | |
8721 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8722 | (exit $ac_status); }; } && | |
8723 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8724 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8725 | (eval $ac_try) 2>&5 | |
8726 | ac_status=$? | |
8727 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8728 | (exit $ac_status); }; }; then | |
4e70264f ZW |
8729 | gcc_cv_collect2_libs="$libs"; break |
8730 | else | |
ba479fd2 NN |
8731 | echo "$as_me: failed program was:" >&5 |
8732 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8733 | ||
4e70264f | 8734 | fi |
86da66b5 HPN |
8735 | rm -f conftest.err conftest.$ac_objext \ |
8736 | conftest$ac_exeext conftest.$ac_ext | |
4e70264f ZW |
8737 | done |
8738 | LIBS="$save_LIBS" | |
8739 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
8740 | fi | |
ba479fd2 NN |
8741 | echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5 |
8742 | echo "${ECHO_T}$gcc_cv_collect2_libs" >&6 | |
4e70264f ZW |
8743 | case $gcc_cv_collect2_libs in |
8744 | "none required") ;; | |
8745 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
8746 | esac | |
8747 | ||
8748 | ||
7f2749d4 RK |
8749 | # When building Ada code on Alpha, we need exc_resume which is usually in |
8750 | # -lexc. So test for it. | |
8751 | save_LIBS="$LIBS" | |
8752 | LIBS= | |
ba479fd2 NN |
8753 | echo "$as_me:$LINENO: checking for library containing exc_resume" >&5 |
8754 | echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6 | |
8755 | if test "${ac_cv_search_exc_resume+set}" = set; then | |
8756 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8757 | else | |
8758 | ac_func_search_save_LIBS=$LIBS | |
8759 | ac_cv_search_exc_resume=no | |
8760 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8761 | /* confdefs.h. */ |
8762 | _ACEOF | |
8763 | cat confdefs.h >>conftest.$ac_ext | |
8764 | cat >>conftest.$ac_ext <<_ACEOF | |
8765 | /* end confdefs.h. */ | |
7f2749d4 | 8766 | |
7f2749d4 | 8767 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8768 | #ifdef __cplusplus |
8769 | extern "C" | |
8770 | #endif | |
7f2749d4 | 8771 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8772 | builtin and then its argument prototype would still apply. */ |
8773 | char exc_resume (); | |
8774 | int | |
8775 | main () | |
8776 | { | |
8777 | exc_resume (); | |
8778 | ; | |
8779 | return 0; | |
8780 | } | |
8781 | _ACEOF | |
8782 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8783 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8784 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8785 | ac_status=$? |
86da66b5 HPN |
8786 | grep -v '^ *+' conftest.er1 >conftest.err |
8787 | rm -f conftest.er1 | |
8788 | cat conftest.err >&5 | |
ba479fd2 NN |
8789 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8790 | (exit $ac_status); } && | |
dbad5e72 SE |
8791 | { ac_try='test -z "$ac_c_werror_flag" |
8792 | || test ! -s conftest.err' | |
86da66b5 HPN |
8793 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8794 | (eval $ac_try) 2>&5 | |
8795 | ac_status=$? | |
8796 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8797 | (exit $ac_status); }; } && | |
8798 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8799 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8800 | (eval $ac_try) 2>&5 | |
8801 | ac_status=$? | |
8802 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8803 | (exit $ac_status); }; }; then | |
7f2749d4 RK |
8804 | ac_cv_search_exc_resume="none required" |
8805 | else | |
ba479fd2 NN |
8806 | echo "$as_me: failed program was:" >&5 |
8807 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8808 | ||
7f2749d4 | 8809 | fi |
86da66b5 HPN |
8810 | rm -f conftest.err conftest.$ac_objext \ |
8811 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
8812 | if test "$ac_cv_search_exc_resume" = no; then |
8813 | for ac_lib in exc; do | |
8814 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8815 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8816 | /* confdefs.h. */ |
8817 | _ACEOF | |
8818 | cat confdefs.h >>conftest.$ac_ext | |
8819 | cat >>conftest.$ac_ext <<_ACEOF | |
8820 | /* end confdefs.h. */ | |
8821 | ||
7f2749d4 | 8822 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8823 | #ifdef __cplusplus |
8824 | extern "C" | |
8825 | #endif | |
7f2749d4 | 8826 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8827 | builtin and then its argument prototype would still apply. */ |
8828 | char exc_resume (); | |
8829 | int | |
8830 | main () | |
8831 | { | |
8832 | exc_resume (); | |
8833 | ; | |
8834 | return 0; | |
8835 | } | |
8836 | _ACEOF | |
8837 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8838 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8839 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8840 | ac_status=$? |
86da66b5 HPN |
8841 | grep -v '^ *+' conftest.er1 >conftest.err |
8842 | rm -f conftest.er1 | |
8843 | cat conftest.err >&5 | |
ba479fd2 NN |
8844 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8845 | (exit $ac_status); } && | |
dbad5e72 SE |
8846 | { ac_try='test -z "$ac_c_werror_flag" |
8847 | || test ! -s conftest.err' | |
86da66b5 HPN |
8848 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8849 | (eval $ac_try) 2>&5 | |
8850 | ac_status=$? | |
8851 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8852 | (exit $ac_status); }; } && | |
8853 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8854 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8855 | (eval $ac_try) 2>&5 | |
8856 | ac_status=$? | |
8857 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8858 | (exit $ac_status); }; }; then | |
8859 | ac_cv_search_exc_resume="-l$ac_lib" | |
7f2749d4 RK |
8860 | break |
8861 | else | |
ba479fd2 NN |
8862 | echo "$as_me: failed program was:" >&5 |
8863 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8864 | ||
cafe096b | 8865 | fi |
86da66b5 HPN |
8866 | rm -f conftest.err conftest.$ac_objext \ |
8867 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 8868 | done |
6e3f3080 | 8869 | fi |
ba479fd2 NN |
8870 | LIBS=$ac_func_search_save_LIBS |
8871 | fi | |
8872 | echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5 | |
8873 | echo "${ECHO_T}$ac_cv_search_exc_resume" >&6 | |
8874 | if test "$ac_cv_search_exc_resume" != no; then | |
63cf211a | 8875 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" |
ba479fd2 | 8876 | |
7f2749d4 | 8877 | fi |
ba479fd2 | 8878 | |
7f2749d4 RK |
8879 | GNAT_LIBEXC="$LIBS" |
8880 | LIBS="$save_LIBS" | |
8881 | ||
8882 | ||
62c9aa5f ZW |
8883 | # Some systems put ldexp and frexp in libm instead of libc; assume |
8884 | # they're both in the same place. jcf-dump needs them. | |
8885 | save_LIBS="$LIBS" | |
8886 | LIBS= | |
ba479fd2 NN |
8887 | echo "$as_me:$LINENO: checking for library containing ldexp" >&5 |
8888 | echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6 | |
8889 | if test "${ac_cv_search_ldexp+set}" = set; then | |
8890 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8891 | else | |
8892 | ac_func_search_save_LIBS=$LIBS | |
8893 | ac_cv_search_ldexp=no | |
8894 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8895 | /* confdefs.h. */ |
8896 | _ACEOF | |
8897 | cat confdefs.h >>conftest.$ac_ext | |
8898 | cat >>conftest.$ac_ext <<_ACEOF | |
8899 | /* end confdefs.h. */ | |
62c9aa5f | 8900 | |
62c9aa5f | 8901 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8902 | #ifdef __cplusplus |
8903 | extern "C" | |
8904 | #endif | |
62c9aa5f | 8905 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8906 | builtin and then its argument prototype would still apply. */ |
8907 | char ldexp (); | |
8908 | int | |
8909 | main () | |
8910 | { | |
8911 | ldexp (); | |
8912 | ; | |
8913 | return 0; | |
8914 | } | |
8915 | _ACEOF | |
8916 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8917 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8918 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8919 | ac_status=$? |
86da66b5 HPN |
8920 | grep -v '^ *+' conftest.er1 >conftest.err |
8921 | rm -f conftest.er1 | |
8922 | cat conftest.err >&5 | |
ba479fd2 NN |
8923 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8924 | (exit $ac_status); } && | |
dbad5e72 SE |
8925 | { ac_try='test -z "$ac_c_werror_flag" |
8926 | || test ! -s conftest.err' | |
86da66b5 HPN |
8927 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8928 | (eval $ac_try) 2>&5 | |
8929 | ac_status=$? | |
8930 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8931 | (exit $ac_status); }; } && | |
8932 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8933 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8934 | (eval $ac_try) 2>&5 | |
8935 | ac_status=$? | |
8936 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8937 | (exit $ac_status); }; }; then | |
62c9aa5f ZW |
8938 | ac_cv_search_ldexp="none required" |
8939 | else | |
ba479fd2 NN |
8940 | echo "$as_me: failed program was:" >&5 |
8941 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8942 | ||
62c9aa5f | 8943 | fi |
86da66b5 HPN |
8944 | rm -f conftest.err conftest.$ac_objext \ |
8945 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
8946 | if test "$ac_cv_search_ldexp" = no; then |
8947 | for ac_lib in m; do | |
8948 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8949 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8950 | /* confdefs.h. */ |
8951 | _ACEOF | |
8952 | cat confdefs.h >>conftest.$ac_ext | |
8953 | cat >>conftest.$ac_ext <<_ACEOF | |
8954 | /* end confdefs.h. */ | |
8955 | ||
62c9aa5f | 8956 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8957 | #ifdef __cplusplus |
8958 | extern "C" | |
8959 | #endif | |
62c9aa5f | 8960 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8961 | builtin and then its argument prototype would still apply. */ |
8962 | char ldexp (); | |
8963 | int | |
8964 | main () | |
8965 | { | |
8966 | ldexp (); | |
8967 | ; | |
8968 | return 0; | |
8969 | } | |
8970 | _ACEOF | |
8971 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8972 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8973 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8974 | ac_status=$? |
86da66b5 HPN |
8975 | grep -v '^ *+' conftest.er1 >conftest.err |
8976 | rm -f conftest.er1 | |
8977 | cat conftest.err >&5 | |
ba479fd2 NN |
8978 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8979 | (exit $ac_status); } && | |
dbad5e72 SE |
8980 | { ac_try='test -z "$ac_c_werror_flag" |
8981 | || test ! -s conftest.err' | |
86da66b5 HPN |
8982 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8983 | (eval $ac_try) 2>&5 | |
8984 | ac_status=$? | |
8985 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8986 | (exit $ac_status); }; } && | |
8987 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8988 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8989 | (eval $ac_try) 2>&5 | |
8990 | ac_status=$? | |
8991 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8992 | (exit $ac_status); }; }; then | |
8993 | ac_cv_search_ldexp="-l$ac_lib" | |
62c9aa5f ZW |
8994 | break |
8995 | else | |
ba479fd2 NN |
8996 | echo "$as_me: failed program was:" >&5 |
8997 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8998 | ||
cafe096b | 8999 | fi |
86da66b5 HPN |
9000 | rm -f conftest.err conftest.$ac_objext \ |
9001 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 9002 | done |
6e3f3080 | 9003 | fi |
ba479fd2 NN |
9004 | LIBS=$ac_func_search_save_LIBS |
9005 | fi | |
9006 | echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5 | |
9007 | echo "${ECHO_T}$ac_cv_search_ldexp" >&6 | |
9008 | if test "$ac_cv_search_ldexp" != no; then | |
63cf211a | 9009 | test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" |
ba479fd2 | 9010 | |
62c9aa5f | 9011 | fi |
ba479fd2 | 9012 | |
62c9aa5f ZW |
9013 | LDEXP_LIB="$LIBS" |
9014 | LIBS="$save_LIBS" | |
9015 | ||
9016 | ||
956d6950 JL |
9017 | # Use <inttypes.h> only if it exists, |
9018 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
ba479fd2 NN |
9019 | echo "$as_me:$LINENO: checking for inttypes.h" >&5 |
9020 | echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 | |
9021 | if test "${gcc_cv_header_inttypes_h+set}" = set; then | |
9022 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9023 | else | |
9024 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9025 | /* confdefs.h. */ |
9026 | _ACEOF | |
9027 | cat confdefs.h >>conftest.$ac_ext | |
9028 | cat >>conftest.$ac_ext <<_ACEOF | |
9029 | /* end confdefs.h. */ | |
956d6950 JL |
9030 | #include <sys/types.h> |
9031 | #include <inttypes.h> | |
ba479fd2 NN |
9032 | int |
9033 | main () | |
9034 | { | |
956d6950 | 9035 | intmax_t i = -1; |
ba479fd2 NN |
9036 | ; |
9037 | return 0; | |
9038 | } | |
9039 | _ACEOF | |
9040 | rm -f conftest.$ac_objext | |
9041 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9042 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9043 | ac_status=$? |
86da66b5 HPN |
9044 | grep -v '^ *+' conftest.er1 >conftest.err |
9045 | rm -f conftest.er1 | |
9046 | cat conftest.err >&5 | |
ba479fd2 NN |
9047 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9048 | (exit $ac_status); } && | |
dbad5e72 SE |
9049 | { ac_try='test -z "$ac_c_werror_flag" |
9050 | || test ! -s conftest.err' | |
86da66b5 HPN |
9051 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9052 | (eval $ac_try) 2>&5 | |
9053 | ac_status=$? | |
9054 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9055 | (exit $ac_status); }; } && | |
9056 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9057 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9058 | (eval $ac_try) 2>&5 | |
9059 | ac_status=$? | |
9060 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9061 | (exit $ac_status); }; }; then | |
0056a9b5 | 9062 | gcc_cv_header_inttypes_h=yes |
956d6950 | 9063 | else |
ba479fd2 NN |
9064 | echo "$as_me: failed program was:" >&5 |
9065 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9066 | ||
9067 | gcc_cv_header_inttypes_h=no | |
956d6950 | 9068 | fi |
86da66b5 | 9069 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
9070 | fi |
9071 | ||
ba479fd2 NN |
9072 | echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5 |
9073 | echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6 | |
0056a9b5 | 9074 | if test $gcc_cv_header_inttypes_h = yes; then |
ba479fd2 NN |
9075 | |
9076 | cat >>confdefs.h <<\_ACEOF | |
0056a9b5 | 9077 | #define HAVE_INTTYPES_H 1 |
ba479fd2 | 9078 | _ACEOF |
0056a9b5 KG |
9079 | |
9080 | fi | |
956d6950 | 9081 | |
c149cc37 | 9082 | |
ba479fd2 NN |
9083 | |
9084 | ||
9085 | ||
9086 | ||
9087 | ||
9088 | ||
9089 | ||
9090 | ||
9091 | ||
9092 | ||
9093 | ||
9094 | ||
9095 | ||
9096 | ||
9097 | ||
9098 | ||
0d667716 KG |
9099 | |
9100 | ||
9101 | ||
9102 | ||
9103 | ||
9104 | ||
9105 | ||
9106 | ||
9107 | ||
9108 | ||
9109 | ||
9110 | ||
ba479fd2 NN |
9111 | |
9112 | ||
9113 | ||
9114 | ||
9115 | ||
9116 | ||
9117 | ||
9118 | ||
52a6edcc | 9119 | for ac_func in times clock kill getrlimit setrlimit atoll atoq \ |
0d667716 KG |
9120 | sysconf strsignal getrusage nl_langinfo scandir alphasort \ |
9121 | gettimeofday mbstowcs wcswidth mmap mincore setlocale \ | |
9122 | 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 | 9123 | do |
ba479fd2 NN |
9124 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
9125 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
9126 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
9127 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
9128 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9129 | else | |
9130 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9131 | /* confdefs.h. */ |
9132 | _ACEOF | |
9133 | cat confdefs.h >>conftest.$ac_ext | |
9134 | cat >>conftest.$ac_ext <<_ACEOF | |
9135 | /* end confdefs.h. */ | |
86da66b5 HPN |
9136 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
9137 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9138 | #define $ac_func innocuous_$ac_func | |
9139 | ||
956d6950 | 9140 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
9141 | which can conflict with char $ac_func (); below. |
9142 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9143 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 9144 | |
ba479fd2 NN |
9145 | #ifdef __STDC__ |
9146 | # include <limits.h> | |
9147 | #else | |
9148 | # include <assert.h> | |
9149 | #endif | |
86da66b5 HPN |
9150 | |
9151 | #undef $ac_func | |
9152 | ||
6e3f3080 | 9153 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9154 | #ifdef __cplusplus |
9155 | extern "C" | |
9156 | { | |
9157 | #endif | |
6e3f3080 | 9158 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9159 | builtin and then its argument prototype would still apply. */ |
9160 | char $ac_func (); | |
956d6950 JL |
9161 | /* The GNU C library defines this for functions which it implements |
9162 | to always fail with ENOSYS. Some functions are actually named | |
9163 | something starting with __ and the normal name is an alias. */ | |
9164 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
9165 | choke me | |
9166 | #else | |
ba479fd2 NN |
9167 | char (*f) () = $ac_func; |
9168 | #endif | |
9169 | #ifdef __cplusplus | |
9170 | } | |
956d6950 JL |
9171 | #endif |
9172 | ||
ba479fd2 NN |
9173 | int |
9174 | main () | |
9175 | { | |
9176 | return f != $ac_func; | |
9177 | ; | |
9178 | return 0; | |
9179 | } | |
9180 | _ACEOF | |
9181 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9182 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9183 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9184 | ac_status=$? |
86da66b5 HPN |
9185 | grep -v '^ *+' conftest.er1 >conftest.err |
9186 | rm -f conftest.er1 | |
9187 | cat conftest.err >&5 | |
ba479fd2 NN |
9188 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9189 | (exit $ac_status); } && | |
dbad5e72 SE |
9190 | { ac_try='test -z "$ac_c_werror_flag" |
9191 | || test ! -s conftest.err' | |
86da66b5 HPN |
9192 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9193 | (eval $ac_try) 2>&5 | |
9194 | ac_status=$? | |
9195 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9196 | (exit $ac_status); }; } && | |
9197 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9198 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9199 | (eval $ac_try) 2>&5 | |
9200 | ac_status=$? | |
9201 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9202 | (exit $ac_status); }; }; then | |
9203 | eval "$as_ac_var=yes" | |
9204 | else | |
9205 | echo "$as_me: failed program was:" >&5 | |
9206 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9207 | ||
9208 | eval "$as_ac_var=no" | |
9209 | fi | |
86da66b5 HPN |
9210 | rm -f conftest.err conftest.$ac_objext \ |
9211 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
9212 | fi |
9213 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
9214 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
9215 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
9216 | cat >>confdefs.h <<_ACEOF | |
9217 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9218 | _ACEOF | |
956d6950 | 9219 | |
956d6950 JL |
9220 | fi |
9221 | done | |
9222 | ||
6885fc87 | 9223 | |
39f6c4c8 | 9224 | if test x$ac_cv_func_mbstowcs = xyes; then |
ba479fd2 NN |
9225 | echo "$as_me:$LINENO: checking whether mbstowcs works" >&5 |
9226 | echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6 | |
9227 | if test "${gcc_cv_func_mbstowcs_works+set}" = set; then | |
9228 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
39f6c4c8 KW |
9229 | else |
9230 | if test "$cross_compiling" = yes; then | |
9231 | gcc_cv_func_mbstowcs_works=yes | |
9232 | else | |
ba479fd2 | 9233 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9234 | /* confdefs.h. */ |
9235 | _ACEOF | |
9236 | cat confdefs.h >>conftest.$ac_ext | |
9237 | cat >>conftest.$ac_ext <<_ACEOF | |
9238 | /* end confdefs.h. */ | |
39f6c4c8 KW |
9239 | #include <stdlib.h> |
9240 | int main() | |
9241 | { | |
9242 | mbstowcs(0, "", 0); | |
9243 | return 0; | |
9244 | } | |
ba479fd2 NN |
9245 | _ACEOF |
9246 | rm -f conftest$ac_exeext | |
9247 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9248 | (eval $ac_link) 2>&5 | |
9249 | ac_status=$? | |
9250 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9251 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9252 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9253 | (eval $ac_try) 2>&5 | |
9254 | ac_status=$? | |
9255 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9256 | (exit $ac_status); }; }; then | |
39f6c4c8 KW |
9257 | gcc_cv_func_mbstowcs_works=yes |
9258 | else | |
ba479fd2 NN |
9259 | echo "$as_me: program exited with status $ac_status" >&5 |
9260 | echo "$as_me: failed program was:" >&5 | |
9261 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9262 | ||
9263 | ( exit $ac_status ) | |
9264 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 9265 | fi |
86da66b5 | 9266 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
39f6c4c8 | 9267 | fi |
39f6c4c8 | 9268 | fi |
ba479fd2 NN |
9269 | echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5 |
9270 | echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6 | |
63cf211a | 9271 | if test x$gcc_cv_func_mbstowcs_works = xyes; then |
ba479fd2 NN |
9272 | |
9273 | cat >>confdefs.h <<\_ACEOF | |
39f6c4c8 | 9274 | #define HAVE_WORKING_MBSTOWCS 1 |
ba479fd2 | 9275 | _ACEOF |
39f6c4c8 KW |
9276 | |
9277 | fi | |
9278 | fi | |
9279 | ||
ba479fd2 NN |
9280 | echo "$as_me:$LINENO: checking for ssize_t" >&5 |
9281 | echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 | |
9282 | if test "${ac_cv_type_ssize_t+set}" = set; then | |
9283 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
63cf211a | 9284 | else |
ba479fd2 | 9285 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9286 | /* confdefs.h. */ |
9287 | _ACEOF | |
9288 | cat confdefs.h >>conftest.$ac_ext | |
9289 | cat >>conftest.$ac_ext <<_ACEOF | |
9290 | /* end confdefs.h. */ | |
8b4fc07a NN |
9291 | $ac_includes_default |
9292 | int | |
9293 | main () | |
9294 | { | |
9295 | if ((ssize_t *) 0) | |
9296 | return 0; | |
9297 | if (sizeof (ssize_t)) | |
9298 | return 0; | |
9299 | ; | |
9300 | return 0; | |
9301 | } | |
ba479fd2 | 9302 | _ACEOF |
8b4fc07a NN |
9303 | rm -f conftest.$ac_objext |
9304 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9305 | (eval $ac_compile) 2>conftest.er1 |
8b4fc07a | 9306 | ac_status=$? |
86da66b5 HPN |
9307 | grep -v '^ *+' conftest.er1 >conftest.err |
9308 | rm -f conftest.er1 | |
9309 | cat conftest.err >&5 | |
8b4fc07a NN |
9310 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9311 | (exit $ac_status); } && | |
dbad5e72 SE |
9312 | { ac_try='test -z "$ac_c_werror_flag" |
9313 | || test ! -s conftest.err' | |
86da66b5 HPN |
9314 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9315 | (eval $ac_try) 2>&5 | |
9316 | ac_status=$? | |
9317 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9318 | (exit $ac_status); }; } && | |
9319 | { ac_try='test -s conftest.$ac_objext' | |
8b4fc07a NN |
9320 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9321 | (eval $ac_try) 2>&5 | |
9322 | ac_status=$? | |
9323 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9324 | (exit $ac_status); }; }; then | |
cb65112a | 9325 | ac_cv_type_ssize_t=yes |
f12bc141 | 9326 | else |
8b4fc07a NN |
9327 | echo "$as_me: failed program was:" >&5 |
9328 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 9329 | |
8b4fc07a NN |
9330 | ac_cv_type_ssize_t=no |
9331 | fi | |
86da66b5 | 9332 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 9333 | fi |
ba479fd2 NN |
9334 | echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 |
9335 | echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 | |
8b4fc07a NN |
9336 | if test $ac_cv_type_ssize_t = yes; then |
9337 | : | |
9338 | else | |
ba479fd2 | 9339 | |
8b4fc07a | 9340 | cat >>confdefs.h <<_ACEOF |
f12bc141 | 9341 | #define ssize_t int |
ba479fd2 | 9342 | _ACEOF |
f12bc141 ZW |
9343 | |
9344 | fi | |
9345 | ||
0b9d02c6 | 9346 | |
e256b8b6 DA |
9347 | # Try to determine the array type of the second argument of getgroups |
9348 | # for the target system (int or gid_t). | |
ba479fd2 NN |
9349 | echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 |
9350 | echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 | |
9351 | if test "${ac_cv_type_uid_t+set}" = set; then | |
9352 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9353 | else | |
9354 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9355 | /* confdefs.h. */ |
9356 | _ACEOF | |
9357 | cat confdefs.h >>conftest.$ac_ext | |
9358 | cat >>conftest.$ac_ext <<_ACEOF | |
9359 | /* end confdefs.h. */ | |
e256b8b6 | 9360 | #include <sys/types.h> |
ba479fd2 NN |
9361 | |
9362 | _ACEOF | |
e256b8b6 | 9363 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9364 | $EGREP "uid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
9365 | ac_cv_type_uid_t=yes |
9366 | else | |
e256b8b6 DA |
9367 | ac_cv_type_uid_t=no |
9368 | fi | |
9369 | rm -f conftest* | |
9370 | ||
9371 | fi | |
ba479fd2 NN |
9372 | echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 |
9373 | echo "${ECHO_T}$ac_cv_type_uid_t" >&6 | |
63cf211a | 9374 | if test $ac_cv_type_uid_t = no; then |
ba479fd2 NN |
9375 | |
9376 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 9377 | #define uid_t int |
ba479fd2 | 9378 | _ACEOF |
cafe096b | 9379 | |
ba479fd2 NN |
9380 | |
9381 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 9382 | #define gid_t int |
ba479fd2 | 9383 | _ACEOF |
e256b8b6 DA |
9384 | |
9385 | fi | |
9386 | ||
ba479fd2 NN |
9387 | echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 |
9388 | echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 | |
9389 | if test "${ac_cv_type_getgroups+set}" = set; then | |
9390 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e256b8b6 DA |
9391 | else |
9392 | if test "$cross_compiling" = yes; then | |
9393 | ac_cv_type_getgroups=cross | |
9394 | else | |
ba479fd2 | 9395 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9396 | /* confdefs.h. */ |
9397 | _ACEOF | |
9398 | cat confdefs.h >>conftest.$ac_ext | |
9399 | cat >>conftest.$ac_ext <<_ACEOF | |
9400 | /* end confdefs.h. */ | |
e256b8b6 DA |
9401 | /* Thanks to Mike Rendell for this test. */ |
9402 | #include <sys/types.h> | |
9403 | #define NGID 256 | |
9404 | #undef MAX | |
9405 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
ba479fd2 NN |
9406 | |
9407 | int | |
9408 | main () | |
e256b8b6 DA |
9409 | { |
9410 | gid_t gidset[NGID]; | |
9411 | int i, n; | |
9412 | union { gid_t gval; long lval; } val; | |
9413 | ||
9414 | val.lval = -1; | |
9415 | for (i = 0; i < NGID; i++) | |
9416 | gidset[i] = val.gval; | |
9417 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
86da66b5 | 9418 | gidset); |
e256b8b6 DA |
9419 | /* Exit non-zero if getgroups seems to require an array of ints. This |
9420 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
9421 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
63cf211a | 9422 | } |
ba479fd2 NN |
9423 | _ACEOF |
9424 | rm -f conftest$ac_exeext | |
9425 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9426 | (eval $ac_link) 2>&5 | |
9427 | ac_status=$? | |
9428 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9429 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9430 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9431 | (eval $ac_try) 2>&5 | |
9432 | ac_status=$? | |
9433 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9434 | (exit $ac_status); }; }; then | |
9435 | ac_cv_type_getgroups=gid_t | |
63cf211a | 9436 | else |
ba479fd2 NN |
9437 | echo "$as_me: program exited with status $ac_status" >&5 |
9438 | echo "$as_me: failed program was:" >&5 | |
9439 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9440 | ||
9441 | ( exit $ac_status ) | |
9442 | ac_cv_type_getgroups=int | |
e256b8b6 | 9443 | fi |
86da66b5 | 9444 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
e256b8b6 | 9445 | fi |
e256b8b6 | 9446 | if test $ac_cv_type_getgroups = cross; then |
ba479fd2 | 9447 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9448 | /* confdefs.h. */ |
9449 | _ACEOF | |
9450 | cat confdefs.h >>conftest.$ac_ext | |
9451 | cat >>conftest.$ac_ext <<_ACEOF | |
9452 | /* end confdefs.h. */ | |
e256b8b6 | 9453 | #include <unistd.h> |
ba479fd2 NN |
9454 | |
9455 | _ACEOF | |
e256b8b6 | 9456 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9457 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
9458 | ac_cv_type_getgroups=gid_t |
9459 | else | |
e256b8b6 DA |
9460 | ac_cv_type_getgroups=int |
9461 | fi | |
9462 | rm -f conftest* | |
9463 | ||
9464 | fi | |
9465 | fi | |
ba479fd2 NN |
9466 | echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 |
9467 | echo "${ECHO_T}$ac_cv_type_getgroups" >&6 | |
e256b8b6 | 9468 | |
ba479fd2 | 9469 | cat >>confdefs.h <<_ACEOF |
e256b8b6 | 9470 | #define GETGROUPS_T $ac_cv_type_getgroups |
ba479fd2 | 9471 | _ACEOF |
e256b8b6 DA |
9472 | |
9473 | ||
9474 | if test "${target}" = "${build}"; then | |
9475 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
9476 | else | |
9477 | case "${target}" in | |
9478 | # This condition may need some tweaking. It should include all | |
9479 | # targets where the array type of the second argument of getgroups | |
9480 | # is int and the type of gid_t is not equivalent to int. | |
9481 | *-*-sunos* | *-*-ultrix*) | |
9482 | TARGET_GETGROUPS_T=int | |
9483 | ;; | |
9484 | *) | |
9485 | TARGET_GETGROUPS_T=gid_t | |
9486 | ;; | |
9487 | esac | |
9488 | fi | |
9489 | ||
9490 | ||
3b0727a0 MR |
9491 | |
9492 | echo "$as_me:$LINENO: checking for sys/mman.h" >&5 | |
9493 | echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6 | |
9494 | if test "${ac_cv_header_sys_mman_h+set}" = set; then | |
9495 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9496 | else | |
9497 | cat >conftest.$ac_ext <<_ACEOF | |
9498 | /* confdefs.h. */ | |
9499 | _ACEOF | |
9500 | cat confdefs.h >>conftest.$ac_ext | |
9501 | cat >>conftest.$ac_ext <<_ACEOF | |
9502 | /* end confdefs.h. */ | |
9503 | #include <sys/mman.h> | |
9504 | _ACEOF | |
9505 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
9506 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
9507 | ac_status=$? | |
9508 | grep -v '^ *+' conftest.er1 >conftest.err | |
9509 | rm -f conftest.er1 | |
9510 | cat conftest.err >&5 | |
9511 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9512 | (exit $ac_status); } >/dev/null; then | |
9513 | if test -s conftest.err; then | |
9514 | ac_cpp_err=$ac_c_preproc_warn_flag | |
9515 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
9516 | else | |
9517 | ac_cpp_err= | |
9518 | fi | |
9519 | else | |
9520 | ac_cpp_err=yes | |
9521 | fi | |
9522 | if test -z "$ac_cpp_err"; then | |
9523 | ac_cv_header_sys_mman_h=yes | |
9524 | else | |
9525 | echo "$as_me: failed program was:" >&5 | |
9526 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9527 | ||
9528 | ac_cv_header_sys_mman_h=no | |
9529 | fi | |
9530 | rm -f conftest.err conftest.$ac_ext | |
9531 | fi | |
9532 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5 | |
9533 | echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6 | |
9534 | if test $ac_cv_header_sys_mman_h = yes; then | |
9535 | gcc_header_sys_mman_h=yes | |
9536 | else | |
9537 | gcc_header_sys_mman_h=no | |
9538 | fi | |
9539 | ||
9540 | echo "$as_me:$LINENO: checking for mmap" >&5 | |
9541 | echo $ECHO_N "checking for mmap... $ECHO_C" >&6 | |
9542 | if test "${ac_cv_func_mmap+set}" = set; then | |
9543 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9544 | else | |
9545 | cat >conftest.$ac_ext <<_ACEOF | |
9546 | /* confdefs.h. */ | |
9547 | _ACEOF | |
9548 | cat confdefs.h >>conftest.$ac_ext | |
9549 | cat >>conftest.$ac_ext <<_ACEOF | |
9550 | /* end confdefs.h. */ | |
9551 | /* Define mmap to an innocuous variant, in case <limits.h> declares mmap. | |
9552 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9553 | #define mmap innocuous_mmap | |
9554 | ||
9555 | /* System header to define __stub macros and hopefully few prototypes, | |
9556 | which can conflict with char mmap (); below. | |
9557 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9558 | <limits.h> exists even on freestanding compilers. */ | |
9559 | ||
9560 | #ifdef __STDC__ | |
9561 | # include <limits.h> | |
9562 | #else | |
9563 | # include <assert.h> | |
9564 | #endif | |
9565 | ||
9566 | #undef mmap | |
9567 | ||
9568 | /* Override any gcc2 internal prototype to avoid an error. */ | |
9569 | #ifdef __cplusplus | |
9570 | extern "C" | |
9571 | { | |
9572 | #endif | |
9573 | /* We use char because int might match the return type of a gcc2 | |
9574 | builtin and then its argument prototype would still apply. */ | |
9575 | char mmap (); | |
9576 | /* The GNU C library defines this for functions which it implements | |
9577 | to always fail with ENOSYS. Some functions are actually named | |
9578 | something starting with __ and the normal name is an alias. */ | |
9579 | #if defined (__stub_mmap) || defined (__stub___mmap) | |
9580 | choke me | |
9581 | #else | |
9582 | char (*f) () = mmap; | |
9583 | #endif | |
9584 | #ifdef __cplusplus | |
9585 | } | |
9586 | #endif | |
9587 | ||
9588 | int | |
9589 | main () | |
9590 | { | |
9591 | return f != mmap; | |
9592 | ; | |
9593 | return 0; | |
9594 | } | |
9595 | _ACEOF | |
9596 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9597 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9598 | (eval $ac_link) 2>conftest.er1 | |
9599 | ac_status=$? | |
9600 | grep -v '^ *+' conftest.er1 >conftest.err | |
9601 | rm -f conftest.er1 | |
9602 | cat conftest.err >&5 | |
9603 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9604 | (exit $ac_status); } && | |
dbad5e72 SE |
9605 | { ac_try='test -z "$ac_c_werror_flag" |
9606 | || test ! -s conftest.err' | |
3b0727a0 MR |
9607 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9608 | (eval $ac_try) 2>&5 | |
9609 | ac_status=$? | |
9610 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9611 | (exit $ac_status); }; } && | |
9612 | { ac_try='test -s conftest$ac_exeext' | |
9613 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9614 | (eval $ac_try) 2>&5 | |
9615 | ac_status=$? | |
9616 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9617 | (exit $ac_status); }; }; then | |
9618 | ac_cv_func_mmap=yes | |
9619 | else | |
9620 | echo "$as_me: failed program was:" >&5 | |
9621 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9622 | ||
9623 | ac_cv_func_mmap=no | |
9624 | fi | |
9625 | rm -f conftest.err conftest.$ac_objext \ | |
9626 | conftest$ac_exeext conftest.$ac_ext | |
9627 | fi | |
9628 | echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 | |
9629 | echo "${ECHO_T}$ac_cv_func_mmap" >&6 | |
9630 | if test $ac_cv_func_mmap = yes; then | |
9631 | gcc_func_mmap=yes | |
9632 | else | |
9633 | gcc_func_mmap=no | |
9634 | fi | |
9635 | ||
9636 | if test "$gcc_header_sys_mman_h" != yes \ | |
9637 | || test "$gcc_func_mmap" != yes; then | |
1072ec3f ZW |
9638 | gcc_cv_func_mmap_file=no |
9639 | gcc_cv_func_mmap_dev_zero=no | |
9640 | gcc_cv_func_mmap_anon=no | |
9641 | else | |
ba479fd2 NN |
9642 | echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5 |
9643 | echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6 | |
9644 | if test "${gcc_cv_func_mmap_file+set}" = set; then | |
9645 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f | 9646 | else |
ba479fd2 | 9647 | # Add a system to this blacklist if |
1072ec3f ZW |
9648 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a |
9649 | # memory area containing the same data that you'd get if you applied | |
9650 | # read() to the same fd. The only system known to have a problem here | |
9651 | # is VMS, where text files have record structure. | |
9652 | case "$host_os" in | |
ba479fd2 | 9653 | vms* | ultrix*) |
1072ec3f ZW |
9654 | gcc_cv_func_mmap_file=no ;; |
9655 | *) | |
9656 | gcc_cv_func_mmap_file=yes;; | |
9657 | esac | |
9658 | fi | |
ba479fd2 NN |
9659 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5 |
9660 | echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6 | |
9661 | echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5 | |
9662 | echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6 | |
9663 | if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then | |
9664 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
9665 | else |
9666 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
9667 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
9668 | # zeroed pages with both the following properties: | |
9669 | # 1. If you map N consecutive pages in with one call, and then | |
9670 | # unmap any subset of those pages, the pages that were not | |
9671 | # explicitly unmapped remain accessible. | |
9672 | # 2. If you map two adjacent blocks of memory and then unmap them | |
9673 | # both at once, they must both go away. | |
9674 | # Systems known to be in this category are Windows (all variants), | |
9675 | # VMS, and Darwin. | |
9676 | case "$host_os" in | |
2ce240d3 | 9677 | vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) |
1072ec3f ZW |
9678 | gcc_cv_func_mmap_dev_zero=no ;; |
9679 | *) | |
9680 | gcc_cv_func_mmap_dev_zero=yes;; | |
9681 | esac | |
9682 | fi | |
ba479fd2 NN |
9683 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5 |
9684 | echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6 | |
1072ec3f ZW |
9685 | |
9686 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
ba479fd2 NN |
9687 | echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5 |
9688 | echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6 | |
9689 | if test "${gcc_cv_decl_map_anon+set}" = set; then | |
9690 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9691 | else | |
9692 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9693 | /* confdefs.h. */ |
9694 | _ACEOF | |
9695 | cat confdefs.h >>conftest.$ac_ext | |
9696 | cat >>conftest.$ac_ext <<_ACEOF | |
9697 | /* end confdefs.h. */ | |
1072ec3f ZW |
9698 | #include <sys/types.h> |
9699 | #include <sys/mman.h> | |
9700 | #include <unistd.h> | |
9701 | ||
9702 | #ifndef MAP_ANONYMOUS | |
9703 | #define MAP_ANONYMOUS MAP_ANON | |
9704 | #endif | |
9705 | ||
ba479fd2 NN |
9706 | int |
9707 | main () | |
9708 | { | |
1072ec3f | 9709 | int n = MAP_ANONYMOUS; |
ba479fd2 NN |
9710 | ; |
9711 | return 0; | |
9712 | } | |
9713 | _ACEOF | |
9714 | rm -f conftest.$ac_objext | |
9715 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9716 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9717 | ac_status=$? |
86da66b5 HPN |
9718 | grep -v '^ *+' conftest.er1 >conftest.err |
9719 | rm -f conftest.er1 | |
9720 | cat conftest.err >&5 | |
ba479fd2 NN |
9721 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9722 | (exit $ac_status); } && | |
dbad5e72 SE |
9723 | { ac_try='test -z "$ac_c_werror_flag" |
9724 | || test ! -s conftest.err' | |
86da66b5 HPN |
9725 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9726 | (eval $ac_try) 2>&5 | |
9727 | ac_status=$? | |
9728 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9729 | (exit $ac_status); }; } && | |
9730 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9731 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9732 | (eval $ac_try) 2>&5 | |
9733 | ac_status=$? | |
9734 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9735 | (exit $ac_status); }; }; then | |
1072ec3f ZW |
9736 | gcc_cv_decl_map_anon=yes |
9737 | else | |
ba479fd2 NN |
9738 | echo "$as_me: failed program was:" >&5 |
9739 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9740 | ||
9741 | gcc_cv_decl_map_anon=no | |
1072ec3f | 9742 | fi |
86da66b5 | 9743 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
1072ec3f | 9744 | fi |
ba479fd2 NN |
9745 | echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5 |
9746 | echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6 | |
1072ec3f ZW |
9747 | |
9748 | if test $gcc_cv_decl_map_anon = no; then | |
9749 | gcc_cv_func_mmap_anon=no | |
9750 | else | |
ba479fd2 NN |
9751 | echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
9752 | echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6 | |
9753 | if test "${gcc_cv_func_mmap_anon+set}" = set; then | |
9754 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
9755 | else |
9756 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
9757 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
9758 | # doesn't give anonymous zeroed pages with the same properties listed | |
9759 | # above for use of /dev/zero. | |
9760 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
9761 | case "$host_os" in | |
9762 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
9763 | gcc_cv_func_mmap_anon=no ;; | |
9764 | *) | |
9765 | gcc_cv_func_mmap_anon=yes;; | |
9766 | esac | |
9767 | fi | |
ba479fd2 NN |
9768 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5 |
9769 | echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6 | |
1072ec3f ZW |
9770 | fi |
9771 | fi | |
9772 | ||
9773 | if test $gcc_cv_func_mmap_file = yes; then | |
ba479fd2 NN |
9774 | |
9775 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9776 | #define HAVE_MMAP_FILE 1 |
ba479fd2 | 9777 | _ACEOF |
1072ec3f ZW |
9778 | |
9779 | fi | |
9780 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
ba479fd2 NN |
9781 | |
9782 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9783 | #define HAVE_MMAP_DEV_ZERO 1 |
ba479fd2 | 9784 | _ACEOF |
1072ec3f ZW |
9785 | |
9786 | fi | |
9787 | if test $gcc_cv_func_mmap_anon = yes; then | |
ba479fd2 NN |
9788 | |
9789 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9790 | #define HAVE_MMAP_ANON 1 |
ba479fd2 | 9791 | _ACEOF |
1072ec3f ZW |
9792 | |
9793 | fi | |
9794 | ||
b27d2bd5 MK |
9795 | |
9796 | case "${host}" in | |
ee262b6f | 9797 | *-*-*vms*) |
ba479fd2 | 9798 | # Under VMS, vfork works very differently than on Unix. The standard test |
ee262b6f DR |
9799 | # won't work, and it isn't easily adaptable. It makes more sense to |
9800 | # just force it. | |
9801 | ac_cv_func_vfork_works=yes | |
9802 | ;; | |
b27d2bd5 | 9803 | esac |
ba479fd2 NN |
9804 | echo "$as_me:$LINENO: checking for pid_t" >&5 |
9805 | echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 | |
9806 | if test "${ac_cv_type_pid_t+set}" = set; then | |
9807 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9808 | else | |
9809 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9810 | /* confdefs.h. */ |
9811 | _ACEOF | |
9812 | cat confdefs.h >>conftest.$ac_ext | |
9813 | cat >>conftest.$ac_ext <<_ACEOF | |
9814 | /* end confdefs.h. */ | |
9815 | $ac_includes_default | |
9816 | int | |
9817 | main () | |
9818 | { | |
9819 | if ((pid_t *) 0) | |
9820 | return 0; | |
9821 | if (sizeof (pid_t)) | |
9822 | return 0; | |
9823 | ; | |
9824 | return 0; | |
9825 | } | |
9826 | _ACEOF | |
9827 | rm -f conftest.$ac_objext | |
9828 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9829 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9830 | ac_status=$? |
86da66b5 HPN |
9831 | grep -v '^ *+' conftest.er1 >conftest.err |
9832 | rm -f conftest.er1 | |
9833 | cat conftest.err >&5 | |
ba479fd2 NN |
9834 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9835 | (exit $ac_status); } && | |
dbad5e72 SE |
9836 | { ac_try='test -z "$ac_c_werror_flag" |
9837 | || test ! -s conftest.err' | |
86da66b5 HPN |
9838 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9839 | (eval $ac_try) 2>&5 | |
9840 | ac_status=$? | |
9841 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9842 | (exit $ac_status); }; } && | |
9843 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9844 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9845 | (eval $ac_try) 2>&5 | |
9846 | ac_status=$? | |
9847 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9848 | (exit $ac_status); }; }; then | |
cb65112a | 9849 | ac_cv_type_pid_t=yes |
c375c43b | 9850 | else |
ba479fd2 NN |
9851 | echo "$as_me: failed program was:" >&5 |
9852 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 9853 | |
ba479fd2 NN |
9854 | ac_cv_type_pid_t=no |
9855 | fi | |
86da66b5 | 9856 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 9857 | fi |
ba479fd2 NN |
9858 | echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 |
9859 | echo "${ECHO_T}$ac_cv_type_pid_t" >&6 | |
9860 | if test $ac_cv_type_pid_t = yes; then | |
9861 | : | |
9862 | else | |
9863 | ||
9864 | cat >>confdefs.h <<_ACEOF | |
c375c43b | 9865 | #define pid_t int |
ba479fd2 | 9866 | _ACEOF |
c375c43b KG |
9867 | |
9868 | fi | |
9869 | ||
ba479fd2 NN |
9870 | |
9871 | ||
9872 | for ac_header in unistd.h vfork.h | |
9873 | do | |
9874 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
ca9bc441 | 9875 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
9876 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
9877 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
9878 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 9879 | else |
ca9bc441 | 9880 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9881 | /* confdefs.h. */ |
9882 | _ACEOF | |
9883 | cat confdefs.h >>conftest.$ac_ext | |
9884 | cat >>conftest.$ac_ext <<_ACEOF | |
9885 | /* end confdefs.h. */ | |
9886 | #include <$ac_header> | |
9887 | _ACEOF | |
9888 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
9889 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
9890 | ac_status=$? | |
9891 | grep -v '^ *+' conftest.er1 >conftest.err | |
9892 | rm -f conftest.er1 | |
9893 | cat conftest.err >&5 | |
9894 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9895 | (exit $ac_status); } >/dev/null; then | |
9896 | if test -s conftest.err; then | |
9897 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 9898 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
9899 | else |
9900 | ac_cpp_err= | |
9901 | fi | |
093e61a6 | 9902 | else |
ba479fd2 NN |
9903 | ac_cpp_err=yes |
9904 | fi | |
9905 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 9906 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
9907 | else |
9908 | echo "$as_me: failed program was:" >&5 | |
9909 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9910 | ||
ca9bc441 | 9911 | eval "$as_ac_Header=no" |
ba479fd2 NN |
9912 | fi |
9913 | rm -f conftest.err conftest.$ac_ext | |
c375c43b | 9914 | fi |
ba479fd2 NN |
9915 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
9916 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
9917 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
9918 | cat >>confdefs.h <<_ACEOF | |
9919 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9920 | _ACEOF | |
6e3f3080 NN |
9921 | |
9922 | fi | |
ba479fd2 NN |
9923 | done |
9924 | ||
9925 | ||
9926 | ||
9927 | for ac_func in fork vfork | |
9928 | do | |
9929 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9930 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
9931 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
9932 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
9933 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9934 | else | |
9935 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9936 | /* confdefs.h. */ |
9937 | _ACEOF | |
9938 | cat confdefs.h >>conftest.$ac_ext | |
9939 | cat >>conftest.$ac_ext <<_ACEOF | |
9940 | /* end confdefs.h. */ | |
86da66b5 HPN |
9941 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
9942 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9943 | #define $ac_func innocuous_$ac_func | |
9944 | ||
c375c43b | 9945 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
9946 | which can conflict with char $ac_func (); below. |
9947 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9948 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 9949 | |
ba479fd2 NN |
9950 | #ifdef __STDC__ |
9951 | # include <limits.h> | |
9952 | #else | |
9953 | # include <assert.h> | |
9954 | #endif | |
86da66b5 HPN |
9955 | |
9956 | #undef $ac_func | |
9957 | ||
6e3f3080 | 9958 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9959 | #ifdef __cplusplus |
9960 | extern "C" | |
9961 | { | |
9962 | #endif | |
6e3f3080 | 9963 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9964 | builtin and then its argument prototype would still apply. */ |
9965 | char $ac_func (); | |
c375c43b KG |
9966 | /* The GNU C library defines this for functions which it implements |
9967 | to always fail with ENOSYS. Some functions are actually named | |
9968 | something starting with __ and the normal name is an alias. */ | |
ba479fd2 | 9969 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
c375c43b KG |
9970 | choke me |
9971 | #else | |
ba479fd2 NN |
9972 | char (*f) () = $ac_func; |
9973 | #endif | |
9974 | #ifdef __cplusplus | |
9975 | } | |
c375c43b KG |
9976 | #endif |
9977 | ||
ba479fd2 NN |
9978 | int |
9979 | main () | |
9980 | { | |
9981 | return f != $ac_func; | |
9982 | ; | |
9983 | return 0; | |
9984 | } | |
9985 | _ACEOF | |
9986 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9987 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9988 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9989 | ac_status=$? |
86da66b5 HPN |
9990 | grep -v '^ *+' conftest.er1 >conftest.err |
9991 | rm -f conftest.er1 | |
9992 | cat conftest.err >&5 | |
ba479fd2 NN |
9993 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9994 | (exit $ac_status); } && | |
dbad5e72 SE |
9995 | { ac_try='test -z "$ac_c_werror_flag" |
9996 | || test ! -s conftest.err' | |
86da66b5 HPN |
9997 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9998 | (eval $ac_try) 2>&5 | |
9999 | ac_status=$? | |
10000 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10001 | (exit $ac_status); }; } && | |
10002 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
10003 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10004 | (eval $ac_try) 2>&5 | |
10005 | ac_status=$? | |
10006 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10007 | (exit $ac_status); }; }; then | |
10008 | eval "$as_ac_var=yes" | |
10009 | else | |
10010 | echo "$as_me: failed program was:" >&5 | |
10011 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10012 | ||
10013 | eval "$as_ac_var=no" | |
10014 | fi | |
86da66b5 HPN |
10015 | rm -f conftest.err conftest.$ac_objext \ |
10016 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
10017 | fi |
10018 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
10019 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
10020 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
10021 | cat >>confdefs.h <<_ACEOF | |
10022 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10023 | _ACEOF | |
10024 | ||
c375c43b | 10025 | fi |
ba479fd2 | 10026 | done |
c375c43b | 10027 | |
ba479fd2 NN |
10028 | if test "x$ac_cv_func_fork" = xyes; then |
10029 | echo "$as_me:$LINENO: checking for working fork" >&5 | |
10030 | echo $ECHO_N "checking for working fork... $ECHO_C" >&6 | |
10031 | if test "${ac_cv_func_fork_works+set}" = set; then | |
10032 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10033 | else |
ba479fd2 NN |
10034 | if test "$cross_compiling" = yes; then |
10035 | ac_cv_func_fork_works=cross | |
10036 | else | |
10037 | cat >conftest.$ac_ext <<_ACEOF | |
10038 | /* By Ruediger Kuhlmann. */ | |
10039 | #include <sys/types.h> | |
10040 | #if HAVE_UNISTD_H | |
10041 | # include <unistd.h> | |
10042 | #endif | |
10043 | /* Some systems only have a dummy stub for fork() */ | |
10044 | int main () | |
10045 | { | |
86da66b5 HPN |
10046 | if (fork() < 0) |
10047 | exit (1); | |
10048 | exit (0); | |
ba479fd2 NN |
10049 | } |
10050 | _ACEOF | |
10051 | rm -f conftest$ac_exeext | |
10052 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10053 | (eval $ac_link) 2>&5 | |
10054 | ac_status=$? | |
10055 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10056 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
10057 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10058 | (eval $ac_try) 2>&5 | |
10059 | ac_status=$? | |
10060 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10061 | (exit $ac_status); }; }; then | |
10062 | ac_cv_func_fork_works=yes | |
10063 | else | |
10064 | echo "$as_me: program exited with status $ac_status" >&5 | |
10065 | echo "$as_me: failed program was:" >&5 | |
10066 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10067 | ||
10068 | ( exit $ac_status ) | |
10069 | ac_cv_func_fork_works=no | |
10070 | fi | |
86da66b5 | 10071 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
10072 | fi |
10073 | fi | |
10074 | echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 | |
10075 | echo "${ECHO_T}$ac_cv_func_fork_works" >&6 | |
10076 | ||
10077 | else | |
10078 | ac_cv_func_fork_works=$ac_cv_func_fork | |
10079 | fi | |
10080 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10081 | case $host in | |
10082 | *-*-amigaos* | *-*-msdosdjgpp*) | |
10083 | # Override, as these systems have only a dummy fork() stub | |
10084 | ac_cv_func_fork_works=no | |
10085 | ;; | |
10086 | *) | |
10087 | ac_cv_func_fork_works=yes | |
10088 | ;; | |
10089 | esac | |
10090 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
10091 | echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
c375c43b | 10092 | fi |
c375c43b | 10093 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
10094 | if test "x$ac_cv_func_vfork" = xyes; then |
10095 | echo "$as_me:$LINENO: checking for working vfork" >&5 | |
10096 | echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 | |
10097 | if test "${ac_cv_func_vfork_works+set}" = set; then | |
10098 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10099 | else |
ba479fd2 NN |
10100 | if test "$cross_compiling" = yes; then |
10101 | ac_cv_func_vfork_works=cross | |
10102 | else | |
10103 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10104 | /* confdefs.h. */ |
10105 | _ACEOF | |
10106 | cat confdefs.h >>conftest.$ac_ext | |
10107 | cat >>conftest.$ac_ext <<_ACEOF | |
10108 | /* end confdefs.h. */ | |
c375c43b KG |
10109 | /* Thanks to Paul Eggert for this test. */ |
10110 | #include <stdio.h> | |
ba479fd2 | 10111 | #include <stdlib.h> |
c375c43b KG |
10112 | #include <sys/types.h> |
10113 | #include <sys/stat.h> | |
ba479fd2 NN |
10114 | #include <sys/wait.h> |
10115 | #if HAVE_UNISTD_H | |
10116 | # include <unistd.h> | |
c375c43b | 10117 | #endif |
ba479fd2 NN |
10118 | #if HAVE_VFORK_H |
10119 | # include <vfork.h> | |
c375c43b KG |
10120 | #endif |
10121 | /* On some sparc systems, changes by the child to local and incoming | |
ba479fd2 NN |
10122 | argument registers are propagated back to the parent. The compiler |
10123 | is told about this with #include <vfork.h>, but some compilers | |
10124 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
10125 | static variable whose address is put into a register that is | |
10126 | clobbered by the vfork. */ | |
10127 | static void | |
c375c43b KG |
10128 | #ifdef __cplusplus |
10129 | sparc_address_test (int arg) | |
ba479fd2 | 10130 | # else |
c375c43b KG |
10131 | sparc_address_test (arg) int arg; |
10132 | #endif | |
10133 | { | |
10134 | static pid_t child; | |
10135 | if (!child) { | |
10136 | child = vfork (); | |
10137 | if (child < 0) { | |
10138 | perror ("vfork"); | |
10139 | _exit(2); | |
10140 | } | |
10141 | if (!child) { | |
10142 | arg = getpid(); | |
10143 | write(-1, "", 0); | |
10144 | _exit (arg); | |
10145 | } | |
10146 | } | |
10147 | } | |
ba479fd2 NN |
10148 | |
10149 | int | |
10150 | main () | |
10151 | { | |
c375c43b KG |
10152 | pid_t parent = getpid (); |
10153 | pid_t child; | |
10154 | ||
ba479fd2 | 10155 | sparc_address_test (0); |
c375c43b KG |
10156 | |
10157 | child = vfork (); | |
10158 | ||
10159 | if (child == 0) { | |
ba479fd2 NN |
10160 | /* Here is another test for sparc vfork register problems. This |
10161 | test uses lots of local variables, at least as many local | |
10162 | variables as main has allocated so far including compiler | |
10163 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
10164 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
10165 | reuse the register of parent for one of the local variables, | |
10166 | since it will think that parent can't possibly be used any more | |
10167 | in this routine. Assigning to the local variable will thus | |
10168 | munge parent in the parent process. */ | |
c375c43b KG |
10169 | pid_t |
10170 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
10171 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
10172 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
10173 | use the same hardware register for all 8 local variables. */ | |
10174 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10175 | || p != p5 || p != p6 || p != p7) | |
10176 | _exit(1); | |
10177 | ||
ba479fd2 NN |
10178 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
10179 | from child file descriptors. If the child closes a descriptor | |
10180 | before it execs or exits, this munges the parent's descriptor | |
10181 | as well. Test for this by closing stdout in the child. */ | |
c375c43b KG |
10182 | _exit(close(fileno(stdout)) != 0); |
10183 | } else { | |
10184 | int status; | |
10185 | struct stat st; | |
10186 | ||
10187 | while (wait(&status) != child) | |
10188 | ; | |
10189 | exit( | |
10190 | /* Was there some problem with vforking? */ | |
10191 | child < 0 | |
10192 | ||
10193 | /* Did the child fail? (This shouldn't happen.) */ | |
10194 | || status | |
10195 | ||
10196 | /* Did the vfork/compiler bug occur? */ | |
10197 | || parent != getpid() | |
10198 | ||
10199 | /* Did the file descriptor bug occur? */ | |
10200 | || fstat(fileno(stdout), &st) != 0 | |
10201 | ); | |
10202 | } | |
10203 | } | |
ba479fd2 NN |
10204 | _ACEOF |
10205 | rm -f conftest$ac_exeext | |
10206 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10207 | (eval $ac_link) 2>&5 | |
10208 | ac_status=$? | |
10209 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10210 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
10211 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10212 | (eval $ac_try) 2>&5 | |
10213 | ac_status=$? | |
10214 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10215 | (exit $ac_status); }; }; then | |
c375c43b KG |
10216 | ac_cv_func_vfork_works=yes |
10217 | else | |
ba479fd2 NN |
10218 | echo "$as_me: program exited with status $ac_status" >&5 |
10219 | echo "$as_me: failed program was:" >&5 | |
10220 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10221 | ||
10222 | ( exit $ac_status ) | |
10223 | ac_cv_func_vfork_works=no | |
cafe096b | 10224 | fi |
86da66b5 | 10225 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6e3f3080 | 10226 | fi |
ba479fd2 NN |
10227 | fi |
10228 | echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 | |
10229 | echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 | |
c375c43b | 10230 | |
ba479fd2 NN |
10231 | fi; |
10232 | if test "x$ac_cv_func_fork_works" = xcross; then | |
86da66b5 | 10233 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
10234 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
10235 | echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
c375c43b KG |
10236 | fi |
10237 | ||
ba479fd2 NN |
10238 | if test "x$ac_cv_func_vfork_works" = xyes; then |
10239 | ||
10240 | cat >>confdefs.h <<\_ACEOF | |
10241 | #define HAVE_WORKING_VFORK 1 | |
10242 | _ACEOF | |
10243 | ||
10244 | else | |
10245 | ||
10246 | cat >>confdefs.h <<\_ACEOF | |
c375c43b | 10247 | #define vfork fork |
ba479fd2 | 10248 | _ACEOF |
c375c43b KG |
10249 | |
10250 | fi | |
ba479fd2 NN |
10251 | if test "x$ac_cv_func_fork_works" = xyes; then |
10252 | ||
10253 | cat >>confdefs.h <<\_ACEOF | |
10254 | #define HAVE_WORKING_FORK 1 | |
10255 | _ACEOF | |
10256 | ||
10257 | fi | |
10258 | ||
c375c43b | 10259 | |
81bf3d9e | 10260 | |
dfb77e37 KC |
10261 | if test "X$prefix" = "XNONE"; then |
10262 | acl_final_prefix="$ac_default_prefix" | |
10263 | else | |
10264 | acl_final_prefix="$prefix" | |
10265 | fi | |
10266 | if test "X$exec_prefix" = "XNONE"; then | |
10267 | acl_final_exec_prefix='${prefix}' | |
10268 | else | |
10269 | acl_final_exec_prefix="$exec_prefix" | |
10270 | fi | |
10271 | acl_save_prefix="$prefix" | |
10272 | prefix="$acl_final_prefix" | |
10273 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
10274 | prefix="$acl_save_prefix" | |
f91abfce TT |
10275 | |
10276 | ||
dfb77e37 KC |
10277 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
10278 | if test "${with_gnu_ld+set}" = set; then | |
10279 | withval="$with_gnu_ld" | |
10280 | test "$withval" = no || with_gnu_ld=yes | |
ba479fd2 | 10281 | else |
dfb77e37 KC |
10282 | with_gnu_ld=no |
10283 | fi; | |
10284 | # Prepare PATH_SEPARATOR. | |
10285 | # The user is always right. | |
10286 | if test "${PATH_SEPARATOR+set}" != set; then | |
10287 | echo "#! /bin/sh" >conf$$.sh | |
10288 | echo "exit 0" >>conf$$.sh | |
10289 | chmod +x conf$$.sh | |
10290 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
10291 | PATH_SEPARATOR=';' | |
ba479fd2 | 10292 | else |
dfb77e37 | 10293 | PATH_SEPARATOR=: |
ba479fd2 | 10294 | fi |
dfb77e37 KC |
10295 | rm -f conf$$.sh |
10296 | fi | |
10297 | ac_prog=ld | |
10298 | if test "$GCC" = yes; then | |
10299 | # Check if gcc -print-prog-name=ld gives a path. | |
10300 | echo "$as_me:$LINENO: checking for ld used by GCC" >&5 | |
10301 | echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 | |
10302 | case $host in | |
10303 | *-*-mingw*) | |
10304 | # gcc leaves a trailing carriage return which upsets mingw | |
10305 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
10306 | *) | |
10307 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
10308 | esac | |
10309 | case $ac_prog in | |
10310 | # Accept absolute paths. | |
10311 | [\\/]* | [A-Za-z]:[\\/]*) | |
10312 | re_direlt='/[^/][^/]*/\.\./' | |
10313 | # Canonicalize the path of ld | |
10314 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
10315 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
10316 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
10317 | done | |
10318 | test -z "$LD" && LD="$ac_prog" | |
10319 | ;; | |
10320 | "") | |
10321 | # If it fails, then pretend we aren't using GCC. | |
10322 | ac_prog=ld | |
10323 | ;; | |
10324 | *) | |
10325 | # If it is relative, then search for the first ld in PATH. | |
10326 | with_gnu_ld=unknown | |
10327 | ;; | |
10328 | esac | |
10329 | elif test "$with_gnu_ld" = yes; then | |
10330 | echo "$as_me:$LINENO: checking for GNU ld" >&5 | |
10331 | echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 | |
ba479fd2 | 10332 | else |
dfb77e37 KC |
10333 | echo "$as_me:$LINENO: checking for non-GNU ld" >&5 |
10334 | echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 | |
ba479fd2 | 10335 | fi |
dfb77e37 KC |
10336 | if test "${acl_cv_path_LD+set}" = set; then |
10337 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 10338 | else |
dfb77e37 KC |
10339 | if test -z "$LD"; then |
10340 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
10341 | for ac_dir in $PATH; do | |
10342 | test -z "$ac_dir" && ac_dir=. | |
10343 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
10344 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
10345 | # Check to see if the program is GNU ld. I'd rather use --version, | |
10346 | # but apparently some GNU ld's only accept -v. | |
10347 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
10348 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
10349 | test "$with_gnu_ld" != no && break | |
10350 | else | |
10351 | test "$with_gnu_ld" != yes && break | |
10352 | fi | |
10353 | fi | |
10354 | done | |
10355 | IFS="$ac_save_ifs" | |
10356 | else | |
10357 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
10358 | fi | |
10359 | fi | |
ba479fd2 | 10360 | |
dfb77e37 KC |
10361 | LD="$acl_cv_path_LD" |
10362 | if test -n "$LD"; then | |
10363 | echo "$as_me:$LINENO: result: $LD" >&5 | |
10364 | echo "${ECHO_T}$LD" >&6 | |
10365 | else | |
10366 | echo "$as_me:$LINENO: result: no" >&5 | |
10367 | echo "${ECHO_T}no" >&6 | |
ba479fd2 | 10368 | fi |
dfb77e37 KC |
10369 | test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 |
10370 | echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} | |
10371 | { (exit 1); exit 1; }; } | |
10372 | echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 | |
10373 | echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 | |
10374 | if test "${acl_cv_prog_gnu_ld+set}" = set; then | |
10375 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10376 | else | |
10377 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
10378 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
10379 | acl_cv_prog_gnu_ld=yes | |
10380 | else | |
10381 | acl_cv_prog_gnu_ld=no | |
6e3f3080 | 10382 | fi |
dfb77e37 KC |
10383 | fi |
10384 | echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 | |
10385 | echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 | |
10386 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
10387 | ||
10388 | ||
10389 | ||
10390 | echo "$as_me:$LINENO: checking for shared library run path origin" >&5 | |
10391 | echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 | |
10392 | if test "${acl_cv_rpath+set}" = set; then | |
10393 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10394 | else | |
10395 | ||
10396 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
10397 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
10398 | . ./conftest.sh | |
10399 | rm -f ./conftest.sh | |
10400 | acl_cv_rpath=done | |
ba479fd2 | 10401 | |
eb158727 | 10402 | fi |
dfb77e37 KC |
10403 | echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 |
10404 | echo "${ECHO_T}$acl_cv_rpath" >&6 | |
10405 | wl="$acl_cv_wl" | |
10406 | libext="$acl_cv_libext" | |
10407 | shlibext="$acl_cv_shlibext" | |
10408 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
10409 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
10410 | hardcode_direct="$acl_cv_hardcode_direct" | |
10411 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
10412 | # Check whether --enable-rpath or --disable-rpath was given. | |
10413 | if test "${enable_rpath+set}" = set; then | |
10414 | enableval="$enable_rpath" | |
10415 | : | |
10416 | else | |
10417 | enable_rpath=yes | |
10418 | fi; | |
10419 | ||
10420 | ||
10421 | ||
10422 | ||
10423 | ||
10424 | ||
10425 | ||
10426 | use_additional=yes | |
10427 | ||
10428 | acl_save_prefix="$prefix" | |
10429 | prefix="$acl_final_prefix" | |
10430 | acl_save_exec_prefix="$exec_prefix" | |
10431 | exec_prefix="$acl_final_exec_prefix" | |
10432 | ||
10433 | eval additional_includedir=\"$includedir\" | |
10434 | eval additional_libdir=\"$libdir\" | |
10435 | ||
10436 | exec_prefix="$acl_save_exec_prefix" | |
10437 | prefix="$acl_save_prefix" | |
10438 | ||
10439 | ||
10440 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10441 | if test "${with_libiconv_prefix+set}" = set; then | |
10442 | withval="$with_libiconv_prefix" | |
10443 | ||
10444 | if test "X$withval" = "Xno"; then | |
10445 | use_additional=no | |
10446 | else | |
10447 | if test "X$withval" = "X"; then | |
10448 | ||
10449 | acl_save_prefix="$prefix" | |
10450 | prefix="$acl_final_prefix" | |
10451 | acl_save_exec_prefix="$exec_prefix" | |
10452 | exec_prefix="$acl_final_exec_prefix" | |
10453 | ||
10454 | eval additional_includedir=\"$includedir\" | |
10455 | eval additional_libdir=\"$libdir\" | |
10456 | ||
10457 | exec_prefix="$acl_save_exec_prefix" | |
10458 | prefix="$acl_save_prefix" | |
10459 | ||
10460 | else | |
10461 | additional_includedir="$withval/include" | |
10462 | additional_libdir="$withval/lib" | |
10463 | fi | |
10464 | fi | |
10465 | ||
10466 | fi; | |
10467 | LIBICONV= | |
10468 | LTLIBICONV= | |
10469 | INCICONV= | |
10470 | rpathdirs= | |
10471 | ltrpathdirs= | |
10472 | names_already_handled= | |
10473 | names_next_round='iconv ' | |
10474 | while test -n "$names_next_round"; do | |
10475 | names_this_round="$names_next_round" | |
10476 | names_next_round= | |
10477 | for name in $names_this_round; do | |
10478 | already_handled= | |
10479 | for n in $names_already_handled; do | |
10480 | if test "$n" = "$name"; then | |
10481 | already_handled=yes | |
10482 | break | |
10483 | fi | |
10484 | done | |
10485 | if test -z "$already_handled"; then | |
10486 | names_already_handled="$names_already_handled $name" | |
10487 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10488 | eval value=\"\$HAVE_LIB$uppername\" | |
10489 | if test -n "$value"; then | |
10490 | if test "$value" = yes; then | |
10491 | eval value=\"\$LIB$uppername\" | |
10492 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
10493 | eval value=\"\$LTLIB$uppername\" | |
10494 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
10495 | else | |
10496 | : | |
10497 | fi | |
10498 | else | |
10499 | found_dir= | |
10500 | found_la= | |
10501 | found_so= | |
10502 | found_a= | |
10503 | if test $use_additional = yes; then | |
10504 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
10505 | found_dir="$additional_libdir" | |
10506 | found_so="$additional_libdir/lib$name.$shlibext" | |
10507 | if test -f "$additional_libdir/lib$name.la"; then | |
10508 | found_la="$additional_libdir/lib$name.la" | |
10509 | fi | |
10510 | else | |
10511 | if test -f "$additional_libdir/lib$name.$libext"; then | |
10512 | found_dir="$additional_libdir" | |
10513 | found_a="$additional_libdir/lib$name.$libext" | |
10514 | if test -f "$additional_libdir/lib$name.la"; then | |
10515 | found_la="$additional_libdir/lib$name.la" | |
10516 | fi | |
10517 | fi | |
10518 | fi | |
10519 | fi | |
10520 | if test "X$found_dir" = "X"; then | |
10521 | for x in $LDFLAGS $LTLIBICONV; do | |
10522 | ||
10523 | acl_save_prefix="$prefix" | |
10524 | prefix="$acl_final_prefix" | |
10525 | acl_save_exec_prefix="$exec_prefix" | |
10526 | exec_prefix="$acl_final_exec_prefix" | |
10527 | eval x=\"$x\" | |
10528 | exec_prefix="$acl_save_exec_prefix" | |
10529 | prefix="$acl_save_prefix" | |
10530 | ||
10531 | case "$x" in | |
10532 | -L*) | |
10533 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10534 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
10535 | found_dir="$dir" | |
10536 | found_so="$dir/lib$name.$shlibext" | |
10537 | if test -f "$dir/lib$name.la"; then | |
10538 | found_la="$dir/lib$name.la" | |
10539 | fi | |
10540 | else | |
10541 | if test -f "$dir/lib$name.$libext"; then | |
10542 | found_dir="$dir" | |
10543 | found_a="$dir/lib$name.$libext" | |
10544 | if test -f "$dir/lib$name.la"; then | |
10545 | found_la="$dir/lib$name.la" | |
10546 | fi | |
10547 | fi | |
10548 | fi | |
10549 | ;; | |
10550 | esac | |
10551 | if test "X$found_dir" != "X"; then | |
10552 | break | |
10553 | fi | |
10554 | done | |
10555 | fi | |
10556 | if test "X$found_dir" != "X"; then | |
10557 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
10558 | if test "X$found_so" != "X"; then | |
10559 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10560 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10561 | else | |
10562 | haveit= | |
10563 | for x in $ltrpathdirs; do | |
10564 | if test "X$x" = "X$found_dir"; then | |
10565 | haveit=yes | |
10566 | break | |
10567 | fi | |
10568 | done | |
10569 | if test -z "$haveit"; then | |
10570 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10571 | fi | |
10572 | if test "$hardcode_direct" = yes; then | |
10573 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10574 | else | |
10575 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10576 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10577 | haveit= | |
10578 | for x in $rpathdirs; do | |
10579 | if test "X$x" = "X$found_dir"; then | |
10580 | haveit=yes | |
10581 | break | |
10582 | fi | |
10583 | done | |
10584 | if test -z "$haveit"; then | |
10585 | rpathdirs="$rpathdirs $found_dir" | |
10586 | fi | |
10587 | else | |
10588 | haveit= | |
10589 | for x in $LDFLAGS $LIBICONV; do | |
10590 | ||
10591 | acl_save_prefix="$prefix" | |
10592 | prefix="$acl_final_prefix" | |
10593 | acl_save_exec_prefix="$exec_prefix" | |
10594 | exec_prefix="$acl_final_exec_prefix" | |
10595 | eval x=\"$x\" | |
10596 | exec_prefix="$acl_save_exec_prefix" | |
10597 | prefix="$acl_save_prefix" | |
10598 | ||
10599 | if test "X$x" = "X-L$found_dir"; then | |
10600 | haveit=yes | |
10601 | break | |
10602 | fi | |
10603 | done | |
10604 | if test -z "$haveit"; then | |
10605 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
10606 | fi | |
10607 | if test "$hardcode_minus_L" != no; then | |
10608 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10609 | else | |
10610 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
10611 | fi | |
10612 | fi | |
10613 | fi | |
10614 | fi | |
10615 | else | |
10616 | if test "X$found_a" != "X"; then | |
10617 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
10618 | else | |
10619 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
10620 | fi | |
10621 | fi | |
10622 | additional_includedir= | |
10623 | case "$found_dir" in | |
10624 | */lib | */lib/) | |
10625 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10626 | additional_includedir="$basedir/include" | |
10627 | ;; | |
10628 | esac | |
10629 | if test "X$additional_includedir" != "X"; then | |
10630 | if test "X$additional_includedir" != "X/usr/include"; then | |
10631 | haveit= | |
10632 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10633 | if test -n "$GCC"; then | |
10634 | case $host_os in | |
10635 | linux*) haveit=yes;; | |
10636 | esac | |
10637 | fi | |
10638 | fi | |
10639 | if test -z "$haveit"; then | |
10640 | for x in $CPPFLAGS $INCICONV; do | |
10641 | ||
10642 | acl_save_prefix="$prefix" | |
10643 | prefix="$acl_final_prefix" | |
10644 | acl_save_exec_prefix="$exec_prefix" | |
10645 | exec_prefix="$acl_final_exec_prefix" | |
10646 | eval x=\"$x\" | |
10647 | exec_prefix="$acl_save_exec_prefix" | |
10648 | prefix="$acl_save_prefix" | |
10649 | ||
10650 | if test "X$x" = "X-I$additional_includedir"; then | |
10651 | haveit=yes | |
10652 | break | |
10653 | fi | |
10654 | done | |
10655 | if test -z "$haveit"; then | |
10656 | if test -d "$additional_includedir"; then | |
10657 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
10658 | fi | |
10659 | fi | |
10660 | fi | |
10661 | fi | |
10662 | fi | |
10663 | if test -n "$found_la"; then | |
10664 | save_libdir="$libdir" | |
10665 | case "$found_la" in | |
10666 | */* | *\\*) . "$found_la" ;; | |
10667 | *) . "./$found_la" ;; | |
10668 | esac | |
10669 | libdir="$save_libdir" | |
10670 | for dep in $dependency_libs; do | |
10671 | case "$dep" in | |
10672 | -L*) | |
10673 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10674 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10675 | haveit= | |
10676 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10677 | if test -n "$GCC"; then | |
10678 | case $host_os in | |
10679 | linux*) haveit=yes;; | |
10680 | esac | |
10681 | fi | |
10682 | fi | |
10683 | if test -z "$haveit"; then | |
10684 | haveit= | |
10685 | for x in $LDFLAGS $LIBICONV; do | |
10686 | ||
10687 | acl_save_prefix="$prefix" | |
10688 | prefix="$acl_final_prefix" | |
10689 | acl_save_exec_prefix="$exec_prefix" | |
10690 | exec_prefix="$acl_final_exec_prefix" | |
10691 | eval x=\"$x\" | |
10692 | exec_prefix="$acl_save_exec_prefix" | |
10693 | prefix="$acl_save_prefix" | |
10694 | ||
10695 | if test "X$x" = "X-L$additional_libdir"; then | |
10696 | haveit=yes | |
10697 | break | |
10698 | fi | |
10699 | done | |
10700 | if test -z "$haveit"; then | |
10701 | if test -d "$additional_libdir"; then | |
10702 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
10703 | fi | |
10704 | fi | |
10705 | haveit= | |
10706 | for x in $LDFLAGS $LTLIBICONV; do | |
10707 | ||
10708 | acl_save_prefix="$prefix" | |
10709 | prefix="$acl_final_prefix" | |
10710 | acl_save_exec_prefix="$exec_prefix" | |
10711 | exec_prefix="$acl_final_exec_prefix" | |
10712 | eval x=\"$x\" | |
10713 | exec_prefix="$acl_save_exec_prefix" | |
10714 | prefix="$acl_save_prefix" | |
10715 | ||
10716 | if test "X$x" = "X-L$additional_libdir"; then | |
10717 | haveit=yes | |
10718 | break | |
10719 | fi | |
10720 | done | |
10721 | if test -z "$haveit"; then | |
10722 | if test -d "$additional_libdir"; then | |
10723 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
10724 | fi | |
10725 | fi | |
10726 | fi | |
10727 | fi | |
10728 | ;; | |
10729 | -R*) | |
10730 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10731 | if test "$enable_rpath" != no; then | |
10732 | haveit= | |
10733 | for x in $rpathdirs; do | |
10734 | if test "X$x" = "X$dir"; then | |
10735 | haveit=yes | |
10736 | break | |
10737 | fi | |
10738 | done | |
10739 | if test -z "$haveit"; then | |
10740 | rpathdirs="$rpathdirs $dir" | |
10741 | fi | |
10742 | haveit= | |
10743 | for x in $ltrpathdirs; do | |
10744 | if test "X$x" = "X$dir"; then | |
10745 | haveit=yes | |
10746 | break | |
10747 | fi | |
10748 | done | |
10749 | if test -z "$haveit"; then | |
10750 | ltrpathdirs="$ltrpathdirs $dir" | |
10751 | fi | |
10752 | fi | |
10753 | ;; | |
10754 | -l*) | |
10755 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10756 | ;; | |
10757 | *.la) | |
10758 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10759 | ;; | |
10760 | *) | |
10761 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
10762 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
10763 | ;; | |
10764 | esac | |
10765 | done | |
10766 | fi | |
10767 | else | |
10768 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
10769 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
10770 | fi | |
10771 | fi | |
10772 | fi | |
10773 | done | |
10774 | done | |
10775 | if test "X$rpathdirs" != "X"; then | |
10776 | if test -n "$hardcode_libdir_separator"; then | |
10777 | alldirs= | |
10778 | for found_dir in $rpathdirs; do | |
10779 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10780 | done | |
10781 | acl_save_libdir="$libdir" | |
10782 | libdir="$alldirs" | |
10783 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10784 | libdir="$acl_save_libdir" | |
10785 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
10786 | else | |
10787 | for found_dir in $rpathdirs; do | |
10788 | acl_save_libdir="$libdir" | |
10789 | libdir="$found_dir" | |
10790 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10791 | libdir="$acl_save_libdir" | |
10792 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
10793 | done | |
10794 | fi | |
10795 | fi | |
10796 | if test "X$ltrpathdirs" != "X"; then | |
10797 | for found_dir in $ltrpathdirs; do | |
10798 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
10799 | done | |
10800 | fi | |
10801 | ||
10802 | ||
10803 | ||
10804 | ||
10805 | ||
10806 | ||
10807 | ||
10808 | am_save_CPPFLAGS="$CPPFLAGS" | |
10809 | ||
10810 | for element in $INCICONV; do | |
10811 | haveit= | |
10812 | for x in $CPPFLAGS; do | |
10813 | ||
10814 | acl_save_prefix="$prefix" | |
10815 | prefix="$acl_final_prefix" | |
10816 | acl_save_exec_prefix="$exec_prefix" | |
10817 | exec_prefix="$acl_final_exec_prefix" | |
10818 | eval x=\"$x\" | |
10819 | exec_prefix="$acl_save_exec_prefix" | |
10820 | prefix="$acl_save_prefix" | |
10821 | ||
10822 | if test "X$x" = "X$element"; then | |
10823 | haveit=yes | |
10824 | break | |
10825 | fi | |
10826 | done | |
10827 | if test -z "$haveit"; then | |
10828 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10829 | fi | |
10830 | done | |
eb158727 ZW |
10831 | |
10832 | ||
ba479fd2 NN |
10833 | echo "$as_me:$LINENO: checking for iconv" >&5 |
10834 | echo $ECHO_N "checking for iconv... $ECHO_C" >&6 | |
10835 | if test "${am_cv_func_iconv+set}" = set; then | |
10836 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 10837 | else |
ba479fd2 | 10838 | |
f91abfce TT |
10839 | am_cv_func_iconv="no, consider installing GNU libiconv" |
10840 | am_cv_lib_iconv=no | |
ba479fd2 | 10841 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10842 | /* confdefs.h. */ |
10843 | _ACEOF | |
10844 | cat confdefs.h >>conftest.$ac_ext | |
10845 | cat >>conftest.$ac_ext <<_ACEOF | |
10846 | /* end confdefs.h. */ | |
f91abfce TT |
10847 | #include <stdlib.h> |
10848 | #include <iconv.h> | |
ba479fd2 NN |
10849 | int |
10850 | main () | |
10851 | { | |
f91abfce TT |
10852 | iconv_t cd = iconv_open("",""); |
10853 | iconv(cd,NULL,NULL,NULL,NULL); | |
10854 | iconv_close(cd); | |
ba479fd2 NN |
10855 | ; |
10856 | return 0; | |
10857 | } | |
10858 | _ACEOF | |
10859 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10860 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 10861 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 10862 | ac_status=$? |
86da66b5 HPN |
10863 | grep -v '^ *+' conftest.er1 >conftest.err |
10864 | rm -f conftest.er1 | |
10865 | cat conftest.err >&5 | |
ba479fd2 NN |
10866 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10867 | (exit $ac_status); } && | |
dbad5e72 SE |
10868 | { ac_try='test -z "$ac_c_werror_flag" |
10869 | || test ! -s conftest.err' | |
86da66b5 HPN |
10870 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10871 | (eval $ac_try) 2>&5 | |
10872 | ac_status=$? | |
10873 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10874 | (exit $ac_status); }; } && | |
10875 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
10876 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10877 | (eval $ac_try) 2>&5 | |
10878 | ac_status=$? | |
10879 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10880 | (exit $ac_status); }; }; then | |
f91abfce TT |
10881 | am_cv_func_iconv=yes |
10882 | else | |
ba479fd2 NN |
10883 | echo "$as_me: failed program was:" >&5 |
10884 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10885 | ||
f91abfce | 10886 | fi |
86da66b5 HPN |
10887 | rm -f conftest.err conftest.$ac_objext \ |
10888 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
10889 | if test "$am_cv_func_iconv" != yes; then |
10890 | am_save_LIBS="$LIBS" | |
dfb77e37 | 10891 | LIBS="$LIBS $LIBICONV" |
ba479fd2 | 10892 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10893 | /* confdefs.h. */ |
10894 | _ACEOF | |
10895 | cat confdefs.h >>conftest.$ac_ext | |
10896 | cat >>conftest.$ac_ext <<_ACEOF | |
10897 | /* end confdefs.h. */ | |
f91abfce TT |
10898 | #include <stdlib.h> |
10899 | #include <iconv.h> | |
ba479fd2 NN |
10900 | int |
10901 | main () | |
10902 | { | |
f91abfce TT |
10903 | iconv_t cd = iconv_open("",""); |
10904 | iconv(cd,NULL,NULL,NULL,NULL); | |
10905 | iconv_close(cd); | |
ba479fd2 NN |
10906 | ; |
10907 | return 0; | |
10908 | } | |
10909 | _ACEOF | |
10910 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10911 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 10912 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 10913 | ac_status=$? |
86da66b5 HPN |
10914 | grep -v '^ *+' conftest.er1 >conftest.err |
10915 | rm -f conftest.er1 | |
10916 | cat conftest.err >&5 | |
ba479fd2 NN |
10917 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10918 | (exit $ac_status); } && | |
dbad5e72 SE |
10919 | { ac_try='test -z "$ac_c_werror_flag" |
10920 | || test ! -s conftest.err' | |
86da66b5 HPN |
10921 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10922 | (eval $ac_try) 2>&5 | |
10923 | ac_status=$? | |
10924 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10925 | (exit $ac_status); }; } && | |
10926 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
10927 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10928 | (eval $ac_try) 2>&5 | |
10929 | ac_status=$? | |
10930 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10931 | (exit $ac_status); }; }; then | |
f91abfce TT |
10932 | am_cv_lib_iconv=yes |
10933 | am_cv_func_iconv=yes | |
10934 | else | |
ba479fd2 NN |
10935 | echo "$as_me: failed program was:" >&5 |
10936 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10937 | ||
f91abfce | 10938 | fi |
86da66b5 HPN |
10939 | rm -f conftest.err conftest.$ac_objext \ |
10940 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
10941 | LIBS="$am_save_LIBS" |
10942 | fi | |
6e3f3080 | 10943 | |
ba479fd2 NN |
10944 | fi |
10945 | echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 | |
10946 | echo "${ECHO_T}$am_cv_func_iconv" >&6 | |
63cf211a | 10947 | if test "$am_cv_func_iconv" = yes; then |
ba479fd2 NN |
10948 | |
10949 | cat >>confdefs.h <<\_ACEOF | |
f91abfce | 10950 | #define HAVE_ICONV 1 |
ba479fd2 | 10951 | _ACEOF |
f91abfce | 10952 | |
dfb77e37 KC |
10953 | fi |
10954 | if test "$am_cv_lib_iconv" = yes; then | |
10955 | echo "$as_me:$LINENO: checking how to link with libiconv" >&5 | |
10956 | echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 | |
10957 | echo "$as_me:$LINENO: result: $LIBICONV" >&5 | |
10958 | echo "${ECHO_T}$LIBICONV" >&6 | |
10959 | else | |
10960 | CPPFLAGS="$am_save_CPPFLAGS" | |
10961 | LIBICONV= | |
10962 | LTLIBICONV= | |
10963 | fi | |
10964 | ||
10965 | ||
10966 | ||
10967 | if test "$am_cv_func_iconv" = yes; then | |
ba479fd2 NN |
10968 | echo "$as_me:$LINENO: checking for iconv declaration" >&5 |
10969 | echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 | |
10970 | if test "${am_cv_proto_iconv+set}" = set; then | |
10971 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 10972 | else |
ba479fd2 NN |
10973 | |
10974 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10975 | /* confdefs.h. */ |
10976 | _ACEOF | |
10977 | cat confdefs.h >>conftest.$ac_ext | |
10978 | cat >>conftest.$ac_ext <<_ACEOF | |
10979 | /* end confdefs.h. */ | |
f91abfce TT |
10980 | |
10981 | #include <stdlib.h> | |
10982 | #include <iconv.h> | |
10983 | extern | |
10984 | #ifdef __cplusplus | |
10985 | "C" | |
10986 | #endif | |
10987 | #if defined(__STDC__) || defined(__cplusplus) | |
10988 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10989 | #else | |
10990 | size_t iconv(); | |
10991 | #endif | |
10992 | ||
ba479fd2 NN |
10993 | int |
10994 | main () | |
10995 | { | |
f91abfce | 10996 | |
ba479fd2 NN |
10997 | ; |
10998 | return 0; | |
10999 | } | |
11000 | _ACEOF | |
11001 | rm -f conftest.$ac_objext | |
11002 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11003 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11004 | ac_status=$? |
86da66b5 HPN |
11005 | grep -v '^ *+' conftest.er1 >conftest.err |
11006 | rm -f conftest.er1 | |
11007 | cat conftest.err >&5 | |
ba479fd2 NN |
11008 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11009 | (exit $ac_status); } && | |
dbad5e72 SE |
11010 | { ac_try='test -z "$ac_c_werror_flag" |
11011 | || test ! -s conftest.err' | |
86da66b5 HPN |
11012 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11013 | (eval $ac_try) 2>&5 | |
11014 | ac_status=$? | |
11015 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11016 | (exit $ac_status); }; } && | |
11017 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11018 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11019 | (eval $ac_try) 2>&5 | |
11020 | ac_status=$? | |
11021 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11022 | (exit $ac_status); }; }; then | |
f91abfce TT |
11023 | am_cv_proto_iconv_arg1="" |
11024 | else | |
ba479fd2 NN |
11025 | echo "$as_me: failed program was:" >&5 |
11026 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11027 | ||
11028 | am_cv_proto_iconv_arg1="const" | |
f91abfce | 11029 | fi |
86da66b5 | 11030 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
f91abfce TT |
11031 | 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);" |
11032 | fi | |
11033 | ||
11034 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
ba479fd2 NN |
11035 | echo "$as_me:$LINENO: result: ${ac_t:- |
11036 | }$am_cv_proto_iconv" >&5 | |
11037 | echo "${ECHO_T}${ac_t:- | |
11038 | }$am_cv_proto_iconv" >&6 | |
11039 | ||
11040 | cat >>confdefs.h <<_ACEOF | |
f91abfce | 11041 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
ba479fd2 | 11042 | _ACEOF |
f91abfce TT |
11043 | |
11044 | fi | |
f91abfce | 11045 | |
56694dd9 ZW |
11046 | # Until we have in-tree GNU iconv: |
11047 | LIBICONV_DEP= | |
11048 | ||
11049 | ||
11050 | ||
ba479fd2 NN |
11051 | echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 |
11052 | echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 | |
11053 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then | |
11054 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
56694dd9 | 11055 | else |
ba479fd2 | 11056 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11057 | /* confdefs.h. */ |
11058 | _ACEOF | |
11059 | cat confdefs.h >>conftest.$ac_ext | |
11060 | cat >>conftest.$ac_ext <<_ACEOF | |
11061 | /* end confdefs.h. */ | |
56694dd9 | 11062 | #include <locale.h> |
ba479fd2 NN |
11063 | int |
11064 | main () | |
11065 | { | |
56694dd9 | 11066 | return LC_MESSAGES |
ba479fd2 NN |
11067 | ; |
11068 | return 0; | |
11069 | } | |
11070 | _ACEOF | |
11071 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11072 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 11073 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 11074 | ac_status=$? |
86da66b5 HPN |
11075 | grep -v '^ *+' conftest.er1 >conftest.err |
11076 | rm -f conftest.er1 | |
11077 | cat conftest.err >&5 | |
ba479fd2 NN |
11078 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11079 | (exit $ac_status); } && | |
dbad5e72 SE |
11080 | { ac_try='test -z "$ac_c_werror_flag" |
11081 | || test ! -s conftest.err' | |
86da66b5 HPN |
11082 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11083 | (eval $ac_try) 2>&5 | |
11084 | ac_status=$? | |
11085 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11086 | (exit $ac_status); }; } && | |
11087 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
11088 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11089 | (eval $ac_try) 2>&5 | |
11090 | ac_status=$? | |
11091 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11092 | (exit $ac_status); }; }; then | |
56694dd9 ZW |
11093 | am_cv_val_LC_MESSAGES=yes |
11094 | else | |
ba479fd2 NN |
11095 | echo "$as_me: failed program was:" >&5 |
11096 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11097 | ||
11098 | am_cv_val_LC_MESSAGES=no | |
56694dd9 | 11099 | fi |
86da66b5 HPN |
11100 | rm -f conftest.err conftest.$ac_objext \ |
11101 | conftest$ac_exeext conftest.$ac_ext | |
56694dd9 | 11102 | fi |
ba479fd2 NN |
11103 | echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 |
11104 | echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 | |
63cf211a | 11105 | if test $am_cv_val_LC_MESSAGES = yes; then |
ba479fd2 NN |
11106 | |
11107 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 11108 | #define HAVE_LC_MESSAGES 1 |
ba479fd2 | 11109 | _ACEOF |
56694dd9 ZW |
11110 | |
11111 | fi | |
11112 | ||
f91abfce | 11113 | |
a03ea89b BM |
11114 | |
11115 | echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 | |
11116 | echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 | |
11117 | if test "${am_cv_langinfo_codeset+set}" = set; then | |
11118 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11119 | else | |
11120 | cat >conftest.$ac_ext <<_ACEOF | |
11121 | /* confdefs.h. */ | |
11122 | _ACEOF | |
11123 | cat confdefs.h >>conftest.$ac_ext | |
11124 | cat >>conftest.$ac_ext <<_ACEOF | |
11125 | /* end confdefs.h. */ | |
11126 | #include <langinfo.h> | |
11127 | int | |
11128 | main () | |
11129 | { | |
11130 | char* cs = nl_langinfo(CODESET); | |
11131 | ; | |
11132 | return 0; | |
11133 | } | |
11134 | _ACEOF | |
11135 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11136 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11137 | (eval $ac_link) 2>conftest.er1 | |
11138 | ac_status=$? | |
11139 | grep -v '^ *+' conftest.er1 >conftest.err | |
11140 | rm -f conftest.er1 | |
11141 | cat conftest.err >&5 | |
11142 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11143 | (exit $ac_status); } && | |
dbad5e72 SE |
11144 | { ac_try='test -z "$ac_c_werror_flag" |
11145 | || test ! -s conftest.err' | |
a03ea89b BM |
11146 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11147 | (eval $ac_try) 2>&5 | |
11148 | ac_status=$? | |
11149 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11150 | (exit $ac_status); }; } && | |
11151 | { ac_try='test -s conftest$ac_exeext' | |
11152 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11153 | (eval $ac_try) 2>&5 | |
11154 | ac_status=$? | |
11155 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11156 | (exit $ac_status); }; }; then | |
11157 | am_cv_langinfo_codeset=yes | |
11158 | else | |
11159 | echo "$as_me: failed program was:" >&5 | |
11160 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11161 | ||
11162 | am_cv_langinfo_codeset=no | |
11163 | fi | |
11164 | rm -f conftest.err conftest.$ac_objext \ | |
11165 | conftest$ac_exeext conftest.$ac_ext | |
11166 | ||
11167 | fi | |
11168 | echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 | |
11169 | echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 | |
11170 | if test $am_cv_langinfo_codeset = yes; then | |
11171 | ||
11172 | cat >>confdefs.h <<\_ACEOF | |
11173 | #define HAVE_LANGINFO_CODESET 1 | |
11174 | _ACEOF | |
11175 | ||
11176 | fi | |
11177 | ||
11178 | ||
86cf1cbd KG |
11179 | # We will need to find libiberty.h and ansidecl.h |
11180 | saved_CFLAGS="$CFLAGS" | |
11181 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
ad6717df PB |
11182 | |
11183 | ||
11184 | ||
11185 | ||
11186 | ||
11187 | ||
11188 | ||
11189 | ||
11190 | ||
11191 | ||
11192 | ||
11193 | ||
11194 | ||
11195 | ||
11196 | ||
11197 | ||
11198 | ||
11199 | ||
11200 | ||
11201 | ||
11202 | ||
6a257778 | 11203 | |
ad6717df PB |
11204 | |
11205 | ||
0d667716 KG |
11206 | |
11207 | ||
11208 | ||
11209 | ||
11210 | ||
11211 | ||
11212 | ||
11213 | ||
11214 | ||
11215 | ||
367e8319 | 11216 | |
0d667716 KG |
11217 | |
11218 | ||
7391b66c | 11219 | |
ed5b9f96 GK |
11220 | |
11221 | for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \ | |
11222 | strsignal strstr strverscmp \ | |
11223 | errno snprintf vsnprintf vasprintf malloc realloc calloc \ | |
367e8319 | 11224 | 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 | 11225 | do |
ad6717df | 11226 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11227 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11228 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11229 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11230 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11231 | else | |
11232 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11233 | /* confdefs.h. */ |
11234 | _ACEOF | |
11235 | cat confdefs.h >>conftest.$ac_ext | |
11236 | cat >>conftest.$ac_ext <<_ACEOF | |
11237 | /* end confdefs.h. */ | |
7afe8c41 KG |
11238 | #undef $ac_tr_decl |
11239 | #define $ac_tr_decl 1 | |
ba479fd2 | 11240 | |
d02af173 | 11241 | #include "ansidecl.h" |
86cf1cbd | 11242 | #include "system.h" |
f31e826b | 11243 | |
ba479fd2 NN |
11244 | int |
11245 | main () | |
11246 | { | |
86cf1cbd KG |
11247 | #ifndef $ac_func |
11248 | char *(*pfn) = (char *(*)) $ac_func ; | |
11249 | #endif | |
ba479fd2 NN |
11250 | ; |
11251 | return 0; | |
11252 | } | |
11253 | _ACEOF | |
11254 | rm -f conftest.$ac_objext | |
11255 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11256 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11257 | ac_status=$? |
86da66b5 HPN |
11258 | grep -v '^ *+' conftest.er1 >conftest.err |
11259 | rm -f conftest.er1 | |
11260 | cat conftest.err >&5 | |
ba479fd2 NN |
11261 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11262 | (exit $ac_status); } && | |
dbad5e72 SE |
11263 | { ac_try='test -z "$ac_c_werror_flag" |
11264 | || test ! -s conftest.err' | |
86da66b5 HPN |
11265 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11266 | (eval $ac_try) 2>&5 | |
11267 | ac_status=$? | |
11268 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11269 | (exit $ac_status); }; } && | |
11270 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11271 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11272 | (eval $ac_try) 2>&5 | |
11273 | ac_status=$? | |
11274 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11275 | (exit $ac_status); }; }; then | |
f31e826b | 11276 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 11277 | else |
ba479fd2 NN |
11278 | echo "$as_me: failed program was:" >&5 |
11279 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11280 | ||
11281 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 11282 | fi |
86da66b5 | 11283 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
11284 | fi |
11285 | ||
f31e826b | 11286 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
11287 | echo "$as_me:$LINENO: result: yes" >&5 |
11288 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 11289 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11290 | _ACEOF |
11291 | ||
81bf3d9e | 11292 | else |
ba479fd2 NN |
11293 | echo "$as_me:$LINENO: result: no" >&5 |
11294 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 11295 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11296 | _ACEOF |
11297 | ||
81bf3d9e RH |
11298 | fi |
11299 | ||
11300 | done | |
ba479fd2 | 11301 | |
ba479fd2 | 11302 | |
ba479fd2 | 11303 | |
81bf3d9e | 11304 | |
81bf3d9e RH |
11305 | |
11306 | for ac_func in getrlimit setrlimit getrusage | |
11307 | do | |
ad6717df | 11308 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11309 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11310 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11311 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11312 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11313 | else | |
11314 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11315 | /* confdefs.h. */ |
11316 | _ACEOF | |
11317 | cat confdefs.h >>conftest.$ac_ext | |
11318 | cat >>conftest.$ac_ext <<_ACEOF | |
11319 | /* end confdefs.h. */ | |
7afe8c41 KG |
11320 | #undef $ac_tr_decl |
11321 | #define $ac_tr_decl 1 | |
ba479fd2 | 11322 | |
d02af173 | 11323 | #include "ansidecl.h" |
86cf1cbd | 11324 | #include "system.h" |
81bf3d9e RH |
11325 | #ifdef HAVE_SYS_RESOURCE_H |
11326 | #include <sys/resource.h> | |
11327 | #endif | |
11328 | ||
f31e826b | 11329 | |
ba479fd2 NN |
11330 | int |
11331 | main () | |
11332 | { | |
86cf1cbd KG |
11333 | #ifndef $ac_func |
11334 | char *(*pfn) = (char *(*)) $ac_func ; | |
11335 | #endif | |
ba479fd2 NN |
11336 | ; |
11337 | return 0; | |
11338 | } | |
11339 | _ACEOF | |
11340 | rm -f conftest.$ac_objext | |
11341 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11342 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11343 | ac_status=$? |
86da66b5 HPN |
11344 | grep -v '^ *+' conftest.er1 >conftest.err |
11345 | rm -f conftest.er1 | |
11346 | cat conftest.err >&5 | |
ba479fd2 NN |
11347 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11348 | (exit $ac_status); } && | |
dbad5e72 SE |
11349 | { ac_try='test -z "$ac_c_werror_flag" |
11350 | || test ! -s conftest.err' | |
86da66b5 HPN |
11351 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11352 | (eval $ac_try) 2>&5 | |
11353 | ac_status=$? | |
11354 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11355 | (exit $ac_status); }; } && | |
11356 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11357 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11358 | (eval $ac_try) 2>&5 | |
11359 | ac_status=$? | |
11360 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11361 | (exit $ac_status); }; }; then | |
f31e826b | 11362 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 11363 | else |
ba479fd2 NN |
11364 | echo "$as_me: failed program was:" >&5 |
11365 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11366 | ||
11367 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 11368 | fi |
86da66b5 | 11369 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
11370 | fi |
11371 | ||
f31e826b | 11372 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
11373 | echo "$as_me:$LINENO: result: yes" >&5 |
11374 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 11375 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11376 | _ACEOF |
11377 | ||
81bf3d9e | 11378 | else |
ba479fd2 NN |
11379 | echo "$as_me:$LINENO: result: no" >&5 |
11380 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 11381 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11382 | _ACEOF |
11383 | ||
81bf3d9e RH |
11384 | fi |
11385 | ||
11386 | done | |
86cf1cbd | 11387 | |
81bf3d9e | 11388 | |
ba479fd2 | 11389 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11390 | /* confdefs.h. */ |
11391 | _ACEOF | |
11392 | cat confdefs.h >>conftest.$ac_ext | |
11393 | cat >>conftest.$ac_ext <<_ACEOF | |
11394 | /* end confdefs.h. */ | |
b2522d2b HPN |
11395 | |
11396 | #include "ansidecl.h" | |
11397 | #include "system.h" | |
11398 | #ifdef HAVE_SYS_RESOURCE_H | |
11399 | #include <sys/resource.h> | |
11400 | #endif | |
11401 | ||
ba479fd2 NN |
11402 | int |
11403 | main () | |
11404 | { | |
b2522d2b | 11405 | rlim_t l = 0; |
ba479fd2 NN |
11406 | ; |
11407 | return 0; | |
11408 | } | |
11409 | _ACEOF | |
11410 | rm -f conftest.$ac_objext | |
11411 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11412 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11413 | ac_status=$? |
86da66b5 HPN |
11414 | grep -v '^ *+' conftest.er1 >conftest.err |
11415 | rm -f conftest.er1 | |
11416 | cat conftest.err >&5 | |
ba479fd2 NN |
11417 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11418 | (exit $ac_status); } && | |
dbad5e72 SE |
11419 | { ac_try='test -z "$ac_c_werror_flag" |
11420 | || test ! -s conftest.err' | |
86da66b5 HPN |
11421 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11422 | (eval $ac_try) 2>&5 | |
11423 | ac_status=$? | |
11424 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11425 | (exit $ac_status); }; } && | |
11426 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11427 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11428 | (eval $ac_try) 2>&5 | |
11429 | ac_status=$? | |
11430 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11431 | (exit $ac_status); }; }; then | |
b2522d2b HPN |
11432 | : |
11433 | else | |
ba479fd2 NN |
11434 | echo "$as_me: failed program was:" >&5 |
11435 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11436 | ||
11437 | ||
11438 | cat >>confdefs.h <<\_ACEOF | |
b2522d2b | 11439 | #define rlim_t long |
ba479fd2 | 11440 | _ACEOF |
b2522d2b HPN |
11441 | |
11442 | fi | |
86da66b5 | 11443 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
b2522d2b | 11444 | |
2102b2fe RS |
11445 | # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible |
11446 | # FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname | |
11447 | # in collect2.c, <fcntl.h> isn't visible, but the configure test below needs | |
11448 | # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME. | |
ad6717df | 11449 | |
351df804 | 11450 | for ac_func in ldgetname |
c1800ec8 | 11451 | do |
ad6717df | 11452 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11453 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11454 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11455 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11456 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11457 | else | |
11458 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11459 | /* confdefs.h. */ |
11460 | _ACEOF | |
11461 | cat confdefs.h >>conftest.$ac_ext | |
11462 | cat >>conftest.$ac_ext <<_ACEOF | |
11463 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11464 | #undef $ac_tr_decl |
11465 | #define $ac_tr_decl 1 | |
ba479fd2 | 11466 | |
351df804 KG |
11467 | #include "ansidecl.h" |
11468 | #include "system.h" | |
11469 | #ifdef HAVE_LDFCN_H | |
2102b2fe RS |
11470 | #undef FREAD |
11471 | #undef FWRITE | |
351df804 KG |
11472 | #include <ldfcn.h> |
11473 | #endif | |
11474 | ||
11475 | ||
ba479fd2 NN |
11476 | int |
11477 | main () | |
11478 | { | |
351df804 KG |
11479 | #ifndef $ac_func |
11480 | char *(*pfn) = (char *(*)) $ac_func ; | |
11481 | #endif | |
ba479fd2 NN |
11482 | ; |
11483 | return 0; | |
11484 | } | |
11485 | _ACEOF | |
11486 | rm -f conftest.$ac_objext | |
11487 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11488 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11489 | ac_status=$? |
86da66b5 HPN |
11490 | grep -v '^ *+' conftest.er1 >conftest.err |
11491 | rm -f conftest.er1 | |
11492 | cat conftest.err >&5 | |
ba479fd2 NN |
11493 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11494 | (exit $ac_status); } && | |
dbad5e72 SE |
11495 | { ac_try='test -z "$ac_c_werror_flag" |
11496 | || test ! -s conftest.err' | |
86da66b5 HPN |
11497 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11498 | (eval $ac_try) 2>&5 | |
11499 | ac_status=$? | |
11500 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11501 | (exit $ac_status); }; } && | |
11502 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11503 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11504 | (eval $ac_try) 2>&5 | |
11505 | ac_status=$? | |
11506 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11507 | (exit $ac_status); }; }; then | |
351df804 KG |
11508 | eval "gcc_cv_have_decl_$ac_func=yes" |
11509 | else | |
ba479fd2 NN |
11510 | echo "$as_me: failed program was:" >&5 |
11511 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11512 | ||
11513 | eval "gcc_cv_have_decl_$ac_func=no" | |
351df804 | 11514 | fi |
86da66b5 | 11515 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
351df804 KG |
11516 | fi |
11517 | ||
11518 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
11519 | echo "$as_me:$LINENO: result: yes" >&5 |
11520 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 11521 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11522 | _ACEOF |
11523 | ||
351df804 | 11524 | else |
ba479fd2 NN |
11525 | echo "$as_me:$LINENO: result: no" >&5 |
11526 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 11527 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11528 | _ACEOF |
11529 | ||
351df804 KG |
11530 | fi |
11531 | ||
11532 | done | |
ba479fd2 | 11533 | |
351df804 KG |
11534 | |
11535 | ||
11536 | for ac_func in times | |
11537 | do | |
ad6717df | 11538 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11539 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11540 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11541 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11542 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11543 | else | |
11544 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11545 | /* confdefs.h. */ |
11546 | _ACEOF | |
11547 | cat confdefs.h >>conftest.$ac_ext | |
11548 | cat >>conftest.$ac_ext <<_ACEOF | |
11549 | /* end confdefs.h. */ | |
351df804 KG |
11550 | #undef $ac_tr_decl |
11551 | #define $ac_tr_decl 1 | |
ba479fd2 | 11552 | |
c1800ec8 ZW |
11553 | #include "ansidecl.h" |
11554 | #include "system.h" | |
11555 | #ifdef HAVE_SYS_TIMES_H | |
11556 | #include <sys/times.h> | |
11557 | #endif | |
11558 | ||
11559 | ||
ba479fd2 NN |
11560 | int |
11561 | main () | |
11562 | { | |
c1800ec8 ZW |
11563 | #ifndef $ac_func |
11564 | char *(*pfn) = (char *(*)) $ac_func ; | |
11565 | #endif | |
ba479fd2 NN |
11566 | ; |
11567 | return 0; | |
11568 | } | |
11569 | _ACEOF | |
11570 | rm -f conftest.$ac_objext | |
11571 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11572 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11573 | ac_status=$? |
86da66b5 HPN |
11574 | grep -v '^ *+' conftest.er1 >conftest.err |
11575 | rm -f conftest.er1 | |
11576 | cat conftest.err >&5 | |
ba479fd2 NN |
11577 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11578 | (exit $ac_status); } && | |
dbad5e72 SE |
11579 | { ac_try='test -z "$ac_c_werror_flag" |
11580 | || test ! -s conftest.err' | |
86da66b5 HPN |
11581 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11582 | (eval $ac_try) 2>&5 | |
11583 | ac_status=$? | |
11584 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11585 | (exit $ac_status); }; } && | |
11586 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11587 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11588 | (eval $ac_try) 2>&5 | |
11589 | ac_status=$? | |
11590 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11591 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11592 | eval "gcc_cv_have_decl_$ac_func=yes" |
11593 | else | |
ba479fd2 NN |
11594 | echo "$as_me: failed program was:" >&5 |
11595 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11596 | ||
11597 | eval "gcc_cv_have_decl_$ac_func=no" | |
c1800ec8 | 11598 | fi |
86da66b5 | 11599 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 ZW |
11600 | fi |
11601 | ||
11602 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
11603 | echo "$as_me:$LINENO: result: yes" >&5 |
11604 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 11605 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11606 | _ACEOF |
11607 | ||
c1800ec8 | 11608 | else |
ba479fd2 NN |
11609 | echo "$as_me:$LINENO: result: no" >&5 |
11610 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 11611 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11612 | _ACEOF |
11613 | ||
c1800ec8 ZW |
11614 | fi |
11615 | ||
11616 | done | |
c1800ec8 ZW |
11617 | |
11618 | ||
11619 | # More time-related stuff. | |
ba479fd2 NN |
11620 | echo "$as_me:$LINENO: checking for struct tms" >&5 |
11621 | echo $ECHO_N "checking for struct tms... $ECHO_C" >&6 | |
11622 | if test "${ac_cv_struct_tms+set}" = set; then | |
11623 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11624 | else | |
11625 | ||
11626 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11627 | /* confdefs.h. */ |
11628 | _ACEOF | |
11629 | cat confdefs.h >>conftest.$ac_ext | |
11630 | cat >>conftest.$ac_ext <<_ACEOF | |
11631 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11632 | |
11633 | #include "ansidecl.h" | |
11634 | #include "system.h" | |
11635 | #ifdef HAVE_SYS_TIMES_H | |
11636 | #include <sys/times.h> | |
11637 | #endif | |
11638 | ||
ba479fd2 NN |
11639 | int |
11640 | main () | |
11641 | { | |
c1800ec8 | 11642 | struct tms tms; |
ba479fd2 NN |
11643 | ; |
11644 | return 0; | |
11645 | } | |
11646 | _ACEOF | |
11647 | rm -f conftest.$ac_objext | |
11648 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11649 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11650 | ac_status=$? |
86da66b5 HPN |
11651 | grep -v '^ *+' conftest.er1 >conftest.err |
11652 | rm -f conftest.er1 | |
11653 | cat conftest.err >&5 | |
ba479fd2 NN |
11654 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11655 | (exit $ac_status); } && | |
dbad5e72 SE |
11656 | { ac_try='test -z "$ac_c_werror_flag" |
11657 | || test ! -s conftest.err' | |
86da66b5 HPN |
11658 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11659 | (eval $ac_try) 2>&5 | |
11660 | ac_status=$? | |
11661 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11662 | (exit $ac_status); }; } && | |
11663 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11664 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11665 | (eval $ac_try) 2>&5 | |
11666 | ac_status=$? | |
11667 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11668 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11669 | ac_cv_struct_tms=yes |
11670 | else | |
ba479fd2 NN |
11671 | echo "$as_me: failed program was:" >&5 |
11672 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11673 | ||
11674 | ac_cv_struct_tms=no | |
c1800ec8 | 11675 | fi |
86da66b5 | 11676 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 11677 | fi |
ba479fd2 NN |
11678 | echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 |
11679 | echo "${ECHO_T}$ac_cv_struct_tms" >&6 | |
63cf211a | 11680 | if test $ac_cv_struct_tms = yes; then |
ba479fd2 NN |
11681 | |
11682 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 11683 | #define HAVE_STRUCT_TMS 1 |
ba479fd2 | 11684 | _ACEOF |
c1800ec8 ZW |
11685 | |
11686 | fi | |
11687 | ||
11688 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
11689 | # revisit after autoconf 2.50. | |
ba479fd2 NN |
11690 | echo "$as_me:$LINENO: checking for clock_t" >&5 |
11691 | echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 | |
11692 | if test "${gcc_cv_type_clock_t+set}" = set; then | |
11693 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11694 | else | |
11695 | ||
11696 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11697 | /* confdefs.h. */ |
11698 | _ACEOF | |
11699 | cat confdefs.h >>conftest.$ac_ext | |
11700 | cat >>conftest.$ac_ext <<_ACEOF | |
11701 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11702 | |
11703 | #include "ansidecl.h" | |
11704 | #include "system.h" | |
11705 | ||
ba479fd2 NN |
11706 | int |
11707 | main () | |
11708 | { | |
c1800ec8 | 11709 | clock_t x; |
ba479fd2 NN |
11710 | ; |
11711 | return 0; | |
11712 | } | |
11713 | _ACEOF | |
11714 | rm -f conftest.$ac_objext | |
11715 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11716 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11717 | ac_status=$? |
86da66b5 HPN |
11718 | grep -v '^ *+' conftest.er1 >conftest.err |
11719 | rm -f conftest.er1 | |
11720 | cat conftest.err >&5 | |
ba479fd2 NN |
11721 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11722 | (exit $ac_status); } && | |
dbad5e72 SE |
11723 | { ac_try='test -z "$ac_c_werror_flag" |
11724 | || test ! -s conftest.err' | |
86da66b5 HPN |
11725 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11726 | (eval $ac_try) 2>&5 | |
11727 | ac_status=$? | |
11728 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11729 | (exit $ac_status); }; } && | |
11730 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11731 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11732 | (eval $ac_try) 2>&5 | |
11733 | ac_status=$? | |
11734 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11735 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11736 | gcc_cv_type_clock_t=yes |
11737 | else | |
ba479fd2 NN |
11738 | echo "$as_me: failed program was:" >&5 |
11739 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11740 | ||
11741 | gcc_cv_type_clock_t=no | |
c1800ec8 | 11742 | fi |
86da66b5 | 11743 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 11744 | fi |
ba479fd2 NN |
11745 | echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 |
11746 | echo "${ECHO_T}$gcc_cv_type_clock_t" >&6 | |
63cf211a | 11747 | if test $gcc_cv_type_clock_t = yes; then |
ba479fd2 NN |
11748 | |
11749 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 11750 | #define HAVE_CLOCK_T 1 |
ba479fd2 | 11751 | _ACEOF |
c1800ec8 ZW |
11752 | |
11753 | fi | |
11754 | ||
eb70d86d AS |
11755 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
11756 | CFLAGS="$saved_CFLAGS" | |
11757 | ||
07cf4226 DM |
11758 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
11759 | if test "${enable_initfini_array+set}" = set; then | |
11760 | enableval="$enable_initfini_array" | |
ba479fd2 | 11761 | |
07cf4226 | 11762 | else |
ba479fd2 NN |
11763 | |
11764 | echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5 | |
11765 | echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6 | |
11766 | if test "${gcc_cv_initfini_array+set}" = set; then | |
11767 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
07cf4226 | 11768 | else |
eb70d86d | 11769 | if test "$cross_compiling" = yes; then |
918c4fe4 | 11770 | gcc_cv_initfini_array=no |
eb70d86d | 11771 | else |
ba479fd2 | 11772 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11773 | /* confdefs.h. */ |
11774 | _ACEOF | |
11775 | cat confdefs.h >>conftest.$ac_ext | |
11776 | cat >>conftest.$ac_ext <<_ACEOF | |
11777 | /* end confdefs.h. */ | |
eb70d86d | 11778 | |
07cf4226 DM |
11779 | static int x = -1; |
11780 | int main (void) { return x; } | |
11781 | int foo (void) { x = 0; } | |
11782 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
ba479fd2 NN |
11783 | _ACEOF |
11784 | rm -f conftest$ac_exeext | |
11785 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11786 | (eval $ac_link) 2>&5 | |
11787 | ac_status=$? | |
11788 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11789 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
11790 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11791 | (eval $ac_try) 2>&5 | |
11792 | ac_status=$? | |
11793 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11794 | (exit $ac_status); }; }; then | |
918c4fe4 | 11795 | gcc_cv_initfini_array=yes |
eb70d86d | 11796 | else |
ba479fd2 NN |
11797 | echo "$as_me: program exited with status $ac_status" >&5 |
11798 | echo "$as_me: failed program was:" >&5 | |
11799 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11800 | ||
11801 | ( exit $ac_status ) | |
11802 | gcc_cv_initfini_array=no | |
eb70d86d | 11803 | fi |
86da66b5 | 11804 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
eb70d86d | 11805 | fi |
07cf4226 | 11806 | fi |
ba479fd2 NN |
11807 | echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5 |
11808 | echo "${ECHO_T}$gcc_cv_initfini_array" >&6 | |
eb70d86d | 11809 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 11810 | |
ba479fd2 | 11811 | fi; |
63cf211a | 11812 | if test $enable_initfini_array = yes; then |
ba479fd2 NN |
11813 | |
11814 | cat >>confdefs.h <<\_ACEOF | |
eb70d86d | 11815 | #define HAVE_INITFINI_ARRAY 1 |
ba479fd2 | 11816 | _ACEOF |
07cf4226 | 11817 | |
eb70d86d | 11818 | fi |
81bf3d9e | 11819 | |
ba479fd2 NN |
11820 | # mkdir takes a single argument on some systems. |
11821 | echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5 | |
11822 | echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6 | |
11823 | if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then | |
11824 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75923b2f | 11825 | else |
ba479fd2 | 11826 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11827 | /* confdefs.h. */ |
11828 | _ACEOF | |
11829 | cat confdefs.h >>conftest.$ac_ext | |
11830 | cat >>conftest.$ac_ext <<_ACEOF | |
11831 | /* end confdefs.h. */ | |
75923b2f MK |
11832 | |
11833 | #include <sys/types.h> | |
11834 | #ifdef HAVE_SYS_STAT_H | |
11835 | # include <sys/stat.h> | |
11836 | #endif | |
11837 | #ifdef HAVE_UNISTD_H | |
11838 | # include <unistd.h> | |
11839 | #endif | |
11840 | #ifdef HAVE_DIRECT_H | |
11841 | # include <direct.h> | |
11842 | #endif | |
ba479fd2 NN |
11843 | int |
11844 | main () | |
11845 | { | |
75923b2f | 11846 | mkdir ("foo", 0); |
ba479fd2 NN |
11847 | ; |
11848 | return 0; | |
11849 | } | |
11850 | _ACEOF | |
11851 | rm -f conftest.$ac_objext | |
11852 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11853 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11854 | ac_status=$? |
86da66b5 HPN |
11855 | grep -v '^ *+' conftest.er1 >conftest.err |
11856 | rm -f conftest.er1 | |
11857 | cat conftest.err >&5 | |
ba479fd2 NN |
11858 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11859 | (exit $ac_status); } && | |
dbad5e72 SE |
11860 | { ac_try='test -z "$ac_c_werror_flag" |
11861 | || test ! -s conftest.err' | |
86da66b5 HPN |
11862 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11863 | (eval $ac_try) 2>&5 | |
11864 | ac_status=$? | |
11865 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11866 | (exit $ac_status); }; } && | |
11867 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11868 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11869 | (eval $ac_try) 2>&5 | |
11870 | ac_status=$? | |
11871 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11872 | (exit $ac_status); }; }; then | |
75923b2f MK |
11873 | gcc_cv_mkdir_takes_one_arg=no |
11874 | else | |
ba479fd2 NN |
11875 | echo "$as_me: failed program was:" >&5 |
11876 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11877 | ||
11878 | gcc_cv_mkdir_takes_one_arg=yes | |
75923b2f | 11879 | fi |
86da66b5 | 11880 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75923b2f | 11881 | fi |
ba479fd2 NN |
11882 | echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5 |
11883 | echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6 | |
63cf211a | 11884 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then |
ba479fd2 NN |
11885 | |
11886 | cat >>confdefs.h <<\_ACEOF | |
75923b2f | 11887 | #define MKDIR_TAKES_ONE_ARG 1 |
ba479fd2 | 11888 | _ACEOF |
75923b2f MK |
11889 | |
11890 | fi | |
11891 | ||
11892 | ||
861bb6c1 JL |
11893 | # File extensions |
11894 | manext='.1' | |
11895 | objext='.o' | |
11896 | ||
11897 | ||
11898 | ||
4977bab6 ZW |
11899 | # With Setjmp/Longjmp based exception handling. |
11900 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
11901 | if test "${enable_sjlj_exceptions+set}" = set; then | |
11902 | enableval="$enable_sjlj_exceptions" | |
11903 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
63cf211a | 11904 | |
ba479fd2 NN |
11905 | cat >>confdefs.h <<_ACEOF |
11906 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
11907 | _ACEOF | |
4977bab6 | 11908 | |
ba479fd2 | 11909 | fi; |
4977bab6 | 11910 | |
443728bb L |
11911 | # For platforms with the unwind ABI which includes an unwind library, |
11912 | # libunwind, we can choose to use the system libunwind. | |
4977bab6 | 11913 | |
443728bb L |
11914 | # Check whether --with-system-libunwind or --without-system-libunwind was given. |
11915 | if test "${with_system_libunwind+set}" = set; then | |
11916 | withval="$with_system_libunwind" | |
4977bab6 | 11917 | |
ba479fd2 | 11918 | fi; |
4977bab6 | 11919 | |
34a86c2b NN |
11920 | # -------------------------------------------------------- |
11921 | # Build, host, and target specific configuration fragments | |
11922 | # -------------------------------------------------------- | |
11923 | ||
5b28c537 NN |
11924 | # Collect build-machine-specific information. |
11925 | . ${srcdir}/config.build | |
11926 | ||
a89ea0df NN |
11927 | # Collect host-machine-specific information. |
11928 | . ${srcdir}/config.host | |
11929 | ||
ef69da62 | 11930 | target_gtfiles= |
a89ea0df NN |
11931 | |
11932 | # Collect target-machine-specific information. | |
8ad9fb33 | 11933 | . ${srcdir}/config.gcc |
861bb6c1 JL |
11934 | |
11935 | extra_objs="${host_extra_objs} ${extra_objs}" | |
30500d84 | 11936 | extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}" |
861bb6c1 JL |
11937 | |
11938 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 11939 | if test x"$tm_file" = x |
861bb6c1 JL |
11940 | then tm_file=$cpu_type/$cpu_type.h; fi |
11941 | ||
6b2adea9 | 11942 | if test x"$extra_headers" = x |
861bb6c1 JL |
11943 | then extra_headers=; fi |
11944 | ||
75bffa71 | 11945 | if test x$md_file = x |
e98e406f | 11946 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 11947 | |
75bffa71 | 11948 | if test x$out_file = x |
861bb6c1 JL |
11949 | then out_file=$cpu_type/$cpu_type.c; fi |
11950 | ||
75bffa71 | 11951 | if test x"$tmake_file" = x |
861bb6c1 JL |
11952 | then tmake_file=$cpu_type/t-$cpu_type |
11953 | fi | |
11954 | ||
90e6a802 | 11955 | if test x"$dwarf2" = xyes |
756ee602 | 11956 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
11957 | fi |
11958 | ||
861bb6c1 | 11959 | # Say what files are being used for the output code and MD file. |
11642c3a | 11960 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
11961 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
11962 | ||
11642c3a | 11963 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
11964 | # about them and drop them. |
11965 | ||
11642c3a ZW |
11966 | bx= |
11967 | for x in $build_xm_file; do | |
11968 | if test -f $srcdir/config/$x | |
11969 | then bx="$bx $x" | |
ba479fd2 NN |
11970 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
11971 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
11972 | fi |
11973 | done | |
11974 | build_xm_file="$bx" | |
11975 | ||
11976 | hx= | |
11977 | for x in $host_xm_file; do | |
11978 | if test -f $srcdir/config/$x | |
11979 | then hx="$hx $x" | |
ba479fd2 NN |
11980 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
11981 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
11982 | fi |
11983 | done | |
11984 | host_xm_file="$hx" | |
11985 | ||
11986 | tx= | |
11987 | for x in $xm_file; do | |
11988 | if test -f $srcdir/config/$x | |
11989 | then tx="$tx $x" | |
ba479fd2 NN |
11990 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
11991 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
11992 | fi |
11993 | done | |
11994 | xm_file="$tx" | |
11995 | ||
861bb6c1 JL |
11996 | count=a |
11997 | for f in $tm_file; do | |
11998 | count=${count}x | |
11999 | done | |
75bffa71 | 12000 | if test $count = ax; then |
861bb6c1 JL |
12001 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
12002 | else | |
12003 | echo "Using the following target machine macro files:" | |
12004 | for f in $tm_file; do | |
12005 | echo " $srcdir/config/$f" | |
12006 | done | |
12007 | fi | |
12008 | ||
4977bab6 | 12009 | if test x$need_64bit_hwint = xyes; then |
ba479fd2 NN |
12010 | |
12011 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 12012 | #define NEED_64BIT_HOST_WIDE_INT 1 |
ba479fd2 | 12013 | _ACEOF |
4977bab6 ZW |
12014 | |
12015 | fi | |
12016 | ||
99fa8911 AP |
12017 | if test x$use_long_long_for_widest_fast_int = xyes; then |
12018 | ||
12019 | cat >>confdefs.h <<\_ACEOF | |
12020 | #define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1 | |
12021 | _ACEOF | |
12022 | ||
12023 | fi | |
12024 | ||
861bb6c1 JL |
12025 | count=a |
12026 | for f in $host_xm_file; do | |
12027 | count=${count}x | |
12028 | done | |
11642c3a ZW |
12029 | if test $count = a; then |
12030 | : | |
12031 | elif test $count = ax; then | |
861bb6c1 JL |
12032 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
12033 | else | |
12034 | echo "Using the following host machine macro files:" | |
12035 | for f in $host_xm_file; do | |
12036 | echo " $srcdir/config/$f" | |
12037 | done | |
12038 | fi | |
476d9098 | 12039 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 12040 | |
75bffa71 | 12041 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
12042 | count=a |
12043 | for f in $build_xm_file; do | |
12044 | count=${count}x | |
12045 | done | |
11642c3a ZW |
12046 | if test $count = a; then |
12047 | : | |
12048 | elif test $count = ax; then | |
861bb6c1 JL |
12049 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
12050 | else | |
12051 | echo "Using the following build machine macro files:" | |
12052 | for f in $build_xm_file; do | |
12053 | echo " $srcdir/config/$f" | |
12054 | done | |
12055 | fi | |
12056 | fi | |
12057 | ||
8bb915b6 NN |
12058 | # --------- |
12059 | # Threading | |
12060 | # --------- | |
12061 | ||
c2e494a8 | 12062 | # Check if a valid thread package |
615be2cf | 12063 | case ${enable_threads} in |
c2e494a8 NN |
12064 | "" | no) |
12065 | # No threads | |
12066 | target_thread_file='single' | |
12067 | ;; | |
12068 | yes) | |
12069 | # default | |
12070 | target_thread_file='single' | |
12071 | ;; | |
18167442 | 12072 | aix | dce | gnat | irix | posix | posix95 | rtems | \ |
769e49eb | 12073 | single | solaris | vxworks | win32 ) |
615be2cf | 12074 | target_thread_file=${enable_threads} |
c2e494a8 NN |
12075 | ;; |
12076 | *) | |
615be2cf | 12077 | echo "${enable_threads} is an unknown thread package" 1>&2 |
c2e494a8 NN |
12078 | exit 1 |
12079 | ;; | |
12080 | esac | |
12081 | ||
12082 | if test x${thread_file} = x; then | |
12083 | # No thread file set by target-specific clauses in config.gcc, | |
12084 | # so use file chosen by default logic above | |
12085 | thread_file=${target_thread_file} | |
861bb6c1 JL |
12086 | fi |
12087 | ||
8bb915b6 NN |
12088 | # Make gthr-default.h if we have a thread file. |
12089 | gthread_flags= | |
12090 | if test $thread_file != single; then | |
12091 | rm -f gthr-default.h | |
12092 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h | |
12093 | gthread_flags=-DHAVE_GTHR_DEFAULT | |
12094 | fi | |
12095 | ||
12096 | ||
12097 | # -------- | |
12098 | # UNSORTED | |
12099 | # -------- | |
12100 | ||
18fbf599 | 12101 | use_cxa_atexit=no |
2121a768 JT |
12102 | if test x$enable___cxa_atexit = xyes || \ |
12103 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
18fbf599 PB |
12104 | if test x$host = x$target; then |
12105 | echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 | |
354b7da5 DH |
12106 | echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6 |
12107 | if test "${ac_cv_func___cxa_atexit+set}" = set; then | |
12108 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12109 | else | |
12110 | cat >conftest.$ac_ext <<_ACEOF | |
354b7da5 DH |
12111 | /* confdefs.h. */ |
12112 | _ACEOF | |
12113 | cat confdefs.h >>conftest.$ac_ext | |
12114 | cat >>conftest.$ac_ext <<_ACEOF | |
12115 | /* end confdefs.h. */ | |
86da66b5 HPN |
12116 | /* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit. |
12117 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
12118 | #define __cxa_atexit innocuous___cxa_atexit | |
12119 | ||
354b7da5 DH |
12120 | /* System header to define __stub macros and hopefully few prototypes, |
12121 | which can conflict with char __cxa_atexit (); below. | |
12122 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
12123 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 12124 | |
354b7da5 DH |
12125 | #ifdef __STDC__ |
12126 | # include <limits.h> | |
12127 | #else | |
12128 | # include <assert.h> | |
12129 | #endif | |
86da66b5 HPN |
12130 | |
12131 | #undef __cxa_atexit | |
12132 | ||
354b7da5 DH |
12133 | /* Override any gcc2 internal prototype to avoid an error. */ |
12134 | #ifdef __cplusplus | |
12135 | extern "C" | |
12136 | { | |
12137 | #endif | |
12138 | /* We use char because int might match the return type of a gcc2 | |
12139 | builtin and then its argument prototype would still apply. */ | |
12140 | char __cxa_atexit (); | |
12141 | /* The GNU C library defines this for functions which it implements | |
12142 | to always fail with ENOSYS. Some functions are actually named | |
12143 | something starting with __ and the normal name is an alias. */ | |
12144 | #if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit) | |
12145 | choke me | |
12146 | #else | |
12147 | char (*f) () = __cxa_atexit; | |
12148 | #endif | |
12149 | #ifdef __cplusplus | |
12150 | } | |
12151 | #endif | |
12152 | ||
12153 | int | |
12154 | main () | |
12155 | { | |
12156 | return f != __cxa_atexit; | |
12157 | ; | |
12158 | return 0; | |
12159 | } | |
12160 | _ACEOF | |
12161 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12162 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12163 | (eval $ac_link) 2>conftest.er1 |
354b7da5 | 12164 | ac_status=$? |
86da66b5 HPN |
12165 | grep -v '^ *+' conftest.er1 >conftest.err |
12166 | rm -f conftest.er1 | |
12167 | cat conftest.err >&5 | |
354b7da5 DH |
12168 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12169 | (exit $ac_status); } && | |
dbad5e72 SE |
12170 | { ac_try='test -z "$ac_c_werror_flag" |
12171 | || test ! -s conftest.err' | |
86da66b5 HPN |
12172 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12173 | (eval $ac_try) 2>&5 | |
12174 | ac_status=$? | |
12175 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12176 | (exit $ac_status); }; } && | |
12177 | { ac_try='test -s conftest$ac_exeext' | |
354b7da5 DH |
12178 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12179 | (eval $ac_try) 2>&5 | |
12180 | ac_status=$? | |
12181 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12182 | (exit $ac_status); }; }; then | |
12183 | ac_cv_func___cxa_atexit=yes | |
12184 | else | |
12185 | echo "$as_me: failed program was:" >&5 | |
12186 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12187 | ||
12188 | ac_cv_func___cxa_atexit=no | |
12189 | fi | |
86da66b5 HPN |
12190 | rm -f conftest.err conftest.$ac_objext \ |
12191 | conftest$ac_exeext conftest.$ac_ext | |
354b7da5 DH |
12192 | fi |
12193 | echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5 | |
12194 | echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6 | |
12195 | if test $ac_cv_func___cxa_atexit = yes; then | |
18fbf599 PB |
12196 | use_cxa_atexit=yes |
12197 | else | |
12198 | echo "__cxa_atexit can't be enabled on this target" | |
12199 | fi | |
12200 | ||
12201 | else | |
12202 | # We can't check for __cxa_atexit when building a cross, so assume | |
12203 | # it is available | |
12204 | use_cxa_atexit=yes | |
12205 | fi | |
12206 | if test x$use_cxa_atexit = xyes; then | |
ba479fd2 NN |
12207 | |
12208 | cat >>confdefs.h <<\_ACEOF | |
2121a768 | 12209 | #define DEFAULT_USE_CXA_ATEXIT 1 |
ba479fd2 | 12210 | _ACEOF |
2121a768 | 12211 | |
18fbf599 | 12212 | fi |
2121a768 JT |
12213 | fi |
12214 | ||
a5381466 | 12215 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
12216 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
12217 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
ba479fd2 NN |
12218 | |
12219 | ||
12220 | cat >>confdefs.h <<_ACEOF | |
e22340b0 | 12221 | #define EXTRA_MODES_FILE "config/$extra_modes" |
ba479fd2 | 12222 | _ACEOF |
a5381466 ZW |
12223 | |
12224 | fi | |
12225 | ||
75685792 RS |
12226 | # Convert extra_options into a form suitable for Makefile use. |
12227 | extra_opt_files= | |
12228 | for f in $extra_options; do | |
12229 | extra_opt_files="$extra_opt_files \$(srcdir)/config/$f" | |
12230 | done | |
12231 | ||
12232 | ||
b7cb92ad | 12233 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 12234 | # the first file included by config.h. |
4977bab6 | 12235 | # If host=build, it is correct to have bconfig include auto-host.h |
ba479fd2 | 12236 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 12237 | # work to find out the build config parameters. |
75bffa71 | 12238 | if test x$host = x$build |
db81d74a | 12239 | then |
eaf4e618 | 12240 | build_auto=auto-host.h |
b7cb92ad JL |
12241 | else |
12242 | # We create a subdir, then run autoconf in the subdir. | |
12243 | # To prevent recursion we set host and build for the new | |
12244 | # invocation of configure to the build for this invocation | |
ba479fd2 | 12245 | # of configure. |
b7cb92ad JL |
12246 | tempdir=build.$$ |
12247 | rm -rf $tempdir | |
12248 | mkdir $tempdir | |
12249 | cd $tempdir | |
12250 | case ${srcdir} in | |
255b8a49 | 12251 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
12252 | *) realsrcdir=../${srcdir};; |
12253 | esac | |
d920e825 L |
12254 | saved_CFLAGS="${CFLAGS}" |
12255 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
12256 | ${realsrcdir}/configure \ | |
33e70558 | 12257 | --enable-languages=${enable_languages-all} \ |
534d0cc0 | 12258 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 12259 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
12260 | |
12261 | # We just finished tests for the build machine, so rename | |
12262 | # the file auto-build.h in the gcc directory. | |
12263 | mv auto-host.h ../auto-build.h | |
12264 | cd .. | |
12265 | rm -rf $tempdir | |
eaf4e618 | 12266 | build_auto=auto-build.h |
db81d74a RH |
12267 | fi |
12268 | ||
06f0b04c | 12269 | |
eaf4e618 | 12270 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
12271 | tm_p_file="${tm_p_file} tm-preds.h" |
12272 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
12273 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 12274 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 | 12275 | # put this back in temporarily. |
232b67d9 | 12276 | xm_file="auto-host.h ansidecl.h ${xm_file}" |
0056a9b5 | 12277 | |
34a86c2b NN |
12278 | # -------- |
12279 | # UNSORTED | |
12280 | # -------- | |
12281 | ||
cc1e60ea | 12282 | # Compile in configure arguments. |
8105825d | 12283 | if test -f configargs.h ; then |
cc1e60ea | 12284 | # Being re-configured. |
022dae81 | 12285 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
12286 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
12287 | else | |
12288 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
12289 | fi | |
eeae7b41 DJ |
12290 | |
12291 | # Double all backslashes and backslash all quotes to turn | |
12292 | # gcc_config_arguments into a C string. | |
12293 | sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out | |
12294 | $gcc_config_arguments | |
12295 | EOF | |
12296 | gcc_config_arguments_str=`cat conftest.out` | |
12297 | rm -f conftest.out | |
12298 | ||
cc1e60ea JM |
12299 | cat > configargs.h <<EOF |
12300 | /* Generated automatically. */ | |
eeae7b41 | 12301 | static const char configuration_arguments[] = "$gcc_config_arguments_str"; |
a6687d2b | 12302 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
12303 | |
12304 | static const struct { | |
12305 | const char *name, *value; | |
12306 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
12307 | EOF |
12308 | ||
ab87f8c8 | 12309 | # Internationalization |
56694dd9 ZW |
12310 | # If we haven't got the data from the intl directory, |
12311 | # assume NLS is disabled. | |
ba479fd2 NN |
12312 | USE_NLS=no |
12313 | LIBINTL= | |
12314 | LIBINTL_DEP= | |
12315 | INCINTL= | |
12316 | XGETTEXT= | |
12317 | GMSGFMT= | |
12318 | POSUB= | |
56694dd9 ZW |
12319 | if test -f ../intl/config.intl; then |
12320 | . ../intl/config.intl | |
093e61a6 | 12321 | fi |
ba479fd2 NN |
12322 | echo "$as_me:$LINENO: checking whether NLS is requested" >&5 |
12323 | echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 | |
56694dd9 | 12324 | if test x"$USE_NLS" != xyes; then |
ba479fd2 NN |
12325 | echo "$as_me:$LINENO: result: no" >&5 |
12326 | echo "${ECHO_T}no" >&6 | |
56694dd9 | 12327 | else |
ba479fd2 NN |
12328 | echo "$as_me:$LINENO: result: yes" >&5 |
12329 | echo "${ECHO_T}yes" >&6 | |
12330 | ||
12331 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 12332 | #define ENABLE_NLS 1 |
ba479fd2 | 12333 | _ACEOF |
56694dd9 | 12334 | |
093e61a6 | 12335 | |
ba479fd2 NN |
12336 | echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 |
12337 | echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 | |
56694dd9 | 12338 | # Look for .po and .gmo files in the source directory. |
ba479fd2 | 12339 | CATALOGS= |
56694dd9 ZW |
12340 | XLINGUAS= |
12341 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
12342 | # If there aren't any .gmo files the shell will give us the | |
12343 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
12344 | # weeded out. | |
12345 | case "$cat" in *\**) | |
12346 | continue;; | |
12347 | esac | |
12348 | # The quadruple backslash is collapsed to a double backslash | |
12349 | # by the backticks, then collapsed again by the double quotes, | |
12350 | # leaving us with one backslash in the sed expression (right | |
12351 | # before the dot that mustn't act as a wildcard). | |
12352 | cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"` | |
12353 | lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"` | |
12354 | # The user is allowed to set LINGUAS to a list of languages to | |
12355 | # install catalogs for. If it's empty that means "all of them." | |
12356 | if test "x$LINGUAS" = x; then | |
12357 | CATALOGS="$CATALOGS $cat" | |
12358 | XLINGUAS="$XLINGUAS $lang" | |
12359 | else | |
12360 | case "$LINGUAS" in *$lang*) | |
12361 | CATALOGS="$CATALOGS $cat" | |
12362 | XLINGUAS="$XLINGUAS $lang" | |
12363 | ;; | |
12364 | esac | |
12365 | fi | |
12366 | done | |
12367 | LINGUAS="$XLINGUAS" | |
ba479fd2 NN |
12368 | echo "$as_me:$LINENO: result: $LINGUAS" >&5 |
12369 | echo "${ECHO_T}$LINGUAS" >&6 | |
56694dd9 | 12370 | fi |
861bb6c1 | 12371 | |
56694dd9 ZW |
12372 | # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get |
12373 | # -liconv on the link line twice. | |
12374 | case "$LIBINTL" in *$LIBICONV*) | |
12375 | LIBICONV= ;; | |
12376 | esac | |
dc6746e7 | 12377 | |
7f970b70 AM |
12378 | # Check whether --enable-secureplt or --disable-secureplt was given. |
12379 | if test "${enable_secureplt+set}" = set; then | |
12380 | enableval="$enable_secureplt" | |
12381 | ||
12382 | fi; | |
12383 | ||
56694dd9 ZW |
12384 | # Windows32 Registry support for specifying GCC installation paths. |
12385 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
12386 | if test "${enable_win32_registry+set}" = set; then | |
12387 | enableval="$enable_win32_registry" | |
dc6746e7 | 12388 | |
ba479fd2 | 12389 | fi; |
ba479fd2 | 12390 | |
a1286ef5 ZW |
12391 | case $host_os in |
12392 | win32 | pe | cygwin* | mingw32* | uwin*) | |
12393 | if test "x$enable_win32_registry" != xno; then | |
12394 | echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5 | |
ba479fd2 NN |
12395 | echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6 |
12396 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then | |
12397 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12398 | else | |
12399 | ac_func_search_save_LIBS=$LIBS | |
12400 | ac_cv_search_RegOpenKeyExA=no | |
12401 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12402 | /* confdefs.h. */ |
12403 | _ACEOF | |
12404 | cat confdefs.h >>conftest.$ac_ext | |
12405 | cat >>conftest.$ac_ext <<_ACEOF | |
12406 | /* end confdefs.h. */ | |
861bb6c1 | 12407 | |
ab87f8c8 | 12408 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
12409 | #ifdef __cplusplus |
12410 | extern "C" | |
12411 | #endif | |
ab87f8c8 | 12412 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
12413 | builtin and then its argument prototype would still apply. */ |
12414 | char RegOpenKeyExA (); | |
12415 | int | |
12416 | main () | |
12417 | { | |
12418 | RegOpenKeyExA (); | |
12419 | ; | |
12420 | return 0; | |
12421 | } | |
12422 | _ACEOF | |
12423 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12424 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12425 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 12426 | ac_status=$? |
86da66b5 HPN |
12427 | grep -v '^ *+' conftest.er1 >conftest.err |
12428 | rm -f conftest.er1 | |
12429 | cat conftest.err >&5 | |
ba479fd2 NN |
12430 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12431 | (exit $ac_status); } && | |
dbad5e72 SE |
12432 | { ac_try='test -z "$ac_c_werror_flag" |
12433 | || test ! -s conftest.err' | |
86da66b5 HPN |
12434 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12435 | (eval $ac_try) 2>&5 | |
12436 | ac_status=$? | |
12437 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12438 | (exit $ac_status); }; } && | |
12439 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
12440 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12441 | (eval $ac_try) 2>&5 | |
12442 | ac_status=$? | |
12443 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12444 | (exit $ac_status); }; }; then | |
56694dd9 | 12445 | ac_cv_search_RegOpenKeyExA="none required" |
ab87f8c8 | 12446 | else |
ba479fd2 NN |
12447 | echo "$as_me: failed program was:" >&5 |
12448 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12449 | ||
861bb6c1 | 12450 | fi |
86da66b5 HPN |
12451 | rm -f conftest.err conftest.$ac_objext \ |
12452 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
12453 | if test "$ac_cv_search_RegOpenKeyExA" = no; then |
12454 | for ac_lib in advapi32; do | |
12455 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12456 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12457 | /* confdefs.h. */ |
12458 | _ACEOF | |
12459 | cat confdefs.h >>conftest.$ac_ext | |
12460 | cat >>conftest.$ac_ext <<_ACEOF | |
12461 | /* end confdefs.h. */ | |
12462 | ||
56694dd9 | 12463 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
12464 | #ifdef __cplusplus |
12465 | extern "C" | |
12466 | #endif | |
56694dd9 | 12467 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
12468 | builtin and then its argument prototype would still apply. */ |
12469 | char RegOpenKeyExA (); | |
12470 | int | |
12471 | main () | |
12472 | { | |
12473 | RegOpenKeyExA (); | |
12474 | ; | |
12475 | return 0; | |
12476 | } | |
12477 | _ACEOF | |
12478 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12479 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12480 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 12481 | ac_status=$? |
86da66b5 HPN |
12482 | grep -v '^ *+' conftest.er1 >conftest.err |
12483 | rm -f conftest.er1 | |
12484 | cat conftest.err >&5 | |
ba479fd2 NN |
12485 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12486 | (exit $ac_status); } && | |
dbad5e72 SE |
12487 | { ac_try='test -z "$ac_c_werror_flag" |
12488 | || test ! -s conftest.err' | |
86da66b5 HPN |
12489 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12490 | (eval $ac_try) 2>&5 | |
12491 | ac_status=$? | |
12492 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12493 | (exit $ac_status); }; } && | |
12494 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
12495 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12496 | (eval $ac_try) 2>&5 | |
12497 | ac_status=$? | |
12498 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12499 | (exit $ac_status); }; }; then | |
12500 | ac_cv_search_RegOpenKeyExA="-l$ac_lib" | |
56694dd9 | 12501 | break |
861bb6c1 | 12502 | else |
ba479fd2 NN |
12503 | echo "$as_me: failed program was:" >&5 |
12504 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12505 | ||
861bb6c1 | 12506 | fi |
86da66b5 HPN |
12507 | rm -f conftest.err conftest.$ac_objext \ |
12508 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 12509 | done |
6e3f3080 | 12510 | fi |
ba479fd2 NN |
12511 | LIBS=$ac_func_search_save_LIBS |
12512 | fi | |
12513 | echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5 | |
12514 | echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6 | |
12515 | if test "$ac_cv_search_RegOpenKeyExA" != no; then | |
63cf211a | 12516 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" |
ba479fd2 | 12517 | |
cafe096b | 12518 | else |
a1286ef5 | 12519 | enable_win32_registry=no |
093e61a6 | 12520 | fi |
ab87f8c8 | 12521 | |
a1286ef5 ZW |
12522 | fi |
12523 | ||
12524 | if test "x$enable_win32_registry" != xno; then | |
12525 | ||
12526 | cat >>confdefs.h <<\_ACEOF | |
12527 | #define ENABLE_WIN32_REGISTRY 1 | |
12528 | _ACEOF | |
ab87f8c8 | 12529 | |
a1286ef5 ZW |
12530 | |
12531 | if test "x$enable_win32_registry" != xyes \ | |
12532 | && test "x$enable_win32_registry" != x; then | |
ba479fd2 NN |
12533 | |
12534 | cat >>confdefs.h <<_ACEOF | |
a1286ef5 | 12535 | #define WIN32_REGISTRY_KEY "$enable_win32_registry" |
ba479fd2 | 12536 | _ACEOF |
cafe096b | 12537 | |
a1286ef5 ZW |
12538 | fi |
12539 | fi | |
12540 | ;; | |
56694dd9 | 12541 | esac |
ab87f8c8 | 12542 | |
56694dd9 ZW |
12543 | # Get an absolute path to the GCC top-level source directory |
12544 | holddir=`${PWDCMD-pwd}` | |
12545 | cd $srcdir | |
12546 | topdir=`${PWDCMD-pwd}` | |
12547 | cd $holddir | |
ab87f8c8 | 12548 | |
56694dd9 | 12549 | # Conditionalize the makefile for this host machine. |
2ed26f6b | 12550 | xmake_file= |
c406e779 | 12551 | for f in ${host_xmake_file} |
56694dd9 ZW |
12552 | do |
12553 | if test -f ${srcdir}/config/$f | |
12554 | then | |
2ed26f6b | 12555 | xmake_file="${xmake_file} \$(srcdir)/config/$f" |
56694dd9 ZW |
12556 | fi |
12557 | done | |
093e61a6 | 12558 | |
56694dd9 | 12559 | # Conditionalize the makefile for this target machine. |
2ed26f6b | 12560 | tmake_file_= |
c406e779 | 12561 | for f in ${tmake_file} |
56694dd9 ZW |
12562 | do |
12563 | if test -f ${srcdir}/config/$f | |
12564 | then | |
2ed26f6b | 12565 | tmake_file_="${tmake_file_} \$(srcdir)/config/$f" |
56694dd9 ZW |
12566 | fi |
12567 | done | |
2ed26f6b | 12568 | tmake_file="${tmake_file_}" |
71a94577 | 12569 | |
ab87f8c8 JL |
12570 | # If the host doesn't support symlinks, modify CC in |
12571 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
12572 | # Otherwise, we can use "CC=$(CC)". | |
12573 | rm -f symtest.tem | |
35f06ae4 PB |
12574 | case "$LN_S" in |
12575 | *-s*) | |
12576 | cc_set_by_configure="\$(CC)" | |
12577 | quoted_cc_set_by_configure="\$(CC)" | |
12578 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" | |
12579 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" | |
12580 | ;; | |
12581 | *) | |
12582 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
12583 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" | |
12584 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" | |
12585 | quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`" | |
12586 | ;; | |
12587 | esac | |
ab87f8c8 | 12588 | |
5395b47b NN |
12589 | # This is a terrible hack which will go away some day. |
12590 | host_cc_for_libada=${CC} | |
1e3fad21 NN |
12591 | |
12592 | ||
ab87f8c8 JL |
12593 | out_object_file=`basename $out_file .c`.o |
12594 | ||
75685792 RS |
12595 | tm_file_list="options.h" |
12596 | tm_include_list="options.h" | |
ab87f8c8 | 12597 | for f in $tm_file; do |
64ccbc99 | 12598 | case $f in |
d02af173 | 12599 | defaults.h ) |
e22340b0 ZW |
12600 | tm_file_list="${tm_file_list} \$(srcdir)/$f" |
12601 | tm_include_list="${tm_include_list} $f" | |
12602 | ;; | |
12603 | * ) | |
12604 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | |
12605 | tm_include_list="${tm_include_list} config/$f" | |
12606 | ;; | |
64ccbc99 | 12607 | esac |
ab87f8c8 JL |
12608 | done |
12609 | ||
11642c3a | 12610 | tm_p_file_list= |
e22340b0 | 12611 | tm_p_include_list= |
11642c3a | 12612 | for f in $tm_p_file; do |
4977bab6 ZW |
12613 | case $f in |
12614 | tm-preds.h ) | |
e22340b0 ZW |
12615 | tm_p_file_list="${tm_p_file_list} $f" |
12616 | tm_p_include_list="${tm_p_include_list} $f" | |
12617 | ;; | |
12618 | * ) | |
12619 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
12620 | tm_p_include_list="${tm_p_include_list} config/$f" | |
12621 | esac | |
12622 | done | |
12623 | ||
12624 | xm_file_list= | |
12625 | xm_include_list= | |
12626 | for f in $xm_file; do | |
12627 | case $f in | |
12628 | ansidecl.h ) | |
12629 | xm_file_list="${xm_file_list} \$(srcdir)/../include/$f" | |
12630 | xm_include_list="${xm_include_list} $f" | |
12631 | ;; | |
12632 | auto-host.h ) | |
12633 | xm_file_list="${xm_file_list} $f" | |
12634 | xm_include_list="${xm_include_list} $f" | |
12635 | ;; | |
12636 | * ) | |
12637 | xm_file_list="${xm_file_list} \$(srcdir)/config/$f" | |
12638 | xm_include_list="${xm_include_list} config/$f" | |
12639 | ;; | |
4977bab6 | 12640 | esac |
11642c3a ZW |
12641 | done |
12642 | ||
ab87f8c8 | 12643 | host_xm_file_list= |
e22340b0 | 12644 | host_xm_include_list= |
ab87f8c8 | 12645 | for f in $host_xm_file; do |
64ccbc99 | 12646 | case $f in |
d02af173 | 12647 | ansidecl.h ) |
e22340b0 ZW |
12648 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f" |
12649 | host_xm_include_list="${host_xm_include_list} $f" | |
12650 | ;; | |
e2500fed | 12651 | auto-host.h ) |
e22340b0 ZW |
12652 | host_xm_file_list="${host_xm_file_list} $f" |
12653 | host_xm_include_list="${host_xm_include_list} $f" | |
12654 | ;; | |
12655 | * ) | |
12656 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" | |
12657 | host_xm_include_list="${host_xm_include_list} config/$f" | |
12658 | ;; | |
64ccbc99 | 12659 | esac |
ab87f8c8 JL |
12660 | done |
12661 | ||
12662 | build_xm_file_list= | |
12663 | for f in $build_xm_file; do | |
64ccbc99 | 12664 | case $f in |
d02af173 | 12665 | ansidecl.h ) |
e22340b0 ZW |
12666 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f" |
12667 | build_xm_include_list="${build_xm_include_list} $f" | |
12668 | ;; | |
e2500fed | 12669 | auto-build.h | auto-host.h ) |
e22340b0 ZW |
12670 | build_xm_file_list="${build_xm_file_list} $f" |
12671 | build_xm_include_list="${build_xm_include_list} $f" | |
12672 | ;; | |
12673 | * ) | |
12674 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" | |
12675 | build_xm_include_list="${build_xm_include_list} config/$f" | |
12676 | ;; | |
64ccbc99 | 12677 | esac |
ab87f8c8 JL |
12678 | done |
12679 | ||
a078a589 ZW |
12680 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
12681 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
ba479fd2 NN |
12682 | CROSS= |
12683 | ALL=all.internal | |
12684 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
b28250ab MM |
12685 | |
12686 | if test "x$with_build_sysroot" != x; then | |
12687 | build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)' | |
12688 | else | |
12689 | # This value is used, even on a native system, because | |
12690 | # CROSS_SYSTEM_HEADER_DIR is just | |
12691 | # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR). | |
12692 | build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)' | |
12693 | fi | |
12694 | ||
ab87f8c8 JL |
12695 | if test x$host != x$target |
12696 | then | |
a078a589 ZW |
12697 | CROSS="-DCROSS_COMPILE" |
12698 | ALL=all.cross | |
160633c6 | 12699 | SYSTEM_HEADER_DIR=$build_system_header_dir |
343f59d9 | 12700 | case "$host","$target" in |
3a7e8b87 GK |
12701 | # Darwin crosses can use the host system's libraries and headers, |
12702 | # because of the fat library support. Of course, it must be the | |
12703 | # same version of Darwin on both sides. Allow the user to | |
12704 | # just say --target=foo-darwin without a version number to mean | |
12705 | # "the version on this system". | |
12706 | *-*-darwin*,*-*-darwin*) | |
12707 | hostos=`echo $host | sed 's/.*-darwin/darwin/'` | |
12708 | targetos=`echo $target | sed 's/.*-darwin/darwin/'` | |
12709 | if test $hostos = $targetos -o $targetos = darwin ; then | |
12710 | CROSS= | |
12711 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
12712 | with_headers=yes | |
12713 | fi | |
12714 | ;; | |
12715 | ||
343f59d9 AM |
12716 | i?86-*-*,x86_64-*-* \ |
12717 | | powerpc*-*-*,powerpc64*-*-*) | |
12718 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
12719 | esac | |
7a615b25 | 12720 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
b28250ab | 12721 | SYSTEM_HEADER_DIR=$build_system_header_dir |
ab87f8c8 JL |
12722 | fi |
12723 | ||
b39d221a EC |
12724 | # If this is a cross-compiler that does not |
12725 | # have its own set of headers then define | |
12726 | # inhibit_libc | |
12727 | ||
dc06db20 R |
12728 | # If this is using newlib, without having the headers available now, |
12729 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
12730 | # This prevents libgcc2 from containing any code which requires libc |
12731 | # support. | |
160633c6 | 12732 | inhibit_libc=false |
dc06db20 R |
12733 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
12734 | test x$with_newlib = xyes ; } && | |
e50084fa | 12735 | { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then |
160633c6 | 12736 | inhibit_libc=true |
b39d221a EC |
12737 | fi |
12738 | ||
12739 | ||
a078a589 ZW |
12740 | # When building gcc with a cross-compiler, we need to adjust things so |
12741 | # that the generator programs are still built with the native compiler. | |
12742 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
12743 | |
12744 | # These are the normal (build=host) settings: | |
ba479fd2 NN |
12745 | CC_FOR_BUILD='$(CC)' |
12746 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
ba479fd2 | 12747 | STMP_FIXINC=stmp-fixinc |
8ad9fb33 AP |
12748 | |
12749 | # Possibly disable fixproto, on a per-target basis. | |
12750 | case ${use_fixproto} in | |
12751 | no) | |
12752 | STMP_FIXPROTO= | |
12753 | ;; | |
12754 | yes) | |
12755 | STMP_FIXPROTO=stmp-fixproto | |
12756 | ;; | |
12757 | esac | |
12758 | ||
a078a589 | 12759 | |
83599948 NS |
12760 | # And these apply if build != host, or we are generating coverage data |
12761 | if test x$build != x$host || test "x$coverage_flags" != x | |
ab87f8c8 | 12762 | then |
b11e4747 | 12763 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' |
a078a589 | 12764 | |
7a615b25 | 12765 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
d8e5117d | 12766 | if test "x$STMP_FIXPROTO" != x; then |
de253ca4 GK |
12767 | STMP_FIXPROTO=stmp-install-fixproto |
12768 | fi | |
7a615b25 | 12769 | fi |
ab87f8c8 JL |
12770 | fi |
12771 | ||
12772 | # Expand extra_headers to include complete path. | |
12773 | # This substitutes for lots of t-* files. | |
12774 | extra_headers_list= | |
b1ef58c8 NN |
12775 | # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers. |
12776 | for file in ${extra_headers} ; do | |
12777 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" | |
12778 | done | |
ab87f8c8 | 12779 | |
c38f02df ILT |
12780 | # Define collect2 in Makefile. |
12781 | case $host_can_use_collect2 in | |
12782 | no) collect2= ;; | |
12783 | *) collect2='collect2$(exeext)' ;; | |
12784 | esac | |
12785 | ||
12786 | ||
ab87f8c8 | 12787 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
12788 | case $use_collect2 in |
12789 | no) use_collect2= ;; | |
12790 | "") ;; | |
ba479fd2 | 12791 | *) |
34a86c2b NN |
12792 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
12793 | xm_defines="${xm_defines} USE_COLLECT2" | |
c38f02df ILT |
12794 | case $host_can_use_collect2 in |
12795 | no) | |
12796 | { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5 | |
12797 | echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;} | |
12798 | { (exit 1); exit 1; }; } | |
12799 | ;; | |
12800 | esac | |
34a86c2b NN |
12801 | ;; |
12802 | esac | |
ab87f8c8 | 12803 | |
8bb915b6 NN |
12804 | # --------------------------- |
12805 | # Assembler & linker features | |
12806 | # --------------------------- | |
12807 | ||
d869a8c4 NN |
12808 | # Identify the assembler which will work hand-in-glove with the newly |
12809 | # built GCC, so that we can examine its features. This is the assembler | |
12810 | # which will be driven by the driver program. | |
12811 | # | |
12812 | # If build != host, and we aren't building gas in-tree, we identify a | |
12813 | # build->target assembler and hope that it will have the same features | |
12814 | # as the host->target assembler we'll be using. | |
34a86c2b | 12815 | in_tree_gas=no |
ab87f8c8 | 12816 | gcc_cv_as= |
981d4858 JM |
12817 | gcc_cv_gas_major_version= |
12818 | gcc_cv_gas_minor_version= | |
ab87f8c8 JL |
12819 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
12820 | if test -x "$DEFAULT_ASSEMBLER"; then | |
12821 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
34a86c2b | 12822 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
08d105fa AO |
12823 | && test -f ../gas/Makefile \ |
12824 | && test x$build = x$host; then | |
12825 | # Single tree build which includes gas. We want to prefer it | |
12826 | # over whatever linker top-level may have detected, since | |
12827 | # we'll use what we're building after installation anyway. | |
ad9c4d9f NN |
12828 | in_tree_gas=yes |
12829 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
12830 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
12831 | $gcc_cv_as_gas_srcdir/configure \ | |
12832 | $gcc_cv_as_gas_srcdir/configure.in \ | |
12833 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
58ea87a9 | 12834 | gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` |
ad9c4d9f NN |
12835 | if test x$gcc_cv_gas_version != x; then |
12836 | break | |
12837 | fi | |
12838 | done | |
12839 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
12840 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
12841 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
5aaaf0e8 NN |
12842 | case $gcc_cv_gas_patch_version in |
12843 | "") gcc_cv_gas_patch_version="0" ;; | |
12844 | esac | |
8ada417f ZW |
12845 | gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ |
12846 | + $gcc_cv_gas_minor_version \) \* 1000 \ | |
12847 | + $gcc_cv_gas_patch_version` | |
ad9c4d9f | 12848 | |
9f18db39 | 12849 | gcc_cv_as=../gas/as-new$build_exeext |
5408ac6c HPN |
12850 | in_tree_gas_is_elf=no |
12851 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
12852 | || (grep 'obj_format = multi' ../gas/Makefile \ | |
12853 | && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null | |
12854 | then | |
12855 | in_tree_gas_is_elf=yes | |
12856 | fi | |
9f18db39 PB |
12857 | elif test -x as$build_exeext; then |
12858 | # Build using assembler in the current directory. | |
12859 | gcc_cv_as=./as$build_exeext | |
981d4858 | 12860 | fi |
9e423e6d | 12861 | |
a1286ef5 | 12862 | |
9f18db39 PB |
12863 | # When searching for the assembler or linker, search the same directories |
12864 | # that the installed compiler will search. Else we may find the wrong | |
12865 | # assembler or linker and lose. If we do not find a suitable binary, | |
12866 | # then try the user's path. | |
12867 | # | |
12868 | # Also note we have to check MD_EXEC_PREFIX before checking the user's path. | |
12869 | if test "x$exec_prefix" = xNONE; then | |
12870 | if test "x$prefix" = xNONE; then | |
12871 | gcc_cv_tool_prefix=/usr/local | |
779243f7 | 12872 | else |
9f18db39 | 12873 | gcc_cv_tool_prefix=$prefix |
779243f7 | 12874 | fi |
9f18db39 PB |
12875 | else |
12876 | gcc_cv_tool_prefix=$exec_prefix | |
12877 | fi | |
12878 | ||
12879 | if test x$host = x$build; then | |
12880 | gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version" | |
12881 | gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical" | |
12882 | gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical/$gcc_version" | |
12883 | gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical" | |
12884 | gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version" | |
12885 | gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin" | |
12886 | else | |
12887 | gcc_cv_tool_dirs= | |
12888 | fi | |
12889 | ||
12890 | if test x$build = x$target; then | |
12891 | # Rummage through tm_files looking for MD_EXEC_PREFIX | |
12892 | md_dirs= | |
12893 | for f in ${tm_file_list}; do | |
12894 | if test -f $f; then | |
12895 | if grep '^#[ ]*undef[ ]*MD_EXEC_PREFIX' $f > /dev/null; then | |
12896 | md_dirs= | |
12897 | fi | |
12898 | md_dirs="$md_dirs "`sed -n -e 's@^#[ ]*define[ ]*MD_EXEC_PREFIX[ ]*"\(.*\)/"@\1@p' < $f` | |
12899 | fi | |
12900 | done | |
12901 | for f in ${md_dirs}; do | |
12902 | gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$f" | |
12903 | done | |
12904 | fi | |
12905 | ||
12906 | ||
12907 | ||
12908 | ||
12909 | exec 6>/dev/null | |
d739199a DJ |
12910 | |
12911 | # First try the environment variables. Handle full paths or basenames. | |
12912 | if test "x$gcc_cv_as" = x && test -n "$AS_FOR_TARGET"; then | |
12913 | # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args. | |
12914 | set dummy $AS_FOR_TARGET; ac_word=$2 | |
12915 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
12916 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
12917 | if test "${ac_cv_path_gcc_cv_as+set}" = set; then | |
12918 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12919 | else | |
12920 | case $gcc_cv_as in | |
12921 | [\\/]* | ?:[\\/]*) | |
12922 | ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. | |
12923 | ;; | |
12924 | *) | |
12925 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12926 | for as_dir in $PATH | |
12927 | do | |
12928 | IFS=$as_save_IFS | |
12929 | test -z "$as_dir" && as_dir=. | |
12930 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12931 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
12932 | ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" | |
12933 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12934 | break 2 | |
12935 | fi | |
12936 | done | |
12937 | done | |
12938 | ||
12939 | ;; | |
12940 | esac | |
12941 | fi | |
12942 | gcc_cv_as=$ac_cv_path_gcc_cv_as | |
12943 | ||
12944 | if test -n "$gcc_cv_as"; then | |
12945 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 | |
12946 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
12947 | else | |
12948 | echo "$as_me:$LINENO: result: no" >&5 | |
12949 | echo "${ECHO_T}no" >&6 | |
12950 | fi | |
12951 | ||
12952 | fi | |
12953 | if test "x$gcc_cv_as" = x && test -n "$AS" && test x$host = x$target; then | |
12954 | # Extract the first word of "$AS", so it can be a program name with args. | |
12955 | set dummy $AS; ac_word=$2 | |
12956 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
12957 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
12958 | if test "${ac_cv_path_gcc_cv_as+set}" = set; then | |
12959 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12960 | else | |
12961 | case $gcc_cv_as in | |
12962 | [\\/]* | ?:[\\/]*) | |
12963 | ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. | |
12964 | ;; | |
12965 | *) | |
12966 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12967 | for as_dir in $PATH | |
12968 | do | |
12969 | IFS=$as_save_IFS | |
12970 | test -z "$as_dir" && as_dir=. | |
12971 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12972 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
12973 | ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" | |
12974 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12975 | break 2 | |
12976 | fi | |
12977 | done | |
12978 | done | |
12979 | ||
12980 | ;; | |
12981 | esac | |
12982 | fi | |
12983 | gcc_cv_as=$ac_cv_path_gcc_cv_as | |
12984 | ||
12985 | if test -n "$gcc_cv_as"; then | |
12986 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 | |
12987 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
12988 | else | |
12989 | echo "$as_me:$LINENO: result: no" >&5 | |
12990 | echo "${ECHO_T}no" >&6 | |
12991 | fi | |
12992 | ||
12993 | fi | |
12994 | ||
a2eafc76 | 12995 | if test "x$gcc_cv_as" = x; then |
c42adccb PB |
12996 | # The AC_PATH_PROGS macro doesn't work properly when its 4th argument |
12997 | # is empty. | |
12998 | if test "x$gcc_cv_tool_dirs" = x; then | |
12999 | gcc_cv_as= | |
13000 | else | |
13001 | for ac_prog in as | |
9f18db39 PB |
13002 | do |
13003 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
13004 | set dummy $ac_prog; ac_word=$2 | |
13005 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13006 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13007 | if test "${ac_cv_path_gcc_cv_as+set}" = set; then | |
13008 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13009 | else | |
13010 | case $gcc_cv_as in | |
13011 | [\\/]* | ?:[\\/]*) | |
13012 | ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. | |
13013 | ;; | |
13014 | *) | |
13015 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13016 | for as_dir in $gcc_cv_tool_dirs | |
13017 | do | |
13018 | IFS=$as_save_IFS | |
13019 | test -z "$as_dir" && as_dir=. | |
13020 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13021 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13022 | ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" | |
13023 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13024 | break 2 | |
13025 | fi | |
13026 | done | |
13027 | done | |
779243f7 | 13028 | |
9f18db39 PB |
13029 | ;; |
13030 | esac | |
13031 | fi | |
13032 | gcc_cv_as=$ac_cv_path_gcc_cv_as | |
13033 | ||
13034 | if test -n "$gcc_cv_as"; then | |
13035 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 | |
13036 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
13037 | else | |
13038 | echo "$as_me:$LINENO: result: no" >&5 | |
13039 | echo "${ECHO_T}no" >&6 | |
13040 | fi | |
13041 | ||
13042 | test -n "$gcc_cv_as" && break | |
13043 | done | |
13044 | ||
c42adccb | 13045 | fi |
a2eafc76 | 13046 | fi |
9f18db39 PB |
13047 | if test "x$gcc_cv_as" = x; then |
13048 | # If the loop above did not find a tool, then use whatever | |
b095fe2c | 13049 | # one we can find in the users's path. We are looking for a |
9f18db39 | 13050 | # ${build} -> ${target} tool. |
55a2ea2a | 13051 | if test "x$program_prefix" != xNONE; then |
9f18db39 | 13052 | default_tool_name=${program_prefix}as |
b095fe2c | 13053 | elif test x$build != x$host && test x$build != x$target; then |
9f18db39 | 13054 | default_tool_name=${target_noncanonical}-as |
55a2ea2a | 13055 | else |
9f18db39 | 13056 | default_tool_name=`echo as | sed "${program_transform_name}"` |
55a2ea2a | 13057 | fi |
9f18db39 PB |
13058 | for ac_prog in $default_tool_name |
13059 | do | |
13060 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
13061 | set dummy $ac_prog; ac_word=$2 | |
13062 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13063 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13064 | if test "${ac_cv_path_gcc_cv_as+set}" = set; then | |
13065 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13066 | else | |
13067 | case $gcc_cv_as in | |
13068 | [\\/]* | ?:[\\/]*) | |
13069 | ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. | |
13070 | ;; | |
13071 | *) | |
13072 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13073 | for as_dir in $PATH | |
13074 | do | |
13075 | IFS=$as_save_IFS | |
13076 | test -z "$as_dir" && as_dir=. | |
13077 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13078 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13079 | ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" | |
13080 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13081 | break 2 | |
13082 | fi | |
13083 | done | |
13084 | done | |
55a2ea2a | 13085 | |
9f18db39 PB |
13086 | ;; |
13087 | esac | |
13088 | fi | |
13089 | gcc_cv_as=$ac_cv_path_gcc_cv_as | |
55a2ea2a | 13090 | |
9f18db39 PB |
13091 | if test -n "$gcc_cv_as"; then |
13092 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 | |
13093 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
13094 | else | |
13095 | echo "$as_me:$LINENO: result: no" >&5 | |
13096 | echo "${ECHO_T}no" >&6 | |
13097 | fi | |
13098 | ||
13099 | test -n "$gcc_cv_as" && break | |
13100 | done | |
45499411 | 13101 | test -n "$gcc_cv_as" || gcc_cv_as="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext" |
779243f7 | 13102 | |
9e423e6d | 13103 | fi |
9f18db39 PB |
13104 | test "$silent" != yes && exec 6>&1 |
13105 | ||
13106 | ORIGINAL_AS_FOR_TARGET="$gcc_cv_as" | |
13107 | ||
13108 | echo "$as_me:$LINENO: checking what assembler to use" >&5 | |
13109 | echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 | |
34a86c2b NN |
13110 | case $in_tree_gas in |
13111 | yes) | |
ba479fd2 NN |
13112 | echo "$as_me:$LINENO: result: \"newly built gas\"" >&5 |
13113 | echo "${ECHO_T}\"newly built gas\"" >&6 | |
34a86c2b NN |
13114 | ;; |
13115 | no) | |
ba479fd2 NN |
13116 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 |
13117 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
34a86c2b NN |
13118 | ;; |
13119 | esac | |
981d4858 | 13120 | |
d869a8c4 NN |
13121 | # Identify the linker which will work hand-in-glove with the newly |
13122 | # built GCC, so that we can examine its features. This is the linker | |
13123 | # which will be driven by the driver program. | |
13124 | # | |
13125 | # If build != host, and we aren't building gas in-tree, we identify a | |
13126 | # build->target linker and hope that it will have the same features | |
13127 | # as the host->target linker we'll be using. | |
34a86c2b | 13128 | in_tree_ld=no |
275b60d6 JJ |
13129 | gcc_cv_ld= |
13130 | gcc_cv_gld_major_version= | |
13131 | gcc_cv_gld_minor_version= | |
13132 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
13133 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
13134 | if test -x "$DEFAULT_LINKER"; then | |
13135 | gcc_cv_ld="$DEFAULT_LINKER" | |
34a86c2b | 13136 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ |
08d105fa AO |
13137 | && test -f ../ld/Makefile \ |
13138 | && test x$build = x$host; then | |
13139 | # Single tree build which includes ld. We want to prefer it | |
13140 | # over whatever linker top-level may have detected, since | |
13141 | # we'll use what we're building after installation anyway. | |
34a86c2b | 13142 | in_tree_ld=yes |
5408ac6c HPN |
13143 | in_tree_ld_is_elf=no |
13144 | if (grep 'EMUL = .*elf' ../ld/Makefile \ | |
8a45d680 AN |
13145 | || grep 'EMUL = .*linux' ../ld/Makefile \ |
13146 | || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then | |
5408ac6c HPN |
13147 | in_tree_ld_is_elf=yes |
13148 | fi | |
275b60d6 JJ |
13149 | 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 |
13150 | do | |
58ea87a9 | 13151 | gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` |
275b60d6 JJ |
13152 | if test x$gcc_cv_gld_version != x; then |
13153 | break | |
13154 | fi | |
13155 | done | |
13156 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
13157 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
9f18db39 PB |
13158 | gcc_cv_ld=../ld/ld-new$build_exeext |
13159 | elif test -x collect-ld$build_exeext; then | |
13160 | # Build using linker in the current directory. | |
13161 | gcc_cv_ld=./collect-ld$build_exeext | |
275b60d6 JJ |
13162 | fi |
13163 | ||
275b60d6 | 13164 | |
9f18db39 PB |
13165 | |
13166 | ||
13167 | ||
13168 | exec 6>/dev/null | |
d739199a DJ |
13169 | |
13170 | # First try the environment variables. Handle full paths or basenames. | |
13171 | if test "x$gcc_cv_ld" = x && test -n "$LD_FOR_TARGET"; then | |
13172 | # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args. | |
13173 | set dummy $LD_FOR_TARGET; ac_word=$2 | |
13174 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13175 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13176 | if test "${ac_cv_path_gcc_cv_ld+set}" = set; then | |
13177 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13178 | else | |
13179 | case $gcc_cv_ld in | |
13180 | [\\/]* | ?:[\\/]*) | |
13181 | ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. | |
13182 | ;; | |
13183 | *) | |
13184 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13185 | for as_dir in $PATH | |
13186 | do | |
13187 | IFS=$as_save_IFS | |
13188 | test -z "$as_dir" && as_dir=. | |
13189 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13190 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13191 | ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" | |
13192 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13193 | break 2 | |
13194 | fi | |
13195 | done | |
13196 | done | |
13197 | ||
13198 | ;; | |
13199 | esac | |
13200 | fi | |
13201 | gcc_cv_ld=$ac_cv_path_gcc_cv_ld | |
13202 | ||
13203 | if test -n "$gcc_cv_ld"; then | |
13204 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 | |
13205 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
13206 | else | |
13207 | echo "$as_me:$LINENO: result: no" >&5 | |
13208 | echo "${ECHO_T}no" >&6 | |
13209 | fi | |
13210 | ||
13211 | fi | |
13212 | if test "x$gcc_cv_ld" = x && test -n "$LD" && test x$host = x$target; then | |
13213 | # Extract the first word of "$LD", so it can be a program name with args. | |
13214 | set dummy $LD; ac_word=$2 | |
13215 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13216 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13217 | if test "${ac_cv_path_gcc_cv_ld+set}" = set; then | |
13218 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13219 | else | |
13220 | case $gcc_cv_ld in | |
13221 | [\\/]* | ?:[\\/]*) | |
13222 | ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. | |
13223 | ;; | |
13224 | *) | |
13225 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13226 | for as_dir in $PATH | |
13227 | do | |
13228 | IFS=$as_save_IFS | |
13229 | test -z "$as_dir" && as_dir=. | |
13230 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13231 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13232 | ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" | |
13233 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13234 | break 2 | |
13235 | fi | |
13236 | done | |
13237 | done | |
13238 | ||
13239 | ;; | |
13240 | esac | |
13241 | fi | |
13242 | gcc_cv_ld=$ac_cv_path_gcc_cv_ld | |
13243 | ||
13244 | if test -n "$gcc_cv_ld"; then | |
13245 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 | |
13246 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
13247 | else | |
13248 | echo "$as_me:$LINENO: result: no" >&5 | |
13249 | echo "${ECHO_T}no" >&6 | |
13250 | fi | |
13251 | ||
13252 | fi | |
13253 | ||
a2eafc76 | 13254 | if test "x$gcc_cv_ld" = x; then |
c42adccb PB |
13255 | # The AC_PATH_PROGS macro doesn't work properly when its 4th argument |
13256 | # is empty. | |
13257 | if test "x$gcc_cv_tool_dirs" = x; then | |
13258 | gcc_cv_ld= | |
13259 | else | |
13260 | for ac_prog in ld | |
9f18db39 PB |
13261 | do |
13262 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
13263 | set dummy $ac_prog; ac_word=$2 | |
13264 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13265 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13266 | if test "${ac_cv_path_gcc_cv_ld+set}" = set; then | |
13267 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13268 | else | |
13269 | case $gcc_cv_ld in | |
13270 | [\\/]* | ?:[\\/]*) | |
13271 | ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. | |
13272 | ;; | |
13273 | *) | |
13274 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13275 | for as_dir in $gcc_cv_tool_dirs | |
13276 | do | |
13277 | IFS=$as_save_IFS | |
13278 | test -z "$as_dir" && as_dir=. | |
13279 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13280 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13281 | ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" | |
13282 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13283 | break 2 | |
13284 | fi | |
13285 | done | |
13286 | done | |
13287 | ||
13288 | ;; | |
13289 | esac | |
13290 | fi | |
13291 | gcc_cv_ld=$ac_cv_path_gcc_cv_ld | |
13292 | ||
13293 | if test -n "$gcc_cv_ld"; then | |
13294 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 | |
13295 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
13296 | else | |
13297 | echo "$as_me:$LINENO: result: no" >&5 | |
13298 | echo "${ECHO_T}no" >&6 | |
13299 | fi | |
13300 | ||
13301 | test -n "$gcc_cv_ld" && break | |
13302 | done | |
13303 | ||
c42adccb | 13304 | fi |
a2eafc76 | 13305 | fi |
9f18db39 PB |
13306 | if test "x$gcc_cv_ld" = x; then |
13307 | # If the loop above did not find a tool, then use whatever | |
b095fe2c | 13308 | # one we can find in the users's path. We are looking for a |
9f18db39 | 13309 | # ${build} -> ${target} tool. |
55a2ea2a | 13310 | if test "x$program_prefix" != xNONE; then |
9f18db39 | 13311 | default_tool_name=${program_prefix}ld |
b095fe2c | 13312 | elif test x$build != x$host && test x$build != x$target; then |
9f18db39 | 13313 | default_tool_name=${target_noncanonical}-ld |
55a2ea2a | 13314 | else |
9f18db39 | 13315 | default_tool_name=`echo ld | sed "${program_transform_name}"` |
55a2ea2a | 13316 | fi |
9f18db39 PB |
13317 | for ac_prog in $default_tool_name |
13318 | do | |
13319 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
13320 | set dummy $ac_prog; ac_word=$2 | |
13321 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13322 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13323 | if test "${ac_cv_path_gcc_cv_ld+set}" = set; then | |
13324 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13325 | else | |
13326 | case $gcc_cv_ld in | |
13327 | [\\/]* | ?:[\\/]*) | |
13328 | ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. | |
13329 | ;; | |
13330 | *) | |
13331 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13332 | for as_dir in $PATH | |
13333 | do | |
13334 | IFS=$as_save_IFS | |
13335 | test -z "$as_dir" && as_dir=. | |
13336 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13337 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13338 | ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" | |
13339 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13340 | break 2 | |
13341 | fi | |
13342 | done | |
13343 | done | |
55a2ea2a | 13344 | |
9f18db39 PB |
13345 | ;; |
13346 | esac | |
13347 | fi | |
13348 | gcc_cv_ld=$ac_cv_path_gcc_cv_ld | |
55a2ea2a | 13349 | |
9f18db39 PB |
13350 | if test -n "$gcc_cv_ld"; then |
13351 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 | |
13352 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
13353 | else | |
13354 | echo "$as_me:$LINENO: result: no" >&5 | |
13355 | echo "${ECHO_T}no" >&6 | |
13356 | fi | |
13357 | ||
13358 | test -n "$gcc_cv_ld" && break | |
13359 | done | |
45499411 | 13360 | test -n "$gcc_cv_ld" || gcc_cv_ld="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext" |
275b60d6 | 13361 | |
275b60d6 | 13362 | fi |
9f18db39 PB |
13363 | test "$silent" != yes && exec 6>&1 |
13364 | ||
13365 | ORIGINAL_LD_FOR_TARGET="$gcc_cv_ld" | |
13366 | ||
13367 | echo "$as_me:$LINENO: checking what linker to use" >&5 | |
13368 | echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 | |
34a86c2b NN |
13369 | case $in_tree_ld in |
13370 | yes) | |
ba479fd2 NN |
13371 | echo "$as_me:$LINENO: result: \"newly built ld\"" >&5 |
13372 | echo "${ECHO_T}\"newly built ld\"" >&6 | |
34a86c2b NN |
13373 | ;; |
13374 | no) | |
ba479fd2 NN |
13375 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 |
13376 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
34a86c2b NN |
13377 | ;; |
13378 | esac | |
275b60d6 | 13379 | |
981d4858 | 13380 | # Figure out what nm we will be using. |
f9c1196a | 13381 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils |
f9c1196a | 13382 | in_tree_nm=no |
9f18db39 PB |
13383 | gcc_cv_nm= |
13384 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
f9c1196a ZW |
13385 | && test -f ../binutils/Makefile; then |
13386 | # Single tree build which includes binutils. | |
13387 | in_tree_nm=yes | |
9f18db39 PB |
13388 | gcc_cv_nm=../binutils/nm-new$build_exeext |
13389 | elif test -x nm$build_exeext; then | |
57991eba | 13390 | gcc_cv_nm=./nm$build_exeext |
9f18db39 PB |
13391 | fi |
13392 | ||
13393 | ||
13394 | ||
13395 | ||
13396 | ||
13397 | exec 6>/dev/null | |
d739199a DJ |
13398 | |
13399 | # First try the environment variables. Handle full paths or basenames. | |
13400 | if test "x$gcc_cv_nm" = x && test -n "$NM_FOR_TARGET"; then | |
13401 | # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args. | |
13402 | set dummy $NM_FOR_TARGET; ac_word=$2 | |
13403 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13404 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13405 | if test "${ac_cv_path_gcc_cv_nm+set}" = set; then | |
13406 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13407 | else | |
13408 | case $gcc_cv_nm in | |
13409 | [\\/]* | ?:[\\/]*) | |
13410 | ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. | |
13411 | ;; | |
13412 | *) | |
13413 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13414 | for as_dir in $PATH | |
13415 | do | |
13416 | IFS=$as_save_IFS | |
13417 | test -z "$as_dir" && as_dir=. | |
13418 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13419 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13420 | ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" | |
13421 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13422 | break 2 | |
13423 | fi | |
13424 | done | |
13425 | done | |
13426 | ||
13427 | ;; | |
13428 | esac | |
13429 | fi | |
13430 | gcc_cv_nm=$ac_cv_path_gcc_cv_nm | |
13431 | ||
13432 | if test -n "$gcc_cv_nm"; then | |
13433 | echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13434 | echo "${ECHO_T}$gcc_cv_nm" >&6 | |
13435 | else | |
13436 | echo "$as_me:$LINENO: result: no" >&5 | |
13437 | echo "${ECHO_T}no" >&6 | |
13438 | fi | |
13439 | ||
13440 | fi | |
13441 | if test "x$gcc_cv_nm" = x && test -n "$NM" && test x$host = x$target; then | |
13442 | # Extract the first word of "$NM", so it can be a program name with args. | |
13443 | set dummy $NM; ac_word=$2 | |
13444 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13445 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13446 | if test "${ac_cv_path_gcc_cv_nm+set}" = set; then | |
13447 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13448 | else | |
13449 | case $gcc_cv_nm in | |
13450 | [\\/]* | ?:[\\/]*) | |
13451 | ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. | |
13452 | ;; | |
13453 | *) | |
13454 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13455 | for as_dir in $PATH | |
13456 | do | |
13457 | IFS=$as_save_IFS | |
13458 | test -z "$as_dir" && as_dir=. | |
13459 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13460 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13461 | ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" | |
13462 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13463 | break 2 | |
13464 | fi | |
13465 | done | |
13466 | done | |
13467 | ||
13468 | ;; | |
13469 | esac | |
13470 | fi | |
13471 | gcc_cv_nm=$ac_cv_path_gcc_cv_nm | |
13472 | ||
13473 | if test -n "$gcc_cv_nm"; then | |
13474 | echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13475 | echo "${ECHO_T}$gcc_cv_nm" >&6 | |
13476 | else | |
13477 | echo "$as_me:$LINENO: result: no" >&5 | |
13478 | echo "${ECHO_T}no" >&6 | |
13479 | fi | |
13480 | ||
13481 | fi | |
13482 | ||
a2eafc76 | 13483 | if test "x$gcc_cv_nm" = x; then |
c42adccb PB |
13484 | # The AC_PATH_PROGS macro doesn't work properly when its 4th argument |
13485 | # is empty. | |
13486 | if test "x$gcc_cv_tool_dirs" = x; then | |
13487 | gcc_cv_nm= | |
13488 | else | |
13489 | for ac_prog in nm | |
9f18db39 PB |
13490 | do |
13491 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
13492 | set dummy $ac_prog; ac_word=$2 | |
13493 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13494 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13495 | if test "${ac_cv_path_gcc_cv_nm+set}" = set; then | |
13496 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
534d0cc0 | 13497 | else |
9f18db39 PB |
13498 | case $gcc_cv_nm in |
13499 | [\\/]* | ?:[\\/]*) | |
13500 | ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. | |
13501 | ;; | |
13502 | *) | |
13503 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13504 | for as_dir in $gcc_cv_tool_dirs | |
13505 | do | |
13506 | IFS=$as_save_IFS | |
13507 | test -z "$as_dir" && as_dir=. | |
13508 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13509 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13510 | ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" | |
13511 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13512 | break 2 | |
13513 | fi | |
13514 | done | |
13515 | done | |
13516 | ||
13517 | ;; | |
13518 | esac | |
981d4858 | 13519 | fi |
9f18db39 PB |
13520 | gcc_cv_nm=$ac_cv_path_gcc_cv_nm |
13521 | ||
13522 | if test -n "$gcc_cv_nm"; then | |
13523 | echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13524 | echo "${ECHO_T}$gcc_cv_nm" >&6 | |
13525 | else | |
13526 | echo "$as_me:$LINENO: result: no" >&5 | |
13527 | echo "${ECHO_T}no" >&6 | |
13528 | fi | |
13529 | ||
13530 | test -n "$gcc_cv_nm" && break | |
13531 | done | |
13532 | ||
c42adccb | 13533 | fi |
a2eafc76 | 13534 | fi |
9f18db39 PB |
13535 | if test "x$gcc_cv_nm" = x; then |
13536 | # If the loop above did not find a tool, then use whatever | |
13537 | # one we can find in the users's path. We are looking for a | |
13538 | # ${build} -> ${target} tool. | |
13539 | if test "x$program_prefix" != xNONE; then | |
13540 | default_tool_name=${program_prefix}nm | |
13541 | elif test x$build != x$host && test x$build != x$target; then | |
13542 | default_tool_name=${target_noncanonical}-nm | |
13543 | else | |
13544 | default_tool_name=`echo nm | sed "${program_transform_name}"` | |
13545 | fi | |
13546 | for ac_prog in $default_tool_name | |
13547 | do | |
13548 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
13549 | set dummy $ac_prog; ac_word=$2 | |
13550 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13551 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13552 | if test "${ac_cv_path_gcc_cv_nm+set}" = set; then | |
13553 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13554 | else | |
13555 | case $gcc_cv_nm in | |
13556 | [\\/]* | ?:[\\/]*) | |
13557 | ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. | |
13558 | ;; | |
13559 | *) | |
13560 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13561 | for as_dir in $PATH | |
13562 | do | |
13563 | IFS=$as_save_IFS | |
13564 | test -z "$as_dir" && as_dir=. | |
13565 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13566 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13567 | ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" | |
13568 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13569 | break 2 | |
13570 | fi | |
13571 | done | |
13572 | done | |
13573 | ||
13574 | ;; | |
13575 | esac | |
13576 | fi | |
13577 | gcc_cv_nm=$ac_cv_path_gcc_cv_nm | |
13578 | ||
13579 | if test -n "$gcc_cv_nm"; then | |
13580 | echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13581 | echo "${ECHO_T}$gcc_cv_nm" >&6 | |
13582 | else | |
13583 | echo "$as_me:$LINENO: result: no" >&5 | |
13584 | echo "${ECHO_T}no" >&6 | |
13585 | fi | |
13586 | ||
13587 | test -n "$gcc_cv_nm" && break | |
13588 | done | |
45499411 | 13589 | test -n "$gcc_cv_nm" || gcc_cv_nm="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext" |
9f18db39 PB |
13590 | |
13591 | fi | |
13592 | test "$silent" != yes && exec 6>&1 | |
13593 | ||
13594 | ORIGINAL_NM_FOR_TARGET="$gcc_cv_nm" | |
13595 | ||
13596 | echo "$as_me:$LINENO: checking what nm to use" >&5 | |
13597 | echo $ECHO_N "checking what nm to use... $ECHO_C" >&6 | |
f9c1196a | 13598 | case $in_tree_nm in |
ba479fd2 NN |
13599 | yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5 |
13600 | echo "${ECHO_T}\"newly built nm\"" >&6 ;; | |
13601 | no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13602 | echo "${ECHO_T}$gcc_cv_nm" >&6 ;; | |
f9c1196a | 13603 | esac |
981d4858 | 13604 | |
3cae5780 | 13605 | # Figure out what objdump we will be using. |
f9c1196a | 13606 | in_tree_objdump=no |
d739199a DJ |
13607 | gcc_cv_objdump= |
13608 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
f9c1196a ZW |
13609 | && test -f ../binutils/Makefile; then |
13610 | # Single tree build which includes binutils. | |
13611 | in_tree_objdump=yes | |
9f18db39 | 13612 | gcc_cv_objdump=../binutils/objdump$build_exeext |
d739199a DJ |
13613 | elif test -x objdump$build_exeext; then |
13614 | gcc_cv_objdump=./objdump$build_exeext | |
13615 | fi | |
13616 | ||
13617 | ||
13618 | ||
13619 | ||
13620 | ||
13621 | exec 6>/dev/null | |
13622 | ||
13623 | # First try the environment variables. Handle full paths or basenames. | |
13624 | if test "x$gcc_cv_objdump" = x && test -n "$OBJDUMP_FOR_TARGET"; then | |
13625 | # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args. | |
13626 | set dummy $OBJDUMP_FOR_TARGET; ac_word=$2 | |
13627 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13628 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13629 | if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then | |
13630 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13631 | else | |
13632 | case $gcc_cv_objdump in | |
13633 | [\\/]* | ?:[\\/]*) | |
13634 | ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. | |
13635 | ;; | |
13636 | *) | |
13637 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13638 | for as_dir in $PATH | |
13639 | do | |
13640 | IFS=$as_save_IFS | |
13641 | test -z "$as_dir" && as_dir=. | |
13642 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13643 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13644 | ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" | |
13645 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13646 | break 2 | |
13647 | fi | |
13648 | done | |
13649 | done | |
13650 | ||
13651 | ;; | |
13652 | esac | |
13653 | fi | |
13654 | gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump | |
13655 | ||
13656 | if test -n "$gcc_cv_objdump"; then | |
13657 | echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
13658 | echo "${ECHO_T}$gcc_cv_objdump" >&6 | |
13659 | else | |
13660 | echo "$as_me:$LINENO: result: no" >&5 | |
13661 | echo "${ECHO_T}no" >&6 | |
13662 | fi | |
13663 | ||
13664 | fi | |
13665 | if test "x$gcc_cv_objdump" = x && test -n "$OBJDUMP" && test x$host = x$target; then | |
13666 | # Extract the first word of "$OBJDUMP", so it can be a program name with args. | |
13667 | set dummy $OBJDUMP; ac_word=$2 | |
13668 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13669 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13670 | if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then | |
13671 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13672 | else | |
13673 | case $gcc_cv_objdump in | |
13674 | [\\/]* | ?:[\\/]*) | |
13675 | ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. | |
13676 | ;; | |
13677 | *) | |
13678 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13679 | for as_dir in $PATH | |
13680 | do | |
13681 | IFS=$as_save_IFS | |
13682 | test -z "$as_dir" && as_dir=. | |
13683 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13684 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13685 | ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" | |
13686 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13687 | break 2 | |
13688 | fi | |
13689 | done | |
13690 | done | |
13691 | ||
13692 | ;; | |
13693 | esac | |
13694 | fi | |
13695 | gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump | |
13696 | ||
13697 | if test -n "$gcc_cv_objdump"; then | |
13698 | echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
13699 | echo "${ECHO_T}$gcc_cv_objdump" >&6 | |
534d0cc0 | 13700 | else |
d739199a DJ |
13701 | echo "$as_me:$LINENO: result: no" >&5 |
13702 | echo "${ECHO_T}no" >&6 | |
13703 | fi | |
13704 | ||
13705 | fi | |
13706 | ||
13707 | if test "x$gcc_cv_objdump" = x; then | |
13708 | # The AC_PATH_PROGS macro doesn't work properly when its 4th argument | |
13709 | # is empty. | |
13710 | if test "x$gcc_cv_tool_dirs" = x; then | |
13711 | gcc_cv_objdump= | |
13712 | else | |
13713 | for ac_prog in objdump | |
13714 | do | |
13715 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
13716 | set dummy $ac_prog; ac_word=$2 | |
13717 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13718 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13719 | if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then | |
13720 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13721 | else | |
13722 | case $gcc_cv_objdump in | |
13723 | [\\/]* | ?:[\\/]*) | |
13724 | ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. | |
13725 | ;; | |
13726 | *) | |
13727 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13728 | for as_dir in $gcc_cv_tool_dirs | |
13729 | do | |
13730 | IFS=$as_save_IFS | |
13731 | test -z "$as_dir" && as_dir=. | |
13732 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13733 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13734 | ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" | |
13735 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13736 | break 2 | |
13737 | fi | |
13738 | done | |
13739 | done | |
13740 | ||
13741 | ;; | |
13742 | esac | |
13743 | fi | |
13744 | gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump | |
13745 | ||
13746 | if test -n "$gcc_cv_objdump"; then | |
13747 | echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
13748 | echo "${ECHO_T}$gcc_cv_objdump" >&6 | |
13749 | else | |
13750 | echo "$as_me:$LINENO: result: no" >&5 | |
13751 | echo "${ECHO_T}no" >&6 | |
13752 | fi | |
13753 | ||
13754 | test -n "$gcc_cv_objdump" && break | |
13755 | done | |
13756 | ||
13757 | fi | |
13758 | fi | |
13759 | if test "x$gcc_cv_objdump" = x; then | |
13760 | # If the loop above did not find a tool, then use whatever | |
13761 | # one we can find in the users's path. We are looking for a | |
13762 | # ${build} -> ${target} tool. | |
13763 | if test "x$program_prefix" != xNONE; then | |
13764 | default_tool_name=${program_prefix}objdump | |
13765 | elif test x$build != x$host && test x$build != x$target; then | |
13766 | default_tool_name=${target_noncanonical}-objdump | |
13767 | else | |
13768 | default_tool_name=`echo objdump | sed "${program_transform_name}"` | |
13769 | fi | |
13770 | for ac_prog in $default_tool_name | |
13771 | do | |
13772 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
13773 | set dummy $ac_prog; ac_word=$2 | |
13774 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13775 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13776 | if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then | |
13777 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13778 | else | |
13779 | case $gcc_cv_objdump in | |
13780 | [\\/]* | ?:[\\/]*) | |
13781 | ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. | |
13782 | ;; | |
13783 | *) | |
13784 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13785 | for as_dir in $PATH | |
13786 | do | |
13787 | IFS=$as_save_IFS | |
13788 | test -z "$as_dir" && as_dir=. | |
13789 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13790 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13791 | ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" | |
13792 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13793 | break 2 | |
13794 | fi | |
13795 | done | |
13796 | done | |
13797 | ||
13798 | ;; | |
13799 | esac | |
3cae5780 | 13800 | fi |
d739199a DJ |
13801 | gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump |
13802 | ||
13803 | if test -n "$gcc_cv_objdump"; then | |
13804 | echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
13805 | echo "${ECHO_T}$gcc_cv_objdump" >&6 | |
13806 | else | |
13807 | echo "$as_me:$LINENO: result: no" >&5 | |
13808 | echo "${ECHO_T}no" >&6 | |
13809 | fi | |
13810 | ||
13811 | test -n "$gcc_cv_objdump" && break | |
13812 | done | |
13813 | test -n "$gcc_cv_objdump" || gcc_cv_objdump="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext" | |
13814 | ||
13815 | fi | |
13816 | test "$silent" != yes && exec 6>&1 | |
13817 | ||
13818 | ORIGINAL_OBJDUMP_FOR_TARGET="$gcc_cv_objdump" | |
13819 | ||
13820 | echo "$as_me:$LINENO: checking what objdump to use" >&5 | |
13821 | echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6 | |
f9c1196a | 13822 | case $in_tree_objdump in |
ba479fd2 NN |
13823 | yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5 |
13824 | echo "${ECHO_T}\"newly built objdump\"" >&6 ;; | |
13825 | no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
13826 | echo "${ECHO_T}$gcc_cv_objdump" >&6 ;; | |
f9c1196a | 13827 | esac |
3cae5780 | 13828 | |
981d4858 | 13829 | # Figure out what assembler alignment features are present. |
ba479fd2 NN |
13830 | echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5 |
13831 | echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6 | |
13832 | if test "${gcc_cv_as_balign_and_p2align+set}" = set; then | |
13833 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13834 | else |
13835 | gcc_cv_as_balign_and_p2align=no | |
13836 | if test $in_tree_gas = yes; then | |
13837 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0` | |
13838 | then gcc_cv_as_balign_and_p2align=yes | |
13839 | fi | |
13840 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13841 | echo '.balign 4 |
8ada417f | 13842 | .p2align 2' > conftest.s |
ba479fd2 NN |
13843 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13844 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13845 | (eval $ac_try) 2>&5 | |
13846 | ac_status=$? | |
13847 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13848 | (exit $ac_status); }; } | |
8ada417f ZW |
13849 | then |
13850 | gcc_cv_as_balign_and_p2align=yes | |
13851 | else | |
13852 | echo "configure: failed program was" >&5 | |
13853 | cat conftest.s >&5 | |
13854 | fi | |
13855 | rm -f conftest.o conftest.s | |
13856 | fi | |
13857 | fi | |
ba479fd2 NN |
13858 | echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5 |
13859 | echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6 | |
63cf211a | 13860 | if test $gcc_cv_as_balign_and_p2align = yes; then |
ba479fd2 NN |
13861 | |
13862 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13863 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
ba479fd2 | 13864 | _ACEOF |
981d4858 | 13865 | |
ad9c4d9f NN |
13866 | fi |
13867 | ||
ba479fd2 NN |
13868 | echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5 |
13869 | echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6 | |
13870 | if test "${gcc_cv_as_max_skip_p2align+set}" = set; then | |
13871 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13872 | else |
13873 | gcc_cv_as_max_skip_p2align=no | |
13874 | if test $in_tree_gas = yes; then | |
13875 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
13876 | then gcc_cv_as_max_skip_p2align=yes | |
13877 | fi | |
13878 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13879 | echo '.p2align 4,,7' > conftest.s |
ba479fd2 NN |
13880 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13881 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13882 | (eval $ac_try) 2>&5 | |
13883 | ac_status=$? | |
13884 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13885 | (exit $ac_status); }; } | |
8ada417f ZW |
13886 | then |
13887 | gcc_cv_as_max_skip_p2align=yes | |
13888 | else | |
13889 | echo "configure: failed program was" >&5 | |
13890 | cat conftest.s >&5 | |
13891 | fi | |
13892 | rm -f conftest.o conftest.s | |
13893 | fi | |
ad9c4d9f | 13894 | fi |
ba479fd2 NN |
13895 | echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5 |
13896 | echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6 | |
63cf211a | 13897 | if test $gcc_cv_as_max_skip_p2align = yes; then |
ba479fd2 NN |
13898 | |
13899 | cat >>confdefs.h <<\_ACEOF | |
9e423e6d | 13900 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
ba479fd2 | 13901 | _ACEOF |
9e423e6d | 13902 | |
9e423e6d | 13903 | fi |
ad9c4d9f | 13904 | |
ba479fd2 NN |
13905 | echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5 |
13906 | echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6 | |
13907 | if test "${gcc_cv_as_subsection_m1+set}" = set; then | |
13908 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13909 | else |
13910 | gcc_cv_as_subsection_m1=no | |
13911 | if test $in_tree_gas = yes; then | |
13912 | if test $in_tree_gas_is_elf = yes \ | |
13913 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
13914 | then gcc_cv_as_subsection_m1=yes | |
ad9c4d9f | 13915 | fi |
8ada417f | 13916 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13917 | echo 'conftest_label1: .word 0 |
d1accaa3 JJ |
13918 | .subsection -1 |
13919 | conftest_label2: .word 0 | |
8ada417f | 13920 | .previous' > conftest.s |
ba479fd2 NN |
13921 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13922 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13923 | (eval $ac_try) 2>&5 | |
13924 | ac_status=$? | |
13925 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13926 | (exit $ac_status); }; } | |
8ada417f ZW |
13927 | then |
13928 | if test x$gcc_cv_nm != x; then | |
13929 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
13930 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
13931 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 | |
13932 | then : | |
13933 | else gcc_cv_as_subsection_m1=yes | |
13934 | fi | |
13935 | rm -f conftest.nm1 conftest.nm2 | |
13936 | fi | |
13937 | else | |
13938 | echo "configure: failed program was" >&5 | |
13939 | cat conftest.s >&5 | |
13940 | fi | |
13941 | rm -f conftest.o conftest.s | |
13942 | fi | |
981d4858 | 13943 | fi |
ba479fd2 NN |
13944 | echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5 |
13945 | echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6 | |
63cf211a | 13946 | if test $gcc_cv_as_subsection_m1 = yes; then |
ba479fd2 NN |
13947 | |
13948 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13949 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
ba479fd2 | 13950 | _ACEOF |
981d4858 | 13951 | |
d1accaa3 | 13952 | fi |
ad9c4d9f | 13953 | |
ba479fd2 NN |
13954 | echo "$as_me:$LINENO: checking assembler for .weak" >&5 |
13955 | echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6 | |
13956 | if test "${gcc_cv_as_weak+set}" = set; then | |
13957 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13958 | else |
13959 | gcc_cv_as_weak=no | |
13960 | if test $in_tree_gas = yes; then | |
13961 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0` | |
13962 | then gcc_cv_as_weak=yes | |
ad9c4d9f | 13963 | fi |
8ada417f | 13964 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13965 | echo ' .weak foobar' > conftest.s |
ba479fd2 NN |
13966 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13967 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13968 | (eval $ac_try) 2>&5 | |
13969 | ac_status=$? | |
13970 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13971 | (exit $ac_status); }; } | |
8ada417f ZW |
13972 | then |
13973 | gcc_cv_as_weak=yes | |
13974 | else | |
13975 | echo "configure: failed program was" >&5 | |
13976 | cat conftest.s >&5 | |
13977 | fi | |
13978 | rm -f conftest.o conftest.s | |
13979 | fi | |
981d4858 | 13980 | fi |
ba479fd2 NN |
13981 | echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5 |
13982 | echo "${ECHO_T}$gcc_cv_as_weak" >&6 | |
63cf211a | 13983 | if test $gcc_cv_as_weak = yes; then |
ba479fd2 NN |
13984 | |
13985 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13986 | #define HAVE_GAS_WEAK 1 |
ba479fd2 | 13987 | _ACEOF |
981d4858 | 13988 | |
12822146 | 13989 | fi |
ad9c4d9f | 13990 | |
e41f3691 JDA |
13991 | echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5 |
13992 | echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6 | |
13993 | if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then | |
13994 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13995 | else | |
13996 | gcc_cv_as_nsubspa_comdat=no | |
13997 | if test $in_tree_gas = yes; then | |
13998 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
13999 | then gcc_cv_as_nsubspa_comdat=yes | |
14000 | fi | |
14001 | elif test x$gcc_cv_as != x; then | |
14002 | echo ' .SPACE $TEXT$ | |
14003 | .NSUBSPA $CODE$,COMDAT' > conftest.s | |
14004 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14005 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14006 | (eval $ac_try) 2>&5 | |
14007 | ac_status=$? | |
14008 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14009 | (exit $ac_status); }; } | |
14010 | then | |
14011 | gcc_cv_as_nsubspa_comdat=yes | |
14012 | else | |
14013 | echo "configure: failed program was" >&5 | |
14014 | cat conftest.s >&5 | |
14015 | fi | |
14016 | rm -f conftest.o conftest.s | |
14017 | fi | |
14018 | fi | |
14019 | echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5 | |
14020 | echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6 | |
14021 | if test $gcc_cv_as_nsubspa_comdat = yes; then | |
14022 | ||
14023 | cat >>confdefs.h <<\_ACEOF | |
14024 | #define HAVE_GAS_NSUBSPA_COMDAT 1 | |
14025 | _ACEOF | |
14026 | ||
14027 | fi | |
14028 | ||
8ada417f ZW |
14029 | # .hidden needs to be supported in both the assembler and the linker, |
14030 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
14031 | # This is irritatingly difficult to feature test for; we have to check the | |
14032 | # date string after the version number. If we've got an in-tree | |
14033 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
14034 | # to be safe. | |
14035 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
ba479fd2 NN |
14036 | echo "$as_me:$LINENO: checking assembler for .hidden" >&5 |
14037 | echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6 | |
14038 | if test "${gcc_cv_as_hidden+set}" = set; then | |
14039 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14040 | else |
14041 | gcc_cv_as_hidden=no | |
14042 | if test $in_tree_gas = yes; then | |
14043 | if test $in_tree_gas_is_elf = yes \ | |
14044 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0` | |
14045 | then gcc_cv_as_hidden=yes | |
14046 | fi | |
14047 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14048 | echo ' .hidden foobar |
8ada417f | 14049 | foobar:' > conftest.s |
ba479fd2 NN |
14050 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14051 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14052 | (eval $ac_try) 2>&5 | |
14053 | ac_status=$? | |
14054 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14055 | (exit $ac_status); }; } | |
8ada417f ZW |
14056 | then |
14057 | gcc_cv_as_hidden=yes | |
14058 | else | |
14059 | echo "configure: failed program was" >&5 | |
14060 | cat conftest.s >&5 | |
14061 | fi | |
14062 | rm -f conftest.o conftest.s | |
14063 | fi | |
14064 | fi | |
ba479fd2 NN |
14065 | echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5 |
14066 | echo "${ECHO_T}$gcc_cv_as_hidden" >&6 | |
63cf211a | 14067 | |
ad9c4d9f | 14068 | |
ba479fd2 NN |
14069 | echo "$as_me:$LINENO: checking linker for .hidden support" >&5 |
14070 | echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6 | |
14071 | if test "${gcc_cv_ld_hidden+set}" = set; then | |
14072 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14073 | else |
14074 | if test $in_tree_ld = yes ; then | |
14075 | gcc_cv_ld_hidden=no | |
14076 | 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 \ | |
14077 | && test $in_tree_ld_is_elf = yes; then | |
14078 | gcc_cv_ld_hidden=yes | |
14079 | fi | |
14080 | else | |
14081 | gcc_cv_ld_hidden=yes | |
bace148a | 14082 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` |
8ada417f ZW |
14083 | if echo "$ld_ver" | grep GNU > /dev/null; then |
14084 | ld_vers=`echo $ld_ver | sed -n \ | |
14085 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
14086 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
14087 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
14088 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
14089 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
11176d2a JB |
14090 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ |
14091 | -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 | 14092 | 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 |
14093 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` |
14094 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
14095 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
8ada417f ZW |
14096 | if test 0"$ld_date" -lt 20020404; then |
14097 | if test -n "$ld_date"; then | |
14098 | # If there was date string, but was earlier than 2002-04-04, fail | |
14099 | gcc_cv_ld_hidden=no | |
14100 | elif test -z "$ld_vers"; then | |
14101 | # If there was no date string nor ld version number, something is wrong | |
14102 | gcc_cv_ld_hidden=no | |
14103 | else | |
8ada417f ZW |
14104 | test -z "$ld_vers_patch" && ld_vers_patch=0 |
14105 | if test "$ld_vers_major" -lt 2; then | |
14106 | gcc_cv_ld_hidden=no | |
14107 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
14108 | gcc_cv_ld_hidden="no" | |
14109 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then | |
14110 | gcc_cv_ld_hidden=no | |
c72931a6 | 14111 | fi |
8ada417f | 14112 | fi |
789b7de5 | 14113 | fi |
8ada417f | 14114 | else |
28690784 | 14115 | case "${target}" in |
b0fd7d27 | 14116 | hppa64*-*-hpux* | ia64*-*-hpux*) |
28690784 JDA |
14117 | gcc_cv_ld_hidden=yes |
14118 | ;; | |
14119 | *) | |
14120 | gcc_cv_ld_hidden=no | |
14121 | ;; | |
14122 | esac | |
8ada417f ZW |
14123 | fi |
14124 | fi | |
6d07784a | 14125 | fi |
ba479fd2 NN |
14126 | echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5 |
14127 | echo "${ECHO_T}$gcc_cv_ld_hidden" >&6 | |
8ada417f | 14128 | libgcc_visibility=no |
ad9c4d9f | 14129 | |
232b67d9 | 14130 | |
8e3940b2 | 14131 | if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then |
8ada417f | 14132 | libgcc_visibility=yes |
ba479fd2 NN |
14133 | |
14134 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 14135 | #define HAVE_GAS_HIDDEN 1 |
ba479fd2 | 14136 | _ACEOF |
ad9c4d9f NN |
14137 | |
14138 | fi | |
14139 | ||
8ada417f | 14140 | # Check if we have .[us]leb128, and support symbol arithmetic with it. |
ba479fd2 NN |
14141 | echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5 |
14142 | echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6 | |
14143 | if test "${gcc_cv_as_leb128+set}" = set; then | |
14144 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14145 | else |
14146 | gcc_cv_as_leb128=no | |
14147 | if test $in_tree_gas = yes; then | |
14148 | if test $in_tree_gas_is_elf = yes \ | |
14149 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
14150 | then gcc_cv_as_leb128=yes | |
14151 | fi | |
14152 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14153 | echo ' .data |
b7460f24 RH |
14154 | .uleb128 L2 - L1 |
14155 | L1: | |
14156 | .uleb128 1280 | |
14157 | .sleb128 -1010 | |
8ada417f | 14158 | L2:' > conftest.s |
ba479fd2 NN |
14159 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14160 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14161 | (eval $ac_try) 2>&5 | |
14162 | ac_status=$? | |
14163 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14164 | (exit $ac_status); }; } | |
8ada417f ZW |
14165 | then |
14166 | # GAS versions before 2.11 do not support uleb128, | |
14167 | # despite appearing to. | |
14168 | # ??? There exists an elf-specific test that will crash | |
14169 | # the assembler. Perhaps it's better to figure out whether | |
14170 | # arbitrary sections are supported and try the test. | |
bace148a | 14171 | as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` |
8ada417f ZW |
14172 | if echo "$as_ver" | grep GNU > /dev/null; then |
14173 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` | |
14174 | as_major=`echo $as_ver | sed 's/\..*//'` | |
14175 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` | |
14176 | if test $as_major -eq 2 && test $as_minor -lt 11 | |
14177 | then : | |
14178 | else gcc_cv_as_leb128=yes | |
14179 | fi | |
14180 | fi | |
14181 | else | |
14182 | echo "configure: failed program was" >&5 | |
14183 | cat conftest.s >&5 | |
14184 | fi | |
14185 | rm -f conftest.o conftest.s | |
14186 | fi | |
b7460f24 | 14187 | fi |
ba479fd2 NN |
14188 | echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5 |
14189 | echo "${ECHO_T}$gcc_cv_as_leb128" >&6 | |
63cf211a | 14190 | if test $gcc_cv_as_leb128 = yes; then |
ba479fd2 NN |
14191 | |
14192 | cat >>confdefs.h <<\_ACEOF | |
b7460f24 | 14193 | #define HAVE_AS_LEB128 1 |
ba479fd2 | 14194 | _ACEOF |
b7460f24 RH |
14195 | |
14196 | fi | |
ad9c4d9f | 14197 | |
8ada417f ZW |
14198 | # GAS versions up to and including 2.11.0 may mis-optimize |
14199 | # .eh_frame data. | |
ba479fd2 NN |
14200 | echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5 |
14201 | echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6 | |
14202 | if test "${gcc_cv_as_eh_frame+set}" = set; then | |
14203 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14204 | else |
14205 | gcc_cv_as_eh_frame=no | |
14206 | if test $in_tree_gas = yes; then | |
14207 | if test $in_tree_gas_is_elf = yes \ | |
14208 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14209 | then gcc_cv_as_eh_frame=yes | |
ad9c4d9f | 14210 | fi |
8ada417f | 14211 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14212 | echo ' .text |
c64688ae RH |
14213 | .LFB1: |
14214 | .4byte 0 | |
14215 | .L1: | |
14216 | .4byte 0 | |
14217 | .LFE1: | |
14218 | .section .eh_frame,"aw",@progbits | |
14219 | __FRAME_BEGIN__: | |
14220 | .4byte .LECIE1-.LSCIE1 | |
14221 | .LSCIE1: | |
14222 | .4byte 0x0 | |
14223 | .byte 0x1 | |
14224 | .ascii "z\0" | |
14225 | .byte 0x1 | |
14226 | .byte 0x78 | |
14227 | .byte 0x1a | |
14228 | .byte 0x0 | |
14229 | .byte 0x4 | |
14230 | .4byte 1 | |
14231 | .p2align 1 | |
14232 | .LECIE1: | |
14233 | .LSFDE1: | |
14234 | .4byte .LEFDE1-.LASFDE1 | |
14235 | .LASFDE1: | |
14236 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
14237 | .4byte .LFB1 | |
14238 | .4byte .LFE1-.LFB1 | |
14239 | .byte 0x4 | |
14240 | .4byte .LFE1-.LFB1 | |
14241 | .byte 0x4 | |
14242 | .4byte .L1-.LFB1 | |
8ada417f | 14243 | .LEFDE1:' > conftest.s |
ba479fd2 NN |
14244 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14245 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14246 | (eval $ac_try) 2>&5 | |
14247 | ac_status=$? | |
14248 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14249 | (exit $ac_status); }; } | |
8ada417f ZW |
14250 | then |
14251 | cat > conftest.lit <<EOF | |
c64688ae RH |
14252 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
14253 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 14254 | 0020 08000000 04080000 0044 .........D |
01efb963 | 14255 | EOF |
ba479fd2 | 14256 | cat > conftest.big <<EOF |
01efb963 AS |
14257 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... |
14258 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 14259 | 0020 00000008 04000000 0844 .........D |
c64688ae | 14260 | EOF |
8ada417f ZW |
14261 | # If the assembler didn't choke, and we can objdump, |
14262 | # and we got the correct data, then succeed. | |
14263 | if test x$gcc_cv_objdump != x \ | |
14264 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
14265 | | tail -3 > conftest.got \ | |
14266 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ | |
14267 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
14268 | then | |
14269 | gcc_cv_as_eh_frame=yes | |
ba479fd2 NN |
14270 | elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null' |
14271 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14272 | (eval $ac_try) 2>&5 | |
14273 | ac_status=$? | |
14274 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14275 | (exit $ac_status); }; }; then | |
8ada417f ZW |
14276 | gcc_cv_as_eh_frame=buggy |
14277 | else | |
14278 | # Uh oh, what do we do now? | |
14279 | gcc_cv_as_eh_frame=no | |
14280 | fi | |
14281 | else | |
14282 | echo "configure: failed program was" >&5 | |
14283 | cat conftest.s >&5 | |
14284 | fi | |
14285 | rm -f conftest.o conftest.s | |
14286 | fi | |
c64688ae | 14287 | fi |
ba479fd2 NN |
14288 | echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5 |
14289 | echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6 | |
ad9c4d9f | 14290 | |
6e3f3080 | 14291 | |
63cf211a | 14292 | if test $gcc_cv_as_eh_frame = buggy; then |
ba479fd2 NN |
14293 | |
14294 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 14295 | #define USE_AS_TRADITIONAL_FORMAT 1 |
ba479fd2 | 14296 | _ACEOF |
ad9c4d9f NN |
14297 | |
14298 | fi | |
14299 | ||
ba479fd2 NN |
14300 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 |
14301 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
14302 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
14303 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14304 | else |
14305 | gcc_cv_as_shf_merge=no | |
14306 | if test $in_tree_gas = yes; then | |
14307 | if test $in_tree_gas_is_elf = yes \ | |
14308 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14309 | then gcc_cv_as_shf_merge=yes | |
14310 | fi | |
14311 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14312 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s |
ba479fd2 NN |
14313 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' |
14314 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14315 | (eval $ac_try) 2>&5 | |
14316 | ac_status=$? | |
14317 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14318 | (exit $ac_status); }; } | |
8ada417f ZW |
14319 | then |
14320 | gcc_cv_as_shf_merge=yes | |
14321 | else | |
14322 | echo "configure: failed program was" >&5 | |
14323 | cat conftest.s >&5 | |
14324 | fi | |
14325 | rm -f conftest.o conftest.s | |
14326 | fi | |
201556f0 | 14327 | fi |
ba479fd2 NN |
14328 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 |
14329 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
8ada417f | 14330 | |
c18a5b6c MM |
14331 | if test $gcc_cv_as_shf_merge = no; then |
14332 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 | |
14333 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
14334 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
14335 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14336 | else | |
14337 | gcc_cv_as_shf_merge=no | |
14338 | if test $in_tree_gas = yes; then | |
14339 | if test $in_tree_gas_is_elf = yes \ | |
14340 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14341 | then gcc_cv_as_shf_merge=yes | |
14342 | fi | |
14343 | elif test x$gcc_cv_as != x; then | |
14344 | echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s | |
14345 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14346 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14347 | (eval $ac_try) 2>&5 | |
14348 | ac_status=$? | |
14349 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14350 | (exit $ac_status); }; } | |
14351 | then | |
14352 | gcc_cv_as_shf_merge=yes | |
14353 | else | |
14354 | echo "configure: failed program was" >&5 | |
14355 | cat conftest.s >&5 | |
14356 | fi | |
14357 | rm -f conftest.o conftest.s | |
14358 | fi | |
14359 | fi | |
14360 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 | |
14361 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
14362 | ||
14363 | fi | |
8ad9fb33 | 14364 | |
ba479fd2 | 14365 | cat >>confdefs.h <<_ACEOF |
8ad9fb33 | 14366 | #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 14367 | _ACEOF |
201556f0 | 14368 | |
201556f0 | 14369 | |
c18a5b6c MM |
14370 | echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 |
14371 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 | |
14372 | if test "${gcc_cv_as_comdat_group+set}" = set; then | |
14373 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14374 | else | |
14375 | gcc_cv_as_comdat_group=no | |
14376 | if test $in_tree_gas = yes; then | |
14377 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 14378 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
14379 | then gcc_cv_as_comdat_group=yes |
14380 | fi | |
14381 | elif test x$gcc_cv_as != x; then | |
14382 | echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s | |
14383 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14384 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14385 | (eval $ac_try) 2>&5 | |
14386 | ac_status=$? | |
14387 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14388 | (exit $ac_status); }; } | |
14389 | then | |
14390 | gcc_cv_as_comdat_group=yes | |
14391 | else | |
14392 | echo "configure: failed program was" >&5 | |
14393 | cat conftest.s >&5 | |
14394 | fi | |
14395 | rm -f conftest.o conftest.s | |
14396 | fi | |
14397 | fi | |
14398 | echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5 | |
14399 | echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6 | |
14400 | ||
14401 | if test $gcc_cv_as_comdat_group = yes; then | |
14402 | gcc_cv_as_comdat_group_percent=no | |
14403 | else | |
14404 | echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 | |
14405 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 | |
14406 | if test "${gcc_cv_as_comdat_group_percent+set}" = set; then | |
14407 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14408 | else | |
14409 | gcc_cv_as_comdat_group_percent=no | |
14410 | if test $in_tree_gas = yes; then | |
14411 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 14412 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
14413 | then gcc_cv_as_comdat_group_percent=yes |
14414 | fi | |
14415 | elif test x$gcc_cv_as != x; then | |
14416 | echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s | |
14417 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14418 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14419 | (eval $ac_try) 2>&5 | |
14420 | ac_status=$? | |
14421 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14422 | (exit $ac_status); }; } | |
14423 | then | |
14424 | gcc_cv_as_comdat_group_percent=yes | |
14425 | else | |
14426 | echo "configure: failed program was" >&5 | |
14427 | cat conftest.s >&5 | |
14428 | fi | |
14429 | rm -f conftest.o conftest.s | |
14430 | fi | |
14431 | fi | |
14432 | echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5 | |
14433 | echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6 | |
14434 | ||
14435 | fi | |
11176d2a JB |
14436 | if test $in_tree_ld != yes && test x"$ld_vers" != x; then |
14437 | comdat_group=yes | |
14438 | if test 0"$ld_date" -lt 20050308; then | |
14439 | if test -n "$ld_date"; then | |
14440 | # If there was date string, but was earlier than 2005-03-08, fail | |
14441 | comdat_group=no | |
14442 | elif test "$ld_vers_major" -lt 2; then | |
14443 | comdat_group=no | |
14444 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then | |
14445 | comdat_group=no | |
14446 | fi | |
14447 | fi | |
14448 | if test $comdat_group = no; then | |
14449 | gcc_cv_as_comdat_group=no | |
14450 | gcc_cv_as_comdat_group_percent=no | |
14451 | fi | |
14452 | fi | |
c18a5b6c MM |
14453 | |
14454 | cat >>confdefs.h <<_ACEOF | |
11176d2a | 14455 | #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 |
14456 | _ACEOF |
14457 | ||
14458 | ||
8ada417f | 14459 | # Thread-local storage - the check is heavily parametrized. |
f996902d RH |
14460 | conftest_s= |
14461 | tls_first_major= | |
14462 | tls_first_minor= | |
9739c90c | 14463 | tls_as_opt= |
f996902d | 14464 | case "$target" in |
6f9b006d RH |
14465 | alpha*-*-*) |
14466 | conftest_s=' | |
14467 | .section ".tdata","awT",@progbits | |
14468 | foo: .long 25 | |
14469 | .text | |
14470 | ldq $27,__tls_get_addr($29) !literal!1 | |
14471 | lda $16,foo($29) !tlsgd!1 | |
14472 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
14473 | ldq $27,__tls_get_addr($29) !literal!2 | |
14474 | lda $16,foo($29) !tlsldm!2 | |
14475 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
14476 | ldq $1,foo($29) !gotdtprel | |
14477 | ldah $2,foo($29) !dtprelhi | |
14478 | lda $3,foo($2) !dtprello | |
14479 | lda $4,foo($29) !dtprel | |
14480 | ldq $1,foo($29) !gottprel | |
14481 | ldah $2,foo($29) !tprelhi | |
14482 | lda $3,foo($2) !tprello | |
14483 | lda $4,foo($29) !tprel' | |
14484 | tls_first_major=2 | |
14485 | tls_first_minor=13 | |
2f3321ca | 14486 | tls_as_opt=--fatal-warnings |
6f9b006d | 14487 | ;; |
e4dd71de AH |
14488 | frv*-*-*) |
14489 | conftest_s=' | |
14490 | .section ".tdata","awT",@progbits | |
14491 | x: .long 25 | |
14492 | .text | |
14493 | call #gettlsoff(x)' | |
14494 | tls_first_major=2 | |
14495 | tls_first_minor=14 | |
14496 | ;; | |
51076f96 RC |
14497 | hppa*-*-linux*) |
14498 | conftest_s=' | |
14499 | t1: .reg %r20 | |
14500 | t2: .reg %r21 | |
14501 | gp: .reg %r19 | |
14502 | .section ".tdata","awT",@progbits | |
14503 | foo: .long 25 | |
14504 | .text | |
14505 | .align 4 | |
14506 | addil LT%foo-$tls_gdidx$,gp | |
14507 | ldo RT%foo-$tls_gdidx$(%r1),%arg0 | |
14508 | b __tls_get_addr | |
14509 | nop | |
14510 | addil LT%foo-$tls_ldidx$,gp | |
14511 | b __tls_get_addr | |
14512 | ldo RT%foo-$tls_ldidx$(%r1),%arg0 | |
14513 | addil LR%foo-$tls_dtpoff$,%ret0 | |
14514 | ldo RR%foo-$tls_dtpoff$(%r1),%t1 | |
14515 | mfctl %cr27,%t1 | |
14516 | addil LT%foo-$tls_ieoff$,gp | |
14517 | ldw RT%foo-$tls_ieoff$(%r1),%t2 | |
14518 | add %t1,%t2,%t3 | |
14519 | mfctl %cr27,%t1 | |
14520 | addil LR%foo-$tls_leoff$,%t1 | |
14521 | ldo RR%foo-$tls_leoff$(%r1),%t2' | |
14522 | tls_first_major=2 | |
14523 | tls_first_minor=15 | |
14524 | tls_as_opt=--fatal-warnings | |
14525 | ;; | |
d3585b76 DJ |
14526 | arm*-*-*) |
14527 | conftest_s=' | |
14528 | .section ".tdata","awT",%progbits | |
14529 | foo: .long 25 | |
14530 | .text | |
14531 | .word foo(gottpoff) | |
14532 | .word foo(tpoff) | |
14533 | .word foo(tlsgd) | |
14534 | .word foo(tlsldm) | |
14535 | .word foo(tlsldo)' | |
14536 | tls_first_major=2 | |
14537 | tls_first_minor=17 | |
14538 | ;; | |
f996902d RH |
14539 | i[34567]86-*-*) |
14540 | conftest_s=' | |
14541 | .section ".tdata","awT",@progbits | |
14542 | foo: .long 25 | |
14543 | .text | |
14544 | movl %gs:0, %eax | |
14545 | leal foo@TLSGD(,%ebx,1), %eax | |
14546 | leal foo@TLSLDM(%ebx), %eax | |
14547 | leal foo@DTPOFF(%eax), %edx | |
14548 | movl foo@GOTTPOFF(%ebx), %eax | |
14549 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
14550 | addl foo@GOTNTPOFF(%ebx), %eax |
14551 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
14552 | movl $foo@TPOFF, %eax |
14553 | subl $foo@TPOFF, %eax | |
14554 | leal foo@NTPOFF(%ecx), %eax' | |
14555 | tls_first_major=2 | |
75d38379 | 14556 | tls_first_minor=14 |
2f3321ca | 14557 | tls_as_opt=--fatal-warnings |
75d38379 JJ |
14558 | ;; |
14559 | x86_64-*-*) | |
14560 | conftest_s=' | |
14561 | .section ".tdata","awT",@progbits | |
14562 | foo: .long 25 | |
14563 | .text | |
14564 | movq %fs:0, %rax | |
14565 | leaq foo@TLSGD(%rip), %rdi | |
14566 | leaq foo@TLSLD(%rip), %rdi | |
14567 | leaq foo@DTPOFF(%rax), %rdx | |
14568 | movq foo@GOTTPOFF(%rip), %rax | |
14569 | movq $foo@TPOFF, %rax' | |
14570 | tls_first_major=2 | |
14571 | tls_first_minor=14 | |
2f3321ca | 14572 | tls_as_opt=--fatal-warnings |
f996902d | 14573 | ;; |
7b6e506e RH |
14574 | ia64-*-*) |
14575 | conftest_s=' | |
14576 | .section ".tdata","awT",@progbits | |
14577 | foo: data8 25 | |
14578 | .text | |
14579 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
14580 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
14581 | addl r18 = @ltoff(@tprel(foo#)), gp | |
14582 | addl r19 = @dtprel(foo#), gp | |
14583 | adds r21 = @dtprel(foo#), r13 | |
14584 | movl r23 = @dtprel(foo#) | |
14585 | addl r20 = @tprel(foo#), gp | |
14586 | adds r22 = @tprel(foo#), r13 | |
14587 | movl r24 = @tprel(foo#)' | |
14588 | tls_first_major=2 | |
14589 | tls_first_minor=13 | |
2f3321ca | 14590 | tls_as_opt=--fatal-warnings |
7b6e506e | 14591 | ;; |
69229b81 DJ |
14592 | mips*-*-*) |
14593 | conftest_s=' | |
14594 | .section .tdata,"awT",@progbits | |
14595 | x: | |
14596 | .word 2 | |
14597 | .text | |
14598 | addiu $4, $28, %tlsgd(x) | |
14599 | addiu $4, $28, %tlsldm(x) | |
14600 | lui $4, %dtprel_hi(x) | |
14601 | addiu $4, $4, %dtprel_lo(x) | |
14602 | lw $4, %gottprel(x)($28) | |
14603 | lui $4, %tprel_hi(x) | |
14604 | addiu $4, $4, %tprel_lo(x)' | |
14605 | tls_first_major=2 | |
14606 | tls_first_minor=16 | |
14607 | tls_as_opt='-32 --fatal-warnings' | |
14608 | ;; | |
c4501e62 JJ |
14609 | powerpc-*-*) |
14610 | conftest_s=' | |
14611 | .section ".tdata","awT",@progbits | |
14612 | .align 2 | |
14613 | ld0: .space 4 | |
14614 | ld1: .space 4 | |
14615 | x1: .space 4 | |
14616 | x2: .space 4 | |
14617 | x3: .space 4 | |
14618 | .text | |
14619 | addi 3,31,ld0@got@tlsgd | |
14620 | bl __tls_get_addr | |
14621 | addi 3,31,x1@got@tlsld | |
14622 | bl __tls_get_addr | |
14623 | addi 9,3,x1@dtprel | |
14624 | addis 9,3,x2@dtprel@ha | |
14625 | addi 9,9,x2@dtprel@l | |
14626 | lwz 9,x3@got@tprel(31) | |
14627 | add 9,9,x@tls | |
14628 | addi 9,2,x1@tprel | |
14629 | addis 9,2,x2@tprel@ha | |
14630 | addi 9,9,x2@tprel@l' | |
14631 | tls_first_major=2 | |
14632 | tls_first_minor=14 | |
2f3321ca | 14633 | tls_as_opt="-a32 --fatal-warnings" |
c4501e62 JJ |
14634 | ;; |
14635 | powerpc64-*-*) | |
14636 | conftest_s=' | |
14637 | .section ".tdata","awT",@progbits | |
14638 | .align 3 | |
14639 | ld0: .space 8 | |
14640 | ld1: .space 8 | |
14641 | x1: .space 8 | |
14642 | x2: .space 8 | |
14643 | x3: .space 8 | |
14644 | .text | |
14645 | addi 3,2,ld0@got@tlsgd | |
14646 | bl .__tls_get_addr | |
14647 | nop | |
14648 | addi 3,2,ld1@toc | |
14649 | bl .__tls_get_addr | |
14650 | nop | |
14651 | addi 3,2,x1@got@tlsld | |
14652 | bl .__tls_get_addr | |
14653 | nop | |
14654 | addi 9,3,x1@dtprel | |
14655 | bl .__tls_get_addr | |
14656 | nop | |
14657 | addis 9,3,x2@dtprel@ha | |
14658 | addi 9,9,x2@dtprel@l | |
14659 | bl .__tls_get_addr | |
14660 | nop | |
14661 | ld 9,x3@got@dtprel(2) | |
14662 | add 9,9,3 | |
14663 | bl .__tls_get_addr | |
14664 | nop' | |
14665 | tls_first_major=2 | |
14666 | tls_first_minor=14 | |
2f3321ca | 14667 | tls_as_opt="-a64 --fatal-warnings" |
c4501e62 | 14668 | ;; |
fd3cd001 UW |
14669 | s390-*-*) |
14670 | conftest_s=' | |
14671 | .section ".tdata","awT",@progbits | |
14672 | foo: .long 25 | |
14673 | .text | |
14674 | .long foo@TLSGD | |
14675 | .long foo@TLSLDM | |
14676 | .long foo@DTPOFF | |
14677 | .long foo@NTPOFF | |
14678 | .long foo@GOTNTPOFF | |
14679 | .long foo@INDNTPOFF | |
14680 | l %r1,foo@GOTNTPOFF(%r12) | |
14681 | l %r1,0(%r1):tls_load:foo | |
14682 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
14683 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
14684 | tls_first_major=2 | |
14685 | tls_first_minor=14 | |
2f3321ca | 14686 | tls_as_opt="-m31 --fatal-warnings" |
fd3cd001 UW |
14687 | ;; |
14688 | s390x-*-*) | |
14689 | conftest_s=' | |
14690 | .section ".tdata","awT",@progbits | |
14691 | foo: .long 25 | |
14692 | .text | |
14693 | .quad foo@TLSGD | |
14694 | .quad foo@TLSLDM | |
14695 | .quad foo@DTPOFF | |
14696 | .quad foo@NTPOFF | |
14697 | .quad foo@GOTNTPOFF | |
14698 | lg %r1,foo@GOTNTPOFF(%r12) | |
14699 | larl %r1,foo@INDNTPOFF | |
14700 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
14701 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
14702 | tls_first_major=2 | |
14703 | tls_first_minor=14 | |
2f3321ca | 14704 | tls_as_opt="-m64 -Aesame --fatal-warnings" |
fd3cd001 | 14705 | ;; |
9ff13962 KK |
14706 | sh-*-* | sh[34]-*-*) |
14707 | conftest_s=' | |
14708 | .section ".tdata","awT",@progbits | |
14709 | foo: .long 25 | |
14710 | .text | |
14711 | .long foo@TLSGD | |
14712 | .long foo@TLSLDM | |
14713 | .long foo@DTPOFF | |
14714 | .long foo@GOTTPOFF | |
14715 | .long foo@TPOFF' | |
14716 | tls_first_major=2 | |
14717 | tls_first_minor=13 | |
2f3321ca | 14718 | tls_as_opt=--fatal-warnings |
9ff13962 | 14719 | ;; |
5751a10b | 14720 | sparc*-*-*) |
2f3321ca EB |
14721 | case "$target" in |
14722 | sparc*-sun-solaris2.*) | |
14723 | on_solaris=yes | |
14724 | ;; | |
14725 | *) | |
14726 | on_solaris=no | |
14727 | ;; | |
14728 | esac | |
14729 | if test x$on_solaris = xyes && test x$gas_flag = xno; then | |
14730 | conftest_s=' | |
14731 | .section ".tdata",#alloc,#write,#tls | |
14732 | foo: .long 25 | |
14733 | .text | |
14734 | sethi %tgd_hi22(foo), %o0 | |
14735 | add %o0, %tgd_lo10(foo), %o1 | |
14736 | add %l7, %o1, %o0, %tgd_add(foo) | |
14737 | call __tls_get_addr, %tgd_call(foo) | |
14738 | sethi %tldm_hi22(foo), %l1 | |
14739 | add %l1, %tldm_lo10(foo), %l2 | |
14740 | add %l7, %l2, %o0, %tldm_add(foo) | |
14741 | call __tls_get_addr, %tldm_call(foo) | |
14742 | sethi %tldo_hix22(foo), %l3 | |
14743 | xor %l3, %tldo_lox10(foo), %l4 | |
14744 | add %o0, %l4, %l5, %tldo_add(foo) | |
14745 | sethi %tie_hi22(foo), %o3 | |
14746 | add %o3, %tie_lo10(foo), %o3 | |
14747 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
14748 | add %g7, %o2, %o4, %tie_add(foo) | |
14749 | sethi %tle_hix22(foo), %l1 | |
14750 | xor %l1, %tle_lox10(foo), %o5 | |
14751 | ld [%g7 + %o5], %o1' | |
14752 | tls_first_major=0 | |
14753 | tls_first_minor=0 | |
14754 | else | |
14755 | conftest_s=' | |
5751a10b JJ |
14756 | .section ".tdata","awT",@progbits |
14757 | foo: .long 25 | |
14758 | .text | |
14759 | sethi %tgd_hi22(foo), %o0 | |
14760 | add %o0, %tgd_lo10(foo), %o1 | |
14761 | add %l7, %o1, %o0, %tgd_add(foo) | |
14762 | call __tls_get_addr, %tgd_call(foo) | |
14763 | sethi %tldm_hi22(foo), %l1 | |
14764 | add %l1, %tldm_lo10(foo), %l2 | |
14765 | add %l7, %l2, %o0, %tldm_add(foo) | |
14766 | call __tls_get_addr, %tldm_call(foo) | |
14767 | sethi %tldo_hix22(foo), %l3 | |
14768 | xor %l3, %tldo_lox10(foo), %l4 | |
14769 | add %o0, %l4, %l5, %tldo_add(foo) | |
14770 | sethi %tie_hi22(foo), %o3 | |
14771 | add %o3, %tie_lo10(foo), %o3 | |
14772 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
14773 | add %g7, %o2, %o4, %tie_add(foo) | |
14774 | sethi %tle_hix22(foo), %l1 | |
14775 | xor %l1, %tle_lox10(foo), %o5 | |
14776 | ld [%g7 + %o5], %o1' | |
14777 | tls_first_major=2 | |
14778 | tls_first_minor=14 | |
2f3321ca EB |
14779 | tls_as_opt="-32 --fatal-warnings" |
14780 | fi | |
5751a10b | 14781 | ;; |
f996902d RH |
14782 | esac |
14783 | if test -z "$tls_first_major"; then | |
8ada417f ZW |
14784 | : # If we don't have a check, assume no support. |
14785 | else | |
ba479fd2 NN |
14786 | echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5 |
14787 | echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6 | |
14788 | if test "${gcc_cv_as_tls+set}" = set; then | |
14789 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14790 | else |
14791 | gcc_cv_as_tls=no | |
14792 | if test $in_tree_gas = yes; then | |
14793 | if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0` | |
14794 | then gcc_cv_as_tls=yes | |
ad9c4d9f | 14795 | fi |
8ada417f | 14796 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14797 | echo "$conftest_s" > conftest.s |
2f3321ca | 14798 | if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5' |
ba479fd2 NN |
14799 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
14800 | (eval $ac_try) 2>&5 | |
14801 | ac_status=$? | |
14802 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14803 | (exit $ac_status); }; } | |
8ada417f ZW |
14804 | then |
14805 | gcc_cv_as_tls=yes | |
14806 | else | |
14807 | echo "configure: failed program was" >&5 | |
14808 | cat conftest.s >&5 | |
14809 | fi | |
14810 | rm -f conftest.o conftest.s | |
f996902d | 14811 | fi |
f996902d | 14812 | fi |
ba479fd2 NN |
14813 | echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5 |
14814 | echo "${ECHO_T}$gcc_cv_as_tls" >&6 | |
63cf211a | 14815 | if test $gcc_cv_as_tls = yes; then |
ba479fd2 NN |
14816 | |
14817 | cat >>confdefs.h <<\_ACEOF | |
f996902d | 14818 | #define HAVE_AS_TLS 1 |
ba479fd2 | 14819 | _ACEOF |
f996902d RH |
14820 | |
14821 | fi | |
8ada417f ZW |
14822 | fi |
14823 | ||
14824 | # Target-specific assembler checks. | |
f996902d | 14825 | |
7e9d8517 L |
14826 | echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5 |
14827 | echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6 | |
14828 | gcc_cv_ld_static_dynamic=no | |
14829 | if test $in_tree_ld = yes ; then | |
14830 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then | |
14831 | gcc_cv_ld_static_dynamic=yes | |
14832 | fi | |
14833 | elif test x$gcc_cv_ld != x; then | |
14834 | # Check if linker supports -Bstatic/-Bdynamic option | |
14835 | if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ | |
14836 | && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then | |
14837 | gcc_cv_ld_static_dynamic=yes | |
14838 | fi | |
14839 | fi | |
14840 | if test x"$gcc_cv_ld_static_dynamic" = xyes; then | |
14841 | ||
14842 | cat >>confdefs.h <<\_ACEOF | |
14843 | #define HAVE_LD_STATIC_DYNAMIC 1 | |
14844 | _ACEOF | |
14845 | ||
14846 | fi | |
14847 | echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5 | |
14848 | echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6 | |
14849 | ||
d594623a L |
14850 | if test x"$demangler_in_ld" = xyes; then |
14851 | echo "$as_me:$LINENO: checking linker --demangle support" >&5 | |
14852 | echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6 | |
14853 | gcc_cv_ld_demangle=no | |
14854 | if test $in_tree_ld = yes; then | |
14855 | 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 \ | |
14856 | gcc_cv_ld_demangle=yes | |
14857 | fi | |
14858 | elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then | |
14859 | # Check if the GNU linker supports --demangle option | |
14860 | if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then | |
14861 | gcc_cv_ld_demangle=yes | |
14862 | fi | |
14863 | fi | |
14864 | if test x"$gcc_cv_ld_demangle" = xyes; then | |
14865 | ||
14866 | cat >>confdefs.h <<\_ACEOF | |
14867 | #define HAVE_LD_DEMANGLE 1 | |
14868 | _ACEOF | |
14869 | ||
14870 | fi | |
14871 | echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5 | |
14872 | echo "${ECHO_T}$gcc_cv_ld_demangle" >&6 | |
14873 | fi | |
14874 | ||
3a37b08e RH |
14875 | case "$target" in |
14876 | # All TARGET_ABI_OSF targets. | |
14877 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
ba479fd2 NN |
14878 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
14879 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
14880 | if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then | |
14881 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a37b08e | 14882 | else |
8ada417f ZW |
14883 | gcc_cv_as_alpha_explicit_relocs=no |
14884 | if test $in_tree_gas = yes; then | |
14885 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14886 | then gcc_cv_as_alpha_explicit_relocs=yes | |
ad9c4d9f | 14887 | fi |
8ada417f | 14888 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14889 | echo ' .set nomacro |
3a37b08e RH |
14890 | .text |
14891 | extbl $3, $2, $3 !lituse_bytoff!1 | |
14892 | ldq $2, a($29) !literal!1 | |
14893 | ldq $4, b($29) !literal!2 | |
14894 | ldq_u $3, 0($2) !lituse_base!1 | |
14895 | ldq $27, f($29) !literal!5 | |
14896 | jsr $26, ($27), f !lituse_jsr!5 | |
14897 | ldah $29, 0($26) !gpdisp!3 | |
14898 | lda $0, c($29) !gprel | |
14899 | ldah $1, d($29) !gprelhigh | |
14900 | lda $1, d($1) !gprellow | |
8ada417f | 14901 | lda $29, 0($29) !gpdisp!3' > conftest.s |
ba479fd2 NN |
14902 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14903 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14904 | (eval $ac_try) 2>&5 | |
14905 | ac_status=$? | |
14906 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14907 | (exit $ac_status); }; } | |
8ada417f ZW |
14908 | then |
14909 | gcc_cv_as_alpha_explicit_relocs=yes | |
14910 | else | |
14911 | echo "configure: failed program was" >&5 | |
14912 | cat conftest.s >&5 | |
14913 | fi | |
14914 | rm -f conftest.o conftest.s | |
14915 | fi | |
cafe096b | 14916 | fi |
ba479fd2 NN |
14917 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5 |
14918 | echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6 | |
63cf211a | 14919 | if test $gcc_cv_as_alpha_explicit_relocs = yes; then |
ba479fd2 NN |
14920 | |
14921 | cat >>confdefs.h <<\_ACEOF | |
3a37b08e | 14922 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
ba479fd2 | 14923 | _ACEOF |
3a37b08e | 14924 | |
d006f5eb RH |
14925 | fi |
14926 | echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5 | |
14927 | echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6 | |
14928 | if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then | |
14929 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14930 | else | |
14931 | gcc_cv_as_alpha_jsrdirect_relocs=no | |
14932 | if test $in_tree_gas = yes; then | |
14933 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90` | |
14934 | then gcc_cv_as_alpha_jsrdirect_relocs=yes | |
14935 | fi | |
14936 | elif test x$gcc_cv_as != x; then | |
14937 | echo ' .set nomacro | |
14938 | .text | |
14939 | ldq $27, a($29) !literal!1 | |
14940 | jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s | |
14941 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14942 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14943 | (eval $ac_try) 2>&5 | |
14944 | ac_status=$? | |
14945 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14946 | (exit $ac_status); }; } | |
14947 | then | |
14948 | gcc_cv_as_alpha_jsrdirect_relocs=yes | |
14949 | else | |
14950 | echo "configure: failed program was" >&5 | |
14951 | cat conftest.s >&5 | |
14952 | fi | |
14953 | rm -f conftest.o conftest.s | |
14954 | fi | |
14955 | fi | |
14956 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5 | |
14957 | echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6 | |
14958 | if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then | |
14959 | ||
14960 | cat >>confdefs.h <<\_ACEOF | |
14961 | #define HAVE_AS_JSRDIRECT_RELOCS 1 | |
14962 | _ACEOF | |
14963 | ||
86da66b5 HPN |
14964 | fi |
14965 | ;; | |
14966 | ||
14967 | cris-*-*) | |
14968 | echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5 | |
14969 | echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6 | |
14970 | if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then | |
14971 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14972 | else | |
14973 | gcc_cv_as_cris_no_mul_bug=no | |
14974 | if test $in_tree_gas = yes; then | |
14975 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
14976 | then gcc_cv_as_cris_no_mul_bug=yes | |
14977 | fi | |
14978 | elif test x$gcc_cv_as != x; then | |
14979 | echo '.text' > conftest.s | |
14980 | if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5' | |
14981 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14982 | (eval $ac_try) 2>&5 | |
14983 | ac_status=$? | |
14984 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14985 | (exit $ac_status); }; } | |
14986 | then | |
14987 | gcc_cv_as_cris_no_mul_bug=yes | |
14988 | else | |
14989 | echo "configure: failed program was" >&5 | |
14990 | cat conftest.s >&5 | |
14991 | fi | |
14992 | rm -f conftest.o conftest.s | |
14993 | fi | |
14994 | fi | |
14995 | echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5 | |
14996 | echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6 | |
14997 | if test $gcc_cv_as_cris_no_mul_bug = yes; then | |
14998 | ||
14999 | cat >>confdefs.h <<\_ACEOF | |
15000 | #define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1 | |
15001 | _ACEOF | |
15002 | ||
8ada417f | 15003 | fi |
3a37b08e | 15004 | ;; |
8ada417f | 15005 | |
1cb36a98 | 15006 | sparc*-*-*) |
ba479fd2 NN |
15007 | echo "$as_me:$LINENO: checking assembler for .register" >&5 |
15008 | echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6 | |
15009 | if test "${gcc_cv_as_sparc_register_op+set}" = set; then | |
15010 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 15011 | else |
8ada417f ZW |
15012 | gcc_cv_as_sparc_register_op=no |
15013 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15014 | echo '.register %g2, #scratch' > conftest.s |
ba479fd2 NN |
15015 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15016 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15017 | (eval $ac_try) 2>&5 | |
15018 | ac_status=$? | |
15019 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15020 | (exit $ac_status); }; } | |
8ada417f ZW |
15021 | then |
15022 | gcc_cv_as_sparc_register_op=yes | |
15023 | else | |
15024 | echo "configure: failed program was" >&5 | |
15025 | cat conftest.s >&5 | |
15026 | fi | |
15027 | rm -f conftest.o conftest.s | |
15028 | fi | |
cafe096b | 15029 | fi |
ba479fd2 NN |
15030 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5 |
15031 | echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6 | |
63cf211a | 15032 | if test $gcc_cv_as_sparc_register_op = yes; then |
ba479fd2 NN |
15033 | |
15034 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 15035 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
ba479fd2 | 15036 | _ACEOF |
1cb36a98 | 15037 | |
8ada417f | 15038 | fi |
1cb36a98 | 15039 | |
ba479fd2 NN |
15040 | echo "$as_me:$LINENO: checking assembler for -relax option" >&5 |
15041 | echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6 | |
15042 | if test "${gcc_cv_as_sparc_relax+set}" = set; then | |
15043 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e95b1e6a | 15044 | else |
8ada417f ZW |
15045 | gcc_cv_as_sparc_relax=no |
15046 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15047 | echo '.text' > conftest.s |
ba479fd2 NN |
15048 | if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5' |
15049 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15050 | (eval $ac_try) 2>&5 | |
15051 | ac_status=$? | |
15052 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15053 | (exit $ac_status); }; } | |
8ada417f ZW |
15054 | then |
15055 | gcc_cv_as_sparc_relax=yes | |
15056 | else | |
15057 | echo "configure: failed program was" >&5 | |
15058 | cat conftest.s >&5 | |
15059 | fi | |
15060 | rm -f conftest.o conftest.s | |
15061 | fi | |
cafe096b | 15062 | fi |
ba479fd2 NN |
15063 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5 |
15064 | echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6 | |
63cf211a | 15065 | if test $gcc_cv_as_sparc_relax = yes; then |
ba479fd2 NN |
15066 | |
15067 | cat >>confdefs.h <<\_ACEOF | |
e95b1e6a | 15068 | #define HAVE_AS_RELAX_OPTION 1 |
ba479fd2 | 15069 | _ACEOF |
e95b1e6a | 15070 | |
8ada417f | 15071 | fi |
e95b1e6a | 15072 | |
ba479fd2 NN |
15073 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5 |
15074 | echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6 | |
15075 | if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then | |
15076 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
17e9e88c | 15077 | else |
8ada417f ZW |
15078 | gcc_cv_as_sparc_ua_pcrel=no |
15079 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15080 | echo '.text |
8ada417f ZW |
15081 | foo: |
15082 | nop | |
15083 | .data | |
15084 | .align 4 | |
15085 | .byte 0 | |
15086 | .uaword %r_disp32(foo)' > conftest.s | |
ba479fd2 NN |
15087 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
15088 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15089 | (eval $ac_try) 2>&5 | |
15090 | ac_status=$? | |
15091 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15092 | (exit $ac_status); }; } | |
8ada417f ZW |
15093 | then |
15094 | if test x$gcc_cv_ld != x \ | |
15095 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
15096 | gcc_cv_as_sparc_ua_pcrel=yes | |
15097 | fi | |
15098 | rm -f conftest | |
15099 | else | |
15100 | echo "configure: failed program was" >&5 | |
15101 | cat conftest.s >&5 | |
15102 | fi | |
15103 | rm -f conftest.o conftest.s | |
15104 | fi | |
cafe096b | 15105 | fi |
ba479fd2 NN |
15106 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5 |
15107 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6 | |
63cf211a | 15108 | if test $gcc_cv_as_sparc_ua_pcrel = yes; then |
ba479fd2 NN |
15109 | |
15110 | cat >>confdefs.h <<\_ACEOF | |
17e9e88c | 15111 | #define HAVE_AS_SPARC_UA_PCREL 1 |
ba479fd2 | 15112 | _ACEOF |
17e9e88c | 15113 | |
17e9e88c | 15114 | |
ba479fd2 NN |
15115 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 |
15116 | echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6 | |
15117 | if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then | |
15118 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cf7b8b0d | 15119 | else |
8ada417f ZW |
15120 | gcc_cv_as_sparc_ua_pcrel_hidden=no |
15121 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15122 | echo '.data |
8ada417f ZW |
15123 | .align 4 |
15124 | .byte 0x31 | |
15125 | .uaword %r_disp32(foo) | |
15126 | .byte 0x32, 0x33, 0x34 | |
15127 | .global foo | |
15128 | .hidden foo | |
15129 | foo: | |
15130 | .skip 4' > conftest.s | |
ba479fd2 NN |
15131 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
15132 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15133 | (eval $ac_try) 2>&5 | |
15134 | ac_status=$? | |
15135 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15136 | (exit $ac_status); }; } | |
8ada417f ZW |
15137 | then |
15138 | if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \ | |
15139 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
15140 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
15141 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
15142 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
15143 | | grep 'DISP32' > /dev/null 2>&1; then | |
15144 | : | |
15145 | else | |
15146 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
cf7b8b0d | 15147 | fi |
8ada417f ZW |
15148 | fi |
15149 | rm -f conftest | |
15150 | else | |
15151 | echo "configure: failed program was" >&5 | |
15152 | cat conftest.s >&5 | |
15153 | fi | |
15154 | rm -f conftest.o conftest.s | |
15155 | fi | |
cafe096b | 15156 | fi |
ba479fd2 NN |
15157 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5 |
15158 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6 | |
63cf211a | 15159 | if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then |
ba479fd2 NN |
15160 | |
15161 | cat >>confdefs.h <<\_ACEOF | |
cf7b8b0d | 15162 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
ba479fd2 | 15163 | _ACEOF |
cf7b8b0d | 15164 | |
8ada417f | 15165 | fi |
ba479fd2 | 15166 | |
8ada417f | 15167 | fi # unaligned pcrel relocs |
cf7b8b0d | 15168 | |
ba479fd2 NN |
15169 | echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5 |
15170 | echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6 | |
15171 | if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then | |
15172 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 15173 | else |
8ada417f ZW |
15174 | gcc_cv_as_sparc_offsetable_lo10=no |
15175 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15176 | echo '.text |
8ada417f ZW |
15177 | or %g1, %lo(ab) + 12, %g1 |
15178 | or %g1, %lo(ab + 12), %g1' > conftest.s | |
ba479fd2 NN |
15179 | if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5' |
15180 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15181 | (eval $ac_try) 2>&5 | |
15182 | ac_status=$? | |
15183 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15184 | (exit $ac_status); }; } | |
8ada417f ZW |
15185 | then |
15186 | if test x$gcc_cv_objdump != x \ | |
ecb0ccbc | 15187 | && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ |
8ada417f | 15188 | | grep ' 82106000 82106000' > /dev/null 2>&1; then |
1b5c0152 | 15189 | gcc_cv_as_sparc_offsetable_lo10=yes |
8ada417f ZW |
15190 | fi |
15191 | else | |
15192 | echo "configure: failed program was" >&5 | |
15193 | cat conftest.s >&5 | |
15194 | fi | |
15195 | rm -f conftest.o conftest.s | |
15196 | fi | |
cafe096b | 15197 | fi |
ba479fd2 NN |
15198 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5 |
15199 | echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6 | |
63cf211a | 15200 | if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then |
ba479fd2 NN |
15201 | |
15202 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 15203 | #define HAVE_AS_OFFSETABLE_LO10 1 |
ba479fd2 | 15204 | _ACEOF |
1cb36a98 | 15205 | |
8ada417f | 15206 | fi |
1cb36a98 RH |
15207 | ;; |
15208 | ||
c307e6dd | 15209 | i[34567]86-*-* | x86_64-*-*) |
d38bc601 BF |
15210 | case $target_os in |
15211 | cygwin* | pe | mingw32*) | |
15212 | # Used for DWARF 2 in PE | |
15213 | echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5 | |
15214 | echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6 | |
15215 | if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then | |
15216 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15217 | else | |
15218 | gcc_cv_as_ix86_pe_secrel32=no | |
15219 | if test $in_tree_gas = yes; then | |
15220 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
15221 | then gcc_cv_as_ix86_pe_secrel32=yes | |
15222 | fi | |
15223 | elif test x$gcc_cv_as != x; then | |
15224 | echo '.text | |
15225 | foo: nop | |
15226 | .data | |
15227 | .secrel32 foo' > conftest.s | |
15228 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15229 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15230 | (eval $ac_try) 2>&5 | |
15231 | ac_status=$? | |
15232 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15233 | (exit $ac_status); }; } | |
15234 | then | |
15235 | if test x$gcc_cv_ld != x \ | |
15236 | && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then | |
15237 | gcc_cv_as_ix86_pe_secrel32=yes | |
15238 | fi | |
15239 | rm -f conftest | |
15240 | else | |
15241 | echo "configure: failed program was" >&5 | |
15242 | cat conftest.s >&5 | |
15243 | fi | |
15244 | rm -f conftest.o conftest.s | |
15245 | fi | |
15246 | fi | |
15247 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5 | |
15248 | echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6 | |
15249 | if test $gcc_cv_as_ix86_pe_secrel32 = yes; then | |
15250 | ||
15251 | cat >>confdefs.h <<\_ACEOF | |
15252 | #define HAVE_GAS_PE_SECREL32_RELOC 1 | |
15253 | _ACEOF | |
15254 | ||
15255 | fi | |
15256 | ;; | |
15257 | esac | |
15258 | ||
ba479fd2 NN |
15259 | echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5 |
15260 | echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6 | |
15261 | if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then | |
15262 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15263 | else |
15264 | gcc_cv_as_ix86_filds_fists=no | |
15265 | if test $in_tree_gas = yes; then | |
15266 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
15267 | then gcc_cv_as_ix86_filds_fists=yes | |
ad9c4d9f | 15268 | fi |
8ada417f | 15269 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15270 | echo 'filds mem; fists mem' > conftest.s |
ba479fd2 NN |
15271 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15272 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15273 | (eval $ac_try) 2>&5 | |
15274 | ac_status=$? | |
15275 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15276 | (exit $ac_status); }; } | |
8ada417f ZW |
15277 | then |
15278 | gcc_cv_as_ix86_filds_fists=yes | |
15279 | else | |
15280 | echo "configure: failed program was" >&5 | |
15281 | cat conftest.s >&5 | |
981d4858 | 15282 | fi |
8ada417f ZW |
15283 | rm -f conftest.o conftest.s |
15284 | fi | |
15285 | fi | |
ba479fd2 NN |
15286 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5 |
15287 | echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6 | |
63cf211a | 15288 | if test $gcc_cv_as_ix86_filds_fists = yes; then |
ba479fd2 NN |
15289 | |
15290 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 15291 | #define HAVE_GAS_FILDS_FISTS 1 |
ba479fd2 | 15292 | _ACEOF |
ad9c4d9f | 15293 | |
f6f5dff2 RO |
15294 | fi |
15295 | ||
ba479fd2 NN |
15296 | echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5 |
15297 | echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6 | |
15298 | if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then | |
15299 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f6f5dff2 RO |
15300 | else |
15301 | gcc_cv_as_ix86_cmov_sun_syntax=no | |
15302 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15303 | echo 'cmovl.l %edx, %eax' > conftest.s |
ba479fd2 NN |
15304 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15305 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15306 | (eval $ac_try) 2>&5 | |
15307 | ac_status=$? | |
15308 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15309 | (exit $ac_status); }; } | |
f6f5dff2 RO |
15310 | then |
15311 | gcc_cv_as_ix86_cmov_sun_syntax=yes | |
15312 | else | |
15313 | echo "configure: failed program was" >&5 | |
15314 | cat conftest.s >&5 | |
15315 | fi | |
15316 | rm -f conftest.o conftest.s | |
15317 | fi | |
15318 | fi | |
ba479fd2 NN |
15319 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5 |
15320 | echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6 | |
63cf211a | 15321 | if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then |
ba479fd2 NN |
15322 | |
15323 | cat >>confdefs.h <<\_ACEOF | |
f6f5dff2 | 15324 | #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1 |
ba479fd2 | 15325 | _ACEOF |
f6f5dff2 | 15326 | |
ad9c4d9f NN |
15327 | fi |
15328 | ||
6f3ca281 ZW |
15329 | # This one is used unconditionally by i386.[ch]; it is to be defined |
15330 | # to 1 if the feature is present, 0 otherwise. | |
ba479fd2 NN |
15331 | echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5 |
15332 | echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6 | |
15333 | if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then | |
15334 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15335 | else |
15336 | gcc_cv_as_ix86_gotoff_in_data=no | |
15337 | if test $in_tree_gas = yes; then | |
15338 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15339 | then gcc_cv_as_ix86_gotoff_in_data=yes | |
15340 | fi | |
15341 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15342 | echo ' .text |
f88c65f7 RH |
15343 | .L0: |
15344 | nop | |
15345 | .data | |
8ada417f | 15346 | .long .L0@GOTOFF' > conftest.s |
ba479fd2 NN |
15347 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15348 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15349 | (eval $ac_try) 2>&5 | |
15350 | ac_status=$? | |
15351 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15352 | (exit $ac_status); }; } | |
8ada417f ZW |
15353 | then |
15354 | gcc_cv_as_ix86_gotoff_in_data=yes | |
15355 | else | |
15356 | echo "configure: failed program was" >&5 | |
15357 | cat conftest.s >&5 | |
f88c65f7 | 15358 | fi |
8ada417f ZW |
15359 | rm -f conftest.o conftest.s |
15360 | fi | |
15361 | fi | |
ba479fd2 NN |
15362 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5 |
15363 | echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6 | |
8ada417f | 15364 | |
6f3ca281 | 15365 | |
ba479fd2 | 15366 | cat >>confdefs.h <<_ACEOF |
6f3ca281 | 15367 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 15368 | _ACEOF |
f88c65f7 | 15369 | |
1cb36a98 | 15370 | ;; |
ef1ecf87 RH |
15371 | |
15372 | ia64*-*-*) | |
ba479fd2 NN |
15373 | echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5 |
15374 | echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6 | |
15375 | if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then | |
15376 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ef1ecf87 | 15377 | else |
8ada417f ZW |
15378 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no |
15379 | if test $in_tree_gas = yes; then | |
15380 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15381 | then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes | |
ad9c4d9f | 15382 | fi |
8ada417f | 15383 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15384 | echo ' .text |
ef1ecf87 RH |
15385 | addl r15 = @ltoffx(x#), gp |
15386 | ;; | |
cfa9ee99 | 15387 | ld8.mov r16 = [r15], x#' > conftest.s |
ba479fd2 NN |
15388 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15389 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15390 | (eval $ac_try) 2>&5 | |
15391 | ac_status=$? | |
15392 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15393 | (exit $ac_status); }; } | |
8ada417f | 15394 | then |
cfa9ee99 | 15395 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes |
8ada417f ZW |
15396 | else |
15397 | echo "configure: failed program was" >&5 | |
15398 | cat conftest.s >&5 | |
2c4a9cff | 15399 | fi |
8ada417f ZW |
15400 | rm -f conftest.o conftest.s |
15401 | fi | |
15402 | fi | |
ba479fd2 NN |
15403 | echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5 |
15404 | echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6 | |
63cf211a | 15405 | if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then |
ba479fd2 NN |
15406 | |
15407 | cat >>confdefs.h <<\_ACEOF | |
cfa9ee99 | 15408 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
ba479fd2 | 15409 | _ACEOF |
8ada417f | 15410 | |
cfa9ee99 | 15411 | fi |
8ada417f | 15412 | |
2c4a9cff | 15413 | ;; |
8ada417f | 15414 | |
2c4a9cff | 15415 | powerpc*-*-*) |
8ada417f | 15416 | case $target in |
432218ba DE |
15417 | *-*-aix*) conftest_s=' .machine "pwr5" |
15418 | .csect .text[PR] | |
6b37db3c | 15419 | mfcr 3,128';; |
8af4d362 PB |
15420 | *-*-darwin*) |
15421 | echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5 | |
15422 | echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6 | |
15423 | if test "${gcc_cv_as_machine_directive+set}" = set; then | |
15424 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15425 | else | |
15426 | gcc_cv_as_machine_directive=no | |
15427 | if test x$gcc_cv_as != x; then | |
15428 | echo ' .machine ppc7400' > conftest.s | |
15429 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15430 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15431 | (eval $ac_try) 2>&5 | |
15432 | ac_status=$? | |
15433 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15434 | (exit $ac_status); }; } | |
15435 | then | |
15436 | gcc_cv_as_machine_directive=yes | |
15437 | else | |
15438 | echo "configure: failed program was" >&5 | |
15439 | cat conftest.s >&5 | |
15440 | fi | |
15441 | rm -f conftest.o conftest.s | |
15442 | fi | |
15443 | fi | |
15444 | echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5 | |
15445 | echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6 | |
15446 | ||
15447 | if test x$gcc_cv_as_machine_directive != xyes; then | |
15448 | echo "*** This target requires an assembler supporting \".machine\"" >&2 | |
15449 | echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2 | |
15450 | test x$build = x$target && exit 1 | |
15451 | fi | |
15452 | conftest_s=' .text | |
6b37db3c | 15453 | mfcr r3,128';; |
4c67db14 | 15454 | *) conftest_s=' .machine power4 |
d2ab3e37 | 15455 | .text |
6b37db3c | 15456 | mfcr 3,128';; |
8ada417f | 15457 | esac |
8ada417f | 15458 | |
ba479fd2 NN |
15459 | echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5 |
15460 | echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6 | |
15461 | if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then | |
15462 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2c4a9cff | 15463 | else |
8ada417f ZW |
15464 | gcc_cv_as_powerpc_mfcrf=no |
15465 | if test $in_tree_gas = yes; then | |
15466 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15467 | then gcc_cv_as_powerpc_mfcrf=yes | |
2c4a9cff | 15468 | fi |
8ada417f | 15469 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15470 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
15471 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15472 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15473 | (eval $ac_try) 2>&5 | |
15474 | ac_status=$? | |
15475 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15476 | (exit $ac_status); }; } | |
8ada417f ZW |
15477 | then |
15478 | gcc_cv_as_powerpc_mfcrf=yes | |
15479 | else | |
15480 | echo "configure: failed program was" >&5 | |
15481 | cat conftest.s >&5 | |
15482 | fi | |
15483 | rm -f conftest.o conftest.s | |
15484 | fi | |
2c4a9cff | 15485 | fi |
ba479fd2 NN |
15486 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5 |
15487 | echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6 | |
63cf211a | 15488 | if test $gcc_cv_as_powerpc_mfcrf = yes; then |
ba479fd2 NN |
15489 | |
15490 | cat >>confdefs.h <<\_ACEOF | |
2c4a9cff | 15491 | #define HAVE_AS_MFCRF 1 |
ba479fd2 | 15492 | _ACEOF |
ef1ecf87 | 15493 | |
8ada417f | 15494 | fi |
432218ba DE |
15495 | |
15496 | case $target in | |
15497 | *-*-aix*) conftest_s=' .machine "pwr5" | |
15498 | .csect .text[PR] | |
15499 | popcntb 3,3';; | |
15500 | *) conftest_s=' .machine power5 | |
15501 | .text | |
15502 | popcntb 3,3';; | |
15503 | esac | |
15504 | ||
15505 | echo "$as_me:$LINENO: checking assembler for popcntb support" >&5 | |
15506 | echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6 | |
15507 | if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then | |
15508 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15509 | else | |
15510 | gcc_cv_as_powerpc_popcntb=no | |
15511 | if test $in_tree_gas = yes; then | |
15512 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15513 | then gcc_cv_as_powerpc_popcntb=yes | |
15514 | fi | |
15515 | elif test x$gcc_cv_as != x; then | |
15516 | echo "$conftest_s" > conftest.s | |
15517 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15518 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15519 | (eval $ac_try) 2>&5 | |
15520 | ac_status=$? | |
15521 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15522 | (exit $ac_status); }; } | |
15523 | then | |
15524 | gcc_cv_as_powerpc_popcntb=yes | |
15525 | else | |
15526 | echo "configure: failed program was" >&5 | |
15527 | cat conftest.s >&5 | |
15528 | fi | |
15529 | rm -f conftest.o conftest.s | |
15530 | fi | |
15531 | fi | |
15532 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5 | |
15533 | echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6 | |
15534 | if test $gcc_cv_as_powerpc_popcntb = yes; then | |
15535 | ||
15536 | cat >>confdefs.h <<\_ACEOF | |
15537 | #define HAVE_AS_POPCNTB 1 | |
15538 | _ACEOF | |
15539 | ||
15540 | fi | |
15541 | ||
7f970b70 AM |
15542 | case $target in |
15543 | *-*-aix*) conftest_s=' .csect .text[PR] | |
15544 | LCF..0: | |
15545 | addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';; | |
15546 | *-*-darwin*) | |
15547 | conftest_s=' .text | |
15548 | LCF0: | |
15549 | addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';; | |
15550 | *) conftest_s=' .text | |
15551 | .LCF0: | |
15552 | addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';; | |
15553 | esac | |
15554 | ||
15555 | echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5 | |
15556 | echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6 | |
15557 | if test "${gcc_cv_as_powerpc_rel16+set}" = set; then | |
15558 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15559 | else | |
15560 | gcc_cv_as_powerpc_rel16=no | |
15561 | if test $in_tree_gas = yes; then | |
15562 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15563 | then gcc_cv_as_powerpc_rel16=yes | |
15564 | fi | |
15565 | elif test x$gcc_cv_as != x; then | |
15566 | echo "$conftest_s" > conftest.s | |
15567 | if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5' | |
15568 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15569 | (eval $ac_try) 2>&5 | |
15570 | ac_status=$? | |
15571 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15572 | (exit $ac_status); }; } | |
15573 | then | |
15574 | gcc_cv_as_powerpc_rel16=yes | |
15575 | else | |
15576 | echo "configure: failed program was" >&5 | |
15577 | cat conftest.s >&5 | |
15578 | fi | |
15579 | rm -f conftest.o conftest.s | |
15580 | fi | |
15581 | fi | |
15582 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5 | |
15583 | echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6 | |
15584 | if test $gcc_cv_as_powerpc_rel16 = yes; then | |
15585 | ||
15586 | cat >>confdefs.h <<\_ACEOF | |
15587 | #define HAVE_AS_REL16 1 | |
15588 | _ACEOF | |
15589 | ||
15590 | fi | |
8ada417f ZW |
15591 | ;; |
15592 | ||
15593 | mips*-*-*) | |
ba479fd2 NN |
15594 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
15595 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
15596 | if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then | |
15597 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15598 | else |
15599 | gcc_cv_as_mips_explicit_relocs=no | |
15600 | if test $in_tree_gas = yes; then | |
15601 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15602 | then gcc_cv_as_mips_explicit_relocs=yes | |
15603 | fi | |
15604 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15605 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
ba479fd2 NN |
15606 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15607 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15608 | (eval $ac_try) 2>&5 | |
15609 | ac_status=$? | |
15610 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15611 | (exit $ac_status); }; } | |
8ada417f ZW |
15612 | then |
15613 | gcc_cv_as_mips_explicit_relocs=yes | |
15614 | else | |
15615 | echo "configure: failed program was" >&5 | |
15616 | cat conftest.s >&5 | |
ef1ecf87 | 15617 | fi |
8ada417f ZW |
15618 | rm -f conftest.o conftest.s |
15619 | fi | |
15620 | fi | |
ba479fd2 NN |
15621 | echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5 |
15622 | echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6 | |
8ada417f ZW |
15623 | if test $gcc_cv_as_mips_explicit_relocs = yes; then |
15624 | if test x$target_cpu_default = x | |
15625 | then target_cpu_default=MASK_EXPLICIT_RELOCS | |
15626 | else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" | |
15627 | fi | |
15628 | fi | |
dbad5e72 SE |
15629 | ;; |
15630 | esac | |
8ada417f | 15631 | |
dbad5e72 SE |
15632 | # Mips and HP-UX need the GNU assembler. |
15633 | # Linux on IA64 might be able to use the Intel assembler. | |
15634 | ||
15635 | case "$target" in | |
15636 | mips*-*-* | *-*-hpux* ) | |
82563d35 RS |
15637 | if test x$gas_flag = xyes \ |
15638 | || test x"$host" != x"$build" \ | |
15639 | || test ! -x "$gcc_cv_as" \ | |
15640 | || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then | |
15641 | : | |
15642 | else | |
15643 | echo "*** This configuration requires the GNU assembler" >&2 | |
15644 | exit 1 | |
15645 | fi | |
ef1ecf87 | 15646 | ;; |
1cb36a98 | 15647 | esac |
dbad5e72 | 15648 | |
9d147085 RH |
15649 | # ??? Not all targets support dwarf2 debug_line, even within a version |
15650 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
15651 | # info to the output file. So, as supported targets are added to gas 2.11, | |
15652 | # add some instruction here to (also) show we expect this might work. | |
15653 | # ??? Once 2.11 is released, probably need to add first known working | |
15654 | # version to the per-target configury. | |
15655 | case "$target" in | |
80486e06 | 15656 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
2853bc5a | 15657 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ |
6afdc741 | 15658 | | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-*) |
9d147085 RH |
15659 | insn="nop" |
15660 | ;; | |
57116d8d | 15661 | ia64*-*-* | s390*-*-*) |
9d147085 RH |
15662 | insn="nop 0" |
15663 | ;; | |
2853bc5a HPN |
15664 | mmix-*-*) |
15665 | insn="swym 0" | |
15666 | ;; | |
8ada417f ZW |
15667 | esac |
15668 | if test x"$insn" != x; then | |
15669 | conftest_s="\ | |
15670 | .file 1 \"conftest.s\" | |
15671 | .loc 1 3 0 | |
15672 | $insn" | |
ba479fd2 NN |
15673 | echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5 |
15674 | echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6 | |
15675 | if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then | |
15676 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15677 | else |
15678 | gcc_cv_as_dwarf2_debug_line=no | |
15679 | if test $in_tree_gas = yes; then | |
15680 | if test $in_tree_gas_is_elf = yes \ | |
15681 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15682 | then gcc_cv_as_dwarf2_debug_line=yes | |
15683 | fi | |
15684 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15685 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
15686 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15687 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15688 | (eval $ac_try) 2>&5 | |
15689 | ac_status=$? | |
15690 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15691 | (exit $ac_status); }; } | |
8ada417f | 15692 | then |
080a5bb0 EB |
15693 | if test x$gcc_cv_objdump != x \ |
15694 | && $gcc_cv_objdump -h conftest.o 2> /dev/null \ | |
15695 | | grep debug_line > /dev/null 2>&1; then | |
8ada417f ZW |
15696 | gcc_cv_as_dwarf2_debug_line=yes |
15697 | fi | |
15698 | else | |
15699 | echo "configure: failed program was" >&5 | |
15700 | cat conftest.s >&5 | |
15701 | fi | |
15702 | rm -f conftest.o conftest.s | |
15703 | fi | |
15704 | fi | |
ba479fd2 NN |
15705 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5 |
15706 | echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6 | |
ad9c4d9f | 15707 | |
ad9c4d9f | 15708 | |
8ada417f ZW |
15709 | # The .debug_line file table must be in the exact order that |
15710 | # we specified the files, since these indices are also used | |
15711 | # by DW_AT_decl_file. Approximate this test by testing if | |
15712 | # the assembler bitches if the same index is assigned twice. | |
ba479fd2 NN |
15713 | echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5 |
15714 | echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6 | |
15715 | if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then | |
15716 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15717 | else |
15718 | gcc_cv_as_dwarf2_file_buggy=no | |
15719 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15720 | echo ' .file 1 "foo.s" |
8ada417f | 15721 | .file 1 "bar.s"' > conftest.s |
ba479fd2 NN |
15722 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15723 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15724 | (eval $ac_try) 2>&5 | |
15725 | ac_status=$? | |
15726 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15727 | (exit $ac_status); }; } | |
8ada417f ZW |
15728 | then |
15729 | gcc_cv_as_dwarf2_file_buggy=yes | |
15730 | else | |
15731 | echo "configure: failed program was" >&5 | |
15732 | cat conftest.s >&5 | |
15733 | fi | |
15734 | rm -f conftest.o conftest.s | |
15735 | fi | |
ad9c4d9f | 15736 | fi |
ba479fd2 NN |
15737 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5 |
15738 | echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6 | |
8ada417f ZW |
15739 | |
15740 | ||
15741 | if test $gcc_cv_as_dwarf2_debug_line = yes \ | |
15742 | && test $gcc_cv_as_dwarf2_file_buggy = no; then | |
ba479fd2 NN |
15743 | |
15744 | cat >>confdefs.h <<\_ACEOF | |
9d147085 | 15745 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
ba479fd2 | 15746 | _ACEOF |
9d147085 | 15747 | |
8ada417f | 15748 | fi |
ad9c4d9f | 15749 | |
ba479fd2 NN |
15750 | echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5 |
15751 | echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6 | |
15752 | if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then | |
15753 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15754 | else |
15755 | gcc_cv_as_gdwarf2_flag=no | |
15756 | if test $in_tree_gas = yes; then | |
15757 | if test $in_tree_gas_is_elf = yes \ | |
15758 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15759 | then gcc_cv_as_gdwarf2_flag=yes | |
15760 | fi | |
15761 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15762 | echo "$insn" > conftest.s |
ba479fd2 NN |
15763 | if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5' |
15764 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15765 | (eval $ac_try) 2>&5 | |
15766 | ac_status=$? | |
15767 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15768 | (exit $ac_status); }; } | |
8ada417f ZW |
15769 | then |
15770 | gcc_cv_as_gdwarf2_flag=yes | |
15771 | else | |
15772 | echo "configure: failed program was" >&5 | |
15773 | cat conftest.s >&5 | |
15774 | fi | |
15775 | rm -f conftest.o conftest.s | |
15776 | fi | |
ad9c4d9f | 15777 | fi |
ba479fd2 NN |
15778 | echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5 |
15779 | echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6 | |
63cf211a | 15780 | if test $gcc_cv_as_gdwarf2_flag = yes; then |
ba479fd2 NN |
15781 | |
15782 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 15783 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
ba479fd2 | 15784 | _ACEOF |
5f0e9ea2 GK |
15785 | |
15786 | fi | |
ad9c4d9f | 15787 | |
ba479fd2 NN |
15788 | echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5 |
15789 | echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6 | |
15790 | if test "${gcc_cv_as_gstabs_flag+set}" = set; then | |
15791 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15792 | else |
15793 | gcc_cv_as_gstabs_flag=no | |
15794 | if test $in_tree_gas = yes; then | |
15795 | if test $in_tree_gas_is_elf = yes \ | |
15796 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15797 | then gcc_cv_as_gstabs_flag=yes | |
15798 | fi | |
15799 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15800 | echo "$insn" > conftest.s |
ba479fd2 NN |
15801 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5' |
15802 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15803 | (eval $ac_try) 2>&5 | |
15804 | ac_status=$? | |
15805 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15806 | (exit $ac_status); }; } | |
8ada417f ZW |
15807 | then |
15808 | # The native Solaris 9/Intel assembler doesn't understand --gstabs | |
15809 | # and warns about it, but still exits successfully. So check for | |
15810 | # this. | |
ba479fd2 NN |
15811 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null' |
15812 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15813 | (eval $ac_try) 2>&5 | |
15814 | ac_status=$? | |
15815 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15816 | (exit $ac_status); }; } | |
8ada417f ZW |
15817 | then : |
15818 | else gcc_cv_as_gstabs_flag=yes | |
15819 | fi | |
15820 | else | |
15821 | echo "configure: failed program was" >&5 | |
15822 | cat conftest.s >&5 | |
15823 | fi | |
15824 | rm -f conftest.o conftest.s | |
15825 | fi | |
ad9c4d9f | 15826 | fi |
ba479fd2 NN |
15827 | echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5 |
15828 | echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6 | |
63cf211a | 15829 | if test $gcc_cv_as_gstabs_flag = yes; then |
ba479fd2 NN |
15830 | |
15831 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 15832 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
ba479fd2 | 15833 | _ACEOF |
5f0e9ea2 GK |
15834 | |
15835 | fi | |
8ada417f | 15836 | fi |
5f0e9ea2 | 15837 | |
ba479fd2 NN |
15838 | echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5 |
15839 | echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6 | |
96d0f4dc | 15840 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 15841 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
15842 | 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 \ |
15843 | && test $in_tree_ld_is_elf = yes; then | |
96d0f4dc JJ |
15844 | gcc_cv_ld_ro_rw_mix=read-write |
15845 | fi | |
15846 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
15847 | echo '.section myfoosect, "a"' > conftest1.s |
15848 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 15849 | echo '.byte 1' >> conftest2.s |
90e145da | 15850 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 15851 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
15852 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
15853 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
15854 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 15855 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 15856 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 15857 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 15858 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
15859 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
15860 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
15861 | gcc_cv_ld_ro_rw_mix=read-only | |
15862 | else | |
15863 | gcc_cv_ld_ro_rw_mix=read-write | |
15864 | fi | |
15865 | fi | |
15866 | fi | |
15867 | rm -f conftest.* conftest[123].* | |
15868 | fi | |
15869 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
ba479fd2 NN |
15870 | |
15871 | cat >>confdefs.h <<\_ACEOF | |
96d0f4dc | 15872 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
ba479fd2 | 15873 | _ACEOF |
96d0f4dc JJ |
15874 | |
15875 | fi | |
ba479fd2 NN |
15876 | echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5 |
15877 | echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6 | |
96d0f4dc | 15878 | |
ba479fd2 NN |
15879 | echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5 |
15880 | echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6 | |
275b60d6 | 15881 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 15882 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
15883 | 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 \ |
15884 | && test $in_tree_ld_is_elf = yes; then | |
275b60d6 JJ |
15885 | gcc_cv_ld_eh_frame_hdr=yes |
15886 | fi | |
15887 | elif test x$gcc_cv_ld != x; then | |
15888 | # Check if linker supports --eh-frame-hdr option | |
15889 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
15890 | gcc_cv_ld_eh_frame_hdr=yes | |
15891 | fi | |
15892 | fi | |
232b67d9 | 15893 | |
275b60d6 | 15894 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then |
ba479fd2 NN |
15895 | |
15896 | cat >>confdefs.h <<\_ACEOF | |
275b60d6 | 15897 | #define HAVE_LD_EH_FRAME_HDR 1 |
ba479fd2 | 15898 | _ACEOF |
275b60d6 JJ |
15899 | |
15900 | fi | |
ba479fd2 NN |
15901 | echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5 |
15902 | echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6 | |
275b60d6 | 15903 | |
ba479fd2 NN |
15904 | echo "$as_me:$LINENO: checking linker position independent executable support" >&5 |
15905 | echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6 | |
24a4dd31 JJ |
15906 | gcc_cv_ld_pie=no |
15907 | if test $in_tree_ld = yes ; then | |
5408ac6c HPN |
15908 | 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 \ |
15909 | && test $in_tree_ld_is_elf = yes; then | |
24a4dd31 JJ |
15910 | gcc_cv_ld_pie=yes |
15911 | fi | |
15912 | elif test x$gcc_cv_ld != x; then | |
15913 | # Check if linker supports -pie option | |
15914 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
15915 | gcc_cv_ld_pie=yes | |
15916 | fi | |
15917 | fi | |
15918 | if test x"$gcc_cv_ld_pie" = xyes; then | |
ba479fd2 NN |
15919 | |
15920 | cat >>confdefs.h <<\_ACEOF | |
24a4dd31 | 15921 | #define HAVE_LD_PIE 1 |
ba479fd2 | 15922 | _ACEOF |
24a4dd31 JJ |
15923 | |
15924 | fi | |
ba479fd2 NN |
15925 | echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5 |
15926 | echo "${ECHO_T}$gcc_cv_ld_pie" >&6 | |
24a4dd31 | 15927 | |
8bb915b6 NN |
15928 | # -------- |
15929 | # UNSORTED | |
15930 | # -------- | |
15931 | ||
765f1bf9 AM |
15932 | echo "$as_me:$LINENO: checking linker --as-needed support" >&5 |
15933 | echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6 | |
82e923f6 RS |
15934 | if test "${gcc_cv_ld_as_needed+set}" = set; then |
15935 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15936 | else | |
15937 | gcc_cv_ld_as_needed=no | |
765f1bf9 AM |
15938 | if test $in_tree_ld = yes ; then |
15939 | 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 \ | |
15940 | && test $in_tree_ld_is_elf = yes; then | |
15941 | gcc_cv_ld_as_needed=yes | |
15942 | fi | |
15943 | elif test x$gcc_cv_ld != x; then | |
15944 | # Check if linker supports --as-needed and --no-as-needed options | |
15945 | if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then | |
15946 | gcc_cv_ld_as_needed=yes | |
15947 | fi | |
15948 | fi | |
82e923f6 RS |
15949 | |
15950 | fi | |
15951 | echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5 | |
15952 | echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6 | |
765f1bf9 AM |
15953 | if test x"$gcc_cv_ld_as_needed" = xyes; then |
15954 | ||
15955 | cat >>confdefs.h <<\_ACEOF | |
15956 | #define HAVE_LD_AS_NEEDED 1 | |
15957 | _ACEOF | |
15958 | ||
15959 | fi | |
765f1bf9 | 15960 | |
d82bf747 AM |
15961 | case "$target:$tm_file" in |
15962 | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) | |
85b776df AM |
15963 | echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5 |
15964 | echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6 | |
15965 | if test "${gcc_cv_ld_no_dot_syms+set}" = set; then | |
15966 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15967 | else | |
15968 | gcc_cv_ld_no_dot_syms=no | |
15969 | if test $in_tree_ld = yes ; then | |
15970 | 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 | |
15971 | gcc_cv_ld_no_dot_syms=yes | |
15972 | fi | |
15973 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then | |
15974 | cat > conftest1.s <<EOF | |
15975 | .text | |
15976 | bl .foo | |
15977 | EOF | |
15978 | cat > conftest2.s <<EOF | |
15979 | .section ".opd","aw" | |
15980 | .align 3 | |
15981 | .globl foo | |
15982 | .type foo,@function | |
15983 | foo: | |
15984 | .quad .LEfoo,.TOC.@tocbase,0 | |
15985 | .text | |
15986 | .LEfoo: | |
15987 | blr | |
15988 | .size foo,.-.LEfoo | |
15989 | EOF | |
15990 | if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \ | |
15991 | && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
15992 | && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then | |
15993 | gcc_cv_ld_no_dot_syms=yes | |
15994 | fi | |
15995 | rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s | |
15996 | fi | |
15997 | ||
15998 | fi | |
15999 | echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5 | |
16000 | echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6 | |
16001 | if test x"$gcc_cv_ld_no_dot_syms" = xyes; then | |
16002 | ||
16003 | cat >>confdefs.h <<\_ACEOF | |
16004 | #define HAVE_LD_NO_DOT_SYMS 1 | |
16005 | _ACEOF | |
16006 | ||
16007 | fi | |
16008 | ;; | |
16009 | esac | |
16010 | ||
380e5ca4 MM |
16011 | echo "$as_me:$LINENO: checking linker --sysroot support" >&5 |
16012 | echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6 | |
16013 | if test "${gcc_cv_ld_sysroot+set}" = set; then | |
16014 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16015 | else | |
16016 | gcc_cv_ld_sysroot=no | |
16017 | if test $in_tree_ld = yes ; then | |
16018 | 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 | 16019 | gcc_cv_ld_sysroot=yes |
380e5ca4 MM |
16020 | fi |
16021 | elif test x$gcc_cv_ld != x; then | |
16022 | if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then | |
16023 | gcc_cv_ld_sysroot=yes | |
16024 | fi | |
16025 | fi | |
16026 | fi | |
16027 | echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5 | |
16028 | echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6 | |
16029 | if test x"$gcc_cv_ld_sysroot" = xyes; then | |
16030 | ||
16031 | cat >>confdefs.h <<\_ACEOF | |
16032 | #define HAVE_LD_SYSROOT 1 | |
16033 | _ACEOF | |
16034 | ||
16035 | fi | |
16036 | ||
9fb28a67 | 16037 | if test x$with_sysroot = x && test x$host = x$target \ |
047d636f | 16038 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then |
ba479fd2 NN |
16039 | |
16040 | cat >>confdefs.h <<_ACEOF | |
793e9558 | 16041 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
ba479fd2 | 16042 | _ACEOF |
793e9558 PB |
16043 | |
16044 | fi | |
16045 | ||
77008252 JJ |
16046 | # Test for stack protector support in target C library. |
16047 | case "$target" in | |
16048 | *-*-linux*) | |
16049 | echo "$as_me:$LINENO: checking __stack_chk_fail in target GNU C library" >&5 | |
16050 | echo $ECHO_N "checking __stack_chk_fail in target GNU C library... $ECHO_C" >&6 | |
16051 | if test "${gcc_cv_libc_provides_ssp+set}" = set; then | |
16052 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16053 | else | |
16054 | gcc_cv_libc_provides_ssp=no | |
16055 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then | |
16056 | if test "x$with_sysroot" = x; then | |
16057 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
16058 | elif test "x$with_sysroot" = xyes; then | |
16059 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
16060 | else | |
16061 | glibc_header_dir="${with_sysroot}/usr/include" | |
16062 | fi | |
16063 | else | |
16064 | glibc_header_dir=/usr/include | |
16065 | fi | |
16066 | # glibc 2.4 and later provides __stack_chk_fail and | |
16067 | # either __stack_chk_guard, or TLS access to stack guard canary. | |
16068 | if test -f $glibc_header_dir/features.h \ | |
16069 | && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \ | |
16070 | $glibc_header_dir/features.h > /dev/null; then | |
16071 | if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \ | |
16072 | $glibc_header_dir/features.h > /dev/null; then | |
16073 | gcc_cv_libc_provides_ssp=yes | |
16074 | elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \ | |
16075 | $glibc_header_dir/features.h > /dev/null \ | |
16076 | && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \ | |
16077 | $glibc_header_dir/features.h > /dev/null; then | |
16078 | gcc_cv_libc_provides_ssp=yes | |
16079 | fi | |
16080 | fi | |
16081 | fi | |
16082 | echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5 | |
16083 | echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6 ;; | |
16084 | *) gcc_cv_libc_provides_ssp=no ;; | |
16085 | esac | |
16086 | if test x$gcc_cv_libc_provides_ssp = xyes; then | |
16087 | ||
16088 | cat >>confdefs.h <<\_ACEOF | |
16089 | #define TARGET_LIBC_PROVIDES_SSP 1 | |
16090 | _ACEOF | |
16091 | ||
16092 | fi | |
16093 | ||
81bf3d9e | 16094 | # Find out what GC implementation we want, or may, use. |
ba479fd2 | 16095 | |
81bf3d9e RH |
16096 | # Check whether --with-gc or --without-gc was given. |
16097 | if test "${with_gc+set}" = set; then | |
16098 | withval="$with_gc" | |
16099 | case "$withval" in | |
08cee789 | 16100 | page) |
81bf3d9e | 16101 | GGC=ggc-$withval |
08cee789 DJ |
16102 | ;; |
16103 | zone) | |
16104 | GGC=ggc-$withval | |
16105 | ||
16106 | cat >>confdefs.h <<\_ACEOF | |
16107 | #define GGC_ZONE 1 | |
16108 | _ACEOF | |
16109 | ||
81bf3d9e RH |
16110 | ;; |
16111 | *) | |
ba479fd2 NN |
16112 | { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5 |
16113 | echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;} | |
16114 | { (exit 1); exit 1; }; } | |
81bf3d9e RH |
16115 | ;; |
16116 | esac | |
16117 | else | |
005537df | 16118 | GGC=ggc-page |
ba479fd2 | 16119 | fi; |
81bf3d9e RH |
16120 | |
16121 | echo "Using $GGC for garbage collection." | |
16122 | ||
3c809ba4 | 16123 | # Use the system's zlib library. |
b8dad04b ZW |
16124 | zlibdir=-L../zlib |
16125 | zlibinc="-I\$(srcdir)/../zlib" | |
ba479fd2 | 16126 | |
3c809ba4 AG |
16127 | # Check whether --with-system-zlib or --without-system-zlib was given. |
16128 | if test "${with_system_zlib+set}" = set; then | |
16129 | withval="$with_system_zlib" | |
16130 | zlibdir= | |
16131 | zlibinc= | |
16132 | ||
ba479fd2 | 16133 | fi; |
3c809ba4 AG |
16134 | |
16135 | ||
16136 | ||
dc6746e7 | 16137 | |
ba479fd2 NN |
16138 | echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
16139 | echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 | |
dc6746e7 PT |
16140 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
16141 | if test "${enable_maintainer_mode+set}" = set; then | |
16142 | enableval="$enable_maintainer_mode" | |
16143 | maintainer_mode=$enableval | |
16144 | else | |
16145 | maintainer_mode=no | |
ba479fd2 | 16146 | fi; |
63cf211a | 16147 | |
ba479fd2 NN |
16148 | echo "$as_me:$LINENO: result: $maintainer_mode" >&5 |
16149 | echo "${ECHO_T}$maintainer_mode" >&6 | |
dc6746e7 PT |
16150 | |
16151 | if test "$maintainer_mode" = "yes"; then | |
16152 | MAINT='' | |
16153 | else | |
16154 | MAINT='#' | |
16155 | fi | |
16156 | ||
8bb915b6 NN |
16157 | # -------------- |
16158 | # Language hooks | |
16159 | # -------------- | |
16160 | ||
861bb6c1 JL |
16161 | # Make empty files to contain the specs and options for each language. |
16162 | # Then add #include lines to for a compiler that has specs and/or options. | |
16163 | ||
d7b42618 | 16164 | lang_opt_files= |
861bb6c1 | 16165 | lang_specs_files= |
3103b7db | 16166 | lang_tree_files= |
861bb6c1 JL |
16167 | for subdir in . $subdirs |
16168 | do | |
d7b42618 NB |
16169 | if test -f $srcdir/$subdir/lang.opt; then |
16170 | lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" | |
16171 | fi | |
75bffa71 | 16172 | if test -f $srcdir/$subdir/lang-specs.h; then |
0d24f4d1 | 16173 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" |
861bb6c1 | 16174 | fi |
3103b7db | 16175 | if test -f $srcdir/$subdir/$subdir-tree.def; then |
0d24f4d1 | 16176 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" |
3103b7db | 16177 | fi |
861bb6c1 JL |
16178 | done |
16179 | ||
16180 | # These (without "all_") are set in each config-lang.in. | |
16181 | # `language' must be a single word so is spelled singularly. | |
16182 | all_languages= | |
16183 | all_boot_languages= | |
16184 | all_compilers= | |
16185 | all_stagestuff= | |
53c7ffe7 | 16186 | all_outputs='Makefile gccbug mklibgcc libada-mk' |
861bb6c1 | 16187 | # List of language makefile fragments. |
2ed26f6b ZW |
16188 | all_lang_makefrags= |
16189 | # List of language subdirectory makefiles. Deprecated. | |
861bb6c1 | 16190 | all_lang_makefiles= |
e2500fed | 16191 | # Files for gengtype |
ef69da62 | 16192 | all_gtfiles="$target_gtfiles" |
8ac9d31f TJ |
16193 | # Files for gengtype with language |
16194 | all_gtfiles_files_langs= | |
16195 | all_gtfiles_files_files= | |
861bb6c1 JL |
16196 | |
16197 | # Add the language fragments. | |
16198 | # Languages are added via two mechanisms. Some information must be | |
16199 | # recorded in makefile variables, these are defined in config-lang.in. | |
16200 | # We accumulate them and plug them into the main Makefile. | |
16201 | # The other mechanism is a set of hooks for each of the main targets | |
16202 | # like `clean', `install', etc. | |
16203 | ||
861bb6c1 | 16204 | language_hooks="Make-hooks" |
861bb6c1 | 16205 | |
c406e779 | 16206 | for s in $subdirs |
861bb6c1 | 16207 | do |
861bb6c1 JL |
16208 | language= |
16209 | boot_language= | |
16210 | compilers= | |
16211 | stagestuff= | |
861bb6c1 | 16212 | outputs= |
e2500fed | 16213 | gtfiles= |
861bb6c1 | 16214 | . ${srcdir}/$s/config-lang.in |
75bffa71 | 16215 | if test "x$language" = x |
861bb6c1 JL |
16216 | then |
16217 | echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 | |
16218 | exit 1 | |
16219 | fi | |
2ed26f6b | 16220 | all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in" |
72aaffbd | 16221 | if test -f ${srcdir}/$s/Makefile.in |
2ed26f6b | 16222 | then all_lang_makefiles="$s/Makefile" |
72aaffbd | 16223 | fi |
861bb6c1 | 16224 | all_languages="$all_languages $language" |
75bffa71 | 16225 | if test "x$boot_language" = xyes |
861bb6c1 JL |
16226 | then |
16227 | all_boot_languages="$all_boot_languages $language" | |
16228 | fi | |
16229 | all_compilers="$all_compilers $compilers" | |
16230 | all_stagestuff="$all_stagestuff $stagestuff" | |
861bb6c1 | 16231 | all_outputs="$all_outputs $outputs" |
e2500fed | 16232 | all_gtfiles="$all_gtfiles $gtfiles" |
c406e779 | 16233 | for f in $gtfiles |
8ac9d31f | 16234 | do |
8ac9d31f TJ |
16235 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " |
16236 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8ac9d31f | 16237 | done |
861bb6c1 JL |
16238 | done |
16239 | ||
8ac9d31f TJ |
16240 | # Pick up gtfiles for c |
16241 | gtfiles= | |
16242 | s="c" | |
16243 | . ${srcdir}/c-config-lang.in | |
16244 | all_gtfiles="$all_gtfiles $gtfiles" | |
c406e779 | 16245 | for f in $gtfiles |
8ac9d31f | 16246 | do |
8ac9d31f TJ |
16247 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " |
16248 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8ac9d31f TJ |
16249 | done |
16250 | ||
cbc59f01 | 16251 | check_languages= |
c406e779 | 16252 | for language in $all_languages |
cbc59f01 | 16253 | do |
cbc59f01 | 16254 | check_languages="$check_languages check-$language" |
cbc59f01 DD |
16255 | done |
16256 | ||
62b81e45 MM |
16257 | # We link each language in with a set of hooks, reached indirectly via |
16258 | # lang.${target}. | |
861bb6c1 JL |
16259 | |
16260 | rm -f Make-hooks | |
16261 | touch Make-hooks | |
65ebbf81 | 16262 | target_list="all.build all.cross start.encap rest.encap tags \ |
a207b594 | 16263 | install-normal install-common install-man \ |
a541f69d | 16264 | uninstall info man srcextra srcman srcinfo \ |
a03ad584 | 16265 | mostlyclean clean distclean maintainer-clean \ |
8f231b5d | 16266 | stage1 stage2 stage3 stage4 stageprofile stagefeedback" |
861bb6c1 JL |
16267 | for t in $target_list |
16268 | do | |
16269 | x= | |
c406e779 | 16270 | for lang in $all_languages |
861bb6c1 | 16271 | do |
ab87f8c8 | 16272 | x="$x $lang.$t" |
861bb6c1 JL |
16273 | done |
16274 | echo "lang.$t: $x" >> Make-hooks | |
16275 | done | |
16276 | ||
8bb915b6 NN |
16277 | # -------- |
16278 | # UNSORTED | |
16279 | # -------- | |
16280 | ||
cc06d68c | 16281 | # Create .gdbinit. |
861bb6c1 | 16282 | |
cc06d68c GP |
16283 | echo "dir ." > .gdbinit |
16284 | echo "dir ${srcdir}" >> .gdbinit | |
16285 | if test x$gdb_needs_out_file_path = xyes | |
16286 | then | |
16287 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
16288 | fi | |
16289 | if test "x$subdirs" != x; then | |
16290 | for s in $subdirs | |
16291 | do | |
16292 | echo "dir ${srcdir}/$s" >> .gdbinit | |
16293 | done | |
861bb6c1 | 16294 | fi |
cc06d68c | 16295 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 16296 | |
8f8d3278 NC |
16297 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
16298 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
16299 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
16300 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
16301 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
16302 | # make and thus we'd get different behavior depending on where we built the | |
16303 | # sources. | |
5949a9fc | 16304 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
caa55b1e | 16305 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)' |
d062c304 | 16306 | else |
8f8d3278 NC |
16307 | # An explanation of the sed strings: |
16308 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
16309 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
16310 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 16311 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
16312 | # |
16313 | # (*) Note this pattern overwrites the first character of the string | |
16314 | # with a forward slash if one is not already present. This is not a | |
16315 | # problem because the exact names of the sub-directories concerned is | |
16316 | # unimportant, just the number of them matters. | |
16317 | # | |
16318 | # The practical upshot of these patterns is like this: | |
16319 | # | |
16320 | # prefix exec_prefix result | |
16321 | # ------ ----------- ------ | |
16322 | # /foo /foo/bar ../ | |
16323 | # /foo/ /foo/bar ../ | |
16324 | # /foo /foo/bar/ ../ | |
16325 | # /foo/ /foo/bar/ ../ | |
16326 | # /foo /foo/bar/ugg ../../ | |
16327 | # | |
4c112cda | 16328 | dollar='$$' |
caa55b1e | 16329 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)" |
d062c304 JL |
16330 | fi |
16331 | ||
16332 | ||
2ce3c6c6 | 16333 | |
2bbea3a6 RH |
16334 | # Find a directory in which to install a shared libgcc. |
16335 | ||
16336 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
16337 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
16338 | enableval="$enable_version_specific_runtime_libs" | |
ba479fd2 NN |
16339 | |
16340 | fi; | |
2bbea3a6 RH |
16341 | |
16342 | ||
5b15f277 RH |
16343 | # Check whether --with-slibdir or --without-slibdir was given. |
16344 | if test "${with_slibdir+set}" = set; then | |
16345 | withval="$with_slibdir" | |
16346 | slibdir="$with_slibdir" | |
16347 | else | |
16348 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 16349 | slibdir='$(libsubdir)' |
5b15f277 | 16350 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
16351 | slibdir='$(build_tooldir)/lib' |
16352 | else | |
5b15f277 | 16353 | slibdir='$(libdir)' |
2bbea3a6 | 16354 | fi |
ba479fd2 | 16355 | fi; |
2bbea3a6 RH |
16356 | |
16357 | ||
1e6347d8 | 16358 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
16359 | |
16360 | ||
861bb6c1 JL |
16361 | # Substitute configuration variables |
16362 | ||
16363 | ||
16364 | ||
16365 | ||
16366 | ||
16367 | ||
16368 | ||
16369 | ||
16370 | ||
16371 | ||
16372 | ||
16373 | ||
16374 | ||
16375 | ||
16376 | ||
16377 | ||
16378 | ||
16379 | ||
16380 | ||
16381 | ||
16382 | ||
16383 | ||
16384 | ||
16385 | ||
16386 | ||
16387 | ||
16388 | ||
16389 | ||
16390 | ||
16391 | ||
16392 | ||
16393 | ||
16394 | ||
16395 | ||
16396 | ||
16397 | ||
16398 | ||
16399 | ||
16400 | ||
16401 | ||
16402 | ||
16403 | ||
16404 | ||
16405 | ||
16406 | ||
16407 | ||
9b16d2c4 | 16408 | |
e9a25f70 | 16409 | |
6e26218f | 16410 | |
c8724862 | 16411 | |
e061d1ce | 16412 | |
d8bb17c8 | 16413 | |
11642c3a ZW |
16414 | |
16415 | ||
16416 | ||
16417 | ||
16418 | ||
16419 | ||
16420 | ||
3d9d2476 | 16421 | |
e2500fed | 16422 | |
51b9ff45 | 16423 | |
861bb6c1 | 16424 | |
6e3f3080 NN |
16425 | # Echo link setup. |
16426 | if test x${build} = x${host} ; then | |
16427 | if test x${host} = x${target} ; then | |
16428 | echo "Links are now set up to build a native compiler for ${target}." 1>&2 | |
16429 | else | |
16430 | echo "Links are now set up to build a cross-compiler" 1>&2 | |
16431 | echo " from ${host} to ${target}." 1>&2 | |
16432 | fi | |
16433 | else | |
16434 | if test x${host} = x${target} ; then | |
16435 | echo "Links are now set up to build (on ${build}) a native compiler" 1>&2 | |
16436 | echo " for ${target}." 1>&2 | |
16437 | else | |
16438 | echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2 | |
16439 | echo " from ${host} to ${target}." 1>&2 | |
16440 | fi | |
16441 | fi | |
16442 | ||
6de9cd9a DN |
16443 | |
16444 | ||
16445 | ||
6e3f3080 NN |
16446 | # Configure the subdirectories |
16447 | # AC_CONFIG_SUBDIRS($subdirs) | |
16448 | ||
16449 | # Create the Makefile | |
16450 | # and configure language subdirectories | |
ba479fd2 | 16451 | ac_config_files="$ac_config_files $all_outputs" |
914c5af7 NN |
16452 | |
16453 | ||
ba479fd2 | 16454 | ac_config_commands="$ac_config_commands default" |
914c5af7 | 16455 | |
ba479fd2 | 16456 | cat >confcache <<\_ACEOF |
6e3f3080 NN |
16457 | # This file is a shell script that caches the results of configure |
16458 | # tests run on this system so they can be shared between configure | |
ba479fd2 NN |
16459 | # scripts and configure runs, see configure's option --config-cache. |
16460 | # It is not useful on other systems. If it contains results you don't | |
16461 | # want to keep, you may remove or edit it. | |
6e3f3080 | 16462 | # |
ba479fd2 NN |
16463 | # config.status only pays attention to the cache file if you give it |
16464 | # the --recheck option to rerun configure. | |
6e3f3080 | 16465 | # |
ba479fd2 NN |
16466 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
16467 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
16468 | # following values. | |
16469 | ||
16470 | _ACEOF | |
16471 | ||
6e3f3080 NN |
16472 | # The following way of writing the cache mishandles newlines in values, |
16473 | # but we know of no workaround that is simple, portable, and efficient. | |
16474 | # So, don't put newlines in cache variables' values. | |
16475 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
16476 | # and sets the high bit in the cache file unless we assign to the vars. | |
ba479fd2 NN |
16477 | { |
16478 | (set) 2>&1 | | |
16479 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
16480 | *ac_space=\ *) | |
16481 | # `set' does not quote correctly, so add quotes (double-quote | |
16482 | # substitution turns \\\\ into \\, and sed turns \\ into \). | |
16483 | sed -n \ | |
86da66b5 HPN |
16484 | "s/'/'\\\\''/g; |
16485 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
ba479fd2 NN |
16486 | ;; |
16487 | *) | |
16488 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
16489 | sed -n \ | |
86da66b5 | 16490 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
ba479fd2 NN |
16491 | ;; |
16492 | esac; | |
16493 | } | | |
16494 | sed ' | |
16495 | t clear | |
16496 | : clear | |
16497 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
16498 | t end | |
16499 | /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
16500 | : end' >>confcache | |
16501 | if diff $cache_file confcache >/dev/null 2>&1; then :; else | |
6e3f3080 | 16502 | if test -w $cache_file; then |
ba479fd2 NN |
16503 | test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" |
16504 | cat confcache >$cache_file | |
6e3f3080 NN |
16505 | else |
16506 | echo "not updating unwritable cache $cache_file" | |
16507 | fi | |
16508 | fi | |
16509 | rm -f confcache | |
16510 | ||
16511 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
16512 | # Let make expand exec_prefix. | |
16513 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16514 | ||
ba479fd2 NN |
16515 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
16516 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
16517 | # trailing colons and then remove the whole line if VPATH becomes empty | |
16518 | # (actually we leave an empty line to preserve line numbers). | |
6e3f3080 | 16519 | if test "x$srcdir" = x.; then |
86da66b5 | 16520 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
ba479fd2 NN |
16521 | s/:*\$(srcdir):*/:/; |
16522 | s/:*\${srcdir}:*/:/; | |
16523 | s/:*@srcdir@:*/:/; | |
86da66b5 | 16524 | s/^\([^=]*=[ ]*\):*/\1/; |
ba479fd2 | 16525 | s/:*$//; |
86da66b5 | 16526 | s/^[^=]*=[ ]*$//; |
ba479fd2 | 16527 | }' |
6e3f3080 NN |
16528 | fi |
16529 | ||
63cf211a | 16530 | DEFS=-DHAVE_CONFIG_H |
6e3f3080 | 16531 | |
ba479fd2 NN |
16532 | ac_libobjs= |
16533 | ac_ltlibobjs= | |
16534 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
16535 | # 1. Remove the extension, and $U if already installed. | |
16536 | ac_i=`echo "$ac_i" | | |
86da66b5 | 16537 | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` |
ba479fd2 NN |
16538 | # 2. Add them. |
16539 | ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" | |
16540 | ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' | |
16541 | done | |
16542 | LIBOBJS=$ac_libobjs | |
63cf211a | 16543 | |
ba479fd2 NN |
16544 | LTLIBOBJS=$ac_ltlibobjs |
16545 | ||
16546 | ||
16547 | ||
16548 | : ${CONFIG_STATUS=./config.status} | |
16549 | ac_clean_files_save=$ac_clean_files | |
16550 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
16551 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | |
16552 | echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
16553 | cat >$CONFIG_STATUS <<_ACEOF | |
16554 | #! $SHELL | |
16555 | # Generated by $as_me. | |
6e3f3080 NN |
16556 | # Run this file to recreate the current configuration. |
16557 | # Compiler output produced by configure, useful for debugging | |
ba479fd2 | 16558 | # configure, is in config.log if it exists. |
6e3f3080 | 16559 | |
ba479fd2 NN |
16560 | debug=false |
16561 | ac_cs_recheck=false | |
16562 | ac_cs_silent=false | |
16563 | SHELL=\${CONFIG_SHELL-$SHELL} | |
16564 | _ACEOF | |
16565 | ||
16566 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16567 | ## --------------------- ## | |
16568 | ## M4sh Initialization. ## | |
16569 | ## --------------------- ## | |
16570 | ||
16571 | # Be Bourne compatible | |
16572 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
16573 | emulate sh | |
16574 | NULLCMD=: | |
16575 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
16576 | # is contrary to our usage. Disable this feature. | |
16577 | alias -g '${1+"$@"}'='"$@"' | |
16578 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
16579 | set -o posix | |
16580 | fi | |
86da66b5 | 16581 | DUALCASE=1; export DUALCASE # for MKS sh |
ba479fd2 NN |
16582 | |
16583 | # Support unset when possible. | |
86da66b5 | 16584 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then |
ba479fd2 NN |
16585 | as_unset=unset |
16586 | else | |
16587 | as_unset=false | |
16588 | fi | |
16589 | ||
16590 | ||
16591 | # Work around bugs in pre-3.0 UWIN ksh. | |
16592 | $as_unset ENV MAIL MAILPATH | |
16593 | PS1='$ ' | |
16594 | PS2='> ' | |
16595 | PS4='+ ' | |
16596 | ||
16597 | # NLS nuisances. | |
16598 | for as_var in \ | |
16599 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
16600 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
16601 | LC_TELEPHONE LC_TIME | |
6e3f3080 | 16602 | do |
86da66b5 | 16603 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
ba479fd2 NN |
16604 | eval $as_var=C; export $as_var |
16605 | else | |
16606 | $as_unset $as_var | |
16607 | fi | |
6e3f3080 NN |
16608 | done |
16609 | ||
ba479fd2 NN |
16610 | # Required to use basename. |
16611 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
16612 | as_expr=expr | |
16613 | else | |
16614 | as_expr=false | |
16615 | fi | |
6e3f3080 | 16616 | |
ba479fd2 NN |
16617 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then |
16618 | as_basename=basename | |
16619 | else | |
16620 | as_basename=false | |
16621 | fi | |
6e3f3080 NN |
16622 | |
16623 | ||
ba479fd2 NN |
16624 | # Name of the executable. |
16625 | as_me=`$as_basename "$0" || | |
16626 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
16627 | X"$0" : 'X\(//\)$' \| \ | |
16628 | X"$0" : 'X\(/\)$' \| \ | |
16629 | . : '\(.\)' 2>/dev/null || | |
16630 | echo X/"$0" | | |
16631 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | |
16632 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
16633 | /^X\/\(\/\).*/{ s//\1/; q; } | |
16634 | s/.*/./; q'` | |
16635 | ||
6e3f3080 | 16636 | |
ba479fd2 NN |
16637 | # PATH needs CR, and LINENO needs CR and PATH. |
16638 | # Avoid depending upon Character Ranges. | |
16639 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
16640 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
16641 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
16642 | as_cr_digits='0123456789' | |
16643 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
16644 | ||
16645 | # The user is always right. | |
16646 | if test "${PATH_SEPARATOR+set}" != set; then | |
16647 | echo "#! /bin/sh" >conf$$.sh | |
16648 | echo "exit 0" >>conf$$.sh | |
16649 | chmod +x conf$$.sh | |
16650 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
16651 | PATH_SEPARATOR=';' | |
6e3f3080 | 16652 | else |
ba479fd2 NN |
16653 | PATH_SEPARATOR=: |
16654 | fi | |
16655 | rm -f conf$$.sh | |
16656 | fi | |
16657 | ||
16658 | ||
16659 | as_lineno_1=$LINENO | |
16660 | as_lineno_2=$LINENO | |
16661 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
16662 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
16663 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
16664 | # Find who we are. Look in the path if we contain no path at all | |
16665 | # relative or not. | |
16666 | case $0 in | |
16667 | *[\\/]* ) as_myself=$0 ;; | |
16668 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16669 | for as_dir in $PATH | |
16670 | do | |
16671 | IFS=$as_save_IFS | |
16672 | test -z "$as_dir" && as_dir=. | |
16673 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
16674 | done | |
16675 | ||
16676 | ;; | |
16677 | esac | |
16678 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
16679 | # in which case we are not to be found in the path. | |
16680 | if test "x$as_myself" = x; then | |
16681 | as_myself=$0 | |
16682 | fi | |
16683 | if test ! -f "$as_myself"; then | |
16684 | { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 | |
16685 | echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} | |
16686 | { (exit 1); exit 1; }; } | |
6e3f3080 | 16687 | fi |
ba479fd2 NN |
16688 | case $CONFIG_SHELL in |
16689 | '') | |
16690 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16691 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
16692 | do | |
16693 | IFS=$as_save_IFS | |
16694 | test -z "$as_dir" && as_dir=. | |
16695 | for as_base in sh bash ksh sh5; do | |
16696 | case $as_dir in | |
16697 | /*) | |
16698 | if ("$as_dir/$as_base" -c ' | |
16699 | as_lineno_1=$LINENO | |
16700 | as_lineno_2=$LINENO | |
16701 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
16702 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
16703 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | |
16704 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
16705 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
16706 | CONFIG_SHELL=$as_dir/$as_base | |
16707 | export CONFIG_SHELL | |
16708 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
16709 | fi;; | |
16710 | esac | |
16711 | done | |
16712 | done | |
16713 | ;; | |
16714 | esac | |
16715 | ||
16716 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
16717 | # uniformly replaced by the line number. The first 'sed' inserts a | |
16718 | # line-number line before each line; the second 'sed' does the real | |
16719 | # work. The second script uses 'N' to pair each line-number line | |
16720 | # with the numbered line, and appends trailing '-' during | |
16721 | # substitution so that $LINENO is not a special case at line end. | |
16722 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | |
16723 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | |
16724 | sed '=' <$as_myself | | |
16725 | sed ' | |
16726 | N | |
16727 | s,$,-, | |
16728 | : loop | |
16729 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
16730 | t loop | |
16731 | s,-$,, | |
16732 | s,^['$as_cr_digits']*\n,, | |
16733 | ' >$as_me.lineno && | |
16734 | chmod +x $as_me.lineno || | |
16735 | { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 | |
16736 | echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} | |
16737 | { (exit 1); exit 1; }; } | |
16738 | ||
16739 | # Don't try to exec as it changes $[0], causing all sort of problems | |
16740 | # (the dirname of $[0] is not the place where we might find the | |
16741 | # original and so on. Autoconf is especially sensible to this). | |
16742 | . ./$as_me.lineno | |
16743 | # Exit status is that of the last command. | |
16744 | exit | |
16745 | } | |
16746 | ||
16747 | ||
16748 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | |
16749 | *c*,-n*) ECHO_N= ECHO_C=' | |
16750 | ' ECHO_T=' ' ;; | |
16751 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
16752 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
16753 | esac | |
16754 | ||
16755 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
16756 | as_expr=expr | |
16757 | else | |
16758 | as_expr=false | |
16759 | fi | |
16760 | ||
16761 | rm -f conf$$ conf$$.exe conf$$.file | |
16762 | echo >conf$$.file | |
16763 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
16764 | # We could just check for DJGPP; but this test a) works b) is more generic | |
16765 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
16766 | if test -f conf$$.exe; then | |
16767 | # Don't use ln at all; we don't have any links | |
16768 | as_ln_s='cp -p' | |
6e3f3080 | 16769 | else |
ba479fd2 | 16770 | as_ln_s='ln -s' |
6e3f3080 | 16771 | fi |
ba479fd2 NN |
16772 | elif ln conf$$.file conf$$ 2>/dev/null; then |
16773 | as_ln_s=ln | |
16774 | else | |
16775 | as_ln_s='cp -p' | |
16776 | fi | |
16777 | rm -f conf$$ conf$$.exe conf$$.file | |
16778 | ||
16779 | if mkdir -p . 2>/dev/null; then | |
16780 | as_mkdir_p=: | |
16781 | else | |
86da66b5 | 16782 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
16783 | as_mkdir_p=false |
16784 | fi | |
16785 | ||
16786 | as_executable_p="test -f" | |
16787 | ||
16788 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 16789 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
16790 | |
16791 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 16792 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
16793 | |
16794 | ||
16795 | # IFS | |
16796 | # We need space, tab and new line, in precisely that order. | |
16797 | as_nl=' | |
16798 | ' | |
16799 | IFS=" $as_nl" | |
16800 | ||
16801 | # CDPATH. | |
16802 | $as_unset CDPATH | |
16803 | ||
16804 | exec 6>&1 | |
16805 | ||
16806 | # Open the log real soon, to keep \$[0] and so on meaningful, and to | |
16807 | # report actual input values of CONFIG_FILES etc. instead of their | |
16808 | # values after options handling. Logging --version etc. is OK. | |
16809 | exec 5>>config.log | |
16810 | { | |
16811 | echo | |
16812 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
16813 | ## Running $as_me. ## | |
16814 | _ASBOX | |
16815 | } >&5 | |
16816 | cat >&5 <<_CSEOF | |
16817 | ||
16818 | This file was extended by $as_me, which was | |
8ab705be | 16819 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
16820 | |
16821 | CONFIG_FILES = $CONFIG_FILES | |
16822 | CONFIG_HEADERS = $CONFIG_HEADERS | |
16823 | CONFIG_LINKS = $CONFIG_LINKS | |
16824 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
16825 | $ $0 $@ | |
16826 | ||
16827 | _CSEOF | |
16828 | echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 | |
16829 | echo >&5 | |
16830 | _ACEOF | |
16831 | ||
16832 | # Files that config.status was made for. | |
16833 | if test -n "$ac_config_files"; then | |
16834 | echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS | |
16835 | fi | |
16836 | ||
16837 | if test -n "$ac_config_headers"; then | |
16838 | echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS | |
16839 | fi | |
16840 | ||
16841 | if test -n "$ac_config_links"; then | |
16842 | echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS | |
16843 | fi | |
16844 | ||
16845 | if test -n "$ac_config_commands"; then | |
16846 | echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS | |
16847 | fi | |
16848 | ||
16849 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16850 | ||
16851 | ac_cs_usage="\ | |
16852 | \`$as_me' instantiates files from templates according to the | |
16853 | current configuration. | |
16854 | ||
16855 | Usage: $0 [OPTIONS] [FILE]... | |
16856 | ||
16857 | -h, --help print this help, then exit | |
16858 | -V, --version print version number, then exit | |
16859 | -q, --quiet do not print progress messages | |
16860 | -d, --debug don't remove temporary files | |
16861 | --recheck update $as_me by reconfiguring in the same conditions | |
16862 | --file=FILE[:TEMPLATE] | |
86da66b5 | 16863 | instantiate the configuration file FILE |
ba479fd2 | 16864 | --header=FILE[:TEMPLATE] |
86da66b5 | 16865 | instantiate the configuration header FILE |
ba479fd2 NN |
16866 | |
16867 | Configuration files: | |
16868 | $config_files | |
16869 | ||
16870 | Configuration headers: | |
16871 | $config_headers | |
16872 | ||
16873 | Configuration commands: | |
16874 | $config_commands | |
16875 | ||
16876 | Report bugs to <bug-autoconf@gnu.org>." | |
16877 | _ACEOF | |
16878 | ||
16879 | cat >>$CONFIG_STATUS <<_ACEOF | |
16880 | ac_cs_version="\\ | |
16881 | config.status | |
8ab705be | 16882 | configured by $0, generated by GNU Autoconf 2.59, |
ba479fd2 NN |
16883 | with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" |
16884 | ||
86da66b5 | 16885 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
16886 | This config.status script is free software; the Free Software Foundation |
16887 | gives unlimited permission to copy, distribute and modify it." | |
16888 | srcdir=$srcdir | |
16889 | _ACEOF | |
16890 | ||
16891 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16892 | # If no file are specified by the user, then we need to provide default | |
16893 | # value. By we need to know if files were specified by the user. | |
16894 | ac_need_defaults=: | |
16895 | while test $# != 0 | |
16896 | do | |
16897 | case $1 in | |
16898 | --*=*) | |
16899 | ac_option=`expr "x$1" : 'x\([^=]*\)='` | |
16900 | ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` | |
16901 | ac_shift=: | |
16902 | ;; | |
16903 | -*) | |
16904 | ac_option=$1 | |
16905 | ac_optarg=$2 | |
16906 | ac_shift=shift | |
16907 | ;; | |
16908 | *) # This is not an option, so the user has probably given explicit | |
16909 | # arguments. | |
16910 | ac_option=$1 | |
16911 | ac_need_defaults=false;; | |
16912 | esac | |
16913 | ||
16914 | case $ac_option in | |
16915 | # Handling of the options. | |
16916 | _ACEOF | |
16917 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16918 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
16919 | ac_cs_recheck=: ;; | |
16920 | --version | --vers* | -V ) | |
16921 | echo "$ac_cs_version"; exit 0 ;; | |
16922 | --he | --h) | |
16923 | # Conflict between --help and --header | |
16924 | { { echo "$as_me:$LINENO: error: ambiguous option: $1 | |
16925 | Try \`$0 --help' for more information." >&5 | |
16926 | echo "$as_me: error: ambiguous option: $1 | |
16927 | Try \`$0 --help' for more information." >&2;} | |
16928 | { (exit 1); exit 1; }; };; | |
16929 | --help | --hel | -h ) | |
16930 | echo "$ac_cs_usage"; exit 0 ;; | |
16931 | --debug | --d* | -d ) | |
16932 | debug=: ;; | |
16933 | --file | --fil | --fi | --f ) | |
16934 | $ac_shift | |
16935 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" | |
16936 | ac_need_defaults=false;; | |
16937 | --header | --heade | --head | --hea ) | |
16938 | $ac_shift | |
16939 | CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | |
16940 | ac_need_defaults=false;; | |
16941 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
16942 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
16943 | ac_cs_silent=: ;; | |
16944 | ||
16945 | # This is an error. | |
16946 | -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 | |
16947 | Try \`$0 --help' for more information." >&5 | |
16948 | echo "$as_me: error: unrecognized option: $1 | |
16949 | Try \`$0 --help' for more information." >&2;} | |
16950 | { (exit 1); exit 1; }; } ;; | |
16951 | ||
16952 | *) ac_config_targets="$ac_config_targets $1" ;; | |
16953 | ||
16954 | esac | |
16955 | shift | |
6e3f3080 | 16956 | done |
ba479fd2 NN |
16957 | |
16958 | ac_configure_extra_args= | |
16959 | ||
16960 | if $ac_cs_silent; then | |
16961 | exec 6>/dev/null | |
16962 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
861bb6c1 JL |
16963 | fi |
16964 | ||
ba479fd2 NN |
16965 | _ACEOF |
16966 | cat >>$CONFIG_STATUS <<_ACEOF | |
16967 | if \$ac_cs_recheck; then | |
16968 | echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 | |
16969 | exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
16970 | fi | |
861bb6c1 | 16971 | |
ba479fd2 NN |
16972 | _ACEOF |
16973 | ||
16974 | cat >>$CONFIG_STATUS <<_ACEOF | |
16975 | # | |
16976 | # INIT-COMMANDS section. | |
16977 | # | |
16978 | ||
16979 | subdirs='$subdirs' | |
ba479fd2 NN |
16980 | |
16981 | _ACEOF | |
16982 | ||
16983 | ||
16984 | ||
16985 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16986 | for ac_config_target in $ac_config_targets | |
16987 | do | |
16988 | case "$ac_config_target" in | |
16989 | # Handling of arguments. | |
16990 | "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; | |
16991 | "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
16992 | "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; | |
16993 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 | |
16994 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | |
16995 | { (exit 1); exit 1; }; };; | |
861bb6c1 | 16996 | esac |
ba479fd2 NN |
16997 | done |
16998 | ||
16999 | # If the user did not use the arguments to specify the items to instantiate, | |
17000 | # then the envvar interface is used. Set only those that are not. | |
17001 | # We use the long form for the default assignment because of an extremely | |
17002 | # bizarre bug on SunOS 4.1.3. | |
17003 | if $ac_need_defaults; then | |
17004 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
17005 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
17006 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
17007 | fi | |
17008 | ||
17009 | # Have a temporary directory for convenience. Make it in the build tree | |
17010 | # simply because there is no reason to put it here, and in addition, | |
17011 | # creating and moving files from /tmp can sometimes cause problems. | |
17012 | # Create a temporary directory, and hook for its removal unless debugging. | |
17013 | $debug || | |
17014 | { | |
17015 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 | |
17016 | trap '{ (exit 1); exit 1; }' 1 2 13 15 | |
17017 | } | |
861bb6c1 | 17018 | |
ba479fd2 | 17019 | # Create a (secure) tmp directory for tmp files. |
6e3f3080 | 17020 | |
ba479fd2 NN |
17021 | { |
17022 | tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && | |
17023 | test -n "$tmp" && test -d "$tmp" | |
17024 | } || | |
17025 | { | |
17026 | tmp=./confstat$$-$RANDOM | |
17027 | (umask 077 && mkdir $tmp) | |
17028 | } || | |
17029 | { | |
17030 | echo "$me: cannot create a temporary directory in ." >&2 | |
17031 | { (exit 1); exit 1; } | |
17032 | } | |
17033 | ||
17034 | _ACEOF | |
17035 | ||
17036 | cat >>$CONFIG_STATUS <<_ACEOF | |
17037 | ||
17038 | # | |
17039 | # CONFIG_FILES section. | |
17040 | # | |
17041 | ||
17042 | # No need to generate the scripts if there are no CONFIG_FILES. | |
17043 | # This happens for instance when ./config.status config.h | |
17044 | if test -n "\$CONFIG_FILES"; then | |
17045 | # Protect against being on the right side of a sed subst in config.status. | |
17046 | sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; | |
17047 | s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF | |
17048 | s,@SHELL@,$SHELL,;t t | |
17049 | s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t | |
17050 | s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t | |
17051 | s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t | |
17052 | s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t | |
17053 | s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t | |
17054 | s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t | |
17055 | s,@exec_prefix@,$exec_prefix,;t t | |
17056 | s,@prefix@,$prefix,;t t | |
17057 | s,@program_transform_name@,$program_transform_name,;t t | |
17058 | s,@bindir@,$bindir,;t t | |
17059 | s,@sbindir@,$sbindir,;t t | |
17060 | s,@libexecdir@,$libexecdir,;t t | |
17061 | s,@datadir@,$datadir,;t t | |
17062 | s,@sysconfdir@,$sysconfdir,;t t | |
17063 | s,@sharedstatedir@,$sharedstatedir,;t t | |
17064 | s,@localstatedir@,$localstatedir,;t t | |
17065 | s,@libdir@,$libdir,;t t | |
17066 | s,@includedir@,$includedir,;t t | |
17067 | s,@oldincludedir@,$oldincludedir,;t t | |
17068 | s,@infodir@,$infodir,;t t | |
17069 | s,@mandir@,$mandir,;t t | |
17070 | s,@build_alias@,$build_alias,;t t | |
17071 | s,@host_alias@,$host_alias,;t t | |
17072 | s,@target_alias@,$target_alias,;t t | |
17073 | s,@DEFS@,$DEFS,;t t | |
17074 | s,@ECHO_C@,$ECHO_C,;t t | |
17075 | s,@ECHO_N@,$ECHO_N,;t t | |
17076 | s,@ECHO_T@,$ECHO_T,;t t | |
17077 | s,@LIBS@,$LIBS,;t t | |
17078 | s,@build@,$build,;t t | |
17079 | s,@build_cpu@,$build_cpu,;t t | |
17080 | s,@build_vendor@,$build_vendor,;t t | |
17081 | s,@build_os@,$build_os,;t t | |
17082 | s,@host@,$host,;t t | |
17083 | s,@host_cpu@,$host_cpu,;t t | |
17084 | s,@host_vendor@,$host_vendor,;t t | |
17085 | s,@host_os@,$host_os,;t t | |
17086 | s,@target@,$target,;t t | |
17087 | s,@target_cpu@,$target_cpu,;t t | |
17088 | s,@target_vendor@,$target_vendor,;t t | |
17089 | s,@target_os@,$target_os,;t t | |
8f1529e6 | 17090 | s,@target_noncanonical@,$target_noncanonical,;t t |
ba479fd2 NN |
17091 | s,@build_subdir@,$build_subdir,;t t |
17092 | s,@host_subdir@,$host_subdir,;t t | |
17093 | s,@target_subdir@,$target_subdir,;t t | |
03787dfd | 17094 | s,@GENINSRC@,$GENINSRC,;t t |
ba479fd2 NN |
17095 | s,@CC@,$CC,;t t |
17096 | s,@CFLAGS@,$CFLAGS,;t t | |
17097 | s,@LDFLAGS@,$LDFLAGS,;t t | |
17098 | s,@CPPFLAGS@,$CPPFLAGS,;t t | |
17099 | s,@ac_ct_CC@,$ac_ct_CC,;t t | |
17100 | s,@EXEEXT@,$EXEEXT,;t t | |
17101 | s,@OBJEXT@,$OBJEXT,;t t | |
17102 | s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t | |
17103 | s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t | |
17104 | s,@CPP@,$CPP,;t t | |
bf3b7cd3 | 17105 | s,@EGREP@,$EGREP,;t t |
ba479fd2 NN |
17106 | s,@strict1_warn@,$strict1_warn,;t t |
17107 | s,@warn_cflags@,$warn_cflags,;t t | |
17108 | s,@WERROR@,$WERROR,;t t | |
17109 | s,@nocommon_flag@,$nocommon_flag,;t t | |
13f05fd0 | 17110 | s,@TREEBROWSER@,$TREEBROWSER,;t t |
ba479fd2 NN |
17111 | s,@valgrind_path@,$valgrind_path,;t t |
17112 | s,@valgrind_path_defines@,$valgrind_path_defines,;t t | |
17113 | s,@valgrind_command@,$valgrind_command,;t t | |
17114 | s,@coverage_flags@,$coverage_flags,;t t | |
17115 | s,@enable_multilib@,$enable_multilib,;t t | |
17116 | s,@enable_shared@,$enable_shared,;t t | |
17117 | s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t | |
17118 | s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t | |
17119 | s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t | |
17120 | s,@onestep@,$onestep,;t t | |
17121 | s,@SET_MAKE@,$SET_MAKE,;t t | |
17122 | s,@AWK@,$AWK,;t t | |
ba479fd2 | 17123 | s,@LN_S@,$LN_S,;t t |
41e622a8 | 17124 | s,@LN@,$LN,;t t |
ba479fd2 NN |
17125 | s,@RANLIB@,$RANLIB,;t t |
17126 | s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | |
343a6100 | 17127 | s,@ranlib_flags@,$ranlib_flags,;t t |
ba479fd2 NN |
17128 | s,@INSTALL@,$INSTALL,;t t |
17129 | s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t | |
17130 | s,@INSTALL_DATA@,$INSTALL_DATA,;t t | |
17131 | s,@make_compare_target@,$make_compare_target,;t t | |
17132 | s,@have_mktemp_command@,$have_mktemp_command,;t t | |
17133 | s,@MAKEINFO@,$MAKEINFO,;t t | |
17134 | s,@BUILD_INFO@,$BUILD_INFO,;t t | |
17135 | s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t | |
17136 | s,@FLEX@,$FLEX,;t t | |
17137 | s,@BISON@,$BISON,;t t | |
f6a874ac JW |
17138 | s,@NM@,$NM,;t t |
17139 | s,@AR@,$AR,;t t | |
ba479fd2 NN |
17140 | s,@stage1_cflags@,$stage1_cflags,;t t |
17141 | s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t | |
17142 | s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t | |
17143 | s,@LDEXP_LIB@,$LDEXP_LIB,;t t | |
17144 | s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t | |
17145 | s,@LIBICONV@,$LIBICONV,;t t | |
dfb77e37 | 17146 | s,@LTLIBICONV@,$LTLIBICONV,;t t |
ba479fd2 NN |
17147 | s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t |
17148 | s,@manext@,$manext,;t t | |
17149 | s,@objext@,$objext,;t t | |
8bb915b6 | 17150 | s,@gthread_flags@,$gthread_flags,;t t |
ba479fd2 | 17151 | s,@extra_modes_file@,$extra_modes_file,;t t |
75685792 | 17152 | s,@extra_opt_files@,$extra_opt_files,;t t |
ba479fd2 NN |
17153 | s,@USE_NLS@,$USE_NLS,;t t |
17154 | s,@LIBINTL@,$LIBINTL,;t t | |
17155 | s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t | |
17156 | s,@INCINTL@,$INCINTL,;t t | |
17157 | s,@XGETTEXT@,$XGETTEXT,;t t | |
17158 | s,@GMSGFMT@,$GMSGFMT,;t t | |
17159 | s,@POSUB@,$POSUB,;t t | |
17160 | s,@CATALOGS@,$CATALOGS,;t t | |
5395b47b | 17161 | s,@host_cc_for_libada@,$host_cc_for_libada,;t t |
ba479fd2 NN |
17162 | s,@CROSS@,$CROSS,;t t |
17163 | s,@ALL@,$ALL,;t t | |
17164 | s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t | |
17165 | s,@inhibit_libc@,$inhibit_libc,;t t | |
ba479fd2 NN |
17166 | s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t |
17167 | s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t | |
17168 | s,@STMP_FIXINC@,$STMP_FIXINC,;t t | |
17169 | s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t | |
c38f02df | 17170 | s,@collect2@,$collect2,;t t |
9f18db39 PB |
17171 | s,@gcc_cv_as@,$gcc_cv_as,;t t |
17172 | s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t | |
17173 | s,@gcc_cv_ld@,$gcc_cv_ld,;t t | |
17174 | s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t | |
17175 | s,@gcc_cv_nm@,$gcc_cv_nm,;t t | |
17176 | s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t | |
d739199a DJ |
17177 | s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t |
17178 | s,@ORIGINAL_OBJDUMP_FOR_TARGET@,$ORIGINAL_OBJDUMP_FOR_TARGET,;t t | |
ba479fd2 | 17179 | s,@libgcc_visibility@,$libgcc_visibility,;t t |
ba479fd2 NN |
17180 | s,@GGC@,$GGC,;t t |
17181 | s,@zlibdir@,$zlibdir,;t t | |
17182 | s,@zlibinc@,$zlibinc,;t t | |
17183 | s,@MAINT@,$MAINT,;t t | |
17184 | s,@gcc_tooldir@,$gcc_tooldir,;t t | |
17185 | s,@dollar@,$dollar,;t t | |
17186 | s,@slibdir@,$slibdir,;t t | |
17187 | s,@objdir@,$objdir,;t t | |
17188 | s,@subdirs@,$subdirs,;t t | |
17189 | s,@srcdir@,$srcdir,;t t | |
ba479fd2 NN |
17190 | s,@all_boot_languages@,$all_boot_languages,;t t |
17191 | s,@all_compilers@,$all_compilers,;t t | |
17192 | s,@all_gtfiles@,$all_gtfiles,;t t | |
17193 | s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t | |
17194 | s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t | |
17195 | s,@all_lang_makefrags@,$all_lang_makefrags,;t t | |
17196 | s,@all_lang_makefiles@,$all_lang_makefiles,;t t | |
17197 | s,@all_languages@,$all_languages,;t t | |
17198 | s,@all_stagestuff@,$all_stagestuff,;t t | |
17199 | s,@build_exeext@,$build_exeext,;t t | |
17200 | s,@build_install_headers_dir@,$build_install_headers_dir,;t t | |
17201 | s,@build_xm_file_list@,$build_xm_file_list,;t t | |
17202 | s,@build_xm_include_list@,$build_xm_include_list,;t t | |
17203 | s,@build_xm_defines@,$build_xm_defines,;t t | |
17204 | s,@check_languages@,$check_languages,;t t | |
17205 | s,@cc_set_by_configure@,$cc_set_by_configure,;t t | |
17206 | s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t | |
17207 | s,@cpp_install_dir@,$cpp_install_dir,;t t | |
17208 | s,@xmake_file@,$xmake_file,;t t | |
17209 | s,@tmake_file@,$tmake_file,;t t | |
30500d84 | 17210 | s,@extra_gcc_objs@,$extra_gcc_objs,;t t |
ba479fd2 NN |
17211 | s,@extra_headers_list@,$extra_headers_list,;t t |
17212 | s,@extra_objs@,$extra_objs,;t t | |
17213 | s,@extra_parts@,$extra_parts,;t t | |
17214 | s,@extra_passes@,$extra_passes,;t t | |
17215 | s,@extra_programs@,$extra_programs,;t t | |
17216 | s,@float_h_file@,$float_h_file,;t t | |
17217 | s,@gcc_config_arguments@,$gcc_config_arguments,;t t | |
17218 | s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t | |
17219 | s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t | |
ba479fd2 | 17220 | s,@host_exeext@,$host_exeext,;t t |
ba479fd2 NN |
17221 | s,@host_xm_file_list@,$host_xm_file_list,;t t |
17222 | s,@host_xm_include_list@,$host_xm_include_list,;t t | |
17223 | s,@host_xm_defines@,$host_xm_defines,;t t | |
17224 | s,@out_host_hook_obj@,$out_host_hook_obj,;t t | |
17225 | s,@install@,$install,;t t | |
17226 | s,@lang_opt_files@,$lang_opt_files,;t t | |
17227 | s,@lang_specs_files@,$lang_specs_files,;t t | |
17228 | s,@lang_tree_files@,$lang_tree_files,;t t | |
17229 | s,@local_prefix@,$local_prefix,;t t | |
17230 | s,@md_file@,$md_file,;t t | |
17231 | s,@objc_boehm_gc@,$objc_boehm_gc,;t t | |
17232 | s,@out_file@,$out_file,;t t | |
17233 | s,@out_object_file@,$out_object_file,;t t | |
17234 | s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t | |
17235 | s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t | |
ba479fd2 NN |
17236 | s,@thread_file@,$thread_file,;t t |
17237 | s,@tm_file_list@,$tm_file_list,;t t | |
17238 | s,@tm_include_list@,$tm_include_list,;t t | |
17239 | s,@tm_defines@,$tm_defines,;t t | |
17240 | s,@tm_p_file_list@,$tm_p_file_list,;t t | |
17241 | s,@tm_p_include_list@,$tm_p_include_list,;t t | |
17242 | s,@xm_file_list@,$xm_file_list,;t t | |
17243 | s,@xm_include_list@,$xm_include_list,;t t | |
17244 | s,@xm_defines@,$xm_defines,;t t | |
ba479fd2 NN |
17245 | s,@c_target_objs@,$c_target_objs,;t t |
17246 | s,@cxx_target_objs@,$cxx_target_objs,;t t | |
17247 | s,@target_cpu_default@,$target_cpu_default,;t t | |
6de9cd9a DN |
17248 | s,@GMPLIBS@,$GMPLIBS,;t t |
17249 | s,@GMPINC@,$GMPINC,;t t | |
ba479fd2 NN |
17250 | s,@LIBOBJS@,$LIBOBJS,;t t |
17251 | s,@LTLIBOBJS@,$LTLIBOBJS,;t t | |
17252 | /@language_hooks@/r $language_hooks | |
17253 | s,@language_hooks@,,;t t | |
17254 | CEOF | |
17255 | ||
17256 | _ACEOF | |
17257 | ||
17258 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17259 | # Split the substitutions into bite-sized pieces for seds with | |
17260 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
17261 | ac_max_sed_lines=48 | |
17262 | ac_sed_frag=1 # Number of current file. | |
17263 | ac_beg=1 # First line for current file. | |
17264 | ac_end=$ac_max_sed_lines # Line after last line for current file. | |
17265 | ac_more_lines=: | |
17266 | ac_sed_cmds= | |
17267 | while $ac_more_lines; do | |
17268 | if test $ac_beg -gt 1; then | |
17269 | sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
17270 | else | |
17271 | sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
17272 | fi | |
17273 | if test ! -s $tmp/subs.frag; then | |
17274 | ac_more_lines=false | |
17275 | else | |
17276 | # The purpose of the label and of the branching condition is to | |
17277 | # speed up the sed processing (if there are no `@' at all, there | |
17278 | # is no need to browse any of the substitutions). | |
17279 | # These are the two extra sed commands mentioned above. | |
17280 | (echo ':t | |
17281 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed | |
17282 | if test -z "$ac_sed_cmds"; then | |
86da66b5 | 17283 | ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 | 17284 | else |
86da66b5 | 17285 | ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 NN |
17286 | fi |
17287 | ac_sed_frag=`expr $ac_sed_frag + 1` | |
17288 | ac_beg=$ac_end | |
17289 | ac_end=`expr $ac_end + $ac_max_sed_lines` | |
17290 | fi | |
17291 | done | |
17292 | if test -z "$ac_sed_cmds"; then | |
17293 | ac_sed_cmds=cat | |
63cf211a | 17294 | fi |
ba479fd2 | 17295 | fi # test -n "$CONFIG_FILES" |
cafe096b | 17296 | |
ba479fd2 NN |
17297 | _ACEOF |
17298 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17299 | for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue | |
17300 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
17301 | case $ac_file in | |
17302 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
17303 | cat >$tmp/stdin |
17304 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
17305 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 17306 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 17307 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 17308 | * ) ac_file_in=$ac_file.in ;; |
63cf211a | 17309 | esac |
cafe096b | 17310 | |
ba479fd2 NN |
17311 | # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. |
17312 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
17313 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17314 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
17315 | X"$ac_file" : 'X\(//\)$' \| \ | |
17316 | X"$ac_file" : 'X\(/\)' \| \ | |
17317 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17318 | echo X"$ac_file" | |
17319 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17320 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17321 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17322 | /^X\(\/\).*/{ s//\1/; q; } | |
17323 | s/.*/./; q'` | |
17324 | { if $as_mkdir_p; then | |
17325 | mkdir -p "$ac_dir" | |
17326 | else | |
17327 | as_dir="$ac_dir" | |
17328 | as_dirs= | |
17329 | while test ! -d "$as_dir"; do | |
17330 | as_dirs="$as_dir $as_dirs" | |
17331 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
17332 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17333 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
17334 | X"$as_dir" : 'X\(//\)$' \| \ | |
17335 | X"$as_dir" : 'X\(/\)' \| \ | |
17336 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17337 | echo X"$as_dir" | |
17338 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17339 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17340 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17341 | /^X\(\/\).*/{ s//\1/; q; } | |
17342 | s/.*/./; q'` | |
17343 | done | |
17344 | test ! -n "$as_dirs" || mkdir $as_dirs | |
17345 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
17346 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
17347 | { (exit 1); exit 1; }; }; } | |
6e3f3080 | 17348 | |
ba479fd2 NN |
17349 | ac_builddir=. |
17350 | ||
17351 | if test "$ac_dir" != .; then | |
17352 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
17353 | # A "../" for each directory in $ac_dir_suffix. | |
17354 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
17355 | else | |
17356 | ac_dir_suffix= ac_top_builddir= | |
17357 | fi | |
17358 | ||
17359 | case $srcdir in | |
17360 | .) # No --srcdir option. We are building in place. | |
17361 | ac_srcdir=. | |
17362 | if test -z "$ac_top_builddir"; then | |
17363 | ac_top_srcdir=. | |
17364 | else | |
17365 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
17366 | fi ;; | |
17367 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
17368 | ac_srcdir=$srcdir$ac_dir_suffix; | |
17369 | ac_top_srcdir=$srcdir ;; | |
17370 | *) # Relative path. | |
17371 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
17372 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
17373 | esac | |
8ab705be KC |
17374 | |
17375 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
17376 | # the directories may not exist. | |
17377 | case `pwd` in | |
17378 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 17379 | *) |
8ab705be KC |
17380 | case "$ac_dir" in |
17381 | .) ac_abs_builddir=`pwd`;; | |
17382 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
17383 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
17384 | esac;; |
17385 | esac | |
8ab705be | 17386 | case $ac_abs_builddir in |
86da66b5 HPN |
17387 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
17388 | *) | |
17389 | case ${ac_top_builddir}. in | |
8ab705be | 17390 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 17391 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 17392 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
17393 | esac;; |
17394 | esac | |
8ab705be | 17395 | case $ac_abs_builddir in |
86da66b5 HPN |
17396 | .) ac_abs_srcdir=$ac_srcdir;; |
17397 | *) | |
17398 | case $ac_srcdir in | |
8ab705be | 17399 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 17400 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 17401 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
17402 | esac;; |
17403 | esac | |
8ab705be | 17404 | case $ac_abs_builddir in |
86da66b5 HPN |
17405 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
17406 | *) | |
17407 | case $ac_top_srcdir in | |
8ab705be | 17408 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 17409 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 17410 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
17411 | esac;; |
17412 | esac | |
ba479fd2 NN |
17413 | |
17414 | ||
17415 | ||
dbad5e72 SE |
17416 | if test x"$ac_file" != x-; then |
17417 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
17418 | echo "$as_me: creating $ac_file" >&6;} | |
17419 | rm -f "$ac_file" | |
17420 | fi | |
ba479fd2 NN |
17421 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
17422 | # use $as_me), people would be surprised to read: | |
17423 | # /* config.h. Generated by config.status. */ | |
17424 | if test x"$ac_file" = x-; then | |
17425 | configure_input= | |
17426 | else | |
17427 | configure_input="$ac_file. " | |
17428 | fi | |
17429 | configure_input=$configure_input"Generated from `echo $ac_file_in | | |
86da66b5 | 17430 | sed 's,.*/,,'` by configure." |
ba479fd2 NN |
17431 | |
17432 | # First look for the input files in the build tree, otherwise in the | |
17433 | # src tree. | |
17434 | ac_file_inputs=`IFS=: | |
17435 | for f in $ac_file_in; do | |
17436 | case $f in | |
17437 | -) echo $tmp/stdin ;; | |
17438 | [\\/$]*) | |
86da66b5 HPN |
17439 | # Absolute (can't be DOS-style, as IFS=:) |
17440 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17441 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17442 | { (exit 1); exit 1; }; } | |
86da66b5 | 17443 | echo "$f";; |
ba479fd2 | 17444 | *) # Relative |
86da66b5 HPN |
17445 | if test -f "$f"; then |
17446 | # Build tree | |
17447 | echo "$f" | |
17448 | elif test -f "$srcdir/$f"; then | |
17449 | # Source tree | |
17450 | echo "$srcdir/$f" | |
17451 | else | |
17452 | # /dev/null tree | |
17453 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17454 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17455 | { (exit 1); exit 1; }; } | |
86da66b5 | 17456 | fi;; |
ba479fd2 NN |
17457 | esac |
17458 | done` || { (exit 1); exit 1; } | |
17459 | _ACEOF | |
17460 | cat >>$CONFIG_STATUS <<_ACEOF | |
17461 | sed "$ac_vpsub | |
17462 | $extrasub | |
17463 | _ACEOF | |
17464 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17465 | :t | |
17466 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
17467 | s,@configure_input@,$configure_input,;t t | |
17468 | s,@srcdir@,$ac_srcdir,;t t | |
17469 | s,@abs_srcdir@,$ac_abs_srcdir,;t t | |
17470 | s,@top_srcdir@,$ac_top_srcdir,;t t | |
17471 | s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t | |
17472 | s,@builddir@,$ac_builddir,;t t | |
17473 | s,@abs_builddir@,$ac_abs_builddir,;t t | |
17474 | s,@top_builddir@,$ac_top_builddir,;t t | |
17475 | s,@abs_top_builddir@,$ac_abs_top_builddir,;t t | |
17476 | " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out | |
17477 | rm -f $tmp/stdin | |
17478 | if test x"$ac_file" != x-; then | |
17479 | mv $tmp/out $ac_file | |
17480 | else | |
17481 | cat $tmp/out | |
17482 | rm -f $tmp/out | |
17483 | fi | |
17484 | ||
17485 | done | |
17486 | _ACEOF | |
17487 | cat >>$CONFIG_STATUS <<\_ACEOF | |
6e3f3080 | 17488 | |
ba479fd2 NN |
17489 | # |
17490 | # CONFIG_HEADER section. | |
17491 | # | |
861bb6c1 JL |
17492 | |
17493 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
17494 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
17495 | # | |
17496 | # ac_d sets the value in "#define NAME VALUE" lines. | |
86da66b5 HPN |
17497 | ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
17498 | ac_dB='[ ].*$,\1#\2' | |
ba479fd2 NN |
17499 | ac_dC=' ' |
17500 | ac_dD=',;t' | |
17501 | # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
86da66b5 | 17502 | ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
ba479fd2 | 17503 | ac_uB='$,\1#\2define\3' |
861bb6c1 | 17504 | ac_uC=' ' |
ba479fd2 NN |
17505 | ac_uD=',;t' |
17506 | ||
17507 | for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue | |
861bb6c1 | 17508 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
ba479fd2 NN |
17509 | case $ac_file in |
17510 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
17511 | cat >$tmp/stdin |
17512 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
17513 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 17514 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 17515 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 17516 | * ) ac_file_in=$ac_file.in ;; |
861bb6c1 JL |
17517 | esac |
17518 | ||
ba479fd2 NN |
17519 | test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 |
17520 | echo "$as_me: creating $ac_file" >&6;} | |
17521 | ||
17522 | # First look for the input files in the build tree, otherwise in the | |
17523 | # src tree. | |
17524 | ac_file_inputs=`IFS=: | |
17525 | for f in $ac_file_in; do | |
17526 | case $f in | |
17527 | -) echo $tmp/stdin ;; | |
17528 | [\\/$]*) | |
86da66b5 HPN |
17529 | # Absolute (can't be DOS-style, as IFS=:) |
17530 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17531 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17532 | { (exit 1); exit 1; }; } | |
86da66b5 HPN |
17533 | # Do quote $f, to prevent DOS paths from being IFS'd. |
17534 | echo "$f";; | |
ba479fd2 | 17535 | *) # Relative |
86da66b5 HPN |
17536 | if test -f "$f"; then |
17537 | # Build tree | |
17538 | echo "$f" | |
17539 | elif test -f "$srcdir/$f"; then | |
17540 | # Source tree | |
17541 | echo "$srcdir/$f" | |
17542 | else | |
17543 | # /dev/null tree | |
17544 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17545 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17546 | { (exit 1); exit 1; }; } | |
86da66b5 | 17547 | fi;; |
ba479fd2 NN |
17548 | esac |
17549 | done` || { (exit 1); exit 1; } | |
17550 | # Remove the trailing spaces. | |
86da66b5 | 17551 | sed 's/[ ]*$//' $ac_file_inputs >$tmp/in |
ba479fd2 NN |
17552 | |
17553 | _ACEOF | |
17554 | ||
17555 | # Transform confdefs.h into two sed scripts, `conftest.defines' and | |
17556 | # `conftest.undefs', that substitutes the proper values into | |
17557 | # config.h.in to produce config.h. The first handles `#define' | |
17558 | # templates, and the second `#undef' templates. | |
17559 | # And first: Protect against being on the right side of a sed subst in | |
17560 | # config.status. Protect against being in an unquoted here document | |
17561 | # in config.status. | |
17562 | rm -f conftest.defines conftest.undefs | |
17563 | # Using a here document instead of a string reduces the quoting nightmare. | |
17564 | # Putting comments in sed scripts is not portable. | |
17565 | # | |
17566 | # `end' is used to avoid that the second main sed command (meant for | |
17567 | # 0-ary CPP macros) applies to n-ary macro definitions. | |
17568 | # See the Autoconf documentation for `clear'. | |
17569 | cat >confdef2sed.sed <<\_ACEOF | |
17570 | s/[\\&,]/\\&/g | |
17571 | s,[\\$`],\\&,g | |
17572 | t clear | |
17573 | : clear | |
86da66b5 | 17574 | s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp |
ba479fd2 | 17575 | t end |
86da66b5 | 17576 | s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp |
ba479fd2 NN |
17577 | : end |
17578 | _ACEOF | |
17579 | # If some macros were called several times there might be several times | |
17580 | # the same #defines, which is useless. Nevertheless, we may not want to | |
17581 | # sort them, since we want the *last* AC-DEFINE to be honored. | |
17582 | uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines | |
17583 | sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs | |
17584 | rm -f confdef2sed.sed | |
861bb6c1 JL |
17585 | |
17586 | # This sed command replaces #undef with comments. This is necessary, for | |
17587 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
17588 | # on some systems where configure will not decide to define it. | |
ba479fd2 | 17589 | cat >>conftest.undefs <<\_ACEOF |
86da66b5 | 17590 | s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, |
ba479fd2 NN |
17591 | _ACEOF |
17592 | ||
17593 | # Break up conftest.defines because some shells have a limit on the size | |
17594 | # of here documents, and old seds have small limits too (100 cmds). | |
17595 | echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS | |
86da66b5 | 17596 | echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS |
ba479fd2 NN |
17597 | echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS |
17598 | echo ' :' >>$CONFIG_STATUS | |
17599 | rm -f conftest.tail | |
17600 | while grep . conftest.defines >/dev/null | |
17601 | do | |
17602 | # Write a limited-size here document to $tmp/defines.sed. | |
17603 | echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS | |
17604 | # Speed up: don't consider the non `#define' lines. | |
86da66b5 | 17605 | echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
17606 | # Work around the forget-to-reset-the-flag bug. |
17607 | echo 't clr' >>$CONFIG_STATUS | |
17608 | echo ': clr' >>$CONFIG_STATUS | |
17609 | sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS | |
17610 | echo 'CEOF | |
17611 | sed -f $tmp/defines.sed $tmp/in >$tmp/out | |
17612 | rm -f $tmp/in | |
17613 | mv $tmp/out $tmp/in | |
17614 | ' >>$CONFIG_STATUS | |
17615 | sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail | |
17616 | rm -f conftest.defines | |
17617 | mv conftest.tail conftest.defines | |
17618 | done | |
17619 | rm -f conftest.defines | |
17620 | echo ' fi # grep' >>$CONFIG_STATUS | |
17621 | echo >>$CONFIG_STATUS | |
861bb6c1 | 17622 | |
ba479fd2 NN |
17623 | # Break up conftest.undefs because some shells have a limit on the size |
17624 | # of here documents, and old seds have small limits too (100 cmds). | |
17625 | echo ' # Handle all the #undef templates' >>$CONFIG_STATUS | |
861bb6c1 | 17626 | rm -f conftest.tail |
ba479fd2 | 17627 | while grep . conftest.undefs >/dev/null |
861bb6c1 | 17628 | do |
ba479fd2 NN |
17629 | # Write a limited-size here document to $tmp/undefs.sed. |
17630 | echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS | |
17631 | # Speed up: don't consider the non `#undef' | |
86da66b5 | 17632 | echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
17633 | # Work around the forget-to-reset-the-flag bug. |
17634 | echo 't clr' >>$CONFIG_STATUS | |
17635 | echo ': clr' >>$CONFIG_STATUS | |
17636 | sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS | |
861bb6c1 | 17637 | echo 'CEOF |
ba479fd2 NN |
17638 | sed -f $tmp/undefs.sed $tmp/in >$tmp/out |
17639 | rm -f $tmp/in | |
17640 | mv $tmp/out $tmp/in | |
17641 | ' >>$CONFIG_STATUS | |
17642 | sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail | |
17643 | rm -f conftest.undefs | |
17644 | mv conftest.tail conftest.undefs | |
861bb6c1 | 17645 | done |
ba479fd2 NN |
17646 | rm -f conftest.undefs |
17647 | ||
17648 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17649 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
17650 | # use $as_me), people would be surprised to read: | |
17651 | # /* config.h. Generated by config.status. */ | |
17652 | if test x"$ac_file" = x-; then | |
17653 | echo "/* Generated by configure. */" >$tmp/config.h | |
6e3f3080 | 17654 | else |
ba479fd2 | 17655 | echo "/* $ac_file. Generated by configure. */" >$tmp/config.h |
cafe096b | 17656 | fi |
ba479fd2 NN |
17657 | cat $tmp/in >>$tmp/config.h |
17658 | rm -f $tmp/in | |
17659 | if test x"$ac_file" != x-; then | |
17660 | if diff $ac_file $tmp/config.h >/dev/null 2>&1; then | |
17661 | { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 | |
17662 | echo "$as_me: $ac_file is unchanged" >&6;} | |
17663 | else | |
17664 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
17665 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17666 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
17667 | X"$ac_file" : 'X\(//\)$' \| \ | |
17668 | X"$ac_file" : 'X\(/\)' \| \ | |
17669 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17670 | echo X"$ac_file" | |
17671 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17672 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17673 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17674 | /^X\(\/\).*/{ s//\1/; q; } | |
17675 | s/.*/./; q'` | |
17676 | { if $as_mkdir_p; then | |
17677 | mkdir -p "$ac_dir" | |
17678 | else | |
17679 | as_dir="$ac_dir" | |
17680 | as_dirs= | |
17681 | while test ! -d "$as_dir"; do | |
17682 | as_dirs="$as_dir $as_dirs" | |
17683 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
17684 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17685 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
17686 | X"$as_dir" : 'X\(//\)$' \| \ | |
17687 | X"$as_dir" : 'X\(/\)' \| \ | |
17688 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17689 | echo X"$as_dir" | |
17690 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17691 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17692 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17693 | /^X\(\/\).*/{ s//\1/; q; } | |
17694 | s/.*/./; q'` | |
17695 | done | |
17696 | test ! -n "$as_dirs" || mkdir $as_dirs | |
17697 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
17698 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
17699 | { (exit 1); exit 1; }; }; } | |
63cf211a | 17700 | |
ba479fd2 NN |
17701 | rm -f $ac_file |
17702 | mv $tmp/config.h $ac_file | |
17703 | fi | |
17704 | else | |
17705 | cat $tmp/config.h | |
17706 | rm -f $tmp/config.h | |
17707 | fi | |
17708 | done | |
17709 | _ACEOF | |
17710 | cat >>$CONFIG_STATUS <<\_ACEOF | |
861bb6c1 | 17711 | |
ba479fd2 NN |
17712 | # |
17713 | # CONFIG_COMMANDS section. | |
17714 | # | |
17715 | for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue | |
17716 | ac_dest=`echo "$ac_file" | sed 's,:.*,,'` | |
17717 | ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
17718 | ac_dir=`(dirname "$ac_dest") 2>/dev/null || | |
17719 | $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17720 | X"$ac_dest" : 'X\(//\)[^/]' \| \ |
17721 | X"$ac_dest" : 'X\(//\)$' \| \ | |
17722 | X"$ac_dest" : 'X\(/\)' \| \ | |
17723 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17724 | echo X"$ac_dest" | |
17725 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17726 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17727 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17728 | /^X\(\/\).*/{ s//\1/; q; } | |
17729 | s/.*/./; q'` | |
86da66b5 HPN |
17730 | { if $as_mkdir_p; then |
17731 | mkdir -p "$ac_dir" | |
17732 | else | |
17733 | as_dir="$ac_dir" | |
17734 | as_dirs= | |
17735 | while test ! -d "$as_dir"; do | |
17736 | as_dirs="$as_dir $as_dirs" | |
17737 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
17738 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
17739 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
17740 | X"$as_dir" : 'X\(//\)$' \| \ | |
17741 | X"$as_dir" : 'X\(/\)' \| \ | |
17742 | . : '\(.\)' 2>/dev/null || | |
17743 | echo X"$as_dir" | | |
17744 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17745 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17746 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17747 | /^X\(\/\).*/{ s//\1/; q; } | |
17748 | s/.*/./; q'` | |
17749 | done | |
17750 | test ! -n "$as_dirs" || mkdir $as_dirs | |
17751 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
17752 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
17753 | { (exit 1); exit 1; }; }; } | |
17754 | ||
ba479fd2 NN |
17755 | ac_builddir=. |
17756 | ||
17757 | if test "$ac_dir" != .; then | |
17758 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
17759 | # A "../" for each directory in $ac_dir_suffix. | |
17760 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
17761 | else | |
17762 | ac_dir_suffix= ac_top_builddir= | |
17763 | fi | |
17764 | ||
17765 | case $srcdir in | |
17766 | .) # No --srcdir option. We are building in place. | |
17767 | ac_srcdir=. | |
17768 | if test -z "$ac_top_builddir"; then | |
17769 | ac_top_srcdir=. | |
17770 | else | |
17771 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
17772 | fi ;; | |
17773 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
17774 | ac_srcdir=$srcdir$ac_dir_suffix; | |
17775 | ac_top_srcdir=$srcdir ;; | |
17776 | *) # Relative path. | |
17777 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
17778 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
17779 | esac | |
8ab705be KC |
17780 | |
17781 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
17782 | # the directories may not exist. | |
17783 | case `pwd` in | |
17784 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 17785 | *) |
8ab705be KC |
17786 | case "$ac_dir" in |
17787 | .) ac_abs_builddir=`pwd`;; | |
17788 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
17789 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
17790 | esac;; |
17791 | esac | |
8ab705be | 17792 | case $ac_abs_builddir in |
86da66b5 HPN |
17793 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
17794 | *) | |
17795 | case ${ac_top_builddir}. in | |
8ab705be | 17796 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 17797 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 17798 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
17799 | esac;; |
17800 | esac | |
8ab705be | 17801 | case $ac_abs_builddir in |
86da66b5 HPN |
17802 | .) ac_abs_srcdir=$ac_srcdir;; |
17803 | *) | |
17804 | case $ac_srcdir in | |
8ab705be | 17805 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 17806 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 17807 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
17808 | esac;; |
17809 | esac | |
8ab705be | 17810 | case $ac_abs_builddir in |
86da66b5 HPN |
17811 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
17812 | *) | |
17813 | case $ac_top_srcdir in | |
8ab705be | 17814 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 17815 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 17816 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
17817 | esac;; |
17818 | esac | |
ba479fd2 NN |
17819 | |
17820 | ||
17821 | { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 | |
17822 | echo "$as_me: executing $ac_dest commands" >&6;} | |
17823 | case $ac_dest in | |
17824 | default ) | |
f1faaabd NN |
17825 | case ${CONFIG_HEADERS} in |
17826 | *auto-host.h:config.in*) | |
17827 | echo > cstamp-h ;; | |
861bb6c1 | 17828 | esac |
2ed26f6b | 17829 | # Make sure all the subdirs exist. |
3b620440 | 17830 | for d in $subdirs doc build |
2ed26f6b | 17831 | do |
2ed26f6b | 17832 | test -d $d || mkdir $d |
2ed26f6b | 17833 | done |
93cf819d BK |
17834 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
17835 | # bootstrapping and the installation procedure can still use | |
17836 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
17837 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
17838 | # This is virtually a duplicate of what happens in configure.lang; we do | |
17839 | # an extra check to make sure this only happens if ln -s can be used. | |
35f06ae4 PB |
17840 | case "$LN_S" in |
17841 | *-s*) | |
17842 | for d in ${subdirs} ; do | |
1e6347d8 | 17843 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e | 17844 | cd $d |
6a1b7268 | 17845 | for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include |
4e8a434e BK |
17846 | do |
17847 | rm -f $t | |
35f06ae4 | 17848 | $LN_S ../$t $t 2>/dev/null |
4e8a434e BK |
17849 | done |
17850 | cd $STARTDIR | |
35f06ae4 PB |
17851 | done |
17852 | ;; | |
17853 | esac | |
ba479fd2 NN |
17854 | ;; |
17855 | esac | |
17856 | done | |
17857 | _ACEOF | |
cafe096b | 17858 | |
ba479fd2 NN |
17859 | cat >>$CONFIG_STATUS <<\_ACEOF |
17860 | ||
17861 | { (exit 0); exit 0; } | |
17862 | _ACEOF | |
861bb6c1 | 17863 | chmod +x $CONFIG_STATUS |
ba479fd2 NN |
17864 | ac_clean_files=$ac_clean_files_save |
17865 | ||
17866 | ||
17867 | # configure is writing to config.log, and then calls config.status. | |
17868 | # config.status does its own redirection, appending to config.log. | |
17869 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
17870 | # by configure, so config.status won't be able to write to it; its | |
17871 | # output is simply discarded. So we exec the FD to /dev/null, | |
17872 | # effectively closing config.log, so it can be properly (re)opened and | |
17873 | # appended to by config.status. When coming back to configure, we | |
17874 | # need to make the FD available again. | |
17875 | if test "$no_create" != yes; then | |
17876 | ac_cs_success=: | |
17877 | ac_config_status_args= | |
17878 | test "$silent" = yes && | |
17879 | ac_config_status_args="$ac_config_status_args --quiet" | |
17880 | exec 5>/dev/null | |
17881 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
17882 | exec 5>>config.log | |
17883 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
17884 | # would make configure fail if this is the last instruction. | |
17885 | $ac_cs_success || { (exit 1); exit 1; } | |
17886 | fi | |
861bb6c1 | 17887 |