]>
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 | ||
75685792 | 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 gcc_version_trigger gcc_version_full gcc_version 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 PACKAGE VERSION 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 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 set_gcc_lib_path 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. | |
e1bbfc5c NS |
870 | Categories are: assert,fold,gc,gcac,misc, |
871 | rtlflag,rtl,tree,valgrind,release,yes,all; | |
74ee1642 | 872 | --enable-mapped-location location_t is fileline integer cookie |
ba479fd2 | 873 | --enable-coverage=LEVEL |
fb38008e | 874 | enable compiler's code coverage collection. |
ba479fd2 NN |
875 | Use to measure compiler performance and locate |
876 | unused parts of the compiler. With LEVEL, specify | |
877 | optimization. Values are opt, noopt, | |
878 | default is noopt | |
879 | --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering | |
880 | --enable-multilib enable library support for multiple ABIs | |
881 | --enable-__cxa_atexit enable __cxa_atexit for C++ | |
882 | --enable-threads enable thread usage for target GCC | |
883 | --enable-threads=LIB use LIB thread package for target GCC | |
884 | --enable-objc-gc enable the use of Boehm's garbage collector with | |
885 | the GNU Objective-C runtime | |
886 | --disable-shared don't provide a shared libgcc | |
887 | --enable-intermodule build the compiler in one step | |
f3c9f174 | 888 | --enable-languages=LIST specify which front-ends to build |
dfb77e37 | 889 | --disable-rpath do not hardcode runtime library paths |
ba479fd2 NN |
890 | --enable-initfini-array use .init_array/.fini_array sections |
891 | --enable-sjlj-exceptions | |
892 | arrange to use setjmp/longjmp exception handling | |
ba479fd2 NN |
893 | --disable-win32-registry |
894 | disable lookup of installation paths in the | |
895 | Registry on Windows hosts | |
896 | --enable-win32-registry enable registry lookup (default) | |
897 | --enable-win32-registry=KEY | |
898 | use KEY instead of GCC version as the last portion | |
899 | of the registry key | |
900 | --enable-maintainer-mode | |
901 | enable make rules and dependencies not useful | |
902 | (and sometimes confusing) to the casual installer | |
903 | --enable-version-specific-runtime-libs | |
904 | specify that runtime libraries should be | |
905 | installed in a compiler-specific directory | |
093e61a6 | 906 | |
ba479fd2 NN |
907 | Optional Packages: |
908 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
909 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
910 | --with-local-prefix=DIR specifies directory to put local include | |
911 | --with-gxx-include-dir=DIR | |
912 | specifies directory to put g++ header files | |
913 | --with-cpp-install-dir=DIR | |
914 | install the user visible C preprocessor in DIR | |
915 | (relative to PREFIX) as well as PREFIX/bin | |
916 | --with-gnu-ld arrange to work with GNU ld. | |
917 | --with-ld arrange to use the specified ld (full pathname) | |
d594623a | 918 | --with-demangler-in-ld try to use demangler in GNU ld. |
ba479fd2 NN |
919 | --with-gnu-as arrange to work with GNU as |
920 | --with-as arrange to use the specified as (full pathname) | |
921 | --with-stabs arrange to use stabs instead of host debug format | |
922 | --with-dwarf2 force the default debug format to be DWARF 2 | |
923 | --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR. | |
dfb77e37 KC |
924 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
925 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
926 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
443728bb | 927 | --with-system-libunwind use installed libunwind |
59415997 | 928 | --with-gc={page,zone} choose the garbage collection mechanism to use |
ba479fd2 NN |
929 | with the compiler |
930 | --with-system-zlib use installed libz | |
931 | --with-slibdir=DIR shared libraries in DIR LIBDIR | |
13c22933 | 932 | |
ba479fd2 NN |
933 | Some influential environment variables: |
934 | CC C compiler command | |
935 | CFLAGS C compiler flags | |
936 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
937 | nonstandard directory <lib dir> | |
938 | CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have | |
939 | headers in a nonstandard directory <include dir> | |
940 | CPP C preprocessor | |
6de9cd9a DN |
941 | GMPLIBS How to link GMP |
942 | GMPINC How to find GMP include files | |
13c22933 | 943 | |
ba479fd2 NN |
944 | Use these variables to override the choices made by `configure' or to help |
945 | it to find libraries and programs with nonstandard names/locations. | |
73458fb7 | 946 | |
ba479fd2 NN |
947 | _ACEOF |
948 | fi | |
6e3f3080 | 949 | |
ba479fd2 NN |
950 | if test "$ac_init_help" = "recursive"; then |
951 | # If there are subdirs, report their specific --help. | |
952 | ac_popdir=`pwd` | |
953 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
954 | test -d $ac_dir || continue | |
955 | ac_builddir=. | |
956 | ||
957 | if test "$ac_dir" != .; then | |
958 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
959 | # A "../" for each directory in $ac_dir_suffix. | |
960 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
961 | else | |
962 | ac_dir_suffix= ac_top_builddir= | |
963 | fi | |
964 | ||
965 | case $srcdir in | |
966 | .) # No --srcdir option. We are building in place. | |
967 | ac_srcdir=. | |
968 | if test -z "$ac_top_builddir"; then | |
969 | ac_top_srcdir=. | |
970 | else | |
971 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
972 | fi ;; | |
973 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
974 | ac_srcdir=$srcdir$ac_dir_suffix; | |
975 | ac_top_srcdir=$srcdir ;; | |
976 | *) # Relative path. | |
977 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
978 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
979 | esac | |
8ab705be KC |
980 | |
981 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
982 | # the directories may not exist. | |
983 | case `pwd` in | |
984 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 985 | *) |
8ab705be KC |
986 | case "$ac_dir" in |
987 | .) ac_abs_builddir=`pwd`;; | |
988 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
989 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
990 | esac;; |
991 | esac | |
8ab705be | 992 | case $ac_abs_builddir in |
86da66b5 HPN |
993 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
994 | *) | |
995 | case ${ac_top_builddir}. in | |
8ab705be | 996 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 997 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 998 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
999 | esac;; |
1000 | esac | |
8ab705be | 1001 | case $ac_abs_builddir in |
86da66b5 HPN |
1002 | .) ac_abs_srcdir=$ac_srcdir;; |
1003 | *) | |
1004 | case $ac_srcdir in | |
8ab705be | 1005 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 1006 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 1007 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
1008 | esac;; |
1009 | esac | |
8ab705be | 1010 | case $ac_abs_builddir in |
86da66b5 HPN |
1011 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
1012 | *) | |
1013 | case $ac_top_srcdir in | |
8ab705be | 1014 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 1015 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 1016 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
1017 | esac;; |
1018 | esac | |
ba479fd2 NN |
1019 | |
1020 | cd $ac_dir | |
1021 | # Check for guested configure; otherwise get Cygnus style configure. | |
1022 | if test -f $ac_srcdir/configure.gnu; then | |
1023 | echo | |
1024 | $SHELL $ac_srcdir/configure.gnu --help=recursive | |
1025 | elif test -f $ac_srcdir/configure; then | |
1026 | echo | |
1027 | $SHELL $ac_srcdir/configure --help=recursive | |
1028 | elif test -f $ac_srcdir/configure.ac || | |
86da66b5 | 1029 | test -f $ac_srcdir/configure.in; then |
ba479fd2 NN |
1030 | echo |
1031 | $ac_configure --help | |
1032 | else | |
1033 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
1034 | fi | |
b095fe2c | 1035 | cd "$ac_popdir" |
ba479fd2 NN |
1036 | done |
1037 | fi | |
1038 | ||
1039 | test -n "$ac_init_help" && exit 0 | |
1040 | if $ac_init_version; then | |
1041 | cat <<\_ACEOF | |
1042 | ||
86da66b5 | 1043 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
1044 | This configure script is free software; the Free Software Foundation |
1045 | gives unlimited permission to copy, distribute and modify it. | |
1046 | _ACEOF | |
1047 | exit 0 | |
1048 | fi | |
1049 | exec 5>config.log | |
1050 | cat >&5 <<_ACEOF | |
1051 | This file contains any messages produced by compilers while | |
1052 | running configure, to aid debugging if configure makes a mistake. | |
1053 | ||
1054 | It was created by $as_me, which was | |
8ab705be | 1055 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
1056 | |
1057 | $ $0 $@ | |
1058 | ||
1059 | _ACEOF | |
1060 | { | |
1061 | cat <<_ASUNAME | |
1062 | ## --------- ## | |
1063 | ## Platform. ## | |
1064 | ## --------- ## | |
1065 | ||
1066 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
1067 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1068 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1069 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1070 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1071 | ||
1072 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
1073 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
1074 | ||
1075 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
1076 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
1077 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
1078 | hostinfo = `(hostinfo) 2>/dev/null || echo unknown` | |
1079 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
1080 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
1081 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
1082 | ||
1083 | _ASUNAME | |
1084 | ||
1085 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1086 | for as_dir in $PATH | |
1087 | do | |
1088 | IFS=$as_save_IFS | |
1089 | test -z "$as_dir" && as_dir=. | |
1090 | echo "PATH: $as_dir" | |
1091 | done | |
1092 | ||
1093 | } >&5 | |
1094 | ||
1095 | cat >&5 <<_ACEOF | |
1096 | ||
1097 | ||
1098 | ## ----------- ## | |
1099 | ## Core tests. ## | |
1100 | ## ----------- ## | |
1101 | ||
1102 | _ACEOF | |
1103 | ||
1104 | ||
1105 | # Keep a trace of the command line. | |
1106 | # Strip out --no-create and --no-recursion so they do not pile up. | |
1107 | # Strip out --silent because we don't want to record it for future runs. | |
1108 | # Also quote any args containing shell meta-characters. | |
1109 | # Make two passes to allow for proper duplicate-argument suppression. | |
1110 | ac_configure_args= | |
1111 | ac_configure_args0= | |
1112 | ac_configure_args1= | |
1113 | ac_sep= | |
1114 | ac_must_keep_next=false | |
1115 | for ac_pass in 1 2 | |
1116 | do | |
1117 | for ac_arg | |
1118 | do | |
1119 | case $ac_arg in | |
1120 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
1121 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1122 | | -silent | --silent | --silen | --sile | --sil) | |
1123 | continue ;; | |
1124 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1125 | ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1126 | esac | |
1127 | case $ac_pass in | |
1128 | 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; | |
1129 | 2) | |
1130 | ac_configure_args1="$ac_configure_args1 '$ac_arg'" | |
1131 | if test $ac_must_keep_next = true; then | |
86da66b5 | 1132 | ac_must_keep_next=false # Got value, back to normal. |
ba479fd2 | 1133 | else |
86da66b5 HPN |
1134 | case $ac_arg in |
1135 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
1136 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
1137 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
1138 | | -with-* | --with-* | -without-* | --without-* | --x) | |
1139 | case "$ac_configure_args0 " in | |
1140 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
1141 | esac | |
1142 | ;; | |
1143 | -* ) ac_must_keep_next=true ;; | |
1144 | esac | |
ba479fd2 NN |
1145 | fi |
1146 | ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" | |
1147 | # Get rid of the leading space. | |
1148 | ac_sep=" " | |
1149 | ;; | |
1150 | esac | |
1151 | done | |
1152 | done | |
1153 | $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } | |
1154 | $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } | |
1155 | ||
1156 | # When interrupted or exit'd, cleanup temporary files, and complete | |
1157 | # config.log. We remove comments because anyway the quotes in there | |
1158 | # would cause problems or look ugly. | |
1159 | # WARNING: Be sure not to use single quotes in there, as some shells, | |
1160 | # such as our DU 5.0 friend, will then `close' the trap. | |
1161 | trap 'exit_status=$? | |
1162 | # Save into config.log some information that might help in debugging. | |
1163 | { | |
1164 | echo | |
1165 | ||
1166 | cat <<\_ASBOX | |
1167 | ## ---------------- ## | |
1168 | ## Cache variables. ## | |
1169 | ## ---------------- ## | |
1170 | _ASBOX | |
1171 | echo | |
1172 | # The following way of writing the cache mishandles newlines in values, | |
1173 | { | |
1174 | (set) 2>&1 | | |
1175 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in | |
1176 | *ac_space=\ *) | |
1177 | sed -n \ | |
86da66b5 HPN |
1178 | "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; |
1179 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" | |
ba479fd2 NN |
1180 | ;; |
1181 | *) | |
1182 | sed -n \ | |
86da66b5 | 1183 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
ba479fd2 NN |
1184 | ;; |
1185 | esac; | |
1186 | } | |
1187 | echo | |
1188 | ||
1189 | cat <<\_ASBOX | |
1190 | ## ----------------- ## | |
1191 | ## Output variables. ## | |
1192 | ## ----------------- ## | |
1193 | _ASBOX | |
1194 | echo | |
1195 | for ac_var in $ac_subst_vars | |
1196 | do | |
1197 | eval ac_val=$`echo $ac_var` | |
1198 | echo "$ac_var='"'"'$ac_val'"'"'" | |
1199 | done | sort | |
1200 | echo | |
1201 | ||
1202 | if test -n "$ac_subst_files"; then | |
1203 | cat <<\_ASBOX | |
1204 | ## ------------- ## | |
1205 | ## Output files. ## | |
1206 | ## ------------- ## | |
1207 | _ASBOX | |
1208 | echo | |
1209 | for ac_var in $ac_subst_files | |
1210 | do | |
1211 | eval ac_val=$`echo $ac_var` | |
86da66b5 | 1212 | echo "$ac_var='"'"'$ac_val'"'"'" |
ba479fd2 NN |
1213 | done | sort |
1214 | echo | |
1215 | fi | |
1216 | ||
1217 | if test -s confdefs.h; then | |
1218 | cat <<\_ASBOX | |
1219 | ## ----------- ## | |
1220 | ## confdefs.h. ## | |
1221 | ## ----------- ## | |
1222 | _ASBOX | |
1223 | echo | |
1224 | sed "/^$/d" confdefs.h | sort | |
1225 | echo | |
1226 | fi | |
1227 | test "$ac_signal" != 0 && | |
1228 | echo "$as_me: caught signal $ac_signal" | |
1229 | echo "$as_me: exit $exit_status" | |
1230 | } >&5 | |
86da66b5 | 1231 | rm -f core *.core && |
ba479fd2 NN |
1232 | rm -rf conftest* confdefs* conf$$* $ac_clean_files && |
1233 | exit $exit_status | |
1234 | ' 0 | |
1235 | for ac_signal in 1 2 13 15; do | |
1236 | trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal | |
1237 | done | |
1238 | ac_signal=0 | |
1239 | ||
1240 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
1241 | rm -rf conftest* confdefs.h | |
1242 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
1243 | echo >confdefs.h | |
1244 | ||
1245 | # Predefined preprocessor variables. | |
1246 | ||
1247 | cat >>confdefs.h <<_ACEOF | |
1248 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
1249 | _ACEOF | |
1250 | ||
1251 | ||
1252 | cat >>confdefs.h <<_ACEOF | |
1253 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
1254 | _ACEOF | |
1255 | ||
1256 | ||
1257 | cat >>confdefs.h <<_ACEOF | |
1258 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
1259 | _ACEOF | |
1260 | ||
1261 | ||
1262 | cat >>confdefs.h <<_ACEOF | |
1263 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
1264 | _ACEOF | |
1265 | ||
1266 | ||
1267 | cat >>confdefs.h <<_ACEOF | |
1268 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
1269 | _ACEOF | |
1270 | ||
1271 | ||
1272 | # Let the site file select an alternate cache file if it wants to. | |
1273 | # Prefer explicitly selected file to automatically selected ones. | |
1274 | if test -z "$CONFIG_SITE"; then | |
1275 | if test "x$prefix" != xNONE; then | |
1276 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
1277 | else | |
1278 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
1279 | fi | |
1280 | fi | |
1281 | for ac_site_file in $CONFIG_SITE; do | |
1282 | if test -r "$ac_site_file"; then | |
1283 | { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 | |
1284 | echo "$as_me: loading site script $ac_site_file" >&6;} | |
1285 | sed 's/^/| /' "$ac_site_file" >&5 | |
1286 | . "$ac_site_file" | |
1287 | fi | |
1288 | done | |
1289 | ||
1290 | if test -r "$cache_file"; then | |
1291 | # Some versions of bash will fail to source /dev/null (special | |
1292 | # files actually), so we avoid doing that. | |
1293 | if test -f "$cache_file"; then | |
1294 | { echo "$as_me:$LINENO: loading cache $cache_file" >&5 | |
1295 | echo "$as_me: loading cache $cache_file" >&6;} | |
1296 | case $cache_file in | |
1297 | [\\/]* | ?:[\\/]* ) . $cache_file;; | |
1298 | *) . ./$cache_file;; | |
1299 | esac | |
1300 | fi | |
1301 | else | |
1302 | { echo "$as_me:$LINENO: creating cache $cache_file" >&5 | |
1303 | echo "$as_me: creating cache $cache_file" >&6;} | |
1304 | >$cache_file | |
1305 | fi | |
1306 | ||
1307 | # Check that the precious variables saved in the cache have kept the same | |
1308 | # value. | |
1309 | ac_cache_corrupted=false | |
1310 | for ac_var in `(set) 2>&1 | | |
86da66b5 | 1311 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do |
ba479fd2 NN |
1312 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
1313 | eval ac_new_set=\$ac_env_${ac_var}_set | |
1314 | eval ac_old_val="\$ac_cv_env_${ac_var}_value" | |
1315 | eval ac_new_val="\$ac_env_${ac_var}_value" | |
1316 | case $ac_old_set,$ac_new_set in | |
1317 | set,) | |
1318 | { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
1319 | echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
1320 | ac_cache_corrupted=: ;; | |
1321 | ,set) | |
1322 | { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 | |
1323 | echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
1324 | ac_cache_corrupted=: ;; | |
1325 | ,);; | |
1326 | *) | |
1327 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
86da66b5 | 1328 | { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 |
ba479fd2 | 1329 | echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} |
86da66b5 | 1330 | { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 |
ba479fd2 | 1331 | echo "$as_me: former value: $ac_old_val" >&2;} |
86da66b5 | 1332 | { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 |
ba479fd2 | 1333 | echo "$as_me: current value: $ac_new_val" >&2;} |
86da66b5 | 1334 | ac_cache_corrupted=: |
ba479fd2 NN |
1335 | fi;; |
1336 | esac | |
1337 | # Pass precious variables to config.status. | |
1338 | if test "$ac_new_set" = set; then | |
1339 | case $ac_new_val in | |
1340 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1341 | ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1342 | *) ac_arg=$ac_var=$ac_new_val ;; | |
1343 | esac | |
1344 | case " $ac_configure_args " in | |
1345 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
1346 | *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
1347 | esac | |
1348 | fi | |
1349 | done | |
1350 | if $ac_cache_corrupted; then | |
1351 | { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 | |
1352 | echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
1353 | { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 | |
1354 | echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} | |
1355 | { (exit 1); exit 1; }; } | |
1356 | fi | |
1357 | ||
1358 | ac_ext=c | |
1359 | ac_cpp='$CPP $CPPFLAGS' | |
1360 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1361 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1362 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1363 | ||
1364 | ||
1365 | ||
1366 | ||
1367 | ||
1368 | ||
1369 | ||
1370 | ||
1371 | ||
1372 | ||
1373 | ||
1374 | ||
1375 | ||
1376 | ||
1377 | ||
1378 | ||
1379 | ||
1380 | ||
1381 | ||
914c5af7 | 1382 | |
ba479fd2 NN |
1383 | ac_config_headers="$ac_config_headers auto-host.h:config.in" |
1384 | ||
1385 | ||
06c37c96 NS |
1386 | #Set to 1 on a release branch |
1387 | is_release= | |
1388 | ||
ba479fd2 NN |
1389 | # Determine the host, build, and target systems |
1390 | ac_aux_dir= | |
1391 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
1392 | if test -f $ac_dir/install-sh; then | |
1393 | ac_aux_dir=$ac_dir | |
1394 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1395 | break | |
1396 | elif test -f $ac_dir/install.sh; then | |
1397 | ac_aux_dir=$ac_dir | |
1398 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1399 | break | |
1400 | elif test -f $ac_dir/shtool; then | |
1401 | ac_aux_dir=$ac_dir | |
1402 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
1403 | break | |
1404 | fi | |
1405 | done | |
1406 | if test -z "$ac_aux_dir"; then | |
1407 | { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 | |
1408 | echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} | |
1409 | { (exit 1); exit 1; }; } | |
1410 | fi | |
1411 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" | |
1412 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" | |
1413 | ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. | |
1414 | ||
1415 | # Make sure we can run config.sub. | |
1416 | $ac_config_sub sun4 >/dev/null 2>&1 || | |
1417 | { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 | |
1418 | echo "$as_me: error: cannot run $ac_config_sub" >&2;} | |
1419 | { (exit 1); exit 1; }; } | |
1420 | ||
1421 | echo "$as_me:$LINENO: checking build system type" >&5 | |
1422 | echo $ECHO_N "checking build system type... $ECHO_C" >&6 | |
1423 | if test "${ac_cv_build+set}" = set; then | |
1424 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1425 | else | |
1426 | ac_cv_build_alias=$build_alias | |
1427 | test -z "$ac_cv_build_alias" && | |
1428 | ac_cv_build_alias=`$ac_config_guess` | |
1429 | test -z "$ac_cv_build_alias" && | |
1430 | { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 | |
1431 | echo "$as_me: error: cannot guess build type; you must specify one" >&2;} | |
1432 | { (exit 1); exit 1; }; } | |
1433 | ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || | |
1434 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 | |
1435 | echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} | |
1436 | { (exit 1); exit 1; }; } | |
1437 | ||
1438 | fi | |
1439 | echo "$as_me:$LINENO: result: $ac_cv_build" >&5 | |
1440 | echo "${ECHO_T}$ac_cv_build" >&6 | |
1441 | build=$ac_cv_build | |
1442 | build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1443 | build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1444 | build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1445 | ||
1446 | ||
1447 | echo "$as_me:$LINENO: checking host system type" >&5 | |
1448 | echo $ECHO_N "checking host system type... $ECHO_C" >&6 | |
1449 | if test "${ac_cv_host+set}" = set; then | |
1450 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1451 | else | |
1452 | ac_cv_host_alias=$host_alias | |
1453 | test -z "$ac_cv_host_alias" && | |
1454 | ac_cv_host_alias=$ac_cv_build_alias | |
1455 | ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || | |
1456 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 | |
1457 | echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} | |
1458 | { (exit 1); exit 1; }; } | |
1459 | ||
1460 | fi | |
1461 | echo "$as_me:$LINENO: result: $ac_cv_host" >&5 | |
1462 | echo "${ECHO_T}$ac_cv_host" >&6 | |
1463 | host=$ac_cv_host | |
1464 | host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1465 | host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1466 | host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1467 | ||
1468 | ||
1469 | echo "$as_me:$LINENO: checking target system type" >&5 | |
1470 | echo $ECHO_N "checking target system type... $ECHO_C" >&6 | |
1471 | if test "${ac_cv_target+set}" = set; then | |
1472 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1473 | else | |
1474 | ac_cv_target_alias=$target_alias | |
1475 | test "x$ac_cv_target_alias" = "x" && | |
1476 | ac_cv_target_alias=$ac_cv_host_alias | |
1477 | ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || | |
1478 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 | |
1479 | echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} | |
1480 | { (exit 1); exit 1; }; } | |
1481 | ||
1482 | fi | |
1483 | echo "$as_me:$LINENO: result: $ac_cv_target" >&5 | |
1484 | echo "${ECHO_T}$ac_cv_target" >&6 | |
1485 | target=$ac_cv_target | |
1486 | target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1487 | target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1488 | target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1489 | ||
1490 | ||
1491 | # The aliases save the names the user supplied, while $host etc. | |
1492 | # will get canonicalized. | |
1493 | test -n "$target_alias" && | |
1494 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1495 | NONENONEs,x,x, && | |
1496 | program_prefix=${target_alias}- | |
1497 | ||
1498 | # Determine the noncanonical target name, for directory use. | |
1499 | case ${build_alias} in | |
1500 | "") build_noncanonical=${build} ;; | |
6e3f3080 NN |
1501 | *) build_noncanonical=${build_alias} ;; |
1502 | esac | |
73458fb7 | 1503 | |
4665e56c NN |
1504 | case ${host_alias} in |
1505 | "") host_noncanonical=${build_noncanonical} ;; | |
1506 | *) host_noncanonical=${host_alias} ;; | |
1507 | esac | |
73458fb7 | 1508 | |
4665e56c NN |
1509 | case ${target_alias} in |
1510 | "") target_noncanonical=${host_noncanonical} ;; | |
1511 | *) target_noncanonical=${target_alias} ;; | |
1512 | esac | |
093e61a6 | 1513 | |
8f1529e6 L |
1514 | |
1515 | ||
1516 | ||
1517 | # Determine the target- and build-specific subdirectories | |
4665e56c NN |
1518 | # Prefix 'build-' so this never conflicts with target_subdir. |
1519 | build_subdir="build-${build_noncanonical}" | |
215c351a PB |
1520 | # --srcdir=. covers the toplevel, while "test -d" covers the subdirectories |
1521 | if ( test $srcdir = . && test -d gcc ) \ | |
1522 | || test -d $srcdir/../host-${host_noncanonical}; then | |
1523 | host_subdir="host-${host_noncanonical}" | |
1524 | else | |
1525 | host_subdir=. | |
1526 | fi | |
4665e56c NN |
1527 | # No prefix. |
1528 | target_subdir=${target_noncanonical} | |
ba479fd2 | 1529 | |
73458fb7 | 1530 | |
093e61a6 | 1531 | # Set program_transform_name |
13c22933 | 1532 | test "$program_prefix" != NONE && |
ba479fd2 | 1533 | program_transform_name="s,^,$program_prefix,;$program_transform_name" |
13c22933 JJ |
1534 | # Use a double $ so make ignores it. |
1535 | test "$program_suffix" != NONE && | |
ba479fd2 NN |
1536 | program_transform_name="s,\$,$program_suffix,;$program_transform_name" |
1537 | # Double any \ or $. echo might interpret backslashes. | |
1538 | # By default was `s,x,x', remove it if useless. | |
1539 | cat <<\_ACEOF >conftest.sed | |
1540 | s/[\\$]/&&/g;s/;s,x,x,$// | |
1541 | _ACEOF | |
1542 | program_transform_name=`echo $program_transform_name | sed -f conftest.sed` | |
1543 | rm conftest.sed | |
13c22933 JJ |
1544 | |
1545 | ||
34a86c2b NN |
1546 | # Check for bogus environment variables. |
1547 | # Test if LIBRARY_PATH contains the notation for the current directory | |
1548 | # since this would lead to problems installing/building glibc. | |
1549 | # LIBRARY_PATH contains the current directory if one of the following | |
1550 | # is true: | |
1551 | # - one of the terminals (":" and ";") is the first or last sign | |
1552 | # - two terminals occur directly after each other | |
1553 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1554 | echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5 |
1555 | echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6 | |
34a86c2b NN |
1556 | case ${LIBRARY_PATH} in |
1557 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1558 | library_path_setting="contains current directory" | |
1559 | ;; | |
1560 | *) | |
1561 | library_path_setting="ok" | |
1562 | ;; | |
1563 | esac | |
ba479fd2 NN |
1564 | echo "$as_me:$LINENO: result: $library_path_setting" >&5 |
1565 | echo "${ECHO_T}$library_path_setting" >&6 | |
34a86c2b | 1566 | if test "$library_path_setting" != "ok"; then |
ba479fd2 | 1567 | { { echo "$as_me:$LINENO: error: |
34a86c2b NN |
1568 | *** LIBRARY_PATH shouldn't contain the current directory when |
1569 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1570 | *** and run configure again." >&5 |
1571 | echo "$as_me: error: | |
1572 | *** LIBRARY_PATH shouldn't contain the current directory when | |
1573 | *** building gcc. Please change the environment variable | |
1574 | *** and run configure again." >&2;} | |
1575 | { (exit 1); exit 1; }; } | |
e9a25f70 JL |
1576 | fi |
1577 | ||
34a86c2b NN |
1578 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
1579 | # since this would lead to problems installing/building glibc. | |
1580 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
1581 | # is true: | |
1582 | # - one of the terminals (":" and ";") is the first or last sign | |
1583 | # - two terminals occur directly after each other | |
1584 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1585 | echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5 |
1586 | echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6 | |
34a86c2b NN |
1587 | case ${GCC_EXEC_PREFIX} in |
1588 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1589 | gcc_exec_prefix_setting="contains current directory" | |
1590 | ;; | |
1591 | *) | |
1592 | gcc_exec_prefix_setting="ok" | |
1593 | ;; | |
1594 | esac | |
ba479fd2 NN |
1595 | echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5 |
1596 | echo "${ECHO_T}$gcc_exec_prefix_setting" >&6 | |
34a86c2b | 1597 | if test "$gcc_exec_prefix_setting" != "ok"; then |
ba479fd2 NN |
1598 | { { echo "$as_me:$LINENO: error: |
1599 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
1600 | *** building gcc. Please change the environment variable | |
1601 | *** and run configure again." >&5 | |
1602 | echo "$as_me: error: | |
cafe096b EC |
1603 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
1604 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1605 | *** and run configure again." >&2;} |
1606 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1607 | fi |
1608 | ||
4982adbe RS |
1609 | |
1610 | if test "${with_gcc_version_trigger+set}" = set; then | |
1611 | gcc_version_trigger=$with_gcc_version_trigger | |
1612 | else | |
1613 | gcc_version_trigger=$srcdir/../gcc/version.c | |
1614 | fi | |
1615 | if test -f "${gcc_version_trigger}"; then | |
1616 | gcc_version_full=`grep version_string "${gcc_version_trigger}" | sed -e 's/.*"\([^"]*\)".*/\1/'` | |
1617 | else | |
1618 | gcc_version_full=`$CC -v 2>&1 | sed -n 's/^gcc version //p'` | |
1619 | fi | |
1620 | gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` | |
1621 | ||
1622 | ||
1623 | ||
1624 | ||
1625 | ||
34a86c2b NN |
1626 | # ----------- |
1627 | # Directories | |
1628 | # ----------- | |
1629 | ||
1630 | # Specify the local prefix | |
1631 | local_prefix= | |
ba479fd2 | 1632 | |
34a86c2b NN |
1633 | # Check whether --with-local-prefix or --without-local-prefix was given. |
1634 | if test "${with_local_prefix+set}" = set; then | |
1635 | withval="$with_local_prefix" | |
1636 | case "${withval}" in | |
ba479fd2 NN |
1637 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5 |
1638 | echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;} | |
1639 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1640 | no) ;; |
1641 | *) local_prefix=$with_local_prefix ;; | |
1642 | esac | |
ba479fd2 | 1643 | fi; |
34a86c2b NN |
1644 | |
1645 | # Default local prefix if it is empty | |
1646 | if test x$local_prefix = x; then | |
1647 | local_prefix=/usr/local | |
1648 | fi | |
1649 | ||
1650 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
1651 | # passed in by the toplevel make and thus we'd get different behavior | |
1652 | # depending on where we built the sources. | |
1653 | gcc_gxx_include_dir= | |
1654 | # Specify the g++ header file directory | |
ba479fd2 | 1655 | |
34a86c2b NN |
1656 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. |
1657 | if test "${with_gxx_include_dir+set}" = set; then | |
1658 | withval="$with_gxx_include_dir" | |
1659 | case "${withval}" in | |
ba479fd2 NN |
1660 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5 |
1661 | echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;} | |
1662 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1663 | no) ;; |
1664 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
1665 | esac | |
ba479fd2 | 1666 | fi; |
34a86c2b NN |
1667 | |
1668 | if test x${gcc_gxx_include_dir} = x; then | |
1669 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
1670 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
1671 | else | |
4982adbe | 1672 | libstdcxx_incdir=c++/${gcc_version} |
34a86c2b NN |
1673 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} |
1674 | fi | |
1675 | fi | |
1676 | ||
ba479fd2 | 1677 | |
34a86c2b NN |
1678 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. |
1679 | if test "${with_cpp_install_dir+set}" = set; then | |
1680 | withval="$with_cpp_install_dir" | |
1681 | if test x$withval = xyes; then | |
ba479fd2 NN |
1682 | { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5 |
1683 | echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;} | |
1684 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1685 | elif test x$withval != xno; then |
1686 | cpp_install_dir=$withval | |
1687 | fi | |
ba479fd2 | 1688 | fi; |
34a86c2b | 1689 | |
51b9ff45 | 1690 | # We would like to our source tree to be readonly. However when releases or |
ba479fd2 | 1691 | # pre-releases are generated, the flex/bison generated files as well as the |
51b9ff45 | 1692 | # various formats of manuals need to be included along with the rest of the |
ba479fd2 | 1693 | # sources. Therefore we have --enable-generated-files-in-srcdir to do |
51b9ff45 KC |
1694 | # just that. |
1695 | ||
03787dfd KC |
1696 | echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5 |
1697 | echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6 | |
1698 | # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given. | |
51b9ff45 KC |
1699 | if test "${enable_generated_files_in_srcdir+set}" = set; then |
1700 | enableval="$enable_generated_files_in_srcdir" | |
03787dfd | 1701 | generated_files_in_srcdir=$enableval |
51b9ff45 | 1702 | else |
03787dfd | 1703 | generated_files_in_srcdir=no |
ba479fd2 | 1704 | fi; |
51b9ff45 | 1705 | |
03787dfd KC |
1706 | echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5 |
1707 | echo "${ECHO_T}$generated_files_in_srcdir" >&6 | |
1708 | ||
1709 | if test "$generated_files_in_srcdir" = "yes"; then | |
1710 | GENINSRC='' | |
03787dfd KC |
1711 | else |
1712 | GENINSRC='#' | |
03787dfd KC |
1713 | fi |
1714 | ||
1715 | ||
34a86c2b NN |
1716 | # ------------------- |
1717 | # Find default linker | |
1718 | # ------------------- | |
1719 | ||
1720 | # With GNU ld | |
ba479fd2 | 1721 | |
34a86c2b NN |
1722 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
1723 | if test "${with_gnu_ld+set}" = set; then | |
1724 | withval="$with_gnu_ld" | |
1725 | gnu_ld_flag="$with_gnu_ld" | |
1726 | else | |
1727 | gnu_ld_flag=no | |
ba479fd2 | 1728 | fi; |
6e3f3080 | 1729 | |
63cf211a | 1730 | # With pre-defined ld |
ba479fd2 | 1731 | |
34a86c2b NN |
1732 | # Check whether --with-ld or --without-ld was given. |
1733 | if test "${with_ld+set}" = set; then | |
1734 | withval="$with_ld" | |
1735 | DEFAULT_LINKER="$with_ld" | |
ba479fd2 | 1736 | fi; |
34a86c2b NN |
1737 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1738 | if test ! -x "$DEFAULT_LINKER"; then | |
99c012a8 BE |
1739 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5 |
1740 | echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;} | |
1741 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1742 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1743 | gnu_ld_flag=yes | |
1744 | fi | |
ba479fd2 NN |
1745 | |
1746 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1747 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
ba479fd2 | 1748 | _ACEOF |
34a86c2b NN |
1749 | |
1750 | fi | |
1751 | ||
ba479fd2 NN |
1752 | echo "$as_me:$LINENO: checking whether a default linker was specified" >&5 |
1753 | echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1754 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1755 | if test x"$gnu_ld_flag" = x"no"; then | |
ba479fd2 NN |
1756 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5 |
1757 | echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6 | |
34a86c2b | 1758 | else |
ba479fd2 NN |
1759 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5 |
1760 | echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6 | |
34a86c2b NN |
1761 | fi |
1762 | else | |
ba479fd2 NN |
1763 | echo "$as_me:$LINENO: result: no" >&5 |
1764 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1765 | fi |
1766 | ||
d594623a L |
1767 | # With demangler in GNU ld |
1768 | ||
1769 | # Check whether --with-demangler-in-ld or --without-demangler-in-ld was given. | |
1770 | if test "${with_demangler_in_ld+set}" = set; then | |
1771 | withval="$with_demangler_in_ld" | |
1772 | demangler_in_ld="$with_demangler_in_ld" | |
1773 | else | |
1774 | demangler_in_ld=no | |
1775 | fi; | |
1776 | ||
34a86c2b NN |
1777 | # ---------------------- |
1778 | # Find default assembler | |
1779 | # ---------------------- | |
1780 | ||
1781 | # With GNU as | |
ba479fd2 | 1782 | |
34a86c2b NN |
1783 | # Check whether --with-gnu-as or --without-gnu-as was given. |
1784 | if test "${with_gnu_as+set}" = set; then | |
1785 | withval="$with_gnu_as" | |
1786 | gas_flag="$with_gnu_as" | |
1787 | else | |
1788 | gas_flag=no | |
ba479fd2 | 1789 | fi; |
34a86c2b NN |
1790 | |
1791 | ||
1792 | # Check whether --with-as or --without-as was given. | |
1793 | if test "${with_as+set}" = set; then | |
1794 | withval="$with_as" | |
1795 | DEFAULT_ASSEMBLER="$with_as" | |
ba479fd2 | 1796 | fi; |
34a86c2b NN |
1797 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1798 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
99c012a8 BE |
1799 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5 |
1800 | echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;} | |
1801 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1802 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1803 | gas_flag=yes | |
1804 | fi | |
ba479fd2 NN |
1805 | |
1806 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1807 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
ba479fd2 | 1808 | _ACEOF |
34a86c2b NN |
1809 | |
1810 | fi | |
1811 | ||
ba479fd2 NN |
1812 | echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5 |
1813 | echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1814 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1815 | if test x"$gas_flag" = x"no"; then | |
ba479fd2 NN |
1816 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5 |
1817 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6 | |
34a86c2b | 1818 | else |
ba479fd2 NN |
1819 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 |
1820 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6 | |
34a86c2b NN |
1821 | fi |
1822 | else | |
ba479fd2 NN |
1823 | echo "$as_me:$LINENO: result: no" >&5 |
1824 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1825 | fi |
1826 | ||
1827 | # --------------- | |
1828 | # Find C compiler | |
1829 | # --------------- | |
1830 | ||
426ca3ca RO |
1831 | # If a non-executable a.out is present (e.g. created by GNU as above even if |
1832 | # invoked with -v only), the IRIX 6 native ld just overwrites the existing | |
1833 | # file, even when creating an executable, so an execution test fails. | |
1834 | # Remove possible default executable files to avoid this. | |
1835 | # | |
1836 | # FIXME: This really belongs into AC_PROG_CC and can be removed once | |
1837 | # Autoconf includes it. | |
1838 | rm -f a.out a.exe b.out | |
1839 | ||
34a86c2b | 1840 | # Find the native compiler |
ba479fd2 NN |
1841 | ac_ext=c |
1842 | ac_cpp='$CPP $CPPFLAGS' | |
1843 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1844 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1845 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1846 | if test -n "$ac_tool_prefix"; then | |
1847 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
1848 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
1849 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1850 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1851 | if test "${ac_cv_prog_CC+set}" = set; then | |
1852 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1853 | else | |
1854 | if test -n "$CC"; then | |
1855 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1856 | else | |
1857 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1858 | for as_dir in $PATH | |
1859 | do | |
1860 | IFS=$as_save_IFS | |
1861 | test -z "$as_dir" && as_dir=. | |
1862 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1863 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1864 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
1865 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1866 | break 2 | |
1867 | fi | |
1868 | done | |
1869 | done | |
1870 | ||
1871 | fi | |
1872 | fi | |
1873 | CC=$ac_cv_prog_CC | |
1874 | if test -n "$CC"; then | |
1875 | echo "$as_me:$LINENO: result: $CC" >&5 | |
1876 | echo "${ECHO_T}$CC" >&6 | |
1877 | else | |
1878 | echo "$as_me:$LINENO: result: no" >&5 | |
1879 | echo "${ECHO_T}no" >&6 | |
1880 | fi | |
1881 | ||
1882 | fi | |
1883 | if test -z "$ac_cv_prog_CC"; then | |
1884 | ac_ct_CC=$CC | |
1885 | # Extract the first word of "gcc", so it can be a program name with args. | |
6e3f3080 | 1886 | set dummy gcc; ac_word=$2 |
ba479fd2 NN |
1887 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1888 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1889 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1890 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1891 | else | |
1892 | if test -n "$ac_ct_CC"; then | |
1893 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1894 | else | |
1895 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1896 | for as_dir in $PATH | |
1897 | do | |
1898 | IFS=$as_save_IFS | |
1899 | test -z "$as_dir" && as_dir=. | |
1900 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1901 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1902 | ac_cv_prog_ac_ct_CC="gcc" | |
1903 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1904 | break 2 | |
1905 | fi | |
1906 | done | |
1907 | done | |
1908 | ||
1909 | fi | |
1910 | fi | |
1911 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1912 | if test -n "$ac_ct_CC"; then | |
1913 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1914 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1915 | else | |
1916 | echo "$as_me:$LINENO: result: no" >&5 | |
1917 | echo "${ECHO_T}no" >&6 | |
1918 | fi | |
1919 | ||
1920 | CC=$ac_ct_CC | |
1921 | else | |
1922 | CC="$ac_cv_prog_CC" | |
1923 | fi | |
1924 | ||
1925 | if test -z "$CC"; then | |
1926 | if test -n "$ac_tool_prefix"; then | |
1927 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
1928 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
1929 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1930 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1931 | if test "${ac_cv_prog_CC+set}" = set; then | |
1932 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cd9e5e7c MK |
1933 | else |
1934 | if test -n "$CC"; then | |
1935 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1936 | else | |
ba479fd2 NN |
1937 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1938 | for as_dir in $PATH | |
1939 | do | |
1940 | IFS=$as_save_IFS | |
1941 | test -z "$as_dir" && as_dir=. | |
1942 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1943 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1944 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
1945 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1946 | break 2 | |
1947 | fi | |
1948 | done | |
1949 | done | |
1950 | ||
cd9e5e7c MK |
1951 | fi |
1952 | fi | |
ba479fd2 | 1953 | CC=$ac_cv_prog_CC |
cd9e5e7c | 1954 | if test -n "$CC"; then |
ba479fd2 NN |
1955 | echo "$as_me:$LINENO: result: $CC" >&5 |
1956 | echo "${ECHO_T}$CC" >&6 | |
1957 | else | |
1958 | echo "$as_me:$LINENO: result: no" >&5 | |
1959 | echo "${ECHO_T}no" >&6 | |
1960 | fi | |
1961 | ||
1962 | fi | |
1963 | if test -z "$ac_cv_prog_CC"; then | |
1964 | ac_ct_CC=$CC | |
1965 | # Extract the first word of "cc", so it can be a program name with args. | |
1966 | set dummy cc; ac_word=$2 | |
1967 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1968 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1969 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1970 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1971 | else | |
1972 | if test -n "$ac_ct_CC"; then | |
1973 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1974 | else | |
1975 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1976 | for as_dir in $PATH | |
1977 | do | |
1978 | IFS=$as_save_IFS | |
1979 | test -z "$as_dir" && as_dir=. | |
1980 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1981 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1982 | ac_cv_prog_ac_ct_CC="cc" | |
1983 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1984 | break 2 | |
1985 | fi | |
1986 | done | |
1987 | done | |
1988 | ||
1989 | fi | |
1990 | fi | |
1991 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1992 | if test -n "$ac_ct_CC"; then | |
1993 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1994 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1995 | else | |
1996 | echo "$as_me:$LINENO: result: no" >&5 | |
1997 | echo "${ECHO_T}no" >&6 | |
1998 | fi | |
1999 | ||
2000 | CC=$ac_ct_CC | |
cd9e5e7c | 2001 | else |
ba479fd2 | 2002 | CC="$ac_cv_prog_CC" |
e9a25f70 | 2003 | fi |
6e3f3080 | 2004 | |
ba479fd2 | 2005 | fi |
6e3f3080 NN |
2006 | if test -z "$CC"; then |
2007 | # Extract the first word of "cc", so it can be a program name with args. | |
2008 | set dummy cc; ac_word=$2 | |
ba479fd2 NN |
2009 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2010 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2011 | if test "${ac_cv_prog_CC+set}" = set; then | |
2012 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6e3f3080 NN |
2013 | else |
2014 | if test -n "$CC"; then | |
2015 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2016 | else | |
2017 | ac_prog_rejected=no | |
ba479fd2 NN |
2018 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2019 | for as_dir in $PATH | |
2020 | do | |
2021 | IFS=$as_save_IFS | |
2022 | test -z "$as_dir" && as_dir=. | |
2023 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2024 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2025 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2026 | ac_prog_rejected=yes | |
2027 | continue | |
2028 | fi | |
2029 | ac_cv_prog_CC="cc" | |
2030 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2031 | break 2 | |
2032 | fi | |
2033 | done | |
2034 | done | |
2035 | ||
6e3f3080 NN |
2036 | if test $ac_prog_rejected = yes; then |
2037 | # We found a bogon in the path, so make sure we never use it. | |
2038 | set dummy $ac_cv_prog_CC | |
2039 | shift | |
ba479fd2 | 2040 | if test $# != 0; then |
6e3f3080 NN |
2041 | # We chose a different compiler from the bogus one. |
2042 | # However, it has the same basename, so the bogon will be chosen | |
2043 | # first if we set CC to just the basename; use the full file name. | |
2044 | shift | |
ba479fd2 | 2045 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
e9a25f70 | 2046 | fi |
6e3f3080 NN |
2047 | fi |
2048 | fi | |
2049 | fi | |
ba479fd2 | 2050 | CC=$ac_cv_prog_CC |
6e3f3080 | 2051 | if test -n "$CC"; then |
ba479fd2 NN |
2052 | echo "$as_me:$LINENO: result: $CC" >&5 |
2053 | echo "${ECHO_T}$CC" >&6 | |
e9a25f70 | 2054 | else |
ba479fd2 NN |
2055 | echo "$as_me:$LINENO: result: no" >&5 |
2056 | echo "${ECHO_T}no" >&6 | |
e9a25f70 | 2057 | fi |
6e3f3080 | 2058 | |
ba479fd2 NN |
2059 | fi |
2060 | if test -z "$CC"; then | |
2061 | if test -n "$ac_tool_prefix"; then | |
2062 | for ac_prog in cl | |
2063 | do | |
2064 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2065 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
2066 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2067 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2068 | if test "${ac_cv_prog_CC+set}" = set; then | |
2069 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
093e61a6 | 2070 | else |
6e3f3080 NN |
2071 | if test -n "$CC"; then |
2072 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2073 | else | |
ba479fd2 NN |
2074 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2075 | for as_dir in $PATH | |
2076 | do | |
2077 | IFS=$as_save_IFS | |
2078 | test -z "$as_dir" && as_dir=. | |
2079 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2080 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2081 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
2082 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2083 | break 2 | |
2084 | fi | |
2085 | done | |
2086 | done | |
2087 | ||
093e61a6 | 2088 | fi |
6e3f3080 | 2089 | fi |
ba479fd2 | 2090 | CC=$ac_cv_prog_CC |
6e3f3080 | 2091 | if test -n "$CC"; then |
ba479fd2 NN |
2092 | echo "$as_me:$LINENO: result: $CC" >&5 |
2093 | echo "${ECHO_T}$CC" >&6 | |
6e3f3080 | 2094 | else |
ba479fd2 NN |
2095 | echo "$as_me:$LINENO: result: no" >&5 |
2096 | echo "${ECHO_T}no" >&6 | |
093e61a6 | 2097 | fi |
cafe096b | 2098 | |
ba479fd2 NN |
2099 | test -n "$CC" && break |
2100 | done | |
2101 | fi | |
2102 | if test -z "$CC"; then | |
2103 | ac_ct_CC=$CC | |
2104 | for ac_prog in cl | |
2105 | do | |
2106 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2107 | set dummy $ac_prog; ac_word=$2 | |
2108 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2109 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2110 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
2111 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2112 | else | |
2113 | if test -n "$ac_ct_CC"; then | |
2114 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2115 | else | |
2116 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2117 | for as_dir in $PATH | |
2118 | do | |
2119 | IFS=$as_save_IFS | |
2120 | test -z "$as_dir" && as_dir=. | |
2121 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2122 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2123 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
2124 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2125 | break 2 | |
2126 | fi | |
2127 | done | |
2128 | done | |
6e3f3080 | 2129 | |
ba479fd2 NN |
2130 | fi |
2131 | fi | |
2132 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2133 | if test -n "$ac_ct_CC"; then | |
2134 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
2135 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
2136 | else | |
2137 | echo "$as_me:$LINENO: result: no" >&5 | |
2138 | echo "${ECHO_T}no" >&6 | |
2139 | fi | |
6e3f3080 | 2140 | |
ba479fd2 NN |
2141 | test -n "$ac_ct_CC" && break |
2142 | done | |
63cf211a | 2143 | |
ba479fd2 NN |
2144 | CC=$ac_ct_CC |
2145 | fi | |
2146 | ||
2147 | fi | |
2148 | ||
2149 | ||
2150 | test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH | |
2151 | See \`config.log' for more details." >&5 | |
2152 | echo "$as_me: error: no acceptable C compiler found in \$PATH | |
2153 | See \`config.log' for more details." >&2;} | |
2154 | { (exit 1); exit 1; }; } | |
2155 | ||
2156 | # Provide some information about the compiler. | |
2157 | echo "$as_me:$LINENO:" \ | |
2158 | "checking for C compiler version" >&5 | |
2159 | ac_compiler=`set X $ac_compile; echo $2` | |
2160 | { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 | |
2161 | (eval $ac_compiler --version </dev/null >&5) 2>&5 | |
2162 | ac_status=$? | |
2163 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2164 | (exit $ac_status); } | |
2165 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 | |
2166 | (eval $ac_compiler -v </dev/null >&5) 2>&5 | |
2167 | ac_status=$? | |
2168 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2169 | (exit $ac_status); } | |
2170 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 | |
2171 | (eval $ac_compiler -V </dev/null >&5) 2>&5 | |
2172 | ac_status=$? | |
2173 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2174 | (exit $ac_status); } | |
2175 | ||
2176 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2177 | /* confdefs.h. */ |
2178 | _ACEOF | |
2179 | cat confdefs.h >>conftest.$ac_ext | |
2180 | cat >>conftest.$ac_ext <<_ACEOF | |
2181 | /* end confdefs.h. */ | |
2182 | ||
2183 | int | |
2184 | main () | |
2185 | { | |
63cf211a | 2186 | |
ba479fd2 NN |
2187 | ; |
2188 | return 0; | |
2189 | } | |
2190 | _ACEOF | |
2191 | ac_clean_files_save=$ac_clean_files | |
2192 | ac_clean_files="$ac_clean_files a.out a.exe b.out" | |
2193 | # Try to create an executable without -o first, disregard a.out. | |
2194 | # It will help us diagnose broken compilers, and finding out an intuition | |
2195 | # of exeext. | |
86da66b5 HPN |
2196 | echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 |
2197 | echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 | |
ba479fd2 NN |
2198 | ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
2199 | if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 | |
2200 | (eval $ac_link_default) 2>&5 | |
2201 | ac_status=$? | |
2202 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2203 | (exit $ac_status); }; then | |
2204 | # Find the output, starting from the most likely. This scheme is | |
2205 | # not robust to junk in `.', hence go to wildcards (a.*) only as a last | |
2206 | # resort. | |
2207 | ||
2208 | # Be careful to initialize this variable, since it used to be cached. | |
2209 | # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. | |
2210 | ac_cv_exeext= | |
2211 | # b.out is created by i960 compilers. | |
2212 | for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out | |
2213 | do | |
2214 | test -f "$ac_file" || continue | |
2215 | case $ac_file in | |
2216 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) | |
86da66b5 | 2217 | ;; |
ba479fd2 | 2218 | conftest.$ac_ext ) |
86da66b5 HPN |
2219 | # This is the source file. |
2220 | ;; | |
ba479fd2 | 2221 | [ab].out ) |
86da66b5 HPN |
2222 | # We found the default executable, but exeext='' is most |
2223 | # certainly right. | |
2224 | break;; | |
ba479fd2 | 2225 | *.* ) |
86da66b5 HPN |
2226 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
2227 | # FIXME: I believe we export ac_cv_exeext for Libtool, | |
2228 | # but it would be cool to find out if it's true. Does anybody | |
2229 | # maintain Libtool? --akim. | |
2230 | export ac_cv_exeext | |
2231 | break;; | |
ba479fd2 | 2232 | * ) |
86da66b5 | 2233 | break;; |
ba479fd2 NN |
2234 | esac |
2235 | done | |
2236 | else | |
2237 | echo "$as_me: failed program was:" >&5 | |
2238 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2239 | ||
2240 | { { echo "$as_me:$LINENO: error: C compiler cannot create executables | |
2241 | See \`config.log' for more details." >&5 | |
2242 | echo "$as_me: error: C compiler cannot create executables | |
2243 | See \`config.log' for more details." >&2;} | |
2244 | { (exit 77); exit 77; }; } | |
2245 | fi | |
2246 | ||
2247 | ac_exeext=$ac_cv_exeext | |
2248 | echo "$as_me:$LINENO: result: $ac_file" >&5 | |
2249 | echo "${ECHO_T}$ac_file" >&6 | |
2250 | ||
2251 | # Check the compiler produces executables we can run. If not, either | |
2252 | # the compiler is broken, or we cross compile. | |
2253 | echo "$as_me:$LINENO: checking whether the C compiler works" >&5 | |
2254 | echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 | |
2255 | # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 | |
2256 | # If not cross compiling, check that we can run a simple program. | |
2257 | if test "$cross_compiling" != yes; then | |
2258 | if { ac_try='./$ac_file' | |
2259 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2260 | (eval $ac_try) 2>&5 | |
2261 | ac_status=$? | |
2262 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2263 | (exit $ac_status); }; }; then | |
2264 | cross_compiling=no | |
6e3f3080 | 2265 | else |
ba479fd2 NN |
2266 | if test "$cross_compiling" = maybe; then |
2267 | cross_compiling=yes | |
2268 | else | |
2269 | { { echo "$as_me:$LINENO: error: cannot run C compiled programs. | |
2270 | If you meant to cross compile, use \`--host'. | |
2271 | See \`config.log' for more details." >&5 | |
2272 | echo "$as_me: error: cannot run C compiled programs. | |
2273 | If you meant to cross compile, use \`--host'. | |
2274 | See \`config.log' for more details." >&2;} | |
2275 | { (exit 1); exit 1; }; } | |
2276 | fi | |
6e3f3080 NN |
2277 | fi |
2278 | fi | |
ba479fd2 NN |
2279 | echo "$as_me:$LINENO: result: yes" >&5 |
2280 | echo "${ECHO_T}yes" >&6 | |
2281 | ||
2282 | rm -f a.out a.exe conftest$ac_cv_exeext b.out | |
2283 | ac_clean_files=$ac_clean_files_save | |
2284 | # Check the compiler produces executables we can run. If not, either | |
2285 | # the compiler is broken, or we cross compile. | |
2286 | echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 | |
2287 | echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 | |
2288 | echo "$as_me:$LINENO: result: $cross_compiling" >&5 | |
2289 | echo "${ECHO_T}$cross_compiling" >&6 | |
2290 | ||
2291 | echo "$as_me:$LINENO: checking for suffix of executables" >&5 | |
2292 | echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 | |
2293 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
2294 | (eval $ac_link) 2>&5 | |
2295 | ac_status=$? | |
2296 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2297 | (exit $ac_status); }; then | |
2298 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
2299 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
2300 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
2301 | # `rm'. | |
2302 | for ac_file in conftest.exe conftest conftest.*; do | |
2303 | test -f "$ac_file" || continue | |
2304 | case $ac_file in | |
2305 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; | |
2306 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
86da66b5 HPN |
2307 | export ac_cv_exeext |
2308 | break;; | |
ba479fd2 NN |
2309 | * ) break;; |
2310 | esac | |
2311 | done | |
e9a25f70 | 2312 | else |
ba479fd2 NN |
2313 | { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link |
2314 | See \`config.log' for more details." >&5 | |
2315 | echo "$as_me: error: cannot compute suffix of executables: cannot compile and link | |
2316 | See \`config.log' for more details." >&2;} | |
2317 | { (exit 1); exit 1; }; } | |
2318 | fi | |
2319 | ||
2320 | rm -f conftest$ac_cv_exeext | |
2321 | echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 | |
2322 | echo "${ECHO_T}$ac_cv_exeext" >&6 | |
2323 | ||
2324 | rm -f conftest.$ac_ext | |
2325 | EXEEXT=$ac_cv_exeext | |
2326 | ac_exeext=$EXEEXT | |
2327 | echo "$as_me:$LINENO: checking for suffix of object files" >&5 | |
2328 | echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 | |
2329 | if test "${ac_cv_objext+set}" = set; then | |
2330 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2331 | else | |
2332 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2333 | /* confdefs.h. */ |
2334 | _ACEOF | |
2335 | cat confdefs.h >>conftest.$ac_ext | |
2336 | cat >>conftest.$ac_ext <<_ACEOF | |
2337 | /* end confdefs.h. */ | |
2338 | ||
2339 | int | |
2340 | main () | |
2341 | { | |
6e3f3080 | 2342 | |
ba479fd2 NN |
2343 | ; |
2344 | return 0; | |
2345 | } | |
2346 | _ACEOF | |
2347 | rm -f conftest.o conftest.obj | |
2348 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2349 | (eval $ac_compile) 2>&5 | |
2350 | ac_status=$? | |
2351 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2352 | (exit $ac_status); }; then | |
2353 | for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do | |
2354 | case $ac_file in | |
2355 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; | |
2356 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
2357 | break;; | |
2358 | esac | |
2359 | done | |
63cf211a | 2360 | else |
ba479fd2 NN |
2361 | echo "$as_me: failed program was:" >&5 |
2362 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2363 | ||
2364 | { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile | |
2365 | See \`config.log' for more details." >&5 | |
2366 | echo "$as_me: error: cannot compute suffix of object files: cannot compile | |
2367 | See \`config.log' for more details." >&2;} | |
2368 | { (exit 1); exit 1; }; } | |
2369 | fi | |
2370 | ||
2371 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
2372 | fi | |
2373 | echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 | |
2374 | echo "${ECHO_T}$ac_cv_objext" >&6 | |
2375 | OBJEXT=$ac_cv_objext | |
2376 | ac_objext=$OBJEXT | |
2377 | echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 | |
2378 | echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 | |
2379 | if test "${ac_cv_c_compiler_gnu+set}" = set; then | |
2380 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2381 | else | |
2382 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2383 | /* confdefs.h. */ |
2384 | _ACEOF | |
2385 | cat confdefs.h >>conftest.$ac_ext | |
2386 | cat >>conftest.$ac_ext <<_ACEOF | |
2387 | /* end confdefs.h. */ | |
2388 | ||
2389 | int | |
2390 | main () | |
2391 | { | |
2392 | #ifndef __GNUC__ | |
2393 | choke me | |
2394 | #endif | |
6e3f3080 | 2395 | |
ba479fd2 NN |
2396 | ; |
2397 | return 0; | |
2398 | } | |
2399 | _ACEOF | |
2400 | rm -f conftest.$ac_objext | |
2401 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2402 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2403 | ac_status=$? |
86da66b5 HPN |
2404 | grep -v '^ *+' conftest.er1 >conftest.err |
2405 | rm -f conftest.er1 | |
2406 | cat conftest.err >&5 | |
ba479fd2 NN |
2407 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2408 | (exit $ac_status); } && | |
b095fe2c | 2409 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2410 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2411 | (eval $ac_try) 2>&5 | |
2412 | ac_status=$? | |
2413 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2414 | (exit $ac_status); }; } && | |
2415 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2416 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2417 | (eval $ac_try) 2>&5 | |
2418 | ac_status=$? | |
2419 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2420 | (exit $ac_status); }; }; then | |
2421 | ac_compiler_gnu=yes | |
2422 | else | |
2423 | echo "$as_me: failed program was:" >&5 | |
2424 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2425 | ||
2426 | ac_compiler_gnu=no | |
2427 | fi | |
86da66b5 | 2428 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2429 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
2430 | ||
2431 | fi | |
2432 | echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 | |
2433 | echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 | |
2434 | GCC=`test $ac_compiler_gnu = yes && echo yes` | |
2435 | ac_test_CFLAGS=${CFLAGS+set} | |
2436 | ac_save_CFLAGS=$CFLAGS | |
2437 | CFLAGS="-g" | |
2438 | echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 | |
2439 | echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 | |
2440 | if test "${ac_cv_prog_cc_g+set}" = set; then | |
2441 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2442 | else | |
2443 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2444 | /* confdefs.h. */ |
2445 | _ACEOF | |
2446 | cat confdefs.h >>conftest.$ac_ext | |
2447 | cat >>conftest.$ac_ext <<_ACEOF | |
2448 | /* end confdefs.h. */ | |
2449 | ||
2450 | int | |
2451 | main () | |
2452 | { | |
2453 | ||
2454 | ; | |
2455 | return 0; | |
2456 | } | |
2457 | _ACEOF | |
2458 | rm -f conftest.$ac_objext | |
2459 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2460 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2461 | ac_status=$? |
86da66b5 HPN |
2462 | grep -v '^ *+' conftest.er1 >conftest.err |
2463 | rm -f conftest.er1 | |
2464 | cat conftest.err >&5 | |
ba479fd2 NN |
2465 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2466 | (exit $ac_status); } && | |
b095fe2c | 2467 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2468 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2469 | (eval $ac_try) 2>&5 | |
2470 | ac_status=$? | |
2471 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2472 | (exit $ac_status); }; } && | |
2473 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2474 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2475 | (eval $ac_try) 2>&5 | |
2476 | ac_status=$? | |
2477 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2478 | (exit $ac_status); }; }; then | |
6e3f3080 NN |
2479 | ac_cv_prog_cc_g=yes |
2480 | else | |
ba479fd2 NN |
2481 | echo "$as_me: failed program was:" >&5 |
2482 | sed 's/^/| /' conftest.$ac_ext >&5 | |
63cf211a | 2483 | |
ba479fd2 | 2484 | ac_cv_prog_cc_g=no |
6e3f3080 | 2485 | fi |
86da66b5 | 2486 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2487 | fi |
2488 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 | |
2489 | echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 | |
cd9e5e7c | 2490 | if test "$ac_test_CFLAGS" = set; then |
ba479fd2 | 2491 | CFLAGS=$ac_save_CFLAGS |
cd9e5e7c MK |
2492 | elif test $ac_cv_prog_cc_g = yes; then |
2493 | if test "$GCC" = yes; then | |
e9a25f70 JL |
2494 | CFLAGS="-g -O2" |
2495 | else | |
cd9e5e7c | 2496 | CFLAGS="-g" |
81814e35 | 2497 | fi |
3723cad9 | 2498 | else |
cd9e5e7c MK |
2499 | if test "$GCC" = yes; then |
2500 | CFLAGS="-O2" | |
2501 | else | |
2502 | CFLAGS= | |
2503 | fi | |
e9a25f70 | 2504 | fi |
ba479fd2 NN |
2505 | echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 |
2506 | echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 | |
2507 | if test "${ac_cv_prog_cc_stdc+set}" = set; then | |
2508 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2509 | else | |
2510 | ac_cv_prog_cc_stdc=no | |
2511 | ac_save_CC=$CC | |
2512 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2513 | /* confdefs.h. */ |
2514 | _ACEOF | |
2515 | cat confdefs.h >>conftest.$ac_ext | |
2516 | cat >>conftest.$ac_ext <<_ACEOF | |
2517 | /* end confdefs.h. */ | |
2518 | #include <stdarg.h> | |
2519 | #include <stdio.h> | |
2520 | #include <sys/types.h> | |
2521 | #include <sys/stat.h> | |
2522 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
2523 | struct buf { int x; }; | |
2524 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
2525 | static char *e (p, i) | |
2526 | char **p; | |
2527 | int i; | |
2528 | { | |
2529 | return p[i]; | |
2530 | } | |
2531 | static char *f (char * (*g) (char **, int), char **p, ...) | |
2532 | { | |
2533 | char *s; | |
2534 | va_list v; | |
2535 | va_start (v,p); | |
2536 | s = g (p, va_arg (v,int)); | |
2537 | va_end (v); | |
2538 | return s; | |
2539 | } | |
86da66b5 HPN |
2540 | |
2541 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
2542 | function prototypes and stuff, but not '\xHH' hex character constants. | |
2543 | These don't provoke an error unfortunately, instead are silently treated | |
2544 | as 'x'. The following induces an error, until -std1 is added to get | |
2545 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
2546 | array size at least. It's necessary to write '\x00'==0 to get something | |
2547 | that's true only with -std1. */ | |
2548 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
2549 | ||
ba479fd2 NN |
2550 | int test (int i, double x); |
2551 | struct s1 {int (*f) (int a);}; | |
2552 | struct s2 {int (*f) (double a);}; | |
2553 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
2554 | int argc; | |
2555 | char **argv; | |
2556 | int | |
2557 | main () | |
2558 | { | |
2559 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
2560 | ; | |
2561 | return 0; | |
2562 | } | |
2563 | _ACEOF | |
2564 | # Don't try gcc -ansi; that turns off useful extensions and | |
2565 | # breaks some systems' header files. | |
2566 | # AIX -qlanglvl=ansi | |
2567 | # Ultrix and OSF/1 -std1 | |
2568 | # HP-UX 10.20 and later -Ae | |
2569 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
2570 | # SVR4 -Xc -D__EXTENSIONS__ | |
2571 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
2572 | do | |
2573 | CC="$ac_save_CC $ac_arg" | |
2574 | rm -f conftest.$ac_objext | |
2575 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2576 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2577 | ac_status=$? |
86da66b5 HPN |
2578 | grep -v '^ *+' conftest.er1 >conftest.err |
2579 | rm -f conftest.er1 | |
2580 | cat conftest.err >&5 | |
ba479fd2 NN |
2581 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2582 | (exit $ac_status); } && | |
b095fe2c | 2583 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2584 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2585 | (eval $ac_try) 2>&5 | |
2586 | ac_status=$? | |
2587 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2588 | (exit $ac_status); }; } && | |
2589 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2590 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2591 | (eval $ac_try) 2>&5 | |
2592 | ac_status=$? | |
2593 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2594 | (exit $ac_status); }; }; then | |
2595 | ac_cv_prog_cc_stdc=$ac_arg | |
2596 | break | |
2597 | else | |
2598 | echo "$as_me: failed program was:" >&5 | |
2599 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 2600 | |
ba479fd2 | 2601 | fi |
86da66b5 | 2602 | rm -f conftest.err conftest.$ac_objext |
ba479fd2 NN |
2603 | done |
2604 | rm -f conftest.$ac_ext conftest.$ac_objext | |
2605 | CC=$ac_save_CC | |
2606 | ||
2607 | fi | |
2608 | ||
2609 | case "x$ac_cv_prog_cc_stdc" in | |
2610 | x|xno) | |
2611 | echo "$as_me:$LINENO: result: none needed" >&5 | |
2612 | echo "${ECHO_T}none needed" >&6 ;; | |
2613 | *) | |
2614 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 | |
2615 | echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 | |
2616 | CC="$CC $ac_cv_prog_cc_stdc" ;; | |
2617 | esac | |
2618 | ||
2619 | # Some people use a C++ compiler to compile C. Since we use `exit', | |
2620 | # in C++ we need to declare it. In case someone uses the same compiler | |
2621 | # for both compiling C and C++ we need to have the C++ compiler decide | |
2622 | # the declaration of exit, since it's the most demanding environment. | |
2623 | cat >conftest.$ac_ext <<_ACEOF | |
2624 | #ifndef __cplusplus | |
2625 | choke me | |
2626 | #endif | |
2627 | _ACEOF | |
2628 | rm -f conftest.$ac_objext | |
2629 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2630 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2631 | ac_status=$? |
86da66b5 HPN |
2632 | grep -v '^ *+' conftest.er1 >conftest.err |
2633 | rm -f conftest.er1 | |
2634 | cat conftest.err >&5 | |
ba479fd2 NN |
2635 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2636 | (exit $ac_status); } && | |
b095fe2c | 2637 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2638 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2639 | (eval $ac_try) 2>&5 | |
2640 | ac_status=$? | |
2641 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2642 | (exit $ac_status); }; } && | |
2643 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2644 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2645 | (eval $ac_try) 2>&5 | |
2646 | ac_status=$? | |
2647 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2648 | (exit $ac_status); }; }; then | |
2649 | for ac_declaration in \ | |
86da66b5 | 2650 | '' \ |
ba479fd2 NN |
2651 | 'extern "C" void std::exit (int) throw (); using std::exit;' \ |
2652 | 'extern "C" void std::exit (int); using std::exit;' \ | |
2653 | 'extern "C" void exit (int) throw ();' \ | |
2654 | 'extern "C" void exit (int);' \ | |
2655 | 'void exit (int);' | |
2656 | do | |
2657 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2658 | /* confdefs.h. */ |
2659 | _ACEOF | |
2660 | cat confdefs.h >>conftest.$ac_ext | |
2661 | cat >>conftest.$ac_ext <<_ACEOF | |
2662 | /* end confdefs.h. */ | |
33e70558 | 2663 | $ac_declaration |
86da66b5 | 2664 | #include <stdlib.h> |
ba479fd2 NN |
2665 | int |
2666 | main () | |
2667 | { | |
2668 | exit (42); | |
2669 | ; | |
2670 | return 0; | |
2671 | } | |
2672 | _ACEOF | |
2673 | rm -f conftest.$ac_objext | |
2674 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2675 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2676 | ac_status=$? |
86da66b5 HPN |
2677 | grep -v '^ *+' conftest.er1 >conftest.err |
2678 | rm -f conftest.er1 | |
2679 | cat conftest.err >&5 | |
ba479fd2 NN |
2680 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2681 | (exit $ac_status); } && | |
b095fe2c | 2682 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2683 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2684 | (eval $ac_try) 2>&5 | |
2685 | ac_status=$? | |
2686 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2687 | (exit $ac_status); }; } && | |
2688 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2689 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2690 | (eval $ac_try) 2>&5 | |
2691 | ac_status=$? | |
2692 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2693 | (exit $ac_status); }; }; then | |
2694 | : | |
2695 | else | |
2696 | echo "$as_me: failed program was:" >&5 | |
2697 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2698 | ||
2699 | continue | |
2700 | fi | |
86da66b5 | 2701 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 | 2702 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
2703 | /* confdefs.h. */ |
2704 | _ACEOF | |
2705 | cat confdefs.h >>conftest.$ac_ext | |
2706 | cat >>conftest.$ac_ext <<_ACEOF | |
2707 | /* end confdefs.h. */ | |
2708 | $ac_declaration | |
2709 | int | |
2710 | main () | |
2711 | { | |
2712 | exit (42); | |
2713 | ; | |
2714 | return 0; | |
2715 | } | |
2716 | _ACEOF | |
2717 | rm -f conftest.$ac_objext | |
2718 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2719 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2720 | ac_status=$? |
86da66b5 HPN |
2721 | grep -v '^ *+' conftest.er1 >conftest.err |
2722 | rm -f conftest.er1 | |
2723 | cat conftest.err >&5 | |
ba479fd2 NN |
2724 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2725 | (exit $ac_status); } && | |
b095fe2c | 2726 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2727 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2728 | (eval $ac_try) 2>&5 | |
2729 | ac_status=$? | |
2730 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2731 | (exit $ac_status); }; } && | |
2732 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2733 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2734 | (eval $ac_try) 2>&5 | |
2735 | ac_status=$? | |
2736 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2737 | (exit $ac_status); }; }; then | |
2738 | break | |
3ec83fc2 | 2739 | else |
ba479fd2 NN |
2740 | echo "$as_me: failed program was:" >&5 |
2741 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2742 | ||
6e3f3080 | 2743 | fi |
86da66b5 | 2744 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2745 | done |
2746 | rm -f conftest* | |
2747 | if test -n "$ac_declaration"; then | |
2748 | echo '#ifdef __cplusplus' >>confdefs.h | |
2749 | echo $ac_declaration >>confdefs.h | |
2750 | echo '#endif' >>confdefs.h | |
2751 | fi | |
2752 | ||
3ec83fc2 | 2753 | else |
ba479fd2 NN |
2754 | echo "$as_me: failed program was:" >&5 |
2755 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2756 | ||
2757 | fi | |
86da66b5 | 2758 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2759 | ac_ext=c |
2760 | ac_cpp='$CPP $CPPFLAGS' | |
2761 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2762 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2763 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2764 | ||
2765 | if test "x$CC" != xcc; then | |
2766 | echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 | |
2767 | echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 | |
2768 | else | |
2769 | echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 | |
2770 | echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 | |
2771 | fi | |
2772 | set dummy $CC; ac_cc=`echo $2 | | |
2773 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2774 | if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then | |
2775 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2776 | else | |
2777 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2778 | /* confdefs.h. */ |
2779 | _ACEOF | |
2780 | cat confdefs.h >>conftest.$ac_ext | |
2781 | cat >>conftest.$ac_ext <<_ACEOF | |
2782 | /* end confdefs.h. */ | |
2783 | ||
2784 | int | |
2785 | main () | |
2786 | { | |
2787 | ||
2788 | ; | |
2789 | return 0; | |
2790 | } | |
2791 | _ACEOF | |
3ec83fc2 RH |
2792 | # Make sure it works both with $CC and with simple cc. |
2793 | # We do the test twice because some compilers refuse to overwrite an | |
2794 | # existing .o file with -o, though they will create one. | |
ba479fd2 NN |
2795 | ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' |
2796 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2797 | (eval $ac_try) 2>&5 | |
2798 | ac_status=$? | |
2799 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2800 | (exit $ac_status); } && | |
2801 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2802 | (eval $ac_try) 2>&5 | |
2803 | ac_status=$? | |
2804 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2805 | (exit $ac_status); }; | |
3ec83fc2 RH |
2806 | then |
2807 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
2808 | if test "x$CC" != xcc; then | |
2809 | # Test first that cc exists at all. | |
ba479fd2 NN |
2810 | if { ac_try='cc -c conftest.$ac_ext >&5' |
2811 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2812 | (eval $ac_try) 2>&5 | |
2813 | ac_status=$? | |
2814 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2815 | (exit $ac_status); }; }; then | |
2816 | ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' | |
2817 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2818 | (eval $ac_try) 2>&5 | |
2819 | ac_status=$? | |
2820 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2821 | (exit $ac_status); } && | |
2822 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2823 | (eval $ac_try) 2>&5 | |
2824 | ac_status=$? | |
2825 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2826 | (exit $ac_status); }; | |
3ec83fc2 | 2827 | then |
86da66b5 HPN |
2828 | # cc works too. |
2829 | : | |
3ec83fc2 | 2830 | else |
86da66b5 HPN |
2831 | # cc exists but doesn't like -o. |
2832 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3ec83fc2 RH |
2833 | fi |
2834 | fi | |
2835 | fi | |
2836 | else | |
2837 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
2838 | fi | |
2839 | rm -f conftest* | |
2840 | ||
2841 | fi | |
2842 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
ba479fd2 NN |
2843 | echo "$as_me:$LINENO: result: yes" >&5 |
2844 | echo "${ECHO_T}yes" >&6 | |
3ec83fc2 | 2845 | else |
ba479fd2 NN |
2846 | echo "$as_me:$LINENO: result: no" >&5 |
2847 | echo "${ECHO_T}no" >&6 | |
2848 | ||
2849 | cat >>confdefs.h <<\_ACEOF | |
3ec83fc2 | 2850 | #define NO_MINUS_C_MINUS_O 1 |
ba479fd2 | 2851 | _ACEOF |
3ec83fc2 RH |
2852 | |
2853 | fi | |
2854 | ||
3b620440 KC |
2855 | # expand $ac_aux_dir to an absolute path |
2856 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
2857 | ||
2858 | # FIXME: we rely on the cache variable name because | |
2859 | # there is no other way. | |
2860 | set dummy $CC | |
2861 | ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2862 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then | |
2863 | # Losing compiler, so override with the script. | |
2864 | # FIXME: It is wrong to rewrite CC. | |
2865 | # But if we don't then we get into trouble of one sort or another. | |
2866 | # A longer-term fix would be to have automake use am__CC in this case, | |
2867 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
2868 | CC="$am_aux_dir/compile $CC" | |
2869 | fi | |
2870 | ||
414d23ae HPN |
2871 | # autoconf is lame and doesn't give us any substitution variable for this. |
2872 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
2873 | NO_MINUS_C_MINUS_O=yes | |
2874 | else | |
2875 | OUTPUT_OPTION='-o $@' | |
2876 | fi | |
2877 | ||
2878 | ||
2879 | ||
73458fb7 NN |
2880 | # ------------------------- |
2881 | # Check C compiler features | |
2882 | # ------------------------- | |
2883 | ||
ba479fd2 NN |
2884 | ac_ext=c |
2885 | ac_cpp='$CPP $CPPFLAGS' | |
2886 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2887 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2888 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2889 | echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 | |
2890 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 | |
84c041a1 ZW |
2891 | # On Suns, sometimes $CPP names a directory. |
2892 | if test -n "$CPP" && test -d "$CPP"; then | |
2893 | CPP= | |
2894 | fi | |
2895 | if test -z "$CPP"; then | |
ba479fd2 NN |
2896 | if test "${ac_cv_prog_CPP+set}" = set; then |
2897 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2898 | else | |
2899 | # Double quotes because CPP needs to be expanded | |
2900 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
2901 | do | |
2902 | ac_preproc_ok=false | |
2903 | for ac_c_preproc_warn_flag in '' yes | |
2904 | do | |
2905 | # Use a header file that comes with gcc, so configuring glibc | |
2906 | # with a fresh cross-compiler works. | |
2907 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2908 | # <limits.h> exists even on freestanding compilers. | |
84c041a1 | 2909 | # On the NeXT, cc -E runs the code through the compiler's parser, |
ba479fd2 NN |
2910 | # not just through cpp. "Syntax error" is here to catch this case. |
2911 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2912 | /* confdefs.h. */ |
2913 | _ACEOF | |
2914 | cat confdefs.h >>conftest.$ac_ext | |
2915 | cat >>conftest.$ac_ext <<_ACEOF | |
2916 | /* end confdefs.h. */ | |
2917 | #ifdef __STDC__ | |
2918 | # include <limits.h> | |
2919 | #else | |
2920 | # include <assert.h> | |
2921 | #endif | |
86da66b5 | 2922 | Syntax error |
ba479fd2 NN |
2923 | _ACEOF |
2924 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2925 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2926 | ac_status=$? | |
2927 | grep -v '^ *+' conftest.er1 >conftest.err | |
2928 | rm -f conftest.er1 | |
2929 | cat conftest.err >&5 | |
2930 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2931 | (exit $ac_status); } >/dev/null; then | |
2932 | if test -s conftest.err; then | |
2933 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2934 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2935 | else |
2936 | ac_cpp_err= | |
2937 | fi | |
2938 | else | |
2939 | ac_cpp_err=yes | |
2940 | fi | |
2941 | if test -z "$ac_cpp_err"; then | |
093e61a6 | 2942 | : |
cafe096b | 2943 | else |
ba479fd2 NN |
2944 | echo "$as_me: failed program was:" >&5 |
2945 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2946 | ||
2947 | # Broken: fails on valid input. | |
2948 | continue | |
2949 | fi | |
2950 | rm -f conftest.err conftest.$ac_ext | |
2951 | ||
2952 | # OK, works on sane cases. Now check whether non-existent headers | |
2953 | # can be detected and how. | |
2954 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2955 | /* confdefs.h. */ |
2956 | _ACEOF | |
2957 | cat confdefs.h >>conftest.$ac_ext | |
2958 | cat >>conftest.$ac_ext <<_ACEOF | |
2959 | /* end confdefs.h. */ | |
2960 | #include <ac_nonexistent.h> | |
2961 | _ACEOF | |
2962 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2963 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2964 | ac_status=$? | |
2965 | grep -v '^ *+' conftest.er1 >conftest.err | |
2966 | rm -f conftest.er1 | |
2967 | cat conftest.err >&5 | |
2968 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2969 | (exit $ac_status); } >/dev/null; then | |
2970 | if test -s conftest.err; then | |
2971 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2972 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2973 | else |
2974 | ac_cpp_err= | |
2975 | fi | |
2976 | else | |
2977 | ac_cpp_err=yes | |
2978 | fi | |
2979 | if test -z "$ac_cpp_err"; then | |
2980 | # Broken: success on invalid input. | |
2981 | continue | |
2982 | else | |
2983 | echo "$as_me: failed program was:" >&5 | |
2984 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2985 | ||
2986 | # Passes both tests. | |
2987 | ac_preproc_ok=: | |
2988 | break | |
2989 | fi | |
2990 | rm -f conftest.err conftest.$ac_ext | |
2991 | ||
2992 | done | |
2993 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2994 | rm -f conftest.err conftest.$ac_ext | |
2995 | if $ac_preproc_ok; then | |
2996 | break | |
2997 | fi | |
2998 | ||
2999 | done | |
3000 | ac_cv_prog_CPP=$CPP | |
3001 | ||
3002 | fi | |
3003 | CPP=$ac_cv_prog_CPP | |
3004 | else | |
3005 | ac_cv_prog_CPP=$CPP | |
3006 | fi | |
3007 | echo "$as_me:$LINENO: result: $CPP" >&5 | |
3008 | echo "${ECHO_T}$CPP" >&6 | |
3009 | ac_preproc_ok=false | |
3010 | for ac_c_preproc_warn_flag in '' yes | |
3011 | do | |
3012 | # Use a header file that comes with gcc, so configuring glibc | |
3013 | # with a fresh cross-compiler works. | |
3014 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3015 | # <limits.h> exists even on freestanding compilers. | |
3016 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3017 | # not just through cpp. "Syntax error" is here to catch this case. | |
3018 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3019 | /* confdefs.h. */ |
3020 | _ACEOF | |
3021 | cat confdefs.h >>conftest.$ac_ext | |
3022 | cat >>conftest.$ac_ext <<_ACEOF | |
3023 | /* end confdefs.h. */ | |
3024 | #ifdef __STDC__ | |
3025 | # include <limits.h> | |
3026 | #else | |
3027 | # include <assert.h> | |
3028 | #endif | |
86da66b5 | 3029 | Syntax error |
ba479fd2 NN |
3030 | _ACEOF |
3031 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3032 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3033 | ac_status=$? | |
3034 | grep -v '^ *+' conftest.er1 >conftest.err | |
3035 | rm -f conftest.er1 | |
3036 | cat conftest.err >&5 | |
3037 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3038 | (exit $ac_status); } >/dev/null; then | |
3039 | if test -s conftest.err; then | |
3040 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 3041 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
3042 | else |
3043 | ac_cpp_err= | |
3044 | fi | |
3045 | else | |
3046 | ac_cpp_err=yes | |
3047 | fi | |
3048 | if test -z "$ac_cpp_err"; then | |
6e3f3080 | 3049 | : |
414d23ae | 3050 | else |
ba479fd2 NN |
3051 | echo "$as_me: failed program was:" >&5 |
3052 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3053 | ||
3054 | # Broken: fails on valid input. | |
3055 | continue | |
3056 | fi | |
3057 | rm -f conftest.err conftest.$ac_ext | |
3058 | ||
3059 | # OK, works on sane cases. Now check whether non-existent headers | |
3060 | # can be detected and how. | |
3061 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3062 | /* confdefs.h. */ |
3063 | _ACEOF | |
3064 | cat confdefs.h >>conftest.$ac_ext | |
3065 | cat >>conftest.$ac_ext <<_ACEOF | |
3066 | /* end confdefs.h. */ | |
3067 | #include <ac_nonexistent.h> | |
3068 | _ACEOF | |
3069 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3070 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3071 | ac_status=$? | |
3072 | grep -v '^ *+' conftest.er1 >conftest.err | |
3073 | rm -f conftest.er1 | |
3074 | cat conftest.err >&5 | |
3075 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3076 | (exit $ac_status); } >/dev/null; then | |
3077 | if test -s conftest.err; then | |
3078 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 3079 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
3080 | else |
3081 | ac_cpp_err= | |
3082 | fi | |
6e3f3080 | 3083 | else |
ba479fd2 | 3084 | ac_cpp_err=yes |
63cf211a | 3085 | fi |
ba479fd2 NN |
3086 | if test -z "$ac_cpp_err"; then |
3087 | # Broken: success on invalid input. | |
3088 | continue | |
3089 | else | |
3090 | echo "$as_me: failed program was:" >&5 | |
3091 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3092 | ||
3093 | # Passes both tests. | |
3094 | ac_preproc_ok=: | |
3095 | break | |
63cf211a | 3096 | fi |
ba479fd2 NN |
3097 | rm -f conftest.err conftest.$ac_ext |
3098 | ||
3099 | done | |
3100 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3101 | rm -f conftest.err conftest.$ac_ext | |
3102 | if $ac_preproc_ok; then | |
3103 | : | |
6e3f3080 | 3104 | else |
ba479fd2 NN |
3105 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check |
3106 | See \`config.log' for more details." >&5 | |
3107 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check | |
3108 | See \`config.log' for more details." >&2;} | |
3109 | { (exit 1); exit 1; }; } | |
6e3f3080 NN |
3110 | fi |
3111 | ||
ba479fd2 NN |
3112 | ac_ext=c |
3113 | ac_cpp='$CPP $CPPFLAGS' | |
3114 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3115 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3116 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3117 | ||
b5472e1d | 3118 | |
ba479fd2 NN |
3119 | echo "$as_me:$LINENO: checking for inline" >&5 |
3120 | echo $ECHO_N "checking for inline... $ECHO_C" >&6 | |
3121 | if test "${ac_cv_c_inline+set}" = set; then | |
3122 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
3123 | else |
3124 | ac_cv_c_inline=no | |
3125 | for ac_kw in inline __inline__ __inline; do | |
ba479fd2 | 3126 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3127 | /* confdefs.h. */ |
3128 | _ACEOF | |
3129 | cat confdefs.h >>conftest.$ac_ext | |
3130 | cat >>conftest.$ac_ext <<_ACEOF | |
3131 | /* end confdefs.h. */ | |
3132 | #ifndef __cplusplus | |
3133 | typedef int foo_t; | |
3134 | static $ac_kw foo_t static_foo () {return 0; } | |
3135 | $ac_kw foo_t foo () {return 0; } | |
3136 | #endif | |
414d23ae | 3137 | |
ba479fd2 NN |
3138 | _ACEOF |
3139 | rm -f conftest.$ac_objext | |
3140 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3141 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3142 | ac_status=$? |
86da66b5 HPN |
3143 | grep -v '^ *+' conftest.er1 >conftest.err |
3144 | rm -f conftest.er1 | |
3145 | cat conftest.err >&5 | |
ba479fd2 NN |
3146 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3147 | (exit $ac_status); } && | |
b095fe2c | 3148 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3149 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3150 | (eval $ac_try) 2>&5 | |
3151 | ac_status=$? | |
3152 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3153 | (exit $ac_status); }; } && | |
3154 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3155 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3156 | (eval $ac_try) 2>&5 | |
3157 | ac_status=$? | |
3158 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3159 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3160 | ac_cv_c_inline=$ac_kw; break |
3161 | else | |
ba479fd2 NN |
3162 | echo "$as_me: failed program was:" >&5 |
3163 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3164 | ||
414d23ae | 3165 | fi |
86da66b5 | 3166 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3167 | done |
3168 | ||
3169 | fi | |
ba479fd2 NN |
3170 | echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 |
3171 | echo "${ECHO_T}$ac_cv_c_inline" >&6 | |
86da66b5 HPN |
3172 | |
3173 | ||
ba479fd2 | 3174 | case $ac_cv_c_inline in |
414d23ae | 3175 | inline | yes) ;; |
86da66b5 HPN |
3176 | *) |
3177 | case $ac_cv_c_inline in | |
3178 | no) ac_val=;; | |
3179 | *) ac_val=$ac_cv_c_inline;; | |
3180 | esac | |
3181 | cat >>confdefs.h <<_ACEOF | |
3182 | #ifndef __cplusplus | |
3183 | #define inline $ac_val | |
3184 | #endif | |
ba479fd2 | 3185 | _ACEOF |
86da66b5 | 3186 | ;; |
414d23ae HPN |
3187 | esac |
3188 | ||
414d23ae | 3189 | |
ba479fd2 NN |
3190 | echo "$as_me:$LINENO: checking for long long int" >&5 |
3191 | echo $ECHO_N "checking for long long int... $ECHO_C" >&6 | |
3192 | if test "${ac_cv_c_long_long+set}" = set; then | |
3193 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae | 3194 | else |
ba479fd2 | 3195 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3196 | /* confdefs.h. */ |
3197 | _ACEOF | |
3198 | cat confdefs.h >>conftest.$ac_ext | |
3199 | cat >>conftest.$ac_ext <<_ACEOF | |
3200 | /* end confdefs.h. */ | |
414d23ae | 3201 | |
ba479fd2 NN |
3202 | int |
3203 | main () | |
3204 | { | |
414d23ae | 3205 | long long int i; |
ba479fd2 NN |
3206 | ; |
3207 | return 0; | |
3208 | } | |
3209 | _ACEOF | |
3210 | rm -f conftest.$ac_objext | |
3211 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3212 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3213 | ac_status=$? |
86da66b5 HPN |
3214 | grep -v '^ *+' conftest.er1 >conftest.err |
3215 | rm -f conftest.er1 | |
3216 | cat conftest.err >&5 | |
ba479fd2 NN |
3217 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3218 | (exit $ac_status); } && | |
b095fe2c | 3219 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3220 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3221 | (eval $ac_try) 2>&5 | |
3222 | ac_status=$? | |
3223 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3224 | (exit $ac_status); }; } && | |
3225 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3226 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3227 | (eval $ac_try) 2>&5 | |
3228 | ac_status=$? | |
3229 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3230 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3231 | ac_cv_c_long_long=yes |
3232 | else | |
ba479fd2 NN |
3233 | echo "$as_me: failed program was:" >&5 |
3234 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3235 | ||
3236 | ac_cv_c_long_long=no | |
414d23ae | 3237 | fi |
86da66b5 | 3238 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 3239 | fi |
ba479fd2 NN |
3240 | echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5 |
3241 | echo "${ECHO_T}$ac_cv_c_long_long" >&6 | |
63cf211a | 3242 | if test $ac_cv_c_long_long = yes; then |
ba479fd2 NN |
3243 | |
3244 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 3245 | #define HAVE_LONG_LONG 1 |
ba479fd2 | 3246 | _ACEOF |
414d23ae HPN |
3247 | |
3248 | fi | |
ba479fd2 NN |
3249 | echo "$as_me:$LINENO: checking for __int64" >&5 |
3250 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 | |
3251 | if test "${ac_cv_c___int64+set}" = set; then | |
3252 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3253 | else | |
3254 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3255 | /* confdefs.h. */ |
3256 | _ACEOF | |
3257 | cat confdefs.h >>conftest.$ac_ext | |
3258 | cat >>conftest.$ac_ext <<_ACEOF | |
3259 | /* end confdefs.h. */ | |
3260 | ||
3261 | int | |
3262 | main () | |
3263 | { | |
414d23ae | 3264 | __int64 i; |
ba479fd2 NN |
3265 | ; |
3266 | return 0; | |
3267 | } | |
3268 | _ACEOF | |
3269 | rm -f conftest.$ac_objext | |
3270 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3271 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3272 | ac_status=$? |
86da66b5 HPN |
3273 | grep -v '^ *+' conftest.er1 >conftest.err |
3274 | rm -f conftest.er1 | |
3275 | cat conftest.err >&5 | |
ba479fd2 NN |
3276 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3277 | (exit $ac_status); } && | |
b095fe2c | 3278 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3279 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3280 | (eval $ac_try) 2>&5 | |
3281 | ac_status=$? | |
3282 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3283 | (exit $ac_status); }; } && | |
3284 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3285 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3286 | (eval $ac_try) 2>&5 | |
3287 | ac_status=$? | |
3288 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3289 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3290 | ac_cv_c___int64=yes |
3291 | else | |
ba479fd2 NN |
3292 | echo "$as_me: failed program was:" >&5 |
3293 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3294 | ||
3295 | ac_cv_c___int64=no | |
414d23ae | 3296 | fi |
86da66b5 | 3297 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 3298 | fi |
ba479fd2 NN |
3299 | echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5 |
3300 | echo "${ECHO_T}$ac_cv_c___int64" >&6 | |
63cf211a | 3301 | if test $ac_cv_c___int64 = yes; then |
ba479fd2 NN |
3302 | |
3303 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 3304 | #define HAVE___INT64 1 |
ba479fd2 | 3305 | _ACEOF |
414d23ae HPN |
3306 | |
3307 | fi | |
3308 | ||
414d23ae HPN |
3309 | |
3310 | # sizeof(char) is 1 by definition. | |
bf3b7cd3 JD |
3311 | |
3312 | echo "$as_me:$LINENO: checking for egrep" >&5 | |
3313 | echo $ECHO_N "checking for egrep... $ECHO_C" >&6 | |
3314 | if test "${ac_cv_prog_egrep+set}" = set; then | |
3315 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3316 | else | |
3317 | if echo a | (grep -E '(a|b)') >/dev/null 2>&1 | |
3318 | then ac_cv_prog_egrep='grep -E' | |
3319 | else ac_cv_prog_egrep='egrep' | |
3320 | fi | |
3321 | fi | |
3322 | echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 | |
3323 | echo "${ECHO_T}$ac_cv_prog_egrep" >&6 | |
3324 | EGREP=$ac_cv_prog_egrep | |
3325 | ||
3326 | ||
3327 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 | |
3328 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
3329 | if test "${ac_cv_header_stdc+set}" = set; then | |
3330 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3331 | else | |
3332 | cat >conftest.$ac_ext <<_ACEOF | |
3333 | /* confdefs.h. */ | |
3334 | _ACEOF | |
3335 | cat confdefs.h >>conftest.$ac_ext | |
3336 | cat >>conftest.$ac_ext <<_ACEOF | |
3337 | /* end confdefs.h. */ | |
3338 | #include <stdlib.h> | |
3339 | #include <stdarg.h> | |
3340 | #include <string.h> | |
3341 | #include <float.h> | |
3342 | ||
3343 | int | |
3344 | main () | |
3345 | { | |
3346 | ||
3347 | ; | |
3348 | return 0; | |
3349 | } | |
3350 | _ACEOF | |
3351 | rm -f conftest.$ac_objext | |
3352 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3353 | (eval $ac_compile) 2>conftest.er1 | |
3354 | ac_status=$? | |
3355 | grep -v '^ *+' conftest.er1 >conftest.err | |
3356 | rm -f conftest.er1 | |
3357 | cat conftest.err >&5 | |
3358 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3359 | (exit $ac_status); } && | |
b095fe2c | 3360 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3361 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3362 | (eval $ac_try) 2>&5 | |
3363 | ac_status=$? | |
3364 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3365 | (exit $ac_status); }; } && | |
3366 | { ac_try='test -s conftest.$ac_objext' | |
3367 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3368 | (eval $ac_try) 2>&5 | |
3369 | ac_status=$? | |
3370 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3371 | (exit $ac_status); }; }; then | |
3372 | ac_cv_header_stdc=yes | |
3373 | else | |
3374 | echo "$as_me: failed program was:" >&5 | |
3375 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3376 | ||
3377 | ac_cv_header_stdc=no | |
3378 | fi | |
3379 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3380 | ||
3381 | if test $ac_cv_header_stdc = yes; then | |
3382 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3383 | cat >conftest.$ac_ext <<_ACEOF | |
3384 | /* confdefs.h. */ | |
3385 | _ACEOF | |
3386 | cat confdefs.h >>conftest.$ac_ext | |
3387 | cat >>conftest.$ac_ext <<_ACEOF | |
3388 | /* end confdefs.h. */ | |
3389 | #include <string.h> | |
3390 | ||
3391 | _ACEOF | |
3392 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3393 | $EGREP "memchr" >/dev/null 2>&1; then | |
3394 | : | |
3395 | else | |
3396 | ac_cv_header_stdc=no | |
3397 | fi | |
3398 | rm -f conftest* | |
3399 | ||
3400 | fi | |
3401 | ||
3402 | if test $ac_cv_header_stdc = yes; then | |
3403 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3404 | cat >conftest.$ac_ext <<_ACEOF | |
3405 | /* confdefs.h. */ | |
3406 | _ACEOF | |
3407 | cat confdefs.h >>conftest.$ac_ext | |
3408 | cat >>conftest.$ac_ext <<_ACEOF | |
3409 | /* end confdefs.h. */ | |
3410 | #include <stdlib.h> | |
3411 | ||
3412 | _ACEOF | |
3413 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3414 | $EGREP "free" >/dev/null 2>&1; then | |
3415 | : | |
3416 | else | |
3417 | ac_cv_header_stdc=no | |
3418 | fi | |
3419 | rm -f conftest* | |
3420 | ||
3421 | fi | |
3422 | ||
3423 | if test $ac_cv_header_stdc = yes; then | |
3424 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3425 | if test "$cross_compiling" = yes; then | |
3426 | : | |
3427 | else | |
3428 | cat >conftest.$ac_ext <<_ACEOF | |
3429 | /* confdefs.h. */ | |
3430 | _ACEOF | |
3431 | cat confdefs.h >>conftest.$ac_ext | |
3432 | cat >>conftest.$ac_ext <<_ACEOF | |
3433 | /* end confdefs.h. */ | |
3434 | #include <ctype.h> | |
3435 | #if ((' ' & 0x0FF) == 0x020) | |
3436 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3437 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3438 | #else | |
3439 | # define ISLOWER(c) \ | |
3440 | (('a' <= (c) && (c) <= 'i') \ | |
3441 | || ('j' <= (c) && (c) <= 'r') \ | |
3442 | || ('s' <= (c) && (c) <= 'z')) | |
3443 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
3444 | #endif | |
3445 | ||
3446 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3447 | int | |
3448 | main () | |
3449 | { | |
3450 | int i; | |
3451 | for (i = 0; i < 256; i++) | |
3452 | if (XOR (islower (i), ISLOWER (i)) | |
3453 | || toupper (i) != TOUPPER (i)) | |
3454 | exit(2); | |
3455 | exit (0); | |
3456 | } | |
3457 | _ACEOF | |
3458 | rm -f conftest$ac_exeext | |
3459 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3460 | (eval $ac_link) 2>&5 | |
3461 | ac_status=$? | |
3462 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3463 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
3464 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3465 | (eval $ac_try) 2>&5 | |
3466 | ac_status=$? | |
3467 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3468 | (exit $ac_status); }; }; then | |
3469 | : | |
3470 | else | |
3471 | echo "$as_me: program exited with status $ac_status" >&5 | |
3472 | echo "$as_me: failed program was:" >&5 | |
3473 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3474 | ||
3475 | ( exit $ac_status ) | |
3476 | ac_cv_header_stdc=no | |
3477 | fi | |
3478 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
3479 | fi | |
3480 | fi | |
3481 | fi | |
3482 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 | |
3483 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
3484 | if test $ac_cv_header_stdc = yes; then | |
3485 | ||
3486 | cat >>confdefs.h <<\_ACEOF | |
3487 | #define STDC_HEADERS 1 | |
3488 | _ACEOF | |
3489 | ||
3490 | fi | |
3491 | ||
3492 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
3493 | ||
3494 | ||
3495 | ||
3496 | ||
3497 | ||
3498 | ||
3499 | ||
3500 | ||
3501 | ||
3502 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
3503 | inttypes.h stdint.h unistd.h | |
3504 | do | |
3505 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
3506 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
3507 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
3508 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
3509 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3510 | else | |
3511 | cat >conftest.$ac_ext <<_ACEOF | |
3512 | /* confdefs.h. */ | |
3513 | _ACEOF | |
3514 | cat confdefs.h >>conftest.$ac_ext | |
3515 | cat >>conftest.$ac_ext <<_ACEOF | |
3516 | /* end confdefs.h. */ | |
3517 | $ac_includes_default | |
3518 | ||
3519 | #include <$ac_header> | |
3520 | _ACEOF | |
3521 | rm -f conftest.$ac_objext | |
3522 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3523 | (eval $ac_compile) 2>conftest.er1 | |
3524 | ac_status=$? | |
3525 | grep -v '^ *+' conftest.er1 >conftest.err | |
3526 | rm -f conftest.er1 | |
3527 | cat conftest.err >&5 | |
3528 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3529 | (exit $ac_status); } && | |
b095fe2c | 3530 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3531 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3532 | (eval $ac_try) 2>&5 | |
3533 | ac_status=$? | |
3534 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3535 | (exit $ac_status); }; } && | |
3536 | { ac_try='test -s conftest.$ac_objext' | |
3537 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3538 | (eval $ac_try) 2>&5 | |
3539 | ac_status=$? | |
3540 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3541 | (exit $ac_status); }; }; then | |
3542 | eval "$as_ac_Header=yes" | |
3543 | else | |
3544 | echo "$as_me: failed program was:" >&5 | |
3545 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3546 | ||
3547 | eval "$as_ac_Header=no" | |
3548 | fi | |
3549 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3550 | fi | |
3551 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
3552 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
3553 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
3554 | cat >>confdefs.h <<_ACEOF | |
3555 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
3556 | _ACEOF | |
3557 | ||
3558 | fi | |
3559 | ||
3560 | done | |
3561 | ||
3562 | ||
3563 | echo "$as_me:$LINENO: checking for void *" >&5 | |
3564 | echo $ECHO_N "checking for void *... $ECHO_C" >&6 | |
3565 | if test "${ac_cv_type_void_p+set}" = set; then | |
3566 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3567 | else | |
3568 | cat >conftest.$ac_ext <<_ACEOF | |
3569 | /* confdefs.h. */ | |
3570 | _ACEOF | |
3571 | cat confdefs.h >>conftest.$ac_ext | |
3572 | cat >>conftest.$ac_ext <<_ACEOF | |
3573 | /* end confdefs.h. */ | |
3574 | $ac_includes_default | |
3575 | int | |
3576 | main () | |
3577 | { | |
3578 | if ((void * *) 0) | |
3579 | return 0; | |
3580 | if (sizeof (void *)) | |
3581 | return 0; | |
3582 | ; | |
3583 | return 0; | |
3584 | } | |
3585 | _ACEOF | |
3586 | rm -f conftest.$ac_objext | |
3587 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3588 | (eval $ac_compile) 2>conftest.er1 | |
3589 | ac_status=$? | |
3590 | grep -v '^ *+' conftest.er1 >conftest.err | |
3591 | rm -f conftest.er1 | |
3592 | cat conftest.err >&5 | |
3593 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3594 | (exit $ac_status); } && | |
b095fe2c | 3595 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3596 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3597 | (eval $ac_try) 2>&5 | |
3598 | ac_status=$? | |
3599 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3600 | (exit $ac_status); }; } && | |
3601 | { ac_try='test -s conftest.$ac_objext' | |
3602 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3603 | (eval $ac_try) 2>&5 | |
3604 | ac_status=$? | |
3605 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3606 | (exit $ac_status); }; }; then | |
3607 | ac_cv_type_void_p=yes | |
3608 | else | |
3609 | echo "$as_me: failed program was:" >&5 | |
3610 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3611 | ||
3612 | ac_cv_type_void_p=no | |
3613 | fi | |
3614 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3615 | fi | |
3616 | echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 | |
3617 | echo "${ECHO_T}$ac_cv_type_void_p" >&6 | |
3618 | ||
ba479fd2 NN |
3619 | echo "$as_me:$LINENO: checking size of void *" >&5 |
3620 | echo $ECHO_N "checking size of void *... $ECHO_C" >&6 | |
3621 | if test "${ac_cv_sizeof_void_p+set}" = set; then | |
3622 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75b6f3fd | 3623 | else |
bf3b7cd3 JD |
3624 | if test "$ac_cv_type_void_p" = yes; then |
3625 | # The cast to unsigned long works around a bug in the HP C Compiler | |
3626 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
3627 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
3628 | # This bug is HP SR number 8606223364. | |
3629 | if test "$cross_compiling" = yes; then | |
3630 | # Depending upon the size, compute the lo and hi bounds. | |
3631 | cat >conftest.$ac_ext <<_ACEOF | |
3632 | /* confdefs.h. */ | |
3633 | _ACEOF | |
3634 | cat confdefs.h >>conftest.$ac_ext | |
3635 | cat >>conftest.$ac_ext <<_ACEOF | |
3636 | /* end confdefs.h. */ | |
3637 | $ac_includes_default | |
3638 | int | |
3639 | main () | |
3640 | { | |
3641 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)]; | |
3642 | test_array [0] = 0 | |
3643 | ||
3644 | ; | |
3645 | return 0; | |
3646 | } | |
3647 | _ACEOF | |
3648 | rm -f conftest.$ac_objext | |
3649 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3650 | (eval $ac_compile) 2>conftest.er1 | |
3651 | ac_status=$? | |
3652 | grep -v '^ *+' conftest.er1 >conftest.err | |
3653 | rm -f conftest.er1 | |
3654 | cat conftest.err >&5 | |
3655 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3656 | (exit $ac_status); } && | |
b095fe2c | 3657 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3658 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3659 | (eval $ac_try) 2>&5 | |
3660 | ac_status=$? | |
3661 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3662 | (exit $ac_status); }; } && | |
3663 | { ac_try='test -s conftest.$ac_objext' | |
3664 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3665 | (eval $ac_try) 2>&5 | |
3666 | ac_status=$? | |
3667 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3668 | (exit $ac_status); }; }; then | |
3669 | ac_lo=0 ac_mid=0 | |
3670 | while :; do | |
3671 | cat >conftest.$ac_ext <<_ACEOF | |
3672 | /* confdefs.h. */ | |
3673 | _ACEOF | |
3674 | cat confdefs.h >>conftest.$ac_ext | |
3675 | cat >>conftest.$ac_ext <<_ACEOF | |
3676 | /* end confdefs.h. */ | |
3677 | $ac_includes_default | |
3678 | int | |
3679 | main () | |
3680 | { | |
3681 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; | |
3682 | test_array [0] = 0 | |
3683 | ||
3684 | ; | |
3685 | return 0; | |
3686 | } | |
3687 | _ACEOF | |
3688 | rm -f conftest.$ac_objext | |
3689 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3690 | (eval $ac_compile) 2>conftest.er1 | |
3691 | ac_status=$? | |
3692 | grep -v '^ *+' conftest.er1 >conftest.err | |
3693 | rm -f conftest.er1 | |
3694 | cat conftest.err >&5 | |
3695 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3696 | (exit $ac_status); } && | |
b095fe2c | 3697 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3698 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3699 | (eval $ac_try) 2>&5 | |
3700 | ac_status=$? | |
3701 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3702 | (exit $ac_status); }; } && | |
3703 | { ac_try='test -s conftest.$ac_objext' | |
3704 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3705 | (eval $ac_try) 2>&5 | |
3706 | ac_status=$? | |
3707 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3708 | (exit $ac_status); }; }; then | |
3709 | ac_hi=$ac_mid; break | |
3710 | else | |
3711 | echo "$as_me: failed program was:" >&5 | |
3712 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3713 | ||
3714 | ac_lo=`expr $ac_mid + 1` | |
3715 | if test $ac_lo -le $ac_mid; then | |
3716 | ac_lo= ac_hi= | |
3717 | break | |
3718 | fi | |
3719 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
3720 | fi | |
3721 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3722 | done | |
3723 | else | |
3724 | echo "$as_me: failed program was:" >&5 | |
3725 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3726 | ||
3727 | cat >conftest.$ac_ext <<_ACEOF | |
3728 | /* confdefs.h. */ | |
3729 | _ACEOF | |
3730 | cat confdefs.h >>conftest.$ac_ext | |
3731 | cat >>conftest.$ac_ext <<_ACEOF | |
3732 | /* end confdefs.h. */ | |
3733 | $ac_includes_default | |
3734 | int | |
3735 | main () | |
3736 | { | |
3737 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)]; | |
3738 | test_array [0] = 0 | |
3739 | ||
3740 | ; | |
3741 | return 0; | |
3742 | } | |
3743 | _ACEOF | |
3744 | rm -f conftest.$ac_objext | |
3745 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3746 | (eval $ac_compile) 2>conftest.er1 | |
3747 | ac_status=$? | |
3748 | grep -v '^ *+' conftest.er1 >conftest.err | |
3749 | rm -f conftest.er1 | |
3750 | cat conftest.err >&5 | |
3751 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3752 | (exit $ac_status); } && | |
b095fe2c | 3753 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3754 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3755 | (eval $ac_try) 2>&5 | |
3756 | ac_status=$? | |
3757 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3758 | (exit $ac_status); }; } && | |
3759 | { ac_try='test -s conftest.$ac_objext' | |
3760 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3761 | (eval $ac_try) 2>&5 | |
3762 | ac_status=$? | |
3763 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3764 | (exit $ac_status); }; }; then | |
3765 | ac_hi=-1 ac_mid=-1 | |
3766 | while :; do | |
3767 | cat >conftest.$ac_ext <<_ACEOF | |
3768 | /* confdefs.h. */ | |
3769 | _ACEOF | |
3770 | cat confdefs.h >>conftest.$ac_ext | |
3771 | cat >>conftest.$ac_ext <<_ACEOF | |
3772 | /* end confdefs.h. */ | |
3773 | $ac_includes_default | |
3774 | int | |
3775 | main () | |
3776 | { | |
3777 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)]; | |
3778 | test_array [0] = 0 | |
3779 | ||
3780 | ; | |
3781 | return 0; | |
3782 | } | |
3783 | _ACEOF | |
3784 | rm -f conftest.$ac_objext | |
3785 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3786 | (eval $ac_compile) 2>conftest.er1 | |
3787 | ac_status=$? | |
3788 | grep -v '^ *+' conftest.er1 >conftest.err | |
3789 | rm -f conftest.er1 | |
3790 | cat conftest.err >&5 | |
3791 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3792 | (exit $ac_status); } && | |
b095fe2c | 3793 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3794 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3795 | (eval $ac_try) 2>&5 | |
3796 | ac_status=$? | |
3797 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3798 | (exit $ac_status); }; } && | |
3799 | { ac_try='test -s conftest.$ac_objext' | |
3800 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3801 | (eval $ac_try) 2>&5 | |
3802 | ac_status=$? | |
3803 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3804 | (exit $ac_status); }; }; then | |
3805 | ac_lo=$ac_mid; break | |
3806 | else | |
3807 | echo "$as_me: failed program was:" >&5 | |
3808 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3809 | ||
3810 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
3811 | if test $ac_mid -le $ac_hi; then | |
3812 | ac_lo= ac_hi= | |
3813 | break | |
3814 | fi | |
3815 | ac_mid=`expr 2 '*' $ac_mid` | |
3816 | fi | |
3817 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3818 | done | |
3819 | else | |
3820 | echo "$as_me: failed program was:" >&5 | |
3821 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3822 | ||
3823 | ac_lo= ac_hi= | |
3824 | fi | |
3825 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3826 | fi | |
3827 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3828 | # Binary search between lo and hi bounds. | |
3829 | while test "x$ac_lo" != "x$ac_hi"; do | |
3830 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
3831 | cat >conftest.$ac_ext <<_ACEOF | |
3832 | /* confdefs.h. */ | |
3833 | _ACEOF | |
3834 | cat confdefs.h >>conftest.$ac_ext | |
3835 | cat >>conftest.$ac_ext <<_ACEOF | |
3836 | /* end confdefs.h. */ | |
3837 | $ac_includes_default | |
3838 | int | |
3839 | main () | |
3840 | { | |
3841 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; | |
3842 | test_array [0] = 0 | |
3843 | ||
3844 | ; | |
3845 | return 0; | |
3846 | } | |
3847 | _ACEOF | |
3848 | rm -f conftest.$ac_objext | |
3849 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3850 | (eval $ac_compile) 2>conftest.er1 | |
3851 | ac_status=$? | |
3852 | grep -v '^ *+' conftest.er1 >conftest.err | |
3853 | rm -f conftest.er1 | |
3854 | cat conftest.err >&5 | |
3855 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3856 | (exit $ac_status); } && | |
b095fe2c | 3857 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3858 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3859 | (eval $ac_try) 2>&5 | |
3860 | ac_status=$? | |
3861 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3862 | (exit $ac_status); }; } && | |
3863 | { ac_try='test -s conftest.$ac_objext' | |
3864 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3865 | (eval $ac_try) 2>&5 | |
3866 | ac_status=$? | |
3867 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3868 | (exit $ac_status); }; }; then | |
3869 | ac_hi=$ac_mid | |
3870 | else | |
3871 | echo "$as_me: failed program was:" >&5 | |
3872 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3873 | ||
3874 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
3875 | fi | |
3876 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3877 | done | |
3878 | case $ac_lo in | |
3879 | ?*) ac_cv_sizeof_void_p=$ac_lo;; | |
3880 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 | |
3881 | See \`config.log' for more details." >&5 | |
3882 | echo "$as_me: error: cannot compute sizeof (void *), 77 | |
3883 | See \`config.log' for more details." >&2;} | |
3884 | { (exit 1); exit 1; }; } ;; | |
3885 | esac | |
3886 | else | |
3887 | if test "$cross_compiling" = yes; then | |
b095fe2c DJ |
3888 | { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 |
3889 | echo "$as_me: error: internal error: not reached in cross-compile" >&2;} | |
bf3b7cd3 JD |
3890 | { (exit 1); exit 1; }; } |
3891 | else | |
3892 | cat >conftest.$ac_ext <<_ACEOF | |
3893 | /* confdefs.h. */ | |
3894 | _ACEOF | |
3895 | cat confdefs.h >>conftest.$ac_ext | |
3896 | cat >>conftest.$ac_ext <<_ACEOF | |
3897 | /* end confdefs.h. */ | |
3898 | $ac_includes_default | |
3899 | long longval () { return (long) (sizeof (void *)); } | |
3900 | unsigned long ulongval () { return (long) (sizeof (void *)); } | |
3901 | #include <stdio.h> | |
3902 | #include <stdlib.h> | |
3903 | int | |
3904 | main () | |
3905 | { | |
3906 | ||
3907 | FILE *f = fopen ("conftest.val", "w"); | |
3908 | if (! f) | |
3909 | exit (1); | |
3910 | if (((long) (sizeof (void *))) < 0) | |
3911 | { | |
3912 | long i = longval (); | |
3913 | if (i != ((long) (sizeof (void *)))) | |
3914 | exit (1); | |
3915 | fprintf (f, "%ld\n", i); | |
3916 | } | |
3917 | else | |
3918 | { | |
3919 | unsigned long i = ulongval (); | |
3920 | if (i != ((long) (sizeof (void *)))) | |
3921 | exit (1); | |
3922 | fprintf (f, "%lu\n", i); | |
3923 | } | |
3924 | exit (ferror (f) || fclose (f) != 0); | |
3925 | ||
3926 | ; | |
3927 | return 0; | |
3928 | } | |
3929 | _ACEOF | |
3930 | rm -f conftest$ac_exeext | |
3931 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3932 | (eval $ac_link) 2>&5 | |
3933 | ac_status=$? | |
3934 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3935 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
3936 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3937 | (eval $ac_try) 2>&5 | |
3938 | ac_status=$? | |
3939 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3940 | (exit $ac_status); }; }; then | |
3941 | ac_cv_sizeof_void_p=`cat conftest.val` | |
3942 | else | |
3943 | echo "$as_me: program exited with status $ac_status" >&5 | |
3944 | echo "$as_me: failed program was:" >&5 | |
3945 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3946 | ||
3947 | ( exit $ac_status ) | |
3948 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 | |
3949 | See \`config.log' for more details." >&5 | |
3950 | echo "$as_me: error: cannot compute sizeof (void *), 77 | |
3951 | See \`config.log' for more details." >&2;} | |
3952 | { (exit 1); exit 1; }; } | |
3953 | fi | |
3954 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
3955 | fi | |
3956 | fi | |
3957 | rm -f conftest.val | |
3958 | else | |
3959 | ac_cv_sizeof_void_p=0 | |
3960 | fi | |
3961 | fi | |
3962 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 | |
3963 | echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 | |
3964 | cat >>confdefs.h <<_ACEOF | |
3965 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p | |
3966 | _ACEOF | |
3967 | ||
3968 | ||
3969 | echo "$as_me:$LINENO: checking for short" >&5 | |
3970 | echo $ECHO_N "checking for short... $ECHO_C" >&6 | |
3971 | if test "${ac_cv_type_short+set}" = set; then | |
3972 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3973 | else | |
3974 | cat >conftest.$ac_ext <<_ACEOF | |
3975 | /* confdefs.h. */ | |
3976 | _ACEOF | |
3977 | cat confdefs.h >>conftest.$ac_ext | |
3978 | cat >>conftest.$ac_ext <<_ACEOF | |
3979 | /* end confdefs.h. */ | |
3980 | $ac_includes_default | |
3981 | int | |
3982 | main () | |
3983 | { | |
3984 | if ((short *) 0) | |
3985 | return 0; | |
3986 | if (sizeof (short)) | |
3987 | return 0; | |
3988 | ; | |
3989 | return 0; | |
3990 | } | |
3991 | _ACEOF | |
3992 | rm -f conftest.$ac_objext | |
3993 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3994 | (eval $ac_compile) 2>conftest.er1 | |
3995 | ac_status=$? | |
3996 | grep -v '^ *+' conftest.er1 >conftest.err | |
3997 | rm -f conftest.er1 | |
3998 | cat conftest.err >&5 | |
3999 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4000 | (exit $ac_status); } && | |
b095fe2c | 4001 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4002 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4003 | (eval $ac_try) 2>&5 | |
4004 | ac_status=$? | |
4005 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4006 | (exit $ac_status); }; } && | |
4007 | { ac_try='test -s conftest.$ac_objext' | |
4008 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4009 | (eval $ac_try) 2>&5 | |
4010 | ac_status=$? | |
4011 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4012 | (exit $ac_status); }; }; then | |
4013 | ac_cv_type_short=yes | |
4014 | else | |
4015 | echo "$as_me: failed program was:" >&5 | |
4016 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4017 | ||
4018 | ac_cv_type_short=no | |
4019 | fi | |
4020 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4021 | fi | |
4022 | echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 | |
4023 | echo "${ECHO_T}$ac_cv_type_short" >&6 | |
4024 | ||
4025 | echo "$as_me:$LINENO: checking size of short" >&5 | |
4026 | echo $ECHO_N "checking size of short... $ECHO_C" >&6 | |
4027 | if test "${ac_cv_sizeof_short+set}" = set; then | |
4028 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4029 | else | |
4030 | if test "$ac_cv_type_short" = yes; then | |
4031 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4032 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4033 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4034 | # This bug is HP SR number 8606223364. | |
4035 | if test "$cross_compiling" = yes; then | |
4036 | # Depending upon the size, compute the lo and hi bounds. | |
4037 | cat >conftest.$ac_ext <<_ACEOF | |
4038 | /* confdefs.h. */ | |
4039 | _ACEOF | |
4040 | cat confdefs.h >>conftest.$ac_ext | |
4041 | cat >>conftest.$ac_ext <<_ACEOF | |
4042 | /* end confdefs.h. */ | |
4043 | $ac_includes_default | |
4044 | int | |
4045 | main () | |
4046 | { | |
4047 | static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; | |
4048 | test_array [0] = 0 | |
4049 | ||
4050 | ; | |
4051 | return 0; | |
4052 | } | |
4053 | _ACEOF | |
4054 | rm -f conftest.$ac_objext | |
4055 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4056 | (eval $ac_compile) 2>conftest.er1 | |
4057 | ac_status=$? | |
4058 | grep -v '^ *+' conftest.er1 >conftest.err | |
4059 | rm -f conftest.er1 | |
4060 | cat conftest.err >&5 | |
4061 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4062 | (exit $ac_status); } && | |
b095fe2c | 4063 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4064 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4065 | (eval $ac_try) 2>&5 | |
4066 | ac_status=$? | |
4067 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4068 | (exit $ac_status); }; } && | |
4069 | { ac_try='test -s conftest.$ac_objext' | |
4070 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4071 | (eval $ac_try) 2>&5 | |
4072 | ac_status=$? | |
4073 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4074 | (exit $ac_status); }; }; then | |
4075 | ac_lo=0 ac_mid=0 | |
4076 | while :; do | |
4077 | cat >conftest.$ac_ext <<_ACEOF | |
4078 | /* confdefs.h. */ | |
4079 | _ACEOF | |
4080 | cat confdefs.h >>conftest.$ac_ext | |
4081 | cat >>conftest.$ac_ext <<_ACEOF | |
4082 | /* end confdefs.h. */ | |
4083 | $ac_includes_default | |
4084 | int | |
4085 | main () | |
4086 | { | |
4087 | static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; | |
4088 | test_array [0] = 0 | |
4089 | ||
4090 | ; | |
4091 | return 0; | |
4092 | } | |
4093 | _ACEOF | |
4094 | rm -f conftest.$ac_objext | |
4095 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4096 | (eval $ac_compile) 2>conftest.er1 | |
4097 | ac_status=$? | |
4098 | grep -v '^ *+' conftest.er1 >conftest.err | |
4099 | rm -f conftest.er1 | |
4100 | cat conftest.err >&5 | |
4101 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4102 | (exit $ac_status); } && | |
b095fe2c | 4103 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4104 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4105 | (eval $ac_try) 2>&5 | |
4106 | ac_status=$? | |
4107 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4108 | (exit $ac_status); }; } && | |
4109 | { ac_try='test -s conftest.$ac_objext' | |
4110 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4111 | (eval $ac_try) 2>&5 | |
4112 | ac_status=$? | |
4113 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4114 | (exit $ac_status); }; }; then | |
4115 | ac_hi=$ac_mid; break | |
4116 | else | |
4117 | echo "$as_me: failed program was:" >&5 | |
4118 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4119 | ||
4120 | ac_lo=`expr $ac_mid + 1` | |
4121 | if test $ac_lo -le $ac_mid; then | |
4122 | ac_lo= ac_hi= | |
4123 | break | |
4124 | fi | |
4125 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4126 | fi | |
4127 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4128 | done | |
4129 | else | |
4130 | echo "$as_me: failed program was:" >&5 | |
4131 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4132 | ||
4133 | cat >conftest.$ac_ext <<_ACEOF | |
4134 | /* confdefs.h. */ | |
4135 | _ACEOF | |
4136 | cat confdefs.h >>conftest.$ac_ext | |
4137 | cat >>conftest.$ac_ext <<_ACEOF | |
4138 | /* end confdefs.h. */ | |
4139 | $ac_includes_default | |
4140 | int | |
4141 | main () | |
4142 | { | |
4143 | static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; | |
4144 | test_array [0] = 0 | |
4145 | ||
4146 | ; | |
4147 | return 0; | |
4148 | } | |
4149 | _ACEOF | |
4150 | rm -f conftest.$ac_objext | |
4151 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4152 | (eval $ac_compile) 2>conftest.er1 | |
4153 | ac_status=$? | |
4154 | grep -v '^ *+' conftest.er1 >conftest.err | |
4155 | rm -f conftest.er1 | |
4156 | cat conftest.err >&5 | |
4157 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4158 | (exit $ac_status); } && | |
b095fe2c | 4159 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4160 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4161 | (eval $ac_try) 2>&5 | |
4162 | ac_status=$? | |
4163 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4164 | (exit $ac_status); }; } && | |
4165 | { ac_try='test -s conftest.$ac_objext' | |
4166 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4167 | (eval $ac_try) 2>&5 | |
4168 | ac_status=$? | |
4169 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4170 | (exit $ac_status); }; }; then | |
4171 | ac_hi=-1 ac_mid=-1 | |
4172 | while :; do | |
4173 | cat >conftest.$ac_ext <<_ACEOF | |
4174 | /* confdefs.h. */ | |
4175 | _ACEOF | |
4176 | cat confdefs.h >>conftest.$ac_ext | |
4177 | cat >>conftest.$ac_ext <<_ACEOF | |
4178 | /* end confdefs.h. */ | |
4179 | $ac_includes_default | |
4180 | int | |
4181 | main () | |
4182 | { | |
4183 | static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; | |
4184 | test_array [0] = 0 | |
4185 | ||
4186 | ; | |
4187 | return 0; | |
4188 | } | |
4189 | _ACEOF | |
4190 | rm -f conftest.$ac_objext | |
4191 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4192 | (eval $ac_compile) 2>conftest.er1 | |
4193 | ac_status=$? | |
4194 | grep -v '^ *+' conftest.er1 >conftest.err | |
4195 | rm -f conftest.er1 | |
4196 | cat conftest.err >&5 | |
4197 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4198 | (exit $ac_status); } && | |
b095fe2c | 4199 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4200 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4201 | (eval $ac_try) 2>&5 | |
4202 | ac_status=$? | |
4203 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4204 | (exit $ac_status); }; } && | |
4205 | { ac_try='test -s conftest.$ac_objext' | |
4206 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4207 | (eval $ac_try) 2>&5 | |
4208 | ac_status=$? | |
4209 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4210 | (exit $ac_status); }; }; then | |
4211 | ac_lo=$ac_mid; break | |
4212 | else | |
4213 | echo "$as_me: failed program was:" >&5 | |
4214 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4215 | ||
4216 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4217 | if test $ac_mid -le $ac_hi; then | |
4218 | ac_lo= ac_hi= | |
4219 | break | |
4220 | fi | |
4221 | ac_mid=`expr 2 '*' $ac_mid` | |
4222 | fi | |
4223 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4224 | done | |
4225 | else | |
4226 | echo "$as_me: failed program was:" >&5 | |
4227 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4228 | ||
4229 | ac_lo= ac_hi= | |
4230 | fi | |
4231 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4232 | fi | |
4233 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4234 | # Binary search between lo and hi bounds. | |
4235 | while test "x$ac_lo" != "x$ac_hi"; do | |
4236 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4237 | cat >conftest.$ac_ext <<_ACEOF | |
4238 | /* confdefs.h. */ | |
4239 | _ACEOF | |
4240 | cat confdefs.h >>conftest.$ac_ext | |
4241 | cat >>conftest.$ac_ext <<_ACEOF | |
4242 | /* end confdefs.h. */ | |
4243 | $ac_includes_default | |
4244 | int | |
4245 | main () | |
4246 | { | |
4247 | static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; | |
4248 | test_array [0] = 0 | |
4249 | ||
4250 | ; | |
4251 | return 0; | |
4252 | } | |
4253 | _ACEOF | |
4254 | rm -f conftest.$ac_objext | |
4255 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4256 | (eval $ac_compile) 2>conftest.er1 | |
4257 | ac_status=$? | |
4258 | grep -v '^ *+' conftest.er1 >conftest.err | |
4259 | rm -f conftest.er1 | |
4260 | cat conftest.err >&5 | |
4261 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4262 | (exit $ac_status); } && | |
b095fe2c | 4263 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4264 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4265 | (eval $ac_try) 2>&5 | |
4266 | ac_status=$? | |
4267 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4268 | (exit $ac_status); }; } && | |
4269 | { ac_try='test -s conftest.$ac_objext' | |
4270 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4271 | (eval $ac_try) 2>&5 | |
4272 | ac_status=$? | |
4273 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4274 | (exit $ac_status); }; }; then | |
4275 | ac_hi=$ac_mid | |
4276 | else | |
4277 | echo "$as_me: failed program was:" >&5 | |
4278 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4279 | ||
4280 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4281 | fi | |
4282 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4283 | done | |
4284 | case $ac_lo in | |
4285 | ?*) ac_cv_sizeof_short=$ac_lo;; | |
4286 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 | |
4287 | See \`config.log' for more details." >&5 | |
4288 | echo "$as_me: error: cannot compute sizeof (short), 77 | |
4289 | See \`config.log' for more details." >&2;} | |
4290 | { (exit 1); exit 1; }; } ;; | |
4291 | esac | |
4292 | else | |
4293 | if test "$cross_compiling" = yes; then | |
b095fe2c DJ |
4294 | { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 |
4295 | echo "$as_me: error: internal error: not reached in cross-compile" >&2;} | |
bf3b7cd3 JD |
4296 | { (exit 1); exit 1; }; } |
4297 | else | |
4298 | cat >conftest.$ac_ext <<_ACEOF | |
4299 | /* confdefs.h. */ | |
4300 | _ACEOF | |
4301 | cat confdefs.h >>conftest.$ac_ext | |
4302 | cat >>conftest.$ac_ext <<_ACEOF | |
4303 | /* end confdefs.h. */ | |
4304 | $ac_includes_default | |
4305 | long longval () { return (long) (sizeof (short)); } | |
4306 | unsigned long ulongval () { return (long) (sizeof (short)); } | |
4307 | #include <stdio.h> | |
4308 | #include <stdlib.h> | |
4309 | int | |
4310 | main () | |
4311 | { | |
4312 | ||
4313 | FILE *f = fopen ("conftest.val", "w"); | |
4314 | if (! f) | |
4315 | exit (1); | |
4316 | if (((long) (sizeof (short))) < 0) | |
4317 | { | |
4318 | long i = longval (); | |
4319 | if (i != ((long) (sizeof (short)))) | |
4320 | exit (1); | |
4321 | fprintf (f, "%ld\n", i); | |
4322 | } | |
4323 | else | |
4324 | { | |
4325 | unsigned long i = ulongval (); | |
4326 | if (i != ((long) (sizeof (short)))) | |
4327 | exit (1); | |
4328 | fprintf (f, "%lu\n", i); | |
4329 | } | |
4330 | exit (ferror (f) || fclose (f) != 0); | |
4331 | ||
4332 | ; | |
4333 | return 0; | |
4334 | } | |
4335 | _ACEOF | |
4336 | rm -f conftest$ac_exeext | |
4337 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4338 | (eval $ac_link) 2>&5 | |
4339 | ac_status=$? | |
4340 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4341 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4342 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4343 | (eval $ac_try) 2>&5 | |
4344 | ac_status=$? | |
4345 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4346 | (exit $ac_status); }; }; then | |
4347 | ac_cv_sizeof_short=`cat conftest.val` | |
4348 | else | |
4349 | echo "$as_me: program exited with status $ac_status" >&5 | |
4350 | echo "$as_me: failed program was:" >&5 | |
4351 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4352 | ||
4353 | ( exit $ac_status ) | |
4354 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 | |
4355 | See \`config.log' for more details." >&5 | |
4356 | echo "$as_me: error: cannot compute sizeof (short), 77 | |
4357 | See \`config.log' for more details." >&2;} | |
4358 | { (exit 1); exit 1; }; } | |
4359 | fi | |
4360 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
4361 | fi | |
4362 | fi | |
4363 | rm -f conftest.val | |
4364 | else | |
4365 | ac_cv_sizeof_short=0 | |
4366 | fi | |
4367 | fi | |
4368 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 | |
4369 | echo "${ECHO_T}$ac_cv_sizeof_short" >&6 | |
4370 | cat >>confdefs.h <<_ACEOF | |
4371 | #define SIZEOF_SHORT $ac_cv_sizeof_short | |
4372 | _ACEOF | |
4373 | ||
4374 | ||
4375 | echo "$as_me:$LINENO: checking for int" >&5 | |
4376 | echo $ECHO_N "checking for int... $ECHO_C" >&6 | |
4377 | if test "${ac_cv_type_int+set}" = set; then | |
4378 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4379 | else | |
4380 | cat >conftest.$ac_ext <<_ACEOF | |
4381 | /* confdefs.h. */ | |
4382 | _ACEOF | |
4383 | cat confdefs.h >>conftest.$ac_ext | |
4384 | cat >>conftest.$ac_ext <<_ACEOF | |
4385 | /* end confdefs.h. */ | |
4386 | $ac_includes_default | |
4387 | int | |
4388 | main () | |
4389 | { | |
4390 | if ((int *) 0) | |
4391 | return 0; | |
4392 | if (sizeof (int)) | |
4393 | return 0; | |
4394 | ; | |
4395 | return 0; | |
4396 | } | |
4397 | _ACEOF | |
4398 | rm -f conftest.$ac_objext | |
4399 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4400 | (eval $ac_compile) 2>conftest.er1 | |
4401 | ac_status=$? | |
4402 | grep -v '^ *+' conftest.er1 >conftest.err | |
4403 | rm -f conftest.er1 | |
4404 | cat conftest.err >&5 | |
4405 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4406 | (exit $ac_status); } && | |
b095fe2c | 4407 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4408 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4409 | (eval $ac_try) 2>&5 | |
4410 | ac_status=$? | |
4411 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4412 | (exit $ac_status); }; } && | |
4413 | { ac_try='test -s conftest.$ac_objext' | |
4414 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4415 | (eval $ac_try) 2>&5 | |
4416 | ac_status=$? | |
4417 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4418 | (exit $ac_status); }; }; then | |
4419 | ac_cv_type_int=yes | |
4420 | else | |
4421 | echo "$as_me: failed program was:" >&5 | |
4422 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4423 | ||
4424 | ac_cv_type_int=no | |
4425 | fi | |
4426 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4427 | fi | |
4428 | echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 | |
4429 | echo "${ECHO_T}$ac_cv_type_int" >&6 | |
4430 | ||
4431 | echo "$as_me:$LINENO: checking size of int" >&5 | |
4432 | echo $ECHO_N "checking size of int... $ECHO_C" >&6 | |
4433 | if test "${ac_cv_sizeof_int+set}" = set; then | |
4434 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4435 | else | |
4436 | if test "$ac_cv_type_int" = yes; then | |
4437 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4438 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4439 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4440 | # This bug is HP SR number 8606223364. | |
4441 | if test "$cross_compiling" = yes; then | |
4442 | # Depending upon the size, compute the lo and hi bounds. | |
4443 | cat >conftest.$ac_ext <<_ACEOF | |
4444 | /* confdefs.h. */ | |
4445 | _ACEOF | |
4446 | cat confdefs.h >>conftest.$ac_ext | |
4447 | cat >>conftest.$ac_ext <<_ACEOF | |
4448 | /* end confdefs.h. */ | |
4449 | $ac_includes_default | |
4450 | int | |
4451 | main () | |
4452 | { | |
4453 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; | |
4454 | test_array [0] = 0 | |
4455 | ||
4456 | ; | |
4457 | return 0; | |
4458 | } | |
4459 | _ACEOF | |
4460 | rm -f conftest.$ac_objext | |
4461 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4462 | (eval $ac_compile) 2>conftest.er1 | |
4463 | ac_status=$? | |
4464 | grep -v '^ *+' conftest.er1 >conftest.err | |
4465 | rm -f conftest.er1 | |
4466 | cat conftest.err >&5 | |
4467 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4468 | (exit $ac_status); } && | |
b095fe2c | 4469 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4470 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4471 | (eval $ac_try) 2>&5 | |
4472 | ac_status=$? | |
4473 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4474 | (exit $ac_status); }; } && | |
4475 | { ac_try='test -s conftest.$ac_objext' | |
4476 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4477 | (eval $ac_try) 2>&5 | |
4478 | ac_status=$? | |
4479 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4480 | (exit $ac_status); }; }; then | |
4481 | ac_lo=0 ac_mid=0 | |
4482 | while :; do | |
4483 | cat >conftest.$ac_ext <<_ACEOF | |
4484 | /* confdefs.h. */ | |
4485 | _ACEOF | |
4486 | cat confdefs.h >>conftest.$ac_ext | |
4487 | cat >>conftest.$ac_ext <<_ACEOF | |
4488 | /* end confdefs.h. */ | |
4489 | $ac_includes_default | |
4490 | int | |
4491 | main () | |
4492 | { | |
4493 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; | |
4494 | test_array [0] = 0 | |
4495 | ||
4496 | ; | |
4497 | return 0; | |
4498 | } | |
4499 | _ACEOF | |
4500 | rm -f conftest.$ac_objext | |
4501 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4502 | (eval $ac_compile) 2>conftest.er1 | |
4503 | ac_status=$? | |
4504 | grep -v '^ *+' conftest.er1 >conftest.err | |
4505 | rm -f conftest.er1 | |
4506 | cat conftest.err >&5 | |
4507 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4508 | (exit $ac_status); } && | |
b095fe2c | 4509 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4510 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4511 | (eval $ac_try) 2>&5 | |
4512 | ac_status=$? | |
4513 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4514 | (exit $ac_status); }; } && | |
4515 | { ac_try='test -s conftest.$ac_objext' | |
4516 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4517 | (eval $ac_try) 2>&5 | |
4518 | ac_status=$? | |
4519 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4520 | (exit $ac_status); }; }; then | |
4521 | ac_hi=$ac_mid; break | |
4522 | else | |
4523 | echo "$as_me: failed program was:" >&5 | |
4524 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4525 | ||
4526 | ac_lo=`expr $ac_mid + 1` | |
4527 | if test $ac_lo -le $ac_mid; then | |
4528 | ac_lo= ac_hi= | |
4529 | break | |
4530 | fi | |
4531 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4532 | fi | |
4533 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4534 | done | |
4535 | else | |
4536 | echo "$as_me: failed program was:" >&5 | |
4537 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4538 | ||
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))) < 0)]; | |
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); } && | |
b095fe2c | 4565 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4566 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4567 | (eval $ac_try) 2>&5 | |
4568 | ac_status=$? | |
4569 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4570 | (exit $ac_status); }; } && | |
4571 | { ac_try='test -s conftest.$ac_objext' | |
4572 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4573 | (eval $ac_try) 2>&5 | |
4574 | ac_status=$? | |
4575 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4576 | (exit $ac_status); }; }; then | |
4577 | ac_hi=-1 ac_mid=-1 | |
4578 | while :; do | |
4579 | cat >conftest.$ac_ext <<_ACEOF | |
4580 | /* confdefs.h. */ | |
4581 | _ACEOF | |
4582 | cat confdefs.h >>conftest.$ac_ext | |
4583 | cat >>conftest.$ac_ext <<_ACEOF | |
4584 | /* end confdefs.h. */ | |
4585 | $ac_includes_default | |
4586 | int | |
4587 | main () | |
4588 | { | |
4589 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; | |
4590 | test_array [0] = 0 | |
4591 | ||
4592 | ; | |
4593 | return 0; | |
4594 | } | |
4595 | _ACEOF | |
4596 | rm -f conftest.$ac_objext | |
4597 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4598 | (eval $ac_compile) 2>conftest.er1 | |
4599 | ac_status=$? | |
4600 | grep -v '^ *+' conftest.er1 >conftest.err | |
4601 | rm -f conftest.er1 | |
4602 | cat conftest.err >&5 | |
4603 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4604 | (exit $ac_status); } && | |
b095fe2c | 4605 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4606 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4607 | (eval $ac_try) 2>&5 | |
4608 | ac_status=$? | |
4609 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4610 | (exit $ac_status); }; } && | |
4611 | { ac_try='test -s conftest.$ac_objext' | |
4612 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4613 | (eval $ac_try) 2>&5 | |
4614 | ac_status=$? | |
4615 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4616 | (exit $ac_status); }; }; then | |
4617 | ac_lo=$ac_mid; break | |
4618 | else | |
4619 | echo "$as_me: failed program was:" >&5 | |
4620 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4621 | ||
4622 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4623 | if test $ac_mid -le $ac_hi; then | |
4624 | ac_lo= ac_hi= | |
4625 | break | |
4626 | fi | |
4627 | ac_mid=`expr 2 '*' $ac_mid` | |
4628 | fi | |
4629 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4630 | done | |
4631 | else | |
4632 | echo "$as_me: failed program was:" >&5 | |
4633 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4634 | ||
4635 | ac_lo= ac_hi= | |
4636 | fi | |
4637 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4638 | fi | |
4639 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4640 | # Binary search between lo and hi bounds. | |
4641 | while test "x$ac_lo" != "x$ac_hi"; do | |
4642 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4643 | cat >conftest.$ac_ext <<_ACEOF | |
4644 | /* confdefs.h. */ | |
4645 | _ACEOF | |
4646 | cat confdefs.h >>conftest.$ac_ext | |
4647 | cat >>conftest.$ac_ext <<_ACEOF | |
4648 | /* end confdefs.h. */ | |
4649 | $ac_includes_default | |
4650 | int | |
4651 | main () | |
4652 | { | |
4653 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; | |
4654 | test_array [0] = 0 | |
4655 | ||
4656 | ; | |
4657 | return 0; | |
4658 | } | |
4659 | _ACEOF | |
4660 | rm -f conftest.$ac_objext | |
4661 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4662 | (eval $ac_compile) 2>conftest.er1 | |
4663 | ac_status=$? | |
4664 | grep -v '^ *+' conftest.er1 >conftest.err | |
4665 | rm -f conftest.er1 | |
4666 | cat conftest.err >&5 | |
4667 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4668 | (exit $ac_status); } && | |
b095fe2c | 4669 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4670 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4671 | (eval $ac_try) 2>&5 | |
4672 | ac_status=$? | |
4673 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4674 | (exit $ac_status); }; } && | |
4675 | { ac_try='test -s conftest.$ac_objext' | |
4676 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4677 | (eval $ac_try) 2>&5 | |
4678 | ac_status=$? | |
4679 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4680 | (exit $ac_status); }; }; then | |
4681 | ac_hi=$ac_mid | |
4682 | else | |
4683 | echo "$as_me: failed program was:" >&5 | |
4684 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4685 | ||
4686 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4687 | fi | |
4688 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4689 | done | |
4690 | case $ac_lo in | |
4691 | ?*) ac_cv_sizeof_int=$ac_lo;; | |
4692 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 | |
4693 | See \`config.log' for more details." >&5 | |
4694 | echo "$as_me: error: cannot compute sizeof (int), 77 | |
4695 | See \`config.log' for more details." >&2;} | |
4696 | { (exit 1); exit 1; }; } ;; | |
4697 | esac | |
4698 | else | |
4699 | if test "$cross_compiling" = yes; then | |
b095fe2c DJ |
4700 | { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 |
4701 | echo "$as_me: error: internal error: not reached in cross-compile" >&2;} | |
bf3b7cd3 JD |
4702 | { (exit 1); exit 1; }; } |
4703 | else | |
4704 | cat >conftest.$ac_ext <<_ACEOF | |
4705 | /* confdefs.h. */ | |
4706 | _ACEOF | |
4707 | cat confdefs.h >>conftest.$ac_ext | |
4708 | cat >>conftest.$ac_ext <<_ACEOF | |
4709 | /* end confdefs.h. */ | |
4710 | $ac_includes_default | |
4711 | long longval () { return (long) (sizeof (int)); } | |
4712 | unsigned long ulongval () { return (long) (sizeof (int)); } | |
4713 | #include <stdio.h> | |
4714 | #include <stdlib.h> | |
4715 | int | |
4716 | main () | |
4717 | { | |
4718 | ||
4719 | FILE *f = fopen ("conftest.val", "w"); | |
4720 | if (! f) | |
4721 | exit (1); | |
4722 | if (((long) (sizeof (int))) < 0) | |
4723 | { | |
4724 | long i = longval (); | |
4725 | if (i != ((long) (sizeof (int)))) | |
4726 | exit (1); | |
4727 | fprintf (f, "%ld\n", i); | |
4728 | } | |
4729 | else | |
4730 | { | |
4731 | unsigned long i = ulongval (); | |
4732 | if (i != ((long) (sizeof (int)))) | |
4733 | exit (1); | |
4734 | fprintf (f, "%lu\n", i); | |
4735 | } | |
4736 | exit (ferror (f) || fclose (f) != 0); | |
4737 | ||
4738 | ; | |
4739 | return 0; | |
4740 | } | |
4741 | _ACEOF | |
4742 | rm -f conftest$ac_exeext | |
4743 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4744 | (eval $ac_link) 2>&5 | |
4745 | ac_status=$? | |
4746 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4747 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4748 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4749 | (eval $ac_try) 2>&5 | |
4750 | ac_status=$? | |
4751 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4752 | (exit $ac_status); }; }; then | |
4753 | ac_cv_sizeof_int=`cat conftest.val` | |
4754 | else | |
4755 | echo "$as_me: program exited with status $ac_status" >&5 | |
4756 | echo "$as_me: failed program was:" >&5 | |
4757 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4758 | ||
4759 | ( exit $ac_status ) | |
4760 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 | |
4761 | See \`config.log' for more details." >&5 | |
4762 | echo "$as_me: error: cannot compute sizeof (int), 77 | |
4763 | See \`config.log' for more details." >&2;} | |
4764 | { (exit 1); exit 1; }; } | |
4765 | fi | |
4766 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
4767 | fi | |
4768 | fi | |
4769 | rm -f conftest.val | |
4770 | else | |
4771 | ac_cv_sizeof_int=0 | |
4772 | fi | |
4773 | fi | |
4774 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 | |
4775 | echo "${ECHO_T}$ac_cv_sizeof_int" >&6 | |
4776 | cat >>confdefs.h <<_ACEOF | |
4777 | #define SIZEOF_INT $ac_cv_sizeof_int | |
4778 | _ACEOF | |
4779 | ||
4780 | ||
4781 | echo "$as_me:$LINENO: checking for long" >&5 | |
4782 | echo $ECHO_N "checking for long... $ECHO_C" >&6 | |
4783 | if test "${ac_cv_type_long+set}" = set; then | |
4784 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4785 | else | |
4786 | cat >conftest.$ac_ext <<_ACEOF | |
4787 | /* confdefs.h. */ | |
4788 | _ACEOF | |
4789 | cat confdefs.h >>conftest.$ac_ext | |
4790 | cat >>conftest.$ac_ext <<_ACEOF | |
4791 | /* end confdefs.h. */ | |
4792 | $ac_includes_default | |
4793 | int | |
4794 | main () | |
4795 | { | |
4796 | if ((long *) 0) | |
4797 | return 0; | |
4798 | if (sizeof (long)) | |
4799 | return 0; | |
4800 | ; | |
4801 | return 0; | |
4802 | } | |
4803 | _ACEOF | |
4804 | rm -f conftest.$ac_objext | |
4805 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4806 | (eval $ac_compile) 2>conftest.er1 | |
4807 | ac_status=$? | |
4808 | grep -v '^ *+' conftest.er1 >conftest.err | |
4809 | rm -f conftest.er1 | |
4810 | cat conftest.err >&5 | |
4811 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4812 | (exit $ac_status); } && | |
b095fe2c | 4813 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4814 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4815 | (eval $ac_try) 2>&5 | |
4816 | ac_status=$? | |
4817 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4818 | (exit $ac_status); }; } && | |
4819 | { ac_try='test -s conftest.$ac_objext' | |
4820 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4821 | (eval $ac_try) 2>&5 | |
4822 | ac_status=$? | |
4823 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4824 | (exit $ac_status); }; }; then | |
4825 | ac_cv_type_long=yes | |
4826 | else | |
4827 | echo "$as_me: failed program was:" >&5 | |
4828 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4829 | ||
4830 | ac_cv_type_long=no | |
4831 | fi | |
4832 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4833 | fi | |
4834 | echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 | |
4835 | echo "${ECHO_T}$ac_cv_type_long" >&6 | |
4836 | ||
4837 | echo "$as_me:$LINENO: checking size of long" >&5 | |
4838 | echo $ECHO_N "checking size of long... $ECHO_C" >&6 | |
4839 | if test "${ac_cv_sizeof_long+set}" = set; then | |
4840 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4841 | else | |
4842 | if test "$ac_cv_type_long" = yes; then | |
4843 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4844 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4845 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4846 | # This bug is HP SR number 8606223364. | |
4847 | if test "$cross_compiling" = yes; then | |
4848 | # Depending upon the size, compute the lo and hi bounds. | |
4849 | cat >conftest.$ac_ext <<_ACEOF | |
4850 | /* confdefs.h. */ | |
4851 | _ACEOF | |
4852 | cat confdefs.h >>conftest.$ac_ext | |
4853 | cat >>conftest.$ac_ext <<_ACEOF | |
4854 | /* end confdefs.h. */ | |
4855 | $ac_includes_default | |
4856 | int | |
4857 | main () | |
4858 | { | |
4859 | static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; | |
4860 | test_array [0] = 0 | |
4861 | ||
4862 | ; | |
4863 | return 0; | |
4864 | } | |
4865 | _ACEOF | |
4866 | rm -f conftest.$ac_objext | |
4867 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4868 | (eval $ac_compile) 2>conftest.er1 | |
4869 | ac_status=$? | |
4870 | grep -v '^ *+' conftest.er1 >conftest.err | |
4871 | rm -f conftest.er1 | |
4872 | cat conftest.err >&5 | |
4873 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4874 | (exit $ac_status); } && | |
b095fe2c | 4875 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4876 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4877 | (eval $ac_try) 2>&5 | |
4878 | ac_status=$? | |
4879 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4880 | (exit $ac_status); }; } && | |
4881 | { ac_try='test -s conftest.$ac_objext' | |
4882 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4883 | (eval $ac_try) 2>&5 | |
4884 | ac_status=$? | |
4885 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4886 | (exit $ac_status); }; }; then | |
4887 | ac_lo=0 ac_mid=0 | |
4888 | while :; do | |
4889 | cat >conftest.$ac_ext <<_ACEOF | |
4890 | /* confdefs.h. */ | |
4891 | _ACEOF | |
4892 | cat confdefs.h >>conftest.$ac_ext | |
4893 | cat >>conftest.$ac_ext <<_ACEOF | |
4894 | /* end confdefs.h. */ | |
4895 | $ac_includes_default | |
4896 | int | |
4897 | main () | |
4898 | { | |
4899 | static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; | |
4900 | test_array [0] = 0 | |
4901 | ||
4902 | ; | |
4903 | return 0; | |
4904 | } | |
4905 | _ACEOF | |
4906 | rm -f conftest.$ac_objext | |
4907 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4908 | (eval $ac_compile) 2>conftest.er1 | |
4909 | ac_status=$? | |
4910 | grep -v '^ *+' conftest.er1 >conftest.err | |
4911 | rm -f conftest.er1 | |
4912 | cat conftest.err >&5 | |
4913 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4914 | (exit $ac_status); } && | |
b095fe2c | 4915 | { ac_try='test -z "$ac_c_werror_flag" || 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_hi=$ac_mid; break | |
4928 | else | |
4929 | echo "$as_me: failed program was:" >&5 | |
4930 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4931 | ||
4932 | ac_lo=`expr $ac_mid + 1` | |
4933 | if test $ac_lo -le $ac_mid; then | |
4934 | ac_lo= ac_hi= | |
4935 | break | |
4936 | fi | |
4937 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
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 | cat >conftest.$ac_ext <<_ACEOF | |
4946 | /* confdefs.h. */ | |
4947 | _ACEOF | |
4948 | cat confdefs.h >>conftest.$ac_ext | |
4949 | cat >>conftest.$ac_ext <<_ACEOF | |
4950 | /* end confdefs.h. */ | |
4951 | $ac_includes_default | |
4952 | int | |
4953 | main () | |
4954 | { | |
4955 | static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; | |
4956 | test_array [0] = 0 | |
4957 | ||
4958 | ; | |
4959 | return 0; | |
4960 | } | |
4961 | _ACEOF | |
4962 | rm -f conftest.$ac_objext | |
4963 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4964 | (eval $ac_compile) 2>conftest.er1 | |
4965 | ac_status=$? | |
4966 | grep -v '^ *+' conftest.er1 >conftest.err | |
4967 | rm -f conftest.er1 | |
4968 | cat conftest.err >&5 | |
4969 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4970 | (exit $ac_status); } && | |
b095fe2c | 4971 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4972 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4973 | (eval $ac_try) 2>&5 | |
4974 | ac_status=$? | |
4975 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4976 | (exit $ac_status); }; } && | |
4977 | { ac_try='test -s conftest.$ac_objext' | |
4978 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4979 | (eval $ac_try) 2>&5 | |
4980 | ac_status=$? | |
4981 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4982 | (exit $ac_status); }; }; then | |
4983 | ac_hi=-1 ac_mid=-1 | |
4984 | while :; do | |
4985 | cat >conftest.$ac_ext <<_ACEOF | |
4986 | /* confdefs.h. */ | |
4987 | _ACEOF | |
4988 | cat confdefs.h >>conftest.$ac_ext | |
4989 | cat >>conftest.$ac_ext <<_ACEOF | |
4990 | /* end confdefs.h. */ | |
4991 | $ac_includes_default | |
4992 | int | |
4993 | main () | |
4994 | { | |
4995 | static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; | |
4996 | test_array [0] = 0 | |
4997 | ||
4998 | ; | |
4999 | return 0; | |
5000 | } | |
5001 | _ACEOF | |
5002 | rm -f conftest.$ac_objext | |
5003 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5004 | (eval $ac_compile) 2>conftest.er1 | |
5005 | ac_status=$? | |
5006 | grep -v '^ *+' conftest.er1 >conftest.err | |
5007 | rm -f conftest.er1 | |
5008 | cat conftest.err >&5 | |
5009 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5010 | (exit $ac_status); } && | |
b095fe2c | 5011 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
5012 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5013 | (eval $ac_try) 2>&5 | |
5014 | ac_status=$? | |
5015 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5016 | (exit $ac_status); }; } && | |
5017 | { ac_try='test -s conftest.$ac_objext' | |
5018 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5019 | (eval $ac_try) 2>&5 | |
5020 | ac_status=$? | |
5021 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5022 | (exit $ac_status); }; }; then | |
5023 | ac_lo=$ac_mid; break | |
5024 | else | |
5025 | echo "$as_me: failed program was:" >&5 | |
5026 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5027 | ||
5028 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
5029 | if test $ac_mid -le $ac_hi; then | |
5030 | ac_lo= ac_hi= | |
5031 | break | |
5032 | fi | |
5033 | ac_mid=`expr 2 '*' $ac_mid` | |
5034 | fi | |
5035 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5036 | done | |
5037 | else | |
5038 | echo "$as_me: failed program was:" >&5 | |
5039 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5040 | ||
5041 | ac_lo= ac_hi= | |
5042 | fi | |
5043 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5044 | fi | |
5045 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5046 | # Binary search between lo and hi bounds. | |
5047 | while test "x$ac_lo" != "x$ac_hi"; do | |
5048 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
5049 | cat >conftest.$ac_ext <<_ACEOF | |
5050 | /* confdefs.h. */ | |
5051 | _ACEOF | |
5052 | cat confdefs.h >>conftest.$ac_ext | |
5053 | cat >>conftest.$ac_ext <<_ACEOF | |
5054 | /* end confdefs.h. */ | |
5055 | $ac_includes_default | |
5056 | int | |
5057 | main () | |
5058 | { | |
5059 | static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; | |
5060 | test_array [0] = 0 | |
5061 | ||
5062 | ; | |
5063 | return 0; | |
5064 | } | |
5065 | _ACEOF | |
5066 | rm -f conftest.$ac_objext | |
5067 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5068 | (eval $ac_compile) 2>conftest.er1 | |
5069 | ac_status=$? | |
5070 | grep -v '^ *+' conftest.er1 >conftest.err | |
5071 | rm -f conftest.er1 | |
5072 | cat conftest.err >&5 | |
5073 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5074 | (exit $ac_status); } && | |
b095fe2c | 5075 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
5076 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5077 | (eval $ac_try) 2>&5 | |
5078 | ac_status=$? | |
5079 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5080 | (exit $ac_status); }; } && | |
5081 | { ac_try='test -s conftest.$ac_objext' | |
5082 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5083 | (eval $ac_try) 2>&5 | |
5084 | ac_status=$? | |
5085 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5086 | (exit $ac_status); }; }; then | |
5087 | ac_hi=$ac_mid | |
5088 | else | |
5089 | echo "$as_me: failed program was:" >&5 | |
5090 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5091 | ||
5092 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
5093 | fi | |
5094 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5095 | done | |
5096 | case $ac_lo in | |
5097 | ?*) ac_cv_sizeof_long=$ac_lo;; | |
5098 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 | |
5099 | See \`config.log' for more details." >&5 | |
5100 | echo "$as_me: error: cannot compute sizeof (long), 77 | |
5101 | See \`config.log' for more details." >&2;} | |
5102 | { (exit 1); exit 1; }; } ;; | |
5103 | esac | |
5104 | else | |
5105 | if test "$cross_compiling" = yes; then | |
b095fe2c DJ |
5106 | { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 |
5107 | echo "$as_me: error: internal error: not reached in cross-compile" >&2;} | |
bf3b7cd3 JD |
5108 | { (exit 1); exit 1; }; } |
5109 | else | |
5110 | cat >conftest.$ac_ext <<_ACEOF | |
5111 | /* confdefs.h. */ | |
5112 | _ACEOF | |
5113 | cat confdefs.h >>conftest.$ac_ext | |
5114 | cat >>conftest.$ac_ext <<_ACEOF | |
5115 | /* end confdefs.h. */ | |
5116 | $ac_includes_default | |
5117 | long longval () { return (long) (sizeof (long)); } | |
5118 | unsigned long ulongval () { return (long) (sizeof (long)); } | |
5119 | #include <stdio.h> | |
5120 | #include <stdlib.h> | |
5121 | int | |
5122 | main () | |
5123 | { | |
5124 | ||
5125 | FILE *f = fopen ("conftest.val", "w"); | |
5126 | if (! f) | |
5127 | exit (1); | |
5128 | if (((long) (sizeof (long))) < 0) | |
5129 | { | |
5130 | long i = longval (); | |
5131 | if (i != ((long) (sizeof (long)))) | |
5132 | exit (1); | |
5133 | fprintf (f, "%ld\n", i); | |
5134 | } | |
5135 | else | |
5136 | { | |
5137 | unsigned long i = ulongval (); | |
5138 | if (i != ((long) (sizeof (long)))) | |
5139 | exit (1); | |
5140 | fprintf (f, "%lu\n", i); | |
5141 | } | |
5142 | exit (ferror (f) || fclose (f) != 0); | |
5143 | ||
5144 | ; | |
5145 | return 0; | |
5146 | } | |
5147 | _ACEOF | |
5148 | rm -f conftest$ac_exeext | |
5149 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5150 | (eval $ac_link) 2>&5 | |
5151 | ac_status=$? | |
5152 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5153 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5154 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5155 | (eval $ac_try) 2>&5 | |
5156 | ac_status=$? | |
5157 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5158 | (exit $ac_status); }; }; then | |
5159 | ac_cv_sizeof_long=`cat conftest.val` | |
5160 | else | |
5161 | echo "$as_me: program exited with status $ac_status" >&5 | |
5162 | echo "$as_me: failed program was:" >&5 | |
5163 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5164 | ||
5165 | ( exit $ac_status ) | |
5166 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 | |
5167 | See \`config.log' for more details." >&5 | |
5168 | echo "$as_me: error: cannot compute sizeof (long), 77 | |
5169 | See \`config.log' for more details." >&2;} | |
5170 | { (exit 1); exit 1; }; } | |
5171 | fi | |
5172 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
5173 | fi | |
5174 | fi | |
5175 | rm -f conftest.val | |
5176 | else | |
5177 | ac_cv_sizeof_long=0 | |
5178 | fi | |
5179 | fi | |
5180 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 | |
5181 | echo "${ECHO_T}$ac_cv_sizeof_long" >&6 | |
5182 | cat >>confdefs.h <<_ACEOF | |
5183 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5184 | _ACEOF | |
5185 | ||
5186 | ||
5187 | if test $ac_cv_c_long_long = yes; then | |
5188 | echo "$as_me:$LINENO: checking for long long" >&5 | |
5189 | echo $ECHO_N "checking for long long... $ECHO_C" >&6 | |
5190 | if test "${ac_cv_type_long_long+set}" = set; then | |
5191 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5192 | else | |
5193 | cat >conftest.$ac_ext <<_ACEOF | |
5194 | /* confdefs.h. */ | |
5195 | _ACEOF | |
5196 | cat confdefs.h >>conftest.$ac_ext | |
5197 | cat >>conftest.$ac_ext <<_ACEOF | |
5198 | /* end confdefs.h. */ | |
5199 | $ac_includes_default | |
5200 | int | |
5201 | main () | |
5202 | { | |
5203 | if ((long long *) 0) | |
5204 | return 0; | |
5205 | if (sizeof (long long)) | |
5206 | return 0; | |
5207 | ; | |
5208 | return 0; | |
5209 | } | |
5210 | _ACEOF | |
5211 | rm -f conftest.$ac_objext | |
5212 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5213 | (eval $ac_compile) 2>conftest.er1 | |
5214 | ac_status=$? | |
5215 | grep -v '^ *+' conftest.er1 >conftest.err | |
5216 | rm -f conftest.er1 | |
5217 | cat conftest.err >&5 | |
5218 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5219 | (exit $ac_status); } && | |
b095fe2c | 5220 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
5221 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5222 | (eval $ac_try) 2>&5 | |
5223 | ac_status=$? | |
5224 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5225 | (exit $ac_status); }; } && | |
5226 | { ac_try='test -s conftest.$ac_objext' | |
5227 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5228 | (eval $ac_try) 2>&5 | |
5229 | ac_status=$? | |
5230 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5231 | (exit $ac_status); }; }; then | |
5232 | ac_cv_type_long_long=yes | |
5233 | else | |
5234 | echo "$as_me: failed program was:" >&5 | |
5235 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5236 | ||
5237 | ac_cv_type_long_long=no | |
5238 | fi | |
5239 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5240 | fi | |
5241 | echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 | |
5242 | echo "${ECHO_T}$ac_cv_type_long_long" >&6 | |
5243 | ||
5244 | echo "$as_me:$LINENO: checking size of long long" >&5 | |
5245 | echo $ECHO_N "checking size of long long... $ECHO_C" >&6 | |
5246 | if test "${ac_cv_sizeof_long_long+set}" = set; then | |
5247 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5248 | else | |
5249 | if test "$ac_cv_type_long_long" = yes; then | |
5250 | # The cast to unsigned long works around a bug in the HP C Compiler | |
5251 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5252 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5253 | # This bug is HP SR number 8606223364. | |
5254 | if test "$cross_compiling" = yes; then | |
5255 | # Depending upon the size, compute the lo and hi bounds. | |
5256 | cat >conftest.$ac_ext <<_ACEOF | |
5257 | /* confdefs.h. */ | |
5258 | _ACEOF | |
5259 | cat confdefs.h >>conftest.$ac_ext | |
5260 | cat >>conftest.$ac_ext <<_ACEOF | |
5261 | /* end confdefs.h. */ | |
5262 | $ac_includes_default | |
5263 | int | |
5264 | main () | |
5265 | { | |
5266 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; | |
5267 | test_array [0] = 0 | |
5268 | ||
5269 | ; | |
5270 | return 0; | |
5271 | } | |
5272 | _ACEOF | |
5273 | rm -f conftest.$ac_objext | |
5274 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5275 | (eval $ac_compile) 2>conftest.er1 | |
5276 | ac_status=$? | |
5277 | grep -v '^ *+' conftest.er1 >conftest.err | |
5278 | rm -f conftest.er1 | |
5279 | cat conftest.err >&5 | |
5280 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5281 | (exit $ac_status); } && | |
b095fe2c | 5282 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
5283 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5284 | (eval $ac_try) 2>&5 | |
5285 | ac_status=$? | |
5286 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5287 | (exit $ac_status); }; } && | |
5288 | { ac_try='test -s conftest.$ac_objext' | |
5289 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5290 | (eval $ac_try) 2>&5 | |
5291 | ac_status=$? | |
5292 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5293 | (exit $ac_status); }; }; then | |
5294 | ac_lo=0 ac_mid=0 | |
5295 | while :; do | |
5296 | cat >conftest.$ac_ext <<_ACEOF | |
5297 | /* confdefs.h. */ | |
5298 | _ACEOF | |
5299 | cat confdefs.h >>conftest.$ac_ext | |
5300 | cat >>conftest.$ac_ext <<_ACEOF | |
5301 | /* end confdefs.h. */ | |
5302 | $ac_includes_default | |
5303 | int | |
5304 | main () | |
5305 | { | |
5306 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; | |
5307 | test_array [0] = 0 | |
5308 | ||
5309 | ; | |
5310 | return 0; | |
5311 | } | |
5312 | _ACEOF | |
5313 | rm -f conftest.$ac_objext | |
5314 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5315 | (eval $ac_compile) 2>conftest.er1 | |
5316 | ac_status=$? | |
5317 | grep -v '^ *+' conftest.er1 >conftest.err | |
5318 | rm -f conftest.er1 | |
5319 | cat conftest.err >&5 | |
5320 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5321 | (exit $ac_status); } && | |
b095fe2c | 5322 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
5323 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5324 | (eval $ac_try) 2>&5 | |
5325 | ac_status=$? | |
5326 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5327 | (exit $ac_status); }; } && | |
5328 | { ac_try='test -s conftest.$ac_objext' | |
5329 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5330 | (eval $ac_try) 2>&5 | |
5331 | ac_status=$? | |
5332 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5333 | (exit $ac_status); }; }; then | |
5334 | ac_hi=$ac_mid; break | |
5335 | else | |
5336 | echo "$as_me: failed program was:" >&5 | |
5337 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5338 | ||
5339 | ac_lo=`expr $ac_mid + 1` | |
5340 | if test $ac_lo -le $ac_mid; then | |
5341 | ac_lo= ac_hi= | |
5342 | break | |
5343 | fi | |
5344 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
5345 | fi | |
5346 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5347 | done | |
5348 | else | |
5349 | echo "$as_me: failed program was:" >&5 | |
5350 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5351 | ||
5352 | cat >conftest.$ac_ext <<_ACEOF | |
5353 | /* confdefs.h. */ | |
5354 | _ACEOF | |
5355 | cat confdefs.h >>conftest.$ac_ext | |
5356 | cat >>conftest.$ac_ext <<_ACEOF | |
5357 | /* end confdefs.h. */ | |
5358 | $ac_includes_default | |
5359 | int | |
5360 | main () | |
5361 | { | |
5362 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)]; | |
5363 | test_array [0] = 0 | |
5364 | ||
5365 | ; | |
5366 | return 0; | |
5367 | } | |
5368 | _ACEOF | |
5369 | rm -f conftest.$ac_objext | |
5370 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5371 | (eval $ac_compile) 2>conftest.er1 | |
5372 | ac_status=$? | |
5373 | grep -v '^ *+' conftest.er1 >conftest.err | |
5374 | rm -f conftest.er1 | |
5375 | cat conftest.err >&5 | |
5376 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5377 | (exit $ac_status); } && | |
b095fe2c | 5378 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
5379 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5380 | (eval $ac_try) 2>&5 | |
5381 | ac_status=$? | |
5382 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5383 | (exit $ac_status); }; } && | |
5384 | { ac_try='test -s conftest.$ac_objext' | |
5385 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5386 | (eval $ac_try) 2>&5 | |
5387 | ac_status=$? | |
5388 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5389 | (exit $ac_status); }; }; then | |
5390 | ac_hi=-1 ac_mid=-1 | |
5391 | while :; do | |
5392 | cat >conftest.$ac_ext <<_ACEOF | |
5393 | /* confdefs.h. */ | |
5394 | _ACEOF | |
5395 | cat confdefs.h >>conftest.$ac_ext | |
5396 | cat >>conftest.$ac_ext <<_ACEOF | |
5397 | /* end confdefs.h. */ | |
5398 | $ac_includes_default | |
5399 | int | |
5400 | main () | |
5401 | { | |
5402 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; | |
5403 | test_array [0] = 0 | |
5404 | ||
5405 | ; | |
5406 | return 0; | |
5407 | } | |
5408 | _ACEOF | |
5409 | rm -f conftest.$ac_objext | |
5410 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5411 | (eval $ac_compile) 2>conftest.er1 | |
5412 | ac_status=$? | |
5413 | grep -v '^ *+' conftest.er1 >conftest.err | |
5414 | rm -f conftest.er1 | |
5415 | cat conftest.err >&5 | |
5416 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5417 | (exit $ac_status); } && | |
b095fe2c | 5418 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
5419 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5420 | (eval $ac_try) 2>&5 | |
5421 | ac_status=$? | |
5422 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5423 | (exit $ac_status); }; } && | |
5424 | { ac_try='test -s conftest.$ac_objext' | |
5425 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5426 | (eval $ac_try) 2>&5 | |
5427 | ac_status=$? | |
5428 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5429 | (exit $ac_status); }; }; then | |
5430 | ac_lo=$ac_mid; break | |
5431 | else | |
5432 | echo "$as_me: failed program was:" >&5 | |
5433 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5434 | ||
5435 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
5436 | if test $ac_mid -le $ac_hi; then | |
5437 | ac_lo= ac_hi= | |
5438 | break | |
5439 | fi | |
5440 | ac_mid=`expr 2 '*' $ac_mid` | |
5441 | fi | |
5442 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5443 | done | |
5444 | else | |
5445 | echo "$as_me: failed program was:" >&5 | |
5446 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5447 | ||
5448 | ac_lo= ac_hi= | |
5449 | fi | |
5450 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5451 | fi | |
5452 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5453 | # Binary search between lo and hi bounds. | |
5454 | while test "x$ac_lo" != "x$ac_hi"; do | |
5455 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
5456 | cat >conftest.$ac_ext <<_ACEOF | |
5457 | /* confdefs.h. */ | |
5458 | _ACEOF | |
5459 | cat confdefs.h >>conftest.$ac_ext | |
5460 | cat >>conftest.$ac_ext <<_ACEOF | |
5461 | /* end confdefs.h. */ | |
5462 | $ac_includes_default | |
5463 | int | |
5464 | main () | |
5465 | { | |
5466 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; | |
5467 | test_array [0] = 0 | |
5468 | ||
5469 | ; | |
5470 | return 0; | |
5471 | } | |
5472 | _ACEOF | |
5473 | rm -f conftest.$ac_objext | |
5474 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5475 | (eval $ac_compile) 2>conftest.er1 | |
5476 | ac_status=$? | |
5477 | grep -v '^ *+' conftest.er1 >conftest.err | |
5478 | rm -f conftest.er1 | |
5479 | cat conftest.err >&5 | |
5480 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5481 | (exit $ac_status); } && | |
b095fe2c | 5482 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
5483 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5484 | (eval $ac_try) 2>&5 | |
5485 | ac_status=$? | |
5486 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5487 | (exit $ac_status); }; } && | |
5488 | { ac_try='test -s conftest.$ac_objext' | |
5489 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5490 | (eval $ac_try) 2>&5 | |
5491 | ac_status=$? | |
5492 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5493 | (exit $ac_status); }; }; then | |
5494 | ac_hi=$ac_mid | |
5495 | else | |
5496 | echo "$as_me: failed program was:" >&5 | |
5497 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5498 | ||
5499 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
5500 | fi | |
5501 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5502 | done | |
5503 | case $ac_lo in | |
5504 | ?*) ac_cv_sizeof_long_long=$ac_lo;; | |
5505 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 | |
5506 | See \`config.log' for more details." >&5 | |
5507 | echo "$as_me: error: cannot compute sizeof (long long), 77 | |
5508 | See \`config.log' for more details." >&2;} | |
5509 | { (exit 1); exit 1; }; } ;; | |
5510 | esac | |
5511 | else | |
5512 | if test "$cross_compiling" = yes; then | |
b095fe2c DJ |
5513 | { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 |
5514 | echo "$as_me: error: internal error: not reached in cross-compile" >&2;} | |
bf3b7cd3 JD |
5515 | { (exit 1); exit 1; }; } |
5516 | else | |
5517 | cat >conftest.$ac_ext <<_ACEOF | |
5518 | /* confdefs.h. */ | |
5519 | _ACEOF | |
5520 | cat confdefs.h >>conftest.$ac_ext | |
5521 | cat >>conftest.$ac_ext <<_ACEOF | |
5522 | /* end confdefs.h. */ | |
5523 | $ac_includes_default | |
5524 | long longval () { return (long) (sizeof (long long)); } | |
5525 | unsigned long ulongval () { return (long) (sizeof (long long)); } | |
5526 | #include <stdio.h> | |
5527 | #include <stdlib.h> | |
5528 | int | |
5529 | main () | |
5530 | { | |
5531 | ||
5532 | FILE *f = fopen ("conftest.val", "w"); | |
5533 | if (! f) | |
5534 | exit (1); | |
5535 | if (((long) (sizeof (long long))) < 0) | |
5536 | { | |
5537 | long i = longval (); | |
5538 | if (i != ((long) (sizeof (long long)))) | |
5539 | exit (1); | |
5540 | fprintf (f, "%ld\n", i); | |
5541 | } | |
5542 | else | |
5543 | { | |
5544 | unsigned long i = ulongval (); | |
5545 | if (i != ((long) (sizeof (long long)))) | |
5546 | exit (1); | |
5547 | fprintf (f, "%lu\n", i); | |
5548 | } | |
5549 | exit (ferror (f) || fclose (f) != 0); | |
5550 | ||
5551 | ; | |
5552 | return 0; | |
5553 | } | |
5554 | _ACEOF | |
5555 | rm -f conftest$ac_exeext | |
5556 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5557 | (eval $ac_link) 2>&5 | |
5558 | ac_status=$? | |
5559 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5560 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5561 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5562 | (eval $ac_try) 2>&5 | |
5563 | ac_status=$? | |
5564 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5565 | (exit $ac_status); }; }; then | |
5566 | ac_cv_sizeof_long_long=`cat conftest.val` | |
5567 | else | |
5568 | echo "$as_me: program exited with status $ac_status" >&5 | |
5569 | echo "$as_me: failed program was:" >&5 | |
5570 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5571 | ||
5572 | ( exit $ac_status ) | |
5573 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 | |
5574 | See \`config.log' for more details." >&5 | |
5575 | echo "$as_me: error: cannot compute sizeof (long long), 77 | |
5576 | See \`config.log' for more details." >&2;} | |
5577 | { (exit 1); exit 1; }; } | |
5578 | fi | |
5579 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
5580 | fi | |
5581 | fi | |
5582 | rm -f conftest.val | |
5583 | else | |
5584 | ac_cv_sizeof_long_long=0 | |
5585 | fi | |
5586 | fi | |
5587 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 | |
5588 | echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 | |
5589 | cat >>confdefs.h <<_ACEOF | |
5590 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
5591 | _ACEOF | |
5592 | ||
5593 | ||
5594 | fi | |
5595 | if test $ac_cv_c___int64 = yes; then | |
5596 | echo "$as_me:$LINENO: checking for __int64" >&5 | |
5597 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 | |
5598 | if test "${ac_cv_type___int64+set}" = set; then | |
5599 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5600 | else | |
ba479fd2 | 5601 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5602 | /* confdefs.h. */ |
5603 | _ACEOF | |
5604 | cat confdefs.h >>conftest.$ac_ext | |
5605 | cat >>conftest.$ac_ext <<_ACEOF | |
5606 | /* end confdefs.h. */ | |
bf3b7cd3 | 5607 | $ac_includes_default |
ba479fd2 NN |
5608 | int |
5609 | main () | |
5610 | { | |
bf3b7cd3 JD |
5611 | if ((__int64 *) 0) |
5612 | return 0; | |
5613 | if (sizeof (__int64)) | |
5614 | return 0; | |
ba479fd2 NN |
5615 | ; |
5616 | return 0; | |
5617 | } | |
5618 | _ACEOF | |
5619 | rm -f conftest.$ac_objext | |
5620 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5621 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5622 | ac_status=$? |
86da66b5 HPN |
5623 | grep -v '^ *+' conftest.er1 >conftest.err |
5624 | rm -f conftest.er1 | |
5625 | cat conftest.err >&5 | |
ba479fd2 NN |
5626 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5627 | (exit $ac_status); } && | |
b095fe2c | 5628 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5629 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5630 | (eval $ac_try) 2>&5 | |
5631 | ac_status=$? | |
5632 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5633 | (exit $ac_status); }; } && | |
5634 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5635 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5636 | (eval $ac_try) 2>&5 | |
5637 | ac_status=$? | |
5638 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5639 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5640 | ac_cv_type___int64=yes |
75b6f3fd | 5641 | else |
ba479fd2 NN |
5642 | echo "$as_me: failed program was:" >&5 |
5643 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5644 | ||
bf3b7cd3 | 5645 | ac_cv_type___int64=no |
75b6f3fd | 5646 | fi |
86da66b5 | 5647 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75b6f3fd | 5648 | fi |
bf3b7cd3 JD |
5649 | echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 |
5650 | echo "${ECHO_T}$ac_cv_type___int64" >&6 | |
75b6f3fd | 5651 | |
bf3b7cd3 JD |
5652 | echo "$as_me:$LINENO: checking size of __int64" >&5 |
5653 | echo $ECHO_N "checking size of __int64... $ECHO_C" >&6 | |
5654 | if test "${ac_cv_sizeof___int64+set}" = set; then | |
ba479fd2 | 5655 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
414d23ae | 5656 | else |
bf3b7cd3 JD |
5657 | if test "$ac_cv_type___int64" = yes; then |
5658 | # The cast to unsigned long works around a bug in the HP C Compiler | |
5659 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5660 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5661 | # This bug is HP SR number 8606223364. | |
5662 | if test "$cross_compiling" = yes; then | |
5663 | # Depending upon the size, compute the lo and hi bounds. | |
5664 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5665 | /* confdefs.h. */ |
5666 | _ACEOF | |
5667 | cat confdefs.h >>conftest.$ac_ext | |
5668 | cat >>conftest.$ac_ext <<_ACEOF | |
5669 | /* end confdefs.h. */ | |
bf3b7cd3 | 5670 | $ac_includes_default |
ba479fd2 NN |
5671 | int |
5672 | main () | |
5673 | { | |
bf3b7cd3 JD |
5674 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)]; |
5675 | test_array [0] = 0 | |
5676 | ||
ba479fd2 NN |
5677 | ; |
5678 | return 0; | |
5679 | } | |
5680 | _ACEOF | |
5681 | rm -f conftest.$ac_objext | |
5682 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5683 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5684 | ac_status=$? |
86da66b5 HPN |
5685 | grep -v '^ *+' conftest.er1 >conftest.err |
5686 | rm -f conftest.er1 | |
5687 | cat conftest.err >&5 | |
ba479fd2 NN |
5688 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5689 | (exit $ac_status); } && | |
b095fe2c | 5690 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5691 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5692 | (eval $ac_try) 2>&5 | |
5693 | ac_status=$? | |
5694 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5695 | (exit $ac_status); }; } && | |
5696 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5697 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5698 | (eval $ac_try) 2>&5 | |
5699 | ac_status=$? | |
5700 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5701 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5702 | ac_lo=0 ac_mid=0 |
5703 | while :; do | |
5704 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5705 | /* confdefs.h. */ |
5706 | _ACEOF | |
5707 | cat confdefs.h >>conftest.$ac_ext | |
5708 | cat >>conftest.$ac_ext <<_ACEOF | |
5709 | /* end confdefs.h. */ | |
bf3b7cd3 | 5710 | $ac_includes_default |
ba479fd2 NN |
5711 | int |
5712 | main () | |
5713 | { | |
bf3b7cd3 JD |
5714 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; |
5715 | test_array [0] = 0 | |
5716 | ||
ba479fd2 NN |
5717 | ; |
5718 | return 0; | |
5719 | } | |
5720 | _ACEOF | |
5721 | rm -f conftest.$ac_objext | |
5722 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5723 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5724 | ac_status=$? |
86da66b5 HPN |
5725 | grep -v '^ *+' conftest.er1 >conftest.err |
5726 | rm -f conftest.er1 | |
5727 | cat conftest.err >&5 | |
ba479fd2 NN |
5728 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5729 | (exit $ac_status); } && | |
b095fe2c | 5730 | { ac_try='test -z "$ac_c_werror_flag" || 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 | 5742 | ac_hi=$ac_mid; break |
75e93faa | 5743 | else |
ba479fd2 NN |
5744 | echo "$as_me: failed program was:" >&5 |
5745 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5746 | ||
bf3b7cd3 JD |
5747 | ac_lo=`expr $ac_mid + 1` |
5748 | if test $ac_lo -le $ac_mid; then | |
5749 | ac_lo= ac_hi= | |
5750 | break | |
5751 | fi | |
5752 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
75e93faa | 5753 | fi |
86da66b5 | 5754 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 5755 | done |
75e93faa | 5756 | else |
bf3b7cd3 JD |
5757 | echo "$as_me: failed program was:" >&5 |
5758 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5759 | ||
5760 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5761 | /* confdefs.h. */ |
5762 | _ACEOF | |
5763 | cat confdefs.h >>conftest.$ac_ext | |
5764 | cat >>conftest.$ac_ext <<_ACEOF | |
5765 | /* end confdefs.h. */ | |
bf3b7cd3 | 5766 | $ac_includes_default |
ba479fd2 NN |
5767 | int |
5768 | main () | |
5769 | { | |
bf3b7cd3 JD |
5770 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)]; |
5771 | test_array [0] = 0 | |
5772 | ||
ba479fd2 NN |
5773 | ; |
5774 | return 0; | |
5775 | } | |
5776 | _ACEOF | |
5777 | rm -f conftest.$ac_objext | |
5778 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5779 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5780 | ac_status=$? |
86da66b5 HPN |
5781 | grep -v '^ *+' conftest.er1 >conftest.err |
5782 | rm -f conftest.er1 | |
5783 | cat conftest.err >&5 | |
ba479fd2 NN |
5784 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5785 | (exit $ac_status); } && | |
b095fe2c | 5786 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5787 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5788 | (eval $ac_try) 2>&5 | |
5789 | ac_status=$? | |
5790 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5791 | (exit $ac_status); }; } && | |
5792 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5793 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5794 | (eval $ac_try) 2>&5 | |
5795 | ac_status=$? | |
5796 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5797 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5798 | ac_hi=-1 ac_mid=-1 |
5799 | while :; do | |
5800 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5801 | /* confdefs.h. */ |
5802 | _ACEOF | |
5803 | cat confdefs.h >>conftest.$ac_ext | |
5804 | cat >>conftest.$ac_ext <<_ACEOF | |
5805 | /* end confdefs.h. */ | |
bf3b7cd3 | 5806 | $ac_includes_default |
ba479fd2 NN |
5807 | int |
5808 | main () | |
5809 | { | |
bf3b7cd3 JD |
5810 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)]; |
5811 | test_array [0] = 0 | |
5812 | ||
ba479fd2 NN |
5813 | ; |
5814 | return 0; | |
5815 | } | |
5816 | _ACEOF | |
5817 | rm -f conftest.$ac_objext | |
5818 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5819 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5820 | ac_status=$? |
86da66b5 HPN |
5821 | grep -v '^ *+' conftest.er1 >conftest.err |
5822 | rm -f conftest.er1 | |
5823 | cat conftest.err >&5 | |
ba479fd2 NN |
5824 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5825 | (exit $ac_status); } && | |
b095fe2c | 5826 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5827 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5828 | (eval $ac_try) 2>&5 | |
5829 | ac_status=$? | |
5830 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5831 | (exit $ac_status); }; } && | |
5832 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5833 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5834 | (eval $ac_try) 2>&5 | |
5835 | ac_status=$? | |
5836 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5837 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5838 | ac_lo=$ac_mid; break |
04cabffc | 5839 | else |
ba479fd2 NN |
5840 | echo "$as_me: failed program was:" >&5 |
5841 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5842 | ||
bf3b7cd3 JD |
5843 | ac_hi=`expr '(' $ac_mid ')' - 1` |
5844 | if test $ac_mid -le $ac_hi; then | |
5845 | ac_lo= ac_hi= | |
5846 | break | |
5847 | fi | |
5848 | ac_mid=`expr 2 '*' $ac_mid` | |
04cabffc | 5849 | fi |
86da66b5 | 5850 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5851 | done |
5852 | else | |
5853 | echo "$as_me: failed program was:" >&5 | |
5854 | sed 's/^/| /' conftest.$ac_ext >&5 | |
04cabffc | 5855 | |
bf3b7cd3 | 5856 | ac_lo= ac_hi= |
414d23ae | 5857 | fi |
bf3b7cd3 | 5858 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 5859 | fi |
bf3b7cd3 JD |
5860 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
5861 | # Binary search between lo and hi bounds. | |
5862 | while test "x$ac_lo" != "x$ac_hi"; do | |
5863 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
ba479fd2 | 5864 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5865 | /* confdefs.h. */ |
5866 | _ACEOF | |
5867 | cat confdefs.h >>conftest.$ac_ext | |
5868 | cat >>conftest.$ac_ext <<_ACEOF | |
5869 | /* end confdefs.h. */ | |
bf3b7cd3 | 5870 | $ac_includes_default |
ba479fd2 NN |
5871 | int |
5872 | main () | |
5873 | { | |
bf3b7cd3 JD |
5874 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; |
5875 | test_array [0] = 0 | |
5876 | ||
ba479fd2 NN |
5877 | ; |
5878 | return 0; | |
5879 | } | |
5880 | _ACEOF | |
5881 | rm -f conftest.$ac_objext | |
5882 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5883 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5884 | ac_status=$? |
86da66b5 HPN |
5885 | grep -v '^ *+' conftest.er1 >conftest.err |
5886 | rm -f conftest.er1 | |
5887 | cat conftest.err >&5 | |
ba479fd2 NN |
5888 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5889 | (exit $ac_status); } && | |
b095fe2c | 5890 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5891 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5892 | (eval $ac_try) 2>&5 | |
5893 | ac_status=$? | |
5894 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5895 | (exit $ac_status); }; } && | |
5896 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5897 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5898 | (eval $ac_try) 2>&5 | |
5899 | ac_status=$? | |
5900 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5901 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5902 | ac_hi=$ac_mid |
75e93faa | 5903 | else |
ba479fd2 NN |
5904 | echo "$as_me: failed program was:" >&5 |
5905 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5906 | ||
bf3b7cd3 | 5907 | ac_lo=`expr '(' $ac_mid ')' + 1` |
75e93faa | 5908 | fi |
86da66b5 | 5909 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 5910 | done |
bf3b7cd3 JD |
5911 | case $ac_lo in |
5912 | ?*) ac_cv_sizeof___int64=$ac_lo;; | |
5913 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 | |
5914 | See \`config.log' for more details." >&5 | |
5915 | echo "$as_me: error: cannot compute sizeof (__int64), 77 | |
5916 | See \`config.log' for more details." >&2;} | |
5917 | { (exit 1); exit 1; }; } ;; | |
5918 | esac | |
5919 | else | |
5920 | if test "$cross_compiling" = yes; then | |
b095fe2c DJ |
5921 | { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 |
5922 | echo "$as_me: error: internal error: not reached in cross-compile" >&2;} | |
bf3b7cd3 JD |
5923 | { (exit 1); exit 1; }; } |
5924 | else | |
5925 | cat >conftest.$ac_ext <<_ACEOF | |
5926 | /* confdefs.h. */ | |
5927 | _ACEOF | |
5928 | cat confdefs.h >>conftest.$ac_ext | |
5929 | cat >>conftest.$ac_ext <<_ACEOF | |
5930 | /* end confdefs.h. */ | |
5931 | $ac_includes_default | |
5932 | long longval () { return (long) (sizeof (__int64)); } | |
5933 | unsigned long ulongval () { return (long) (sizeof (__int64)); } | |
5934 | #include <stdio.h> | |
5935 | #include <stdlib.h> | |
5936 | int | |
5937 | main () | |
5938 | { | |
414d23ae | 5939 | |
bf3b7cd3 JD |
5940 | FILE *f = fopen ("conftest.val", "w"); |
5941 | if (! f) | |
5942 | exit (1); | |
5943 | if (((long) (sizeof (__int64))) < 0) | |
5944 | { | |
5945 | long i = longval (); | |
5946 | if (i != ((long) (sizeof (__int64)))) | |
5947 | exit (1); | |
5948 | fprintf (f, "%ld\n", i); | |
5949 | } | |
5950 | else | |
5951 | { | |
5952 | unsigned long i = ulongval (); | |
5953 | if (i != ((long) (sizeof (__int64)))) | |
5954 | exit (1); | |
5955 | fprintf (f, "%lu\n", i); | |
5956 | } | |
5957 | exit (ferror (f) || fclose (f) != 0); | |
5958 | ||
5959 | ; | |
5960 | return 0; | |
5961 | } | |
5962 | _ACEOF | |
5963 | rm -f conftest$ac_exeext | |
5964 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5965 | (eval $ac_link) 2>&5 | |
5966 | ac_status=$? | |
5967 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5968 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5969 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5970 | (eval $ac_try) 2>&5 | |
5971 | ac_status=$? | |
5972 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5973 | (exit $ac_status); }; }; then | |
5974 | ac_cv_sizeof___int64=`cat conftest.val` | |
5975 | else | |
5976 | echo "$as_me: program exited with status $ac_status" >&5 | |
5977 | echo "$as_me: failed program was:" >&5 | |
5978 | sed 's/^/| /' conftest.$ac_ext >&5 | |
75e93faa | 5979 | |
bf3b7cd3 JD |
5980 | ( exit $ac_status ) |
5981 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 | |
5982 | See \`config.log' for more details." >&5 | |
5983 | echo "$as_me: error: cannot compute sizeof (__int64), 77 | |
5984 | See \`config.log' for more details." >&2;} | |
ba479fd2 | 5985 | { (exit 1); exit 1; }; } |
414d23ae | 5986 | fi |
bf3b7cd3 JD |
5987 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
5988 | fi | |
5989 | fi | |
5990 | rm -f conftest.val | |
5991 | else | |
5992 | ac_cv_sizeof___int64=0 | |
5993 | fi | |
5994 | fi | |
ba479fd2 NN |
5995 | echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 |
5996 | echo "${ECHO_T}$ac_cv_sizeof___int64" >&6 | |
ba479fd2 | 5997 | cat >>confdefs.h <<_ACEOF |
414d23ae | 5998 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
ba479fd2 | 5999 | _ACEOF |
414d23ae | 6000 | |
cafe096b | 6001 | |
414d23ae HPN |
6002 | fi |
6003 | ||
34a86c2b NN |
6004 | # --------------------- |
6005 | # Warnings and checking | |
6006 | # --------------------- | |
6007 | ||
b5472e1d NN |
6008 | # Check $CC warning features (if it's GCC). |
6009 | # We want to use -pedantic, but we don't want warnings about | |
6010 | # * 'long long' | |
6011 | # * variadic macros | |
6012 | # So, we only use -pedantic if we can disable those warnings. | |
6013 | ||
6014 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5 | |
6015 | echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6 | |
6016 | if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then | |
6017 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6018 | else | |
6019 | save_CFLAGS="$CFLAGS" | |
6020 | CFLAGS="-Wno-long-long" | |
6021 | cat >conftest.$ac_ext <<_ACEOF | |
6022 | /* confdefs.h. */ | |
6023 | _ACEOF | |
6024 | cat confdefs.h >>conftest.$ac_ext | |
6025 | cat >>conftest.$ac_ext <<_ACEOF | |
6026 | /* end confdefs.h. */ | |
6027 | ||
6028 | _ACEOF | |
6029 | rm -f conftest.$ac_objext | |
6030 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6031 | (eval $ac_compile) 2>conftest.er1 | |
6032 | ac_status=$? | |
6033 | grep -v '^ *+' conftest.er1 >conftest.err | |
6034 | rm -f conftest.er1 | |
6035 | cat conftest.err >&5 | |
6036 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6037 | (exit $ac_status); } && | |
b095fe2c | 6038 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
b5472e1d NN |
6039 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6040 | (eval $ac_try) 2>&5 | |
6041 | ac_status=$? | |
6042 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6043 | (exit $ac_status); }; } && | |
6044 | { ac_try='test -s conftest.$ac_objext' | |
6045 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6046 | (eval $ac_try) 2>&5 | |
6047 | ac_status=$? | |
6048 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6049 | (exit $ac_status); }; }; then | |
6050 | ac_cv_prog_cc_w_no_long_long=yes | |
6051 | else | |
6052 | echo "$as_me: failed program was:" >&5 | |
6053 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6054 | ||
6055 | ac_cv_prog_cc_w_no_long_long=no | |
6056 | fi | |
6057 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6058 | CFLAGS="$save_CFLAGS" | |
6059 | ||
6060 | fi | |
6061 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5 | |
6062 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6 | |
6063 | ||
6064 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5 | |
6065 | echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6 | |
6066 | if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then | |
6067 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6068 | else | |
6069 | save_CFLAGS="$CFLAGS" | |
6070 | CFLAGS="-Wno-variadic-macros" | |
6071 | cat >conftest.$ac_ext <<_ACEOF | |
6072 | /* confdefs.h. */ | |
6073 | _ACEOF | |
6074 | cat confdefs.h >>conftest.$ac_ext | |
6075 | cat >>conftest.$ac_ext <<_ACEOF | |
6076 | /* end confdefs.h. */ | |
6077 | ||
6078 | _ACEOF | |
6079 | rm -f conftest.$ac_objext | |
6080 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6081 | (eval $ac_compile) 2>conftest.er1 | |
6082 | ac_status=$? | |
6083 | grep -v '^ *+' conftest.er1 >conftest.err | |
6084 | rm -f conftest.er1 | |
6085 | cat conftest.err >&5 | |
6086 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6087 | (exit $ac_status); } && | |
b095fe2c | 6088 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
b5472e1d NN |
6089 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6090 | (eval $ac_try) 2>&5 | |
6091 | ac_status=$? | |
6092 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6093 | (exit $ac_status); }; } && | |
6094 | { ac_try='test -s conftest.$ac_objext' | |
6095 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6096 | (eval $ac_try) 2>&5 | |
6097 | ac_status=$? | |
6098 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6099 | (exit $ac_status); }; }; then | |
6100 | ac_cv_prog_cc_w_no_variadic_macros=yes | |
6101 | else | |
6102 | echo "$as_me: failed program was:" >&5 | |
6103 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6104 | ||
6105 | ac_cv_prog_cc_w_no_variadic_macros=no | |
6106 | fi | |
6107 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6108 | CFLAGS="$save_CFLAGS" | |
6109 | ||
6110 | fi | |
6111 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5 | |
6112 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6 | |
6113 | ||
34a86c2b | 6114 | strict1_warn= |
b5472e1d NN |
6115 | if test $ac_cv_prog_cc_w_no_long_long = yes \ |
6116 | && test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then | |
6117 | strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros" | |
34a86c2b NN |
6118 | fi |
6119 | ||
6120 | ||
643d3bd2 NN |
6121 | # Add -Wold-style-definition if it's accepted |
6122 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5 | |
6123 | echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6 | |
6124 | if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then | |
6125 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6126 | else | |
6127 | save_CFLAGS="$CFLAGS" | |
6128 | CFLAGS="-Wold-style-definition" | |
6129 | cat >conftest.$ac_ext <<_ACEOF | |
6130 | /* confdefs.h. */ | |
6131 | _ACEOF | |
6132 | cat confdefs.h >>conftest.$ac_ext | |
6133 | cat >>conftest.$ac_ext <<_ACEOF | |
6134 | /* end confdefs.h. */ | |
6135 | ||
6136 | _ACEOF | |
6137 | rm -f conftest.$ac_objext | |
6138 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6139 | (eval $ac_compile) 2>conftest.er1 | |
6140 | ac_status=$? | |
6141 | grep -v '^ *+' conftest.er1 >conftest.err | |
6142 | rm -f conftest.er1 | |
6143 | cat conftest.err >&5 | |
6144 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6145 | (exit $ac_status); } && | |
b095fe2c | 6146 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
643d3bd2 NN |
6147 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6148 | (eval $ac_try) 2>&5 | |
6149 | ac_status=$? | |
6150 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6151 | (exit $ac_status); }; } && | |
6152 | { ac_try='test -s conftest.$ac_objext' | |
6153 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6154 | (eval $ac_try) 2>&5 | |
6155 | ac_status=$? | |
6156 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6157 | (exit $ac_status); }; }; then | |
6158 | ac_cv_prog_cc_w_old_style_definition=yes | |
6159 | else | |
6160 | echo "$as_me: failed program was:" >&5 | |
6161 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6162 | ||
6163 | ac_cv_prog_cc_w_old_style_definition=no | |
6164 | fi | |
6165 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6166 | CFLAGS="$save_CFLAGS" | |
6167 | ||
6168 | fi | |
6169 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5 | |
6170 | echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6 | |
6171 | if test $ac_cv_prog_cc_w_old_style_definition = yes ; then | |
6172 | strict1_warn="${strict1_warn} -Wold-style-definition" | |
6173 | fi | |
6174 | ||
09a9c095 NN |
6175 | # Enable -Werror, period. |
6176 | # Check whether --enable-werror_always or --disable-werror_always was given. | |
6177 | if test "${enable_werror_always+set}" = set; then | |
6178 | enableval="$enable_werror_always" | |
6179 | ||
6180 | else | |
6181 | enable_werror_always=no | |
6182 | fi; | |
6183 | if test x${enable_werror_always} = xyes ; then | |
6184 | strict1_warn="${strict1_warn} -Werror" | |
6185 | WERROR=-Werror | |
6186 | fi | |
6187 | ||
ba479fd2 | 6188 | # If the native compiler is GCC, we can enable warnings even in stage1. |
414d23ae HPN |
6189 | # That's useful for people building cross-compilers, or just running a |
6190 | # quick `make'. | |
6191 | warn_cflags= | |
6192 | if test "x$GCC" = "xyes"; then | |
6193 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
6194 | fi | |
6195 | ||
6196 | ||
dd859b8a | 6197 | # Enable -Werror in bootstrap stage2 and later. |
dd859b8a KG |
6198 | # Check whether --enable-werror or --disable-werror was given. |
6199 | if test "${enable_werror+set}" = set; then | |
6200 | enableval="$enable_werror" | |
ba479fd2 | 6201 | |
dd859b8a | 6202 | else |
06c37c96 NS |
6203 | if test x$is_release = x ; then |
6204 | # Default to "yes" on development branches. | |
dd859b8a | 6205 | enable_werror=yes |
06c37c96 NS |
6206 | else |
6207 | # Default to "no" on release branches. | |
6208 | enable_werror=no | |
6209 | fi | |
ba479fd2 | 6210 | fi; |
dd859b8a KG |
6211 | if test x$enable_werror = xyes ; then |
6212 | WERROR=-Werror | |
6213 | fi | |
6214 | ||
6215 | ||
414d23ae HPN |
6216 | # Enable expensive internal checks |
6217 | # Check whether --enable-checking or --disable-checking was given. | |
6218 | if test "${enable_checking+set}" = set; then | |
6219 | enableval="$enable_checking" | |
e1bbfc5c NS |
6220 | ac_checking_flags="${enableval}" |
6221 | else | |
6222 | ||
6223 | # Determine the default checks. | |
6224 | if test x$is_release = x ; then | |
6225 | ac_checking_flags=yes | |
6226 | else | |
6227 | ac_checking_flags=release | |
6228 | fi | |
6229 | fi; | |
6230 | ac_assert_checking=1 | |
6231 | ac_checking= | |
414d23ae HPN |
6232 | ac_tree_checking= |
6233 | ac_rtl_checking= | |
6234 | ac_rtlflag_checking= | |
6235 | ac_gc_checking= | |
6236 | ac_gc_always_collect= | |
5dfa45d0 | 6237 | ac_fold_checking= |
e1bbfc5c NS |
6238 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," |
6239 | for check in $ac_checking_flags | |
6240 | do | |
6241 | case $check in | |
6242 | yes) ac_assert_checking=1 ; ac_checking=1 ; | |
6243 | ac_tree_checking=1 ; ac_gc_checking=1 ; | |
6244 | ac_rtlflag_checking=1 ;; | |
6245 | no) ac_assert_checking= ; ac_checking= ; | |
6246 | ac_tree_checking= ; ac_rtl_checking= ; | |
6247 | ac_rtlflag_checking= ; ac_gc_checking= ; | |
6248 | ac_gc_always_collect= ; ac_fold_checking= ;; | |
6249 | all) ac_assert_checking=1 ; ac_checking=1 ; | |
6250 | ac_tree_checking=1 ; ac_rtl_checking=1 ; | |
6251 | ac_rtlflag_checking=1 ; ac_gc_checking=1 ; | |
6252 | ac_gc_always_collect=1 ; ac_fold_checking=1 ;; | |
6253 | release) ac_assert_checking=1 ;; | |
6254 | assert) ac_assert_checking=1 ;; | |
6255 | fold) ac_fold_checking=1 ;; | |
6256 | gc) ac_gc_checking=1 ;; | |
6257 | gcac) ac_gc_always_collect=1 ;; | |
6258 | misc) ac_checking=1 ;; | |
6259 | rtlflag) ac_rtlflag_checking=1 ;; | |
6260 | rtl) ac_rtl_checking=1 ;; | |
6261 | tree) ac_tree_checking=1 ;; | |
6262 | valgrind) ac_checking_valgrind=1 ;; | |
6263 | *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 | |
ba479fd2 NN |
6264 | echo "$as_me: error: unknown check category $check" >&2;} |
6265 | { (exit 1); exit 1; }; } ;; | |
e1bbfc5c NS |
6266 | esac |
6267 | done | |
6268 | IFS="$ac_save_IFS" | |
06c37c96 | 6269 | |
ba479fd2 NN |
6270 | nocommon_flag="" |
6271 | if test x$ac_checking != x ; then | |
6272 | ||
6273 | cat >>confdefs.h <<\_ACEOF | |
6274 | #define ENABLE_CHECKING 1 | |
6275 | _ACEOF | |
6276 | ||
6277 | nocommon_flag=-fno-common | |
6278 | fi | |
6279 | ||
06c37c96 NS |
6280 | if test x$ac_assert_checking != x ; then |
6281 | ||
6282 | cat >>confdefs.h <<\_ACEOF | |
6283 | #define ENABLE_ASSERT_CHECKING 1 | |
6284 | _ACEOF | |
6285 | ||
6286 | fi | |
ba479fd2 NN |
6287 | if test x$ac_tree_checking != x ; then |
6288 | ||
6289 | cat >>confdefs.h <<\_ACEOF | |
6290 | #define ENABLE_TREE_CHECKING 1 | |
6291 | _ACEOF | |
6292 | ||
13f05fd0 | 6293 | TREEBROWSER=tree-browser.o |
ba479fd2 | 6294 | fi |
13f05fd0 | 6295 | |
ba479fd2 NN |
6296 | if test x$ac_rtl_checking != x ; then |
6297 | ||
6298 | cat >>confdefs.h <<\_ACEOF | |
6299 | #define ENABLE_RTL_CHECKING 1 | |
6300 | _ACEOF | |
6301 | ||
6302 | fi | |
6303 | if test x$ac_rtlflag_checking != x ; then | |
6304 | ||
6305 | cat >>confdefs.h <<\_ACEOF | |
6306 | #define ENABLE_RTL_FLAG_CHECKING 1 | |
6307 | _ACEOF | |
6308 | ||
6309 | fi | |
6310 | if test x$ac_gc_checking != x ; then | |
6311 | ||
6312 | cat >>confdefs.h <<\_ACEOF | |
6313 | #define ENABLE_GC_CHECKING 1 | |
6314 | _ACEOF | |
6315 | ||
6316 | fi | |
6317 | if test x$ac_gc_always_collect != x ; then | |
6318 | ||
6319 | cat >>confdefs.h <<\_ACEOF | |
6320 | #define ENABLE_GC_ALWAYS_COLLECT 1 | |
6321 | _ACEOF | |
6322 | ||
6323 | fi | |
6324 | if test x$ac_fold_checking != x ; then | |
6325 | ||
6326 | cat >>confdefs.h <<\_ACEOF | |
6327 | #define ENABLE_FOLD_CHECKING 1 | |
6328 | _ACEOF | |
6329 | ||
6330 | fi | |
6331 | valgrind_path_defines= | |
6332 | valgrind_command= | |
6333 | ||
ba479fd2 NN |
6334 | if test "${ac_cv_header_valgrind_h+set}" = set; then |
6335 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
6336 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
6337 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
6338 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6339 | fi | |
6340 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 | |
6341 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
6342 | else | |
6343 | # Is the header compilable? | |
6344 | echo "$as_me:$LINENO: checking valgrind.h usability" >&5 | |
6345 | echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6 | |
6346 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6347 | /* confdefs.h. */ |
6348 | _ACEOF | |
6349 | cat confdefs.h >>conftest.$ac_ext | |
6350 | cat >>conftest.$ac_ext <<_ACEOF | |
6351 | /* end confdefs.h. */ | |
6352 | $ac_includes_default | |
63cf211a | 6353 | #include <valgrind.h> |
ba479fd2 NN |
6354 | _ACEOF |
6355 | rm -f conftest.$ac_objext | |
6356 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 6357 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 6358 | ac_status=$? |
86da66b5 HPN |
6359 | grep -v '^ *+' conftest.er1 >conftest.err |
6360 | rm -f conftest.er1 | |
6361 | cat conftest.err >&5 | |
ba479fd2 NN |
6362 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6363 | (exit $ac_status); } && | |
b095fe2c | 6364 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6365 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6366 | (eval $ac_try) 2>&5 | |
6367 | ac_status=$? | |
6368 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6369 | (exit $ac_status); }; } && | |
6370 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
6371 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6372 | (eval $ac_try) 2>&5 | |
6373 | ac_status=$? | |
6374 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6375 | (exit $ac_status); }; }; then | |
6376 | ac_header_compiler=yes | |
6377 | else | |
6378 | echo "$as_me: failed program was:" >&5 | |
6379 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6380 | ||
6381 | ac_header_compiler=no | |
6382 | fi | |
86da66b5 | 6383 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
6384 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 |
6385 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
6386 | ||
6387 | # Is the header present? | |
6388 | echo "$as_me:$LINENO: checking valgrind.h presence" >&5 | |
6389 | echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6 | |
6390 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6391 | /* confdefs.h. */ |
6392 | _ACEOF | |
6393 | cat confdefs.h >>conftest.$ac_ext | |
6394 | cat >>conftest.$ac_ext <<_ACEOF | |
6395 | /* end confdefs.h. */ | |
6396 | #include <valgrind.h> | |
6397 | _ACEOF | |
6398 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6399 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6400 | ac_status=$? | |
6401 | grep -v '^ *+' conftest.er1 >conftest.err | |
6402 | rm -f conftest.er1 | |
6403 | cat conftest.err >&5 | |
6404 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6405 | (exit $ac_status); } >/dev/null; then | |
6406 | if test -s conftest.err; then | |
6407 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6408 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6409 | else |
6410 | ac_cpp_err= | |
6411 | fi | |
6412 | else | |
6413 | ac_cpp_err=yes | |
6414 | fi | |
6415 | if test -z "$ac_cpp_err"; then | |
6416 | ac_header_preproc=yes | |
6417 | else | |
6418 | echo "$as_me: failed program was:" >&5 | |
6419 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6420 | ||
6421 | ac_header_preproc=no | |
6422 | fi | |
6423 | rm -f conftest.err conftest.$ac_ext | |
6424 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
6425 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
6426 | ||
6427 | # So? What about this header? | |
86da66b5 HPN |
6428 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in |
6429 | yes:no: ) | |
ba479fd2 NN |
6430 | { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 |
6431 | echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
86da66b5 HPN |
6432 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5 |
6433 | echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;} | |
6434 | ac_header_preproc=yes | |
ba479fd2 | 6435 | ;; |
86da66b5 | 6436 | no:yes:* ) |
ba479fd2 NN |
6437 | { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 |
6438 | echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} | |
86da66b5 HPN |
6439 | { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 |
6440 | echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} | |
6441 | { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5 | |
6442 | echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;} | |
6443 | { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5 | |
6444 | echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;} | |
ba479fd2 NN |
6445 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 |
6446 | echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} | |
86da66b5 HPN |
6447 | { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 |
6448 | echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;} | |
ba479fd2 NN |
6449 | ( |
6450 | cat <<\_ASBOX | |
86da66b5 HPN |
6451 | ## ------------------------------------------ ## |
6452 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
6453 | ## ------------------------------------------ ## | |
ba479fd2 NN |
6454 | _ASBOX |
6455 | ) | | |
6456 | sed "s/^/$as_me: WARNING: /" >&2 | |
6457 | ;; | |
6458 | esac | |
6459 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
6460 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
6461 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
6462 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6463 | else | |
6464 | ac_cv_header_valgrind_h=$ac_header_preproc | |
6938ec6c | 6465 | fi |
ba479fd2 NN |
6466 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 |
6467 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
6468 | ||
6e3f3080 | 6469 | fi |
ba479fd2 | 6470 | if test $ac_cv_header_valgrind_h = yes; then |
6938ec6c NN |
6471 | have_valgrind_h=yes |
6472 | else | |
ba479fd2 | 6473 | have_valgrind_h=no |
6938ec6c NN |
6474 | fi |
6475 | ||
6476 | ||
ba479fd2 | 6477 | |
414d23ae HPN |
6478 | if test x$ac_checking_valgrind != x ; then |
6479 | # It is certainly possible that there's valgrind but no valgrind.h. | |
6480 | # GCC relies on making annotations so we must have both. | |
ba479fd2 NN |
6481 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 |
6482 | echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6 | |
6483 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6484 | /* confdefs.h. */ |
6485 | _ACEOF | |
6486 | cat confdefs.h >>conftest.$ac_ext | |
6487 | cat >>conftest.$ac_ext <<_ACEOF | |
6488 | /* end confdefs.h. */ | |
a207b594 | 6489 | #include <valgrind/memcheck.h> |
14011ca4 AJ |
6490 | #ifndef VALGRIND_DISCARD |
6491 | #error VALGRIND_DISCARD not defined | |
6492 | #endif | |
ba479fd2 NN |
6493 | _ACEOF |
6494 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6495 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6496 | ac_status=$? | |
6497 | grep -v '^ *+' conftest.er1 >conftest.err | |
6498 | rm -f conftest.er1 | |
6499 | cat conftest.err >&5 | |
6500 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6501 | (exit $ac_status); } >/dev/null; then | |
6502 | if test -s conftest.err; then | |
6503 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6504 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6505 | else |
6506 | ac_cpp_err= | |
6507 | fi | |
6508 | else | |
6509 | ac_cpp_err=yes | |
6510 | fi | |
6511 | if test -z "$ac_cpp_err"; then | |
a207b594 HPN |
6512 | gcc_cv_header_valgrind_memcheck_h=yes |
6513 | else | |
ba479fd2 NN |
6514 | echo "$as_me: failed program was:" >&5 |
6515 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6516 | ||
a207b594 HPN |
6517 | gcc_cv_header_valgrind_memcheck_h=no |
6518 | fi | |
ba479fd2 NN |
6519 | rm -f conftest.err conftest.$ac_ext |
6520 | echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5 | |
6521 | echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6 | |
6522 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 | |
6523 | echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6 | |
6524 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6525 | /* confdefs.h. */ |
6526 | _ACEOF | |
6527 | cat confdefs.h >>conftest.$ac_ext | |
6528 | cat >>conftest.$ac_ext <<_ACEOF | |
6529 | /* end confdefs.h. */ | |
a207b594 HPN |
6530 | #include <memcheck.h> |
6531 | #ifndef VALGRIND_DISCARD | |
6532 | #error VALGRIND_DISCARD not defined | |
6533 | #endif | |
ba479fd2 NN |
6534 | _ACEOF |
6535 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6536 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6537 | ac_status=$? | |
6538 | grep -v '^ *+' conftest.er1 >conftest.err | |
6539 | rm -f conftest.er1 | |
6540 | cat conftest.err >&5 | |
6541 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6542 | (exit $ac_status); } >/dev/null; then | |
6543 | if test -s conftest.err; then | |
6544 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6545 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6546 | else |
6547 | ac_cpp_err= | |
6548 | fi | |
6549 | else | |
6550 | ac_cpp_err=yes | |
6551 | fi | |
6552 | if test -z "$ac_cpp_err"; then | |
14011ca4 AJ |
6553 | gcc_cv_header_memcheck_h=yes |
6554 | else | |
ba479fd2 NN |
6555 | echo "$as_me: failed program was:" >&5 |
6556 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6557 | ||
cafe096b EC |
6558 | gcc_cv_header_memcheck_h=no |
6559 | fi | |
ba479fd2 NN |
6560 | rm -f conftest.err conftest.$ac_ext |
6561 | echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5 | |
6562 | echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6 | |
6563 | ||
56694dd9 ZW |
6564 | # Prepare PATH_SEPARATOR. |
6565 | # The user is always right. | |
6566 | if test "${PATH_SEPARATOR+set}" != set; then | |
6567 | echo "#! /bin/sh" >conf$$.sh | |
6568 | echo "exit 0" >>conf$$.sh | |
6569 | chmod +x conf$$.sh | |
6570 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6571 | PATH_SEPARATOR=';' | |
6572 | else | |
6573 | PATH_SEPARATOR=: | |
6574 | fi | |
6575 | rm -f conf$$.sh | |
6576 | fi | |
6577 | ||
6578 | # Find out how to test for executable files. Don't use a zero-byte file, | |
6579 | # as systems may use methods other than mode bits to determine executability. | |
6580 | cat >conf$$.file <<_ASEOF | |
6581 | #! /bin/sh | |
6582 | exit 0 | |
6583 | _ASEOF | |
6584 | chmod +x conf$$.file | |
6585 | if test -x conf$$.file >/dev/null 2>&1; then | |
6586 | ac_executable_p="test -x" | |
6587 | else | |
6588 | ac_executable_p="test -f" | |
6589 | fi | |
6590 | rm -f conf$$.file | |
6591 | ||
6592 | # Extract the first word of "valgrind", so it can be a program name with args. | |
414d23ae | 6593 | set dummy valgrind; ac_word=$2 |
ba479fd2 NN |
6594 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
6595 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
6596 | if test "${ac_cv_path_valgrind_path+set}" = set; then | |
6597 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
6598 | else |
6599 | case "$valgrind_path" in | |
56694dd9 ZW |
6600 | [\\/]* | ?:[\\/]*) |
6601 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
6602 | ;; | |
414d23ae | 6603 | *) |
56694dd9 ZW |
6604 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR |
6605 | for ac_dir in $PATH; do | |
6606 | IFS="$ac_save_IFS" | |
6607 | test -z "$ac_dir" && ac_dir=. | |
6608 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6609 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
6610 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
6611 | ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext" | |
6612 | break 2 | |
6613 | fi | |
6614 | fi | |
6615 | done | |
6616 | done | |
6617 | IFS="$ac_save_IFS" | |
6618 | ;; | |
414d23ae | 6619 | esac |
75e93faa | 6620 | fi |
414d23ae HPN |
6621 | valgrind_path="$ac_cv_path_valgrind_path" |
6622 | if test -n "$valgrind_path"; then | |
ba479fd2 NN |
6623 | echo "$as_me:$LINENO: result: $valgrind_path" >&5 |
6624 | echo "${ECHO_T}$valgrind_path" >&6 | |
414d23ae | 6625 | else |
ba479fd2 NN |
6626 | echo "$as_me:$LINENO: result: no" >&5 |
6627 | echo "${ECHO_T}no" >&6 | |
414d23ae HPN |
6628 | fi |
6629 | ||
a207b594 HPN |
6630 | if test "x$valgrind_path" = "x" \ |
6631 | || (test $have_valgrind_h = no \ | |
6632 | && test $gcc_cv_header_memcheck_h = no \ | |
6633 | && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
ba479fd2 NN |
6634 | { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5 |
6635 | echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;} | |
6636 | { (exit 1); exit 1; }; } | |
414d23ae HPN |
6637 | fi |
6638 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
6639 | valgrind_command="$valgrind_path -q" | |
ba479fd2 NN |
6640 | |
6641 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 6642 | #define ENABLE_VALGRIND_CHECKING 1 |
ba479fd2 | 6643 | _ACEOF |
75e93faa | 6644 | |
a207b594 | 6645 | if test $gcc_cv_header_valgrind_memcheck_h = yes; then |
ba479fd2 NN |
6646 | |
6647 | cat >>confdefs.h <<\_ACEOF | |
a207b594 | 6648 | #define HAVE_VALGRIND_MEMCHECK_H 1 |
ba479fd2 | 6649 | _ACEOF |
a207b594 HPN |
6650 | |
6651 | fi | |
14011ca4 | 6652 | if test $gcc_cv_header_memcheck_h = yes; then |
ba479fd2 NN |
6653 | |
6654 | cat >>confdefs.h <<\_ACEOF | |
14011ca4 | 6655 | #define HAVE_MEMCHECK_H 1 |
ba479fd2 | 6656 | _ACEOF |
14011ca4 AJ |
6657 | |
6658 | fi | |
414d23ae | 6659 | fi |
75e93faa | 6660 | |
75e93faa ZW |
6661 | |
6662 | ||
74ee1642 PB |
6663 | # Check whether --enable-mapped-location or --disable-mapped-location was given. |
6664 | if test "${enable_mapped_location+set}" = set; then | |
6665 | enableval="$enable_mapped_location" | |
6666 | ||
6667 | else | |
6668 | enable_mapped_location=no | |
6669 | fi; | |
6670 | ||
6671 | if test "$enable_mapped_location" = yes ; then | |
6672 | ||
6673 | cat >>confdefs.h <<\_ACEOF | |
6674 | #define USE_MAPPED_LOCATION 1 | |
6675 | _ACEOF | |
6676 | ||
6677 | fi | |
6678 | ||
414d23ae HPN |
6679 | # Enable code coverage collection |
6680 | # Check whether --enable-coverage or --disable-coverage was given. | |
6681 | if test "${enable_coverage+set}" = set; then | |
6682 | enableval="$enable_coverage" | |
6683 | case "${enableval}" in | |
6dd297da NN |
6684 | yes|noopt) |
6685 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" | |
6686 | ;; | |
6687 | opt) | |
6688 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" | |
6689 | ;; | |
6690 | no) | |
6691 | # a.k.a. --disable-coverage | |
6692 | coverage_flags="" | |
6693 | ;; | |
6694 | *) | |
6695 | { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5 | |
ba479fd2 NN |
6696 | echo "$as_me: error: unknown coverage setting $enableval" >&2;} |
6697 | { (exit 1); exit 1; }; } | |
6dd297da | 6698 | ;; |
414d23ae | 6699 | esac |
75e93faa | 6700 | else |
414d23ae | 6701 | coverage_flags="" |
ba479fd2 | 6702 | fi; |
5c3bc9fb | 6703 | |
414d23ae | 6704 | |
439a7e54 DN |
6705 | # Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given. |
6706 | if test "${enable_gather_detailed_mem_stats+set}" = set; then | |
6707 | enableval="$enable_gather_detailed_mem_stats" | |
ba479fd2 | 6708 | |
439a7e54 DN |
6709 | else |
6710 | enable_gather_detailed_mem_stats=no | |
ba479fd2 | 6711 | fi; |
439a7e54 | 6712 | if test x$enable_gather_detailed_mem_stats = xyes ; then |
ba479fd2 NN |
6713 | |
6714 | cat >>confdefs.h <<\_ACEOF | |
439a7e54 | 6715 | #define GATHER_STATISTICS 1 |
ba479fd2 | 6716 | _ACEOF |
439a7e54 DN |
6717 | |
6718 | fi | |
6719 | ||
73458fb7 NN |
6720 | # ------------------------------- |
6721 | # Miscenalleous configure options | |
6722 | # ------------------------------- | |
34a86c2b NN |
6723 | |
6724 | # With stabs | |
ba479fd2 | 6725 | |
34a86c2b NN |
6726 | # Check whether --with-stabs or --without-stabs was given. |
6727 | if test "${with_stabs+set}" = set; then | |
6728 | withval="$with_stabs" | |
6729 | stabs="$with_stabs" | |
6730 | else | |
6731 | stabs=no | |
ba479fd2 | 6732 | fi; |
cafe096b | 6733 | |
34a86c2b NN |
6734 | # Determine whether or not multilibs are enabled. |
6735 | # Check whether --enable-multilib or --disable-multilib was given. | |
6736 | if test "${enable_multilib+set}" = set; then | |
6737 | enableval="$enable_multilib" | |
ba479fd2 | 6738 | |
34a86c2b NN |
6739 | else |
6740 | enable_multilib=yes | |
ba479fd2 | 6741 | fi; |
75e93faa | 6742 | |
34a86c2b | 6743 | |
414d23ae HPN |
6744 | # Enable __cxa_atexit for C++. |
6745 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. | |
6746 | if test "${enable___cxa_atexit+set}" = set; then | |
6747 | enableval="$enable___cxa_atexit" | |
75e93faa | 6748 | |
ba479fd2 | 6749 | fi; |
75e93faa | 6750 | |
414d23ae HPN |
6751 | # Enable threads |
6752 | # Pass with no value to take the default | |
6753 | # Pass with a value to specify a thread package | |
6754 | # Check whether --enable-threads or --disable-threads was given. | |
6755 | if test "${enable_threads+set}" = set; then | |
6756 | enableval="$enable_threads" | |
ba479fd2 | 6757 | |
414d23ae HPN |
6758 | else |
6759 | enable_threads='' | |
ba479fd2 | 6760 | fi; |
414d23ae HPN |
6761 | |
6762 | # Check whether --enable-objc-gc or --disable-objc-gc was given. | |
6763 | if test "${enable_objc_gc+set}" = set; then | |
6764 | enableval="$enable_objc_gc" | |
6765 | if test x$enable_objc_gc = xno; then | |
6766 | objc_boehm_gc='' | |
6767 | else | |
6768 | objc_boehm_gc=1 | |
6769 | fi | |
6770 | else | |
6771 | objc_boehm_gc='' | |
ba479fd2 | 6772 | fi; |
75e93faa ZW |
6773 | |
6774 | ||
414d23ae HPN |
6775 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
6776 | if test "${with_dwarf2+set}" = set; then | |
6777 | withval="$with_dwarf2" | |
6778 | dwarf2="$with_dwarf2" | |
75e93faa | 6779 | else |
414d23ae | 6780 | dwarf2=no |
ba479fd2 | 6781 | fi; |
75e93faa | 6782 | |
414d23ae HPN |
6783 | # Check whether --enable-shared or --disable-shared was given. |
6784 | if test "${enable_shared+set}" = set; then | |
6785 | enableval="$enable_shared" | |
ba479fd2 | 6786 | |
414d23ae HPN |
6787 | case $enable_shared in |
6788 | yes | no) ;; | |
6789 | *) | |
6790 | enable_shared=no | |
6791 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
6792 | for pkg in $enableval; do | |
6793 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
6794 | enable_shared=yes | |
6795 | fi | |
6796 | done | |
6797 | IFS="$ac_save_ifs" | |
6798 | ;; | |
6799 | esac | |
6800 | ||
75e93faa | 6801 | else |
414d23ae | 6802 | enable_shared=yes |
ba479fd2 | 6803 | fi; |
75e93faa | 6804 | |
75e93faa | 6805 | |
75e93faa | 6806 | |
4977bab6 ZW |
6807 | # Check whether --with-sysroot or --without-sysroot was given. |
6808 | if test "${with_sysroot+set}" = set; then | |
6809 | withval="$with_sysroot" | |
ba479fd2 | 6810 | |
4977bab6 | 6811 | case ${with_sysroot} in |
caa55b1e | 6812 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; |
4977bab6 ZW |
6813 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
6814 | esac | |
ba479fd2 | 6815 | |
4977bab6 ZW |
6816 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
6817 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)' | |
6818 | ||
047d636f DJ |
6819 | if test "x$exec_prefix" = xNONE; then |
6820 | if test "x$prefix" = xNONE; then | |
6821 | test_prefix=/usr/local | |
6822 | else | |
6823 | test_prefix=$prefix | |
6824 | fi | |
6825 | else | |
6826 | test_prefix=$exec_prefix | |
6827 | fi | |
6828 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 AO |
6829 | "${test_prefix}"|"${test_prefix}/"*|\ |
6830 | '${exec_prefix}'|'${exec_prefix}/'*) | |
047d636f DJ |
6831 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
6832 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
6833 | ;; | |
6834 | esac | |
6835 | ||
4977bab6 | 6836 | else |
ba479fd2 | 6837 | |
4977bab6 | 6838 | TARGET_SYSTEM_ROOT= |
db720d9a | 6839 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
6840 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
6841 | ||
ba479fd2 | 6842 | fi; |
4977bab6 ZW |
6843 | |
6844 | ||
6845 | ||
6846 | ||
d1bd0ded | 6847 | # Build with intermodule optimisations |
d1bd0ded GK |
6848 | # Check whether --enable-intermodule or --disable-intermodule was given. |
6849 | if test "${enable_intermodule+set}" = set; then | |
6850 | enableval="$enable_intermodule" | |
0c46c5c7 KC |
6851 | case ${enable_intermodule} in |
6852 | yes) onestep="-onestep";; | |
6853 | *) onestep="";; | |
d1bd0ded | 6854 | esac |
0c46c5c7 KC |
6855 | else |
6856 | onestep="" | |
ba479fd2 | 6857 | fi; |
d1bd0ded GK |
6858 | |
6859 | ||
f3c9f174 NN |
6860 | # Sanity check enable_languages in case someone does not run the toplevel |
6861 | # configure # script. | |
6862 | # Check whether --enable-languages or --disable-languages was given. | |
6863 | if test "${enable_languages+set}" = set; then | |
6864 | enableval="$enable_languages" | |
6865 | case ,${enable_languages}, in | |
6866 | ,,|,yes,) | |
6867 | # go safe -- we cannot be much sure without the toplevel | |
6868 | # configure's | |
6869 | # analysis of which target libs are present and usable | |
6870 | enable_languages=c | |
6871 | ;; | |
6872 | *,all,*) | |
6873 | { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5 | |
6874 | echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;} | |
6875 | { (exit 1); exit 1; }; } | |
6876 | ;; | |
6877 | *,c,*) | |
6878 | ;; | |
6879 | *) | |
6880 | enable_languages=c,${enable_languages} | |
6881 | ;; | |
6882 | esac | |
6883 | else | |
6884 | enable_languages=c | |
6885 | fi; | |
6886 | ||
6887 | subdirs= | |
6888 | for lang in ${srcdir}/*/config-lang.in | |
6889 | do | |
6890 | case $lang in | |
6891 | # The odd quoting in the next line works around | |
6892 | # an apparent bug in bash 1.12 on linux. | |
6893 | ${srcdir}/[*]/config-lang.in) ;; | |
6894 | *) | |
6895 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
6896 | if test "x$lang_alias" = x | |
6897 | then | |
6898 | echo "$lang doesn't set \$language." 1>&2 | |
6899 | exit 1 | |
6900 | fi | |
6901 | case ",$enable_languages," in | |
6902 | *,$lang_alias,*) | |
6903 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;; | |
6904 | esac | |
6905 | ;; | |
6906 | esac | |
6907 | done | |
6908 | ||
6909 | ||
73458fb7 NN |
6910 | # ------------------------- |
6911 | # Checks for other programs | |
6912 | # ------------------------- | |
5b67ad6f | 6913 | |
ba479fd2 NN |
6914 | echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
6915 | echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 | |
86da66b5 | 6916 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` |
ba479fd2 NN |
6917 | if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then |
6918 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9a25f70 | 6919 | else |
ba479fd2 | 6920 | cat >conftest.make <<\_ACEOF |
e9a25f70 | 6921 | all: |
ba479fd2 NN |
6922 | @echo 'ac_maketemp="$(MAKE)"' |
6923 | _ACEOF | |
e9a25f70 | 6924 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
ba479fd2 | 6925 | eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` |
e9a25f70 JL |
6926 | if test -n "$ac_maketemp"; then |
6927 | eval ac_cv_prog_make_${ac_make}_set=yes | |
6928 | else | |
6929 | eval ac_cv_prog_make_${ac_make}_set=no | |
6930 | fi | |
ba479fd2 | 6931 | rm -f conftest.make |
e9a25f70 JL |
6932 | fi |
6933 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
ba479fd2 NN |
6934 | echo "$as_me:$LINENO: result: yes" >&5 |
6935 | echo "${ECHO_T}yes" >&6 | |
e9a25f70 JL |
6936 | SET_MAKE= |
6937 | else | |
ba479fd2 NN |
6938 | echo "$as_me:$LINENO: result: no" >&5 |
6939 | echo "${ECHO_T}no" >&6 | |
e9a25f70 JL |
6940 | SET_MAKE="MAKE=${MAKE-make}" |
6941 | fi | |
6942 | ||
6943 | ||
861bb6c1 | 6944 | # Find some useful tools |
ba479fd2 | 6945 | for ac_prog in gawk mawk nawk awk |
861bb6c1 | 6946 | do |
ba479fd2 | 6947 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 6948 | set dummy $ac_prog; ac_word=$2 |
ba479fd2 NN |
6949 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
6950 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
6951 | if test "${ac_cv_prog_AWK+set}" = set; then | |
6952 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
6953 | else |
6954 | if test -n "$AWK"; then | |
6955 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
6956 | else | |
ba479fd2 NN |
6957 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
6958 | for as_dir in $PATH | |
6959 | do | |
6960 | IFS=$as_save_IFS | |
6961 | test -z "$as_dir" && as_dir=. | |
6962 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6963 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6964 | ac_cv_prog_AWK="$ac_prog" | |
6965 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6966 | break 2 | |
6967 | fi | |
6968 | done | |
6969 | done | |
6970 | ||
861bb6c1 JL |
6971 | fi |
6972 | fi | |
ba479fd2 | 6973 | AWK=$ac_cv_prog_AWK |
861bb6c1 | 6974 | if test -n "$AWK"; then |
ba479fd2 NN |
6975 | echo "$as_me:$LINENO: result: $AWK" >&5 |
6976 | echo "${ECHO_T}$AWK" >&6 | |
861bb6c1 | 6977 | else |
ba479fd2 NN |
6978 | echo "$as_me:$LINENO: result: no" >&5 |
6979 | echo "${ECHO_T}no" >&6 | |
861bb6c1 JL |
6980 | fi |
6981 | ||
ba479fd2 | 6982 | test -n "$AWK" && break |
861bb6c1 JL |
6983 | done |
6984 | ||
776dc15d | 6985 | # We need awk to create options.c and options.h. |
2c4902b9 NN |
6986 | # Bail out if it's missing. |
6987 | case ${AWK} in | |
ba479fd2 NN |
6988 | "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5 |
6989 | echo "$as_me: error: can't build without awk, bailing out" >&2;} | |
6990 | { (exit 1); exit 1; }; } ;; | |
2c4902b9 NN |
6991 | esac |
6992 | ||
ba479fd2 NN |
6993 | echo "$as_me:$LINENO: checking whether ln -s works" >&5 |
6994 | echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 | |
6995 | if test "${gcc_cv_prog_LN_S+set}" = set; then | |
6996 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
6997 | else |
6998 | rm -f conftestdata_t | |
6999 | echo >conftestdata_f | |
7000 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
7001 | then | |
7002 | gcc_cv_prog_LN_S="ln -s" | |
7003 | else | |
7004 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7005 | then | |
7006 | gcc_cv_prog_LN_S=ln | |
7007 | else | |
35f06ae4 PB |
7008 | if cp -p conftestdata_f conftestdata_t 2>/dev/null |
7009 | then | |
06c3418c | 7010 | gcc_cv_prog_LN_S="cp -p" |
35f06ae4 PB |
7011 | else |
7012 | gcc_cv_prog_LN_S=cp | |
7013 | fi | |
0a4b6309 RL |
7014 | fi |
7015 | fi | |
7016 | rm -f conftestdata_f conftestdata_t | |
7017 | ||
7018 | fi | |
7019 | LN_S="$gcc_cv_prog_LN_S" | |
7020 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
ba479fd2 NN |
7021 | echo "$as_me:$LINENO: result: yes" >&5 |
7022 | echo "${ECHO_T}yes" >&6 | |
0a4b6309 RL |
7023 | else |
7024 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
ba479fd2 NN |
7025 | echo "$as_me:$LINENO: result: no, using ln" >&5 |
7026 | echo "${ECHO_T}no, using ln" >&6 | |
0a4b6309 | 7027 | else |
35f06ae4 PB |
7028 | echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5 |
7029 | echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6 | |
0a4b6309 RL |
7030 | fi |
7031 | fi | |
7032 | ||
41e622a8 AP |
7033 | echo "$as_me:$LINENO: checking whether ln works" >&5 |
7034 | echo $ECHO_N "checking whether ln works... $ECHO_C" >&6 | |
7035 | if test "${acx_cv_prog_LN+set}" = set; then | |
7036 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7037 | else | |
7038 | rm -f conftestdata_t | |
7039 | echo >conftestdata_f | |
7040 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7041 | then | |
7042 | acx_cv_prog_LN=ln | |
7043 | else | |
7044 | acx_cv_prog_LN=no | |
7045 | fi | |
7046 | rm -f conftestdata_f conftestdata_t | |
7047 | ||
7048 | fi | |
7049 | if test $acx_cv_prog_LN = no; then | |
7050 | LN="$LN_S" | |
7051 | echo "$as_me:$LINENO: result: no, using $LN" >&5 | |
7052 | echo "${ECHO_T}no, using $LN" >&6 | |
7053 | else | |
7054 | LN="$acx_cv_prog_LN" | |
7055 | echo "$as_me:$LINENO: result: yes" >&5 | |
7056 | echo "${ECHO_T}yes" >&6 | |
7057 | fi | |
7058 | ||
ba479fd2 NN |
7059 | if test -n "$ac_tool_prefix"; then |
7060 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7061 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
7062 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7063 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7064 | if test "${ac_cv_prog_RANLIB+set}" = set; then | |
7065 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7066 | else |
7067 | if test -n "$RANLIB"; then | |
7068 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7069 | else | |
ba479fd2 NN |
7070 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7071 | for as_dir in $PATH | |
7072 | do | |
7073 | IFS=$as_save_IFS | |
7074 | test -z "$as_dir" && as_dir=. | |
7075 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7076 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7077 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
7078 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7079 | break 2 | |
7080 | fi | |
7081 | done | |
7082 | done | |
7083 | ||
6e3f3080 NN |
7084 | fi |
7085 | fi | |
ba479fd2 | 7086 | RANLIB=$ac_cv_prog_RANLIB |
6e3f3080 | 7087 | if test -n "$RANLIB"; then |
ba479fd2 NN |
7088 | echo "$as_me:$LINENO: result: $RANLIB" >&5 |
7089 | echo "${ECHO_T}$RANLIB" >&6 | |
7090 | else | |
7091 | echo "$as_me:$LINENO: result: no" >&5 | |
7092 | echo "${ECHO_T}no" >&6 | |
7093 | fi | |
7094 | ||
7095 | fi | |
7096 | if test -z "$ac_cv_prog_RANLIB"; then | |
7097 | ac_ct_RANLIB=$RANLIB | |
7098 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7099 | set dummy ranlib; ac_word=$2 | |
7100 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7101 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7102 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then | |
7103 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7104 | else | |
7105 | if test -n "$ac_ct_RANLIB"; then | |
7106 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7107 | else | |
7108 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7109 | for as_dir in $PATH | |
7110 | do | |
7111 | IFS=$as_save_IFS | |
7112 | test -z "$as_dir" && as_dir=. | |
7113 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7114 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7115 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
7116 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7117 | break 2 | |
7118 | fi | |
7119 | done | |
7120 | done | |
7121 | ||
7122 | test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" | |
7123 | fi | |
7124 | fi | |
7125 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7126 | if test -n "$ac_ct_RANLIB"; then | |
7127 | echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 | |
7128 | echo "${ECHO_T}$ac_ct_RANLIB" >&6 | |
6e3f3080 | 7129 | else |
ba479fd2 NN |
7130 | echo "$as_me:$LINENO: result: no" >&5 |
7131 | echo "${ECHO_T}no" >&6 | |
7132 | fi | |
7133 | ||
7134 | RANLIB=$ac_ct_RANLIB | |
7135 | else | |
7136 | RANLIB="$ac_cv_prog_RANLIB" | |
861bb6c1 JL |
7137 | fi |
7138 | ||
343a6100 MM |
7139 | case "${host}" in |
7140 | *-*-darwin*) | |
7141 | # By default, the Darwin ranlib will not treat common symbols as | |
7142 | # definitions when building the archive table of contents. Other | |
7143 | # ranlibs do that; pass an option to the Darwin ranlib that makes | |
7144 | # it behave similarly. | |
7145 | ranlib_flags="-c" | |
7146 | ;; | |
7147 | *) | |
7148 | ranlib_flags="" | |
7149 | esac | |
7150 | ||
7151 | ||
0a4b6309 RL |
7152 | # Find a good install program. We prefer a C program (faster), |
7153 | # so one script is as good as another. But avoid the broken or | |
7154 | # incompatible versions: | |
7155 | # SysV /etc/install, /usr/sbin/install | |
7156 | # SunOS /usr/etc/install | |
7157 | # IRIX /sbin/install | |
7158 | # AIX /bin/install | |
7159 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7160 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7161 | # ./install, which can be erroneously created by make from ./install.sh. | |
ba479fd2 NN |
7162 | echo "$as_me:$LINENO: checking for a BSD compatible install" >&5 |
7163 | echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 | |
0a4b6309 | 7164 | if test -z "$INSTALL"; then |
ba479fd2 NN |
7165 | if test "${ac_cv_path_install+set}" = set; then |
7166 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7167 | else |
7168 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
7169 | for ac_dir in $PATH; do | |
7170 | # Account for people who put trailing slashes in PATH elements. | |
7171 | case "$ac_dir/" in | |
7172 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
7173 | *) | |
7174 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7175 | for ac_prog in ginstall scoinst install; do | |
7176 | if test -f $ac_dir/$ac_prog; then | |
7177 | if test $ac_prog = install && | |
7178 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
7179 | # AIX install. It has an incompatible calling convention. | |
7180 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
7181 | : | |
7182 | else | |
7183 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
7184 | break 2 | |
7185 | fi | |
7186 | fi | |
7187 | done | |
7188 | ;; | |
7189 | esac | |
7190 | done | |
7191 | IFS="$ac_save_IFS" | |
7192 | ||
7193 | fi | |
7194 | if test "${ac_cv_path_install+set}" = set; then | |
7195 | INSTALL="$ac_cv_path_install" | |
7196 | else | |
7197 | # As a last resort, use the slow shell script. We don't cache a | |
7198 | # path for INSTALL within a source directory, because that will | |
7199 | # break other packages using the cache if that directory is | |
7200 | # removed, or if the path is relative. | |
7201 | INSTALL="$ac_install_sh" | |
7202 | fi | |
7203 | fi | |
ba479fd2 NN |
7204 | echo "$as_me:$LINENO: result: $INSTALL" >&5 |
7205 | echo "${ECHO_T}$INSTALL" >&6 | |
0a4b6309 RL |
7206 | |
7207 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7208 | # It thinks the first close brace ends the variable substitution. | |
7209 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7210 | ||
7211 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
7212 | ||
861bb6c1 | 7213 | |
3a000df0 | 7214 | # See if cmp has --ignore-initial. |
ba479fd2 NN |
7215 | echo "$as_me:$LINENO: checking for cmp's capabilities" >&5 |
7216 | echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6 | |
7217 | if test "${gcc_cv_prog_cmp_skip+set}" = set; then | |
7218 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a000df0 KC |
7219 | else |
7220 | echo abfoo >t1 | |
7221 | echo cdfoo >t2 | |
269a7343 | 7222 | gcc_cv_prog_cmp_skip=slowcompare |
3a000df0 KC |
7223 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then |
7224 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
269a7343 | 7225 | : |
3a000df0 KC |
7226 | else |
7227 | gcc_cv_prog_cmp_skip=gnucompare | |
7228 | fi | |
269a7343 KG |
7229 | fi |
7230 | if test $gcc_cv_prog_cmp_skip = slowcompare ; then | |
7231 | if cmp t1 t2 2 2 > /dev/null 2>&1; then | |
7232 | if cmp t1 t2 1 1 > /dev/null 2>&1; then | |
7233 | : | |
7234 | else | |
7235 | gcc_cv_prog_cmp_skip=fastcompare | |
7236 | fi | |
7237 | fi | |
3a000df0 KC |
7238 | fi |
7239 | rm t1 t2 | |
7240 | ||
7241 | fi | |
ba479fd2 NN |
7242 | echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5 |
7243 | echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6 | |
3a000df0 KC |
7244 | make_compare_target=$gcc_cv_prog_cmp_skip |
7245 | ||
7246 | ||
7247 | ||
73458fb7 NN |
7248 | # See if we have the mktemp command. |
7249 | # Extract the first word of "mktemp", so it can be a program name with args. | |
7250 | set dummy mktemp; ac_word=$2 | |
ba479fd2 NN |
7251 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7252 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7253 | if test "${ac_cv_prog_have_mktemp_command+set}" = set; then | |
7254 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7255 | else |
7256 | if test -n "$have_mktemp_command"; then | |
7257 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
7258 | else | |
ba479fd2 NN |
7259 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7260 | for as_dir in $PATH | |
7261 | do | |
7262 | IFS=$as_save_IFS | |
7263 | test -z "$as_dir" && as_dir=. | |
7264 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7265 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7266 | ac_cv_prog_have_mktemp_command="yes" | |
7267 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7268 | break 2 | |
7269 | fi | |
7270 | done | |
7271 | done | |
7272 | ||
73458fb7 NN |
7273 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
7274 | fi | |
7275 | fi | |
ba479fd2 | 7276 | have_mktemp_command=$ac_cv_prog_have_mktemp_command |
73458fb7 | 7277 | if test -n "$have_mktemp_command"; then |
ba479fd2 NN |
7278 | echo "$as_me:$LINENO: result: $have_mktemp_command" >&5 |
7279 | echo "${ECHO_T}$have_mktemp_command" >&6 | |
73458fb7 | 7280 | else |
ba479fd2 NN |
7281 | echo "$as_me:$LINENO: result: no" >&5 |
7282 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7283 | fi |
7284 | ||
7285 | ||
7c27e184 PB |
7286 | MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing" |
7287 | ||
7288 | # See if makeinfo has been installed and is modern enough | |
7289 | # that we can use it. | |
7290 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
73458fb7 | 7291 | set dummy makeinfo; ac_word=$2 |
ba479fd2 NN |
7292 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7293 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7294 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then | |
7295 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7296 | else |
7297 | if test -n "$MAKEINFO"; then | |
7298 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
7299 | else | |
ba479fd2 NN |
7300 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7301 | for as_dir in $PATH | |
7302 | do | |
7303 | IFS=$as_save_IFS | |
7304 | test -z "$as_dir" && as_dir=. | |
7305 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7306 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7307 | ac_cv_prog_MAKEINFO="makeinfo" | |
7308 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7309 | break 2 | |
7310 | fi | |
7311 | done | |
7312 | done | |
7313 | ||
73458fb7 NN |
7314 | fi |
7315 | fi | |
ba479fd2 | 7316 | MAKEINFO=$ac_cv_prog_MAKEINFO |
73458fb7 | 7317 | if test -n "$MAKEINFO"; then |
ba479fd2 NN |
7318 | echo "$as_me:$LINENO: result: $MAKEINFO" >&5 |
7319 | echo "${ECHO_T}$MAKEINFO" >&6 | |
73458fb7 | 7320 | else |
ba479fd2 NN |
7321 | echo "$as_me:$LINENO: result: no" >&5 |
7322 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7323 | fi |
7324 | ||
7325 | if test -n "$MAKEINFO"; then | |
7326 | # Found it, now check the version. | |
ba479fd2 NN |
7327 | echo "$as_me:$LINENO: checking for modern makeinfo" >&5 |
7328 | echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6 | |
7329 | if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then | |
7330 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7331 | else |
7332 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
7333 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
b095fe2c | 7334 | echo "configure:7334: version of makeinfo is $ac_prog_version" >&5 |
73458fb7 NN |
7335 | case $ac_prog_version in |
7336 | '') gcc_cv_prog_makeinfo_modern=no;; | |
7337 | 4.[2-9]*) | |
7338 | gcc_cv_prog_makeinfo_modern=yes;; | |
7339 | *) gcc_cv_prog_makeinfo_modern=no;; | |
7340 | esac | |
7341 | ||
7342 | fi | |
ba479fd2 NN |
7343 | echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5 |
7344 | echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6 | |
73458fb7 NN |
7345 | else |
7346 | gcc_cv_prog_makeinfo_modern=no | |
7347 | fi | |
7348 | ||
73458fb7 | 7349 | if test $gcc_cv_prog_makeinfo_modern = no; then |
7c27e184 | 7350 | MAKEINFO="$MISSING makeinfo" |
ba479fd2 NN |
7351 | { echo "$as_me:$LINENO: WARNING: |
7352 | *** Makeinfo is missing or too old. | |
7353 | *** Info documentation will not be built." >&5 | |
7354 | echo "$as_me: WARNING: | |
cafe096b | 7355 | *** Makeinfo is missing or too old. |
ba479fd2 | 7356 | *** Info documentation will not be built." >&2;} |
73458fb7 NN |
7357 | BUILD_INFO= |
7358 | else | |
ba479fd2 | 7359 | BUILD_INFO=info |
73458fb7 NN |
7360 | fi |
7361 | ||
7c27e184 | 7362 | |
73458fb7 | 7363 | # Is pod2man recent enough to regenerate manpages? |
ba479fd2 NN |
7364 | echo "$as_me:$LINENO: checking for recent Pod::Man" >&5 |
7365 | echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6 | |
73458fb7 | 7366 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
ba479fd2 NN |
7367 | echo "$as_me:$LINENO: result: yes" >&5 |
7368 | echo "${ECHO_T}yes" >&6 | |
7369 | GENERATED_MANPAGES=generated-manpages | |
73458fb7 | 7370 | else |
ba479fd2 NN |
7371 | echo "$as_me:$LINENO: result: no" >&5 |
7372 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7373 | GENERATED_MANPAGES= |
7374 | fi | |
7375 | ||
7c27e184 | 7376 | |
73458fb7 | 7377 | # How about lex? |
7c27e184 PB |
7378 | for ac_prog in flex |
7379 | do | |
7380 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7381 | set dummy $ac_prog; ac_word=$2 | |
ba479fd2 NN |
7382 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7383 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7384 | if test "${ac_cv_prog_FLEX+set}" = set; then | |
7385 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7386 | else |
7387 | if test -n "$FLEX"; then | |
7388 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
7389 | else | |
ba479fd2 NN |
7390 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7391 | for as_dir in $PATH | |
7392 | do | |
7393 | IFS=$as_save_IFS | |
7394 | test -z "$as_dir" && as_dir=. | |
7395 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7396 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7c27e184 | 7397 | ac_cv_prog_FLEX="$ac_prog" |
ba479fd2 NN |
7398 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7399 | break 2 | |
7400 | fi | |
7401 | done | |
7402 | done | |
7403 | ||
73458fb7 NN |
7404 | fi |
7405 | fi | |
ba479fd2 | 7406 | FLEX=$ac_cv_prog_FLEX |
73458fb7 | 7407 | if test -n "$FLEX"; then |
ba479fd2 NN |
7408 | echo "$as_me:$LINENO: result: $FLEX" >&5 |
7409 | echo "${ECHO_T}$FLEX" >&6 | |
73458fb7 | 7410 | else |
ba479fd2 NN |
7411 | echo "$as_me:$LINENO: result: no" >&5 |
7412 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7413 | fi |
7414 | ||
7c27e184 PB |
7415 | test -n "$FLEX" && break |
7416 | done | |
7417 | test -n "$FLEX" || FLEX="$MISSING flex" | |
7418 | ||
73458fb7 NN |
7419 | |
7420 | # Bison? | |
7c27e184 PB |
7421 | for ac_prog in bison |
7422 | do | |
7423 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7424 | set dummy $ac_prog; ac_word=$2 | |
ba479fd2 NN |
7425 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7426 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7427 | if test "${ac_cv_prog_BISON+set}" = set; then | |
7428 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7429 | else |
7430 | if test -n "$BISON"; then | |
7431 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
7432 | else | |
ba479fd2 NN |
7433 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7434 | for as_dir in $PATH | |
7435 | do | |
7436 | IFS=$as_save_IFS | |
7437 | test -z "$as_dir" && as_dir=. | |
7438 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7439 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7c27e184 | 7440 | ac_cv_prog_BISON="$ac_prog" |
ba479fd2 NN |
7441 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7442 | break 2 | |
7443 | fi | |
7444 | done | |
7445 | done | |
7446 | ||
73458fb7 NN |
7447 | fi |
7448 | fi | |
ba479fd2 | 7449 | BISON=$ac_cv_prog_BISON |
73458fb7 | 7450 | if test -n "$BISON"; then |
ba479fd2 NN |
7451 | echo "$as_me:$LINENO: result: $BISON" >&5 |
7452 | echo "${ECHO_T}$BISON" >&6 | |
73458fb7 | 7453 | else |
ba479fd2 NN |
7454 | echo "$as_me:$LINENO: result: no" >&5 |
7455 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7456 | fi |
7457 | ||
7c27e184 PB |
7458 | test -n "$BISON" && break |
7459 | done | |
7460 | test -n "$BISON" || BISON="$MISSING bison" | |
7461 | ||
7462 | ||
7463 | # Binutils are not build modules, unlike bison/flex/makeinfo. So we | |
7464 | # check for build == host before using them. | |
73458fb7 | 7465 | |
f6a874ac | 7466 | # NM |
414adbdd GK |
7467 | if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ |
7468 | && test -d ../binutils ; then | |
f6a874ac JW |
7469 | NM='$(objdir)/../binutils/nm-new' |
7470 | else | |
7471 | # Extract the first word of "nm", so it can be a program name with args. | |
7472 | set dummy nm; ac_word=$2 | |
7473 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7474 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7475 | if test "${ac_cv_prog_NM+set}" = set; then | |
7476 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7477 | else | |
7478 | if test -n "$NM"; then | |
7479 | ac_cv_prog_NM="$NM" # Let the user override the test. | |
7480 | else | |
7481 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7482 | for as_dir in $PATH | |
7483 | do | |
7484 | IFS=$as_save_IFS | |
7485 | test -z "$as_dir" && as_dir=. | |
7486 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7487 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7488 | ac_cv_prog_NM="nm" | |
7489 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7490 | break 2 | |
7491 | fi | |
7492 | done | |
7493 | done | |
7494 | ||
7495 | test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm" | |
7496 | fi | |
7497 | fi | |
7498 | NM=$ac_cv_prog_NM | |
7499 | if test -n "$NM"; then | |
7500 | echo "$as_me:$LINENO: result: $NM" >&5 | |
7501 | echo "${ECHO_T}$NM" >&6 | |
7502 | else | |
7503 | echo "$as_me:$LINENO: result: no" >&5 | |
7504 | echo "${ECHO_T}no" >&6 | |
7505 | fi | |
7506 | ||
7507 | fi | |
7508 | ||
7509 | # AR | |
414adbdd GK |
7510 | if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ |
7511 | && test -d ../binutils ; then | |
f6a874ac JW |
7512 | AR='$(objdir)/../binutils/ar' |
7513 | else | |
7514 | # Extract the first word of "ar", so it can be a program name with args. | |
7515 | set dummy ar; ac_word=$2 | |
7516 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7517 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7518 | if test "${ac_cv_prog_AR+set}" = set; then | |
7519 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7520 | else | |
7521 | if test -n "$AR"; then | |
7522 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7523 | else | |
7524 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7525 | for as_dir in $PATH | |
7526 | do | |
7527 | IFS=$as_save_IFS | |
7528 | test -z "$as_dir" && as_dir=. | |
7529 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7530 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7531 | ac_cv_prog_AR="ar" | |
7532 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7533 | break 2 | |
7534 | fi | |
7535 | done | |
7536 | done | |
7537 | ||
7538 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar" | |
7539 | fi | |
7540 | fi | |
7541 | AR=$ac_cv_prog_AR | |
7542 | if test -n "$AR"; then | |
7543 | echo "$as_me:$LINENO: result: $AR" >&5 | |
7544 | echo "${ECHO_T}$AR" >&6 | |
7545 | else | |
7546 | echo "$as_me:$LINENO: result: no" >&5 | |
7547 | echo "${ECHO_T}no" >&6 | |
7548 | fi | |
7549 | ||
7550 | fi | |
7551 | ||
7552 | ||
73458fb7 NN |
7553 | # -------------------- |
7554 | # Checks for C headers | |
7555 | # -------------------- | |
7556 | ||
ba479fd2 NN |
7557 | echo "$as_me:$LINENO: checking for GNU C library" >&5 |
7558 | echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6 | |
7559 | if test "${gcc_cv_glibc+set}" = set; then | |
7560 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7561 | else | |
7562 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7563 | /* confdefs.h. */ |
7564 | _ACEOF | |
7565 | cat confdefs.h >>conftest.$ac_ext | |
7566 | cat >>conftest.$ac_ext <<_ACEOF | |
7567 | /* end confdefs.h. */ | |
73458fb7 | 7568 | #include <features.h> |
ba479fd2 NN |
7569 | int |
7570 | main () | |
7571 | { | |
73458fb7 NN |
7572 | |
7573 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
7574 | #error Not a GNU C library system | |
7575 | #endif | |
ba479fd2 NN |
7576 | ; |
7577 | return 0; | |
7578 | } | |
7579 | _ACEOF | |
7580 | rm -f conftest.$ac_objext | |
7581 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7582 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7583 | ac_status=$? |
86da66b5 HPN |
7584 | grep -v '^ *+' conftest.er1 >conftest.err |
7585 | rm -f conftest.er1 | |
7586 | cat conftest.err >&5 | |
ba479fd2 NN |
7587 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7588 | (exit $ac_status); } && | |
b095fe2c | 7589 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
7590 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7591 | (eval $ac_try) 2>&5 | |
7592 | ac_status=$? | |
7593 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7594 | (exit $ac_status); }; } && | |
7595 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7596 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7597 | (eval $ac_try) 2>&5 | |
7598 | ac_status=$? | |
7599 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7600 | (exit $ac_status); }; }; then | |
73458fb7 NN |
7601 | gcc_cv_glibc=yes |
7602 | else | |
ba479fd2 NN |
7603 | echo "$as_me: failed program was:" >&5 |
7604 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7605 | ||
7606 | gcc_cv_glibc=no | |
73458fb7 | 7607 | fi |
86da66b5 | 7608 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
73458fb7 NN |
7609 | fi |
7610 | ||
ba479fd2 NN |
7611 | echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5 |
7612 | echo "${ECHO_T}$gcc_cv_glibc" >&6 | |
73458fb7 | 7613 | if test $gcc_cv_glibc = yes; then |
ba479fd2 NN |
7614 | |
7615 | cat >>confdefs.h <<\_ACEOF | |
73458fb7 | 7616 | #define _GNU_SOURCE 1 |
ba479fd2 | 7617 | _ACEOF |
73458fb7 NN |
7618 | |
7619 | fi | |
7620 | ||
ca9bc441 NN |
7621 | # Need to reject headers which give warnings, so that the -Werror bootstrap |
7622 | # works later. *sigh* This needs to come before all header checks. | |
7623 | ||
7624 | ac_c_preproc_warn_flag=yes | |
7625 | ||
ba479fd2 NN |
7626 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
7627 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
7628 | if test "${ac_cv_header_stdc+set}" = set; then | |
7629 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 7630 | else |
ba479fd2 | 7631 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7632 | /* confdefs.h. */ |
7633 | _ACEOF | |
7634 | cat confdefs.h >>conftest.$ac_ext | |
7635 | cat >>conftest.$ac_ext <<_ACEOF | |
7636 | /* end confdefs.h. */ | |
956d6950 JL |
7637 | #include <stdlib.h> |
7638 | #include <stdarg.h> | |
7639 | #include <string.h> | |
7640 | #include <float.h> | |
ba479fd2 NN |
7641 | |
7642 | int | |
7643 | main () | |
7644 | { | |
7645 | ||
7646 | ; | |
7647 | return 0; | |
7648 | } | |
7649 | _ACEOF | |
7650 | rm -f conftest.$ac_objext | |
7651 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7652 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7653 | ac_status=$? |
86da66b5 HPN |
7654 | grep -v '^ *+' conftest.er1 >conftest.err |
7655 | rm -f conftest.er1 | |
7656 | cat conftest.err >&5 | |
ba479fd2 NN |
7657 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7658 | (exit $ac_status); } && | |
b095fe2c | 7659 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
7660 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7661 | (eval $ac_try) 2>&5 | |
7662 | ac_status=$? | |
7663 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7664 | (exit $ac_status); }; } && | |
7665 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7666 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7667 | (eval $ac_try) 2>&5 | |
7668 | ac_status=$? | |
7669 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7670 | (exit $ac_status); }; }; then | |
956d6950 JL |
7671 | ac_cv_header_stdc=yes |
7672 | else | |
ba479fd2 NN |
7673 | echo "$as_me: failed program was:" >&5 |
7674 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7675 | ||
7676 | ac_cv_header_stdc=no | |
956d6950 | 7677 | fi |
86da66b5 | 7678 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
7679 | |
7680 | if test $ac_cv_header_stdc = yes; then | |
7681 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
ba479fd2 | 7682 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7683 | /* confdefs.h. */ |
7684 | _ACEOF | |
7685 | cat confdefs.h >>conftest.$ac_ext | |
7686 | cat >>conftest.$ac_ext <<_ACEOF | |
7687 | /* end confdefs.h. */ | |
956d6950 | 7688 | #include <string.h> |
ba479fd2 NN |
7689 | |
7690 | _ACEOF | |
956d6950 | 7691 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 7692 | $EGREP "memchr" >/dev/null 2>&1; then |
956d6950 JL |
7693 | : |
7694 | else | |
956d6950 JL |
7695 | ac_cv_header_stdc=no |
7696 | fi | |
7697 | rm -f conftest* | |
7698 | ||
7699 | fi | |
7700 | ||
7701 | if test $ac_cv_header_stdc = yes; then | |
7702 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
ba479fd2 | 7703 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7704 | /* confdefs.h. */ |
7705 | _ACEOF | |
7706 | cat confdefs.h >>conftest.$ac_ext | |
7707 | cat >>conftest.$ac_ext <<_ACEOF | |
7708 | /* end confdefs.h. */ | |
956d6950 | 7709 | #include <stdlib.h> |
ba479fd2 NN |
7710 | |
7711 | _ACEOF | |
956d6950 | 7712 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 7713 | $EGREP "free" >/dev/null 2>&1; then |
956d6950 JL |
7714 | : |
7715 | else | |
956d6950 JL |
7716 | ac_cv_header_stdc=no |
7717 | fi | |
7718 | rm -f conftest* | |
7719 | ||
7720 | fi | |
7721 | ||
7722 | if test $ac_cv_header_stdc = yes; then | |
7723 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
ba479fd2 | 7724 | if test "$cross_compiling" = yes; then |
956d6950 JL |
7725 | : |
7726 | else | |
ba479fd2 | 7727 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7728 | /* confdefs.h. */ |
7729 | _ACEOF | |
7730 | cat confdefs.h >>conftest.$ac_ext | |
7731 | cat >>conftest.$ac_ext <<_ACEOF | |
7732 | /* end confdefs.h. */ | |
956d6950 | 7733 | #include <ctype.h> |
ba479fd2 NN |
7734 | #if ((' ' & 0x0FF) == 0x020) |
7735 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
7736 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
7737 | #else | |
7738 | # define ISLOWER(c) \ | |
86da66b5 HPN |
7739 | (('a' <= (c) && (c) <= 'i') \ |
7740 | || ('j' <= (c) && (c) <= 'r') \ | |
7741 | || ('s' <= (c) && (c) <= 'z')) | |
ba479fd2 NN |
7742 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
7743 | #endif | |
63cf211a | 7744 | |
ba479fd2 NN |
7745 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
7746 | int | |
7747 | main () | |
7748 | { | |
7749 | int i; | |
7750 | for (i = 0; i < 256; i++) | |
7751 | if (XOR (islower (i), ISLOWER (i)) | |
86da66b5 | 7752 | || toupper (i) != TOUPPER (i)) |
ba479fd2 NN |
7753 | exit(2); |
7754 | exit (0); | |
7755 | } | |
7756 | _ACEOF | |
7757 | rm -f conftest$ac_exeext | |
7758 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7759 | (eval $ac_link) 2>&5 | |
7760 | ac_status=$? | |
7761 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7762 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
7763 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7764 | (eval $ac_try) 2>&5 | |
7765 | ac_status=$? | |
7766 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7767 | (exit $ac_status); }; }; then | |
956d6950 JL |
7768 | : |
7769 | else | |
ba479fd2 NN |
7770 | echo "$as_me: program exited with status $ac_status" >&5 |
7771 | echo "$as_me: failed program was:" >&5 | |
7772 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7773 | ||
7774 | ( exit $ac_status ) | |
7775 | ac_cv_header_stdc=no | |
956d6950 | 7776 | fi |
86da66b5 | 7777 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
956d6950 | 7778 | fi |
956d6950 JL |
7779 | fi |
7780 | fi | |
ba479fd2 NN |
7781 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 |
7782 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
63cf211a | 7783 | if test $ac_cv_header_stdc = yes; then |
ba479fd2 NN |
7784 | |
7785 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 7786 | #define STDC_HEADERS 1 |
ba479fd2 | 7787 | _ACEOF |
956d6950 JL |
7788 | |
7789 | fi | |
7790 | ||
ba479fd2 NN |
7791 | echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 |
7792 | echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 | |
7793 | if test "${ac_cv_header_time+set}" = set; then | |
7794 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 7795 | else |
ba479fd2 | 7796 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7797 | /* confdefs.h. */ |
7798 | _ACEOF | |
7799 | cat confdefs.h >>conftest.$ac_ext | |
7800 | cat >>conftest.$ac_ext <<_ACEOF | |
7801 | /* end confdefs.h. */ | |
956d6950 JL |
7802 | #include <sys/types.h> |
7803 | #include <sys/time.h> | |
7804 | #include <time.h> | |
ba479fd2 NN |
7805 | |
7806 | int | |
7807 | main () | |
7808 | { | |
7809 | if ((struct tm *) 0) | |
7810 | return 0; | |
7811 | ; | |
7812 | return 0; | |
7813 | } | |
7814 | _ACEOF | |
7815 | rm -f conftest.$ac_objext | |
7816 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7817 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7818 | ac_status=$? |
86da66b5 HPN |
7819 | grep -v '^ *+' conftest.er1 >conftest.err |
7820 | rm -f conftest.er1 | |
7821 | cat conftest.err >&5 | |
ba479fd2 NN |
7822 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7823 | (exit $ac_status); } && | |
b095fe2c | 7824 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
7825 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7826 | (eval $ac_try) 2>&5 | |
7827 | ac_status=$? | |
7828 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7829 | (exit $ac_status); }; } && | |
7830 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7831 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7832 | (eval $ac_try) 2>&5 | |
7833 | ac_status=$? | |
7834 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7835 | (exit $ac_status); }; }; then | |
956d6950 JL |
7836 | ac_cv_header_time=yes |
7837 | else | |
ba479fd2 NN |
7838 | echo "$as_me: failed program was:" >&5 |
7839 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7840 | ||
7841 | ac_cv_header_time=no | |
956d6950 | 7842 | fi |
86da66b5 | 7843 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 | 7844 | fi |
ba479fd2 NN |
7845 | echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 |
7846 | echo "${ECHO_T}$ac_cv_header_time" >&6 | |
63cf211a | 7847 | if test $ac_cv_header_time = yes; then |
ba479fd2 NN |
7848 | |
7849 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 7850 | #define TIME_WITH_SYS_TIME 1 |
ba479fd2 | 7851 | _ACEOF |
956d6950 JL |
7852 | |
7853 | fi | |
7854 | ||
41e622a8 AP |
7855 | echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 |
7856 | echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6 | |
7857 | if test "${gcc_cv_header_string+set}" = set; then | |
7858 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7859 | else | |
7860 | cat >conftest.$ac_ext <<_ACEOF | |
7861 | /* confdefs.h. */ | |
7862 | _ACEOF | |
7863 | cat confdefs.h >>conftest.$ac_ext | |
7864 | cat >>conftest.$ac_ext <<_ACEOF | |
7865 | /* end confdefs.h. */ | |
7866 | #include <string.h> | |
7867 | #include <strings.h> | |
7868 | int | |
7869 | main () | |
7870 | { | |
7871 | ||
7872 | ; | |
7873 | return 0; | |
7874 | } | |
7875 | _ACEOF | |
7876 | rm -f conftest.$ac_objext | |
7877 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7878 | (eval $ac_compile) 2>conftest.er1 | |
7879 | ac_status=$? | |
7880 | grep -v '^ *+' conftest.er1 >conftest.err | |
7881 | rm -f conftest.er1 | |
7882 | cat conftest.err >&5 | |
7883 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7884 | (exit $ac_status); } && | |
b095fe2c | 7885 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
41e622a8 AP |
7886 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7887 | (eval $ac_try) 2>&5 | |
7888 | ac_status=$? | |
7889 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7890 | (exit $ac_status); }; } && | |
7891 | { ac_try='test -s conftest.$ac_objext' | |
7892 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7893 | (eval $ac_try) 2>&5 | |
7894 | ac_status=$? | |
7895 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7896 | (exit $ac_status); }; }; then | |
7897 | gcc_cv_header_string=yes | |
7898 | else | |
7899 | echo "$as_me: failed program was:" >&5 | |
7900 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7901 | ||
7902 | gcc_cv_header_string=no | |
7903 | fi | |
7904 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7905 | fi | |
7906 | echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 | |
7907 | echo "${ECHO_T}$gcc_cv_header_string" >&6 | |
7908 | if test $gcc_cv_header_string = yes; then | |
7909 | ||
7910 | cat >>confdefs.h <<\_ACEOF | |
7911 | #define STRING_WITH_STRINGS 1 | |
7912 | _ACEOF | |
7913 | ||
7914 | fi | |
7915 | ||
ba479fd2 NN |
7916 | echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
7917 | echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 | |
7918 | if test "${ac_cv_header_sys_wait_h+set}" = set; then | |
7919 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9831ca0 | 7920 | else |
ba479fd2 | 7921 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7922 | /* confdefs.h. */ |
7923 | _ACEOF | |
7924 | cat confdefs.h >>conftest.$ac_ext | |
7925 | cat >>conftest.$ac_ext <<_ACEOF | |
7926 | /* end confdefs.h. */ | |
e9831ca0 KG |
7927 | #include <sys/types.h> |
7928 | #include <sys/wait.h> | |
7929 | #ifndef WEXITSTATUS | |
ba479fd2 | 7930 | # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
e9831ca0 KG |
7931 | #endif |
7932 | #ifndef WIFEXITED | |
ba479fd2 | 7933 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 7934 | #endif |
ba479fd2 NN |
7935 | |
7936 | int | |
7937 | main () | |
7938 | { | |
7939 | int s; | |
7940 | wait (&s); | |
7941 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
7942 | ; | |
7943 | return 0; | |
7944 | } | |
7945 | _ACEOF | |
7946 | rm -f conftest.$ac_objext | |
7947 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7948 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7949 | ac_status=$? |
86da66b5 HPN |
7950 | grep -v '^ *+' conftest.er1 >conftest.err |
7951 | rm -f conftest.er1 | |
7952 | cat conftest.err >&5 | |
ba479fd2 NN |
7953 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7954 | (exit $ac_status); } && | |
b095fe2c | 7955 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
7956 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7957 | (eval $ac_try) 2>&5 | |
7958 | ac_status=$? | |
7959 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7960 | (exit $ac_status); }; } && | |
7961 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7962 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7963 | (eval $ac_try) 2>&5 | |
7964 | ac_status=$? | |
7965 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7966 | (exit $ac_status); }; }; then | |
e9831ca0 KG |
7967 | ac_cv_header_sys_wait_h=yes |
7968 | else | |
ba479fd2 NN |
7969 | echo "$as_me: failed program was:" >&5 |
7970 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7971 | ||
7972 | ac_cv_header_sys_wait_h=no | |
e9831ca0 | 7973 | fi |
86da66b5 | 7974 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
e9831ca0 | 7975 | fi |
ba479fd2 NN |
7976 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 |
7977 | echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 | |
63cf211a | 7978 | if test $ac_cv_header_sys_wait_h = yes; then |
ba479fd2 NN |
7979 | |
7980 | cat >>confdefs.h <<\_ACEOF | |
e9831ca0 | 7981 | #define HAVE_SYS_WAIT_H 1 |
ba479fd2 | 7982 | _ACEOF |
6e3f3080 | 7983 | |
63cf211a | 7984 | fi |
6e3f3080 | 7985 | |
ba479fd2 NN |
7986 | |
7987 | ||
7988 | ||
7989 | ||
7990 | ||
7991 | ||
7992 | ||
7993 | ||
7994 | ||
7995 | ||
7996 | ||
7997 | ||
7998 | ||
7999 | ||
8000 | ||
8001 | ||
8002 | ||
8003 | ||
8004 | ||
8005 | ||
8006 | ||
dfb77e37 KC |
8007 | |
8008 | for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \ | |
1072ec3f | 8009 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 8010 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
56694dd9 | 8011 | direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h |
861bb6c1 | 8012 | do |
ba479fd2 | 8013 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
ca9bc441 | 8014 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
8015 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
8016 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
8017 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 8018 | else |
ca9bc441 | 8019 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8020 | /* confdefs.h. */ |
8021 | _ACEOF | |
8022 | cat confdefs.h >>conftest.$ac_ext | |
8023 | cat >>conftest.$ac_ext <<_ACEOF | |
8024 | /* end confdefs.h. */ | |
8025 | #include <$ac_header> | |
8026 | _ACEOF | |
8027 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8028 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8029 | ac_status=$? | |
8030 | grep -v '^ *+' conftest.er1 >conftest.err | |
8031 | rm -f conftest.er1 | |
8032 | cat conftest.err >&5 | |
8033 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8034 | (exit $ac_status); } >/dev/null; then | |
8035 | if test -s conftest.err; then | |
8036 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8037 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8038 | else |
8039 | ac_cpp_err= | |
8040 | fi | |
8041 | else | |
8042 | ac_cpp_err=yes | |
8043 | fi | |
8044 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 8045 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
8046 | else |
8047 | echo "$as_me: failed program was:" >&5 | |
8048 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8049 | ||
ca9bc441 | 8050 | eval "$as_ac_Header=no" |
ba479fd2 NN |
8051 | fi |
8052 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8053 | fi |
ba479fd2 NN |
8054 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
8055 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
8056 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
8057 | cat >>confdefs.h <<_ACEOF | |
8058 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8059 | _ACEOF | |
8060 | ||
956d6950 JL |
8061 | fi |
8062 | done | |
8063 | ||
8064 | ||
f24af81b | 8065 | # Check for thread headers. |
ca9bc441 | 8066 | echo "$as_me:$LINENO: checking for thread.h" >&5 |
ba479fd2 NN |
8067 | echo $ECHO_N "checking for thread.h... $ECHO_C" >&6 |
8068 | if test "${ac_cv_header_thread_h+set}" = set; then | |
8069 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 8070 | else |
ca9bc441 | 8071 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8072 | /* confdefs.h. */ |
8073 | _ACEOF | |
8074 | cat confdefs.h >>conftest.$ac_ext | |
8075 | cat >>conftest.$ac_ext <<_ACEOF | |
8076 | /* end confdefs.h. */ | |
8077 | #include <thread.h> | |
8078 | _ACEOF | |
8079 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8080 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8081 | ac_status=$? | |
8082 | grep -v '^ *+' conftest.er1 >conftest.err | |
8083 | rm -f conftest.er1 | |
8084 | cat conftest.err >&5 | |
8085 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8086 | (exit $ac_status); } >/dev/null; then | |
8087 | if test -s conftest.err; then | |
8088 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8089 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8090 | else |
8091 | ac_cpp_err= | |
8092 | fi | |
8093 | else | |
8094 | ac_cpp_err=yes | |
8095 | fi | |
8096 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 8097 | ac_cv_header_thread_h=yes |
ba479fd2 NN |
8098 | else |
8099 | echo "$as_me: failed program was:" >&5 | |
8100 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8101 | ||
ca9bc441 | 8102 | ac_cv_header_thread_h=no |
ba479fd2 NN |
8103 | fi |
8104 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8105 | fi |
ba479fd2 NN |
8106 | echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5 |
8107 | echo "${ECHO_T}$ac_cv_header_thread_h" >&6 | |
ba479fd2 | 8108 | if test $ac_cv_header_thread_h = yes; then |
f24af81b TT |
8109 | have_thread_h=yes |
8110 | else | |
ba479fd2 | 8111 | have_thread_h= |
f24af81b TT |
8112 | fi |
8113 | ||
ca9bc441 | 8114 | echo "$as_me:$LINENO: checking for pthread.h" >&5 |
ba479fd2 NN |
8115 | echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 |
8116 | if test "${ac_cv_header_pthread_h+set}" = set; then | |
8117 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f24af81b | 8118 | else |
ca9bc441 | 8119 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8120 | /* confdefs.h. */ |
8121 | _ACEOF | |
8122 | cat confdefs.h >>conftest.$ac_ext | |
8123 | cat >>conftest.$ac_ext <<_ACEOF | |
8124 | /* end confdefs.h. */ | |
8125 | #include <pthread.h> | |
8126 | _ACEOF | |
8127 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8128 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8129 | ac_status=$? | |
8130 | grep -v '^ *+' conftest.er1 >conftest.err | |
8131 | rm -f conftest.er1 | |
8132 | cat conftest.err >&5 | |
8133 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8134 | (exit $ac_status); } >/dev/null; then | |
8135 | if test -s conftest.err; then | |
8136 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8137 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8138 | else |
8139 | ac_cpp_err= | |
8140 | fi | |
8141 | else | |
8142 | ac_cpp_err=yes | |
8143 | fi | |
8144 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 8145 | ac_cv_header_pthread_h=yes |
ba479fd2 NN |
8146 | else |
8147 | echo "$as_me: failed program was:" >&5 | |
8148 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8149 | ||
ca9bc441 | 8150 | ac_cv_header_pthread_h=no |
ba479fd2 NN |
8151 | fi |
8152 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8153 | fi |
ba479fd2 NN |
8154 | echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 |
8155 | echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 | |
ba479fd2 | 8156 | if test $ac_cv_header_pthread_h = yes; then |
f24af81b TT |
8157 | have_pthread_h=yes |
8158 | else | |
ba479fd2 | 8159 | have_pthread_h= |
f24af81b TT |
8160 | fi |
8161 | ||
8162 | ||
84c041a1 | 8163 | # These tests can't be done till we know if we have limits.h. |
ba479fd2 NN |
8164 | echo "$as_me:$LINENO: checking for CHAR_BIT" >&5 |
8165 | echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6 | |
8166 | if test "${gcc_cv_decl_char_bit+set}" = set; then | |
8167 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8168 | else | |
8169 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8170 | /* confdefs.h. */ |
8171 | _ACEOF | |
8172 | cat confdefs.h >>conftest.$ac_ext | |
8173 | cat >>conftest.$ac_ext <<_ACEOF | |
8174 | /* end confdefs.h. */ | |
75e93faa ZW |
8175 | #ifdef HAVE_LIMITS_H |
8176 | #include <limits.h> | |
8177 | #endif | |
8178 | #ifdef CHAR_BIT | |
8179 | found | |
8180 | #endif | |
ba479fd2 | 8181 | _ACEOF |
75e93faa | 8182 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8183 | $EGREP "found" >/dev/null 2>&1; then |
75e93faa ZW |
8184 | gcc_cv_decl_char_bit=yes |
8185 | else | |
75e93faa ZW |
8186 | gcc_cv_decl_char_bit=no |
8187 | fi | |
8188 | rm -f conftest* | |
8189 | ||
8190 | ||
8191 | fi | |
ba479fd2 NN |
8192 | echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5 |
8193 | echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6 | |
75e93faa | 8194 | if test $gcc_cv_decl_char_bit = no; then |
ba479fd2 NN |
8195 | echo "$as_me:$LINENO: checking number of bits in a byte" >&5 |
8196 | echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6 | |
8197 | if test "${gcc_cv_c_nbby+set}" = set; then | |
8198 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa ZW |
8199 | else |
8200 | i=8 | |
8201 | gcc_cv_c_nbby= | |
8202 | while test $i -lt 65; do | |
ba479fd2 | 8203 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8204 | /* confdefs.h. */ |
8205 | _ACEOF | |
8206 | cat confdefs.h >>conftest.$ac_ext | |
8207 | cat >>conftest.$ac_ext <<_ACEOF | |
8208 | /* end confdefs.h. */ | |
8209 | ||
8210 | int | |
8211 | main () | |
8212 | { | |
4e70264f ZW |
8213 | switch(0) { |
8214 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
8215 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
8216 | ; } | |
ba479fd2 NN |
8217 | ; |
8218 | return 0; | |
8219 | } | |
8220 | _ACEOF | |
8221 | rm -f conftest.$ac_objext | |
8222 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8223 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8224 | ac_status=$? |
86da66b5 HPN |
8225 | grep -v '^ *+' conftest.er1 >conftest.err |
8226 | rm -f conftest.er1 | |
8227 | cat conftest.err >&5 | |
ba479fd2 NN |
8228 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8229 | (exit $ac_status); } && | |
b095fe2c | 8230 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8231 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8232 | (eval $ac_try) 2>&5 | |
8233 | ac_status=$? | |
8234 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8235 | (exit $ac_status); }; } && | |
8236 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8237 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8238 | (eval $ac_try) 2>&5 | |
8239 | ac_status=$? | |
8240 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8241 | (exit $ac_status); }; }; then | |
4e70264f | 8242 | gcc_cv_c_nbby=$i; break |
75e93faa | 8243 | else |
ba479fd2 NN |
8244 | echo "$as_me: failed program was:" >&5 |
8245 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8246 | ||
75e93faa | 8247 | fi |
86da66b5 | 8248 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75e93faa ZW |
8249 | i=`expr $i + 1` |
8250 | done | |
8251 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
8252 | ||
8253 | fi | |
ba479fd2 NN |
8254 | echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5 |
8255 | echo "${ECHO_T}$gcc_cv_c_nbby" >&6 | |
75e93faa | 8256 | if test $gcc_cv_c_nbby = failed; then |
ba479fd2 NN |
8257 | { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5 |
8258 | echo "$as_me: error: cannot determine number of bits in a byte" >&2;} | |
8259 | { (exit 1); exit 1; }; } | |
75e93faa | 8260 | else |
ba479fd2 NN |
8261 | |
8262 | cat >>confdefs.h <<_ACEOF | |
75e93faa | 8263 | #define CHAR_BIT $gcc_cv_c_nbby |
ba479fd2 | 8264 | _ACEOF |
75e93faa ZW |
8265 | |
8266 | fi | |
8267 | fi | |
ba479fd2 NN |
8268 | echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 |
8269 | echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 | |
8270 | if test "${ac_cv_c_bigendian+set}" = set; then | |
8271 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
84c041a1 | 8272 | else |
4977bab6 ZW |
8273 | ac_cv_c_bigendian=unknown |
8274 | # See if sys/param.h defines the BYTE_ORDER macro. | |
ba479fd2 | 8275 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8276 | /* confdefs.h. */ |
8277 | _ACEOF | |
8278 | cat confdefs.h >>conftest.$ac_ext | |
8279 | cat >>conftest.$ac_ext <<_ACEOF | |
8280 | /* end confdefs.h. */ | |
4977bab6 ZW |
8281 | #include <sys/types.h> |
8282 | #include <sys/param.h> | |
ba479fd2 NN |
8283 | int |
8284 | main () | |
8285 | { | |
2d6eb5bf | 8286 | |
4977bab6 ZW |
8287 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
8288 | bogus endian macros | |
84c041a1 | 8289 | #endif |
ba479fd2 NN |
8290 | ; |
8291 | return 0; | |
8292 | } | |
8293 | _ACEOF | |
8294 | rm -f conftest.$ac_objext | |
8295 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8296 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8297 | ac_status=$? |
86da66b5 HPN |
8298 | grep -v '^ *+' conftest.er1 >conftest.err |
8299 | rm -f conftest.er1 | |
8300 | cat conftest.err >&5 | |
ba479fd2 NN |
8301 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8302 | (exit $ac_status); } && | |
b095fe2c | 8303 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8304 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8305 | (eval $ac_try) 2>&5 | |
8306 | ac_status=$? | |
8307 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8308 | (exit $ac_status); }; } && | |
8309 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8310 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8311 | (eval $ac_try) 2>&5 | |
8312 | ac_status=$? | |
8313 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8314 | (exit $ac_status); }; }; then | |
4977bab6 | 8315 | # It does; now see whether it defined to BIG_ENDIAN or not. |
ba479fd2 | 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. */ | |
4977bab6 ZW |
8322 | #include <sys/types.h> |
8323 | #include <sys/param.h> | |
ba479fd2 NN |
8324 | int |
8325 | main () | |
8326 | { | |
4977bab6 ZW |
8327 | |
8328 | #if BYTE_ORDER != BIG_ENDIAN | |
8329 | not big endian | |
84c041a1 | 8330 | #endif |
ba479fd2 NN |
8331 | ; |
8332 | return 0; | |
8333 | } | |
8334 | _ACEOF | |
8335 | rm -f conftest.$ac_objext | |
8336 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8337 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8338 | ac_status=$? |
86da66b5 HPN |
8339 | grep -v '^ *+' conftest.er1 >conftest.err |
8340 | rm -f conftest.er1 | |
8341 | cat conftest.err >&5 | |
ba479fd2 NN |
8342 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8343 | (exit $ac_status); } && | |
b095fe2c | 8344 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8345 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8346 | (eval $ac_try) 2>&5 | |
8347 | ac_status=$? | |
8348 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8349 | (exit $ac_status); }; } && | |
8350 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8351 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8352 | (eval $ac_try) 2>&5 | |
8353 | ac_status=$? | |
8354 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8355 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
8356 | ac_cv_c_bigendian=yes |
8357 | else | |
ba479fd2 NN |
8358 | echo "$as_me: failed program was:" >&5 |
8359 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8360 | ||
8361 | ac_cv_c_bigendian=no | |
4977bab6 | 8362 | fi |
86da66b5 | 8363 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 8364 | else |
ba479fd2 NN |
8365 | echo "$as_me: failed program was:" >&5 |
8366 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8367 | ||
4977bab6 | 8368 | fi |
86da66b5 | 8369 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 ZW |
8370 | if test $ac_cv_c_bigendian = unknown; then |
8371 | if test "$cross_compiling" = yes; then | |
ba479fd2 NN |
8372 | echo $ac_n "cross-compiling... " 2>&6 |
8373 | else | |
8374 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8375 | /* confdefs.h. */ |
8376 | _ACEOF | |
8377 | cat confdefs.h >>conftest.$ac_ext | |
8378 | cat >>conftest.$ac_ext <<_ACEOF | |
8379 | /* end confdefs.h. */ | |
4977bab6 ZW |
8380 | main () { |
8381 | /* Are we little or big endian? From Harbison&Steele. */ | |
8382 | union | |
8383 | { | |
8384 | long l; | |
8385 | char c[sizeof (long)]; | |
8386 | } u; | |
8387 | u.l = 1; | |
8388 | exit (u.c[sizeof (long) - 1] == 1); | |
8389 | } | |
ba479fd2 NN |
8390 | _ACEOF |
8391 | rm -f conftest$ac_exeext | |
8392 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8393 | (eval $ac_link) 2>&5 | |
8394 | ac_status=$? | |
8395 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8396 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
8397 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8398 | (eval $ac_try) 2>&5 | |
8399 | ac_status=$? | |
8400 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8401 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
8402 | ac_cv_c_bigendian=no |
8403 | else | |
ba479fd2 NN |
8404 | echo "$as_me: program exited with status $ac_status" >&5 |
8405 | echo "$as_me: failed program was:" >&5 | |
8406 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8407 | ||
8408 | ( exit $ac_status ) | |
8409 | ac_cv_c_bigendian=yes | |
4977bab6 | 8410 | fi |
86da66b5 | 8411 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
84c041a1 | 8412 | fi |
4977bab6 ZW |
8413 | fi |
8414 | fi | |
ba479fd2 NN |
8415 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 |
8416 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
4977bab6 | 8417 | if test $ac_cv_c_bigendian = unknown; then |
ba479fd2 NN |
8418 | echo "$as_me:$LINENO: checking to probe for byte ordering" >&5 |
8419 | echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6 | |
2d6eb5bf | 8420 | |
4977bab6 ZW |
8421 | cat >conftest.c <<EOF |
8422 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
8423 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
8424 | void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; } | |
8425 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
8426 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
8427 | void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; } | |
8428 | int main() { _ascii (); _ebcdic (); return 0; } | |
8429 | EOF | |
8430 | if test -f conftest.c ; then | |
3beb1315 | 8431 | if ${CC-cc} ${CFLAGS} -c conftest.c -o conftest.o && test -f conftest.o ; then |
4977bab6 ZW |
8432 | if test `grep -l BIGenDianSyS conftest.o` ; then |
8433 | echo $ac_n ' big endian probe OK, ' 1>&6 | |
8434 | ac_cv_c_bigendian=yes | |
8435 | fi | |
8436 | if test `grep -l LiTTleEnDian conftest.o` ; then | |
8437 | echo $ac_n ' little endian probe OK, ' 1>&6 | |
8438 | if test $ac_cv_c_bigendian = yes ; then | |
8439 | ac_cv_c_bigendian=unknown; | |
8440 | else | |
8441 | ac_cv_c_bigendian=no | |
8442 | fi | |
8443 | fi | |
8444 | echo $ac_n 'guessing bigendian ... ' >&6 | |
8445 | fi | |
8446 | fi | |
ba479fd2 NN |
8447 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 |
8448 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
84c041a1 | 8449 | fi |
4977bab6 | 8450 | if test $ac_cv_c_bigendian = yes; then |
ba479fd2 NN |
8451 | |
8452 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 8453 | #define WORDS_BIGENDIAN 1 |
ba479fd2 | 8454 | _ACEOF |
cafe096b | 8455 | |
ba479fd2 NN |
8456 | |
8457 | cat >>confdefs.h <<\_ACEOF | |
84c041a1 | 8458 | #define HOST_WORDS_BIG_ENDIAN 1 |
ba479fd2 | 8459 | _ACEOF |
84c041a1 | 8460 | |
4977bab6 ZW |
8461 | BYTEORDER=4321 |
8462 | else | |
8463 | BYTEORDER=1234 | |
8464 | fi | |
ba479fd2 NN |
8465 | |
8466 | cat >>confdefs.h <<_ACEOF | |
4977bab6 | 8467 | #define BYTEORDER $BYTEORDER |
ba479fd2 | 8468 | _ACEOF |
4977bab6 ZW |
8469 | |
8470 | if test $ac_cv_c_bigendian = unknown; then | |
3beb1315 HPN |
8471 | { { echo "$as_me:$LINENO: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&5 |
8472 | echo "$as_me: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&2;} | |
8473 | { (exit 1); exit 1; }; } | |
84c041a1 ZW |
8474 | fi |
8475 | ||
75e93faa | 8476 | |
73458fb7 NN |
8477 | # -------- |
8478 | # UNSORTED | |
8479 | # -------- | |
1e608388 | 8480 | |
73458fb7 NN |
8481 | # Stage specific cflags for build. |
8482 | stage1_cflags= | |
8483 | case $build in | |
8484 | vax-*-*) | |
8485 | if test x$GCC = xyes | |
8486 | then | |
8487 | stage1_cflags="-Wa,-J" | |
8488 | else | |
8489 | stage1_cflags="-J" | |
8490 | fi | |
8491 | ;; | |
8492 | powerpc-*-darwin*) | |
8493 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
8494 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
8495 | # Apple's GCC has bugs in designated initializer handling, so disable | |
8496 | # that too. | |
8497 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
8498 | ;; | |
8499 | esac | |
1e608388 | 8500 | |
1e608388 | 8501 | |
4e70264f ZW |
8502 | # These libraries may be used by collect2. |
8503 | # We may need a special search path to get them linked. | |
ba479fd2 NN |
8504 | echo "$as_me:$LINENO: checking for collect2 libraries" >&5 |
8505 | echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6 | |
8506 | if test "${gcc_cv_collect2_libs+set}" = set; then | |
8507 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4e70264f ZW |
8508 | else |
8509 | save_LIBS="$LIBS" | |
7f2749d4 | 8510 | for libs in '' -lld -lmld \ |
4e70264f ZW |
8511 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
8512 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
8513 | do | |
8514 | LIBS="$libs" | |
ba479fd2 | 8515 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8516 | /* confdefs.h. */ |
8517 | _ACEOF | |
8518 | cat confdefs.h >>conftest.$ac_ext | |
8519 | cat >>conftest.$ac_ext <<_ACEOF | |
8520 | /* end confdefs.h. */ | |
8521 | ||
4e70264f | 8522 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8523 | #ifdef __cplusplus |
8524 | extern "C" | |
8525 | #endif | |
4e70264f | 8526 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8527 | builtin and then its argument prototype would still apply. */ |
8528 | char ldopen (); | |
8529 | int | |
8530 | main () | |
8531 | { | |
8532 | ldopen (); | |
8533 | ; | |
8534 | return 0; | |
8535 | } | |
8536 | _ACEOF | |
8537 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8538 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8539 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8540 | ac_status=$? |
86da66b5 HPN |
8541 | grep -v '^ *+' conftest.er1 >conftest.err |
8542 | rm -f conftest.er1 | |
8543 | cat conftest.err >&5 | |
ba479fd2 NN |
8544 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8545 | (exit $ac_status); } && | |
b095fe2c | 8546 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8547 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8548 | (eval $ac_try) 2>&5 | |
8549 | ac_status=$? | |
8550 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8551 | (exit $ac_status); }; } && | |
8552 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8553 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8554 | (eval $ac_try) 2>&5 | |
8555 | ac_status=$? | |
8556 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8557 | (exit $ac_status); }; }; then | |
4e70264f ZW |
8558 | gcc_cv_collect2_libs="$libs"; break |
8559 | else | |
ba479fd2 NN |
8560 | echo "$as_me: failed program was:" >&5 |
8561 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8562 | ||
4e70264f | 8563 | fi |
86da66b5 HPN |
8564 | rm -f conftest.err conftest.$ac_objext \ |
8565 | conftest$ac_exeext conftest.$ac_ext | |
4e70264f ZW |
8566 | done |
8567 | LIBS="$save_LIBS" | |
8568 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
8569 | fi | |
ba479fd2 NN |
8570 | echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5 |
8571 | echo "${ECHO_T}$gcc_cv_collect2_libs" >&6 | |
4e70264f ZW |
8572 | case $gcc_cv_collect2_libs in |
8573 | "none required") ;; | |
8574 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
8575 | esac | |
8576 | ||
8577 | ||
7f2749d4 RK |
8578 | # When building Ada code on Alpha, we need exc_resume which is usually in |
8579 | # -lexc. So test for it. | |
8580 | save_LIBS="$LIBS" | |
8581 | LIBS= | |
ba479fd2 NN |
8582 | echo "$as_me:$LINENO: checking for library containing exc_resume" >&5 |
8583 | echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6 | |
8584 | if test "${ac_cv_search_exc_resume+set}" = set; then | |
8585 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8586 | else | |
8587 | ac_func_search_save_LIBS=$LIBS | |
8588 | ac_cv_search_exc_resume=no | |
8589 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8590 | /* confdefs.h. */ |
8591 | _ACEOF | |
8592 | cat confdefs.h >>conftest.$ac_ext | |
8593 | cat >>conftest.$ac_ext <<_ACEOF | |
8594 | /* end confdefs.h. */ | |
7f2749d4 | 8595 | |
7f2749d4 | 8596 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8597 | #ifdef __cplusplus |
8598 | extern "C" | |
8599 | #endif | |
7f2749d4 | 8600 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8601 | builtin and then its argument prototype would still apply. */ |
8602 | char exc_resume (); | |
8603 | int | |
8604 | main () | |
8605 | { | |
8606 | exc_resume (); | |
8607 | ; | |
8608 | return 0; | |
8609 | } | |
8610 | _ACEOF | |
8611 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8612 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8613 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8614 | ac_status=$? |
86da66b5 HPN |
8615 | grep -v '^ *+' conftest.er1 >conftest.err |
8616 | rm -f conftest.er1 | |
8617 | cat conftest.err >&5 | |
ba479fd2 NN |
8618 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8619 | (exit $ac_status); } && | |
b095fe2c | 8620 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8621 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8622 | (eval $ac_try) 2>&5 | |
8623 | ac_status=$? | |
8624 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8625 | (exit $ac_status); }; } && | |
8626 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8627 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8628 | (eval $ac_try) 2>&5 | |
8629 | ac_status=$? | |
8630 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8631 | (exit $ac_status); }; }; then | |
7f2749d4 RK |
8632 | ac_cv_search_exc_resume="none required" |
8633 | else | |
ba479fd2 NN |
8634 | echo "$as_me: failed program was:" >&5 |
8635 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8636 | ||
7f2749d4 | 8637 | fi |
86da66b5 HPN |
8638 | rm -f conftest.err conftest.$ac_objext \ |
8639 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
8640 | if test "$ac_cv_search_exc_resume" = no; then |
8641 | for ac_lib in exc; do | |
8642 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8643 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8644 | /* confdefs.h. */ |
8645 | _ACEOF | |
8646 | cat confdefs.h >>conftest.$ac_ext | |
8647 | cat >>conftest.$ac_ext <<_ACEOF | |
8648 | /* end confdefs.h. */ | |
8649 | ||
7f2749d4 | 8650 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8651 | #ifdef __cplusplus |
8652 | extern "C" | |
8653 | #endif | |
7f2749d4 | 8654 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8655 | builtin and then its argument prototype would still apply. */ |
8656 | char exc_resume (); | |
8657 | int | |
8658 | main () | |
8659 | { | |
8660 | exc_resume (); | |
8661 | ; | |
8662 | return 0; | |
8663 | } | |
8664 | _ACEOF | |
8665 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8666 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8667 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8668 | ac_status=$? |
86da66b5 HPN |
8669 | grep -v '^ *+' conftest.er1 >conftest.err |
8670 | rm -f conftest.er1 | |
8671 | cat conftest.err >&5 | |
ba479fd2 NN |
8672 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8673 | (exit $ac_status); } && | |
b095fe2c | 8674 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8675 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8676 | (eval $ac_try) 2>&5 | |
8677 | ac_status=$? | |
8678 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8679 | (exit $ac_status); }; } && | |
8680 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8681 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8682 | (eval $ac_try) 2>&5 | |
8683 | ac_status=$? | |
8684 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8685 | (exit $ac_status); }; }; then | |
8686 | ac_cv_search_exc_resume="-l$ac_lib" | |
7f2749d4 RK |
8687 | break |
8688 | else | |
ba479fd2 NN |
8689 | echo "$as_me: failed program was:" >&5 |
8690 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8691 | ||
cafe096b | 8692 | fi |
86da66b5 HPN |
8693 | rm -f conftest.err conftest.$ac_objext \ |
8694 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 8695 | done |
6e3f3080 | 8696 | fi |
ba479fd2 NN |
8697 | LIBS=$ac_func_search_save_LIBS |
8698 | fi | |
8699 | echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5 | |
8700 | echo "${ECHO_T}$ac_cv_search_exc_resume" >&6 | |
8701 | if test "$ac_cv_search_exc_resume" != no; then | |
63cf211a | 8702 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" |
ba479fd2 | 8703 | |
7f2749d4 | 8704 | fi |
ba479fd2 | 8705 | |
7f2749d4 RK |
8706 | GNAT_LIBEXC="$LIBS" |
8707 | LIBS="$save_LIBS" | |
8708 | ||
8709 | ||
62c9aa5f ZW |
8710 | # Some systems put ldexp and frexp in libm instead of libc; assume |
8711 | # they're both in the same place. jcf-dump needs them. | |
8712 | save_LIBS="$LIBS" | |
8713 | LIBS= | |
ba479fd2 NN |
8714 | echo "$as_me:$LINENO: checking for library containing ldexp" >&5 |
8715 | echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6 | |
8716 | if test "${ac_cv_search_ldexp+set}" = set; then | |
8717 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8718 | else | |
8719 | ac_func_search_save_LIBS=$LIBS | |
8720 | ac_cv_search_ldexp=no | |
8721 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8722 | /* confdefs.h. */ |
8723 | _ACEOF | |
8724 | cat confdefs.h >>conftest.$ac_ext | |
8725 | cat >>conftest.$ac_ext <<_ACEOF | |
8726 | /* end confdefs.h. */ | |
62c9aa5f | 8727 | |
62c9aa5f | 8728 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8729 | #ifdef __cplusplus |
8730 | extern "C" | |
8731 | #endif | |
62c9aa5f | 8732 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8733 | builtin and then its argument prototype would still apply. */ |
8734 | char ldexp (); | |
8735 | int | |
8736 | main () | |
8737 | { | |
8738 | ldexp (); | |
8739 | ; | |
8740 | return 0; | |
8741 | } | |
8742 | _ACEOF | |
8743 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8744 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8745 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8746 | ac_status=$? |
86da66b5 HPN |
8747 | grep -v '^ *+' conftest.er1 >conftest.err |
8748 | rm -f conftest.er1 | |
8749 | cat conftest.err >&5 | |
ba479fd2 NN |
8750 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8751 | (exit $ac_status); } && | |
b095fe2c | 8752 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8753 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8754 | (eval $ac_try) 2>&5 | |
8755 | ac_status=$? | |
8756 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8757 | (exit $ac_status); }; } && | |
8758 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8759 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8760 | (eval $ac_try) 2>&5 | |
8761 | ac_status=$? | |
8762 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8763 | (exit $ac_status); }; }; then | |
62c9aa5f ZW |
8764 | ac_cv_search_ldexp="none required" |
8765 | else | |
ba479fd2 NN |
8766 | echo "$as_me: failed program was:" >&5 |
8767 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8768 | ||
62c9aa5f | 8769 | fi |
86da66b5 HPN |
8770 | rm -f conftest.err conftest.$ac_objext \ |
8771 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
8772 | if test "$ac_cv_search_ldexp" = no; then |
8773 | for ac_lib in m; do | |
8774 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8775 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8776 | /* confdefs.h. */ |
8777 | _ACEOF | |
8778 | cat confdefs.h >>conftest.$ac_ext | |
8779 | cat >>conftest.$ac_ext <<_ACEOF | |
8780 | /* end confdefs.h. */ | |
8781 | ||
62c9aa5f | 8782 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8783 | #ifdef __cplusplus |
8784 | extern "C" | |
8785 | #endif | |
62c9aa5f | 8786 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8787 | builtin and then its argument prototype would still apply. */ |
8788 | char ldexp (); | |
8789 | int | |
8790 | main () | |
8791 | { | |
8792 | ldexp (); | |
8793 | ; | |
8794 | return 0; | |
8795 | } | |
8796 | _ACEOF | |
8797 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8798 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8799 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8800 | ac_status=$? |
86da66b5 HPN |
8801 | grep -v '^ *+' conftest.er1 >conftest.err |
8802 | rm -f conftest.er1 | |
8803 | cat conftest.err >&5 | |
ba479fd2 NN |
8804 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8805 | (exit $ac_status); } && | |
b095fe2c | 8806 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8807 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8808 | (eval $ac_try) 2>&5 | |
8809 | ac_status=$? | |
8810 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8811 | (exit $ac_status); }; } && | |
8812 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8813 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8814 | (eval $ac_try) 2>&5 | |
8815 | ac_status=$? | |
8816 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8817 | (exit $ac_status); }; }; then | |
8818 | ac_cv_search_ldexp="-l$ac_lib" | |
62c9aa5f ZW |
8819 | break |
8820 | else | |
ba479fd2 NN |
8821 | echo "$as_me: failed program was:" >&5 |
8822 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8823 | ||
cafe096b | 8824 | fi |
86da66b5 HPN |
8825 | rm -f conftest.err conftest.$ac_objext \ |
8826 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 8827 | done |
6e3f3080 | 8828 | fi |
ba479fd2 NN |
8829 | LIBS=$ac_func_search_save_LIBS |
8830 | fi | |
8831 | echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5 | |
8832 | echo "${ECHO_T}$ac_cv_search_ldexp" >&6 | |
8833 | if test "$ac_cv_search_ldexp" != no; then | |
63cf211a | 8834 | test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" |
ba479fd2 | 8835 | |
62c9aa5f | 8836 | fi |
ba479fd2 | 8837 | |
62c9aa5f ZW |
8838 | LDEXP_LIB="$LIBS" |
8839 | LIBS="$save_LIBS" | |
8840 | ||
8841 | ||
956d6950 JL |
8842 | # Use <inttypes.h> only if it exists, |
8843 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
ba479fd2 NN |
8844 | echo "$as_me:$LINENO: checking for inttypes.h" >&5 |
8845 | echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 | |
8846 | if test "${gcc_cv_header_inttypes_h+set}" = set; then | |
8847 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8848 | else | |
8849 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8850 | /* confdefs.h. */ |
8851 | _ACEOF | |
8852 | cat confdefs.h >>conftest.$ac_ext | |
8853 | cat >>conftest.$ac_ext <<_ACEOF | |
8854 | /* end confdefs.h. */ | |
956d6950 JL |
8855 | #include <sys/types.h> |
8856 | #include <inttypes.h> | |
ba479fd2 NN |
8857 | int |
8858 | main () | |
8859 | { | |
956d6950 | 8860 | intmax_t i = -1; |
ba479fd2 NN |
8861 | ; |
8862 | return 0; | |
8863 | } | |
8864 | _ACEOF | |
8865 | rm -f conftest.$ac_objext | |
8866 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8867 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8868 | ac_status=$? |
86da66b5 HPN |
8869 | grep -v '^ *+' conftest.er1 >conftest.err |
8870 | rm -f conftest.er1 | |
8871 | cat conftest.err >&5 | |
ba479fd2 NN |
8872 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8873 | (exit $ac_status); } && | |
b095fe2c | 8874 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8875 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8876 | (eval $ac_try) 2>&5 | |
8877 | ac_status=$? | |
8878 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8879 | (exit $ac_status); }; } && | |
8880 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8881 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8882 | (eval $ac_try) 2>&5 | |
8883 | ac_status=$? | |
8884 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8885 | (exit $ac_status); }; }; then | |
0056a9b5 | 8886 | gcc_cv_header_inttypes_h=yes |
956d6950 | 8887 | else |
ba479fd2 NN |
8888 | echo "$as_me: failed program was:" >&5 |
8889 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8890 | ||
8891 | gcc_cv_header_inttypes_h=no | |
956d6950 | 8892 | fi |
86da66b5 | 8893 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
8894 | fi |
8895 | ||
ba479fd2 NN |
8896 | echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5 |
8897 | echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6 | |
0056a9b5 | 8898 | if test $gcc_cv_header_inttypes_h = yes; then |
ba479fd2 NN |
8899 | |
8900 | cat >>confdefs.h <<\_ACEOF | |
0056a9b5 | 8901 | #define HAVE_INTTYPES_H 1 |
ba479fd2 | 8902 | _ACEOF |
0056a9b5 KG |
8903 | |
8904 | fi | |
956d6950 | 8905 | |
c149cc37 | 8906 | |
ba479fd2 NN |
8907 | |
8908 | ||
8909 | ||
8910 | ||
8911 | ||
8912 | ||
8913 | ||
8914 | ||
8915 | ||
8916 | ||
8917 | ||
8918 | ||
8919 | ||
8920 | ||
8921 | ||
8922 | ||
8923 | ||
8924 | ||
8925 | ||
8926 | ||
8927 | ||
8928 | ||
8929 | ||
8930 | ||
8931 | ||
6af8c740 KG |
8932 | for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \ |
8933 | sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \ | |
4e87a651 | 8934 | fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \ |
56694dd9 ZW |
8935 | scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \ |
8936 | setlocale | |
956d6950 | 8937 | do |
ba479fd2 NN |
8938 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
8939 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
8940 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
8941 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
8942 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8943 | else | |
8944 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8945 | /* confdefs.h. */ |
8946 | _ACEOF | |
8947 | cat confdefs.h >>conftest.$ac_ext | |
8948 | cat >>conftest.$ac_ext <<_ACEOF | |
8949 | /* end confdefs.h. */ | |
86da66b5 HPN |
8950 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
8951 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
8952 | #define $ac_func innocuous_$ac_func | |
8953 | ||
956d6950 | 8954 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
8955 | which can conflict with char $ac_func (); below. |
8956 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
8957 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 8958 | |
ba479fd2 NN |
8959 | #ifdef __STDC__ |
8960 | # include <limits.h> | |
8961 | #else | |
8962 | # include <assert.h> | |
8963 | #endif | |
86da66b5 HPN |
8964 | |
8965 | #undef $ac_func | |
8966 | ||
6e3f3080 | 8967 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8968 | #ifdef __cplusplus |
8969 | extern "C" | |
8970 | { | |
8971 | #endif | |
6e3f3080 | 8972 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8973 | builtin and then its argument prototype would still apply. */ |
8974 | char $ac_func (); | |
956d6950 JL |
8975 | /* The GNU C library defines this for functions which it implements |
8976 | to always fail with ENOSYS. Some functions are actually named | |
8977 | something starting with __ and the normal name is an alias. */ | |
8978 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
8979 | choke me | |
8980 | #else | |
ba479fd2 NN |
8981 | char (*f) () = $ac_func; |
8982 | #endif | |
8983 | #ifdef __cplusplus | |
8984 | } | |
956d6950 JL |
8985 | #endif |
8986 | ||
ba479fd2 NN |
8987 | int |
8988 | main () | |
8989 | { | |
8990 | return f != $ac_func; | |
8991 | ; | |
8992 | return 0; | |
8993 | } | |
8994 | _ACEOF | |
8995 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8996 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8997 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8998 | ac_status=$? |
86da66b5 HPN |
8999 | grep -v '^ *+' conftest.er1 >conftest.err |
9000 | rm -f conftest.er1 | |
9001 | cat conftest.err >&5 | |
ba479fd2 NN |
9002 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9003 | (exit $ac_status); } && | |
b095fe2c | 9004 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9005 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9006 | (eval $ac_try) 2>&5 | |
9007 | ac_status=$? | |
9008 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9009 | (exit $ac_status); }; } && | |
9010 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9011 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9012 | (eval $ac_try) 2>&5 | |
9013 | ac_status=$? | |
9014 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9015 | (exit $ac_status); }; }; then | |
9016 | eval "$as_ac_var=yes" | |
9017 | else | |
9018 | echo "$as_me: failed program was:" >&5 | |
9019 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9020 | ||
9021 | eval "$as_ac_var=no" | |
9022 | fi | |
86da66b5 HPN |
9023 | rm -f conftest.err conftest.$ac_objext \ |
9024 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
9025 | fi |
9026 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
9027 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
9028 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
9029 | cat >>confdefs.h <<_ACEOF | |
9030 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9031 | _ACEOF | |
956d6950 | 9032 | |
956d6950 JL |
9033 | fi |
9034 | done | |
9035 | ||
6885fc87 | 9036 | |
39f6c4c8 | 9037 | if test x$ac_cv_func_mbstowcs = xyes; then |
ba479fd2 NN |
9038 | echo "$as_me:$LINENO: checking whether mbstowcs works" >&5 |
9039 | echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6 | |
9040 | if test "${gcc_cv_func_mbstowcs_works+set}" = set; then | |
9041 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
39f6c4c8 KW |
9042 | else |
9043 | if test "$cross_compiling" = yes; then | |
9044 | gcc_cv_func_mbstowcs_works=yes | |
9045 | else | |
ba479fd2 | 9046 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9047 | /* confdefs.h. */ |
9048 | _ACEOF | |
9049 | cat confdefs.h >>conftest.$ac_ext | |
9050 | cat >>conftest.$ac_ext <<_ACEOF | |
9051 | /* end confdefs.h. */ | |
39f6c4c8 KW |
9052 | #include <stdlib.h> |
9053 | int main() | |
9054 | { | |
9055 | mbstowcs(0, "", 0); | |
9056 | return 0; | |
9057 | } | |
ba479fd2 NN |
9058 | _ACEOF |
9059 | rm -f conftest$ac_exeext | |
9060 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9061 | (eval $ac_link) 2>&5 | |
9062 | ac_status=$? | |
9063 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9064 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9065 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9066 | (eval $ac_try) 2>&5 | |
9067 | ac_status=$? | |
9068 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9069 | (exit $ac_status); }; }; then | |
39f6c4c8 KW |
9070 | gcc_cv_func_mbstowcs_works=yes |
9071 | else | |
ba479fd2 NN |
9072 | echo "$as_me: program exited with status $ac_status" >&5 |
9073 | echo "$as_me: failed program was:" >&5 | |
9074 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9075 | ||
9076 | ( exit $ac_status ) | |
9077 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 9078 | fi |
86da66b5 | 9079 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
39f6c4c8 | 9080 | fi |
39f6c4c8 | 9081 | fi |
ba479fd2 NN |
9082 | echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5 |
9083 | echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6 | |
63cf211a | 9084 | if test x$gcc_cv_func_mbstowcs_works = xyes; then |
ba479fd2 NN |
9085 | |
9086 | cat >>confdefs.h <<\_ACEOF | |
39f6c4c8 | 9087 | #define HAVE_WORKING_MBSTOWCS 1 |
ba479fd2 | 9088 | _ACEOF |
39f6c4c8 KW |
9089 | |
9090 | fi | |
9091 | fi | |
9092 | ||
ba479fd2 NN |
9093 | echo "$as_me:$LINENO: checking for ssize_t" >&5 |
9094 | echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 | |
9095 | if test "${ac_cv_type_ssize_t+set}" = set; then | |
9096 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
63cf211a | 9097 | else |
ba479fd2 | 9098 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9099 | /* confdefs.h. */ |
9100 | _ACEOF | |
9101 | cat confdefs.h >>conftest.$ac_ext | |
9102 | cat >>conftest.$ac_ext <<_ACEOF | |
9103 | /* end confdefs.h. */ | |
8b4fc07a NN |
9104 | $ac_includes_default |
9105 | int | |
9106 | main () | |
9107 | { | |
9108 | if ((ssize_t *) 0) | |
9109 | return 0; | |
9110 | if (sizeof (ssize_t)) | |
9111 | return 0; | |
9112 | ; | |
9113 | return 0; | |
9114 | } | |
ba479fd2 | 9115 | _ACEOF |
8b4fc07a NN |
9116 | rm -f conftest.$ac_objext |
9117 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9118 | (eval $ac_compile) 2>conftest.er1 |
8b4fc07a | 9119 | ac_status=$? |
86da66b5 HPN |
9120 | grep -v '^ *+' conftest.er1 >conftest.err |
9121 | rm -f conftest.er1 | |
9122 | cat conftest.err >&5 | |
8b4fc07a NN |
9123 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9124 | (exit $ac_status); } && | |
b095fe2c | 9125 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9126 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9127 | (eval $ac_try) 2>&5 | |
9128 | ac_status=$? | |
9129 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9130 | (exit $ac_status); }; } && | |
9131 | { ac_try='test -s conftest.$ac_objext' | |
8b4fc07a NN |
9132 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9133 | (eval $ac_try) 2>&5 | |
9134 | ac_status=$? | |
9135 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9136 | (exit $ac_status); }; }; then | |
cb65112a | 9137 | ac_cv_type_ssize_t=yes |
f12bc141 | 9138 | else |
8b4fc07a NN |
9139 | echo "$as_me: failed program was:" >&5 |
9140 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 9141 | |
8b4fc07a NN |
9142 | ac_cv_type_ssize_t=no |
9143 | fi | |
86da66b5 | 9144 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 9145 | fi |
ba479fd2 NN |
9146 | echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 |
9147 | echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 | |
8b4fc07a NN |
9148 | if test $ac_cv_type_ssize_t = yes; then |
9149 | : | |
9150 | else | |
ba479fd2 | 9151 | |
8b4fc07a | 9152 | cat >>confdefs.h <<_ACEOF |
f12bc141 | 9153 | #define ssize_t int |
ba479fd2 | 9154 | _ACEOF |
f12bc141 ZW |
9155 | |
9156 | fi | |
9157 | ||
0b9d02c6 | 9158 | |
e256b8b6 DA |
9159 | # Try to determine the array type of the second argument of getgroups |
9160 | # for the target system (int or gid_t). | |
ba479fd2 NN |
9161 | echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 |
9162 | echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 | |
9163 | if test "${ac_cv_type_uid_t+set}" = set; then | |
9164 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9165 | else | |
9166 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9167 | /* confdefs.h. */ |
9168 | _ACEOF | |
9169 | cat confdefs.h >>conftest.$ac_ext | |
9170 | cat >>conftest.$ac_ext <<_ACEOF | |
9171 | /* end confdefs.h. */ | |
e256b8b6 | 9172 | #include <sys/types.h> |
ba479fd2 NN |
9173 | |
9174 | _ACEOF | |
e256b8b6 | 9175 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9176 | $EGREP "uid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
9177 | ac_cv_type_uid_t=yes |
9178 | else | |
e256b8b6 DA |
9179 | ac_cv_type_uid_t=no |
9180 | fi | |
9181 | rm -f conftest* | |
9182 | ||
9183 | fi | |
ba479fd2 NN |
9184 | echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 |
9185 | echo "${ECHO_T}$ac_cv_type_uid_t" >&6 | |
63cf211a | 9186 | if test $ac_cv_type_uid_t = no; then |
ba479fd2 NN |
9187 | |
9188 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 9189 | #define uid_t int |
ba479fd2 | 9190 | _ACEOF |
cafe096b | 9191 | |
ba479fd2 NN |
9192 | |
9193 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 9194 | #define gid_t int |
ba479fd2 | 9195 | _ACEOF |
e256b8b6 DA |
9196 | |
9197 | fi | |
9198 | ||
ba479fd2 NN |
9199 | echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 |
9200 | echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 | |
9201 | if test "${ac_cv_type_getgroups+set}" = set; then | |
9202 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e256b8b6 DA |
9203 | else |
9204 | if test "$cross_compiling" = yes; then | |
9205 | ac_cv_type_getgroups=cross | |
9206 | else | |
ba479fd2 | 9207 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9208 | /* confdefs.h. */ |
9209 | _ACEOF | |
9210 | cat confdefs.h >>conftest.$ac_ext | |
9211 | cat >>conftest.$ac_ext <<_ACEOF | |
9212 | /* end confdefs.h. */ | |
e256b8b6 DA |
9213 | /* Thanks to Mike Rendell for this test. */ |
9214 | #include <sys/types.h> | |
9215 | #define NGID 256 | |
9216 | #undef MAX | |
9217 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
ba479fd2 NN |
9218 | |
9219 | int | |
9220 | main () | |
e256b8b6 DA |
9221 | { |
9222 | gid_t gidset[NGID]; | |
9223 | int i, n; | |
9224 | union { gid_t gval; long lval; } val; | |
9225 | ||
9226 | val.lval = -1; | |
9227 | for (i = 0; i < NGID; i++) | |
9228 | gidset[i] = val.gval; | |
9229 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
86da66b5 | 9230 | gidset); |
e256b8b6 DA |
9231 | /* Exit non-zero if getgroups seems to require an array of ints. This |
9232 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
9233 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
63cf211a | 9234 | } |
ba479fd2 NN |
9235 | _ACEOF |
9236 | rm -f conftest$ac_exeext | |
9237 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9238 | (eval $ac_link) 2>&5 | |
9239 | ac_status=$? | |
9240 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9241 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9242 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9243 | (eval $ac_try) 2>&5 | |
9244 | ac_status=$? | |
9245 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9246 | (exit $ac_status); }; }; then | |
9247 | ac_cv_type_getgroups=gid_t | |
63cf211a | 9248 | else |
ba479fd2 NN |
9249 | echo "$as_me: program exited with status $ac_status" >&5 |
9250 | echo "$as_me: failed program was:" >&5 | |
9251 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9252 | ||
9253 | ( exit $ac_status ) | |
9254 | ac_cv_type_getgroups=int | |
e256b8b6 | 9255 | fi |
86da66b5 | 9256 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
e256b8b6 | 9257 | fi |
e256b8b6 | 9258 | if test $ac_cv_type_getgroups = cross; then |
ba479fd2 | 9259 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9260 | /* confdefs.h. */ |
9261 | _ACEOF | |
9262 | cat confdefs.h >>conftest.$ac_ext | |
9263 | cat >>conftest.$ac_ext <<_ACEOF | |
9264 | /* end confdefs.h. */ | |
e256b8b6 | 9265 | #include <unistd.h> |
ba479fd2 NN |
9266 | |
9267 | _ACEOF | |
e256b8b6 | 9268 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9269 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
9270 | ac_cv_type_getgroups=gid_t |
9271 | else | |
e256b8b6 DA |
9272 | ac_cv_type_getgroups=int |
9273 | fi | |
9274 | rm -f conftest* | |
9275 | ||
9276 | fi | |
9277 | fi | |
ba479fd2 NN |
9278 | echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 |
9279 | echo "${ECHO_T}$ac_cv_type_getgroups" >&6 | |
e256b8b6 | 9280 | |
ba479fd2 | 9281 | cat >>confdefs.h <<_ACEOF |
e256b8b6 | 9282 | #define GETGROUPS_T $ac_cv_type_getgroups |
ba479fd2 | 9283 | _ACEOF |
e256b8b6 DA |
9284 | |
9285 | ||
9286 | if test "${target}" = "${build}"; then | |
9287 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
9288 | else | |
9289 | case "${target}" in | |
9290 | # This condition may need some tweaking. It should include all | |
9291 | # targets where the array type of the second argument of getgroups | |
9292 | # is int and the type of gid_t is not equivalent to int. | |
9293 | *-*-sunos* | *-*-ultrix*) | |
9294 | TARGET_GETGROUPS_T=int | |
9295 | ;; | |
9296 | *) | |
9297 | TARGET_GETGROUPS_T=gid_t | |
9298 | ;; | |
9299 | esac | |
9300 | fi | |
9301 | ||
9302 | ||
ba479fd2 NN |
9303 | echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5 |
9304 | echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6 | |
9305 | if test "${gcc_cv_func_printf_ptr+set}" = set; then | |
9306 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
9307 | else |
9308 | if test "$cross_compiling" = yes; then | |
9309 | gcc_cv_func_printf_ptr=no | |
9310 | else | |
ba479fd2 | 9311 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9312 | /* confdefs.h. */ |
9313 | _ACEOF | |
9314 | cat confdefs.h >>conftest.$ac_ext | |
9315 | cat >>conftest.$ac_ext <<_ACEOF | |
9316 | /* end confdefs.h. */ | |
0a4b6309 RL |
9317 | #include <stdio.h> |
9318 | ||
86cf1cbd | 9319 | int main() |
0a4b6309 RL |
9320 | { |
9321 | char buf[64]; | |
9322 | char *p = buf, *q = NULL; | |
9323 | sprintf(buf, "%p", p); | |
9324 | sscanf(buf, "%p", &q); | |
86cf1cbd | 9325 | return (p != q); |
0a4b6309 | 9326 | } |
ba479fd2 NN |
9327 | _ACEOF |
9328 | rm -f conftest$ac_exeext | |
9329 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9330 | (eval $ac_link) 2>&5 | |
9331 | ac_status=$? | |
9332 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9333 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9334 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9335 | (eval $ac_try) 2>&5 | |
9336 | ac_status=$? | |
9337 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9338 | (exit $ac_status); }; }; then | |
0a4b6309 RL |
9339 | gcc_cv_func_printf_ptr=yes |
9340 | else | |
ba479fd2 NN |
9341 | echo "$as_me: program exited with status $ac_status" >&5 |
9342 | echo "$as_me: failed program was:" >&5 | |
9343 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9344 | ||
9345 | ( exit $ac_status ) | |
9346 | gcc_cv_func_printf_ptr=no | |
0a4b6309 | 9347 | fi |
86da66b5 | 9348 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
0a4b6309 | 9349 | fi |
0a4b6309 RL |
9350 | rm -f core core.* *.core |
9351 | fi | |
ba479fd2 NN |
9352 | echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5 |
9353 | echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6 | |
63cf211a | 9354 | if test $gcc_cv_func_printf_ptr = yes ; then |
ba479fd2 NN |
9355 | |
9356 | cat >>confdefs.h <<\_ACEOF | |
0a4b6309 | 9357 | #define HAVE_PRINTF_PTR 1 |
ba479fd2 | 9358 | _ACEOF |
0a4b6309 RL |
9359 | |
9360 | fi | |
9361 | ||
3b0727a0 MR |
9362 | |
9363 | echo "$as_me:$LINENO: checking for sys/mman.h" >&5 | |
9364 | echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6 | |
9365 | if test "${ac_cv_header_sys_mman_h+set}" = set; then | |
9366 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9367 | else | |
9368 | cat >conftest.$ac_ext <<_ACEOF | |
9369 | /* confdefs.h. */ | |
9370 | _ACEOF | |
9371 | cat confdefs.h >>conftest.$ac_ext | |
9372 | cat >>conftest.$ac_ext <<_ACEOF | |
9373 | /* end confdefs.h. */ | |
9374 | #include <sys/mman.h> | |
9375 | _ACEOF | |
9376 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
9377 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
9378 | ac_status=$? | |
9379 | grep -v '^ *+' conftest.er1 >conftest.err | |
9380 | rm -f conftest.er1 | |
9381 | cat conftest.err >&5 | |
9382 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9383 | (exit $ac_status); } >/dev/null; then | |
9384 | if test -s conftest.err; then | |
9385 | ac_cpp_err=$ac_c_preproc_warn_flag | |
9386 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
9387 | else | |
9388 | ac_cpp_err= | |
9389 | fi | |
9390 | else | |
9391 | ac_cpp_err=yes | |
9392 | fi | |
9393 | if test -z "$ac_cpp_err"; then | |
9394 | ac_cv_header_sys_mman_h=yes | |
9395 | else | |
9396 | echo "$as_me: failed program was:" >&5 | |
9397 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9398 | ||
9399 | ac_cv_header_sys_mman_h=no | |
9400 | fi | |
9401 | rm -f conftest.err conftest.$ac_ext | |
9402 | fi | |
9403 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5 | |
9404 | echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6 | |
9405 | if test $ac_cv_header_sys_mman_h = yes; then | |
9406 | gcc_header_sys_mman_h=yes | |
9407 | else | |
9408 | gcc_header_sys_mman_h=no | |
9409 | fi | |
9410 | ||
9411 | echo "$as_me:$LINENO: checking for mmap" >&5 | |
9412 | echo $ECHO_N "checking for mmap... $ECHO_C" >&6 | |
9413 | if test "${ac_cv_func_mmap+set}" = set; then | |
9414 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9415 | else | |
9416 | cat >conftest.$ac_ext <<_ACEOF | |
9417 | /* confdefs.h. */ | |
9418 | _ACEOF | |
9419 | cat confdefs.h >>conftest.$ac_ext | |
9420 | cat >>conftest.$ac_ext <<_ACEOF | |
9421 | /* end confdefs.h. */ | |
9422 | /* Define mmap to an innocuous variant, in case <limits.h> declares mmap. | |
9423 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9424 | #define mmap innocuous_mmap | |
9425 | ||
9426 | /* System header to define __stub macros and hopefully few prototypes, | |
9427 | which can conflict with char mmap (); below. | |
9428 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9429 | <limits.h> exists even on freestanding compilers. */ | |
9430 | ||
9431 | #ifdef __STDC__ | |
9432 | # include <limits.h> | |
9433 | #else | |
9434 | # include <assert.h> | |
9435 | #endif | |
9436 | ||
9437 | #undef mmap | |
9438 | ||
9439 | /* Override any gcc2 internal prototype to avoid an error. */ | |
9440 | #ifdef __cplusplus | |
9441 | extern "C" | |
9442 | { | |
9443 | #endif | |
9444 | /* We use char because int might match the return type of a gcc2 | |
9445 | builtin and then its argument prototype would still apply. */ | |
9446 | char mmap (); | |
9447 | /* The GNU C library defines this for functions which it implements | |
9448 | to always fail with ENOSYS. Some functions are actually named | |
9449 | something starting with __ and the normal name is an alias. */ | |
9450 | #if defined (__stub_mmap) || defined (__stub___mmap) | |
9451 | choke me | |
9452 | #else | |
9453 | char (*f) () = mmap; | |
9454 | #endif | |
9455 | #ifdef __cplusplus | |
9456 | } | |
9457 | #endif | |
9458 | ||
9459 | int | |
9460 | main () | |
9461 | { | |
9462 | return f != mmap; | |
9463 | ; | |
9464 | return 0; | |
9465 | } | |
9466 | _ACEOF | |
9467 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9468 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9469 | (eval $ac_link) 2>conftest.er1 | |
9470 | ac_status=$? | |
9471 | grep -v '^ *+' conftest.er1 >conftest.err | |
9472 | rm -f conftest.er1 | |
9473 | cat conftest.err >&5 | |
9474 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9475 | (exit $ac_status); } && | |
b095fe2c | 9476 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
3b0727a0 MR |
9477 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9478 | (eval $ac_try) 2>&5 | |
9479 | ac_status=$? | |
9480 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9481 | (exit $ac_status); }; } && | |
9482 | { ac_try='test -s conftest$ac_exeext' | |
9483 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9484 | (eval $ac_try) 2>&5 | |
9485 | ac_status=$? | |
9486 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9487 | (exit $ac_status); }; }; then | |
9488 | ac_cv_func_mmap=yes | |
9489 | else | |
9490 | echo "$as_me: failed program was:" >&5 | |
9491 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9492 | ||
9493 | ac_cv_func_mmap=no | |
9494 | fi | |
9495 | rm -f conftest.err conftest.$ac_objext \ | |
9496 | conftest$ac_exeext conftest.$ac_ext | |
9497 | fi | |
9498 | echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 | |
9499 | echo "${ECHO_T}$ac_cv_func_mmap" >&6 | |
9500 | if test $ac_cv_func_mmap = yes; then | |
9501 | gcc_func_mmap=yes | |
9502 | else | |
9503 | gcc_func_mmap=no | |
9504 | fi | |
9505 | ||
9506 | if test "$gcc_header_sys_mman_h" != yes \ | |
9507 | || test "$gcc_func_mmap" != yes; then | |
1072ec3f ZW |
9508 | gcc_cv_func_mmap_file=no |
9509 | gcc_cv_func_mmap_dev_zero=no | |
9510 | gcc_cv_func_mmap_anon=no | |
9511 | else | |
ba479fd2 NN |
9512 | echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5 |
9513 | echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6 | |
9514 | if test "${gcc_cv_func_mmap_file+set}" = set; then | |
9515 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f | 9516 | else |
ba479fd2 | 9517 | # Add a system to this blacklist if |
1072ec3f ZW |
9518 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a |
9519 | # memory area containing the same data that you'd get if you applied | |
9520 | # read() to the same fd. The only system known to have a problem here | |
9521 | # is VMS, where text files have record structure. | |
9522 | case "$host_os" in | |
ba479fd2 | 9523 | vms* | ultrix*) |
1072ec3f ZW |
9524 | gcc_cv_func_mmap_file=no ;; |
9525 | *) | |
9526 | gcc_cv_func_mmap_file=yes;; | |
9527 | esac | |
9528 | fi | |
ba479fd2 NN |
9529 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5 |
9530 | echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6 | |
9531 | echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5 | |
9532 | echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6 | |
9533 | if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then | |
9534 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
9535 | else |
9536 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
9537 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
9538 | # zeroed pages with both the following properties: | |
9539 | # 1. If you map N consecutive pages in with one call, and then | |
9540 | # unmap any subset of those pages, the pages that were not | |
9541 | # explicitly unmapped remain accessible. | |
9542 | # 2. If you map two adjacent blocks of memory and then unmap them | |
9543 | # both at once, they must both go away. | |
9544 | # Systems known to be in this category are Windows (all variants), | |
9545 | # VMS, and Darwin. | |
9546 | case "$host_os" in | |
2ce240d3 | 9547 | vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) |
1072ec3f ZW |
9548 | gcc_cv_func_mmap_dev_zero=no ;; |
9549 | *) | |
9550 | gcc_cv_func_mmap_dev_zero=yes;; | |
9551 | esac | |
9552 | fi | |
ba479fd2 NN |
9553 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5 |
9554 | echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6 | |
1072ec3f ZW |
9555 | |
9556 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
ba479fd2 NN |
9557 | echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5 |
9558 | echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6 | |
9559 | if test "${gcc_cv_decl_map_anon+set}" = set; then | |
9560 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9561 | else | |
9562 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9563 | /* confdefs.h. */ |
9564 | _ACEOF | |
9565 | cat confdefs.h >>conftest.$ac_ext | |
9566 | cat >>conftest.$ac_ext <<_ACEOF | |
9567 | /* end confdefs.h. */ | |
1072ec3f ZW |
9568 | #include <sys/types.h> |
9569 | #include <sys/mman.h> | |
9570 | #include <unistd.h> | |
9571 | ||
9572 | #ifndef MAP_ANONYMOUS | |
9573 | #define MAP_ANONYMOUS MAP_ANON | |
9574 | #endif | |
9575 | ||
ba479fd2 NN |
9576 | int |
9577 | main () | |
9578 | { | |
1072ec3f | 9579 | int n = MAP_ANONYMOUS; |
ba479fd2 NN |
9580 | ; |
9581 | return 0; | |
9582 | } | |
9583 | _ACEOF | |
9584 | rm -f conftest.$ac_objext | |
9585 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9586 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9587 | ac_status=$? |
86da66b5 HPN |
9588 | grep -v '^ *+' conftest.er1 >conftest.err |
9589 | rm -f conftest.er1 | |
9590 | cat conftest.err >&5 | |
ba479fd2 NN |
9591 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9592 | (exit $ac_status); } && | |
b095fe2c | 9593 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9594 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9595 | (eval $ac_try) 2>&5 | |
9596 | ac_status=$? | |
9597 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9598 | (exit $ac_status); }; } && | |
9599 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9600 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9601 | (eval $ac_try) 2>&5 | |
9602 | ac_status=$? | |
9603 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9604 | (exit $ac_status); }; }; then | |
1072ec3f ZW |
9605 | gcc_cv_decl_map_anon=yes |
9606 | else | |
ba479fd2 NN |
9607 | echo "$as_me: failed program was:" >&5 |
9608 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9609 | ||
9610 | gcc_cv_decl_map_anon=no | |
1072ec3f | 9611 | fi |
86da66b5 | 9612 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
1072ec3f | 9613 | fi |
ba479fd2 NN |
9614 | echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5 |
9615 | echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6 | |
1072ec3f ZW |
9616 | |
9617 | if test $gcc_cv_decl_map_anon = no; then | |
9618 | gcc_cv_func_mmap_anon=no | |
9619 | else | |
ba479fd2 NN |
9620 | echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
9621 | echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6 | |
9622 | if test "${gcc_cv_func_mmap_anon+set}" = set; then | |
9623 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
9624 | else |
9625 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
9626 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
9627 | # doesn't give anonymous zeroed pages with the same properties listed | |
9628 | # above for use of /dev/zero. | |
9629 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
9630 | case "$host_os" in | |
9631 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
9632 | gcc_cv_func_mmap_anon=no ;; | |
9633 | *) | |
9634 | gcc_cv_func_mmap_anon=yes;; | |
9635 | esac | |
9636 | fi | |
ba479fd2 NN |
9637 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5 |
9638 | echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6 | |
1072ec3f ZW |
9639 | fi |
9640 | fi | |
9641 | ||
9642 | if test $gcc_cv_func_mmap_file = yes; then | |
ba479fd2 NN |
9643 | |
9644 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9645 | #define HAVE_MMAP_FILE 1 |
ba479fd2 | 9646 | _ACEOF |
1072ec3f ZW |
9647 | |
9648 | fi | |
9649 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
ba479fd2 NN |
9650 | |
9651 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9652 | #define HAVE_MMAP_DEV_ZERO 1 |
ba479fd2 | 9653 | _ACEOF |
1072ec3f ZW |
9654 | |
9655 | fi | |
9656 | if test $gcc_cv_func_mmap_anon = yes; then | |
ba479fd2 NN |
9657 | |
9658 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9659 | #define HAVE_MMAP_ANON 1 |
ba479fd2 | 9660 | _ACEOF |
1072ec3f ZW |
9661 | |
9662 | fi | |
9663 | ||
b27d2bd5 MK |
9664 | |
9665 | case "${host}" in | |
ee262b6f | 9666 | *-*-*vms*) |
ba479fd2 | 9667 | # Under VMS, vfork works very differently than on Unix. The standard test |
ee262b6f DR |
9668 | # won't work, and it isn't easily adaptable. It makes more sense to |
9669 | # just force it. | |
9670 | ac_cv_func_vfork_works=yes | |
9671 | ;; | |
b27d2bd5 | 9672 | esac |
ba479fd2 NN |
9673 | echo "$as_me:$LINENO: checking for pid_t" >&5 |
9674 | echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 | |
9675 | if test "${ac_cv_type_pid_t+set}" = set; then | |
9676 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9677 | else | |
9678 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9679 | /* confdefs.h. */ |
9680 | _ACEOF | |
9681 | cat confdefs.h >>conftest.$ac_ext | |
9682 | cat >>conftest.$ac_ext <<_ACEOF | |
9683 | /* end confdefs.h. */ | |
9684 | $ac_includes_default | |
9685 | int | |
9686 | main () | |
9687 | { | |
9688 | if ((pid_t *) 0) | |
9689 | return 0; | |
9690 | if (sizeof (pid_t)) | |
9691 | return 0; | |
9692 | ; | |
9693 | return 0; | |
9694 | } | |
9695 | _ACEOF | |
9696 | rm -f conftest.$ac_objext | |
9697 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9698 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9699 | ac_status=$? |
86da66b5 HPN |
9700 | grep -v '^ *+' conftest.er1 >conftest.err |
9701 | rm -f conftest.er1 | |
9702 | cat conftest.err >&5 | |
ba479fd2 NN |
9703 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9704 | (exit $ac_status); } && | |
b095fe2c | 9705 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9706 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9707 | (eval $ac_try) 2>&5 | |
9708 | ac_status=$? | |
9709 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9710 | (exit $ac_status); }; } && | |
9711 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9712 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9713 | (eval $ac_try) 2>&5 | |
9714 | ac_status=$? | |
9715 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9716 | (exit $ac_status); }; }; then | |
cb65112a | 9717 | ac_cv_type_pid_t=yes |
c375c43b | 9718 | else |
ba479fd2 NN |
9719 | echo "$as_me: failed program was:" >&5 |
9720 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 9721 | |
ba479fd2 NN |
9722 | ac_cv_type_pid_t=no |
9723 | fi | |
86da66b5 | 9724 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 9725 | fi |
ba479fd2 NN |
9726 | echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 |
9727 | echo "${ECHO_T}$ac_cv_type_pid_t" >&6 | |
9728 | if test $ac_cv_type_pid_t = yes; then | |
9729 | : | |
9730 | else | |
9731 | ||
9732 | cat >>confdefs.h <<_ACEOF | |
c375c43b | 9733 | #define pid_t int |
ba479fd2 | 9734 | _ACEOF |
c375c43b KG |
9735 | |
9736 | fi | |
9737 | ||
ba479fd2 NN |
9738 | |
9739 | ||
9740 | for ac_header in unistd.h vfork.h | |
9741 | do | |
9742 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
ca9bc441 | 9743 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
9744 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
9745 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
9746 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 9747 | else |
ca9bc441 | 9748 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9749 | /* confdefs.h. */ |
9750 | _ACEOF | |
9751 | cat confdefs.h >>conftest.$ac_ext | |
9752 | cat >>conftest.$ac_ext <<_ACEOF | |
9753 | /* end confdefs.h. */ | |
9754 | #include <$ac_header> | |
9755 | _ACEOF | |
9756 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
9757 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
9758 | ac_status=$? | |
9759 | grep -v '^ *+' conftest.er1 >conftest.err | |
9760 | rm -f conftest.er1 | |
9761 | cat conftest.err >&5 | |
9762 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9763 | (exit $ac_status); } >/dev/null; then | |
9764 | if test -s conftest.err; then | |
9765 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 9766 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
9767 | else |
9768 | ac_cpp_err= | |
9769 | fi | |
093e61a6 | 9770 | else |
ba479fd2 NN |
9771 | ac_cpp_err=yes |
9772 | fi | |
9773 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 9774 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
9775 | else |
9776 | echo "$as_me: failed program was:" >&5 | |
9777 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9778 | ||
ca9bc441 | 9779 | eval "$as_ac_Header=no" |
ba479fd2 NN |
9780 | fi |
9781 | rm -f conftest.err conftest.$ac_ext | |
c375c43b | 9782 | fi |
ba479fd2 NN |
9783 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
9784 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
9785 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
9786 | cat >>confdefs.h <<_ACEOF | |
9787 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9788 | _ACEOF | |
6e3f3080 NN |
9789 | |
9790 | fi | |
ba479fd2 NN |
9791 | done |
9792 | ||
9793 | ||
9794 | ||
9795 | for ac_func in fork vfork | |
9796 | do | |
9797 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9798 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
9799 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
9800 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
9801 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9802 | else | |
9803 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9804 | /* confdefs.h. */ |
9805 | _ACEOF | |
9806 | cat confdefs.h >>conftest.$ac_ext | |
9807 | cat >>conftest.$ac_ext <<_ACEOF | |
9808 | /* end confdefs.h. */ | |
86da66b5 HPN |
9809 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
9810 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9811 | #define $ac_func innocuous_$ac_func | |
9812 | ||
c375c43b | 9813 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
9814 | which can conflict with char $ac_func (); below. |
9815 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9816 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 9817 | |
ba479fd2 NN |
9818 | #ifdef __STDC__ |
9819 | # include <limits.h> | |
9820 | #else | |
9821 | # include <assert.h> | |
9822 | #endif | |
86da66b5 HPN |
9823 | |
9824 | #undef $ac_func | |
9825 | ||
6e3f3080 | 9826 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9827 | #ifdef __cplusplus |
9828 | extern "C" | |
9829 | { | |
9830 | #endif | |
6e3f3080 | 9831 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9832 | builtin and then its argument prototype would still apply. */ |
9833 | char $ac_func (); | |
c375c43b KG |
9834 | /* The GNU C library defines this for functions which it implements |
9835 | to always fail with ENOSYS. Some functions are actually named | |
9836 | something starting with __ and the normal name is an alias. */ | |
ba479fd2 | 9837 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
c375c43b KG |
9838 | choke me |
9839 | #else | |
ba479fd2 NN |
9840 | char (*f) () = $ac_func; |
9841 | #endif | |
9842 | #ifdef __cplusplus | |
9843 | } | |
c375c43b KG |
9844 | #endif |
9845 | ||
ba479fd2 NN |
9846 | int |
9847 | main () | |
9848 | { | |
9849 | return f != $ac_func; | |
9850 | ; | |
9851 | return 0; | |
9852 | } | |
9853 | _ACEOF | |
9854 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9855 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9856 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9857 | ac_status=$? |
86da66b5 HPN |
9858 | grep -v '^ *+' conftest.er1 >conftest.err |
9859 | rm -f conftest.er1 | |
9860 | cat conftest.err >&5 | |
ba479fd2 NN |
9861 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9862 | (exit $ac_status); } && | |
b095fe2c | 9863 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9864 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9865 | (eval $ac_try) 2>&5 | |
9866 | ac_status=$? | |
9867 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9868 | (exit $ac_status); }; } && | |
9869 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9870 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9871 | (eval $ac_try) 2>&5 | |
9872 | ac_status=$? | |
9873 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9874 | (exit $ac_status); }; }; then | |
9875 | eval "$as_ac_var=yes" | |
9876 | else | |
9877 | echo "$as_me: failed program was:" >&5 | |
9878 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9879 | ||
9880 | eval "$as_ac_var=no" | |
9881 | fi | |
86da66b5 HPN |
9882 | rm -f conftest.err conftest.$ac_objext \ |
9883 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
9884 | fi |
9885 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
9886 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
9887 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
9888 | cat >>confdefs.h <<_ACEOF | |
9889 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9890 | _ACEOF | |
9891 | ||
c375c43b | 9892 | fi |
ba479fd2 | 9893 | done |
c375c43b | 9894 | |
ba479fd2 NN |
9895 | if test "x$ac_cv_func_fork" = xyes; then |
9896 | echo "$as_me:$LINENO: checking for working fork" >&5 | |
9897 | echo $ECHO_N "checking for working fork... $ECHO_C" >&6 | |
9898 | if test "${ac_cv_func_fork_works+set}" = set; then | |
9899 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 9900 | else |
ba479fd2 NN |
9901 | if test "$cross_compiling" = yes; then |
9902 | ac_cv_func_fork_works=cross | |
9903 | else | |
9904 | cat >conftest.$ac_ext <<_ACEOF | |
9905 | /* By Ruediger Kuhlmann. */ | |
9906 | #include <sys/types.h> | |
9907 | #if HAVE_UNISTD_H | |
9908 | # include <unistd.h> | |
9909 | #endif | |
9910 | /* Some systems only have a dummy stub for fork() */ | |
9911 | int main () | |
9912 | { | |
86da66b5 HPN |
9913 | if (fork() < 0) |
9914 | exit (1); | |
9915 | exit (0); | |
ba479fd2 NN |
9916 | } |
9917 | _ACEOF | |
9918 | rm -f conftest$ac_exeext | |
9919 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9920 | (eval $ac_link) 2>&5 | |
9921 | ac_status=$? | |
9922 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9923 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9924 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9925 | (eval $ac_try) 2>&5 | |
9926 | ac_status=$? | |
9927 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9928 | (exit $ac_status); }; }; then | |
9929 | ac_cv_func_fork_works=yes | |
9930 | else | |
9931 | echo "$as_me: program exited with status $ac_status" >&5 | |
9932 | echo "$as_me: failed program was:" >&5 | |
9933 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9934 | ||
9935 | ( exit $ac_status ) | |
9936 | ac_cv_func_fork_works=no | |
9937 | fi | |
86da66b5 | 9938 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
9939 | fi |
9940 | fi | |
9941 | echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 | |
9942 | echo "${ECHO_T}$ac_cv_func_fork_works" >&6 | |
9943 | ||
9944 | else | |
9945 | ac_cv_func_fork_works=$ac_cv_func_fork | |
9946 | fi | |
9947 | if test "x$ac_cv_func_fork_works" = xcross; then | |
9948 | case $host in | |
9949 | *-*-amigaos* | *-*-msdosdjgpp*) | |
9950 | # Override, as these systems have only a dummy fork() stub | |
9951 | ac_cv_func_fork_works=no | |
9952 | ;; | |
9953 | *) | |
9954 | ac_cv_func_fork_works=yes | |
9955 | ;; | |
9956 | esac | |
9957 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
9958 | echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
c375c43b | 9959 | fi |
c375c43b | 9960 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
9961 | if test "x$ac_cv_func_vfork" = xyes; then |
9962 | echo "$as_me:$LINENO: checking for working vfork" >&5 | |
9963 | echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 | |
9964 | if test "${ac_cv_func_vfork_works+set}" = set; then | |
9965 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 9966 | else |
ba479fd2 NN |
9967 | if test "$cross_compiling" = yes; then |
9968 | ac_cv_func_vfork_works=cross | |
9969 | else | |
9970 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9971 | /* confdefs.h. */ |
9972 | _ACEOF | |
9973 | cat confdefs.h >>conftest.$ac_ext | |
9974 | cat >>conftest.$ac_ext <<_ACEOF | |
9975 | /* end confdefs.h. */ | |
c375c43b KG |
9976 | /* Thanks to Paul Eggert for this test. */ |
9977 | #include <stdio.h> | |
ba479fd2 | 9978 | #include <stdlib.h> |
c375c43b KG |
9979 | #include <sys/types.h> |
9980 | #include <sys/stat.h> | |
ba479fd2 NN |
9981 | #include <sys/wait.h> |
9982 | #if HAVE_UNISTD_H | |
9983 | # include <unistd.h> | |
c375c43b | 9984 | #endif |
ba479fd2 NN |
9985 | #if HAVE_VFORK_H |
9986 | # include <vfork.h> | |
c375c43b KG |
9987 | #endif |
9988 | /* On some sparc systems, changes by the child to local and incoming | |
ba479fd2 NN |
9989 | argument registers are propagated back to the parent. The compiler |
9990 | is told about this with #include <vfork.h>, but some compilers | |
9991 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
9992 | static variable whose address is put into a register that is | |
9993 | clobbered by the vfork. */ | |
9994 | static void | |
c375c43b KG |
9995 | #ifdef __cplusplus |
9996 | sparc_address_test (int arg) | |
ba479fd2 | 9997 | # else |
c375c43b KG |
9998 | sparc_address_test (arg) int arg; |
9999 | #endif | |
10000 | { | |
10001 | static pid_t child; | |
10002 | if (!child) { | |
10003 | child = vfork (); | |
10004 | if (child < 0) { | |
10005 | perror ("vfork"); | |
10006 | _exit(2); | |
10007 | } | |
10008 | if (!child) { | |
10009 | arg = getpid(); | |
10010 | write(-1, "", 0); | |
10011 | _exit (arg); | |
10012 | } | |
10013 | } | |
10014 | } | |
ba479fd2 NN |
10015 | |
10016 | int | |
10017 | main () | |
10018 | { | |
c375c43b KG |
10019 | pid_t parent = getpid (); |
10020 | pid_t child; | |
10021 | ||
ba479fd2 | 10022 | sparc_address_test (0); |
c375c43b KG |
10023 | |
10024 | child = vfork (); | |
10025 | ||
10026 | if (child == 0) { | |
ba479fd2 NN |
10027 | /* Here is another test for sparc vfork register problems. This |
10028 | test uses lots of local variables, at least as many local | |
10029 | variables as main has allocated so far including compiler | |
10030 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
10031 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
10032 | reuse the register of parent for one of the local variables, | |
10033 | since it will think that parent can't possibly be used any more | |
10034 | in this routine. Assigning to the local variable will thus | |
10035 | munge parent in the parent process. */ | |
c375c43b KG |
10036 | pid_t |
10037 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
10038 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
10039 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
10040 | use the same hardware register for all 8 local variables. */ | |
10041 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10042 | || p != p5 || p != p6 || p != p7) | |
10043 | _exit(1); | |
10044 | ||
ba479fd2 NN |
10045 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
10046 | from child file descriptors. If the child closes a descriptor | |
10047 | before it execs or exits, this munges the parent's descriptor | |
10048 | as well. Test for this by closing stdout in the child. */ | |
c375c43b KG |
10049 | _exit(close(fileno(stdout)) != 0); |
10050 | } else { | |
10051 | int status; | |
10052 | struct stat st; | |
10053 | ||
10054 | while (wait(&status) != child) | |
10055 | ; | |
10056 | exit( | |
10057 | /* Was there some problem with vforking? */ | |
10058 | child < 0 | |
10059 | ||
10060 | /* Did the child fail? (This shouldn't happen.) */ | |
10061 | || status | |
10062 | ||
10063 | /* Did the vfork/compiler bug occur? */ | |
10064 | || parent != getpid() | |
10065 | ||
10066 | /* Did the file descriptor bug occur? */ | |
10067 | || fstat(fileno(stdout), &st) != 0 | |
10068 | ); | |
10069 | } | |
10070 | } | |
ba479fd2 NN |
10071 | _ACEOF |
10072 | rm -f conftest$ac_exeext | |
10073 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10074 | (eval $ac_link) 2>&5 | |
10075 | ac_status=$? | |
10076 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10077 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
10078 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10079 | (eval $ac_try) 2>&5 | |
10080 | ac_status=$? | |
10081 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10082 | (exit $ac_status); }; }; then | |
c375c43b KG |
10083 | ac_cv_func_vfork_works=yes |
10084 | else | |
ba479fd2 NN |
10085 | echo "$as_me: program exited with status $ac_status" >&5 |
10086 | echo "$as_me: failed program was:" >&5 | |
10087 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10088 | ||
10089 | ( exit $ac_status ) | |
10090 | ac_cv_func_vfork_works=no | |
cafe096b | 10091 | fi |
86da66b5 | 10092 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6e3f3080 | 10093 | fi |
ba479fd2 NN |
10094 | fi |
10095 | echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 | |
10096 | echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 | |
c375c43b | 10097 | |
ba479fd2 NN |
10098 | fi; |
10099 | if test "x$ac_cv_func_fork_works" = xcross; then | |
86da66b5 | 10100 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
10101 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
10102 | echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
c375c43b KG |
10103 | fi |
10104 | ||
ba479fd2 NN |
10105 | if test "x$ac_cv_func_vfork_works" = xyes; then |
10106 | ||
10107 | cat >>confdefs.h <<\_ACEOF | |
10108 | #define HAVE_WORKING_VFORK 1 | |
10109 | _ACEOF | |
10110 | ||
10111 | else | |
10112 | ||
10113 | cat >>confdefs.h <<\_ACEOF | |
c375c43b | 10114 | #define vfork fork |
ba479fd2 | 10115 | _ACEOF |
c375c43b KG |
10116 | |
10117 | fi | |
ba479fd2 NN |
10118 | if test "x$ac_cv_func_fork_works" = xyes; then |
10119 | ||
10120 | cat >>confdefs.h <<\_ACEOF | |
10121 | #define HAVE_WORKING_FORK 1 | |
10122 | _ACEOF | |
10123 | ||
10124 | fi | |
10125 | ||
c375c43b | 10126 | |
81bf3d9e | 10127 | |
dfb77e37 KC |
10128 | if test "X$prefix" = "XNONE"; then |
10129 | acl_final_prefix="$ac_default_prefix" | |
10130 | else | |
10131 | acl_final_prefix="$prefix" | |
10132 | fi | |
10133 | if test "X$exec_prefix" = "XNONE"; then | |
10134 | acl_final_exec_prefix='${prefix}' | |
10135 | else | |
10136 | acl_final_exec_prefix="$exec_prefix" | |
10137 | fi | |
10138 | acl_save_prefix="$prefix" | |
10139 | prefix="$acl_final_prefix" | |
10140 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
10141 | prefix="$acl_save_prefix" | |
f91abfce TT |
10142 | |
10143 | ||
dfb77e37 KC |
10144 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
10145 | if test "${with_gnu_ld+set}" = set; then | |
10146 | withval="$with_gnu_ld" | |
10147 | test "$withval" = no || with_gnu_ld=yes | |
ba479fd2 | 10148 | else |
dfb77e37 KC |
10149 | with_gnu_ld=no |
10150 | fi; | |
10151 | # Prepare PATH_SEPARATOR. | |
10152 | # The user is always right. | |
10153 | if test "${PATH_SEPARATOR+set}" != set; then | |
10154 | echo "#! /bin/sh" >conf$$.sh | |
10155 | echo "exit 0" >>conf$$.sh | |
10156 | chmod +x conf$$.sh | |
10157 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
10158 | PATH_SEPARATOR=';' | |
ba479fd2 | 10159 | else |
dfb77e37 | 10160 | PATH_SEPARATOR=: |
ba479fd2 | 10161 | fi |
dfb77e37 KC |
10162 | rm -f conf$$.sh |
10163 | fi | |
10164 | ac_prog=ld | |
10165 | if test "$GCC" = yes; then | |
10166 | # Check if gcc -print-prog-name=ld gives a path. | |
10167 | echo "$as_me:$LINENO: checking for ld used by GCC" >&5 | |
10168 | echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 | |
10169 | case $host in | |
10170 | *-*-mingw*) | |
10171 | # gcc leaves a trailing carriage return which upsets mingw | |
10172 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
10173 | *) | |
10174 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
10175 | esac | |
10176 | case $ac_prog in | |
10177 | # Accept absolute paths. | |
10178 | [\\/]* | [A-Za-z]:[\\/]*) | |
10179 | re_direlt='/[^/][^/]*/\.\./' | |
10180 | # Canonicalize the path of ld | |
10181 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
10182 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
10183 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
10184 | done | |
10185 | test -z "$LD" && LD="$ac_prog" | |
10186 | ;; | |
10187 | "") | |
10188 | # If it fails, then pretend we aren't using GCC. | |
10189 | ac_prog=ld | |
10190 | ;; | |
10191 | *) | |
10192 | # If it is relative, then search for the first ld in PATH. | |
10193 | with_gnu_ld=unknown | |
10194 | ;; | |
10195 | esac | |
10196 | elif test "$with_gnu_ld" = yes; then | |
10197 | echo "$as_me:$LINENO: checking for GNU ld" >&5 | |
10198 | echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 | |
ba479fd2 | 10199 | else |
dfb77e37 KC |
10200 | echo "$as_me:$LINENO: checking for non-GNU ld" >&5 |
10201 | echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 | |
ba479fd2 | 10202 | fi |
dfb77e37 KC |
10203 | if test "${acl_cv_path_LD+set}" = set; then |
10204 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 10205 | else |
dfb77e37 KC |
10206 | if test -z "$LD"; then |
10207 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
10208 | for ac_dir in $PATH; do | |
10209 | test -z "$ac_dir" && ac_dir=. | |
10210 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
10211 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
10212 | # Check to see if the program is GNU ld. I'd rather use --version, | |
10213 | # but apparently some GNU ld's only accept -v. | |
10214 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
10215 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
10216 | test "$with_gnu_ld" != no && break | |
10217 | else | |
10218 | test "$with_gnu_ld" != yes && break | |
10219 | fi | |
10220 | fi | |
10221 | done | |
10222 | IFS="$ac_save_ifs" | |
10223 | else | |
10224 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
10225 | fi | |
10226 | fi | |
ba479fd2 | 10227 | |
dfb77e37 KC |
10228 | LD="$acl_cv_path_LD" |
10229 | if test -n "$LD"; then | |
10230 | echo "$as_me:$LINENO: result: $LD" >&5 | |
10231 | echo "${ECHO_T}$LD" >&6 | |
10232 | else | |
10233 | echo "$as_me:$LINENO: result: no" >&5 | |
10234 | echo "${ECHO_T}no" >&6 | |
ba479fd2 | 10235 | fi |
dfb77e37 KC |
10236 | test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 |
10237 | echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} | |
10238 | { (exit 1); exit 1; }; } | |
10239 | echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 | |
10240 | echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 | |
10241 | if test "${acl_cv_prog_gnu_ld+set}" = set; then | |
10242 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10243 | else | |
10244 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
10245 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
10246 | acl_cv_prog_gnu_ld=yes | |
10247 | else | |
10248 | acl_cv_prog_gnu_ld=no | |
6e3f3080 | 10249 | fi |
dfb77e37 KC |
10250 | fi |
10251 | echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 | |
10252 | echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 | |
10253 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
10254 | ||
10255 | ||
10256 | ||
10257 | echo "$as_me:$LINENO: checking for shared library run path origin" >&5 | |
10258 | echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 | |
10259 | if test "${acl_cv_rpath+set}" = set; then | |
10260 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10261 | else | |
10262 | ||
10263 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
10264 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
10265 | . ./conftest.sh | |
10266 | rm -f ./conftest.sh | |
10267 | acl_cv_rpath=done | |
ba479fd2 | 10268 | |
eb158727 | 10269 | fi |
dfb77e37 KC |
10270 | echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 |
10271 | echo "${ECHO_T}$acl_cv_rpath" >&6 | |
10272 | wl="$acl_cv_wl" | |
10273 | libext="$acl_cv_libext" | |
10274 | shlibext="$acl_cv_shlibext" | |
10275 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
10276 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
10277 | hardcode_direct="$acl_cv_hardcode_direct" | |
10278 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
10279 | # Check whether --enable-rpath or --disable-rpath was given. | |
10280 | if test "${enable_rpath+set}" = set; then | |
10281 | enableval="$enable_rpath" | |
10282 | : | |
10283 | else | |
10284 | enable_rpath=yes | |
10285 | fi; | |
10286 | ||
10287 | ||
10288 | ||
10289 | ||
10290 | ||
10291 | ||
10292 | ||
10293 | use_additional=yes | |
10294 | ||
10295 | acl_save_prefix="$prefix" | |
10296 | prefix="$acl_final_prefix" | |
10297 | acl_save_exec_prefix="$exec_prefix" | |
10298 | exec_prefix="$acl_final_exec_prefix" | |
10299 | ||
10300 | eval additional_includedir=\"$includedir\" | |
10301 | eval additional_libdir=\"$libdir\" | |
10302 | ||
10303 | exec_prefix="$acl_save_exec_prefix" | |
10304 | prefix="$acl_save_prefix" | |
10305 | ||
10306 | ||
10307 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10308 | if test "${with_libiconv_prefix+set}" = set; then | |
10309 | withval="$with_libiconv_prefix" | |
10310 | ||
10311 | if test "X$withval" = "Xno"; then | |
10312 | use_additional=no | |
10313 | else | |
10314 | if test "X$withval" = "X"; then | |
10315 | ||
10316 | acl_save_prefix="$prefix" | |
10317 | prefix="$acl_final_prefix" | |
10318 | acl_save_exec_prefix="$exec_prefix" | |
10319 | exec_prefix="$acl_final_exec_prefix" | |
10320 | ||
10321 | eval additional_includedir=\"$includedir\" | |
10322 | eval additional_libdir=\"$libdir\" | |
10323 | ||
10324 | exec_prefix="$acl_save_exec_prefix" | |
10325 | prefix="$acl_save_prefix" | |
10326 | ||
10327 | else | |
10328 | additional_includedir="$withval/include" | |
10329 | additional_libdir="$withval/lib" | |
10330 | fi | |
10331 | fi | |
10332 | ||
10333 | fi; | |
10334 | LIBICONV= | |
10335 | LTLIBICONV= | |
10336 | INCICONV= | |
10337 | rpathdirs= | |
10338 | ltrpathdirs= | |
10339 | names_already_handled= | |
10340 | names_next_round='iconv ' | |
10341 | while test -n "$names_next_round"; do | |
10342 | names_this_round="$names_next_round" | |
10343 | names_next_round= | |
10344 | for name in $names_this_round; do | |
10345 | already_handled= | |
10346 | for n in $names_already_handled; do | |
10347 | if test "$n" = "$name"; then | |
10348 | already_handled=yes | |
10349 | break | |
10350 | fi | |
10351 | done | |
10352 | if test -z "$already_handled"; then | |
10353 | names_already_handled="$names_already_handled $name" | |
10354 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10355 | eval value=\"\$HAVE_LIB$uppername\" | |
10356 | if test -n "$value"; then | |
10357 | if test "$value" = yes; then | |
10358 | eval value=\"\$LIB$uppername\" | |
10359 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
10360 | eval value=\"\$LTLIB$uppername\" | |
10361 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
10362 | else | |
10363 | : | |
10364 | fi | |
10365 | else | |
10366 | found_dir= | |
10367 | found_la= | |
10368 | found_so= | |
10369 | found_a= | |
10370 | if test $use_additional = yes; then | |
10371 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
10372 | found_dir="$additional_libdir" | |
10373 | found_so="$additional_libdir/lib$name.$shlibext" | |
10374 | if test -f "$additional_libdir/lib$name.la"; then | |
10375 | found_la="$additional_libdir/lib$name.la" | |
10376 | fi | |
10377 | else | |
10378 | if test -f "$additional_libdir/lib$name.$libext"; then | |
10379 | found_dir="$additional_libdir" | |
10380 | found_a="$additional_libdir/lib$name.$libext" | |
10381 | if test -f "$additional_libdir/lib$name.la"; then | |
10382 | found_la="$additional_libdir/lib$name.la" | |
10383 | fi | |
10384 | fi | |
10385 | fi | |
10386 | fi | |
10387 | if test "X$found_dir" = "X"; then | |
10388 | for x in $LDFLAGS $LTLIBICONV; do | |
10389 | ||
10390 | acl_save_prefix="$prefix" | |
10391 | prefix="$acl_final_prefix" | |
10392 | acl_save_exec_prefix="$exec_prefix" | |
10393 | exec_prefix="$acl_final_exec_prefix" | |
10394 | eval x=\"$x\" | |
10395 | exec_prefix="$acl_save_exec_prefix" | |
10396 | prefix="$acl_save_prefix" | |
10397 | ||
10398 | case "$x" in | |
10399 | -L*) | |
10400 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10401 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
10402 | found_dir="$dir" | |
10403 | found_so="$dir/lib$name.$shlibext" | |
10404 | if test -f "$dir/lib$name.la"; then | |
10405 | found_la="$dir/lib$name.la" | |
10406 | fi | |
10407 | else | |
10408 | if test -f "$dir/lib$name.$libext"; then | |
10409 | found_dir="$dir" | |
10410 | found_a="$dir/lib$name.$libext" | |
10411 | if test -f "$dir/lib$name.la"; then | |
10412 | found_la="$dir/lib$name.la" | |
10413 | fi | |
10414 | fi | |
10415 | fi | |
10416 | ;; | |
10417 | esac | |
10418 | if test "X$found_dir" != "X"; then | |
10419 | break | |
10420 | fi | |
10421 | done | |
10422 | fi | |
10423 | if test "X$found_dir" != "X"; then | |
10424 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
10425 | if test "X$found_so" != "X"; then | |
10426 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10427 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10428 | else | |
10429 | haveit= | |
10430 | for x in $ltrpathdirs; do | |
10431 | if test "X$x" = "X$found_dir"; then | |
10432 | haveit=yes | |
10433 | break | |
10434 | fi | |
10435 | done | |
10436 | if test -z "$haveit"; then | |
10437 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10438 | fi | |
10439 | if test "$hardcode_direct" = yes; then | |
10440 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10441 | else | |
10442 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10443 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10444 | haveit= | |
10445 | for x in $rpathdirs; do | |
10446 | if test "X$x" = "X$found_dir"; then | |
10447 | haveit=yes | |
10448 | break | |
10449 | fi | |
10450 | done | |
10451 | if test -z "$haveit"; then | |
10452 | rpathdirs="$rpathdirs $found_dir" | |
10453 | fi | |
10454 | else | |
10455 | haveit= | |
10456 | for x in $LDFLAGS $LIBICONV; do | |
10457 | ||
10458 | acl_save_prefix="$prefix" | |
10459 | prefix="$acl_final_prefix" | |
10460 | acl_save_exec_prefix="$exec_prefix" | |
10461 | exec_prefix="$acl_final_exec_prefix" | |
10462 | eval x=\"$x\" | |
10463 | exec_prefix="$acl_save_exec_prefix" | |
10464 | prefix="$acl_save_prefix" | |
10465 | ||
10466 | if test "X$x" = "X-L$found_dir"; then | |
10467 | haveit=yes | |
10468 | break | |
10469 | fi | |
10470 | done | |
10471 | if test -z "$haveit"; then | |
10472 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
10473 | fi | |
10474 | if test "$hardcode_minus_L" != no; then | |
10475 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10476 | else | |
10477 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
10478 | fi | |
10479 | fi | |
10480 | fi | |
10481 | fi | |
10482 | else | |
10483 | if test "X$found_a" != "X"; then | |
10484 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
10485 | else | |
10486 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
10487 | fi | |
10488 | fi | |
10489 | additional_includedir= | |
10490 | case "$found_dir" in | |
10491 | */lib | */lib/) | |
10492 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10493 | additional_includedir="$basedir/include" | |
10494 | ;; | |
10495 | esac | |
10496 | if test "X$additional_includedir" != "X"; then | |
10497 | if test "X$additional_includedir" != "X/usr/include"; then | |
10498 | haveit= | |
10499 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10500 | if test -n "$GCC"; then | |
10501 | case $host_os in | |
10502 | linux*) haveit=yes;; | |
10503 | esac | |
10504 | fi | |
10505 | fi | |
10506 | if test -z "$haveit"; then | |
10507 | for x in $CPPFLAGS $INCICONV; do | |
10508 | ||
10509 | acl_save_prefix="$prefix" | |
10510 | prefix="$acl_final_prefix" | |
10511 | acl_save_exec_prefix="$exec_prefix" | |
10512 | exec_prefix="$acl_final_exec_prefix" | |
10513 | eval x=\"$x\" | |
10514 | exec_prefix="$acl_save_exec_prefix" | |
10515 | prefix="$acl_save_prefix" | |
10516 | ||
10517 | if test "X$x" = "X-I$additional_includedir"; then | |
10518 | haveit=yes | |
10519 | break | |
10520 | fi | |
10521 | done | |
10522 | if test -z "$haveit"; then | |
10523 | if test -d "$additional_includedir"; then | |
10524 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
10525 | fi | |
10526 | fi | |
10527 | fi | |
10528 | fi | |
10529 | fi | |
10530 | if test -n "$found_la"; then | |
10531 | save_libdir="$libdir" | |
10532 | case "$found_la" in | |
10533 | */* | *\\*) . "$found_la" ;; | |
10534 | *) . "./$found_la" ;; | |
10535 | esac | |
10536 | libdir="$save_libdir" | |
10537 | for dep in $dependency_libs; do | |
10538 | case "$dep" in | |
10539 | -L*) | |
10540 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10541 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10542 | haveit= | |
10543 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10544 | if test -n "$GCC"; then | |
10545 | case $host_os in | |
10546 | linux*) haveit=yes;; | |
10547 | esac | |
10548 | fi | |
10549 | fi | |
10550 | if test -z "$haveit"; then | |
10551 | haveit= | |
10552 | for x in $LDFLAGS $LIBICONV; do | |
10553 | ||
10554 | acl_save_prefix="$prefix" | |
10555 | prefix="$acl_final_prefix" | |
10556 | acl_save_exec_prefix="$exec_prefix" | |
10557 | exec_prefix="$acl_final_exec_prefix" | |
10558 | eval x=\"$x\" | |
10559 | exec_prefix="$acl_save_exec_prefix" | |
10560 | prefix="$acl_save_prefix" | |
10561 | ||
10562 | if test "X$x" = "X-L$additional_libdir"; then | |
10563 | haveit=yes | |
10564 | break | |
10565 | fi | |
10566 | done | |
10567 | if test -z "$haveit"; then | |
10568 | if test -d "$additional_libdir"; then | |
10569 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
10570 | fi | |
10571 | fi | |
10572 | haveit= | |
10573 | for x in $LDFLAGS $LTLIBICONV; do | |
10574 | ||
10575 | acl_save_prefix="$prefix" | |
10576 | prefix="$acl_final_prefix" | |
10577 | acl_save_exec_prefix="$exec_prefix" | |
10578 | exec_prefix="$acl_final_exec_prefix" | |
10579 | eval x=\"$x\" | |
10580 | exec_prefix="$acl_save_exec_prefix" | |
10581 | prefix="$acl_save_prefix" | |
10582 | ||
10583 | if test "X$x" = "X-L$additional_libdir"; then | |
10584 | haveit=yes | |
10585 | break | |
10586 | fi | |
10587 | done | |
10588 | if test -z "$haveit"; then | |
10589 | if test -d "$additional_libdir"; then | |
10590 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
10591 | fi | |
10592 | fi | |
10593 | fi | |
10594 | fi | |
10595 | ;; | |
10596 | -R*) | |
10597 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10598 | if test "$enable_rpath" != no; then | |
10599 | haveit= | |
10600 | for x in $rpathdirs; do | |
10601 | if test "X$x" = "X$dir"; then | |
10602 | haveit=yes | |
10603 | break | |
10604 | fi | |
10605 | done | |
10606 | if test -z "$haveit"; then | |
10607 | rpathdirs="$rpathdirs $dir" | |
10608 | fi | |
10609 | haveit= | |
10610 | for x in $ltrpathdirs; do | |
10611 | if test "X$x" = "X$dir"; then | |
10612 | haveit=yes | |
10613 | break | |
10614 | fi | |
10615 | done | |
10616 | if test -z "$haveit"; then | |
10617 | ltrpathdirs="$ltrpathdirs $dir" | |
10618 | fi | |
10619 | fi | |
10620 | ;; | |
10621 | -l*) | |
10622 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10623 | ;; | |
10624 | *.la) | |
10625 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10626 | ;; | |
10627 | *) | |
10628 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
10629 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
10630 | ;; | |
10631 | esac | |
10632 | done | |
10633 | fi | |
10634 | else | |
10635 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
10636 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
10637 | fi | |
10638 | fi | |
10639 | fi | |
10640 | done | |
10641 | done | |
10642 | if test "X$rpathdirs" != "X"; then | |
10643 | if test -n "$hardcode_libdir_separator"; then | |
10644 | alldirs= | |
10645 | for found_dir in $rpathdirs; do | |
10646 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10647 | done | |
10648 | acl_save_libdir="$libdir" | |
10649 | libdir="$alldirs" | |
10650 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10651 | libdir="$acl_save_libdir" | |
10652 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
10653 | else | |
10654 | for found_dir in $rpathdirs; do | |
10655 | acl_save_libdir="$libdir" | |
10656 | libdir="$found_dir" | |
10657 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10658 | libdir="$acl_save_libdir" | |
10659 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
10660 | done | |
10661 | fi | |
10662 | fi | |
10663 | if test "X$ltrpathdirs" != "X"; then | |
10664 | for found_dir in $ltrpathdirs; do | |
10665 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
10666 | done | |
10667 | fi | |
10668 | ||
10669 | ||
10670 | ||
10671 | ||
10672 | ||
10673 | ||
10674 | ||
10675 | am_save_CPPFLAGS="$CPPFLAGS" | |
10676 | ||
10677 | for element in $INCICONV; do | |
10678 | haveit= | |
10679 | for x in $CPPFLAGS; do | |
10680 | ||
10681 | acl_save_prefix="$prefix" | |
10682 | prefix="$acl_final_prefix" | |
10683 | acl_save_exec_prefix="$exec_prefix" | |
10684 | exec_prefix="$acl_final_exec_prefix" | |
10685 | eval x=\"$x\" | |
10686 | exec_prefix="$acl_save_exec_prefix" | |
10687 | prefix="$acl_save_prefix" | |
10688 | ||
10689 | if test "X$x" = "X$element"; then | |
10690 | haveit=yes | |
10691 | break | |
10692 | fi | |
10693 | done | |
10694 | if test -z "$haveit"; then | |
10695 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10696 | fi | |
10697 | done | |
eb158727 ZW |
10698 | |
10699 | ||
ba479fd2 NN |
10700 | echo "$as_me:$LINENO: checking for iconv" >&5 |
10701 | echo $ECHO_N "checking for iconv... $ECHO_C" >&6 | |
10702 | if test "${am_cv_func_iconv+set}" = set; then | |
10703 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 10704 | else |
ba479fd2 | 10705 | |
f91abfce TT |
10706 | am_cv_func_iconv="no, consider installing GNU libiconv" |
10707 | am_cv_lib_iconv=no | |
ba479fd2 | 10708 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10709 | /* confdefs.h. */ |
10710 | _ACEOF | |
10711 | cat confdefs.h >>conftest.$ac_ext | |
10712 | cat >>conftest.$ac_ext <<_ACEOF | |
10713 | /* end confdefs.h. */ | |
f91abfce TT |
10714 | #include <stdlib.h> |
10715 | #include <iconv.h> | |
ba479fd2 NN |
10716 | int |
10717 | main () | |
10718 | { | |
f91abfce TT |
10719 | iconv_t cd = iconv_open("",""); |
10720 | iconv(cd,NULL,NULL,NULL,NULL); | |
10721 | iconv_close(cd); | |
ba479fd2 NN |
10722 | ; |
10723 | return 0; | |
10724 | } | |
10725 | _ACEOF | |
10726 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10727 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 10728 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 10729 | ac_status=$? |
86da66b5 HPN |
10730 | grep -v '^ *+' conftest.er1 >conftest.err |
10731 | rm -f conftest.er1 | |
10732 | cat conftest.err >&5 | |
ba479fd2 NN |
10733 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10734 | (exit $ac_status); } && | |
b095fe2c | 10735 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
10736 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10737 | (eval $ac_try) 2>&5 | |
10738 | ac_status=$? | |
10739 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10740 | (exit $ac_status); }; } && | |
10741 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
10742 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10743 | (eval $ac_try) 2>&5 | |
10744 | ac_status=$? | |
10745 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10746 | (exit $ac_status); }; }; then | |
f91abfce TT |
10747 | am_cv_func_iconv=yes |
10748 | else | |
ba479fd2 NN |
10749 | echo "$as_me: failed program was:" >&5 |
10750 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10751 | ||
f91abfce | 10752 | fi |
86da66b5 HPN |
10753 | rm -f conftest.err conftest.$ac_objext \ |
10754 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
10755 | if test "$am_cv_func_iconv" != yes; then |
10756 | am_save_LIBS="$LIBS" | |
dfb77e37 | 10757 | LIBS="$LIBS $LIBICONV" |
ba479fd2 | 10758 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10759 | /* confdefs.h. */ |
10760 | _ACEOF | |
10761 | cat confdefs.h >>conftest.$ac_ext | |
10762 | cat >>conftest.$ac_ext <<_ACEOF | |
10763 | /* end confdefs.h. */ | |
f91abfce TT |
10764 | #include <stdlib.h> |
10765 | #include <iconv.h> | |
ba479fd2 NN |
10766 | int |
10767 | main () | |
10768 | { | |
f91abfce TT |
10769 | iconv_t cd = iconv_open("",""); |
10770 | iconv(cd,NULL,NULL,NULL,NULL); | |
10771 | iconv_close(cd); | |
ba479fd2 NN |
10772 | ; |
10773 | return 0; | |
10774 | } | |
10775 | _ACEOF | |
10776 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10777 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 10778 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 10779 | ac_status=$? |
86da66b5 HPN |
10780 | grep -v '^ *+' conftest.er1 >conftest.err |
10781 | rm -f conftest.er1 | |
10782 | cat conftest.err >&5 | |
ba479fd2 NN |
10783 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10784 | (exit $ac_status); } && | |
b095fe2c | 10785 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
10786 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10787 | (eval $ac_try) 2>&5 | |
10788 | ac_status=$? | |
10789 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10790 | (exit $ac_status); }; } && | |
10791 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
10792 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10793 | (eval $ac_try) 2>&5 | |
10794 | ac_status=$? | |
10795 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10796 | (exit $ac_status); }; }; then | |
f91abfce TT |
10797 | am_cv_lib_iconv=yes |
10798 | am_cv_func_iconv=yes | |
10799 | else | |
ba479fd2 NN |
10800 | echo "$as_me: failed program was:" >&5 |
10801 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10802 | ||
f91abfce | 10803 | fi |
86da66b5 HPN |
10804 | rm -f conftest.err conftest.$ac_objext \ |
10805 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
10806 | LIBS="$am_save_LIBS" |
10807 | fi | |
6e3f3080 | 10808 | |
ba479fd2 NN |
10809 | fi |
10810 | echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 | |
10811 | echo "${ECHO_T}$am_cv_func_iconv" >&6 | |
63cf211a | 10812 | if test "$am_cv_func_iconv" = yes; then |
ba479fd2 NN |
10813 | |
10814 | cat >>confdefs.h <<\_ACEOF | |
f91abfce | 10815 | #define HAVE_ICONV 1 |
ba479fd2 | 10816 | _ACEOF |
f91abfce | 10817 | |
dfb77e37 KC |
10818 | fi |
10819 | if test "$am_cv_lib_iconv" = yes; then | |
10820 | echo "$as_me:$LINENO: checking how to link with libiconv" >&5 | |
10821 | echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 | |
10822 | echo "$as_me:$LINENO: result: $LIBICONV" >&5 | |
10823 | echo "${ECHO_T}$LIBICONV" >&6 | |
10824 | else | |
10825 | CPPFLAGS="$am_save_CPPFLAGS" | |
10826 | LIBICONV= | |
10827 | LTLIBICONV= | |
10828 | fi | |
10829 | ||
10830 | ||
10831 | ||
10832 | if test "$am_cv_func_iconv" = yes; then | |
ba479fd2 NN |
10833 | echo "$as_me:$LINENO: checking for iconv declaration" >&5 |
10834 | echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 | |
10835 | if test "${am_cv_proto_iconv+set}" = set; then | |
10836 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 10837 | else |
ba479fd2 NN |
10838 | |
10839 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10840 | /* confdefs.h. */ |
10841 | _ACEOF | |
10842 | cat confdefs.h >>conftest.$ac_ext | |
10843 | cat >>conftest.$ac_ext <<_ACEOF | |
10844 | /* end confdefs.h. */ | |
f91abfce TT |
10845 | |
10846 | #include <stdlib.h> | |
10847 | #include <iconv.h> | |
10848 | extern | |
10849 | #ifdef __cplusplus | |
10850 | "C" | |
10851 | #endif | |
10852 | #if defined(__STDC__) || defined(__cplusplus) | |
10853 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10854 | #else | |
10855 | size_t iconv(); | |
10856 | #endif | |
10857 | ||
ba479fd2 NN |
10858 | int |
10859 | main () | |
10860 | { | |
f91abfce | 10861 | |
ba479fd2 NN |
10862 | ; |
10863 | return 0; | |
10864 | } | |
10865 | _ACEOF | |
10866 | rm -f conftest.$ac_objext | |
10867 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 10868 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 10869 | ac_status=$? |
86da66b5 HPN |
10870 | grep -v '^ *+' conftest.er1 >conftest.err |
10871 | rm -f conftest.er1 | |
10872 | cat conftest.err >&5 | |
ba479fd2 NN |
10873 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10874 | (exit $ac_status); } && | |
b095fe2c | 10875 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
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); }; } && | |
10881 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
10882 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10883 | (eval $ac_try) 2>&5 | |
10884 | ac_status=$? | |
10885 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10886 | (exit $ac_status); }; }; then | |
f91abfce TT |
10887 | am_cv_proto_iconv_arg1="" |
10888 | else | |
ba479fd2 NN |
10889 | echo "$as_me: failed program was:" >&5 |
10890 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10891 | ||
10892 | am_cv_proto_iconv_arg1="const" | |
f91abfce | 10893 | fi |
86da66b5 | 10894 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
f91abfce TT |
10895 | 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);" |
10896 | fi | |
10897 | ||
10898 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
ba479fd2 NN |
10899 | echo "$as_me:$LINENO: result: ${ac_t:- |
10900 | }$am_cv_proto_iconv" >&5 | |
10901 | echo "${ECHO_T}${ac_t:- | |
10902 | }$am_cv_proto_iconv" >&6 | |
10903 | ||
10904 | cat >>confdefs.h <<_ACEOF | |
f91abfce | 10905 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
ba479fd2 | 10906 | _ACEOF |
f91abfce TT |
10907 | |
10908 | fi | |
f91abfce | 10909 | |
56694dd9 ZW |
10910 | # Until we have in-tree GNU iconv: |
10911 | LIBICONV_DEP= | |
10912 | ||
10913 | ||
10914 | ||
ba479fd2 NN |
10915 | echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 |
10916 | echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 | |
10917 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then | |
10918 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
56694dd9 | 10919 | else |
ba479fd2 | 10920 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10921 | /* confdefs.h. */ |
10922 | _ACEOF | |
10923 | cat confdefs.h >>conftest.$ac_ext | |
10924 | cat >>conftest.$ac_ext <<_ACEOF | |
10925 | /* end confdefs.h. */ | |
56694dd9 | 10926 | #include <locale.h> |
ba479fd2 NN |
10927 | int |
10928 | main () | |
10929 | { | |
56694dd9 | 10930 | return LC_MESSAGES |
ba479fd2 NN |
10931 | ; |
10932 | return 0; | |
10933 | } | |
10934 | _ACEOF | |
10935 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10936 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 10937 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 10938 | ac_status=$? |
86da66b5 HPN |
10939 | grep -v '^ *+' conftest.er1 >conftest.err |
10940 | rm -f conftest.er1 | |
10941 | cat conftest.err >&5 | |
ba479fd2 NN |
10942 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10943 | (exit $ac_status); } && | |
b095fe2c | 10944 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
10945 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10946 | (eval $ac_try) 2>&5 | |
10947 | ac_status=$? | |
10948 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10949 | (exit $ac_status); }; } && | |
10950 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
10951 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10952 | (eval $ac_try) 2>&5 | |
10953 | ac_status=$? | |
10954 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10955 | (exit $ac_status); }; }; then | |
56694dd9 ZW |
10956 | am_cv_val_LC_MESSAGES=yes |
10957 | else | |
ba479fd2 NN |
10958 | echo "$as_me: failed program was:" >&5 |
10959 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10960 | ||
10961 | am_cv_val_LC_MESSAGES=no | |
56694dd9 | 10962 | fi |
86da66b5 HPN |
10963 | rm -f conftest.err conftest.$ac_objext \ |
10964 | conftest$ac_exeext conftest.$ac_ext | |
56694dd9 | 10965 | fi |
ba479fd2 NN |
10966 | echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 |
10967 | echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 | |
63cf211a | 10968 | if test $am_cv_val_LC_MESSAGES = yes; then |
ba479fd2 NN |
10969 | |
10970 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 10971 | #define HAVE_LC_MESSAGES 1 |
ba479fd2 | 10972 | _ACEOF |
56694dd9 ZW |
10973 | |
10974 | fi | |
10975 | ||
f91abfce | 10976 | |
a03ea89b BM |
10977 | |
10978 | echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 | |
10979 | echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 | |
10980 | if test "${am_cv_langinfo_codeset+set}" = set; then | |
10981 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10982 | else | |
10983 | cat >conftest.$ac_ext <<_ACEOF | |
10984 | /* confdefs.h. */ | |
10985 | _ACEOF | |
10986 | cat confdefs.h >>conftest.$ac_ext | |
10987 | cat >>conftest.$ac_ext <<_ACEOF | |
10988 | /* end confdefs.h. */ | |
10989 | #include <langinfo.h> | |
10990 | int | |
10991 | main () | |
10992 | { | |
10993 | char* cs = nl_langinfo(CODESET); | |
10994 | ; | |
10995 | return 0; | |
10996 | } | |
10997 | _ACEOF | |
10998 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10999 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11000 | (eval $ac_link) 2>conftest.er1 | |
11001 | ac_status=$? | |
11002 | grep -v '^ *+' conftest.er1 >conftest.err | |
11003 | rm -f conftest.er1 | |
11004 | cat conftest.err >&5 | |
11005 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11006 | (exit $ac_status); } && | |
b095fe2c | 11007 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
a03ea89b BM |
11008 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11009 | (eval $ac_try) 2>&5 | |
11010 | ac_status=$? | |
11011 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11012 | (exit $ac_status); }; } && | |
11013 | { ac_try='test -s conftest$ac_exeext' | |
11014 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11015 | (eval $ac_try) 2>&5 | |
11016 | ac_status=$? | |
11017 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11018 | (exit $ac_status); }; }; then | |
11019 | am_cv_langinfo_codeset=yes | |
11020 | else | |
11021 | echo "$as_me: failed program was:" >&5 | |
11022 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11023 | ||
11024 | am_cv_langinfo_codeset=no | |
11025 | fi | |
11026 | rm -f conftest.err conftest.$ac_objext \ | |
11027 | conftest$ac_exeext conftest.$ac_ext | |
11028 | ||
11029 | fi | |
11030 | echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 | |
11031 | echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 | |
11032 | if test $am_cv_langinfo_codeset = yes; then | |
11033 | ||
11034 | cat >>confdefs.h <<\_ACEOF | |
11035 | #define HAVE_LANGINFO_CODESET 1 | |
11036 | _ACEOF | |
11037 | ||
11038 | fi | |
11039 | ||
11040 | ||
86cf1cbd KG |
11041 | # We will need to find libiberty.h and ansidecl.h |
11042 | saved_CFLAGS="$CFLAGS" | |
11043 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
ad6717df PB |
11044 | |
11045 | ||
11046 | ||
11047 | ||
11048 | ||
11049 | ||
11050 | ||
11051 | ||
11052 | ||
11053 | ||
11054 | ||
11055 | ||
11056 | ||
11057 | ||
11058 | ||
11059 | ||
11060 | ||
11061 | ||
11062 | ||
11063 | ||
11064 | ||
6a257778 | 11065 | |
ad6717df PB |
11066 | |
11067 | ||
8e944909 | 11068 | for ac_func in getenv atol sbrk abort atof getcwd getwd \ |
3b681e9d | 11069 | strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ |
236ce4b2 | 11070 | fprintf_unlocked strstr errno snprintf vasprintf \ |
6a257778 | 11071 | malloc realloc calloc free basename getopt clock getpagesize |
81bf3d9e | 11072 | do |
ad6717df | 11073 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11074 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11075 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11076 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11077 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11078 | else | |
11079 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11080 | /* confdefs.h. */ |
11081 | _ACEOF | |
11082 | cat confdefs.h >>conftest.$ac_ext | |
11083 | cat >>conftest.$ac_ext <<_ACEOF | |
11084 | /* end confdefs.h. */ | |
7afe8c41 KG |
11085 | #undef $ac_tr_decl |
11086 | #define $ac_tr_decl 1 | |
ba479fd2 | 11087 | |
d02af173 | 11088 | #include "ansidecl.h" |
86cf1cbd | 11089 | #include "system.h" |
f31e826b | 11090 | |
ba479fd2 NN |
11091 | int |
11092 | main () | |
11093 | { | |
86cf1cbd KG |
11094 | #ifndef $ac_func |
11095 | char *(*pfn) = (char *(*)) $ac_func ; | |
11096 | #endif | |
ba479fd2 NN |
11097 | ; |
11098 | return 0; | |
11099 | } | |
11100 | _ACEOF | |
11101 | rm -f conftest.$ac_objext | |
11102 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11103 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11104 | ac_status=$? |
86da66b5 HPN |
11105 | grep -v '^ *+' conftest.er1 >conftest.err |
11106 | rm -f conftest.er1 | |
11107 | cat conftest.err >&5 | |
ba479fd2 NN |
11108 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11109 | (exit $ac_status); } && | |
b095fe2c | 11110 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
11111 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11112 | (eval $ac_try) 2>&5 | |
11113 | ac_status=$? | |
11114 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11115 | (exit $ac_status); }; } && | |
11116 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11117 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11118 | (eval $ac_try) 2>&5 | |
11119 | ac_status=$? | |
11120 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11121 | (exit $ac_status); }; }; then | |
f31e826b | 11122 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 11123 | else |
ba479fd2 NN |
11124 | echo "$as_me: failed program was:" >&5 |
11125 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11126 | ||
11127 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 11128 | fi |
86da66b5 | 11129 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
11130 | fi |
11131 | ||
f31e826b | 11132 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
11133 | echo "$as_me:$LINENO: result: yes" >&5 |
11134 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 11135 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11136 | _ACEOF |
11137 | ||
81bf3d9e | 11138 | else |
ba479fd2 NN |
11139 | echo "$as_me:$LINENO: result: no" >&5 |
11140 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 11141 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11142 | _ACEOF |
11143 | ||
81bf3d9e RH |
11144 | fi |
11145 | ||
11146 | done | |
ba479fd2 | 11147 | |
ba479fd2 | 11148 | |
ba479fd2 | 11149 | |
81bf3d9e | 11150 | |
81bf3d9e RH |
11151 | |
11152 | for ac_func in getrlimit setrlimit getrusage | |
11153 | do | |
ad6717df | 11154 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11155 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11156 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11157 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11158 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11159 | else | |
11160 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11161 | /* confdefs.h. */ |
11162 | _ACEOF | |
11163 | cat confdefs.h >>conftest.$ac_ext | |
11164 | cat >>conftest.$ac_ext <<_ACEOF | |
11165 | /* end confdefs.h. */ | |
7afe8c41 KG |
11166 | #undef $ac_tr_decl |
11167 | #define $ac_tr_decl 1 | |
ba479fd2 | 11168 | |
d02af173 | 11169 | #include "ansidecl.h" |
86cf1cbd | 11170 | #include "system.h" |
81bf3d9e RH |
11171 | #ifdef HAVE_SYS_RESOURCE_H |
11172 | #include <sys/resource.h> | |
11173 | #endif | |
11174 | ||
f31e826b | 11175 | |
ba479fd2 NN |
11176 | int |
11177 | main () | |
11178 | { | |
86cf1cbd KG |
11179 | #ifndef $ac_func |
11180 | char *(*pfn) = (char *(*)) $ac_func ; | |
11181 | #endif | |
ba479fd2 NN |
11182 | ; |
11183 | return 0; | |
11184 | } | |
11185 | _ACEOF | |
11186 | rm -f conftest.$ac_objext | |
11187 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11188 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11189 | ac_status=$? |
86da66b5 HPN |
11190 | grep -v '^ *+' conftest.er1 >conftest.err |
11191 | rm -f conftest.er1 | |
11192 | cat conftest.err >&5 | |
ba479fd2 NN |
11193 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11194 | (exit $ac_status); } && | |
b095fe2c | 11195 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
11196 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11197 | (eval $ac_try) 2>&5 | |
11198 | ac_status=$? | |
11199 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11200 | (exit $ac_status); }; } && | |
11201 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11202 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11203 | (eval $ac_try) 2>&5 | |
11204 | ac_status=$? | |
11205 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11206 | (exit $ac_status); }; }; then | |
f31e826b | 11207 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 11208 | else |
ba479fd2 NN |
11209 | echo "$as_me: failed program was:" >&5 |
11210 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11211 | ||
11212 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 11213 | fi |
86da66b5 | 11214 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
11215 | fi |
11216 | ||
f31e826b | 11217 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
11218 | echo "$as_me:$LINENO: result: yes" >&5 |
11219 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 11220 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11221 | _ACEOF |
11222 | ||
81bf3d9e | 11223 | else |
ba479fd2 NN |
11224 | echo "$as_me:$LINENO: result: no" >&5 |
11225 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 11226 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11227 | _ACEOF |
11228 | ||
81bf3d9e RH |
11229 | fi |
11230 | ||
11231 | done | |
86cf1cbd | 11232 | |
81bf3d9e | 11233 | |
ba479fd2 | 11234 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11235 | /* confdefs.h. */ |
11236 | _ACEOF | |
11237 | cat confdefs.h >>conftest.$ac_ext | |
11238 | cat >>conftest.$ac_ext <<_ACEOF | |
11239 | /* end confdefs.h. */ | |
b2522d2b HPN |
11240 | |
11241 | #include "ansidecl.h" | |
11242 | #include "system.h" | |
11243 | #ifdef HAVE_SYS_RESOURCE_H | |
11244 | #include <sys/resource.h> | |
11245 | #endif | |
11246 | ||
ba479fd2 NN |
11247 | int |
11248 | main () | |
11249 | { | |
b2522d2b | 11250 | rlim_t l = 0; |
ba479fd2 NN |
11251 | ; |
11252 | return 0; | |
11253 | } | |
11254 | _ACEOF | |
11255 | rm -f conftest.$ac_objext | |
11256 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11257 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11258 | ac_status=$? |
86da66b5 HPN |
11259 | grep -v '^ *+' conftest.er1 >conftest.err |
11260 | rm -f conftest.er1 | |
11261 | cat conftest.err >&5 | |
ba479fd2 NN |
11262 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11263 | (exit $ac_status); } && | |
b095fe2c | 11264 | { ac_try='test -z "$ac_c_werror_flag" || 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 | |
b2522d2b HPN |
11276 | : |
11277 | else | |
ba479fd2 NN |
11278 | echo "$as_me: failed program was:" >&5 |
11279 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11280 | ||
11281 | ||
11282 | cat >>confdefs.h <<\_ACEOF | |
b2522d2b | 11283 | #define rlim_t long |
ba479fd2 | 11284 | _ACEOF |
b2522d2b HPN |
11285 | |
11286 | fi | |
86da66b5 | 11287 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
b2522d2b | 11288 | |
2102b2fe RS |
11289 | # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible |
11290 | # FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname | |
11291 | # in collect2.c, <fcntl.h> isn't visible, but the configure test below needs | |
11292 | # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME. | |
ad6717df | 11293 | |
351df804 | 11294 | for ac_func in ldgetname |
c1800ec8 | 11295 | do |
ad6717df | 11296 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11297 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11298 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11299 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11300 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11301 | else | |
11302 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11303 | /* confdefs.h. */ |
11304 | _ACEOF | |
11305 | cat confdefs.h >>conftest.$ac_ext | |
11306 | cat >>conftest.$ac_ext <<_ACEOF | |
11307 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11308 | #undef $ac_tr_decl |
11309 | #define $ac_tr_decl 1 | |
ba479fd2 | 11310 | |
351df804 KG |
11311 | #include "ansidecl.h" |
11312 | #include "system.h" | |
11313 | #ifdef HAVE_LDFCN_H | |
2102b2fe RS |
11314 | #undef FREAD |
11315 | #undef FWRITE | |
351df804 KG |
11316 | #include <ldfcn.h> |
11317 | #endif | |
11318 | ||
11319 | ||
ba479fd2 NN |
11320 | int |
11321 | main () | |
11322 | { | |
351df804 KG |
11323 | #ifndef $ac_func |
11324 | char *(*pfn) = (char *(*)) $ac_func ; | |
11325 | #endif | |
ba479fd2 NN |
11326 | ; |
11327 | return 0; | |
11328 | } | |
11329 | _ACEOF | |
11330 | rm -f conftest.$ac_objext | |
11331 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11332 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11333 | ac_status=$? |
86da66b5 HPN |
11334 | grep -v '^ *+' conftest.er1 >conftest.err |
11335 | rm -f conftest.er1 | |
11336 | cat conftest.err >&5 | |
ba479fd2 NN |
11337 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11338 | (exit $ac_status); } && | |
b095fe2c | 11339 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
11340 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11341 | (eval $ac_try) 2>&5 | |
11342 | ac_status=$? | |
11343 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11344 | (exit $ac_status); }; } && | |
11345 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11346 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11347 | (eval $ac_try) 2>&5 | |
11348 | ac_status=$? | |
11349 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11350 | (exit $ac_status); }; }; then | |
351df804 KG |
11351 | eval "gcc_cv_have_decl_$ac_func=yes" |
11352 | else | |
ba479fd2 NN |
11353 | echo "$as_me: failed program was:" >&5 |
11354 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11355 | ||
11356 | eval "gcc_cv_have_decl_$ac_func=no" | |
351df804 | 11357 | fi |
86da66b5 | 11358 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
351df804 KG |
11359 | fi |
11360 | ||
11361 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
11362 | echo "$as_me:$LINENO: result: yes" >&5 |
11363 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 11364 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11365 | _ACEOF |
11366 | ||
351df804 | 11367 | else |
ba479fd2 NN |
11368 | echo "$as_me:$LINENO: result: no" >&5 |
11369 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 11370 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11371 | _ACEOF |
11372 | ||
351df804 KG |
11373 | fi |
11374 | ||
11375 | done | |
ba479fd2 | 11376 | |
351df804 KG |
11377 | |
11378 | ||
11379 | for ac_func in times | |
11380 | do | |
ad6717df | 11381 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11382 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11383 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11384 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11385 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11386 | else | |
11387 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11388 | /* confdefs.h. */ |
11389 | _ACEOF | |
11390 | cat confdefs.h >>conftest.$ac_ext | |
11391 | cat >>conftest.$ac_ext <<_ACEOF | |
11392 | /* end confdefs.h. */ | |
351df804 KG |
11393 | #undef $ac_tr_decl |
11394 | #define $ac_tr_decl 1 | |
ba479fd2 | 11395 | |
c1800ec8 ZW |
11396 | #include "ansidecl.h" |
11397 | #include "system.h" | |
11398 | #ifdef HAVE_SYS_TIMES_H | |
11399 | #include <sys/times.h> | |
11400 | #endif | |
11401 | ||
11402 | ||
ba479fd2 NN |
11403 | int |
11404 | main () | |
11405 | { | |
c1800ec8 ZW |
11406 | #ifndef $ac_func |
11407 | char *(*pfn) = (char *(*)) $ac_func ; | |
11408 | #endif | |
ba479fd2 NN |
11409 | ; |
11410 | return 0; | |
11411 | } | |
11412 | _ACEOF | |
11413 | rm -f conftest.$ac_objext | |
11414 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11415 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11416 | ac_status=$? |
86da66b5 HPN |
11417 | grep -v '^ *+' conftest.er1 >conftest.err |
11418 | rm -f conftest.er1 | |
11419 | cat conftest.err >&5 | |
ba479fd2 NN |
11420 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11421 | (exit $ac_status); } && | |
b095fe2c | 11422 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
11423 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11424 | (eval $ac_try) 2>&5 | |
11425 | ac_status=$? | |
11426 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11427 | (exit $ac_status); }; } && | |
11428 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11429 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11430 | (eval $ac_try) 2>&5 | |
11431 | ac_status=$? | |
11432 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11433 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11434 | eval "gcc_cv_have_decl_$ac_func=yes" |
11435 | else | |
ba479fd2 NN |
11436 | echo "$as_me: failed program was:" >&5 |
11437 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11438 | ||
11439 | eval "gcc_cv_have_decl_$ac_func=no" | |
c1800ec8 | 11440 | fi |
86da66b5 | 11441 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 ZW |
11442 | fi |
11443 | ||
11444 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
11445 | echo "$as_me:$LINENO: result: yes" >&5 |
11446 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 11447 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11448 | _ACEOF |
11449 | ||
c1800ec8 | 11450 | else |
ba479fd2 NN |
11451 | echo "$as_me:$LINENO: result: no" >&5 |
11452 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 11453 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11454 | _ACEOF |
11455 | ||
c1800ec8 ZW |
11456 | fi |
11457 | ||
11458 | done | |
c1800ec8 ZW |
11459 | |
11460 | ||
11461 | # More time-related stuff. | |
ba479fd2 NN |
11462 | echo "$as_me:$LINENO: checking for struct tms" >&5 |
11463 | echo $ECHO_N "checking for struct tms... $ECHO_C" >&6 | |
11464 | if test "${ac_cv_struct_tms+set}" = set; then | |
11465 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11466 | else | |
11467 | ||
11468 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11469 | /* confdefs.h. */ |
11470 | _ACEOF | |
11471 | cat confdefs.h >>conftest.$ac_ext | |
11472 | cat >>conftest.$ac_ext <<_ACEOF | |
11473 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11474 | |
11475 | #include "ansidecl.h" | |
11476 | #include "system.h" | |
11477 | #ifdef HAVE_SYS_TIMES_H | |
11478 | #include <sys/times.h> | |
11479 | #endif | |
11480 | ||
ba479fd2 NN |
11481 | int |
11482 | main () | |
11483 | { | |
c1800ec8 | 11484 | struct tms tms; |
ba479fd2 NN |
11485 | ; |
11486 | return 0; | |
11487 | } | |
11488 | _ACEOF | |
11489 | rm -f conftest.$ac_objext | |
11490 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11491 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11492 | ac_status=$? |
86da66b5 HPN |
11493 | grep -v '^ *+' conftest.er1 >conftest.err |
11494 | rm -f conftest.er1 | |
11495 | cat conftest.err >&5 | |
ba479fd2 NN |
11496 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11497 | (exit $ac_status); } && | |
b095fe2c | 11498 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
11499 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11500 | (eval $ac_try) 2>&5 | |
11501 | ac_status=$? | |
11502 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11503 | (exit $ac_status); }; } && | |
11504 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11505 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11506 | (eval $ac_try) 2>&5 | |
11507 | ac_status=$? | |
11508 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11509 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11510 | ac_cv_struct_tms=yes |
11511 | else | |
ba479fd2 NN |
11512 | echo "$as_me: failed program was:" >&5 |
11513 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11514 | ||
11515 | ac_cv_struct_tms=no | |
c1800ec8 | 11516 | fi |
86da66b5 | 11517 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 11518 | fi |
ba479fd2 NN |
11519 | echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 |
11520 | echo "${ECHO_T}$ac_cv_struct_tms" >&6 | |
63cf211a | 11521 | if test $ac_cv_struct_tms = yes; then |
ba479fd2 NN |
11522 | |
11523 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 11524 | #define HAVE_STRUCT_TMS 1 |
ba479fd2 | 11525 | _ACEOF |
c1800ec8 ZW |
11526 | |
11527 | fi | |
11528 | ||
11529 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
11530 | # revisit after autoconf 2.50. | |
ba479fd2 NN |
11531 | echo "$as_me:$LINENO: checking for clock_t" >&5 |
11532 | echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 | |
11533 | if test "${gcc_cv_type_clock_t+set}" = set; then | |
11534 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11535 | else | |
11536 | ||
11537 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11538 | /* confdefs.h. */ |
11539 | _ACEOF | |
11540 | cat confdefs.h >>conftest.$ac_ext | |
11541 | cat >>conftest.$ac_ext <<_ACEOF | |
11542 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11543 | |
11544 | #include "ansidecl.h" | |
11545 | #include "system.h" | |
11546 | ||
ba479fd2 NN |
11547 | int |
11548 | main () | |
11549 | { | |
c1800ec8 | 11550 | clock_t x; |
ba479fd2 NN |
11551 | ; |
11552 | return 0; | |
11553 | } | |
11554 | _ACEOF | |
11555 | rm -f conftest.$ac_objext | |
11556 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11557 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11558 | ac_status=$? |
86da66b5 HPN |
11559 | grep -v '^ *+' conftest.er1 >conftest.err |
11560 | rm -f conftest.er1 | |
11561 | cat conftest.err >&5 | |
ba479fd2 NN |
11562 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11563 | (exit $ac_status); } && | |
b095fe2c | 11564 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
11565 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11566 | (eval $ac_try) 2>&5 | |
11567 | ac_status=$? | |
11568 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11569 | (exit $ac_status); }; } && | |
11570 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11571 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11572 | (eval $ac_try) 2>&5 | |
11573 | ac_status=$? | |
11574 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11575 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11576 | gcc_cv_type_clock_t=yes |
11577 | else | |
ba479fd2 NN |
11578 | echo "$as_me: failed program was:" >&5 |
11579 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11580 | ||
11581 | gcc_cv_type_clock_t=no | |
c1800ec8 | 11582 | fi |
86da66b5 | 11583 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 11584 | fi |
ba479fd2 NN |
11585 | echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 |
11586 | echo "${ECHO_T}$gcc_cv_type_clock_t" >&6 | |
63cf211a | 11587 | if test $gcc_cv_type_clock_t = yes; then |
ba479fd2 NN |
11588 | |
11589 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 11590 | #define HAVE_CLOCK_T 1 |
ba479fd2 | 11591 | _ACEOF |
c1800ec8 ZW |
11592 | |
11593 | fi | |
11594 | ||
eb70d86d AS |
11595 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
11596 | CFLAGS="$saved_CFLAGS" | |
11597 | ||
07cf4226 DM |
11598 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
11599 | if test "${enable_initfini_array+set}" = set; then | |
11600 | enableval="$enable_initfini_array" | |
ba479fd2 | 11601 | |
07cf4226 | 11602 | else |
ba479fd2 NN |
11603 | |
11604 | echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5 | |
11605 | echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6 | |
11606 | if test "${gcc_cv_initfini_array+set}" = set; then | |
11607 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
07cf4226 | 11608 | else |
eb70d86d | 11609 | if test "$cross_compiling" = yes; then |
918c4fe4 | 11610 | gcc_cv_initfini_array=no |
eb70d86d | 11611 | else |
ba479fd2 | 11612 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11613 | /* confdefs.h. */ |
11614 | _ACEOF | |
11615 | cat confdefs.h >>conftest.$ac_ext | |
11616 | cat >>conftest.$ac_ext <<_ACEOF | |
11617 | /* end confdefs.h. */ | |
eb70d86d | 11618 | |
07cf4226 DM |
11619 | static int x = -1; |
11620 | int main (void) { return x; } | |
11621 | int foo (void) { x = 0; } | |
11622 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
ba479fd2 NN |
11623 | _ACEOF |
11624 | rm -f conftest$ac_exeext | |
11625 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11626 | (eval $ac_link) 2>&5 | |
11627 | ac_status=$? | |
11628 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11629 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
11630 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11631 | (eval $ac_try) 2>&5 | |
11632 | ac_status=$? | |
11633 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11634 | (exit $ac_status); }; }; then | |
918c4fe4 | 11635 | gcc_cv_initfini_array=yes |
eb70d86d | 11636 | else |
ba479fd2 NN |
11637 | echo "$as_me: program exited with status $ac_status" >&5 |
11638 | echo "$as_me: failed program was:" >&5 | |
11639 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11640 | ||
11641 | ( exit $ac_status ) | |
11642 | gcc_cv_initfini_array=no | |
eb70d86d | 11643 | fi |
86da66b5 | 11644 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
eb70d86d | 11645 | fi |
07cf4226 | 11646 | fi |
ba479fd2 NN |
11647 | echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5 |
11648 | echo "${ECHO_T}$gcc_cv_initfini_array" >&6 | |
eb70d86d | 11649 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 11650 | |
ba479fd2 | 11651 | fi; |
63cf211a | 11652 | if test $enable_initfini_array = yes; then |
ba479fd2 NN |
11653 | |
11654 | cat >>confdefs.h <<\_ACEOF | |
eb70d86d | 11655 | #define HAVE_INITFINI_ARRAY 1 |
ba479fd2 | 11656 | _ACEOF |
07cf4226 | 11657 | |
eb70d86d | 11658 | fi |
81bf3d9e | 11659 | |
ba479fd2 NN |
11660 | # mkdir takes a single argument on some systems. |
11661 | echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5 | |
11662 | echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6 | |
11663 | if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then | |
11664 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75923b2f | 11665 | else |
ba479fd2 | 11666 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11667 | /* confdefs.h. */ |
11668 | _ACEOF | |
11669 | cat confdefs.h >>conftest.$ac_ext | |
11670 | cat >>conftest.$ac_ext <<_ACEOF | |
11671 | /* end confdefs.h. */ | |
75923b2f MK |
11672 | |
11673 | #include <sys/types.h> | |
11674 | #ifdef HAVE_SYS_STAT_H | |
11675 | # include <sys/stat.h> | |
11676 | #endif | |
11677 | #ifdef HAVE_UNISTD_H | |
11678 | # include <unistd.h> | |
11679 | #endif | |
11680 | #ifdef HAVE_DIRECT_H | |
11681 | # include <direct.h> | |
11682 | #endif | |
ba479fd2 NN |
11683 | int |
11684 | main () | |
11685 | { | |
75923b2f | 11686 | mkdir ("foo", 0); |
ba479fd2 NN |
11687 | ; |
11688 | return 0; | |
11689 | } | |
11690 | _ACEOF | |
11691 | rm -f conftest.$ac_objext | |
11692 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11693 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11694 | ac_status=$? |
86da66b5 HPN |
11695 | grep -v '^ *+' conftest.er1 >conftest.err |
11696 | rm -f conftest.er1 | |
11697 | cat conftest.err >&5 | |
ba479fd2 NN |
11698 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11699 | (exit $ac_status); } && | |
b095fe2c | 11700 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
11701 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11702 | (eval $ac_try) 2>&5 | |
11703 | ac_status=$? | |
11704 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11705 | (exit $ac_status); }; } && | |
11706 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11707 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11708 | (eval $ac_try) 2>&5 | |
11709 | ac_status=$? | |
11710 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11711 | (exit $ac_status); }; }; then | |
75923b2f MK |
11712 | gcc_cv_mkdir_takes_one_arg=no |
11713 | else | |
ba479fd2 NN |
11714 | echo "$as_me: failed program was:" >&5 |
11715 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11716 | ||
11717 | gcc_cv_mkdir_takes_one_arg=yes | |
75923b2f | 11718 | fi |
86da66b5 | 11719 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75923b2f | 11720 | fi |
ba479fd2 NN |
11721 | echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5 |
11722 | echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6 | |
63cf211a | 11723 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then |
ba479fd2 NN |
11724 | |
11725 | cat >>confdefs.h <<\_ACEOF | |
75923b2f | 11726 | #define MKDIR_TAKES_ONE_ARG 1 |
ba479fd2 | 11727 | _ACEOF |
75923b2f MK |
11728 | |
11729 | fi | |
11730 | ||
11731 | ||
861bb6c1 JL |
11732 | # File extensions |
11733 | manext='.1' | |
11734 | objext='.o' | |
11735 | ||
11736 | ||
11737 | ||
4977bab6 ZW |
11738 | # With Setjmp/Longjmp based exception handling. |
11739 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
11740 | if test "${enable_sjlj_exceptions+set}" = set; then | |
11741 | enableval="$enable_sjlj_exceptions" | |
11742 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
63cf211a | 11743 | |
ba479fd2 NN |
11744 | cat >>confdefs.h <<_ACEOF |
11745 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
11746 | _ACEOF | |
4977bab6 | 11747 | |
ba479fd2 | 11748 | fi; |
4977bab6 | 11749 | |
443728bb L |
11750 | # For platforms with the unwind ABI which includes an unwind library, |
11751 | # libunwind, we can choose to use the system libunwind. | |
4977bab6 | 11752 | |
443728bb L |
11753 | # Check whether --with-system-libunwind or --without-system-libunwind was given. |
11754 | if test "${with_system_libunwind+set}" = set; then | |
11755 | withval="$with_system_libunwind" | |
4977bab6 | 11756 | |
ba479fd2 | 11757 | fi; |
4977bab6 | 11758 | |
34a86c2b NN |
11759 | # -------------------------------------------------------- |
11760 | # Build, host, and target specific configuration fragments | |
11761 | # -------------------------------------------------------- | |
11762 | ||
5b28c537 NN |
11763 | # Collect build-machine-specific information. |
11764 | . ${srcdir}/config.build | |
11765 | ||
a89ea0df NN |
11766 | # Collect host-machine-specific information. |
11767 | . ${srcdir}/config.host | |
11768 | ||
ef69da62 | 11769 | target_gtfiles= |
a89ea0df NN |
11770 | |
11771 | # Collect target-machine-specific information. | |
8ad9fb33 | 11772 | . ${srcdir}/config.gcc |
861bb6c1 JL |
11773 | |
11774 | extra_objs="${host_extra_objs} ${extra_objs}" | |
30500d84 | 11775 | extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}" |
861bb6c1 JL |
11776 | |
11777 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 11778 | if test x"$tm_file" = x |
861bb6c1 JL |
11779 | then tm_file=$cpu_type/$cpu_type.h; fi |
11780 | ||
6b2adea9 | 11781 | if test x"$extra_headers" = x |
861bb6c1 JL |
11782 | then extra_headers=; fi |
11783 | ||
75bffa71 | 11784 | if test x$md_file = x |
e98e406f | 11785 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 11786 | |
75bffa71 | 11787 | if test x$out_file = x |
861bb6c1 JL |
11788 | then out_file=$cpu_type/$cpu_type.c; fi |
11789 | ||
75bffa71 | 11790 | if test x"$tmake_file" = x |
861bb6c1 JL |
11791 | then tmake_file=$cpu_type/t-$cpu_type |
11792 | fi | |
11793 | ||
90e6a802 | 11794 | if test x"$dwarf2" = xyes |
756ee602 | 11795 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
11796 | fi |
11797 | ||
861bb6c1 | 11798 | # Say what files are being used for the output code and MD file. |
11642c3a | 11799 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
11800 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
11801 | ||
11642c3a | 11802 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
11803 | # about them and drop them. |
11804 | ||
11642c3a ZW |
11805 | bx= |
11806 | for x in $build_xm_file; do | |
11807 | if test -f $srcdir/config/$x | |
11808 | then bx="$bx $x" | |
ba479fd2 NN |
11809 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
11810 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
11811 | fi |
11812 | done | |
11813 | build_xm_file="$bx" | |
11814 | ||
11815 | hx= | |
11816 | for x in $host_xm_file; do | |
11817 | if test -f $srcdir/config/$x | |
11818 | then hx="$hx $x" | |
ba479fd2 NN |
11819 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
11820 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
11821 | fi |
11822 | done | |
11823 | host_xm_file="$hx" | |
11824 | ||
11825 | tx= | |
11826 | for x in $xm_file; do | |
11827 | if test -f $srcdir/config/$x | |
11828 | then tx="$tx $x" | |
ba479fd2 NN |
11829 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
11830 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
11831 | fi |
11832 | done | |
11833 | xm_file="$tx" | |
11834 | ||
861bb6c1 JL |
11835 | count=a |
11836 | for f in $tm_file; do | |
11837 | count=${count}x | |
11838 | done | |
75bffa71 | 11839 | if test $count = ax; then |
861bb6c1 JL |
11840 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
11841 | else | |
11842 | echo "Using the following target machine macro files:" | |
11843 | for f in $tm_file; do | |
11844 | echo " $srcdir/config/$f" | |
11845 | done | |
11846 | fi | |
11847 | ||
4977bab6 | 11848 | if test x$need_64bit_hwint = xyes; then |
ba479fd2 NN |
11849 | |
11850 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 11851 | #define NEED_64BIT_HOST_WIDE_INT 1 |
ba479fd2 | 11852 | _ACEOF |
4977bab6 ZW |
11853 | |
11854 | fi | |
11855 | ||
99fa8911 AP |
11856 | if test x$use_long_long_for_widest_fast_int = xyes; then |
11857 | ||
11858 | cat >>confdefs.h <<\_ACEOF | |
11859 | #define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1 | |
11860 | _ACEOF | |
11861 | ||
11862 | fi | |
11863 | ||
861bb6c1 JL |
11864 | count=a |
11865 | for f in $host_xm_file; do | |
11866 | count=${count}x | |
11867 | done | |
11642c3a ZW |
11868 | if test $count = a; then |
11869 | : | |
11870 | elif test $count = ax; then | |
861bb6c1 JL |
11871 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
11872 | else | |
11873 | echo "Using the following host machine macro files:" | |
11874 | for f in $host_xm_file; do | |
11875 | echo " $srcdir/config/$f" | |
11876 | done | |
11877 | fi | |
476d9098 | 11878 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 11879 | |
75bffa71 | 11880 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
11881 | count=a |
11882 | for f in $build_xm_file; do | |
11883 | count=${count}x | |
11884 | done | |
11642c3a ZW |
11885 | if test $count = a; then |
11886 | : | |
11887 | elif test $count = ax; then | |
861bb6c1 JL |
11888 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
11889 | else | |
11890 | echo "Using the following build machine macro files:" | |
11891 | for f in $build_xm_file; do | |
11892 | echo " $srcdir/config/$f" | |
11893 | done | |
11894 | fi | |
11895 | fi | |
11896 | ||
8bb915b6 NN |
11897 | # --------- |
11898 | # Threading | |
11899 | # --------- | |
11900 | ||
c2e494a8 | 11901 | # Check if a valid thread package |
615be2cf | 11902 | case ${enable_threads} in |
c2e494a8 NN |
11903 | "" | no) |
11904 | # No threads | |
11905 | target_thread_file='single' | |
11906 | ;; | |
11907 | yes) | |
11908 | # default | |
11909 | target_thread_file='single' | |
11910 | ;; | |
18167442 | 11911 | aix | dce | gnat | irix | posix | posix95 | rtems | \ |
769e49eb | 11912 | single | solaris | vxworks | win32 ) |
615be2cf | 11913 | target_thread_file=${enable_threads} |
c2e494a8 NN |
11914 | ;; |
11915 | *) | |
615be2cf | 11916 | echo "${enable_threads} is an unknown thread package" 1>&2 |
c2e494a8 NN |
11917 | exit 1 |
11918 | ;; | |
11919 | esac | |
11920 | ||
11921 | if test x${thread_file} = x; then | |
11922 | # No thread file set by target-specific clauses in config.gcc, | |
11923 | # so use file chosen by default logic above | |
11924 | thread_file=${target_thread_file} | |
861bb6c1 JL |
11925 | fi |
11926 | ||
8bb915b6 NN |
11927 | # Make gthr-default.h if we have a thread file. |
11928 | gthread_flags= | |
11929 | if test $thread_file != single; then | |
11930 | rm -f gthr-default.h | |
11931 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h | |
11932 | gthread_flags=-DHAVE_GTHR_DEFAULT | |
11933 | fi | |
11934 | ||
11935 | ||
11936 | # -------- | |
11937 | # UNSORTED | |
11938 | # -------- | |
11939 | ||
18fbf599 | 11940 | use_cxa_atexit=no |
2121a768 JT |
11941 | if test x$enable___cxa_atexit = xyes || \ |
11942 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
18fbf599 PB |
11943 | if test x$host = x$target; then |
11944 | echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 | |
354b7da5 DH |
11945 | echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6 |
11946 | if test "${ac_cv_func___cxa_atexit+set}" = set; then | |
11947 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11948 | else | |
11949 | cat >conftest.$ac_ext <<_ACEOF | |
354b7da5 DH |
11950 | /* confdefs.h. */ |
11951 | _ACEOF | |
11952 | cat confdefs.h >>conftest.$ac_ext | |
11953 | cat >>conftest.$ac_ext <<_ACEOF | |
11954 | /* end confdefs.h. */ | |
86da66b5 HPN |
11955 | /* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit. |
11956 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
11957 | #define __cxa_atexit innocuous___cxa_atexit | |
11958 | ||
354b7da5 DH |
11959 | /* System header to define __stub macros and hopefully few prototypes, |
11960 | which can conflict with char __cxa_atexit (); below. | |
11961 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
11962 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 11963 | |
354b7da5 DH |
11964 | #ifdef __STDC__ |
11965 | # include <limits.h> | |
11966 | #else | |
11967 | # include <assert.h> | |
11968 | #endif | |
86da66b5 HPN |
11969 | |
11970 | #undef __cxa_atexit | |
11971 | ||
354b7da5 DH |
11972 | /* Override any gcc2 internal prototype to avoid an error. */ |
11973 | #ifdef __cplusplus | |
11974 | extern "C" | |
11975 | { | |
11976 | #endif | |
11977 | /* We use char because int might match the return type of a gcc2 | |
11978 | builtin and then its argument prototype would still apply. */ | |
11979 | char __cxa_atexit (); | |
11980 | /* The GNU C library defines this for functions which it implements | |
11981 | to always fail with ENOSYS. Some functions are actually named | |
11982 | something starting with __ and the normal name is an alias. */ | |
11983 | #if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit) | |
11984 | choke me | |
11985 | #else | |
11986 | char (*f) () = __cxa_atexit; | |
11987 | #endif | |
11988 | #ifdef __cplusplus | |
11989 | } | |
11990 | #endif | |
11991 | ||
11992 | int | |
11993 | main () | |
11994 | { | |
11995 | return f != __cxa_atexit; | |
11996 | ; | |
11997 | return 0; | |
11998 | } | |
11999 | _ACEOF | |
12000 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12001 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12002 | (eval $ac_link) 2>conftest.er1 |
354b7da5 | 12003 | ac_status=$? |
86da66b5 HPN |
12004 | grep -v '^ *+' conftest.er1 >conftest.err |
12005 | rm -f conftest.er1 | |
12006 | cat conftest.err >&5 | |
354b7da5 DH |
12007 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12008 | (exit $ac_status); } && | |
b095fe2c | 12009 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
12010 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12011 | (eval $ac_try) 2>&5 | |
12012 | ac_status=$? | |
12013 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12014 | (exit $ac_status); }; } && | |
12015 | { ac_try='test -s conftest$ac_exeext' | |
354b7da5 DH |
12016 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12017 | (eval $ac_try) 2>&5 | |
12018 | ac_status=$? | |
12019 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12020 | (exit $ac_status); }; }; then | |
12021 | ac_cv_func___cxa_atexit=yes | |
12022 | else | |
12023 | echo "$as_me: failed program was:" >&5 | |
12024 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12025 | ||
12026 | ac_cv_func___cxa_atexit=no | |
12027 | fi | |
86da66b5 HPN |
12028 | rm -f conftest.err conftest.$ac_objext \ |
12029 | conftest$ac_exeext conftest.$ac_ext | |
354b7da5 DH |
12030 | fi |
12031 | echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5 | |
12032 | echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6 | |
12033 | if test $ac_cv_func___cxa_atexit = yes; then | |
18fbf599 PB |
12034 | use_cxa_atexit=yes |
12035 | else | |
12036 | echo "__cxa_atexit can't be enabled on this target" | |
12037 | fi | |
12038 | ||
12039 | else | |
12040 | # We can't check for __cxa_atexit when building a cross, so assume | |
12041 | # it is available | |
12042 | use_cxa_atexit=yes | |
12043 | fi | |
12044 | if test x$use_cxa_atexit = xyes; then | |
ba479fd2 NN |
12045 | |
12046 | cat >>confdefs.h <<\_ACEOF | |
2121a768 | 12047 | #define DEFAULT_USE_CXA_ATEXIT 1 |
ba479fd2 | 12048 | _ACEOF |
2121a768 | 12049 | |
18fbf599 | 12050 | fi |
2121a768 JT |
12051 | fi |
12052 | ||
a5381466 | 12053 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
12054 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
12055 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
ba479fd2 NN |
12056 | |
12057 | ||
12058 | cat >>confdefs.h <<_ACEOF | |
e22340b0 | 12059 | #define EXTRA_MODES_FILE "config/$extra_modes" |
ba479fd2 | 12060 | _ACEOF |
a5381466 ZW |
12061 | |
12062 | fi | |
12063 | ||
75685792 RS |
12064 | # Convert extra_options into a form suitable for Makefile use. |
12065 | extra_opt_files= | |
12066 | for f in $extra_options; do | |
12067 | extra_opt_files="$extra_opt_files \$(srcdir)/config/$f" | |
12068 | done | |
12069 | ||
12070 | ||
b7cb92ad | 12071 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 12072 | # the first file included by config.h. |
4977bab6 | 12073 | # If host=build, it is correct to have bconfig include auto-host.h |
ba479fd2 | 12074 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 12075 | # work to find out the build config parameters. |
75bffa71 | 12076 | if test x$host = x$build |
db81d74a | 12077 | then |
eaf4e618 | 12078 | build_auto=auto-host.h |
b7cb92ad JL |
12079 | else |
12080 | # We create a subdir, then run autoconf in the subdir. | |
12081 | # To prevent recursion we set host and build for the new | |
12082 | # invocation of configure to the build for this invocation | |
ba479fd2 | 12083 | # of configure. |
b7cb92ad JL |
12084 | tempdir=build.$$ |
12085 | rm -rf $tempdir | |
12086 | mkdir $tempdir | |
12087 | cd $tempdir | |
12088 | case ${srcdir} in | |
255b8a49 | 12089 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
12090 | *) realsrcdir=../${srcdir};; |
12091 | esac | |
d920e825 L |
12092 | saved_CFLAGS="${CFLAGS}" |
12093 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
12094 | ${realsrcdir}/configure \ | |
33e70558 | 12095 | --enable-languages=${enable_languages-all} \ |
534d0cc0 | 12096 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 12097 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
12098 | |
12099 | # We just finished tests for the build machine, so rename | |
12100 | # the file auto-build.h in the gcc directory. | |
12101 | mv auto-host.h ../auto-build.h | |
12102 | cd .. | |
12103 | rm -rf $tempdir | |
eaf4e618 | 12104 | build_auto=auto-build.h |
db81d74a RH |
12105 | fi |
12106 | ||
06f0b04c | 12107 | |
eaf4e618 | 12108 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
12109 | tm_p_file="${tm_p_file} tm-preds.h" |
12110 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
12111 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 12112 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 KG |
12113 | # put this back in temporarily. |
12114 | xm_file="ansidecl.h ${xm_file}" | |
0056a9b5 | 12115 | |
34a86c2b NN |
12116 | # -------- |
12117 | # UNSORTED | |
12118 | # -------- | |
12119 | ||
cc1e60ea | 12120 | # Compile in configure arguments. |
8105825d | 12121 | if test -f configargs.h ; then |
cc1e60ea | 12122 | # Being re-configured. |
022dae81 | 12123 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
12124 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
12125 | else | |
12126 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
12127 | fi | |
eeae7b41 DJ |
12128 | |
12129 | # Double all backslashes and backslash all quotes to turn | |
12130 | # gcc_config_arguments into a C string. | |
12131 | sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out | |
12132 | $gcc_config_arguments | |
12133 | EOF | |
12134 | gcc_config_arguments_str=`cat conftest.out` | |
12135 | rm -f conftest.out | |
12136 | ||
cc1e60ea JM |
12137 | cat > configargs.h <<EOF |
12138 | /* Generated automatically. */ | |
eeae7b41 | 12139 | static const char configuration_arguments[] = "$gcc_config_arguments_str"; |
a6687d2b | 12140 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
12141 | |
12142 | static const struct { | |
12143 | const char *name, *value; | |
12144 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
12145 | EOF |
12146 | ||
ab87f8c8 JL |
12147 | # Internationalization |
12148 | PACKAGE=gcc | |
12149 | VERSION="$gcc_version" | |
861bb6c1 | 12150 | |
c2c36d38 MK |
12151 | cat >>confdefs.h <<_ACEOF |
12152 | #define PACKAGE "$PACKAGE" | |
12153 | _ACEOF | |
12154 | ||
12155 | ||
ab87f8c8 JL |
12156 | |
12157 | ||
56694dd9 ZW |
12158 | # If we haven't got the data from the intl directory, |
12159 | # assume NLS is disabled. | |
ba479fd2 NN |
12160 | USE_NLS=no |
12161 | LIBINTL= | |
12162 | LIBINTL_DEP= | |
12163 | INCINTL= | |
12164 | XGETTEXT= | |
12165 | GMSGFMT= | |
12166 | POSUB= | |
56694dd9 ZW |
12167 | if test -f ../intl/config.intl; then |
12168 | . ../intl/config.intl | |
093e61a6 | 12169 | fi |
ba479fd2 NN |
12170 | echo "$as_me:$LINENO: checking whether NLS is requested" >&5 |
12171 | echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 | |
56694dd9 | 12172 | if test x"$USE_NLS" != xyes; then |
ba479fd2 NN |
12173 | echo "$as_me:$LINENO: result: no" >&5 |
12174 | echo "${ECHO_T}no" >&6 | |
56694dd9 | 12175 | else |
ba479fd2 NN |
12176 | echo "$as_me:$LINENO: result: yes" >&5 |
12177 | echo "${ECHO_T}yes" >&6 | |
12178 | ||
12179 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 12180 | #define ENABLE_NLS 1 |
ba479fd2 | 12181 | _ACEOF |
56694dd9 | 12182 | |
093e61a6 | 12183 | |
ba479fd2 NN |
12184 | echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 |
12185 | echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 | |
56694dd9 | 12186 | # Look for .po and .gmo files in the source directory. |
ba479fd2 | 12187 | CATALOGS= |
56694dd9 ZW |
12188 | XLINGUAS= |
12189 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
12190 | # If there aren't any .gmo files the shell will give us the | |
12191 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
12192 | # weeded out. | |
12193 | case "$cat" in *\**) | |
12194 | continue;; | |
12195 | esac | |
12196 | # The quadruple backslash is collapsed to a double backslash | |
12197 | # by the backticks, then collapsed again by the double quotes, | |
12198 | # leaving us with one backslash in the sed expression (right | |
12199 | # before the dot that mustn't act as a wildcard). | |
12200 | cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"` | |
12201 | lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"` | |
12202 | # The user is allowed to set LINGUAS to a list of languages to | |
12203 | # install catalogs for. If it's empty that means "all of them." | |
12204 | if test "x$LINGUAS" = x; then | |
12205 | CATALOGS="$CATALOGS $cat" | |
12206 | XLINGUAS="$XLINGUAS $lang" | |
12207 | else | |
12208 | case "$LINGUAS" in *$lang*) | |
12209 | CATALOGS="$CATALOGS $cat" | |
12210 | XLINGUAS="$XLINGUAS $lang" | |
12211 | ;; | |
12212 | esac | |
12213 | fi | |
12214 | done | |
12215 | LINGUAS="$XLINGUAS" | |
ba479fd2 NN |
12216 | echo "$as_me:$LINENO: result: $LINGUAS" >&5 |
12217 | echo "${ECHO_T}$LINGUAS" >&6 | |
56694dd9 | 12218 | fi |
861bb6c1 | 12219 | |
56694dd9 ZW |
12220 | # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get |
12221 | # -liconv on the link line twice. | |
12222 | case "$LIBINTL" in *$LIBICONV*) | |
12223 | LIBICONV= ;; | |
12224 | esac | |
dc6746e7 | 12225 | |
56694dd9 ZW |
12226 | # Windows32 Registry support for specifying GCC installation paths. |
12227 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
12228 | if test "${enable_win32_registry+set}" = set; then | |
12229 | enableval="$enable_win32_registry" | |
dc6746e7 | 12230 | |
ba479fd2 | 12231 | fi; |
56694dd9 ZW |
12232 | case $host_os in |
12233 | win32 | pe | cygwin* | mingw32* | uwin*) | |
ba479fd2 NN |
12234 | echo "$as_me:$LINENO: checking whether windows registry support is requested" >&5 |
12235 | echo $ECHO_N "checking whether windows registry support is requested... $ECHO_C" >&6 | |
56694dd9 | 12236 | if test "x$enable_win32_registry" != xno; then |
ba479fd2 NN |
12237 | |
12238 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 12239 | #define ENABLE_WIN32_REGISTRY 1 |
ba479fd2 NN |
12240 | _ACEOF |
12241 | ||
12242 | echo "$as_me:$LINENO: result: yes" >&5 | |
12243 | echo "${ECHO_T}yes" >&6 | |
12244 | echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5 | |
12245 | echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6 | |
12246 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then | |
12247 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12248 | else | |
12249 | ac_func_search_save_LIBS=$LIBS | |
12250 | ac_cv_search_RegOpenKeyExA=no | |
12251 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12252 | /* confdefs.h. */ |
12253 | _ACEOF | |
12254 | cat confdefs.h >>conftest.$ac_ext | |
12255 | cat >>conftest.$ac_ext <<_ACEOF | |
12256 | /* end confdefs.h. */ | |
861bb6c1 | 12257 | |
ab87f8c8 | 12258 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
12259 | #ifdef __cplusplus |
12260 | extern "C" | |
12261 | #endif | |
ab87f8c8 | 12262 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
12263 | builtin and then its argument prototype would still apply. */ |
12264 | char RegOpenKeyExA (); | |
12265 | int | |
12266 | main () | |
12267 | { | |
12268 | RegOpenKeyExA (); | |
12269 | ; | |
12270 | return 0; | |
12271 | } | |
12272 | _ACEOF | |
12273 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12274 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12275 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 12276 | ac_status=$? |
86da66b5 HPN |
12277 | grep -v '^ *+' conftest.er1 >conftest.err |
12278 | rm -f conftest.er1 | |
12279 | cat conftest.err >&5 | |
ba479fd2 NN |
12280 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12281 | (exit $ac_status); } && | |
b095fe2c | 12282 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
12283 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12284 | (eval $ac_try) 2>&5 | |
12285 | ac_status=$? | |
12286 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12287 | (exit $ac_status); }; } && | |
12288 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
12289 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12290 | (eval $ac_try) 2>&5 | |
12291 | ac_status=$? | |
12292 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12293 | (exit $ac_status); }; }; then | |
56694dd9 | 12294 | ac_cv_search_RegOpenKeyExA="none required" |
ab87f8c8 | 12295 | else |
ba479fd2 NN |
12296 | echo "$as_me: failed program was:" >&5 |
12297 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12298 | ||
861bb6c1 | 12299 | fi |
86da66b5 HPN |
12300 | rm -f conftest.err conftest.$ac_objext \ |
12301 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
12302 | if test "$ac_cv_search_RegOpenKeyExA" = no; then |
12303 | for ac_lib in advapi32; do | |
12304 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12305 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12306 | /* confdefs.h. */ |
12307 | _ACEOF | |
12308 | cat confdefs.h >>conftest.$ac_ext | |
12309 | cat >>conftest.$ac_ext <<_ACEOF | |
12310 | /* end confdefs.h. */ | |
12311 | ||
56694dd9 | 12312 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
12313 | #ifdef __cplusplus |
12314 | extern "C" | |
12315 | #endif | |
56694dd9 | 12316 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
12317 | builtin and then its argument prototype would still apply. */ |
12318 | char RegOpenKeyExA (); | |
12319 | int | |
12320 | main () | |
12321 | { | |
12322 | RegOpenKeyExA (); | |
12323 | ; | |
12324 | return 0; | |
12325 | } | |
12326 | _ACEOF | |
12327 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12328 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12329 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 12330 | ac_status=$? |
86da66b5 HPN |
12331 | grep -v '^ *+' conftest.er1 >conftest.err |
12332 | rm -f conftest.er1 | |
12333 | cat conftest.err >&5 | |
ba479fd2 NN |
12334 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12335 | (exit $ac_status); } && | |
b095fe2c | 12336 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
12337 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12338 | (eval $ac_try) 2>&5 | |
12339 | ac_status=$? | |
12340 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12341 | (exit $ac_status); }; } && | |
12342 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
12343 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12344 | (eval $ac_try) 2>&5 | |
12345 | ac_status=$? | |
12346 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12347 | (exit $ac_status); }; }; then | |
12348 | ac_cv_search_RegOpenKeyExA="-l$ac_lib" | |
56694dd9 | 12349 | break |
861bb6c1 | 12350 | else |
ba479fd2 NN |
12351 | echo "$as_me: failed program was:" >&5 |
12352 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12353 | ||
861bb6c1 | 12354 | fi |
86da66b5 HPN |
12355 | rm -f conftest.err conftest.$ac_objext \ |
12356 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 12357 | done |
6e3f3080 | 12358 | fi |
ba479fd2 NN |
12359 | LIBS=$ac_func_search_save_LIBS |
12360 | fi | |
12361 | echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5 | |
12362 | echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6 | |
12363 | if test "$ac_cv_search_RegOpenKeyExA" != no; then | |
63cf211a | 12364 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" |
ba479fd2 | 12365 | |
ab87f8c8 | 12366 | fi |
ba479fd2 | 12367 | |
cafe096b | 12368 | else |
ba479fd2 NN |
12369 | echo "$as_me:$LINENO: result: no" >&5 |
12370 | echo "${ECHO_T}no" >&6 | |
093e61a6 | 12371 | fi |
ab87f8c8 | 12372 | |
56694dd9 ZW |
12373 | # Check if user specified a different registry key. |
12374 | case "x${enable_win32_registry}" in | |
12375 | x | xyes) | |
12376 | # default. | |
12377 | gcc_cv_win32_registry_key="$VERSION" | |
12378 | ;; | |
12379 | xno) | |
12380 | # no registry lookup. | |
12381 | gcc_cv_win32_registry_key='' | |
12382 | ;; | |
12383 | *) | |
12384 | # user-specified key. | |
12385 | gcc_cv_win32_registry_key="$enable_win32_registry" | |
12386 | ;; | |
12387 | esac | |
ab87f8c8 | 12388 | |
56694dd9 | 12389 | if test "x$enable_win32_registry" != xno; then |
ba479fd2 NN |
12390 | echo "$as_me:$LINENO: checking registry key on windows hosts" >&5 |
12391 | echo $ECHO_N "checking registry key on windows hosts... $ECHO_C" >&6 | |
12392 | ||
12393 | cat >>confdefs.h <<_ACEOF | |
56694dd9 | 12394 | #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" |
ba479fd2 | 12395 | _ACEOF |
cafe096b | 12396 | |
ba479fd2 NN |
12397 | echo "$as_me:$LINENO: result: $gcc_cv_win32_registry_key" >&5 |
12398 | echo "${ECHO_T}$gcc_cv_win32_registry_key" >&6 | |
093e61a6 | 12399 | fi |
56694dd9 ZW |
12400 | ;; |
12401 | esac | |
ab87f8c8 | 12402 | |
56694dd9 ZW |
12403 | # Get an absolute path to the GCC top-level source directory |
12404 | holddir=`${PWDCMD-pwd}` | |
12405 | cd $srcdir | |
12406 | topdir=`${PWDCMD-pwd}` | |
12407 | cd $holddir | |
ab87f8c8 | 12408 | |
56694dd9 | 12409 | # Conditionalize the makefile for this host machine. |
2ed26f6b | 12410 | xmake_file= |
c406e779 | 12411 | for f in ${host_xmake_file} |
56694dd9 ZW |
12412 | do |
12413 | if test -f ${srcdir}/config/$f | |
12414 | then | |
2ed26f6b | 12415 | xmake_file="${xmake_file} \$(srcdir)/config/$f" |
56694dd9 ZW |
12416 | fi |
12417 | done | |
093e61a6 | 12418 | |
56694dd9 | 12419 | # Conditionalize the makefile for this target machine. |
2ed26f6b | 12420 | tmake_file_= |
c406e779 | 12421 | for f in ${tmake_file} |
56694dd9 ZW |
12422 | do |
12423 | if test -f ${srcdir}/config/$f | |
12424 | then | |
2ed26f6b | 12425 | tmake_file_="${tmake_file_} \$(srcdir)/config/$f" |
56694dd9 ZW |
12426 | fi |
12427 | done | |
2ed26f6b | 12428 | tmake_file="${tmake_file_}" |
71a94577 | 12429 | |
ab87f8c8 JL |
12430 | # If the host doesn't support symlinks, modify CC in |
12431 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
12432 | # Otherwise, we can use "CC=$(CC)". | |
12433 | rm -f symtest.tem | |
35f06ae4 PB |
12434 | case "$LN_S" in |
12435 | *-s*) | |
12436 | cc_set_by_configure="\$(CC)" | |
12437 | quoted_cc_set_by_configure="\$(CC)" | |
12438 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" | |
12439 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" | |
12440 | ;; | |
12441 | *) | |
12442 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
12443 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" | |
12444 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" | |
12445 | quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`" | |
12446 | ;; | |
12447 | esac | |
ab87f8c8 | 12448 | |
5395b47b NN |
12449 | # This is a terrible hack which will go away some day. |
12450 | host_cc_for_libada=${CC} | |
1e3fad21 NN |
12451 | |
12452 | ||
ab87f8c8 JL |
12453 | out_object_file=`basename $out_file .c`.o |
12454 | ||
75685792 RS |
12455 | tm_file_list="options.h" |
12456 | tm_include_list="options.h" | |
ab87f8c8 | 12457 | for f in $tm_file; do |
64ccbc99 | 12458 | case $f in |
d02af173 | 12459 | defaults.h ) |
e22340b0 ZW |
12460 | tm_file_list="${tm_file_list} \$(srcdir)/$f" |
12461 | tm_include_list="${tm_include_list} $f" | |
12462 | ;; | |
12463 | * ) | |
12464 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | |
12465 | tm_include_list="${tm_include_list} config/$f" | |
12466 | ;; | |
64ccbc99 | 12467 | esac |
ab87f8c8 JL |
12468 | done |
12469 | ||
11642c3a | 12470 | tm_p_file_list= |
e22340b0 | 12471 | tm_p_include_list= |
11642c3a | 12472 | for f in $tm_p_file; do |
4977bab6 ZW |
12473 | case $f in |
12474 | tm-preds.h ) | |
e22340b0 ZW |
12475 | tm_p_file_list="${tm_p_file_list} $f" |
12476 | tm_p_include_list="${tm_p_include_list} $f" | |
12477 | ;; | |
12478 | * ) | |
12479 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
12480 | tm_p_include_list="${tm_p_include_list} config/$f" | |
12481 | esac | |
12482 | done | |
12483 | ||
12484 | xm_file_list= | |
12485 | xm_include_list= | |
12486 | for f in $xm_file; do | |
12487 | case $f in | |
12488 | ansidecl.h ) | |
12489 | xm_file_list="${xm_file_list} \$(srcdir)/../include/$f" | |
12490 | xm_include_list="${xm_include_list} $f" | |
12491 | ;; | |
12492 | auto-host.h ) | |
12493 | xm_file_list="${xm_file_list} $f" | |
12494 | xm_include_list="${xm_include_list} $f" | |
12495 | ;; | |
12496 | * ) | |
12497 | xm_file_list="${xm_file_list} \$(srcdir)/config/$f" | |
12498 | xm_include_list="${xm_include_list} config/$f" | |
12499 | ;; | |
4977bab6 | 12500 | esac |
11642c3a ZW |
12501 | done |
12502 | ||
ab87f8c8 | 12503 | host_xm_file_list= |
e22340b0 | 12504 | host_xm_include_list= |
ab87f8c8 | 12505 | for f in $host_xm_file; do |
64ccbc99 | 12506 | case $f in |
d02af173 | 12507 | ansidecl.h ) |
e22340b0 ZW |
12508 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f" |
12509 | host_xm_include_list="${host_xm_include_list} $f" | |
12510 | ;; | |
e2500fed | 12511 | auto-host.h ) |
e22340b0 ZW |
12512 | host_xm_file_list="${host_xm_file_list} $f" |
12513 | host_xm_include_list="${host_xm_include_list} $f" | |
12514 | ;; | |
12515 | * ) | |
12516 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" | |
12517 | host_xm_include_list="${host_xm_include_list} config/$f" | |
12518 | ;; | |
64ccbc99 | 12519 | esac |
ab87f8c8 JL |
12520 | done |
12521 | ||
12522 | build_xm_file_list= | |
12523 | for f in $build_xm_file; do | |
64ccbc99 | 12524 | case $f in |
d02af173 | 12525 | ansidecl.h ) |
e22340b0 ZW |
12526 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f" |
12527 | build_xm_include_list="${build_xm_include_list} $f" | |
12528 | ;; | |
e2500fed | 12529 | auto-build.h | auto-host.h ) |
e22340b0 ZW |
12530 | build_xm_file_list="${build_xm_file_list} $f" |
12531 | build_xm_include_list="${build_xm_include_list} $f" | |
12532 | ;; | |
12533 | * ) | |
12534 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" | |
12535 | build_xm_include_list="${build_xm_include_list} config/$f" | |
12536 | ;; | |
64ccbc99 | 12537 | esac |
ab87f8c8 JL |
12538 | done |
12539 | ||
a078a589 ZW |
12540 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
12541 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
ba479fd2 NN |
12542 | CROSS= |
12543 | ALL=all.internal | |
12544 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
12545 | if test x$host != x$target |
12546 | then | |
a078a589 ZW |
12547 | CROSS="-DCROSS_COMPILE" |
12548 | ALL=all.cross | |
12549 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
343f59d9 | 12550 | case "$host","$target" in |
3a7e8b87 GK |
12551 | # Darwin crosses can use the host system's libraries and headers, |
12552 | # because of the fat library support. Of course, it must be the | |
12553 | # same version of Darwin on both sides. Allow the user to | |
12554 | # just say --target=foo-darwin without a version number to mean | |
12555 | # "the version on this system". | |
12556 | *-*-darwin*,*-*-darwin*) | |
12557 | hostos=`echo $host | sed 's/.*-darwin/darwin/'` | |
12558 | targetos=`echo $target | sed 's/.*-darwin/darwin/'` | |
12559 | if test $hostos = $targetos -o $targetos = darwin ; then | |
12560 | CROSS= | |
12561 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
12562 | with_headers=yes | |
12563 | fi | |
12564 | ;; | |
12565 | ||
343f59d9 AM |
12566 | i?86-*-*,x86_64-*-* \ |
12567 | | powerpc*-*-*,powerpc64*-*-*) | |
12568 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
12569 | esac | |
7a615b25 AO |
12570 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
12571 | # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR) | |
12572 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
12573 | fi |
12574 | ||
b39d221a EC |
12575 | # If this is a cross-compiler that does not |
12576 | # have its own set of headers then define | |
12577 | # inhibit_libc | |
12578 | ||
dc06db20 R |
12579 | # If this is using newlib, without having the headers available now, |
12580 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
12581 | # This prevents libgcc2 from containing any code which requires libc |
12582 | # support. | |
b39d221a | 12583 | inhibit_libc= |
dc06db20 R |
12584 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
12585 | test x$with_newlib = xyes ; } && | |
e50084fa | 12586 | { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then |
b39d221a | 12587 | inhibit_libc=-Dinhibit_libc |
b39d221a EC |
12588 | fi |
12589 | ||
12590 | ||
a078a589 ZW |
12591 | # When building gcc with a cross-compiler, we need to adjust things so |
12592 | # that the generator programs are still built with the native compiler. | |
12593 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
12594 | |
12595 | # These are the normal (build=host) settings: | |
ba479fd2 NN |
12596 | CC_FOR_BUILD='$(CC)' |
12597 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
ba479fd2 | 12598 | STMP_FIXINC=stmp-fixinc |
8ad9fb33 AP |
12599 | |
12600 | # Possibly disable fixproto, on a per-target basis. | |
12601 | case ${use_fixproto} in | |
12602 | no) | |
12603 | STMP_FIXPROTO= | |
12604 | ;; | |
12605 | yes) | |
12606 | STMP_FIXPROTO=stmp-fixproto | |
12607 | ;; | |
12608 | esac | |
12609 | ||
a078a589 | 12610 | |
83599948 NS |
12611 | # And these apply if build != host, or we are generating coverage data |
12612 | if test x$build != x$host || test "x$coverage_flags" != x | |
ab87f8c8 | 12613 | then |
b11e4747 | 12614 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' |
a078a589 | 12615 | |
7a615b25 | 12616 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
de253ca4 GK |
12617 | if "x$STMP_FIXPROTO" != x ; then |
12618 | STMP_FIXPROTO=stmp-install-fixproto | |
12619 | fi | |
7a615b25 | 12620 | fi |
ab87f8c8 JL |
12621 | fi |
12622 | ||
12623 | # Expand extra_headers to include complete path. | |
12624 | # This substitutes for lots of t-* files. | |
12625 | extra_headers_list= | |
b1ef58c8 NN |
12626 | # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers. |
12627 | for file in ${extra_headers} ; do | |
12628 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" | |
12629 | done | |
ab87f8c8 | 12630 | |
c38f02df ILT |
12631 | # Define collect2 in Makefile. |
12632 | case $host_can_use_collect2 in | |
12633 | no) collect2= ;; | |
12634 | *) collect2='collect2$(exeext)' ;; | |
12635 | esac | |
12636 | ||
12637 | ||
ab87f8c8 | 12638 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
12639 | case $use_collect2 in |
12640 | no) use_collect2= ;; | |
12641 | "") ;; | |
ba479fd2 | 12642 | *) |
34a86c2b NN |
12643 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
12644 | xm_defines="${xm_defines} USE_COLLECT2" | |
c38f02df ILT |
12645 | case $host_can_use_collect2 in |
12646 | no) | |
12647 | { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5 | |
12648 | echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;} | |
12649 | { (exit 1); exit 1; }; } | |
12650 | ;; | |
12651 | esac | |
34a86c2b NN |
12652 | ;; |
12653 | esac | |
ab87f8c8 | 12654 | |
8bb915b6 NN |
12655 | # --------------------------- |
12656 | # Assembler & linker features | |
12657 | # --------------------------- | |
12658 | ||
d869a8c4 NN |
12659 | # Identify the assembler which will work hand-in-glove with the newly |
12660 | # built GCC, so that we can examine its features. This is the assembler | |
12661 | # which will be driven by the driver program. | |
12662 | # | |
12663 | # If build != host, and we aren't building gas in-tree, we identify a | |
12664 | # build->target assembler and hope that it will have the same features | |
12665 | # as the host->target assembler we'll be using. | |
ba479fd2 NN |
12666 | echo "$as_me:$LINENO: checking what assembler to use" >&5 |
12667 | echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 | |
34a86c2b | 12668 | in_tree_gas=no |
ab87f8c8 | 12669 | gcc_cv_as= |
981d4858 JM |
12670 | gcc_cv_gas_major_version= |
12671 | gcc_cv_gas_minor_version= | |
ab87f8c8 JL |
12672 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
12673 | if test -x "$DEFAULT_ASSEMBLER"; then | |
12674 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
57991eba | 12675 | elif test -x as$build_exeext; then |
ab87f8c8 | 12676 | # Build using assembler in the current directory. |
57991eba | 12677 | gcc_cv_as=./as$build_exeext |
34a86c2b | 12678 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
08d105fa AO |
12679 | && test -f ../gas/Makefile \ |
12680 | && test x$build = x$host; then | |
12681 | # Single tree build which includes gas. We want to prefer it | |
12682 | # over whatever linker top-level may have detected, since | |
12683 | # we'll use what we're building after installation anyway. | |
ad9c4d9f NN |
12684 | in_tree_gas=yes |
12685 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
12686 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
12687 | $gcc_cv_as_gas_srcdir/configure \ | |
12688 | $gcc_cv_as_gas_srcdir/configure.in \ | |
12689 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
58ea87a9 | 12690 | gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` |
ad9c4d9f NN |
12691 | if test x$gcc_cv_gas_version != x; then |
12692 | break | |
12693 | fi | |
12694 | done | |
12695 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
12696 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
12697 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
5aaaf0e8 NN |
12698 | case $gcc_cv_gas_patch_version in |
12699 | "") gcc_cv_gas_patch_version="0" ;; | |
12700 | esac | |
8ada417f ZW |
12701 | gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ |
12702 | + $gcc_cv_gas_minor_version \) \* 1000 \ | |
12703 | + $gcc_cv_gas_patch_version` | |
ad9c4d9f | 12704 | |
57991eba PB |
12705 | rm -f as$build_exeext |
12706 | $LN_S ../gas/as-new$build_exeext as$build_exeext 2>/dev/null | |
5408ac6c HPN |
12707 | in_tree_gas_is_elf=no |
12708 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
12709 | || (grep 'obj_format = multi' ../gas/Makefile \ | |
12710 | && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null | |
12711 | then | |
12712 | in_tree_gas_is_elf=yes | |
12713 | fi | |
08d105fa AO |
12714 | elif test -x "$AS_FOR_TARGET"; then |
12715 | gcc_cv_as="$AS_FOR_TARGET" | |
12716 | elif test -x "$AS" && test x$host = x$target; then | |
12717 | gcc_cv_as="$AS" | |
981d4858 | 12718 | fi |
9e423e6d | 12719 | |
534d0cc0 | 12720 | if test "x$gcc_cv_as" = x; then |
779243f7 JL |
12721 | # Search the same directories that the installed compiler will |
12722 | # search. Else we may find the wrong assembler and lose. If we | |
12723 | # do not find a suitable assembler binary, then try the user's | |
12724 | # path. | |
12725 | # | |
12726 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
12727 | # user's path. Unfortunately, there is no good way to get at the | |
12728 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
12729 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
12730 | # to be fixed as part of the make/configure rewrite too. | |
12731 | ||
12732 | if test "x$exec_prefix" = xNONE; then | |
12733 | if test "x$prefix" = xNONE; then | |
12734 | test_prefix=/usr/local | |
12735 | else | |
12736 | test_prefix=$prefix | |
12737 | fi | |
12738 | else | |
12739 | test_prefix=$exec_prefix | |
12740 | fi | |
12741 | ||
12742 | # If the loop below does not find an assembler, then use whatever | |
b095fe2c DJ |
12743 | # one we can find in the users's path. We are looking for a |
12744 | # ${build} -> ${target} assembler. | |
55a2ea2a | 12745 | if test "x$program_prefix" != xNONE; then |
57991eba | 12746 | gcc_cv_as=${program_prefix}as$build_exeext |
b095fe2c DJ |
12747 | elif test x$build != x$host && test x$build != x$target; then |
12748 | gcc_cv_as=${target_noncanonical}-as$build_exeext | |
55a2ea2a | 12749 | else |
57991eba | 12750 | gcc_cv_as=`echo as | sed "${program_transform_name}"`$build_exeext |
55a2ea2a AM |
12751 | fi |
12752 | ||
21addcd9 PB |
12753 | if test x$host = x$build; then |
12754 | test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \ | |
12755 | $test_prefix/libexec/gcc/$target_noncanonical \ | |
12756 | /usr/lib/gcc/$target_noncanonical/$gcc_version \ | |
12757 | /usr/lib/gcc/$target_noncanonical \ | |
12758 | $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \ | |
12759 | $test_prefix/$target_noncanonical/bin" | |
12760 | else | |
12761 | test_dirs= | |
12762 | fi | |
55a2ea2a | 12763 | |
b095fe2c | 12764 | if test x$build = x$target; then |
55a2ea2a | 12765 | test_dirs="$test_dirs \ |
779243f7 JL |
12766 | /usr/libexec \ |
12767 | /usr/ccs/gcc \ | |
12768 | /usr/ccs/bin \ | |
12769 | /udk/usr/ccs/bin \ | |
12770 | /bsd43/usr/lib/cmplrs/cc \ | |
12771 | /usr/cross64/usr/bin \ | |
12772 | /usr/lib/cmplrs/cc \ | |
12773 | /sysv/usr/lib/cmplrs/cc \ | |
12774 | /svr4/usr/lib/cmplrs/cc \ | |
12775 | /usr/bin" | |
55a2ea2a | 12776 | fi |
779243f7 JL |
12777 | |
12778 | for dir in $test_dirs; do | |
57991eba PB |
12779 | if test -x $dir/as$build_exeext; then |
12780 | gcc_cv_as=$dir/as$build_exeext | |
779243f7 JL |
12781 | break; |
12782 | fi | |
12783 | done | |
9e423e6d | 12784 | fi |
34a86c2b NN |
12785 | case $in_tree_gas in |
12786 | yes) | |
ba479fd2 NN |
12787 | echo "$as_me:$LINENO: result: \"newly built gas\"" >&5 |
12788 | echo "${ECHO_T}\"newly built gas\"" >&6 | |
34a86c2b NN |
12789 | ;; |
12790 | no) | |
ba479fd2 NN |
12791 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 |
12792 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
34a86c2b NN |
12793 | ;; |
12794 | esac | |
981d4858 | 12795 | |
d869a8c4 NN |
12796 | # Identify the linker which will work hand-in-glove with the newly |
12797 | # built GCC, so that we can examine its features. This is the linker | |
12798 | # which will be driven by the driver program. | |
12799 | # | |
12800 | # If build != host, and we aren't building gas in-tree, we identify a | |
12801 | # build->target linker and hope that it will have the same features | |
12802 | # as the host->target linker we'll be using. | |
ba479fd2 NN |
12803 | echo "$as_me:$LINENO: checking what linker to use" >&5 |
12804 | echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 | |
34a86c2b | 12805 | in_tree_ld=no |
275b60d6 JJ |
12806 | gcc_cv_ld= |
12807 | gcc_cv_gld_major_version= | |
12808 | gcc_cv_gld_minor_version= | |
12809 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
12810 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
12811 | if test -x "$DEFAULT_LINKER"; then | |
12812 | gcc_cv_ld="$DEFAULT_LINKER" | |
57991eba | 12813 | elif test -x collect-ld$build_exeext; then |
275b60d6 | 12814 | # Build using linker in the current directory. |
57991eba | 12815 | gcc_cv_ld=./collect-ld$build_exeext |
34a86c2b | 12816 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ |
08d105fa AO |
12817 | && test -f ../ld/Makefile \ |
12818 | && test x$build = x$host; then | |
12819 | # Single tree build which includes ld. We want to prefer it | |
12820 | # over whatever linker top-level may have detected, since | |
12821 | # we'll use what we're building after installation anyway. | |
34a86c2b | 12822 | in_tree_ld=yes |
5408ac6c HPN |
12823 | in_tree_ld_is_elf=no |
12824 | if (grep 'EMUL = .*elf' ../ld/Makefile \ | |
8a45d680 AN |
12825 | || grep 'EMUL = .*linux' ../ld/Makefile \ |
12826 | || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then | |
5408ac6c HPN |
12827 | in_tree_ld_is_elf=yes |
12828 | fi | |
275b60d6 JJ |
12829 | 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 |
12830 | do | |
58ea87a9 | 12831 | gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` |
275b60d6 JJ |
12832 | if test x$gcc_cv_gld_version != x; then |
12833 | break | |
12834 | fi | |
12835 | done | |
12836 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
12837 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
57991eba PB |
12838 | rm -f collect-ld$build_exeext |
12839 | $LN_S ../ld/ld-new$build_exeext collect-ld$build_exeext 2>/dev/null | |
08d105fa AO |
12840 | elif test -x "$LD_FOR_TARGET"; then |
12841 | gcc_cv_ld="$LD_FOR_TARGET" | |
12842 | elif test -x "$LD" && test x$host = x$target; then | |
12843 | gcc_cv_ld="$LD" | |
275b60d6 JJ |
12844 | fi |
12845 | ||
534d0cc0 | 12846 | if test "x$gcc_cv_ld" = x; then |
275b60d6 JJ |
12847 | # Search the same directories that the installed compiler will |
12848 | # search. Else we may find the wrong linker and lose. If we | |
12849 | # do not find a suitable linker binary, then try the user's | |
12850 | # path. | |
12851 | # | |
12852 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
12853 | # user's path. Unfortunately, there is no good way to get at the | |
12854 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
12855 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
12856 | # to be fixed as part of the make/configure rewrite too. | |
12857 | ||
12858 | if test "x$exec_prefix" = xNONE; then | |
12859 | if test "x$prefix" = xNONE; then | |
12860 | test_prefix=/usr/local | |
12861 | else | |
12862 | test_prefix=$prefix | |
12863 | fi | |
12864 | else | |
12865 | test_prefix=$exec_prefix | |
12866 | fi | |
12867 | ||
b095fe2c DJ |
12868 | # If the loop below does not find a linker, then use whatever |
12869 | # one we can find in the users's path. We are looking for a | |
12870 | # ${build} -> ${target} linker. | |
55a2ea2a | 12871 | if test "x$program_prefix" != xNONE; then |
57991eba | 12872 | gcc_cv_ld=${program_prefix}ld$build_exeext |
b095fe2c DJ |
12873 | elif test x$build != x$host && test x$build != x$target; then |
12874 | gcc_cv_ld=${target_noncanonical}-ld$build_exeext | |
55a2ea2a | 12875 | else |
57991eba | 12876 | gcc_cv_ld=`echo ld | sed "${program_transform_name}"`$build_exeext |
55a2ea2a AM |
12877 | fi |
12878 | ||
21addcd9 PB |
12879 | if test x$host = x$build; then |
12880 | test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \ | |
12881 | $test_prefix/libexec/gcc/$target_noncanonical \ | |
12882 | /usr/lib/gcc/$target_noncanonical/$gcc_version \ | |
12883 | /usr/lib/gcc/$target_noncanonical \ | |
12884 | $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \ | |
12885 | $test_prefix/$target_noncanonical/bin" | |
12886 | else | |
12887 | test_dirs= | |
12888 | fi | |
55a2ea2a | 12889 | |
b095fe2c | 12890 | if test x$build = x$target; then |
55a2ea2a | 12891 | test_dirs="$test_dirs \ |
275b60d6 JJ |
12892 | /usr/libexec \ |
12893 | /usr/ccs/gcc \ | |
12894 | /usr/ccs/bin \ | |
12895 | /udk/usr/ccs/bin \ | |
12896 | /bsd43/usr/lib/cmplrs/cc \ | |
12897 | /usr/cross64/usr/bin \ | |
12898 | /usr/lib/cmplrs/cc \ | |
12899 | /sysv/usr/lib/cmplrs/cc \ | |
12900 | /svr4/usr/lib/cmplrs/cc \ | |
12901 | /usr/bin" | |
55a2ea2a | 12902 | fi |
275b60d6 JJ |
12903 | |
12904 | for dir in $test_dirs; do | |
57991eba PB |
12905 | if test -x $dir/ld$build_exeext; then |
12906 | gcc_cv_ld=$dir/ld$build_exeext | |
275b60d6 JJ |
12907 | break; |
12908 | fi | |
12909 | done | |
12910 | fi | |
34a86c2b NN |
12911 | case $in_tree_ld in |
12912 | yes) | |
ba479fd2 NN |
12913 | echo "$as_me:$LINENO: result: \"newly built ld\"" >&5 |
12914 | echo "${ECHO_T}\"newly built ld\"" >&6 | |
34a86c2b NN |
12915 | ;; |
12916 | no) | |
ba479fd2 NN |
12917 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 |
12918 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
34a86c2b NN |
12919 | ;; |
12920 | esac | |
275b60d6 | 12921 | |
981d4858 | 12922 | # Figure out what nm we will be using. |
f9c1196a | 12923 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils |
ba479fd2 NN |
12924 | echo "$as_me:$LINENO: checking what nm to use" >&5 |
12925 | echo $ECHO_N "checking what nm to use... $ECHO_C" >&6 | |
f9c1196a | 12926 | in_tree_nm=no |
57991eba PB |
12927 | if test -x nm$build_exeext; then |
12928 | gcc_cv_nm=./nm$build_exeext | |
f9c1196a ZW |
12929 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
12930 | && test -f ../binutils/Makefile; then | |
12931 | # Single tree build which includes binutils. | |
12932 | in_tree_nm=yes | |
57991eba PB |
12933 | gcc_cv_nm=./nm$build_exeext |
12934 | rm -f nm$build_exeext | |
12935 | $LN_S ../binutils/nm-new$build_exeext nm$build_exeext 2>/dev/null | |
534d0cc0 | 12936 | elif test "x$program_prefix" != xNONE; then |
57991eba | 12937 | gcc_cv_nm=${program_prefix}nm$build_exeext |
b095fe2c DJ |
12938 | elif test x$build != x$host && test x$build != x$target; then |
12939 | gcc_cv_nm=${target_noncanonical}-nm$build_exeext | |
534d0cc0 | 12940 | else |
57991eba | 12941 | gcc_cv_nm=`echo nm | sed "${program_transform_name}"`$build_exeext |
981d4858 | 12942 | fi |
f9c1196a | 12943 | case $in_tree_nm in |
ba479fd2 NN |
12944 | yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5 |
12945 | echo "${ECHO_T}\"newly built nm\"" >&6 ;; | |
12946 | no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
12947 | echo "${ECHO_T}$gcc_cv_nm" >&6 ;; | |
f9c1196a | 12948 | esac |
981d4858 | 12949 | |
3cae5780 | 12950 | # Figure out what objdump we will be using. |
ba479fd2 NN |
12951 | echo "$as_me:$LINENO: checking what objdump to use" >&5 |
12952 | echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6 | |
f9c1196a | 12953 | in_tree_objdump=no |
57991eba PB |
12954 | if test -x objdump$build_exeext; then |
12955 | gcc_cv_objdump=./objdump$build_exeext | |
f9c1196a ZW |
12956 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
12957 | && test -f ../binutils/Makefile; then | |
12958 | # Single tree build which includes binutils. | |
12959 | in_tree_objdump=yes | |
57991eba PB |
12960 | gcc_cv_objdump=./objdump$build_exeext |
12961 | rm -f objdump$build_exeext | |
12962 | $LN_S ../binutils/objdump$build_exeext objdump$build_exeext 2>/dev/null | |
534d0cc0 | 12963 | elif test "x$program_prefix" != xNONE; then |
57991eba | 12964 | gcc_cv_objdump=${program_prefix}objdump$build_exeext |
b095fe2c DJ |
12965 | elif test x$build != x$host && test x$build != x$target; then |
12966 | gcc_cv_objdump=${target_noncanonical}-objdump$build_exeext | |
534d0cc0 | 12967 | else |
f9c1196a | 12968 | gcc_cv_objdump=`echo objdump | \ |
57991eba | 12969 | sed "${program_transform_name}"`$build_exeext |
3cae5780 | 12970 | fi |
f9c1196a | 12971 | case $in_tree_objdump in |
ba479fd2 NN |
12972 | yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5 |
12973 | echo "${ECHO_T}\"newly built objdump\"" >&6 ;; | |
12974 | no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
12975 | echo "${ECHO_T}$gcc_cv_objdump" >&6 ;; | |
f9c1196a | 12976 | esac |
3cae5780 | 12977 | |
981d4858 | 12978 | # Figure out what assembler alignment features are present. |
ba479fd2 NN |
12979 | echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5 |
12980 | echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6 | |
12981 | if test "${gcc_cv_as_balign_and_p2align+set}" = set; then | |
12982 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
12983 | else |
12984 | gcc_cv_as_balign_and_p2align=no | |
12985 | if test $in_tree_gas = yes; then | |
12986 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0` | |
12987 | then gcc_cv_as_balign_and_p2align=yes | |
12988 | fi | |
12989 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 12990 | echo '.balign 4 |
8ada417f | 12991 | .p2align 2' > conftest.s |
ba479fd2 NN |
12992 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
12993 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12994 | (eval $ac_try) 2>&5 | |
12995 | ac_status=$? | |
12996 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12997 | (exit $ac_status); }; } | |
8ada417f ZW |
12998 | then |
12999 | gcc_cv_as_balign_and_p2align=yes | |
13000 | else | |
13001 | echo "configure: failed program was" >&5 | |
13002 | cat conftest.s >&5 | |
13003 | fi | |
13004 | rm -f conftest.o conftest.s | |
13005 | fi | |
13006 | fi | |
ba479fd2 NN |
13007 | echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5 |
13008 | echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6 | |
63cf211a | 13009 | if test $gcc_cv_as_balign_and_p2align = yes; then |
ba479fd2 NN |
13010 | |
13011 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13012 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
ba479fd2 | 13013 | _ACEOF |
981d4858 | 13014 | |
ad9c4d9f NN |
13015 | fi |
13016 | ||
ba479fd2 NN |
13017 | echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5 |
13018 | echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6 | |
13019 | if test "${gcc_cv_as_max_skip_p2align+set}" = set; then | |
13020 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13021 | else |
13022 | gcc_cv_as_max_skip_p2align=no | |
13023 | if test $in_tree_gas = yes; then | |
13024 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
13025 | then gcc_cv_as_max_skip_p2align=yes | |
13026 | fi | |
13027 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13028 | echo '.p2align 4,,7' > conftest.s |
ba479fd2 NN |
13029 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13030 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13031 | (eval $ac_try) 2>&5 | |
13032 | ac_status=$? | |
13033 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13034 | (exit $ac_status); }; } | |
8ada417f ZW |
13035 | then |
13036 | gcc_cv_as_max_skip_p2align=yes | |
13037 | else | |
13038 | echo "configure: failed program was" >&5 | |
13039 | cat conftest.s >&5 | |
13040 | fi | |
13041 | rm -f conftest.o conftest.s | |
13042 | fi | |
ad9c4d9f | 13043 | fi |
ba479fd2 NN |
13044 | echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5 |
13045 | echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6 | |
63cf211a | 13046 | if test $gcc_cv_as_max_skip_p2align = yes; then |
ba479fd2 NN |
13047 | |
13048 | cat >>confdefs.h <<\_ACEOF | |
9e423e6d | 13049 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
ba479fd2 | 13050 | _ACEOF |
9e423e6d | 13051 | |
9e423e6d | 13052 | fi |
ad9c4d9f | 13053 | |
ba479fd2 NN |
13054 | echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5 |
13055 | echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6 | |
13056 | if test "${gcc_cv_as_subsection_m1+set}" = set; then | |
13057 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13058 | else |
13059 | gcc_cv_as_subsection_m1=no | |
13060 | if test $in_tree_gas = yes; then | |
13061 | if test $in_tree_gas_is_elf = yes \ | |
13062 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
13063 | then gcc_cv_as_subsection_m1=yes | |
ad9c4d9f | 13064 | fi |
8ada417f | 13065 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13066 | echo 'conftest_label1: .word 0 |
d1accaa3 JJ |
13067 | .subsection -1 |
13068 | conftest_label2: .word 0 | |
8ada417f | 13069 | .previous' > conftest.s |
ba479fd2 NN |
13070 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13071 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13072 | (eval $ac_try) 2>&5 | |
13073 | ac_status=$? | |
13074 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13075 | (exit $ac_status); }; } | |
8ada417f ZW |
13076 | then |
13077 | if test x$gcc_cv_nm != x; then | |
13078 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
13079 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
13080 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 | |
13081 | then : | |
13082 | else gcc_cv_as_subsection_m1=yes | |
13083 | fi | |
13084 | rm -f conftest.nm1 conftest.nm2 | |
13085 | fi | |
13086 | else | |
13087 | echo "configure: failed program was" >&5 | |
13088 | cat conftest.s >&5 | |
13089 | fi | |
13090 | rm -f conftest.o conftest.s | |
13091 | fi | |
981d4858 | 13092 | fi |
ba479fd2 NN |
13093 | echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5 |
13094 | echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6 | |
63cf211a | 13095 | if test $gcc_cv_as_subsection_m1 = yes; then |
ba479fd2 NN |
13096 | |
13097 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13098 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
ba479fd2 | 13099 | _ACEOF |
981d4858 | 13100 | |
d1accaa3 | 13101 | fi |
ad9c4d9f | 13102 | |
ba479fd2 NN |
13103 | echo "$as_me:$LINENO: checking assembler for .weak" >&5 |
13104 | echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6 | |
13105 | if test "${gcc_cv_as_weak+set}" = set; then | |
13106 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13107 | else |
13108 | gcc_cv_as_weak=no | |
13109 | if test $in_tree_gas = yes; then | |
13110 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0` | |
13111 | then gcc_cv_as_weak=yes | |
ad9c4d9f | 13112 | fi |
8ada417f | 13113 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13114 | echo ' .weak foobar' > conftest.s |
ba479fd2 NN |
13115 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13116 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13117 | (eval $ac_try) 2>&5 | |
13118 | ac_status=$? | |
13119 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13120 | (exit $ac_status); }; } | |
8ada417f ZW |
13121 | then |
13122 | gcc_cv_as_weak=yes | |
13123 | else | |
13124 | echo "configure: failed program was" >&5 | |
13125 | cat conftest.s >&5 | |
13126 | fi | |
13127 | rm -f conftest.o conftest.s | |
13128 | fi | |
981d4858 | 13129 | fi |
ba479fd2 NN |
13130 | echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5 |
13131 | echo "${ECHO_T}$gcc_cv_as_weak" >&6 | |
63cf211a | 13132 | if test $gcc_cv_as_weak = yes; then |
ba479fd2 NN |
13133 | |
13134 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13135 | #define HAVE_GAS_WEAK 1 |
ba479fd2 | 13136 | _ACEOF |
981d4858 | 13137 | |
12822146 | 13138 | fi |
ad9c4d9f | 13139 | |
e41f3691 JDA |
13140 | echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5 |
13141 | echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6 | |
13142 | if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then | |
13143 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13144 | else | |
13145 | gcc_cv_as_nsubspa_comdat=no | |
13146 | if test $in_tree_gas = yes; then | |
13147 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
13148 | then gcc_cv_as_nsubspa_comdat=yes | |
13149 | fi | |
13150 | elif test x$gcc_cv_as != x; then | |
13151 | echo ' .SPACE $TEXT$ | |
13152 | .NSUBSPA $CODE$,COMDAT' > conftest.s | |
13153 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
13154 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13155 | (eval $ac_try) 2>&5 | |
13156 | ac_status=$? | |
13157 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13158 | (exit $ac_status); }; } | |
13159 | then | |
13160 | gcc_cv_as_nsubspa_comdat=yes | |
13161 | else | |
13162 | echo "configure: failed program was" >&5 | |
13163 | cat conftest.s >&5 | |
13164 | fi | |
13165 | rm -f conftest.o conftest.s | |
13166 | fi | |
13167 | fi | |
13168 | echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5 | |
13169 | echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6 | |
13170 | if test $gcc_cv_as_nsubspa_comdat = yes; then | |
13171 | ||
13172 | cat >>confdefs.h <<\_ACEOF | |
13173 | #define HAVE_GAS_NSUBSPA_COMDAT 1 | |
13174 | _ACEOF | |
13175 | ||
13176 | fi | |
13177 | ||
8ada417f ZW |
13178 | # .hidden needs to be supported in both the assembler and the linker, |
13179 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
13180 | # This is irritatingly difficult to feature test for; we have to check the | |
13181 | # date string after the version number. If we've got an in-tree | |
13182 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
13183 | # to be safe. | |
13184 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
ba479fd2 NN |
13185 | echo "$as_me:$LINENO: checking assembler for .hidden" >&5 |
13186 | echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6 | |
13187 | if test "${gcc_cv_as_hidden+set}" = set; then | |
13188 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13189 | else |
13190 | gcc_cv_as_hidden=no | |
13191 | if test $in_tree_gas = yes; then | |
13192 | if test $in_tree_gas_is_elf = yes \ | |
13193 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0` | |
13194 | then gcc_cv_as_hidden=yes | |
13195 | fi | |
13196 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13197 | echo ' .hidden foobar |
8ada417f | 13198 | foobar:' > conftest.s |
ba479fd2 NN |
13199 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13200 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13201 | (eval $ac_try) 2>&5 | |
13202 | ac_status=$? | |
13203 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13204 | (exit $ac_status); }; } | |
8ada417f ZW |
13205 | then |
13206 | gcc_cv_as_hidden=yes | |
13207 | else | |
13208 | echo "configure: failed program was" >&5 | |
13209 | cat conftest.s >&5 | |
13210 | fi | |
13211 | rm -f conftest.o conftest.s | |
13212 | fi | |
13213 | fi | |
ba479fd2 NN |
13214 | echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5 |
13215 | echo "${ECHO_T}$gcc_cv_as_hidden" >&6 | |
63cf211a | 13216 | |
ad9c4d9f | 13217 | |
ba479fd2 NN |
13218 | echo "$as_me:$LINENO: checking linker for .hidden support" >&5 |
13219 | echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6 | |
13220 | if test "${gcc_cv_ld_hidden+set}" = set; then | |
13221 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13222 | else |
13223 | if test $in_tree_ld = yes ; then | |
13224 | gcc_cv_ld_hidden=no | |
13225 | 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 \ | |
13226 | && test $in_tree_ld_is_elf = yes; then | |
13227 | gcc_cv_ld_hidden=yes | |
13228 | fi | |
13229 | else | |
13230 | gcc_cv_ld_hidden=yes | |
bace148a | 13231 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` |
8ada417f ZW |
13232 | if echo "$ld_ver" | grep GNU > /dev/null; then |
13233 | ld_vers=`echo $ld_ver | sed -n \ | |
13234 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13235 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13236 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13237 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
13238 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
13239 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'` | |
13240 | 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'` | |
13241 | if test 0"$ld_date" -lt 20020404; then | |
13242 | if test -n "$ld_date"; then | |
13243 | # If there was date string, but was earlier than 2002-04-04, fail | |
13244 | gcc_cv_ld_hidden=no | |
13245 | elif test -z "$ld_vers"; then | |
13246 | # If there was no date string nor ld version number, something is wrong | |
13247 | gcc_cv_ld_hidden=no | |
13248 | else | |
13249 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |
13250 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
13251 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
13252 | test -z "$ld_vers_patch" && ld_vers_patch=0 | |
13253 | if test "$ld_vers_major" -lt 2; then | |
13254 | gcc_cv_ld_hidden=no | |
13255 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
13256 | gcc_cv_ld_hidden="no" | |
13257 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then | |
13258 | gcc_cv_ld_hidden=no | |
c72931a6 | 13259 | fi |
8ada417f | 13260 | fi |
789b7de5 | 13261 | fi |
8ada417f | 13262 | else |
28690784 | 13263 | case "${target}" in |
b0fd7d27 | 13264 | hppa64*-*-hpux* | ia64*-*-hpux*) |
28690784 JDA |
13265 | gcc_cv_ld_hidden=yes |
13266 | ;; | |
13267 | *) | |
13268 | gcc_cv_ld_hidden=no | |
13269 | ;; | |
13270 | esac | |
8ada417f ZW |
13271 | fi |
13272 | fi | |
6d07784a | 13273 | fi |
ba479fd2 NN |
13274 | echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5 |
13275 | echo "${ECHO_T}$gcc_cv_ld_hidden" >&6 | |
8ada417f | 13276 | libgcc_visibility=no |
ad9c4d9f | 13277 | |
8e3940b2 | 13278 | if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then |
8ada417f | 13279 | libgcc_visibility=yes |
ba479fd2 NN |
13280 | |
13281 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 13282 | #define HAVE_GAS_HIDDEN 1 |
ba479fd2 | 13283 | _ACEOF |
ad9c4d9f NN |
13284 | |
13285 | fi | |
13286 | ||
8ada417f | 13287 | # Check if we have .[us]leb128, and support symbol arithmetic with it. |
ba479fd2 NN |
13288 | echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5 |
13289 | echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6 | |
13290 | if test "${gcc_cv_as_leb128+set}" = set; then | |
13291 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13292 | else |
13293 | gcc_cv_as_leb128=no | |
13294 | if test $in_tree_gas = yes; then | |
13295 | if test $in_tree_gas_is_elf = yes \ | |
13296 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
13297 | then gcc_cv_as_leb128=yes | |
13298 | fi | |
13299 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13300 | echo ' .data |
b7460f24 RH |
13301 | .uleb128 L2 - L1 |
13302 | L1: | |
13303 | .uleb128 1280 | |
13304 | .sleb128 -1010 | |
8ada417f | 13305 | L2:' > conftest.s |
ba479fd2 NN |
13306 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13307 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13308 | (eval $ac_try) 2>&5 | |
13309 | ac_status=$? | |
13310 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13311 | (exit $ac_status); }; } | |
8ada417f ZW |
13312 | then |
13313 | # GAS versions before 2.11 do not support uleb128, | |
13314 | # despite appearing to. | |
13315 | # ??? There exists an elf-specific test that will crash | |
13316 | # the assembler. Perhaps it's better to figure out whether | |
13317 | # arbitrary sections are supported and try the test. | |
bace148a | 13318 | as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` |
8ada417f ZW |
13319 | if echo "$as_ver" | grep GNU > /dev/null; then |
13320 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` | |
13321 | as_major=`echo $as_ver | sed 's/\..*//'` | |
13322 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` | |
13323 | if test $as_major -eq 2 && test $as_minor -lt 11 | |
13324 | then : | |
13325 | else gcc_cv_as_leb128=yes | |
13326 | fi | |
13327 | fi | |
13328 | else | |
13329 | echo "configure: failed program was" >&5 | |
13330 | cat conftest.s >&5 | |
13331 | fi | |
13332 | rm -f conftest.o conftest.s | |
13333 | fi | |
b7460f24 | 13334 | fi |
ba479fd2 NN |
13335 | echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5 |
13336 | echo "${ECHO_T}$gcc_cv_as_leb128" >&6 | |
63cf211a | 13337 | if test $gcc_cv_as_leb128 = yes; then |
ba479fd2 NN |
13338 | |
13339 | cat >>confdefs.h <<\_ACEOF | |
b7460f24 | 13340 | #define HAVE_AS_LEB128 1 |
ba479fd2 | 13341 | _ACEOF |
b7460f24 RH |
13342 | |
13343 | fi | |
ad9c4d9f | 13344 | |
8ada417f ZW |
13345 | # GAS versions up to and including 2.11.0 may mis-optimize |
13346 | # .eh_frame data. | |
ba479fd2 NN |
13347 | echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5 |
13348 | echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6 | |
13349 | if test "${gcc_cv_as_eh_frame+set}" = set; then | |
13350 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13351 | else |
13352 | gcc_cv_as_eh_frame=no | |
13353 | if test $in_tree_gas = yes; then | |
13354 | if test $in_tree_gas_is_elf = yes \ | |
13355 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
13356 | then gcc_cv_as_eh_frame=yes | |
ad9c4d9f | 13357 | fi |
8ada417f | 13358 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13359 | echo ' .text |
c64688ae RH |
13360 | .LFB1: |
13361 | .4byte 0 | |
13362 | .L1: | |
13363 | .4byte 0 | |
13364 | .LFE1: | |
13365 | .section .eh_frame,"aw",@progbits | |
13366 | __FRAME_BEGIN__: | |
13367 | .4byte .LECIE1-.LSCIE1 | |
13368 | .LSCIE1: | |
13369 | .4byte 0x0 | |
13370 | .byte 0x1 | |
13371 | .ascii "z\0" | |
13372 | .byte 0x1 | |
13373 | .byte 0x78 | |
13374 | .byte 0x1a | |
13375 | .byte 0x0 | |
13376 | .byte 0x4 | |
13377 | .4byte 1 | |
13378 | .p2align 1 | |
13379 | .LECIE1: | |
13380 | .LSFDE1: | |
13381 | .4byte .LEFDE1-.LASFDE1 | |
13382 | .LASFDE1: | |
13383 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
13384 | .4byte .LFB1 | |
13385 | .4byte .LFE1-.LFB1 | |
13386 | .byte 0x4 | |
13387 | .4byte .LFE1-.LFB1 | |
13388 | .byte 0x4 | |
13389 | .4byte .L1-.LFB1 | |
8ada417f | 13390 | .LEFDE1:' > conftest.s |
ba479fd2 NN |
13391 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13392 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13393 | (eval $ac_try) 2>&5 | |
13394 | ac_status=$? | |
13395 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13396 | (exit $ac_status); }; } | |
8ada417f ZW |
13397 | then |
13398 | cat > conftest.lit <<EOF | |
c64688ae RH |
13399 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
13400 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 13401 | 0020 08000000 04080000 0044 .........D |
01efb963 | 13402 | EOF |
ba479fd2 | 13403 | cat > conftest.big <<EOF |
01efb963 AS |
13404 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... |
13405 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 13406 | 0020 00000008 04000000 0844 .........D |
c64688ae | 13407 | EOF |
8ada417f ZW |
13408 | # If the assembler didn't choke, and we can objdump, |
13409 | # and we got the correct data, then succeed. | |
13410 | if test x$gcc_cv_objdump != x \ | |
13411 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
13412 | | tail -3 > conftest.got \ | |
13413 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ | |
13414 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
13415 | then | |
13416 | gcc_cv_as_eh_frame=yes | |
ba479fd2 NN |
13417 | elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null' |
13418 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13419 | (eval $ac_try) 2>&5 | |
13420 | ac_status=$? | |
13421 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13422 | (exit $ac_status); }; }; then | |
8ada417f ZW |
13423 | gcc_cv_as_eh_frame=buggy |
13424 | else | |
13425 | # Uh oh, what do we do now? | |
13426 | gcc_cv_as_eh_frame=no | |
13427 | fi | |
13428 | else | |
13429 | echo "configure: failed program was" >&5 | |
13430 | cat conftest.s >&5 | |
13431 | fi | |
13432 | rm -f conftest.o conftest.s | |
13433 | fi | |
c64688ae | 13434 | fi |
ba479fd2 NN |
13435 | echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5 |
13436 | echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6 | |
ad9c4d9f | 13437 | |
6e3f3080 | 13438 | |
63cf211a | 13439 | if test $gcc_cv_as_eh_frame = buggy; then |
ba479fd2 NN |
13440 | |
13441 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 13442 | #define USE_AS_TRADITIONAL_FORMAT 1 |
ba479fd2 | 13443 | _ACEOF |
ad9c4d9f NN |
13444 | |
13445 | fi | |
13446 | ||
ba479fd2 NN |
13447 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 |
13448 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
13449 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
13450 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13451 | else |
13452 | gcc_cv_as_shf_merge=no | |
13453 | if test $in_tree_gas = yes; then | |
13454 | if test $in_tree_gas_is_elf = yes \ | |
13455 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
13456 | then gcc_cv_as_shf_merge=yes | |
13457 | fi | |
13458 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13459 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s |
ba479fd2 NN |
13460 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' |
13461 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13462 | (eval $ac_try) 2>&5 | |
13463 | ac_status=$? | |
13464 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13465 | (exit $ac_status); }; } | |
8ada417f ZW |
13466 | then |
13467 | gcc_cv_as_shf_merge=yes | |
13468 | else | |
13469 | echo "configure: failed program was" >&5 | |
13470 | cat conftest.s >&5 | |
13471 | fi | |
13472 | rm -f conftest.o conftest.s | |
13473 | fi | |
201556f0 | 13474 | fi |
ba479fd2 NN |
13475 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 |
13476 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
8ada417f | 13477 | |
c18a5b6c MM |
13478 | if test $gcc_cv_as_shf_merge = no; then |
13479 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 | |
13480 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
13481 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
13482 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13483 | else | |
13484 | gcc_cv_as_shf_merge=no | |
13485 | if test $in_tree_gas = yes; then | |
13486 | if test $in_tree_gas_is_elf = yes \ | |
13487 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
13488 | then gcc_cv_as_shf_merge=yes | |
13489 | fi | |
13490 | elif test x$gcc_cv_as != x; then | |
13491 | echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s | |
13492 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
13493 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13494 | (eval $ac_try) 2>&5 | |
13495 | ac_status=$? | |
13496 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13497 | (exit $ac_status); }; } | |
13498 | then | |
13499 | gcc_cv_as_shf_merge=yes | |
13500 | else | |
13501 | echo "configure: failed program was" >&5 | |
13502 | cat conftest.s >&5 | |
13503 | fi | |
13504 | rm -f conftest.o conftest.s | |
13505 | fi | |
13506 | fi | |
13507 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 | |
13508 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
13509 | ||
13510 | fi | |
8ad9fb33 | 13511 | |
ba479fd2 | 13512 | cat >>confdefs.h <<_ACEOF |
8ad9fb33 | 13513 | #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 13514 | _ACEOF |
201556f0 | 13515 | |
201556f0 | 13516 | |
c18a5b6c MM |
13517 | echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 |
13518 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 | |
13519 | if test "${gcc_cv_as_comdat_group+set}" = set; then | |
13520 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13521 | else | |
13522 | gcc_cv_as_comdat_group=no | |
13523 | if test $in_tree_gas = yes; then | |
13524 | if test $in_tree_gas_is_elf = yes \ | |
13525 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
13526 | then gcc_cv_as_comdat_group=yes | |
13527 | fi | |
13528 | elif test x$gcc_cv_as != x; then | |
13529 | echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s | |
13530 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
13531 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13532 | (eval $ac_try) 2>&5 | |
13533 | ac_status=$? | |
13534 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13535 | (exit $ac_status); }; } | |
13536 | then | |
13537 | gcc_cv_as_comdat_group=yes | |
13538 | else | |
13539 | echo "configure: failed program was" >&5 | |
13540 | cat conftest.s >&5 | |
13541 | fi | |
13542 | rm -f conftest.o conftest.s | |
13543 | fi | |
13544 | fi | |
13545 | echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5 | |
13546 | echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6 | |
13547 | ||
13548 | if test $gcc_cv_as_comdat_group = yes; then | |
13549 | gcc_cv_as_comdat_group_percent=no | |
13550 | else | |
13551 | echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 | |
13552 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 | |
13553 | if test "${gcc_cv_as_comdat_group_percent+set}" = set; then | |
13554 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13555 | else | |
13556 | gcc_cv_as_comdat_group_percent=no | |
13557 | if test $in_tree_gas = yes; then | |
13558 | if test $in_tree_gas_is_elf = yes \ | |
13559 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
13560 | then gcc_cv_as_comdat_group_percent=yes | |
13561 | fi | |
13562 | elif test x$gcc_cv_as != x; then | |
13563 | echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s | |
13564 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
13565 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13566 | (eval $ac_try) 2>&5 | |
13567 | ac_status=$? | |
13568 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13569 | (exit $ac_status); }; } | |
13570 | then | |
13571 | gcc_cv_as_comdat_group_percent=yes | |
13572 | else | |
13573 | echo "configure: failed program was" >&5 | |
13574 | cat conftest.s >&5 | |
13575 | fi | |
13576 | rm -f conftest.o conftest.s | |
13577 | fi | |
13578 | fi | |
13579 | echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5 | |
13580 | echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6 | |
13581 | ||
13582 | fi | |
13583 | ||
13584 | cat >>confdefs.h <<_ACEOF | |
13585 | #define HAVE_GAS_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` | |
13586 | _ACEOF | |
13587 | ||
13588 | ||
8ada417f | 13589 | # Thread-local storage - the check is heavily parametrized. |
f996902d RH |
13590 | conftest_s= |
13591 | tls_first_major= | |
13592 | tls_first_minor= | |
9739c90c | 13593 | tls_as_opt= |
f996902d | 13594 | case "$target" in |
6f9b006d RH |
13595 | alpha*-*-*) |
13596 | conftest_s=' | |
13597 | .section ".tdata","awT",@progbits | |
13598 | foo: .long 25 | |
13599 | .text | |
13600 | ldq $27,__tls_get_addr($29) !literal!1 | |
13601 | lda $16,foo($29) !tlsgd!1 | |
13602 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
13603 | ldq $27,__tls_get_addr($29) !literal!2 | |
13604 | lda $16,foo($29) !tlsldm!2 | |
13605 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
13606 | ldq $1,foo($29) !gotdtprel | |
13607 | ldah $2,foo($29) !dtprelhi | |
13608 | lda $3,foo($2) !dtprello | |
13609 | lda $4,foo($29) !dtprel | |
13610 | ldq $1,foo($29) !gottprel | |
13611 | ldah $2,foo($29) !tprelhi | |
13612 | lda $3,foo($2) !tprello | |
13613 | lda $4,foo($29) !tprel' | |
13614 | tls_first_major=2 | |
13615 | tls_first_minor=13 | |
2f3321ca | 13616 | tls_as_opt=--fatal-warnings |
6f9b006d | 13617 | ;; |
e4dd71de AH |
13618 | frv*-*-*) |
13619 | conftest_s=' | |
13620 | .section ".tdata","awT",@progbits | |
13621 | x: .long 25 | |
13622 | .text | |
13623 | call #gettlsoff(x)' | |
13624 | tls_first_major=2 | |
13625 | tls_first_minor=14 | |
13626 | ;; | |
f996902d RH |
13627 | i[34567]86-*-*) |
13628 | conftest_s=' | |
13629 | .section ".tdata","awT",@progbits | |
13630 | foo: .long 25 | |
13631 | .text | |
13632 | movl %gs:0, %eax | |
13633 | leal foo@TLSGD(,%ebx,1), %eax | |
13634 | leal foo@TLSLDM(%ebx), %eax | |
13635 | leal foo@DTPOFF(%eax), %edx | |
13636 | movl foo@GOTTPOFF(%ebx), %eax | |
13637 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
13638 | addl foo@GOTNTPOFF(%ebx), %eax |
13639 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
13640 | movl $foo@TPOFF, %eax |
13641 | subl $foo@TPOFF, %eax | |
13642 | leal foo@NTPOFF(%ecx), %eax' | |
13643 | tls_first_major=2 | |
75d38379 | 13644 | tls_first_minor=14 |
2f3321ca | 13645 | tls_as_opt=--fatal-warnings |
75d38379 JJ |
13646 | ;; |
13647 | x86_64-*-*) | |
13648 | conftest_s=' | |
13649 | .section ".tdata","awT",@progbits | |
13650 | foo: .long 25 | |
13651 | .text | |
13652 | movq %fs:0, %rax | |
13653 | leaq foo@TLSGD(%rip), %rdi | |
13654 | leaq foo@TLSLD(%rip), %rdi | |
13655 | leaq foo@DTPOFF(%rax), %rdx | |
13656 | movq foo@GOTTPOFF(%rip), %rax | |
13657 | movq $foo@TPOFF, %rax' | |
13658 | tls_first_major=2 | |
13659 | tls_first_minor=14 | |
2f3321ca | 13660 | tls_as_opt=--fatal-warnings |
f996902d | 13661 | ;; |
7b6e506e RH |
13662 | ia64-*-*) |
13663 | conftest_s=' | |
13664 | .section ".tdata","awT",@progbits | |
13665 | foo: data8 25 | |
13666 | .text | |
13667 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
13668 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
13669 | addl r18 = @ltoff(@tprel(foo#)), gp | |
13670 | addl r19 = @dtprel(foo#), gp | |
13671 | adds r21 = @dtprel(foo#), r13 | |
13672 | movl r23 = @dtprel(foo#) | |
13673 | addl r20 = @tprel(foo#), gp | |
13674 | adds r22 = @tprel(foo#), r13 | |
13675 | movl r24 = @tprel(foo#)' | |
13676 | tls_first_major=2 | |
13677 | tls_first_minor=13 | |
2f3321ca | 13678 | tls_as_opt=--fatal-warnings |
7b6e506e | 13679 | ;; |
69229b81 DJ |
13680 | mips*-*-*) |
13681 | conftest_s=' | |
13682 | .section .tdata,"awT",@progbits | |
13683 | x: | |
13684 | .word 2 | |
13685 | .text | |
13686 | addiu $4, $28, %tlsgd(x) | |
13687 | addiu $4, $28, %tlsldm(x) | |
13688 | lui $4, %dtprel_hi(x) | |
13689 | addiu $4, $4, %dtprel_lo(x) | |
13690 | lw $4, %gottprel(x)($28) | |
13691 | lui $4, %tprel_hi(x) | |
13692 | addiu $4, $4, %tprel_lo(x)' | |
13693 | tls_first_major=2 | |
13694 | tls_first_minor=16 | |
13695 | tls_as_opt='-32 --fatal-warnings' | |
13696 | ;; | |
c4501e62 JJ |
13697 | powerpc-*-*) |
13698 | conftest_s=' | |
13699 | .section ".tdata","awT",@progbits | |
13700 | .align 2 | |
13701 | ld0: .space 4 | |
13702 | ld1: .space 4 | |
13703 | x1: .space 4 | |
13704 | x2: .space 4 | |
13705 | x3: .space 4 | |
13706 | .text | |
13707 | addi 3,31,ld0@got@tlsgd | |
13708 | bl __tls_get_addr | |
13709 | addi 3,31,x1@got@tlsld | |
13710 | bl __tls_get_addr | |
13711 | addi 9,3,x1@dtprel | |
13712 | addis 9,3,x2@dtprel@ha | |
13713 | addi 9,9,x2@dtprel@l | |
13714 | lwz 9,x3@got@tprel(31) | |
13715 | add 9,9,x@tls | |
13716 | addi 9,2,x1@tprel | |
13717 | addis 9,2,x2@tprel@ha | |
13718 | addi 9,9,x2@tprel@l' | |
13719 | tls_first_major=2 | |
13720 | tls_first_minor=14 | |
2f3321ca | 13721 | tls_as_opt="-a32 --fatal-warnings" |
c4501e62 JJ |
13722 | ;; |
13723 | powerpc64-*-*) | |
13724 | conftest_s=' | |
13725 | .section ".tdata","awT",@progbits | |
13726 | .align 3 | |
13727 | ld0: .space 8 | |
13728 | ld1: .space 8 | |
13729 | x1: .space 8 | |
13730 | x2: .space 8 | |
13731 | x3: .space 8 | |
13732 | .text | |
13733 | addi 3,2,ld0@got@tlsgd | |
13734 | bl .__tls_get_addr | |
13735 | nop | |
13736 | addi 3,2,ld1@toc | |
13737 | bl .__tls_get_addr | |
13738 | nop | |
13739 | addi 3,2,x1@got@tlsld | |
13740 | bl .__tls_get_addr | |
13741 | nop | |
13742 | addi 9,3,x1@dtprel | |
13743 | bl .__tls_get_addr | |
13744 | nop | |
13745 | addis 9,3,x2@dtprel@ha | |
13746 | addi 9,9,x2@dtprel@l | |
13747 | bl .__tls_get_addr | |
13748 | nop | |
13749 | ld 9,x3@got@dtprel(2) | |
13750 | add 9,9,3 | |
13751 | bl .__tls_get_addr | |
13752 | nop' | |
13753 | tls_first_major=2 | |
13754 | tls_first_minor=14 | |
2f3321ca | 13755 | tls_as_opt="-a64 --fatal-warnings" |
c4501e62 | 13756 | ;; |
fd3cd001 UW |
13757 | s390-*-*) |
13758 | conftest_s=' | |
13759 | .section ".tdata","awT",@progbits | |
13760 | foo: .long 25 | |
13761 | .text | |
13762 | .long foo@TLSGD | |
13763 | .long foo@TLSLDM | |
13764 | .long foo@DTPOFF | |
13765 | .long foo@NTPOFF | |
13766 | .long foo@GOTNTPOFF | |
13767 | .long foo@INDNTPOFF | |
13768 | l %r1,foo@GOTNTPOFF(%r12) | |
13769 | l %r1,0(%r1):tls_load:foo | |
13770 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
13771 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
13772 | tls_first_major=2 | |
13773 | tls_first_minor=14 | |
2f3321ca | 13774 | tls_as_opt="-m31 --fatal-warnings" |
fd3cd001 UW |
13775 | ;; |
13776 | s390x-*-*) | |
13777 | conftest_s=' | |
13778 | .section ".tdata","awT",@progbits | |
13779 | foo: .long 25 | |
13780 | .text | |
13781 | .quad foo@TLSGD | |
13782 | .quad foo@TLSLDM | |
13783 | .quad foo@DTPOFF | |
13784 | .quad foo@NTPOFF | |
13785 | .quad foo@GOTNTPOFF | |
13786 | lg %r1,foo@GOTNTPOFF(%r12) | |
13787 | larl %r1,foo@INDNTPOFF | |
13788 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
13789 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
13790 | tls_first_major=2 | |
13791 | tls_first_minor=14 | |
2f3321ca | 13792 | tls_as_opt="-m64 -Aesame --fatal-warnings" |
fd3cd001 | 13793 | ;; |
9ff13962 KK |
13794 | sh-*-* | sh[34]-*-*) |
13795 | conftest_s=' | |
13796 | .section ".tdata","awT",@progbits | |
13797 | foo: .long 25 | |
13798 | .text | |
13799 | .long foo@TLSGD | |
13800 | .long foo@TLSLDM | |
13801 | .long foo@DTPOFF | |
13802 | .long foo@GOTTPOFF | |
13803 | .long foo@TPOFF' | |
13804 | tls_first_major=2 | |
13805 | tls_first_minor=13 | |
2f3321ca | 13806 | tls_as_opt=--fatal-warnings |
9ff13962 | 13807 | ;; |
5751a10b | 13808 | sparc*-*-*) |
2f3321ca EB |
13809 | case "$target" in |
13810 | sparc*-sun-solaris2.*) | |
13811 | on_solaris=yes | |
13812 | ;; | |
13813 | *) | |
13814 | on_solaris=no | |
13815 | ;; | |
13816 | esac | |
13817 | if test x$on_solaris = xyes && test x$gas_flag = xno; then | |
13818 | conftest_s=' | |
13819 | .section ".tdata",#alloc,#write,#tls | |
13820 | foo: .long 25 | |
13821 | .text | |
13822 | sethi %tgd_hi22(foo), %o0 | |
13823 | add %o0, %tgd_lo10(foo), %o1 | |
13824 | add %l7, %o1, %o0, %tgd_add(foo) | |
13825 | call __tls_get_addr, %tgd_call(foo) | |
13826 | sethi %tldm_hi22(foo), %l1 | |
13827 | add %l1, %tldm_lo10(foo), %l2 | |
13828 | add %l7, %l2, %o0, %tldm_add(foo) | |
13829 | call __tls_get_addr, %tldm_call(foo) | |
13830 | sethi %tldo_hix22(foo), %l3 | |
13831 | xor %l3, %tldo_lox10(foo), %l4 | |
13832 | add %o0, %l4, %l5, %tldo_add(foo) | |
13833 | sethi %tie_hi22(foo), %o3 | |
13834 | add %o3, %tie_lo10(foo), %o3 | |
13835 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
13836 | add %g7, %o2, %o4, %tie_add(foo) | |
13837 | sethi %tle_hix22(foo), %l1 | |
13838 | xor %l1, %tle_lox10(foo), %o5 | |
13839 | ld [%g7 + %o5], %o1' | |
13840 | tls_first_major=0 | |
13841 | tls_first_minor=0 | |
13842 | else | |
13843 | conftest_s=' | |
5751a10b JJ |
13844 | .section ".tdata","awT",@progbits |
13845 | foo: .long 25 | |
13846 | .text | |
13847 | sethi %tgd_hi22(foo), %o0 | |
13848 | add %o0, %tgd_lo10(foo), %o1 | |
13849 | add %l7, %o1, %o0, %tgd_add(foo) | |
13850 | call __tls_get_addr, %tgd_call(foo) | |
13851 | sethi %tldm_hi22(foo), %l1 | |
13852 | add %l1, %tldm_lo10(foo), %l2 | |
13853 | add %l7, %l2, %o0, %tldm_add(foo) | |
13854 | call __tls_get_addr, %tldm_call(foo) | |
13855 | sethi %tldo_hix22(foo), %l3 | |
13856 | xor %l3, %tldo_lox10(foo), %l4 | |
13857 | add %o0, %l4, %l5, %tldo_add(foo) | |
13858 | sethi %tie_hi22(foo), %o3 | |
13859 | add %o3, %tie_lo10(foo), %o3 | |
13860 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
13861 | add %g7, %o2, %o4, %tie_add(foo) | |
13862 | sethi %tle_hix22(foo), %l1 | |
13863 | xor %l1, %tle_lox10(foo), %o5 | |
13864 | ld [%g7 + %o5], %o1' | |
13865 | tls_first_major=2 | |
13866 | tls_first_minor=14 | |
2f3321ca EB |
13867 | tls_as_opt="-32 --fatal-warnings" |
13868 | fi | |
5751a10b | 13869 | ;; |
f996902d RH |
13870 | esac |
13871 | if test -z "$tls_first_major"; then | |
8ada417f ZW |
13872 | : # If we don't have a check, assume no support. |
13873 | else | |
ba479fd2 NN |
13874 | echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5 |
13875 | echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6 | |
13876 | if test "${gcc_cv_as_tls+set}" = set; then | |
13877 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13878 | else |
13879 | gcc_cv_as_tls=no | |
13880 | if test $in_tree_gas = yes; then | |
13881 | if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0` | |
13882 | then gcc_cv_as_tls=yes | |
ad9c4d9f | 13883 | fi |
8ada417f | 13884 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13885 | echo "$conftest_s" > conftest.s |
2f3321ca | 13886 | if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5' |
ba479fd2 NN |
13887 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
13888 | (eval $ac_try) 2>&5 | |
13889 | ac_status=$? | |
13890 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13891 | (exit $ac_status); }; } | |
8ada417f ZW |
13892 | then |
13893 | gcc_cv_as_tls=yes | |
13894 | else | |
13895 | echo "configure: failed program was" >&5 | |
13896 | cat conftest.s >&5 | |
13897 | fi | |
13898 | rm -f conftest.o conftest.s | |
f996902d | 13899 | fi |
f996902d | 13900 | fi |
ba479fd2 NN |
13901 | echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5 |
13902 | echo "${ECHO_T}$gcc_cv_as_tls" >&6 | |
63cf211a | 13903 | if test $gcc_cv_as_tls = yes; then |
ba479fd2 NN |
13904 | |
13905 | cat >>confdefs.h <<\_ACEOF | |
f996902d | 13906 | #define HAVE_AS_TLS 1 |
ba479fd2 | 13907 | _ACEOF |
f996902d RH |
13908 | |
13909 | fi | |
8ada417f ZW |
13910 | fi |
13911 | ||
13912 | # Target-specific assembler checks. | |
f996902d | 13913 | |
7e9d8517 L |
13914 | echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5 |
13915 | echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6 | |
13916 | gcc_cv_ld_static_dynamic=no | |
13917 | if test $in_tree_ld = yes ; then | |
13918 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then | |
13919 | gcc_cv_ld_static_dynamic=yes | |
13920 | fi | |
13921 | elif test x$gcc_cv_ld != x; then | |
13922 | # Check if linker supports -Bstatic/-Bdynamic option | |
13923 | if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ | |
13924 | && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then | |
13925 | gcc_cv_ld_static_dynamic=yes | |
13926 | fi | |
13927 | fi | |
13928 | if test x"$gcc_cv_ld_static_dynamic" = xyes; then | |
13929 | ||
13930 | cat >>confdefs.h <<\_ACEOF | |
13931 | #define HAVE_LD_STATIC_DYNAMIC 1 | |
13932 | _ACEOF | |
13933 | ||
13934 | fi | |
13935 | echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5 | |
13936 | echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6 | |
13937 | ||
d594623a L |
13938 | if test x"$demangler_in_ld" = xyes; then |
13939 | echo "$as_me:$LINENO: checking linker --demangle support" >&5 | |
13940 | echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6 | |
13941 | gcc_cv_ld_demangle=no | |
13942 | if test $in_tree_ld = yes; then | |
13943 | 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 \ | |
13944 | gcc_cv_ld_demangle=yes | |
13945 | fi | |
13946 | elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then | |
13947 | # Check if the GNU linker supports --demangle option | |
13948 | if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then | |
13949 | gcc_cv_ld_demangle=yes | |
13950 | fi | |
13951 | fi | |
13952 | if test x"$gcc_cv_ld_demangle" = xyes; then | |
13953 | ||
13954 | cat >>confdefs.h <<\_ACEOF | |
13955 | #define HAVE_LD_DEMANGLE 1 | |
13956 | _ACEOF | |
13957 | ||
13958 | fi | |
13959 | echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5 | |
13960 | echo "${ECHO_T}$gcc_cv_ld_demangle" >&6 | |
13961 | fi | |
13962 | ||
3a37b08e RH |
13963 | case "$target" in |
13964 | # All TARGET_ABI_OSF targets. | |
13965 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
ba479fd2 NN |
13966 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
13967 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
13968 | if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then | |
13969 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a37b08e | 13970 | else |
8ada417f ZW |
13971 | gcc_cv_as_alpha_explicit_relocs=no |
13972 | if test $in_tree_gas = yes; then | |
13973 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
13974 | then gcc_cv_as_alpha_explicit_relocs=yes | |
ad9c4d9f | 13975 | fi |
8ada417f | 13976 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13977 | echo ' .set nomacro |
3a37b08e RH |
13978 | .text |
13979 | extbl $3, $2, $3 !lituse_bytoff!1 | |
13980 | ldq $2, a($29) !literal!1 | |
13981 | ldq $4, b($29) !literal!2 | |
13982 | ldq_u $3, 0($2) !lituse_base!1 | |
13983 | ldq $27, f($29) !literal!5 | |
13984 | jsr $26, ($27), f !lituse_jsr!5 | |
13985 | ldah $29, 0($26) !gpdisp!3 | |
13986 | lda $0, c($29) !gprel | |
13987 | ldah $1, d($29) !gprelhigh | |
13988 | lda $1, d($1) !gprellow | |
8ada417f | 13989 | lda $29, 0($29) !gpdisp!3' > conftest.s |
ba479fd2 NN |
13990 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13991 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13992 | (eval $ac_try) 2>&5 | |
13993 | ac_status=$? | |
13994 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13995 | (exit $ac_status); }; } | |
8ada417f ZW |
13996 | then |
13997 | gcc_cv_as_alpha_explicit_relocs=yes | |
13998 | else | |
13999 | echo "configure: failed program was" >&5 | |
14000 | cat conftest.s >&5 | |
14001 | fi | |
14002 | rm -f conftest.o conftest.s | |
14003 | fi | |
cafe096b | 14004 | fi |
ba479fd2 NN |
14005 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5 |
14006 | echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6 | |
63cf211a | 14007 | if test $gcc_cv_as_alpha_explicit_relocs = yes; then |
ba479fd2 NN |
14008 | |
14009 | cat >>confdefs.h <<\_ACEOF | |
3a37b08e | 14010 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
ba479fd2 | 14011 | _ACEOF |
3a37b08e | 14012 | |
86da66b5 HPN |
14013 | fi |
14014 | ;; | |
14015 | ||
14016 | cris-*-*) | |
14017 | echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5 | |
14018 | echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6 | |
14019 | if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then | |
14020 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14021 | else | |
14022 | gcc_cv_as_cris_no_mul_bug=no | |
14023 | if test $in_tree_gas = yes; then | |
14024 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
14025 | then gcc_cv_as_cris_no_mul_bug=yes | |
14026 | fi | |
14027 | elif test x$gcc_cv_as != x; then | |
14028 | echo '.text' > conftest.s | |
14029 | if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5' | |
14030 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14031 | (eval $ac_try) 2>&5 | |
14032 | ac_status=$? | |
14033 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14034 | (exit $ac_status); }; } | |
14035 | then | |
14036 | gcc_cv_as_cris_no_mul_bug=yes | |
14037 | else | |
14038 | echo "configure: failed program was" >&5 | |
14039 | cat conftest.s >&5 | |
14040 | fi | |
14041 | rm -f conftest.o conftest.s | |
14042 | fi | |
14043 | fi | |
14044 | echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5 | |
14045 | echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6 | |
14046 | if test $gcc_cv_as_cris_no_mul_bug = yes; then | |
14047 | ||
14048 | cat >>confdefs.h <<\_ACEOF | |
14049 | #define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1 | |
14050 | _ACEOF | |
14051 | ||
8ada417f | 14052 | fi |
3a37b08e | 14053 | ;; |
8ada417f | 14054 | |
1cb36a98 | 14055 | sparc*-*-*) |
ba479fd2 NN |
14056 | echo "$as_me:$LINENO: checking assembler for .register" >&5 |
14057 | echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6 | |
14058 | if test "${gcc_cv_as_sparc_register_op+set}" = set; then | |
14059 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 14060 | else |
8ada417f ZW |
14061 | gcc_cv_as_sparc_register_op=no |
14062 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14063 | echo '.register %g2, #scratch' > conftest.s |
ba479fd2 NN |
14064 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14065 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14066 | (eval $ac_try) 2>&5 | |
14067 | ac_status=$? | |
14068 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14069 | (exit $ac_status); }; } | |
8ada417f ZW |
14070 | then |
14071 | gcc_cv_as_sparc_register_op=yes | |
14072 | else | |
14073 | echo "configure: failed program was" >&5 | |
14074 | cat conftest.s >&5 | |
14075 | fi | |
14076 | rm -f conftest.o conftest.s | |
14077 | fi | |
cafe096b | 14078 | fi |
ba479fd2 NN |
14079 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5 |
14080 | echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6 | |
63cf211a | 14081 | if test $gcc_cv_as_sparc_register_op = yes; then |
ba479fd2 NN |
14082 | |
14083 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 14084 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
ba479fd2 | 14085 | _ACEOF |
1cb36a98 | 14086 | |
8ada417f | 14087 | fi |
1cb36a98 | 14088 | |
ba479fd2 NN |
14089 | echo "$as_me:$LINENO: checking assembler for -relax option" >&5 |
14090 | echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6 | |
14091 | if test "${gcc_cv_as_sparc_relax+set}" = set; then | |
14092 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e95b1e6a | 14093 | else |
8ada417f ZW |
14094 | gcc_cv_as_sparc_relax=no |
14095 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14096 | echo '.text' > conftest.s |
ba479fd2 NN |
14097 | if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5' |
14098 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14099 | (eval $ac_try) 2>&5 | |
14100 | ac_status=$? | |
14101 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14102 | (exit $ac_status); }; } | |
8ada417f ZW |
14103 | then |
14104 | gcc_cv_as_sparc_relax=yes | |
14105 | else | |
14106 | echo "configure: failed program was" >&5 | |
14107 | cat conftest.s >&5 | |
14108 | fi | |
14109 | rm -f conftest.o conftest.s | |
14110 | fi | |
cafe096b | 14111 | fi |
ba479fd2 NN |
14112 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5 |
14113 | echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6 | |
63cf211a | 14114 | if test $gcc_cv_as_sparc_relax = yes; then |
ba479fd2 NN |
14115 | |
14116 | cat >>confdefs.h <<\_ACEOF | |
e95b1e6a | 14117 | #define HAVE_AS_RELAX_OPTION 1 |
ba479fd2 | 14118 | _ACEOF |
e95b1e6a | 14119 | |
8ada417f | 14120 | fi |
e95b1e6a | 14121 | |
ba479fd2 NN |
14122 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5 |
14123 | echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6 | |
14124 | if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then | |
14125 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
17e9e88c | 14126 | else |
8ada417f ZW |
14127 | gcc_cv_as_sparc_ua_pcrel=no |
14128 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14129 | echo '.text |
8ada417f ZW |
14130 | foo: |
14131 | nop | |
14132 | .data | |
14133 | .align 4 | |
14134 | .byte 0 | |
14135 | .uaword %r_disp32(foo)' > conftest.s | |
ba479fd2 NN |
14136 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
14137 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14138 | (eval $ac_try) 2>&5 | |
14139 | ac_status=$? | |
14140 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14141 | (exit $ac_status); }; } | |
8ada417f ZW |
14142 | then |
14143 | if test x$gcc_cv_ld != x \ | |
14144 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
14145 | gcc_cv_as_sparc_ua_pcrel=yes | |
14146 | fi | |
14147 | rm -f conftest | |
14148 | else | |
14149 | echo "configure: failed program was" >&5 | |
14150 | cat conftest.s >&5 | |
14151 | fi | |
14152 | rm -f conftest.o conftest.s | |
14153 | fi | |
cafe096b | 14154 | fi |
ba479fd2 NN |
14155 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5 |
14156 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6 | |
63cf211a | 14157 | if test $gcc_cv_as_sparc_ua_pcrel = yes; then |
ba479fd2 NN |
14158 | |
14159 | cat >>confdefs.h <<\_ACEOF | |
17e9e88c | 14160 | #define HAVE_AS_SPARC_UA_PCREL 1 |
ba479fd2 | 14161 | _ACEOF |
17e9e88c | 14162 | |
17e9e88c | 14163 | |
ba479fd2 NN |
14164 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 |
14165 | echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6 | |
14166 | if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then | |
14167 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cf7b8b0d | 14168 | else |
8ada417f ZW |
14169 | gcc_cv_as_sparc_ua_pcrel_hidden=no |
14170 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14171 | echo '.data |
8ada417f ZW |
14172 | .align 4 |
14173 | .byte 0x31 | |
14174 | .uaword %r_disp32(foo) | |
14175 | .byte 0x32, 0x33, 0x34 | |
14176 | .global foo | |
14177 | .hidden foo | |
14178 | foo: | |
14179 | .skip 4' > conftest.s | |
ba479fd2 NN |
14180 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
14181 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14182 | (eval $ac_try) 2>&5 | |
14183 | ac_status=$? | |
14184 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14185 | (exit $ac_status); }; } | |
8ada417f ZW |
14186 | then |
14187 | if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \ | |
14188 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
14189 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
14190 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
14191 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
14192 | | grep 'DISP32' > /dev/null 2>&1; then | |
14193 | : | |
14194 | else | |
14195 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
cf7b8b0d | 14196 | fi |
8ada417f ZW |
14197 | fi |
14198 | rm -f conftest | |
14199 | else | |
14200 | echo "configure: failed program was" >&5 | |
14201 | cat conftest.s >&5 | |
14202 | fi | |
14203 | rm -f conftest.o conftest.s | |
14204 | fi | |
cafe096b | 14205 | fi |
ba479fd2 NN |
14206 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5 |
14207 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6 | |
63cf211a | 14208 | if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then |
ba479fd2 NN |
14209 | |
14210 | cat >>confdefs.h <<\_ACEOF | |
cf7b8b0d | 14211 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
ba479fd2 | 14212 | _ACEOF |
cf7b8b0d | 14213 | |
8ada417f | 14214 | fi |
ba479fd2 | 14215 | |
8ada417f | 14216 | fi # unaligned pcrel relocs |
cf7b8b0d | 14217 | |
ba479fd2 NN |
14218 | echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5 |
14219 | echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6 | |
14220 | if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then | |
14221 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 14222 | else |
8ada417f ZW |
14223 | gcc_cv_as_sparc_offsetable_lo10=no |
14224 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14225 | echo '.text |
8ada417f ZW |
14226 | or %g1, %lo(ab) + 12, %g1 |
14227 | or %g1, %lo(ab + 12), %g1' > conftest.s | |
ba479fd2 NN |
14228 | if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5' |
14229 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14230 | (eval $ac_try) 2>&5 | |
14231 | ac_status=$? | |
14232 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14233 | (exit $ac_status); }; } | |
8ada417f ZW |
14234 | then |
14235 | if test x$gcc_cv_objdump != x \ | |
ecb0ccbc | 14236 | && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ |
8ada417f | 14237 | | grep ' 82106000 82106000' > /dev/null 2>&1; then |
1b5c0152 | 14238 | gcc_cv_as_sparc_offsetable_lo10=yes |
8ada417f ZW |
14239 | fi |
14240 | else | |
14241 | echo "configure: failed program was" >&5 | |
14242 | cat conftest.s >&5 | |
14243 | fi | |
14244 | rm -f conftest.o conftest.s | |
14245 | fi | |
cafe096b | 14246 | fi |
ba479fd2 NN |
14247 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5 |
14248 | echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6 | |
63cf211a | 14249 | if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then |
ba479fd2 NN |
14250 | |
14251 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 14252 | #define HAVE_AS_OFFSETABLE_LO10 1 |
ba479fd2 | 14253 | _ACEOF |
1cb36a98 | 14254 | |
8ada417f | 14255 | fi |
1cb36a98 RH |
14256 | ;; |
14257 | ||
c307e6dd | 14258 | i[34567]86-*-* | x86_64-*-*) |
d38bc601 BF |
14259 | case $target_os in |
14260 | cygwin* | pe | mingw32*) | |
14261 | # Used for DWARF 2 in PE | |
14262 | echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5 | |
14263 | echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6 | |
14264 | if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then | |
14265 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14266 | else | |
14267 | gcc_cv_as_ix86_pe_secrel32=no | |
14268 | if test $in_tree_gas = yes; then | |
14269 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
14270 | then gcc_cv_as_ix86_pe_secrel32=yes | |
14271 | fi | |
14272 | elif test x$gcc_cv_as != x; then | |
14273 | echo '.text | |
14274 | foo: nop | |
14275 | .data | |
14276 | .secrel32 foo' > conftest.s | |
14277 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14278 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14279 | (eval $ac_try) 2>&5 | |
14280 | ac_status=$? | |
14281 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14282 | (exit $ac_status); }; } | |
14283 | then | |
14284 | if test x$gcc_cv_ld != x \ | |
14285 | && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then | |
14286 | gcc_cv_as_ix86_pe_secrel32=yes | |
14287 | fi | |
14288 | rm -f conftest | |
14289 | else | |
14290 | echo "configure: failed program was" >&5 | |
14291 | cat conftest.s >&5 | |
14292 | fi | |
14293 | rm -f conftest.o conftest.s | |
14294 | fi | |
14295 | fi | |
14296 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5 | |
14297 | echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6 | |
14298 | if test $gcc_cv_as_ix86_pe_secrel32 = yes; then | |
14299 | ||
14300 | cat >>confdefs.h <<\_ACEOF | |
14301 | #define HAVE_GAS_PE_SECREL32_RELOC 1 | |
14302 | _ACEOF | |
14303 | ||
14304 | fi | |
14305 | ;; | |
14306 | esac | |
14307 | ||
ba479fd2 NN |
14308 | echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5 |
14309 | echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6 | |
14310 | if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then | |
14311 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14312 | else |
14313 | gcc_cv_as_ix86_filds_fists=no | |
14314 | if test $in_tree_gas = yes; then | |
14315 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
14316 | then gcc_cv_as_ix86_filds_fists=yes | |
ad9c4d9f | 14317 | fi |
8ada417f | 14318 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14319 | echo 'filds mem; fists mem' > conftest.s |
ba479fd2 NN |
14320 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14321 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14322 | (eval $ac_try) 2>&5 | |
14323 | ac_status=$? | |
14324 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14325 | (exit $ac_status); }; } | |
8ada417f ZW |
14326 | then |
14327 | gcc_cv_as_ix86_filds_fists=yes | |
14328 | else | |
14329 | echo "configure: failed program was" >&5 | |
14330 | cat conftest.s >&5 | |
981d4858 | 14331 | fi |
8ada417f ZW |
14332 | rm -f conftest.o conftest.s |
14333 | fi | |
14334 | fi | |
ba479fd2 NN |
14335 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5 |
14336 | echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6 | |
63cf211a | 14337 | if test $gcc_cv_as_ix86_filds_fists = yes; then |
ba479fd2 NN |
14338 | |
14339 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 14340 | #define HAVE_GAS_FILDS_FISTS 1 |
ba479fd2 | 14341 | _ACEOF |
ad9c4d9f | 14342 | |
f6f5dff2 RO |
14343 | fi |
14344 | ||
ba479fd2 NN |
14345 | echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5 |
14346 | echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6 | |
14347 | if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then | |
14348 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f6f5dff2 RO |
14349 | else |
14350 | gcc_cv_as_ix86_cmov_sun_syntax=no | |
14351 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14352 | echo 'cmovl.l %edx, %eax' > conftest.s |
ba479fd2 NN |
14353 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14354 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14355 | (eval $ac_try) 2>&5 | |
14356 | ac_status=$? | |
14357 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14358 | (exit $ac_status); }; } | |
f6f5dff2 RO |
14359 | then |
14360 | gcc_cv_as_ix86_cmov_sun_syntax=yes | |
14361 | else | |
14362 | echo "configure: failed program was" >&5 | |
14363 | cat conftest.s >&5 | |
14364 | fi | |
14365 | rm -f conftest.o conftest.s | |
14366 | fi | |
14367 | fi | |
ba479fd2 NN |
14368 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5 |
14369 | echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6 | |
63cf211a | 14370 | if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then |
ba479fd2 NN |
14371 | |
14372 | cat >>confdefs.h <<\_ACEOF | |
f6f5dff2 | 14373 | #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1 |
ba479fd2 | 14374 | _ACEOF |
f6f5dff2 | 14375 | |
ad9c4d9f NN |
14376 | fi |
14377 | ||
6f3ca281 ZW |
14378 | # This one is used unconditionally by i386.[ch]; it is to be defined |
14379 | # to 1 if the feature is present, 0 otherwise. | |
ba479fd2 NN |
14380 | echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5 |
14381 | echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6 | |
14382 | if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then | |
14383 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14384 | else |
14385 | gcc_cv_as_ix86_gotoff_in_data=no | |
14386 | if test $in_tree_gas = yes; then | |
14387 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
14388 | then gcc_cv_as_ix86_gotoff_in_data=yes | |
14389 | fi | |
14390 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14391 | echo ' .text |
f88c65f7 RH |
14392 | .L0: |
14393 | nop | |
14394 | .data | |
8ada417f | 14395 | .long .L0@GOTOFF' > conftest.s |
ba479fd2 NN |
14396 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14397 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14398 | (eval $ac_try) 2>&5 | |
14399 | ac_status=$? | |
14400 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14401 | (exit $ac_status); }; } | |
8ada417f ZW |
14402 | then |
14403 | gcc_cv_as_ix86_gotoff_in_data=yes | |
14404 | else | |
14405 | echo "configure: failed program was" >&5 | |
14406 | cat conftest.s >&5 | |
f88c65f7 | 14407 | fi |
8ada417f ZW |
14408 | rm -f conftest.o conftest.s |
14409 | fi | |
14410 | fi | |
ba479fd2 NN |
14411 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5 |
14412 | echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6 | |
8ada417f | 14413 | |
6f3ca281 | 14414 | |
ba479fd2 | 14415 | cat >>confdefs.h <<_ACEOF |
6f3ca281 | 14416 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 14417 | _ACEOF |
f88c65f7 | 14418 | |
1cb36a98 | 14419 | ;; |
ef1ecf87 RH |
14420 | |
14421 | ia64*-*-*) | |
ba479fd2 NN |
14422 | echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5 |
14423 | echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6 | |
14424 | if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then | |
14425 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ef1ecf87 | 14426 | else |
8ada417f ZW |
14427 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no |
14428 | if test $in_tree_gas = yes; then | |
14429 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
14430 | then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes | |
ad9c4d9f | 14431 | fi |
8ada417f | 14432 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14433 | echo ' .text |
ef1ecf87 RH |
14434 | addl r15 = @ltoffx(x#), gp |
14435 | ;; | |
cfa9ee99 | 14436 | ld8.mov r16 = [r15], x#' > conftest.s |
ba479fd2 NN |
14437 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14438 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14439 | (eval $ac_try) 2>&5 | |
14440 | ac_status=$? | |
14441 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14442 | (exit $ac_status); }; } | |
8ada417f | 14443 | then |
cfa9ee99 | 14444 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes |
8ada417f ZW |
14445 | else |
14446 | echo "configure: failed program was" >&5 | |
14447 | cat conftest.s >&5 | |
2c4a9cff | 14448 | fi |
8ada417f ZW |
14449 | rm -f conftest.o conftest.s |
14450 | fi | |
14451 | fi | |
ba479fd2 NN |
14452 | echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5 |
14453 | echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6 | |
63cf211a | 14454 | if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then |
ba479fd2 NN |
14455 | |
14456 | cat >>confdefs.h <<\_ACEOF | |
cfa9ee99 | 14457 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
ba479fd2 | 14458 | _ACEOF |
8ada417f | 14459 | |
cfa9ee99 | 14460 | fi |
8ada417f | 14461 | |
2c4a9cff | 14462 | ;; |
8ada417f | 14463 | |
2c4a9cff | 14464 | powerpc*-*-*) |
8ada417f | 14465 | case $target in |
6b37db3c DE |
14466 | *-*-aix*) conftest_s=' .csect .text[PR] |
14467 | mfcr 3,128';; | |
8af4d362 PB |
14468 | *-*-darwin*) |
14469 | echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5 | |
14470 | echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6 | |
14471 | if test "${gcc_cv_as_machine_directive+set}" = set; then | |
14472 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14473 | else | |
14474 | gcc_cv_as_machine_directive=no | |
14475 | if test x$gcc_cv_as != x; then | |
14476 | echo ' .machine ppc7400' > conftest.s | |
14477 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14478 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14479 | (eval $ac_try) 2>&5 | |
14480 | ac_status=$? | |
14481 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14482 | (exit $ac_status); }; } | |
14483 | then | |
14484 | gcc_cv_as_machine_directive=yes | |
14485 | else | |
14486 | echo "configure: failed program was" >&5 | |
14487 | cat conftest.s >&5 | |
14488 | fi | |
14489 | rm -f conftest.o conftest.s | |
14490 | fi | |
14491 | fi | |
14492 | echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5 | |
14493 | echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6 | |
14494 | ||
14495 | if test x$gcc_cv_as_machine_directive != xyes; then | |
14496 | echo "*** This target requires an assembler supporting \".machine\"" >&2 | |
14497 | echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2 | |
14498 | test x$build = x$target && exit 1 | |
14499 | fi | |
14500 | conftest_s=' .text | |
6b37db3c | 14501 | mfcr r3,128';; |
4c67db14 | 14502 | *) conftest_s=' .machine power4 |
d2ab3e37 | 14503 | .text |
6b37db3c | 14504 | mfcr 3,128';; |
8ada417f | 14505 | esac |
8ada417f | 14506 | |
ba479fd2 NN |
14507 | echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5 |
14508 | echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6 | |
14509 | if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then | |
14510 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2c4a9cff | 14511 | else |
8ada417f ZW |
14512 | gcc_cv_as_powerpc_mfcrf=no |
14513 | if test $in_tree_gas = yes; then | |
14514 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
14515 | then gcc_cv_as_powerpc_mfcrf=yes | |
2c4a9cff | 14516 | fi |
8ada417f | 14517 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14518 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
14519 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14520 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14521 | (eval $ac_try) 2>&5 | |
14522 | ac_status=$? | |
14523 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14524 | (exit $ac_status); }; } | |
8ada417f ZW |
14525 | then |
14526 | gcc_cv_as_powerpc_mfcrf=yes | |
14527 | else | |
14528 | echo "configure: failed program was" >&5 | |
14529 | cat conftest.s >&5 | |
14530 | fi | |
14531 | rm -f conftest.o conftest.s | |
14532 | fi | |
2c4a9cff | 14533 | fi |
ba479fd2 NN |
14534 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5 |
14535 | echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6 | |
63cf211a | 14536 | if test $gcc_cv_as_powerpc_mfcrf = yes; then |
ba479fd2 NN |
14537 | |
14538 | cat >>confdefs.h <<\_ACEOF | |
2c4a9cff | 14539 | #define HAVE_AS_MFCRF 1 |
ba479fd2 | 14540 | _ACEOF |
ef1ecf87 | 14541 | |
8ada417f ZW |
14542 | fi |
14543 | ;; | |
14544 | ||
14545 | mips*-*-*) | |
ba479fd2 NN |
14546 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
14547 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
14548 | if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then | |
14549 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14550 | else |
14551 | gcc_cv_as_mips_explicit_relocs=no | |
14552 | if test $in_tree_gas = yes; then | |
14553 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
14554 | then gcc_cv_as_mips_explicit_relocs=yes | |
14555 | fi | |
14556 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14557 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
ba479fd2 NN |
14558 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14559 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14560 | (eval $ac_try) 2>&5 | |
14561 | ac_status=$? | |
14562 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14563 | (exit $ac_status); }; } | |
8ada417f ZW |
14564 | then |
14565 | gcc_cv_as_mips_explicit_relocs=yes | |
14566 | else | |
14567 | echo "configure: failed program was" >&5 | |
14568 | cat conftest.s >&5 | |
ef1ecf87 | 14569 | fi |
8ada417f ZW |
14570 | rm -f conftest.o conftest.s |
14571 | fi | |
14572 | fi | |
ba479fd2 NN |
14573 | echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5 |
14574 | echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6 | |
8ada417f ZW |
14575 | if test $gcc_cv_as_mips_explicit_relocs = yes; then |
14576 | if test x$target_cpu_default = x | |
14577 | then target_cpu_default=MASK_EXPLICIT_RELOCS | |
14578 | else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" | |
14579 | fi | |
14580 | fi | |
14581 | ||
82563d35 RS |
14582 | if test x$gas_flag = xyes \ |
14583 | || test x"$host" != x"$build" \ | |
14584 | || test ! -x "$gcc_cv_as" \ | |
14585 | || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then | |
14586 | : | |
14587 | else | |
14588 | echo "*** This configuration requires the GNU assembler" >&2 | |
14589 | exit 1 | |
14590 | fi | |
ef1ecf87 | 14591 | ;; |
1cb36a98 | 14592 | esac |
9d147085 RH |
14593 | # ??? Not all targets support dwarf2 debug_line, even within a version |
14594 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
14595 | # info to the output file. So, as supported targets are added to gas 2.11, | |
14596 | # add some instruction here to (also) show we expect this might work. | |
14597 | # ??? Once 2.11 is released, probably need to add first known working | |
14598 | # version to the per-target configury. | |
14599 | case "$target" in | |
80486e06 | 14600 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
2853bc5a | 14601 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ |
d116bdf8 | 14602 | | xstormy16*-*-* | cris-*-* | xtensa-*-*) |
9d147085 RH |
14603 | insn="nop" |
14604 | ;; | |
57116d8d | 14605 | ia64*-*-* | s390*-*-*) |
9d147085 RH |
14606 | insn="nop 0" |
14607 | ;; | |
2853bc5a HPN |
14608 | mmix-*-*) |
14609 | insn="swym 0" | |
14610 | ;; | |
8ada417f ZW |
14611 | esac |
14612 | if test x"$insn" != x; then | |
14613 | conftest_s="\ | |
14614 | .file 1 \"conftest.s\" | |
14615 | .loc 1 3 0 | |
14616 | $insn" | |
ba479fd2 NN |
14617 | echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5 |
14618 | echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6 | |
14619 | if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then | |
14620 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14621 | else |
14622 | gcc_cv_as_dwarf2_debug_line=no | |
14623 | if test $in_tree_gas = yes; then | |
14624 | if test $in_tree_gas_is_elf = yes \ | |
14625 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
14626 | then gcc_cv_as_dwarf2_debug_line=yes | |
14627 | fi | |
14628 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14629 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
14630 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14631 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14632 | (eval $ac_try) 2>&5 | |
14633 | ac_status=$? | |
14634 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14635 | (exit $ac_status); }; } | |
8ada417f | 14636 | then |
080a5bb0 EB |
14637 | if test x$gcc_cv_objdump != x \ |
14638 | && $gcc_cv_objdump -h conftest.o 2> /dev/null \ | |
14639 | | grep debug_line > /dev/null 2>&1; then | |
8ada417f ZW |
14640 | gcc_cv_as_dwarf2_debug_line=yes |
14641 | fi | |
14642 | else | |
14643 | echo "configure: failed program was" >&5 | |
14644 | cat conftest.s >&5 | |
14645 | fi | |
14646 | rm -f conftest.o conftest.s | |
14647 | fi | |
14648 | fi | |
ba479fd2 NN |
14649 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5 |
14650 | echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6 | |
ad9c4d9f | 14651 | |
ad9c4d9f | 14652 | |
8ada417f ZW |
14653 | # The .debug_line file table must be in the exact order that |
14654 | # we specified the files, since these indices are also used | |
14655 | # by DW_AT_decl_file. Approximate this test by testing if | |
14656 | # the assembler bitches if the same index is assigned twice. | |
ba479fd2 NN |
14657 | echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5 |
14658 | echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6 | |
14659 | if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then | |
14660 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14661 | else |
14662 | gcc_cv_as_dwarf2_file_buggy=no | |
14663 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14664 | echo ' .file 1 "foo.s" |
8ada417f | 14665 | .file 1 "bar.s"' > conftest.s |
ba479fd2 NN |
14666 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14667 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14668 | (eval $ac_try) 2>&5 | |
14669 | ac_status=$? | |
14670 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14671 | (exit $ac_status); }; } | |
8ada417f ZW |
14672 | then |
14673 | gcc_cv_as_dwarf2_file_buggy=yes | |
14674 | else | |
14675 | echo "configure: failed program was" >&5 | |
14676 | cat conftest.s >&5 | |
14677 | fi | |
14678 | rm -f conftest.o conftest.s | |
14679 | fi | |
ad9c4d9f | 14680 | fi |
ba479fd2 NN |
14681 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5 |
14682 | echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6 | |
8ada417f ZW |
14683 | |
14684 | ||
14685 | if test $gcc_cv_as_dwarf2_debug_line = yes \ | |
14686 | && test $gcc_cv_as_dwarf2_file_buggy = no; then | |
ba479fd2 NN |
14687 | |
14688 | cat >>confdefs.h <<\_ACEOF | |
9d147085 | 14689 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
ba479fd2 | 14690 | _ACEOF |
9d147085 | 14691 | |
8ada417f | 14692 | fi |
ad9c4d9f | 14693 | |
ba479fd2 NN |
14694 | echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5 |
14695 | echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6 | |
14696 | if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then | |
14697 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14698 | else |
14699 | gcc_cv_as_gdwarf2_flag=no | |
14700 | if test $in_tree_gas = yes; then | |
14701 | if test $in_tree_gas_is_elf = yes \ | |
14702 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
14703 | then gcc_cv_as_gdwarf2_flag=yes | |
14704 | fi | |
14705 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14706 | echo "$insn" > conftest.s |
ba479fd2 NN |
14707 | if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5' |
14708 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14709 | (eval $ac_try) 2>&5 | |
14710 | ac_status=$? | |
14711 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14712 | (exit $ac_status); }; } | |
8ada417f ZW |
14713 | then |
14714 | gcc_cv_as_gdwarf2_flag=yes | |
14715 | else | |
14716 | echo "configure: failed program was" >&5 | |
14717 | cat conftest.s >&5 | |
14718 | fi | |
14719 | rm -f conftest.o conftest.s | |
14720 | fi | |
ad9c4d9f | 14721 | fi |
ba479fd2 NN |
14722 | echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5 |
14723 | echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6 | |
63cf211a | 14724 | if test $gcc_cv_as_gdwarf2_flag = yes; then |
ba479fd2 NN |
14725 | |
14726 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 14727 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
ba479fd2 | 14728 | _ACEOF |
5f0e9ea2 GK |
14729 | |
14730 | fi | |
ad9c4d9f | 14731 | |
ba479fd2 NN |
14732 | echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5 |
14733 | echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6 | |
14734 | if test "${gcc_cv_as_gstabs_flag+set}" = set; then | |
14735 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14736 | else |
14737 | gcc_cv_as_gstabs_flag=no | |
14738 | if test $in_tree_gas = yes; then | |
14739 | if test $in_tree_gas_is_elf = yes \ | |
14740 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
14741 | then gcc_cv_as_gstabs_flag=yes | |
14742 | fi | |
14743 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14744 | echo "$insn" > conftest.s |
ba479fd2 NN |
14745 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5' |
14746 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14747 | (eval $ac_try) 2>&5 | |
14748 | ac_status=$? | |
14749 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14750 | (exit $ac_status); }; } | |
8ada417f ZW |
14751 | then |
14752 | # The native Solaris 9/Intel assembler doesn't understand --gstabs | |
14753 | # and warns about it, but still exits successfully. So check for | |
14754 | # this. | |
ba479fd2 NN |
14755 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null' |
14756 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14757 | (eval $ac_try) 2>&5 | |
14758 | ac_status=$? | |
14759 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14760 | (exit $ac_status); }; } | |
8ada417f ZW |
14761 | then : |
14762 | else gcc_cv_as_gstabs_flag=yes | |
14763 | fi | |
14764 | else | |
14765 | echo "configure: failed program was" >&5 | |
14766 | cat conftest.s >&5 | |
14767 | fi | |
14768 | rm -f conftest.o conftest.s | |
14769 | fi | |
ad9c4d9f | 14770 | fi |
ba479fd2 NN |
14771 | echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5 |
14772 | echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6 | |
63cf211a | 14773 | if test $gcc_cv_as_gstabs_flag = yes; then |
ba479fd2 NN |
14774 | |
14775 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 14776 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
ba479fd2 | 14777 | _ACEOF |
5f0e9ea2 GK |
14778 | |
14779 | fi | |
8ada417f | 14780 | fi |
5f0e9ea2 | 14781 | |
ba479fd2 NN |
14782 | echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5 |
14783 | echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6 | |
96d0f4dc | 14784 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 14785 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
14786 | 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 \ |
14787 | && test $in_tree_ld_is_elf = yes; then | |
96d0f4dc JJ |
14788 | gcc_cv_ld_ro_rw_mix=read-write |
14789 | fi | |
14790 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
14791 | echo '.section myfoosect, "a"' > conftest1.s |
14792 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 14793 | echo '.byte 1' >> conftest2.s |
90e145da | 14794 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 14795 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
14796 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
14797 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
14798 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 14799 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 14800 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 14801 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 14802 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
14803 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
14804 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
14805 | gcc_cv_ld_ro_rw_mix=read-only | |
14806 | else | |
14807 | gcc_cv_ld_ro_rw_mix=read-write | |
14808 | fi | |
14809 | fi | |
14810 | fi | |
14811 | rm -f conftest.* conftest[123].* | |
14812 | fi | |
14813 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
ba479fd2 NN |
14814 | |
14815 | cat >>confdefs.h <<\_ACEOF | |
96d0f4dc | 14816 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
ba479fd2 | 14817 | _ACEOF |
96d0f4dc JJ |
14818 | |
14819 | fi | |
ba479fd2 NN |
14820 | echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5 |
14821 | echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6 | |
96d0f4dc | 14822 | |
ba479fd2 NN |
14823 | echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5 |
14824 | echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6 | |
275b60d6 | 14825 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 14826 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
14827 | 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 \ |
14828 | && test $in_tree_ld_is_elf = yes; then | |
275b60d6 JJ |
14829 | gcc_cv_ld_eh_frame_hdr=yes |
14830 | fi | |
14831 | elif test x$gcc_cv_ld != x; then | |
14832 | # Check if linker supports --eh-frame-hdr option | |
14833 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
14834 | gcc_cv_ld_eh_frame_hdr=yes | |
14835 | fi | |
14836 | fi | |
14837 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then | |
ba479fd2 NN |
14838 | |
14839 | cat >>confdefs.h <<\_ACEOF | |
275b60d6 | 14840 | #define HAVE_LD_EH_FRAME_HDR 1 |
ba479fd2 | 14841 | _ACEOF |
275b60d6 JJ |
14842 | |
14843 | fi | |
ba479fd2 NN |
14844 | echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5 |
14845 | echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6 | |
275b60d6 | 14846 | |
ba479fd2 NN |
14847 | echo "$as_me:$LINENO: checking linker position independent executable support" >&5 |
14848 | echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6 | |
24a4dd31 JJ |
14849 | gcc_cv_ld_pie=no |
14850 | if test $in_tree_ld = yes ; then | |
5408ac6c HPN |
14851 | 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 \ |
14852 | && test $in_tree_ld_is_elf = yes; then | |
24a4dd31 JJ |
14853 | gcc_cv_ld_pie=yes |
14854 | fi | |
14855 | elif test x$gcc_cv_ld != x; then | |
14856 | # Check if linker supports -pie option | |
14857 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
14858 | gcc_cv_ld_pie=yes | |
14859 | fi | |
14860 | fi | |
14861 | if test x"$gcc_cv_ld_pie" = xyes; then | |
ba479fd2 NN |
14862 | |
14863 | cat >>confdefs.h <<\_ACEOF | |
24a4dd31 | 14864 | #define HAVE_LD_PIE 1 |
ba479fd2 | 14865 | _ACEOF |
24a4dd31 JJ |
14866 | |
14867 | fi | |
ba479fd2 NN |
14868 | echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5 |
14869 | echo "${ECHO_T}$gcc_cv_ld_pie" >&6 | |
24a4dd31 | 14870 | |
8bb915b6 NN |
14871 | # -------- |
14872 | # UNSORTED | |
14873 | # -------- | |
14874 | ||
765f1bf9 AM |
14875 | echo "$as_me:$LINENO: checking linker --as-needed support" >&5 |
14876 | echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6 | |
82e923f6 RS |
14877 | if test "${gcc_cv_ld_as_needed+set}" = set; then |
14878 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14879 | else | |
14880 | gcc_cv_ld_as_needed=no | |
765f1bf9 AM |
14881 | if test $in_tree_ld = yes ; then |
14882 | 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 \ | |
14883 | && test $in_tree_ld_is_elf = yes; then | |
14884 | gcc_cv_ld_as_needed=yes | |
14885 | fi | |
14886 | elif test x$gcc_cv_ld != x; then | |
14887 | # Check if linker supports --as-needed and --no-as-needed options | |
14888 | if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then | |
14889 | gcc_cv_ld_as_needed=yes | |
14890 | fi | |
14891 | fi | |
82e923f6 RS |
14892 | |
14893 | fi | |
14894 | echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5 | |
14895 | echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6 | |
765f1bf9 AM |
14896 | if test x"$gcc_cv_ld_as_needed" = xyes; then |
14897 | ||
14898 | cat >>confdefs.h <<\_ACEOF | |
14899 | #define HAVE_LD_AS_NEEDED 1 | |
14900 | _ACEOF | |
14901 | ||
14902 | fi | |
765f1bf9 | 14903 | |
85b776df AM |
14904 | case "$target" in |
14905 | powerpc64*-*-linux*) | |
14906 | echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5 | |
14907 | echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6 | |
14908 | if test "${gcc_cv_ld_no_dot_syms+set}" = set; then | |
14909 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14910 | else | |
14911 | gcc_cv_ld_no_dot_syms=no | |
14912 | if test $in_tree_ld = yes ; then | |
14913 | 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 | |
14914 | gcc_cv_ld_no_dot_syms=yes | |
14915 | fi | |
14916 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then | |
14917 | cat > conftest1.s <<EOF | |
14918 | .text | |
14919 | bl .foo | |
14920 | EOF | |
14921 | cat > conftest2.s <<EOF | |
14922 | .section ".opd","aw" | |
14923 | .align 3 | |
14924 | .globl foo | |
14925 | .type foo,@function | |
14926 | foo: | |
14927 | .quad .LEfoo,.TOC.@tocbase,0 | |
14928 | .text | |
14929 | .LEfoo: | |
14930 | blr | |
14931 | .size foo,.-.LEfoo | |
14932 | EOF | |
14933 | if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \ | |
14934 | && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
14935 | && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then | |
14936 | gcc_cv_ld_no_dot_syms=yes | |
14937 | fi | |
14938 | rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s | |
14939 | fi | |
14940 | ||
14941 | fi | |
14942 | echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5 | |
14943 | echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6 | |
14944 | if test x"$gcc_cv_ld_no_dot_syms" = xyes; then | |
14945 | ||
14946 | cat >>confdefs.h <<\_ACEOF | |
14947 | #define HAVE_LD_NO_DOT_SYMS 1 | |
14948 | _ACEOF | |
14949 | ||
14950 | fi | |
14951 | ;; | |
14952 | esac | |
14953 | ||
9fb28a67 | 14954 | if test x$with_sysroot = x && test x$host = x$target \ |
047d636f | 14955 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then |
ba479fd2 NN |
14956 | |
14957 | cat >>confdefs.h <<_ACEOF | |
793e9558 | 14958 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
ba479fd2 | 14959 | _ACEOF |
793e9558 PB |
14960 | |
14961 | fi | |
14962 | ||
81bf3d9e | 14963 | # Find out what GC implementation we want, or may, use. |
ba479fd2 | 14964 | |
81bf3d9e RH |
14965 | # Check whether --with-gc or --without-gc was given. |
14966 | if test "${with_gc+set}" = set; then | |
14967 | withval="$with_gc" | |
14968 | case "$withval" in | |
08cee789 | 14969 | page) |
81bf3d9e | 14970 | GGC=ggc-$withval |
08cee789 DJ |
14971 | ;; |
14972 | zone) | |
14973 | GGC=ggc-$withval | |
14974 | ||
14975 | cat >>confdefs.h <<\_ACEOF | |
14976 | #define GGC_ZONE 1 | |
14977 | _ACEOF | |
14978 | ||
81bf3d9e RH |
14979 | ;; |
14980 | *) | |
ba479fd2 NN |
14981 | { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5 |
14982 | echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;} | |
14983 | { (exit 1); exit 1; }; } | |
81bf3d9e RH |
14984 | ;; |
14985 | esac | |
14986 | else | |
005537df | 14987 | GGC=ggc-page |
ba479fd2 | 14988 | fi; |
81bf3d9e RH |
14989 | |
14990 | echo "Using $GGC for garbage collection." | |
14991 | ||
3c809ba4 | 14992 | # Use the system's zlib library. |
b8dad04b ZW |
14993 | zlibdir=-L../zlib |
14994 | zlibinc="-I\$(srcdir)/../zlib" | |
ba479fd2 | 14995 | |
3c809ba4 AG |
14996 | # Check whether --with-system-zlib or --without-system-zlib was given. |
14997 | if test "${with_system_zlib+set}" = set; then | |
14998 | withval="$with_system_zlib" | |
14999 | zlibdir= | |
15000 | zlibinc= | |
15001 | ||
ba479fd2 | 15002 | fi; |
3c809ba4 AG |
15003 | |
15004 | ||
15005 | ||
dc6746e7 | 15006 | |
ba479fd2 NN |
15007 | echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
15008 | echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 | |
dc6746e7 PT |
15009 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
15010 | if test "${enable_maintainer_mode+set}" = set; then | |
15011 | enableval="$enable_maintainer_mode" | |
15012 | maintainer_mode=$enableval | |
15013 | else | |
15014 | maintainer_mode=no | |
ba479fd2 | 15015 | fi; |
63cf211a | 15016 | |
ba479fd2 NN |
15017 | echo "$as_me:$LINENO: result: $maintainer_mode" >&5 |
15018 | echo "${ECHO_T}$maintainer_mode" >&6 | |
dc6746e7 PT |
15019 | |
15020 | if test "$maintainer_mode" = "yes"; then | |
15021 | MAINT='' | |
15022 | else | |
15023 | MAINT='#' | |
15024 | fi | |
15025 | ||
8bb915b6 NN |
15026 | # -------------- |
15027 | # Language hooks | |
15028 | # -------------- | |
15029 | ||
861bb6c1 JL |
15030 | # Make empty files to contain the specs and options for each language. |
15031 | # Then add #include lines to for a compiler that has specs and/or options. | |
15032 | ||
d7b42618 | 15033 | lang_opt_files= |
861bb6c1 | 15034 | lang_specs_files= |
3103b7db | 15035 | lang_tree_files= |
861bb6c1 JL |
15036 | for subdir in . $subdirs |
15037 | do | |
d7b42618 NB |
15038 | if test -f $srcdir/$subdir/lang.opt; then |
15039 | lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" | |
15040 | fi | |
75bffa71 | 15041 | if test -f $srcdir/$subdir/lang-specs.h; then |
0d24f4d1 | 15042 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" |
861bb6c1 | 15043 | fi |
3103b7db | 15044 | if test -f $srcdir/$subdir/$subdir-tree.def; then |
0d24f4d1 | 15045 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" |
3103b7db | 15046 | fi |
861bb6c1 JL |
15047 | done |
15048 | ||
15049 | # These (without "all_") are set in each config-lang.in. | |
15050 | # `language' must be a single word so is spelled singularly. | |
15051 | all_languages= | |
15052 | all_boot_languages= | |
15053 | all_compilers= | |
15054 | all_stagestuff= | |
53c7ffe7 | 15055 | all_outputs='Makefile gccbug mklibgcc libada-mk' |
861bb6c1 | 15056 | # List of language makefile fragments. |
2ed26f6b ZW |
15057 | all_lang_makefrags= |
15058 | # List of language subdirectory makefiles. Deprecated. | |
861bb6c1 | 15059 | all_lang_makefiles= |
e2500fed | 15060 | # Files for gengtype |
ef69da62 | 15061 | all_gtfiles="$target_gtfiles" |
8ac9d31f TJ |
15062 | # Files for gengtype with language |
15063 | all_gtfiles_files_langs= | |
15064 | all_gtfiles_files_files= | |
861bb6c1 JL |
15065 | |
15066 | # Add the language fragments. | |
15067 | # Languages are added via two mechanisms. Some information must be | |
15068 | # recorded in makefile variables, these are defined in config-lang.in. | |
15069 | # We accumulate them and plug them into the main Makefile. | |
15070 | # The other mechanism is a set of hooks for each of the main targets | |
15071 | # like `clean', `install', etc. | |
15072 | ||
861bb6c1 | 15073 | language_hooks="Make-hooks" |
861bb6c1 | 15074 | |
c406e779 | 15075 | for s in $subdirs |
861bb6c1 | 15076 | do |
861bb6c1 JL |
15077 | language= |
15078 | boot_language= | |
15079 | compilers= | |
15080 | stagestuff= | |
861bb6c1 | 15081 | outputs= |
e2500fed | 15082 | gtfiles= |
861bb6c1 | 15083 | . ${srcdir}/$s/config-lang.in |
75bffa71 | 15084 | if test "x$language" = x |
861bb6c1 JL |
15085 | then |
15086 | echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 | |
15087 | exit 1 | |
15088 | fi | |
2ed26f6b | 15089 | all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in" |
72aaffbd | 15090 | if test -f ${srcdir}/$s/Makefile.in |
2ed26f6b | 15091 | then all_lang_makefiles="$s/Makefile" |
72aaffbd | 15092 | fi |
861bb6c1 | 15093 | all_languages="$all_languages $language" |
75bffa71 | 15094 | if test "x$boot_language" = xyes |
861bb6c1 JL |
15095 | then |
15096 | all_boot_languages="$all_boot_languages $language" | |
15097 | fi | |
15098 | all_compilers="$all_compilers $compilers" | |
15099 | all_stagestuff="$all_stagestuff $stagestuff" | |
861bb6c1 | 15100 | all_outputs="$all_outputs $outputs" |
e2500fed | 15101 | all_gtfiles="$all_gtfiles $gtfiles" |
c406e779 | 15102 | for f in $gtfiles |
8ac9d31f | 15103 | do |
8ac9d31f TJ |
15104 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " |
15105 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8ac9d31f | 15106 | done |
861bb6c1 JL |
15107 | done |
15108 | ||
8ac9d31f TJ |
15109 | # Pick up gtfiles for c |
15110 | gtfiles= | |
15111 | s="c" | |
15112 | . ${srcdir}/c-config-lang.in | |
15113 | all_gtfiles="$all_gtfiles $gtfiles" | |
c406e779 | 15114 | for f in $gtfiles |
8ac9d31f | 15115 | do |
8ac9d31f TJ |
15116 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " |
15117 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8ac9d31f TJ |
15118 | done |
15119 | ||
cbc59f01 | 15120 | check_languages= |
c406e779 | 15121 | for language in $all_languages |
cbc59f01 | 15122 | do |
cbc59f01 | 15123 | check_languages="$check_languages check-$language" |
cbc59f01 DD |
15124 | done |
15125 | ||
62b81e45 MM |
15126 | # We link each language in with a set of hooks, reached indirectly via |
15127 | # lang.${target}. | |
861bb6c1 JL |
15128 | |
15129 | rm -f Make-hooks | |
15130 | touch Make-hooks | |
65ebbf81 | 15131 | target_list="all.build all.cross start.encap rest.encap tags \ |
a207b594 | 15132 | install-normal install-common install-man \ |
a541f69d | 15133 | uninstall info man srcextra srcman srcinfo \ |
a03ad584 | 15134 | mostlyclean clean distclean maintainer-clean \ |
8f231b5d | 15135 | stage1 stage2 stage3 stage4 stageprofile stagefeedback" |
861bb6c1 JL |
15136 | for t in $target_list |
15137 | do | |
15138 | x= | |
c406e779 | 15139 | for lang in $all_languages |
861bb6c1 | 15140 | do |
ab87f8c8 | 15141 | x="$x $lang.$t" |
861bb6c1 JL |
15142 | done |
15143 | echo "lang.$t: $x" >> Make-hooks | |
15144 | done | |
15145 | ||
8bb915b6 NN |
15146 | # -------- |
15147 | # UNSORTED | |
15148 | # -------- | |
15149 | ||
cc06d68c | 15150 | # Create .gdbinit. |
861bb6c1 | 15151 | |
cc06d68c GP |
15152 | echo "dir ." > .gdbinit |
15153 | echo "dir ${srcdir}" >> .gdbinit | |
15154 | if test x$gdb_needs_out_file_path = xyes | |
15155 | then | |
15156 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
15157 | fi | |
15158 | if test "x$subdirs" != x; then | |
15159 | for s in $subdirs | |
15160 | do | |
15161 | echo "dir ${srcdir}/$s" >> .gdbinit | |
15162 | done | |
861bb6c1 | 15163 | fi |
cc06d68c | 15164 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 15165 | |
8f8d3278 NC |
15166 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
15167 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
15168 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
15169 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
15170 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
15171 | # make and thus we'd get different behavior depending on where we built the | |
15172 | # sources. | |
5949a9fc | 15173 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
caa55b1e | 15174 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)' |
d062c304 | 15175 | else |
8f8d3278 NC |
15176 | # An explanation of the sed strings: |
15177 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
15178 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
15179 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 15180 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
15181 | # |
15182 | # (*) Note this pattern overwrites the first character of the string | |
15183 | # with a forward slash if one is not already present. This is not a | |
15184 | # problem because the exact names of the sub-directories concerned is | |
15185 | # unimportant, just the number of them matters. | |
15186 | # | |
15187 | # The practical upshot of these patterns is like this: | |
15188 | # | |
15189 | # prefix exec_prefix result | |
15190 | # ------ ----------- ------ | |
15191 | # /foo /foo/bar ../ | |
15192 | # /foo/ /foo/bar ../ | |
15193 | # /foo /foo/bar/ ../ | |
15194 | # /foo/ /foo/bar/ ../ | |
15195 | # /foo /foo/bar/ugg ../../ | |
15196 | # | |
4c112cda | 15197 | dollar='$$' |
caa55b1e | 15198 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)" |
d062c304 JL |
15199 | fi |
15200 | ||
15201 | ||
2ce3c6c6 | 15202 | |
2bbea3a6 RH |
15203 | # Find a directory in which to install a shared libgcc. |
15204 | ||
15205 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
15206 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
15207 | enableval="$enable_version_specific_runtime_libs" | |
ba479fd2 NN |
15208 | |
15209 | fi; | |
2bbea3a6 RH |
15210 | |
15211 | ||
5b15f277 RH |
15212 | # Check whether --with-slibdir or --without-slibdir was given. |
15213 | if test "${with_slibdir+set}" = set; then | |
15214 | withval="$with_slibdir" | |
15215 | slibdir="$with_slibdir" | |
15216 | else | |
15217 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 15218 | slibdir='$(libsubdir)' |
5b15f277 | 15219 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
15220 | slibdir='$(build_tooldir)/lib' |
15221 | else | |
5b15f277 | 15222 | slibdir='$(libdir)' |
2bbea3a6 | 15223 | fi |
ba479fd2 | 15224 | fi; |
2bbea3a6 RH |
15225 | |
15226 | ||
1e6347d8 | 15227 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
15228 | |
15229 | ||
861bb6c1 JL |
15230 | # Substitute configuration variables |
15231 | ||
15232 | ||
15233 | ||
15234 | ||
15235 | ||
15236 | ||
15237 | ||
15238 | ||
15239 | ||
15240 | ||
15241 | ||
15242 | ||
15243 | ||
15244 | ||
15245 | ||
15246 | ||
15247 | ||
15248 | ||
15249 | ||
15250 | ||
15251 | ||
15252 | ||
15253 | ||
15254 | ||
15255 | ||
15256 | ||
15257 | ||
15258 | ||
15259 | ||
15260 | ||
15261 | ||
15262 | ||
15263 | ||
15264 | ||
15265 | ||
15266 | ||
15267 | ||
15268 | ||
15269 | ||
15270 | ||
15271 | ||
15272 | ||
15273 | ||
15274 | ||
15275 | ||
15276 | ||
9b16d2c4 | 15277 | |
e9a25f70 | 15278 | |
6e26218f | 15279 | |
c8724862 | 15280 | |
e061d1ce | 15281 | |
d8bb17c8 | 15282 | |
11642c3a ZW |
15283 | |
15284 | ||
15285 | ||
15286 | ||
15287 | ||
15288 | ||
15289 | ||
3d9d2476 | 15290 | |
8ac9d31f | 15291 | |
4c4a5bbc | 15292 | |
4c4a5bbc L |
15293 | |
15294 | ||
15295 | if test x"$SET_GCC_LIB_PATH_CMD" != x; then | |
15296 | # SET_GCC_LIB_PATH_CMD is "XXX=path; export XXX;". It is expanded to | |
15297 | # | |
15298 | # eval "set_gcc_lib_path=XXX=path; export XXX;" | |
15299 | # | |
15300 | eval "set_gcc_lib_path=$SET_GCC_LIB_PATH_CMD" | |
15301 | # It will set set_gcc_lib_path to "export XXX=path" for GNU make. | |
15302 | set_gcc_lib_path="export $set_gcc_lib_path" | |
15303 | else | |
15304 | set_gcc_lib_path= | |
15305 | fi | |
e2500fed | 15306 | |
51b9ff45 | 15307 | |
861bb6c1 | 15308 | |
6e3f3080 NN |
15309 | # Echo link setup. |
15310 | if test x${build} = x${host} ; then | |
15311 | if test x${host} = x${target} ; then | |
15312 | echo "Links are now set up to build a native compiler for ${target}." 1>&2 | |
15313 | else | |
15314 | echo "Links are now set up to build a cross-compiler" 1>&2 | |
15315 | echo " from ${host} to ${target}." 1>&2 | |
15316 | fi | |
15317 | else | |
15318 | if test x${host} = x${target} ; then | |
15319 | echo "Links are now set up to build (on ${build}) a native compiler" 1>&2 | |
15320 | echo " for ${target}." 1>&2 | |
15321 | else | |
15322 | echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2 | |
15323 | echo " from ${host} to ${target}." 1>&2 | |
15324 | fi | |
15325 | fi | |
15326 | ||
6de9cd9a DN |
15327 | |
15328 | ||
15329 | ||
6e3f3080 NN |
15330 | # Configure the subdirectories |
15331 | # AC_CONFIG_SUBDIRS($subdirs) | |
15332 | ||
15333 | # Create the Makefile | |
15334 | # and configure language subdirectories | |
ba479fd2 | 15335 | ac_config_files="$ac_config_files $all_outputs" |
914c5af7 NN |
15336 | |
15337 | ||
ba479fd2 | 15338 | ac_config_commands="$ac_config_commands default" |
914c5af7 | 15339 | |
ba479fd2 | 15340 | cat >confcache <<\_ACEOF |
6e3f3080 NN |
15341 | # This file is a shell script that caches the results of configure |
15342 | # tests run on this system so they can be shared between configure | |
ba479fd2 NN |
15343 | # scripts and configure runs, see configure's option --config-cache. |
15344 | # It is not useful on other systems. If it contains results you don't | |
15345 | # want to keep, you may remove or edit it. | |
6e3f3080 | 15346 | # |
ba479fd2 NN |
15347 | # config.status only pays attention to the cache file if you give it |
15348 | # the --recheck option to rerun configure. | |
6e3f3080 | 15349 | # |
ba479fd2 NN |
15350 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
15351 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
15352 | # following values. | |
15353 | ||
15354 | _ACEOF | |
15355 | ||
6e3f3080 NN |
15356 | # The following way of writing the cache mishandles newlines in values, |
15357 | # but we know of no workaround that is simple, portable, and efficient. | |
15358 | # So, don't put newlines in cache variables' values. | |
15359 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
15360 | # and sets the high bit in the cache file unless we assign to the vars. | |
ba479fd2 NN |
15361 | { |
15362 | (set) 2>&1 | | |
15363 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
15364 | *ac_space=\ *) | |
15365 | # `set' does not quote correctly, so add quotes (double-quote | |
15366 | # substitution turns \\\\ into \\, and sed turns \\ into \). | |
15367 | sed -n \ | |
86da66b5 HPN |
15368 | "s/'/'\\\\''/g; |
15369 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
ba479fd2 NN |
15370 | ;; |
15371 | *) | |
15372 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
15373 | sed -n \ | |
86da66b5 | 15374 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
ba479fd2 NN |
15375 | ;; |
15376 | esac; | |
15377 | } | | |
15378 | sed ' | |
15379 | t clear | |
15380 | : clear | |
15381 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
15382 | t end | |
15383 | /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
15384 | : end' >>confcache | |
15385 | if diff $cache_file confcache >/dev/null 2>&1; then :; else | |
6e3f3080 | 15386 | if test -w $cache_file; then |
ba479fd2 NN |
15387 | test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" |
15388 | cat confcache >$cache_file | |
6e3f3080 NN |
15389 | else |
15390 | echo "not updating unwritable cache $cache_file" | |
15391 | fi | |
15392 | fi | |
15393 | rm -f confcache | |
15394 | ||
15395 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
15396 | # Let make expand exec_prefix. | |
15397 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
15398 | ||
ba479fd2 NN |
15399 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
15400 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
15401 | # trailing colons and then remove the whole line if VPATH becomes empty | |
15402 | # (actually we leave an empty line to preserve line numbers). | |
6e3f3080 | 15403 | if test "x$srcdir" = x.; then |
86da66b5 | 15404 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
ba479fd2 NN |
15405 | s/:*\$(srcdir):*/:/; |
15406 | s/:*\${srcdir}:*/:/; | |
15407 | s/:*@srcdir@:*/:/; | |
86da66b5 | 15408 | s/^\([^=]*=[ ]*\):*/\1/; |
ba479fd2 | 15409 | s/:*$//; |
86da66b5 | 15410 | s/^[^=]*=[ ]*$//; |
ba479fd2 | 15411 | }' |
6e3f3080 NN |
15412 | fi |
15413 | ||
63cf211a | 15414 | DEFS=-DHAVE_CONFIG_H |
6e3f3080 | 15415 | |
ba479fd2 NN |
15416 | ac_libobjs= |
15417 | ac_ltlibobjs= | |
15418 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
15419 | # 1. Remove the extension, and $U if already installed. | |
15420 | ac_i=`echo "$ac_i" | | |
86da66b5 | 15421 | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` |
ba479fd2 NN |
15422 | # 2. Add them. |
15423 | ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" | |
15424 | ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' | |
15425 | done | |
15426 | LIBOBJS=$ac_libobjs | |
63cf211a | 15427 | |
ba479fd2 NN |
15428 | LTLIBOBJS=$ac_ltlibobjs |
15429 | ||
15430 | ||
15431 | ||
15432 | : ${CONFIG_STATUS=./config.status} | |
15433 | ac_clean_files_save=$ac_clean_files | |
15434 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
15435 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | |
15436 | echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
15437 | cat >$CONFIG_STATUS <<_ACEOF | |
15438 | #! $SHELL | |
15439 | # Generated by $as_me. | |
6e3f3080 NN |
15440 | # Run this file to recreate the current configuration. |
15441 | # Compiler output produced by configure, useful for debugging | |
ba479fd2 | 15442 | # configure, is in config.log if it exists. |
6e3f3080 | 15443 | |
ba479fd2 NN |
15444 | debug=false |
15445 | ac_cs_recheck=false | |
15446 | ac_cs_silent=false | |
15447 | SHELL=\${CONFIG_SHELL-$SHELL} | |
15448 | _ACEOF | |
15449 | ||
15450 | cat >>$CONFIG_STATUS <<\_ACEOF | |
15451 | ## --------------------- ## | |
15452 | ## M4sh Initialization. ## | |
15453 | ## --------------------- ## | |
15454 | ||
15455 | # Be Bourne compatible | |
15456 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
15457 | emulate sh | |
15458 | NULLCMD=: | |
15459 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
15460 | # is contrary to our usage. Disable this feature. | |
15461 | alias -g '${1+"$@"}'='"$@"' | |
15462 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
15463 | set -o posix | |
15464 | fi | |
86da66b5 | 15465 | DUALCASE=1; export DUALCASE # for MKS sh |
ba479fd2 NN |
15466 | |
15467 | # Support unset when possible. | |
86da66b5 | 15468 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then |
ba479fd2 NN |
15469 | as_unset=unset |
15470 | else | |
15471 | as_unset=false | |
15472 | fi | |
15473 | ||
15474 | ||
15475 | # Work around bugs in pre-3.0 UWIN ksh. | |
15476 | $as_unset ENV MAIL MAILPATH | |
15477 | PS1='$ ' | |
15478 | PS2='> ' | |
15479 | PS4='+ ' | |
15480 | ||
15481 | # NLS nuisances. | |
15482 | for as_var in \ | |
15483 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
15484 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
15485 | LC_TELEPHONE LC_TIME | |
6e3f3080 | 15486 | do |
86da66b5 | 15487 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
ba479fd2 NN |
15488 | eval $as_var=C; export $as_var |
15489 | else | |
15490 | $as_unset $as_var | |
15491 | fi | |
6e3f3080 NN |
15492 | done |
15493 | ||
ba479fd2 NN |
15494 | # Required to use basename. |
15495 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
15496 | as_expr=expr | |
15497 | else | |
15498 | as_expr=false | |
15499 | fi | |
6e3f3080 | 15500 | |
ba479fd2 NN |
15501 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then |
15502 | as_basename=basename | |
15503 | else | |
15504 | as_basename=false | |
15505 | fi | |
6e3f3080 NN |
15506 | |
15507 | ||
ba479fd2 NN |
15508 | # Name of the executable. |
15509 | as_me=`$as_basename "$0" || | |
15510 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
15511 | X"$0" : 'X\(//\)$' \| \ | |
15512 | X"$0" : 'X\(/\)$' \| \ | |
15513 | . : '\(.\)' 2>/dev/null || | |
15514 | echo X/"$0" | | |
15515 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | |
15516 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
15517 | /^X\/\(\/\).*/{ s//\1/; q; } | |
15518 | s/.*/./; q'` | |
15519 | ||
6e3f3080 | 15520 | |
ba479fd2 NN |
15521 | # PATH needs CR, and LINENO needs CR and PATH. |
15522 | # Avoid depending upon Character Ranges. | |
15523 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
15524 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
15525 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
15526 | as_cr_digits='0123456789' | |
15527 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
15528 | ||
15529 | # The user is always right. | |
15530 | if test "${PATH_SEPARATOR+set}" != set; then | |
15531 | echo "#! /bin/sh" >conf$$.sh | |
15532 | echo "exit 0" >>conf$$.sh | |
15533 | chmod +x conf$$.sh | |
15534 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
15535 | PATH_SEPARATOR=';' | |
6e3f3080 | 15536 | else |
ba479fd2 NN |
15537 | PATH_SEPARATOR=: |
15538 | fi | |
15539 | rm -f conf$$.sh | |
15540 | fi | |
15541 | ||
15542 | ||
15543 | as_lineno_1=$LINENO | |
15544 | as_lineno_2=$LINENO | |
15545 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
15546 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
15547 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
15548 | # Find who we are. Look in the path if we contain no path at all | |
15549 | # relative or not. | |
15550 | case $0 in | |
15551 | *[\\/]* ) as_myself=$0 ;; | |
15552 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
15553 | for as_dir in $PATH | |
15554 | do | |
15555 | IFS=$as_save_IFS | |
15556 | test -z "$as_dir" && as_dir=. | |
15557 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
15558 | done | |
15559 | ||
15560 | ;; | |
15561 | esac | |
15562 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
15563 | # in which case we are not to be found in the path. | |
15564 | if test "x$as_myself" = x; then | |
15565 | as_myself=$0 | |
15566 | fi | |
15567 | if test ! -f "$as_myself"; then | |
15568 | { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 | |
15569 | echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} | |
15570 | { (exit 1); exit 1; }; } | |
6e3f3080 | 15571 | fi |
ba479fd2 NN |
15572 | case $CONFIG_SHELL in |
15573 | '') | |
15574 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
15575 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
15576 | do | |
15577 | IFS=$as_save_IFS | |
15578 | test -z "$as_dir" && as_dir=. | |
15579 | for as_base in sh bash ksh sh5; do | |
15580 | case $as_dir in | |
15581 | /*) | |
15582 | if ("$as_dir/$as_base" -c ' | |
15583 | as_lineno_1=$LINENO | |
15584 | as_lineno_2=$LINENO | |
15585 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
15586 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
15587 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | |
15588 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
15589 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
15590 | CONFIG_SHELL=$as_dir/$as_base | |
15591 | export CONFIG_SHELL | |
15592 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
15593 | fi;; | |
15594 | esac | |
15595 | done | |
15596 | done | |
15597 | ;; | |
15598 | esac | |
15599 | ||
15600 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
15601 | # uniformly replaced by the line number. The first 'sed' inserts a | |
15602 | # line-number line before each line; the second 'sed' does the real | |
15603 | # work. The second script uses 'N' to pair each line-number line | |
15604 | # with the numbered line, and appends trailing '-' during | |
15605 | # substitution so that $LINENO is not a special case at line end. | |
15606 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | |
15607 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | |
15608 | sed '=' <$as_myself | | |
15609 | sed ' | |
15610 | N | |
15611 | s,$,-, | |
15612 | : loop | |
15613 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
15614 | t loop | |
15615 | s,-$,, | |
15616 | s,^['$as_cr_digits']*\n,, | |
15617 | ' >$as_me.lineno && | |
15618 | chmod +x $as_me.lineno || | |
15619 | { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 | |
15620 | echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} | |
15621 | { (exit 1); exit 1; }; } | |
15622 | ||
15623 | # Don't try to exec as it changes $[0], causing all sort of problems | |
15624 | # (the dirname of $[0] is not the place where we might find the | |
15625 | # original and so on. Autoconf is especially sensible to this). | |
15626 | . ./$as_me.lineno | |
15627 | # Exit status is that of the last command. | |
15628 | exit | |
15629 | } | |
15630 | ||
15631 | ||
15632 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | |
15633 | *c*,-n*) ECHO_N= ECHO_C=' | |
15634 | ' ECHO_T=' ' ;; | |
15635 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
15636 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
15637 | esac | |
15638 | ||
15639 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
15640 | as_expr=expr | |
15641 | else | |
15642 | as_expr=false | |
15643 | fi | |
15644 | ||
15645 | rm -f conf$$ conf$$.exe conf$$.file | |
15646 | echo >conf$$.file | |
15647 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
15648 | # We could just check for DJGPP; but this test a) works b) is more generic | |
15649 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
15650 | if test -f conf$$.exe; then | |
15651 | # Don't use ln at all; we don't have any links | |
15652 | as_ln_s='cp -p' | |
6e3f3080 | 15653 | else |
ba479fd2 | 15654 | as_ln_s='ln -s' |
6e3f3080 | 15655 | fi |
ba479fd2 NN |
15656 | elif ln conf$$.file conf$$ 2>/dev/null; then |
15657 | as_ln_s=ln | |
15658 | else | |
15659 | as_ln_s='cp -p' | |
15660 | fi | |
15661 | rm -f conf$$ conf$$.exe conf$$.file | |
15662 | ||
15663 | if mkdir -p . 2>/dev/null; then | |
15664 | as_mkdir_p=: | |
15665 | else | |
86da66b5 | 15666 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
15667 | as_mkdir_p=false |
15668 | fi | |
15669 | ||
15670 | as_executable_p="test -f" | |
15671 | ||
15672 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 15673 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
15674 | |
15675 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 15676 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
15677 | |
15678 | ||
15679 | # IFS | |
15680 | # We need space, tab and new line, in precisely that order. | |
15681 | as_nl=' | |
15682 | ' | |
15683 | IFS=" $as_nl" | |
15684 | ||
15685 | # CDPATH. | |
15686 | $as_unset CDPATH | |
15687 | ||
15688 | exec 6>&1 | |
15689 | ||
15690 | # Open the log real soon, to keep \$[0] and so on meaningful, and to | |
15691 | # report actual input values of CONFIG_FILES etc. instead of their | |
15692 | # values after options handling. Logging --version etc. is OK. | |
15693 | exec 5>>config.log | |
15694 | { | |
15695 | echo | |
15696 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
15697 | ## Running $as_me. ## | |
15698 | _ASBOX | |
15699 | } >&5 | |
15700 | cat >&5 <<_CSEOF | |
15701 | ||
15702 | This file was extended by $as_me, which was | |
8ab705be | 15703 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
15704 | |
15705 | CONFIG_FILES = $CONFIG_FILES | |
15706 | CONFIG_HEADERS = $CONFIG_HEADERS | |
15707 | CONFIG_LINKS = $CONFIG_LINKS | |
15708 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
15709 | $ $0 $@ | |
15710 | ||
15711 | _CSEOF | |
15712 | echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 | |
15713 | echo >&5 | |
15714 | _ACEOF | |
15715 | ||
15716 | # Files that config.status was made for. | |
15717 | if test -n "$ac_config_files"; then | |
15718 | echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS | |
15719 | fi | |
15720 | ||
15721 | if test -n "$ac_config_headers"; then | |
15722 | echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS | |
15723 | fi | |
15724 | ||
15725 | if test -n "$ac_config_links"; then | |
15726 | echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS | |
15727 | fi | |
15728 | ||
15729 | if test -n "$ac_config_commands"; then | |
15730 | echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS | |
15731 | fi | |
15732 | ||
15733 | cat >>$CONFIG_STATUS <<\_ACEOF | |
15734 | ||
15735 | ac_cs_usage="\ | |
15736 | \`$as_me' instantiates files from templates according to the | |
15737 | current configuration. | |
15738 | ||
15739 | Usage: $0 [OPTIONS] [FILE]... | |
15740 | ||
15741 | -h, --help print this help, then exit | |
15742 | -V, --version print version number, then exit | |
15743 | -q, --quiet do not print progress messages | |
15744 | -d, --debug don't remove temporary files | |
15745 | --recheck update $as_me by reconfiguring in the same conditions | |
15746 | --file=FILE[:TEMPLATE] | |
86da66b5 | 15747 | instantiate the configuration file FILE |
ba479fd2 | 15748 | --header=FILE[:TEMPLATE] |
86da66b5 | 15749 | instantiate the configuration header FILE |
ba479fd2 NN |
15750 | |
15751 | Configuration files: | |
15752 | $config_files | |
15753 | ||
15754 | Configuration headers: | |
15755 | $config_headers | |
15756 | ||
15757 | Configuration commands: | |
15758 | $config_commands | |
15759 | ||
15760 | Report bugs to <bug-autoconf@gnu.org>." | |
15761 | _ACEOF | |
15762 | ||
15763 | cat >>$CONFIG_STATUS <<_ACEOF | |
15764 | ac_cs_version="\\ | |
15765 | config.status | |
8ab705be | 15766 | configured by $0, generated by GNU Autoconf 2.59, |
ba479fd2 NN |
15767 | with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" |
15768 | ||
86da66b5 | 15769 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
15770 | This config.status script is free software; the Free Software Foundation |
15771 | gives unlimited permission to copy, distribute and modify it." | |
15772 | srcdir=$srcdir | |
15773 | _ACEOF | |
15774 | ||
15775 | cat >>$CONFIG_STATUS <<\_ACEOF | |
15776 | # If no file are specified by the user, then we need to provide default | |
15777 | # value. By we need to know if files were specified by the user. | |
15778 | ac_need_defaults=: | |
15779 | while test $# != 0 | |
15780 | do | |
15781 | case $1 in | |
15782 | --*=*) | |
15783 | ac_option=`expr "x$1" : 'x\([^=]*\)='` | |
15784 | ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` | |
15785 | ac_shift=: | |
15786 | ;; | |
15787 | -*) | |
15788 | ac_option=$1 | |
15789 | ac_optarg=$2 | |
15790 | ac_shift=shift | |
15791 | ;; | |
15792 | *) # This is not an option, so the user has probably given explicit | |
15793 | # arguments. | |
15794 | ac_option=$1 | |
15795 | ac_need_defaults=false;; | |
15796 | esac | |
15797 | ||
15798 | case $ac_option in | |
15799 | # Handling of the options. | |
15800 | _ACEOF | |
15801 | cat >>$CONFIG_STATUS <<\_ACEOF | |
15802 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
15803 | ac_cs_recheck=: ;; | |
15804 | --version | --vers* | -V ) | |
15805 | echo "$ac_cs_version"; exit 0 ;; | |
15806 | --he | --h) | |
15807 | # Conflict between --help and --header | |
15808 | { { echo "$as_me:$LINENO: error: ambiguous option: $1 | |
15809 | Try \`$0 --help' for more information." >&5 | |
15810 | echo "$as_me: error: ambiguous option: $1 | |
15811 | Try \`$0 --help' for more information." >&2;} | |
15812 | { (exit 1); exit 1; }; };; | |
15813 | --help | --hel | -h ) | |
15814 | echo "$ac_cs_usage"; exit 0 ;; | |
15815 | --debug | --d* | -d ) | |
15816 | debug=: ;; | |
15817 | --file | --fil | --fi | --f ) | |
15818 | $ac_shift | |
15819 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" | |
15820 | ac_need_defaults=false;; | |
15821 | --header | --heade | --head | --hea ) | |
15822 | $ac_shift | |
15823 | CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | |
15824 | ac_need_defaults=false;; | |
15825 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
15826 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
15827 | ac_cs_silent=: ;; | |
15828 | ||
15829 | # This is an error. | |
15830 | -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 | |
15831 | Try \`$0 --help' for more information." >&5 | |
15832 | echo "$as_me: error: unrecognized option: $1 | |
15833 | Try \`$0 --help' for more information." >&2;} | |
15834 | { (exit 1); exit 1; }; } ;; | |
15835 | ||
15836 | *) ac_config_targets="$ac_config_targets $1" ;; | |
15837 | ||
15838 | esac | |
15839 | shift | |
6e3f3080 | 15840 | done |
ba479fd2 NN |
15841 | |
15842 | ac_configure_extra_args= | |
15843 | ||
15844 | if $ac_cs_silent; then | |
15845 | exec 6>/dev/null | |
15846 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
861bb6c1 JL |
15847 | fi |
15848 | ||
ba479fd2 NN |
15849 | _ACEOF |
15850 | cat >>$CONFIG_STATUS <<_ACEOF | |
15851 | if \$ac_cs_recheck; then | |
15852 | echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 | |
15853 | exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
15854 | fi | |
861bb6c1 | 15855 | |
ba479fd2 NN |
15856 | _ACEOF |
15857 | ||
15858 | cat >>$CONFIG_STATUS <<_ACEOF | |
15859 | # | |
15860 | # INIT-COMMANDS section. | |
15861 | # | |
15862 | ||
15863 | subdirs='$subdirs' | |
ba479fd2 NN |
15864 | |
15865 | _ACEOF | |
15866 | ||
15867 | ||
15868 | ||
15869 | cat >>$CONFIG_STATUS <<\_ACEOF | |
15870 | for ac_config_target in $ac_config_targets | |
15871 | do | |
15872 | case "$ac_config_target" in | |
15873 | # Handling of arguments. | |
15874 | "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; | |
15875 | "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
15876 | "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; | |
15877 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 | |
15878 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | |
15879 | { (exit 1); exit 1; }; };; | |
861bb6c1 | 15880 | esac |
ba479fd2 NN |
15881 | done |
15882 | ||
15883 | # If the user did not use the arguments to specify the items to instantiate, | |
15884 | # then the envvar interface is used. Set only those that are not. | |
15885 | # We use the long form for the default assignment because of an extremely | |
15886 | # bizarre bug on SunOS 4.1.3. | |
15887 | if $ac_need_defaults; then | |
15888 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
15889 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
15890 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
15891 | fi | |
15892 | ||
15893 | # Have a temporary directory for convenience. Make it in the build tree | |
15894 | # simply because there is no reason to put it here, and in addition, | |
15895 | # creating and moving files from /tmp can sometimes cause problems. | |
15896 | # Create a temporary directory, and hook for its removal unless debugging. | |
15897 | $debug || | |
15898 | { | |
15899 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 | |
15900 | trap '{ (exit 1); exit 1; }' 1 2 13 15 | |
15901 | } | |
861bb6c1 | 15902 | |
ba479fd2 | 15903 | # Create a (secure) tmp directory for tmp files. |
6e3f3080 | 15904 | |
ba479fd2 NN |
15905 | { |
15906 | tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && | |
15907 | test -n "$tmp" && test -d "$tmp" | |
15908 | } || | |
15909 | { | |
15910 | tmp=./confstat$$-$RANDOM | |
15911 | (umask 077 && mkdir $tmp) | |
15912 | } || | |
15913 | { | |
15914 | echo "$me: cannot create a temporary directory in ." >&2 | |
15915 | { (exit 1); exit 1; } | |
15916 | } | |
15917 | ||
15918 | _ACEOF | |
15919 | ||
15920 | cat >>$CONFIG_STATUS <<_ACEOF | |
15921 | ||
15922 | # | |
15923 | # CONFIG_FILES section. | |
15924 | # | |
15925 | ||
15926 | # No need to generate the scripts if there are no CONFIG_FILES. | |
15927 | # This happens for instance when ./config.status config.h | |
15928 | if test -n "\$CONFIG_FILES"; then | |
15929 | # Protect against being on the right side of a sed subst in config.status. | |
15930 | sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; | |
15931 | s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF | |
15932 | s,@SHELL@,$SHELL,;t t | |
15933 | s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t | |
15934 | s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t | |
15935 | s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t | |
15936 | s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t | |
15937 | s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t | |
15938 | s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t | |
15939 | s,@exec_prefix@,$exec_prefix,;t t | |
15940 | s,@prefix@,$prefix,;t t | |
15941 | s,@program_transform_name@,$program_transform_name,;t t | |
15942 | s,@bindir@,$bindir,;t t | |
15943 | s,@sbindir@,$sbindir,;t t | |
15944 | s,@libexecdir@,$libexecdir,;t t | |
15945 | s,@datadir@,$datadir,;t t | |
15946 | s,@sysconfdir@,$sysconfdir,;t t | |
15947 | s,@sharedstatedir@,$sharedstatedir,;t t | |
15948 | s,@localstatedir@,$localstatedir,;t t | |
15949 | s,@libdir@,$libdir,;t t | |
15950 | s,@includedir@,$includedir,;t t | |
15951 | s,@oldincludedir@,$oldincludedir,;t t | |
15952 | s,@infodir@,$infodir,;t t | |
15953 | s,@mandir@,$mandir,;t t | |
15954 | s,@build_alias@,$build_alias,;t t | |
15955 | s,@host_alias@,$host_alias,;t t | |
15956 | s,@target_alias@,$target_alias,;t t | |
15957 | s,@DEFS@,$DEFS,;t t | |
15958 | s,@ECHO_C@,$ECHO_C,;t t | |
15959 | s,@ECHO_N@,$ECHO_N,;t t | |
15960 | s,@ECHO_T@,$ECHO_T,;t t | |
15961 | s,@LIBS@,$LIBS,;t t | |
15962 | s,@build@,$build,;t t | |
15963 | s,@build_cpu@,$build_cpu,;t t | |
15964 | s,@build_vendor@,$build_vendor,;t t | |
15965 | s,@build_os@,$build_os,;t t | |
15966 | s,@host@,$host,;t t | |
15967 | s,@host_cpu@,$host_cpu,;t t | |
15968 | s,@host_vendor@,$host_vendor,;t t | |
15969 | s,@host_os@,$host_os,;t t | |
15970 | s,@target@,$target,;t t | |
15971 | s,@target_cpu@,$target_cpu,;t t | |
15972 | s,@target_vendor@,$target_vendor,;t t | |
15973 | s,@target_os@,$target_os,;t t | |
8f1529e6 | 15974 | s,@target_noncanonical@,$target_noncanonical,;t t |
ba479fd2 NN |
15975 | s,@build_subdir@,$build_subdir,;t t |
15976 | s,@host_subdir@,$host_subdir,;t t | |
15977 | s,@target_subdir@,$target_subdir,;t t | |
4982adbe RS |
15978 | s,@gcc_version_trigger@,$gcc_version_trigger,;t t |
15979 | s,@gcc_version_full@,$gcc_version_full,;t t | |
15980 | s,@gcc_version@,$gcc_version,;t t | |
03787dfd | 15981 | s,@GENINSRC@,$GENINSRC,;t t |
ba479fd2 NN |
15982 | s,@CC@,$CC,;t t |
15983 | s,@CFLAGS@,$CFLAGS,;t t | |
15984 | s,@LDFLAGS@,$LDFLAGS,;t t | |
15985 | s,@CPPFLAGS@,$CPPFLAGS,;t t | |
15986 | s,@ac_ct_CC@,$ac_ct_CC,;t t | |
15987 | s,@EXEEXT@,$EXEEXT,;t t | |
15988 | s,@OBJEXT@,$OBJEXT,;t t | |
15989 | s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t | |
15990 | s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t | |
15991 | s,@CPP@,$CPP,;t t | |
bf3b7cd3 | 15992 | s,@EGREP@,$EGREP,;t t |
ba479fd2 NN |
15993 | s,@strict1_warn@,$strict1_warn,;t t |
15994 | s,@warn_cflags@,$warn_cflags,;t t | |
15995 | s,@WERROR@,$WERROR,;t t | |
15996 | s,@nocommon_flag@,$nocommon_flag,;t t | |
13f05fd0 | 15997 | s,@TREEBROWSER@,$TREEBROWSER,;t t |
ba479fd2 NN |
15998 | s,@valgrind_path@,$valgrind_path,;t t |
15999 | s,@valgrind_path_defines@,$valgrind_path_defines,;t t | |
16000 | s,@valgrind_command@,$valgrind_command,;t t | |
16001 | s,@coverage_flags@,$coverage_flags,;t t | |
16002 | s,@enable_multilib@,$enable_multilib,;t t | |
16003 | s,@enable_shared@,$enable_shared,;t t | |
16004 | s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t | |
16005 | s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t | |
16006 | s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t | |
16007 | s,@onestep@,$onestep,;t t | |
16008 | s,@SET_MAKE@,$SET_MAKE,;t t | |
16009 | s,@AWK@,$AWK,;t t | |
ba479fd2 | 16010 | s,@LN_S@,$LN_S,;t t |
41e622a8 | 16011 | s,@LN@,$LN,;t t |
ba479fd2 NN |
16012 | s,@RANLIB@,$RANLIB,;t t |
16013 | s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | |
343a6100 | 16014 | s,@ranlib_flags@,$ranlib_flags,;t t |
ba479fd2 NN |
16015 | s,@INSTALL@,$INSTALL,;t t |
16016 | s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t | |
16017 | s,@INSTALL_DATA@,$INSTALL_DATA,;t t | |
16018 | s,@make_compare_target@,$make_compare_target,;t t | |
16019 | s,@have_mktemp_command@,$have_mktemp_command,;t t | |
16020 | s,@MAKEINFO@,$MAKEINFO,;t t | |
16021 | s,@BUILD_INFO@,$BUILD_INFO,;t t | |
16022 | s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t | |
16023 | s,@FLEX@,$FLEX,;t t | |
16024 | s,@BISON@,$BISON,;t t | |
f6a874ac JW |
16025 | s,@NM@,$NM,;t t |
16026 | s,@AR@,$AR,;t t | |
ba479fd2 NN |
16027 | s,@stage1_cflags@,$stage1_cflags,;t t |
16028 | s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t | |
16029 | s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t | |
16030 | s,@LDEXP_LIB@,$LDEXP_LIB,;t t | |
16031 | s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t | |
16032 | s,@LIBICONV@,$LIBICONV,;t t | |
dfb77e37 | 16033 | s,@LTLIBICONV@,$LTLIBICONV,;t t |
ba479fd2 NN |
16034 | s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t |
16035 | s,@manext@,$manext,;t t | |
16036 | s,@objext@,$objext,;t t | |
8bb915b6 | 16037 | s,@gthread_flags@,$gthread_flags,;t t |
ba479fd2 | 16038 | s,@extra_modes_file@,$extra_modes_file,;t t |
75685792 | 16039 | s,@extra_opt_files@,$extra_opt_files,;t t |
ba479fd2 NN |
16040 | s,@PACKAGE@,$PACKAGE,;t t |
16041 | s,@VERSION@,$VERSION,;t t | |
16042 | s,@USE_NLS@,$USE_NLS,;t t | |
16043 | s,@LIBINTL@,$LIBINTL,;t t | |
16044 | s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t | |
16045 | s,@INCINTL@,$INCINTL,;t t | |
16046 | s,@XGETTEXT@,$XGETTEXT,;t t | |
16047 | s,@GMSGFMT@,$GMSGFMT,;t t | |
16048 | s,@POSUB@,$POSUB,;t t | |
16049 | s,@CATALOGS@,$CATALOGS,;t t | |
5395b47b | 16050 | s,@host_cc_for_libada@,$host_cc_for_libada,;t t |
ba479fd2 NN |
16051 | s,@CROSS@,$CROSS,;t t |
16052 | s,@ALL@,$ALL,;t t | |
16053 | s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t | |
16054 | s,@inhibit_libc@,$inhibit_libc,;t t | |
ba479fd2 NN |
16055 | s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t |
16056 | s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t | |
16057 | s,@STMP_FIXINC@,$STMP_FIXINC,;t t | |
16058 | s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t | |
c38f02df | 16059 | s,@collect2@,$collect2,;t t |
ba479fd2 | 16060 | s,@libgcc_visibility@,$libgcc_visibility,;t t |
ba479fd2 NN |
16061 | s,@GGC@,$GGC,;t t |
16062 | s,@zlibdir@,$zlibdir,;t t | |
16063 | s,@zlibinc@,$zlibinc,;t t | |
16064 | s,@MAINT@,$MAINT,;t t | |
16065 | s,@gcc_tooldir@,$gcc_tooldir,;t t | |
16066 | s,@dollar@,$dollar,;t t | |
16067 | s,@slibdir@,$slibdir,;t t | |
16068 | s,@objdir@,$objdir,;t t | |
16069 | s,@subdirs@,$subdirs,;t t | |
16070 | s,@srcdir@,$srcdir,;t t | |
ba479fd2 NN |
16071 | s,@all_boot_languages@,$all_boot_languages,;t t |
16072 | s,@all_compilers@,$all_compilers,;t t | |
16073 | s,@all_gtfiles@,$all_gtfiles,;t t | |
16074 | s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t | |
16075 | s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t | |
16076 | s,@all_lang_makefrags@,$all_lang_makefrags,;t t | |
16077 | s,@all_lang_makefiles@,$all_lang_makefiles,;t t | |
16078 | s,@all_languages@,$all_languages,;t t | |
16079 | s,@all_stagestuff@,$all_stagestuff,;t t | |
16080 | s,@build_exeext@,$build_exeext,;t t | |
16081 | s,@build_install_headers_dir@,$build_install_headers_dir,;t t | |
16082 | s,@build_xm_file_list@,$build_xm_file_list,;t t | |
16083 | s,@build_xm_include_list@,$build_xm_include_list,;t t | |
16084 | s,@build_xm_defines@,$build_xm_defines,;t t | |
16085 | s,@check_languages@,$check_languages,;t t | |
16086 | s,@cc_set_by_configure@,$cc_set_by_configure,;t t | |
16087 | s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t | |
16088 | s,@cpp_install_dir@,$cpp_install_dir,;t t | |
16089 | s,@xmake_file@,$xmake_file,;t t | |
16090 | s,@tmake_file@,$tmake_file,;t t | |
30500d84 | 16091 | s,@extra_gcc_objs@,$extra_gcc_objs,;t t |
ba479fd2 NN |
16092 | s,@extra_headers_list@,$extra_headers_list,;t t |
16093 | s,@extra_objs@,$extra_objs,;t t | |
16094 | s,@extra_parts@,$extra_parts,;t t | |
16095 | s,@extra_passes@,$extra_passes,;t t | |
16096 | s,@extra_programs@,$extra_programs,;t t | |
16097 | s,@float_h_file@,$float_h_file,;t t | |
16098 | s,@gcc_config_arguments@,$gcc_config_arguments,;t t | |
16099 | s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t | |
16100 | s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t | |
ba479fd2 | 16101 | s,@host_exeext@,$host_exeext,;t t |
ba479fd2 NN |
16102 | s,@host_xm_file_list@,$host_xm_file_list,;t t |
16103 | s,@host_xm_include_list@,$host_xm_include_list,;t t | |
16104 | s,@host_xm_defines@,$host_xm_defines,;t t | |
16105 | s,@out_host_hook_obj@,$out_host_hook_obj,;t t | |
16106 | s,@install@,$install,;t t | |
16107 | s,@lang_opt_files@,$lang_opt_files,;t t | |
16108 | s,@lang_specs_files@,$lang_specs_files,;t t | |
16109 | s,@lang_tree_files@,$lang_tree_files,;t t | |
16110 | s,@local_prefix@,$local_prefix,;t t | |
16111 | s,@md_file@,$md_file,;t t | |
16112 | s,@objc_boehm_gc@,$objc_boehm_gc,;t t | |
16113 | s,@out_file@,$out_file,;t t | |
16114 | s,@out_object_file@,$out_object_file,;t t | |
16115 | s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t | |
16116 | s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t | |
ba479fd2 NN |
16117 | s,@thread_file@,$thread_file,;t t |
16118 | s,@tm_file_list@,$tm_file_list,;t t | |
16119 | s,@tm_include_list@,$tm_include_list,;t t | |
16120 | s,@tm_defines@,$tm_defines,;t t | |
16121 | s,@tm_p_file_list@,$tm_p_file_list,;t t | |
16122 | s,@tm_p_include_list@,$tm_p_include_list,;t t | |
16123 | s,@xm_file_list@,$xm_file_list,;t t | |
16124 | s,@xm_include_list@,$xm_include_list,;t t | |
16125 | s,@xm_defines@,$xm_defines,;t t | |
ba479fd2 NN |
16126 | s,@c_target_objs@,$c_target_objs,;t t |
16127 | s,@cxx_target_objs@,$cxx_target_objs,;t t | |
16128 | s,@target_cpu_default@,$target_cpu_default,;t t | |
4c4a5bbc | 16129 | s,@set_gcc_lib_path@,$set_gcc_lib_path,;t t |
6de9cd9a DN |
16130 | s,@GMPLIBS@,$GMPLIBS,;t t |
16131 | s,@GMPINC@,$GMPINC,;t t | |
ba479fd2 NN |
16132 | s,@LIBOBJS@,$LIBOBJS,;t t |
16133 | s,@LTLIBOBJS@,$LTLIBOBJS,;t t | |
16134 | /@language_hooks@/r $language_hooks | |
16135 | s,@language_hooks@,,;t t | |
16136 | CEOF | |
16137 | ||
16138 | _ACEOF | |
16139 | ||
16140 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16141 | # Split the substitutions into bite-sized pieces for seds with | |
16142 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
16143 | ac_max_sed_lines=48 | |
16144 | ac_sed_frag=1 # Number of current file. | |
16145 | ac_beg=1 # First line for current file. | |
16146 | ac_end=$ac_max_sed_lines # Line after last line for current file. | |
16147 | ac_more_lines=: | |
16148 | ac_sed_cmds= | |
16149 | while $ac_more_lines; do | |
16150 | if test $ac_beg -gt 1; then | |
16151 | sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
16152 | else | |
16153 | sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
16154 | fi | |
16155 | if test ! -s $tmp/subs.frag; then | |
16156 | ac_more_lines=false | |
16157 | else | |
16158 | # The purpose of the label and of the branching condition is to | |
16159 | # speed up the sed processing (if there are no `@' at all, there | |
16160 | # is no need to browse any of the substitutions). | |
16161 | # These are the two extra sed commands mentioned above. | |
16162 | (echo ':t | |
16163 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed | |
16164 | if test -z "$ac_sed_cmds"; then | |
86da66b5 | 16165 | ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 | 16166 | else |
86da66b5 | 16167 | ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 NN |
16168 | fi |
16169 | ac_sed_frag=`expr $ac_sed_frag + 1` | |
16170 | ac_beg=$ac_end | |
16171 | ac_end=`expr $ac_end + $ac_max_sed_lines` | |
16172 | fi | |
16173 | done | |
16174 | if test -z "$ac_sed_cmds"; then | |
16175 | ac_sed_cmds=cat | |
63cf211a | 16176 | fi |
ba479fd2 | 16177 | fi # test -n "$CONFIG_FILES" |
cafe096b | 16178 | |
ba479fd2 NN |
16179 | _ACEOF |
16180 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16181 | for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue | |
16182 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
16183 | case $ac_file in | |
16184 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
16185 | cat >$tmp/stdin |
16186 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
16187 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 16188 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 16189 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 16190 | * ) ac_file_in=$ac_file.in ;; |
63cf211a | 16191 | esac |
cafe096b | 16192 | |
ba479fd2 NN |
16193 | # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. |
16194 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
16195 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
16196 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
16197 | X"$ac_file" : 'X\(//\)$' \| \ | |
16198 | X"$ac_file" : 'X\(/\)' \| \ | |
16199 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
16200 | echo X"$ac_file" | |
16201 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
16202 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
16203 | /^X\(\/\/\)$/{ s//\1/; q; } | |
16204 | /^X\(\/\).*/{ s//\1/; q; } | |
16205 | s/.*/./; q'` | |
16206 | { if $as_mkdir_p; then | |
16207 | mkdir -p "$ac_dir" | |
16208 | else | |
16209 | as_dir="$ac_dir" | |
16210 | as_dirs= | |
16211 | while test ! -d "$as_dir"; do | |
16212 | as_dirs="$as_dir $as_dirs" | |
16213 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
16214 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
16215 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
16216 | X"$as_dir" : 'X\(//\)$' \| \ | |
16217 | X"$as_dir" : 'X\(/\)' \| \ | |
16218 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
16219 | echo X"$as_dir" | |
16220 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
16221 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
16222 | /^X\(\/\/\)$/{ s//\1/; q; } | |
16223 | /^X\(\/\).*/{ s//\1/; q; } | |
16224 | s/.*/./; q'` | |
16225 | done | |
16226 | test ! -n "$as_dirs" || mkdir $as_dirs | |
16227 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
16228 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
16229 | { (exit 1); exit 1; }; }; } | |
6e3f3080 | 16230 | |
ba479fd2 NN |
16231 | ac_builddir=. |
16232 | ||
16233 | if test "$ac_dir" != .; then | |
16234 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
16235 | # A "../" for each directory in $ac_dir_suffix. | |
16236 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
16237 | else | |
16238 | ac_dir_suffix= ac_top_builddir= | |
16239 | fi | |
16240 | ||
16241 | case $srcdir in | |
16242 | .) # No --srcdir option. We are building in place. | |
16243 | ac_srcdir=. | |
16244 | if test -z "$ac_top_builddir"; then | |
16245 | ac_top_srcdir=. | |
16246 | else | |
16247 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
16248 | fi ;; | |
16249 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
16250 | ac_srcdir=$srcdir$ac_dir_suffix; | |
16251 | ac_top_srcdir=$srcdir ;; | |
16252 | *) # Relative path. | |
16253 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
16254 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
16255 | esac | |
8ab705be KC |
16256 | |
16257 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
16258 | # the directories may not exist. | |
16259 | case `pwd` in | |
16260 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 16261 | *) |
8ab705be KC |
16262 | case "$ac_dir" in |
16263 | .) ac_abs_builddir=`pwd`;; | |
16264 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
16265 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
16266 | esac;; |
16267 | esac | |
8ab705be | 16268 | case $ac_abs_builddir in |
86da66b5 HPN |
16269 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
16270 | *) | |
16271 | case ${ac_top_builddir}. in | |
8ab705be | 16272 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 16273 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 16274 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
16275 | esac;; |
16276 | esac | |
8ab705be | 16277 | case $ac_abs_builddir in |
86da66b5 HPN |
16278 | .) ac_abs_srcdir=$ac_srcdir;; |
16279 | *) | |
16280 | case $ac_srcdir in | |
8ab705be | 16281 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 16282 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 16283 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
16284 | esac;; |
16285 | esac | |
8ab705be | 16286 | case $ac_abs_builddir in |
86da66b5 HPN |
16287 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
16288 | *) | |
16289 | case $ac_top_srcdir in | |
8ab705be | 16290 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 16291 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 16292 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
16293 | esac;; |
16294 | esac | |
ba479fd2 NN |
16295 | |
16296 | ||
16297 | ||
ba479fd2 NN |
16298 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
16299 | # use $as_me), people would be surprised to read: | |
16300 | # /* config.h. Generated by config.status. */ | |
16301 | if test x"$ac_file" = x-; then | |
16302 | configure_input= | |
16303 | else | |
16304 | configure_input="$ac_file. " | |
16305 | fi | |
16306 | configure_input=$configure_input"Generated from `echo $ac_file_in | | |
86da66b5 | 16307 | sed 's,.*/,,'` by configure." |
ba479fd2 NN |
16308 | |
16309 | # First look for the input files in the build tree, otherwise in the | |
16310 | # src tree. | |
16311 | ac_file_inputs=`IFS=: | |
16312 | for f in $ac_file_in; do | |
16313 | case $f in | |
16314 | -) echo $tmp/stdin ;; | |
16315 | [\\/$]*) | |
86da66b5 HPN |
16316 | # Absolute (can't be DOS-style, as IFS=:) |
16317 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
16318 | echo "$as_me: error: cannot find input file: $f" >&2;} |
16319 | { (exit 1); exit 1; }; } | |
86da66b5 | 16320 | echo "$f";; |
ba479fd2 | 16321 | *) # Relative |
86da66b5 HPN |
16322 | if test -f "$f"; then |
16323 | # Build tree | |
16324 | echo "$f" | |
16325 | elif test -f "$srcdir/$f"; then | |
16326 | # Source tree | |
16327 | echo "$srcdir/$f" | |
16328 | else | |
16329 | # /dev/null tree | |
16330 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
16331 | echo "$as_me: error: cannot find input file: $f" >&2;} |
16332 | { (exit 1); exit 1; }; } | |
86da66b5 | 16333 | fi;; |
ba479fd2 NN |
16334 | esac |
16335 | done` || { (exit 1); exit 1; } | |
b095fe2c DJ |
16336 | |
16337 | if test x"$ac_file" != x-; then | |
16338 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
16339 | echo "$as_me: creating $ac_file" >&6;} | |
16340 | rm -f "$ac_file" | |
16341 | fi | |
ba479fd2 NN |
16342 | _ACEOF |
16343 | cat >>$CONFIG_STATUS <<_ACEOF | |
16344 | sed "$ac_vpsub | |
16345 | $extrasub | |
16346 | _ACEOF | |
16347 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16348 | :t | |
16349 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
16350 | s,@configure_input@,$configure_input,;t t | |
16351 | s,@srcdir@,$ac_srcdir,;t t | |
16352 | s,@abs_srcdir@,$ac_abs_srcdir,;t t | |
16353 | s,@top_srcdir@,$ac_top_srcdir,;t t | |
16354 | s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t | |
16355 | s,@builddir@,$ac_builddir,;t t | |
16356 | s,@abs_builddir@,$ac_abs_builddir,;t t | |
16357 | s,@top_builddir@,$ac_top_builddir,;t t | |
16358 | s,@abs_top_builddir@,$ac_abs_top_builddir,;t t | |
16359 | " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out | |
16360 | rm -f $tmp/stdin | |
16361 | if test x"$ac_file" != x-; then | |
16362 | mv $tmp/out $ac_file | |
16363 | else | |
16364 | cat $tmp/out | |
16365 | rm -f $tmp/out | |
16366 | fi | |
16367 | ||
16368 | done | |
16369 | _ACEOF | |
16370 | cat >>$CONFIG_STATUS <<\_ACEOF | |
6e3f3080 | 16371 | |
ba479fd2 NN |
16372 | # |
16373 | # CONFIG_HEADER section. | |
16374 | # | |
861bb6c1 JL |
16375 | |
16376 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
16377 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
16378 | # | |
16379 | # ac_d sets the value in "#define NAME VALUE" lines. | |
86da66b5 HPN |
16380 | ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
16381 | ac_dB='[ ].*$,\1#\2' | |
ba479fd2 NN |
16382 | ac_dC=' ' |
16383 | ac_dD=',;t' | |
16384 | # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
86da66b5 | 16385 | ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
ba479fd2 | 16386 | ac_uB='$,\1#\2define\3' |
861bb6c1 | 16387 | ac_uC=' ' |
ba479fd2 NN |
16388 | ac_uD=',;t' |
16389 | ||
16390 | for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue | |
861bb6c1 | 16391 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
ba479fd2 NN |
16392 | case $ac_file in |
16393 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
16394 | cat >$tmp/stdin |
16395 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
16396 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 16397 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 16398 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 16399 | * ) ac_file_in=$ac_file.in ;; |
861bb6c1 JL |
16400 | esac |
16401 | ||
ba479fd2 NN |
16402 | test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 |
16403 | echo "$as_me: creating $ac_file" >&6;} | |
16404 | ||
16405 | # First look for the input files in the build tree, otherwise in the | |
16406 | # src tree. | |
16407 | ac_file_inputs=`IFS=: | |
16408 | for f in $ac_file_in; do | |
16409 | case $f in | |
16410 | -) echo $tmp/stdin ;; | |
16411 | [\\/$]*) | |
86da66b5 HPN |
16412 | # Absolute (can't be DOS-style, as IFS=:) |
16413 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
16414 | echo "$as_me: error: cannot find input file: $f" >&2;} |
16415 | { (exit 1); exit 1; }; } | |
86da66b5 HPN |
16416 | # Do quote $f, to prevent DOS paths from being IFS'd. |
16417 | echo "$f";; | |
ba479fd2 | 16418 | *) # Relative |
86da66b5 HPN |
16419 | if test -f "$f"; then |
16420 | # Build tree | |
16421 | echo "$f" | |
16422 | elif test -f "$srcdir/$f"; then | |
16423 | # Source tree | |
16424 | echo "$srcdir/$f" | |
16425 | else | |
16426 | # /dev/null tree | |
16427 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
16428 | echo "$as_me: error: cannot find input file: $f" >&2;} |
16429 | { (exit 1); exit 1; }; } | |
86da66b5 | 16430 | fi;; |
ba479fd2 NN |
16431 | esac |
16432 | done` || { (exit 1); exit 1; } | |
16433 | # Remove the trailing spaces. | |
86da66b5 | 16434 | sed 's/[ ]*$//' $ac_file_inputs >$tmp/in |
ba479fd2 NN |
16435 | |
16436 | _ACEOF | |
16437 | ||
16438 | # Transform confdefs.h into two sed scripts, `conftest.defines' and | |
16439 | # `conftest.undefs', that substitutes the proper values into | |
16440 | # config.h.in to produce config.h. The first handles `#define' | |
16441 | # templates, and the second `#undef' templates. | |
16442 | # And first: Protect against being on the right side of a sed subst in | |
16443 | # config.status. Protect against being in an unquoted here document | |
16444 | # in config.status. | |
16445 | rm -f conftest.defines conftest.undefs | |
16446 | # Using a here document instead of a string reduces the quoting nightmare. | |
16447 | # Putting comments in sed scripts is not portable. | |
16448 | # | |
16449 | # `end' is used to avoid that the second main sed command (meant for | |
16450 | # 0-ary CPP macros) applies to n-ary macro definitions. | |
16451 | # See the Autoconf documentation for `clear'. | |
16452 | cat >confdef2sed.sed <<\_ACEOF | |
16453 | s/[\\&,]/\\&/g | |
16454 | s,[\\$`],\\&,g | |
16455 | t clear | |
16456 | : clear | |
86da66b5 | 16457 | s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp |
ba479fd2 | 16458 | t end |
86da66b5 | 16459 | s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp |
ba479fd2 NN |
16460 | : end |
16461 | _ACEOF | |
16462 | # If some macros were called several times there might be several times | |
16463 | # the same #defines, which is useless. Nevertheless, we may not want to | |
16464 | # sort them, since we want the *last* AC-DEFINE to be honored. | |
16465 | uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines | |
16466 | sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs | |
16467 | rm -f confdef2sed.sed | |
861bb6c1 JL |
16468 | |
16469 | # This sed command replaces #undef with comments. This is necessary, for | |
16470 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
16471 | # on some systems where configure will not decide to define it. | |
ba479fd2 | 16472 | cat >>conftest.undefs <<\_ACEOF |
86da66b5 | 16473 | s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, |
ba479fd2 NN |
16474 | _ACEOF |
16475 | ||
16476 | # Break up conftest.defines because some shells have a limit on the size | |
16477 | # of here documents, and old seds have small limits too (100 cmds). | |
16478 | echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS | |
86da66b5 | 16479 | echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS |
ba479fd2 NN |
16480 | echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS |
16481 | echo ' :' >>$CONFIG_STATUS | |
16482 | rm -f conftest.tail | |
16483 | while grep . conftest.defines >/dev/null | |
16484 | do | |
16485 | # Write a limited-size here document to $tmp/defines.sed. | |
16486 | echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS | |
16487 | # Speed up: don't consider the non `#define' lines. | |
86da66b5 | 16488 | echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
16489 | # Work around the forget-to-reset-the-flag bug. |
16490 | echo 't clr' >>$CONFIG_STATUS | |
16491 | echo ': clr' >>$CONFIG_STATUS | |
16492 | sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS | |
16493 | echo 'CEOF | |
16494 | sed -f $tmp/defines.sed $tmp/in >$tmp/out | |
16495 | rm -f $tmp/in | |
16496 | mv $tmp/out $tmp/in | |
16497 | ' >>$CONFIG_STATUS | |
16498 | sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail | |
16499 | rm -f conftest.defines | |
16500 | mv conftest.tail conftest.defines | |
16501 | done | |
16502 | rm -f conftest.defines | |
16503 | echo ' fi # grep' >>$CONFIG_STATUS | |
16504 | echo >>$CONFIG_STATUS | |
861bb6c1 | 16505 | |
ba479fd2 NN |
16506 | # Break up conftest.undefs because some shells have a limit on the size |
16507 | # of here documents, and old seds have small limits too (100 cmds). | |
16508 | echo ' # Handle all the #undef templates' >>$CONFIG_STATUS | |
861bb6c1 | 16509 | rm -f conftest.tail |
ba479fd2 | 16510 | while grep . conftest.undefs >/dev/null |
861bb6c1 | 16511 | do |
ba479fd2 NN |
16512 | # Write a limited-size here document to $tmp/undefs.sed. |
16513 | echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS | |
16514 | # Speed up: don't consider the non `#undef' | |
86da66b5 | 16515 | echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
16516 | # Work around the forget-to-reset-the-flag bug. |
16517 | echo 't clr' >>$CONFIG_STATUS | |
16518 | echo ': clr' >>$CONFIG_STATUS | |
16519 | sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS | |
861bb6c1 | 16520 | echo 'CEOF |
ba479fd2 NN |
16521 | sed -f $tmp/undefs.sed $tmp/in >$tmp/out |
16522 | rm -f $tmp/in | |
16523 | mv $tmp/out $tmp/in | |
16524 | ' >>$CONFIG_STATUS | |
16525 | sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail | |
16526 | rm -f conftest.undefs | |
16527 | mv conftest.tail conftest.undefs | |
861bb6c1 | 16528 | done |
ba479fd2 NN |
16529 | rm -f conftest.undefs |
16530 | ||
16531 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16532 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
16533 | # use $as_me), people would be surprised to read: | |
16534 | # /* config.h. Generated by config.status. */ | |
16535 | if test x"$ac_file" = x-; then | |
16536 | echo "/* Generated by configure. */" >$tmp/config.h | |
6e3f3080 | 16537 | else |
ba479fd2 | 16538 | echo "/* $ac_file. Generated by configure. */" >$tmp/config.h |
cafe096b | 16539 | fi |
ba479fd2 NN |
16540 | cat $tmp/in >>$tmp/config.h |
16541 | rm -f $tmp/in | |
16542 | if test x"$ac_file" != x-; then | |
16543 | if diff $ac_file $tmp/config.h >/dev/null 2>&1; then | |
16544 | { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 | |
16545 | echo "$as_me: $ac_file is unchanged" >&6;} | |
16546 | else | |
16547 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
16548 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
16549 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
16550 | X"$ac_file" : 'X\(//\)$' \| \ | |
16551 | X"$ac_file" : 'X\(/\)' \| \ | |
16552 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
16553 | echo X"$ac_file" | |
16554 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
16555 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
16556 | /^X\(\/\/\)$/{ s//\1/; q; } | |
16557 | /^X\(\/\).*/{ s//\1/; q; } | |
16558 | s/.*/./; q'` | |
16559 | { if $as_mkdir_p; then | |
16560 | mkdir -p "$ac_dir" | |
16561 | else | |
16562 | as_dir="$ac_dir" | |
16563 | as_dirs= | |
16564 | while test ! -d "$as_dir"; do | |
16565 | as_dirs="$as_dir $as_dirs" | |
16566 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
16567 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
16568 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
16569 | X"$as_dir" : 'X\(//\)$' \| \ | |
16570 | X"$as_dir" : 'X\(/\)' \| \ | |
16571 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
16572 | echo X"$as_dir" | |
16573 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
16574 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
16575 | /^X\(\/\/\)$/{ s//\1/; q; } | |
16576 | /^X\(\/\).*/{ s//\1/; q; } | |
16577 | s/.*/./; q'` | |
16578 | done | |
16579 | test ! -n "$as_dirs" || mkdir $as_dirs | |
16580 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
16581 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
16582 | { (exit 1); exit 1; }; }; } | |
63cf211a | 16583 | |
ba479fd2 NN |
16584 | rm -f $ac_file |
16585 | mv $tmp/config.h $ac_file | |
16586 | fi | |
16587 | else | |
16588 | cat $tmp/config.h | |
16589 | rm -f $tmp/config.h | |
16590 | fi | |
16591 | done | |
16592 | _ACEOF | |
16593 | cat >>$CONFIG_STATUS <<\_ACEOF | |
861bb6c1 | 16594 | |
ba479fd2 NN |
16595 | # |
16596 | # CONFIG_COMMANDS section. | |
16597 | # | |
16598 | for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue | |
16599 | ac_dest=`echo "$ac_file" | sed 's,:.*,,'` | |
16600 | ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
16601 | ac_dir=`(dirname "$ac_dest") 2>/dev/null || | |
16602 | $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
16603 | X"$ac_dest" : 'X\(//\)[^/]' \| \ |
16604 | X"$ac_dest" : 'X\(//\)$' \| \ | |
16605 | X"$ac_dest" : 'X\(/\)' \| \ | |
16606 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
16607 | echo X"$ac_dest" | |
16608 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
16609 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
16610 | /^X\(\/\/\)$/{ s//\1/; q; } | |
16611 | /^X\(\/\).*/{ s//\1/; q; } | |
16612 | s/.*/./; q'` | |
86da66b5 HPN |
16613 | { if $as_mkdir_p; then |
16614 | mkdir -p "$ac_dir" | |
16615 | else | |
16616 | as_dir="$ac_dir" | |
16617 | as_dirs= | |
16618 | while test ! -d "$as_dir"; do | |
16619 | as_dirs="$as_dir $as_dirs" | |
16620 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
16621 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
16622 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
16623 | X"$as_dir" : 'X\(//\)$' \| \ | |
16624 | X"$as_dir" : 'X\(/\)' \| \ | |
16625 | . : '\(.\)' 2>/dev/null || | |
16626 | echo X"$as_dir" | | |
16627 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
16628 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
16629 | /^X\(\/\/\)$/{ s//\1/; q; } | |
16630 | /^X\(\/\).*/{ s//\1/; q; } | |
16631 | s/.*/./; q'` | |
16632 | done | |
16633 | test ! -n "$as_dirs" || mkdir $as_dirs | |
16634 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
16635 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
16636 | { (exit 1); exit 1; }; }; } | |
16637 | ||
ba479fd2 NN |
16638 | ac_builddir=. |
16639 | ||
16640 | if test "$ac_dir" != .; then | |
16641 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
16642 | # A "../" for each directory in $ac_dir_suffix. | |
16643 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
16644 | else | |
16645 | ac_dir_suffix= ac_top_builddir= | |
16646 | fi | |
16647 | ||
16648 | case $srcdir in | |
16649 | .) # No --srcdir option. We are building in place. | |
16650 | ac_srcdir=. | |
16651 | if test -z "$ac_top_builddir"; then | |
16652 | ac_top_srcdir=. | |
16653 | else | |
16654 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
16655 | fi ;; | |
16656 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
16657 | ac_srcdir=$srcdir$ac_dir_suffix; | |
16658 | ac_top_srcdir=$srcdir ;; | |
16659 | *) # Relative path. | |
16660 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
16661 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
16662 | esac | |
8ab705be KC |
16663 | |
16664 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
16665 | # the directories may not exist. | |
16666 | case `pwd` in | |
16667 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 16668 | *) |
8ab705be KC |
16669 | case "$ac_dir" in |
16670 | .) ac_abs_builddir=`pwd`;; | |
16671 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
16672 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
16673 | esac;; |
16674 | esac | |
8ab705be | 16675 | case $ac_abs_builddir in |
86da66b5 HPN |
16676 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
16677 | *) | |
16678 | case ${ac_top_builddir}. in | |
8ab705be | 16679 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 16680 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 16681 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
16682 | esac;; |
16683 | esac | |
8ab705be | 16684 | case $ac_abs_builddir in |
86da66b5 HPN |
16685 | .) ac_abs_srcdir=$ac_srcdir;; |
16686 | *) | |
16687 | case $ac_srcdir in | |
8ab705be | 16688 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 16689 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 16690 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
16691 | esac;; |
16692 | esac | |
8ab705be | 16693 | case $ac_abs_builddir in |
86da66b5 HPN |
16694 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
16695 | *) | |
16696 | case $ac_top_srcdir in | |
8ab705be | 16697 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 16698 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 16699 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
16700 | esac;; |
16701 | esac | |
ba479fd2 NN |
16702 | |
16703 | ||
16704 | { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 | |
16705 | echo "$as_me: executing $ac_dest commands" >&6;} | |
16706 | case $ac_dest in | |
16707 | default ) | |
f1faaabd NN |
16708 | case ${CONFIG_HEADERS} in |
16709 | *auto-host.h:config.in*) | |
16710 | echo > cstamp-h ;; | |
861bb6c1 | 16711 | esac |
2ed26f6b | 16712 | # Make sure all the subdirs exist. |
3b620440 | 16713 | for d in $subdirs doc build |
2ed26f6b | 16714 | do |
2ed26f6b | 16715 | test -d $d || mkdir $d |
2ed26f6b | 16716 | done |
93cf819d BK |
16717 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
16718 | # bootstrapping and the installation procedure can still use | |
16719 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
16720 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
16721 | # This is virtually a duplicate of what happens in configure.lang; we do | |
16722 | # an extra check to make sure this only happens if ln -s can be used. | |
35f06ae4 PB |
16723 | case "$LN_S" in |
16724 | *-s*) | |
16725 | for d in ${subdirs} ; do | |
1e6347d8 | 16726 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e | 16727 | cd $d |
6a1b7268 | 16728 | for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include |
4e8a434e BK |
16729 | do |
16730 | rm -f $t | |
35f06ae4 | 16731 | $LN_S ../$t $t 2>/dev/null |
4e8a434e BK |
16732 | done |
16733 | cd $STARTDIR | |
35f06ae4 PB |
16734 | done |
16735 | ;; | |
16736 | esac | |
ba479fd2 NN |
16737 | ;; |
16738 | esac | |
16739 | done | |
16740 | _ACEOF | |
cafe096b | 16741 | |
ba479fd2 NN |
16742 | cat >>$CONFIG_STATUS <<\_ACEOF |
16743 | ||
16744 | { (exit 0); exit 0; } | |
16745 | _ACEOF | |
861bb6c1 | 16746 | chmod +x $CONFIG_STATUS |
ba479fd2 NN |
16747 | ac_clean_files=$ac_clean_files_save |
16748 | ||
16749 | ||
16750 | # configure is writing to config.log, and then calls config.status. | |
16751 | # config.status does its own redirection, appending to config.log. | |
16752 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
16753 | # by configure, so config.status won't be able to write to it; its | |
16754 | # output is simply discarded. So we exec the FD to /dev/null, | |
16755 | # effectively closing config.log, so it can be properly (re)opened and | |
16756 | # appended to by config.status. When coming back to configure, we | |
16757 | # need to make the FD available again. | |
16758 | if test "$no_create" != yes; then | |
16759 | ac_cs_success=: | |
16760 | ac_config_status_args= | |
16761 | test "$silent" = yes && | |
16762 | ac_config_status_args="$ac_config_status_args --quiet" | |
16763 | exec 5>/dev/null | |
16764 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
16765 | exec 5>>config.log | |
16766 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
16767 | # would make configure fail if this is the last instruction. | |
16768 | $ac_cs_success || { (exit 1); exit 1; } | |
16769 | fi | |
861bb6c1 | 16770 |