]>
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 | ||
e8b05380 | 312 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' |
ba479fd2 | 313 | ac_subst_files='language_hooks' |
861bb6c1 JL |
314 | |
315 | # Initialize some variables set by options. | |
ba479fd2 NN |
316 | ac_init_help= |
317 | ac_init_version=false | |
861bb6c1 JL |
318 | # The variables have the same names as the options, with |
319 | # dashes changed to underlines. | |
ba479fd2 | 320 | cache_file=/dev/null |
861bb6c1 | 321 | exec_prefix=NONE |
861bb6c1 | 322 | no_create= |
861bb6c1 JL |
323 | no_recursion= |
324 | prefix=NONE | |
325 | program_prefix=NONE | |
326 | program_suffix=NONE | |
327 | program_transform_name=s,x,x, | |
328 | silent= | |
329 | site= | |
330 | srcdir= | |
861bb6c1 JL |
331 | verbose= |
332 | x_includes=NONE | |
333 | x_libraries=NONE | |
ba479fd2 NN |
334 | |
335 | # Installation directory options. | |
336 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
337 | # and all the variables that are supposed to be based on exec_prefix | |
338 | # by default will actually change. | |
339 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
861bb6c1 JL |
340 | bindir='${exec_prefix}/bin' |
341 | sbindir='${exec_prefix}/sbin' | |
342 | libexecdir='${exec_prefix}/libexec' | |
343 | datadir='${prefix}/share' | |
344 | sysconfdir='${prefix}/etc' | |
345 | sharedstatedir='${prefix}/com' | |
346 | localstatedir='${prefix}/var' | |
347 | libdir='${exec_prefix}/lib' | |
348 | includedir='${prefix}/include' | |
349 | oldincludedir='/usr/include' | |
350 | infodir='${prefix}/info' | |
351 | mandir='${prefix}/man' | |
352 | ||
861bb6c1 JL |
353 | ac_prev= |
354 | for ac_option | |
355 | do | |
861bb6c1 JL |
356 | # If the previous option needs an argument, assign it. |
357 | if test -n "$ac_prev"; then | |
358 | eval "$ac_prev=\$ac_option" | |
359 | ac_prev= | |
360 | continue | |
361 | fi | |
362 | ||
ba479fd2 | 363 | ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` |
861bb6c1 JL |
364 | |
365 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
366 | ||
ba479fd2 | 367 | case $ac_option in |
861bb6c1 JL |
368 | |
369 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
370 | ac_prev=bindir ;; | |
371 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
ba479fd2 | 372 | bindir=$ac_optarg ;; |
861bb6c1 JL |
373 | |
374 | -build | --build | --buil | --bui | --bu) | |
ba479fd2 | 375 | ac_prev=build_alias ;; |
861bb6c1 | 376 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
ba479fd2 | 377 | build_alias=$ac_optarg ;; |
861bb6c1 JL |
378 | |
379 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
380 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
381 | ac_prev=cache_file ;; | |
382 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
383 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
ba479fd2 NN |
384 | cache_file=$ac_optarg ;; |
385 | ||
386 | --config-cache | -C) | |
387 | cache_file=config.cache ;; | |
861bb6c1 JL |
388 | |
389 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
390 | ac_prev=datadir ;; | |
391 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
392 | | --da=*) | |
ba479fd2 | 393 | datadir=$ac_optarg ;; |
861bb6c1 JL |
394 | |
395 | -disable-* | --disable-*) | |
ba479fd2 | 396 | ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
861bb6c1 | 397 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
398 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && |
399 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 | |
400 | { (exit 1); exit 1; }; } | |
401 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` | |
402 | eval "enable_$ac_feature=no" ;; | |
861bb6c1 JL |
403 | |
404 | -enable-* | --enable-*) | |
ba479fd2 | 405 | ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
861bb6c1 | 406 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
407 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && |
408 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 | |
409 | { (exit 1); exit 1; }; } | |
410 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` | |
411 | case $ac_option in | |
412 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | |
861bb6c1 JL |
413 | *) ac_optarg=yes ;; |
414 | esac | |
ba479fd2 | 415 | eval "enable_$ac_feature='$ac_optarg'" ;; |
861bb6c1 JL |
416 | |
417 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
418 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
419 | | --exec | --exe | --ex) | |
420 | ac_prev=exec_prefix ;; | |
421 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
422 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
423 | | --exec=* | --exe=* | --ex=*) | |
ba479fd2 | 424 | exec_prefix=$ac_optarg ;; |
861bb6c1 JL |
425 | |
426 | -gas | --gas | --ga | --g) | |
427 | # Obsolete; use --with-gas. | |
428 | with_gas=yes ;; | |
429 | ||
ba479fd2 NN |
430 | -help | --help | --hel | --he | -h) |
431 | ac_init_help=long ;; | |
432 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
433 | ac_init_help=recursive ;; | |
434 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
435 | ac_init_help=short ;; | |
861bb6c1 JL |
436 | |
437 | -host | --host | --hos | --ho) | |
ba479fd2 | 438 | ac_prev=host_alias ;; |
861bb6c1 | 439 | -host=* | --host=* | --hos=* | --ho=*) |
ba479fd2 | 440 | host_alias=$ac_optarg ;; |
861bb6c1 JL |
441 | |
442 | -includedir | --includedir | --includedi | --included | --include \ | |
443 | | --includ | --inclu | --incl | --inc) | |
444 | ac_prev=includedir ;; | |
445 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
446 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
ba479fd2 | 447 | includedir=$ac_optarg ;; |
861bb6c1 JL |
448 | |
449 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
450 | ac_prev=infodir ;; | |
451 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
ba479fd2 | 452 | infodir=$ac_optarg ;; |
861bb6c1 JL |
453 | |
454 | -libdir | --libdir | --libdi | --libd) | |
455 | ac_prev=libdir ;; | |
456 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
ba479fd2 | 457 | libdir=$ac_optarg ;; |
861bb6c1 JL |
458 | |
459 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
460 | | --libexe | --libex | --libe) | |
461 | ac_prev=libexecdir ;; | |
462 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
463 | | --libexe=* | --libex=* | --libe=*) | |
ba479fd2 | 464 | libexecdir=$ac_optarg ;; |
861bb6c1 JL |
465 | |
466 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
467 | | --localstate | --localstat | --localsta | --localst \ | |
468 | | --locals | --local | --loca | --loc | --lo) | |
469 | ac_prev=localstatedir ;; | |
470 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
471 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
472 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
ba479fd2 | 473 | localstatedir=$ac_optarg ;; |
861bb6c1 JL |
474 | |
475 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
476 | ac_prev=mandir ;; | |
477 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
ba479fd2 | 478 | mandir=$ac_optarg ;; |
861bb6c1 JL |
479 | |
480 | -nfp | --nfp | --nf) | |
481 | # Obsolete; use --without-fp. | |
482 | with_fp=no ;; | |
483 | ||
484 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
ba479fd2 | 485 | | --no-cr | --no-c | -n) |
861bb6c1 JL |
486 | no_create=yes ;; |
487 | ||
488 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
489 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
490 | no_recursion=yes ;; | |
491 | ||
492 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
493 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
494 | | --oldin | --oldi | --old | --ol | --o) | |
495 | ac_prev=oldincludedir ;; | |
496 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
497 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
498 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
ba479fd2 | 499 | oldincludedir=$ac_optarg ;; |
861bb6c1 JL |
500 | |
501 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
502 | ac_prev=prefix ;; | |
503 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
ba479fd2 | 504 | prefix=$ac_optarg ;; |
861bb6c1 JL |
505 | |
506 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
507 | | --program-pre | --program-pr | --program-p) | |
508 | ac_prev=program_prefix ;; | |
509 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
510 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
ba479fd2 | 511 | program_prefix=$ac_optarg ;; |
861bb6c1 JL |
512 | |
513 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
514 | | --program-suf | --program-su | --program-s) | |
515 | ac_prev=program_suffix ;; | |
516 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
517 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
ba479fd2 | 518 | program_suffix=$ac_optarg ;; |
861bb6c1 JL |
519 | |
520 | -program-transform-name | --program-transform-name \ | |
521 | | --program-transform-nam | --program-transform-na \ | |
522 | | --program-transform-n | --program-transform- \ | |
523 | | --program-transform | --program-transfor \ | |
524 | | --program-transfo | --program-transf \ | |
525 | | --program-trans | --program-tran \ | |
526 | | --progr-tra | --program-tr | --program-t) | |
527 | ac_prev=program_transform_name ;; | |
528 | -program-transform-name=* | --program-transform-name=* \ | |
529 | | --program-transform-nam=* | --program-transform-na=* \ | |
530 | | --program-transform-n=* | --program-transform-=* \ | |
531 | | --program-transform=* | --program-transfor=* \ | |
532 | | --program-transfo=* | --program-transf=* \ | |
533 | | --program-trans=* | --program-tran=* \ | |
534 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
ba479fd2 | 535 | program_transform_name=$ac_optarg ;; |
861bb6c1 JL |
536 | |
537 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
538 | | -silent | --silent | --silen | --sile | --sil) | |
539 | silent=yes ;; | |
540 | ||
541 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
542 | ac_prev=sbindir ;; | |
543 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
544 | | --sbi=* | --sb=*) | |
ba479fd2 | 545 | sbindir=$ac_optarg ;; |
861bb6c1 JL |
546 | |
547 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
548 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
549 | | --sharedst | --shareds | --shared | --share | --shar \ | |
550 | | --sha | --sh) | |
551 | ac_prev=sharedstatedir ;; | |
552 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
553 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
554 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
555 | | --sha=* | --sh=*) | |
ba479fd2 | 556 | sharedstatedir=$ac_optarg ;; |
861bb6c1 JL |
557 | |
558 | -site | --site | --sit) | |
559 | ac_prev=site ;; | |
560 | -site=* | --site=* | --sit=*) | |
ba479fd2 | 561 | site=$ac_optarg ;; |
861bb6c1 JL |
562 | |
563 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
564 | ac_prev=srcdir ;; | |
565 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
ba479fd2 | 566 | srcdir=$ac_optarg ;; |
861bb6c1 JL |
567 | |
568 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
569 | | --syscon | --sysco | --sysc | --sys | --sy) | |
570 | ac_prev=sysconfdir ;; | |
571 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
572 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
ba479fd2 | 573 | sysconfdir=$ac_optarg ;; |
861bb6c1 JL |
574 | |
575 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
ba479fd2 | 576 | ac_prev=target_alias ;; |
861bb6c1 | 577 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
ba479fd2 | 578 | target_alias=$ac_optarg ;; |
861bb6c1 JL |
579 | |
580 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
581 | verbose=yes ;; | |
582 | ||
ba479fd2 NN |
583 | -version | --version | --versio | --versi | --vers | -V) |
584 | ac_init_version=: ;; | |
861bb6c1 JL |
585 | |
586 | -with-* | --with-*) | |
ba479fd2 | 587 | ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
861bb6c1 | 588 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
589 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && |
590 | { echo "$as_me: error: invalid package name: $ac_package" >&2 | |
591 | { (exit 1); exit 1; }; } | |
861bb6c1 | 592 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
ba479fd2 NN |
593 | case $ac_option in |
594 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | |
861bb6c1 JL |
595 | *) ac_optarg=yes ;; |
596 | esac | |
ba479fd2 | 597 | eval "with_$ac_package='$ac_optarg'" ;; |
861bb6c1 JL |
598 | |
599 | -without-* | --without-*) | |
ba479fd2 | 600 | ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
861bb6c1 | 601 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
602 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && |
603 | { echo "$as_me: error: invalid package name: $ac_package" >&2 | |
604 | { (exit 1); exit 1; }; } | |
605 | ac_package=`echo $ac_package | sed 's/-/_/g'` | |
606 | eval "with_$ac_package=no" ;; | |
861bb6c1 JL |
607 | |
608 | --x) | |
609 | # Obsolete; use --with-x. | |
610 | with_x=yes ;; | |
611 | ||
612 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
613 | | --x-incl | --x-inc | --x-in | --x-i) | |
614 | ac_prev=x_includes ;; | |
615 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
616 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
ba479fd2 | 617 | x_includes=$ac_optarg ;; |
861bb6c1 JL |
618 | |
619 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
620 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
621 | ac_prev=x_libraries ;; | |
622 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
623 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
ba479fd2 | 624 | x_libraries=$ac_optarg ;; |
861bb6c1 | 625 | |
ba479fd2 NN |
626 | -*) { echo "$as_me: error: unrecognized option: $ac_option |
627 | Try \`$0 --help' for more information." >&2 | |
628 | { (exit 1); exit 1; }; } | |
861bb6c1 JL |
629 | ;; |
630 | ||
ba479fd2 NN |
631 | *=*) |
632 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
633 | # Reject names that are not valid shell variable names. | |
634 | expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && | |
635 | { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 | |
636 | { (exit 1); exit 1; }; } | |
637 | ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` | |
638 | eval "$ac_envvar='$ac_optarg'" | |
639 | export $ac_envvar ;; | |
640 | ||
861bb6c1 | 641 | *) |
ba479fd2 NN |
642 | # FIXME: should be removed in autoconf 3.0. |
643 | echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
644 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
645 | echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
646 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} | |
861bb6c1 JL |
647 | ;; |
648 | ||
649 | esac | |
650 | done | |
651 | ||
652 | if test -n "$ac_prev"; then | |
ba479fd2 NN |
653 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
654 | { echo "$as_me: error: missing argument to $ac_option" >&2 | |
655 | { (exit 1); exit 1; }; } | |
63cf211a | 656 | fi |
63cf211a | 657 | |
ba479fd2 NN |
658 | # Be sure to have absolute paths. |
659 | for ac_var in exec_prefix prefix | |
660 | do | |
661 | eval ac_val=$`echo $ac_var` | |
662 | case $ac_val in | |
663 | [\\/$]* | ?:[\\/]* | NONE | '' ) ;; | |
664 | *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | |
665 | { (exit 1); exit 1; }; };; | |
666 | esac | |
667 | done | |
093e61a6 | 668 | |
ba479fd2 NN |
669 | # Be sure to have absolute paths. |
670 | for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ | |
86da66b5 | 671 | localstatedir libdir includedir oldincludedir infodir mandir |
861bb6c1 | 672 | do |
ba479fd2 NN |
673 | eval ac_val=$`echo $ac_var` |
674 | case $ac_val in | |
675 | [\\/$]* | ?:[\\/]* ) ;; | |
676 | *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | |
677 | { (exit 1); exit 1; }; };; | |
861bb6c1 JL |
678 | esac |
679 | done | |
680 | ||
ba479fd2 NN |
681 | # There might be people who depend on the old broken behavior: `$host' |
682 | # used to hold the argument of --host etc. | |
683 | # FIXME: To remove some day. | |
684 | build=$build_alias | |
685 | host=$host_alias | |
686 | target=$target_alias | |
687 | ||
688 | # FIXME: To remove some day. | |
689 | if test "x$host_alias" != x; then | |
690 | if test "x$build_alias" = x; then | |
691 | cross_compiling=maybe | |
692 | echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. | |
693 | If a cross compiler is detected then cross compile mode will be used." >&2 | |
694 | elif test "x$build_alias" != "x$host_alias"; then | |
695 | cross_compiling=yes | |
696 | fi | |
697 | fi | |
6e3f3080 | 698 | |
ba479fd2 NN |
699 | ac_tool_prefix= |
700 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
701 | ||
702 | test "$silent" = yes && exec 6>/dev/null | |
861bb6c1 | 703 | |
861bb6c1 JL |
704 | |
705 | # Find the source files, if location was not specified. | |
706 | if test -z "$srcdir"; then | |
707 | ac_srcdir_defaulted=yes | |
708 | # Try the directory containing this script, then its parent. | |
ba479fd2 NN |
709 | ac_confdir=`(dirname "$0") 2>/dev/null || |
710 | $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
711 | X"$0" : 'X\(//\)[^/]' \| \ |
712 | X"$0" : 'X\(//\)$' \| \ | |
713 | X"$0" : 'X\(/\)' \| \ | |
714 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
715 | echo X"$0" | |
716 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
717 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
718 | /^X\(\/\/\)$/{ s//\1/; q; } | |
719 | /^X\(\/\).*/{ s//\1/; q; } | |
720 | s/.*/./; q'` | |
861bb6c1 JL |
721 | srcdir=$ac_confdir |
722 | if test ! -r $srcdir/$ac_unique_file; then | |
723 | srcdir=.. | |
724 | fi | |
725 | else | |
726 | ac_srcdir_defaulted=no | |
727 | fi | |
728 | if test ! -r $srcdir/$ac_unique_file; then | |
729 | if test "$ac_srcdir_defaulted" = yes; then | |
ba479fd2 NN |
730 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 |
731 | { (exit 1); exit 1; }; } | |
63cf211a | 732 | else |
ba479fd2 NN |
733 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 |
734 | { (exit 1); exit 1; }; } | |
63cf211a NN |
735 | fi |
736 | fi | |
ba479fd2 NN |
737 | (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || |
738 | { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 | |
739 | { (exit 1); exit 1; }; } | |
740 | srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` | |
741 | ac_env_build_alias_set=${build_alias+set} | |
742 | ac_env_build_alias_value=$build_alias | |
743 | ac_cv_env_build_alias_set=${build_alias+set} | |
744 | ac_cv_env_build_alias_value=$build_alias | |
745 | ac_env_host_alias_set=${host_alias+set} | |
746 | ac_env_host_alias_value=$host_alias | |
747 | ac_cv_env_host_alias_set=${host_alias+set} | |
748 | ac_cv_env_host_alias_value=$host_alias | |
749 | ac_env_target_alias_set=${target_alias+set} | |
750 | ac_env_target_alias_value=$target_alias | |
751 | ac_cv_env_target_alias_set=${target_alias+set} | |
752 | ac_cv_env_target_alias_value=$target_alias | |
753 | ac_env_CC_set=${CC+set} | |
754 | ac_env_CC_value=$CC | |
755 | ac_cv_env_CC_set=${CC+set} | |
756 | ac_cv_env_CC_value=$CC | |
757 | ac_env_CFLAGS_set=${CFLAGS+set} | |
758 | ac_env_CFLAGS_value=$CFLAGS | |
759 | ac_cv_env_CFLAGS_set=${CFLAGS+set} | |
760 | ac_cv_env_CFLAGS_value=$CFLAGS | |
761 | ac_env_LDFLAGS_set=${LDFLAGS+set} | |
762 | ac_env_LDFLAGS_value=$LDFLAGS | |
763 | ac_cv_env_LDFLAGS_set=${LDFLAGS+set} | |
764 | ac_cv_env_LDFLAGS_value=$LDFLAGS | |
765 | ac_env_CPPFLAGS_set=${CPPFLAGS+set} | |
766 | ac_env_CPPFLAGS_value=$CPPFLAGS | |
767 | ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} | |
768 | ac_cv_env_CPPFLAGS_value=$CPPFLAGS | |
769 | ac_env_CPP_set=${CPP+set} | |
770 | ac_env_CPP_value=$CPP | |
771 | ac_cv_env_CPP_set=${CPP+set} | |
772 | ac_cv_env_CPP_value=$CPP | |
6de9cd9a DN |
773 | ac_env_GMPLIBS_set=${GMPLIBS+set} |
774 | ac_env_GMPLIBS_value=$GMPLIBS | |
775 | ac_cv_env_GMPLIBS_set=${GMPLIBS+set} | |
776 | ac_cv_env_GMPLIBS_value=$GMPLIBS | |
777 | ac_env_GMPINC_set=${GMPINC+set} | |
778 | ac_env_GMPINC_value=$GMPINC | |
779 | ac_cv_env_GMPINC_set=${GMPINC+set} | |
780 | ac_cv_env_GMPINC_value=$GMPINC | |
63cf211a | 781 | |
ba479fd2 NN |
782 | # |
783 | # Report the --help message. | |
784 | # | |
785 | if test "$ac_init_help" = "long"; then | |
786 | # Omit some internal or obsolete options to make the list less imposing. | |
787 | # This message is too long to be a string in the A/UX 3.1 sh. | |
788 | cat <<_ACEOF | |
789 | \`configure' configures this package to adapt to many kinds of systems. | |
861bb6c1 | 790 | |
ba479fd2 | 791 | Usage: $0 [OPTION]... [VAR=VALUE]... |
861bb6c1 | 792 | |
ba479fd2 NN |
793 | To assign environment variables (e.g., CC, CFLAGS...), specify them as |
794 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
861bb6c1 | 795 | |
ba479fd2 | 796 | Defaults for the options are specified in brackets. |
861bb6c1 | 797 | |
ba479fd2 NN |
798 | Configuration: |
799 | -h, --help display this help and exit | |
800 | --help=short display options specific to this package | |
801 | --help=recursive display the short help of all the included packages | |
802 | -V, --version display version information and exit | |
803 | -q, --quiet, --silent do not print \`checking...' messages | |
804 | --cache-file=FILE cache test results in FILE [disabled] | |
805 | -C, --config-cache alias for \`--cache-file=config.cache' | |
806 | -n, --no-create do not create output files | |
807 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
808 | ||
809 | _ACEOF | |
810 | ||
811 | cat <<_ACEOF | |
812 | Installation directories: | |
813 | --prefix=PREFIX install architecture-independent files in PREFIX | |
86da66b5 | 814 | [$ac_default_prefix] |
ba479fd2 | 815 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
86da66b5 | 816 | [PREFIX] |
861bb6c1 | 817 | |
ba479fd2 NN |
818 | By default, \`make install' will install all the files in |
819 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
820 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
821 | for instance \`--prefix=\$HOME'. | |
13c22933 | 822 | |
ba479fd2 | 823 | For better control, use the options below. |
13c22933 | 824 | |
ba479fd2 NN |
825 | Fine tuning of the installation directories: |
826 | --bindir=DIR user executables [EPREFIX/bin] | |
827 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
828 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
829 | --datadir=DIR read-only architecture-independent data [PREFIX/share] | |
830 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
831 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
832 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
833 | --libdir=DIR object code libraries [EPREFIX/lib] | |
834 | --includedir=DIR C header files [PREFIX/include] | |
835 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
836 | --infodir=DIR info documentation [PREFIX/info] | |
837 | --mandir=DIR man documentation [PREFIX/man] | |
838 | _ACEOF | |
13c22933 | 839 | |
ba479fd2 | 840 | cat <<\_ACEOF |
13c22933 | 841 | |
ba479fd2 NN |
842 | Program names: |
843 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
844 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
845 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
13c22933 | 846 | |
ba479fd2 NN |
847 | System types: |
848 | --build=BUILD configure for building on BUILD [guessed] | |
849 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
850 | --target=TARGET configure for building compilers for TARGET [HOST] | |
851 | _ACEOF | |
13c22933 JJ |
852 | fi |
853 | ||
ba479fd2 | 854 | if test -n "$ac_init_help"; then |
13c22933 | 855 | |
ba479fd2 | 856 | cat <<\_ACEOF |
13c22933 | 857 | |
ba479fd2 NN |
858 | Optional Features: |
859 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
860 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
03787dfd KC |
861 | --enable-generated-files-in-srcdir |
862 | put copies of generated files in source dir | |
863 | intended for creating source tarballs for users | |
864 | without texinfo bison or flex. | |
09a9c095 | 865 | --enable-werror-always enable -Werror always |
ba479fd2 NN |
866 | --enable-werror enable -Werror in bootstrap stage2 and later |
867 | --enable-checking=LIST | |
868 | enable expensive run-time checks. With LIST, | |
869 | enable only specific categories of checks. | |
cdce5c16 NS |
870 | Categories are: yes,no,all,none,release. |
871 | Flags are: assert,fold,gc,gcac,misc, | |
872 | rtlflag,rtl,runtime,tree,valgrind. | |
74ee1642 | 873 | --enable-mapped-location location_t is fileline integer cookie |
ba479fd2 | 874 | --enable-coverage=LEVEL |
fb38008e | 875 | enable compiler's code coverage collection. |
ba479fd2 NN |
876 | Use to measure compiler performance and locate |
877 | unused parts of the compiler. With LEVEL, specify | |
878 | optimization. Values are opt, noopt, | |
879 | default is noopt | |
880 | --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering | |
881 | --enable-multilib enable library support for multiple ABIs | |
882 | --enable-__cxa_atexit enable __cxa_atexit for C++ | |
486aa804 | 883 | --enable-decimal-float enable decimal float extension to C |
ba479fd2 NN |
884 | --enable-threads enable thread usage for target GCC |
885 | --enable-threads=LIB use LIB thread package for target GCC | |
8dea1cca DD |
886 | --enable-tls enable or disable generation of tls code |
887 | overriding the assembler check for tls support | |
ba479fd2 NN |
888 | --enable-objc-gc enable the use of Boehm's garbage collector with |
889 | the GNU Objective-C runtime | |
890 | --disable-shared don't provide a shared libgcc | |
891 | --enable-intermodule build the compiler in one step | |
f3c9f174 | 892 | --enable-languages=LIST specify which front-ends to build |
dfb77e37 | 893 | --disable-rpath do not hardcode runtime library paths |
ba479fd2 NN |
894 | --enable-initfini-array use .init_array/.fini_array sections |
895 | --enable-sjlj-exceptions | |
896 | arrange to use setjmp/longjmp exception handling | |
7f970b70 | 897 | --enable-secureplt enable -msecure-plt by default for PowerPC |
ba479fd2 NN |
898 | --disable-win32-registry |
899 | disable lookup of installation paths in the | |
900 | Registry on Windows hosts | |
901 | --enable-win32-registry enable registry lookup (default) | |
902 | --enable-win32-registry=KEY | |
903 | use KEY instead of GCC version as the last portion | |
904 | of the registry key | |
905 | --enable-maintainer-mode | |
906 | enable make rules and dependencies not useful | |
907 | (and sometimes confusing) to the casual installer | |
908 | --enable-version-specific-runtime-libs | |
909 | specify that runtime libraries should be | |
910 | installed in a compiler-specific directory | |
093e61a6 | 911 | |
ba479fd2 NN |
912 | Optional Packages: |
913 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
914 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
915 | --with-local-prefix=DIR specifies directory to put local include | |
916 | --with-gxx-include-dir=DIR | |
917 | specifies directory to put g++ header files | |
918 | --with-cpp-install-dir=DIR | |
919 | install the user visible C preprocessor in DIR | |
920 | (relative to PREFIX) as well as PREFIX/bin | |
921 | --with-gnu-ld arrange to work with GNU ld. | |
922 | --with-ld arrange to use the specified ld (full pathname) | |
d594623a | 923 | --with-demangler-in-ld try to use demangler in GNU ld. |
ba479fd2 NN |
924 | --with-gnu-as arrange to work with GNU as |
925 | --with-as arrange to use the specified as (full pathname) | |
926 | --with-stabs arrange to use stabs instead of host debug format | |
927 | --with-dwarf2 force the default debug format to be DWARF 2 | |
160633c6 MM |
928 | --with-build-sysroot=sysroot |
929 | use sysroot as the system root during the build | |
ba479fd2 | 930 | --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR. |
dfb77e37 KC |
931 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
932 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
933 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
443728bb | 934 | --with-system-libunwind use installed libunwind |
59415997 | 935 | --with-gc={page,zone} choose the garbage collection mechanism to use |
ba479fd2 NN |
936 | with the compiler |
937 | --with-system-zlib use installed libz | |
938 | --with-slibdir=DIR shared libraries in DIR LIBDIR | |
13c22933 | 939 | |
ba479fd2 NN |
940 | Some influential environment variables: |
941 | CC C compiler command | |
942 | CFLAGS C compiler flags | |
943 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
944 | nonstandard directory <lib dir> | |
945 | CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have | |
946 | headers in a nonstandard directory <include dir> | |
947 | CPP C preprocessor | |
6de9cd9a DN |
948 | GMPLIBS How to link GMP |
949 | GMPINC How to find GMP include files | |
13c22933 | 950 | |
ba479fd2 NN |
951 | Use these variables to override the choices made by `configure' or to help |
952 | it to find libraries and programs with nonstandard names/locations. | |
73458fb7 | 953 | |
ba479fd2 NN |
954 | _ACEOF |
955 | fi | |
6e3f3080 | 956 | |
ba479fd2 NN |
957 | if test "$ac_init_help" = "recursive"; then |
958 | # If there are subdirs, report their specific --help. | |
959 | ac_popdir=`pwd` | |
960 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
961 | test -d $ac_dir || continue | |
962 | ac_builddir=. | |
963 | ||
964 | if test "$ac_dir" != .; then | |
965 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
966 | # A "../" for each directory in $ac_dir_suffix. | |
967 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
968 | else | |
969 | ac_dir_suffix= ac_top_builddir= | |
970 | fi | |
971 | ||
972 | case $srcdir in | |
973 | .) # No --srcdir option. We are building in place. | |
974 | ac_srcdir=. | |
975 | if test -z "$ac_top_builddir"; then | |
976 | ac_top_srcdir=. | |
977 | else | |
978 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
979 | fi ;; | |
980 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
981 | ac_srcdir=$srcdir$ac_dir_suffix; | |
982 | ac_top_srcdir=$srcdir ;; | |
983 | *) # Relative path. | |
984 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
985 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
986 | esac | |
8ab705be KC |
987 | |
988 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
989 | # the directories may not exist. | |
990 | case `pwd` in | |
991 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 992 | *) |
8ab705be KC |
993 | case "$ac_dir" in |
994 | .) ac_abs_builddir=`pwd`;; | |
995 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
996 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
997 | esac;; |
998 | esac | |
8ab705be | 999 | case $ac_abs_builddir in |
86da66b5 HPN |
1000 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
1001 | *) | |
1002 | case ${ac_top_builddir}. in | |
8ab705be | 1003 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 1004 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 1005 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
1006 | esac;; |
1007 | esac | |
8ab705be | 1008 | case $ac_abs_builddir in |
86da66b5 HPN |
1009 | .) ac_abs_srcdir=$ac_srcdir;; |
1010 | *) | |
1011 | case $ac_srcdir in | |
8ab705be | 1012 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 1013 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 1014 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
1015 | esac;; |
1016 | esac | |
8ab705be | 1017 | case $ac_abs_builddir in |
86da66b5 HPN |
1018 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
1019 | *) | |
1020 | case $ac_top_srcdir in | |
8ab705be | 1021 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 1022 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 1023 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
1024 | esac;; |
1025 | esac | |
ba479fd2 NN |
1026 | |
1027 | cd $ac_dir | |
1028 | # Check for guested configure; otherwise get Cygnus style configure. | |
1029 | if test -f $ac_srcdir/configure.gnu; then | |
1030 | echo | |
1031 | $SHELL $ac_srcdir/configure.gnu --help=recursive | |
1032 | elif test -f $ac_srcdir/configure; then | |
1033 | echo | |
1034 | $SHELL $ac_srcdir/configure --help=recursive | |
1035 | elif test -f $ac_srcdir/configure.ac || | |
86da66b5 | 1036 | test -f $ac_srcdir/configure.in; then |
ba479fd2 NN |
1037 | echo |
1038 | $ac_configure --help | |
1039 | else | |
1040 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
1041 | fi | |
e8b05380 | 1042 | cd "$ac_popdir" |
ba479fd2 NN |
1043 | done |
1044 | fi | |
1045 | ||
1046 | test -n "$ac_init_help" && exit 0 | |
1047 | if $ac_init_version; then | |
1048 | cat <<\_ACEOF | |
1049 | ||
86da66b5 | 1050 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
1051 | This configure script is free software; the Free Software Foundation |
1052 | gives unlimited permission to copy, distribute and modify it. | |
1053 | _ACEOF | |
1054 | exit 0 | |
1055 | fi | |
1056 | exec 5>config.log | |
1057 | cat >&5 <<_ACEOF | |
1058 | This file contains any messages produced by compilers while | |
1059 | running configure, to aid debugging if configure makes a mistake. | |
1060 | ||
1061 | It was created by $as_me, which was | |
8ab705be | 1062 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
1063 | |
1064 | $ $0 $@ | |
1065 | ||
1066 | _ACEOF | |
1067 | { | |
1068 | cat <<_ASUNAME | |
1069 | ## --------- ## | |
1070 | ## Platform. ## | |
1071 | ## --------- ## | |
1072 | ||
1073 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
1074 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1075 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1076 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1077 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1078 | ||
1079 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
1080 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
1081 | ||
1082 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
1083 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
1084 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
1085 | hostinfo = `(hostinfo) 2>/dev/null || echo unknown` | |
1086 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
1087 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
1088 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
1089 | ||
1090 | _ASUNAME | |
1091 | ||
1092 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1093 | for as_dir in $PATH | |
1094 | do | |
1095 | IFS=$as_save_IFS | |
1096 | test -z "$as_dir" && as_dir=. | |
1097 | echo "PATH: $as_dir" | |
1098 | done | |
1099 | ||
1100 | } >&5 | |
1101 | ||
1102 | cat >&5 <<_ACEOF | |
1103 | ||
1104 | ||
1105 | ## ----------- ## | |
1106 | ## Core tests. ## | |
1107 | ## ----------- ## | |
1108 | ||
1109 | _ACEOF | |
1110 | ||
1111 | ||
1112 | # Keep a trace of the command line. | |
1113 | # Strip out --no-create and --no-recursion so they do not pile up. | |
1114 | # Strip out --silent because we don't want to record it for future runs. | |
1115 | # Also quote any args containing shell meta-characters. | |
1116 | # Make two passes to allow for proper duplicate-argument suppression. | |
1117 | ac_configure_args= | |
1118 | ac_configure_args0= | |
1119 | ac_configure_args1= | |
1120 | ac_sep= | |
1121 | ac_must_keep_next=false | |
1122 | for ac_pass in 1 2 | |
1123 | do | |
1124 | for ac_arg | |
1125 | do | |
1126 | case $ac_arg in | |
1127 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
1128 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1129 | | -silent | --silent | --silen | --sile | --sil) | |
1130 | continue ;; | |
1131 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1132 | ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1133 | esac | |
1134 | case $ac_pass in | |
1135 | 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; | |
1136 | 2) | |
1137 | ac_configure_args1="$ac_configure_args1 '$ac_arg'" | |
1138 | if test $ac_must_keep_next = true; then | |
86da66b5 | 1139 | ac_must_keep_next=false # Got value, back to normal. |
ba479fd2 | 1140 | else |
86da66b5 HPN |
1141 | case $ac_arg in |
1142 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
1143 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
1144 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
1145 | | -with-* | --with-* | -without-* | --without-* | --x) | |
1146 | case "$ac_configure_args0 " in | |
1147 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
1148 | esac | |
1149 | ;; | |
1150 | -* ) ac_must_keep_next=true ;; | |
1151 | esac | |
ba479fd2 NN |
1152 | fi |
1153 | ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" | |
1154 | # Get rid of the leading space. | |
1155 | ac_sep=" " | |
1156 | ;; | |
1157 | esac | |
1158 | done | |
1159 | done | |
1160 | $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } | |
1161 | $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } | |
1162 | ||
1163 | # When interrupted or exit'd, cleanup temporary files, and complete | |
1164 | # config.log. We remove comments because anyway the quotes in there | |
1165 | # would cause problems or look ugly. | |
1166 | # WARNING: Be sure not to use single quotes in there, as some shells, | |
1167 | # such as our DU 5.0 friend, will then `close' the trap. | |
1168 | trap 'exit_status=$? | |
1169 | # Save into config.log some information that might help in debugging. | |
1170 | { | |
1171 | echo | |
1172 | ||
1173 | cat <<\_ASBOX | |
1174 | ## ---------------- ## | |
1175 | ## Cache variables. ## | |
1176 | ## ---------------- ## | |
1177 | _ASBOX | |
1178 | echo | |
1179 | # The following way of writing the cache mishandles newlines in values, | |
1180 | { | |
1181 | (set) 2>&1 | | |
1182 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in | |
1183 | *ac_space=\ *) | |
1184 | sed -n \ | |
86da66b5 HPN |
1185 | "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; |
1186 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" | |
ba479fd2 NN |
1187 | ;; |
1188 | *) | |
1189 | sed -n \ | |
86da66b5 | 1190 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
ba479fd2 NN |
1191 | ;; |
1192 | esac; | |
1193 | } | |
1194 | echo | |
1195 | ||
1196 | cat <<\_ASBOX | |
1197 | ## ----------------- ## | |
1198 | ## Output variables. ## | |
1199 | ## ----------------- ## | |
1200 | _ASBOX | |
1201 | echo | |
1202 | for ac_var in $ac_subst_vars | |
1203 | do | |
1204 | eval ac_val=$`echo $ac_var` | |
1205 | echo "$ac_var='"'"'$ac_val'"'"'" | |
1206 | done | sort | |
1207 | echo | |
1208 | ||
1209 | if test -n "$ac_subst_files"; then | |
1210 | cat <<\_ASBOX | |
1211 | ## ------------- ## | |
1212 | ## Output files. ## | |
1213 | ## ------------- ## | |
1214 | _ASBOX | |
1215 | echo | |
1216 | for ac_var in $ac_subst_files | |
1217 | do | |
1218 | eval ac_val=$`echo $ac_var` | |
86da66b5 | 1219 | echo "$ac_var='"'"'$ac_val'"'"'" |
ba479fd2 NN |
1220 | done | sort |
1221 | echo | |
1222 | fi | |
1223 | ||
1224 | if test -s confdefs.h; then | |
1225 | cat <<\_ASBOX | |
1226 | ## ----------- ## | |
1227 | ## confdefs.h. ## | |
1228 | ## ----------- ## | |
1229 | _ASBOX | |
1230 | echo | |
1231 | sed "/^$/d" confdefs.h | sort | |
1232 | echo | |
1233 | fi | |
1234 | test "$ac_signal" != 0 && | |
1235 | echo "$as_me: caught signal $ac_signal" | |
1236 | echo "$as_me: exit $exit_status" | |
1237 | } >&5 | |
86da66b5 | 1238 | rm -f core *.core && |
ba479fd2 NN |
1239 | rm -rf conftest* confdefs* conf$$* $ac_clean_files && |
1240 | exit $exit_status | |
1241 | ' 0 | |
1242 | for ac_signal in 1 2 13 15; do | |
1243 | trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal | |
1244 | done | |
1245 | ac_signal=0 | |
1246 | ||
1247 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
1248 | rm -rf conftest* confdefs.h | |
1249 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
1250 | echo >confdefs.h | |
1251 | ||
1252 | # Predefined preprocessor variables. | |
1253 | ||
1254 | cat >>confdefs.h <<_ACEOF | |
1255 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
1256 | _ACEOF | |
1257 | ||
1258 | ||
1259 | cat >>confdefs.h <<_ACEOF | |
1260 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
1261 | _ACEOF | |
1262 | ||
1263 | ||
1264 | cat >>confdefs.h <<_ACEOF | |
1265 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
1266 | _ACEOF | |
1267 | ||
1268 | ||
1269 | cat >>confdefs.h <<_ACEOF | |
1270 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
1271 | _ACEOF | |
1272 | ||
1273 | ||
1274 | cat >>confdefs.h <<_ACEOF | |
1275 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
1276 | _ACEOF | |
1277 | ||
1278 | ||
1279 | # Let the site file select an alternate cache file if it wants to. | |
1280 | # Prefer explicitly selected file to automatically selected ones. | |
1281 | if test -z "$CONFIG_SITE"; then | |
1282 | if test "x$prefix" != xNONE; then | |
1283 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
1284 | else | |
1285 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
1286 | fi | |
1287 | fi | |
1288 | for ac_site_file in $CONFIG_SITE; do | |
1289 | if test -r "$ac_site_file"; then | |
1290 | { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 | |
1291 | echo "$as_me: loading site script $ac_site_file" >&6;} | |
1292 | sed 's/^/| /' "$ac_site_file" >&5 | |
1293 | . "$ac_site_file" | |
1294 | fi | |
1295 | done | |
1296 | ||
1297 | if test -r "$cache_file"; then | |
1298 | # Some versions of bash will fail to source /dev/null (special | |
1299 | # files actually), so we avoid doing that. | |
1300 | if test -f "$cache_file"; then | |
1301 | { echo "$as_me:$LINENO: loading cache $cache_file" >&5 | |
1302 | echo "$as_me: loading cache $cache_file" >&6;} | |
1303 | case $cache_file in | |
1304 | [\\/]* | ?:[\\/]* ) . $cache_file;; | |
1305 | *) . ./$cache_file;; | |
1306 | esac | |
1307 | fi | |
1308 | else | |
1309 | { echo "$as_me:$LINENO: creating cache $cache_file" >&5 | |
1310 | echo "$as_me: creating cache $cache_file" >&6;} | |
1311 | >$cache_file | |
1312 | fi | |
1313 | ||
1314 | # Check that the precious variables saved in the cache have kept the same | |
1315 | # value. | |
1316 | ac_cache_corrupted=false | |
1317 | for ac_var in `(set) 2>&1 | | |
86da66b5 | 1318 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do |
ba479fd2 NN |
1319 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
1320 | eval ac_new_set=\$ac_env_${ac_var}_set | |
1321 | eval ac_old_val="\$ac_cv_env_${ac_var}_value" | |
1322 | eval ac_new_val="\$ac_env_${ac_var}_value" | |
1323 | case $ac_old_set,$ac_new_set in | |
1324 | set,) | |
1325 | { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
1326 | echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
1327 | ac_cache_corrupted=: ;; | |
1328 | ,set) | |
1329 | { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 | |
1330 | echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
1331 | ac_cache_corrupted=: ;; | |
1332 | ,);; | |
1333 | *) | |
1334 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
86da66b5 | 1335 | { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 |
ba479fd2 | 1336 | echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} |
86da66b5 | 1337 | { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 |
ba479fd2 | 1338 | echo "$as_me: former value: $ac_old_val" >&2;} |
86da66b5 | 1339 | { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 |
ba479fd2 | 1340 | echo "$as_me: current value: $ac_new_val" >&2;} |
86da66b5 | 1341 | ac_cache_corrupted=: |
ba479fd2 NN |
1342 | fi;; |
1343 | esac | |
1344 | # Pass precious variables to config.status. | |
1345 | if test "$ac_new_set" = set; then | |
1346 | case $ac_new_val in | |
1347 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1348 | ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1349 | *) ac_arg=$ac_var=$ac_new_val ;; | |
1350 | esac | |
1351 | case " $ac_configure_args " in | |
1352 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
1353 | *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
1354 | esac | |
1355 | fi | |
1356 | done | |
1357 | if $ac_cache_corrupted; then | |
1358 | { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 | |
1359 | echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
1360 | { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 | |
1361 | echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} | |
1362 | { (exit 1); exit 1; }; } | |
1363 | fi | |
1364 | ||
1365 | ac_ext=c | |
1366 | ac_cpp='$CPP $CPPFLAGS' | |
1367 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1368 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1369 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1370 | ||
1371 | ||
1372 | ||
1373 | ||
1374 | ||
1375 | ||
1376 | ||
1377 | ||
1378 | ||
1379 | ||
1380 | ||
1381 | ||
1382 | ||
1383 | ||
1384 | ||
1385 | ||
1386 | ||
1387 | ||
1388 | ||
914c5af7 | 1389 | |
ba479fd2 NN |
1390 | ac_config_headers="$ac_config_headers auto-host.h:config.in" |
1391 | ||
1392 | ||
9f18db39 PB |
1393 | gcc_version=`cat $srcdir/BASE-VER` |
1394 | ||
ba479fd2 NN |
1395 | # Determine the host, build, and target systems |
1396 | ac_aux_dir= | |
1397 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
1398 | if test -f $ac_dir/install-sh; then | |
1399 | ac_aux_dir=$ac_dir | |
1400 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1401 | break | |
1402 | elif test -f $ac_dir/install.sh; then | |
1403 | ac_aux_dir=$ac_dir | |
1404 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1405 | break | |
1406 | elif test -f $ac_dir/shtool; then | |
1407 | ac_aux_dir=$ac_dir | |
1408 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
1409 | break | |
1410 | fi | |
1411 | done | |
1412 | if test -z "$ac_aux_dir"; then | |
1413 | { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 | |
1414 | echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} | |
1415 | { (exit 1); exit 1; }; } | |
1416 | fi | |
1417 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" | |
1418 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" | |
1419 | ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. | |
1420 | ||
1421 | # Make sure we can run config.sub. | |
1422 | $ac_config_sub sun4 >/dev/null 2>&1 || | |
1423 | { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 | |
1424 | echo "$as_me: error: cannot run $ac_config_sub" >&2;} | |
1425 | { (exit 1); exit 1; }; } | |
1426 | ||
1427 | echo "$as_me:$LINENO: checking build system type" >&5 | |
1428 | echo $ECHO_N "checking build system type... $ECHO_C" >&6 | |
1429 | if test "${ac_cv_build+set}" = set; then | |
1430 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1431 | else | |
1432 | ac_cv_build_alias=$build_alias | |
1433 | test -z "$ac_cv_build_alias" && | |
1434 | ac_cv_build_alias=`$ac_config_guess` | |
1435 | test -z "$ac_cv_build_alias" && | |
1436 | { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 | |
1437 | echo "$as_me: error: cannot guess build type; you must specify one" >&2;} | |
1438 | { (exit 1); exit 1; }; } | |
1439 | ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || | |
1440 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 | |
1441 | echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} | |
1442 | { (exit 1); exit 1; }; } | |
1443 | ||
1444 | fi | |
1445 | echo "$as_me:$LINENO: result: $ac_cv_build" >&5 | |
1446 | echo "${ECHO_T}$ac_cv_build" >&6 | |
1447 | build=$ac_cv_build | |
1448 | build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1449 | build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1450 | build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1451 | ||
1452 | ||
1453 | echo "$as_me:$LINENO: checking host system type" >&5 | |
1454 | echo $ECHO_N "checking host system type... $ECHO_C" >&6 | |
1455 | if test "${ac_cv_host+set}" = set; then | |
1456 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1457 | else | |
1458 | ac_cv_host_alias=$host_alias | |
1459 | test -z "$ac_cv_host_alias" && | |
1460 | ac_cv_host_alias=$ac_cv_build_alias | |
1461 | ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || | |
1462 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 | |
1463 | echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} | |
1464 | { (exit 1); exit 1; }; } | |
1465 | ||
1466 | fi | |
1467 | echo "$as_me:$LINENO: result: $ac_cv_host" >&5 | |
1468 | echo "${ECHO_T}$ac_cv_host" >&6 | |
1469 | host=$ac_cv_host | |
1470 | host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1471 | host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1472 | host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1473 | ||
1474 | ||
1475 | echo "$as_me:$LINENO: checking target system type" >&5 | |
1476 | echo $ECHO_N "checking target system type... $ECHO_C" >&6 | |
1477 | if test "${ac_cv_target+set}" = set; then | |
1478 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1479 | else | |
1480 | ac_cv_target_alias=$target_alias | |
1481 | test "x$ac_cv_target_alias" = "x" && | |
1482 | ac_cv_target_alias=$ac_cv_host_alias | |
1483 | ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || | |
1484 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 | |
1485 | echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} | |
1486 | { (exit 1); exit 1; }; } | |
1487 | ||
1488 | fi | |
1489 | echo "$as_me:$LINENO: result: $ac_cv_target" >&5 | |
1490 | echo "${ECHO_T}$ac_cv_target" >&6 | |
1491 | target=$ac_cv_target | |
1492 | target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1493 | target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1494 | target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1495 | ||
1496 | ||
1497 | # The aliases save the names the user supplied, while $host etc. | |
1498 | # will get canonicalized. | |
1499 | test -n "$target_alias" && | |
1500 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1501 | NONENONEs,x,x, && | |
1502 | program_prefix=${target_alias}- | |
1503 | ||
1504 | # Determine the noncanonical target name, for directory use. | |
1505 | case ${build_alias} in | |
1506 | "") build_noncanonical=${build} ;; | |
6e3f3080 NN |
1507 | *) build_noncanonical=${build_alias} ;; |
1508 | esac | |
73458fb7 | 1509 | |
4665e56c NN |
1510 | case ${host_alias} in |
1511 | "") host_noncanonical=${build_noncanonical} ;; | |
1512 | *) host_noncanonical=${host_alias} ;; | |
1513 | esac | |
73458fb7 | 1514 | |
4665e56c NN |
1515 | case ${target_alias} in |
1516 | "") target_noncanonical=${host_noncanonical} ;; | |
1517 | *) target_noncanonical=${target_alias} ;; | |
1518 | esac | |
093e61a6 | 1519 | |
8f1529e6 L |
1520 | |
1521 | ||
1522 | ||
1523 | # Determine the target- and build-specific subdirectories | |
4665e56c NN |
1524 | # Prefix 'build-' so this never conflicts with target_subdir. |
1525 | build_subdir="build-${build_noncanonical}" | |
215c351a PB |
1526 | # --srcdir=. covers the toplevel, while "test -d" covers the subdirectories |
1527 | if ( test $srcdir = . && test -d gcc ) \ | |
1528 | || test -d $srcdir/../host-${host_noncanonical}; then | |
1529 | host_subdir="host-${host_noncanonical}" | |
1530 | else | |
1531 | host_subdir=. | |
1532 | fi | |
4665e56c NN |
1533 | # No prefix. |
1534 | target_subdir=${target_noncanonical} | |
ba479fd2 | 1535 | |
73458fb7 | 1536 | |
093e61a6 | 1537 | # Set program_transform_name |
13c22933 | 1538 | test "$program_prefix" != NONE && |
ba479fd2 | 1539 | program_transform_name="s,^,$program_prefix,;$program_transform_name" |
13c22933 JJ |
1540 | # Use a double $ so make ignores it. |
1541 | test "$program_suffix" != NONE && | |
ba479fd2 NN |
1542 | program_transform_name="s,\$,$program_suffix,;$program_transform_name" |
1543 | # Double any \ or $. echo might interpret backslashes. | |
1544 | # By default was `s,x,x', remove it if useless. | |
1545 | cat <<\_ACEOF >conftest.sed | |
1546 | s/[\\$]/&&/g;s/;s,x,x,$// | |
1547 | _ACEOF | |
1548 | program_transform_name=`echo $program_transform_name | sed -f conftest.sed` | |
1549 | rm conftest.sed | |
13c22933 JJ |
1550 | |
1551 | ||
34a86c2b NN |
1552 | # Check for bogus environment variables. |
1553 | # Test if LIBRARY_PATH contains the notation for the current directory | |
1554 | # since this would lead to problems installing/building glibc. | |
1555 | # LIBRARY_PATH contains the current directory if one of the following | |
1556 | # is true: | |
1557 | # - one of the terminals (":" and ";") is the first or last sign | |
1558 | # - two terminals occur directly after each other | |
1559 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1560 | echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5 |
1561 | echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6 | |
34a86c2b NN |
1562 | case ${LIBRARY_PATH} in |
1563 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1564 | library_path_setting="contains current directory" | |
1565 | ;; | |
1566 | *) | |
1567 | library_path_setting="ok" | |
1568 | ;; | |
1569 | esac | |
ba479fd2 NN |
1570 | echo "$as_me:$LINENO: result: $library_path_setting" >&5 |
1571 | echo "${ECHO_T}$library_path_setting" >&6 | |
34a86c2b | 1572 | if test "$library_path_setting" != "ok"; then |
ba479fd2 | 1573 | { { echo "$as_me:$LINENO: error: |
34a86c2b NN |
1574 | *** LIBRARY_PATH shouldn't contain the current directory when |
1575 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1576 | *** and run configure again." >&5 |
1577 | echo "$as_me: error: | |
1578 | *** LIBRARY_PATH shouldn't contain the current directory when | |
1579 | *** building gcc. Please change the environment variable | |
1580 | *** and run configure again." >&2;} | |
1581 | { (exit 1); exit 1; }; } | |
e9a25f70 JL |
1582 | fi |
1583 | ||
34a86c2b NN |
1584 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
1585 | # since this would lead to problems installing/building glibc. | |
1586 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
1587 | # is true: | |
1588 | # - one of the terminals (":" and ";") is the first or last sign | |
1589 | # - two terminals occur directly after each other | |
1590 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1591 | echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5 |
1592 | echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6 | |
34a86c2b NN |
1593 | case ${GCC_EXEC_PREFIX} in |
1594 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1595 | gcc_exec_prefix_setting="contains current directory" | |
1596 | ;; | |
1597 | *) | |
1598 | gcc_exec_prefix_setting="ok" | |
1599 | ;; | |
1600 | esac | |
ba479fd2 NN |
1601 | echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5 |
1602 | echo "${ECHO_T}$gcc_exec_prefix_setting" >&6 | |
34a86c2b | 1603 | if test "$gcc_exec_prefix_setting" != "ok"; then |
ba479fd2 NN |
1604 | { { echo "$as_me:$LINENO: error: |
1605 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
1606 | *** building gcc. Please change the environment variable | |
1607 | *** and run configure again." >&5 | |
1608 | echo "$as_me: error: | |
cafe096b EC |
1609 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
1610 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1611 | *** and run configure again." >&2;} |
1612 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1613 | fi |
1614 | ||
1615 | # ----------- | |
1616 | # Directories | |
1617 | # ----------- | |
1618 | ||
1619 | # Specify the local prefix | |
1620 | local_prefix= | |
ba479fd2 | 1621 | |
34a86c2b NN |
1622 | # Check whether --with-local-prefix or --without-local-prefix was given. |
1623 | if test "${with_local_prefix+set}" = set; then | |
1624 | withval="$with_local_prefix" | |
1625 | case "${withval}" in | |
ba479fd2 NN |
1626 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5 |
1627 | echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;} | |
1628 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1629 | no) ;; |
1630 | *) local_prefix=$with_local_prefix ;; | |
1631 | esac | |
ba479fd2 | 1632 | fi; |
34a86c2b NN |
1633 | |
1634 | # Default local prefix if it is empty | |
1635 | if test x$local_prefix = x; then | |
1636 | local_prefix=/usr/local | |
1637 | fi | |
1638 | ||
1639 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
1640 | # passed in by the toplevel make and thus we'd get different behavior | |
1641 | # depending on where we built the sources. | |
1642 | gcc_gxx_include_dir= | |
1643 | # Specify the g++ header file directory | |
ba479fd2 | 1644 | |
34a86c2b NN |
1645 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. |
1646 | if test "${with_gxx_include_dir+set}" = set; then | |
1647 | withval="$with_gxx_include_dir" | |
1648 | case "${withval}" in | |
ba479fd2 NN |
1649 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5 |
1650 | echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;} | |
1651 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1652 | no) ;; |
1653 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
1654 | esac | |
ba479fd2 | 1655 | fi; |
34a86c2b NN |
1656 | |
1657 | if test x${gcc_gxx_include_dir} = x; then | |
1658 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
1659 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
1660 | else | |
a1286ef5 | 1661 | libstdcxx_incdir='c++/$(version)' |
34a86c2b NN |
1662 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} |
1663 | fi | |
1664 | fi | |
1665 | ||
ba479fd2 | 1666 | |
34a86c2b NN |
1667 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. |
1668 | if test "${with_cpp_install_dir+set}" = set; then | |
1669 | withval="$with_cpp_install_dir" | |
1670 | if test x$withval = xyes; then | |
ba479fd2 NN |
1671 | { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5 |
1672 | echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;} | |
1673 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1674 | elif test x$withval != xno; then |
1675 | cpp_install_dir=$withval | |
1676 | fi | |
ba479fd2 | 1677 | fi; |
34a86c2b | 1678 | |
51b9ff45 | 1679 | # We would like to our source tree to be readonly. However when releases or |
ba479fd2 | 1680 | # pre-releases are generated, the flex/bison generated files as well as the |
51b9ff45 | 1681 | # various formats of manuals need to be included along with the rest of the |
ba479fd2 | 1682 | # sources. Therefore we have --enable-generated-files-in-srcdir to do |
51b9ff45 KC |
1683 | # just that. |
1684 | ||
03787dfd KC |
1685 | echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5 |
1686 | echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6 | |
1687 | # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given. | |
51b9ff45 KC |
1688 | if test "${enable_generated_files_in_srcdir+set}" = set; then |
1689 | enableval="$enable_generated_files_in_srcdir" | |
03787dfd | 1690 | generated_files_in_srcdir=$enableval |
51b9ff45 | 1691 | else |
03787dfd | 1692 | generated_files_in_srcdir=no |
ba479fd2 | 1693 | fi; |
51b9ff45 | 1694 | |
03787dfd KC |
1695 | echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5 |
1696 | echo "${ECHO_T}$generated_files_in_srcdir" >&6 | |
1697 | ||
1698 | if test "$generated_files_in_srcdir" = "yes"; then | |
1699 | GENINSRC='' | |
03787dfd KC |
1700 | else |
1701 | GENINSRC='#' | |
03787dfd KC |
1702 | fi |
1703 | ||
1704 | ||
34a86c2b NN |
1705 | # ------------------- |
1706 | # Find default linker | |
1707 | # ------------------- | |
1708 | ||
1709 | # With GNU ld | |
ba479fd2 | 1710 | |
34a86c2b NN |
1711 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
1712 | if test "${with_gnu_ld+set}" = set; then | |
1713 | withval="$with_gnu_ld" | |
1714 | gnu_ld_flag="$with_gnu_ld" | |
1715 | else | |
1716 | gnu_ld_flag=no | |
ba479fd2 | 1717 | fi; |
6e3f3080 | 1718 | |
63cf211a | 1719 | # With pre-defined ld |
ba479fd2 | 1720 | |
34a86c2b NN |
1721 | # Check whether --with-ld or --without-ld was given. |
1722 | if test "${with_ld+set}" = set; then | |
1723 | withval="$with_ld" | |
1724 | DEFAULT_LINKER="$with_ld" | |
ba479fd2 | 1725 | fi; |
34a86c2b NN |
1726 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1727 | if test ! -x "$DEFAULT_LINKER"; then | |
99c012a8 BE |
1728 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5 |
1729 | echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;} | |
1730 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1731 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1732 | gnu_ld_flag=yes | |
1733 | fi | |
ba479fd2 NN |
1734 | |
1735 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1736 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
ba479fd2 | 1737 | _ACEOF |
34a86c2b NN |
1738 | |
1739 | fi | |
1740 | ||
ba479fd2 NN |
1741 | echo "$as_me:$LINENO: checking whether a default linker was specified" >&5 |
1742 | echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1743 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1744 | if test x"$gnu_ld_flag" = x"no"; then | |
ba479fd2 NN |
1745 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5 |
1746 | echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6 | |
34a86c2b | 1747 | else |
ba479fd2 NN |
1748 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5 |
1749 | echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6 | |
34a86c2b NN |
1750 | fi |
1751 | else | |
ba479fd2 NN |
1752 | echo "$as_me:$LINENO: result: no" >&5 |
1753 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1754 | fi |
1755 | ||
d594623a L |
1756 | # With demangler in GNU ld |
1757 | ||
1758 | # Check whether --with-demangler-in-ld or --without-demangler-in-ld was given. | |
1759 | if test "${with_demangler_in_ld+set}" = set; then | |
1760 | withval="$with_demangler_in_ld" | |
1761 | demangler_in_ld="$with_demangler_in_ld" | |
1762 | else | |
1763 | demangler_in_ld=no | |
1764 | fi; | |
1765 | ||
34a86c2b NN |
1766 | # ---------------------- |
1767 | # Find default assembler | |
1768 | # ---------------------- | |
1769 | ||
1770 | # With GNU as | |
ba479fd2 | 1771 | |
34a86c2b NN |
1772 | # Check whether --with-gnu-as or --without-gnu-as was given. |
1773 | if test "${with_gnu_as+set}" = set; then | |
1774 | withval="$with_gnu_as" | |
1775 | gas_flag="$with_gnu_as" | |
1776 | else | |
1777 | gas_flag=no | |
ba479fd2 | 1778 | fi; |
34a86c2b NN |
1779 | |
1780 | ||
1781 | # Check whether --with-as or --without-as was given. | |
1782 | if test "${with_as+set}" = set; then | |
1783 | withval="$with_as" | |
1784 | DEFAULT_ASSEMBLER="$with_as" | |
ba479fd2 | 1785 | fi; |
34a86c2b NN |
1786 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1787 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
99c012a8 BE |
1788 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5 |
1789 | echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;} | |
1790 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1791 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1792 | gas_flag=yes | |
1793 | fi | |
ba479fd2 NN |
1794 | |
1795 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1796 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
ba479fd2 | 1797 | _ACEOF |
34a86c2b NN |
1798 | |
1799 | fi | |
1800 | ||
ba479fd2 NN |
1801 | echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5 |
1802 | echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1803 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1804 | if test x"$gas_flag" = x"no"; then | |
ba479fd2 NN |
1805 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5 |
1806 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6 | |
34a86c2b | 1807 | else |
ba479fd2 NN |
1808 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 |
1809 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6 | |
34a86c2b NN |
1810 | fi |
1811 | else | |
ba479fd2 NN |
1812 | echo "$as_me:$LINENO: result: no" >&5 |
1813 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1814 | fi |
1815 | ||
1816 | # --------------- | |
1817 | # Find C compiler | |
1818 | # --------------- | |
1819 | ||
426ca3ca RO |
1820 | # If a non-executable a.out is present (e.g. created by GNU as above even if |
1821 | # invoked with -v only), the IRIX 6 native ld just overwrites the existing | |
1822 | # file, even when creating an executable, so an execution test fails. | |
1823 | # Remove possible default executable files to avoid this. | |
1824 | # | |
1825 | # FIXME: This really belongs into AC_PROG_CC and can be removed once | |
1826 | # Autoconf includes it. | |
1827 | rm -f a.out a.exe b.out | |
1828 | ||
34a86c2b | 1829 | # Find the native compiler |
ba479fd2 NN |
1830 | ac_ext=c |
1831 | ac_cpp='$CPP $CPPFLAGS' | |
1832 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1833 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1834 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1835 | if test -n "$ac_tool_prefix"; then | |
1836 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
1837 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
1838 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1839 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1840 | if test "${ac_cv_prog_CC+set}" = set; then | |
1841 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1842 | else | |
1843 | if test -n "$CC"; then | |
1844 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1845 | else | |
1846 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1847 | for as_dir in $PATH | |
1848 | do | |
1849 | IFS=$as_save_IFS | |
1850 | test -z "$as_dir" && as_dir=. | |
1851 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1852 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1853 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
1854 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1855 | break 2 | |
1856 | fi | |
1857 | done | |
1858 | done | |
1859 | ||
1860 | fi | |
1861 | fi | |
1862 | CC=$ac_cv_prog_CC | |
1863 | if test -n "$CC"; then | |
1864 | echo "$as_me:$LINENO: result: $CC" >&5 | |
1865 | echo "${ECHO_T}$CC" >&6 | |
1866 | else | |
1867 | echo "$as_me:$LINENO: result: no" >&5 | |
1868 | echo "${ECHO_T}no" >&6 | |
1869 | fi | |
1870 | ||
1871 | fi | |
1872 | if test -z "$ac_cv_prog_CC"; then | |
1873 | ac_ct_CC=$CC | |
1874 | # Extract the first word of "gcc", so it can be a program name with args. | |
6e3f3080 | 1875 | set dummy gcc; ac_word=$2 |
ba479fd2 NN |
1876 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1877 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1878 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1879 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1880 | else | |
1881 | if test -n "$ac_ct_CC"; then | |
1882 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1883 | else | |
1884 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1885 | for as_dir in $PATH | |
1886 | do | |
1887 | IFS=$as_save_IFS | |
1888 | test -z "$as_dir" && as_dir=. | |
1889 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1890 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1891 | ac_cv_prog_ac_ct_CC="gcc" | |
1892 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1893 | break 2 | |
1894 | fi | |
1895 | done | |
1896 | done | |
1897 | ||
1898 | fi | |
1899 | fi | |
1900 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1901 | if test -n "$ac_ct_CC"; then | |
1902 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1903 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1904 | else | |
1905 | echo "$as_me:$LINENO: result: no" >&5 | |
1906 | echo "${ECHO_T}no" >&6 | |
1907 | fi | |
1908 | ||
1909 | CC=$ac_ct_CC | |
1910 | else | |
1911 | CC="$ac_cv_prog_CC" | |
1912 | fi | |
1913 | ||
1914 | if test -z "$CC"; then | |
1915 | if test -n "$ac_tool_prefix"; then | |
1916 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
1917 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
1918 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1919 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1920 | if test "${ac_cv_prog_CC+set}" = set; then | |
1921 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cd9e5e7c MK |
1922 | else |
1923 | if test -n "$CC"; then | |
1924 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1925 | else | |
ba479fd2 NN |
1926 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1927 | for as_dir in $PATH | |
1928 | do | |
1929 | IFS=$as_save_IFS | |
1930 | test -z "$as_dir" && as_dir=. | |
1931 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1932 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1933 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
1934 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1935 | break 2 | |
1936 | fi | |
1937 | done | |
1938 | done | |
1939 | ||
cd9e5e7c MK |
1940 | fi |
1941 | fi | |
ba479fd2 | 1942 | CC=$ac_cv_prog_CC |
cd9e5e7c | 1943 | if test -n "$CC"; then |
ba479fd2 NN |
1944 | echo "$as_me:$LINENO: result: $CC" >&5 |
1945 | echo "${ECHO_T}$CC" >&6 | |
1946 | else | |
1947 | echo "$as_me:$LINENO: result: no" >&5 | |
1948 | echo "${ECHO_T}no" >&6 | |
1949 | fi | |
1950 | ||
1951 | fi | |
1952 | if test -z "$ac_cv_prog_CC"; then | |
1953 | ac_ct_CC=$CC | |
1954 | # Extract the first word of "cc", so it can be a program name with args. | |
1955 | set dummy cc; ac_word=$2 | |
1956 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1957 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1958 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1959 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1960 | else | |
1961 | if test -n "$ac_ct_CC"; then | |
1962 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1963 | else | |
1964 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1965 | for as_dir in $PATH | |
1966 | do | |
1967 | IFS=$as_save_IFS | |
1968 | test -z "$as_dir" && as_dir=. | |
1969 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1970 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1971 | ac_cv_prog_ac_ct_CC="cc" | |
1972 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1973 | break 2 | |
1974 | fi | |
1975 | done | |
1976 | done | |
1977 | ||
1978 | fi | |
1979 | fi | |
1980 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1981 | if test -n "$ac_ct_CC"; then | |
1982 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1983 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1984 | else | |
1985 | echo "$as_me:$LINENO: result: no" >&5 | |
1986 | echo "${ECHO_T}no" >&6 | |
1987 | fi | |
1988 | ||
1989 | CC=$ac_ct_CC | |
cd9e5e7c | 1990 | else |
ba479fd2 | 1991 | CC="$ac_cv_prog_CC" |
e9a25f70 | 1992 | fi |
6e3f3080 | 1993 | |
ba479fd2 | 1994 | fi |
6e3f3080 NN |
1995 | if test -z "$CC"; then |
1996 | # Extract the first word of "cc", so it can be a program name with args. | |
1997 | set dummy cc; ac_word=$2 | |
ba479fd2 NN |
1998 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1999 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2000 | if test "${ac_cv_prog_CC+set}" = set; then | |
2001 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6e3f3080 NN |
2002 | else |
2003 | if test -n "$CC"; then | |
2004 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2005 | else | |
2006 | ac_prog_rejected=no | |
ba479fd2 NN |
2007 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2008 | for as_dir in $PATH | |
2009 | do | |
2010 | IFS=$as_save_IFS | |
2011 | test -z "$as_dir" && as_dir=. | |
2012 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2013 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2014 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2015 | ac_prog_rejected=yes | |
2016 | continue | |
2017 | fi | |
2018 | ac_cv_prog_CC="cc" | |
2019 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2020 | break 2 | |
2021 | fi | |
2022 | done | |
2023 | done | |
2024 | ||
6e3f3080 NN |
2025 | if test $ac_prog_rejected = yes; then |
2026 | # We found a bogon in the path, so make sure we never use it. | |
2027 | set dummy $ac_cv_prog_CC | |
2028 | shift | |
ba479fd2 | 2029 | if test $# != 0; then |
6e3f3080 NN |
2030 | # We chose a different compiler from the bogus one. |
2031 | # However, it has the same basename, so the bogon will be chosen | |
2032 | # first if we set CC to just the basename; use the full file name. | |
2033 | shift | |
ba479fd2 | 2034 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
e9a25f70 | 2035 | fi |
6e3f3080 NN |
2036 | fi |
2037 | fi | |
2038 | fi | |
ba479fd2 | 2039 | CC=$ac_cv_prog_CC |
6e3f3080 | 2040 | if test -n "$CC"; then |
ba479fd2 NN |
2041 | echo "$as_me:$LINENO: result: $CC" >&5 |
2042 | echo "${ECHO_T}$CC" >&6 | |
e9a25f70 | 2043 | else |
ba479fd2 NN |
2044 | echo "$as_me:$LINENO: result: no" >&5 |
2045 | echo "${ECHO_T}no" >&6 | |
e9a25f70 | 2046 | fi |
6e3f3080 | 2047 | |
ba479fd2 NN |
2048 | fi |
2049 | if test -z "$CC"; then | |
2050 | if test -n "$ac_tool_prefix"; then | |
2051 | for ac_prog in cl | |
2052 | do | |
2053 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2054 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
2055 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2056 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2057 | if test "${ac_cv_prog_CC+set}" = set; then | |
2058 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
093e61a6 | 2059 | else |
6e3f3080 NN |
2060 | if test -n "$CC"; then |
2061 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2062 | else | |
ba479fd2 NN |
2063 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2064 | for as_dir in $PATH | |
2065 | do | |
2066 | IFS=$as_save_IFS | |
2067 | test -z "$as_dir" && as_dir=. | |
2068 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2069 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2070 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
2071 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2072 | break 2 | |
2073 | fi | |
2074 | done | |
2075 | done | |
2076 | ||
093e61a6 | 2077 | fi |
6e3f3080 | 2078 | fi |
ba479fd2 | 2079 | CC=$ac_cv_prog_CC |
6e3f3080 | 2080 | if test -n "$CC"; then |
ba479fd2 NN |
2081 | echo "$as_me:$LINENO: result: $CC" >&5 |
2082 | echo "${ECHO_T}$CC" >&6 | |
6e3f3080 | 2083 | else |
ba479fd2 NN |
2084 | echo "$as_me:$LINENO: result: no" >&5 |
2085 | echo "${ECHO_T}no" >&6 | |
093e61a6 | 2086 | fi |
cafe096b | 2087 | |
ba479fd2 NN |
2088 | test -n "$CC" && break |
2089 | done | |
2090 | fi | |
2091 | if test -z "$CC"; then | |
2092 | ac_ct_CC=$CC | |
2093 | for ac_prog in cl | |
2094 | do | |
2095 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2096 | set dummy $ac_prog; ac_word=$2 | |
2097 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2098 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2099 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
2100 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2101 | else | |
2102 | if test -n "$ac_ct_CC"; then | |
2103 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2104 | else | |
2105 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2106 | for as_dir in $PATH | |
2107 | do | |
2108 | IFS=$as_save_IFS | |
2109 | test -z "$as_dir" && as_dir=. | |
2110 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2111 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2112 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
2113 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2114 | break 2 | |
2115 | fi | |
2116 | done | |
2117 | done | |
6e3f3080 | 2118 | |
ba479fd2 NN |
2119 | fi |
2120 | fi | |
2121 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2122 | if test -n "$ac_ct_CC"; then | |
2123 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
2124 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
2125 | else | |
2126 | echo "$as_me:$LINENO: result: no" >&5 | |
2127 | echo "${ECHO_T}no" >&6 | |
2128 | fi | |
6e3f3080 | 2129 | |
ba479fd2 NN |
2130 | test -n "$ac_ct_CC" && break |
2131 | done | |
63cf211a | 2132 | |
ba479fd2 NN |
2133 | CC=$ac_ct_CC |
2134 | fi | |
2135 | ||
2136 | fi | |
2137 | ||
2138 | ||
2139 | test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH | |
2140 | See \`config.log' for more details." >&5 | |
2141 | echo "$as_me: error: no acceptable C compiler found in \$PATH | |
2142 | See \`config.log' for more details." >&2;} | |
2143 | { (exit 1); exit 1; }; } | |
2144 | ||
2145 | # Provide some information about the compiler. | |
2146 | echo "$as_me:$LINENO:" \ | |
2147 | "checking for C compiler version" >&5 | |
2148 | ac_compiler=`set X $ac_compile; echo $2` | |
2149 | { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 | |
2150 | (eval $ac_compiler --version </dev/null >&5) 2>&5 | |
2151 | ac_status=$? | |
2152 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2153 | (exit $ac_status); } | |
2154 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 | |
2155 | (eval $ac_compiler -v </dev/null >&5) 2>&5 | |
2156 | ac_status=$? | |
2157 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2158 | (exit $ac_status); } | |
2159 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 | |
2160 | (eval $ac_compiler -V </dev/null >&5) 2>&5 | |
2161 | ac_status=$? | |
2162 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2163 | (exit $ac_status); } | |
2164 | ||
2165 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2166 | /* confdefs.h. */ |
2167 | _ACEOF | |
2168 | cat confdefs.h >>conftest.$ac_ext | |
2169 | cat >>conftest.$ac_ext <<_ACEOF | |
2170 | /* end confdefs.h. */ | |
2171 | ||
2172 | int | |
2173 | main () | |
2174 | { | |
63cf211a | 2175 | |
ba479fd2 NN |
2176 | ; |
2177 | return 0; | |
2178 | } | |
2179 | _ACEOF | |
2180 | ac_clean_files_save=$ac_clean_files | |
2181 | ac_clean_files="$ac_clean_files a.out a.exe b.out" | |
2182 | # Try to create an executable without -o first, disregard a.out. | |
2183 | # It will help us diagnose broken compilers, and finding out an intuition | |
2184 | # of exeext. | |
86da66b5 HPN |
2185 | echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 |
2186 | echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 | |
ba479fd2 NN |
2187 | ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
2188 | if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 | |
2189 | (eval $ac_link_default) 2>&5 | |
2190 | ac_status=$? | |
2191 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2192 | (exit $ac_status); }; then | |
2193 | # Find the output, starting from the most likely. This scheme is | |
2194 | # not robust to junk in `.', hence go to wildcards (a.*) only as a last | |
2195 | # resort. | |
2196 | ||
2197 | # Be careful to initialize this variable, since it used to be cached. | |
2198 | # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. | |
2199 | ac_cv_exeext= | |
2200 | # b.out is created by i960 compilers. | |
2201 | for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out | |
2202 | do | |
2203 | test -f "$ac_file" || continue | |
2204 | case $ac_file in | |
2205 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) | |
86da66b5 | 2206 | ;; |
ba479fd2 | 2207 | conftest.$ac_ext ) |
86da66b5 HPN |
2208 | # This is the source file. |
2209 | ;; | |
ba479fd2 | 2210 | [ab].out ) |
86da66b5 HPN |
2211 | # We found the default executable, but exeext='' is most |
2212 | # certainly right. | |
2213 | break;; | |
ba479fd2 | 2214 | *.* ) |
86da66b5 HPN |
2215 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
2216 | # FIXME: I believe we export ac_cv_exeext for Libtool, | |
2217 | # but it would be cool to find out if it's true. Does anybody | |
2218 | # maintain Libtool? --akim. | |
2219 | export ac_cv_exeext | |
2220 | break;; | |
ba479fd2 | 2221 | * ) |
86da66b5 | 2222 | break;; |
ba479fd2 NN |
2223 | esac |
2224 | done | |
2225 | else | |
2226 | echo "$as_me: failed program was:" >&5 | |
2227 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2228 | ||
2229 | { { echo "$as_me:$LINENO: error: C compiler cannot create executables | |
2230 | See \`config.log' for more details." >&5 | |
2231 | echo "$as_me: error: C compiler cannot create executables | |
2232 | See \`config.log' for more details." >&2;} | |
2233 | { (exit 77); exit 77; }; } | |
2234 | fi | |
2235 | ||
2236 | ac_exeext=$ac_cv_exeext | |
2237 | echo "$as_me:$LINENO: result: $ac_file" >&5 | |
2238 | echo "${ECHO_T}$ac_file" >&6 | |
2239 | ||
2240 | # Check the compiler produces executables we can run. If not, either | |
2241 | # the compiler is broken, or we cross compile. | |
2242 | echo "$as_me:$LINENO: checking whether the C compiler works" >&5 | |
2243 | echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 | |
2244 | # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 | |
2245 | # If not cross compiling, check that we can run a simple program. | |
2246 | if test "$cross_compiling" != yes; then | |
2247 | if { ac_try='./$ac_file' | |
2248 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2249 | (eval $ac_try) 2>&5 | |
2250 | ac_status=$? | |
2251 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2252 | (exit $ac_status); }; }; then | |
2253 | cross_compiling=no | |
6e3f3080 | 2254 | else |
ba479fd2 NN |
2255 | if test "$cross_compiling" = maybe; then |
2256 | cross_compiling=yes | |
2257 | else | |
2258 | { { echo "$as_me:$LINENO: error: cannot run C compiled programs. | |
2259 | If you meant to cross compile, use \`--host'. | |
2260 | See \`config.log' for more details." >&5 | |
2261 | echo "$as_me: error: cannot run C compiled programs. | |
2262 | If you meant to cross compile, use \`--host'. | |
2263 | See \`config.log' for more details." >&2;} | |
2264 | { (exit 1); exit 1; }; } | |
2265 | fi | |
6e3f3080 NN |
2266 | fi |
2267 | fi | |
ba479fd2 NN |
2268 | echo "$as_me:$LINENO: result: yes" >&5 |
2269 | echo "${ECHO_T}yes" >&6 | |
2270 | ||
2271 | rm -f a.out a.exe conftest$ac_cv_exeext b.out | |
2272 | ac_clean_files=$ac_clean_files_save | |
2273 | # Check the compiler produces executables we can run. If not, either | |
2274 | # the compiler is broken, or we cross compile. | |
2275 | echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 | |
2276 | echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 | |
2277 | echo "$as_me:$LINENO: result: $cross_compiling" >&5 | |
2278 | echo "${ECHO_T}$cross_compiling" >&6 | |
2279 | ||
2280 | echo "$as_me:$LINENO: checking for suffix of executables" >&5 | |
2281 | echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 | |
2282 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
2283 | (eval $ac_link) 2>&5 | |
2284 | ac_status=$? | |
2285 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2286 | (exit $ac_status); }; then | |
2287 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
2288 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
2289 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
2290 | # `rm'. | |
2291 | for ac_file in conftest.exe conftest conftest.*; do | |
2292 | test -f "$ac_file" || continue | |
2293 | case $ac_file in | |
2294 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; | |
2295 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
86da66b5 HPN |
2296 | export ac_cv_exeext |
2297 | break;; | |
ba479fd2 NN |
2298 | * ) break;; |
2299 | esac | |
2300 | done | |
e9a25f70 | 2301 | else |
ba479fd2 NN |
2302 | { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link |
2303 | See \`config.log' for more details." >&5 | |
2304 | echo "$as_me: error: cannot compute suffix of executables: cannot compile and link | |
2305 | See \`config.log' for more details." >&2;} | |
2306 | { (exit 1); exit 1; }; } | |
2307 | fi | |
2308 | ||
2309 | rm -f conftest$ac_cv_exeext | |
2310 | echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 | |
2311 | echo "${ECHO_T}$ac_cv_exeext" >&6 | |
2312 | ||
2313 | rm -f conftest.$ac_ext | |
2314 | EXEEXT=$ac_cv_exeext | |
2315 | ac_exeext=$EXEEXT | |
2316 | echo "$as_me:$LINENO: checking for suffix of object files" >&5 | |
2317 | echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 | |
2318 | if test "${ac_cv_objext+set}" = set; then | |
2319 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2320 | else | |
2321 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2322 | /* confdefs.h. */ |
2323 | _ACEOF | |
2324 | cat confdefs.h >>conftest.$ac_ext | |
2325 | cat >>conftest.$ac_ext <<_ACEOF | |
2326 | /* end confdefs.h. */ | |
2327 | ||
2328 | int | |
2329 | main () | |
2330 | { | |
6e3f3080 | 2331 | |
ba479fd2 NN |
2332 | ; |
2333 | return 0; | |
2334 | } | |
2335 | _ACEOF | |
2336 | rm -f conftest.o conftest.obj | |
2337 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2338 | (eval $ac_compile) 2>&5 | |
2339 | ac_status=$? | |
2340 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2341 | (exit $ac_status); }; then | |
2342 | for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do | |
2343 | case $ac_file in | |
2344 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; | |
2345 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
2346 | break;; | |
2347 | esac | |
2348 | done | |
63cf211a | 2349 | else |
ba479fd2 NN |
2350 | echo "$as_me: failed program was:" >&5 |
2351 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2352 | ||
2353 | { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile | |
2354 | See \`config.log' for more details." >&5 | |
2355 | echo "$as_me: error: cannot compute suffix of object files: cannot compile | |
2356 | See \`config.log' for more details." >&2;} | |
2357 | { (exit 1); exit 1; }; } | |
2358 | fi | |
2359 | ||
2360 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
2361 | fi | |
2362 | echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 | |
2363 | echo "${ECHO_T}$ac_cv_objext" >&6 | |
2364 | OBJEXT=$ac_cv_objext | |
2365 | ac_objext=$OBJEXT | |
2366 | echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 | |
2367 | echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 | |
2368 | if test "${ac_cv_c_compiler_gnu+set}" = set; then | |
2369 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2370 | else | |
2371 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2372 | /* confdefs.h. */ |
2373 | _ACEOF | |
2374 | cat confdefs.h >>conftest.$ac_ext | |
2375 | cat >>conftest.$ac_ext <<_ACEOF | |
2376 | /* end confdefs.h. */ | |
2377 | ||
2378 | int | |
2379 | main () | |
2380 | { | |
2381 | #ifndef __GNUC__ | |
2382 | choke me | |
2383 | #endif | |
6e3f3080 | 2384 | |
ba479fd2 NN |
2385 | ; |
2386 | return 0; | |
2387 | } | |
2388 | _ACEOF | |
2389 | rm -f conftest.$ac_objext | |
2390 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2391 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2392 | ac_status=$? |
86da66b5 HPN |
2393 | grep -v '^ *+' conftest.er1 >conftest.err |
2394 | rm -f conftest.er1 | |
2395 | cat conftest.err >&5 | |
ba479fd2 NN |
2396 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2397 | (exit $ac_status); } && | |
e8b05380 | 2398 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2399 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2400 | (eval $ac_try) 2>&5 | |
2401 | ac_status=$? | |
2402 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2403 | (exit $ac_status); }; } && | |
2404 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2405 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2406 | (eval $ac_try) 2>&5 | |
2407 | ac_status=$? | |
2408 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2409 | (exit $ac_status); }; }; then | |
2410 | ac_compiler_gnu=yes | |
2411 | else | |
2412 | echo "$as_me: failed program was:" >&5 | |
2413 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2414 | ||
2415 | ac_compiler_gnu=no | |
2416 | fi | |
86da66b5 | 2417 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2418 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
2419 | ||
2420 | fi | |
2421 | echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 | |
2422 | echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 | |
2423 | GCC=`test $ac_compiler_gnu = yes && echo yes` | |
2424 | ac_test_CFLAGS=${CFLAGS+set} | |
2425 | ac_save_CFLAGS=$CFLAGS | |
2426 | CFLAGS="-g" | |
2427 | echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 | |
2428 | echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 | |
2429 | if test "${ac_cv_prog_cc_g+set}" = set; then | |
2430 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2431 | else | |
2432 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2433 | /* confdefs.h. */ |
2434 | _ACEOF | |
2435 | cat confdefs.h >>conftest.$ac_ext | |
2436 | cat >>conftest.$ac_ext <<_ACEOF | |
2437 | /* end confdefs.h. */ | |
2438 | ||
2439 | int | |
2440 | main () | |
2441 | { | |
2442 | ||
2443 | ; | |
2444 | return 0; | |
2445 | } | |
2446 | _ACEOF | |
2447 | rm -f conftest.$ac_objext | |
2448 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2449 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2450 | ac_status=$? |
86da66b5 HPN |
2451 | grep -v '^ *+' conftest.er1 >conftest.err |
2452 | rm -f conftest.er1 | |
2453 | cat conftest.err >&5 | |
ba479fd2 NN |
2454 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2455 | (exit $ac_status); } && | |
e8b05380 | 2456 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2457 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2458 | (eval $ac_try) 2>&5 | |
2459 | ac_status=$? | |
2460 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2461 | (exit $ac_status); }; } && | |
2462 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2463 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2464 | (eval $ac_try) 2>&5 | |
2465 | ac_status=$? | |
2466 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2467 | (exit $ac_status); }; }; then | |
6e3f3080 NN |
2468 | ac_cv_prog_cc_g=yes |
2469 | else | |
ba479fd2 NN |
2470 | echo "$as_me: failed program was:" >&5 |
2471 | sed 's/^/| /' conftest.$ac_ext >&5 | |
63cf211a | 2472 | |
ba479fd2 | 2473 | ac_cv_prog_cc_g=no |
6e3f3080 | 2474 | fi |
86da66b5 | 2475 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2476 | fi |
2477 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 | |
2478 | echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 | |
cd9e5e7c | 2479 | if test "$ac_test_CFLAGS" = set; then |
ba479fd2 | 2480 | CFLAGS=$ac_save_CFLAGS |
cd9e5e7c MK |
2481 | elif test $ac_cv_prog_cc_g = yes; then |
2482 | if test "$GCC" = yes; then | |
e9a25f70 JL |
2483 | CFLAGS="-g -O2" |
2484 | else | |
cd9e5e7c | 2485 | CFLAGS="-g" |
81814e35 | 2486 | fi |
3723cad9 | 2487 | else |
cd9e5e7c MK |
2488 | if test "$GCC" = yes; then |
2489 | CFLAGS="-O2" | |
2490 | else | |
2491 | CFLAGS= | |
2492 | fi | |
e9a25f70 | 2493 | fi |
ba479fd2 NN |
2494 | echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 |
2495 | echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 | |
2496 | if test "${ac_cv_prog_cc_stdc+set}" = set; then | |
2497 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2498 | else | |
2499 | ac_cv_prog_cc_stdc=no | |
2500 | ac_save_CC=$CC | |
2501 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2502 | /* confdefs.h. */ |
2503 | _ACEOF | |
2504 | cat confdefs.h >>conftest.$ac_ext | |
2505 | cat >>conftest.$ac_ext <<_ACEOF | |
2506 | /* end confdefs.h. */ | |
2507 | #include <stdarg.h> | |
2508 | #include <stdio.h> | |
2509 | #include <sys/types.h> | |
2510 | #include <sys/stat.h> | |
2511 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
2512 | struct buf { int x; }; | |
2513 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
2514 | static char *e (p, i) | |
2515 | char **p; | |
2516 | int i; | |
2517 | { | |
2518 | return p[i]; | |
2519 | } | |
2520 | static char *f (char * (*g) (char **, int), char **p, ...) | |
2521 | { | |
2522 | char *s; | |
2523 | va_list v; | |
2524 | va_start (v,p); | |
2525 | s = g (p, va_arg (v,int)); | |
2526 | va_end (v); | |
2527 | return s; | |
2528 | } | |
86da66b5 HPN |
2529 | |
2530 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
2531 | function prototypes and stuff, but not '\xHH' hex character constants. | |
2532 | These don't provoke an error unfortunately, instead are silently treated | |
2533 | as 'x'. The following induces an error, until -std1 is added to get | |
2534 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
2535 | array size at least. It's necessary to write '\x00'==0 to get something | |
2536 | that's true only with -std1. */ | |
2537 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
2538 | ||
ba479fd2 NN |
2539 | int test (int i, double x); |
2540 | struct s1 {int (*f) (int a);}; | |
2541 | struct s2 {int (*f) (double a);}; | |
2542 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
2543 | int argc; | |
2544 | char **argv; | |
2545 | int | |
2546 | main () | |
2547 | { | |
2548 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
2549 | ; | |
2550 | return 0; | |
2551 | } | |
2552 | _ACEOF | |
2553 | # Don't try gcc -ansi; that turns off useful extensions and | |
2554 | # breaks some systems' header files. | |
2555 | # AIX -qlanglvl=ansi | |
2556 | # Ultrix and OSF/1 -std1 | |
2557 | # HP-UX 10.20 and later -Ae | |
2558 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
2559 | # SVR4 -Xc -D__EXTENSIONS__ | |
2560 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
2561 | do | |
2562 | CC="$ac_save_CC $ac_arg" | |
2563 | rm -f conftest.$ac_objext | |
2564 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2565 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2566 | ac_status=$? |
86da66b5 HPN |
2567 | grep -v '^ *+' conftest.er1 >conftest.err |
2568 | rm -f conftest.er1 | |
2569 | cat conftest.err >&5 | |
ba479fd2 NN |
2570 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2571 | (exit $ac_status); } && | |
e8b05380 | 2572 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2573 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2574 | (eval $ac_try) 2>&5 | |
2575 | ac_status=$? | |
2576 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2577 | (exit $ac_status); }; } && | |
2578 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2579 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2580 | (eval $ac_try) 2>&5 | |
2581 | ac_status=$? | |
2582 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2583 | (exit $ac_status); }; }; then | |
2584 | ac_cv_prog_cc_stdc=$ac_arg | |
2585 | break | |
2586 | else | |
2587 | echo "$as_me: failed program was:" >&5 | |
2588 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 2589 | |
ba479fd2 | 2590 | fi |
86da66b5 | 2591 | rm -f conftest.err conftest.$ac_objext |
ba479fd2 NN |
2592 | done |
2593 | rm -f conftest.$ac_ext conftest.$ac_objext | |
2594 | CC=$ac_save_CC | |
2595 | ||
2596 | fi | |
2597 | ||
2598 | case "x$ac_cv_prog_cc_stdc" in | |
2599 | x|xno) | |
2600 | echo "$as_me:$LINENO: result: none needed" >&5 | |
2601 | echo "${ECHO_T}none needed" >&6 ;; | |
2602 | *) | |
2603 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 | |
2604 | echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 | |
2605 | CC="$CC $ac_cv_prog_cc_stdc" ;; | |
2606 | esac | |
2607 | ||
2608 | # Some people use a C++ compiler to compile C. Since we use `exit', | |
2609 | # in C++ we need to declare it. In case someone uses the same compiler | |
2610 | # for both compiling C and C++ we need to have the C++ compiler decide | |
2611 | # the declaration of exit, since it's the most demanding environment. | |
2612 | cat >conftest.$ac_ext <<_ACEOF | |
2613 | #ifndef __cplusplus | |
2614 | choke me | |
2615 | #endif | |
2616 | _ACEOF | |
2617 | rm -f conftest.$ac_objext | |
2618 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2619 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2620 | ac_status=$? |
86da66b5 HPN |
2621 | grep -v '^ *+' conftest.er1 >conftest.err |
2622 | rm -f conftest.er1 | |
2623 | cat conftest.err >&5 | |
ba479fd2 NN |
2624 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2625 | (exit $ac_status); } && | |
e8b05380 | 2626 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2627 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2628 | (eval $ac_try) 2>&5 | |
2629 | ac_status=$? | |
2630 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2631 | (exit $ac_status); }; } && | |
2632 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2633 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2634 | (eval $ac_try) 2>&5 | |
2635 | ac_status=$? | |
2636 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2637 | (exit $ac_status); }; }; then | |
2638 | for ac_declaration in \ | |
86da66b5 | 2639 | '' \ |
ba479fd2 NN |
2640 | 'extern "C" void std::exit (int) throw (); using std::exit;' \ |
2641 | 'extern "C" void std::exit (int); using std::exit;' \ | |
2642 | 'extern "C" void exit (int) throw ();' \ | |
2643 | 'extern "C" void exit (int);' \ | |
2644 | 'void exit (int);' | |
2645 | do | |
2646 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2647 | /* confdefs.h. */ |
2648 | _ACEOF | |
2649 | cat confdefs.h >>conftest.$ac_ext | |
2650 | cat >>conftest.$ac_ext <<_ACEOF | |
2651 | /* end confdefs.h. */ | |
33e70558 | 2652 | $ac_declaration |
86da66b5 | 2653 | #include <stdlib.h> |
ba479fd2 NN |
2654 | int |
2655 | main () | |
2656 | { | |
2657 | exit (42); | |
2658 | ; | |
2659 | return 0; | |
2660 | } | |
2661 | _ACEOF | |
2662 | rm -f conftest.$ac_objext | |
2663 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2664 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2665 | ac_status=$? |
86da66b5 HPN |
2666 | grep -v '^ *+' conftest.er1 >conftest.err |
2667 | rm -f conftest.er1 | |
2668 | cat conftest.err >&5 | |
ba479fd2 NN |
2669 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2670 | (exit $ac_status); } && | |
e8b05380 | 2671 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2672 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2673 | (eval $ac_try) 2>&5 | |
2674 | ac_status=$? | |
2675 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2676 | (exit $ac_status); }; } && | |
2677 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2678 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2679 | (eval $ac_try) 2>&5 | |
2680 | ac_status=$? | |
2681 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2682 | (exit $ac_status); }; }; then | |
2683 | : | |
2684 | else | |
2685 | echo "$as_me: failed program was:" >&5 | |
2686 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2687 | ||
2688 | continue | |
2689 | fi | |
86da66b5 | 2690 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 | 2691 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
2692 | /* confdefs.h. */ |
2693 | _ACEOF | |
2694 | cat confdefs.h >>conftest.$ac_ext | |
2695 | cat >>conftest.$ac_ext <<_ACEOF | |
2696 | /* end confdefs.h. */ | |
2697 | $ac_declaration | |
2698 | int | |
2699 | main () | |
2700 | { | |
2701 | exit (42); | |
2702 | ; | |
2703 | return 0; | |
2704 | } | |
2705 | _ACEOF | |
2706 | rm -f conftest.$ac_objext | |
2707 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2708 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2709 | ac_status=$? |
86da66b5 HPN |
2710 | grep -v '^ *+' conftest.er1 >conftest.err |
2711 | rm -f conftest.er1 | |
2712 | cat conftest.err >&5 | |
ba479fd2 NN |
2713 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2714 | (exit $ac_status); } && | |
e8b05380 | 2715 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2716 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2717 | (eval $ac_try) 2>&5 | |
2718 | ac_status=$? | |
2719 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2720 | (exit $ac_status); }; } && | |
2721 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2722 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2723 | (eval $ac_try) 2>&5 | |
2724 | ac_status=$? | |
2725 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2726 | (exit $ac_status); }; }; then | |
2727 | break | |
3ec83fc2 | 2728 | else |
ba479fd2 NN |
2729 | echo "$as_me: failed program was:" >&5 |
2730 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2731 | ||
6e3f3080 | 2732 | fi |
86da66b5 | 2733 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2734 | done |
2735 | rm -f conftest* | |
2736 | if test -n "$ac_declaration"; then | |
2737 | echo '#ifdef __cplusplus' >>confdefs.h | |
2738 | echo $ac_declaration >>confdefs.h | |
2739 | echo '#endif' >>confdefs.h | |
2740 | fi | |
2741 | ||
3ec83fc2 | 2742 | else |
ba479fd2 NN |
2743 | echo "$as_me: failed program was:" >&5 |
2744 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2745 | ||
2746 | fi | |
86da66b5 | 2747 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2748 | ac_ext=c |
2749 | ac_cpp='$CPP $CPPFLAGS' | |
2750 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2751 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2752 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2753 | ||
2754 | if test "x$CC" != xcc; then | |
2755 | echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 | |
2756 | echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 | |
2757 | else | |
2758 | echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 | |
2759 | echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 | |
2760 | fi | |
2761 | set dummy $CC; ac_cc=`echo $2 | | |
2762 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2763 | if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then | |
2764 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2765 | else | |
2766 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2767 | /* confdefs.h. */ |
2768 | _ACEOF | |
2769 | cat confdefs.h >>conftest.$ac_ext | |
2770 | cat >>conftest.$ac_ext <<_ACEOF | |
2771 | /* end confdefs.h. */ | |
2772 | ||
2773 | int | |
2774 | main () | |
2775 | { | |
2776 | ||
2777 | ; | |
2778 | return 0; | |
2779 | } | |
2780 | _ACEOF | |
3ec83fc2 RH |
2781 | # Make sure it works both with $CC and with simple cc. |
2782 | # We do the test twice because some compilers refuse to overwrite an | |
2783 | # existing .o file with -o, though they will create one. | |
ba479fd2 NN |
2784 | ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' |
2785 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2786 | (eval $ac_try) 2>&5 | |
2787 | ac_status=$? | |
2788 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2789 | (exit $ac_status); } && | |
2790 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2791 | (eval $ac_try) 2>&5 | |
2792 | ac_status=$? | |
2793 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2794 | (exit $ac_status); }; | |
3ec83fc2 RH |
2795 | then |
2796 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
2797 | if test "x$CC" != xcc; then | |
2798 | # Test first that cc exists at all. | |
ba479fd2 NN |
2799 | if { ac_try='cc -c conftest.$ac_ext >&5' |
2800 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2801 | (eval $ac_try) 2>&5 | |
2802 | ac_status=$? | |
2803 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2804 | (exit $ac_status); }; }; then | |
2805 | ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' | |
2806 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2807 | (eval $ac_try) 2>&5 | |
2808 | ac_status=$? | |
2809 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2810 | (exit $ac_status); } && | |
2811 | test -f conftest.$ac_objext && { (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); }; | |
3ec83fc2 | 2816 | then |
86da66b5 HPN |
2817 | # cc works too. |
2818 | : | |
3ec83fc2 | 2819 | else |
86da66b5 HPN |
2820 | # cc exists but doesn't like -o. |
2821 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3ec83fc2 RH |
2822 | fi |
2823 | fi | |
2824 | fi | |
2825 | else | |
2826 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
2827 | fi | |
2828 | rm -f conftest* | |
2829 | ||
2830 | fi | |
2831 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
ba479fd2 NN |
2832 | echo "$as_me:$LINENO: result: yes" >&5 |
2833 | echo "${ECHO_T}yes" >&6 | |
3ec83fc2 | 2834 | else |
ba479fd2 NN |
2835 | echo "$as_me:$LINENO: result: no" >&5 |
2836 | echo "${ECHO_T}no" >&6 | |
2837 | ||
2838 | cat >>confdefs.h <<\_ACEOF | |
3ec83fc2 | 2839 | #define NO_MINUS_C_MINUS_O 1 |
ba479fd2 | 2840 | _ACEOF |
3ec83fc2 RH |
2841 | |
2842 | fi | |
2843 | ||
3b620440 KC |
2844 | # expand $ac_aux_dir to an absolute path |
2845 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
2846 | ||
2847 | # FIXME: we rely on the cache variable name because | |
2848 | # there is no other way. | |
2849 | set dummy $CC | |
2850 | ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2851 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then | |
2852 | # Losing compiler, so override with the script. | |
2853 | # FIXME: It is wrong to rewrite CC. | |
2854 | # But if we don't then we get into trouble of one sort or another. | |
2855 | # A longer-term fix would be to have automake use am__CC in this case, | |
2856 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
2857 | CC="$am_aux_dir/compile $CC" | |
2858 | fi | |
2859 | ||
414d23ae HPN |
2860 | # autoconf is lame and doesn't give us any substitution variable for this. |
2861 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
2862 | NO_MINUS_C_MINUS_O=yes | |
2863 | else | |
2864 | OUTPUT_OPTION='-o $@' | |
2865 | fi | |
2866 | ||
2867 | ||
2868 | ||
73458fb7 NN |
2869 | # ------------------------- |
2870 | # Check C compiler features | |
2871 | # ------------------------- | |
2872 | ||
ba479fd2 NN |
2873 | ac_ext=c |
2874 | ac_cpp='$CPP $CPPFLAGS' | |
2875 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2876 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2877 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2878 | echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 | |
2879 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 | |
84c041a1 ZW |
2880 | # On Suns, sometimes $CPP names a directory. |
2881 | if test -n "$CPP" && test -d "$CPP"; then | |
2882 | CPP= | |
2883 | fi | |
2884 | if test -z "$CPP"; then | |
ba479fd2 NN |
2885 | if test "${ac_cv_prog_CPP+set}" = set; then |
2886 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2887 | else | |
2888 | # Double quotes because CPP needs to be expanded | |
2889 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
2890 | do | |
2891 | ac_preproc_ok=false | |
2892 | for ac_c_preproc_warn_flag in '' yes | |
2893 | do | |
2894 | # Use a header file that comes with gcc, so configuring glibc | |
2895 | # with a fresh cross-compiler works. | |
2896 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2897 | # <limits.h> exists even on freestanding compilers. | |
84c041a1 | 2898 | # On the NeXT, cc -E runs the code through the compiler's parser, |
ba479fd2 NN |
2899 | # not just through cpp. "Syntax error" is here to catch this case. |
2900 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2901 | /* confdefs.h. */ |
2902 | _ACEOF | |
2903 | cat confdefs.h >>conftest.$ac_ext | |
2904 | cat >>conftest.$ac_ext <<_ACEOF | |
2905 | /* end confdefs.h. */ | |
2906 | #ifdef __STDC__ | |
2907 | # include <limits.h> | |
2908 | #else | |
2909 | # include <assert.h> | |
2910 | #endif | |
86da66b5 | 2911 | Syntax error |
ba479fd2 NN |
2912 | _ACEOF |
2913 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2914 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2915 | ac_status=$? | |
2916 | grep -v '^ *+' conftest.er1 >conftest.err | |
2917 | rm -f conftest.er1 | |
2918 | cat conftest.err >&5 | |
2919 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2920 | (exit $ac_status); } >/dev/null; then | |
2921 | if test -s conftest.err; then | |
2922 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2923 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2924 | else |
2925 | ac_cpp_err= | |
2926 | fi | |
2927 | else | |
2928 | ac_cpp_err=yes | |
2929 | fi | |
2930 | if test -z "$ac_cpp_err"; then | |
093e61a6 | 2931 | : |
cafe096b | 2932 | else |
ba479fd2 NN |
2933 | echo "$as_me: failed program was:" >&5 |
2934 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2935 | ||
2936 | # Broken: fails on valid input. | |
2937 | continue | |
2938 | fi | |
2939 | rm -f conftest.err conftest.$ac_ext | |
2940 | ||
2941 | # OK, works on sane cases. Now check whether non-existent headers | |
2942 | # can be detected and how. | |
2943 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2944 | /* confdefs.h. */ |
2945 | _ACEOF | |
2946 | cat confdefs.h >>conftest.$ac_ext | |
2947 | cat >>conftest.$ac_ext <<_ACEOF | |
2948 | /* end confdefs.h. */ | |
2949 | #include <ac_nonexistent.h> | |
2950 | _ACEOF | |
2951 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2952 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2953 | ac_status=$? | |
2954 | grep -v '^ *+' conftest.er1 >conftest.err | |
2955 | rm -f conftest.er1 | |
2956 | cat conftest.err >&5 | |
2957 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2958 | (exit $ac_status); } >/dev/null; then | |
2959 | if test -s conftest.err; then | |
2960 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2961 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2962 | else |
2963 | ac_cpp_err= | |
2964 | fi | |
2965 | else | |
2966 | ac_cpp_err=yes | |
2967 | fi | |
2968 | if test -z "$ac_cpp_err"; then | |
2969 | # Broken: success on invalid input. | |
2970 | continue | |
2971 | else | |
2972 | echo "$as_me: failed program was:" >&5 | |
2973 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2974 | ||
2975 | # Passes both tests. | |
2976 | ac_preproc_ok=: | |
2977 | break | |
2978 | fi | |
2979 | rm -f conftest.err conftest.$ac_ext | |
2980 | ||
2981 | done | |
2982 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2983 | rm -f conftest.err conftest.$ac_ext | |
2984 | if $ac_preproc_ok; then | |
2985 | break | |
2986 | fi | |
2987 | ||
2988 | done | |
2989 | ac_cv_prog_CPP=$CPP | |
2990 | ||
2991 | fi | |
2992 | CPP=$ac_cv_prog_CPP | |
2993 | else | |
2994 | ac_cv_prog_CPP=$CPP | |
2995 | fi | |
2996 | echo "$as_me:$LINENO: result: $CPP" >&5 | |
2997 | echo "${ECHO_T}$CPP" >&6 | |
2998 | ac_preproc_ok=false | |
2999 | for ac_c_preproc_warn_flag in '' yes | |
3000 | do | |
3001 | # Use a header file that comes with gcc, so configuring glibc | |
3002 | # with a fresh cross-compiler works. | |
3003 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3004 | # <limits.h> exists even on freestanding compilers. | |
3005 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3006 | # not just through cpp. "Syntax error" is here to catch this case. | |
3007 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3008 | /* confdefs.h. */ |
3009 | _ACEOF | |
3010 | cat confdefs.h >>conftest.$ac_ext | |
3011 | cat >>conftest.$ac_ext <<_ACEOF | |
3012 | /* end confdefs.h. */ | |
3013 | #ifdef __STDC__ | |
3014 | # include <limits.h> | |
3015 | #else | |
3016 | # include <assert.h> | |
3017 | #endif | |
86da66b5 | 3018 | Syntax error |
ba479fd2 NN |
3019 | _ACEOF |
3020 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3021 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3022 | ac_status=$? | |
3023 | grep -v '^ *+' conftest.er1 >conftest.err | |
3024 | rm -f conftest.er1 | |
3025 | cat conftest.err >&5 | |
3026 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3027 | (exit $ac_status); } >/dev/null; then | |
3028 | if test -s conftest.err; then | |
3029 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 3030 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
3031 | else |
3032 | ac_cpp_err= | |
3033 | fi | |
3034 | else | |
3035 | ac_cpp_err=yes | |
3036 | fi | |
3037 | if test -z "$ac_cpp_err"; then | |
6e3f3080 | 3038 | : |
414d23ae | 3039 | else |
ba479fd2 NN |
3040 | echo "$as_me: failed program was:" >&5 |
3041 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3042 | ||
3043 | # Broken: fails on valid input. | |
3044 | continue | |
3045 | fi | |
3046 | rm -f conftest.err conftest.$ac_ext | |
3047 | ||
3048 | # OK, works on sane cases. Now check whether non-existent headers | |
3049 | # can be detected and how. | |
3050 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3051 | /* confdefs.h. */ |
3052 | _ACEOF | |
3053 | cat confdefs.h >>conftest.$ac_ext | |
3054 | cat >>conftest.$ac_ext <<_ACEOF | |
3055 | /* end confdefs.h. */ | |
3056 | #include <ac_nonexistent.h> | |
3057 | _ACEOF | |
3058 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3059 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3060 | ac_status=$? | |
3061 | grep -v '^ *+' conftest.er1 >conftest.err | |
3062 | rm -f conftest.er1 | |
3063 | cat conftest.err >&5 | |
3064 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3065 | (exit $ac_status); } >/dev/null; then | |
3066 | if test -s conftest.err; then | |
3067 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 3068 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
3069 | else |
3070 | ac_cpp_err= | |
3071 | fi | |
6e3f3080 | 3072 | else |
ba479fd2 | 3073 | ac_cpp_err=yes |
63cf211a | 3074 | fi |
ba479fd2 NN |
3075 | if test -z "$ac_cpp_err"; then |
3076 | # Broken: success on invalid input. | |
3077 | continue | |
3078 | else | |
3079 | echo "$as_me: failed program was:" >&5 | |
3080 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3081 | ||
3082 | # Passes both tests. | |
3083 | ac_preproc_ok=: | |
3084 | break | |
63cf211a | 3085 | fi |
ba479fd2 NN |
3086 | rm -f conftest.err conftest.$ac_ext |
3087 | ||
3088 | done | |
3089 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3090 | rm -f conftest.err conftest.$ac_ext | |
3091 | if $ac_preproc_ok; then | |
3092 | : | |
6e3f3080 | 3093 | else |
ba479fd2 NN |
3094 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check |
3095 | See \`config.log' for more details." >&5 | |
3096 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check | |
3097 | See \`config.log' for more details." >&2;} | |
3098 | { (exit 1); exit 1; }; } | |
6e3f3080 NN |
3099 | fi |
3100 | ||
ba479fd2 NN |
3101 | ac_ext=c |
3102 | ac_cpp='$CPP $CPPFLAGS' | |
3103 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3104 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3105 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3106 | ||
b5472e1d | 3107 | |
ba479fd2 NN |
3108 | echo "$as_me:$LINENO: checking for inline" >&5 |
3109 | echo $ECHO_N "checking for inline... $ECHO_C" >&6 | |
3110 | if test "${ac_cv_c_inline+set}" = set; then | |
3111 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
3112 | else |
3113 | ac_cv_c_inline=no | |
3114 | for ac_kw in inline __inline__ __inline; do | |
ba479fd2 | 3115 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3116 | /* confdefs.h. */ |
3117 | _ACEOF | |
3118 | cat confdefs.h >>conftest.$ac_ext | |
3119 | cat >>conftest.$ac_ext <<_ACEOF | |
3120 | /* end confdefs.h. */ | |
3121 | #ifndef __cplusplus | |
3122 | typedef int foo_t; | |
3123 | static $ac_kw foo_t static_foo () {return 0; } | |
3124 | $ac_kw foo_t foo () {return 0; } | |
3125 | #endif | |
414d23ae | 3126 | |
ba479fd2 NN |
3127 | _ACEOF |
3128 | rm -f conftest.$ac_objext | |
3129 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3130 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3131 | ac_status=$? |
86da66b5 HPN |
3132 | grep -v '^ *+' conftest.er1 >conftest.err |
3133 | rm -f conftest.er1 | |
3134 | cat conftest.err >&5 | |
ba479fd2 NN |
3135 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3136 | (exit $ac_status); } && | |
e8b05380 | 3137 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3138 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3139 | (eval $ac_try) 2>&5 | |
3140 | ac_status=$? | |
3141 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3142 | (exit $ac_status); }; } && | |
3143 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3144 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3145 | (eval $ac_try) 2>&5 | |
3146 | ac_status=$? | |
3147 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3148 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3149 | ac_cv_c_inline=$ac_kw; break |
3150 | else | |
ba479fd2 NN |
3151 | echo "$as_me: failed program was:" >&5 |
3152 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3153 | ||
414d23ae | 3154 | fi |
86da66b5 | 3155 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3156 | done |
3157 | ||
3158 | fi | |
ba479fd2 NN |
3159 | echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 |
3160 | echo "${ECHO_T}$ac_cv_c_inline" >&6 | |
86da66b5 HPN |
3161 | |
3162 | ||
ba479fd2 | 3163 | case $ac_cv_c_inline in |
414d23ae | 3164 | inline | yes) ;; |
86da66b5 HPN |
3165 | *) |
3166 | case $ac_cv_c_inline in | |
3167 | no) ac_val=;; | |
3168 | *) ac_val=$ac_cv_c_inline;; | |
3169 | esac | |
3170 | cat >>confdefs.h <<_ACEOF | |
3171 | #ifndef __cplusplus | |
3172 | #define inline $ac_val | |
3173 | #endif | |
ba479fd2 | 3174 | _ACEOF |
86da66b5 | 3175 | ;; |
414d23ae HPN |
3176 | esac |
3177 | ||
414d23ae | 3178 | |
414d23ae | 3179 | # sizeof(char) is 1 by definition. |
bf3b7cd3 JD |
3180 | |
3181 | echo "$as_me:$LINENO: checking for egrep" >&5 | |
3182 | echo $ECHO_N "checking for egrep... $ECHO_C" >&6 | |
3183 | if test "${ac_cv_prog_egrep+set}" = set; then | |
3184 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3185 | else | |
3186 | if echo a | (grep -E '(a|b)') >/dev/null 2>&1 | |
3187 | then ac_cv_prog_egrep='grep -E' | |
3188 | else ac_cv_prog_egrep='egrep' | |
3189 | fi | |
3190 | fi | |
3191 | echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 | |
3192 | echo "${ECHO_T}$ac_cv_prog_egrep" >&6 | |
3193 | EGREP=$ac_cv_prog_egrep | |
3194 | ||
3195 | ||
3196 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 | |
3197 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
3198 | if test "${ac_cv_header_stdc+set}" = set; then | |
3199 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3200 | else | |
3201 | cat >conftest.$ac_ext <<_ACEOF | |
3202 | /* confdefs.h. */ | |
3203 | _ACEOF | |
3204 | cat confdefs.h >>conftest.$ac_ext | |
3205 | cat >>conftest.$ac_ext <<_ACEOF | |
3206 | /* end confdefs.h. */ | |
3207 | #include <stdlib.h> | |
3208 | #include <stdarg.h> | |
3209 | #include <string.h> | |
3210 | #include <float.h> | |
3211 | ||
3212 | int | |
3213 | main () | |
3214 | { | |
3215 | ||
3216 | ; | |
3217 | return 0; | |
3218 | } | |
3219 | _ACEOF | |
3220 | rm -f conftest.$ac_objext | |
3221 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3222 | (eval $ac_compile) 2>conftest.er1 | |
3223 | ac_status=$? | |
3224 | grep -v '^ *+' conftest.er1 >conftest.err | |
3225 | rm -f conftest.er1 | |
3226 | cat conftest.err >&5 | |
3227 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3228 | (exit $ac_status); } && | |
e8b05380 | 3229 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3230 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3231 | (eval $ac_try) 2>&5 | |
3232 | ac_status=$? | |
3233 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3234 | (exit $ac_status); }; } && | |
3235 | { ac_try='test -s conftest.$ac_objext' | |
3236 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3237 | (eval $ac_try) 2>&5 | |
3238 | ac_status=$? | |
3239 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3240 | (exit $ac_status); }; }; then | |
3241 | ac_cv_header_stdc=yes | |
3242 | else | |
3243 | echo "$as_me: failed program was:" >&5 | |
3244 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3245 | ||
3246 | ac_cv_header_stdc=no | |
3247 | fi | |
3248 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3249 | ||
3250 | if test $ac_cv_header_stdc = yes; then | |
3251 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3252 | cat >conftest.$ac_ext <<_ACEOF | |
3253 | /* confdefs.h. */ | |
3254 | _ACEOF | |
3255 | cat confdefs.h >>conftest.$ac_ext | |
3256 | cat >>conftest.$ac_ext <<_ACEOF | |
3257 | /* end confdefs.h. */ | |
3258 | #include <string.h> | |
3259 | ||
3260 | _ACEOF | |
3261 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3262 | $EGREP "memchr" >/dev/null 2>&1; then | |
3263 | : | |
3264 | else | |
3265 | ac_cv_header_stdc=no | |
3266 | fi | |
3267 | rm -f conftest* | |
3268 | ||
3269 | fi | |
3270 | ||
3271 | if test $ac_cv_header_stdc = yes; then | |
3272 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3273 | cat >conftest.$ac_ext <<_ACEOF | |
3274 | /* confdefs.h. */ | |
3275 | _ACEOF | |
3276 | cat confdefs.h >>conftest.$ac_ext | |
3277 | cat >>conftest.$ac_ext <<_ACEOF | |
3278 | /* end confdefs.h. */ | |
3279 | #include <stdlib.h> | |
3280 | ||
3281 | _ACEOF | |
3282 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3283 | $EGREP "free" >/dev/null 2>&1; then | |
3284 | : | |
3285 | else | |
3286 | ac_cv_header_stdc=no | |
3287 | fi | |
3288 | rm -f conftest* | |
3289 | ||
3290 | fi | |
3291 | ||
3292 | if test $ac_cv_header_stdc = yes; then | |
3293 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3294 | if test "$cross_compiling" = yes; then | |
3295 | : | |
3296 | else | |
3297 | cat >conftest.$ac_ext <<_ACEOF | |
3298 | /* confdefs.h. */ | |
3299 | _ACEOF | |
3300 | cat confdefs.h >>conftest.$ac_ext | |
3301 | cat >>conftest.$ac_ext <<_ACEOF | |
3302 | /* end confdefs.h. */ | |
3303 | #include <ctype.h> | |
3304 | #if ((' ' & 0x0FF) == 0x020) | |
3305 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3306 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3307 | #else | |
3308 | # define ISLOWER(c) \ | |
3309 | (('a' <= (c) && (c) <= 'i') \ | |
3310 | || ('j' <= (c) && (c) <= 'r') \ | |
3311 | || ('s' <= (c) && (c) <= 'z')) | |
3312 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
3313 | #endif | |
3314 | ||
3315 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3316 | int | |
3317 | main () | |
3318 | { | |
3319 | int i; | |
3320 | for (i = 0; i < 256; i++) | |
3321 | if (XOR (islower (i), ISLOWER (i)) | |
3322 | || toupper (i) != TOUPPER (i)) | |
3323 | exit(2); | |
3324 | exit (0); | |
3325 | } | |
3326 | _ACEOF | |
3327 | rm -f conftest$ac_exeext | |
3328 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3329 | (eval $ac_link) 2>&5 | |
3330 | ac_status=$? | |
3331 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3332 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
3333 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3334 | (eval $ac_try) 2>&5 | |
3335 | ac_status=$? | |
3336 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3337 | (exit $ac_status); }; }; then | |
3338 | : | |
3339 | else | |
3340 | echo "$as_me: program exited with status $ac_status" >&5 | |
3341 | echo "$as_me: failed program was:" >&5 | |
3342 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3343 | ||
3344 | ( exit $ac_status ) | |
3345 | ac_cv_header_stdc=no | |
3346 | fi | |
3347 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
3348 | fi | |
3349 | fi | |
3350 | fi | |
3351 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 | |
3352 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
3353 | if test $ac_cv_header_stdc = yes; then | |
3354 | ||
3355 | cat >>confdefs.h <<\_ACEOF | |
3356 | #define STDC_HEADERS 1 | |
3357 | _ACEOF | |
3358 | ||
3359 | fi | |
3360 | ||
3361 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
3362 | ||
3363 | ||
3364 | ||
3365 | ||
3366 | ||
3367 | ||
3368 | ||
3369 | ||
3370 | ||
3371 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
3372 | inttypes.h stdint.h unistd.h | |
3373 | do | |
3374 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
3375 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
3376 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
3377 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
3378 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3379 | else | |
3380 | cat >conftest.$ac_ext <<_ACEOF | |
3381 | /* confdefs.h. */ | |
3382 | _ACEOF | |
3383 | cat confdefs.h >>conftest.$ac_ext | |
3384 | cat >>conftest.$ac_ext <<_ACEOF | |
3385 | /* end confdefs.h. */ | |
3386 | $ac_includes_default | |
3387 | ||
3388 | #include <$ac_header> | |
3389 | _ACEOF | |
3390 | rm -f conftest.$ac_objext | |
3391 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3392 | (eval $ac_compile) 2>conftest.er1 | |
3393 | ac_status=$? | |
3394 | grep -v '^ *+' conftest.er1 >conftest.err | |
3395 | rm -f conftest.er1 | |
3396 | cat conftest.err >&5 | |
3397 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3398 | (exit $ac_status); } && | |
e8b05380 | 3399 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3400 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3401 | (eval $ac_try) 2>&5 | |
3402 | ac_status=$? | |
3403 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3404 | (exit $ac_status); }; } && | |
3405 | { ac_try='test -s conftest.$ac_objext' | |
3406 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3407 | (eval $ac_try) 2>&5 | |
3408 | ac_status=$? | |
3409 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3410 | (exit $ac_status); }; }; then | |
3411 | eval "$as_ac_Header=yes" | |
3412 | else | |
3413 | echo "$as_me: failed program was:" >&5 | |
3414 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3415 | ||
3416 | eval "$as_ac_Header=no" | |
3417 | fi | |
3418 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3419 | fi | |
3420 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
3421 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
3422 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
3423 | cat >>confdefs.h <<_ACEOF | |
3424 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
3425 | _ACEOF | |
3426 | ||
3427 | fi | |
3428 | ||
3429 | done | |
3430 | ||
3431 | ||
3432 | echo "$as_me:$LINENO: checking for void *" >&5 | |
3433 | echo $ECHO_N "checking for void *... $ECHO_C" >&6 | |
3434 | if test "${ac_cv_type_void_p+set}" = set; then | |
3435 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3436 | else | |
3437 | cat >conftest.$ac_ext <<_ACEOF | |
3438 | /* confdefs.h. */ | |
3439 | _ACEOF | |
3440 | cat confdefs.h >>conftest.$ac_ext | |
3441 | cat >>conftest.$ac_ext <<_ACEOF | |
3442 | /* end confdefs.h. */ | |
3443 | $ac_includes_default | |
3444 | int | |
3445 | main () | |
3446 | { | |
3447 | if ((void * *) 0) | |
3448 | return 0; | |
3449 | if (sizeof (void *)) | |
3450 | return 0; | |
3451 | ; | |
3452 | return 0; | |
3453 | } | |
3454 | _ACEOF | |
3455 | rm -f conftest.$ac_objext | |
3456 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3457 | (eval $ac_compile) 2>conftest.er1 | |
3458 | ac_status=$? | |
3459 | grep -v '^ *+' conftest.er1 >conftest.err | |
3460 | rm -f conftest.er1 | |
3461 | cat conftest.err >&5 | |
3462 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3463 | (exit $ac_status); } && | |
e8b05380 | 3464 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3465 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3466 | (eval $ac_try) 2>&5 | |
3467 | ac_status=$? | |
3468 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3469 | (exit $ac_status); }; } && | |
3470 | { ac_try='test -s conftest.$ac_objext' | |
3471 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3472 | (eval $ac_try) 2>&5 | |
3473 | ac_status=$? | |
3474 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3475 | (exit $ac_status); }; }; then | |
3476 | ac_cv_type_void_p=yes | |
3477 | else | |
3478 | echo "$as_me: failed program was:" >&5 | |
3479 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3480 | ||
3481 | ac_cv_type_void_p=no | |
3482 | fi | |
3483 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3484 | fi | |
3485 | echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 | |
3486 | echo "${ECHO_T}$ac_cv_type_void_p" >&6 | |
3487 | ||
ba479fd2 NN |
3488 | echo "$as_me:$LINENO: checking size of void *" >&5 |
3489 | echo $ECHO_N "checking size of void *... $ECHO_C" >&6 | |
3490 | if test "${ac_cv_sizeof_void_p+set}" = set; then | |
3491 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75b6f3fd | 3492 | else |
bf3b7cd3 JD |
3493 | if test "$ac_cv_type_void_p" = yes; then |
3494 | # The cast to unsigned long works around a bug in the HP C Compiler | |
3495 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
3496 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
3497 | # This bug is HP SR number 8606223364. | |
3498 | if test "$cross_compiling" = yes; then | |
3499 | # Depending upon the size, compute the lo and hi bounds. | |
3500 | cat >conftest.$ac_ext <<_ACEOF | |
3501 | /* confdefs.h. */ | |
3502 | _ACEOF | |
3503 | cat confdefs.h >>conftest.$ac_ext | |
3504 | cat >>conftest.$ac_ext <<_ACEOF | |
3505 | /* end confdefs.h. */ | |
3506 | $ac_includes_default | |
3507 | int | |
3508 | main () | |
3509 | { | |
3510 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)]; | |
3511 | test_array [0] = 0 | |
3512 | ||
3513 | ; | |
3514 | return 0; | |
3515 | } | |
3516 | _ACEOF | |
3517 | rm -f conftest.$ac_objext | |
3518 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3519 | (eval $ac_compile) 2>conftest.er1 | |
3520 | ac_status=$? | |
3521 | grep -v '^ *+' conftest.er1 >conftest.err | |
3522 | rm -f conftest.er1 | |
3523 | cat conftest.err >&5 | |
3524 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3525 | (exit $ac_status); } && | |
e8b05380 | 3526 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3527 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3528 | (eval $ac_try) 2>&5 | |
3529 | ac_status=$? | |
3530 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3531 | (exit $ac_status); }; } && | |
3532 | { ac_try='test -s conftest.$ac_objext' | |
3533 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3534 | (eval $ac_try) 2>&5 | |
3535 | ac_status=$? | |
3536 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3537 | (exit $ac_status); }; }; then | |
3538 | ac_lo=0 ac_mid=0 | |
3539 | while :; do | |
3540 | cat >conftest.$ac_ext <<_ACEOF | |
3541 | /* confdefs.h. */ | |
3542 | _ACEOF | |
3543 | cat confdefs.h >>conftest.$ac_ext | |
3544 | cat >>conftest.$ac_ext <<_ACEOF | |
3545 | /* end confdefs.h. */ | |
3546 | $ac_includes_default | |
3547 | int | |
3548 | main () | |
3549 | { | |
3550 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; | |
3551 | test_array [0] = 0 | |
3552 | ||
3553 | ; | |
3554 | return 0; | |
3555 | } | |
3556 | _ACEOF | |
3557 | rm -f conftest.$ac_objext | |
3558 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3559 | (eval $ac_compile) 2>conftest.er1 | |
3560 | ac_status=$? | |
3561 | grep -v '^ *+' conftest.er1 >conftest.err | |
3562 | rm -f conftest.er1 | |
3563 | cat conftest.err >&5 | |
3564 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3565 | (exit $ac_status); } && | |
e8b05380 | 3566 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3567 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3568 | (eval $ac_try) 2>&5 | |
3569 | ac_status=$? | |
3570 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3571 | (exit $ac_status); }; } && | |
3572 | { ac_try='test -s conftest.$ac_objext' | |
3573 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3574 | (eval $ac_try) 2>&5 | |
3575 | ac_status=$? | |
3576 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3577 | (exit $ac_status); }; }; then | |
3578 | ac_hi=$ac_mid; break | |
3579 | else | |
3580 | echo "$as_me: failed program was:" >&5 | |
3581 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3582 | ||
3583 | ac_lo=`expr $ac_mid + 1` | |
3584 | if test $ac_lo -le $ac_mid; then | |
3585 | ac_lo= ac_hi= | |
3586 | break | |
3587 | fi | |
3588 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
3589 | fi | |
3590 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3591 | done | |
3592 | else | |
3593 | echo "$as_me: failed program was:" >&5 | |
3594 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3595 | ||
3596 | cat >conftest.$ac_ext <<_ACEOF | |
3597 | /* confdefs.h. */ | |
3598 | _ACEOF | |
3599 | cat confdefs.h >>conftest.$ac_ext | |
3600 | cat >>conftest.$ac_ext <<_ACEOF | |
3601 | /* end confdefs.h. */ | |
3602 | $ac_includes_default | |
3603 | int | |
3604 | main () | |
3605 | { | |
3606 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)]; | |
3607 | test_array [0] = 0 | |
3608 | ||
3609 | ; | |
3610 | return 0; | |
3611 | } | |
3612 | _ACEOF | |
3613 | rm -f conftest.$ac_objext | |
3614 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3615 | (eval $ac_compile) 2>conftest.er1 | |
3616 | ac_status=$? | |
3617 | grep -v '^ *+' conftest.er1 >conftest.err | |
3618 | rm -f conftest.er1 | |
3619 | cat conftest.err >&5 | |
3620 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3621 | (exit $ac_status); } && | |
e8b05380 | 3622 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3623 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3624 | (eval $ac_try) 2>&5 | |
3625 | ac_status=$? | |
3626 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3627 | (exit $ac_status); }; } && | |
3628 | { ac_try='test -s conftest.$ac_objext' | |
3629 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3630 | (eval $ac_try) 2>&5 | |
3631 | ac_status=$? | |
3632 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3633 | (exit $ac_status); }; }; then | |
3634 | ac_hi=-1 ac_mid=-1 | |
3635 | while :; do | |
3636 | cat >conftest.$ac_ext <<_ACEOF | |
3637 | /* confdefs.h. */ | |
3638 | _ACEOF | |
3639 | cat confdefs.h >>conftest.$ac_ext | |
3640 | cat >>conftest.$ac_ext <<_ACEOF | |
3641 | /* end confdefs.h. */ | |
3642 | $ac_includes_default | |
3643 | int | |
3644 | main () | |
3645 | { | |
3646 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)]; | |
3647 | test_array [0] = 0 | |
3648 | ||
3649 | ; | |
3650 | return 0; | |
3651 | } | |
3652 | _ACEOF | |
3653 | rm -f conftest.$ac_objext | |
3654 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3655 | (eval $ac_compile) 2>conftest.er1 | |
3656 | ac_status=$? | |
3657 | grep -v '^ *+' conftest.er1 >conftest.err | |
3658 | rm -f conftest.er1 | |
3659 | cat conftest.err >&5 | |
3660 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3661 | (exit $ac_status); } && | |
e8b05380 | 3662 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3663 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3664 | (eval $ac_try) 2>&5 | |
3665 | ac_status=$? | |
3666 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3667 | (exit $ac_status); }; } && | |
3668 | { ac_try='test -s conftest.$ac_objext' | |
3669 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3670 | (eval $ac_try) 2>&5 | |
3671 | ac_status=$? | |
3672 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3673 | (exit $ac_status); }; }; then | |
3674 | ac_lo=$ac_mid; break | |
3675 | else | |
3676 | echo "$as_me: failed program was:" >&5 | |
3677 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3678 | ||
3679 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
3680 | if test $ac_mid -le $ac_hi; then | |
3681 | ac_lo= ac_hi= | |
3682 | break | |
3683 | fi | |
3684 | ac_mid=`expr 2 '*' $ac_mid` | |
3685 | fi | |
3686 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3687 | done | |
3688 | else | |
3689 | echo "$as_me: failed program was:" >&5 | |
3690 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3691 | ||
3692 | ac_lo= ac_hi= | |
3693 | fi | |
3694 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3695 | fi | |
3696 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3697 | # Binary search between lo and hi bounds. | |
3698 | while test "x$ac_lo" != "x$ac_hi"; do | |
3699 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
3700 | cat >conftest.$ac_ext <<_ACEOF | |
3701 | /* confdefs.h. */ | |
3702 | _ACEOF | |
3703 | cat confdefs.h >>conftest.$ac_ext | |
3704 | cat >>conftest.$ac_ext <<_ACEOF | |
3705 | /* end confdefs.h. */ | |
3706 | $ac_includes_default | |
3707 | int | |
3708 | main () | |
3709 | { | |
3710 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; | |
3711 | test_array [0] = 0 | |
3712 | ||
3713 | ; | |
3714 | return 0; | |
3715 | } | |
3716 | _ACEOF | |
3717 | rm -f conftest.$ac_objext | |
3718 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3719 | (eval $ac_compile) 2>conftest.er1 | |
3720 | ac_status=$? | |
3721 | grep -v '^ *+' conftest.er1 >conftest.err | |
3722 | rm -f conftest.er1 | |
3723 | cat conftest.err >&5 | |
3724 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3725 | (exit $ac_status); } && | |
e8b05380 | 3726 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3727 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3728 | (eval $ac_try) 2>&5 | |
3729 | ac_status=$? | |
3730 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3731 | (exit $ac_status); }; } && | |
3732 | { ac_try='test -s conftest.$ac_objext' | |
3733 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3734 | (eval $ac_try) 2>&5 | |
3735 | ac_status=$? | |
3736 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3737 | (exit $ac_status); }; }; then | |
3738 | ac_hi=$ac_mid | |
3739 | else | |
3740 | echo "$as_me: failed program was:" >&5 | |
3741 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3742 | ||
3743 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
3744 | fi | |
3745 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3746 | done | |
3747 | case $ac_lo in | |
3748 | ?*) ac_cv_sizeof_void_p=$ac_lo;; | |
3749 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 | |
3750 | See \`config.log' for more details." >&5 | |
3751 | echo "$as_me: error: cannot compute sizeof (void *), 77 | |
3752 | See \`config.log' for more details." >&2;} | |
3753 | { (exit 1); exit 1; }; } ;; | |
3754 | esac | |
3755 | else | |
3756 | if test "$cross_compiling" = yes; then | |
e8b05380 PB |
3757 | { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 |
3758 | echo "$as_me: error: internal error: not reached in cross-compile" >&2;} | |
bf3b7cd3 JD |
3759 | { (exit 1); exit 1; }; } |
3760 | else | |
3761 | cat >conftest.$ac_ext <<_ACEOF | |
3762 | /* confdefs.h. */ | |
3763 | _ACEOF | |
3764 | cat confdefs.h >>conftest.$ac_ext | |
3765 | cat >>conftest.$ac_ext <<_ACEOF | |
3766 | /* end confdefs.h. */ | |
3767 | $ac_includes_default | |
3768 | long longval () { return (long) (sizeof (void *)); } | |
3769 | unsigned long ulongval () { return (long) (sizeof (void *)); } | |
3770 | #include <stdio.h> | |
3771 | #include <stdlib.h> | |
3772 | int | |
3773 | main () | |
3774 | { | |
3775 | ||
3776 | FILE *f = fopen ("conftest.val", "w"); | |
3777 | if (! f) | |
3778 | exit (1); | |
3779 | if (((long) (sizeof (void *))) < 0) | |
3780 | { | |
3781 | long i = longval (); | |
3782 | if (i != ((long) (sizeof (void *)))) | |
3783 | exit (1); | |
3784 | fprintf (f, "%ld\n", i); | |
3785 | } | |
3786 | else | |
3787 | { | |
3788 | unsigned long i = ulongval (); | |
3789 | if (i != ((long) (sizeof (void *)))) | |
3790 | exit (1); | |
3791 | fprintf (f, "%lu\n", i); | |
3792 | } | |
3793 | exit (ferror (f) || fclose (f) != 0); | |
3794 | ||
3795 | ; | |
3796 | return 0; | |
3797 | } | |
3798 | _ACEOF | |
3799 | rm -f conftest$ac_exeext | |
3800 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3801 | (eval $ac_link) 2>&5 | |
3802 | ac_status=$? | |
3803 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3804 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
3805 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3806 | (eval $ac_try) 2>&5 | |
3807 | ac_status=$? | |
3808 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3809 | (exit $ac_status); }; }; then | |
3810 | ac_cv_sizeof_void_p=`cat conftest.val` | |
3811 | else | |
3812 | echo "$as_me: program exited with status $ac_status" >&5 | |
3813 | echo "$as_me: failed program was:" >&5 | |
3814 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3815 | ||
3816 | ( exit $ac_status ) | |
3817 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 | |
3818 | See \`config.log' for more details." >&5 | |
3819 | echo "$as_me: error: cannot compute sizeof (void *), 77 | |
3820 | See \`config.log' for more details." >&2;} | |
3821 | { (exit 1); exit 1; }; } | |
3822 | fi | |
3823 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
3824 | fi | |
3825 | fi | |
3826 | rm -f conftest.val | |
3827 | else | |
3828 | ac_cv_sizeof_void_p=0 | |
3829 | fi | |
3830 | fi | |
3831 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 | |
3832 | echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 | |
3833 | cat >>confdefs.h <<_ACEOF | |
3834 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p | |
3835 | _ACEOF | |
3836 | ||
3837 | ||
3838 | echo "$as_me:$LINENO: checking for short" >&5 | |
3839 | echo $ECHO_N "checking for short... $ECHO_C" >&6 | |
3840 | if test "${ac_cv_type_short+set}" = set; then | |
3841 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3842 | else | |
3843 | cat >conftest.$ac_ext <<_ACEOF | |
3844 | /* confdefs.h. */ | |
3845 | _ACEOF | |
3846 | cat confdefs.h >>conftest.$ac_ext | |
3847 | cat >>conftest.$ac_ext <<_ACEOF | |
3848 | /* end confdefs.h. */ | |
3849 | $ac_includes_default | |
3850 | int | |
3851 | main () | |
3852 | { | |
3853 | if ((short *) 0) | |
3854 | return 0; | |
3855 | if (sizeof (short)) | |
3856 | return 0; | |
3857 | ; | |
3858 | return 0; | |
3859 | } | |
3860 | _ACEOF | |
3861 | rm -f conftest.$ac_objext | |
3862 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3863 | (eval $ac_compile) 2>conftest.er1 | |
3864 | ac_status=$? | |
3865 | grep -v '^ *+' conftest.er1 >conftest.err | |
3866 | rm -f conftest.er1 | |
3867 | cat conftest.err >&5 | |
3868 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3869 | (exit $ac_status); } && | |
e8b05380 | 3870 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3871 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3872 | (eval $ac_try) 2>&5 | |
3873 | ac_status=$? | |
3874 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3875 | (exit $ac_status); }; } && | |
3876 | { ac_try='test -s conftest.$ac_objext' | |
3877 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3878 | (eval $ac_try) 2>&5 | |
3879 | ac_status=$? | |
3880 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3881 | (exit $ac_status); }; }; then | |
3882 | ac_cv_type_short=yes | |
3883 | else | |
3884 | echo "$as_me: failed program was:" >&5 | |
3885 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3886 | ||
3887 | ac_cv_type_short=no | |
3888 | fi | |
3889 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3890 | fi | |
3891 | echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 | |
3892 | echo "${ECHO_T}$ac_cv_type_short" >&6 | |
3893 | ||
3894 | echo "$as_me:$LINENO: checking size of short" >&5 | |
3895 | echo $ECHO_N "checking size of short... $ECHO_C" >&6 | |
3896 | if test "${ac_cv_sizeof_short+set}" = set; then | |
3897 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3898 | else | |
3899 | if test "$ac_cv_type_short" = yes; then | |
3900 | # The cast to unsigned long works around a bug in the HP C Compiler | |
3901 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
3902 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
3903 | # This bug is HP SR number 8606223364. | |
3904 | if test "$cross_compiling" = yes; then | |
3905 | # Depending upon the size, compute the lo and hi bounds. | |
3906 | cat >conftest.$ac_ext <<_ACEOF | |
3907 | /* confdefs.h. */ | |
3908 | _ACEOF | |
3909 | cat confdefs.h >>conftest.$ac_ext | |
3910 | cat >>conftest.$ac_ext <<_ACEOF | |
3911 | /* end confdefs.h. */ | |
3912 | $ac_includes_default | |
3913 | int | |
3914 | main () | |
3915 | { | |
3916 | static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; | |
3917 | test_array [0] = 0 | |
3918 | ||
3919 | ; | |
3920 | return 0; | |
3921 | } | |
3922 | _ACEOF | |
3923 | rm -f conftest.$ac_objext | |
3924 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3925 | (eval $ac_compile) 2>conftest.er1 | |
3926 | ac_status=$? | |
3927 | grep -v '^ *+' conftest.er1 >conftest.err | |
3928 | rm -f conftest.er1 | |
3929 | cat conftest.err >&5 | |
3930 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3931 | (exit $ac_status); } && | |
e8b05380 | 3932 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3933 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3934 | (eval $ac_try) 2>&5 | |
3935 | ac_status=$? | |
3936 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3937 | (exit $ac_status); }; } && | |
3938 | { ac_try='test -s conftest.$ac_objext' | |
3939 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3940 | (eval $ac_try) 2>&5 | |
3941 | ac_status=$? | |
3942 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3943 | (exit $ac_status); }; }; then | |
3944 | ac_lo=0 ac_mid=0 | |
3945 | while :; do | |
3946 | cat >conftest.$ac_ext <<_ACEOF | |
3947 | /* confdefs.h. */ | |
3948 | _ACEOF | |
3949 | cat confdefs.h >>conftest.$ac_ext | |
3950 | cat >>conftest.$ac_ext <<_ACEOF | |
3951 | /* end confdefs.h. */ | |
3952 | $ac_includes_default | |
3953 | int | |
3954 | main () | |
3955 | { | |
3956 | static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; | |
3957 | test_array [0] = 0 | |
3958 | ||
3959 | ; | |
3960 | return 0; | |
3961 | } | |
3962 | _ACEOF | |
3963 | rm -f conftest.$ac_objext | |
3964 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3965 | (eval $ac_compile) 2>conftest.er1 | |
3966 | ac_status=$? | |
3967 | grep -v '^ *+' conftest.er1 >conftest.err | |
3968 | rm -f conftest.er1 | |
3969 | cat conftest.err >&5 | |
3970 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3971 | (exit $ac_status); } && | |
e8b05380 | 3972 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
3973 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3974 | (eval $ac_try) 2>&5 | |
3975 | ac_status=$? | |
3976 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3977 | (exit $ac_status); }; } && | |
3978 | { ac_try='test -s conftest.$ac_objext' | |
3979 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3980 | (eval $ac_try) 2>&5 | |
3981 | ac_status=$? | |
3982 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3983 | (exit $ac_status); }; }; then | |
3984 | ac_hi=$ac_mid; break | |
3985 | else | |
3986 | echo "$as_me: failed program was:" >&5 | |
3987 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3988 | ||
3989 | ac_lo=`expr $ac_mid + 1` | |
3990 | if test $ac_lo -le $ac_mid; then | |
3991 | ac_lo= ac_hi= | |
3992 | break | |
3993 | fi | |
3994 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
3995 | fi | |
3996 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3997 | done | |
3998 | else | |
3999 | echo "$as_me: failed program was:" >&5 | |
4000 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4001 | ||
4002 | cat >conftest.$ac_ext <<_ACEOF | |
4003 | /* confdefs.h. */ | |
4004 | _ACEOF | |
4005 | cat confdefs.h >>conftest.$ac_ext | |
4006 | cat >>conftest.$ac_ext <<_ACEOF | |
4007 | /* end confdefs.h. */ | |
4008 | $ac_includes_default | |
4009 | int | |
4010 | main () | |
4011 | { | |
4012 | static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; | |
4013 | test_array [0] = 0 | |
4014 | ||
4015 | ; | |
4016 | return 0; | |
4017 | } | |
4018 | _ACEOF | |
4019 | rm -f conftest.$ac_objext | |
4020 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4021 | (eval $ac_compile) 2>conftest.er1 | |
4022 | ac_status=$? | |
4023 | grep -v '^ *+' conftest.er1 >conftest.err | |
4024 | rm -f conftest.er1 | |
4025 | cat conftest.err >&5 | |
4026 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4027 | (exit $ac_status); } && | |
e8b05380 | 4028 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4029 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4030 | (eval $ac_try) 2>&5 | |
4031 | ac_status=$? | |
4032 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4033 | (exit $ac_status); }; } && | |
4034 | { ac_try='test -s conftest.$ac_objext' | |
4035 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4036 | (eval $ac_try) 2>&5 | |
4037 | ac_status=$? | |
4038 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4039 | (exit $ac_status); }; }; then | |
4040 | ac_hi=-1 ac_mid=-1 | |
4041 | while :; do | |
4042 | cat >conftest.$ac_ext <<_ACEOF | |
4043 | /* confdefs.h. */ | |
4044 | _ACEOF | |
4045 | cat confdefs.h >>conftest.$ac_ext | |
4046 | cat >>conftest.$ac_ext <<_ACEOF | |
4047 | /* end confdefs.h. */ | |
4048 | $ac_includes_default | |
4049 | int | |
4050 | main () | |
4051 | { | |
4052 | static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; | |
4053 | test_array [0] = 0 | |
4054 | ||
4055 | ; | |
4056 | return 0; | |
4057 | } | |
4058 | _ACEOF | |
4059 | rm -f conftest.$ac_objext | |
4060 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4061 | (eval $ac_compile) 2>conftest.er1 | |
4062 | ac_status=$? | |
4063 | grep -v '^ *+' conftest.er1 >conftest.err | |
4064 | rm -f conftest.er1 | |
4065 | cat conftest.err >&5 | |
4066 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4067 | (exit $ac_status); } && | |
e8b05380 | 4068 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4069 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4070 | (eval $ac_try) 2>&5 | |
4071 | ac_status=$? | |
4072 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4073 | (exit $ac_status); }; } && | |
4074 | { ac_try='test -s conftest.$ac_objext' | |
4075 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4076 | (eval $ac_try) 2>&5 | |
4077 | ac_status=$? | |
4078 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4079 | (exit $ac_status); }; }; then | |
4080 | ac_lo=$ac_mid; break | |
4081 | else | |
4082 | echo "$as_me: failed program was:" >&5 | |
4083 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4084 | ||
4085 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4086 | if test $ac_mid -le $ac_hi; then | |
4087 | ac_lo= ac_hi= | |
4088 | break | |
4089 | fi | |
4090 | ac_mid=`expr 2 '*' $ac_mid` | |
4091 | fi | |
4092 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4093 | done | |
4094 | else | |
4095 | echo "$as_me: failed program was:" >&5 | |
4096 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4097 | ||
4098 | ac_lo= ac_hi= | |
4099 | fi | |
4100 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4101 | fi | |
4102 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4103 | # Binary search between lo and hi bounds. | |
4104 | while test "x$ac_lo" != "x$ac_hi"; do | |
4105 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4106 | cat >conftest.$ac_ext <<_ACEOF | |
4107 | /* confdefs.h. */ | |
4108 | _ACEOF | |
4109 | cat confdefs.h >>conftest.$ac_ext | |
4110 | cat >>conftest.$ac_ext <<_ACEOF | |
4111 | /* end confdefs.h. */ | |
4112 | $ac_includes_default | |
4113 | int | |
4114 | main () | |
4115 | { | |
4116 | static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; | |
4117 | test_array [0] = 0 | |
4118 | ||
4119 | ; | |
4120 | return 0; | |
4121 | } | |
4122 | _ACEOF | |
4123 | rm -f conftest.$ac_objext | |
4124 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4125 | (eval $ac_compile) 2>conftest.er1 | |
4126 | ac_status=$? | |
4127 | grep -v '^ *+' conftest.er1 >conftest.err | |
4128 | rm -f conftest.er1 | |
4129 | cat conftest.err >&5 | |
4130 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4131 | (exit $ac_status); } && | |
e8b05380 | 4132 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4133 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4134 | (eval $ac_try) 2>&5 | |
4135 | ac_status=$? | |
4136 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4137 | (exit $ac_status); }; } && | |
4138 | { ac_try='test -s conftest.$ac_objext' | |
4139 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4140 | (eval $ac_try) 2>&5 | |
4141 | ac_status=$? | |
4142 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4143 | (exit $ac_status); }; }; then | |
4144 | ac_hi=$ac_mid | |
4145 | else | |
4146 | echo "$as_me: failed program was:" >&5 | |
4147 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4148 | ||
4149 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4150 | fi | |
4151 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4152 | done | |
4153 | case $ac_lo in | |
4154 | ?*) ac_cv_sizeof_short=$ac_lo;; | |
4155 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 | |
4156 | See \`config.log' for more details." >&5 | |
4157 | echo "$as_me: error: cannot compute sizeof (short), 77 | |
4158 | See \`config.log' for more details." >&2;} | |
4159 | { (exit 1); exit 1; }; } ;; | |
4160 | esac | |
4161 | else | |
4162 | if test "$cross_compiling" = yes; then | |
e8b05380 PB |
4163 | { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 |
4164 | echo "$as_me: error: internal error: not reached in cross-compile" >&2;} | |
bf3b7cd3 JD |
4165 | { (exit 1); exit 1; }; } |
4166 | else | |
4167 | cat >conftest.$ac_ext <<_ACEOF | |
4168 | /* confdefs.h. */ | |
4169 | _ACEOF | |
4170 | cat confdefs.h >>conftest.$ac_ext | |
4171 | cat >>conftest.$ac_ext <<_ACEOF | |
4172 | /* end confdefs.h. */ | |
4173 | $ac_includes_default | |
4174 | long longval () { return (long) (sizeof (short)); } | |
4175 | unsigned long ulongval () { return (long) (sizeof (short)); } | |
4176 | #include <stdio.h> | |
4177 | #include <stdlib.h> | |
4178 | int | |
4179 | main () | |
4180 | { | |
4181 | ||
4182 | FILE *f = fopen ("conftest.val", "w"); | |
4183 | if (! f) | |
4184 | exit (1); | |
4185 | if (((long) (sizeof (short))) < 0) | |
4186 | { | |
4187 | long i = longval (); | |
4188 | if (i != ((long) (sizeof (short)))) | |
4189 | exit (1); | |
4190 | fprintf (f, "%ld\n", i); | |
4191 | } | |
4192 | else | |
4193 | { | |
4194 | unsigned long i = ulongval (); | |
4195 | if (i != ((long) (sizeof (short)))) | |
4196 | exit (1); | |
4197 | fprintf (f, "%lu\n", i); | |
4198 | } | |
4199 | exit (ferror (f) || fclose (f) != 0); | |
4200 | ||
4201 | ; | |
4202 | return 0; | |
4203 | } | |
4204 | _ACEOF | |
4205 | rm -f conftest$ac_exeext | |
4206 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4207 | (eval $ac_link) 2>&5 | |
4208 | ac_status=$? | |
4209 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4210 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4211 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4212 | (eval $ac_try) 2>&5 | |
4213 | ac_status=$? | |
4214 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4215 | (exit $ac_status); }; }; then | |
4216 | ac_cv_sizeof_short=`cat conftest.val` | |
4217 | else | |
4218 | echo "$as_me: program exited with status $ac_status" >&5 | |
4219 | echo "$as_me: failed program was:" >&5 | |
4220 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4221 | ||
4222 | ( exit $ac_status ) | |
4223 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 | |
4224 | See \`config.log' for more details." >&5 | |
4225 | echo "$as_me: error: cannot compute sizeof (short), 77 | |
4226 | See \`config.log' for more details." >&2;} | |
4227 | { (exit 1); exit 1; }; } | |
4228 | fi | |
4229 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
4230 | fi | |
4231 | fi | |
4232 | rm -f conftest.val | |
4233 | else | |
4234 | ac_cv_sizeof_short=0 | |
4235 | fi | |
4236 | fi | |
4237 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 | |
4238 | echo "${ECHO_T}$ac_cv_sizeof_short" >&6 | |
4239 | cat >>confdefs.h <<_ACEOF | |
4240 | #define SIZEOF_SHORT $ac_cv_sizeof_short | |
4241 | _ACEOF | |
4242 | ||
4243 | ||
4244 | echo "$as_me:$LINENO: checking for int" >&5 | |
4245 | echo $ECHO_N "checking for int... $ECHO_C" >&6 | |
4246 | if test "${ac_cv_type_int+set}" = set; then | |
4247 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4248 | else | |
4249 | cat >conftest.$ac_ext <<_ACEOF | |
4250 | /* confdefs.h. */ | |
4251 | _ACEOF | |
4252 | cat confdefs.h >>conftest.$ac_ext | |
4253 | cat >>conftest.$ac_ext <<_ACEOF | |
4254 | /* end confdefs.h. */ | |
4255 | $ac_includes_default | |
4256 | int | |
4257 | main () | |
4258 | { | |
4259 | if ((int *) 0) | |
4260 | return 0; | |
4261 | if (sizeof (int)) | |
4262 | return 0; | |
4263 | ; | |
4264 | return 0; | |
4265 | } | |
4266 | _ACEOF | |
4267 | rm -f conftest.$ac_objext | |
4268 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4269 | (eval $ac_compile) 2>conftest.er1 | |
4270 | ac_status=$? | |
4271 | grep -v '^ *+' conftest.er1 >conftest.err | |
4272 | rm -f conftest.er1 | |
4273 | cat conftest.err >&5 | |
4274 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4275 | (exit $ac_status); } && | |
e8b05380 | 4276 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4277 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4278 | (eval $ac_try) 2>&5 | |
4279 | ac_status=$? | |
4280 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4281 | (exit $ac_status); }; } && | |
4282 | { ac_try='test -s conftest.$ac_objext' | |
4283 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4284 | (eval $ac_try) 2>&5 | |
4285 | ac_status=$? | |
4286 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4287 | (exit $ac_status); }; }; then | |
4288 | ac_cv_type_int=yes | |
4289 | else | |
4290 | echo "$as_me: failed program was:" >&5 | |
4291 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4292 | ||
4293 | ac_cv_type_int=no | |
4294 | fi | |
4295 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4296 | fi | |
4297 | echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 | |
4298 | echo "${ECHO_T}$ac_cv_type_int" >&6 | |
4299 | ||
4300 | echo "$as_me:$LINENO: checking size of int" >&5 | |
4301 | echo $ECHO_N "checking size of int... $ECHO_C" >&6 | |
4302 | if test "${ac_cv_sizeof_int+set}" = set; then | |
4303 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4304 | else | |
4305 | if test "$ac_cv_type_int" = yes; then | |
4306 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4307 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4308 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4309 | # This bug is HP SR number 8606223364. | |
4310 | if test "$cross_compiling" = yes; then | |
4311 | # Depending upon the size, compute the lo and hi bounds. | |
4312 | cat >conftest.$ac_ext <<_ACEOF | |
4313 | /* confdefs.h. */ | |
4314 | _ACEOF | |
4315 | cat confdefs.h >>conftest.$ac_ext | |
4316 | cat >>conftest.$ac_ext <<_ACEOF | |
4317 | /* end confdefs.h. */ | |
4318 | $ac_includes_default | |
4319 | int | |
4320 | main () | |
4321 | { | |
4322 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; | |
4323 | test_array [0] = 0 | |
4324 | ||
4325 | ; | |
4326 | return 0; | |
4327 | } | |
4328 | _ACEOF | |
4329 | rm -f conftest.$ac_objext | |
4330 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4331 | (eval $ac_compile) 2>conftest.er1 | |
4332 | ac_status=$? | |
4333 | grep -v '^ *+' conftest.er1 >conftest.err | |
4334 | rm -f conftest.er1 | |
4335 | cat conftest.err >&5 | |
4336 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4337 | (exit $ac_status); } && | |
e8b05380 | 4338 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4339 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4340 | (eval $ac_try) 2>&5 | |
4341 | ac_status=$? | |
4342 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4343 | (exit $ac_status); }; } && | |
4344 | { ac_try='test -s conftest.$ac_objext' | |
4345 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4346 | (eval $ac_try) 2>&5 | |
4347 | ac_status=$? | |
4348 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4349 | (exit $ac_status); }; }; then | |
4350 | ac_lo=0 ac_mid=0 | |
4351 | while :; do | |
4352 | cat >conftest.$ac_ext <<_ACEOF | |
4353 | /* confdefs.h. */ | |
4354 | _ACEOF | |
4355 | cat confdefs.h >>conftest.$ac_ext | |
4356 | cat >>conftest.$ac_ext <<_ACEOF | |
4357 | /* end confdefs.h. */ | |
4358 | $ac_includes_default | |
4359 | int | |
4360 | main () | |
4361 | { | |
4362 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; | |
4363 | test_array [0] = 0 | |
4364 | ||
4365 | ; | |
4366 | return 0; | |
4367 | } | |
4368 | _ACEOF | |
4369 | rm -f conftest.$ac_objext | |
4370 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4371 | (eval $ac_compile) 2>conftest.er1 | |
4372 | ac_status=$? | |
4373 | grep -v '^ *+' conftest.er1 >conftest.err | |
4374 | rm -f conftest.er1 | |
4375 | cat conftest.err >&5 | |
4376 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4377 | (exit $ac_status); } && | |
e8b05380 | 4378 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4379 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4380 | (eval $ac_try) 2>&5 | |
4381 | ac_status=$? | |
4382 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4383 | (exit $ac_status); }; } && | |
4384 | { ac_try='test -s conftest.$ac_objext' | |
4385 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4386 | (eval $ac_try) 2>&5 | |
4387 | ac_status=$? | |
4388 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4389 | (exit $ac_status); }; }; then | |
4390 | ac_hi=$ac_mid; break | |
4391 | else | |
4392 | echo "$as_me: failed program was:" >&5 | |
4393 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4394 | ||
4395 | ac_lo=`expr $ac_mid + 1` | |
4396 | if test $ac_lo -le $ac_mid; then | |
4397 | ac_lo= ac_hi= | |
4398 | break | |
4399 | fi | |
4400 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4401 | fi | |
4402 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4403 | done | |
4404 | else | |
4405 | echo "$as_me: failed program was:" >&5 | |
4406 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4407 | ||
4408 | cat >conftest.$ac_ext <<_ACEOF | |
4409 | /* confdefs.h. */ | |
4410 | _ACEOF | |
4411 | cat confdefs.h >>conftest.$ac_ext | |
4412 | cat >>conftest.$ac_ext <<_ACEOF | |
4413 | /* end confdefs.h. */ | |
4414 | $ac_includes_default | |
4415 | int | |
4416 | main () | |
4417 | { | |
4418 | static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; | |
4419 | test_array [0] = 0 | |
4420 | ||
4421 | ; | |
4422 | return 0; | |
4423 | } | |
4424 | _ACEOF | |
4425 | rm -f conftest.$ac_objext | |
4426 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4427 | (eval $ac_compile) 2>conftest.er1 | |
4428 | ac_status=$? | |
4429 | grep -v '^ *+' conftest.er1 >conftest.err | |
4430 | rm -f conftest.er1 | |
4431 | cat conftest.err >&5 | |
4432 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4433 | (exit $ac_status); } && | |
e8b05380 | 4434 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4435 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4436 | (eval $ac_try) 2>&5 | |
4437 | ac_status=$? | |
4438 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4439 | (exit $ac_status); }; } && | |
4440 | { ac_try='test -s conftest.$ac_objext' | |
4441 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4442 | (eval $ac_try) 2>&5 | |
4443 | ac_status=$? | |
4444 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4445 | (exit $ac_status); }; }; then | |
4446 | ac_hi=-1 ac_mid=-1 | |
4447 | while :; do | |
4448 | cat >conftest.$ac_ext <<_ACEOF | |
4449 | /* confdefs.h. */ | |
4450 | _ACEOF | |
4451 | cat confdefs.h >>conftest.$ac_ext | |
4452 | cat >>conftest.$ac_ext <<_ACEOF | |
4453 | /* end confdefs.h. */ | |
4454 | $ac_includes_default | |
4455 | int | |
4456 | main () | |
4457 | { | |
4458 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; | |
4459 | test_array [0] = 0 | |
4460 | ||
4461 | ; | |
4462 | return 0; | |
4463 | } | |
4464 | _ACEOF | |
4465 | rm -f conftest.$ac_objext | |
4466 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4467 | (eval $ac_compile) 2>conftest.er1 | |
4468 | ac_status=$? | |
4469 | grep -v '^ *+' conftest.er1 >conftest.err | |
4470 | rm -f conftest.er1 | |
4471 | cat conftest.err >&5 | |
4472 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4473 | (exit $ac_status); } && | |
e8b05380 | 4474 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4475 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4476 | (eval $ac_try) 2>&5 | |
4477 | ac_status=$? | |
4478 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4479 | (exit $ac_status); }; } && | |
4480 | { ac_try='test -s conftest.$ac_objext' | |
4481 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4482 | (eval $ac_try) 2>&5 | |
4483 | ac_status=$? | |
4484 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4485 | (exit $ac_status); }; }; then | |
4486 | ac_lo=$ac_mid; break | |
4487 | else | |
4488 | echo "$as_me: failed program was:" >&5 | |
4489 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4490 | ||
4491 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4492 | if test $ac_mid -le $ac_hi; then | |
4493 | ac_lo= ac_hi= | |
4494 | break | |
4495 | fi | |
4496 | ac_mid=`expr 2 '*' $ac_mid` | |
4497 | fi | |
4498 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4499 | done | |
4500 | else | |
4501 | echo "$as_me: failed program was:" >&5 | |
4502 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4503 | ||
4504 | ac_lo= ac_hi= | |
4505 | fi | |
4506 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4507 | fi | |
4508 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4509 | # Binary search between lo and hi bounds. | |
4510 | while test "x$ac_lo" != "x$ac_hi"; do | |
4511 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4512 | cat >conftest.$ac_ext <<_ACEOF | |
4513 | /* confdefs.h. */ | |
4514 | _ACEOF | |
4515 | cat confdefs.h >>conftest.$ac_ext | |
4516 | cat >>conftest.$ac_ext <<_ACEOF | |
4517 | /* end confdefs.h. */ | |
4518 | $ac_includes_default | |
4519 | int | |
4520 | main () | |
4521 | { | |
4522 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; | |
4523 | test_array [0] = 0 | |
4524 | ||
4525 | ; | |
4526 | return 0; | |
4527 | } | |
4528 | _ACEOF | |
4529 | rm -f conftest.$ac_objext | |
4530 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4531 | (eval $ac_compile) 2>conftest.er1 | |
4532 | ac_status=$? | |
4533 | grep -v '^ *+' conftest.er1 >conftest.err | |
4534 | rm -f conftest.er1 | |
4535 | cat conftest.err >&5 | |
4536 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4537 | (exit $ac_status); } && | |
e8b05380 | 4538 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4539 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4540 | (eval $ac_try) 2>&5 | |
4541 | ac_status=$? | |
4542 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4543 | (exit $ac_status); }; } && | |
4544 | { ac_try='test -s conftest.$ac_objext' | |
4545 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4546 | (eval $ac_try) 2>&5 | |
4547 | ac_status=$? | |
4548 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4549 | (exit $ac_status); }; }; then | |
4550 | ac_hi=$ac_mid | |
4551 | else | |
4552 | echo "$as_me: failed program was:" >&5 | |
4553 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4554 | ||
4555 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4556 | fi | |
4557 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4558 | done | |
4559 | case $ac_lo in | |
4560 | ?*) ac_cv_sizeof_int=$ac_lo;; | |
4561 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 | |
4562 | See \`config.log' for more details." >&5 | |
4563 | echo "$as_me: error: cannot compute sizeof (int), 77 | |
4564 | See \`config.log' for more details." >&2;} | |
4565 | { (exit 1); exit 1; }; } ;; | |
4566 | esac | |
4567 | else | |
4568 | if test "$cross_compiling" = yes; then | |
e8b05380 PB |
4569 | { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 |
4570 | echo "$as_me: error: internal error: not reached in cross-compile" >&2;} | |
bf3b7cd3 JD |
4571 | { (exit 1); exit 1; }; } |
4572 | else | |
4573 | cat >conftest.$ac_ext <<_ACEOF | |
4574 | /* confdefs.h. */ | |
4575 | _ACEOF | |
4576 | cat confdefs.h >>conftest.$ac_ext | |
4577 | cat >>conftest.$ac_ext <<_ACEOF | |
4578 | /* end confdefs.h. */ | |
4579 | $ac_includes_default | |
4580 | long longval () { return (long) (sizeof (int)); } | |
4581 | unsigned long ulongval () { return (long) (sizeof (int)); } | |
4582 | #include <stdio.h> | |
4583 | #include <stdlib.h> | |
4584 | int | |
4585 | main () | |
4586 | { | |
4587 | ||
4588 | FILE *f = fopen ("conftest.val", "w"); | |
4589 | if (! f) | |
4590 | exit (1); | |
4591 | if (((long) (sizeof (int))) < 0) | |
4592 | { | |
4593 | long i = longval (); | |
4594 | if (i != ((long) (sizeof (int)))) | |
4595 | exit (1); | |
4596 | fprintf (f, "%ld\n", i); | |
4597 | } | |
4598 | else | |
4599 | { | |
4600 | unsigned long i = ulongval (); | |
4601 | if (i != ((long) (sizeof (int)))) | |
4602 | exit (1); | |
4603 | fprintf (f, "%lu\n", i); | |
4604 | } | |
4605 | exit (ferror (f) || fclose (f) != 0); | |
4606 | ||
4607 | ; | |
4608 | return 0; | |
4609 | } | |
4610 | _ACEOF | |
4611 | rm -f conftest$ac_exeext | |
4612 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4613 | (eval $ac_link) 2>&5 | |
4614 | ac_status=$? | |
4615 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4616 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4617 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4618 | (eval $ac_try) 2>&5 | |
4619 | ac_status=$? | |
4620 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4621 | (exit $ac_status); }; }; then | |
4622 | ac_cv_sizeof_int=`cat conftest.val` | |
4623 | else | |
4624 | echo "$as_me: program exited with status $ac_status" >&5 | |
4625 | echo "$as_me: failed program was:" >&5 | |
4626 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4627 | ||
4628 | ( exit $ac_status ) | |
4629 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 | |
4630 | See \`config.log' for more details." >&5 | |
4631 | echo "$as_me: error: cannot compute sizeof (int), 77 | |
4632 | See \`config.log' for more details." >&2;} | |
4633 | { (exit 1); exit 1; }; } | |
4634 | fi | |
4635 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
4636 | fi | |
4637 | fi | |
4638 | rm -f conftest.val | |
4639 | else | |
4640 | ac_cv_sizeof_int=0 | |
4641 | fi | |
4642 | fi | |
4643 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 | |
4644 | echo "${ECHO_T}$ac_cv_sizeof_int" >&6 | |
4645 | cat >>confdefs.h <<_ACEOF | |
4646 | #define SIZEOF_INT $ac_cv_sizeof_int | |
4647 | _ACEOF | |
4648 | ||
4649 | ||
4650 | echo "$as_me:$LINENO: checking for long" >&5 | |
4651 | echo $ECHO_N "checking for long... $ECHO_C" >&6 | |
4652 | if test "${ac_cv_type_long+set}" = set; then | |
4653 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4654 | else | |
4655 | cat >conftest.$ac_ext <<_ACEOF | |
4656 | /* confdefs.h. */ | |
4657 | _ACEOF | |
4658 | cat confdefs.h >>conftest.$ac_ext | |
4659 | cat >>conftest.$ac_ext <<_ACEOF | |
4660 | /* end confdefs.h. */ | |
4661 | $ac_includes_default | |
4662 | int | |
4663 | main () | |
4664 | { | |
4665 | if ((long *) 0) | |
4666 | return 0; | |
4667 | if (sizeof (long)) | |
4668 | return 0; | |
4669 | ; | |
4670 | return 0; | |
4671 | } | |
4672 | _ACEOF | |
4673 | rm -f conftest.$ac_objext | |
4674 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4675 | (eval $ac_compile) 2>conftest.er1 | |
4676 | ac_status=$? | |
4677 | grep -v '^ *+' conftest.er1 >conftest.err | |
4678 | rm -f conftest.er1 | |
4679 | cat conftest.err >&5 | |
4680 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4681 | (exit $ac_status); } && | |
e8b05380 | 4682 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4683 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4684 | (eval $ac_try) 2>&5 | |
4685 | ac_status=$? | |
4686 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4687 | (exit $ac_status); }; } && | |
4688 | { ac_try='test -s conftest.$ac_objext' | |
4689 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4690 | (eval $ac_try) 2>&5 | |
4691 | ac_status=$? | |
4692 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4693 | (exit $ac_status); }; }; then | |
4694 | ac_cv_type_long=yes | |
4695 | else | |
4696 | echo "$as_me: failed program was:" >&5 | |
4697 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4698 | ||
4699 | ac_cv_type_long=no | |
4700 | fi | |
4701 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4702 | fi | |
4703 | echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 | |
4704 | echo "${ECHO_T}$ac_cv_type_long" >&6 | |
4705 | ||
4706 | echo "$as_me:$LINENO: checking size of long" >&5 | |
4707 | echo $ECHO_N "checking size of long... $ECHO_C" >&6 | |
4708 | if test "${ac_cv_sizeof_long+set}" = set; then | |
4709 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4710 | else | |
4711 | if test "$ac_cv_type_long" = yes; then | |
4712 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4713 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4714 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4715 | # This bug is HP SR number 8606223364. | |
4716 | if test "$cross_compiling" = yes; then | |
4717 | # Depending upon the size, compute the lo and hi bounds. | |
4718 | cat >conftest.$ac_ext <<_ACEOF | |
4719 | /* confdefs.h. */ | |
4720 | _ACEOF | |
4721 | cat confdefs.h >>conftest.$ac_ext | |
4722 | cat >>conftest.$ac_ext <<_ACEOF | |
4723 | /* end confdefs.h. */ | |
4724 | $ac_includes_default | |
4725 | int | |
4726 | main () | |
4727 | { | |
4728 | static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; | |
4729 | test_array [0] = 0 | |
4730 | ||
4731 | ; | |
4732 | return 0; | |
4733 | } | |
4734 | _ACEOF | |
4735 | rm -f conftest.$ac_objext | |
4736 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4737 | (eval $ac_compile) 2>conftest.er1 | |
4738 | ac_status=$? | |
4739 | grep -v '^ *+' conftest.er1 >conftest.err | |
4740 | rm -f conftest.er1 | |
4741 | cat conftest.err >&5 | |
4742 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4743 | (exit $ac_status); } && | |
e8b05380 | 4744 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4745 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4746 | (eval $ac_try) 2>&5 | |
4747 | ac_status=$? | |
4748 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4749 | (exit $ac_status); }; } && | |
4750 | { ac_try='test -s conftest.$ac_objext' | |
4751 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4752 | (eval $ac_try) 2>&5 | |
4753 | ac_status=$? | |
4754 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4755 | (exit $ac_status); }; }; then | |
4756 | ac_lo=0 ac_mid=0 | |
4757 | while :; do | |
4758 | cat >conftest.$ac_ext <<_ACEOF | |
4759 | /* confdefs.h. */ | |
4760 | _ACEOF | |
4761 | cat confdefs.h >>conftest.$ac_ext | |
4762 | cat >>conftest.$ac_ext <<_ACEOF | |
4763 | /* end confdefs.h. */ | |
4764 | $ac_includes_default | |
4765 | int | |
4766 | main () | |
4767 | { | |
4768 | static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; | |
4769 | test_array [0] = 0 | |
4770 | ||
4771 | ; | |
4772 | return 0; | |
4773 | } | |
4774 | _ACEOF | |
4775 | rm -f conftest.$ac_objext | |
4776 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4777 | (eval $ac_compile) 2>conftest.er1 | |
4778 | ac_status=$? | |
4779 | grep -v '^ *+' conftest.er1 >conftest.err | |
4780 | rm -f conftest.er1 | |
4781 | cat conftest.err >&5 | |
4782 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4783 | (exit $ac_status); } && | |
e8b05380 | 4784 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4785 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4786 | (eval $ac_try) 2>&5 | |
4787 | ac_status=$? | |
4788 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4789 | (exit $ac_status); }; } && | |
4790 | { ac_try='test -s conftest.$ac_objext' | |
4791 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4792 | (eval $ac_try) 2>&5 | |
4793 | ac_status=$? | |
4794 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4795 | (exit $ac_status); }; }; then | |
4796 | ac_hi=$ac_mid; break | |
4797 | else | |
4798 | echo "$as_me: failed program was:" >&5 | |
4799 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4800 | ||
4801 | ac_lo=`expr $ac_mid + 1` | |
4802 | if test $ac_lo -le $ac_mid; then | |
4803 | ac_lo= ac_hi= | |
4804 | break | |
4805 | fi | |
4806 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4807 | fi | |
4808 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4809 | done | |
4810 | else | |
4811 | echo "$as_me: failed program was:" >&5 | |
4812 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4813 | ||
4814 | cat >conftest.$ac_ext <<_ACEOF | |
4815 | /* confdefs.h. */ | |
4816 | _ACEOF | |
4817 | cat confdefs.h >>conftest.$ac_ext | |
4818 | cat >>conftest.$ac_ext <<_ACEOF | |
4819 | /* end confdefs.h. */ | |
4820 | $ac_includes_default | |
4821 | int | |
4822 | main () | |
4823 | { | |
4824 | static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; | |
4825 | test_array [0] = 0 | |
4826 | ||
4827 | ; | |
4828 | return 0; | |
4829 | } | |
4830 | _ACEOF | |
4831 | rm -f conftest.$ac_objext | |
4832 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4833 | (eval $ac_compile) 2>conftest.er1 | |
4834 | ac_status=$? | |
4835 | grep -v '^ *+' conftest.er1 >conftest.err | |
4836 | rm -f conftest.er1 | |
4837 | cat conftest.err >&5 | |
4838 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4839 | (exit $ac_status); } && | |
e8b05380 | 4840 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4841 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4842 | (eval $ac_try) 2>&5 | |
4843 | ac_status=$? | |
4844 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4845 | (exit $ac_status); }; } && | |
4846 | { ac_try='test -s conftest.$ac_objext' | |
4847 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4848 | (eval $ac_try) 2>&5 | |
4849 | ac_status=$? | |
4850 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4851 | (exit $ac_status); }; }; then | |
4852 | ac_hi=-1 ac_mid=-1 | |
4853 | while :; do | |
4854 | cat >conftest.$ac_ext <<_ACEOF | |
4855 | /* confdefs.h. */ | |
4856 | _ACEOF | |
4857 | cat confdefs.h >>conftest.$ac_ext | |
4858 | cat >>conftest.$ac_ext <<_ACEOF | |
4859 | /* end confdefs.h. */ | |
4860 | $ac_includes_default | |
4861 | int | |
4862 | main () | |
4863 | { | |
4864 | static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; | |
4865 | test_array [0] = 0 | |
4866 | ||
4867 | ; | |
4868 | return 0; | |
4869 | } | |
4870 | _ACEOF | |
4871 | rm -f conftest.$ac_objext | |
4872 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4873 | (eval $ac_compile) 2>conftest.er1 | |
4874 | ac_status=$? | |
4875 | grep -v '^ *+' conftest.er1 >conftest.err | |
4876 | rm -f conftest.er1 | |
4877 | cat conftest.err >&5 | |
4878 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4879 | (exit $ac_status); } && | |
e8b05380 | 4880 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4881 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4882 | (eval $ac_try) 2>&5 | |
4883 | ac_status=$? | |
4884 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4885 | (exit $ac_status); }; } && | |
4886 | { ac_try='test -s conftest.$ac_objext' | |
4887 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4888 | (eval $ac_try) 2>&5 | |
4889 | ac_status=$? | |
4890 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4891 | (exit $ac_status); }; }; then | |
4892 | ac_lo=$ac_mid; break | |
4893 | else | |
4894 | echo "$as_me: failed program was:" >&5 | |
4895 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4896 | ||
4897 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4898 | if test $ac_mid -le $ac_hi; then | |
4899 | ac_lo= ac_hi= | |
4900 | break | |
4901 | fi | |
4902 | ac_mid=`expr 2 '*' $ac_mid` | |
4903 | fi | |
4904 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4905 | done | |
4906 | else | |
4907 | echo "$as_me: failed program was:" >&5 | |
4908 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4909 | ||
4910 | ac_lo= ac_hi= | |
4911 | fi | |
4912 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4913 | fi | |
4914 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4915 | # Binary search between lo and hi bounds. | |
4916 | while test "x$ac_lo" != "x$ac_hi"; do | |
4917 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4918 | cat >conftest.$ac_ext <<_ACEOF | |
4919 | /* confdefs.h. */ | |
4920 | _ACEOF | |
4921 | cat confdefs.h >>conftest.$ac_ext | |
4922 | cat >>conftest.$ac_ext <<_ACEOF | |
4923 | /* end confdefs.h. */ | |
4924 | $ac_includes_default | |
4925 | int | |
4926 | main () | |
4927 | { | |
4928 | static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; | |
4929 | test_array [0] = 0 | |
4930 | ||
4931 | ; | |
4932 | return 0; | |
4933 | } | |
4934 | _ACEOF | |
4935 | rm -f conftest.$ac_objext | |
4936 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4937 | (eval $ac_compile) 2>conftest.er1 | |
4938 | ac_status=$? | |
4939 | grep -v '^ *+' conftest.er1 >conftest.err | |
4940 | rm -f conftest.er1 | |
4941 | cat conftest.err >&5 | |
4942 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4943 | (exit $ac_status); } && | |
e8b05380 | 4944 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
4945 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4946 | (eval $ac_try) 2>&5 | |
4947 | ac_status=$? | |
4948 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4949 | (exit $ac_status); }; } && | |
4950 | { ac_try='test -s conftest.$ac_objext' | |
4951 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4952 | (eval $ac_try) 2>&5 | |
4953 | ac_status=$? | |
4954 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4955 | (exit $ac_status); }; }; then | |
4956 | ac_hi=$ac_mid | |
4957 | else | |
4958 | echo "$as_me: failed program was:" >&5 | |
4959 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4960 | ||
4961 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4962 | fi | |
4963 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4964 | done | |
4965 | case $ac_lo in | |
4966 | ?*) ac_cv_sizeof_long=$ac_lo;; | |
4967 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 | |
4968 | See \`config.log' for more details." >&5 | |
4969 | echo "$as_me: error: cannot compute sizeof (long), 77 | |
4970 | See \`config.log' for more details." >&2;} | |
4971 | { (exit 1); exit 1; }; } ;; | |
4972 | esac | |
4973 | else | |
4974 | if test "$cross_compiling" = yes; then | |
e8b05380 PB |
4975 | { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 |
4976 | echo "$as_me: error: internal error: not reached in cross-compile" >&2;} | |
bf3b7cd3 JD |
4977 | { (exit 1); exit 1; }; } |
4978 | else | |
4979 | cat >conftest.$ac_ext <<_ACEOF | |
4980 | /* confdefs.h. */ | |
4981 | _ACEOF | |
4982 | cat confdefs.h >>conftest.$ac_ext | |
4983 | cat >>conftest.$ac_ext <<_ACEOF | |
4984 | /* end confdefs.h. */ | |
4985 | $ac_includes_default | |
4986 | long longval () { return (long) (sizeof (long)); } | |
4987 | unsigned long ulongval () { return (long) (sizeof (long)); } | |
4988 | #include <stdio.h> | |
4989 | #include <stdlib.h> | |
4990 | int | |
4991 | main () | |
4992 | { | |
4993 | ||
4994 | FILE *f = fopen ("conftest.val", "w"); | |
4995 | if (! f) | |
4996 | exit (1); | |
4997 | if (((long) (sizeof (long))) < 0) | |
4998 | { | |
4999 | long i = longval (); | |
5000 | if (i != ((long) (sizeof (long)))) | |
5001 | exit (1); | |
5002 | fprintf (f, "%ld\n", i); | |
5003 | } | |
5004 | else | |
5005 | { | |
5006 | unsigned long i = ulongval (); | |
5007 | if (i != ((long) (sizeof (long)))) | |
5008 | exit (1); | |
5009 | fprintf (f, "%lu\n", i); | |
5010 | } | |
5011 | exit (ferror (f) || fclose (f) != 0); | |
5012 | ||
5013 | ; | |
5014 | return 0; | |
5015 | } | |
5016 | _ACEOF | |
5017 | rm -f conftest$ac_exeext | |
5018 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5019 | (eval $ac_link) 2>&5 | |
5020 | ac_status=$? | |
5021 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5022 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5023 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5024 | (eval $ac_try) 2>&5 | |
5025 | ac_status=$? | |
5026 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5027 | (exit $ac_status); }; }; then | |
5028 | ac_cv_sizeof_long=`cat conftest.val` | |
5029 | else | |
5030 | echo "$as_me: program exited with status $ac_status" >&5 | |
5031 | echo "$as_me: failed program was:" >&5 | |
5032 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5033 | ||
5034 | ( exit $ac_status ) | |
5035 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 | |
5036 | See \`config.log' for more details." >&5 | |
5037 | echo "$as_me: error: cannot compute sizeof (long), 77 | |
5038 | See \`config.log' for more details." >&2;} | |
5039 | { (exit 1); exit 1; }; } | |
5040 | fi | |
5041 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
5042 | fi | |
5043 | fi | |
5044 | rm -f conftest.val | |
5045 | else | |
5046 | ac_cv_sizeof_long=0 | |
5047 | fi | |
5048 | fi | |
5049 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 | |
5050 | echo "${ECHO_T}$ac_cv_sizeof_long" >&6 | |
5051 | cat >>confdefs.h <<_ACEOF | |
5052 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5053 | _ACEOF | |
5054 | ||
5055 | ||
5ec1c5e6 KC |
5056 | echo "$as_me:$LINENO: checking for long long" >&5 |
5057 | echo $ECHO_N "checking for long long... $ECHO_C" >&6 | |
5058 | if test "${ac_cv_type_long_long+set}" = set; then | |
5059 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5060 | else | |
5061 | cat >conftest.$ac_ext <<_ACEOF | |
5062 | /* confdefs.h. */ | |
5063 | _ACEOF | |
5064 | cat confdefs.h >>conftest.$ac_ext | |
5065 | cat >>conftest.$ac_ext <<_ACEOF | |
5066 | /* end confdefs.h. */ | |
5067 | $ac_includes_default | |
5068 | int | |
5069 | main () | |
5070 | { | |
5071 | if ((long long *) 0) | |
5072 | return 0; | |
5073 | if (sizeof (long long)) | |
5074 | return 0; | |
5075 | ; | |
5076 | return 0; | |
5077 | } | |
5078 | _ACEOF | |
5079 | rm -f conftest.$ac_objext | |
5080 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5081 | (eval $ac_compile) 2>conftest.er1 | |
5082 | ac_status=$? | |
5083 | grep -v '^ *+' conftest.er1 >conftest.err | |
5084 | rm -f conftest.er1 | |
5085 | cat conftest.err >&5 | |
5086 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5087 | (exit $ac_status); } && | |
e8b05380 | 5088 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
5ec1c5e6 KC |
5089 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5090 | (eval $ac_try) 2>&5 | |
5091 | ac_status=$? | |
5092 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5093 | (exit $ac_status); }; } && | |
5094 | { ac_try='test -s conftest.$ac_objext' | |
5095 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5096 | (eval $ac_try) 2>&5 | |
5097 | ac_status=$? | |
5098 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5099 | (exit $ac_status); }; }; then | |
5100 | ac_cv_type_long_long=yes | |
5101 | else | |
5102 | echo "$as_me: failed program was:" >&5 | |
5103 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5104 | ||
5105 | ac_cv_type_long_long=no | |
5106 | fi | |
5107 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5108 | fi | |
5109 | echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 | |
5110 | echo "${ECHO_T}$ac_cv_type_long_long" >&6 | |
5111 | if test $ac_cv_type_long_long = yes; then | |
5112 | ||
5113 | cat >>confdefs.h <<_ACEOF | |
5114 | #define HAVE_LONG_LONG 1 | |
5115 | _ACEOF | |
5116 | ||
5117 | echo "$as_me:$LINENO: checking for long long" >&5 | |
bf3b7cd3 JD |
5118 | echo $ECHO_N "checking for long long... $ECHO_C" >&6 |
5119 | if test "${ac_cv_type_long_long+set}" = set; then | |
5120 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5121 | else | |
5122 | cat >conftest.$ac_ext <<_ACEOF | |
5123 | /* confdefs.h. */ | |
5124 | _ACEOF | |
5125 | cat confdefs.h >>conftest.$ac_ext | |
5126 | cat >>conftest.$ac_ext <<_ACEOF | |
5127 | /* end confdefs.h. */ | |
5128 | $ac_includes_default | |
5129 | int | |
5130 | main () | |
5131 | { | |
5132 | if ((long long *) 0) | |
5133 | return 0; | |
5134 | if (sizeof (long long)) | |
5135 | return 0; | |
5136 | ; | |
5137 | return 0; | |
5138 | } | |
5139 | _ACEOF | |
5140 | rm -f conftest.$ac_objext | |
5141 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5142 | (eval $ac_compile) 2>conftest.er1 | |
5143 | ac_status=$? | |
5144 | grep -v '^ *+' conftest.er1 >conftest.err | |
5145 | rm -f conftest.er1 | |
5146 | cat conftest.err >&5 | |
5147 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5148 | (exit $ac_status); } && | |
e8b05380 | 5149 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
5150 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5151 | (eval $ac_try) 2>&5 | |
5152 | ac_status=$? | |
5153 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5154 | (exit $ac_status); }; } && | |
5155 | { ac_try='test -s conftest.$ac_objext' | |
5156 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5157 | (eval $ac_try) 2>&5 | |
5158 | ac_status=$? | |
5159 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5160 | (exit $ac_status); }; }; then | |
5161 | ac_cv_type_long_long=yes | |
5162 | else | |
5163 | echo "$as_me: failed program was:" >&5 | |
5164 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5165 | ||
5166 | ac_cv_type_long_long=no | |
5167 | fi | |
5168 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5169 | fi | |
5170 | echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 | |
5171 | echo "${ECHO_T}$ac_cv_type_long_long" >&6 | |
5172 | ||
5173 | echo "$as_me:$LINENO: checking size of long long" >&5 | |
5174 | echo $ECHO_N "checking size of long long... $ECHO_C" >&6 | |
5175 | if test "${ac_cv_sizeof_long_long+set}" = set; then | |
5176 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5177 | else | |
5178 | if test "$ac_cv_type_long_long" = yes; then | |
5179 | # The cast to unsigned long works around a bug in the HP C Compiler | |
5180 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5181 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5182 | # This bug is HP SR number 8606223364. | |
5183 | if test "$cross_compiling" = yes; then | |
5184 | # Depending upon the size, compute the lo and hi bounds. | |
5185 | cat >conftest.$ac_ext <<_ACEOF | |
5186 | /* confdefs.h. */ | |
5187 | _ACEOF | |
5188 | cat confdefs.h >>conftest.$ac_ext | |
5189 | cat >>conftest.$ac_ext <<_ACEOF | |
5190 | /* end confdefs.h. */ | |
5191 | $ac_includes_default | |
5192 | int | |
5193 | main () | |
5194 | { | |
5195 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; | |
5196 | test_array [0] = 0 | |
5197 | ||
5198 | ; | |
5199 | return 0; | |
5200 | } | |
5201 | _ACEOF | |
5202 | rm -f conftest.$ac_objext | |
5203 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5204 | (eval $ac_compile) 2>conftest.er1 | |
5205 | ac_status=$? | |
5206 | grep -v '^ *+' conftest.er1 >conftest.err | |
5207 | rm -f conftest.er1 | |
5208 | cat conftest.err >&5 | |
5209 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5210 | (exit $ac_status); } && | |
e8b05380 | 5211 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
5212 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5213 | (eval $ac_try) 2>&5 | |
5214 | ac_status=$? | |
5215 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5216 | (exit $ac_status); }; } && | |
5217 | { ac_try='test -s conftest.$ac_objext' | |
5218 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5219 | (eval $ac_try) 2>&5 | |
5220 | ac_status=$? | |
5221 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5222 | (exit $ac_status); }; }; then | |
5223 | ac_lo=0 ac_mid=0 | |
5224 | while :; do | |
5225 | cat >conftest.$ac_ext <<_ACEOF | |
5226 | /* confdefs.h. */ | |
5227 | _ACEOF | |
5228 | cat confdefs.h >>conftest.$ac_ext | |
5229 | cat >>conftest.$ac_ext <<_ACEOF | |
5230 | /* end confdefs.h. */ | |
5231 | $ac_includes_default | |
5232 | int | |
5233 | main () | |
5234 | { | |
5235 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; | |
5236 | test_array [0] = 0 | |
5237 | ||
5238 | ; | |
5239 | return 0; | |
5240 | } | |
5241 | _ACEOF | |
5242 | rm -f conftest.$ac_objext | |
5243 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5244 | (eval $ac_compile) 2>conftest.er1 | |
5245 | ac_status=$? | |
5246 | grep -v '^ *+' conftest.er1 >conftest.err | |
5247 | rm -f conftest.er1 | |
5248 | cat conftest.err >&5 | |
5249 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5250 | (exit $ac_status); } && | |
e8b05380 | 5251 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
5252 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5253 | (eval $ac_try) 2>&5 | |
5254 | ac_status=$? | |
5255 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5256 | (exit $ac_status); }; } && | |
5257 | { ac_try='test -s conftest.$ac_objext' | |
5258 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5259 | (eval $ac_try) 2>&5 | |
5260 | ac_status=$? | |
5261 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5262 | (exit $ac_status); }; }; then | |
5263 | ac_hi=$ac_mid; break | |
5264 | else | |
5265 | echo "$as_me: failed program was:" >&5 | |
5266 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5267 | ||
5268 | ac_lo=`expr $ac_mid + 1` | |
5269 | if test $ac_lo -le $ac_mid; then | |
5270 | ac_lo= ac_hi= | |
5271 | break | |
5272 | fi | |
5273 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
5274 | fi | |
5275 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5276 | done | |
5277 | else | |
5278 | echo "$as_me: failed program was:" >&5 | |
5279 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5280 | ||
5281 | cat >conftest.$ac_ext <<_ACEOF | |
5282 | /* confdefs.h. */ | |
5283 | _ACEOF | |
5284 | cat confdefs.h >>conftest.$ac_ext | |
5285 | cat >>conftest.$ac_ext <<_ACEOF | |
5286 | /* end confdefs.h. */ | |
5287 | $ac_includes_default | |
5288 | int | |
5289 | main () | |
5290 | { | |
5291 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)]; | |
5292 | test_array [0] = 0 | |
5293 | ||
5294 | ; | |
5295 | return 0; | |
5296 | } | |
5297 | _ACEOF | |
5298 | rm -f conftest.$ac_objext | |
5299 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5300 | (eval $ac_compile) 2>conftest.er1 | |
5301 | ac_status=$? | |
5302 | grep -v '^ *+' conftest.er1 >conftest.err | |
5303 | rm -f conftest.er1 | |
5304 | cat conftest.err >&5 | |
5305 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5306 | (exit $ac_status); } && | |
e8b05380 | 5307 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
5308 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5309 | (eval $ac_try) 2>&5 | |
5310 | ac_status=$? | |
5311 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5312 | (exit $ac_status); }; } && | |
5313 | { ac_try='test -s conftest.$ac_objext' | |
5314 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5315 | (eval $ac_try) 2>&5 | |
5316 | ac_status=$? | |
5317 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5318 | (exit $ac_status); }; }; then | |
5319 | ac_hi=-1 ac_mid=-1 | |
5320 | while :; do | |
5321 | cat >conftest.$ac_ext <<_ACEOF | |
5322 | /* confdefs.h. */ | |
5323 | _ACEOF | |
5324 | cat confdefs.h >>conftest.$ac_ext | |
5325 | cat >>conftest.$ac_ext <<_ACEOF | |
5326 | /* end confdefs.h. */ | |
5327 | $ac_includes_default | |
5328 | int | |
5329 | main () | |
5330 | { | |
5331 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; | |
5332 | test_array [0] = 0 | |
5333 | ||
5334 | ; | |
5335 | return 0; | |
5336 | } | |
5337 | _ACEOF | |
5338 | rm -f conftest.$ac_objext | |
5339 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5340 | (eval $ac_compile) 2>conftest.er1 | |
5341 | ac_status=$? | |
5342 | grep -v '^ *+' conftest.er1 >conftest.err | |
5343 | rm -f conftest.er1 | |
5344 | cat conftest.err >&5 | |
5345 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5346 | (exit $ac_status); } && | |
e8b05380 | 5347 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
5348 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5349 | (eval $ac_try) 2>&5 | |
5350 | ac_status=$? | |
5351 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5352 | (exit $ac_status); }; } && | |
5353 | { ac_try='test -s conftest.$ac_objext' | |
5354 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5355 | (eval $ac_try) 2>&5 | |
5356 | ac_status=$? | |
5357 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5358 | (exit $ac_status); }; }; then | |
5359 | ac_lo=$ac_mid; break | |
5360 | else | |
5361 | echo "$as_me: failed program was:" >&5 | |
5362 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5363 | ||
5364 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
5365 | if test $ac_mid -le $ac_hi; then | |
5366 | ac_lo= ac_hi= | |
5367 | break | |
5368 | fi | |
5369 | ac_mid=`expr 2 '*' $ac_mid` | |
5370 | fi | |
5371 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5372 | done | |
5373 | else | |
5374 | echo "$as_me: failed program was:" >&5 | |
5375 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5376 | ||
5377 | ac_lo= ac_hi= | |
5378 | fi | |
5379 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5380 | fi | |
5381 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5382 | # Binary search between lo and hi bounds. | |
5383 | while test "x$ac_lo" != "x$ac_hi"; do | |
5384 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
5385 | cat >conftest.$ac_ext <<_ACEOF | |
5386 | /* confdefs.h. */ | |
5387 | _ACEOF | |
5388 | cat confdefs.h >>conftest.$ac_ext | |
5389 | cat >>conftest.$ac_ext <<_ACEOF | |
5390 | /* end confdefs.h. */ | |
5391 | $ac_includes_default | |
5392 | int | |
5393 | main () | |
5394 | { | |
5395 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; | |
5396 | test_array [0] = 0 | |
5397 | ||
5398 | ; | |
5399 | return 0; | |
5400 | } | |
5401 | _ACEOF | |
5402 | rm -f conftest.$ac_objext | |
5403 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5404 | (eval $ac_compile) 2>conftest.er1 | |
5405 | ac_status=$? | |
5406 | grep -v '^ *+' conftest.er1 >conftest.err | |
5407 | rm -f conftest.er1 | |
5408 | cat conftest.err >&5 | |
5409 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5410 | (exit $ac_status); } && | |
e8b05380 | 5411 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
bf3b7cd3 JD |
5412 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5413 | (eval $ac_try) 2>&5 | |
5414 | ac_status=$? | |
5415 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5416 | (exit $ac_status); }; } && | |
5417 | { ac_try='test -s conftest.$ac_objext' | |
5418 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5419 | (eval $ac_try) 2>&5 | |
5420 | ac_status=$? | |
5421 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5422 | (exit $ac_status); }; }; then | |
5423 | ac_hi=$ac_mid | |
5424 | else | |
5425 | echo "$as_me: failed program was:" >&5 | |
5426 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5427 | ||
5428 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
5429 | fi | |
5430 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5431 | done | |
5432 | case $ac_lo in | |
5433 | ?*) ac_cv_sizeof_long_long=$ac_lo;; | |
5434 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 | |
5435 | See \`config.log' for more details." >&5 | |
5436 | echo "$as_me: error: cannot compute sizeof (long long), 77 | |
5437 | See \`config.log' for more details." >&2;} | |
5438 | { (exit 1); exit 1; }; } ;; | |
5439 | esac | |
5440 | else | |
5441 | if test "$cross_compiling" = yes; then | |
e8b05380 PB |
5442 | { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 |
5443 | echo "$as_me: error: internal error: not reached in cross-compile" >&2;} | |
bf3b7cd3 JD |
5444 | { (exit 1); exit 1; }; } |
5445 | else | |
5446 | cat >conftest.$ac_ext <<_ACEOF | |
5447 | /* confdefs.h. */ | |
5448 | _ACEOF | |
5449 | cat confdefs.h >>conftest.$ac_ext | |
5450 | cat >>conftest.$ac_ext <<_ACEOF | |
5451 | /* end confdefs.h. */ | |
5452 | $ac_includes_default | |
5453 | long longval () { return (long) (sizeof (long long)); } | |
5454 | unsigned long ulongval () { return (long) (sizeof (long long)); } | |
5455 | #include <stdio.h> | |
5456 | #include <stdlib.h> | |
5457 | int | |
5458 | main () | |
5459 | { | |
5460 | ||
5461 | FILE *f = fopen ("conftest.val", "w"); | |
5462 | if (! f) | |
5463 | exit (1); | |
5464 | if (((long) (sizeof (long long))) < 0) | |
5465 | { | |
5466 | long i = longval (); | |
5467 | if (i != ((long) (sizeof (long long)))) | |
5468 | exit (1); | |
5469 | fprintf (f, "%ld\n", i); | |
5470 | } | |
5471 | else | |
5472 | { | |
5473 | unsigned long i = ulongval (); | |
5474 | if (i != ((long) (sizeof (long long)))) | |
5475 | exit (1); | |
5476 | fprintf (f, "%lu\n", i); | |
5477 | } | |
5478 | exit (ferror (f) || fclose (f) != 0); | |
5479 | ||
5480 | ; | |
5481 | return 0; | |
5482 | } | |
5483 | _ACEOF | |
5484 | rm -f conftest$ac_exeext | |
5485 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5486 | (eval $ac_link) 2>&5 | |
5487 | ac_status=$? | |
5488 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5489 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5490 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5491 | (eval $ac_try) 2>&5 | |
5492 | ac_status=$? | |
5493 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5494 | (exit $ac_status); }; }; then | |
5495 | ac_cv_sizeof_long_long=`cat conftest.val` | |
5496 | else | |
5497 | echo "$as_me: program exited with status $ac_status" >&5 | |
5498 | echo "$as_me: failed program was:" >&5 | |
5499 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5500 | ||
5501 | ( exit $ac_status ) | |
5502 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 | |
5503 | See \`config.log' for more details." >&5 | |
5504 | echo "$as_me: error: cannot compute sizeof (long long), 77 | |
5505 | See \`config.log' for more details." >&2;} | |
5506 | { (exit 1); exit 1; }; } | |
5507 | fi | |
5508 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
5509 | fi | |
5510 | fi | |
5511 | rm -f conftest.val | |
5512 | else | |
5513 | ac_cv_sizeof_long_long=0 | |
5514 | fi | |
5515 | fi | |
5516 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 | |
5517 | echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 | |
5518 | cat >>confdefs.h <<_ACEOF | |
5519 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
5520 | _ACEOF | |
5521 | ||
5522 | ||
5523 | fi | |
5ec1c5e6 KC |
5524 | |
5525 | echo "$as_me:$LINENO: checking for __int64" >&5 | |
5526 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 | |
5527 | if test "${ac_cv_type___int64+set}" = set; then | |
5528 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5529 | else | |
5530 | cat >conftest.$ac_ext <<_ACEOF | |
5531 | /* confdefs.h. */ | |
5532 | _ACEOF | |
5533 | cat confdefs.h >>conftest.$ac_ext | |
5534 | cat >>conftest.$ac_ext <<_ACEOF | |
5535 | /* end confdefs.h. */ | |
5536 | $ac_includes_default | |
5537 | int | |
5538 | main () | |
5539 | { | |
5540 | if ((__int64 *) 0) | |
5541 | return 0; | |
5542 | if (sizeof (__int64)) | |
5543 | return 0; | |
5544 | ; | |
5545 | return 0; | |
5546 | } | |
5547 | _ACEOF | |
5548 | rm -f conftest.$ac_objext | |
5549 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5550 | (eval $ac_compile) 2>conftest.er1 | |
5551 | ac_status=$? | |
5552 | grep -v '^ *+' conftest.er1 >conftest.err | |
5553 | rm -f conftest.er1 | |
5554 | cat conftest.err >&5 | |
5555 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5556 | (exit $ac_status); } && | |
e8b05380 | 5557 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
5ec1c5e6 KC |
5558 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5559 | (eval $ac_try) 2>&5 | |
5560 | ac_status=$? | |
5561 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5562 | (exit $ac_status); }; } && | |
5563 | { ac_try='test -s conftest.$ac_objext' | |
5564 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5565 | (eval $ac_try) 2>&5 | |
5566 | ac_status=$? | |
5567 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5568 | (exit $ac_status); }; }; then | |
5569 | ac_cv_type___int64=yes | |
5570 | else | |
5571 | echo "$as_me: failed program was:" >&5 | |
5572 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5573 | ||
5574 | ac_cv_type___int64=no | |
5575 | fi | |
5576 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5577 | fi | |
5578 | echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 | |
5579 | echo "${ECHO_T}$ac_cv_type___int64" >&6 | |
5580 | if test $ac_cv_type___int64 = yes; then | |
5581 | ||
5582 | cat >>confdefs.h <<_ACEOF | |
5583 | #define HAVE___INT64 1 | |
5584 | _ACEOF | |
5585 | ||
5586 | echo "$as_me:$LINENO: checking for __int64" >&5 | |
bf3b7cd3 JD |
5587 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 |
5588 | if test "${ac_cv_type___int64+set}" = set; then | |
5589 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5590 | else | |
ba479fd2 | 5591 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5592 | /* confdefs.h. */ |
5593 | _ACEOF | |
5594 | cat confdefs.h >>conftest.$ac_ext | |
5595 | cat >>conftest.$ac_ext <<_ACEOF | |
5596 | /* end confdefs.h. */ | |
bf3b7cd3 | 5597 | $ac_includes_default |
ba479fd2 NN |
5598 | int |
5599 | main () | |
5600 | { | |
bf3b7cd3 JD |
5601 | if ((__int64 *) 0) |
5602 | return 0; | |
5603 | if (sizeof (__int64)) | |
5604 | return 0; | |
ba479fd2 NN |
5605 | ; |
5606 | return 0; | |
5607 | } | |
5608 | _ACEOF | |
5609 | rm -f conftest.$ac_objext | |
5610 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5611 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5612 | ac_status=$? |
86da66b5 HPN |
5613 | grep -v '^ *+' conftest.er1 >conftest.err |
5614 | rm -f conftest.er1 | |
5615 | cat conftest.err >&5 | |
ba479fd2 NN |
5616 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5617 | (exit $ac_status); } && | |
e8b05380 | 5618 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5619 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5620 | (eval $ac_try) 2>&5 | |
5621 | ac_status=$? | |
5622 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5623 | (exit $ac_status); }; } && | |
5624 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5625 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5626 | (eval $ac_try) 2>&5 | |
5627 | ac_status=$? | |
5628 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5629 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5630 | ac_cv_type___int64=yes |
75b6f3fd | 5631 | else |
ba479fd2 NN |
5632 | echo "$as_me: failed program was:" >&5 |
5633 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5634 | ||
bf3b7cd3 | 5635 | ac_cv_type___int64=no |
75b6f3fd | 5636 | fi |
86da66b5 | 5637 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75b6f3fd | 5638 | fi |
bf3b7cd3 JD |
5639 | echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 |
5640 | echo "${ECHO_T}$ac_cv_type___int64" >&6 | |
75b6f3fd | 5641 | |
bf3b7cd3 JD |
5642 | echo "$as_me:$LINENO: checking size of __int64" >&5 |
5643 | echo $ECHO_N "checking size of __int64... $ECHO_C" >&6 | |
5644 | if test "${ac_cv_sizeof___int64+set}" = set; then | |
ba479fd2 | 5645 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
414d23ae | 5646 | else |
bf3b7cd3 JD |
5647 | if test "$ac_cv_type___int64" = yes; then |
5648 | # The cast to unsigned long works around a bug in the HP C Compiler | |
5649 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5650 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5651 | # This bug is HP SR number 8606223364. | |
5652 | if test "$cross_compiling" = yes; then | |
5653 | # Depending upon the size, compute the lo and hi bounds. | |
5654 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5655 | /* confdefs.h. */ |
5656 | _ACEOF | |
5657 | cat confdefs.h >>conftest.$ac_ext | |
5658 | cat >>conftest.$ac_ext <<_ACEOF | |
5659 | /* end confdefs.h. */ | |
bf3b7cd3 | 5660 | $ac_includes_default |
ba479fd2 NN |
5661 | int |
5662 | main () | |
5663 | { | |
bf3b7cd3 JD |
5664 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)]; |
5665 | test_array [0] = 0 | |
5666 | ||
ba479fd2 NN |
5667 | ; |
5668 | return 0; | |
5669 | } | |
5670 | _ACEOF | |
5671 | rm -f conftest.$ac_objext | |
5672 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5673 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5674 | ac_status=$? |
86da66b5 HPN |
5675 | grep -v '^ *+' conftest.er1 >conftest.err |
5676 | rm -f conftest.er1 | |
5677 | cat conftest.err >&5 | |
ba479fd2 NN |
5678 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5679 | (exit $ac_status); } && | |
e8b05380 | 5680 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5681 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5682 | (eval $ac_try) 2>&5 | |
5683 | ac_status=$? | |
5684 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5685 | (exit $ac_status); }; } && | |
5686 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5687 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5688 | (eval $ac_try) 2>&5 | |
5689 | ac_status=$? | |
5690 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5691 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5692 | ac_lo=0 ac_mid=0 |
5693 | while :; do | |
5694 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5695 | /* confdefs.h. */ |
5696 | _ACEOF | |
5697 | cat confdefs.h >>conftest.$ac_ext | |
5698 | cat >>conftest.$ac_ext <<_ACEOF | |
5699 | /* end confdefs.h. */ | |
bf3b7cd3 | 5700 | $ac_includes_default |
ba479fd2 NN |
5701 | int |
5702 | main () | |
5703 | { | |
bf3b7cd3 JD |
5704 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; |
5705 | test_array [0] = 0 | |
5706 | ||
ba479fd2 NN |
5707 | ; |
5708 | return 0; | |
5709 | } | |
5710 | _ACEOF | |
5711 | rm -f conftest.$ac_objext | |
5712 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5713 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5714 | ac_status=$? |
86da66b5 HPN |
5715 | grep -v '^ *+' conftest.er1 >conftest.err |
5716 | rm -f conftest.er1 | |
5717 | cat conftest.err >&5 | |
ba479fd2 NN |
5718 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5719 | (exit $ac_status); } && | |
e8b05380 | 5720 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5721 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5722 | (eval $ac_try) 2>&5 | |
5723 | ac_status=$? | |
5724 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5725 | (exit $ac_status); }; } && | |
5726 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5727 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5728 | (eval $ac_try) 2>&5 | |
5729 | ac_status=$? | |
5730 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5731 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5732 | ac_hi=$ac_mid; break |
75e93faa | 5733 | else |
ba479fd2 NN |
5734 | echo "$as_me: failed program was:" >&5 |
5735 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5736 | ||
bf3b7cd3 JD |
5737 | ac_lo=`expr $ac_mid + 1` |
5738 | if test $ac_lo -le $ac_mid; then | |
5739 | ac_lo= ac_hi= | |
5740 | break | |
5741 | fi | |
5742 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
75e93faa | 5743 | fi |
86da66b5 | 5744 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 5745 | done |
75e93faa | 5746 | else |
bf3b7cd3 JD |
5747 | echo "$as_me: failed program was:" >&5 |
5748 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5749 | ||
5750 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5751 | /* confdefs.h. */ |
5752 | _ACEOF | |
5753 | cat confdefs.h >>conftest.$ac_ext | |
5754 | cat >>conftest.$ac_ext <<_ACEOF | |
5755 | /* end confdefs.h. */ | |
bf3b7cd3 | 5756 | $ac_includes_default |
ba479fd2 NN |
5757 | int |
5758 | main () | |
5759 | { | |
bf3b7cd3 JD |
5760 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)]; |
5761 | test_array [0] = 0 | |
5762 | ||
ba479fd2 NN |
5763 | ; |
5764 | return 0; | |
5765 | } | |
5766 | _ACEOF | |
5767 | rm -f conftest.$ac_objext | |
5768 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5769 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5770 | ac_status=$? |
86da66b5 HPN |
5771 | grep -v '^ *+' conftest.er1 >conftest.err |
5772 | rm -f conftest.er1 | |
5773 | cat conftest.err >&5 | |
ba479fd2 NN |
5774 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5775 | (exit $ac_status); } && | |
e8b05380 | 5776 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5777 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5778 | (eval $ac_try) 2>&5 | |
5779 | ac_status=$? | |
5780 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5781 | (exit $ac_status); }; } && | |
5782 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5783 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5784 | (eval $ac_try) 2>&5 | |
5785 | ac_status=$? | |
5786 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5787 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5788 | ac_hi=-1 ac_mid=-1 |
5789 | while :; do | |
5790 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5791 | /* confdefs.h. */ |
5792 | _ACEOF | |
5793 | cat confdefs.h >>conftest.$ac_ext | |
5794 | cat >>conftest.$ac_ext <<_ACEOF | |
5795 | /* end confdefs.h. */ | |
bf3b7cd3 | 5796 | $ac_includes_default |
ba479fd2 NN |
5797 | int |
5798 | main () | |
5799 | { | |
bf3b7cd3 JD |
5800 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)]; |
5801 | test_array [0] = 0 | |
5802 | ||
ba479fd2 NN |
5803 | ; |
5804 | return 0; | |
5805 | } | |
5806 | _ACEOF | |
5807 | rm -f conftest.$ac_objext | |
5808 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5809 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5810 | ac_status=$? |
86da66b5 HPN |
5811 | grep -v '^ *+' conftest.er1 >conftest.err |
5812 | rm -f conftest.er1 | |
5813 | cat conftest.err >&5 | |
ba479fd2 NN |
5814 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5815 | (exit $ac_status); } && | |
e8b05380 | 5816 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5817 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5818 | (eval $ac_try) 2>&5 | |
5819 | ac_status=$? | |
5820 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5821 | (exit $ac_status); }; } && | |
5822 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5823 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5824 | (eval $ac_try) 2>&5 | |
5825 | ac_status=$? | |
5826 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5827 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5828 | ac_lo=$ac_mid; break |
04cabffc | 5829 | else |
ba479fd2 NN |
5830 | echo "$as_me: failed program was:" >&5 |
5831 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5832 | ||
bf3b7cd3 JD |
5833 | ac_hi=`expr '(' $ac_mid ')' - 1` |
5834 | if test $ac_mid -le $ac_hi; then | |
5835 | ac_lo= ac_hi= | |
5836 | break | |
5837 | fi | |
5838 | ac_mid=`expr 2 '*' $ac_mid` | |
04cabffc | 5839 | fi |
86da66b5 | 5840 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5841 | done |
5842 | else | |
5843 | echo "$as_me: failed program was:" >&5 | |
5844 | sed 's/^/| /' conftest.$ac_ext >&5 | |
04cabffc | 5845 | |
bf3b7cd3 | 5846 | ac_lo= ac_hi= |
414d23ae | 5847 | fi |
bf3b7cd3 | 5848 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 5849 | fi |
bf3b7cd3 JD |
5850 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
5851 | # Binary search between lo and hi bounds. | |
5852 | while test "x$ac_lo" != "x$ac_hi"; do | |
5853 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
ba479fd2 | 5854 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5855 | /* confdefs.h. */ |
5856 | _ACEOF | |
5857 | cat confdefs.h >>conftest.$ac_ext | |
5858 | cat >>conftest.$ac_ext <<_ACEOF | |
5859 | /* end confdefs.h. */ | |
bf3b7cd3 | 5860 | $ac_includes_default |
ba479fd2 NN |
5861 | int |
5862 | main () | |
5863 | { | |
bf3b7cd3 JD |
5864 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; |
5865 | test_array [0] = 0 | |
5866 | ||
ba479fd2 NN |
5867 | ; |
5868 | return 0; | |
5869 | } | |
5870 | _ACEOF | |
5871 | rm -f conftest.$ac_objext | |
5872 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5873 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5874 | ac_status=$? |
86da66b5 HPN |
5875 | grep -v '^ *+' conftest.er1 >conftest.err |
5876 | rm -f conftest.er1 | |
5877 | cat conftest.err >&5 | |
ba479fd2 NN |
5878 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5879 | (exit $ac_status); } && | |
e8b05380 | 5880 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5881 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5882 | (eval $ac_try) 2>&5 | |
5883 | ac_status=$? | |
5884 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5885 | (exit $ac_status); }; } && | |
5886 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5887 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5888 | (eval $ac_try) 2>&5 | |
5889 | ac_status=$? | |
5890 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5891 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5892 | ac_hi=$ac_mid |
75e93faa | 5893 | else |
ba479fd2 NN |
5894 | echo "$as_me: failed program was:" >&5 |
5895 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5896 | ||
bf3b7cd3 | 5897 | ac_lo=`expr '(' $ac_mid ')' + 1` |
75e93faa | 5898 | fi |
86da66b5 | 5899 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 5900 | done |
bf3b7cd3 JD |
5901 | case $ac_lo in |
5902 | ?*) ac_cv_sizeof___int64=$ac_lo;; | |
5903 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 | |
5904 | See \`config.log' for more details." >&5 | |
5905 | echo "$as_me: error: cannot compute sizeof (__int64), 77 | |
5906 | See \`config.log' for more details." >&2;} | |
5907 | { (exit 1); exit 1; }; } ;; | |
5908 | esac | |
5909 | else | |
5910 | if test "$cross_compiling" = yes; then | |
e8b05380 PB |
5911 | { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 |
5912 | echo "$as_me: error: internal error: not reached in cross-compile" >&2;} | |
bf3b7cd3 JD |
5913 | { (exit 1); exit 1; }; } |
5914 | else | |
5915 | cat >conftest.$ac_ext <<_ACEOF | |
5916 | /* confdefs.h. */ | |
5917 | _ACEOF | |
5918 | cat confdefs.h >>conftest.$ac_ext | |
5919 | cat >>conftest.$ac_ext <<_ACEOF | |
5920 | /* end confdefs.h. */ | |
5921 | $ac_includes_default | |
5922 | long longval () { return (long) (sizeof (__int64)); } | |
5923 | unsigned long ulongval () { return (long) (sizeof (__int64)); } | |
5924 | #include <stdio.h> | |
5925 | #include <stdlib.h> | |
5926 | int | |
5927 | main () | |
5928 | { | |
414d23ae | 5929 | |
bf3b7cd3 JD |
5930 | FILE *f = fopen ("conftest.val", "w"); |
5931 | if (! f) | |
5932 | exit (1); | |
5933 | if (((long) (sizeof (__int64))) < 0) | |
5934 | { | |
5935 | long i = longval (); | |
5936 | if (i != ((long) (sizeof (__int64)))) | |
5937 | exit (1); | |
5938 | fprintf (f, "%ld\n", i); | |
5939 | } | |
5940 | else | |
5941 | { | |
5942 | unsigned long i = ulongval (); | |
5943 | if (i != ((long) (sizeof (__int64)))) | |
5944 | exit (1); | |
5945 | fprintf (f, "%lu\n", i); | |
5946 | } | |
5947 | exit (ferror (f) || fclose (f) != 0); | |
5948 | ||
5949 | ; | |
5950 | return 0; | |
5951 | } | |
5952 | _ACEOF | |
5953 | rm -f conftest$ac_exeext | |
5954 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5955 | (eval $ac_link) 2>&5 | |
5956 | ac_status=$? | |
5957 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5958 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5959 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5960 | (eval $ac_try) 2>&5 | |
5961 | ac_status=$? | |
5962 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5963 | (exit $ac_status); }; }; then | |
5964 | ac_cv_sizeof___int64=`cat conftest.val` | |
5965 | else | |
5966 | echo "$as_me: program exited with status $ac_status" >&5 | |
5967 | echo "$as_me: failed program was:" >&5 | |
5968 | sed 's/^/| /' conftest.$ac_ext >&5 | |
75e93faa | 5969 | |
bf3b7cd3 JD |
5970 | ( exit $ac_status ) |
5971 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 | |
5972 | See \`config.log' for more details." >&5 | |
5973 | echo "$as_me: error: cannot compute sizeof (__int64), 77 | |
5974 | See \`config.log' for more details." >&2;} | |
ba479fd2 | 5975 | { (exit 1); exit 1; }; } |
414d23ae | 5976 | fi |
bf3b7cd3 JD |
5977 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
5978 | fi | |
5979 | fi | |
5980 | rm -f conftest.val | |
5981 | else | |
5982 | ac_cv_sizeof___int64=0 | |
5983 | fi | |
5984 | fi | |
ba479fd2 NN |
5985 | echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 |
5986 | echo "${ECHO_T}$ac_cv_sizeof___int64" >&6 | |
ba479fd2 | 5987 | cat >>confdefs.h <<_ACEOF |
414d23ae | 5988 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
ba479fd2 | 5989 | _ACEOF |
414d23ae | 5990 | |
cafe096b | 5991 | |
414d23ae HPN |
5992 | fi |
5993 | ||
5ec1c5e6 | 5994 | |
34a86c2b NN |
5995 | # --------------------- |
5996 | # Warnings and checking | |
5997 | # --------------------- | |
5998 | ||
b5472e1d NN |
5999 | # Check $CC warning features (if it's GCC). |
6000 | # We want to use -pedantic, but we don't want warnings about | |
6001 | # * 'long long' | |
6002 | # * variadic macros | |
89a42ac8 | 6003 | # * overlong strings |
b5472e1d NN |
6004 | # So, we only use -pedantic if we can disable those warnings. |
6005 | ||
6006 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5 | |
6007 | echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6 | |
6008 | if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then | |
6009 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6010 | else | |
6011 | save_CFLAGS="$CFLAGS" | |
6012 | CFLAGS="-Wno-long-long" | |
6013 | cat >conftest.$ac_ext <<_ACEOF | |
6014 | /* confdefs.h. */ | |
6015 | _ACEOF | |
6016 | cat confdefs.h >>conftest.$ac_ext | |
6017 | cat >>conftest.$ac_ext <<_ACEOF | |
6018 | /* end confdefs.h. */ | |
6019 | ||
6020 | _ACEOF | |
6021 | rm -f conftest.$ac_objext | |
6022 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6023 | (eval $ac_compile) 2>conftest.er1 | |
6024 | ac_status=$? | |
6025 | grep -v '^ *+' conftest.er1 >conftest.err | |
6026 | rm -f conftest.er1 | |
6027 | cat conftest.err >&5 | |
6028 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6029 | (exit $ac_status); } && | |
e8b05380 | 6030 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
b5472e1d NN |
6031 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6032 | (eval $ac_try) 2>&5 | |
6033 | ac_status=$? | |
6034 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6035 | (exit $ac_status); }; } && | |
6036 | { ac_try='test -s conftest.$ac_objext' | |
6037 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6038 | (eval $ac_try) 2>&5 | |
6039 | ac_status=$? | |
6040 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6041 | (exit $ac_status); }; }; then | |
6042 | ac_cv_prog_cc_w_no_long_long=yes | |
6043 | else | |
6044 | echo "$as_me: failed program was:" >&5 | |
6045 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6046 | ||
6047 | ac_cv_prog_cc_w_no_long_long=no | |
6048 | fi | |
6049 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6050 | CFLAGS="$save_CFLAGS" | |
6051 | ||
6052 | fi | |
6053 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5 | |
6054 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6 | |
6055 | ||
6056 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5 | |
6057 | echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6 | |
6058 | if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then | |
6059 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6060 | else | |
6061 | save_CFLAGS="$CFLAGS" | |
6062 | CFLAGS="-Wno-variadic-macros" | |
6063 | cat >conftest.$ac_ext <<_ACEOF | |
6064 | /* confdefs.h. */ | |
6065 | _ACEOF | |
6066 | cat confdefs.h >>conftest.$ac_ext | |
6067 | cat >>conftest.$ac_ext <<_ACEOF | |
6068 | /* end confdefs.h. */ | |
6069 | ||
6070 | _ACEOF | |
6071 | rm -f conftest.$ac_objext | |
6072 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6073 | (eval $ac_compile) 2>conftest.er1 | |
6074 | ac_status=$? | |
6075 | grep -v '^ *+' conftest.er1 >conftest.err | |
6076 | rm -f conftest.er1 | |
6077 | cat conftest.err >&5 | |
6078 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6079 | (exit $ac_status); } && | |
e8b05380 | 6080 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
b5472e1d NN |
6081 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6082 | (eval $ac_try) 2>&5 | |
6083 | ac_status=$? | |
6084 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6085 | (exit $ac_status); }; } && | |
6086 | { ac_try='test -s conftest.$ac_objext' | |
6087 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6088 | (eval $ac_try) 2>&5 | |
6089 | ac_status=$? | |
6090 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6091 | (exit $ac_status); }; }; then | |
6092 | ac_cv_prog_cc_w_no_variadic_macros=yes | |
6093 | else | |
6094 | echo "$as_me: failed program was:" >&5 | |
6095 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6096 | ||
6097 | ac_cv_prog_cc_w_no_variadic_macros=no | |
6098 | fi | |
6099 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6100 | CFLAGS="$save_CFLAGS" | |
6101 | ||
6102 | fi | |
6103 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5 | |
6104 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6 | |
6105 | ||
89a42ac8 ZW |
6106 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-overlength-strings" >&5 |
6107 | echo $ECHO_N "checking whether ${CC} accepts -Wno-overlength-strings... $ECHO_C" >&6 | |
6108 | if test "${ac_cv_prog_cc_w_no_overlength_strings+set}" = set; then | |
6109 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6110 | else | |
6111 | save_CFLAGS="$CFLAGS" | |
6112 | CFLAGS="-Wno-overlength-strings" | |
6113 | cat >conftest.$ac_ext <<_ACEOF | |
6114 | /* confdefs.h. */ | |
6115 | _ACEOF | |
6116 | cat confdefs.h >>conftest.$ac_ext | |
6117 | cat >>conftest.$ac_ext <<_ACEOF | |
6118 | /* end confdefs.h. */ | |
6119 | ||
6120 | _ACEOF | |
6121 | rm -f conftest.$ac_objext | |
6122 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6123 | (eval $ac_compile) 2>conftest.er1 | |
6124 | ac_status=$? | |
6125 | grep -v '^ *+' conftest.er1 >conftest.err | |
6126 | rm -f conftest.er1 | |
6127 | cat conftest.err >&5 | |
6128 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6129 | (exit $ac_status); } && | |
6130 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | |
6131 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6132 | (eval $ac_try) 2>&5 | |
6133 | ac_status=$? | |
6134 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6135 | (exit $ac_status); }; } && | |
6136 | { ac_try='test -s conftest.$ac_objext' | |
6137 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6138 | (eval $ac_try) 2>&5 | |
6139 | ac_status=$? | |
6140 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6141 | (exit $ac_status); }; }; then | |
6142 | ac_cv_prog_cc_w_no_overlength_strings=yes | |
6143 | else | |
6144 | echo "$as_me: failed program was:" >&5 | |
6145 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6146 | ||
6147 | ac_cv_prog_cc_w_no_overlength_strings=no | |
6148 | fi | |
6149 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6150 | CFLAGS="$save_CFLAGS" | |
6151 | ||
6152 | fi | |
6153 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_overlength_strings" >&5 | |
6154 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_overlength_strings" >&6 | |
6155 | ||
34a86c2b | 6156 | strict1_warn= |
b5472e1d | 6157 | if test $ac_cv_prog_cc_w_no_long_long = yes \ |
89a42ac8 ZW |
6158 | && test $ac_cv_prog_cc_w_no_variadic_macros = yes \ |
6159 | && test $ac_cv_prog_cc_w_no_overlength_strings = yes ; then | |
6160 | strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" | |
34a86c2b NN |
6161 | fi |
6162 | ||
643d3bd2 NN |
6163 | # Add -Wold-style-definition if it's accepted |
6164 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5 | |
6165 | echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6 | |
6166 | if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then | |
6167 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6168 | else | |
6169 | save_CFLAGS="$CFLAGS" | |
6170 | CFLAGS="-Wold-style-definition" | |
6171 | cat >conftest.$ac_ext <<_ACEOF | |
6172 | /* confdefs.h. */ | |
6173 | _ACEOF | |
6174 | cat confdefs.h >>conftest.$ac_ext | |
6175 | cat >>conftest.$ac_ext <<_ACEOF | |
6176 | /* end confdefs.h. */ | |
6177 | ||
6178 | _ACEOF | |
6179 | rm -f conftest.$ac_objext | |
6180 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6181 | (eval $ac_compile) 2>conftest.er1 | |
6182 | ac_status=$? | |
6183 | grep -v '^ *+' conftest.er1 >conftest.err | |
6184 | rm -f conftest.er1 | |
6185 | cat conftest.err >&5 | |
6186 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6187 | (exit $ac_status); } && | |
e8b05380 | 6188 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
643d3bd2 NN |
6189 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6190 | (eval $ac_try) 2>&5 | |
6191 | ac_status=$? | |
6192 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6193 | (exit $ac_status); }; } && | |
6194 | { ac_try='test -s conftest.$ac_objext' | |
6195 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6196 | (eval $ac_try) 2>&5 | |
6197 | ac_status=$? | |
6198 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6199 | (exit $ac_status); }; }; then | |
6200 | ac_cv_prog_cc_w_old_style_definition=yes | |
6201 | else | |
6202 | echo "$as_me: failed program was:" >&5 | |
6203 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6204 | ||
6205 | ac_cv_prog_cc_w_old_style_definition=no | |
6206 | fi | |
6207 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6208 | CFLAGS="$save_CFLAGS" | |
6209 | ||
6210 | fi | |
6211 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5 | |
6212 | echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6 | |
6213 | if test $ac_cv_prog_cc_w_old_style_definition = yes ; then | |
6214 | strict1_warn="${strict1_warn} -Wold-style-definition" | |
6215 | fi | |
6216 | ||
ac0f3f39 KG |
6217 | # Add -Wmissing-format-attribute if it's accepted |
6218 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5 | |
6219 | echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6 | |
6220 | if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then | |
6221 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6222 | else | |
6223 | save_CFLAGS="$CFLAGS" | |
6224 | CFLAGS="-Wmissing-format-attribute" | |
6225 | cat >conftest.$ac_ext <<_ACEOF | |
6226 | /* confdefs.h. */ | |
6227 | _ACEOF | |
6228 | cat confdefs.h >>conftest.$ac_ext | |
6229 | cat >>conftest.$ac_ext <<_ACEOF | |
6230 | /* end confdefs.h. */ | |
6231 | ||
6232 | _ACEOF | |
6233 | rm -f conftest.$ac_objext | |
6234 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6235 | (eval $ac_compile) 2>conftest.er1 | |
6236 | ac_status=$? | |
6237 | grep -v '^ *+' conftest.er1 >conftest.err | |
6238 | rm -f conftest.er1 | |
6239 | cat conftest.err >&5 | |
6240 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6241 | (exit $ac_status); } && | |
e8b05380 | 6242 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
ac0f3f39 KG |
6243 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6244 | (eval $ac_try) 2>&5 | |
6245 | ac_status=$? | |
6246 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6247 | (exit $ac_status); }; } && | |
6248 | { ac_try='test -s conftest.$ac_objext' | |
6249 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6250 | (eval $ac_try) 2>&5 | |
6251 | ac_status=$? | |
6252 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6253 | (exit $ac_status); }; }; then | |
6254 | ac_cv_prog_cc_w_missing_format_attribute=yes | |
6255 | else | |
6256 | echo "$as_me: failed program was:" >&5 | |
6257 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6258 | ||
6259 | ac_cv_prog_cc_w_missing_format_attribute=no | |
6260 | fi | |
6261 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6262 | CFLAGS="$save_CFLAGS" | |
6263 | ||
6264 | fi | |
6265 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5 | |
6266 | echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6 | |
6267 | if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then | |
6268 | strict1_warn="${strict1_warn} -Wmissing-format-attribute" | |
6269 | fi | |
6270 | ||
09a9c095 NN |
6271 | # Enable -Werror, period. |
6272 | # Check whether --enable-werror_always or --disable-werror_always was given. | |
6273 | if test "${enable_werror_always+set}" = set; then | |
6274 | enableval="$enable_werror_always" | |
6275 | ||
6276 | else | |
6277 | enable_werror_always=no | |
6278 | fi; | |
6279 | if test x${enable_werror_always} = xyes ; then | |
6280 | strict1_warn="${strict1_warn} -Werror" | |
6281 | WERROR=-Werror | |
6282 | fi | |
6283 | ||
ac0f3f39 KG |
6284 | |
6285 | ||
ba479fd2 | 6286 | # If the native compiler is GCC, we can enable warnings even in stage1. |
414d23ae HPN |
6287 | # That's useful for people building cross-compilers, or just running a |
6288 | # quick `make'. | |
6289 | warn_cflags= | |
6290 | if test "x$GCC" = "xyes"; then | |
6291 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
6292 | fi | |
6293 | ||
6294 | ||
dd859b8a | 6295 | # Enable -Werror in bootstrap stage2 and later. |
a1286ef5 ZW |
6296 | is_release= |
6297 | if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then | |
6298 | is_release=yes | |
6299 | fi | |
dd859b8a KG |
6300 | # Check whether --enable-werror or --disable-werror was given. |
6301 | if test "${enable_werror+set}" = set; then | |
6302 | enableval="$enable_werror" | |
ba479fd2 | 6303 | |
dd859b8a | 6304 | else |
06c37c96 NS |
6305 | if test x$is_release = x ; then |
6306 | # Default to "yes" on development branches. | |
dd859b8a | 6307 | enable_werror=yes |
06c37c96 NS |
6308 | else |
6309 | # Default to "no" on release branches. | |
6310 | enable_werror=no | |
6311 | fi | |
ba479fd2 | 6312 | fi; |
dd859b8a KG |
6313 | if test x$enable_werror = xyes ; then |
6314 | WERROR=-Werror | |
6315 | fi | |
6316 | ||
6317 | ||
414d23ae HPN |
6318 | # Enable expensive internal checks |
6319 | # Check whether --enable-checking or --disable-checking was given. | |
6320 | if test "${enable_checking+set}" = set; then | |
6321 | enableval="$enable_checking" | |
e1bbfc5c NS |
6322 | ac_checking_flags="${enableval}" |
6323 | else | |
6324 | ||
6325 | # Determine the default checks. | |
6326 | if test x$is_release = x ; then | |
6327 | ac_checking_flags=yes | |
6328 | else | |
6329 | ac_checking_flags=release | |
6330 | fi | |
6331 | fi; | |
6332 | ac_assert_checking=1 | |
6333 | ac_checking= | |
cdce5c16 NS |
6334 | ac_fold_checking= |
6335 | ac_gc_checking= | |
6336 | ac_gc_always_collect= | |
414d23ae HPN |
6337 | ac_rtl_checking= |
6338 | ac_rtlflag_checking= | |
b53ef395 | 6339 | ac_runtime_checking=1 |
cdce5c16 NS |
6340 | ac_tree_checking= |
6341 | ac_valgrind_checking= | |
e1bbfc5c NS |
6342 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," |
6343 | for check in $ac_checking_flags | |
6344 | do | |
6345 | case $check in | |
cdce5c16 | 6346 | # these set all the flags to specific states |
e1bbfc5c | 6347 | yes) ac_assert_checking=1 ; ac_checking=1 ; |
cdce5c16 NS |
6348 | ac_fold_checking= ; ac_gc_checking=1 ; |
6349 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 6350 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; |
cdce5c16 NS |
6351 | ac_tree_checking=1 ; ac_valgrind_checking= ;; |
6352 | no|none) ac_assert_checking= ; ac_checking= ; | |
6353 | ac_fold_checking= ; ac_gc_checking= ; | |
6354 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 6355 | ac_rtlflag_checking= ; ac_runtime_checking= ; |
cdce5c16 | 6356 | ac_tree_checking= ; ac_valgrind_checking= ;; |
e1bbfc5c | 6357 | all) ac_assert_checking=1 ; ac_checking=1 ; |
cdce5c16 NS |
6358 | ac_fold_checking=1 ; ac_gc_checking=1 ; |
6359 | ac_gc_always_collect=1 ; ac_rtl_checking=1 ; | |
6360 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; | |
6361 | ac_tree_checking=1 ; ac_valgrind_checking= ;; | |
6362 | release) ac_assert_checking=1 ; ac_checking= ; | |
6363 | ac_fold_checking= ; ac_gc_checking= ; | |
6364 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
6365 | ac_rtlflag_checking= ; ac_runtime_checking=1 ; | |
6366 | ac_tree_checking= ; ac_valgrind_checking= ;; | |
6367 | # these enable particular checks | |
e1bbfc5c NS |
6368 | assert) ac_assert_checking=1 ;; |
6369 | fold) ac_fold_checking=1 ;; | |
6370 | gc) ac_gc_checking=1 ;; | |
6371 | gcac) ac_gc_always_collect=1 ;; | |
6372 | misc) ac_checking=1 ;; | |
e1bbfc5c | 6373 | rtl) ac_rtl_checking=1 ;; |
cdce5c16 | 6374 | rtlflag) ac_rtlflag_checking=1 ;; |
b53ef395 | 6375 | runtime) ac_runtime_checking=1 ;; |
e1bbfc5c | 6376 | tree) ac_tree_checking=1 ;; |
cdce5c16 | 6377 | valgrind) ac_valgrind_checking=1 ;; |
e1bbfc5c | 6378 | *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 |
ba479fd2 NN |
6379 | echo "$as_me: error: unknown check category $check" >&2;} |
6380 | { (exit 1); exit 1; }; } ;; | |
e1bbfc5c NS |
6381 | esac |
6382 | done | |
6383 | IFS="$ac_save_IFS" | |
06c37c96 | 6384 | |
ba479fd2 NN |
6385 | nocommon_flag="" |
6386 | if test x$ac_checking != x ; then | |
6387 | ||
6388 | cat >>confdefs.h <<\_ACEOF | |
6389 | #define ENABLE_CHECKING 1 | |
6390 | _ACEOF | |
6391 | ||
6392 | nocommon_flag=-fno-common | |
6393 | fi | |
6394 | ||
06c37c96 NS |
6395 | if test x$ac_assert_checking != x ; then |
6396 | ||
6397 | cat >>confdefs.h <<\_ACEOF | |
6398 | #define ENABLE_ASSERT_CHECKING 1 | |
6399 | _ACEOF | |
6400 | ||
b53ef395 | 6401 | fi |
232b67d9 | 6402 | |
b53ef395 NS |
6403 | if test x$ac_runtime_checking != x ; then |
6404 | ||
6405 | cat >>confdefs.h <<\_ACEOF | |
6406 | #define ENABLE_RUNTIME_CHECKING 1 | |
6407 | _ACEOF | |
6408 | ||
06c37c96 | 6409 | fi |
ba479fd2 NN |
6410 | if test x$ac_tree_checking != x ; then |
6411 | ||
6412 | cat >>confdefs.h <<\_ACEOF | |
6413 | #define ENABLE_TREE_CHECKING 1 | |
6414 | _ACEOF | |
6415 | ||
13f05fd0 | 6416 | TREEBROWSER=tree-browser.o |
ba479fd2 | 6417 | fi |
13f05fd0 | 6418 | |
ba479fd2 NN |
6419 | if test x$ac_rtl_checking != x ; then |
6420 | ||
6421 | cat >>confdefs.h <<\_ACEOF | |
6422 | #define ENABLE_RTL_CHECKING 1 | |
6423 | _ACEOF | |
6424 | ||
6425 | fi | |
6426 | if test x$ac_rtlflag_checking != x ; then | |
6427 | ||
6428 | cat >>confdefs.h <<\_ACEOF | |
6429 | #define ENABLE_RTL_FLAG_CHECKING 1 | |
6430 | _ACEOF | |
6431 | ||
6432 | fi | |
6433 | if test x$ac_gc_checking != x ; then | |
6434 | ||
6435 | cat >>confdefs.h <<\_ACEOF | |
6436 | #define ENABLE_GC_CHECKING 1 | |
6437 | _ACEOF | |
6438 | ||
6439 | fi | |
6440 | if test x$ac_gc_always_collect != x ; then | |
6441 | ||
6442 | cat >>confdefs.h <<\_ACEOF | |
6443 | #define ENABLE_GC_ALWAYS_COLLECT 1 | |
6444 | _ACEOF | |
6445 | ||
6446 | fi | |
6447 | if test x$ac_fold_checking != x ; then | |
6448 | ||
6449 | cat >>confdefs.h <<\_ACEOF | |
6450 | #define ENABLE_FOLD_CHECKING 1 | |
6451 | _ACEOF | |
6452 | ||
6453 | fi | |
6454 | valgrind_path_defines= | |
6455 | valgrind_command= | |
6456 | ||
ba479fd2 NN |
6457 | if test "${ac_cv_header_valgrind_h+set}" = set; then |
6458 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
6459 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
6460 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
6461 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6462 | fi | |
6463 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 | |
6464 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
6465 | else | |
6466 | # Is the header compilable? | |
6467 | echo "$as_me:$LINENO: checking valgrind.h usability" >&5 | |
6468 | echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6 | |
6469 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6470 | /* confdefs.h. */ |
6471 | _ACEOF | |
6472 | cat confdefs.h >>conftest.$ac_ext | |
6473 | cat >>conftest.$ac_ext <<_ACEOF | |
6474 | /* end confdefs.h. */ | |
6475 | $ac_includes_default | |
63cf211a | 6476 | #include <valgrind.h> |
ba479fd2 NN |
6477 | _ACEOF |
6478 | rm -f conftest.$ac_objext | |
6479 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 6480 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 6481 | ac_status=$? |
86da66b5 HPN |
6482 | grep -v '^ *+' conftest.er1 >conftest.err |
6483 | rm -f conftest.er1 | |
6484 | cat conftest.err >&5 | |
ba479fd2 NN |
6485 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6486 | (exit $ac_status); } && | |
e8b05380 | 6487 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6488 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6489 | (eval $ac_try) 2>&5 | |
6490 | ac_status=$? | |
6491 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6492 | (exit $ac_status); }; } && | |
6493 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
6494 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6495 | (eval $ac_try) 2>&5 | |
6496 | ac_status=$? | |
6497 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6498 | (exit $ac_status); }; }; then | |
6499 | ac_header_compiler=yes | |
6500 | else | |
6501 | echo "$as_me: failed program was:" >&5 | |
6502 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6503 | ||
6504 | ac_header_compiler=no | |
6505 | fi | |
86da66b5 | 6506 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
6507 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 |
6508 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
6509 | ||
6510 | # Is the header present? | |
6511 | echo "$as_me:$LINENO: checking valgrind.h presence" >&5 | |
6512 | echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6 | |
6513 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6514 | /* confdefs.h. */ |
6515 | _ACEOF | |
6516 | cat confdefs.h >>conftest.$ac_ext | |
6517 | cat >>conftest.$ac_ext <<_ACEOF | |
6518 | /* end confdefs.h. */ | |
6519 | #include <valgrind.h> | |
6520 | _ACEOF | |
6521 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6522 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6523 | ac_status=$? | |
6524 | grep -v '^ *+' conftest.er1 >conftest.err | |
6525 | rm -f conftest.er1 | |
6526 | cat conftest.err >&5 | |
6527 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6528 | (exit $ac_status); } >/dev/null; then | |
6529 | if test -s conftest.err; then | |
6530 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6531 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6532 | else |
6533 | ac_cpp_err= | |
6534 | fi | |
6535 | else | |
6536 | ac_cpp_err=yes | |
6537 | fi | |
6538 | if test -z "$ac_cpp_err"; then | |
6539 | ac_header_preproc=yes | |
6540 | else | |
6541 | echo "$as_me: failed program was:" >&5 | |
6542 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6543 | ||
6544 | ac_header_preproc=no | |
6545 | fi | |
6546 | rm -f conftest.err conftest.$ac_ext | |
6547 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
6548 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
6549 | ||
6550 | # So? What about this header? | |
86da66b5 HPN |
6551 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in |
6552 | yes:no: ) | |
ba479fd2 NN |
6553 | { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 |
6554 | echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
86da66b5 HPN |
6555 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5 |
6556 | echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;} | |
6557 | ac_header_preproc=yes | |
ba479fd2 | 6558 | ;; |
86da66b5 | 6559 | no:yes:* ) |
ba479fd2 NN |
6560 | { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 |
6561 | echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} | |
86da66b5 HPN |
6562 | { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 |
6563 | echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} | |
6564 | { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5 | |
6565 | echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;} | |
6566 | { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5 | |
6567 | echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;} | |
ba479fd2 NN |
6568 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 |
6569 | echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} | |
86da66b5 HPN |
6570 | { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 |
6571 | echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;} | |
ba479fd2 NN |
6572 | ( |
6573 | cat <<\_ASBOX | |
86da66b5 HPN |
6574 | ## ------------------------------------------ ## |
6575 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
6576 | ## ------------------------------------------ ## | |
ba479fd2 NN |
6577 | _ASBOX |
6578 | ) | | |
6579 | sed "s/^/$as_me: WARNING: /" >&2 | |
6580 | ;; | |
6581 | esac | |
6582 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
6583 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
6584 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
6585 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6586 | else | |
6587 | ac_cv_header_valgrind_h=$ac_header_preproc | |
6938ec6c | 6588 | fi |
ba479fd2 NN |
6589 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 |
6590 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
6591 | ||
6e3f3080 | 6592 | fi |
ba479fd2 | 6593 | if test $ac_cv_header_valgrind_h = yes; then |
6938ec6c NN |
6594 | have_valgrind_h=yes |
6595 | else | |
ba479fd2 | 6596 | have_valgrind_h=no |
6938ec6c NN |
6597 | fi |
6598 | ||
6599 | ||
ba479fd2 | 6600 | |
cdce5c16 | 6601 | if test x$ac_valgrind_checking != x ; then |
414d23ae HPN |
6602 | # It is certainly possible that there's valgrind but no valgrind.h. |
6603 | # GCC relies on making annotations so we must have both. | |
ba479fd2 NN |
6604 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 |
6605 | echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6 | |
6606 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6607 | /* confdefs.h. */ |
6608 | _ACEOF | |
6609 | cat confdefs.h >>conftest.$ac_ext | |
6610 | cat >>conftest.$ac_ext <<_ACEOF | |
6611 | /* end confdefs.h. */ | |
a207b594 | 6612 | #include <valgrind/memcheck.h> |
14011ca4 AJ |
6613 | #ifndef VALGRIND_DISCARD |
6614 | #error VALGRIND_DISCARD not defined | |
6615 | #endif | |
ba479fd2 NN |
6616 | _ACEOF |
6617 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6618 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6619 | ac_status=$? | |
6620 | grep -v '^ *+' conftest.er1 >conftest.err | |
6621 | rm -f conftest.er1 | |
6622 | cat conftest.err >&5 | |
6623 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6624 | (exit $ac_status); } >/dev/null; then | |
6625 | if test -s conftest.err; then | |
6626 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6627 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6628 | else |
6629 | ac_cpp_err= | |
6630 | fi | |
6631 | else | |
6632 | ac_cpp_err=yes | |
6633 | fi | |
6634 | if test -z "$ac_cpp_err"; then | |
a207b594 HPN |
6635 | gcc_cv_header_valgrind_memcheck_h=yes |
6636 | else | |
ba479fd2 NN |
6637 | echo "$as_me: failed program was:" >&5 |
6638 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6639 | ||
a207b594 HPN |
6640 | gcc_cv_header_valgrind_memcheck_h=no |
6641 | fi | |
ba479fd2 NN |
6642 | rm -f conftest.err conftest.$ac_ext |
6643 | echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5 | |
6644 | echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6 | |
6645 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 | |
6646 | echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6 | |
6647 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6648 | /* confdefs.h. */ |
6649 | _ACEOF | |
6650 | cat confdefs.h >>conftest.$ac_ext | |
6651 | cat >>conftest.$ac_ext <<_ACEOF | |
6652 | /* end confdefs.h. */ | |
a207b594 HPN |
6653 | #include <memcheck.h> |
6654 | #ifndef VALGRIND_DISCARD | |
6655 | #error VALGRIND_DISCARD not defined | |
6656 | #endif | |
ba479fd2 NN |
6657 | _ACEOF |
6658 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6659 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6660 | ac_status=$? | |
6661 | grep -v '^ *+' conftest.er1 >conftest.err | |
6662 | rm -f conftest.er1 | |
6663 | cat conftest.err >&5 | |
6664 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6665 | (exit $ac_status); } >/dev/null; then | |
6666 | if test -s conftest.err; then | |
6667 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6668 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6669 | else |
6670 | ac_cpp_err= | |
6671 | fi | |
6672 | else | |
6673 | ac_cpp_err=yes | |
6674 | fi | |
6675 | if test -z "$ac_cpp_err"; then | |
14011ca4 AJ |
6676 | gcc_cv_header_memcheck_h=yes |
6677 | else | |
ba479fd2 NN |
6678 | echo "$as_me: failed program was:" >&5 |
6679 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6680 | ||
cafe096b EC |
6681 | gcc_cv_header_memcheck_h=no |
6682 | fi | |
ba479fd2 NN |
6683 | rm -f conftest.err conftest.$ac_ext |
6684 | echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5 | |
6685 | echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6 | |
6686 | ||
56694dd9 ZW |
6687 | # Prepare PATH_SEPARATOR. |
6688 | # The user is always right. | |
6689 | if test "${PATH_SEPARATOR+set}" != set; then | |
6690 | echo "#! /bin/sh" >conf$$.sh | |
6691 | echo "exit 0" >>conf$$.sh | |
6692 | chmod +x conf$$.sh | |
6693 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6694 | PATH_SEPARATOR=';' | |
6695 | else | |
6696 | PATH_SEPARATOR=: | |
6697 | fi | |
6698 | rm -f conf$$.sh | |
6699 | fi | |
6700 | ||
6701 | # Find out how to test for executable files. Don't use a zero-byte file, | |
6702 | # as systems may use methods other than mode bits to determine executability. | |
6703 | cat >conf$$.file <<_ASEOF | |
6704 | #! /bin/sh | |
6705 | exit 0 | |
6706 | _ASEOF | |
6707 | chmod +x conf$$.file | |
6708 | if test -x conf$$.file >/dev/null 2>&1; then | |
6709 | ac_executable_p="test -x" | |
6710 | else | |
6711 | ac_executable_p="test -f" | |
6712 | fi | |
6713 | rm -f conf$$.file | |
6714 | ||
6715 | # Extract the first word of "valgrind", so it can be a program name with args. | |
414d23ae | 6716 | set dummy valgrind; ac_word=$2 |
ba479fd2 NN |
6717 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
6718 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
6719 | if test "${ac_cv_path_valgrind_path+set}" = set; then | |
6720 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
6721 | else |
6722 | case "$valgrind_path" in | |
56694dd9 ZW |
6723 | [\\/]* | ?:[\\/]*) |
6724 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
6725 | ;; | |
414d23ae | 6726 | *) |
56694dd9 ZW |
6727 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR |
6728 | for ac_dir in $PATH; do | |
6729 | IFS="$ac_save_IFS" | |
6730 | test -z "$ac_dir" && ac_dir=. | |
6731 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6732 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
6733 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
6734 | ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext" | |
6735 | break 2 | |
6736 | fi | |
6737 | fi | |
6738 | done | |
6739 | done | |
6740 | IFS="$ac_save_IFS" | |
6741 | ;; | |
414d23ae | 6742 | esac |
75e93faa | 6743 | fi |
414d23ae HPN |
6744 | valgrind_path="$ac_cv_path_valgrind_path" |
6745 | if test -n "$valgrind_path"; then | |
ba479fd2 NN |
6746 | echo "$as_me:$LINENO: result: $valgrind_path" >&5 |
6747 | echo "${ECHO_T}$valgrind_path" >&6 | |
414d23ae | 6748 | else |
ba479fd2 NN |
6749 | echo "$as_me:$LINENO: result: no" >&5 |
6750 | echo "${ECHO_T}no" >&6 | |
414d23ae HPN |
6751 | fi |
6752 | ||
a207b594 HPN |
6753 | if test "x$valgrind_path" = "x" \ |
6754 | || (test $have_valgrind_h = no \ | |
6755 | && test $gcc_cv_header_memcheck_h = no \ | |
6756 | && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
ba479fd2 NN |
6757 | { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5 |
6758 | echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;} | |
6759 | { (exit 1); exit 1; }; } | |
414d23ae HPN |
6760 | fi |
6761 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
6762 | valgrind_command="$valgrind_path -q" | |
ba479fd2 NN |
6763 | |
6764 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 6765 | #define ENABLE_VALGRIND_CHECKING 1 |
ba479fd2 | 6766 | _ACEOF |
75e93faa | 6767 | |
a207b594 | 6768 | if test $gcc_cv_header_valgrind_memcheck_h = yes; then |
ba479fd2 NN |
6769 | |
6770 | cat >>confdefs.h <<\_ACEOF | |
a207b594 | 6771 | #define HAVE_VALGRIND_MEMCHECK_H 1 |
ba479fd2 | 6772 | _ACEOF |
a207b594 HPN |
6773 | |
6774 | fi | |
14011ca4 | 6775 | if test $gcc_cv_header_memcheck_h = yes; then |
ba479fd2 NN |
6776 | |
6777 | cat >>confdefs.h <<\_ACEOF | |
14011ca4 | 6778 | #define HAVE_MEMCHECK_H 1 |
ba479fd2 | 6779 | _ACEOF |
14011ca4 AJ |
6780 | |
6781 | fi | |
414d23ae | 6782 | fi |
75e93faa | 6783 | |
75e93faa ZW |
6784 | |
6785 | ||
74ee1642 PB |
6786 | # Check whether --enable-mapped-location or --disable-mapped-location was given. |
6787 | if test "${enable_mapped_location+set}" = set; then | |
6788 | enableval="$enable_mapped_location" | |
6789 | ||
6790 | else | |
6791 | enable_mapped_location=no | |
6792 | fi; | |
6793 | ||
6794 | if test "$enable_mapped_location" = yes ; then | |
6795 | ||
6796 | cat >>confdefs.h <<\_ACEOF | |
6797 | #define USE_MAPPED_LOCATION 1 | |
6798 | _ACEOF | |
6799 | ||
6800 | fi | |
6801 | ||
414d23ae HPN |
6802 | # Enable code coverage collection |
6803 | # Check whether --enable-coverage or --disable-coverage was given. | |
6804 | if test "${enable_coverage+set}" = set; then | |
6805 | enableval="$enable_coverage" | |
6806 | case "${enableval}" in | |
6dd297da NN |
6807 | yes|noopt) |
6808 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" | |
6809 | ;; | |
6810 | opt) | |
6811 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" | |
6812 | ;; | |
6813 | no) | |
6814 | # a.k.a. --disable-coverage | |
6815 | coverage_flags="" | |
6816 | ;; | |
6817 | *) | |
6818 | { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5 | |
ba479fd2 NN |
6819 | echo "$as_me: error: unknown coverage setting $enableval" >&2;} |
6820 | { (exit 1); exit 1; }; } | |
6dd297da | 6821 | ;; |
414d23ae | 6822 | esac |
75e93faa | 6823 | else |
414d23ae | 6824 | coverage_flags="" |
ba479fd2 | 6825 | fi; |
5c3bc9fb | 6826 | |
414d23ae | 6827 | |
439a7e54 DN |
6828 | # Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given. |
6829 | if test "${enable_gather_detailed_mem_stats+set}" = set; then | |
6830 | enableval="$enable_gather_detailed_mem_stats" | |
ba479fd2 | 6831 | |
439a7e54 DN |
6832 | else |
6833 | enable_gather_detailed_mem_stats=no | |
ba479fd2 | 6834 | fi; |
439a7e54 | 6835 | if test x$enable_gather_detailed_mem_stats = xyes ; then |
ba479fd2 NN |
6836 | |
6837 | cat >>confdefs.h <<\_ACEOF | |
439a7e54 | 6838 | #define GATHER_STATISTICS 1 |
ba479fd2 | 6839 | _ACEOF |
439a7e54 DN |
6840 | |
6841 | fi | |
6842 | ||
73458fb7 NN |
6843 | # ------------------------------- |
6844 | # Miscenalleous configure options | |
6845 | # ------------------------------- | |
34a86c2b NN |
6846 | |
6847 | # With stabs | |
ba479fd2 | 6848 | |
34a86c2b NN |
6849 | # Check whether --with-stabs or --without-stabs was given. |
6850 | if test "${with_stabs+set}" = set; then | |
6851 | withval="$with_stabs" | |
6852 | stabs="$with_stabs" | |
6853 | else | |
6854 | stabs=no | |
ba479fd2 | 6855 | fi; |
cafe096b | 6856 | |
34a86c2b NN |
6857 | # Determine whether or not multilibs are enabled. |
6858 | # Check whether --enable-multilib or --disable-multilib was given. | |
6859 | if test "${enable_multilib+set}" = set; then | |
6860 | enableval="$enable_multilib" | |
ba479fd2 | 6861 | |
34a86c2b NN |
6862 | else |
6863 | enable_multilib=yes | |
ba479fd2 | 6864 | fi; |
75e93faa | 6865 | |
34a86c2b | 6866 | |
414d23ae HPN |
6867 | # Enable __cxa_atexit for C++. |
6868 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. | |
6869 | if test "${enable___cxa_atexit+set}" = set; then | |
6870 | enableval="$enable___cxa_atexit" | |
75e93faa | 6871 | |
ba479fd2 | 6872 | fi; |
75e93faa | 6873 | |
486aa804 BE |
6874 | # Enable C extension for decimal float if target supports it. |
6875 | # Check whether --enable-decimal-float or --disable-decimal-float was given. | |
6876 | if test "${enable_decimal_float+set}" = set; then | |
6877 | enableval="$enable_decimal_float" | |
6878 | ||
6879 | if test x$enablevar = xyes ; then | |
6880 | case $target in | |
6881 | powerpc*-*-linux* | i?86*-*-linux*) | |
6882 | ;; | |
6883 | *) | |
6884 | { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5 | |
6885 | echo "$as_me: WARNING: decimal float is not supported for this target" >&2;} | |
6886 | enable_decimal_float=no | |
6887 | ;; | |
6888 | esac | |
6889 | fi | |
6890 | ||
6891 | else | |
6892 | ||
6893 | case $target in | |
6894 | powerpc*-*-linux*) | |
6895 | enable_decimal_float=yes | |
6896 | ;; | |
6897 | *) | |
6898 | enable_decimal_float=no | |
6899 | ;; | |
6900 | esac | |
6901 | ||
6902 | fi; | |
6903 | ||
6904 | ||
6905 | ||
6906 | dfp=`if test $enable_decimal_float = yes; then echo 1; else echo 0; fi` | |
6907 | ||
6908 | cat >>confdefs.h <<_ACEOF | |
6909 | #define ENABLE_DECIMAL_FLOAT $dfp | |
6910 | _ACEOF | |
6911 | ||
6912 | ||
414d23ae HPN |
6913 | # Enable threads |
6914 | # Pass with no value to take the default | |
6915 | # Pass with a value to specify a thread package | |
6916 | # Check whether --enable-threads or --disable-threads was given. | |
6917 | if test "${enable_threads+set}" = set; then | |
6918 | enableval="$enable_threads" | |
ba479fd2 | 6919 | |
414d23ae HPN |
6920 | else |
6921 | enable_threads='' | |
ba479fd2 | 6922 | fi; |
414d23ae | 6923 | |
8dea1cca DD |
6924 | # Check whether --enable-tls or --disable-tls was given. |
6925 | if test "${enable_tls+set}" = set; then | |
6926 | enableval="$enable_tls" | |
6927 | ||
6928 | case $enable_tls in | |
6929 | yes | no) ;; | |
6930 | *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls. | |
6931 | Valid choices are 'yes' and 'no'." >&5 | |
6932 | echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls. | |
6933 | Valid choices are 'yes' and 'no'." >&2;} | |
6934 | { (exit 1); exit 1; }; } ;; | |
6935 | esac | |
6936 | ||
6937 | else | |
6938 | enable_tls='' | |
6939 | fi; | |
6940 | ||
414d23ae HPN |
6941 | # Check whether --enable-objc-gc or --disable-objc-gc was given. |
6942 | if test "${enable_objc_gc+set}" = set; then | |
6943 | enableval="$enable_objc_gc" | |
6944 | if test x$enable_objc_gc = xno; then | |
6945 | objc_boehm_gc='' | |
6946 | else | |
6947 | objc_boehm_gc=1 | |
6948 | fi | |
6949 | else | |
6950 | objc_boehm_gc='' | |
ba479fd2 | 6951 | fi; |
75e93faa ZW |
6952 | |
6953 | ||
414d23ae HPN |
6954 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
6955 | if test "${with_dwarf2+set}" = set; then | |
6956 | withval="$with_dwarf2" | |
6957 | dwarf2="$with_dwarf2" | |
75e93faa | 6958 | else |
414d23ae | 6959 | dwarf2=no |
ba479fd2 | 6960 | fi; |
75e93faa | 6961 | |
414d23ae HPN |
6962 | # Check whether --enable-shared or --disable-shared was given. |
6963 | if test "${enable_shared+set}" = set; then | |
6964 | enableval="$enable_shared" | |
ba479fd2 | 6965 | |
414d23ae HPN |
6966 | case $enable_shared in |
6967 | yes | no) ;; | |
6968 | *) | |
6969 | enable_shared=no | |
6970 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
6971 | for pkg in $enableval; do | |
6972 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
6973 | enable_shared=yes | |
6974 | fi | |
6975 | done | |
6976 | IFS="$ac_save_ifs" | |
6977 | ;; | |
6978 | esac | |
6979 | ||
75e93faa | 6980 | else |
414d23ae | 6981 | enable_shared=yes |
ba479fd2 | 6982 | fi; |
75e93faa | 6983 | |
75e93faa | 6984 | |
75e93faa | 6985 | |
160633c6 MM |
6986 | # Check whether --with-build-sysroot or --without-build-sysroot was given. |
6987 | if test "${with_build_sysroot+set}" = set; then | |
6988 | withval="$with_build_sysroot" | |
6989 | ||
6990 | fi; | |
6991 | ||
6992 | ||
4977bab6 ZW |
6993 | # Check whether --with-sysroot or --without-sysroot was given. |
6994 | if test "${with_sysroot+set}" = set; then | |
6995 | withval="$with_sysroot" | |
ba479fd2 | 6996 | |
4977bab6 | 6997 | case ${with_sysroot} in |
caa55b1e | 6998 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; |
4977bab6 ZW |
6999 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
7000 | esac | |
ba479fd2 | 7001 | |
4977bab6 ZW |
7002 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
7003 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)' | |
7004 | ||
047d636f DJ |
7005 | if test "x$exec_prefix" = xNONE; then |
7006 | if test "x$prefix" = xNONE; then | |
7007 | test_prefix=/usr/local | |
7008 | else | |
7009 | test_prefix=$prefix | |
7010 | fi | |
7011 | else | |
7012 | test_prefix=$exec_prefix | |
7013 | fi | |
7014 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 AO |
7015 | "${test_prefix}"|"${test_prefix}/"*|\ |
7016 | '${exec_prefix}'|'${exec_prefix}/'*) | |
047d636f DJ |
7017 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
7018 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
7019 | ;; | |
7020 | esac | |
7021 | ||
4977bab6 | 7022 | else |
ba479fd2 | 7023 | |
4977bab6 | 7024 | TARGET_SYSTEM_ROOT= |
db720d9a | 7025 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
7026 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
7027 | ||
ba479fd2 | 7028 | fi; |
4977bab6 ZW |
7029 | |
7030 | ||
7031 | ||
7032 | ||
d1bd0ded | 7033 | # Build with intermodule optimisations |
d1bd0ded GK |
7034 | # Check whether --enable-intermodule or --disable-intermodule was given. |
7035 | if test "${enable_intermodule+set}" = set; then | |
7036 | enableval="$enable_intermodule" | |
0c46c5c7 KC |
7037 | case ${enable_intermodule} in |
7038 | yes) onestep="-onestep";; | |
7039 | *) onestep="";; | |
d1bd0ded | 7040 | esac |
0c46c5c7 KC |
7041 | else |
7042 | onestep="" | |
ba479fd2 | 7043 | fi; |
d1bd0ded GK |
7044 | |
7045 | ||
f3c9f174 NN |
7046 | # Sanity check enable_languages in case someone does not run the toplevel |
7047 | # configure # script. | |
7048 | # Check whether --enable-languages or --disable-languages was given. | |
7049 | if test "${enable_languages+set}" = set; then | |
7050 | enableval="$enable_languages" | |
7051 | case ,${enable_languages}, in | |
7052 | ,,|,yes,) | |
7053 | # go safe -- we cannot be much sure without the toplevel | |
7054 | # configure's | |
7055 | # analysis of which target libs are present and usable | |
7056 | enable_languages=c | |
7057 | ;; | |
7058 | *,all,*) | |
7059 | { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5 | |
7060 | echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;} | |
7061 | { (exit 1); exit 1; }; } | |
7062 | ;; | |
7063 | *,c,*) | |
7064 | ;; | |
7065 | *) | |
7066 | enable_languages=c,${enable_languages} | |
7067 | ;; | |
7068 | esac | |
7069 | else | |
7070 | enable_languages=c | |
7071 | fi; | |
7072 | ||
7073 | subdirs= | |
7074 | for lang in ${srcdir}/*/config-lang.in | |
7075 | do | |
7076 | case $lang in | |
7077 | # The odd quoting in the next line works around | |
7078 | # an apparent bug in bash 1.12 on linux. | |
7079 | ${srcdir}/[*]/config-lang.in) ;; | |
7080 | *) | |
7081 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
7082 | if test "x$lang_alias" = x | |
7083 | then | |
7084 | echo "$lang doesn't set \$language." 1>&2 | |
7085 | exit 1 | |
7086 | fi | |
7087 | case ",$enable_languages," in | |
7088 | *,$lang_alias,*) | |
7089 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;; | |
7090 | esac | |
7091 | ;; | |
7092 | esac | |
7093 | done | |
7094 | ||
7095 | ||
73458fb7 NN |
7096 | # ------------------------- |
7097 | # Checks for other programs | |
7098 | # ------------------------- | |
5b67ad6f | 7099 | |
ba479fd2 NN |
7100 | echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
7101 | echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 | |
86da66b5 | 7102 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` |
ba479fd2 NN |
7103 | if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then |
7104 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9a25f70 | 7105 | else |
ba479fd2 | 7106 | cat >conftest.make <<\_ACEOF |
e9a25f70 | 7107 | all: |
ba479fd2 NN |
7108 | @echo 'ac_maketemp="$(MAKE)"' |
7109 | _ACEOF | |
e9a25f70 | 7110 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
ba479fd2 | 7111 | eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` |
e9a25f70 JL |
7112 | if test -n "$ac_maketemp"; then |
7113 | eval ac_cv_prog_make_${ac_make}_set=yes | |
7114 | else | |
7115 | eval ac_cv_prog_make_${ac_make}_set=no | |
7116 | fi | |
ba479fd2 | 7117 | rm -f conftest.make |
e9a25f70 JL |
7118 | fi |
7119 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
ba479fd2 NN |
7120 | echo "$as_me:$LINENO: result: yes" >&5 |
7121 | echo "${ECHO_T}yes" >&6 | |
e9a25f70 JL |
7122 | SET_MAKE= |
7123 | else | |
ba479fd2 NN |
7124 | echo "$as_me:$LINENO: result: no" >&5 |
7125 | echo "${ECHO_T}no" >&6 | |
e9a25f70 JL |
7126 | SET_MAKE="MAKE=${MAKE-make}" |
7127 | fi | |
7128 | ||
7129 | ||
861bb6c1 | 7130 | # Find some useful tools |
ba479fd2 | 7131 | for ac_prog in gawk mawk nawk awk |
861bb6c1 | 7132 | do |
ba479fd2 | 7133 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 7134 | set dummy $ac_prog; ac_word=$2 |
ba479fd2 NN |
7135 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7136 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7137 | if test "${ac_cv_prog_AWK+set}" = set; then | |
7138 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7139 | else |
7140 | if test -n "$AWK"; then | |
7141 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7142 | else | |
ba479fd2 NN |
7143 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7144 | for as_dir in $PATH | |
7145 | do | |
7146 | IFS=$as_save_IFS | |
7147 | test -z "$as_dir" && as_dir=. | |
7148 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7149 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7150 | ac_cv_prog_AWK="$ac_prog" | |
7151 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7152 | break 2 | |
7153 | fi | |
7154 | done | |
7155 | done | |
7156 | ||
861bb6c1 JL |
7157 | fi |
7158 | fi | |
ba479fd2 | 7159 | AWK=$ac_cv_prog_AWK |
861bb6c1 | 7160 | if test -n "$AWK"; then |
ba479fd2 NN |
7161 | echo "$as_me:$LINENO: result: $AWK" >&5 |
7162 | echo "${ECHO_T}$AWK" >&6 | |
861bb6c1 | 7163 | else |
ba479fd2 NN |
7164 | echo "$as_me:$LINENO: result: no" >&5 |
7165 | echo "${ECHO_T}no" >&6 | |
861bb6c1 JL |
7166 | fi |
7167 | ||
ba479fd2 | 7168 | test -n "$AWK" && break |
861bb6c1 JL |
7169 | done |
7170 | ||
776dc15d | 7171 | # We need awk to create options.c and options.h. |
2c4902b9 NN |
7172 | # Bail out if it's missing. |
7173 | case ${AWK} in | |
ba479fd2 NN |
7174 | "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5 |
7175 | echo "$as_me: error: can't build without awk, bailing out" >&2;} | |
7176 | { (exit 1); exit 1; }; } ;; | |
2c4902b9 NN |
7177 | esac |
7178 | ||
ba479fd2 NN |
7179 | echo "$as_me:$LINENO: checking whether ln -s works" >&5 |
7180 | echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 | |
7181 | if test "${gcc_cv_prog_LN_S+set}" = set; then | |
7182 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7183 | else |
7184 | rm -f conftestdata_t | |
7185 | echo >conftestdata_f | |
7186 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
7187 | then | |
7188 | gcc_cv_prog_LN_S="ln -s" | |
7189 | else | |
7190 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7191 | then | |
7192 | gcc_cv_prog_LN_S=ln | |
7193 | else | |
35f06ae4 PB |
7194 | if cp -p conftestdata_f conftestdata_t 2>/dev/null |
7195 | then | |
06c3418c | 7196 | gcc_cv_prog_LN_S="cp -p" |
35f06ae4 PB |
7197 | else |
7198 | gcc_cv_prog_LN_S=cp | |
7199 | fi | |
0a4b6309 RL |
7200 | fi |
7201 | fi | |
7202 | rm -f conftestdata_f conftestdata_t | |
7203 | ||
7204 | fi | |
7205 | LN_S="$gcc_cv_prog_LN_S" | |
7206 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
ba479fd2 NN |
7207 | echo "$as_me:$LINENO: result: yes" >&5 |
7208 | echo "${ECHO_T}yes" >&6 | |
0a4b6309 RL |
7209 | else |
7210 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
ba479fd2 NN |
7211 | echo "$as_me:$LINENO: result: no, using ln" >&5 |
7212 | echo "${ECHO_T}no, using ln" >&6 | |
0a4b6309 | 7213 | else |
35f06ae4 PB |
7214 | echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5 |
7215 | echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6 | |
0a4b6309 RL |
7216 | fi |
7217 | fi | |
7218 | ||
41e622a8 AP |
7219 | echo "$as_me:$LINENO: checking whether ln works" >&5 |
7220 | echo $ECHO_N "checking whether ln works... $ECHO_C" >&6 | |
7221 | if test "${acx_cv_prog_LN+set}" = set; then | |
7222 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7223 | else | |
7224 | rm -f conftestdata_t | |
7225 | echo >conftestdata_f | |
7226 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7227 | then | |
7228 | acx_cv_prog_LN=ln | |
7229 | else | |
7230 | acx_cv_prog_LN=no | |
7231 | fi | |
7232 | rm -f conftestdata_f conftestdata_t | |
7233 | ||
7234 | fi | |
7235 | if test $acx_cv_prog_LN = no; then | |
7236 | LN="$LN_S" | |
7237 | echo "$as_me:$LINENO: result: no, using $LN" >&5 | |
7238 | echo "${ECHO_T}no, using $LN" >&6 | |
7239 | else | |
7240 | LN="$acx_cv_prog_LN" | |
7241 | echo "$as_me:$LINENO: result: yes" >&5 | |
7242 | echo "${ECHO_T}yes" >&6 | |
7243 | fi | |
7244 | ||
ba479fd2 NN |
7245 | if test -n "$ac_tool_prefix"; then |
7246 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7247 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
7248 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7249 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7250 | if test "${ac_cv_prog_RANLIB+set}" = set; then | |
7251 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7252 | else |
7253 | if test -n "$RANLIB"; then | |
7254 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7255 | else | |
ba479fd2 NN |
7256 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7257 | for as_dir in $PATH | |
7258 | do | |
7259 | IFS=$as_save_IFS | |
7260 | test -z "$as_dir" && as_dir=. | |
7261 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7262 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7263 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
7264 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7265 | break 2 | |
7266 | fi | |
7267 | done | |
7268 | done | |
7269 | ||
6e3f3080 NN |
7270 | fi |
7271 | fi | |
ba479fd2 | 7272 | RANLIB=$ac_cv_prog_RANLIB |
6e3f3080 | 7273 | if test -n "$RANLIB"; then |
ba479fd2 NN |
7274 | echo "$as_me:$LINENO: result: $RANLIB" >&5 |
7275 | echo "${ECHO_T}$RANLIB" >&6 | |
7276 | else | |
7277 | echo "$as_me:$LINENO: result: no" >&5 | |
7278 | echo "${ECHO_T}no" >&6 | |
7279 | fi | |
7280 | ||
7281 | fi | |
7282 | if test -z "$ac_cv_prog_RANLIB"; then | |
7283 | ac_ct_RANLIB=$RANLIB | |
7284 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7285 | set dummy ranlib; ac_word=$2 | |
7286 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7287 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7288 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then | |
7289 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7290 | else | |
7291 | if test -n "$ac_ct_RANLIB"; then | |
7292 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7293 | else | |
7294 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7295 | for as_dir in $PATH | |
7296 | do | |
7297 | IFS=$as_save_IFS | |
7298 | test -z "$as_dir" && as_dir=. | |
7299 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7300 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7301 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
7302 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7303 | break 2 | |
7304 | fi | |
7305 | done | |
7306 | done | |
7307 | ||
7308 | test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" | |
7309 | fi | |
7310 | fi | |
7311 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7312 | if test -n "$ac_ct_RANLIB"; then | |
7313 | echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 | |
7314 | echo "${ECHO_T}$ac_ct_RANLIB" >&6 | |
6e3f3080 | 7315 | else |
ba479fd2 NN |
7316 | echo "$as_me:$LINENO: result: no" >&5 |
7317 | echo "${ECHO_T}no" >&6 | |
7318 | fi | |
7319 | ||
7320 | RANLIB=$ac_ct_RANLIB | |
7321 | else | |
7322 | RANLIB="$ac_cv_prog_RANLIB" | |
861bb6c1 JL |
7323 | fi |
7324 | ||
343a6100 MM |
7325 | case "${host}" in |
7326 | *-*-darwin*) | |
7327 | # By default, the Darwin ranlib will not treat common symbols as | |
7328 | # definitions when building the archive table of contents. Other | |
7329 | # ranlibs do that; pass an option to the Darwin ranlib that makes | |
7330 | # it behave similarly. | |
7331 | ranlib_flags="-c" | |
7332 | ;; | |
7333 | *) | |
7334 | ranlib_flags="" | |
7335 | esac | |
7336 | ||
7337 | ||
0a4b6309 RL |
7338 | # Find a good install program. We prefer a C program (faster), |
7339 | # so one script is as good as another. But avoid the broken or | |
7340 | # incompatible versions: | |
7341 | # SysV /etc/install, /usr/sbin/install | |
7342 | # SunOS /usr/etc/install | |
7343 | # IRIX /sbin/install | |
7344 | # AIX /bin/install | |
7345 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7346 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7347 | # ./install, which can be erroneously created by make from ./install.sh. | |
ba479fd2 NN |
7348 | echo "$as_me:$LINENO: checking for a BSD compatible install" >&5 |
7349 | echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 | |
0a4b6309 | 7350 | if test -z "$INSTALL"; then |
ba479fd2 NN |
7351 | if test "${ac_cv_path_install+set}" = set; then |
7352 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7353 | else |
7354 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
7355 | for ac_dir in $PATH; do | |
7356 | # Account for people who put trailing slashes in PATH elements. | |
7357 | case "$ac_dir/" in | |
7358 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
7359 | *) | |
7360 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7361 | for ac_prog in ginstall scoinst install; do | |
7362 | if test -f $ac_dir/$ac_prog; then | |
7363 | if test $ac_prog = install && | |
7364 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
7365 | # AIX install. It has an incompatible calling convention. | |
7366 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
7367 | : | |
7368 | else | |
7369 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
7370 | break 2 | |
7371 | fi | |
7372 | fi | |
7373 | done | |
7374 | ;; | |
7375 | esac | |
7376 | done | |
7377 | IFS="$ac_save_IFS" | |
7378 | ||
7379 | fi | |
7380 | if test "${ac_cv_path_install+set}" = set; then | |
7381 | INSTALL="$ac_cv_path_install" | |
7382 | else | |
7383 | # As a last resort, use the slow shell script. We don't cache a | |
7384 | # path for INSTALL within a source directory, because that will | |
7385 | # break other packages using the cache if that directory is | |
7386 | # removed, or if the path is relative. | |
7387 | INSTALL="$ac_install_sh" | |
7388 | fi | |
7389 | fi | |
ba479fd2 NN |
7390 | echo "$as_me:$LINENO: result: $INSTALL" >&5 |
7391 | echo "${ECHO_T}$INSTALL" >&6 | |
0a4b6309 RL |
7392 | |
7393 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7394 | # It thinks the first close brace ends the variable substitution. | |
7395 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7396 | ||
7397 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
7398 | ||
861bb6c1 | 7399 | |
3a000df0 | 7400 | # See if cmp has --ignore-initial. |
ba479fd2 NN |
7401 | echo "$as_me:$LINENO: checking for cmp's capabilities" >&5 |
7402 | echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6 | |
7403 | if test "${gcc_cv_prog_cmp_skip+set}" = set; then | |
7404 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a000df0 KC |
7405 | else |
7406 | echo abfoo >t1 | |
7407 | echo cdfoo >t2 | |
269a7343 | 7408 | gcc_cv_prog_cmp_skip=slowcompare |
3a000df0 KC |
7409 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then |
7410 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
269a7343 | 7411 | : |
3a000df0 KC |
7412 | else |
7413 | gcc_cv_prog_cmp_skip=gnucompare | |
7414 | fi | |
269a7343 KG |
7415 | fi |
7416 | if test $gcc_cv_prog_cmp_skip = slowcompare ; then | |
7417 | if cmp t1 t2 2 2 > /dev/null 2>&1; then | |
7418 | if cmp t1 t2 1 1 > /dev/null 2>&1; then | |
7419 | : | |
7420 | else | |
7421 | gcc_cv_prog_cmp_skip=fastcompare | |
7422 | fi | |
7423 | fi | |
3a000df0 KC |
7424 | fi |
7425 | rm t1 t2 | |
7426 | ||
7427 | fi | |
ba479fd2 NN |
7428 | echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5 |
7429 | echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6 | |
3a000df0 KC |
7430 | make_compare_target=$gcc_cv_prog_cmp_skip |
7431 | ||
7432 | ||
7433 | ||
73458fb7 NN |
7434 | # See if we have the mktemp command. |
7435 | # Extract the first word of "mktemp", so it can be a program name with args. | |
7436 | set dummy mktemp; ac_word=$2 | |
ba479fd2 NN |
7437 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7438 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7439 | if test "${ac_cv_prog_have_mktemp_command+set}" = set; then | |
7440 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7441 | else |
7442 | if test -n "$have_mktemp_command"; then | |
7443 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
7444 | else | |
ba479fd2 NN |
7445 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7446 | for as_dir in $PATH | |
7447 | do | |
7448 | IFS=$as_save_IFS | |
7449 | test -z "$as_dir" && as_dir=. | |
7450 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7451 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7452 | ac_cv_prog_have_mktemp_command="yes" | |
7453 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7454 | break 2 | |
7455 | fi | |
7456 | done | |
7457 | done | |
7458 | ||
73458fb7 NN |
7459 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
7460 | fi | |
7461 | fi | |
ba479fd2 | 7462 | have_mktemp_command=$ac_cv_prog_have_mktemp_command |
73458fb7 | 7463 | if test -n "$have_mktemp_command"; then |
ba479fd2 NN |
7464 | echo "$as_me:$LINENO: result: $have_mktemp_command" >&5 |
7465 | echo "${ECHO_T}$have_mktemp_command" >&6 | |
73458fb7 | 7466 | else |
ba479fd2 NN |
7467 | echo "$as_me:$LINENO: result: no" >&5 |
7468 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7469 | fi |
7470 | ||
7471 | ||
7c27e184 PB |
7472 | MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing" |
7473 | ||
7474 | # See if makeinfo has been installed and is modern enough | |
7475 | # that we can use it. | |
9f18db39 PB |
7476 | |
7477 | ac_executable_extensions="$build_exeext" | |
7478 | ||
7c27e184 | 7479 | # Extract the first word of "makeinfo", so it can be a program name with args. |
73458fb7 | 7480 | set dummy makeinfo; ac_word=$2 |
ba479fd2 NN |
7481 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7482 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7483 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then | |
7484 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7485 | else |
7486 | if test -n "$MAKEINFO"; then | |
7487 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
7488 | else | |
ba479fd2 NN |
7489 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7490 | for as_dir in $PATH | |
7491 | do | |
7492 | IFS=$as_save_IFS | |
7493 | test -z "$as_dir" && as_dir=. | |
7494 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7495 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7496 | ac_cv_prog_MAKEINFO="makeinfo" | |
7497 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7498 | break 2 | |
7499 | fi | |
7500 | done | |
7501 | done | |
7502 | ||
73458fb7 NN |
7503 | fi |
7504 | fi | |
ba479fd2 | 7505 | MAKEINFO=$ac_cv_prog_MAKEINFO |
73458fb7 | 7506 | if test -n "$MAKEINFO"; then |
ba479fd2 NN |
7507 | echo "$as_me:$LINENO: result: $MAKEINFO" >&5 |
7508 | echo "${ECHO_T}$MAKEINFO" >&6 | |
73458fb7 | 7509 | else |
ba479fd2 NN |
7510 | echo "$as_me:$LINENO: result: no" >&5 |
7511 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7512 | fi |
7513 | ||
7514 | if test -n "$MAKEINFO"; then | |
7515 | # Found it, now check the version. | |
ba479fd2 NN |
7516 | echo "$as_me:$LINENO: checking for modern makeinfo" >&5 |
7517 | echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6 | |
7518 | if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then | |
7519 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7520 | else |
7521 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
7522 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
89a42ac8 | 7523 | echo "configure:7523: version of makeinfo is $ac_prog_version" >&5 |
73458fb7 NN |
7524 | case $ac_prog_version in |
7525 | '') gcc_cv_prog_makeinfo_modern=no;; | |
1a598a97 | 7526 | 4.[4-9]*) |
73458fb7 NN |
7527 | gcc_cv_prog_makeinfo_modern=yes;; |
7528 | *) gcc_cv_prog_makeinfo_modern=no;; | |
7529 | esac | |
7530 | ||
7531 | fi | |
ba479fd2 NN |
7532 | echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5 |
7533 | echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6 | |
73458fb7 NN |
7534 | else |
7535 | gcc_cv_prog_makeinfo_modern=no | |
7536 | fi | |
7537 | ||
73458fb7 | 7538 | if test $gcc_cv_prog_makeinfo_modern = no; then |
7c27e184 | 7539 | MAKEINFO="$MISSING makeinfo" |
ba479fd2 NN |
7540 | { echo "$as_me:$LINENO: WARNING: |
7541 | *** Makeinfo is missing or too old. | |
7542 | *** Info documentation will not be built." >&5 | |
7543 | echo "$as_me: WARNING: | |
cafe096b | 7544 | *** Makeinfo is missing or too old. |
ba479fd2 | 7545 | *** Info documentation will not be built." >&2;} |
73458fb7 NN |
7546 | BUILD_INFO= |
7547 | else | |
ba479fd2 | 7548 | BUILD_INFO=info |
73458fb7 NN |
7549 | fi |
7550 | ||
7c27e184 | 7551 | |
73458fb7 | 7552 | # Is pod2man recent enough to regenerate manpages? |
ba479fd2 NN |
7553 | echo "$as_me:$LINENO: checking for recent Pod::Man" >&5 |
7554 | echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6 | |
73458fb7 | 7555 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
ba479fd2 NN |
7556 | echo "$as_me:$LINENO: result: yes" >&5 |
7557 | echo "${ECHO_T}yes" >&6 | |
7558 | GENERATED_MANPAGES=generated-manpages | |
73458fb7 | 7559 | else |
ba479fd2 NN |
7560 | echo "$as_me:$LINENO: result: no" >&5 |
7561 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7562 | GENERATED_MANPAGES= |
7563 | fi | |
7564 | ||
7c27e184 | 7565 | |
73458fb7 | 7566 | # How about lex? |
7c27e184 PB |
7567 | for ac_prog in flex |
7568 | do | |
7569 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7570 | set dummy $ac_prog; ac_word=$2 | |
ba479fd2 NN |
7571 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7572 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7573 | if test "${ac_cv_prog_FLEX+set}" = set; then | |
7574 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7575 | else |
7576 | if test -n "$FLEX"; then | |
7577 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
7578 | else | |
ba479fd2 NN |
7579 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7580 | for as_dir in $PATH | |
7581 | do | |
7582 | IFS=$as_save_IFS | |
7583 | test -z "$as_dir" && as_dir=. | |
7584 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7585 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7c27e184 | 7586 | ac_cv_prog_FLEX="$ac_prog" |
ba479fd2 NN |
7587 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7588 | break 2 | |
7589 | fi | |
7590 | done | |
7591 | done | |
7592 | ||
73458fb7 NN |
7593 | fi |
7594 | fi | |
ba479fd2 | 7595 | FLEX=$ac_cv_prog_FLEX |
73458fb7 | 7596 | if test -n "$FLEX"; then |
ba479fd2 NN |
7597 | echo "$as_me:$LINENO: result: $FLEX" >&5 |
7598 | echo "${ECHO_T}$FLEX" >&6 | |
73458fb7 | 7599 | else |
ba479fd2 NN |
7600 | echo "$as_me:$LINENO: result: no" >&5 |
7601 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7602 | fi |
7603 | ||
7c27e184 PB |
7604 | test -n "$FLEX" && break |
7605 | done | |
7606 | test -n "$FLEX" || FLEX="$MISSING flex" | |
7607 | ||
73458fb7 NN |
7608 | |
7609 | # Bison? | |
7c27e184 PB |
7610 | for ac_prog in bison |
7611 | do | |
7612 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7613 | set dummy $ac_prog; ac_word=$2 | |
ba479fd2 NN |
7614 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7615 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7616 | if test "${ac_cv_prog_BISON+set}" = set; then | |
7617 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7618 | else |
7619 | if test -n "$BISON"; then | |
7620 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
7621 | else | |
ba479fd2 NN |
7622 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7623 | for as_dir in $PATH | |
7624 | do | |
7625 | IFS=$as_save_IFS | |
7626 | test -z "$as_dir" && as_dir=. | |
7627 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7628 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7c27e184 | 7629 | ac_cv_prog_BISON="$ac_prog" |
ba479fd2 NN |
7630 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7631 | break 2 | |
7632 | fi | |
7633 | done | |
7634 | done | |
7635 | ||
73458fb7 NN |
7636 | fi |
7637 | fi | |
ba479fd2 | 7638 | BISON=$ac_cv_prog_BISON |
73458fb7 | 7639 | if test -n "$BISON"; then |
ba479fd2 NN |
7640 | echo "$as_me:$LINENO: result: $BISON" >&5 |
7641 | echo "${ECHO_T}$BISON" >&6 | |
73458fb7 | 7642 | else |
ba479fd2 NN |
7643 | echo "$as_me:$LINENO: result: no" >&5 |
7644 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7645 | fi |
7646 | ||
7c27e184 PB |
7647 | test -n "$BISON" && break |
7648 | done | |
7649 | test -n "$BISON" || BISON="$MISSING bison" | |
7650 | ||
7651 | ||
7652 | # Binutils are not build modules, unlike bison/flex/makeinfo. So we | |
7653 | # check for build == host before using them. | |
73458fb7 | 7654 | |
f6a874ac | 7655 | # NM |
414adbdd GK |
7656 | if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ |
7657 | && test -d ../binutils ; then | |
f6a874ac JW |
7658 | NM='$(objdir)/../binutils/nm-new' |
7659 | else | |
7660 | # Extract the first word of "nm", so it can be a program name with args. | |
7661 | set dummy nm; ac_word=$2 | |
7662 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7663 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7664 | if test "${ac_cv_prog_NM+set}" = set; then | |
7665 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7666 | else | |
7667 | if test -n "$NM"; then | |
7668 | ac_cv_prog_NM="$NM" # Let the user override the test. | |
7669 | else | |
7670 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7671 | for as_dir in $PATH | |
7672 | do | |
7673 | IFS=$as_save_IFS | |
7674 | test -z "$as_dir" && as_dir=. | |
7675 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7676 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7677 | ac_cv_prog_NM="nm" | |
7678 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7679 | break 2 | |
7680 | fi | |
7681 | done | |
7682 | done | |
7683 | ||
7684 | test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm" | |
7685 | fi | |
7686 | fi | |
7687 | NM=$ac_cv_prog_NM | |
7688 | if test -n "$NM"; then | |
7689 | echo "$as_me:$LINENO: result: $NM" >&5 | |
7690 | echo "${ECHO_T}$NM" >&6 | |
7691 | else | |
7692 | echo "$as_me:$LINENO: result: no" >&5 | |
7693 | echo "${ECHO_T}no" >&6 | |
7694 | fi | |
7695 | ||
7696 | fi | |
7697 | ||
7698 | # AR | |
414adbdd GK |
7699 | if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ |
7700 | && test -d ../binutils ; then | |
f6a874ac JW |
7701 | AR='$(objdir)/../binutils/ar' |
7702 | else | |
7703 | # Extract the first word of "ar", so it can be a program name with args. | |
7704 | set dummy ar; ac_word=$2 | |
7705 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7706 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7707 | if test "${ac_cv_prog_AR+set}" = set; then | |
7708 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7709 | else | |
7710 | if test -n "$AR"; then | |
7711 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7712 | else | |
7713 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7714 | for as_dir in $PATH | |
7715 | do | |
7716 | IFS=$as_save_IFS | |
7717 | test -z "$as_dir" && as_dir=. | |
7718 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7719 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7720 | ac_cv_prog_AR="ar" | |
7721 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7722 | break 2 | |
7723 | fi | |
7724 | done | |
7725 | done | |
7726 | ||
7727 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar" | |
7728 | fi | |
7729 | fi | |
7730 | AR=$ac_cv_prog_AR | |
7731 | if test -n "$AR"; then | |
7732 | echo "$as_me:$LINENO: result: $AR" >&5 | |
7733 | echo "${ECHO_T}$AR" >&6 | |
7734 | else | |
7735 | echo "$as_me:$LINENO: result: no" >&5 | |
7736 | echo "${ECHO_T}no" >&6 | |
7737 | fi | |
7738 | ||
7739 | fi | |
7740 | ||
7741 | ||
73458fb7 NN |
7742 | # -------------------- |
7743 | # Checks for C headers | |
7744 | # -------------------- | |
7745 | ||
ba479fd2 NN |
7746 | echo "$as_me:$LINENO: checking for GNU C library" >&5 |
7747 | echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6 | |
7748 | if test "${gcc_cv_glibc+set}" = set; then | |
7749 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7750 | else | |
7751 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7752 | /* confdefs.h. */ |
7753 | _ACEOF | |
7754 | cat confdefs.h >>conftest.$ac_ext | |
7755 | cat >>conftest.$ac_ext <<_ACEOF | |
7756 | /* end confdefs.h. */ | |
73458fb7 | 7757 | #include <features.h> |
ba479fd2 NN |
7758 | int |
7759 | main () | |
7760 | { | |
73458fb7 NN |
7761 | |
7762 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
7763 | #error Not a GNU C library system | |
7764 | #endif | |
ba479fd2 NN |
7765 | ; |
7766 | return 0; | |
7767 | } | |
7768 | _ACEOF | |
7769 | rm -f conftest.$ac_objext | |
7770 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7771 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7772 | ac_status=$? |
86da66b5 HPN |
7773 | grep -v '^ *+' conftest.er1 >conftest.err |
7774 | rm -f conftest.er1 | |
7775 | cat conftest.err >&5 | |
ba479fd2 NN |
7776 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7777 | (exit $ac_status); } && | |
e8b05380 | 7778 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
7779 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7780 | (eval $ac_try) 2>&5 | |
7781 | ac_status=$? | |
7782 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7783 | (exit $ac_status); }; } && | |
7784 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7785 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7786 | (eval $ac_try) 2>&5 | |
7787 | ac_status=$? | |
7788 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7789 | (exit $ac_status); }; }; then | |
73458fb7 NN |
7790 | gcc_cv_glibc=yes |
7791 | else | |
ba479fd2 NN |
7792 | echo "$as_me: failed program was:" >&5 |
7793 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7794 | ||
7795 | gcc_cv_glibc=no | |
73458fb7 | 7796 | fi |
86da66b5 | 7797 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
73458fb7 NN |
7798 | fi |
7799 | ||
ba479fd2 NN |
7800 | echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5 |
7801 | echo "${ECHO_T}$gcc_cv_glibc" >&6 | |
73458fb7 | 7802 | if test $gcc_cv_glibc = yes; then |
ba479fd2 NN |
7803 | |
7804 | cat >>confdefs.h <<\_ACEOF | |
73458fb7 | 7805 | #define _GNU_SOURCE 1 |
ba479fd2 | 7806 | _ACEOF |
73458fb7 NN |
7807 | |
7808 | fi | |
7809 | ||
ca9bc441 NN |
7810 | # Need to reject headers which give warnings, so that the -Werror bootstrap |
7811 | # works later. *sigh* This needs to come before all header checks. | |
7812 | ||
7813 | ac_c_preproc_warn_flag=yes | |
7814 | ||
ba479fd2 NN |
7815 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
7816 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
7817 | if test "${ac_cv_header_stdc+set}" = set; then | |
7818 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 7819 | else |
ba479fd2 | 7820 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7821 | /* confdefs.h. */ |
7822 | _ACEOF | |
7823 | cat confdefs.h >>conftest.$ac_ext | |
7824 | cat >>conftest.$ac_ext <<_ACEOF | |
7825 | /* end confdefs.h. */ | |
956d6950 JL |
7826 | #include <stdlib.h> |
7827 | #include <stdarg.h> | |
7828 | #include <string.h> | |
7829 | #include <float.h> | |
ba479fd2 NN |
7830 | |
7831 | int | |
7832 | main () | |
7833 | { | |
7834 | ||
7835 | ; | |
7836 | return 0; | |
7837 | } | |
7838 | _ACEOF | |
7839 | rm -f conftest.$ac_objext | |
7840 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7841 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7842 | ac_status=$? |
86da66b5 HPN |
7843 | grep -v '^ *+' conftest.er1 >conftest.err |
7844 | rm -f conftest.er1 | |
7845 | cat conftest.err >&5 | |
ba479fd2 NN |
7846 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7847 | (exit $ac_status); } && | |
e8b05380 | 7848 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
7849 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7850 | (eval $ac_try) 2>&5 | |
7851 | ac_status=$? | |
7852 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7853 | (exit $ac_status); }; } && | |
7854 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7855 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7856 | (eval $ac_try) 2>&5 | |
7857 | ac_status=$? | |
7858 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7859 | (exit $ac_status); }; }; then | |
956d6950 JL |
7860 | ac_cv_header_stdc=yes |
7861 | else | |
ba479fd2 NN |
7862 | echo "$as_me: failed program was:" >&5 |
7863 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7864 | ||
7865 | ac_cv_header_stdc=no | |
956d6950 | 7866 | fi |
86da66b5 | 7867 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
7868 | |
7869 | if test $ac_cv_header_stdc = yes; then | |
7870 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
ba479fd2 | 7871 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7872 | /* confdefs.h. */ |
7873 | _ACEOF | |
7874 | cat confdefs.h >>conftest.$ac_ext | |
7875 | cat >>conftest.$ac_ext <<_ACEOF | |
7876 | /* end confdefs.h. */ | |
956d6950 | 7877 | #include <string.h> |
ba479fd2 NN |
7878 | |
7879 | _ACEOF | |
956d6950 | 7880 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 7881 | $EGREP "memchr" >/dev/null 2>&1; then |
956d6950 JL |
7882 | : |
7883 | else | |
956d6950 JL |
7884 | ac_cv_header_stdc=no |
7885 | fi | |
7886 | rm -f conftest* | |
7887 | ||
7888 | fi | |
7889 | ||
7890 | if test $ac_cv_header_stdc = yes; then | |
7891 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
ba479fd2 | 7892 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7893 | /* confdefs.h. */ |
7894 | _ACEOF | |
7895 | cat confdefs.h >>conftest.$ac_ext | |
7896 | cat >>conftest.$ac_ext <<_ACEOF | |
7897 | /* end confdefs.h. */ | |
956d6950 | 7898 | #include <stdlib.h> |
ba479fd2 NN |
7899 | |
7900 | _ACEOF | |
956d6950 | 7901 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 7902 | $EGREP "free" >/dev/null 2>&1; then |
956d6950 JL |
7903 | : |
7904 | else | |
956d6950 JL |
7905 | ac_cv_header_stdc=no |
7906 | fi | |
7907 | rm -f conftest* | |
7908 | ||
7909 | fi | |
7910 | ||
7911 | if test $ac_cv_header_stdc = yes; then | |
7912 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
ba479fd2 | 7913 | if test "$cross_compiling" = yes; then |
956d6950 JL |
7914 | : |
7915 | else | |
ba479fd2 | 7916 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7917 | /* confdefs.h. */ |
7918 | _ACEOF | |
7919 | cat confdefs.h >>conftest.$ac_ext | |
7920 | cat >>conftest.$ac_ext <<_ACEOF | |
7921 | /* end confdefs.h. */ | |
956d6950 | 7922 | #include <ctype.h> |
ba479fd2 NN |
7923 | #if ((' ' & 0x0FF) == 0x020) |
7924 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
7925 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
7926 | #else | |
7927 | # define ISLOWER(c) \ | |
86da66b5 HPN |
7928 | (('a' <= (c) && (c) <= 'i') \ |
7929 | || ('j' <= (c) && (c) <= 'r') \ | |
7930 | || ('s' <= (c) && (c) <= 'z')) | |
ba479fd2 NN |
7931 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
7932 | #endif | |
63cf211a | 7933 | |
ba479fd2 NN |
7934 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
7935 | int | |
7936 | main () | |
7937 | { | |
7938 | int i; | |
7939 | for (i = 0; i < 256; i++) | |
7940 | if (XOR (islower (i), ISLOWER (i)) | |
86da66b5 | 7941 | || toupper (i) != TOUPPER (i)) |
ba479fd2 NN |
7942 | exit(2); |
7943 | exit (0); | |
7944 | } | |
7945 | _ACEOF | |
7946 | rm -f conftest$ac_exeext | |
7947 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7948 | (eval $ac_link) 2>&5 | |
7949 | ac_status=$? | |
7950 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7951 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
7952 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7953 | (eval $ac_try) 2>&5 | |
7954 | ac_status=$? | |
7955 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7956 | (exit $ac_status); }; }; then | |
956d6950 JL |
7957 | : |
7958 | else | |
ba479fd2 NN |
7959 | echo "$as_me: program exited with status $ac_status" >&5 |
7960 | echo "$as_me: failed program was:" >&5 | |
7961 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7962 | ||
7963 | ( exit $ac_status ) | |
7964 | ac_cv_header_stdc=no | |
956d6950 | 7965 | fi |
86da66b5 | 7966 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
956d6950 | 7967 | fi |
956d6950 JL |
7968 | fi |
7969 | fi | |
ba479fd2 NN |
7970 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 |
7971 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
63cf211a | 7972 | if test $ac_cv_header_stdc = yes; then |
ba479fd2 NN |
7973 | |
7974 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 7975 | #define STDC_HEADERS 1 |
ba479fd2 | 7976 | _ACEOF |
956d6950 JL |
7977 | |
7978 | fi | |
7979 | ||
ba479fd2 NN |
7980 | echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 |
7981 | echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 | |
7982 | if test "${ac_cv_header_time+set}" = set; then | |
7983 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 7984 | else |
ba479fd2 | 7985 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7986 | /* confdefs.h. */ |
7987 | _ACEOF | |
7988 | cat confdefs.h >>conftest.$ac_ext | |
7989 | cat >>conftest.$ac_ext <<_ACEOF | |
7990 | /* end confdefs.h. */ | |
956d6950 JL |
7991 | #include <sys/types.h> |
7992 | #include <sys/time.h> | |
7993 | #include <time.h> | |
ba479fd2 NN |
7994 | |
7995 | int | |
7996 | main () | |
7997 | { | |
7998 | if ((struct tm *) 0) | |
7999 | return 0; | |
8000 | ; | |
8001 | return 0; | |
8002 | } | |
8003 | _ACEOF | |
8004 | rm -f conftest.$ac_objext | |
8005 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8006 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8007 | ac_status=$? |
86da66b5 HPN |
8008 | grep -v '^ *+' conftest.er1 >conftest.err |
8009 | rm -f conftest.er1 | |
8010 | cat conftest.err >&5 | |
ba479fd2 NN |
8011 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8012 | (exit $ac_status); } && | |
e8b05380 | 8013 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8014 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8015 | (eval $ac_try) 2>&5 | |
8016 | ac_status=$? | |
8017 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8018 | (exit $ac_status); }; } && | |
8019 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8020 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8021 | (eval $ac_try) 2>&5 | |
8022 | ac_status=$? | |
8023 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8024 | (exit $ac_status); }; }; then | |
956d6950 JL |
8025 | ac_cv_header_time=yes |
8026 | else | |
ba479fd2 NN |
8027 | echo "$as_me: failed program was:" >&5 |
8028 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8029 | ||
8030 | ac_cv_header_time=no | |
956d6950 | 8031 | fi |
86da66b5 | 8032 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 | 8033 | fi |
ba479fd2 NN |
8034 | echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 |
8035 | echo "${ECHO_T}$ac_cv_header_time" >&6 | |
63cf211a | 8036 | if test $ac_cv_header_time = yes; then |
ba479fd2 NN |
8037 | |
8038 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 8039 | #define TIME_WITH_SYS_TIME 1 |
ba479fd2 | 8040 | _ACEOF |
956d6950 JL |
8041 | |
8042 | fi | |
8043 | ||
41e622a8 AP |
8044 | echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 |
8045 | echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6 | |
8046 | if test "${gcc_cv_header_string+set}" = set; then | |
8047 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8048 | else | |
8049 | cat >conftest.$ac_ext <<_ACEOF | |
8050 | /* confdefs.h. */ | |
8051 | _ACEOF | |
8052 | cat confdefs.h >>conftest.$ac_ext | |
8053 | cat >>conftest.$ac_ext <<_ACEOF | |
8054 | /* end confdefs.h. */ | |
8055 | #include <string.h> | |
8056 | #include <strings.h> | |
8057 | int | |
8058 | main () | |
8059 | { | |
8060 | ||
8061 | ; | |
8062 | return 0; | |
8063 | } | |
8064 | _ACEOF | |
8065 | rm -f conftest.$ac_objext | |
8066 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8067 | (eval $ac_compile) 2>conftest.er1 | |
8068 | ac_status=$? | |
8069 | grep -v '^ *+' conftest.er1 >conftest.err | |
8070 | rm -f conftest.er1 | |
8071 | cat conftest.err >&5 | |
8072 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8073 | (exit $ac_status); } && | |
e8b05380 | 8074 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
41e622a8 AP |
8075 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8076 | (eval $ac_try) 2>&5 | |
8077 | ac_status=$? | |
8078 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8079 | (exit $ac_status); }; } && | |
8080 | { ac_try='test -s conftest.$ac_objext' | |
8081 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8082 | (eval $ac_try) 2>&5 | |
8083 | ac_status=$? | |
8084 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8085 | (exit $ac_status); }; }; then | |
8086 | gcc_cv_header_string=yes | |
8087 | else | |
8088 | echo "$as_me: failed program was:" >&5 | |
8089 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8090 | ||
8091 | gcc_cv_header_string=no | |
8092 | fi | |
8093 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
8094 | fi | |
8095 | echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 | |
8096 | echo "${ECHO_T}$gcc_cv_header_string" >&6 | |
8097 | if test $gcc_cv_header_string = yes; then | |
8098 | ||
8099 | cat >>confdefs.h <<\_ACEOF | |
8100 | #define STRING_WITH_STRINGS 1 | |
8101 | _ACEOF | |
8102 | ||
8103 | fi | |
8104 | ||
ba479fd2 NN |
8105 | echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
8106 | echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 | |
8107 | if test "${ac_cv_header_sys_wait_h+set}" = set; then | |
8108 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9831ca0 | 8109 | else |
ba479fd2 | 8110 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8111 | /* confdefs.h. */ |
8112 | _ACEOF | |
8113 | cat confdefs.h >>conftest.$ac_ext | |
8114 | cat >>conftest.$ac_ext <<_ACEOF | |
8115 | /* end confdefs.h. */ | |
e9831ca0 KG |
8116 | #include <sys/types.h> |
8117 | #include <sys/wait.h> | |
8118 | #ifndef WEXITSTATUS | |
ba479fd2 | 8119 | # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
e9831ca0 KG |
8120 | #endif |
8121 | #ifndef WIFEXITED | |
ba479fd2 | 8122 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 8123 | #endif |
ba479fd2 NN |
8124 | |
8125 | int | |
8126 | main () | |
8127 | { | |
8128 | int s; | |
8129 | wait (&s); | |
8130 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
8131 | ; | |
8132 | return 0; | |
8133 | } | |
8134 | _ACEOF | |
8135 | rm -f conftest.$ac_objext | |
8136 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8137 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8138 | ac_status=$? |
86da66b5 HPN |
8139 | grep -v '^ *+' conftest.er1 >conftest.err |
8140 | rm -f conftest.er1 | |
8141 | cat conftest.err >&5 | |
ba479fd2 NN |
8142 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8143 | (exit $ac_status); } && | |
e8b05380 | 8144 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8145 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8146 | (eval $ac_try) 2>&5 | |
8147 | ac_status=$? | |
8148 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8149 | (exit $ac_status); }; } && | |
8150 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8151 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8152 | (eval $ac_try) 2>&5 | |
8153 | ac_status=$? | |
8154 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8155 | (exit $ac_status); }; }; then | |
e9831ca0 KG |
8156 | ac_cv_header_sys_wait_h=yes |
8157 | else | |
ba479fd2 NN |
8158 | echo "$as_me: failed program was:" >&5 |
8159 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8160 | ||
8161 | ac_cv_header_sys_wait_h=no | |
e9831ca0 | 8162 | fi |
86da66b5 | 8163 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
e9831ca0 | 8164 | fi |
ba479fd2 NN |
8165 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 |
8166 | echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 | |
63cf211a | 8167 | if test $ac_cv_header_sys_wait_h = yes; then |
ba479fd2 NN |
8168 | |
8169 | cat >>confdefs.h <<\_ACEOF | |
e9831ca0 | 8170 | #define HAVE_SYS_WAIT_H 1 |
ba479fd2 | 8171 | _ACEOF |
6e3f3080 | 8172 | |
63cf211a | 8173 | fi |
6e3f3080 | 8174 | |
ba479fd2 NN |
8175 | |
8176 | ||
8177 | ||
8178 | ||
8179 | ||
8180 | ||
8181 | ||
8182 | ||
8183 | ||
8184 | ||
8185 | ||
8186 | ||
8187 | ||
8188 | ||
8189 | ||
8190 | ||
8191 | ||
8192 | ||
8193 | ||
8194 | ||
8195 | ||
dfb77e37 KC |
8196 | |
8197 | for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \ | |
1072ec3f | 8198 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 8199 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
56694dd9 | 8200 | direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h |
861bb6c1 | 8201 | do |
ba479fd2 | 8202 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
ca9bc441 | 8203 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
8204 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
8205 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
8206 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 8207 | else |
ca9bc441 | 8208 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8209 | /* confdefs.h. */ |
8210 | _ACEOF | |
8211 | cat confdefs.h >>conftest.$ac_ext | |
8212 | cat >>conftest.$ac_ext <<_ACEOF | |
8213 | /* end confdefs.h. */ | |
8214 | #include <$ac_header> | |
8215 | _ACEOF | |
8216 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8217 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8218 | ac_status=$? | |
8219 | grep -v '^ *+' conftest.er1 >conftest.err | |
8220 | rm -f conftest.er1 | |
8221 | cat conftest.err >&5 | |
8222 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8223 | (exit $ac_status); } >/dev/null; then | |
8224 | if test -s conftest.err; then | |
8225 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8226 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8227 | else |
8228 | ac_cpp_err= | |
8229 | fi | |
8230 | else | |
8231 | ac_cpp_err=yes | |
8232 | fi | |
8233 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 8234 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
8235 | else |
8236 | echo "$as_me: failed program was:" >&5 | |
8237 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8238 | ||
ca9bc441 | 8239 | eval "$as_ac_Header=no" |
ba479fd2 NN |
8240 | fi |
8241 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8242 | fi |
ba479fd2 NN |
8243 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
8244 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
8245 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
8246 | cat >>confdefs.h <<_ACEOF | |
8247 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8248 | _ACEOF | |
8249 | ||
956d6950 JL |
8250 | fi |
8251 | done | |
8252 | ||
8253 | ||
f24af81b | 8254 | # Check for thread headers. |
ca9bc441 | 8255 | echo "$as_me:$LINENO: checking for thread.h" >&5 |
ba479fd2 NN |
8256 | echo $ECHO_N "checking for thread.h... $ECHO_C" >&6 |
8257 | if test "${ac_cv_header_thread_h+set}" = set; then | |
8258 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 8259 | else |
ca9bc441 | 8260 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8261 | /* confdefs.h. */ |
8262 | _ACEOF | |
8263 | cat confdefs.h >>conftest.$ac_ext | |
8264 | cat >>conftest.$ac_ext <<_ACEOF | |
8265 | /* end confdefs.h. */ | |
8266 | #include <thread.h> | |
8267 | _ACEOF | |
8268 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8269 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8270 | ac_status=$? | |
8271 | grep -v '^ *+' conftest.er1 >conftest.err | |
8272 | rm -f conftest.er1 | |
8273 | cat conftest.err >&5 | |
8274 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8275 | (exit $ac_status); } >/dev/null; then | |
8276 | if test -s conftest.err; then | |
8277 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8278 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8279 | else |
8280 | ac_cpp_err= | |
8281 | fi | |
8282 | else | |
8283 | ac_cpp_err=yes | |
8284 | fi | |
8285 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 8286 | ac_cv_header_thread_h=yes |
ba479fd2 NN |
8287 | else |
8288 | echo "$as_me: failed program was:" >&5 | |
8289 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8290 | ||
ca9bc441 | 8291 | ac_cv_header_thread_h=no |
ba479fd2 NN |
8292 | fi |
8293 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8294 | fi |
ba479fd2 NN |
8295 | echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5 |
8296 | echo "${ECHO_T}$ac_cv_header_thread_h" >&6 | |
ba479fd2 | 8297 | if test $ac_cv_header_thread_h = yes; then |
f24af81b TT |
8298 | have_thread_h=yes |
8299 | else | |
ba479fd2 | 8300 | have_thread_h= |
f24af81b TT |
8301 | fi |
8302 | ||
ca9bc441 | 8303 | echo "$as_me:$LINENO: checking for pthread.h" >&5 |
ba479fd2 NN |
8304 | echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 |
8305 | if test "${ac_cv_header_pthread_h+set}" = set; then | |
8306 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f24af81b | 8307 | else |
ca9bc441 | 8308 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8309 | /* confdefs.h. */ |
8310 | _ACEOF | |
8311 | cat confdefs.h >>conftest.$ac_ext | |
8312 | cat >>conftest.$ac_ext <<_ACEOF | |
8313 | /* end confdefs.h. */ | |
8314 | #include <pthread.h> | |
8315 | _ACEOF | |
8316 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8317 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8318 | ac_status=$? | |
8319 | grep -v '^ *+' conftest.er1 >conftest.err | |
8320 | rm -f conftest.er1 | |
8321 | cat conftest.err >&5 | |
8322 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8323 | (exit $ac_status); } >/dev/null; then | |
8324 | if test -s conftest.err; then | |
8325 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8326 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8327 | else |
8328 | ac_cpp_err= | |
8329 | fi | |
8330 | else | |
8331 | ac_cpp_err=yes | |
8332 | fi | |
8333 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 8334 | ac_cv_header_pthread_h=yes |
ba479fd2 NN |
8335 | else |
8336 | echo "$as_me: failed program was:" >&5 | |
8337 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8338 | ||
ca9bc441 | 8339 | ac_cv_header_pthread_h=no |
ba479fd2 NN |
8340 | fi |
8341 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8342 | fi |
ba479fd2 NN |
8343 | echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 |
8344 | echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 | |
ba479fd2 | 8345 | if test $ac_cv_header_pthread_h = yes; then |
f24af81b TT |
8346 | have_pthread_h=yes |
8347 | else | |
ba479fd2 | 8348 | have_pthread_h= |
f24af81b TT |
8349 | fi |
8350 | ||
8351 | ||
84c041a1 | 8352 | # These tests can't be done till we know if we have limits.h. |
ba479fd2 NN |
8353 | echo "$as_me:$LINENO: checking for CHAR_BIT" >&5 |
8354 | echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6 | |
8355 | if test "${gcc_cv_decl_char_bit+set}" = set; then | |
8356 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8357 | else | |
8358 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8359 | /* confdefs.h. */ |
8360 | _ACEOF | |
8361 | cat confdefs.h >>conftest.$ac_ext | |
8362 | cat >>conftest.$ac_ext <<_ACEOF | |
8363 | /* end confdefs.h. */ | |
75e93faa ZW |
8364 | #ifdef HAVE_LIMITS_H |
8365 | #include <limits.h> | |
8366 | #endif | |
8367 | #ifdef CHAR_BIT | |
8368 | found | |
8369 | #endif | |
ba479fd2 | 8370 | _ACEOF |
75e93faa | 8371 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8372 | $EGREP "found" >/dev/null 2>&1; then |
75e93faa ZW |
8373 | gcc_cv_decl_char_bit=yes |
8374 | else | |
75e93faa ZW |
8375 | gcc_cv_decl_char_bit=no |
8376 | fi | |
8377 | rm -f conftest* | |
8378 | ||
8379 | ||
8380 | fi | |
ba479fd2 NN |
8381 | echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5 |
8382 | echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6 | |
75e93faa | 8383 | if test $gcc_cv_decl_char_bit = no; then |
ba479fd2 NN |
8384 | echo "$as_me:$LINENO: checking number of bits in a byte" >&5 |
8385 | echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6 | |
8386 | if test "${gcc_cv_c_nbby+set}" = set; then | |
8387 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa ZW |
8388 | else |
8389 | i=8 | |
8390 | gcc_cv_c_nbby= | |
8391 | while test $i -lt 65; do | |
ba479fd2 | 8392 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8393 | /* confdefs.h. */ |
8394 | _ACEOF | |
8395 | cat confdefs.h >>conftest.$ac_ext | |
8396 | cat >>conftest.$ac_ext <<_ACEOF | |
8397 | /* end confdefs.h. */ | |
8398 | ||
8399 | int | |
8400 | main () | |
8401 | { | |
4e70264f ZW |
8402 | switch(0) { |
8403 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
8404 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
8405 | ; } | |
ba479fd2 NN |
8406 | ; |
8407 | return 0; | |
8408 | } | |
8409 | _ACEOF | |
8410 | rm -f conftest.$ac_objext | |
8411 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8412 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8413 | ac_status=$? |
86da66b5 HPN |
8414 | grep -v '^ *+' conftest.er1 >conftest.err |
8415 | rm -f conftest.er1 | |
8416 | cat conftest.err >&5 | |
ba479fd2 NN |
8417 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8418 | (exit $ac_status); } && | |
e8b05380 | 8419 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8420 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8421 | (eval $ac_try) 2>&5 | |
8422 | ac_status=$? | |
8423 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8424 | (exit $ac_status); }; } && | |
8425 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8426 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8427 | (eval $ac_try) 2>&5 | |
8428 | ac_status=$? | |
8429 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8430 | (exit $ac_status); }; }; then | |
4e70264f | 8431 | gcc_cv_c_nbby=$i; break |
75e93faa | 8432 | else |
ba479fd2 NN |
8433 | echo "$as_me: failed program was:" >&5 |
8434 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8435 | ||
75e93faa | 8436 | fi |
86da66b5 | 8437 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75e93faa ZW |
8438 | i=`expr $i + 1` |
8439 | done | |
8440 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
8441 | ||
8442 | fi | |
ba479fd2 NN |
8443 | echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5 |
8444 | echo "${ECHO_T}$gcc_cv_c_nbby" >&6 | |
75e93faa | 8445 | if test $gcc_cv_c_nbby = failed; then |
ba479fd2 NN |
8446 | { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5 |
8447 | echo "$as_me: error: cannot determine number of bits in a byte" >&2;} | |
8448 | { (exit 1); exit 1; }; } | |
75e93faa | 8449 | else |
ba479fd2 NN |
8450 | |
8451 | cat >>confdefs.h <<_ACEOF | |
75e93faa | 8452 | #define CHAR_BIT $gcc_cv_c_nbby |
ba479fd2 | 8453 | _ACEOF |
75e93faa ZW |
8454 | |
8455 | fi | |
8456 | fi | |
ba479fd2 NN |
8457 | echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 |
8458 | echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 | |
8459 | if test "${ac_cv_c_bigendian+set}" = set; then | |
8460 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
84c041a1 | 8461 | else |
9791c75c | 8462 | # See if sys/param.h defines the BYTE_ORDER macro. |
ba479fd2 | 8463 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8464 | /* confdefs.h. */ |
8465 | _ACEOF | |
8466 | cat confdefs.h >>conftest.$ac_ext | |
8467 | cat >>conftest.$ac_ext <<_ACEOF | |
8468 | /* end confdefs.h. */ | |
4977bab6 ZW |
8469 | #include <sys/types.h> |
8470 | #include <sys/param.h> | |
9791c75c | 8471 | |
ba479fd2 NN |
8472 | int |
8473 | main () | |
8474 | { | |
4977bab6 ZW |
8475 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
8476 | bogus endian macros | |
84c041a1 | 8477 | #endif |
9791c75c | 8478 | |
ba479fd2 NN |
8479 | ; |
8480 | return 0; | |
8481 | } | |
8482 | _ACEOF | |
8483 | rm -f conftest.$ac_objext | |
8484 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8485 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8486 | ac_status=$? |
86da66b5 HPN |
8487 | grep -v '^ *+' conftest.er1 >conftest.err |
8488 | rm -f conftest.er1 | |
8489 | cat conftest.err >&5 | |
ba479fd2 NN |
8490 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8491 | (exit $ac_status); } && | |
e8b05380 | 8492 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8493 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8494 | (eval $ac_try) 2>&5 | |
8495 | ac_status=$? | |
8496 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8497 | (exit $ac_status); }; } && | |
8498 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8499 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8500 | (eval $ac_try) 2>&5 | |
8501 | ac_status=$? | |
8502 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8503 | (exit $ac_status); }; }; then | |
4977bab6 | 8504 | # It does; now see whether it defined to BIG_ENDIAN or not. |
ba479fd2 | 8505 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8506 | /* confdefs.h. */ |
8507 | _ACEOF | |
8508 | cat confdefs.h >>conftest.$ac_ext | |
8509 | cat >>conftest.$ac_ext <<_ACEOF | |
8510 | /* end confdefs.h. */ | |
4977bab6 ZW |
8511 | #include <sys/types.h> |
8512 | #include <sys/param.h> | |
9791c75c | 8513 | |
ba479fd2 NN |
8514 | int |
8515 | main () | |
8516 | { | |
4977bab6 ZW |
8517 | #if BYTE_ORDER != BIG_ENDIAN |
8518 | not big endian | |
84c041a1 | 8519 | #endif |
9791c75c | 8520 | |
ba479fd2 NN |
8521 | ; |
8522 | return 0; | |
8523 | } | |
8524 | _ACEOF | |
8525 | rm -f conftest.$ac_objext | |
8526 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8527 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8528 | ac_status=$? |
86da66b5 HPN |
8529 | grep -v '^ *+' conftest.er1 >conftest.err |
8530 | rm -f conftest.er1 | |
8531 | cat conftest.err >&5 | |
ba479fd2 NN |
8532 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8533 | (exit $ac_status); } && | |
e8b05380 | 8534 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8535 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8536 | (eval $ac_try) 2>&5 | |
8537 | ac_status=$? | |
8538 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8539 | (exit $ac_status); }; } && | |
8540 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8541 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8542 | (eval $ac_try) 2>&5 | |
8543 | ac_status=$? | |
8544 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8545 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
8546 | ac_cv_c_bigendian=yes |
8547 | else | |
ba479fd2 NN |
8548 | echo "$as_me: failed program was:" >&5 |
8549 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8550 | ||
8551 | ac_cv_c_bigendian=no | |
4977bab6 | 8552 | fi |
86da66b5 | 8553 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 8554 | else |
ba479fd2 NN |
8555 | echo "$as_me: failed program was:" >&5 |
8556 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8557 | ||
9791c75c KC |
8558 | # It does not; compile a test program. |
8559 | if test "$cross_compiling" = yes; then | |
8560 | # try to guess the endianness by grepping values into an object file | |
8561 | ac_cv_c_bigendian=unknown | |
8562 | cat >conftest.$ac_ext <<_ACEOF | |
8563 | /* confdefs.h. */ | |
8564 | _ACEOF | |
8565 | cat confdefs.h >>conftest.$ac_ext | |
8566 | cat >>conftest.$ac_ext <<_ACEOF | |
8567 | /* end confdefs.h. */ | |
8568 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
8569 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
8570 | void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } | |
8571 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
8572 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
8573 | void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } | |
8574 | int | |
8575 | main () | |
8576 | { | |
8577 | _ascii (); _ebcdic (); | |
8578 | ; | |
8579 | return 0; | |
8580 | } | |
8581 | _ACEOF | |
8582 | rm -f conftest.$ac_objext | |
8583 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8584 | (eval $ac_compile) 2>conftest.er1 | |
8585 | ac_status=$? | |
8586 | grep -v '^ *+' conftest.er1 >conftest.err | |
8587 | rm -f conftest.er1 | |
8588 | cat conftest.err >&5 | |
8589 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8590 | (exit $ac_status); } && | |
e8b05380 | 8591 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
9791c75c KC |
8592 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8593 | (eval $ac_try) 2>&5 | |
8594 | ac_status=$? | |
8595 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8596 | (exit $ac_status); }; } && | |
8597 | { ac_try='test -s conftest.$ac_objext' | |
8598 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8599 | (eval $ac_try) 2>&5 | |
8600 | ac_status=$? | |
8601 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8602 | (exit $ac_status); }; }; then | |
8603 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then | |
8604 | ac_cv_c_bigendian=yes | |
8605 | fi | |
8606 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
8607 | if test "$ac_cv_c_bigendian" = unknown; then | |
8608 | ac_cv_c_bigendian=no | |
8609 | else | |
8610 | # finding both strings is unlikely to happen, but who knows? | |
8611 | ac_cv_c_bigendian=unknown | |
8612 | fi | |
8613 | fi | |
8614 | else | |
8615 | echo "$as_me: failed program was:" >&5 | |
8616 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8617 | ||
4977bab6 | 8618 | fi |
86da66b5 | 8619 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
8620 | else |
8621 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8622 | /* confdefs.h. */ |
8623 | _ACEOF | |
8624 | cat confdefs.h >>conftest.$ac_ext | |
8625 | cat >>conftest.$ac_ext <<_ACEOF | |
8626 | /* end confdefs.h. */ | |
9791c75c KC |
8627 | int |
8628 | main () | |
8629 | { | |
4977bab6 ZW |
8630 | /* Are we little or big endian? From Harbison&Steele. */ |
8631 | union | |
8632 | { | |
8633 | long l; | |
8634 | char c[sizeof (long)]; | |
8635 | } u; | |
8636 | u.l = 1; | |
8637 | exit (u.c[sizeof (long) - 1] == 1); | |
8638 | } | |
ba479fd2 NN |
8639 | _ACEOF |
8640 | rm -f conftest$ac_exeext | |
8641 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8642 | (eval $ac_link) 2>&5 | |
8643 | ac_status=$? | |
8644 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8645 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
8646 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8647 | (eval $ac_try) 2>&5 | |
8648 | ac_status=$? | |
8649 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8650 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
8651 | ac_cv_c_bigendian=no |
8652 | else | |
ba479fd2 NN |
8653 | echo "$as_me: program exited with status $ac_status" >&5 |
8654 | echo "$as_me: failed program was:" >&5 | |
8655 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8656 | ||
8657 | ( exit $ac_status ) | |
8658 | ac_cv_c_bigendian=yes | |
4977bab6 | 8659 | fi |
86da66b5 | 8660 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
84c041a1 | 8661 | fi |
4977bab6 | 8662 | fi |
9791c75c | 8663 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 8664 | fi |
ba479fd2 NN |
8665 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 |
8666 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
9791c75c KC |
8667 | case $ac_cv_c_bigendian in |
8668 | yes) | |
ba479fd2 NN |
8669 | |
8670 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 8671 | #define WORDS_BIGENDIAN 1 |
ba479fd2 | 8672 | _ACEOF |
9791c75c KC |
8673 | ;; |
8674 | no) | |
8675 | ;; | |
8676 | *) | |
8677 | { { echo "$as_me:$LINENO: error: unknown endianness | |
8678 | presetting ac_cv_c_bigendian=no (or yes) will help" >&5 | |
8679 | echo "$as_me: error: unknown endianness | |
8680 | presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} | |
8681 | { (exit 1); exit 1; }; } ;; | |
8682 | esac | |
84c041a1 | 8683 | |
75e93faa | 8684 | |
73458fb7 NN |
8685 | # -------- |
8686 | # UNSORTED | |
8687 | # -------- | |
1e608388 | 8688 | |
73458fb7 NN |
8689 | # Stage specific cflags for build. |
8690 | stage1_cflags= | |
8691 | case $build in | |
8692 | vax-*-*) | |
8693 | if test x$GCC = xyes | |
8694 | then | |
8695 | stage1_cflags="-Wa,-J" | |
8696 | else | |
8697 | stage1_cflags="-J" | |
8698 | fi | |
8699 | ;; | |
8700 | powerpc-*-darwin*) | |
8701 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
8702 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
8703 | # Apple's GCC has bugs in designated initializer handling, so disable | |
8704 | # that too. | |
8705 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
8706 | ;; | |
8707 | esac | |
1e608388 | 8708 | |
1e608388 | 8709 | |
4e70264f ZW |
8710 | # These libraries may be used by collect2. |
8711 | # We may need a special search path to get them linked. | |
ba479fd2 NN |
8712 | echo "$as_me:$LINENO: checking for collect2 libraries" >&5 |
8713 | echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6 | |
8714 | if test "${gcc_cv_collect2_libs+set}" = set; then | |
8715 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4e70264f ZW |
8716 | else |
8717 | save_LIBS="$LIBS" | |
7f2749d4 | 8718 | for libs in '' -lld -lmld \ |
4e70264f ZW |
8719 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
8720 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
8721 | do | |
8722 | LIBS="$libs" | |
ba479fd2 | 8723 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8724 | /* confdefs.h. */ |
8725 | _ACEOF | |
8726 | cat confdefs.h >>conftest.$ac_ext | |
8727 | cat >>conftest.$ac_ext <<_ACEOF | |
8728 | /* end confdefs.h. */ | |
8729 | ||
4e70264f | 8730 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8731 | #ifdef __cplusplus |
8732 | extern "C" | |
8733 | #endif | |
4e70264f | 8734 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8735 | builtin and then its argument prototype would still apply. */ |
8736 | char ldopen (); | |
8737 | int | |
8738 | main () | |
8739 | { | |
8740 | ldopen (); | |
8741 | ; | |
8742 | return 0; | |
8743 | } | |
8744 | _ACEOF | |
8745 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8746 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8747 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8748 | ac_status=$? |
86da66b5 HPN |
8749 | grep -v '^ *+' conftest.er1 >conftest.err |
8750 | rm -f conftest.er1 | |
8751 | cat conftest.err >&5 | |
ba479fd2 NN |
8752 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8753 | (exit $ac_status); } && | |
e8b05380 | 8754 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8755 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8756 | (eval $ac_try) 2>&5 | |
8757 | ac_status=$? | |
8758 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8759 | (exit $ac_status); }; } && | |
8760 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8761 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8762 | (eval $ac_try) 2>&5 | |
8763 | ac_status=$? | |
8764 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8765 | (exit $ac_status); }; }; then | |
4e70264f ZW |
8766 | gcc_cv_collect2_libs="$libs"; break |
8767 | else | |
ba479fd2 NN |
8768 | echo "$as_me: failed program was:" >&5 |
8769 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8770 | ||
4e70264f | 8771 | fi |
86da66b5 HPN |
8772 | rm -f conftest.err conftest.$ac_objext \ |
8773 | conftest$ac_exeext conftest.$ac_ext | |
4e70264f ZW |
8774 | done |
8775 | LIBS="$save_LIBS" | |
8776 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
8777 | fi | |
ba479fd2 NN |
8778 | echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5 |
8779 | echo "${ECHO_T}$gcc_cv_collect2_libs" >&6 | |
4e70264f ZW |
8780 | case $gcc_cv_collect2_libs in |
8781 | "none required") ;; | |
8782 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
8783 | esac | |
8784 | ||
8785 | ||
7f2749d4 RK |
8786 | # When building Ada code on Alpha, we need exc_resume which is usually in |
8787 | # -lexc. So test for it. | |
8788 | save_LIBS="$LIBS" | |
8789 | LIBS= | |
ba479fd2 NN |
8790 | echo "$as_me:$LINENO: checking for library containing exc_resume" >&5 |
8791 | echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6 | |
8792 | if test "${ac_cv_search_exc_resume+set}" = set; then | |
8793 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8794 | else | |
8795 | ac_func_search_save_LIBS=$LIBS | |
8796 | ac_cv_search_exc_resume=no | |
8797 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8798 | /* confdefs.h. */ |
8799 | _ACEOF | |
8800 | cat confdefs.h >>conftest.$ac_ext | |
8801 | cat >>conftest.$ac_ext <<_ACEOF | |
8802 | /* end confdefs.h. */ | |
7f2749d4 | 8803 | |
7f2749d4 | 8804 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8805 | #ifdef __cplusplus |
8806 | extern "C" | |
8807 | #endif | |
7f2749d4 | 8808 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8809 | builtin and then its argument prototype would still apply. */ |
8810 | char exc_resume (); | |
8811 | int | |
8812 | main () | |
8813 | { | |
8814 | exc_resume (); | |
8815 | ; | |
8816 | return 0; | |
8817 | } | |
8818 | _ACEOF | |
8819 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8820 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8821 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8822 | ac_status=$? |
86da66b5 HPN |
8823 | grep -v '^ *+' conftest.er1 >conftest.err |
8824 | rm -f conftest.er1 | |
8825 | cat conftest.err >&5 | |
ba479fd2 NN |
8826 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8827 | (exit $ac_status); } && | |
e8b05380 | 8828 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8829 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8830 | (eval $ac_try) 2>&5 | |
8831 | ac_status=$? | |
8832 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8833 | (exit $ac_status); }; } && | |
8834 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8835 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8836 | (eval $ac_try) 2>&5 | |
8837 | ac_status=$? | |
8838 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8839 | (exit $ac_status); }; }; then | |
7f2749d4 RK |
8840 | ac_cv_search_exc_resume="none required" |
8841 | else | |
ba479fd2 NN |
8842 | echo "$as_me: failed program was:" >&5 |
8843 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8844 | ||
7f2749d4 | 8845 | fi |
86da66b5 HPN |
8846 | rm -f conftest.err conftest.$ac_objext \ |
8847 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
8848 | if test "$ac_cv_search_exc_resume" = no; then |
8849 | for ac_lib in exc; do | |
8850 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8851 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8852 | /* confdefs.h. */ |
8853 | _ACEOF | |
8854 | cat confdefs.h >>conftest.$ac_ext | |
8855 | cat >>conftest.$ac_ext <<_ACEOF | |
8856 | /* end confdefs.h. */ | |
8857 | ||
7f2749d4 | 8858 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8859 | #ifdef __cplusplus |
8860 | extern "C" | |
8861 | #endif | |
7f2749d4 | 8862 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8863 | builtin and then its argument prototype would still apply. */ |
8864 | char exc_resume (); | |
8865 | int | |
8866 | main () | |
8867 | { | |
8868 | exc_resume (); | |
8869 | ; | |
8870 | return 0; | |
8871 | } | |
8872 | _ACEOF | |
8873 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8874 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8875 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8876 | ac_status=$? |
86da66b5 HPN |
8877 | grep -v '^ *+' conftest.er1 >conftest.err |
8878 | rm -f conftest.er1 | |
8879 | cat conftest.err >&5 | |
ba479fd2 NN |
8880 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8881 | (exit $ac_status); } && | |
e8b05380 | 8882 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8883 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8884 | (eval $ac_try) 2>&5 | |
8885 | ac_status=$? | |
8886 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8887 | (exit $ac_status); }; } && | |
8888 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8889 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8890 | (eval $ac_try) 2>&5 | |
8891 | ac_status=$? | |
8892 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8893 | (exit $ac_status); }; }; then | |
8894 | ac_cv_search_exc_resume="-l$ac_lib" | |
7f2749d4 RK |
8895 | break |
8896 | else | |
ba479fd2 NN |
8897 | echo "$as_me: failed program was:" >&5 |
8898 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8899 | ||
cafe096b | 8900 | fi |
86da66b5 HPN |
8901 | rm -f conftest.err conftest.$ac_objext \ |
8902 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 8903 | done |
6e3f3080 | 8904 | fi |
ba479fd2 NN |
8905 | LIBS=$ac_func_search_save_LIBS |
8906 | fi | |
8907 | echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5 | |
8908 | echo "${ECHO_T}$ac_cv_search_exc_resume" >&6 | |
8909 | if test "$ac_cv_search_exc_resume" != no; then | |
63cf211a | 8910 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" |
ba479fd2 | 8911 | |
7f2749d4 | 8912 | fi |
ba479fd2 | 8913 | |
7f2749d4 RK |
8914 | GNAT_LIBEXC="$LIBS" |
8915 | LIBS="$save_LIBS" | |
8916 | ||
8917 | ||
62c9aa5f ZW |
8918 | # Some systems put ldexp and frexp in libm instead of libc; assume |
8919 | # they're both in the same place. jcf-dump needs them. | |
8920 | save_LIBS="$LIBS" | |
8921 | LIBS= | |
ba479fd2 NN |
8922 | echo "$as_me:$LINENO: checking for library containing ldexp" >&5 |
8923 | echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6 | |
8924 | if test "${ac_cv_search_ldexp+set}" = set; then | |
8925 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8926 | else | |
8927 | ac_func_search_save_LIBS=$LIBS | |
8928 | ac_cv_search_ldexp=no | |
8929 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8930 | /* confdefs.h. */ |
8931 | _ACEOF | |
8932 | cat confdefs.h >>conftest.$ac_ext | |
8933 | cat >>conftest.$ac_ext <<_ACEOF | |
8934 | /* end confdefs.h. */ | |
62c9aa5f | 8935 | |
62c9aa5f | 8936 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8937 | #ifdef __cplusplus |
8938 | extern "C" | |
8939 | #endif | |
62c9aa5f | 8940 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8941 | builtin and then its argument prototype would still apply. */ |
8942 | char ldexp (); | |
8943 | int | |
8944 | main () | |
8945 | { | |
8946 | ldexp (); | |
8947 | ; | |
8948 | return 0; | |
8949 | } | |
8950 | _ACEOF | |
8951 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8952 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8953 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8954 | ac_status=$? |
86da66b5 HPN |
8955 | grep -v '^ *+' conftest.er1 >conftest.err |
8956 | rm -f conftest.er1 | |
8957 | cat conftest.err >&5 | |
ba479fd2 NN |
8958 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8959 | (exit $ac_status); } && | |
e8b05380 | 8960 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8961 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8962 | (eval $ac_try) 2>&5 | |
8963 | ac_status=$? | |
8964 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8965 | (exit $ac_status); }; } && | |
8966 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8967 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8968 | (eval $ac_try) 2>&5 | |
8969 | ac_status=$? | |
8970 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8971 | (exit $ac_status); }; }; then | |
62c9aa5f ZW |
8972 | ac_cv_search_ldexp="none required" |
8973 | else | |
ba479fd2 NN |
8974 | echo "$as_me: failed program was:" >&5 |
8975 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8976 | ||
62c9aa5f | 8977 | fi |
86da66b5 HPN |
8978 | rm -f conftest.err conftest.$ac_objext \ |
8979 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
8980 | if test "$ac_cv_search_ldexp" = no; then |
8981 | for ac_lib in m; do | |
8982 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8983 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8984 | /* confdefs.h. */ |
8985 | _ACEOF | |
8986 | cat confdefs.h >>conftest.$ac_ext | |
8987 | cat >>conftest.$ac_ext <<_ACEOF | |
8988 | /* end confdefs.h. */ | |
8989 | ||
62c9aa5f | 8990 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8991 | #ifdef __cplusplus |
8992 | extern "C" | |
8993 | #endif | |
62c9aa5f | 8994 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8995 | builtin and then its argument prototype would still apply. */ |
8996 | char ldexp (); | |
8997 | int | |
8998 | main () | |
8999 | { | |
9000 | ldexp (); | |
9001 | ; | |
9002 | return 0; | |
9003 | } | |
9004 | _ACEOF | |
9005 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9006 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9007 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9008 | ac_status=$? |
86da66b5 HPN |
9009 | grep -v '^ *+' conftest.er1 >conftest.err |
9010 | rm -f conftest.er1 | |
9011 | cat conftest.err >&5 | |
ba479fd2 NN |
9012 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9013 | (exit $ac_status); } && | |
e8b05380 | 9014 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9015 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9016 | (eval $ac_try) 2>&5 | |
9017 | ac_status=$? | |
9018 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9019 | (exit $ac_status); }; } && | |
9020 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9021 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9022 | (eval $ac_try) 2>&5 | |
9023 | ac_status=$? | |
9024 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9025 | (exit $ac_status); }; }; then | |
9026 | ac_cv_search_ldexp="-l$ac_lib" | |
62c9aa5f ZW |
9027 | break |
9028 | else | |
ba479fd2 NN |
9029 | echo "$as_me: failed program was:" >&5 |
9030 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9031 | ||
cafe096b | 9032 | fi |
86da66b5 HPN |
9033 | rm -f conftest.err conftest.$ac_objext \ |
9034 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 9035 | done |
6e3f3080 | 9036 | fi |
ba479fd2 NN |
9037 | LIBS=$ac_func_search_save_LIBS |
9038 | fi | |
9039 | echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5 | |
9040 | echo "${ECHO_T}$ac_cv_search_ldexp" >&6 | |
9041 | if test "$ac_cv_search_ldexp" != no; then | |
63cf211a | 9042 | test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" |
ba479fd2 | 9043 | |
62c9aa5f | 9044 | fi |
ba479fd2 | 9045 | |
62c9aa5f ZW |
9046 | LDEXP_LIB="$LIBS" |
9047 | LIBS="$save_LIBS" | |
9048 | ||
9049 | ||
956d6950 JL |
9050 | # Use <inttypes.h> only if it exists, |
9051 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
ba479fd2 NN |
9052 | echo "$as_me:$LINENO: checking for inttypes.h" >&5 |
9053 | echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 | |
9054 | if test "${gcc_cv_header_inttypes_h+set}" = set; then | |
9055 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9056 | else | |
9057 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9058 | /* confdefs.h. */ |
9059 | _ACEOF | |
9060 | cat confdefs.h >>conftest.$ac_ext | |
9061 | cat >>conftest.$ac_ext <<_ACEOF | |
9062 | /* end confdefs.h. */ | |
956d6950 JL |
9063 | #include <sys/types.h> |
9064 | #include <inttypes.h> | |
ba479fd2 NN |
9065 | int |
9066 | main () | |
9067 | { | |
956d6950 | 9068 | intmax_t i = -1; |
ba479fd2 NN |
9069 | ; |
9070 | return 0; | |
9071 | } | |
9072 | _ACEOF | |
9073 | rm -f conftest.$ac_objext | |
9074 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9075 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9076 | ac_status=$? |
86da66b5 HPN |
9077 | grep -v '^ *+' conftest.er1 >conftest.err |
9078 | rm -f conftest.er1 | |
9079 | cat conftest.err >&5 | |
ba479fd2 NN |
9080 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9081 | (exit $ac_status); } && | |
e8b05380 | 9082 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9083 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9084 | (eval $ac_try) 2>&5 | |
9085 | ac_status=$? | |
9086 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9087 | (exit $ac_status); }; } && | |
9088 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9089 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9090 | (eval $ac_try) 2>&5 | |
9091 | ac_status=$? | |
9092 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9093 | (exit $ac_status); }; }; then | |
0056a9b5 | 9094 | gcc_cv_header_inttypes_h=yes |
956d6950 | 9095 | else |
ba479fd2 NN |
9096 | echo "$as_me: failed program was:" >&5 |
9097 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9098 | ||
9099 | gcc_cv_header_inttypes_h=no | |
956d6950 | 9100 | fi |
86da66b5 | 9101 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
9102 | fi |
9103 | ||
ba479fd2 NN |
9104 | echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5 |
9105 | echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6 | |
0056a9b5 | 9106 | if test $gcc_cv_header_inttypes_h = yes; then |
ba479fd2 NN |
9107 | |
9108 | cat >>confdefs.h <<\_ACEOF | |
0056a9b5 | 9109 | #define HAVE_INTTYPES_H 1 |
ba479fd2 | 9110 | _ACEOF |
0056a9b5 KG |
9111 | |
9112 | fi | |
956d6950 | 9113 | |
c149cc37 | 9114 | |
ba479fd2 NN |
9115 | |
9116 | ||
9117 | ||
9118 | ||
9119 | ||
9120 | ||
9121 | ||
9122 | ||
9123 | ||
9124 | ||
9125 | ||
9126 | ||
9127 | ||
9128 | ||
9129 | ||
9130 | ||
0d667716 KG |
9131 | |
9132 | ||
9133 | ||
9134 | ||
9135 | ||
9136 | ||
9137 | ||
9138 | ||
9139 | ||
9140 | ||
9141 | ||
9142 | ||
ba479fd2 NN |
9143 | |
9144 | ||
9145 | ||
9146 | ||
9147 | ||
9148 | ||
9149 | ||
9150 | ||
52a6edcc | 9151 | for ac_func in times clock kill getrlimit setrlimit atoll atoq \ |
0d667716 KG |
9152 | sysconf strsignal getrusage nl_langinfo scandir alphasort \ |
9153 | gettimeofday mbstowcs wcswidth mmap mincore setlocale \ | |
9154 | clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked | |
956d6950 | 9155 | do |
ba479fd2 NN |
9156 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
9157 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
9158 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
9159 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
9160 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9161 | else | |
9162 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9163 | /* confdefs.h. */ |
9164 | _ACEOF | |
9165 | cat confdefs.h >>conftest.$ac_ext | |
9166 | cat >>conftest.$ac_ext <<_ACEOF | |
9167 | /* end confdefs.h. */ | |
86da66b5 HPN |
9168 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
9169 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9170 | #define $ac_func innocuous_$ac_func | |
9171 | ||
956d6950 | 9172 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
9173 | which can conflict with char $ac_func (); below. |
9174 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9175 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 9176 | |
ba479fd2 NN |
9177 | #ifdef __STDC__ |
9178 | # include <limits.h> | |
9179 | #else | |
9180 | # include <assert.h> | |
9181 | #endif | |
86da66b5 HPN |
9182 | |
9183 | #undef $ac_func | |
9184 | ||
6e3f3080 | 9185 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9186 | #ifdef __cplusplus |
9187 | extern "C" | |
9188 | { | |
9189 | #endif | |
6e3f3080 | 9190 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9191 | builtin and then its argument prototype would still apply. */ |
9192 | char $ac_func (); | |
956d6950 JL |
9193 | /* The GNU C library defines this for functions which it implements |
9194 | to always fail with ENOSYS. Some functions are actually named | |
9195 | something starting with __ and the normal name is an alias. */ | |
9196 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
9197 | choke me | |
9198 | #else | |
ba479fd2 NN |
9199 | char (*f) () = $ac_func; |
9200 | #endif | |
9201 | #ifdef __cplusplus | |
9202 | } | |
956d6950 JL |
9203 | #endif |
9204 | ||
ba479fd2 NN |
9205 | int |
9206 | main () | |
9207 | { | |
9208 | return f != $ac_func; | |
9209 | ; | |
9210 | return 0; | |
9211 | } | |
9212 | _ACEOF | |
9213 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9214 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9215 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9216 | ac_status=$? |
86da66b5 HPN |
9217 | grep -v '^ *+' conftest.er1 >conftest.err |
9218 | rm -f conftest.er1 | |
9219 | cat conftest.err >&5 | |
ba479fd2 NN |
9220 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9221 | (exit $ac_status); } && | |
e8b05380 | 9222 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9223 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9224 | (eval $ac_try) 2>&5 | |
9225 | ac_status=$? | |
9226 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9227 | (exit $ac_status); }; } && | |
9228 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9229 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9230 | (eval $ac_try) 2>&5 | |
9231 | ac_status=$? | |
9232 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9233 | (exit $ac_status); }; }; then | |
9234 | eval "$as_ac_var=yes" | |
9235 | else | |
9236 | echo "$as_me: failed program was:" >&5 | |
9237 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9238 | ||
9239 | eval "$as_ac_var=no" | |
9240 | fi | |
86da66b5 HPN |
9241 | rm -f conftest.err conftest.$ac_objext \ |
9242 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
9243 | fi |
9244 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
9245 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
9246 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
9247 | cat >>confdefs.h <<_ACEOF | |
9248 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9249 | _ACEOF | |
956d6950 | 9250 | |
956d6950 JL |
9251 | fi |
9252 | done | |
9253 | ||
6885fc87 | 9254 | |
39f6c4c8 | 9255 | if test x$ac_cv_func_mbstowcs = xyes; then |
ba479fd2 NN |
9256 | echo "$as_me:$LINENO: checking whether mbstowcs works" >&5 |
9257 | echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6 | |
9258 | if test "${gcc_cv_func_mbstowcs_works+set}" = set; then | |
9259 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
39f6c4c8 KW |
9260 | else |
9261 | if test "$cross_compiling" = yes; then | |
9262 | gcc_cv_func_mbstowcs_works=yes | |
9263 | else | |
ba479fd2 | 9264 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9265 | /* confdefs.h. */ |
9266 | _ACEOF | |
9267 | cat confdefs.h >>conftest.$ac_ext | |
9268 | cat >>conftest.$ac_ext <<_ACEOF | |
9269 | /* end confdefs.h. */ | |
39f6c4c8 KW |
9270 | #include <stdlib.h> |
9271 | int main() | |
9272 | { | |
9273 | mbstowcs(0, "", 0); | |
9274 | return 0; | |
9275 | } | |
ba479fd2 NN |
9276 | _ACEOF |
9277 | rm -f conftest$ac_exeext | |
9278 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9279 | (eval $ac_link) 2>&5 | |
9280 | ac_status=$? | |
9281 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9282 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9283 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9284 | (eval $ac_try) 2>&5 | |
9285 | ac_status=$? | |
9286 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9287 | (exit $ac_status); }; }; then | |
39f6c4c8 KW |
9288 | gcc_cv_func_mbstowcs_works=yes |
9289 | else | |
ba479fd2 NN |
9290 | echo "$as_me: program exited with status $ac_status" >&5 |
9291 | echo "$as_me: failed program was:" >&5 | |
9292 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9293 | ||
9294 | ( exit $ac_status ) | |
9295 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 9296 | fi |
86da66b5 | 9297 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
39f6c4c8 | 9298 | fi |
39f6c4c8 | 9299 | fi |
ba479fd2 NN |
9300 | echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5 |
9301 | echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6 | |
63cf211a | 9302 | if test x$gcc_cv_func_mbstowcs_works = xyes; then |
ba479fd2 NN |
9303 | |
9304 | cat >>confdefs.h <<\_ACEOF | |
39f6c4c8 | 9305 | #define HAVE_WORKING_MBSTOWCS 1 |
ba479fd2 | 9306 | _ACEOF |
39f6c4c8 KW |
9307 | |
9308 | fi | |
9309 | fi | |
9310 | ||
ba479fd2 NN |
9311 | echo "$as_me:$LINENO: checking for ssize_t" >&5 |
9312 | echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 | |
9313 | if test "${ac_cv_type_ssize_t+set}" = set; then | |
9314 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
63cf211a | 9315 | else |
ba479fd2 | 9316 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9317 | /* confdefs.h. */ |
9318 | _ACEOF | |
9319 | cat confdefs.h >>conftest.$ac_ext | |
9320 | cat >>conftest.$ac_ext <<_ACEOF | |
9321 | /* end confdefs.h. */ | |
8b4fc07a NN |
9322 | $ac_includes_default |
9323 | int | |
9324 | main () | |
9325 | { | |
9326 | if ((ssize_t *) 0) | |
9327 | return 0; | |
9328 | if (sizeof (ssize_t)) | |
9329 | return 0; | |
9330 | ; | |
9331 | return 0; | |
9332 | } | |
ba479fd2 | 9333 | _ACEOF |
8b4fc07a NN |
9334 | rm -f conftest.$ac_objext |
9335 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9336 | (eval $ac_compile) 2>conftest.er1 |
8b4fc07a | 9337 | ac_status=$? |
86da66b5 HPN |
9338 | grep -v '^ *+' conftest.er1 >conftest.err |
9339 | rm -f conftest.er1 | |
9340 | cat conftest.err >&5 | |
8b4fc07a NN |
9341 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9342 | (exit $ac_status); } && | |
e8b05380 | 9343 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9344 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9345 | (eval $ac_try) 2>&5 | |
9346 | ac_status=$? | |
9347 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9348 | (exit $ac_status); }; } && | |
9349 | { ac_try='test -s conftest.$ac_objext' | |
8b4fc07a NN |
9350 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9351 | (eval $ac_try) 2>&5 | |
9352 | ac_status=$? | |
9353 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9354 | (exit $ac_status); }; }; then | |
cb65112a | 9355 | ac_cv_type_ssize_t=yes |
f12bc141 | 9356 | else |
8b4fc07a NN |
9357 | echo "$as_me: failed program was:" >&5 |
9358 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 9359 | |
8b4fc07a NN |
9360 | ac_cv_type_ssize_t=no |
9361 | fi | |
86da66b5 | 9362 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 9363 | fi |
ba479fd2 NN |
9364 | echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 |
9365 | echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 | |
8b4fc07a NN |
9366 | if test $ac_cv_type_ssize_t = yes; then |
9367 | : | |
9368 | else | |
ba479fd2 | 9369 | |
8b4fc07a | 9370 | cat >>confdefs.h <<_ACEOF |
f12bc141 | 9371 | #define ssize_t int |
ba479fd2 | 9372 | _ACEOF |
f12bc141 ZW |
9373 | |
9374 | fi | |
9375 | ||
0b9d02c6 | 9376 | |
e256b8b6 DA |
9377 | # Try to determine the array type of the second argument of getgroups |
9378 | # for the target system (int or gid_t). | |
ba479fd2 NN |
9379 | echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 |
9380 | echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 | |
9381 | if test "${ac_cv_type_uid_t+set}" = set; then | |
9382 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9383 | else | |
9384 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9385 | /* confdefs.h. */ |
9386 | _ACEOF | |
9387 | cat confdefs.h >>conftest.$ac_ext | |
9388 | cat >>conftest.$ac_ext <<_ACEOF | |
9389 | /* end confdefs.h. */ | |
e256b8b6 | 9390 | #include <sys/types.h> |
ba479fd2 NN |
9391 | |
9392 | _ACEOF | |
e256b8b6 | 9393 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9394 | $EGREP "uid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
9395 | ac_cv_type_uid_t=yes |
9396 | else | |
e256b8b6 DA |
9397 | ac_cv_type_uid_t=no |
9398 | fi | |
9399 | rm -f conftest* | |
9400 | ||
9401 | fi | |
ba479fd2 NN |
9402 | echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 |
9403 | echo "${ECHO_T}$ac_cv_type_uid_t" >&6 | |
63cf211a | 9404 | if test $ac_cv_type_uid_t = no; then |
ba479fd2 NN |
9405 | |
9406 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 9407 | #define uid_t int |
ba479fd2 | 9408 | _ACEOF |
cafe096b | 9409 | |
ba479fd2 NN |
9410 | |
9411 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 9412 | #define gid_t int |
ba479fd2 | 9413 | _ACEOF |
e256b8b6 DA |
9414 | |
9415 | fi | |
9416 | ||
ba479fd2 NN |
9417 | echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 |
9418 | echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 | |
9419 | if test "${ac_cv_type_getgroups+set}" = set; then | |
9420 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e256b8b6 DA |
9421 | else |
9422 | if test "$cross_compiling" = yes; then | |
9423 | ac_cv_type_getgroups=cross | |
9424 | else | |
ba479fd2 | 9425 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9426 | /* confdefs.h. */ |
9427 | _ACEOF | |
9428 | cat confdefs.h >>conftest.$ac_ext | |
9429 | cat >>conftest.$ac_ext <<_ACEOF | |
9430 | /* end confdefs.h. */ | |
e256b8b6 DA |
9431 | /* Thanks to Mike Rendell for this test. */ |
9432 | #include <sys/types.h> | |
9433 | #define NGID 256 | |
9434 | #undef MAX | |
9435 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
ba479fd2 NN |
9436 | |
9437 | int | |
9438 | main () | |
e256b8b6 DA |
9439 | { |
9440 | gid_t gidset[NGID]; | |
9441 | int i, n; | |
9442 | union { gid_t gval; long lval; } val; | |
9443 | ||
9444 | val.lval = -1; | |
9445 | for (i = 0; i < NGID; i++) | |
9446 | gidset[i] = val.gval; | |
9447 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
86da66b5 | 9448 | gidset); |
e256b8b6 DA |
9449 | /* Exit non-zero if getgroups seems to require an array of ints. This |
9450 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
9451 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
63cf211a | 9452 | } |
ba479fd2 NN |
9453 | _ACEOF |
9454 | rm -f conftest$ac_exeext | |
9455 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9456 | (eval $ac_link) 2>&5 | |
9457 | ac_status=$? | |
9458 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9459 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9460 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9461 | (eval $ac_try) 2>&5 | |
9462 | ac_status=$? | |
9463 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9464 | (exit $ac_status); }; }; then | |
9465 | ac_cv_type_getgroups=gid_t | |
63cf211a | 9466 | else |
ba479fd2 NN |
9467 | echo "$as_me: program exited with status $ac_status" >&5 |
9468 | echo "$as_me: failed program was:" >&5 | |
9469 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9470 | ||
9471 | ( exit $ac_status ) | |
9472 | ac_cv_type_getgroups=int | |
e256b8b6 | 9473 | fi |
86da66b5 | 9474 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
e256b8b6 | 9475 | fi |
e256b8b6 | 9476 | if test $ac_cv_type_getgroups = cross; then |
ba479fd2 | 9477 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9478 | /* confdefs.h. */ |
9479 | _ACEOF | |
9480 | cat confdefs.h >>conftest.$ac_ext | |
9481 | cat >>conftest.$ac_ext <<_ACEOF | |
9482 | /* end confdefs.h. */ | |
e256b8b6 | 9483 | #include <unistd.h> |
ba479fd2 NN |
9484 | |
9485 | _ACEOF | |
e256b8b6 | 9486 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9487 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
9488 | ac_cv_type_getgroups=gid_t |
9489 | else | |
e256b8b6 DA |
9490 | ac_cv_type_getgroups=int |
9491 | fi | |
9492 | rm -f conftest* | |
9493 | ||
9494 | fi | |
9495 | fi | |
ba479fd2 NN |
9496 | echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 |
9497 | echo "${ECHO_T}$ac_cv_type_getgroups" >&6 | |
e256b8b6 | 9498 | |
ba479fd2 | 9499 | cat >>confdefs.h <<_ACEOF |
e256b8b6 | 9500 | #define GETGROUPS_T $ac_cv_type_getgroups |
ba479fd2 | 9501 | _ACEOF |
e256b8b6 DA |
9502 | |
9503 | ||
9504 | if test "${target}" = "${build}"; then | |
9505 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
9506 | else | |
9507 | case "${target}" in | |
9508 | # This condition may need some tweaking. It should include all | |
9509 | # targets where the array type of the second argument of getgroups | |
9510 | # is int and the type of gid_t is not equivalent to int. | |
9511 | *-*-sunos* | *-*-ultrix*) | |
9512 | TARGET_GETGROUPS_T=int | |
9513 | ;; | |
9514 | *) | |
9515 | TARGET_GETGROUPS_T=gid_t | |
9516 | ;; | |
9517 | esac | |
9518 | fi | |
9519 | ||
9520 | ||
3b0727a0 MR |
9521 | |
9522 | echo "$as_me:$LINENO: checking for sys/mman.h" >&5 | |
9523 | echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6 | |
9524 | if test "${ac_cv_header_sys_mman_h+set}" = set; then | |
9525 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9526 | else | |
9527 | cat >conftest.$ac_ext <<_ACEOF | |
9528 | /* confdefs.h. */ | |
9529 | _ACEOF | |
9530 | cat confdefs.h >>conftest.$ac_ext | |
9531 | cat >>conftest.$ac_ext <<_ACEOF | |
9532 | /* end confdefs.h. */ | |
9533 | #include <sys/mman.h> | |
9534 | _ACEOF | |
9535 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
9536 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
9537 | ac_status=$? | |
9538 | grep -v '^ *+' conftest.er1 >conftest.err | |
9539 | rm -f conftest.er1 | |
9540 | cat conftest.err >&5 | |
9541 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9542 | (exit $ac_status); } >/dev/null; then | |
9543 | if test -s conftest.err; then | |
9544 | ac_cpp_err=$ac_c_preproc_warn_flag | |
9545 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
9546 | else | |
9547 | ac_cpp_err= | |
9548 | fi | |
9549 | else | |
9550 | ac_cpp_err=yes | |
9551 | fi | |
9552 | if test -z "$ac_cpp_err"; then | |
9553 | ac_cv_header_sys_mman_h=yes | |
9554 | else | |
9555 | echo "$as_me: failed program was:" >&5 | |
9556 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9557 | ||
9558 | ac_cv_header_sys_mman_h=no | |
9559 | fi | |
9560 | rm -f conftest.err conftest.$ac_ext | |
9561 | fi | |
9562 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5 | |
9563 | echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6 | |
9564 | if test $ac_cv_header_sys_mman_h = yes; then | |
9565 | gcc_header_sys_mman_h=yes | |
9566 | else | |
9567 | gcc_header_sys_mman_h=no | |
9568 | fi | |
9569 | ||
9570 | echo "$as_me:$LINENO: checking for mmap" >&5 | |
9571 | echo $ECHO_N "checking for mmap... $ECHO_C" >&6 | |
9572 | if test "${ac_cv_func_mmap+set}" = set; then | |
9573 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9574 | else | |
9575 | cat >conftest.$ac_ext <<_ACEOF | |
9576 | /* confdefs.h. */ | |
9577 | _ACEOF | |
9578 | cat confdefs.h >>conftest.$ac_ext | |
9579 | cat >>conftest.$ac_ext <<_ACEOF | |
9580 | /* end confdefs.h. */ | |
9581 | /* Define mmap to an innocuous variant, in case <limits.h> declares mmap. | |
9582 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9583 | #define mmap innocuous_mmap | |
9584 | ||
9585 | /* System header to define __stub macros and hopefully few prototypes, | |
9586 | which can conflict with char mmap (); below. | |
9587 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9588 | <limits.h> exists even on freestanding compilers. */ | |
9589 | ||
9590 | #ifdef __STDC__ | |
9591 | # include <limits.h> | |
9592 | #else | |
9593 | # include <assert.h> | |
9594 | #endif | |
9595 | ||
9596 | #undef mmap | |
9597 | ||
9598 | /* Override any gcc2 internal prototype to avoid an error. */ | |
9599 | #ifdef __cplusplus | |
9600 | extern "C" | |
9601 | { | |
9602 | #endif | |
9603 | /* We use char because int might match the return type of a gcc2 | |
9604 | builtin and then its argument prototype would still apply. */ | |
9605 | char mmap (); | |
9606 | /* The GNU C library defines this for functions which it implements | |
9607 | to always fail with ENOSYS. Some functions are actually named | |
9608 | something starting with __ and the normal name is an alias. */ | |
9609 | #if defined (__stub_mmap) || defined (__stub___mmap) | |
9610 | choke me | |
9611 | #else | |
9612 | char (*f) () = mmap; | |
9613 | #endif | |
9614 | #ifdef __cplusplus | |
9615 | } | |
9616 | #endif | |
9617 | ||
9618 | int | |
9619 | main () | |
9620 | { | |
9621 | return f != mmap; | |
9622 | ; | |
9623 | return 0; | |
9624 | } | |
9625 | _ACEOF | |
9626 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9627 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9628 | (eval $ac_link) 2>conftest.er1 | |
9629 | ac_status=$? | |
9630 | grep -v '^ *+' conftest.er1 >conftest.err | |
9631 | rm -f conftest.er1 | |
9632 | cat conftest.err >&5 | |
9633 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9634 | (exit $ac_status); } && | |
e8b05380 | 9635 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
3b0727a0 MR |
9636 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9637 | (eval $ac_try) 2>&5 | |
9638 | ac_status=$? | |
9639 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9640 | (exit $ac_status); }; } && | |
9641 | { ac_try='test -s conftest$ac_exeext' | |
9642 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9643 | (eval $ac_try) 2>&5 | |
9644 | ac_status=$? | |
9645 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9646 | (exit $ac_status); }; }; then | |
9647 | ac_cv_func_mmap=yes | |
9648 | else | |
9649 | echo "$as_me: failed program was:" >&5 | |
9650 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9651 | ||
9652 | ac_cv_func_mmap=no | |
9653 | fi | |
9654 | rm -f conftest.err conftest.$ac_objext \ | |
9655 | conftest$ac_exeext conftest.$ac_ext | |
9656 | fi | |
9657 | echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 | |
9658 | echo "${ECHO_T}$ac_cv_func_mmap" >&6 | |
9659 | if test $ac_cv_func_mmap = yes; then | |
9660 | gcc_func_mmap=yes | |
9661 | else | |
9662 | gcc_func_mmap=no | |
9663 | fi | |
9664 | ||
9665 | if test "$gcc_header_sys_mman_h" != yes \ | |
9666 | || test "$gcc_func_mmap" != yes; then | |
1072ec3f ZW |
9667 | gcc_cv_func_mmap_file=no |
9668 | gcc_cv_func_mmap_dev_zero=no | |
9669 | gcc_cv_func_mmap_anon=no | |
9670 | else | |
ba479fd2 NN |
9671 | echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5 |
9672 | echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6 | |
9673 | if test "${gcc_cv_func_mmap_file+set}" = set; then | |
9674 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f | 9675 | else |
ba479fd2 | 9676 | # Add a system to this blacklist if |
1072ec3f ZW |
9677 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a |
9678 | # memory area containing the same data that you'd get if you applied | |
9679 | # read() to the same fd. The only system known to have a problem here | |
9680 | # is VMS, where text files have record structure. | |
9681 | case "$host_os" in | |
ba479fd2 | 9682 | vms* | ultrix*) |
1072ec3f ZW |
9683 | gcc_cv_func_mmap_file=no ;; |
9684 | *) | |
9685 | gcc_cv_func_mmap_file=yes;; | |
9686 | esac | |
9687 | fi | |
ba479fd2 NN |
9688 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5 |
9689 | echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6 | |
9690 | echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5 | |
9691 | echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6 | |
9692 | if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then | |
9693 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
9694 | else |
9695 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
9696 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
9697 | # zeroed pages with both the following properties: | |
9698 | # 1. If you map N consecutive pages in with one call, and then | |
9699 | # unmap any subset of those pages, the pages that were not | |
9700 | # explicitly unmapped remain accessible. | |
9701 | # 2. If you map two adjacent blocks of memory and then unmap them | |
9702 | # both at once, they must both go away. | |
9703 | # Systems known to be in this category are Windows (all variants), | |
9704 | # VMS, and Darwin. | |
9705 | case "$host_os" in | |
2ce240d3 | 9706 | vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) |
1072ec3f ZW |
9707 | gcc_cv_func_mmap_dev_zero=no ;; |
9708 | *) | |
9709 | gcc_cv_func_mmap_dev_zero=yes;; | |
9710 | esac | |
9711 | fi | |
ba479fd2 NN |
9712 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5 |
9713 | echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6 | |
1072ec3f ZW |
9714 | |
9715 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
ba479fd2 NN |
9716 | echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5 |
9717 | echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6 | |
9718 | if test "${gcc_cv_decl_map_anon+set}" = set; then | |
9719 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9720 | else | |
9721 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9722 | /* confdefs.h. */ |
9723 | _ACEOF | |
9724 | cat confdefs.h >>conftest.$ac_ext | |
9725 | cat >>conftest.$ac_ext <<_ACEOF | |
9726 | /* end confdefs.h. */ | |
1072ec3f ZW |
9727 | #include <sys/types.h> |
9728 | #include <sys/mman.h> | |
9729 | #include <unistd.h> | |
9730 | ||
9731 | #ifndef MAP_ANONYMOUS | |
9732 | #define MAP_ANONYMOUS MAP_ANON | |
9733 | #endif | |
9734 | ||
ba479fd2 NN |
9735 | int |
9736 | main () | |
9737 | { | |
1072ec3f | 9738 | int n = MAP_ANONYMOUS; |
ba479fd2 NN |
9739 | ; |
9740 | return 0; | |
9741 | } | |
9742 | _ACEOF | |
9743 | rm -f conftest.$ac_objext | |
9744 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9745 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9746 | ac_status=$? |
86da66b5 HPN |
9747 | grep -v '^ *+' conftest.er1 >conftest.err |
9748 | rm -f conftest.er1 | |
9749 | cat conftest.err >&5 | |
ba479fd2 NN |
9750 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9751 | (exit $ac_status); } && | |
e8b05380 | 9752 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9753 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9754 | (eval $ac_try) 2>&5 | |
9755 | ac_status=$? | |
9756 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9757 | (exit $ac_status); }; } && | |
9758 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9759 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9760 | (eval $ac_try) 2>&5 | |
9761 | ac_status=$? | |
9762 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9763 | (exit $ac_status); }; }; then | |
1072ec3f ZW |
9764 | gcc_cv_decl_map_anon=yes |
9765 | else | |
ba479fd2 NN |
9766 | echo "$as_me: failed program was:" >&5 |
9767 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9768 | ||
9769 | gcc_cv_decl_map_anon=no | |
1072ec3f | 9770 | fi |
86da66b5 | 9771 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
1072ec3f | 9772 | fi |
ba479fd2 NN |
9773 | echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5 |
9774 | echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6 | |
1072ec3f ZW |
9775 | |
9776 | if test $gcc_cv_decl_map_anon = no; then | |
9777 | gcc_cv_func_mmap_anon=no | |
9778 | else | |
ba479fd2 NN |
9779 | echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
9780 | echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6 | |
9781 | if test "${gcc_cv_func_mmap_anon+set}" = set; then | |
9782 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
9783 | else |
9784 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
9785 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
9786 | # doesn't give anonymous zeroed pages with the same properties listed | |
9787 | # above for use of /dev/zero. | |
9788 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
9789 | case "$host_os" in | |
9790 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
9791 | gcc_cv_func_mmap_anon=no ;; | |
9792 | *) | |
9793 | gcc_cv_func_mmap_anon=yes;; | |
9794 | esac | |
9795 | fi | |
ba479fd2 NN |
9796 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5 |
9797 | echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6 | |
1072ec3f ZW |
9798 | fi |
9799 | fi | |
9800 | ||
9801 | if test $gcc_cv_func_mmap_file = yes; then | |
ba479fd2 NN |
9802 | |
9803 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9804 | #define HAVE_MMAP_FILE 1 |
ba479fd2 | 9805 | _ACEOF |
1072ec3f ZW |
9806 | |
9807 | fi | |
9808 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
ba479fd2 NN |
9809 | |
9810 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9811 | #define HAVE_MMAP_DEV_ZERO 1 |
ba479fd2 | 9812 | _ACEOF |
1072ec3f ZW |
9813 | |
9814 | fi | |
9815 | if test $gcc_cv_func_mmap_anon = yes; then | |
ba479fd2 NN |
9816 | |
9817 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9818 | #define HAVE_MMAP_ANON 1 |
ba479fd2 | 9819 | _ACEOF |
1072ec3f ZW |
9820 | |
9821 | fi | |
9822 | ||
b27d2bd5 MK |
9823 | |
9824 | case "${host}" in | |
ee262b6f | 9825 | *-*-*vms*) |
ba479fd2 | 9826 | # Under VMS, vfork works very differently than on Unix. The standard test |
ee262b6f DR |
9827 | # won't work, and it isn't easily adaptable. It makes more sense to |
9828 | # just force it. | |
9829 | ac_cv_func_vfork_works=yes | |
9830 | ;; | |
b27d2bd5 | 9831 | esac |
ba479fd2 NN |
9832 | echo "$as_me:$LINENO: checking for pid_t" >&5 |
9833 | echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 | |
9834 | if test "${ac_cv_type_pid_t+set}" = set; then | |
9835 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9836 | else | |
9837 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9838 | /* confdefs.h. */ |
9839 | _ACEOF | |
9840 | cat confdefs.h >>conftest.$ac_ext | |
9841 | cat >>conftest.$ac_ext <<_ACEOF | |
9842 | /* end confdefs.h. */ | |
9843 | $ac_includes_default | |
9844 | int | |
9845 | main () | |
9846 | { | |
9847 | if ((pid_t *) 0) | |
9848 | return 0; | |
9849 | if (sizeof (pid_t)) | |
9850 | return 0; | |
9851 | ; | |
9852 | return 0; | |
9853 | } | |
9854 | _ACEOF | |
9855 | rm -f conftest.$ac_objext | |
9856 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9857 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9858 | ac_status=$? |
86da66b5 HPN |
9859 | grep -v '^ *+' conftest.er1 >conftest.err |
9860 | rm -f conftest.er1 | |
9861 | cat conftest.err >&5 | |
ba479fd2 NN |
9862 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9863 | (exit $ac_status); } && | |
e8b05380 | 9864 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9865 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9866 | (eval $ac_try) 2>&5 | |
9867 | ac_status=$? | |
9868 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9869 | (exit $ac_status); }; } && | |
9870 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9871 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9872 | (eval $ac_try) 2>&5 | |
9873 | ac_status=$? | |
9874 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9875 | (exit $ac_status); }; }; then | |
cb65112a | 9876 | ac_cv_type_pid_t=yes |
c375c43b | 9877 | else |
ba479fd2 NN |
9878 | echo "$as_me: failed program was:" >&5 |
9879 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 9880 | |
ba479fd2 NN |
9881 | ac_cv_type_pid_t=no |
9882 | fi | |
86da66b5 | 9883 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 9884 | fi |
ba479fd2 NN |
9885 | echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 |
9886 | echo "${ECHO_T}$ac_cv_type_pid_t" >&6 | |
9887 | if test $ac_cv_type_pid_t = yes; then | |
9888 | : | |
9889 | else | |
9890 | ||
9891 | cat >>confdefs.h <<_ACEOF | |
c375c43b | 9892 | #define pid_t int |
ba479fd2 | 9893 | _ACEOF |
c375c43b KG |
9894 | |
9895 | fi | |
9896 | ||
ba479fd2 NN |
9897 | |
9898 | ||
9899 | for ac_header in unistd.h vfork.h | |
9900 | do | |
9901 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
ca9bc441 | 9902 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
9903 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
9904 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
9905 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 9906 | else |
ca9bc441 | 9907 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9908 | /* confdefs.h. */ |
9909 | _ACEOF | |
9910 | cat confdefs.h >>conftest.$ac_ext | |
9911 | cat >>conftest.$ac_ext <<_ACEOF | |
9912 | /* end confdefs.h. */ | |
9913 | #include <$ac_header> | |
9914 | _ACEOF | |
9915 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
9916 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
9917 | ac_status=$? | |
9918 | grep -v '^ *+' conftest.er1 >conftest.err | |
9919 | rm -f conftest.er1 | |
9920 | cat conftest.err >&5 | |
9921 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9922 | (exit $ac_status); } >/dev/null; then | |
9923 | if test -s conftest.err; then | |
9924 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 9925 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
9926 | else |
9927 | ac_cpp_err= | |
9928 | fi | |
093e61a6 | 9929 | else |
ba479fd2 NN |
9930 | ac_cpp_err=yes |
9931 | fi | |
9932 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 9933 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
9934 | else |
9935 | echo "$as_me: failed program was:" >&5 | |
9936 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9937 | ||
ca9bc441 | 9938 | eval "$as_ac_Header=no" |
ba479fd2 NN |
9939 | fi |
9940 | rm -f conftest.err conftest.$ac_ext | |
c375c43b | 9941 | fi |
ba479fd2 NN |
9942 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
9943 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
9944 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
9945 | cat >>confdefs.h <<_ACEOF | |
9946 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9947 | _ACEOF | |
6e3f3080 NN |
9948 | |
9949 | fi | |
ba479fd2 NN |
9950 | done |
9951 | ||
9952 | ||
9953 | ||
9954 | for ac_func in fork vfork | |
9955 | do | |
9956 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9957 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
9958 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
9959 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
9960 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9961 | else | |
9962 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9963 | /* confdefs.h. */ |
9964 | _ACEOF | |
9965 | cat confdefs.h >>conftest.$ac_ext | |
9966 | cat >>conftest.$ac_ext <<_ACEOF | |
9967 | /* end confdefs.h. */ | |
86da66b5 HPN |
9968 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
9969 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9970 | #define $ac_func innocuous_$ac_func | |
9971 | ||
c375c43b | 9972 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
9973 | which can conflict with char $ac_func (); below. |
9974 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9975 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 9976 | |
ba479fd2 NN |
9977 | #ifdef __STDC__ |
9978 | # include <limits.h> | |
9979 | #else | |
9980 | # include <assert.h> | |
9981 | #endif | |
86da66b5 HPN |
9982 | |
9983 | #undef $ac_func | |
9984 | ||
6e3f3080 | 9985 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9986 | #ifdef __cplusplus |
9987 | extern "C" | |
9988 | { | |
9989 | #endif | |
6e3f3080 | 9990 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9991 | builtin and then its argument prototype would still apply. */ |
9992 | char $ac_func (); | |
c375c43b KG |
9993 | /* The GNU C library defines this for functions which it implements |
9994 | to always fail with ENOSYS. Some functions are actually named | |
9995 | something starting with __ and the normal name is an alias. */ | |
ba479fd2 | 9996 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
c375c43b KG |
9997 | choke me |
9998 | #else | |
ba479fd2 NN |
9999 | char (*f) () = $ac_func; |
10000 | #endif | |
10001 | #ifdef __cplusplus | |
10002 | } | |
c375c43b KG |
10003 | #endif |
10004 | ||
ba479fd2 NN |
10005 | int |
10006 | main () | |
10007 | { | |
10008 | return f != $ac_func; | |
10009 | ; | |
10010 | return 0; | |
10011 | } | |
10012 | _ACEOF | |
10013 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10014 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 10015 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 10016 | ac_status=$? |
86da66b5 HPN |
10017 | grep -v '^ *+' conftest.er1 >conftest.err |
10018 | rm -f conftest.er1 | |
10019 | cat conftest.err >&5 | |
ba479fd2 NN |
10020 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10021 | (exit $ac_status); } && | |
e8b05380 | 10022 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
10023 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10024 | (eval $ac_try) 2>&5 | |
10025 | ac_status=$? | |
10026 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10027 | (exit $ac_status); }; } && | |
10028 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
10029 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10030 | (eval $ac_try) 2>&5 | |
10031 | ac_status=$? | |
10032 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10033 | (exit $ac_status); }; }; then | |
10034 | eval "$as_ac_var=yes" | |
10035 | else | |
10036 | echo "$as_me: failed program was:" >&5 | |
10037 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10038 | ||
10039 | eval "$as_ac_var=no" | |
10040 | fi | |
86da66b5 HPN |
10041 | rm -f conftest.err conftest.$ac_objext \ |
10042 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
10043 | fi |
10044 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
10045 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
10046 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
10047 | cat >>confdefs.h <<_ACEOF | |
10048 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10049 | _ACEOF | |
10050 | ||
c375c43b | 10051 | fi |
ba479fd2 | 10052 | done |
c375c43b | 10053 | |
ba479fd2 NN |
10054 | if test "x$ac_cv_func_fork" = xyes; then |
10055 | echo "$as_me:$LINENO: checking for working fork" >&5 | |
10056 | echo $ECHO_N "checking for working fork... $ECHO_C" >&6 | |
10057 | if test "${ac_cv_func_fork_works+set}" = set; then | |
10058 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10059 | else |
ba479fd2 NN |
10060 | if test "$cross_compiling" = yes; then |
10061 | ac_cv_func_fork_works=cross | |
10062 | else | |
10063 | cat >conftest.$ac_ext <<_ACEOF | |
e8b05380 PB |
10064 | /* confdefs.h. */ |
10065 | _ACEOF | |
10066 | cat confdefs.h >>conftest.$ac_ext | |
10067 | cat >>conftest.$ac_ext <<_ACEOF | |
10068 | /* end confdefs.h. */ | |
10069 | $ac_includes_default | |
10070 | int | |
10071 | main () | |
10072 | { | |
10073 | ||
10074 | /* By Ruediger Kuhlmann. */ | |
10075 | if (fork() < 0) | |
10076 | exit (1); | |
10077 | exit (0); | |
10078 | ||
10079 | ; | |
10080 | return 0; | |
10081 | } | |
ba479fd2 NN |
10082 | _ACEOF |
10083 | rm -f conftest$ac_exeext | |
10084 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10085 | (eval $ac_link) 2>&5 | |
10086 | ac_status=$? | |
10087 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10088 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
10089 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10090 | (eval $ac_try) 2>&5 | |
10091 | ac_status=$? | |
10092 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10093 | (exit $ac_status); }; }; then | |
10094 | ac_cv_func_fork_works=yes | |
10095 | else | |
10096 | echo "$as_me: program exited with status $ac_status" >&5 | |
10097 | echo "$as_me: failed program was:" >&5 | |
10098 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10099 | ||
10100 | ( exit $ac_status ) | |
10101 | ac_cv_func_fork_works=no | |
10102 | fi | |
86da66b5 | 10103 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
10104 | fi |
10105 | fi | |
10106 | echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 | |
10107 | echo "${ECHO_T}$ac_cv_func_fork_works" >&6 | |
10108 | ||
10109 | else | |
10110 | ac_cv_func_fork_works=$ac_cv_func_fork | |
10111 | fi | |
10112 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10113 | case $host in | |
10114 | *-*-amigaos* | *-*-msdosdjgpp*) | |
10115 | # Override, as these systems have only a dummy fork() stub | |
10116 | ac_cv_func_fork_works=no | |
10117 | ;; | |
10118 | *) | |
10119 | ac_cv_func_fork_works=yes | |
10120 | ;; | |
10121 | esac | |
10122 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
10123 | echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
c375c43b | 10124 | fi |
c375c43b | 10125 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
10126 | if test "x$ac_cv_func_vfork" = xyes; then |
10127 | echo "$as_me:$LINENO: checking for working vfork" >&5 | |
10128 | echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 | |
10129 | if test "${ac_cv_func_vfork_works+set}" = set; then | |
10130 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10131 | else |
ba479fd2 NN |
10132 | if test "$cross_compiling" = yes; then |
10133 | ac_cv_func_vfork_works=cross | |
10134 | else | |
10135 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10136 | /* confdefs.h. */ |
10137 | _ACEOF | |
10138 | cat confdefs.h >>conftest.$ac_ext | |
10139 | cat >>conftest.$ac_ext <<_ACEOF | |
10140 | /* end confdefs.h. */ | |
c375c43b KG |
10141 | /* Thanks to Paul Eggert for this test. */ |
10142 | #include <stdio.h> | |
ba479fd2 | 10143 | #include <stdlib.h> |
c375c43b KG |
10144 | #include <sys/types.h> |
10145 | #include <sys/stat.h> | |
ba479fd2 NN |
10146 | #include <sys/wait.h> |
10147 | #if HAVE_UNISTD_H | |
10148 | # include <unistd.h> | |
c375c43b | 10149 | #endif |
ba479fd2 NN |
10150 | #if HAVE_VFORK_H |
10151 | # include <vfork.h> | |
c375c43b KG |
10152 | #endif |
10153 | /* On some sparc systems, changes by the child to local and incoming | |
ba479fd2 NN |
10154 | argument registers are propagated back to the parent. The compiler |
10155 | is told about this with #include <vfork.h>, but some compilers | |
10156 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
10157 | static variable whose address is put into a register that is | |
10158 | clobbered by the vfork. */ | |
10159 | static void | |
c375c43b KG |
10160 | #ifdef __cplusplus |
10161 | sparc_address_test (int arg) | |
ba479fd2 | 10162 | # else |
c375c43b KG |
10163 | sparc_address_test (arg) int arg; |
10164 | #endif | |
10165 | { | |
10166 | static pid_t child; | |
10167 | if (!child) { | |
10168 | child = vfork (); | |
10169 | if (child < 0) { | |
10170 | perror ("vfork"); | |
10171 | _exit(2); | |
10172 | } | |
10173 | if (!child) { | |
10174 | arg = getpid(); | |
10175 | write(-1, "", 0); | |
10176 | _exit (arg); | |
10177 | } | |
10178 | } | |
10179 | } | |
ba479fd2 NN |
10180 | |
10181 | int | |
10182 | main () | |
10183 | { | |
c375c43b KG |
10184 | pid_t parent = getpid (); |
10185 | pid_t child; | |
10186 | ||
ba479fd2 | 10187 | sparc_address_test (0); |
c375c43b KG |
10188 | |
10189 | child = vfork (); | |
10190 | ||
10191 | if (child == 0) { | |
ba479fd2 NN |
10192 | /* Here is another test for sparc vfork register problems. This |
10193 | test uses lots of local variables, at least as many local | |
10194 | variables as main has allocated so far including compiler | |
10195 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
10196 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
10197 | reuse the register of parent for one of the local variables, | |
10198 | since it will think that parent can't possibly be used any more | |
10199 | in this routine. Assigning to the local variable will thus | |
10200 | munge parent in the parent process. */ | |
c375c43b KG |
10201 | pid_t |
10202 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
10203 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
10204 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
10205 | use the same hardware register for all 8 local variables. */ | |
10206 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10207 | || p != p5 || p != p6 || p != p7) | |
10208 | _exit(1); | |
10209 | ||
ba479fd2 NN |
10210 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
10211 | from child file descriptors. If the child closes a descriptor | |
10212 | before it execs or exits, this munges the parent's descriptor | |
10213 | as well. Test for this by closing stdout in the child. */ | |
c375c43b KG |
10214 | _exit(close(fileno(stdout)) != 0); |
10215 | } else { | |
10216 | int status; | |
10217 | struct stat st; | |
10218 | ||
10219 | while (wait(&status) != child) | |
10220 | ; | |
10221 | exit( | |
10222 | /* Was there some problem with vforking? */ | |
10223 | child < 0 | |
10224 | ||
10225 | /* Did the child fail? (This shouldn't happen.) */ | |
10226 | || status | |
10227 | ||
10228 | /* Did the vfork/compiler bug occur? */ | |
10229 | || parent != getpid() | |
10230 | ||
10231 | /* Did the file descriptor bug occur? */ | |
10232 | || fstat(fileno(stdout), &st) != 0 | |
10233 | ); | |
10234 | } | |
10235 | } | |
ba479fd2 NN |
10236 | _ACEOF |
10237 | rm -f conftest$ac_exeext | |
10238 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10239 | (eval $ac_link) 2>&5 | |
10240 | ac_status=$? | |
10241 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10242 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
10243 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10244 | (eval $ac_try) 2>&5 | |
10245 | ac_status=$? | |
10246 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10247 | (exit $ac_status); }; }; then | |
c375c43b KG |
10248 | ac_cv_func_vfork_works=yes |
10249 | else | |
ba479fd2 NN |
10250 | echo "$as_me: program exited with status $ac_status" >&5 |
10251 | echo "$as_me: failed program was:" >&5 | |
10252 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10253 | ||
10254 | ( exit $ac_status ) | |
10255 | ac_cv_func_vfork_works=no | |
cafe096b | 10256 | fi |
86da66b5 | 10257 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6e3f3080 | 10258 | fi |
ba479fd2 NN |
10259 | fi |
10260 | echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 | |
10261 | echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 | |
c375c43b | 10262 | |
ba479fd2 NN |
10263 | fi; |
10264 | if test "x$ac_cv_func_fork_works" = xcross; then | |
86da66b5 | 10265 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
10266 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
10267 | echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
c375c43b KG |
10268 | fi |
10269 | ||
ba479fd2 NN |
10270 | if test "x$ac_cv_func_vfork_works" = xyes; then |
10271 | ||
10272 | cat >>confdefs.h <<\_ACEOF | |
10273 | #define HAVE_WORKING_VFORK 1 | |
10274 | _ACEOF | |
10275 | ||
10276 | else | |
10277 | ||
10278 | cat >>confdefs.h <<\_ACEOF | |
c375c43b | 10279 | #define vfork fork |
ba479fd2 | 10280 | _ACEOF |
c375c43b KG |
10281 | |
10282 | fi | |
ba479fd2 NN |
10283 | if test "x$ac_cv_func_fork_works" = xyes; then |
10284 | ||
10285 | cat >>confdefs.h <<\_ACEOF | |
10286 | #define HAVE_WORKING_FORK 1 | |
10287 | _ACEOF | |
10288 | ||
10289 | fi | |
10290 | ||
c375c43b | 10291 | |
81bf3d9e | 10292 | |
dfb77e37 KC |
10293 | if test "X$prefix" = "XNONE"; then |
10294 | acl_final_prefix="$ac_default_prefix" | |
10295 | else | |
10296 | acl_final_prefix="$prefix" | |
10297 | fi | |
10298 | if test "X$exec_prefix" = "XNONE"; then | |
10299 | acl_final_exec_prefix='${prefix}' | |
10300 | else | |
10301 | acl_final_exec_prefix="$exec_prefix" | |
10302 | fi | |
10303 | acl_save_prefix="$prefix" | |
10304 | prefix="$acl_final_prefix" | |
10305 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
10306 | prefix="$acl_save_prefix" | |
f91abfce TT |
10307 | |
10308 | ||
dfb77e37 KC |
10309 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
10310 | if test "${with_gnu_ld+set}" = set; then | |
10311 | withval="$with_gnu_ld" | |
10312 | test "$withval" = no || with_gnu_ld=yes | |
ba479fd2 | 10313 | else |
dfb77e37 KC |
10314 | with_gnu_ld=no |
10315 | fi; | |
10316 | # Prepare PATH_SEPARATOR. | |
10317 | # The user is always right. | |
10318 | if test "${PATH_SEPARATOR+set}" != set; then | |
10319 | echo "#! /bin/sh" >conf$$.sh | |
10320 | echo "exit 0" >>conf$$.sh | |
10321 | chmod +x conf$$.sh | |
10322 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
10323 | PATH_SEPARATOR=';' | |
ba479fd2 | 10324 | else |
dfb77e37 | 10325 | PATH_SEPARATOR=: |
ba479fd2 | 10326 | fi |
dfb77e37 KC |
10327 | rm -f conf$$.sh |
10328 | fi | |
10329 | ac_prog=ld | |
10330 | if test "$GCC" = yes; then | |
10331 | # Check if gcc -print-prog-name=ld gives a path. | |
10332 | echo "$as_me:$LINENO: checking for ld used by GCC" >&5 | |
10333 | echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 | |
10334 | case $host in | |
10335 | *-*-mingw*) | |
10336 | # gcc leaves a trailing carriage return which upsets mingw | |
10337 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
10338 | *) | |
10339 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
10340 | esac | |
10341 | case $ac_prog in | |
10342 | # Accept absolute paths. | |
10343 | [\\/]* | [A-Za-z]:[\\/]*) | |
10344 | re_direlt='/[^/][^/]*/\.\./' | |
10345 | # Canonicalize the path of ld | |
10346 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
10347 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
10348 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
10349 | done | |
10350 | test -z "$LD" && LD="$ac_prog" | |
10351 | ;; | |
10352 | "") | |
10353 | # If it fails, then pretend we aren't using GCC. | |
10354 | ac_prog=ld | |
10355 | ;; | |
10356 | *) | |
10357 | # If it is relative, then search for the first ld in PATH. | |
10358 | with_gnu_ld=unknown | |
10359 | ;; | |
10360 | esac | |
10361 | elif test "$with_gnu_ld" = yes; then | |
10362 | echo "$as_me:$LINENO: checking for GNU ld" >&5 | |
10363 | echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 | |
ba479fd2 | 10364 | else |
dfb77e37 KC |
10365 | echo "$as_me:$LINENO: checking for non-GNU ld" >&5 |
10366 | echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 | |
ba479fd2 | 10367 | fi |
dfb77e37 KC |
10368 | if test "${acl_cv_path_LD+set}" = set; then |
10369 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 10370 | else |
dfb77e37 KC |
10371 | if test -z "$LD"; then |
10372 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
10373 | for ac_dir in $PATH; do | |
10374 | test -z "$ac_dir" && ac_dir=. | |
10375 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
10376 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
10377 | # Check to see if the program is GNU ld. I'd rather use --version, | |
10378 | # but apparently some GNU ld's only accept -v. | |
10379 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
10380 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
10381 | test "$with_gnu_ld" != no && break | |
10382 | else | |
10383 | test "$with_gnu_ld" != yes && break | |
10384 | fi | |
10385 | fi | |
10386 | done | |
10387 | IFS="$ac_save_ifs" | |
10388 | else | |
10389 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
10390 | fi | |
10391 | fi | |
ba479fd2 | 10392 | |
dfb77e37 KC |
10393 | LD="$acl_cv_path_LD" |
10394 | if test -n "$LD"; then | |
10395 | echo "$as_me:$LINENO: result: $LD" >&5 | |
10396 | echo "${ECHO_T}$LD" >&6 | |
10397 | else | |
10398 | echo "$as_me:$LINENO: result: no" >&5 | |
10399 | echo "${ECHO_T}no" >&6 | |
ba479fd2 | 10400 | fi |
dfb77e37 KC |
10401 | test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 |
10402 | echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} | |
10403 | { (exit 1); exit 1; }; } | |
10404 | echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 | |
10405 | echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 | |
10406 | if test "${acl_cv_prog_gnu_ld+set}" = set; then | |
10407 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10408 | else | |
10409 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
10410 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
10411 | acl_cv_prog_gnu_ld=yes | |
10412 | else | |
10413 | acl_cv_prog_gnu_ld=no | |
6e3f3080 | 10414 | fi |
dfb77e37 KC |
10415 | fi |
10416 | echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 | |
10417 | echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 | |
10418 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
10419 | ||
10420 | ||
10421 | ||
10422 | echo "$as_me:$LINENO: checking for shared library run path origin" >&5 | |
10423 | echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 | |
10424 | if test "${acl_cv_rpath+set}" = set; then | |
10425 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10426 | else | |
10427 | ||
10428 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
10429 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
10430 | . ./conftest.sh | |
10431 | rm -f ./conftest.sh | |
10432 | acl_cv_rpath=done | |
ba479fd2 | 10433 | |
eb158727 | 10434 | fi |
dfb77e37 KC |
10435 | echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 |
10436 | echo "${ECHO_T}$acl_cv_rpath" >&6 | |
10437 | wl="$acl_cv_wl" | |
10438 | libext="$acl_cv_libext" | |
10439 | shlibext="$acl_cv_shlibext" | |
10440 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
10441 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
10442 | hardcode_direct="$acl_cv_hardcode_direct" | |
10443 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
10444 | # Check whether --enable-rpath or --disable-rpath was given. | |
10445 | if test "${enable_rpath+set}" = set; then | |
10446 | enableval="$enable_rpath" | |
10447 | : | |
10448 | else | |
10449 | enable_rpath=yes | |
10450 | fi; | |
10451 | ||
10452 | ||
10453 | ||
10454 | ||
10455 | ||
10456 | ||
10457 | ||
10458 | use_additional=yes | |
10459 | ||
10460 | acl_save_prefix="$prefix" | |
10461 | prefix="$acl_final_prefix" | |
10462 | acl_save_exec_prefix="$exec_prefix" | |
10463 | exec_prefix="$acl_final_exec_prefix" | |
10464 | ||
10465 | eval additional_includedir=\"$includedir\" | |
10466 | eval additional_libdir=\"$libdir\" | |
10467 | ||
10468 | exec_prefix="$acl_save_exec_prefix" | |
10469 | prefix="$acl_save_prefix" | |
10470 | ||
10471 | ||
10472 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10473 | if test "${with_libiconv_prefix+set}" = set; then | |
10474 | withval="$with_libiconv_prefix" | |
10475 | ||
10476 | if test "X$withval" = "Xno"; then | |
10477 | use_additional=no | |
10478 | else | |
10479 | if test "X$withval" = "X"; then | |
10480 | ||
10481 | acl_save_prefix="$prefix" | |
10482 | prefix="$acl_final_prefix" | |
10483 | acl_save_exec_prefix="$exec_prefix" | |
10484 | exec_prefix="$acl_final_exec_prefix" | |
10485 | ||
10486 | eval additional_includedir=\"$includedir\" | |
10487 | eval additional_libdir=\"$libdir\" | |
10488 | ||
10489 | exec_prefix="$acl_save_exec_prefix" | |
10490 | prefix="$acl_save_prefix" | |
10491 | ||
10492 | else | |
10493 | additional_includedir="$withval/include" | |
10494 | additional_libdir="$withval/lib" | |
10495 | fi | |
10496 | fi | |
10497 | ||
10498 | fi; | |
10499 | LIBICONV= | |
10500 | LTLIBICONV= | |
10501 | INCICONV= | |
10502 | rpathdirs= | |
10503 | ltrpathdirs= | |
10504 | names_already_handled= | |
10505 | names_next_round='iconv ' | |
10506 | while test -n "$names_next_round"; do | |
10507 | names_this_round="$names_next_round" | |
10508 | names_next_round= | |
10509 | for name in $names_this_round; do | |
10510 | already_handled= | |
10511 | for n in $names_already_handled; do | |
10512 | if test "$n" = "$name"; then | |
10513 | already_handled=yes | |
10514 | break | |
10515 | fi | |
10516 | done | |
10517 | if test -z "$already_handled"; then | |
10518 | names_already_handled="$names_already_handled $name" | |
10519 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10520 | eval value=\"\$HAVE_LIB$uppername\" | |
10521 | if test -n "$value"; then | |
10522 | if test "$value" = yes; then | |
10523 | eval value=\"\$LIB$uppername\" | |
10524 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
10525 | eval value=\"\$LTLIB$uppername\" | |
10526 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
10527 | else | |
10528 | : | |
10529 | fi | |
10530 | else | |
10531 | found_dir= | |
10532 | found_la= | |
10533 | found_so= | |
10534 | found_a= | |
10535 | if test $use_additional = yes; then | |
10536 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
10537 | found_dir="$additional_libdir" | |
10538 | found_so="$additional_libdir/lib$name.$shlibext" | |
10539 | if test -f "$additional_libdir/lib$name.la"; then | |
10540 | found_la="$additional_libdir/lib$name.la" | |
10541 | fi | |
10542 | else | |
10543 | if test -f "$additional_libdir/lib$name.$libext"; then | |
10544 | found_dir="$additional_libdir" | |
10545 | found_a="$additional_libdir/lib$name.$libext" | |
10546 | if test -f "$additional_libdir/lib$name.la"; then | |
10547 | found_la="$additional_libdir/lib$name.la" | |
10548 | fi | |
10549 | fi | |
10550 | fi | |
10551 | fi | |
10552 | if test "X$found_dir" = "X"; then | |
10553 | for x in $LDFLAGS $LTLIBICONV; do | |
10554 | ||
10555 | acl_save_prefix="$prefix" | |
10556 | prefix="$acl_final_prefix" | |
10557 | acl_save_exec_prefix="$exec_prefix" | |
10558 | exec_prefix="$acl_final_exec_prefix" | |
10559 | eval x=\"$x\" | |
10560 | exec_prefix="$acl_save_exec_prefix" | |
10561 | prefix="$acl_save_prefix" | |
10562 | ||
10563 | case "$x" in | |
10564 | -L*) | |
10565 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10566 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
10567 | found_dir="$dir" | |
10568 | found_so="$dir/lib$name.$shlibext" | |
10569 | if test -f "$dir/lib$name.la"; then | |
10570 | found_la="$dir/lib$name.la" | |
10571 | fi | |
10572 | else | |
10573 | if test -f "$dir/lib$name.$libext"; then | |
10574 | found_dir="$dir" | |
10575 | found_a="$dir/lib$name.$libext" | |
10576 | if test -f "$dir/lib$name.la"; then | |
10577 | found_la="$dir/lib$name.la" | |
10578 | fi | |
10579 | fi | |
10580 | fi | |
10581 | ;; | |
10582 | esac | |
10583 | if test "X$found_dir" != "X"; then | |
10584 | break | |
10585 | fi | |
10586 | done | |
10587 | fi | |
10588 | if test "X$found_dir" != "X"; then | |
10589 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
10590 | if test "X$found_so" != "X"; then | |
10591 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10592 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10593 | else | |
10594 | haveit= | |
10595 | for x in $ltrpathdirs; do | |
10596 | if test "X$x" = "X$found_dir"; then | |
10597 | haveit=yes | |
10598 | break | |
10599 | fi | |
10600 | done | |
10601 | if test -z "$haveit"; then | |
10602 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10603 | fi | |
10604 | if test "$hardcode_direct" = yes; then | |
10605 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10606 | else | |
10607 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10608 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10609 | haveit= | |
10610 | for x in $rpathdirs; do | |
10611 | if test "X$x" = "X$found_dir"; then | |
10612 | haveit=yes | |
10613 | break | |
10614 | fi | |
10615 | done | |
10616 | if test -z "$haveit"; then | |
10617 | rpathdirs="$rpathdirs $found_dir" | |
10618 | fi | |
10619 | else | |
10620 | haveit= | |
10621 | for x in $LDFLAGS $LIBICONV; do | |
10622 | ||
10623 | acl_save_prefix="$prefix" | |
10624 | prefix="$acl_final_prefix" | |
10625 | acl_save_exec_prefix="$exec_prefix" | |
10626 | exec_prefix="$acl_final_exec_prefix" | |
10627 | eval x=\"$x\" | |
10628 | exec_prefix="$acl_save_exec_prefix" | |
10629 | prefix="$acl_save_prefix" | |
10630 | ||
10631 | if test "X$x" = "X-L$found_dir"; then | |
10632 | haveit=yes | |
10633 | break | |
10634 | fi | |
10635 | done | |
10636 | if test -z "$haveit"; then | |
10637 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
10638 | fi | |
10639 | if test "$hardcode_minus_L" != no; then | |
10640 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10641 | else | |
10642 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
10643 | fi | |
10644 | fi | |
10645 | fi | |
10646 | fi | |
10647 | else | |
10648 | if test "X$found_a" != "X"; then | |
10649 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
10650 | else | |
10651 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
10652 | fi | |
10653 | fi | |
10654 | additional_includedir= | |
10655 | case "$found_dir" in | |
10656 | */lib | */lib/) | |
10657 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10658 | additional_includedir="$basedir/include" | |
10659 | ;; | |
10660 | esac | |
10661 | if test "X$additional_includedir" != "X"; then | |
10662 | if test "X$additional_includedir" != "X/usr/include"; then | |
10663 | haveit= | |
10664 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10665 | if test -n "$GCC"; then | |
10666 | case $host_os in | |
10667 | linux*) haveit=yes;; | |
10668 | esac | |
10669 | fi | |
10670 | fi | |
10671 | if test -z "$haveit"; then | |
10672 | for x in $CPPFLAGS $INCICONV; do | |
10673 | ||
10674 | acl_save_prefix="$prefix" | |
10675 | prefix="$acl_final_prefix" | |
10676 | acl_save_exec_prefix="$exec_prefix" | |
10677 | exec_prefix="$acl_final_exec_prefix" | |
10678 | eval x=\"$x\" | |
10679 | exec_prefix="$acl_save_exec_prefix" | |
10680 | prefix="$acl_save_prefix" | |
10681 | ||
10682 | if test "X$x" = "X-I$additional_includedir"; then | |
10683 | haveit=yes | |
10684 | break | |
10685 | fi | |
10686 | done | |
10687 | if test -z "$haveit"; then | |
10688 | if test -d "$additional_includedir"; then | |
10689 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
10690 | fi | |
10691 | fi | |
10692 | fi | |
10693 | fi | |
10694 | fi | |
10695 | if test -n "$found_la"; then | |
10696 | save_libdir="$libdir" | |
10697 | case "$found_la" in | |
10698 | */* | *\\*) . "$found_la" ;; | |
10699 | *) . "./$found_la" ;; | |
10700 | esac | |
10701 | libdir="$save_libdir" | |
10702 | for dep in $dependency_libs; do | |
10703 | case "$dep" in | |
10704 | -L*) | |
10705 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10706 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10707 | haveit= | |
10708 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10709 | if test -n "$GCC"; then | |
10710 | case $host_os in | |
10711 | linux*) haveit=yes;; | |
10712 | esac | |
10713 | fi | |
10714 | fi | |
10715 | if test -z "$haveit"; then | |
10716 | haveit= | |
10717 | for x in $LDFLAGS $LIBICONV; do | |
10718 | ||
10719 | acl_save_prefix="$prefix" | |
10720 | prefix="$acl_final_prefix" | |
10721 | acl_save_exec_prefix="$exec_prefix" | |
10722 | exec_prefix="$acl_final_exec_prefix" | |
10723 | eval x=\"$x\" | |
10724 | exec_prefix="$acl_save_exec_prefix" | |
10725 | prefix="$acl_save_prefix" | |
10726 | ||
10727 | if test "X$x" = "X-L$additional_libdir"; then | |
10728 | haveit=yes | |
10729 | break | |
10730 | fi | |
10731 | done | |
10732 | if test -z "$haveit"; then | |
10733 | if test -d "$additional_libdir"; then | |
10734 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
10735 | fi | |
10736 | fi | |
10737 | haveit= | |
10738 | for x in $LDFLAGS $LTLIBICONV; do | |
10739 | ||
10740 | acl_save_prefix="$prefix" | |
10741 | prefix="$acl_final_prefix" | |
10742 | acl_save_exec_prefix="$exec_prefix" | |
10743 | exec_prefix="$acl_final_exec_prefix" | |
10744 | eval x=\"$x\" | |
10745 | exec_prefix="$acl_save_exec_prefix" | |
10746 | prefix="$acl_save_prefix" | |
10747 | ||
10748 | if test "X$x" = "X-L$additional_libdir"; then | |
10749 | haveit=yes | |
10750 | break | |
10751 | fi | |
10752 | done | |
10753 | if test -z "$haveit"; then | |
10754 | if test -d "$additional_libdir"; then | |
10755 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
10756 | fi | |
10757 | fi | |
10758 | fi | |
10759 | fi | |
10760 | ;; | |
10761 | -R*) | |
10762 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10763 | if test "$enable_rpath" != no; then | |
10764 | haveit= | |
10765 | for x in $rpathdirs; do | |
10766 | if test "X$x" = "X$dir"; then | |
10767 | haveit=yes | |
10768 | break | |
10769 | fi | |
10770 | done | |
10771 | if test -z "$haveit"; then | |
10772 | rpathdirs="$rpathdirs $dir" | |
10773 | fi | |
10774 | haveit= | |
10775 | for x in $ltrpathdirs; do | |
10776 | if test "X$x" = "X$dir"; then | |
10777 | haveit=yes | |
10778 | break | |
10779 | fi | |
10780 | done | |
10781 | if test -z "$haveit"; then | |
10782 | ltrpathdirs="$ltrpathdirs $dir" | |
10783 | fi | |
10784 | fi | |
10785 | ;; | |
10786 | -l*) | |
10787 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10788 | ;; | |
10789 | *.la) | |
10790 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10791 | ;; | |
10792 | *) | |
10793 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
10794 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
10795 | ;; | |
10796 | esac | |
10797 | done | |
10798 | fi | |
10799 | else | |
10800 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
10801 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
10802 | fi | |
10803 | fi | |
10804 | fi | |
10805 | done | |
10806 | done | |
10807 | if test "X$rpathdirs" != "X"; then | |
10808 | if test -n "$hardcode_libdir_separator"; then | |
10809 | alldirs= | |
10810 | for found_dir in $rpathdirs; do | |
10811 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10812 | done | |
10813 | acl_save_libdir="$libdir" | |
10814 | libdir="$alldirs" | |
10815 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10816 | libdir="$acl_save_libdir" | |
10817 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
10818 | else | |
10819 | for found_dir in $rpathdirs; do | |
10820 | acl_save_libdir="$libdir" | |
10821 | libdir="$found_dir" | |
10822 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10823 | libdir="$acl_save_libdir" | |
10824 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
10825 | done | |
10826 | fi | |
10827 | fi | |
10828 | if test "X$ltrpathdirs" != "X"; then | |
10829 | for found_dir in $ltrpathdirs; do | |
10830 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
10831 | done | |
10832 | fi | |
10833 | ||
10834 | ||
10835 | ||
10836 | ||
10837 | ||
10838 | ||
10839 | ||
10840 | am_save_CPPFLAGS="$CPPFLAGS" | |
10841 | ||
10842 | for element in $INCICONV; do | |
10843 | haveit= | |
10844 | for x in $CPPFLAGS; do | |
10845 | ||
10846 | acl_save_prefix="$prefix" | |
10847 | prefix="$acl_final_prefix" | |
10848 | acl_save_exec_prefix="$exec_prefix" | |
10849 | exec_prefix="$acl_final_exec_prefix" | |
10850 | eval x=\"$x\" | |
10851 | exec_prefix="$acl_save_exec_prefix" | |
10852 | prefix="$acl_save_prefix" | |
10853 | ||
10854 | if test "X$x" = "X$element"; then | |
10855 | haveit=yes | |
10856 | break | |
10857 | fi | |
10858 | done | |
10859 | if test -z "$haveit"; then | |
10860 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10861 | fi | |
10862 | done | |
eb158727 ZW |
10863 | |
10864 | ||
ba479fd2 NN |
10865 | echo "$as_me:$LINENO: checking for iconv" >&5 |
10866 | echo $ECHO_N "checking for iconv... $ECHO_C" >&6 | |
10867 | if test "${am_cv_func_iconv+set}" = set; then | |
10868 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 10869 | else |
ba479fd2 | 10870 | |
f91abfce TT |
10871 | am_cv_func_iconv="no, consider installing GNU libiconv" |
10872 | am_cv_lib_iconv=no | |
ba479fd2 | 10873 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10874 | /* confdefs.h. */ |
10875 | _ACEOF | |
10876 | cat confdefs.h >>conftest.$ac_ext | |
10877 | cat >>conftest.$ac_ext <<_ACEOF | |
10878 | /* end confdefs.h. */ | |
f91abfce TT |
10879 | #include <stdlib.h> |
10880 | #include <iconv.h> | |
ba479fd2 NN |
10881 | int |
10882 | main () | |
10883 | { | |
f91abfce TT |
10884 | iconv_t cd = iconv_open("",""); |
10885 | iconv(cd,NULL,NULL,NULL,NULL); | |
10886 | iconv_close(cd); | |
ba479fd2 NN |
10887 | ; |
10888 | return 0; | |
10889 | } | |
10890 | _ACEOF | |
10891 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10892 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 10893 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 10894 | ac_status=$? |
86da66b5 HPN |
10895 | grep -v '^ *+' conftest.er1 >conftest.err |
10896 | rm -f conftest.er1 | |
10897 | cat conftest.err >&5 | |
ba479fd2 NN |
10898 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10899 | (exit $ac_status); } && | |
e8b05380 | 10900 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
10901 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10902 | (eval $ac_try) 2>&5 | |
10903 | ac_status=$? | |
10904 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10905 | (exit $ac_status); }; } && | |
10906 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
10907 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10908 | (eval $ac_try) 2>&5 | |
10909 | ac_status=$? | |
10910 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10911 | (exit $ac_status); }; }; then | |
f91abfce TT |
10912 | am_cv_func_iconv=yes |
10913 | else | |
ba479fd2 NN |
10914 | echo "$as_me: failed program was:" >&5 |
10915 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10916 | ||
f91abfce | 10917 | fi |
86da66b5 HPN |
10918 | rm -f conftest.err conftest.$ac_objext \ |
10919 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
10920 | if test "$am_cv_func_iconv" != yes; then |
10921 | am_save_LIBS="$LIBS" | |
dfb77e37 | 10922 | LIBS="$LIBS $LIBICONV" |
ba479fd2 | 10923 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10924 | /* confdefs.h. */ |
10925 | _ACEOF | |
10926 | cat confdefs.h >>conftest.$ac_ext | |
10927 | cat >>conftest.$ac_ext <<_ACEOF | |
10928 | /* end confdefs.h. */ | |
f91abfce TT |
10929 | #include <stdlib.h> |
10930 | #include <iconv.h> | |
ba479fd2 NN |
10931 | int |
10932 | main () | |
10933 | { | |
f91abfce TT |
10934 | iconv_t cd = iconv_open("",""); |
10935 | iconv(cd,NULL,NULL,NULL,NULL); | |
10936 | iconv_close(cd); | |
ba479fd2 NN |
10937 | ; |
10938 | return 0; | |
10939 | } | |
10940 | _ACEOF | |
10941 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10942 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 10943 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 10944 | ac_status=$? |
86da66b5 HPN |
10945 | grep -v '^ *+' conftest.er1 >conftest.err |
10946 | rm -f conftest.er1 | |
10947 | cat conftest.err >&5 | |
ba479fd2 NN |
10948 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10949 | (exit $ac_status); } && | |
e8b05380 | 10950 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
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); }; } && | |
10956 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
10957 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10958 | (eval $ac_try) 2>&5 | |
10959 | ac_status=$? | |
10960 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10961 | (exit $ac_status); }; }; then | |
f91abfce TT |
10962 | am_cv_lib_iconv=yes |
10963 | am_cv_func_iconv=yes | |
10964 | else | |
ba479fd2 NN |
10965 | echo "$as_me: failed program was:" >&5 |
10966 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10967 | ||
f91abfce | 10968 | fi |
86da66b5 HPN |
10969 | rm -f conftest.err conftest.$ac_objext \ |
10970 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
10971 | LIBS="$am_save_LIBS" |
10972 | fi | |
6e3f3080 | 10973 | |
ba479fd2 NN |
10974 | fi |
10975 | echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 | |
10976 | echo "${ECHO_T}$am_cv_func_iconv" >&6 | |
63cf211a | 10977 | if test "$am_cv_func_iconv" = yes; then |
ba479fd2 NN |
10978 | |
10979 | cat >>confdefs.h <<\_ACEOF | |
f91abfce | 10980 | #define HAVE_ICONV 1 |
ba479fd2 | 10981 | _ACEOF |
f91abfce | 10982 | |
dfb77e37 KC |
10983 | fi |
10984 | if test "$am_cv_lib_iconv" = yes; then | |
10985 | echo "$as_me:$LINENO: checking how to link with libiconv" >&5 | |
10986 | echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 | |
10987 | echo "$as_me:$LINENO: result: $LIBICONV" >&5 | |
10988 | echo "${ECHO_T}$LIBICONV" >&6 | |
10989 | else | |
10990 | CPPFLAGS="$am_save_CPPFLAGS" | |
10991 | LIBICONV= | |
10992 | LTLIBICONV= | |
10993 | fi | |
10994 | ||
10995 | ||
10996 | ||
10997 | if test "$am_cv_func_iconv" = yes; then | |
ba479fd2 NN |
10998 | echo "$as_me:$LINENO: checking for iconv declaration" >&5 |
10999 | echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 | |
11000 | if test "${am_cv_proto_iconv+set}" = set; then | |
11001 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 11002 | else |
ba479fd2 NN |
11003 | |
11004 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11005 | /* confdefs.h. */ |
11006 | _ACEOF | |
11007 | cat confdefs.h >>conftest.$ac_ext | |
11008 | cat >>conftest.$ac_ext <<_ACEOF | |
11009 | /* end confdefs.h. */ | |
f91abfce TT |
11010 | |
11011 | #include <stdlib.h> | |
11012 | #include <iconv.h> | |
11013 | extern | |
11014 | #ifdef __cplusplus | |
11015 | "C" | |
11016 | #endif | |
11017 | #if defined(__STDC__) || defined(__cplusplus) | |
11018 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
11019 | #else | |
11020 | size_t iconv(); | |
11021 | #endif | |
11022 | ||
ba479fd2 NN |
11023 | int |
11024 | main () | |
11025 | { | |
f91abfce | 11026 | |
ba479fd2 NN |
11027 | ; |
11028 | return 0; | |
11029 | } | |
11030 | _ACEOF | |
11031 | rm -f conftest.$ac_objext | |
11032 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11033 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11034 | ac_status=$? |
86da66b5 HPN |
11035 | grep -v '^ *+' conftest.er1 >conftest.err |
11036 | rm -f conftest.er1 | |
11037 | cat conftest.err >&5 | |
ba479fd2 NN |
11038 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11039 | (exit $ac_status); } && | |
e8b05380 | 11040 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
11041 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11042 | (eval $ac_try) 2>&5 | |
11043 | ac_status=$? | |
11044 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11045 | (exit $ac_status); }; } && | |
11046 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11047 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11048 | (eval $ac_try) 2>&5 | |
11049 | ac_status=$? | |
11050 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11051 | (exit $ac_status); }; }; then | |
f91abfce TT |
11052 | am_cv_proto_iconv_arg1="" |
11053 | else | |
ba479fd2 NN |
11054 | echo "$as_me: failed program was:" >&5 |
11055 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11056 | ||
11057 | am_cv_proto_iconv_arg1="const" | |
f91abfce | 11058 | fi |
86da66b5 | 11059 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
f91abfce TT |
11060 | 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);" |
11061 | fi | |
11062 | ||
11063 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
ba479fd2 NN |
11064 | echo "$as_me:$LINENO: result: ${ac_t:- |
11065 | }$am_cv_proto_iconv" >&5 | |
11066 | echo "${ECHO_T}${ac_t:- | |
11067 | }$am_cv_proto_iconv" >&6 | |
11068 | ||
11069 | cat >>confdefs.h <<_ACEOF | |
f91abfce | 11070 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
ba479fd2 | 11071 | _ACEOF |
f91abfce TT |
11072 | |
11073 | fi | |
f91abfce | 11074 | |
56694dd9 ZW |
11075 | # Until we have in-tree GNU iconv: |
11076 | LIBICONV_DEP= | |
11077 | ||
11078 | ||
11079 | ||
ba479fd2 NN |
11080 | echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 |
11081 | echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 | |
11082 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then | |
11083 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
56694dd9 | 11084 | else |
ba479fd2 | 11085 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11086 | /* confdefs.h. */ |
11087 | _ACEOF | |
11088 | cat confdefs.h >>conftest.$ac_ext | |
11089 | cat >>conftest.$ac_ext <<_ACEOF | |
11090 | /* end confdefs.h. */ | |
56694dd9 | 11091 | #include <locale.h> |
ba479fd2 NN |
11092 | int |
11093 | main () | |
11094 | { | |
56694dd9 | 11095 | return LC_MESSAGES |
ba479fd2 NN |
11096 | ; |
11097 | return 0; | |
11098 | } | |
11099 | _ACEOF | |
11100 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11101 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 11102 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 11103 | ac_status=$? |
86da66b5 HPN |
11104 | grep -v '^ *+' conftest.er1 >conftest.err |
11105 | rm -f conftest.er1 | |
11106 | cat conftest.err >&5 | |
ba479fd2 NN |
11107 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11108 | (exit $ac_status); } && | |
e8b05380 | 11109 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
11110 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11111 | (eval $ac_try) 2>&5 | |
11112 | ac_status=$? | |
11113 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11114 | (exit $ac_status); }; } && | |
11115 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
11116 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11117 | (eval $ac_try) 2>&5 | |
11118 | ac_status=$? | |
11119 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11120 | (exit $ac_status); }; }; then | |
56694dd9 ZW |
11121 | am_cv_val_LC_MESSAGES=yes |
11122 | else | |
ba479fd2 NN |
11123 | echo "$as_me: failed program was:" >&5 |
11124 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11125 | ||
11126 | am_cv_val_LC_MESSAGES=no | |
56694dd9 | 11127 | fi |
86da66b5 HPN |
11128 | rm -f conftest.err conftest.$ac_objext \ |
11129 | conftest$ac_exeext conftest.$ac_ext | |
56694dd9 | 11130 | fi |
ba479fd2 NN |
11131 | echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 |
11132 | echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 | |
63cf211a | 11133 | if test $am_cv_val_LC_MESSAGES = yes; then |
ba479fd2 NN |
11134 | |
11135 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 11136 | #define HAVE_LC_MESSAGES 1 |
ba479fd2 | 11137 | _ACEOF |
56694dd9 ZW |
11138 | |
11139 | fi | |
11140 | ||
f91abfce | 11141 | |
a03ea89b BM |
11142 | |
11143 | echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 | |
11144 | echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 | |
11145 | if test "${am_cv_langinfo_codeset+set}" = set; then | |
11146 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11147 | else | |
11148 | cat >conftest.$ac_ext <<_ACEOF | |
11149 | /* confdefs.h. */ | |
11150 | _ACEOF | |
11151 | cat confdefs.h >>conftest.$ac_ext | |
11152 | cat >>conftest.$ac_ext <<_ACEOF | |
11153 | /* end confdefs.h. */ | |
11154 | #include <langinfo.h> | |
11155 | int | |
11156 | main () | |
11157 | { | |
11158 | char* cs = nl_langinfo(CODESET); | |
11159 | ; | |
11160 | return 0; | |
11161 | } | |
11162 | _ACEOF | |
11163 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11164 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11165 | (eval $ac_link) 2>conftest.er1 | |
11166 | ac_status=$? | |
11167 | grep -v '^ *+' conftest.er1 >conftest.err | |
11168 | rm -f conftest.er1 | |
11169 | cat conftest.err >&5 | |
11170 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11171 | (exit $ac_status); } && | |
e8b05380 | 11172 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
a03ea89b BM |
11173 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11174 | (eval $ac_try) 2>&5 | |
11175 | ac_status=$? | |
11176 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11177 | (exit $ac_status); }; } && | |
11178 | { ac_try='test -s conftest$ac_exeext' | |
11179 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11180 | (eval $ac_try) 2>&5 | |
11181 | ac_status=$? | |
11182 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11183 | (exit $ac_status); }; }; then | |
11184 | am_cv_langinfo_codeset=yes | |
11185 | else | |
11186 | echo "$as_me: failed program was:" >&5 | |
11187 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11188 | ||
11189 | am_cv_langinfo_codeset=no | |
11190 | fi | |
11191 | rm -f conftest.err conftest.$ac_objext \ | |
11192 | conftest$ac_exeext conftest.$ac_ext | |
11193 | ||
11194 | fi | |
11195 | echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 | |
11196 | echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 | |
11197 | if test $am_cv_langinfo_codeset = yes; then | |
11198 | ||
11199 | cat >>confdefs.h <<\_ACEOF | |
11200 | #define HAVE_LANGINFO_CODESET 1 | |
11201 | _ACEOF | |
11202 | ||
11203 | fi | |
11204 | ||
11205 | ||
86cf1cbd KG |
11206 | # We will need to find libiberty.h and ansidecl.h |
11207 | saved_CFLAGS="$CFLAGS" | |
11208 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
ad6717df PB |
11209 | |
11210 | ||
11211 | ||
11212 | ||
11213 | ||
11214 | ||
11215 | ||
11216 | ||
11217 | ||
11218 | ||
11219 | ||
11220 | ||
11221 | ||
11222 | ||
11223 | ||
11224 | ||
11225 | ||
11226 | ||
11227 | ||
11228 | ||
11229 | ||
6a257778 | 11230 | |
ad6717df PB |
11231 | |
11232 | ||
0d667716 KG |
11233 | |
11234 | ||
11235 | ||
11236 | ||
11237 | ||
11238 | ||
11239 | ||
11240 | ||
11241 | ||
11242 | ||
367e8319 | 11243 | |
0d667716 KG |
11244 | |
11245 | ||
7391b66c | 11246 | |
ed5b9f96 GK |
11247 | |
11248 | for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \ | |
11249 | strsignal strstr strverscmp \ | |
11250 | errno snprintf vsnprintf vasprintf malloc realloc calloc \ | |
367e8319 | 11251 | free basename getopt clock getpagesize clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked |
81bf3d9e | 11252 | do |
ad6717df | 11253 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11254 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11255 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11256 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11257 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11258 | else | |
11259 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11260 | /* confdefs.h. */ |
11261 | _ACEOF | |
11262 | cat confdefs.h >>conftest.$ac_ext | |
11263 | cat >>conftest.$ac_ext <<_ACEOF | |
11264 | /* end confdefs.h. */ | |
7afe8c41 KG |
11265 | #undef $ac_tr_decl |
11266 | #define $ac_tr_decl 1 | |
ba479fd2 | 11267 | |
d02af173 | 11268 | #include "ansidecl.h" |
86cf1cbd | 11269 | #include "system.h" |
f31e826b | 11270 | |
ba479fd2 NN |
11271 | int |
11272 | main () | |
11273 | { | |
86cf1cbd KG |
11274 | #ifndef $ac_func |
11275 | char *(*pfn) = (char *(*)) $ac_func ; | |
11276 | #endif | |
ba479fd2 NN |
11277 | ; |
11278 | return 0; | |
11279 | } | |
11280 | _ACEOF | |
11281 | rm -f conftest.$ac_objext | |
11282 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11283 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11284 | ac_status=$? |
86da66b5 HPN |
11285 | grep -v '^ *+' conftest.er1 >conftest.err |
11286 | rm -f conftest.er1 | |
11287 | cat conftest.err >&5 | |
ba479fd2 NN |
11288 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11289 | (exit $ac_status); } && | |
e8b05380 | 11290 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
11291 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11292 | (eval $ac_try) 2>&5 | |
11293 | ac_status=$? | |
11294 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11295 | (exit $ac_status); }; } && | |
11296 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11297 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11298 | (eval $ac_try) 2>&5 | |
11299 | ac_status=$? | |
11300 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11301 | (exit $ac_status); }; }; then | |
f31e826b | 11302 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 11303 | else |
ba479fd2 NN |
11304 | echo "$as_me: failed program was:" >&5 |
11305 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11306 | ||
11307 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 11308 | fi |
86da66b5 | 11309 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
11310 | fi |
11311 | ||
f31e826b | 11312 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
11313 | echo "$as_me:$LINENO: result: yes" >&5 |
11314 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 11315 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11316 | _ACEOF |
11317 | ||
81bf3d9e | 11318 | else |
ba479fd2 NN |
11319 | echo "$as_me:$LINENO: result: no" >&5 |
11320 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 11321 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11322 | _ACEOF |
11323 | ||
81bf3d9e RH |
11324 | fi |
11325 | ||
11326 | done | |
ba479fd2 | 11327 | |
ba479fd2 | 11328 | |
ba479fd2 | 11329 | |
81bf3d9e | 11330 | |
81bf3d9e RH |
11331 | |
11332 | for ac_func in getrlimit setrlimit getrusage | |
11333 | do | |
ad6717df | 11334 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11335 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11336 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11337 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11338 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11339 | else | |
11340 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11341 | /* confdefs.h. */ |
11342 | _ACEOF | |
11343 | cat confdefs.h >>conftest.$ac_ext | |
11344 | cat >>conftest.$ac_ext <<_ACEOF | |
11345 | /* end confdefs.h. */ | |
7afe8c41 KG |
11346 | #undef $ac_tr_decl |
11347 | #define $ac_tr_decl 1 | |
ba479fd2 | 11348 | |
d02af173 | 11349 | #include "ansidecl.h" |
86cf1cbd | 11350 | #include "system.h" |
81bf3d9e RH |
11351 | #ifdef HAVE_SYS_RESOURCE_H |
11352 | #include <sys/resource.h> | |
11353 | #endif | |
11354 | ||
f31e826b | 11355 | |
ba479fd2 NN |
11356 | int |
11357 | main () | |
11358 | { | |
86cf1cbd KG |
11359 | #ifndef $ac_func |
11360 | char *(*pfn) = (char *(*)) $ac_func ; | |
11361 | #endif | |
ba479fd2 NN |
11362 | ; |
11363 | return 0; | |
11364 | } | |
11365 | _ACEOF | |
11366 | rm -f conftest.$ac_objext | |
11367 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11368 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11369 | ac_status=$? |
86da66b5 HPN |
11370 | grep -v '^ *+' conftest.er1 >conftest.err |
11371 | rm -f conftest.er1 | |
11372 | cat conftest.err >&5 | |
ba479fd2 NN |
11373 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11374 | (exit $ac_status); } && | |
e8b05380 | 11375 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
11376 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11377 | (eval $ac_try) 2>&5 | |
11378 | ac_status=$? | |
11379 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11380 | (exit $ac_status); }; } && | |
11381 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11382 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11383 | (eval $ac_try) 2>&5 | |
11384 | ac_status=$? | |
11385 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11386 | (exit $ac_status); }; }; then | |
f31e826b | 11387 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 11388 | else |
ba479fd2 NN |
11389 | echo "$as_me: failed program was:" >&5 |
11390 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11391 | ||
11392 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 11393 | fi |
86da66b5 | 11394 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
11395 | fi |
11396 | ||
f31e826b | 11397 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
11398 | echo "$as_me:$LINENO: result: yes" >&5 |
11399 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 11400 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11401 | _ACEOF |
11402 | ||
81bf3d9e | 11403 | else |
ba479fd2 NN |
11404 | echo "$as_me:$LINENO: result: no" >&5 |
11405 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 11406 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11407 | _ACEOF |
11408 | ||
81bf3d9e RH |
11409 | fi |
11410 | ||
11411 | done | |
86cf1cbd | 11412 | |
81bf3d9e | 11413 | |
ba479fd2 | 11414 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11415 | /* confdefs.h. */ |
11416 | _ACEOF | |
11417 | cat confdefs.h >>conftest.$ac_ext | |
11418 | cat >>conftest.$ac_ext <<_ACEOF | |
11419 | /* end confdefs.h. */ | |
b2522d2b HPN |
11420 | |
11421 | #include "ansidecl.h" | |
11422 | #include "system.h" | |
11423 | #ifdef HAVE_SYS_RESOURCE_H | |
11424 | #include <sys/resource.h> | |
11425 | #endif | |
11426 | ||
ba479fd2 NN |
11427 | int |
11428 | main () | |
11429 | { | |
b2522d2b | 11430 | rlim_t l = 0; |
ba479fd2 NN |
11431 | ; |
11432 | return 0; | |
11433 | } | |
11434 | _ACEOF | |
11435 | rm -f conftest.$ac_objext | |
11436 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11437 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11438 | ac_status=$? |
86da66b5 HPN |
11439 | grep -v '^ *+' conftest.er1 >conftest.err |
11440 | rm -f conftest.er1 | |
11441 | cat conftest.err >&5 | |
ba479fd2 NN |
11442 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11443 | (exit $ac_status); } && | |
e8b05380 | 11444 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
11445 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11446 | (eval $ac_try) 2>&5 | |
11447 | ac_status=$? | |
11448 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11449 | (exit $ac_status); }; } && | |
11450 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11451 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11452 | (eval $ac_try) 2>&5 | |
11453 | ac_status=$? | |
11454 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11455 | (exit $ac_status); }; }; then | |
b2522d2b HPN |
11456 | : |
11457 | else | |
ba479fd2 NN |
11458 | echo "$as_me: failed program was:" >&5 |
11459 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11460 | ||
11461 | ||
11462 | cat >>confdefs.h <<\_ACEOF | |
b2522d2b | 11463 | #define rlim_t long |
ba479fd2 | 11464 | _ACEOF |
b2522d2b HPN |
11465 | |
11466 | fi | |
86da66b5 | 11467 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
b2522d2b | 11468 | |
2102b2fe RS |
11469 | # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible |
11470 | # FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname | |
11471 | # in collect2.c, <fcntl.h> isn't visible, but the configure test below needs | |
11472 | # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME. | |
ad6717df | 11473 | |
351df804 | 11474 | for ac_func in ldgetname |
c1800ec8 | 11475 | do |
ad6717df | 11476 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11477 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11478 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11479 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11480 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11481 | else | |
11482 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11483 | /* confdefs.h. */ |
11484 | _ACEOF | |
11485 | cat confdefs.h >>conftest.$ac_ext | |
11486 | cat >>conftest.$ac_ext <<_ACEOF | |
11487 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11488 | #undef $ac_tr_decl |
11489 | #define $ac_tr_decl 1 | |
ba479fd2 | 11490 | |
351df804 KG |
11491 | #include "ansidecl.h" |
11492 | #include "system.h" | |
11493 | #ifdef HAVE_LDFCN_H | |
2102b2fe RS |
11494 | #undef FREAD |
11495 | #undef FWRITE | |
351df804 KG |
11496 | #include <ldfcn.h> |
11497 | #endif | |
11498 | ||
11499 | ||
ba479fd2 NN |
11500 | int |
11501 | main () | |
11502 | { | |
351df804 KG |
11503 | #ifndef $ac_func |
11504 | char *(*pfn) = (char *(*)) $ac_func ; | |
11505 | #endif | |
ba479fd2 NN |
11506 | ; |
11507 | return 0; | |
11508 | } | |
11509 | _ACEOF | |
11510 | rm -f conftest.$ac_objext | |
11511 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11512 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11513 | ac_status=$? |
86da66b5 HPN |
11514 | grep -v '^ *+' conftest.er1 >conftest.err |
11515 | rm -f conftest.er1 | |
11516 | cat conftest.err >&5 | |
ba479fd2 NN |
11517 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11518 | (exit $ac_status); } && | |
e8b05380 | 11519 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
11520 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11521 | (eval $ac_try) 2>&5 | |
11522 | ac_status=$? | |
11523 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11524 | (exit $ac_status); }; } && | |
11525 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11526 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11527 | (eval $ac_try) 2>&5 | |
11528 | ac_status=$? | |
11529 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11530 | (exit $ac_status); }; }; then | |
351df804 KG |
11531 | eval "gcc_cv_have_decl_$ac_func=yes" |
11532 | else | |
ba479fd2 NN |
11533 | echo "$as_me: failed program was:" >&5 |
11534 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11535 | ||
11536 | eval "gcc_cv_have_decl_$ac_func=no" | |
351df804 | 11537 | fi |
86da66b5 | 11538 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
351df804 KG |
11539 | fi |
11540 | ||
11541 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
11542 | echo "$as_me:$LINENO: result: yes" >&5 |
11543 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 11544 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11545 | _ACEOF |
11546 | ||
351df804 | 11547 | else |
ba479fd2 NN |
11548 | echo "$as_me:$LINENO: result: no" >&5 |
11549 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 11550 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11551 | _ACEOF |
11552 | ||
351df804 KG |
11553 | fi |
11554 | ||
11555 | done | |
ba479fd2 | 11556 | |
351df804 KG |
11557 | |
11558 | ||
11559 | for ac_func in times | |
11560 | do | |
ad6717df | 11561 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11562 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11563 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11564 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11565 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11566 | else | |
11567 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11568 | /* confdefs.h. */ |
11569 | _ACEOF | |
11570 | cat confdefs.h >>conftest.$ac_ext | |
11571 | cat >>conftest.$ac_ext <<_ACEOF | |
11572 | /* end confdefs.h. */ | |
351df804 KG |
11573 | #undef $ac_tr_decl |
11574 | #define $ac_tr_decl 1 | |
ba479fd2 | 11575 | |
c1800ec8 ZW |
11576 | #include "ansidecl.h" |
11577 | #include "system.h" | |
11578 | #ifdef HAVE_SYS_TIMES_H | |
11579 | #include <sys/times.h> | |
11580 | #endif | |
11581 | ||
11582 | ||
ba479fd2 NN |
11583 | int |
11584 | main () | |
11585 | { | |
c1800ec8 ZW |
11586 | #ifndef $ac_func |
11587 | char *(*pfn) = (char *(*)) $ac_func ; | |
11588 | #endif | |
ba479fd2 NN |
11589 | ; |
11590 | return 0; | |
11591 | } | |
11592 | _ACEOF | |
11593 | rm -f conftest.$ac_objext | |
11594 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11595 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11596 | ac_status=$? |
86da66b5 HPN |
11597 | grep -v '^ *+' conftest.er1 >conftest.err |
11598 | rm -f conftest.er1 | |
11599 | cat conftest.err >&5 | |
ba479fd2 NN |
11600 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11601 | (exit $ac_status); } && | |
e8b05380 | 11602 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
11603 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11604 | (eval $ac_try) 2>&5 | |
11605 | ac_status=$? | |
11606 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11607 | (exit $ac_status); }; } && | |
11608 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11609 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11610 | (eval $ac_try) 2>&5 | |
11611 | ac_status=$? | |
11612 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11613 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11614 | eval "gcc_cv_have_decl_$ac_func=yes" |
11615 | else | |
ba479fd2 NN |
11616 | echo "$as_me: failed program was:" >&5 |
11617 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11618 | ||
11619 | eval "gcc_cv_have_decl_$ac_func=no" | |
c1800ec8 | 11620 | fi |
86da66b5 | 11621 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 ZW |
11622 | fi |
11623 | ||
11624 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
11625 | echo "$as_me:$LINENO: result: yes" >&5 |
11626 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 11627 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11628 | _ACEOF |
11629 | ||
c1800ec8 | 11630 | else |
ba479fd2 NN |
11631 | echo "$as_me:$LINENO: result: no" >&5 |
11632 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 11633 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11634 | _ACEOF |
11635 | ||
c1800ec8 ZW |
11636 | fi |
11637 | ||
11638 | done | |
c1800ec8 ZW |
11639 | |
11640 | ||
11641 | # More time-related stuff. | |
ba479fd2 NN |
11642 | echo "$as_me:$LINENO: checking for struct tms" >&5 |
11643 | echo $ECHO_N "checking for struct tms... $ECHO_C" >&6 | |
11644 | if test "${ac_cv_struct_tms+set}" = set; then | |
11645 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11646 | else | |
11647 | ||
11648 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11649 | /* confdefs.h. */ |
11650 | _ACEOF | |
11651 | cat confdefs.h >>conftest.$ac_ext | |
11652 | cat >>conftest.$ac_ext <<_ACEOF | |
11653 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11654 | |
11655 | #include "ansidecl.h" | |
11656 | #include "system.h" | |
11657 | #ifdef HAVE_SYS_TIMES_H | |
11658 | #include <sys/times.h> | |
11659 | #endif | |
11660 | ||
ba479fd2 NN |
11661 | int |
11662 | main () | |
11663 | { | |
c1800ec8 | 11664 | struct tms tms; |
ba479fd2 NN |
11665 | ; |
11666 | return 0; | |
11667 | } | |
11668 | _ACEOF | |
11669 | rm -f conftest.$ac_objext | |
11670 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11671 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11672 | ac_status=$? |
86da66b5 HPN |
11673 | grep -v '^ *+' conftest.er1 >conftest.err |
11674 | rm -f conftest.er1 | |
11675 | cat conftest.err >&5 | |
ba479fd2 NN |
11676 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11677 | (exit $ac_status); } && | |
e8b05380 | 11678 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
11679 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11680 | (eval $ac_try) 2>&5 | |
11681 | ac_status=$? | |
11682 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11683 | (exit $ac_status); }; } && | |
11684 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11685 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11686 | (eval $ac_try) 2>&5 | |
11687 | ac_status=$? | |
11688 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11689 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11690 | ac_cv_struct_tms=yes |
11691 | else | |
ba479fd2 NN |
11692 | echo "$as_me: failed program was:" >&5 |
11693 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11694 | ||
11695 | ac_cv_struct_tms=no | |
c1800ec8 | 11696 | fi |
86da66b5 | 11697 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 11698 | fi |
ba479fd2 NN |
11699 | echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 |
11700 | echo "${ECHO_T}$ac_cv_struct_tms" >&6 | |
63cf211a | 11701 | if test $ac_cv_struct_tms = yes; then |
ba479fd2 NN |
11702 | |
11703 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 11704 | #define HAVE_STRUCT_TMS 1 |
ba479fd2 | 11705 | _ACEOF |
c1800ec8 ZW |
11706 | |
11707 | fi | |
11708 | ||
11709 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
11710 | # revisit after autoconf 2.50. | |
ba479fd2 NN |
11711 | echo "$as_me:$LINENO: checking for clock_t" >&5 |
11712 | echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 | |
11713 | if test "${gcc_cv_type_clock_t+set}" = set; then | |
11714 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11715 | else | |
11716 | ||
11717 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11718 | /* confdefs.h. */ |
11719 | _ACEOF | |
11720 | cat confdefs.h >>conftest.$ac_ext | |
11721 | cat >>conftest.$ac_ext <<_ACEOF | |
11722 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11723 | |
11724 | #include "ansidecl.h" | |
11725 | #include "system.h" | |
11726 | ||
ba479fd2 NN |
11727 | int |
11728 | main () | |
11729 | { | |
c1800ec8 | 11730 | clock_t x; |
ba479fd2 NN |
11731 | ; |
11732 | return 0; | |
11733 | } | |
11734 | _ACEOF | |
11735 | rm -f conftest.$ac_objext | |
11736 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11737 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11738 | ac_status=$? |
86da66b5 HPN |
11739 | grep -v '^ *+' conftest.er1 >conftest.err |
11740 | rm -f conftest.er1 | |
11741 | cat conftest.err >&5 | |
ba479fd2 NN |
11742 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11743 | (exit $ac_status); } && | |
e8b05380 | 11744 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
11745 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11746 | (eval $ac_try) 2>&5 | |
11747 | ac_status=$? | |
11748 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11749 | (exit $ac_status); }; } && | |
11750 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11751 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11752 | (eval $ac_try) 2>&5 | |
11753 | ac_status=$? | |
11754 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11755 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11756 | gcc_cv_type_clock_t=yes |
11757 | else | |
ba479fd2 NN |
11758 | echo "$as_me: failed program was:" >&5 |
11759 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11760 | ||
11761 | gcc_cv_type_clock_t=no | |
c1800ec8 | 11762 | fi |
86da66b5 | 11763 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 11764 | fi |
ba479fd2 NN |
11765 | echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 |
11766 | echo "${ECHO_T}$gcc_cv_type_clock_t" >&6 | |
63cf211a | 11767 | if test $gcc_cv_type_clock_t = yes; then |
ba479fd2 NN |
11768 | |
11769 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 11770 | #define HAVE_CLOCK_T 1 |
ba479fd2 | 11771 | _ACEOF |
c1800ec8 ZW |
11772 | |
11773 | fi | |
11774 | ||
eb70d86d AS |
11775 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
11776 | CFLAGS="$saved_CFLAGS" | |
11777 | ||
07cf4226 DM |
11778 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
11779 | if test "${enable_initfini_array+set}" = set; then | |
11780 | enableval="$enable_initfini_array" | |
ba479fd2 | 11781 | |
07cf4226 | 11782 | else |
ba479fd2 NN |
11783 | |
11784 | echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5 | |
11785 | echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6 | |
11786 | if test "${gcc_cv_initfini_array+set}" = set; then | |
11787 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
07cf4226 | 11788 | else |
eb70d86d | 11789 | if test "$cross_compiling" = yes; then |
918c4fe4 | 11790 | gcc_cv_initfini_array=no |
eb70d86d | 11791 | else |
ba479fd2 | 11792 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11793 | /* confdefs.h. */ |
11794 | _ACEOF | |
11795 | cat confdefs.h >>conftest.$ac_ext | |
11796 | cat >>conftest.$ac_ext <<_ACEOF | |
11797 | /* end confdefs.h. */ | |
eb70d86d | 11798 | |
07cf4226 DM |
11799 | static int x = -1; |
11800 | int main (void) { return x; } | |
11801 | int foo (void) { x = 0; } | |
11802 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
ba479fd2 NN |
11803 | _ACEOF |
11804 | rm -f conftest$ac_exeext | |
11805 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11806 | (eval $ac_link) 2>&5 | |
11807 | ac_status=$? | |
11808 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11809 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
11810 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11811 | (eval $ac_try) 2>&5 | |
11812 | ac_status=$? | |
11813 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11814 | (exit $ac_status); }; }; then | |
918c4fe4 | 11815 | gcc_cv_initfini_array=yes |
eb70d86d | 11816 | else |
ba479fd2 NN |
11817 | echo "$as_me: program exited with status $ac_status" >&5 |
11818 | echo "$as_me: failed program was:" >&5 | |
11819 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11820 | ||
11821 | ( exit $ac_status ) | |
11822 | gcc_cv_initfini_array=no | |
eb70d86d | 11823 | fi |
86da66b5 | 11824 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
eb70d86d | 11825 | fi |
07cf4226 | 11826 | fi |
ba479fd2 NN |
11827 | echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5 |
11828 | echo "${ECHO_T}$gcc_cv_initfini_array" >&6 | |
eb70d86d | 11829 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 11830 | |
ba479fd2 | 11831 | fi; |
63cf211a | 11832 | if test $enable_initfini_array = yes; then |
ba479fd2 NN |
11833 | |
11834 | cat >>confdefs.h <<\_ACEOF | |
eb70d86d | 11835 | #define HAVE_INITFINI_ARRAY 1 |
ba479fd2 | 11836 | _ACEOF |
07cf4226 | 11837 | |
eb70d86d | 11838 | fi |
81bf3d9e | 11839 | |
ba479fd2 NN |
11840 | # mkdir takes a single argument on some systems. |
11841 | echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5 | |
11842 | echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6 | |
11843 | if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then | |
11844 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75923b2f | 11845 | else |
ba479fd2 | 11846 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11847 | /* confdefs.h. */ |
11848 | _ACEOF | |
11849 | cat confdefs.h >>conftest.$ac_ext | |
11850 | cat >>conftest.$ac_ext <<_ACEOF | |
11851 | /* end confdefs.h. */ | |
75923b2f MK |
11852 | |
11853 | #include <sys/types.h> | |
11854 | #ifdef HAVE_SYS_STAT_H | |
11855 | # include <sys/stat.h> | |
11856 | #endif | |
11857 | #ifdef HAVE_UNISTD_H | |
11858 | # include <unistd.h> | |
11859 | #endif | |
11860 | #ifdef HAVE_DIRECT_H | |
11861 | # include <direct.h> | |
11862 | #endif | |
ba479fd2 NN |
11863 | int |
11864 | main () | |
11865 | { | |
75923b2f | 11866 | mkdir ("foo", 0); |
ba479fd2 NN |
11867 | ; |
11868 | return 0; | |
11869 | } | |
11870 | _ACEOF | |
11871 | rm -f conftest.$ac_objext | |
11872 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11873 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11874 | ac_status=$? |
86da66b5 HPN |
11875 | grep -v '^ *+' conftest.er1 >conftest.err |
11876 | rm -f conftest.er1 | |
11877 | cat conftest.err >&5 | |
ba479fd2 NN |
11878 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11879 | (exit $ac_status); } && | |
e8b05380 | 11880 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
11881 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11882 | (eval $ac_try) 2>&5 | |
11883 | ac_status=$? | |
11884 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11885 | (exit $ac_status); }; } && | |
11886 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11887 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11888 | (eval $ac_try) 2>&5 | |
11889 | ac_status=$? | |
11890 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11891 | (exit $ac_status); }; }; then | |
75923b2f MK |
11892 | gcc_cv_mkdir_takes_one_arg=no |
11893 | else | |
ba479fd2 NN |
11894 | echo "$as_me: failed program was:" >&5 |
11895 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11896 | ||
11897 | gcc_cv_mkdir_takes_one_arg=yes | |
75923b2f | 11898 | fi |
86da66b5 | 11899 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75923b2f | 11900 | fi |
ba479fd2 NN |
11901 | echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5 |
11902 | echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6 | |
63cf211a | 11903 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then |
ba479fd2 NN |
11904 | |
11905 | cat >>confdefs.h <<\_ACEOF | |
75923b2f | 11906 | #define MKDIR_TAKES_ONE_ARG 1 |
ba479fd2 | 11907 | _ACEOF |
75923b2f MK |
11908 | |
11909 | fi | |
11910 | ||
11911 | ||
861bb6c1 JL |
11912 | # File extensions |
11913 | manext='.1' | |
11914 | objext='.o' | |
11915 | ||
11916 | ||
11917 | ||
4977bab6 ZW |
11918 | # With Setjmp/Longjmp based exception handling. |
11919 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
11920 | if test "${enable_sjlj_exceptions+set}" = set; then | |
11921 | enableval="$enable_sjlj_exceptions" | |
11922 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
63cf211a | 11923 | |
ba479fd2 NN |
11924 | cat >>confdefs.h <<_ACEOF |
11925 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
11926 | _ACEOF | |
4977bab6 | 11927 | |
ba479fd2 | 11928 | fi; |
4977bab6 | 11929 | |
443728bb L |
11930 | # For platforms with the unwind ABI which includes an unwind library, |
11931 | # libunwind, we can choose to use the system libunwind. | |
4977bab6 | 11932 | |
443728bb L |
11933 | # Check whether --with-system-libunwind or --without-system-libunwind was given. |
11934 | if test "${with_system_libunwind+set}" = set; then | |
11935 | withval="$with_system_libunwind" | |
4977bab6 | 11936 | |
ba479fd2 | 11937 | fi; |
4977bab6 | 11938 | |
34a86c2b NN |
11939 | # -------------------------------------------------------- |
11940 | # Build, host, and target specific configuration fragments | |
11941 | # -------------------------------------------------------- | |
11942 | ||
5b28c537 NN |
11943 | # Collect build-machine-specific information. |
11944 | . ${srcdir}/config.build | |
11945 | ||
a89ea0df NN |
11946 | # Collect host-machine-specific information. |
11947 | . ${srcdir}/config.host | |
11948 | ||
ef69da62 | 11949 | target_gtfiles= |
a89ea0df NN |
11950 | |
11951 | # Collect target-machine-specific information. | |
8ad9fb33 | 11952 | . ${srcdir}/config.gcc |
861bb6c1 JL |
11953 | |
11954 | extra_objs="${host_extra_objs} ${extra_objs}" | |
30500d84 | 11955 | extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}" |
861bb6c1 JL |
11956 | |
11957 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 11958 | if test x"$tm_file" = x |
861bb6c1 JL |
11959 | then tm_file=$cpu_type/$cpu_type.h; fi |
11960 | ||
6b2adea9 | 11961 | if test x"$extra_headers" = x |
861bb6c1 JL |
11962 | then extra_headers=; fi |
11963 | ||
75bffa71 | 11964 | if test x$md_file = x |
e98e406f | 11965 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 11966 | |
75bffa71 | 11967 | if test x$out_file = x |
861bb6c1 JL |
11968 | then out_file=$cpu_type/$cpu_type.c; fi |
11969 | ||
75bffa71 | 11970 | if test x"$tmake_file" = x |
861bb6c1 JL |
11971 | then tmake_file=$cpu_type/t-$cpu_type |
11972 | fi | |
11973 | ||
90e6a802 | 11974 | if test x"$dwarf2" = xyes |
756ee602 | 11975 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
11976 | fi |
11977 | ||
861bb6c1 | 11978 | # Say what files are being used for the output code and MD file. |
11642c3a | 11979 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
11980 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
11981 | ||
11642c3a | 11982 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
11983 | # about them and drop them. |
11984 | ||
11642c3a ZW |
11985 | bx= |
11986 | for x in $build_xm_file; do | |
11987 | if test -f $srcdir/config/$x | |
11988 | then bx="$bx $x" | |
ba479fd2 NN |
11989 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
11990 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
11991 | fi |
11992 | done | |
11993 | build_xm_file="$bx" | |
11994 | ||
11995 | hx= | |
11996 | for x in $host_xm_file; do | |
11997 | if test -f $srcdir/config/$x | |
11998 | then hx="$hx $x" | |
ba479fd2 NN |
11999 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12000 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12001 | fi |
12002 | done | |
12003 | host_xm_file="$hx" | |
12004 | ||
12005 | tx= | |
12006 | for x in $xm_file; do | |
12007 | if test -f $srcdir/config/$x | |
12008 | then tx="$tx $x" | |
ba479fd2 NN |
12009 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12010 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12011 | fi |
12012 | done | |
12013 | xm_file="$tx" | |
12014 | ||
861bb6c1 JL |
12015 | count=a |
12016 | for f in $tm_file; do | |
12017 | count=${count}x | |
12018 | done | |
75bffa71 | 12019 | if test $count = ax; then |
861bb6c1 JL |
12020 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
12021 | else | |
12022 | echo "Using the following target machine macro files:" | |
12023 | for f in $tm_file; do | |
12024 | echo " $srcdir/config/$f" | |
12025 | done | |
12026 | fi | |
12027 | ||
4977bab6 | 12028 | if test x$need_64bit_hwint = xyes; then |
ba479fd2 NN |
12029 | |
12030 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 12031 | #define NEED_64BIT_HOST_WIDE_INT 1 |
ba479fd2 | 12032 | _ACEOF |
4977bab6 ZW |
12033 | |
12034 | fi | |
12035 | ||
99fa8911 AP |
12036 | if test x$use_long_long_for_widest_fast_int = xyes; then |
12037 | ||
12038 | cat >>confdefs.h <<\_ACEOF | |
12039 | #define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1 | |
12040 | _ACEOF | |
12041 | ||
12042 | fi | |
12043 | ||
861bb6c1 JL |
12044 | count=a |
12045 | for f in $host_xm_file; do | |
12046 | count=${count}x | |
12047 | done | |
11642c3a ZW |
12048 | if test $count = a; then |
12049 | : | |
12050 | elif test $count = ax; then | |
861bb6c1 JL |
12051 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
12052 | else | |
12053 | echo "Using the following host machine macro files:" | |
12054 | for f in $host_xm_file; do | |
12055 | echo " $srcdir/config/$f" | |
12056 | done | |
12057 | fi | |
476d9098 | 12058 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 12059 | |
75bffa71 | 12060 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
12061 | count=a |
12062 | for f in $build_xm_file; do | |
12063 | count=${count}x | |
12064 | done | |
11642c3a ZW |
12065 | if test $count = a; then |
12066 | : | |
12067 | elif test $count = ax; then | |
861bb6c1 JL |
12068 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
12069 | else | |
12070 | echo "Using the following build machine macro files:" | |
12071 | for f in $build_xm_file; do | |
12072 | echo " $srcdir/config/$f" | |
12073 | done | |
12074 | fi | |
12075 | fi | |
12076 | ||
8bb915b6 NN |
12077 | # --------- |
12078 | # Threading | |
12079 | # --------- | |
12080 | ||
c2e494a8 | 12081 | # Check if a valid thread package |
615be2cf | 12082 | case ${enable_threads} in |
c2e494a8 NN |
12083 | "" | no) |
12084 | # No threads | |
12085 | target_thread_file='single' | |
12086 | ;; | |
12087 | yes) | |
12088 | # default | |
12089 | target_thread_file='single' | |
12090 | ;; | |
18167442 | 12091 | aix | dce | gnat | irix | posix | posix95 | rtems | \ |
769e49eb | 12092 | single | solaris | vxworks | win32 ) |
615be2cf | 12093 | target_thread_file=${enable_threads} |
c2e494a8 NN |
12094 | ;; |
12095 | *) | |
615be2cf | 12096 | echo "${enable_threads} is an unknown thread package" 1>&2 |
c2e494a8 NN |
12097 | exit 1 |
12098 | ;; | |
12099 | esac | |
12100 | ||
12101 | if test x${thread_file} = x; then | |
12102 | # No thread file set by target-specific clauses in config.gcc, | |
12103 | # so use file chosen by default logic above | |
12104 | thread_file=${target_thread_file} | |
861bb6c1 JL |
12105 | fi |
12106 | ||
8bb915b6 NN |
12107 | # Make gthr-default.h if we have a thread file. |
12108 | gthread_flags= | |
12109 | if test $thread_file != single; then | |
12110 | rm -f gthr-default.h | |
12111 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h | |
12112 | gthread_flags=-DHAVE_GTHR_DEFAULT | |
12113 | fi | |
12114 | ||
12115 | ||
12116 | # -------- | |
12117 | # UNSORTED | |
12118 | # -------- | |
12119 | ||
18fbf599 | 12120 | use_cxa_atexit=no |
2121a768 JT |
12121 | if test x$enable___cxa_atexit = xyes || \ |
12122 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
18fbf599 PB |
12123 | if test x$host = x$target; then |
12124 | echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 | |
354b7da5 DH |
12125 | echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6 |
12126 | if test "${ac_cv_func___cxa_atexit+set}" = set; then | |
12127 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12128 | else | |
12129 | cat >conftest.$ac_ext <<_ACEOF | |
354b7da5 DH |
12130 | /* confdefs.h. */ |
12131 | _ACEOF | |
12132 | cat confdefs.h >>conftest.$ac_ext | |
12133 | cat >>conftest.$ac_ext <<_ACEOF | |
12134 | /* end confdefs.h. */ | |
86da66b5 HPN |
12135 | /* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit. |
12136 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
12137 | #define __cxa_atexit innocuous___cxa_atexit | |
12138 | ||
354b7da5 DH |
12139 | /* System header to define __stub macros and hopefully few prototypes, |
12140 | which can conflict with char __cxa_atexit (); below. | |
12141 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
12142 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 12143 | |
354b7da5 DH |
12144 | #ifdef __STDC__ |
12145 | # include <limits.h> | |
12146 | #else | |
12147 | # include <assert.h> | |
12148 | #endif | |
86da66b5 HPN |
12149 | |
12150 | #undef __cxa_atexit | |
12151 | ||
354b7da5 DH |
12152 | /* Override any gcc2 internal prototype to avoid an error. */ |
12153 | #ifdef __cplusplus | |
12154 | extern "C" | |
12155 | { | |
12156 | #endif | |
12157 | /* We use char because int might match the return type of a gcc2 | |
12158 | builtin and then its argument prototype would still apply. */ | |
12159 | char __cxa_atexit (); | |
12160 | /* The GNU C library defines this for functions which it implements | |
12161 | to always fail with ENOSYS. Some functions are actually named | |
12162 | something starting with __ and the normal name is an alias. */ | |
12163 | #if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit) | |
12164 | choke me | |
12165 | #else | |
12166 | char (*f) () = __cxa_atexit; | |
12167 | #endif | |
12168 | #ifdef __cplusplus | |
12169 | } | |
12170 | #endif | |
12171 | ||
12172 | int | |
12173 | main () | |
12174 | { | |
12175 | return f != __cxa_atexit; | |
12176 | ; | |
12177 | return 0; | |
12178 | } | |
12179 | _ACEOF | |
12180 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12181 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12182 | (eval $ac_link) 2>conftest.er1 |
354b7da5 | 12183 | ac_status=$? |
86da66b5 HPN |
12184 | grep -v '^ *+' conftest.er1 >conftest.err |
12185 | rm -f conftest.er1 | |
12186 | cat conftest.err >&5 | |
354b7da5 DH |
12187 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12188 | (exit $ac_status); } && | |
e8b05380 | 12189 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
12190 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12191 | (eval $ac_try) 2>&5 | |
12192 | ac_status=$? | |
12193 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12194 | (exit $ac_status); }; } && | |
12195 | { ac_try='test -s conftest$ac_exeext' | |
354b7da5 DH |
12196 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12197 | (eval $ac_try) 2>&5 | |
12198 | ac_status=$? | |
12199 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12200 | (exit $ac_status); }; }; then | |
12201 | ac_cv_func___cxa_atexit=yes | |
12202 | else | |
12203 | echo "$as_me: failed program was:" >&5 | |
12204 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12205 | ||
12206 | ac_cv_func___cxa_atexit=no | |
12207 | fi | |
86da66b5 HPN |
12208 | rm -f conftest.err conftest.$ac_objext \ |
12209 | conftest$ac_exeext conftest.$ac_ext | |
354b7da5 DH |
12210 | fi |
12211 | echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5 | |
12212 | echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6 | |
12213 | if test $ac_cv_func___cxa_atexit = yes; then | |
18fbf599 PB |
12214 | use_cxa_atexit=yes |
12215 | else | |
12216 | echo "__cxa_atexit can't be enabled on this target" | |
12217 | fi | |
12218 | ||
12219 | else | |
12220 | # We can't check for __cxa_atexit when building a cross, so assume | |
12221 | # it is available | |
12222 | use_cxa_atexit=yes | |
12223 | fi | |
12224 | if test x$use_cxa_atexit = xyes; then | |
ba479fd2 NN |
12225 | |
12226 | cat >>confdefs.h <<\_ACEOF | |
2121a768 | 12227 | #define DEFAULT_USE_CXA_ATEXIT 1 |
ba479fd2 | 12228 | _ACEOF |
2121a768 | 12229 | |
18fbf599 | 12230 | fi |
2121a768 JT |
12231 | fi |
12232 | ||
a5381466 | 12233 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
12234 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
12235 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
ba479fd2 NN |
12236 | |
12237 | ||
12238 | cat >>confdefs.h <<_ACEOF | |
e22340b0 | 12239 | #define EXTRA_MODES_FILE "config/$extra_modes" |
ba479fd2 | 12240 | _ACEOF |
a5381466 ZW |
12241 | |
12242 | fi | |
12243 | ||
75685792 RS |
12244 | # Convert extra_options into a form suitable for Makefile use. |
12245 | extra_opt_files= | |
12246 | for f in $extra_options; do | |
12247 | extra_opt_files="$extra_opt_files \$(srcdir)/config/$f" | |
12248 | done | |
12249 | ||
12250 | ||
b7cb92ad | 12251 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 12252 | # the first file included by config.h. |
4977bab6 | 12253 | # If host=build, it is correct to have bconfig include auto-host.h |
ba479fd2 | 12254 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 12255 | # work to find out the build config parameters. |
75bffa71 | 12256 | if test x$host = x$build |
db81d74a | 12257 | then |
eaf4e618 | 12258 | build_auto=auto-host.h |
b7cb92ad JL |
12259 | else |
12260 | # We create a subdir, then run autoconf in the subdir. | |
12261 | # To prevent recursion we set host and build for the new | |
12262 | # invocation of configure to the build for this invocation | |
ba479fd2 | 12263 | # of configure. |
b7cb92ad JL |
12264 | tempdir=build.$$ |
12265 | rm -rf $tempdir | |
12266 | mkdir $tempdir | |
12267 | cd $tempdir | |
12268 | case ${srcdir} in | |
255b8a49 | 12269 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
12270 | *) realsrcdir=../${srcdir};; |
12271 | esac | |
d920e825 L |
12272 | saved_CFLAGS="${CFLAGS}" |
12273 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
12274 | ${realsrcdir}/configure \ | |
33e70558 | 12275 | --enable-languages=${enable_languages-all} \ |
534d0cc0 | 12276 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 12277 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
12278 | |
12279 | # We just finished tests for the build machine, so rename | |
12280 | # the file auto-build.h in the gcc directory. | |
12281 | mv auto-host.h ../auto-build.h | |
12282 | cd .. | |
12283 | rm -rf $tempdir | |
eaf4e618 | 12284 | build_auto=auto-build.h |
db81d74a RH |
12285 | fi |
12286 | ||
06f0b04c | 12287 | |
eaf4e618 | 12288 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
12289 | tm_p_file="${tm_p_file} tm-preds.h" |
12290 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
12291 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 12292 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 | 12293 | # put this back in temporarily. |
232b67d9 | 12294 | xm_file="auto-host.h ansidecl.h ${xm_file}" |
0056a9b5 | 12295 | |
34a86c2b NN |
12296 | # -------- |
12297 | # UNSORTED | |
12298 | # -------- | |
12299 | ||
cc1e60ea | 12300 | # Compile in configure arguments. |
8105825d | 12301 | if test -f configargs.h ; then |
cc1e60ea | 12302 | # Being re-configured. |
022dae81 | 12303 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
12304 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
12305 | else | |
12306 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
12307 | fi | |
eeae7b41 DJ |
12308 | |
12309 | # Double all backslashes and backslash all quotes to turn | |
12310 | # gcc_config_arguments into a C string. | |
12311 | sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out | |
12312 | $gcc_config_arguments | |
12313 | EOF | |
12314 | gcc_config_arguments_str=`cat conftest.out` | |
12315 | rm -f conftest.out | |
12316 | ||
cc1e60ea JM |
12317 | cat > configargs.h <<EOF |
12318 | /* Generated automatically. */ | |
eeae7b41 | 12319 | static const char configuration_arguments[] = "$gcc_config_arguments_str"; |
a6687d2b | 12320 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
12321 | |
12322 | static const struct { | |
12323 | const char *name, *value; | |
12324 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
12325 | EOF |
12326 | ||
ab87f8c8 | 12327 | # Internationalization |
56694dd9 ZW |
12328 | # If we haven't got the data from the intl directory, |
12329 | # assume NLS is disabled. | |
ba479fd2 NN |
12330 | USE_NLS=no |
12331 | LIBINTL= | |
12332 | LIBINTL_DEP= | |
12333 | INCINTL= | |
12334 | XGETTEXT= | |
12335 | GMSGFMT= | |
12336 | POSUB= | |
56694dd9 ZW |
12337 | if test -f ../intl/config.intl; then |
12338 | . ../intl/config.intl | |
093e61a6 | 12339 | fi |
ba479fd2 NN |
12340 | echo "$as_me:$LINENO: checking whether NLS is requested" >&5 |
12341 | echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 | |
56694dd9 | 12342 | if test x"$USE_NLS" != xyes; then |
ba479fd2 NN |
12343 | echo "$as_me:$LINENO: result: no" >&5 |
12344 | echo "${ECHO_T}no" >&6 | |
56694dd9 | 12345 | else |
ba479fd2 NN |
12346 | echo "$as_me:$LINENO: result: yes" >&5 |
12347 | echo "${ECHO_T}yes" >&6 | |
12348 | ||
12349 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 12350 | #define ENABLE_NLS 1 |
ba479fd2 | 12351 | _ACEOF |
56694dd9 | 12352 | |
093e61a6 | 12353 | |
ba479fd2 NN |
12354 | echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 |
12355 | echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 | |
56694dd9 | 12356 | # Look for .po and .gmo files in the source directory. |
ba479fd2 | 12357 | CATALOGS= |
56694dd9 ZW |
12358 | XLINGUAS= |
12359 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
12360 | # If there aren't any .gmo files the shell will give us the | |
12361 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
12362 | # weeded out. | |
12363 | case "$cat" in *\**) | |
12364 | continue;; | |
12365 | esac | |
12366 | # The quadruple backslash is collapsed to a double backslash | |
12367 | # by the backticks, then collapsed again by the double quotes, | |
12368 | # leaving us with one backslash in the sed expression (right | |
12369 | # before the dot that mustn't act as a wildcard). | |
12370 | cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"` | |
12371 | lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"` | |
12372 | # The user is allowed to set LINGUAS to a list of languages to | |
12373 | # install catalogs for. If it's empty that means "all of them." | |
12374 | if test "x$LINGUAS" = x; then | |
12375 | CATALOGS="$CATALOGS $cat" | |
12376 | XLINGUAS="$XLINGUAS $lang" | |
12377 | else | |
12378 | case "$LINGUAS" in *$lang*) | |
12379 | CATALOGS="$CATALOGS $cat" | |
12380 | XLINGUAS="$XLINGUAS $lang" | |
12381 | ;; | |
12382 | esac | |
12383 | fi | |
12384 | done | |
12385 | LINGUAS="$XLINGUAS" | |
ba479fd2 NN |
12386 | echo "$as_me:$LINENO: result: $LINGUAS" >&5 |
12387 | echo "${ECHO_T}$LINGUAS" >&6 | |
56694dd9 | 12388 | fi |
861bb6c1 | 12389 | |
56694dd9 ZW |
12390 | # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get |
12391 | # -liconv on the link line twice. | |
12392 | case "$LIBINTL" in *$LIBICONV*) | |
12393 | LIBICONV= ;; | |
12394 | esac | |
dc6746e7 | 12395 | |
7f970b70 AM |
12396 | # Check whether --enable-secureplt or --disable-secureplt was given. |
12397 | if test "${enable_secureplt+set}" = set; then | |
12398 | enableval="$enable_secureplt" | |
12399 | ||
12400 | fi; | |
12401 | ||
56694dd9 ZW |
12402 | # Windows32 Registry support for specifying GCC installation paths. |
12403 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
12404 | if test "${enable_win32_registry+set}" = set; then | |
12405 | enableval="$enable_win32_registry" | |
dc6746e7 | 12406 | |
ba479fd2 | 12407 | fi; |
ba479fd2 | 12408 | |
a1286ef5 ZW |
12409 | case $host_os in |
12410 | win32 | pe | cygwin* | mingw32* | uwin*) | |
12411 | if test "x$enable_win32_registry" != xno; then | |
12412 | echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5 | |
ba479fd2 NN |
12413 | echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6 |
12414 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then | |
12415 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12416 | else | |
12417 | ac_func_search_save_LIBS=$LIBS | |
12418 | ac_cv_search_RegOpenKeyExA=no | |
12419 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12420 | /* confdefs.h. */ |
12421 | _ACEOF | |
12422 | cat confdefs.h >>conftest.$ac_ext | |
12423 | cat >>conftest.$ac_ext <<_ACEOF | |
12424 | /* end confdefs.h. */ | |
861bb6c1 | 12425 | |
ab87f8c8 | 12426 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
12427 | #ifdef __cplusplus |
12428 | extern "C" | |
12429 | #endif | |
ab87f8c8 | 12430 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
12431 | builtin and then its argument prototype would still apply. */ |
12432 | char RegOpenKeyExA (); | |
12433 | int | |
12434 | main () | |
12435 | { | |
12436 | RegOpenKeyExA (); | |
12437 | ; | |
12438 | return 0; | |
12439 | } | |
12440 | _ACEOF | |
12441 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12442 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12443 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 12444 | ac_status=$? |
86da66b5 HPN |
12445 | grep -v '^ *+' conftest.er1 >conftest.err |
12446 | rm -f conftest.er1 | |
12447 | cat conftest.err >&5 | |
ba479fd2 NN |
12448 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12449 | (exit $ac_status); } && | |
e8b05380 | 12450 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
12451 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12452 | (eval $ac_try) 2>&5 | |
12453 | ac_status=$? | |
12454 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12455 | (exit $ac_status); }; } && | |
12456 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
12457 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12458 | (eval $ac_try) 2>&5 | |
12459 | ac_status=$? | |
12460 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12461 | (exit $ac_status); }; }; then | |
56694dd9 | 12462 | ac_cv_search_RegOpenKeyExA="none required" |
ab87f8c8 | 12463 | else |
ba479fd2 NN |
12464 | echo "$as_me: failed program was:" >&5 |
12465 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12466 | ||
861bb6c1 | 12467 | fi |
86da66b5 HPN |
12468 | rm -f conftest.err conftest.$ac_objext \ |
12469 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
12470 | if test "$ac_cv_search_RegOpenKeyExA" = no; then |
12471 | for ac_lib in advapi32; do | |
12472 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12473 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12474 | /* confdefs.h. */ |
12475 | _ACEOF | |
12476 | cat confdefs.h >>conftest.$ac_ext | |
12477 | cat >>conftest.$ac_ext <<_ACEOF | |
12478 | /* end confdefs.h. */ | |
12479 | ||
56694dd9 | 12480 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
12481 | #ifdef __cplusplus |
12482 | extern "C" | |
12483 | #endif | |
56694dd9 | 12484 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
12485 | builtin and then its argument prototype would still apply. */ |
12486 | char RegOpenKeyExA (); | |
12487 | int | |
12488 | main () | |
12489 | { | |
12490 | RegOpenKeyExA (); | |
12491 | ; | |
12492 | return 0; | |
12493 | } | |
12494 | _ACEOF | |
12495 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12496 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12497 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 12498 | ac_status=$? |
86da66b5 HPN |
12499 | grep -v '^ *+' conftest.er1 >conftest.err |
12500 | rm -f conftest.er1 | |
12501 | cat conftest.err >&5 | |
ba479fd2 NN |
12502 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12503 | (exit $ac_status); } && | |
e8b05380 | 12504 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
12505 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12506 | (eval $ac_try) 2>&5 | |
12507 | ac_status=$? | |
12508 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12509 | (exit $ac_status); }; } && | |
12510 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
12511 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12512 | (eval $ac_try) 2>&5 | |
12513 | ac_status=$? | |
12514 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12515 | (exit $ac_status); }; }; then | |
12516 | ac_cv_search_RegOpenKeyExA="-l$ac_lib" | |
56694dd9 | 12517 | break |
861bb6c1 | 12518 | else |
ba479fd2 NN |
12519 | echo "$as_me: failed program was:" >&5 |
12520 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12521 | ||
861bb6c1 | 12522 | fi |
86da66b5 HPN |
12523 | rm -f conftest.err conftest.$ac_objext \ |
12524 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 12525 | done |
6e3f3080 | 12526 | fi |
ba479fd2 NN |
12527 | LIBS=$ac_func_search_save_LIBS |
12528 | fi | |
12529 | echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5 | |
12530 | echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6 | |
12531 | if test "$ac_cv_search_RegOpenKeyExA" != no; then | |
63cf211a | 12532 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" |
ba479fd2 | 12533 | |
cafe096b | 12534 | else |
a1286ef5 | 12535 | enable_win32_registry=no |
093e61a6 | 12536 | fi |
ab87f8c8 | 12537 | |
a1286ef5 ZW |
12538 | fi |
12539 | ||
12540 | if test "x$enable_win32_registry" != xno; then | |
12541 | ||
12542 | cat >>confdefs.h <<\_ACEOF | |
12543 | #define ENABLE_WIN32_REGISTRY 1 | |
12544 | _ACEOF | |
ab87f8c8 | 12545 | |
a1286ef5 ZW |
12546 | |
12547 | if test "x$enable_win32_registry" != xyes \ | |
12548 | && test "x$enable_win32_registry" != x; then | |
ba479fd2 NN |
12549 | |
12550 | cat >>confdefs.h <<_ACEOF | |
a1286ef5 | 12551 | #define WIN32_REGISTRY_KEY "$enable_win32_registry" |
ba479fd2 | 12552 | _ACEOF |
cafe096b | 12553 | |
a1286ef5 ZW |
12554 | fi |
12555 | fi | |
12556 | ;; | |
56694dd9 | 12557 | esac |
ab87f8c8 | 12558 | |
56694dd9 ZW |
12559 | # Get an absolute path to the GCC top-level source directory |
12560 | holddir=`${PWDCMD-pwd}` | |
12561 | cd $srcdir | |
12562 | topdir=`${PWDCMD-pwd}` | |
12563 | cd $holddir | |
ab87f8c8 | 12564 | |
56694dd9 | 12565 | # Conditionalize the makefile for this host machine. |
2ed26f6b | 12566 | xmake_file= |
c406e779 | 12567 | for f in ${host_xmake_file} |
56694dd9 ZW |
12568 | do |
12569 | if test -f ${srcdir}/config/$f | |
12570 | then | |
2ed26f6b | 12571 | xmake_file="${xmake_file} \$(srcdir)/config/$f" |
56694dd9 ZW |
12572 | fi |
12573 | done | |
093e61a6 | 12574 | |
56694dd9 | 12575 | # Conditionalize the makefile for this target machine. |
2ed26f6b | 12576 | tmake_file_= |
c406e779 | 12577 | for f in ${tmake_file} |
56694dd9 ZW |
12578 | do |
12579 | if test -f ${srcdir}/config/$f | |
12580 | then | |
2ed26f6b | 12581 | tmake_file_="${tmake_file_} \$(srcdir)/config/$f" |
56694dd9 ZW |
12582 | fi |
12583 | done | |
2ed26f6b | 12584 | tmake_file="${tmake_file_}" |
71a94577 | 12585 | |
ab87f8c8 JL |
12586 | # If the host doesn't support symlinks, modify CC in |
12587 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
12588 | # Otherwise, we can use "CC=$(CC)". | |
12589 | rm -f symtest.tem | |
35f06ae4 PB |
12590 | case "$LN_S" in |
12591 | *-s*) | |
12592 | cc_set_by_configure="\$(CC)" | |
12593 | quoted_cc_set_by_configure="\$(CC)" | |
12594 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" | |
12595 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" | |
12596 | ;; | |
12597 | *) | |
12598 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
12599 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" | |
12600 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" | |
12601 | quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`" | |
12602 | ;; | |
12603 | esac | |
ab87f8c8 | 12604 | |
5395b47b NN |
12605 | # This is a terrible hack which will go away some day. |
12606 | host_cc_for_libada=${CC} | |
1e3fad21 NN |
12607 | |
12608 | ||
ab87f8c8 JL |
12609 | out_object_file=`basename $out_file .c`.o |
12610 | ||
75685792 RS |
12611 | tm_file_list="options.h" |
12612 | tm_include_list="options.h" | |
ab87f8c8 | 12613 | for f in $tm_file; do |
64ccbc99 | 12614 | case $f in |
d02af173 | 12615 | defaults.h ) |
e22340b0 ZW |
12616 | tm_file_list="${tm_file_list} \$(srcdir)/$f" |
12617 | tm_include_list="${tm_include_list} $f" | |
12618 | ;; | |
12619 | * ) | |
12620 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | |
12621 | tm_include_list="${tm_include_list} config/$f" | |
12622 | ;; | |
64ccbc99 | 12623 | esac |
ab87f8c8 JL |
12624 | done |
12625 | ||
11642c3a | 12626 | tm_p_file_list= |
e22340b0 | 12627 | tm_p_include_list= |
11642c3a | 12628 | for f in $tm_p_file; do |
4977bab6 ZW |
12629 | case $f in |
12630 | tm-preds.h ) | |
e22340b0 ZW |
12631 | tm_p_file_list="${tm_p_file_list} $f" |
12632 | tm_p_include_list="${tm_p_include_list} $f" | |
12633 | ;; | |
12634 | * ) | |
12635 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
12636 | tm_p_include_list="${tm_p_include_list} config/$f" | |
12637 | esac | |
12638 | done | |
12639 | ||
12640 | xm_file_list= | |
12641 | xm_include_list= | |
12642 | for f in $xm_file; do | |
12643 | case $f in | |
12644 | ansidecl.h ) | |
12645 | xm_file_list="${xm_file_list} \$(srcdir)/../include/$f" | |
12646 | xm_include_list="${xm_include_list} $f" | |
12647 | ;; | |
12648 | auto-host.h ) | |
12649 | xm_file_list="${xm_file_list} $f" | |
12650 | xm_include_list="${xm_include_list} $f" | |
12651 | ;; | |
12652 | * ) | |
12653 | xm_file_list="${xm_file_list} \$(srcdir)/config/$f" | |
12654 | xm_include_list="${xm_include_list} config/$f" | |
12655 | ;; | |
4977bab6 | 12656 | esac |
11642c3a ZW |
12657 | done |
12658 | ||
ab87f8c8 | 12659 | host_xm_file_list= |
e22340b0 | 12660 | host_xm_include_list= |
ab87f8c8 | 12661 | for f in $host_xm_file; do |
64ccbc99 | 12662 | case $f in |
d02af173 | 12663 | ansidecl.h ) |
e22340b0 ZW |
12664 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f" |
12665 | host_xm_include_list="${host_xm_include_list} $f" | |
12666 | ;; | |
e2500fed | 12667 | auto-host.h ) |
e22340b0 ZW |
12668 | host_xm_file_list="${host_xm_file_list} $f" |
12669 | host_xm_include_list="${host_xm_include_list} $f" | |
12670 | ;; | |
12671 | * ) | |
12672 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" | |
12673 | host_xm_include_list="${host_xm_include_list} config/$f" | |
12674 | ;; | |
64ccbc99 | 12675 | esac |
ab87f8c8 JL |
12676 | done |
12677 | ||
12678 | build_xm_file_list= | |
12679 | for f in $build_xm_file; do | |
64ccbc99 | 12680 | case $f in |
d02af173 | 12681 | ansidecl.h ) |
e22340b0 ZW |
12682 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f" |
12683 | build_xm_include_list="${build_xm_include_list} $f" | |
12684 | ;; | |
e2500fed | 12685 | auto-build.h | auto-host.h ) |
e22340b0 ZW |
12686 | build_xm_file_list="${build_xm_file_list} $f" |
12687 | build_xm_include_list="${build_xm_include_list} $f" | |
12688 | ;; | |
12689 | * ) | |
12690 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" | |
12691 | build_xm_include_list="${build_xm_include_list} config/$f" | |
12692 | ;; | |
64ccbc99 | 12693 | esac |
ab87f8c8 JL |
12694 | done |
12695 | ||
a078a589 ZW |
12696 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
12697 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
ba479fd2 NN |
12698 | CROSS= |
12699 | ALL=all.internal | |
12700 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
b28250ab MM |
12701 | |
12702 | if test "x$with_build_sysroot" != x; then | |
12703 | build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)' | |
12704 | else | |
12705 | # This value is used, even on a native system, because | |
12706 | # CROSS_SYSTEM_HEADER_DIR is just | |
12707 | # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR). | |
12708 | build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)' | |
12709 | fi | |
12710 | ||
ab87f8c8 JL |
12711 | if test x$host != x$target |
12712 | then | |
a078a589 ZW |
12713 | CROSS="-DCROSS_COMPILE" |
12714 | ALL=all.cross | |
160633c6 | 12715 | SYSTEM_HEADER_DIR=$build_system_header_dir |
343f59d9 | 12716 | case "$host","$target" in |
3a7e8b87 GK |
12717 | # Darwin crosses can use the host system's libraries and headers, |
12718 | # because of the fat library support. Of course, it must be the | |
12719 | # same version of Darwin on both sides. Allow the user to | |
12720 | # just say --target=foo-darwin without a version number to mean | |
12721 | # "the version on this system". | |
12722 | *-*-darwin*,*-*-darwin*) | |
12723 | hostos=`echo $host | sed 's/.*-darwin/darwin/'` | |
12724 | targetos=`echo $target | sed 's/.*-darwin/darwin/'` | |
12725 | if test $hostos = $targetos -o $targetos = darwin ; then | |
12726 | CROSS= | |
12727 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
12728 | with_headers=yes | |
12729 | fi | |
12730 | ;; | |
12731 | ||
343f59d9 AM |
12732 | i?86-*-*,x86_64-*-* \ |
12733 | | powerpc*-*-*,powerpc64*-*-*) | |
12734 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
12735 | esac | |
7a615b25 | 12736 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
b28250ab | 12737 | SYSTEM_HEADER_DIR=$build_system_header_dir |
ab87f8c8 JL |
12738 | fi |
12739 | ||
b39d221a EC |
12740 | # If this is a cross-compiler that does not |
12741 | # have its own set of headers then define | |
12742 | # inhibit_libc | |
12743 | ||
dc06db20 R |
12744 | # If this is using newlib, without having the headers available now, |
12745 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
12746 | # This prevents libgcc2 from containing any code which requires libc |
12747 | # support. | |
160633c6 | 12748 | inhibit_libc=false |
dc06db20 R |
12749 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
12750 | test x$with_newlib = xyes ; } && | |
e50084fa | 12751 | { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then |
160633c6 | 12752 | inhibit_libc=true |
b39d221a EC |
12753 | fi |
12754 | ||
12755 | ||
a078a589 ZW |
12756 | # When building gcc with a cross-compiler, we need to adjust things so |
12757 | # that the generator programs are still built with the native compiler. | |
12758 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
12759 | |
12760 | # These are the normal (build=host) settings: | |
ba479fd2 NN |
12761 | CC_FOR_BUILD='$(CC)' |
12762 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
ba479fd2 | 12763 | STMP_FIXINC=stmp-fixinc |
8ad9fb33 AP |
12764 | |
12765 | # Possibly disable fixproto, on a per-target basis. | |
12766 | case ${use_fixproto} in | |
12767 | no) | |
12768 | STMP_FIXPROTO= | |
12769 | ;; | |
12770 | yes) | |
12771 | STMP_FIXPROTO=stmp-fixproto | |
12772 | ;; | |
12773 | esac | |
12774 | ||
a078a589 | 12775 | |
83599948 NS |
12776 | # And these apply if build != host, or we are generating coverage data |
12777 | if test x$build != x$host || test "x$coverage_flags" != x | |
ab87f8c8 | 12778 | then |
b11e4747 | 12779 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' |
a078a589 | 12780 | |
7a615b25 | 12781 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
d8e5117d | 12782 | if test "x$STMP_FIXPROTO" != x; then |
de253ca4 GK |
12783 | STMP_FIXPROTO=stmp-install-fixproto |
12784 | fi | |
7a615b25 | 12785 | fi |
ab87f8c8 JL |
12786 | fi |
12787 | ||
12788 | # Expand extra_headers to include complete path. | |
12789 | # This substitutes for lots of t-* files. | |
12790 | extra_headers_list= | |
b1ef58c8 NN |
12791 | # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers. |
12792 | for file in ${extra_headers} ; do | |
12793 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" | |
12794 | done | |
ab87f8c8 | 12795 | |
c38f02df ILT |
12796 | # Define collect2 in Makefile. |
12797 | case $host_can_use_collect2 in | |
12798 | no) collect2= ;; | |
12799 | *) collect2='collect2$(exeext)' ;; | |
12800 | esac | |
12801 | ||
12802 | ||
ab87f8c8 | 12803 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
12804 | case $use_collect2 in |
12805 | no) use_collect2= ;; | |
12806 | "") ;; | |
ba479fd2 | 12807 | *) |
34a86c2b NN |
12808 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
12809 | xm_defines="${xm_defines} USE_COLLECT2" | |
c38f02df ILT |
12810 | case $host_can_use_collect2 in |
12811 | no) | |
12812 | { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5 | |
12813 | echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;} | |
12814 | { (exit 1); exit 1; }; } | |
12815 | ;; | |
12816 | esac | |
34a86c2b NN |
12817 | ;; |
12818 | esac | |
ab87f8c8 | 12819 | |
8bb915b6 NN |
12820 | # --------------------------- |
12821 | # Assembler & linker features | |
12822 | # --------------------------- | |
12823 | ||
d869a8c4 NN |
12824 | # Identify the assembler which will work hand-in-glove with the newly |
12825 | # built GCC, so that we can examine its features. This is the assembler | |
12826 | # which will be driven by the driver program. | |
12827 | # | |
12828 | # If build != host, and we aren't building gas in-tree, we identify a | |
12829 | # build->target assembler and hope that it will have the same features | |
12830 | # as the host->target assembler we'll be using. | |
981d4858 JM |
12831 | gcc_cv_gas_major_version= |
12832 | gcc_cv_gas_minor_version= | |
ab87f8c8 | 12833 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
e8b05380 PB |
12834 | |
12835 | if test "${gcc_cv_as+set}" = set; then | |
12836 | : | |
12837 | else | |
12838 | ||
ab87f8c8 JL |
12839 | if test -x "$DEFAULT_ASSEMBLER"; then |
12840 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
34a86c2b | 12841 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
08d105fa AO |
12842 | && test -f ../gas/Makefile \ |
12843 | && test x$build = x$host; then | |
e8b05380 PB |
12844 | gcc_cv_as=../gas/as-new$build_exeext |
12845 | elif test -x as$build_exeext; then | |
12846 | # Build using assembler in the current directory. | |
12847 | gcc_cv_as=./as$build_exeext | |
12848 | elif test -x $AS_FOR_TARGET; then | |
12849 | gcc_cv_as="$AS_FOR_TARGET" | |
12850 | else | |
12851 | # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args. | |
12852 | set dummy $AS_FOR_TARGET; ac_word=$2 | |
12853 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
12854 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
12855 | if test "${ac_cv_path_gcc_cv_as+set}" = set; then | |
12856 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12857 | else | |
12858 | case $gcc_cv_as in | |
12859 | [\\/]* | ?:[\\/]*) | |
12860 | ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. | |
12861 | ;; | |
12862 | *) | |
12863 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12864 | for as_dir in $PATH | |
12865 | do | |
12866 | IFS=$as_save_IFS | |
12867 | test -z "$as_dir" && as_dir=. | |
12868 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12869 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
12870 | ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" | |
12871 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12872 | break 2 | |
12873 | fi | |
12874 | done | |
12875 | done | |
12876 | ||
12877 | ;; | |
12878 | esac | |
12879 | fi | |
12880 | gcc_cv_as=$ac_cv_path_gcc_cv_as | |
12881 | ||
12882 | if test -n "$gcc_cv_as"; then | |
12883 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 | |
12884 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
12885 | else | |
12886 | echo "$as_me:$LINENO: result: no" >&5 | |
12887 | echo "${ECHO_T}no" >&6 | |
12888 | fi | |
12889 | ||
12890 | fi | |
12891 | fi | |
12892 | ||
12893 | ||
12894 | ORIGINAL_AS_FOR_TARGET=$gcc_cv_as | |
12895 | ||
12896 | ||
12897 | echo "$as_me:$LINENO: checking what assembler to use" >&5 | |
12898 | echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 | |
12899 | if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then | |
08d105fa AO |
12900 | # Single tree build which includes gas. We want to prefer it |
12901 | # over whatever linker top-level may have detected, since | |
12902 | # we'll use what we're building after installation anyway. | |
e8b05380 PB |
12903 | echo "$as_me:$LINENO: result: newly built gas" >&5 |
12904 | echo "${ECHO_T}newly built gas" >&6 | |
ad9c4d9f NN |
12905 | in_tree_gas=yes |
12906 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
12907 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
12908 | $gcc_cv_as_gas_srcdir/configure \ | |
12909 | $gcc_cv_as_gas_srcdir/configure.in \ | |
12910 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
58ea87a9 | 12911 | gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` |
ad9c4d9f NN |
12912 | if test x$gcc_cv_gas_version != x; then |
12913 | break | |
12914 | fi | |
12915 | done | |
12916 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
12917 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
12918 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
5aaaf0e8 NN |
12919 | case $gcc_cv_gas_patch_version in |
12920 | "") gcc_cv_gas_patch_version="0" ;; | |
12921 | esac | |
8ada417f ZW |
12922 | gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ |
12923 | + $gcc_cv_gas_minor_version \) \* 1000 \ | |
12924 | + $gcc_cv_gas_patch_version` | |
ad9c4d9f | 12925 | |
5408ac6c HPN |
12926 | in_tree_gas_is_elf=no |
12927 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
12928 | || (grep 'obj_format = multi' ../gas/Makefile \ | |
12929 | && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null | |
12930 | then | |
12931 | in_tree_gas_is_elf=yes | |
12932 | fi | |
e8b05380 PB |
12933 | else |
12934 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 | |
12935 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
12936 | in_tree_gas=no | |
981d4858 | 12937 | fi |
9e423e6d | 12938 | |
e8b05380 PB |
12939 | # Identify the linker which will work hand-in-glove with the newly |
12940 | # built GCC, so that we can examine its features. This is the linker | |
12941 | # which will be driven by the driver program. | |
9f18db39 | 12942 | # |
e8b05380 PB |
12943 | # If build != host, and we aren't building gas in-tree, we identify a |
12944 | # build->target linker and hope that it will have the same features | |
12945 | # as the host->target linker we'll be using. | |
12946 | gcc_cv_gld_major_version= | |
12947 | gcc_cv_gld_minor_version= | |
12948 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
12949 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
9f18db39 | 12950 | |
e8b05380 PB |
12951 | if test "${gcc_cv_ld+set}" = set; then |
12952 | : | |
9f18db39 | 12953 | else |
9f18db39 | 12954 | |
e8b05380 PB |
12955 | if test -x "$DEFAULT_LINKER"; then |
12956 | gcc_cv_ld="$DEFAULT_LINKER" | |
12957 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ | |
12958 | && test -f ../ld/Makefile \ | |
12959 | && test x$build = x$host; then | |
12960 | gcc_cv_ld=../ld/ld-new$build_exeext | |
12961 | elif test -x collect-ld$build_exeext; then | |
12962 | # Build using linker in the current directory. | |
12963 | gcc_cv_ld=./collect-ld$build_exeext | |
12964 | elif test -x $LD_FOR_TARGET; then | |
12965 | gcc_cv_ld="$LD_FOR_TARGET" | |
12966 | else | |
12967 | # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args. | |
12968 | set dummy $LD_FOR_TARGET; ac_word=$2 | |
d739199a DJ |
12969 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
12970 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
e8b05380 | 12971 | if test "${ac_cv_path_gcc_cv_ld+set}" = set; then |
d739199a DJ |
12972 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
12973 | else | |
e8b05380 | 12974 | case $gcc_cv_ld in |
d739199a | 12975 | [\\/]* | ?:[\\/]*) |
e8b05380 | 12976 | ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. |
d739199a DJ |
12977 | ;; |
12978 | *) | |
12979 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12980 | for as_dir in $PATH | |
12981 | do | |
12982 | IFS=$as_save_IFS | |
12983 | test -z "$as_dir" && as_dir=. | |
12984 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12985 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
e8b05380 | 12986 | ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" |
d739199a DJ |
12987 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
12988 | break 2 | |
12989 | fi | |
12990 | done | |
12991 | done | |
12992 | ||
12993 | ;; | |
12994 | esac | |
12995 | fi | |
e8b05380 | 12996 | gcc_cv_ld=$ac_cv_path_gcc_cv_ld |
d739199a | 12997 | |
e8b05380 PB |
12998 | if test -n "$gcc_cv_ld"; then |
12999 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 | |
13000 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
d739199a DJ |
13001 | else |
13002 | echo "$as_me:$LINENO: result: no" >&5 | |
13003 | echo "${ECHO_T}no" >&6 | |
13004 | fi | |
13005 | ||
13006 | fi | |
e8b05380 PB |
13007 | fi |
13008 | ||
13009 | ||
13010 | ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld | |
13011 | ||
13012 | ||
13013 | echo "$as_me:$LINENO: checking what linker to use" >&5 | |
13014 | echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 | |
13015 | if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then | |
13016 | # Single tree build which includes ld. We want to prefer it | |
13017 | # over whatever linker top-level may have detected, since | |
13018 | # we'll use what we're building after installation anyway. | |
13019 | echo "$as_me:$LINENO: result: newly built ld" >&5 | |
13020 | echo "${ECHO_T}newly built ld" >&6 | |
13021 | in_tree_ld=yes | |
13022 | in_tree_ld_is_elf=no | |
13023 | if (grep 'EMUL = .*elf' ../ld/Makefile \ | |
13024 | || grep 'EMUL = .*linux' ../ld/Makefile \ | |
13025 | || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then | |
13026 | in_tree_ld_is_elf=yes | |
13027 | fi | |
13028 | 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 | |
13029 | do | |
13030 | gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` | |
13031 | if test x$gcc_cv_gld_version != x; then | |
13032 | break | |
13033 | fi | |
13034 | done | |
13035 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
13036 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
13037 | else | |
13038 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 | |
13039 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
13040 | in_tree_ld=no | |
13041 | fi | |
13042 | ||
13043 | # Figure out what nm we will be using. | |
13044 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils | |
13045 | if test "${gcc_cv_nm+set}" = set; then | |
13046 | : | |
13047 | else | |
13048 | ||
13049 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
13050 | && test -f ../binutils/Makefile; then | |
13051 | gcc_cv_nm=../binutils/nm-new$build_exeext | |
13052 | elif test -x nm$build_exeext; then | |
13053 | gcc_cv_nm=./nm$build_exeext | |
13054 | elif test -x $NM_FOR_TARGET; then | |
13055 | gcc_cv_nm="$NM_FOR_TARGET" | |
13056 | else | |
13057 | # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args. | |
13058 | set dummy $NM_FOR_TARGET; ac_word=$2 | |
d739199a DJ |
13059 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13060 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
e8b05380 | 13061 | if test "${ac_cv_path_gcc_cv_nm+set}" = set; then |
d739199a DJ |
13062 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
13063 | else | |
e8b05380 | 13064 | case $gcc_cv_nm in |
d739199a | 13065 | [\\/]* | ?:[\\/]*) |
e8b05380 | 13066 | ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. |
d739199a DJ |
13067 | ;; |
13068 | *) | |
13069 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13070 | for as_dir in $PATH | |
13071 | do | |
13072 | IFS=$as_save_IFS | |
13073 | test -z "$as_dir" && as_dir=. | |
13074 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13075 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
e8b05380 | 13076 | ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" |
d739199a DJ |
13077 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
13078 | break 2 | |
13079 | fi | |
13080 | done | |
13081 | done | |
13082 | ||
13083 | ;; | |
13084 | esac | |
13085 | fi | |
e8b05380 | 13086 | gcc_cv_nm=$ac_cv_path_gcc_cv_nm |
d739199a | 13087 | |
e8b05380 PB |
13088 | if test -n "$gcc_cv_nm"; then |
13089 | echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13090 | echo "${ECHO_T}$gcc_cv_nm" >&6 | |
d739199a DJ |
13091 | else |
13092 | echo "$as_me:$LINENO: result: no" >&5 | |
13093 | echo "${ECHO_T}no" >&6 | |
13094 | fi | |
13095 | ||
13096 | fi | |
e8b05380 | 13097 | fi |
d739199a | 13098 | |
e8b05380 PB |
13099 | |
13100 | echo "$as_me:$LINENO: checking what nm to use" >&5 | |
13101 | echo $ECHO_N "checking what nm to use... $ECHO_C" >&6 | |
13102 | if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then | |
13103 | # Single tree build which includes binutils. | |
13104 | echo "$as_me:$LINENO: result: newly built nm" >&5 | |
13105 | echo "${ECHO_T}newly built nm" >&6 | |
13106 | in_tree_nm=yes | |
13107 | else | |
13108 | echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13109 | echo "${ECHO_T}$gcc_cv_nm" >&6 | |
13110 | in_tree_nm=no | |
13111 | fi | |
13112 | ||
13113 | ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm | |
13114 | ||
13115 | ||
13116 | # Figure out what objdump we will be using. | |
13117 | if test "${gcc_cv_objdump+set}" = set; then | |
13118 | : | |
13119 | else | |
13120 | ||
13121 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
13122 | && test -f ../binutils/Makefile; then | |
13123 | # Single tree build which includes binutils. | |
13124 | gcc_cv_objdump=../binutils/objdump$build_exeext | |
13125 | elif test -x objdump$build_exeext; then | |
13126 | gcc_cv_objdump=./objdump$build_exeext | |
13127 | elif test -x $OBJDUMP_FOR_TARGET; then | |
13128 | gcc_cv_objdump="$OBJDUMP_FOR_TARGET" | |
13129 | else | |
13130 | # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args. | |
13131 | set dummy $OBJDUMP_FOR_TARGET; ac_word=$2 | |
9f18db39 PB |
13132 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13133 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
e8b05380 | 13134 | if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then |
9f18db39 PB |
13135 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
13136 | else | |
e8b05380 | 13137 | case $gcc_cv_objdump in |
9f18db39 | 13138 | [\\/]* | ?:[\\/]*) |
e8b05380 | 13139 | ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. |
9f18db39 PB |
13140 | ;; |
13141 | *) | |
13142 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
e8b05380 | 13143 | for as_dir in $PATH |
9f18db39 PB |
13144 | do |
13145 | IFS=$as_save_IFS | |
13146 | test -z "$as_dir" && as_dir=. | |
13147 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13148 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
e8b05380 | 13149 | ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" |
9f18db39 PB |
13150 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
13151 | break 2 | |
13152 | fi | |
13153 | done | |
13154 | done | |
779243f7 | 13155 | |
9f18db39 PB |
13156 | ;; |
13157 | esac | |
13158 | fi | |
e8b05380 | 13159 | gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump |
9f18db39 | 13160 | |
e8b05380 PB |
13161 | if test -n "$gcc_cv_objdump"; then |
13162 | echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
13163 | echo "${ECHO_T}$gcc_cv_objdump" >&6 | |
9f18db39 PB |
13164 | else |
13165 | echo "$as_me:$LINENO: result: no" >&5 | |
13166 | echo "${ECHO_T}no" >&6 | |
13167 | fi | |
13168 | ||
e8b05380 PB |
13169 | fi |
13170 | fi | |
9f18db39 | 13171 | |
e8b05380 PB |
13172 | |
13173 | echo "$as_me:$LINENO: checking what objdump to use" >&5 | |
13174 | echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6 | |
13175 | if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then | |
13176 | # Single tree build which includes binutils. | |
13177 | echo "$as_me:$LINENO: result: newly built objdump" >&5 | |
13178 | echo "${ECHO_T}newly built objdump" >&6 | |
13179 | elif test x$gcc_cv_objdump = x; then | |
13180 | echo "$as_me:$LINENO: result: not found" >&5 | |
13181 | echo "${ECHO_T}not found" >&6 | |
13182 | else | |
13183 | echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
13184 | echo "${ECHO_T}$gcc_cv_objdump" >&6 | |
a2eafc76 | 13185 | fi |
3cae5780 | 13186 | |
981d4858 | 13187 | # Figure out what assembler alignment features are present. |
ba479fd2 NN |
13188 | echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5 |
13189 | echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6 | |
13190 | if test "${gcc_cv_as_balign_and_p2align+set}" = set; then | |
13191 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13192 | else |
13193 | gcc_cv_as_balign_and_p2align=no | |
13194 | if test $in_tree_gas = yes; then | |
13195 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0` | |
13196 | then gcc_cv_as_balign_and_p2align=yes | |
13197 | fi | |
13198 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13199 | echo '.balign 4 |
8ada417f | 13200 | .p2align 2' > conftest.s |
ba479fd2 NN |
13201 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13202 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13203 | (eval $ac_try) 2>&5 | |
13204 | ac_status=$? | |
13205 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13206 | (exit $ac_status); }; } | |
8ada417f ZW |
13207 | then |
13208 | gcc_cv_as_balign_and_p2align=yes | |
13209 | else | |
13210 | echo "configure: failed program was" >&5 | |
13211 | cat conftest.s >&5 | |
13212 | fi | |
13213 | rm -f conftest.o conftest.s | |
13214 | fi | |
13215 | fi | |
ba479fd2 NN |
13216 | echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5 |
13217 | echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6 | |
63cf211a | 13218 | if test $gcc_cv_as_balign_and_p2align = yes; then |
ba479fd2 NN |
13219 | |
13220 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13221 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
ba479fd2 | 13222 | _ACEOF |
981d4858 | 13223 | |
ad9c4d9f NN |
13224 | fi |
13225 | ||
ba479fd2 NN |
13226 | echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5 |
13227 | echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6 | |
13228 | if test "${gcc_cv_as_max_skip_p2align+set}" = set; then | |
13229 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13230 | else |
13231 | gcc_cv_as_max_skip_p2align=no | |
13232 | if test $in_tree_gas = yes; then | |
13233 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
13234 | then gcc_cv_as_max_skip_p2align=yes | |
13235 | fi | |
13236 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13237 | echo '.p2align 4,,7' > conftest.s |
ba479fd2 NN |
13238 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13239 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13240 | (eval $ac_try) 2>&5 | |
13241 | ac_status=$? | |
13242 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13243 | (exit $ac_status); }; } | |
8ada417f ZW |
13244 | then |
13245 | gcc_cv_as_max_skip_p2align=yes | |
13246 | else | |
13247 | echo "configure: failed program was" >&5 | |
13248 | cat conftest.s >&5 | |
13249 | fi | |
13250 | rm -f conftest.o conftest.s | |
13251 | fi | |
ad9c4d9f | 13252 | fi |
ba479fd2 NN |
13253 | echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5 |
13254 | echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6 | |
63cf211a | 13255 | if test $gcc_cv_as_max_skip_p2align = yes; then |
ba479fd2 NN |
13256 | |
13257 | cat >>confdefs.h <<\_ACEOF | |
9e423e6d | 13258 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
ba479fd2 | 13259 | _ACEOF |
9e423e6d | 13260 | |
9e423e6d | 13261 | fi |
ad9c4d9f | 13262 | |
ba479fd2 NN |
13263 | echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5 |
13264 | echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6 | |
13265 | if test "${gcc_cv_as_subsection_m1+set}" = set; then | |
13266 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13267 | else |
13268 | gcc_cv_as_subsection_m1=no | |
13269 | if test $in_tree_gas = yes; then | |
13270 | if test $in_tree_gas_is_elf = yes \ | |
13271 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
13272 | then gcc_cv_as_subsection_m1=yes | |
ad9c4d9f | 13273 | fi |
8ada417f | 13274 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13275 | echo 'conftest_label1: .word 0 |
d1accaa3 JJ |
13276 | .subsection -1 |
13277 | conftest_label2: .word 0 | |
8ada417f | 13278 | .previous' > conftest.s |
ba479fd2 NN |
13279 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13280 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13281 | (eval $ac_try) 2>&5 | |
13282 | ac_status=$? | |
13283 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13284 | (exit $ac_status); }; } | |
8ada417f ZW |
13285 | then |
13286 | if test x$gcc_cv_nm != x; then | |
13287 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
13288 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
13289 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 | |
13290 | then : | |
13291 | else gcc_cv_as_subsection_m1=yes | |
13292 | fi | |
13293 | rm -f conftest.nm1 conftest.nm2 | |
13294 | fi | |
13295 | else | |
13296 | echo "configure: failed program was" >&5 | |
13297 | cat conftest.s >&5 | |
13298 | fi | |
13299 | rm -f conftest.o conftest.s | |
13300 | fi | |
981d4858 | 13301 | fi |
ba479fd2 NN |
13302 | echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5 |
13303 | echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6 | |
63cf211a | 13304 | if test $gcc_cv_as_subsection_m1 = yes; then |
ba479fd2 NN |
13305 | |
13306 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13307 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
ba479fd2 | 13308 | _ACEOF |
981d4858 | 13309 | |
d1accaa3 | 13310 | fi |
ad9c4d9f | 13311 | |
ba479fd2 NN |
13312 | echo "$as_me:$LINENO: checking assembler for .weak" >&5 |
13313 | echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6 | |
13314 | if test "${gcc_cv_as_weak+set}" = set; then | |
13315 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13316 | else |
13317 | gcc_cv_as_weak=no | |
13318 | if test $in_tree_gas = yes; then | |
13319 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0` | |
13320 | then gcc_cv_as_weak=yes | |
ad9c4d9f | 13321 | fi |
8ada417f | 13322 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13323 | echo ' .weak foobar' > conftest.s |
ba479fd2 NN |
13324 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13325 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13326 | (eval $ac_try) 2>&5 | |
13327 | ac_status=$? | |
13328 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13329 | (exit $ac_status); }; } | |
8ada417f ZW |
13330 | then |
13331 | gcc_cv_as_weak=yes | |
13332 | else | |
13333 | echo "configure: failed program was" >&5 | |
13334 | cat conftest.s >&5 | |
13335 | fi | |
13336 | rm -f conftest.o conftest.s | |
13337 | fi | |
981d4858 | 13338 | fi |
ba479fd2 NN |
13339 | echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5 |
13340 | echo "${ECHO_T}$gcc_cv_as_weak" >&6 | |
63cf211a | 13341 | if test $gcc_cv_as_weak = yes; then |
ba479fd2 NN |
13342 | |
13343 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13344 | #define HAVE_GAS_WEAK 1 |
ba479fd2 | 13345 | _ACEOF |
981d4858 | 13346 | |
12822146 | 13347 | fi |
ad9c4d9f | 13348 | |
a0203ca7 AO |
13349 | echo "$as_me:$LINENO: checking assembler for .weakref" >&5 |
13350 | echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6 | |
13351 | if test "${gcc_cv_as_weakref+set}" = set; then | |
13352 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13353 | else | |
13354 | gcc_cv_as_weakref=no | |
13355 | if test $in_tree_gas = yes; then | |
13356 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
13357 | then gcc_cv_as_weakref=yes | |
13358 | fi | |
13359 | elif test x$gcc_cv_as != x; then | |
13360 | echo ' .weakref foobar, barfnot' > conftest.s | |
13361 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
13362 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13363 | (eval $ac_try) 2>&5 | |
13364 | ac_status=$? | |
13365 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13366 | (exit $ac_status); }; } | |
13367 | then | |
13368 | gcc_cv_as_weakref=yes | |
13369 | else | |
13370 | echo "configure: failed program was" >&5 | |
13371 | cat conftest.s >&5 | |
13372 | fi | |
13373 | rm -f conftest.o conftest.s | |
13374 | fi | |
13375 | fi | |
13376 | echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5 | |
13377 | echo "${ECHO_T}$gcc_cv_as_weakref" >&6 | |
13378 | if test $gcc_cv_as_weakref = yes; then | |
13379 | ||
13380 | cat >>confdefs.h <<\_ACEOF | |
13381 | #define HAVE_GAS_WEAKREF 1 | |
13382 | _ACEOF | |
13383 | ||
13384 | fi | |
13385 | ||
e41f3691 JDA |
13386 | echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5 |
13387 | echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6 | |
13388 | if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then | |
13389 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13390 | else | |
13391 | gcc_cv_as_nsubspa_comdat=no | |
13392 | if test $in_tree_gas = yes; then | |
13393 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
13394 | then gcc_cv_as_nsubspa_comdat=yes | |
13395 | fi | |
13396 | elif test x$gcc_cv_as != x; then | |
13397 | echo ' .SPACE $TEXT$ | |
13398 | .NSUBSPA $CODE$,COMDAT' > conftest.s | |
13399 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
13400 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13401 | (eval $ac_try) 2>&5 | |
13402 | ac_status=$? | |
13403 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13404 | (exit $ac_status); }; } | |
13405 | then | |
13406 | gcc_cv_as_nsubspa_comdat=yes | |
13407 | else | |
13408 | echo "configure: failed program was" >&5 | |
13409 | cat conftest.s >&5 | |
13410 | fi | |
13411 | rm -f conftest.o conftest.s | |
13412 | fi | |
13413 | fi | |
13414 | echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5 | |
13415 | echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6 | |
13416 | if test $gcc_cv_as_nsubspa_comdat = yes; then | |
13417 | ||
13418 | cat >>confdefs.h <<\_ACEOF | |
13419 | #define HAVE_GAS_NSUBSPA_COMDAT 1 | |
13420 | _ACEOF | |
13421 | ||
13422 | fi | |
13423 | ||
8ada417f ZW |
13424 | # .hidden needs to be supported in both the assembler and the linker, |
13425 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
13426 | # This is irritatingly difficult to feature test for; we have to check the | |
13427 | # date string after the version number. If we've got an in-tree | |
13428 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
13429 | # to be safe. | |
13430 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
ba479fd2 NN |
13431 | echo "$as_me:$LINENO: checking assembler for .hidden" >&5 |
13432 | echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6 | |
13433 | if test "${gcc_cv_as_hidden+set}" = set; then | |
13434 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13435 | else |
13436 | gcc_cv_as_hidden=no | |
13437 | if test $in_tree_gas = yes; then | |
13438 | if test $in_tree_gas_is_elf = yes \ | |
13439 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0` | |
13440 | then gcc_cv_as_hidden=yes | |
13441 | fi | |
13442 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13443 | echo ' .hidden foobar |
8ada417f | 13444 | foobar:' > conftest.s |
ba479fd2 NN |
13445 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13446 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13447 | (eval $ac_try) 2>&5 | |
13448 | ac_status=$? | |
13449 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13450 | (exit $ac_status); }; } | |
8ada417f ZW |
13451 | then |
13452 | gcc_cv_as_hidden=yes | |
13453 | else | |
13454 | echo "configure: failed program was" >&5 | |
13455 | cat conftest.s >&5 | |
13456 | fi | |
13457 | rm -f conftest.o conftest.s | |
13458 | fi | |
13459 | fi | |
ba479fd2 NN |
13460 | echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5 |
13461 | echo "${ECHO_T}$gcc_cv_as_hidden" >&6 | |
63cf211a | 13462 | |
ad9c4d9f | 13463 | |
ba479fd2 NN |
13464 | echo "$as_me:$LINENO: checking linker for .hidden support" >&5 |
13465 | echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6 | |
13466 | if test "${gcc_cv_ld_hidden+set}" = set; then | |
13467 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13468 | else |
13469 | if test $in_tree_ld = yes ; then | |
13470 | gcc_cv_ld_hidden=no | |
13471 | 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 \ | |
13472 | && test $in_tree_ld_is_elf = yes; then | |
13473 | gcc_cv_ld_hidden=yes | |
13474 | fi | |
13475 | else | |
13476 | gcc_cv_ld_hidden=yes | |
bace148a | 13477 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` |
8ada417f ZW |
13478 | if echo "$ld_ver" | grep GNU > /dev/null; then |
13479 | ld_vers=`echo $ld_ver | sed -n \ | |
13480 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13481 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13482 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13483 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
13484 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
11176d2a JB |
13485 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ |
13486 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'` | |
8ada417f | 13487 | ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` |
11176d2a JB |
13488 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` |
13489 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
13490 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
8ada417f ZW |
13491 | if test 0"$ld_date" -lt 20020404; then |
13492 | if test -n "$ld_date"; then | |
13493 | # If there was date string, but was earlier than 2002-04-04, fail | |
13494 | gcc_cv_ld_hidden=no | |
13495 | elif test -z "$ld_vers"; then | |
13496 | # If there was no date string nor ld version number, something is wrong | |
13497 | gcc_cv_ld_hidden=no | |
13498 | else | |
8ada417f ZW |
13499 | test -z "$ld_vers_patch" && ld_vers_patch=0 |
13500 | if test "$ld_vers_major" -lt 2; then | |
13501 | gcc_cv_ld_hidden=no | |
13502 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
13503 | gcc_cv_ld_hidden="no" | |
13504 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then | |
13505 | gcc_cv_ld_hidden=no | |
c72931a6 | 13506 | fi |
8ada417f | 13507 | fi |
789b7de5 | 13508 | fi |
8ada417f | 13509 | else |
28690784 | 13510 | case "${target}" in |
b0fd7d27 | 13511 | hppa64*-*-hpux* | ia64*-*-hpux*) |
28690784 JDA |
13512 | gcc_cv_ld_hidden=yes |
13513 | ;; | |
13514 | *) | |
13515 | gcc_cv_ld_hidden=no | |
13516 | ;; | |
13517 | esac | |
8ada417f ZW |
13518 | fi |
13519 | fi | |
6d07784a | 13520 | fi |
ba479fd2 NN |
13521 | echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5 |
13522 | echo "${ECHO_T}$gcc_cv_ld_hidden" >&6 | |
8ada417f | 13523 | libgcc_visibility=no |
ad9c4d9f | 13524 | |
232b67d9 | 13525 | |
8e3940b2 | 13526 | if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then |
8ada417f | 13527 | libgcc_visibility=yes |
ba479fd2 NN |
13528 | |
13529 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 13530 | #define HAVE_GAS_HIDDEN 1 |
ba479fd2 | 13531 | _ACEOF |
ad9c4d9f NN |
13532 | |
13533 | fi | |
13534 | ||
8ada417f | 13535 | # Check if we have .[us]leb128, and support symbol arithmetic with it. |
ba479fd2 NN |
13536 | echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5 |
13537 | echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6 | |
13538 | if test "${gcc_cv_as_leb128+set}" = set; then | |
13539 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13540 | else |
13541 | gcc_cv_as_leb128=no | |
13542 | if test $in_tree_gas = yes; then | |
13543 | if test $in_tree_gas_is_elf = yes \ | |
13544 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
13545 | then gcc_cv_as_leb128=yes | |
13546 | fi | |
13547 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13548 | echo ' .data |
b7460f24 RH |
13549 | .uleb128 L2 - L1 |
13550 | L1: | |
13551 | .uleb128 1280 | |
13552 | .sleb128 -1010 | |
8ada417f | 13553 | L2:' > conftest.s |
ba479fd2 NN |
13554 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13555 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13556 | (eval $ac_try) 2>&5 | |
13557 | ac_status=$? | |
13558 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13559 | (exit $ac_status); }; } | |
8ada417f ZW |
13560 | then |
13561 | # GAS versions before 2.11 do not support uleb128, | |
13562 | # despite appearing to. | |
13563 | # ??? There exists an elf-specific test that will crash | |
13564 | # the assembler. Perhaps it's better to figure out whether | |
13565 | # arbitrary sections are supported and try the test. | |
bace148a | 13566 | as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` |
8ada417f ZW |
13567 | if echo "$as_ver" | grep GNU > /dev/null; then |
13568 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` | |
13569 | as_major=`echo $as_ver | sed 's/\..*//'` | |
13570 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` | |
13571 | if test $as_major -eq 2 && test $as_minor -lt 11 | |
13572 | then : | |
13573 | else gcc_cv_as_leb128=yes | |
13574 | fi | |
13575 | fi | |
13576 | else | |
13577 | echo "configure: failed program was" >&5 | |
13578 | cat conftest.s >&5 | |
13579 | fi | |
13580 | rm -f conftest.o conftest.s | |
13581 | fi | |
b7460f24 | 13582 | fi |
ba479fd2 NN |
13583 | echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5 |
13584 | echo "${ECHO_T}$gcc_cv_as_leb128" >&6 | |
63cf211a | 13585 | if test $gcc_cv_as_leb128 = yes; then |
ba479fd2 NN |
13586 | |
13587 | cat >>confdefs.h <<\_ACEOF | |
b7460f24 | 13588 | #define HAVE_AS_LEB128 1 |
ba479fd2 | 13589 | _ACEOF |
b7460f24 RH |
13590 | |
13591 | fi | |
ad9c4d9f | 13592 | |
8ada417f ZW |
13593 | # GAS versions up to and including 2.11.0 may mis-optimize |
13594 | # .eh_frame data. | |
ba479fd2 NN |
13595 | echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5 |
13596 | echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6 | |
13597 | if test "${gcc_cv_as_eh_frame+set}" = set; then | |
13598 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13599 | else |
13600 | gcc_cv_as_eh_frame=no | |
13601 | if test $in_tree_gas = yes; then | |
13602 | if test $in_tree_gas_is_elf = yes \ | |
13603 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
13604 | then gcc_cv_as_eh_frame=yes | |
ad9c4d9f | 13605 | fi |
8ada417f | 13606 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13607 | echo ' .text |
c64688ae RH |
13608 | .LFB1: |
13609 | .4byte 0 | |
13610 | .L1: | |
13611 | .4byte 0 | |
13612 | .LFE1: | |
13613 | .section .eh_frame,"aw",@progbits | |
13614 | __FRAME_BEGIN__: | |
13615 | .4byte .LECIE1-.LSCIE1 | |
13616 | .LSCIE1: | |
13617 | .4byte 0x0 | |
13618 | .byte 0x1 | |
13619 | .ascii "z\0" | |
13620 | .byte 0x1 | |
13621 | .byte 0x78 | |
13622 | .byte 0x1a | |
13623 | .byte 0x0 | |
13624 | .byte 0x4 | |
13625 | .4byte 1 | |
13626 | .p2align 1 | |
13627 | .LECIE1: | |
13628 | .LSFDE1: | |
13629 | .4byte .LEFDE1-.LASFDE1 | |
13630 | .LASFDE1: | |
13631 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
13632 | .4byte .LFB1 | |
13633 | .4byte .LFE1-.LFB1 | |
13634 | .byte 0x4 | |
13635 | .4byte .LFE1-.LFB1 | |
13636 | .byte 0x4 | |
13637 | .4byte .L1-.LFB1 | |
8ada417f | 13638 | .LEFDE1:' > conftest.s |
ba479fd2 NN |
13639 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13640 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13641 | (eval $ac_try) 2>&5 | |
13642 | ac_status=$? | |
13643 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13644 | (exit $ac_status); }; } | |
8ada417f ZW |
13645 | then |
13646 | cat > conftest.lit <<EOF | |
c64688ae RH |
13647 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
13648 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 13649 | 0020 08000000 04080000 0044 .........D |
01efb963 | 13650 | EOF |
ba479fd2 | 13651 | cat > conftest.big <<EOF |
01efb963 AS |
13652 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... |
13653 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 13654 | 0020 00000008 04000000 0844 .........D |
c64688ae | 13655 | EOF |
8ada417f ZW |
13656 | # If the assembler didn't choke, and we can objdump, |
13657 | # and we got the correct data, then succeed. | |
13658 | if test x$gcc_cv_objdump != x \ | |
13659 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
13660 | | tail -3 > conftest.got \ | |
13661 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ | |
13662 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
13663 | then | |
13664 | gcc_cv_as_eh_frame=yes | |
ba479fd2 NN |
13665 | elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null' |
13666 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13667 | (eval $ac_try) 2>&5 | |
13668 | ac_status=$? | |
13669 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13670 | (exit $ac_status); }; }; then | |
8ada417f ZW |
13671 | gcc_cv_as_eh_frame=buggy |
13672 | else | |
13673 | # Uh oh, what do we do now? | |
13674 | gcc_cv_as_eh_frame=no | |
13675 | fi | |
13676 | else | |
13677 | echo "configure: failed program was" >&5 | |
13678 | cat conftest.s >&5 | |
13679 | fi | |
13680 | rm -f conftest.o conftest.s | |
13681 | fi | |
c64688ae | 13682 | fi |
ba479fd2 NN |
13683 | echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5 |
13684 | echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6 | |
ad9c4d9f | 13685 | |
6e3f3080 | 13686 | |
63cf211a | 13687 | if test $gcc_cv_as_eh_frame = buggy; then |
ba479fd2 NN |
13688 | |
13689 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 13690 | #define USE_AS_TRADITIONAL_FORMAT 1 |
ba479fd2 | 13691 | _ACEOF |
ad9c4d9f NN |
13692 | |
13693 | fi | |
13694 | ||
ba479fd2 NN |
13695 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 |
13696 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
13697 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
13698 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13699 | else |
13700 | gcc_cv_as_shf_merge=no | |
13701 | if test $in_tree_gas = yes; then | |
13702 | if test $in_tree_gas_is_elf = yes \ | |
13703 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
13704 | then gcc_cv_as_shf_merge=yes | |
13705 | fi | |
13706 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13707 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s |
ba479fd2 NN |
13708 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' |
13709 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13710 | (eval $ac_try) 2>&5 | |
13711 | ac_status=$? | |
13712 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13713 | (exit $ac_status); }; } | |
8ada417f ZW |
13714 | then |
13715 | gcc_cv_as_shf_merge=yes | |
13716 | else | |
13717 | echo "configure: failed program was" >&5 | |
13718 | cat conftest.s >&5 | |
13719 | fi | |
13720 | rm -f conftest.o conftest.s | |
13721 | fi | |
201556f0 | 13722 | fi |
ba479fd2 NN |
13723 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 |
13724 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
8ada417f | 13725 | |
c18a5b6c MM |
13726 | if test $gcc_cv_as_shf_merge = no; then |
13727 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 | |
13728 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
13729 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
13730 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13731 | else | |
13732 | gcc_cv_as_shf_merge=no | |
13733 | if test $in_tree_gas = yes; then | |
13734 | if test $in_tree_gas_is_elf = yes \ | |
13735 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
13736 | then gcc_cv_as_shf_merge=yes | |
13737 | fi | |
13738 | elif test x$gcc_cv_as != x; then | |
13739 | echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s | |
13740 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
13741 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13742 | (eval $ac_try) 2>&5 | |
13743 | ac_status=$? | |
13744 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13745 | (exit $ac_status); }; } | |
13746 | then | |
13747 | gcc_cv_as_shf_merge=yes | |
13748 | else | |
13749 | echo "configure: failed program was" >&5 | |
13750 | cat conftest.s >&5 | |
13751 | fi | |
13752 | rm -f conftest.o conftest.s | |
13753 | fi | |
13754 | fi | |
13755 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 | |
13756 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
13757 | ||
13758 | fi | |
8ad9fb33 | 13759 | |
ba479fd2 | 13760 | cat >>confdefs.h <<_ACEOF |
8ad9fb33 | 13761 | #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 13762 | _ACEOF |
201556f0 | 13763 | |
201556f0 | 13764 | |
c18a5b6c MM |
13765 | echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 |
13766 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 | |
13767 | if test "${gcc_cv_as_comdat_group+set}" = set; then | |
13768 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13769 | else | |
13770 | gcc_cv_as_comdat_group=no | |
13771 | if test $in_tree_gas = yes; then | |
13772 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 13773 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
13774 | then gcc_cv_as_comdat_group=yes |
13775 | fi | |
13776 | elif test x$gcc_cv_as != x; then | |
13777 | echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s | |
13778 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
13779 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13780 | (eval $ac_try) 2>&5 | |
13781 | ac_status=$? | |
13782 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13783 | (exit $ac_status); }; } | |
13784 | then | |
13785 | gcc_cv_as_comdat_group=yes | |
13786 | else | |
13787 | echo "configure: failed program was" >&5 | |
13788 | cat conftest.s >&5 | |
13789 | fi | |
13790 | rm -f conftest.o conftest.s | |
13791 | fi | |
13792 | fi | |
13793 | echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5 | |
13794 | echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6 | |
13795 | ||
13796 | if test $gcc_cv_as_comdat_group = yes; then | |
13797 | gcc_cv_as_comdat_group_percent=no | |
13798 | else | |
13799 | echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 | |
13800 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 | |
13801 | if test "${gcc_cv_as_comdat_group_percent+set}" = set; then | |
13802 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13803 | else | |
13804 | gcc_cv_as_comdat_group_percent=no | |
13805 | if test $in_tree_gas = yes; then | |
13806 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 13807 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
13808 | then gcc_cv_as_comdat_group_percent=yes |
13809 | fi | |
13810 | elif test x$gcc_cv_as != x; then | |
13811 | echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s | |
13812 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
13813 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13814 | (eval $ac_try) 2>&5 | |
13815 | ac_status=$? | |
13816 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13817 | (exit $ac_status); }; } | |
13818 | then | |
13819 | gcc_cv_as_comdat_group_percent=yes | |
13820 | else | |
13821 | echo "configure: failed program was" >&5 | |
13822 | cat conftest.s >&5 | |
13823 | fi | |
13824 | rm -f conftest.o conftest.s | |
13825 | fi | |
13826 | fi | |
13827 | echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5 | |
13828 | echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6 | |
13829 | ||
13830 | fi | |
11176d2a JB |
13831 | if test $in_tree_ld != yes && test x"$ld_vers" != x; then |
13832 | comdat_group=yes | |
13833 | if test 0"$ld_date" -lt 20050308; then | |
13834 | if test -n "$ld_date"; then | |
13835 | # If there was date string, but was earlier than 2005-03-08, fail | |
13836 | comdat_group=no | |
13837 | elif test "$ld_vers_major" -lt 2; then | |
13838 | comdat_group=no | |
13839 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then | |
13840 | comdat_group=no | |
13841 | fi | |
13842 | fi | |
13843 | if test $comdat_group = no; then | |
13844 | gcc_cv_as_comdat_group=no | |
13845 | gcc_cv_as_comdat_group_percent=no | |
13846 | fi | |
13847 | fi | |
c18a5b6c MM |
13848 | |
13849 | cat >>confdefs.h <<_ACEOF | |
11176d2a | 13850 | #define HAVE_COMDAT_GROUP `if test $gcc_cv_as_comdat_group = yes || test $gcc_cv_as_comdat_group_percent = yes; then echo 1; else echo 0; fi` |
c18a5b6c MM |
13851 | _ACEOF |
13852 | ||
13853 | ||
8ada417f | 13854 | # Thread-local storage - the check is heavily parametrized. |
f996902d RH |
13855 | conftest_s= |
13856 | tls_first_major= | |
13857 | tls_first_minor= | |
9739c90c | 13858 | tls_as_opt= |
f996902d | 13859 | case "$target" in |
6f9b006d RH |
13860 | alpha*-*-*) |
13861 | conftest_s=' | |
13862 | .section ".tdata","awT",@progbits | |
13863 | foo: .long 25 | |
13864 | .text | |
13865 | ldq $27,__tls_get_addr($29) !literal!1 | |
13866 | lda $16,foo($29) !tlsgd!1 | |
13867 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
13868 | ldq $27,__tls_get_addr($29) !literal!2 | |
13869 | lda $16,foo($29) !tlsldm!2 | |
13870 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
13871 | ldq $1,foo($29) !gotdtprel | |
13872 | ldah $2,foo($29) !dtprelhi | |
13873 | lda $3,foo($2) !dtprello | |
13874 | lda $4,foo($29) !dtprel | |
13875 | ldq $1,foo($29) !gottprel | |
13876 | ldah $2,foo($29) !tprelhi | |
13877 | lda $3,foo($2) !tprello | |
13878 | lda $4,foo($29) !tprel' | |
13879 | tls_first_major=2 | |
13880 | tls_first_minor=13 | |
2f3321ca | 13881 | tls_as_opt=--fatal-warnings |
6f9b006d | 13882 | ;; |
e4dd71de AH |
13883 | frv*-*-*) |
13884 | conftest_s=' | |
13885 | .section ".tdata","awT",@progbits | |
13886 | x: .long 25 | |
13887 | .text | |
13888 | call #gettlsoff(x)' | |
13889 | tls_first_major=2 | |
13890 | tls_first_minor=14 | |
13891 | ;; | |
51076f96 RC |
13892 | hppa*-*-linux*) |
13893 | conftest_s=' | |
13894 | t1: .reg %r20 | |
13895 | t2: .reg %r21 | |
13896 | gp: .reg %r19 | |
13897 | .section ".tdata","awT",@progbits | |
13898 | foo: .long 25 | |
13899 | .text | |
13900 | .align 4 | |
13901 | addil LT%foo-$tls_gdidx$,gp | |
13902 | ldo RT%foo-$tls_gdidx$(%r1),%arg0 | |
13903 | b __tls_get_addr | |
13904 | nop | |
13905 | addil LT%foo-$tls_ldidx$,gp | |
13906 | b __tls_get_addr | |
13907 | ldo RT%foo-$tls_ldidx$(%r1),%arg0 | |
13908 | addil LR%foo-$tls_dtpoff$,%ret0 | |
13909 | ldo RR%foo-$tls_dtpoff$(%r1),%t1 | |
13910 | mfctl %cr27,%t1 | |
13911 | addil LT%foo-$tls_ieoff$,gp | |
13912 | ldw RT%foo-$tls_ieoff$(%r1),%t2 | |
13913 | add %t1,%t2,%t3 | |
13914 | mfctl %cr27,%t1 | |
13915 | addil LR%foo-$tls_leoff$,%t1 | |
13916 | ldo RR%foo-$tls_leoff$(%r1),%t2' | |
13917 | tls_first_major=2 | |
13918 | tls_first_minor=15 | |
13919 | tls_as_opt=--fatal-warnings | |
13920 | ;; | |
d3585b76 DJ |
13921 | arm*-*-*) |
13922 | conftest_s=' | |
13923 | .section ".tdata","awT",%progbits | |
13924 | foo: .long 25 | |
13925 | .text | |
13926 | .word foo(gottpoff) | |
13927 | .word foo(tpoff) | |
13928 | .word foo(tlsgd) | |
13929 | .word foo(tlsldm) | |
13930 | .word foo(tlsldo)' | |
13931 | tls_first_major=2 | |
13932 | tls_first_minor=17 | |
13933 | ;; | |
f996902d RH |
13934 | i[34567]86-*-*) |
13935 | conftest_s=' | |
13936 | .section ".tdata","awT",@progbits | |
13937 | foo: .long 25 | |
13938 | .text | |
13939 | movl %gs:0, %eax | |
13940 | leal foo@TLSGD(,%ebx,1), %eax | |
13941 | leal foo@TLSLDM(%ebx), %eax | |
13942 | leal foo@DTPOFF(%eax), %edx | |
13943 | movl foo@GOTTPOFF(%ebx), %eax | |
13944 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
13945 | addl foo@GOTNTPOFF(%ebx), %eax |
13946 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
13947 | movl $foo@TPOFF, %eax |
13948 | subl $foo@TPOFF, %eax | |
13949 | leal foo@NTPOFF(%ecx), %eax' | |
13950 | tls_first_major=2 | |
75d38379 | 13951 | tls_first_minor=14 |
2f3321ca | 13952 | tls_as_opt=--fatal-warnings |
75d38379 JJ |
13953 | ;; |
13954 | x86_64-*-*) | |
13955 | conftest_s=' | |
13956 | .section ".tdata","awT",@progbits | |
13957 | foo: .long 25 | |
13958 | .text | |
13959 | movq %fs:0, %rax | |
13960 | leaq foo@TLSGD(%rip), %rdi | |
13961 | leaq foo@TLSLD(%rip), %rdi | |
13962 | leaq foo@DTPOFF(%rax), %rdx | |
13963 | movq foo@GOTTPOFF(%rip), %rax | |
13964 | movq $foo@TPOFF, %rax' | |
13965 | tls_first_major=2 | |
13966 | tls_first_minor=14 | |
2f3321ca | 13967 | tls_as_opt=--fatal-warnings |
f996902d | 13968 | ;; |
7b6e506e RH |
13969 | ia64-*-*) |
13970 | conftest_s=' | |
13971 | .section ".tdata","awT",@progbits | |
13972 | foo: data8 25 | |
13973 | .text | |
13974 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
13975 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
13976 | addl r18 = @ltoff(@tprel(foo#)), gp | |
13977 | addl r19 = @dtprel(foo#), gp | |
13978 | adds r21 = @dtprel(foo#), r13 | |
13979 | movl r23 = @dtprel(foo#) | |
13980 | addl r20 = @tprel(foo#), gp | |
13981 | adds r22 = @tprel(foo#), r13 | |
13982 | movl r24 = @tprel(foo#)' | |
13983 | tls_first_major=2 | |
13984 | tls_first_minor=13 | |
2f3321ca | 13985 | tls_as_opt=--fatal-warnings |
7b6e506e | 13986 | ;; |
69229b81 DJ |
13987 | mips*-*-*) |
13988 | conftest_s=' | |
13989 | .section .tdata,"awT",@progbits | |
13990 | x: | |
13991 | .word 2 | |
13992 | .text | |
13993 | addiu $4, $28, %tlsgd(x) | |
13994 | addiu $4, $28, %tlsldm(x) | |
13995 | lui $4, %dtprel_hi(x) | |
13996 | addiu $4, $4, %dtprel_lo(x) | |
13997 | lw $4, %gottprel(x)($28) | |
13998 | lui $4, %tprel_hi(x) | |
13999 | addiu $4, $4, %tprel_lo(x)' | |
14000 | tls_first_major=2 | |
14001 | tls_first_minor=16 | |
14002 | tls_as_opt='-32 --fatal-warnings' | |
14003 | ;; | |
c4501e62 JJ |
14004 | powerpc-*-*) |
14005 | conftest_s=' | |
14006 | .section ".tdata","awT",@progbits | |
14007 | .align 2 | |
14008 | ld0: .space 4 | |
14009 | ld1: .space 4 | |
14010 | x1: .space 4 | |
14011 | x2: .space 4 | |
14012 | x3: .space 4 | |
14013 | .text | |
14014 | addi 3,31,ld0@got@tlsgd | |
14015 | bl __tls_get_addr | |
14016 | addi 3,31,x1@got@tlsld | |
14017 | bl __tls_get_addr | |
14018 | addi 9,3,x1@dtprel | |
14019 | addis 9,3,x2@dtprel@ha | |
14020 | addi 9,9,x2@dtprel@l | |
14021 | lwz 9,x3@got@tprel(31) | |
14022 | add 9,9,x@tls | |
14023 | addi 9,2,x1@tprel | |
14024 | addis 9,2,x2@tprel@ha | |
14025 | addi 9,9,x2@tprel@l' | |
14026 | tls_first_major=2 | |
14027 | tls_first_minor=14 | |
2f3321ca | 14028 | tls_as_opt="-a32 --fatal-warnings" |
c4501e62 JJ |
14029 | ;; |
14030 | powerpc64-*-*) | |
14031 | conftest_s=' | |
14032 | .section ".tdata","awT",@progbits | |
14033 | .align 3 | |
14034 | ld0: .space 8 | |
14035 | ld1: .space 8 | |
14036 | x1: .space 8 | |
14037 | x2: .space 8 | |
14038 | x3: .space 8 | |
14039 | .text | |
14040 | addi 3,2,ld0@got@tlsgd | |
14041 | bl .__tls_get_addr | |
14042 | nop | |
14043 | addi 3,2,ld1@toc | |
14044 | bl .__tls_get_addr | |
14045 | nop | |
14046 | addi 3,2,x1@got@tlsld | |
14047 | bl .__tls_get_addr | |
14048 | nop | |
14049 | addi 9,3,x1@dtprel | |
14050 | bl .__tls_get_addr | |
14051 | nop | |
14052 | addis 9,3,x2@dtprel@ha | |
14053 | addi 9,9,x2@dtprel@l | |
14054 | bl .__tls_get_addr | |
14055 | nop | |
14056 | ld 9,x3@got@dtprel(2) | |
14057 | add 9,9,3 | |
14058 | bl .__tls_get_addr | |
14059 | nop' | |
14060 | tls_first_major=2 | |
14061 | tls_first_minor=14 | |
2f3321ca | 14062 | tls_as_opt="-a64 --fatal-warnings" |
c4501e62 | 14063 | ;; |
fd3cd001 UW |
14064 | s390-*-*) |
14065 | conftest_s=' | |
14066 | .section ".tdata","awT",@progbits | |
14067 | foo: .long 25 | |
14068 | .text | |
14069 | .long foo@TLSGD | |
14070 | .long foo@TLSLDM | |
14071 | .long foo@DTPOFF | |
14072 | .long foo@NTPOFF | |
14073 | .long foo@GOTNTPOFF | |
14074 | .long foo@INDNTPOFF | |
14075 | l %r1,foo@GOTNTPOFF(%r12) | |
14076 | l %r1,0(%r1):tls_load:foo | |
14077 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
14078 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
14079 | tls_first_major=2 | |
14080 | tls_first_minor=14 | |
2f3321ca | 14081 | tls_as_opt="-m31 --fatal-warnings" |
fd3cd001 UW |
14082 | ;; |
14083 | s390x-*-*) | |
14084 | conftest_s=' | |
14085 | .section ".tdata","awT",@progbits | |
14086 | foo: .long 25 | |
14087 | .text | |
14088 | .quad foo@TLSGD | |
14089 | .quad foo@TLSLDM | |
14090 | .quad foo@DTPOFF | |
14091 | .quad foo@NTPOFF | |
14092 | .quad foo@GOTNTPOFF | |
14093 | lg %r1,foo@GOTNTPOFF(%r12) | |
14094 | larl %r1,foo@INDNTPOFF | |
14095 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
14096 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
14097 | tls_first_major=2 | |
14098 | tls_first_minor=14 | |
2f3321ca | 14099 | tls_as_opt="-m64 -Aesame --fatal-warnings" |
fd3cd001 | 14100 | ;; |
9ff13962 KK |
14101 | sh-*-* | sh[34]-*-*) |
14102 | conftest_s=' | |
14103 | .section ".tdata","awT",@progbits | |
14104 | foo: .long 25 | |
14105 | .text | |
14106 | .long foo@TLSGD | |
14107 | .long foo@TLSLDM | |
14108 | .long foo@DTPOFF | |
14109 | .long foo@GOTTPOFF | |
14110 | .long foo@TPOFF' | |
14111 | tls_first_major=2 | |
14112 | tls_first_minor=13 | |
2f3321ca | 14113 | tls_as_opt=--fatal-warnings |
9ff13962 | 14114 | ;; |
5751a10b | 14115 | sparc*-*-*) |
2f3321ca EB |
14116 | case "$target" in |
14117 | sparc*-sun-solaris2.*) | |
14118 | on_solaris=yes | |
14119 | ;; | |
14120 | *) | |
14121 | on_solaris=no | |
14122 | ;; | |
14123 | esac | |
14124 | if test x$on_solaris = xyes && test x$gas_flag = xno; then | |
14125 | conftest_s=' | |
14126 | .section ".tdata",#alloc,#write,#tls | |
14127 | foo: .long 25 | |
14128 | .text | |
14129 | sethi %tgd_hi22(foo), %o0 | |
14130 | add %o0, %tgd_lo10(foo), %o1 | |
14131 | add %l7, %o1, %o0, %tgd_add(foo) | |
14132 | call __tls_get_addr, %tgd_call(foo) | |
14133 | sethi %tldm_hi22(foo), %l1 | |
14134 | add %l1, %tldm_lo10(foo), %l2 | |
14135 | add %l7, %l2, %o0, %tldm_add(foo) | |
14136 | call __tls_get_addr, %tldm_call(foo) | |
14137 | sethi %tldo_hix22(foo), %l3 | |
14138 | xor %l3, %tldo_lox10(foo), %l4 | |
14139 | add %o0, %l4, %l5, %tldo_add(foo) | |
14140 | sethi %tie_hi22(foo), %o3 | |
14141 | add %o3, %tie_lo10(foo), %o3 | |
14142 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
14143 | add %g7, %o2, %o4, %tie_add(foo) | |
14144 | sethi %tle_hix22(foo), %l1 | |
14145 | xor %l1, %tle_lox10(foo), %o5 | |
14146 | ld [%g7 + %o5], %o1' | |
14147 | tls_first_major=0 | |
14148 | tls_first_minor=0 | |
14149 | else | |
14150 | conftest_s=' | |
5751a10b JJ |
14151 | .section ".tdata","awT",@progbits |
14152 | foo: .long 25 | |
14153 | .text | |
14154 | sethi %tgd_hi22(foo), %o0 | |
14155 | add %o0, %tgd_lo10(foo), %o1 | |
14156 | add %l7, %o1, %o0, %tgd_add(foo) | |
14157 | call __tls_get_addr, %tgd_call(foo) | |
14158 | sethi %tldm_hi22(foo), %l1 | |
14159 | add %l1, %tldm_lo10(foo), %l2 | |
14160 | add %l7, %l2, %o0, %tldm_add(foo) | |
14161 | call __tls_get_addr, %tldm_call(foo) | |
14162 | sethi %tldo_hix22(foo), %l3 | |
14163 | xor %l3, %tldo_lox10(foo), %l4 | |
14164 | add %o0, %l4, %l5, %tldo_add(foo) | |
14165 | sethi %tie_hi22(foo), %o3 | |
14166 | add %o3, %tie_lo10(foo), %o3 | |
14167 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
14168 | add %g7, %o2, %o4, %tie_add(foo) | |
14169 | sethi %tle_hix22(foo), %l1 | |
14170 | xor %l1, %tle_lox10(foo), %o5 | |
14171 | ld [%g7 + %o5], %o1' | |
14172 | tls_first_major=2 | |
14173 | tls_first_minor=14 | |
2f3321ca EB |
14174 | tls_as_opt="-32 --fatal-warnings" |
14175 | fi | |
5751a10b | 14176 | ;; |
f996902d | 14177 | esac |
8dea1cca DD |
14178 | set_have_as_tls=no |
14179 | if test "x$enable_tls" = xno ; then | |
14180 | : # TLS explicitly disabled. | |
14181 | elif test "x$enable_tls" = xyes ; then | |
14182 | set_have_as_tls=yes # TLS explicitly enabled. | |
14183 | elif test -z "$tls_first_major"; then | |
8ada417f ZW |
14184 | : # If we don't have a check, assume no support. |
14185 | else | |
ba479fd2 NN |
14186 | echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5 |
14187 | echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6 | |
14188 | if test "${gcc_cv_as_tls+set}" = set; then | |
14189 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14190 | else |
14191 | gcc_cv_as_tls=no | |
14192 | if test $in_tree_gas = yes; then | |
14193 | if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0` | |
14194 | then gcc_cv_as_tls=yes | |
ad9c4d9f | 14195 | fi |
8ada417f | 14196 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14197 | echo "$conftest_s" > conftest.s |
2f3321ca | 14198 | if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5' |
ba479fd2 NN |
14199 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
14200 | (eval $ac_try) 2>&5 | |
14201 | ac_status=$? | |
14202 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14203 | (exit $ac_status); }; } | |
8ada417f ZW |
14204 | then |
14205 | gcc_cv_as_tls=yes | |
14206 | else | |
14207 | echo "configure: failed program was" >&5 | |
14208 | cat conftest.s >&5 | |
14209 | fi | |
14210 | rm -f conftest.o conftest.s | |
f996902d | 14211 | fi |
f996902d | 14212 | fi |
ba479fd2 NN |
14213 | echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5 |
14214 | echo "${ECHO_T}$gcc_cv_as_tls" >&6 | |
63cf211a | 14215 | if test $gcc_cv_as_tls = yes; then |
8dea1cca DD |
14216 | set_have_as_tls=yes |
14217 | fi | |
14218 | fi | |
14219 | if test $set_have_as_tls = yes ; then | |
ba479fd2 NN |
14220 | |
14221 | cat >>confdefs.h <<\_ACEOF | |
f996902d | 14222 | #define HAVE_AS_TLS 1 |
ba479fd2 | 14223 | _ACEOF |
f996902d | 14224 | |
8ada417f ZW |
14225 | fi |
14226 | ||
14227 | # Target-specific assembler checks. | |
f996902d | 14228 | |
7e9d8517 L |
14229 | echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5 |
14230 | echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6 | |
14231 | gcc_cv_ld_static_dynamic=no | |
14232 | if test $in_tree_ld = yes ; then | |
14233 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then | |
14234 | gcc_cv_ld_static_dynamic=yes | |
14235 | fi | |
14236 | elif test x$gcc_cv_ld != x; then | |
14237 | # Check if linker supports -Bstatic/-Bdynamic option | |
14238 | if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ | |
14239 | && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then | |
14240 | gcc_cv_ld_static_dynamic=yes | |
14241 | fi | |
14242 | fi | |
14243 | if test x"$gcc_cv_ld_static_dynamic" = xyes; then | |
14244 | ||
14245 | cat >>confdefs.h <<\_ACEOF | |
14246 | #define HAVE_LD_STATIC_DYNAMIC 1 | |
14247 | _ACEOF | |
14248 | ||
14249 | fi | |
14250 | echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5 | |
14251 | echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6 | |
14252 | ||
d594623a L |
14253 | if test x"$demangler_in_ld" = xyes; then |
14254 | echo "$as_me:$LINENO: checking linker --demangle support" >&5 | |
14255 | echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6 | |
14256 | gcc_cv_ld_demangle=no | |
14257 | if test $in_tree_ld = yes; then | |
14258 | 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 \ | |
14259 | gcc_cv_ld_demangle=yes | |
14260 | fi | |
14261 | elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then | |
14262 | # Check if the GNU linker supports --demangle option | |
14263 | if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then | |
14264 | gcc_cv_ld_demangle=yes | |
14265 | fi | |
14266 | fi | |
14267 | if test x"$gcc_cv_ld_demangle" = xyes; then | |
14268 | ||
14269 | cat >>confdefs.h <<\_ACEOF | |
14270 | #define HAVE_LD_DEMANGLE 1 | |
14271 | _ACEOF | |
14272 | ||
14273 | fi | |
14274 | echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5 | |
14275 | echo "${ECHO_T}$gcc_cv_ld_demangle" >&6 | |
14276 | fi | |
14277 | ||
3a37b08e RH |
14278 | case "$target" in |
14279 | # All TARGET_ABI_OSF targets. | |
14280 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
ba479fd2 NN |
14281 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
14282 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
14283 | if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then | |
14284 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a37b08e | 14285 | else |
8ada417f ZW |
14286 | gcc_cv_as_alpha_explicit_relocs=no |
14287 | if test $in_tree_gas = yes; then | |
14288 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14289 | then gcc_cv_as_alpha_explicit_relocs=yes | |
ad9c4d9f | 14290 | fi |
8ada417f | 14291 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14292 | echo ' .set nomacro |
3a37b08e RH |
14293 | .text |
14294 | extbl $3, $2, $3 !lituse_bytoff!1 | |
14295 | ldq $2, a($29) !literal!1 | |
14296 | ldq $4, b($29) !literal!2 | |
14297 | ldq_u $3, 0($2) !lituse_base!1 | |
14298 | ldq $27, f($29) !literal!5 | |
14299 | jsr $26, ($27), f !lituse_jsr!5 | |
14300 | ldah $29, 0($26) !gpdisp!3 | |
14301 | lda $0, c($29) !gprel | |
14302 | ldah $1, d($29) !gprelhigh | |
14303 | lda $1, d($1) !gprellow | |
8ada417f | 14304 | lda $29, 0($29) !gpdisp!3' > conftest.s |
ba479fd2 NN |
14305 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14306 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14307 | (eval $ac_try) 2>&5 | |
14308 | ac_status=$? | |
14309 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14310 | (exit $ac_status); }; } | |
8ada417f ZW |
14311 | then |
14312 | gcc_cv_as_alpha_explicit_relocs=yes | |
14313 | else | |
14314 | echo "configure: failed program was" >&5 | |
14315 | cat conftest.s >&5 | |
14316 | fi | |
14317 | rm -f conftest.o conftest.s | |
14318 | fi | |
cafe096b | 14319 | fi |
ba479fd2 NN |
14320 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5 |
14321 | echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6 | |
63cf211a | 14322 | if test $gcc_cv_as_alpha_explicit_relocs = yes; then |
ba479fd2 NN |
14323 | |
14324 | cat >>confdefs.h <<\_ACEOF | |
3a37b08e | 14325 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
ba479fd2 | 14326 | _ACEOF |
3a37b08e | 14327 | |
d006f5eb RH |
14328 | fi |
14329 | echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5 | |
14330 | echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6 | |
14331 | if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then | |
14332 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14333 | else | |
14334 | gcc_cv_as_alpha_jsrdirect_relocs=no | |
14335 | if test $in_tree_gas = yes; then | |
14336 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90` | |
14337 | then gcc_cv_as_alpha_jsrdirect_relocs=yes | |
14338 | fi | |
14339 | elif test x$gcc_cv_as != x; then | |
14340 | echo ' .set nomacro | |
14341 | .text | |
14342 | ldq $27, a($29) !literal!1 | |
14343 | jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s | |
14344 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14345 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14346 | (eval $ac_try) 2>&5 | |
14347 | ac_status=$? | |
14348 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14349 | (exit $ac_status); }; } | |
14350 | then | |
14351 | gcc_cv_as_alpha_jsrdirect_relocs=yes | |
14352 | else | |
14353 | echo "configure: failed program was" >&5 | |
14354 | cat conftest.s >&5 | |
14355 | fi | |
14356 | rm -f conftest.o conftest.s | |
14357 | fi | |
14358 | fi | |
14359 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5 | |
14360 | echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6 | |
14361 | if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then | |
14362 | ||
14363 | cat >>confdefs.h <<\_ACEOF | |
14364 | #define HAVE_AS_JSRDIRECT_RELOCS 1 | |
14365 | _ACEOF | |
14366 | ||
86da66b5 HPN |
14367 | fi |
14368 | ;; | |
14369 | ||
14370 | cris-*-*) | |
14371 | echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5 | |
14372 | echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6 | |
14373 | if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then | |
14374 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14375 | else | |
14376 | gcc_cv_as_cris_no_mul_bug=no | |
14377 | if test $in_tree_gas = yes; then | |
14378 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
14379 | then gcc_cv_as_cris_no_mul_bug=yes | |
14380 | fi | |
14381 | elif test x$gcc_cv_as != x; then | |
14382 | echo '.text' > conftest.s | |
14383 | if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5' | |
14384 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14385 | (eval $ac_try) 2>&5 | |
14386 | ac_status=$? | |
14387 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14388 | (exit $ac_status); }; } | |
14389 | then | |
14390 | gcc_cv_as_cris_no_mul_bug=yes | |
14391 | else | |
14392 | echo "configure: failed program was" >&5 | |
14393 | cat conftest.s >&5 | |
14394 | fi | |
14395 | rm -f conftest.o conftest.s | |
14396 | fi | |
14397 | fi | |
14398 | echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5 | |
14399 | echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6 | |
14400 | if test $gcc_cv_as_cris_no_mul_bug = yes; then | |
14401 | ||
14402 | cat >>confdefs.h <<\_ACEOF | |
14403 | #define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1 | |
14404 | _ACEOF | |
14405 | ||
8ada417f | 14406 | fi |
3a37b08e | 14407 | ;; |
8ada417f | 14408 | |
1cb36a98 | 14409 | sparc*-*-*) |
ba479fd2 NN |
14410 | echo "$as_me:$LINENO: checking assembler for .register" >&5 |
14411 | echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6 | |
14412 | if test "${gcc_cv_as_sparc_register_op+set}" = set; then | |
14413 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 14414 | else |
8ada417f ZW |
14415 | gcc_cv_as_sparc_register_op=no |
14416 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14417 | echo '.register %g2, #scratch' > conftest.s |
ba479fd2 NN |
14418 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14419 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14420 | (eval $ac_try) 2>&5 | |
14421 | ac_status=$? | |
14422 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14423 | (exit $ac_status); }; } | |
8ada417f ZW |
14424 | then |
14425 | gcc_cv_as_sparc_register_op=yes | |
14426 | else | |
14427 | echo "configure: failed program was" >&5 | |
14428 | cat conftest.s >&5 | |
14429 | fi | |
14430 | rm -f conftest.o conftest.s | |
14431 | fi | |
cafe096b | 14432 | fi |
ba479fd2 NN |
14433 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5 |
14434 | echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6 | |
63cf211a | 14435 | if test $gcc_cv_as_sparc_register_op = yes; then |
ba479fd2 NN |
14436 | |
14437 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 14438 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
ba479fd2 | 14439 | _ACEOF |
1cb36a98 | 14440 | |
8ada417f | 14441 | fi |
1cb36a98 | 14442 | |
ba479fd2 NN |
14443 | echo "$as_me:$LINENO: checking assembler for -relax option" >&5 |
14444 | echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6 | |
14445 | if test "${gcc_cv_as_sparc_relax+set}" = set; then | |
14446 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e95b1e6a | 14447 | else |
8ada417f ZW |
14448 | gcc_cv_as_sparc_relax=no |
14449 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14450 | echo '.text' > conftest.s |
ba479fd2 NN |
14451 | if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5' |
14452 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14453 | (eval $ac_try) 2>&5 | |
14454 | ac_status=$? | |
14455 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14456 | (exit $ac_status); }; } | |
8ada417f ZW |
14457 | then |
14458 | gcc_cv_as_sparc_relax=yes | |
14459 | else | |
14460 | echo "configure: failed program was" >&5 | |
14461 | cat conftest.s >&5 | |
14462 | fi | |
14463 | rm -f conftest.o conftest.s | |
14464 | fi | |
cafe096b | 14465 | fi |
ba479fd2 NN |
14466 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5 |
14467 | echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6 | |
63cf211a | 14468 | if test $gcc_cv_as_sparc_relax = yes; then |
ba479fd2 NN |
14469 | |
14470 | cat >>confdefs.h <<\_ACEOF | |
e95b1e6a | 14471 | #define HAVE_AS_RELAX_OPTION 1 |
ba479fd2 | 14472 | _ACEOF |
e95b1e6a | 14473 | |
8ada417f | 14474 | fi |
e95b1e6a | 14475 | |
ba479fd2 NN |
14476 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5 |
14477 | echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6 | |
14478 | if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then | |
14479 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
17e9e88c | 14480 | else |
8ada417f ZW |
14481 | gcc_cv_as_sparc_ua_pcrel=no |
14482 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14483 | echo '.text |
8ada417f ZW |
14484 | foo: |
14485 | nop | |
14486 | .data | |
14487 | .align 4 | |
14488 | .byte 0 | |
14489 | .uaword %r_disp32(foo)' > conftest.s | |
ba479fd2 NN |
14490 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
14491 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14492 | (eval $ac_try) 2>&5 | |
14493 | ac_status=$? | |
14494 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14495 | (exit $ac_status); }; } | |
8ada417f ZW |
14496 | then |
14497 | if test x$gcc_cv_ld != x \ | |
14498 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
14499 | gcc_cv_as_sparc_ua_pcrel=yes | |
14500 | fi | |
14501 | rm -f conftest | |
14502 | else | |
14503 | echo "configure: failed program was" >&5 | |
14504 | cat conftest.s >&5 | |
14505 | fi | |
14506 | rm -f conftest.o conftest.s | |
14507 | fi | |
cafe096b | 14508 | fi |
ba479fd2 NN |
14509 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5 |
14510 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6 | |
63cf211a | 14511 | if test $gcc_cv_as_sparc_ua_pcrel = yes; then |
ba479fd2 NN |
14512 | |
14513 | cat >>confdefs.h <<\_ACEOF | |
17e9e88c | 14514 | #define HAVE_AS_SPARC_UA_PCREL 1 |
ba479fd2 | 14515 | _ACEOF |
17e9e88c | 14516 | |
17e9e88c | 14517 | |
ba479fd2 NN |
14518 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 |
14519 | echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6 | |
14520 | if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then | |
14521 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cf7b8b0d | 14522 | else |
8ada417f ZW |
14523 | gcc_cv_as_sparc_ua_pcrel_hidden=no |
14524 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14525 | echo '.data |
8ada417f ZW |
14526 | .align 4 |
14527 | .byte 0x31 | |
14528 | .uaword %r_disp32(foo) | |
14529 | .byte 0x32, 0x33, 0x34 | |
14530 | .global foo | |
14531 | .hidden foo | |
14532 | foo: | |
14533 | .skip 4' > conftest.s | |
ba479fd2 NN |
14534 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
14535 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14536 | (eval $ac_try) 2>&5 | |
14537 | ac_status=$? | |
14538 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14539 | (exit $ac_status); }; } | |
8ada417f ZW |
14540 | then |
14541 | if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \ | |
14542 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
14543 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
14544 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
14545 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
14546 | | grep 'DISP32' > /dev/null 2>&1; then | |
14547 | : | |
14548 | else | |
14549 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
cf7b8b0d | 14550 | fi |
8ada417f ZW |
14551 | fi |
14552 | rm -f conftest | |
14553 | else | |
14554 | echo "configure: failed program was" >&5 | |
14555 | cat conftest.s >&5 | |
14556 | fi | |
14557 | rm -f conftest.o conftest.s | |
14558 | fi | |
cafe096b | 14559 | fi |
ba479fd2 NN |
14560 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5 |
14561 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6 | |
63cf211a | 14562 | if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then |
ba479fd2 NN |
14563 | |
14564 | cat >>confdefs.h <<\_ACEOF | |
cf7b8b0d | 14565 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
ba479fd2 | 14566 | _ACEOF |
cf7b8b0d | 14567 | |
8ada417f | 14568 | fi |
ba479fd2 | 14569 | |
8ada417f | 14570 | fi # unaligned pcrel relocs |
cf7b8b0d | 14571 | |
ba479fd2 NN |
14572 | echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5 |
14573 | echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6 | |
14574 | if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then | |
14575 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 14576 | else |
8ada417f ZW |
14577 | gcc_cv_as_sparc_offsetable_lo10=no |
14578 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14579 | echo '.text |
8ada417f ZW |
14580 | or %g1, %lo(ab) + 12, %g1 |
14581 | or %g1, %lo(ab + 12), %g1' > conftest.s | |
ba479fd2 NN |
14582 | if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5' |
14583 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14584 | (eval $ac_try) 2>&5 | |
14585 | ac_status=$? | |
14586 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14587 | (exit $ac_status); }; } | |
8ada417f ZW |
14588 | then |
14589 | if test x$gcc_cv_objdump != x \ | |
ecb0ccbc | 14590 | && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ |
8ada417f | 14591 | | grep ' 82106000 82106000' > /dev/null 2>&1; then |
1b5c0152 | 14592 | gcc_cv_as_sparc_offsetable_lo10=yes |
8ada417f ZW |
14593 | fi |
14594 | else | |
14595 | echo "configure: failed program was" >&5 | |
14596 | cat conftest.s >&5 | |
14597 | fi | |
14598 | rm -f conftest.o conftest.s | |
14599 | fi | |
cafe096b | 14600 | fi |
ba479fd2 NN |
14601 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5 |
14602 | echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6 | |
63cf211a | 14603 | if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then |
ba479fd2 NN |
14604 | |
14605 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 14606 | #define HAVE_AS_OFFSETABLE_LO10 1 |
ba479fd2 | 14607 | _ACEOF |
1cb36a98 | 14608 | |
8ada417f | 14609 | fi |
1cb36a98 RH |
14610 | ;; |
14611 | ||
c307e6dd | 14612 | i[34567]86-*-* | x86_64-*-*) |
d38bc601 BF |
14613 | case $target_os in |
14614 | cygwin* | pe | mingw32*) | |
14615 | # Used for DWARF 2 in PE | |
14616 | echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5 | |
14617 | echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6 | |
14618 | if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then | |
14619 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14620 | else | |
14621 | gcc_cv_as_ix86_pe_secrel32=no | |
14622 | if test $in_tree_gas = yes; then | |
14623 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
14624 | then gcc_cv_as_ix86_pe_secrel32=yes | |
14625 | fi | |
14626 | elif test x$gcc_cv_as != x; then | |
14627 | echo '.text | |
14628 | foo: nop | |
14629 | .data | |
14630 | .secrel32 foo' > conftest.s | |
14631 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14632 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14633 | (eval $ac_try) 2>&5 | |
14634 | ac_status=$? | |
14635 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14636 | (exit $ac_status); }; } | |
14637 | then | |
14638 | if test x$gcc_cv_ld != x \ | |
14639 | && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then | |
14640 | gcc_cv_as_ix86_pe_secrel32=yes | |
14641 | fi | |
14642 | rm -f conftest | |
14643 | else | |
14644 | echo "configure: failed program was" >&5 | |
14645 | cat conftest.s >&5 | |
14646 | fi | |
14647 | rm -f conftest.o conftest.s | |
14648 | fi | |
14649 | fi | |
14650 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5 | |
14651 | echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6 | |
14652 | if test $gcc_cv_as_ix86_pe_secrel32 = yes; then | |
14653 | ||
14654 | cat >>confdefs.h <<\_ACEOF | |
14655 | #define HAVE_GAS_PE_SECREL32_RELOC 1 | |
14656 | _ACEOF | |
14657 | ||
14658 | fi | |
14659 | ;; | |
14660 | esac | |
14661 | ||
ba479fd2 NN |
14662 | echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5 |
14663 | echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6 | |
14664 | if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then | |
14665 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14666 | else |
14667 | gcc_cv_as_ix86_filds_fists=no | |
14668 | if test $in_tree_gas = yes; then | |
14669 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
14670 | then gcc_cv_as_ix86_filds_fists=yes | |
ad9c4d9f | 14671 | fi |
8ada417f | 14672 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14673 | echo 'filds mem; fists mem' > conftest.s |
ba479fd2 NN |
14674 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14675 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14676 | (eval $ac_try) 2>&5 | |
14677 | ac_status=$? | |
14678 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14679 | (exit $ac_status); }; } | |
8ada417f ZW |
14680 | then |
14681 | gcc_cv_as_ix86_filds_fists=yes | |
14682 | else | |
14683 | echo "configure: failed program was" >&5 | |
14684 | cat conftest.s >&5 | |
981d4858 | 14685 | fi |
8ada417f ZW |
14686 | rm -f conftest.o conftest.s |
14687 | fi | |
14688 | fi | |
ba479fd2 NN |
14689 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5 |
14690 | echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6 | |
63cf211a | 14691 | if test $gcc_cv_as_ix86_filds_fists = yes; then |
ba479fd2 NN |
14692 | |
14693 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 14694 | #define HAVE_GAS_FILDS_FISTS 1 |
ba479fd2 | 14695 | _ACEOF |
ad9c4d9f | 14696 | |
f6f5dff2 RO |
14697 | fi |
14698 | ||
ba479fd2 NN |
14699 | echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5 |
14700 | echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6 | |
14701 | if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then | |
14702 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f6f5dff2 RO |
14703 | else |
14704 | gcc_cv_as_ix86_cmov_sun_syntax=no | |
14705 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14706 | echo 'cmovl.l %edx, %eax' > conftest.s |
ba479fd2 NN |
14707 | if { ac_try='$gcc_cv_as -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); }; } | |
f6f5dff2 RO |
14713 | then |
14714 | gcc_cv_as_ix86_cmov_sun_syntax=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 | |
14721 | fi | |
ba479fd2 NN |
14722 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5 |
14723 | echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6 | |
63cf211a | 14724 | if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then |
ba479fd2 NN |
14725 | |
14726 | cat >>confdefs.h <<\_ACEOF | |
f6f5dff2 | 14727 | #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1 |
ba479fd2 | 14728 | _ACEOF |
f6f5dff2 | 14729 | |
ad9c4d9f NN |
14730 | fi |
14731 | ||
6f3ca281 ZW |
14732 | # This one is used unconditionally by i386.[ch]; it is to be defined |
14733 | # to 1 if the feature is present, 0 otherwise. | |
ba479fd2 NN |
14734 | echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5 |
14735 | echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6 | |
14736 | if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then | |
14737 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14738 | else |
14739 | gcc_cv_as_ix86_gotoff_in_data=no | |
14740 | if test $in_tree_gas = yes; then | |
14741 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
14742 | then gcc_cv_as_ix86_gotoff_in_data=yes | |
14743 | fi | |
14744 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14745 | echo ' .text |
f88c65f7 RH |
14746 | .L0: |
14747 | nop | |
14748 | .data | |
8ada417f | 14749 | .long .L0@GOTOFF' > conftest.s |
ba479fd2 NN |
14750 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14751 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14752 | (eval $ac_try) 2>&5 | |
14753 | ac_status=$? | |
14754 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14755 | (exit $ac_status); }; } | |
8ada417f ZW |
14756 | then |
14757 | gcc_cv_as_ix86_gotoff_in_data=yes | |
14758 | else | |
14759 | echo "configure: failed program was" >&5 | |
14760 | cat conftest.s >&5 | |
f88c65f7 | 14761 | fi |
8ada417f ZW |
14762 | rm -f conftest.o conftest.s |
14763 | fi | |
14764 | fi | |
ba479fd2 NN |
14765 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5 |
14766 | echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6 | |
8ada417f | 14767 | |
6f3ca281 | 14768 | |
ba479fd2 | 14769 | cat >>confdefs.h <<_ACEOF |
6f3ca281 | 14770 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 14771 | _ACEOF |
f88c65f7 | 14772 | |
1cb36a98 | 14773 | ;; |
ef1ecf87 RH |
14774 | |
14775 | ia64*-*-*) | |
ba479fd2 NN |
14776 | echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5 |
14777 | echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6 | |
14778 | if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then | |
14779 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ef1ecf87 | 14780 | else |
8ada417f ZW |
14781 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no |
14782 | if test $in_tree_gas = yes; then | |
14783 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
14784 | then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes | |
ad9c4d9f | 14785 | fi |
8ada417f | 14786 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14787 | echo ' .text |
ef1ecf87 RH |
14788 | addl r15 = @ltoffx(x#), gp |
14789 | ;; | |
cfa9ee99 | 14790 | ld8.mov r16 = [r15], x#' > conftest.s |
ba479fd2 NN |
14791 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14792 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14793 | (eval $ac_try) 2>&5 | |
14794 | ac_status=$? | |
14795 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14796 | (exit $ac_status); }; } | |
8ada417f | 14797 | then |
cfa9ee99 | 14798 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes |
8ada417f ZW |
14799 | else |
14800 | echo "configure: failed program was" >&5 | |
14801 | cat conftest.s >&5 | |
2c4a9cff | 14802 | fi |
8ada417f ZW |
14803 | rm -f conftest.o conftest.s |
14804 | fi | |
14805 | fi | |
ba479fd2 NN |
14806 | echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5 |
14807 | echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6 | |
63cf211a | 14808 | if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then |
ba479fd2 NN |
14809 | |
14810 | cat >>confdefs.h <<\_ACEOF | |
cfa9ee99 | 14811 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
ba479fd2 | 14812 | _ACEOF |
8ada417f | 14813 | |
cfa9ee99 | 14814 | fi |
8ada417f | 14815 | |
2c4a9cff | 14816 | ;; |
8ada417f | 14817 | |
2c4a9cff | 14818 | powerpc*-*-*) |
8ada417f | 14819 | case $target in |
432218ba DE |
14820 | *-*-aix*) conftest_s=' .machine "pwr5" |
14821 | .csect .text[PR] | |
6b37db3c | 14822 | mfcr 3,128';; |
8af4d362 PB |
14823 | *-*-darwin*) |
14824 | echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5 | |
14825 | echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6 | |
14826 | if test "${gcc_cv_as_machine_directive+set}" = set; then | |
14827 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14828 | else | |
14829 | gcc_cv_as_machine_directive=no | |
14830 | if test x$gcc_cv_as != x; then | |
14831 | echo ' .machine ppc7400' > conftest.s | |
14832 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14833 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14834 | (eval $ac_try) 2>&5 | |
14835 | ac_status=$? | |
14836 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14837 | (exit $ac_status); }; } | |
14838 | then | |
14839 | gcc_cv_as_machine_directive=yes | |
14840 | else | |
14841 | echo "configure: failed program was" >&5 | |
14842 | cat conftest.s >&5 | |
14843 | fi | |
14844 | rm -f conftest.o conftest.s | |
14845 | fi | |
14846 | fi | |
14847 | echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5 | |
14848 | echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6 | |
14849 | ||
14850 | if test x$gcc_cv_as_machine_directive != xyes; then | |
14851 | echo "*** This target requires an assembler supporting \".machine\"" >&2 | |
14852 | echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2 | |
14853 | test x$build = x$target && exit 1 | |
14854 | fi | |
14855 | conftest_s=' .text | |
6b37db3c | 14856 | mfcr r3,128';; |
4c67db14 | 14857 | *) conftest_s=' .machine power4 |
d2ab3e37 | 14858 | .text |
6b37db3c | 14859 | mfcr 3,128';; |
8ada417f | 14860 | esac |
8ada417f | 14861 | |
ba479fd2 NN |
14862 | echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5 |
14863 | echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6 | |
14864 | if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then | |
14865 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2c4a9cff | 14866 | else |
8ada417f ZW |
14867 | gcc_cv_as_powerpc_mfcrf=no |
14868 | if test $in_tree_gas = yes; then | |
14869 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
14870 | then gcc_cv_as_powerpc_mfcrf=yes | |
2c4a9cff | 14871 | fi |
8ada417f | 14872 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14873 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
14874 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14875 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14876 | (eval $ac_try) 2>&5 | |
14877 | ac_status=$? | |
14878 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14879 | (exit $ac_status); }; } | |
8ada417f ZW |
14880 | then |
14881 | gcc_cv_as_powerpc_mfcrf=yes | |
14882 | else | |
14883 | echo "configure: failed program was" >&5 | |
14884 | cat conftest.s >&5 | |
14885 | fi | |
14886 | rm -f conftest.o conftest.s | |
14887 | fi | |
2c4a9cff | 14888 | fi |
ba479fd2 NN |
14889 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5 |
14890 | echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6 | |
63cf211a | 14891 | if test $gcc_cv_as_powerpc_mfcrf = yes; then |
ba479fd2 NN |
14892 | |
14893 | cat >>confdefs.h <<\_ACEOF | |
2c4a9cff | 14894 | #define HAVE_AS_MFCRF 1 |
ba479fd2 | 14895 | _ACEOF |
ef1ecf87 | 14896 | |
8ada417f | 14897 | fi |
432218ba DE |
14898 | |
14899 | case $target in | |
14900 | *-*-aix*) conftest_s=' .machine "pwr5" | |
14901 | .csect .text[PR] | |
14902 | popcntb 3,3';; | |
14903 | *) conftest_s=' .machine power5 | |
14904 | .text | |
14905 | popcntb 3,3';; | |
14906 | esac | |
14907 | ||
14908 | echo "$as_me:$LINENO: checking assembler for popcntb support" >&5 | |
14909 | echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6 | |
14910 | if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then | |
14911 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14912 | else | |
14913 | gcc_cv_as_powerpc_popcntb=no | |
14914 | if test $in_tree_gas = yes; then | |
14915 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
14916 | then gcc_cv_as_powerpc_popcntb=yes | |
14917 | fi | |
14918 | elif test x$gcc_cv_as != x; then | |
14919 | echo "$conftest_s" > conftest.s | |
14920 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14921 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14922 | (eval $ac_try) 2>&5 | |
14923 | ac_status=$? | |
14924 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14925 | (exit $ac_status); }; } | |
14926 | then | |
14927 | gcc_cv_as_powerpc_popcntb=yes | |
14928 | else | |
14929 | echo "configure: failed program was" >&5 | |
14930 | cat conftest.s >&5 | |
14931 | fi | |
14932 | rm -f conftest.o conftest.s | |
14933 | fi | |
14934 | fi | |
14935 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5 | |
14936 | echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6 | |
14937 | if test $gcc_cv_as_powerpc_popcntb = yes; then | |
14938 | ||
14939 | cat >>confdefs.h <<\_ACEOF | |
14940 | #define HAVE_AS_POPCNTB 1 | |
14941 | _ACEOF | |
14942 | ||
9719f3b7 DE |
14943 | fi |
14944 | ||
14945 | case $target in | |
14946 | *-*-aix*) conftest_s=' .machine "pwr5x" | |
14947 | .csect .text[PR] | |
14948 | frin 1,1';; | |
1e04bfdc | 14949 | *) conftest_s=' .machine power5 |
9719f3b7 DE |
14950 | .text |
14951 | frin 1,1';; | |
14952 | esac | |
14953 | ||
14954 | echo "$as_me:$LINENO: checking assembler for fp round support" >&5 | |
14955 | echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6 | |
14956 | if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then | |
14957 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14958 | else | |
14959 | gcc_cv_as_powerpc_fprnd=no | |
14960 | if test $in_tree_gas = yes; then | |
14961 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
14962 | then gcc_cv_as_powerpc_fprnd=yes | |
14963 | fi | |
14964 | elif test x$gcc_cv_as != x; then | |
14965 | echo "$conftest_s" > conftest.s | |
14966 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14967 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14968 | (eval $ac_try) 2>&5 | |
14969 | ac_status=$? | |
14970 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14971 | (exit $ac_status); }; } | |
14972 | then | |
14973 | gcc_cv_as_powerpc_fprnd=yes | |
14974 | else | |
14975 | echo "configure: failed program was" >&5 | |
14976 | cat conftest.s >&5 | |
14977 | fi | |
14978 | rm -f conftest.o conftest.s | |
14979 | fi | |
14980 | fi | |
14981 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5 | |
14982 | echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6 | |
14983 | if test $gcc_cv_as_powerpc_fprnd = yes; then | |
14984 | ||
14985 | cat >>confdefs.h <<\_ACEOF | |
14986 | #define HAVE_AS_FPRND 1 | |
14987 | _ACEOF | |
14988 | ||
432218ba DE |
14989 | fi |
14990 | ||
7f970b70 AM |
14991 | case $target in |
14992 | *-*-aix*) conftest_s=' .csect .text[PR] | |
14993 | LCF..0: | |
14994 | addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';; | |
14995 | *-*-darwin*) | |
14996 | conftest_s=' .text | |
14997 | LCF0: | |
14998 | addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';; | |
14999 | *) conftest_s=' .text | |
15000 | .LCF0: | |
15001 | addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';; | |
15002 | esac | |
15003 | ||
15004 | echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5 | |
15005 | echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6 | |
15006 | if test "${gcc_cv_as_powerpc_rel16+set}" = set; then | |
15007 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15008 | else | |
15009 | gcc_cv_as_powerpc_rel16=no | |
15010 | if test $in_tree_gas = yes; then | |
15011 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15012 | then gcc_cv_as_powerpc_rel16=yes | |
15013 | fi | |
15014 | elif test x$gcc_cv_as != x; then | |
15015 | echo "$conftest_s" > conftest.s | |
15016 | if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5' | |
15017 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15018 | (eval $ac_try) 2>&5 | |
15019 | ac_status=$? | |
15020 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15021 | (exit $ac_status); }; } | |
15022 | then | |
15023 | gcc_cv_as_powerpc_rel16=yes | |
15024 | else | |
15025 | echo "configure: failed program was" >&5 | |
15026 | cat conftest.s >&5 | |
15027 | fi | |
15028 | rm -f conftest.o conftest.s | |
15029 | fi | |
15030 | fi | |
15031 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5 | |
15032 | echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6 | |
15033 | if test $gcc_cv_as_powerpc_rel16 = yes; then | |
15034 | ||
15035 | cat >>confdefs.h <<\_ACEOF | |
15036 | #define HAVE_AS_REL16 1 | |
15037 | _ACEOF | |
15038 | ||
15039 | fi | |
8ada417f ZW |
15040 | ;; |
15041 | ||
15042 | mips*-*-*) | |
ba479fd2 NN |
15043 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
15044 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
15045 | if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then | |
15046 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15047 | else |
15048 | gcc_cv_as_mips_explicit_relocs=no | |
15049 | if test $in_tree_gas = yes; then | |
15050 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15051 | then gcc_cv_as_mips_explicit_relocs=yes | |
15052 | fi | |
15053 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15054 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
ba479fd2 NN |
15055 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15056 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15057 | (eval $ac_try) 2>&5 | |
15058 | ac_status=$? | |
15059 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15060 | (exit $ac_status); }; } | |
8ada417f ZW |
15061 | then |
15062 | gcc_cv_as_mips_explicit_relocs=yes | |
15063 | else | |
15064 | echo "configure: failed program was" >&5 | |
15065 | cat conftest.s >&5 | |
ef1ecf87 | 15066 | fi |
8ada417f ZW |
15067 | rm -f conftest.o conftest.s |
15068 | fi | |
15069 | fi | |
ba479fd2 NN |
15070 | echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5 |
15071 | echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6 | |
8ada417f ZW |
15072 | if test $gcc_cv_as_mips_explicit_relocs = yes; then |
15073 | if test x$target_cpu_default = x | |
15074 | then target_cpu_default=MASK_EXPLICIT_RELOCS | |
15075 | else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" | |
15076 | fi | |
15077 | fi | |
dbad5e72 SE |
15078 | ;; |
15079 | esac | |
8ada417f | 15080 | |
dbad5e72 SE |
15081 | # Mips and HP-UX need the GNU assembler. |
15082 | # Linux on IA64 might be able to use the Intel assembler. | |
15083 | ||
15084 | case "$target" in | |
15085 | mips*-*-* | *-*-hpux* ) | |
82563d35 RS |
15086 | if test x$gas_flag = xyes \ |
15087 | || test x"$host" != x"$build" \ | |
15088 | || test ! -x "$gcc_cv_as" \ | |
15089 | || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then | |
15090 | : | |
15091 | else | |
15092 | echo "*** This configuration requires the GNU assembler" >&2 | |
15093 | exit 1 | |
15094 | fi | |
ef1ecf87 | 15095 | ;; |
1cb36a98 | 15096 | esac |
dbad5e72 | 15097 | |
9d147085 RH |
15098 | # ??? Not all targets support dwarf2 debug_line, even within a version |
15099 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
15100 | # info to the output file. So, as supported targets are added to gas 2.11, | |
15101 | # add some instruction here to (also) show we expect this might work. | |
15102 | # ??? Once 2.11 is released, probably need to add first known working | |
15103 | # version to the per-target configury. | |
15104 | case "$target" in | |
80486e06 | 15105 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
2853bc5a | 15106 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ |
6afdc741 | 15107 | | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-*) |
9d147085 RH |
15108 | insn="nop" |
15109 | ;; | |
57116d8d | 15110 | ia64*-*-* | s390*-*-*) |
9d147085 RH |
15111 | insn="nop 0" |
15112 | ;; | |
2853bc5a HPN |
15113 | mmix-*-*) |
15114 | insn="swym 0" | |
15115 | ;; | |
8ada417f ZW |
15116 | esac |
15117 | if test x"$insn" != x; then | |
15118 | conftest_s="\ | |
15119 | .file 1 \"conftest.s\" | |
15120 | .loc 1 3 0 | |
15121 | $insn" | |
ba479fd2 NN |
15122 | echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5 |
15123 | echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6 | |
15124 | if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then | |
15125 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15126 | else |
15127 | gcc_cv_as_dwarf2_debug_line=no | |
15128 | if test $in_tree_gas = yes; then | |
15129 | if test $in_tree_gas_is_elf = yes \ | |
15130 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15131 | then gcc_cv_as_dwarf2_debug_line=yes | |
15132 | fi | |
15133 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15134 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
15135 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15136 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15137 | (eval $ac_try) 2>&5 | |
15138 | ac_status=$? | |
15139 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15140 | (exit $ac_status); }; } | |
8ada417f | 15141 | then |
080a5bb0 EB |
15142 | if test x$gcc_cv_objdump != x \ |
15143 | && $gcc_cv_objdump -h conftest.o 2> /dev/null \ | |
15144 | | grep debug_line > /dev/null 2>&1; then | |
8ada417f ZW |
15145 | gcc_cv_as_dwarf2_debug_line=yes |
15146 | fi | |
15147 | else | |
15148 | echo "configure: failed program was" >&5 | |
15149 | cat conftest.s >&5 | |
15150 | fi | |
15151 | rm -f conftest.o conftest.s | |
15152 | fi | |
15153 | fi | |
ba479fd2 NN |
15154 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5 |
15155 | echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6 | |
ad9c4d9f | 15156 | |
ad9c4d9f | 15157 | |
8ada417f ZW |
15158 | # The .debug_line file table must be in the exact order that |
15159 | # we specified the files, since these indices are also used | |
15160 | # by DW_AT_decl_file. Approximate this test by testing if | |
15161 | # the assembler bitches if the same index is assigned twice. | |
ba479fd2 NN |
15162 | echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5 |
15163 | echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6 | |
15164 | if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then | |
15165 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15166 | else |
15167 | gcc_cv_as_dwarf2_file_buggy=no | |
15168 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15169 | echo ' .file 1 "foo.s" |
8ada417f | 15170 | .file 1 "bar.s"' > conftest.s |
ba479fd2 NN |
15171 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15172 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15173 | (eval $ac_try) 2>&5 | |
15174 | ac_status=$? | |
15175 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15176 | (exit $ac_status); }; } | |
8ada417f ZW |
15177 | then |
15178 | gcc_cv_as_dwarf2_file_buggy=yes | |
15179 | else | |
15180 | echo "configure: failed program was" >&5 | |
15181 | cat conftest.s >&5 | |
15182 | fi | |
15183 | rm -f conftest.o conftest.s | |
15184 | fi | |
ad9c4d9f | 15185 | fi |
ba479fd2 NN |
15186 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5 |
15187 | echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6 | |
8ada417f ZW |
15188 | |
15189 | ||
15190 | if test $gcc_cv_as_dwarf2_debug_line = yes \ | |
15191 | && test $gcc_cv_as_dwarf2_file_buggy = no; then | |
ba479fd2 NN |
15192 | |
15193 | cat >>confdefs.h <<\_ACEOF | |
9d147085 | 15194 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
ba479fd2 | 15195 | _ACEOF |
9d147085 | 15196 | |
8ada417f | 15197 | fi |
ad9c4d9f | 15198 | |
ba479fd2 NN |
15199 | echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5 |
15200 | echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6 | |
15201 | if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then | |
15202 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15203 | else |
15204 | gcc_cv_as_gdwarf2_flag=no | |
15205 | if test $in_tree_gas = yes; then | |
15206 | if test $in_tree_gas_is_elf = yes \ | |
15207 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15208 | then gcc_cv_as_gdwarf2_flag=yes | |
15209 | fi | |
15210 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15211 | echo "$insn" > conftest.s |
ba479fd2 NN |
15212 | if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5' |
15213 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15214 | (eval $ac_try) 2>&5 | |
15215 | ac_status=$? | |
15216 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15217 | (exit $ac_status); }; } | |
8ada417f ZW |
15218 | then |
15219 | gcc_cv_as_gdwarf2_flag=yes | |
15220 | else | |
15221 | echo "configure: failed program was" >&5 | |
15222 | cat conftest.s >&5 | |
15223 | fi | |
15224 | rm -f conftest.o conftest.s | |
15225 | fi | |
ad9c4d9f | 15226 | fi |
ba479fd2 NN |
15227 | echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5 |
15228 | echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6 | |
63cf211a | 15229 | if test $gcc_cv_as_gdwarf2_flag = yes; then |
ba479fd2 NN |
15230 | |
15231 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 15232 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
ba479fd2 | 15233 | _ACEOF |
5f0e9ea2 GK |
15234 | |
15235 | fi | |
ad9c4d9f | 15236 | |
ba479fd2 NN |
15237 | echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5 |
15238 | echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6 | |
15239 | if test "${gcc_cv_as_gstabs_flag+set}" = set; then | |
15240 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15241 | else |
15242 | gcc_cv_as_gstabs_flag=no | |
15243 | if test $in_tree_gas = yes; then | |
15244 | if test $in_tree_gas_is_elf = yes \ | |
15245 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15246 | then gcc_cv_as_gstabs_flag=yes | |
15247 | fi | |
15248 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15249 | echo "$insn" > conftest.s |
ba479fd2 NN |
15250 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5' |
15251 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15252 | (eval $ac_try) 2>&5 | |
15253 | ac_status=$? | |
15254 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15255 | (exit $ac_status); }; } | |
8ada417f ZW |
15256 | then |
15257 | # The native Solaris 9/Intel assembler doesn't understand --gstabs | |
15258 | # and warns about it, but still exits successfully. So check for | |
15259 | # this. | |
ba479fd2 NN |
15260 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null' |
15261 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15262 | (eval $ac_try) 2>&5 | |
15263 | ac_status=$? | |
15264 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15265 | (exit $ac_status); }; } | |
8ada417f ZW |
15266 | then : |
15267 | else gcc_cv_as_gstabs_flag=yes | |
15268 | fi | |
15269 | else | |
15270 | echo "configure: failed program was" >&5 | |
15271 | cat conftest.s >&5 | |
15272 | fi | |
15273 | rm -f conftest.o conftest.s | |
15274 | fi | |
ad9c4d9f | 15275 | fi |
ba479fd2 NN |
15276 | echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5 |
15277 | echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6 | |
63cf211a | 15278 | if test $gcc_cv_as_gstabs_flag = yes; then |
ba479fd2 NN |
15279 | |
15280 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 15281 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
ba479fd2 | 15282 | _ACEOF |
5f0e9ea2 GK |
15283 | |
15284 | fi | |
8ada417f | 15285 | fi |
5f0e9ea2 | 15286 | |
ba479fd2 NN |
15287 | echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5 |
15288 | echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6 | |
96d0f4dc | 15289 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 15290 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
15291 | 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 \ |
15292 | && test $in_tree_ld_is_elf = yes; then | |
96d0f4dc JJ |
15293 | gcc_cv_ld_ro_rw_mix=read-write |
15294 | fi | |
15295 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
15296 | echo '.section myfoosect, "a"' > conftest1.s |
15297 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 15298 | echo '.byte 1' >> conftest2.s |
90e145da | 15299 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 15300 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
15301 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
15302 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
15303 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 15304 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 15305 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 15306 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 15307 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
15308 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
15309 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
15310 | gcc_cv_ld_ro_rw_mix=read-only | |
15311 | else | |
15312 | gcc_cv_ld_ro_rw_mix=read-write | |
15313 | fi | |
15314 | fi | |
15315 | fi | |
15316 | rm -f conftest.* conftest[123].* | |
15317 | fi | |
15318 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
ba479fd2 NN |
15319 | |
15320 | cat >>confdefs.h <<\_ACEOF | |
96d0f4dc | 15321 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
ba479fd2 | 15322 | _ACEOF |
96d0f4dc JJ |
15323 | |
15324 | fi | |
ba479fd2 NN |
15325 | echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5 |
15326 | echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6 | |
96d0f4dc | 15327 | |
ba479fd2 NN |
15328 | echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5 |
15329 | echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6 | |
275b60d6 | 15330 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 15331 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
15332 | 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 \ |
15333 | && test $in_tree_ld_is_elf = yes; then | |
275b60d6 JJ |
15334 | gcc_cv_ld_eh_frame_hdr=yes |
15335 | fi | |
15336 | elif test x$gcc_cv_ld != x; then | |
15337 | # Check if linker supports --eh-frame-hdr option | |
15338 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
15339 | gcc_cv_ld_eh_frame_hdr=yes | |
15340 | fi | |
15341 | fi | |
232b67d9 | 15342 | |
275b60d6 | 15343 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then |
ba479fd2 NN |
15344 | |
15345 | cat >>confdefs.h <<\_ACEOF | |
275b60d6 | 15346 | #define HAVE_LD_EH_FRAME_HDR 1 |
ba479fd2 | 15347 | _ACEOF |
275b60d6 JJ |
15348 | |
15349 | fi | |
ba479fd2 NN |
15350 | echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5 |
15351 | echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6 | |
275b60d6 | 15352 | |
ba479fd2 NN |
15353 | echo "$as_me:$LINENO: checking linker position independent executable support" >&5 |
15354 | echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6 | |
24a4dd31 JJ |
15355 | gcc_cv_ld_pie=no |
15356 | if test $in_tree_ld = yes ; then | |
5408ac6c HPN |
15357 | 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 \ |
15358 | && test $in_tree_ld_is_elf = yes; then | |
24a4dd31 JJ |
15359 | gcc_cv_ld_pie=yes |
15360 | fi | |
15361 | elif test x$gcc_cv_ld != x; then | |
15362 | # Check if linker supports -pie option | |
15363 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
15364 | gcc_cv_ld_pie=yes | |
15365 | fi | |
15366 | fi | |
15367 | if test x"$gcc_cv_ld_pie" = xyes; then | |
ba479fd2 NN |
15368 | |
15369 | cat >>confdefs.h <<\_ACEOF | |
24a4dd31 | 15370 | #define HAVE_LD_PIE 1 |
ba479fd2 | 15371 | _ACEOF |
24a4dd31 JJ |
15372 | |
15373 | fi | |
ba479fd2 NN |
15374 | echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5 |
15375 | echo "${ECHO_T}$gcc_cv_ld_pie" >&6 | |
24a4dd31 | 15376 | |
8bb915b6 NN |
15377 | # -------- |
15378 | # UNSORTED | |
15379 | # -------- | |
15380 | ||
765f1bf9 AM |
15381 | echo "$as_me:$LINENO: checking linker --as-needed support" >&5 |
15382 | echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6 | |
82e923f6 RS |
15383 | if test "${gcc_cv_ld_as_needed+set}" = set; then |
15384 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15385 | else | |
15386 | gcc_cv_ld_as_needed=no | |
765f1bf9 AM |
15387 | if test $in_tree_ld = yes ; then |
15388 | 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 \ | |
15389 | && test $in_tree_ld_is_elf = yes; then | |
15390 | gcc_cv_ld_as_needed=yes | |
15391 | fi | |
15392 | elif test x$gcc_cv_ld != x; then | |
15393 | # Check if linker supports --as-needed and --no-as-needed options | |
15394 | if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then | |
15395 | gcc_cv_ld_as_needed=yes | |
15396 | fi | |
15397 | fi | |
82e923f6 RS |
15398 | |
15399 | fi | |
15400 | echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5 | |
15401 | echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6 | |
765f1bf9 AM |
15402 | if test x"$gcc_cv_ld_as_needed" = xyes; then |
15403 | ||
15404 | cat >>confdefs.h <<\_ACEOF | |
15405 | #define HAVE_LD_AS_NEEDED 1 | |
15406 | _ACEOF | |
15407 | ||
15408 | fi | |
765f1bf9 | 15409 | |
d82bf747 AM |
15410 | case "$target:$tm_file" in |
15411 | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) | |
85b776df AM |
15412 | echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5 |
15413 | echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6 | |
15414 | if test "${gcc_cv_ld_no_dot_syms+set}" = set; then | |
15415 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15416 | else | |
15417 | gcc_cv_ld_no_dot_syms=no | |
15418 | if test $in_tree_ld = yes ; then | |
15419 | 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 | |
15420 | gcc_cv_ld_no_dot_syms=yes | |
15421 | fi | |
15422 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then | |
15423 | cat > conftest1.s <<EOF | |
15424 | .text | |
15425 | bl .foo | |
15426 | EOF | |
15427 | cat > conftest2.s <<EOF | |
15428 | .section ".opd","aw" | |
15429 | .align 3 | |
15430 | .globl foo | |
15431 | .type foo,@function | |
15432 | foo: | |
15433 | .quad .LEfoo,.TOC.@tocbase,0 | |
15434 | .text | |
15435 | .LEfoo: | |
15436 | blr | |
15437 | .size foo,.-.LEfoo | |
15438 | EOF | |
15439 | if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \ | |
15440 | && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
15441 | && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then | |
15442 | gcc_cv_ld_no_dot_syms=yes | |
15443 | fi | |
15444 | rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s | |
15445 | fi | |
15446 | ||
15447 | fi | |
15448 | echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5 | |
15449 | echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6 | |
15450 | if test x"$gcc_cv_ld_no_dot_syms" = xyes; then | |
15451 | ||
15452 | cat >>confdefs.h <<\_ACEOF | |
15453 | #define HAVE_LD_NO_DOT_SYMS 1 | |
15454 | _ACEOF | |
15455 | ||
15456 | fi | |
15457 | ;; | |
15458 | esac | |
15459 | ||
380e5ca4 MM |
15460 | echo "$as_me:$LINENO: checking linker --sysroot support" >&5 |
15461 | echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6 | |
15462 | if test "${gcc_cv_ld_sysroot+set}" = set; then | |
15463 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15464 | else | |
15465 | gcc_cv_ld_sysroot=no | |
15466 | if test $in_tree_ld = yes ; then | |
15467 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 ; then | |
7032df40 | 15468 | gcc_cv_ld_sysroot=yes |
380e5ca4 MM |
15469 | fi |
15470 | elif test x$gcc_cv_ld != x; then | |
15471 | if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then | |
15472 | gcc_cv_ld_sysroot=yes | |
15473 | fi | |
15474 | fi | |
15475 | fi | |
15476 | echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5 | |
15477 | echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6 | |
15478 | if test x"$gcc_cv_ld_sysroot" = xyes; then | |
15479 | ||
15480 | cat >>confdefs.h <<\_ACEOF | |
15481 | #define HAVE_LD_SYSROOT 1 | |
15482 | _ACEOF | |
15483 | ||
15484 | fi | |
15485 | ||
9fb28a67 | 15486 | if test x$with_sysroot = x && test x$host = x$target \ |
047d636f | 15487 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then |
ba479fd2 NN |
15488 | |
15489 | cat >>confdefs.h <<_ACEOF | |
793e9558 | 15490 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
ba479fd2 | 15491 | _ACEOF |
793e9558 PB |
15492 | |
15493 | fi | |
15494 | ||
77008252 JJ |
15495 | # Test for stack protector support in target C library. |
15496 | case "$target" in | |
15497 | *-*-linux*) | |
15498 | echo "$as_me:$LINENO: checking __stack_chk_fail in target GNU C library" >&5 | |
15499 | echo $ECHO_N "checking __stack_chk_fail in target GNU C library... $ECHO_C" >&6 | |
15500 | if test "${gcc_cv_libc_provides_ssp+set}" = set; then | |
15501 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15502 | else | |
15503 | gcc_cv_libc_provides_ssp=no | |
15504 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then | |
15505 | if test "x$with_sysroot" = x; then | |
15506 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
15507 | elif test "x$with_sysroot" = xyes; then | |
15508 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
15509 | else | |
15510 | glibc_header_dir="${with_sysroot}/usr/include" | |
15511 | fi | |
15512 | else | |
15513 | glibc_header_dir=/usr/include | |
15514 | fi | |
15515 | # glibc 2.4 and later provides __stack_chk_fail and | |
15516 | # either __stack_chk_guard, or TLS access to stack guard canary. | |
15517 | if test -f $glibc_header_dir/features.h \ | |
15518 | && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \ | |
15519 | $glibc_header_dir/features.h > /dev/null; then | |
15520 | if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \ | |
15521 | $glibc_header_dir/features.h > /dev/null; then | |
15522 | gcc_cv_libc_provides_ssp=yes | |
15523 | elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \ | |
15524 | $glibc_header_dir/features.h > /dev/null \ | |
15525 | && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \ | |
15526 | $glibc_header_dir/features.h > /dev/null; then | |
15527 | gcc_cv_libc_provides_ssp=yes | |
15528 | fi | |
15529 | fi | |
15530 | fi | |
15531 | echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5 | |
15532 | echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6 ;; | |
15533 | *) gcc_cv_libc_provides_ssp=no ;; | |
15534 | esac | |
15535 | if test x$gcc_cv_libc_provides_ssp = xyes; then | |
15536 | ||
15537 | cat >>confdefs.h <<\_ACEOF | |
15538 | #define TARGET_LIBC_PROVIDES_SSP 1 | |
15539 | _ACEOF | |
15540 | ||
15541 | fi | |
15542 | ||
81bf3d9e | 15543 | # Find out what GC implementation we want, or may, use. |
ba479fd2 | 15544 | |
81bf3d9e RH |
15545 | # Check whether --with-gc or --without-gc was given. |
15546 | if test "${with_gc+set}" = set; then | |
15547 | withval="$with_gc" | |
15548 | case "$withval" in | |
08cee789 | 15549 | page) |
81bf3d9e | 15550 | GGC=ggc-$withval |
08cee789 DJ |
15551 | ;; |
15552 | zone) | |
15553 | GGC=ggc-$withval | |
15554 | ||
15555 | cat >>confdefs.h <<\_ACEOF | |
15556 | #define GGC_ZONE 1 | |
15557 | _ACEOF | |
15558 | ||
81bf3d9e RH |
15559 | ;; |
15560 | *) | |
ba479fd2 NN |
15561 | { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5 |
15562 | echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;} | |
15563 | { (exit 1); exit 1; }; } | |
81bf3d9e RH |
15564 | ;; |
15565 | esac | |
15566 | else | |
005537df | 15567 | GGC=ggc-page |
ba479fd2 | 15568 | fi; |
81bf3d9e RH |
15569 | |
15570 | echo "Using $GGC for garbage collection." | |
15571 | ||
3c809ba4 | 15572 | # Use the system's zlib library. |
b8dad04b ZW |
15573 | zlibdir=-L../zlib |
15574 | zlibinc="-I\$(srcdir)/../zlib" | |
ba479fd2 | 15575 | |
3c809ba4 AG |
15576 | # Check whether --with-system-zlib or --without-system-zlib was given. |
15577 | if test "${with_system_zlib+set}" = set; then | |
15578 | withval="$with_system_zlib" | |
15579 | zlibdir= | |
15580 | zlibinc= | |
15581 | ||
ba479fd2 | 15582 | fi; |
3c809ba4 AG |
15583 | |
15584 | ||
15585 | ||
dc6746e7 | 15586 | |
ba479fd2 NN |
15587 | echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
15588 | echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 | |
dc6746e7 PT |
15589 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
15590 | if test "${enable_maintainer_mode+set}" = set; then | |
15591 | enableval="$enable_maintainer_mode" | |
15592 | maintainer_mode=$enableval | |
15593 | else | |
15594 | maintainer_mode=no | |
ba479fd2 | 15595 | fi; |
63cf211a | 15596 | |
ba479fd2 NN |
15597 | echo "$as_me:$LINENO: result: $maintainer_mode" >&5 |
15598 | echo "${ECHO_T}$maintainer_mode" >&6 | |
dc6746e7 PT |
15599 | |
15600 | if test "$maintainer_mode" = "yes"; then | |
15601 | MAINT='' | |
15602 | else | |
15603 | MAINT='#' | |
15604 | fi | |
15605 | ||
8bb915b6 NN |
15606 | # -------------- |
15607 | # Language hooks | |
15608 | # -------------- | |
15609 | ||
861bb6c1 JL |
15610 | # Make empty files to contain the specs and options for each language. |
15611 | # Then add #include lines to for a compiler that has specs and/or options. | |
15612 | ||
d7b42618 | 15613 | lang_opt_files= |
861bb6c1 | 15614 | lang_specs_files= |
3103b7db | 15615 | lang_tree_files= |
861bb6c1 JL |
15616 | for subdir in . $subdirs |
15617 | do | |
d7b42618 NB |
15618 | if test -f $srcdir/$subdir/lang.opt; then |
15619 | lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" | |
15620 | fi | |
75bffa71 | 15621 | if test -f $srcdir/$subdir/lang-specs.h; then |
0d24f4d1 | 15622 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" |
861bb6c1 | 15623 | fi |
3103b7db | 15624 | if test -f $srcdir/$subdir/$subdir-tree.def; then |
0d24f4d1 | 15625 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" |
3103b7db | 15626 | fi |
861bb6c1 JL |
15627 | done |
15628 | ||
15629 | # These (without "all_") are set in each config-lang.in. | |
15630 | # `language' must be a single word so is spelled singularly. | |
15631 | all_languages= | |
15632 | all_boot_languages= | |
15633 | all_compilers= | |
15634 | all_stagestuff= | |
53c7ffe7 | 15635 | all_outputs='Makefile gccbug mklibgcc libada-mk' |
861bb6c1 | 15636 | # List of language makefile fragments. |
2ed26f6b ZW |
15637 | all_lang_makefrags= |
15638 | # List of language subdirectory makefiles. Deprecated. | |
861bb6c1 | 15639 | all_lang_makefiles= |
e2500fed | 15640 | # Files for gengtype |
ef69da62 | 15641 | all_gtfiles="$target_gtfiles" |
8ac9d31f TJ |
15642 | # Files for gengtype with language |
15643 | all_gtfiles_files_langs= | |
15644 | all_gtfiles_files_files= | |
861bb6c1 JL |
15645 | |
15646 | # Add the language fragments. | |
15647 | # Languages are added via two mechanisms. Some information must be | |
15648 | # recorded in makefile variables, these are defined in config-lang.in. | |
15649 | # We accumulate them and plug them into the main Makefile. | |
15650 | # The other mechanism is a set of hooks for each of the main targets | |
15651 | # like `clean', `install', etc. | |
15652 | ||
861bb6c1 | 15653 | language_hooks="Make-hooks" |
861bb6c1 | 15654 | |
c406e779 | 15655 | for s in $subdirs |
861bb6c1 | 15656 | do |
861bb6c1 JL |
15657 | language= |
15658 | boot_language= | |
15659 | compilers= | |
15660 | stagestuff= | |
861bb6c1 | 15661 | outputs= |
e2500fed | 15662 | gtfiles= |
861bb6c1 | 15663 | . ${srcdir}/$s/config-lang.in |
75bffa71 | 15664 | if test "x$language" = x |
861bb6c1 JL |
15665 | then |
15666 | echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 | |
15667 | exit 1 | |
15668 | fi | |
2ed26f6b | 15669 | all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in" |
72aaffbd | 15670 | if test -f ${srcdir}/$s/Makefile.in |
2ed26f6b | 15671 | then all_lang_makefiles="$s/Makefile" |
72aaffbd | 15672 | fi |
861bb6c1 | 15673 | all_languages="$all_languages $language" |
75bffa71 | 15674 | if test "x$boot_language" = xyes |
861bb6c1 JL |
15675 | then |
15676 | all_boot_languages="$all_boot_languages $language" | |
15677 | fi | |
15678 | all_compilers="$all_compilers $compilers" | |
15679 | all_stagestuff="$all_stagestuff $stagestuff" | |
861bb6c1 | 15680 | all_outputs="$all_outputs $outputs" |
e2500fed | 15681 | all_gtfiles="$all_gtfiles $gtfiles" |
c406e779 | 15682 | for f in $gtfiles |
8ac9d31f | 15683 | do |
8ac9d31f TJ |
15684 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " |
15685 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8ac9d31f | 15686 | done |
861bb6c1 JL |
15687 | done |
15688 | ||
8ac9d31f TJ |
15689 | # Pick up gtfiles for c |
15690 | gtfiles= | |
15691 | s="c" | |
15692 | . ${srcdir}/c-config-lang.in | |
15693 | all_gtfiles="$all_gtfiles $gtfiles" | |
c406e779 | 15694 | for f in $gtfiles |
8ac9d31f | 15695 | do |
8ac9d31f TJ |
15696 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " |
15697 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8ac9d31f TJ |
15698 | done |
15699 | ||
cbc59f01 | 15700 | check_languages= |
c406e779 | 15701 | for language in $all_languages |
cbc59f01 | 15702 | do |
cbc59f01 | 15703 | check_languages="$check_languages check-$language" |
cbc59f01 DD |
15704 | done |
15705 | ||
62b81e45 MM |
15706 | # We link each language in with a set of hooks, reached indirectly via |
15707 | # lang.${target}. | |
861bb6c1 JL |
15708 | |
15709 | rm -f Make-hooks | |
15710 | touch Make-hooks | |
bd97af06 RÁE |
15711 | target_list="all.cross start.encap rest.encap tags \ |
15712 | install-common install-man \ | |
a541f69d | 15713 | uninstall info man srcextra srcman srcinfo \ |
a03ad584 | 15714 | mostlyclean clean distclean maintainer-clean \ |
8f231b5d | 15715 | stage1 stage2 stage3 stage4 stageprofile stagefeedback" |
861bb6c1 JL |
15716 | for t in $target_list |
15717 | do | |
15718 | x= | |
c406e779 | 15719 | for lang in $all_languages |
861bb6c1 | 15720 | do |
ab87f8c8 | 15721 | x="$x $lang.$t" |
861bb6c1 JL |
15722 | done |
15723 | echo "lang.$t: $x" >> Make-hooks | |
15724 | done | |
15725 | ||
8bb915b6 NN |
15726 | # -------- |
15727 | # UNSORTED | |
15728 | # -------- | |
15729 | ||
cc06d68c | 15730 | # Create .gdbinit. |
861bb6c1 | 15731 | |
cc06d68c GP |
15732 | echo "dir ." > .gdbinit |
15733 | echo "dir ${srcdir}" >> .gdbinit | |
15734 | if test x$gdb_needs_out_file_path = xyes | |
15735 | then | |
15736 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
15737 | fi | |
15738 | if test "x$subdirs" != x; then | |
15739 | for s in $subdirs | |
15740 | do | |
15741 | echo "dir ${srcdir}/$s" >> .gdbinit | |
15742 | done | |
861bb6c1 | 15743 | fi |
cc06d68c | 15744 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 15745 | |
8f8d3278 NC |
15746 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
15747 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
15748 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
15749 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
15750 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
15751 | # make and thus we'd get different behavior depending on where we built the | |
15752 | # sources. | |
5949a9fc | 15753 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
caa55b1e | 15754 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)' |
d062c304 | 15755 | else |
8f8d3278 NC |
15756 | # An explanation of the sed strings: |
15757 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
15758 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
15759 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 15760 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
15761 | # |
15762 | # (*) Note this pattern overwrites the first character of the string | |
15763 | # with a forward slash if one is not already present. This is not a | |
15764 | # problem because the exact names of the sub-directories concerned is | |
15765 | # unimportant, just the number of them matters. | |
15766 | # | |
15767 | # The practical upshot of these patterns is like this: | |
15768 | # | |
15769 | # prefix exec_prefix result | |
15770 | # ------ ----------- ------ | |
15771 | # /foo /foo/bar ../ | |
15772 | # /foo/ /foo/bar ../ | |
15773 | # /foo /foo/bar/ ../ | |
15774 | # /foo/ /foo/bar/ ../ | |
15775 | # /foo /foo/bar/ugg ../../ | |
15776 | # | |
4c112cda | 15777 | dollar='$$' |
caa55b1e | 15778 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)" |
d062c304 JL |
15779 | fi |
15780 | ||
15781 | ||
2ce3c6c6 | 15782 | |
2bbea3a6 RH |
15783 | # Find a directory in which to install a shared libgcc. |
15784 | ||
15785 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
15786 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
15787 | enableval="$enable_version_specific_runtime_libs" | |
ba479fd2 NN |
15788 | |
15789 | fi; | |
2bbea3a6 RH |
15790 | |
15791 | ||
5b15f277 RH |
15792 | # Check whether --with-slibdir or --without-slibdir was given. |
15793 | if test "${with_slibdir+set}" = set; then | |
15794 | withval="$with_slibdir" | |
15795 | slibdir="$with_slibdir" | |
15796 | else | |
15797 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 15798 | slibdir='$(libsubdir)' |
5b15f277 | 15799 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
15800 | slibdir='$(build_tooldir)/lib' |
15801 | else | |
5b15f277 | 15802 | slibdir='$(libdir)' |
2bbea3a6 | 15803 | fi |
ba479fd2 | 15804 | fi; |
2bbea3a6 RH |
15805 | |
15806 | ||
1e6347d8 | 15807 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
15808 | |
15809 | ||
861bb6c1 JL |
15810 | # Substitute configuration variables |
15811 | ||
15812 | ||
15813 | ||
15814 | ||
15815 | ||
15816 | ||
15817 | ||
15818 | ||
15819 | ||
15820 | ||
15821 | ||
15822 | ||
15823 | ||
15824 | ||
15825 | ||
15826 | ||
15827 | ||
15828 | ||
15829 | ||
15830 | ||
15831 | ||
15832 | ||
15833 | ||
15834 | ||
15835 | ||
15836 | ||
15837 | ||
15838 | ||
15839 | ||
15840 | ||
15841 | ||
15842 | ||
15843 | ||
15844 | ||
15845 | ||
15846 | ||
15847 | ||
15848 | ||
15849 | ||
15850 | ||
15851 | ||
15852 | ||
15853 | ||
15854 | ||
15855 | ||
15856 | ||
9b16d2c4 | 15857 | |
e9a25f70 | 15858 | |
6e26218f | 15859 | |
c8724862 | 15860 | |
e061d1ce | 15861 | |
d8bb17c8 | 15862 | |
11642c3a ZW |
15863 | |
15864 | ||
15865 | ||
15866 | ||
15867 | ||
15868 | ||
15869 | ||
3d9d2476 | 15870 | |
e2500fed | 15871 | |
51b9ff45 | 15872 | |
861bb6c1 | 15873 | |
6e3f3080 NN |
15874 | # Echo link setup. |
15875 | if test x${build} = x${host} ; then | |
15876 | if test x${host} = x${target} ; then | |
15877 | echo "Links are now set up to build a native compiler for ${target}." 1>&2 | |
15878 | else | |
15879 | echo "Links are now set up to build a cross-compiler" 1>&2 | |
15880 | echo " from ${host} to ${target}." 1>&2 | |
15881 | fi | |
15882 | else | |
15883 | if test x${host} = x${target} ; then | |
15884 | echo "Links are now set up to build (on ${build}) a native compiler" 1>&2 | |
15885 | echo " for ${target}." 1>&2 | |
15886 | else | |
15887 | echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2 | |
15888 | echo " from ${host} to ${target}." 1>&2 | |
15889 | fi | |
15890 | fi | |
15891 | ||
6de9cd9a DN |
15892 | |
15893 | ||
15894 | ||
6e3f3080 NN |
15895 | # Configure the subdirectories |
15896 | # AC_CONFIG_SUBDIRS($subdirs) | |
15897 | ||
15898 | # Create the Makefile | |
15899 | # and configure language subdirectories | |
ba479fd2 | 15900 | ac_config_files="$ac_config_files $all_outputs" |
914c5af7 NN |
15901 | |
15902 | ||
ba479fd2 | 15903 | ac_config_commands="$ac_config_commands default" |
914c5af7 | 15904 | |
ba479fd2 | 15905 | cat >confcache <<\_ACEOF |
6e3f3080 NN |
15906 | # This file is a shell script that caches the results of configure |
15907 | # tests run on this system so they can be shared between configure | |
ba479fd2 NN |
15908 | # scripts and configure runs, see configure's option --config-cache. |
15909 | # It is not useful on other systems. If it contains results you don't | |
15910 | # want to keep, you may remove or edit it. | |
6e3f3080 | 15911 | # |
ba479fd2 NN |
15912 | # config.status only pays attention to the cache file if you give it |
15913 | # the --recheck option to rerun configure. | |
6e3f3080 | 15914 | # |
ba479fd2 NN |
15915 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
15916 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
15917 | # following values. | |
15918 | ||
15919 | _ACEOF | |
15920 | ||
6e3f3080 NN |
15921 | # The following way of writing the cache mishandles newlines in values, |
15922 | # but we know of no workaround that is simple, portable, and efficient. | |
15923 | # So, don't put newlines in cache variables' values. | |
15924 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
15925 | # and sets the high bit in the cache file unless we assign to the vars. | |
ba479fd2 NN |
15926 | { |
15927 | (set) 2>&1 | | |
15928 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
15929 | *ac_space=\ *) | |
15930 | # `set' does not quote correctly, so add quotes (double-quote | |
15931 | # substitution turns \\\\ into \\, and sed turns \\ into \). | |
15932 | sed -n \ | |
86da66b5 HPN |
15933 | "s/'/'\\\\''/g; |
15934 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
ba479fd2 NN |
15935 | ;; |
15936 | *) | |
15937 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
15938 | sed -n \ | |
86da66b5 | 15939 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
ba479fd2 NN |
15940 | ;; |
15941 | esac; | |
15942 | } | | |
15943 | sed ' | |
15944 | t clear | |
15945 | : clear | |
15946 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
15947 | t end | |
15948 | /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
15949 | : end' >>confcache | |
15950 | if diff $cache_file confcache >/dev/null 2>&1; then :; else | |
6e3f3080 | 15951 | if test -w $cache_file; then |
ba479fd2 NN |
15952 | test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" |
15953 | cat confcache >$cache_file | |
6e3f3080 NN |
15954 | else |
15955 | echo "not updating unwritable cache $cache_file" | |
15956 | fi | |
15957 | fi | |
15958 | rm -f confcache | |
15959 | ||
15960 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
15961 | # Let make expand exec_prefix. | |
15962 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
15963 | ||
ba479fd2 NN |
15964 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
15965 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
15966 | # trailing colons and then remove the whole line if VPATH becomes empty | |
15967 | # (actually we leave an empty line to preserve line numbers). | |
6e3f3080 | 15968 | if test "x$srcdir" = x.; then |
86da66b5 | 15969 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
ba479fd2 NN |
15970 | s/:*\$(srcdir):*/:/; |
15971 | s/:*\${srcdir}:*/:/; | |
15972 | s/:*@srcdir@:*/:/; | |
86da66b5 | 15973 | s/^\([^=]*=[ ]*\):*/\1/; |
ba479fd2 | 15974 | s/:*$//; |
86da66b5 | 15975 | s/^[^=]*=[ ]*$//; |
ba479fd2 | 15976 | }' |
6e3f3080 NN |
15977 | fi |
15978 | ||
63cf211a | 15979 | DEFS=-DHAVE_CONFIG_H |
6e3f3080 | 15980 | |
ba479fd2 NN |
15981 | ac_libobjs= |
15982 | ac_ltlibobjs= | |
15983 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
15984 | # 1. Remove the extension, and $U if already installed. | |
15985 | ac_i=`echo "$ac_i" | | |
86da66b5 | 15986 | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` |
ba479fd2 NN |
15987 | # 2. Add them. |
15988 | ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" | |
15989 | ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' | |
15990 | done | |
15991 | LIBOBJS=$ac_libobjs | |
63cf211a | 15992 | |
ba479fd2 NN |
15993 | LTLIBOBJS=$ac_ltlibobjs |
15994 | ||
15995 | ||
15996 | ||
15997 | : ${CONFIG_STATUS=./config.status} | |
15998 | ac_clean_files_save=$ac_clean_files | |
15999 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
16000 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | |
16001 | echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
16002 | cat >$CONFIG_STATUS <<_ACEOF | |
16003 | #! $SHELL | |
16004 | # Generated by $as_me. | |
6e3f3080 NN |
16005 | # Run this file to recreate the current configuration. |
16006 | # Compiler output produced by configure, useful for debugging | |
ba479fd2 | 16007 | # configure, is in config.log if it exists. |
6e3f3080 | 16008 | |
ba479fd2 NN |
16009 | debug=false |
16010 | ac_cs_recheck=false | |
16011 | ac_cs_silent=false | |
16012 | SHELL=\${CONFIG_SHELL-$SHELL} | |
16013 | _ACEOF | |
16014 | ||
16015 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16016 | ## --------------------- ## | |
16017 | ## M4sh Initialization. ## | |
16018 | ## --------------------- ## | |
16019 | ||
16020 | # Be Bourne compatible | |
16021 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
16022 | emulate sh | |
16023 | NULLCMD=: | |
16024 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
16025 | # is contrary to our usage. Disable this feature. | |
16026 | alias -g '${1+"$@"}'='"$@"' | |
16027 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
16028 | set -o posix | |
16029 | fi | |
86da66b5 | 16030 | DUALCASE=1; export DUALCASE # for MKS sh |
ba479fd2 NN |
16031 | |
16032 | # Support unset when possible. | |
86da66b5 | 16033 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then |
ba479fd2 NN |
16034 | as_unset=unset |
16035 | else | |
16036 | as_unset=false | |
16037 | fi | |
16038 | ||
16039 | ||
16040 | # Work around bugs in pre-3.0 UWIN ksh. | |
16041 | $as_unset ENV MAIL MAILPATH | |
16042 | PS1='$ ' | |
16043 | PS2='> ' | |
16044 | PS4='+ ' | |
16045 | ||
16046 | # NLS nuisances. | |
16047 | for as_var in \ | |
16048 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
16049 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
16050 | LC_TELEPHONE LC_TIME | |
6e3f3080 | 16051 | do |
86da66b5 | 16052 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
ba479fd2 NN |
16053 | eval $as_var=C; export $as_var |
16054 | else | |
16055 | $as_unset $as_var | |
16056 | fi | |
6e3f3080 NN |
16057 | done |
16058 | ||
ba479fd2 NN |
16059 | # Required to use basename. |
16060 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
16061 | as_expr=expr | |
16062 | else | |
16063 | as_expr=false | |
16064 | fi | |
6e3f3080 | 16065 | |
ba479fd2 NN |
16066 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then |
16067 | as_basename=basename | |
16068 | else | |
16069 | as_basename=false | |
16070 | fi | |
6e3f3080 NN |
16071 | |
16072 | ||
ba479fd2 NN |
16073 | # Name of the executable. |
16074 | as_me=`$as_basename "$0" || | |
16075 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
16076 | X"$0" : 'X\(//\)$' \| \ | |
16077 | X"$0" : 'X\(/\)$' \| \ | |
16078 | . : '\(.\)' 2>/dev/null || | |
16079 | echo X/"$0" | | |
16080 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | |
16081 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
16082 | /^X\/\(\/\).*/{ s//\1/; q; } | |
16083 | s/.*/./; q'` | |
16084 | ||
6e3f3080 | 16085 | |
ba479fd2 NN |
16086 | # PATH needs CR, and LINENO needs CR and PATH. |
16087 | # Avoid depending upon Character Ranges. | |
16088 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
16089 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
16090 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
16091 | as_cr_digits='0123456789' | |
16092 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
16093 | ||
16094 | # The user is always right. | |
16095 | if test "${PATH_SEPARATOR+set}" != set; then | |
16096 | echo "#! /bin/sh" >conf$$.sh | |
16097 | echo "exit 0" >>conf$$.sh | |
16098 | chmod +x conf$$.sh | |
16099 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
16100 | PATH_SEPARATOR=';' | |
6e3f3080 | 16101 | else |
ba479fd2 NN |
16102 | PATH_SEPARATOR=: |
16103 | fi | |
16104 | rm -f conf$$.sh | |
16105 | fi | |
16106 | ||
16107 | ||
16108 | as_lineno_1=$LINENO | |
16109 | as_lineno_2=$LINENO | |
16110 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
16111 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
16112 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
16113 | # Find who we are. Look in the path if we contain no path at all | |
16114 | # relative or not. | |
16115 | case $0 in | |
16116 | *[\\/]* ) as_myself=$0 ;; | |
16117 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16118 | for as_dir in $PATH | |
16119 | do | |
16120 | IFS=$as_save_IFS | |
16121 | test -z "$as_dir" && as_dir=. | |
16122 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
16123 | done | |
16124 | ||
16125 | ;; | |
16126 | esac | |
16127 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
16128 | # in which case we are not to be found in the path. | |
16129 | if test "x$as_myself" = x; then | |
16130 | as_myself=$0 | |
16131 | fi | |
16132 | if test ! -f "$as_myself"; then | |
16133 | { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 | |
16134 | echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} | |
16135 | { (exit 1); exit 1; }; } | |
6e3f3080 | 16136 | fi |
ba479fd2 NN |
16137 | case $CONFIG_SHELL in |
16138 | '') | |
16139 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16140 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
16141 | do | |
16142 | IFS=$as_save_IFS | |
16143 | test -z "$as_dir" && as_dir=. | |
16144 | for as_base in sh bash ksh sh5; do | |
16145 | case $as_dir in | |
16146 | /*) | |
16147 | if ("$as_dir/$as_base" -c ' | |
16148 | as_lineno_1=$LINENO | |
16149 | as_lineno_2=$LINENO | |
16150 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
16151 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
16152 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | |
16153 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
16154 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
16155 | CONFIG_SHELL=$as_dir/$as_base | |
16156 | export CONFIG_SHELL | |
16157 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
16158 | fi;; | |
16159 | esac | |
16160 | done | |
16161 | done | |
16162 | ;; | |
16163 | esac | |
16164 | ||
16165 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
16166 | # uniformly replaced by the line number. The first 'sed' inserts a | |
16167 | # line-number line before each line; the second 'sed' does the real | |
16168 | # work. The second script uses 'N' to pair each line-number line | |
16169 | # with the numbered line, and appends trailing '-' during | |
16170 | # substitution so that $LINENO is not a special case at line end. | |
16171 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | |
16172 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | |
16173 | sed '=' <$as_myself | | |
16174 | sed ' | |
16175 | N | |
16176 | s,$,-, | |
16177 | : loop | |
16178 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
16179 | t loop | |
16180 | s,-$,, | |
16181 | s,^['$as_cr_digits']*\n,, | |
16182 | ' >$as_me.lineno && | |
16183 | chmod +x $as_me.lineno || | |
16184 | { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 | |
16185 | echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} | |
16186 | { (exit 1); exit 1; }; } | |
16187 | ||
16188 | # Don't try to exec as it changes $[0], causing all sort of problems | |
16189 | # (the dirname of $[0] is not the place where we might find the | |
16190 | # original and so on. Autoconf is especially sensible to this). | |
16191 | . ./$as_me.lineno | |
16192 | # Exit status is that of the last command. | |
16193 | exit | |
16194 | } | |
16195 | ||
16196 | ||
16197 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | |
16198 | *c*,-n*) ECHO_N= ECHO_C=' | |
16199 | ' ECHO_T=' ' ;; | |
16200 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
16201 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
16202 | esac | |
16203 | ||
16204 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
16205 | as_expr=expr | |
16206 | else | |
16207 | as_expr=false | |
16208 | fi | |
16209 | ||
16210 | rm -f conf$$ conf$$.exe conf$$.file | |
16211 | echo >conf$$.file | |
16212 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
16213 | # We could just check for DJGPP; but this test a) works b) is more generic | |
16214 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
16215 | if test -f conf$$.exe; then | |
16216 | # Don't use ln at all; we don't have any links | |
16217 | as_ln_s='cp -p' | |
6e3f3080 | 16218 | else |
ba479fd2 | 16219 | as_ln_s='ln -s' |
6e3f3080 | 16220 | fi |
ba479fd2 NN |
16221 | elif ln conf$$.file conf$$ 2>/dev/null; then |
16222 | as_ln_s=ln | |
16223 | else | |
16224 | as_ln_s='cp -p' | |
16225 | fi | |
16226 | rm -f conf$$ conf$$.exe conf$$.file | |
16227 | ||
16228 | if mkdir -p . 2>/dev/null; then | |
16229 | as_mkdir_p=: | |
16230 | else | |
86da66b5 | 16231 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
16232 | as_mkdir_p=false |
16233 | fi | |
16234 | ||
16235 | as_executable_p="test -f" | |
16236 | ||
16237 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 16238 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
16239 | |
16240 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 16241 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
16242 | |
16243 | ||
16244 | # IFS | |
16245 | # We need space, tab and new line, in precisely that order. | |
16246 | as_nl=' | |
16247 | ' | |
16248 | IFS=" $as_nl" | |
16249 | ||
16250 | # CDPATH. | |
16251 | $as_unset CDPATH | |
16252 | ||
16253 | exec 6>&1 | |
16254 | ||
16255 | # Open the log real soon, to keep \$[0] and so on meaningful, and to | |
16256 | # report actual input values of CONFIG_FILES etc. instead of their | |
16257 | # values after options handling. Logging --version etc. is OK. | |
16258 | exec 5>>config.log | |
16259 | { | |
16260 | echo | |
16261 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
16262 | ## Running $as_me. ## | |
16263 | _ASBOX | |
16264 | } >&5 | |
16265 | cat >&5 <<_CSEOF | |
16266 | ||
16267 | This file was extended by $as_me, which was | |
8ab705be | 16268 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
16269 | |
16270 | CONFIG_FILES = $CONFIG_FILES | |
16271 | CONFIG_HEADERS = $CONFIG_HEADERS | |
16272 | CONFIG_LINKS = $CONFIG_LINKS | |
16273 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
16274 | $ $0 $@ | |
16275 | ||
16276 | _CSEOF | |
16277 | echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 | |
16278 | echo >&5 | |
16279 | _ACEOF | |
16280 | ||
16281 | # Files that config.status was made for. | |
16282 | if test -n "$ac_config_files"; then | |
16283 | echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS | |
16284 | fi | |
16285 | ||
16286 | if test -n "$ac_config_headers"; then | |
16287 | echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS | |
16288 | fi | |
16289 | ||
16290 | if test -n "$ac_config_links"; then | |
16291 | echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS | |
16292 | fi | |
16293 | ||
16294 | if test -n "$ac_config_commands"; then | |
16295 | echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS | |
16296 | fi | |
16297 | ||
16298 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16299 | ||
16300 | ac_cs_usage="\ | |
16301 | \`$as_me' instantiates files from templates according to the | |
16302 | current configuration. | |
16303 | ||
16304 | Usage: $0 [OPTIONS] [FILE]... | |
16305 | ||
16306 | -h, --help print this help, then exit | |
16307 | -V, --version print version number, then exit | |
16308 | -q, --quiet do not print progress messages | |
16309 | -d, --debug don't remove temporary files | |
16310 | --recheck update $as_me by reconfiguring in the same conditions | |
16311 | --file=FILE[:TEMPLATE] | |
86da66b5 | 16312 | instantiate the configuration file FILE |
ba479fd2 | 16313 | --header=FILE[:TEMPLATE] |
86da66b5 | 16314 | instantiate the configuration header FILE |
ba479fd2 NN |
16315 | |
16316 | Configuration files: | |
16317 | $config_files | |
16318 | ||
16319 | Configuration headers: | |
16320 | $config_headers | |
16321 | ||
16322 | Configuration commands: | |
16323 | $config_commands | |
16324 | ||
16325 | Report bugs to <bug-autoconf@gnu.org>." | |
16326 | _ACEOF | |
16327 | ||
16328 | cat >>$CONFIG_STATUS <<_ACEOF | |
16329 | ac_cs_version="\\ | |
16330 | config.status | |
8ab705be | 16331 | configured by $0, generated by GNU Autoconf 2.59, |
ba479fd2 NN |
16332 | with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" |
16333 | ||
86da66b5 | 16334 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
16335 | This config.status script is free software; the Free Software Foundation |
16336 | gives unlimited permission to copy, distribute and modify it." | |
16337 | srcdir=$srcdir | |
16338 | _ACEOF | |
16339 | ||
16340 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16341 | # If no file are specified by the user, then we need to provide default | |
16342 | # value. By we need to know if files were specified by the user. | |
16343 | ac_need_defaults=: | |
16344 | while test $# != 0 | |
16345 | do | |
16346 | case $1 in | |
16347 | --*=*) | |
16348 | ac_option=`expr "x$1" : 'x\([^=]*\)='` | |
16349 | ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` | |
16350 | ac_shift=: | |
16351 | ;; | |
16352 | -*) | |
16353 | ac_option=$1 | |
16354 | ac_optarg=$2 | |
16355 | ac_shift=shift | |
16356 | ;; | |
16357 | *) # This is not an option, so the user has probably given explicit | |
16358 | # arguments. | |
16359 | ac_option=$1 | |
16360 | ac_need_defaults=false;; | |
16361 | esac | |
16362 | ||
16363 | case $ac_option in | |
16364 | # Handling of the options. | |
16365 | _ACEOF | |
16366 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16367 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
16368 | ac_cs_recheck=: ;; | |
16369 | --version | --vers* | -V ) | |
16370 | echo "$ac_cs_version"; exit 0 ;; | |
16371 | --he | --h) | |
16372 | # Conflict between --help and --header | |
16373 | { { echo "$as_me:$LINENO: error: ambiguous option: $1 | |
16374 | Try \`$0 --help' for more information." >&5 | |
16375 | echo "$as_me: error: ambiguous option: $1 | |
16376 | Try \`$0 --help' for more information." >&2;} | |
16377 | { (exit 1); exit 1; }; };; | |
16378 | --help | --hel | -h ) | |
16379 | echo "$ac_cs_usage"; exit 0 ;; | |
16380 | --debug | --d* | -d ) | |
16381 | debug=: ;; | |
16382 | --file | --fil | --fi | --f ) | |
16383 | $ac_shift | |
16384 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" | |
16385 | ac_need_defaults=false;; | |
16386 | --header | --heade | --head | --hea ) | |
16387 | $ac_shift | |
16388 | CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | |
16389 | ac_need_defaults=false;; | |
16390 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
16391 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
16392 | ac_cs_silent=: ;; | |
16393 | ||
16394 | # This is an error. | |
16395 | -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 | |
16396 | Try \`$0 --help' for more information." >&5 | |
16397 | echo "$as_me: error: unrecognized option: $1 | |
16398 | Try \`$0 --help' for more information." >&2;} | |
16399 | { (exit 1); exit 1; }; } ;; | |
16400 | ||
16401 | *) ac_config_targets="$ac_config_targets $1" ;; | |
16402 | ||
16403 | esac | |
16404 | shift | |
6e3f3080 | 16405 | done |
ba479fd2 NN |
16406 | |
16407 | ac_configure_extra_args= | |
16408 | ||
16409 | if $ac_cs_silent; then | |
16410 | exec 6>/dev/null | |
16411 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
861bb6c1 JL |
16412 | fi |
16413 | ||
ba479fd2 NN |
16414 | _ACEOF |
16415 | cat >>$CONFIG_STATUS <<_ACEOF | |
16416 | if \$ac_cs_recheck; then | |
16417 | echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 | |
16418 | exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
16419 | fi | |
861bb6c1 | 16420 | |
ba479fd2 NN |
16421 | _ACEOF |
16422 | ||
16423 | cat >>$CONFIG_STATUS <<_ACEOF | |
16424 | # | |
16425 | # INIT-COMMANDS section. | |
16426 | # | |
16427 | ||
16428 | subdirs='$subdirs' | |
ba479fd2 NN |
16429 | |
16430 | _ACEOF | |
16431 | ||
16432 | ||
16433 | ||
16434 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16435 | for ac_config_target in $ac_config_targets | |
16436 | do | |
16437 | case "$ac_config_target" in | |
16438 | # Handling of arguments. | |
16439 | "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; | |
16440 | "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
16441 | "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; | |
16442 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 | |
16443 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | |
16444 | { (exit 1); exit 1; }; };; | |
861bb6c1 | 16445 | esac |
ba479fd2 NN |
16446 | done |
16447 | ||
16448 | # If the user did not use the arguments to specify the items to instantiate, | |
16449 | # then the envvar interface is used. Set only those that are not. | |
16450 | # We use the long form for the default assignment because of an extremely | |
16451 | # bizarre bug on SunOS 4.1.3. | |
16452 | if $ac_need_defaults; then | |
16453 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
16454 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
16455 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
16456 | fi | |
16457 | ||
16458 | # Have a temporary directory for convenience. Make it in the build tree | |
16459 | # simply because there is no reason to put it here, and in addition, | |
16460 | # creating and moving files from /tmp can sometimes cause problems. | |
16461 | # Create a temporary directory, and hook for its removal unless debugging. | |
16462 | $debug || | |
16463 | { | |
16464 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 | |
16465 | trap '{ (exit 1); exit 1; }' 1 2 13 15 | |
16466 | } | |
861bb6c1 | 16467 | |
ba479fd2 | 16468 | # Create a (secure) tmp directory for tmp files. |
6e3f3080 | 16469 | |
ba479fd2 NN |
16470 | { |
16471 | tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && | |
16472 | test -n "$tmp" && test -d "$tmp" | |
16473 | } || | |
16474 | { | |
16475 | tmp=./confstat$$-$RANDOM | |
16476 | (umask 077 && mkdir $tmp) | |
16477 | } || | |
16478 | { | |
16479 | echo "$me: cannot create a temporary directory in ." >&2 | |
16480 | { (exit 1); exit 1; } | |
16481 | } | |
16482 | ||
16483 | _ACEOF | |
16484 | ||
16485 | cat >>$CONFIG_STATUS <<_ACEOF | |
16486 | ||
16487 | # | |
16488 | # CONFIG_FILES section. | |
16489 | # | |
16490 | ||
16491 | # No need to generate the scripts if there are no CONFIG_FILES. | |
16492 | # This happens for instance when ./config.status config.h | |
16493 | if test -n "\$CONFIG_FILES"; then | |
16494 | # Protect against being on the right side of a sed subst in config.status. | |
16495 | sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; | |
16496 | s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF | |
16497 | s,@SHELL@,$SHELL,;t t | |
16498 | s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t | |
16499 | s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t | |
16500 | s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t | |
16501 | s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t | |
16502 | s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t | |
16503 | s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t | |
16504 | s,@exec_prefix@,$exec_prefix,;t t | |
16505 | s,@prefix@,$prefix,;t t | |
16506 | s,@program_transform_name@,$program_transform_name,;t t | |
16507 | s,@bindir@,$bindir,;t t | |
16508 | s,@sbindir@,$sbindir,;t t | |
16509 | s,@libexecdir@,$libexecdir,;t t | |
16510 | s,@datadir@,$datadir,;t t | |
16511 | s,@sysconfdir@,$sysconfdir,;t t | |
16512 | s,@sharedstatedir@,$sharedstatedir,;t t | |
16513 | s,@localstatedir@,$localstatedir,;t t | |
16514 | s,@libdir@,$libdir,;t t | |
16515 | s,@includedir@,$includedir,;t t | |
16516 | s,@oldincludedir@,$oldincludedir,;t t | |
16517 | s,@infodir@,$infodir,;t t | |
16518 | s,@mandir@,$mandir,;t t | |
16519 | s,@build_alias@,$build_alias,;t t | |
16520 | s,@host_alias@,$host_alias,;t t | |
16521 | s,@target_alias@,$target_alias,;t t | |
16522 | s,@DEFS@,$DEFS,;t t | |
16523 | s,@ECHO_C@,$ECHO_C,;t t | |
16524 | s,@ECHO_N@,$ECHO_N,;t t | |
16525 | s,@ECHO_T@,$ECHO_T,;t t | |
16526 | s,@LIBS@,$LIBS,;t t | |
16527 | s,@build@,$build,;t t | |
16528 | s,@build_cpu@,$build_cpu,;t t | |
16529 | s,@build_vendor@,$build_vendor,;t t | |
16530 | s,@build_os@,$build_os,;t t | |
16531 | s,@host@,$host,;t t | |
16532 | s,@host_cpu@,$host_cpu,;t t | |
16533 | s,@host_vendor@,$host_vendor,;t t | |
16534 | s,@host_os@,$host_os,;t t | |
16535 | s,@target@,$target,;t t | |
16536 | s,@target_cpu@,$target_cpu,;t t | |
16537 | s,@target_vendor@,$target_vendor,;t t | |
16538 | s,@target_os@,$target_os,;t t | |
8f1529e6 | 16539 | s,@target_noncanonical@,$target_noncanonical,;t t |
ba479fd2 NN |
16540 | s,@build_subdir@,$build_subdir,;t t |
16541 | s,@host_subdir@,$host_subdir,;t t | |
16542 | s,@target_subdir@,$target_subdir,;t t | |
03787dfd | 16543 | s,@GENINSRC@,$GENINSRC,;t t |
ba479fd2 NN |
16544 | s,@CC@,$CC,;t t |
16545 | s,@CFLAGS@,$CFLAGS,;t t | |
16546 | s,@LDFLAGS@,$LDFLAGS,;t t | |
16547 | s,@CPPFLAGS@,$CPPFLAGS,;t t | |
16548 | s,@ac_ct_CC@,$ac_ct_CC,;t t | |
16549 | s,@EXEEXT@,$EXEEXT,;t t | |
16550 | s,@OBJEXT@,$OBJEXT,;t t | |
16551 | s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t | |
16552 | s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t | |
16553 | s,@CPP@,$CPP,;t t | |
bf3b7cd3 | 16554 | s,@EGREP@,$EGREP,;t t |
ba479fd2 NN |
16555 | s,@strict1_warn@,$strict1_warn,;t t |
16556 | s,@warn_cflags@,$warn_cflags,;t t | |
16557 | s,@WERROR@,$WERROR,;t t | |
16558 | s,@nocommon_flag@,$nocommon_flag,;t t | |
13f05fd0 | 16559 | s,@TREEBROWSER@,$TREEBROWSER,;t t |
ba479fd2 NN |
16560 | s,@valgrind_path@,$valgrind_path,;t t |
16561 | s,@valgrind_path_defines@,$valgrind_path_defines,;t t | |
16562 | s,@valgrind_command@,$valgrind_command,;t t | |
16563 | s,@coverage_flags@,$coverage_flags,;t t | |
16564 | s,@enable_multilib@,$enable_multilib,;t t | |
486aa804 | 16565 | s,@enable_decimal_float@,$enable_decimal_float,;t t |
ba479fd2 NN |
16566 | s,@enable_shared@,$enable_shared,;t t |
16567 | s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t | |
16568 | s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t | |
16569 | s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t | |
16570 | s,@onestep@,$onestep,;t t | |
16571 | s,@SET_MAKE@,$SET_MAKE,;t t | |
16572 | s,@AWK@,$AWK,;t t | |
ba479fd2 | 16573 | s,@LN_S@,$LN_S,;t t |
41e622a8 | 16574 | s,@LN@,$LN,;t t |
ba479fd2 NN |
16575 | s,@RANLIB@,$RANLIB,;t t |
16576 | s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | |
343a6100 | 16577 | s,@ranlib_flags@,$ranlib_flags,;t t |
ba479fd2 NN |
16578 | s,@INSTALL@,$INSTALL,;t t |
16579 | s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t | |
16580 | s,@INSTALL_DATA@,$INSTALL_DATA,;t t | |
16581 | s,@make_compare_target@,$make_compare_target,;t t | |
16582 | s,@have_mktemp_command@,$have_mktemp_command,;t t | |
16583 | s,@MAKEINFO@,$MAKEINFO,;t t | |
16584 | s,@BUILD_INFO@,$BUILD_INFO,;t t | |
16585 | s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t | |
16586 | s,@FLEX@,$FLEX,;t t | |
16587 | s,@BISON@,$BISON,;t t | |
f6a874ac JW |
16588 | s,@NM@,$NM,;t t |
16589 | s,@AR@,$AR,;t t | |
ba479fd2 NN |
16590 | s,@stage1_cflags@,$stage1_cflags,;t t |
16591 | s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t | |
16592 | s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t | |
16593 | s,@LDEXP_LIB@,$LDEXP_LIB,;t t | |
16594 | s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t | |
16595 | s,@LIBICONV@,$LIBICONV,;t t | |
dfb77e37 | 16596 | s,@LTLIBICONV@,$LTLIBICONV,;t t |
ba479fd2 NN |
16597 | s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t |
16598 | s,@manext@,$manext,;t t | |
16599 | s,@objext@,$objext,;t t | |
8bb915b6 | 16600 | s,@gthread_flags@,$gthread_flags,;t t |
ba479fd2 | 16601 | s,@extra_modes_file@,$extra_modes_file,;t t |
75685792 | 16602 | s,@extra_opt_files@,$extra_opt_files,;t t |
ba479fd2 NN |
16603 | s,@USE_NLS@,$USE_NLS,;t t |
16604 | s,@LIBINTL@,$LIBINTL,;t t | |
16605 | s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t | |
16606 | s,@INCINTL@,$INCINTL,;t t | |
16607 | s,@XGETTEXT@,$XGETTEXT,;t t | |
16608 | s,@GMSGFMT@,$GMSGFMT,;t t | |
16609 | s,@POSUB@,$POSUB,;t t | |
16610 | s,@CATALOGS@,$CATALOGS,;t t | |
5395b47b | 16611 | s,@host_cc_for_libada@,$host_cc_for_libada,;t t |
ba479fd2 NN |
16612 | s,@CROSS@,$CROSS,;t t |
16613 | s,@ALL@,$ALL,;t t | |
16614 | s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t | |
16615 | s,@inhibit_libc@,$inhibit_libc,;t t | |
ba479fd2 NN |
16616 | s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t |
16617 | s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t | |
16618 | s,@STMP_FIXINC@,$STMP_FIXINC,;t t | |
16619 | s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t | |
c38f02df | 16620 | s,@collect2@,$collect2,;t t |
9f18db39 PB |
16621 | s,@gcc_cv_as@,$gcc_cv_as,;t t |
16622 | s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t | |
16623 | s,@gcc_cv_ld@,$gcc_cv_ld,;t t | |
16624 | s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t | |
16625 | s,@gcc_cv_nm@,$gcc_cv_nm,;t t | |
16626 | s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t | |
d739199a | 16627 | s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t |
ba479fd2 | 16628 | s,@libgcc_visibility@,$libgcc_visibility,;t t |
ba479fd2 NN |
16629 | s,@GGC@,$GGC,;t t |
16630 | s,@zlibdir@,$zlibdir,;t t | |
16631 | s,@zlibinc@,$zlibinc,;t t | |
16632 | s,@MAINT@,$MAINT,;t t | |
16633 | s,@gcc_tooldir@,$gcc_tooldir,;t t | |
16634 | s,@dollar@,$dollar,;t t | |
16635 | s,@slibdir@,$slibdir,;t t | |
16636 | s,@objdir@,$objdir,;t t | |
16637 | s,@subdirs@,$subdirs,;t t | |
16638 | s,@srcdir@,$srcdir,;t t | |
ba479fd2 NN |
16639 | s,@all_boot_languages@,$all_boot_languages,;t t |
16640 | s,@all_compilers@,$all_compilers,;t t | |
16641 | s,@all_gtfiles@,$all_gtfiles,;t t | |
16642 | s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t | |
16643 | s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t | |
16644 | s,@all_lang_makefrags@,$all_lang_makefrags,;t t | |
16645 | s,@all_lang_makefiles@,$all_lang_makefiles,;t t | |
16646 | s,@all_languages@,$all_languages,;t t | |
16647 | s,@all_stagestuff@,$all_stagestuff,;t t | |
16648 | s,@build_exeext@,$build_exeext,;t t | |
16649 | s,@build_install_headers_dir@,$build_install_headers_dir,;t t | |
16650 | s,@build_xm_file_list@,$build_xm_file_list,;t t | |
16651 | s,@build_xm_include_list@,$build_xm_include_list,;t t | |
16652 | s,@build_xm_defines@,$build_xm_defines,;t t | |
16653 | s,@check_languages@,$check_languages,;t t | |
16654 | s,@cc_set_by_configure@,$cc_set_by_configure,;t t | |
16655 | s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t | |
16656 | s,@cpp_install_dir@,$cpp_install_dir,;t t | |
16657 | s,@xmake_file@,$xmake_file,;t t | |
16658 | s,@tmake_file@,$tmake_file,;t t | |
30500d84 | 16659 | s,@extra_gcc_objs@,$extra_gcc_objs,;t t |
ba479fd2 NN |
16660 | s,@extra_headers_list@,$extra_headers_list,;t t |
16661 | s,@extra_objs@,$extra_objs,;t t | |
16662 | s,@extra_parts@,$extra_parts,;t t | |
16663 | s,@extra_passes@,$extra_passes,;t t | |
16664 | s,@extra_programs@,$extra_programs,;t t | |
16665 | s,@float_h_file@,$float_h_file,;t t | |
16666 | s,@gcc_config_arguments@,$gcc_config_arguments,;t t | |
16667 | s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t | |
16668 | s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t | |
ba479fd2 | 16669 | s,@host_exeext@,$host_exeext,;t t |
ba479fd2 NN |
16670 | s,@host_xm_file_list@,$host_xm_file_list,;t t |
16671 | s,@host_xm_include_list@,$host_xm_include_list,;t t | |
16672 | s,@host_xm_defines@,$host_xm_defines,;t t | |
16673 | s,@out_host_hook_obj@,$out_host_hook_obj,;t t | |
16674 | s,@install@,$install,;t t | |
16675 | s,@lang_opt_files@,$lang_opt_files,;t t | |
16676 | s,@lang_specs_files@,$lang_specs_files,;t t | |
16677 | s,@lang_tree_files@,$lang_tree_files,;t t | |
16678 | s,@local_prefix@,$local_prefix,;t t | |
16679 | s,@md_file@,$md_file,;t t | |
16680 | s,@objc_boehm_gc@,$objc_boehm_gc,;t t | |
16681 | s,@out_file@,$out_file,;t t | |
16682 | s,@out_object_file@,$out_object_file,;t t | |
16683 | s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t | |
16684 | s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t | |
ba479fd2 NN |
16685 | s,@thread_file@,$thread_file,;t t |
16686 | s,@tm_file_list@,$tm_file_list,;t t | |
16687 | s,@tm_include_list@,$tm_include_list,;t t | |
16688 | s,@tm_defines@,$tm_defines,;t t | |
16689 | s,@tm_p_file_list@,$tm_p_file_list,;t t | |
16690 | s,@tm_p_include_list@,$tm_p_include_list,;t t | |
16691 | s,@xm_file_list@,$xm_file_list,;t t | |
16692 | s,@xm_include_list@,$xm_include_list,;t t | |
16693 | s,@xm_defines@,$xm_defines,;t t | |
ba479fd2 NN |
16694 | s,@c_target_objs@,$c_target_objs,;t t |
16695 | s,@cxx_target_objs@,$cxx_target_objs,;t t | |
16696 | s,@target_cpu_default@,$target_cpu_default,;t t | |
6de9cd9a DN |
16697 | s,@GMPLIBS@,$GMPLIBS,;t t |
16698 | s,@GMPINC@,$GMPINC,;t t | |
ba479fd2 NN |
16699 | s,@LIBOBJS@,$LIBOBJS,;t t |
16700 | s,@LTLIBOBJS@,$LTLIBOBJS,;t t | |
16701 | /@language_hooks@/r $language_hooks | |
16702 | s,@language_hooks@,,;t t | |
16703 | CEOF | |
16704 | ||
16705 | _ACEOF | |
16706 | ||
16707 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16708 | # Split the substitutions into bite-sized pieces for seds with | |
16709 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
16710 | ac_max_sed_lines=48 | |
16711 | ac_sed_frag=1 # Number of current file. | |
16712 | ac_beg=1 # First line for current file. | |
16713 | ac_end=$ac_max_sed_lines # Line after last line for current file. | |
16714 | ac_more_lines=: | |
16715 | ac_sed_cmds= | |
16716 | while $ac_more_lines; do | |
16717 | if test $ac_beg -gt 1; then | |
16718 | sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
16719 | else | |
16720 | sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
16721 | fi | |
16722 | if test ! -s $tmp/subs.frag; then | |
16723 | ac_more_lines=false | |
16724 | else | |
16725 | # The purpose of the label and of the branching condition is to | |
16726 | # speed up the sed processing (if there are no `@' at all, there | |
16727 | # is no need to browse any of the substitutions). | |
16728 | # These are the two extra sed commands mentioned above. | |
16729 | (echo ':t | |
16730 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed | |
16731 | if test -z "$ac_sed_cmds"; then | |
86da66b5 | 16732 | ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 | 16733 | else |
86da66b5 | 16734 | ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 NN |
16735 | fi |
16736 | ac_sed_frag=`expr $ac_sed_frag + 1` | |
16737 | ac_beg=$ac_end | |
16738 | ac_end=`expr $ac_end + $ac_max_sed_lines` | |
16739 | fi | |
16740 | done | |
16741 | if test -z "$ac_sed_cmds"; then | |
16742 | ac_sed_cmds=cat | |
63cf211a | 16743 | fi |
ba479fd2 | 16744 | fi # test -n "$CONFIG_FILES" |
cafe096b | 16745 | |
ba479fd2 NN |
16746 | _ACEOF |
16747 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16748 | for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue | |
16749 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
16750 | case $ac_file in | |
16751 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
16752 | cat >$tmp/stdin |
16753 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
16754 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 16755 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 16756 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 16757 | * ) ac_file_in=$ac_file.in ;; |
63cf211a | 16758 | esac |
cafe096b | 16759 | |
ba479fd2 NN |
16760 | # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. |
16761 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
16762 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
16763 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
16764 | X"$ac_file" : 'X\(//\)$' \| \ | |
16765 | X"$ac_file" : 'X\(/\)' \| \ | |
16766 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
16767 | echo X"$ac_file" | |
16768 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
16769 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
16770 | /^X\(\/\/\)$/{ s//\1/; q; } | |
16771 | /^X\(\/\).*/{ s//\1/; q; } | |
16772 | s/.*/./; q'` | |
16773 | { if $as_mkdir_p; then | |
16774 | mkdir -p "$ac_dir" | |
16775 | else | |
16776 | as_dir="$ac_dir" | |
16777 | as_dirs= | |
16778 | while test ! -d "$as_dir"; do | |
16779 | as_dirs="$as_dir $as_dirs" | |
16780 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
16781 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
16782 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
16783 | X"$as_dir" : 'X\(//\)$' \| \ | |
16784 | X"$as_dir" : 'X\(/\)' \| \ | |
16785 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
16786 | echo X"$as_dir" | |
16787 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
16788 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
16789 | /^X\(\/\/\)$/{ s//\1/; q; } | |
16790 | /^X\(\/\).*/{ s//\1/; q; } | |
16791 | s/.*/./; q'` | |
16792 | done | |
16793 | test ! -n "$as_dirs" || mkdir $as_dirs | |
16794 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
16795 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
16796 | { (exit 1); exit 1; }; }; } | |
6e3f3080 | 16797 | |
ba479fd2 NN |
16798 | ac_builddir=. |
16799 | ||
16800 | if test "$ac_dir" != .; then | |
16801 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
16802 | # A "../" for each directory in $ac_dir_suffix. | |
16803 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
16804 | else | |
16805 | ac_dir_suffix= ac_top_builddir= | |
16806 | fi | |
16807 | ||
16808 | case $srcdir in | |
16809 | .) # No --srcdir option. We are building in place. | |
16810 | ac_srcdir=. | |
16811 | if test -z "$ac_top_builddir"; then | |
16812 | ac_top_srcdir=. | |
16813 | else | |
16814 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
16815 | fi ;; | |
16816 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
16817 | ac_srcdir=$srcdir$ac_dir_suffix; | |
16818 | ac_top_srcdir=$srcdir ;; | |
16819 | *) # Relative path. | |
16820 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
16821 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
16822 | esac | |
8ab705be KC |
16823 | |
16824 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
16825 | # the directories may not exist. | |
16826 | case `pwd` in | |
16827 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 16828 | *) |
8ab705be KC |
16829 | case "$ac_dir" in |
16830 | .) ac_abs_builddir=`pwd`;; | |
16831 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
16832 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
16833 | esac;; |
16834 | esac | |
8ab705be | 16835 | case $ac_abs_builddir in |
86da66b5 HPN |
16836 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
16837 | *) | |
16838 | case ${ac_top_builddir}. in | |
8ab705be | 16839 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 16840 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 16841 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
16842 | esac;; |
16843 | esac | |
8ab705be | 16844 | case $ac_abs_builddir in |
86da66b5 HPN |
16845 | .) ac_abs_srcdir=$ac_srcdir;; |
16846 | *) | |
16847 | case $ac_srcdir in | |
8ab705be | 16848 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 16849 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 16850 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
16851 | esac;; |
16852 | esac | |
8ab705be | 16853 | case $ac_abs_builddir in |
86da66b5 HPN |
16854 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
16855 | *) | |
16856 | case $ac_top_srcdir in | |
8ab705be | 16857 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 16858 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 16859 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
16860 | esac;; |
16861 | esac | |
ba479fd2 NN |
16862 | |
16863 | ||
16864 | ||
ba479fd2 NN |
16865 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
16866 | # use $as_me), people would be surprised to read: | |
16867 | # /* config.h. Generated by config.status. */ | |
16868 | if test x"$ac_file" = x-; then | |
16869 | configure_input= | |
16870 | else | |
16871 | configure_input="$ac_file. " | |
16872 | fi | |
16873 | configure_input=$configure_input"Generated from `echo $ac_file_in | | |
86da66b5 | 16874 | sed 's,.*/,,'` by configure." |
ba479fd2 NN |
16875 | |
16876 | # First look for the input files in the build tree, otherwise in the | |
16877 | # src tree. | |
16878 | ac_file_inputs=`IFS=: | |
16879 | for f in $ac_file_in; do | |
16880 | case $f in | |
16881 | -) echo $tmp/stdin ;; | |
16882 | [\\/$]*) | |
86da66b5 HPN |
16883 | # Absolute (can't be DOS-style, as IFS=:) |
16884 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
16885 | echo "$as_me: error: cannot find input file: $f" >&2;} |
16886 | { (exit 1); exit 1; }; } | |
86da66b5 | 16887 | echo "$f";; |
ba479fd2 | 16888 | *) # Relative |
86da66b5 HPN |
16889 | if test -f "$f"; then |
16890 | # Build tree | |
16891 | echo "$f" | |
16892 | elif test -f "$srcdir/$f"; then | |
16893 | # Source tree | |
16894 | echo "$srcdir/$f" | |
16895 | else | |
16896 | # /dev/null tree | |
16897 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
16898 | echo "$as_me: error: cannot find input file: $f" >&2;} |
16899 | { (exit 1); exit 1; }; } | |
86da66b5 | 16900 | fi;; |
ba479fd2 NN |
16901 | esac |
16902 | done` || { (exit 1); exit 1; } | |
e8b05380 PB |
16903 | |
16904 | if test x"$ac_file" != x-; then | |
16905 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
16906 | echo "$as_me: creating $ac_file" >&6;} | |
16907 | rm -f "$ac_file" | |
16908 | fi | |
ba479fd2 NN |
16909 | _ACEOF |
16910 | cat >>$CONFIG_STATUS <<_ACEOF | |
16911 | sed "$ac_vpsub | |
16912 | $extrasub | |
16913 | _ACEOF | |
16914 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16915 | :t | |
16916 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
16917 | s,@configure_input@,$configure_input,;t t | |
16918 | s,@srcdir@,$ac_srcdir,;t t | |
16919 | s,@abs_srcdir@,$ac_abs_srcdir,;t t | |
16920 | s,@top_srcdir@,$ac_top_srcdir,;t t | |
16921 | s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t | |
16922 | s,@builddir@,$ac_builddir,;t t | |
16923 | s,@abs_builddir@,$ac_abs_builddir,;t t | |
16924 | s,@top_builddir@,$ac_top_builddir,;t t | |
16925 | s,@abs_top_builddir@,$ac_abs_top_builddir,;t t | |
16926 | " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out | |
16927 | rm -f $tmp/stdin | |
16928 | if test x"$ac_file" != x-; then | |
16929 | mv $tmp/out $ac_file | |
16930 | else | |
16931 | cat $tmp/out | |
16932 | rm -f $tmp/out | |
16933 | fi | |
16934 | ||
16935 | done | |
16936 | _ACEOF | |
16937 | cat >>$CONFIG_STATUS <<\_ACEOF | |
6e3f3080 | 16938 | |
ba479fd2 NN |
16939 | # |
16940 | # CONFIG_HEADER section. | |
16941 | # | |
861bb6c1 JL |
16942 | |
16943 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
16944 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
16945 | # | |
16946 | # ac_d sets the value in "#define NAME VALUE" lines. | |
86da66b5 HPN |
16947 | ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
16948 | ac_dB='[ ].*$,\1#\2' | |
ba479fd2 NN |
16949 | ac_dC=' ' |
16950 | ac_dD=',;t' | |
16951 | # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
86da66b5 | 16952 | ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
ba479fd2 | 16953 | ac_uB='$,\1#\2define\3' |
861bb6c1 | 16954 | ac_uC=' ' |
ba479fd2 NN |
16955 | ac_uD=',;t' |
16956 | ||
16957 | for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue | |
861bb6c1 | 16958 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
ba479fd2 NN |
16959 | case $ac_file in |
16960 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
16961 | cat >$tmp/stdin |
16962 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
16963 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 16964 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 16965 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 16966 | * ) ac_file_in=$ac_file.in ;; |
861bb6c1 JL |
16967 | esac |
16968 | ||
ba479fd2 NN |
16969 | test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 |
16970 | echo "$as_me: creating $ac_file" >&6;} | |
16971 | ||
16972 | # First look for the input files in the build tree, otherwise in the | |
16973 | # src tree. | |
16974 | ac_file_inputs=`IFS=: | |
16975 | for f in $ac_file_in; do | |
16976 | case $f in | |
16977 | -) echo $tmp/stdin ;; | |
16978 | [\\/$]*) | |
86da66b5 HPN |
16979 | # Absolute (can't be DOS-style, as IFS=:) |
16980 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
16981 | echo "$as_me: error: cannot find input file: $f" >&2;} |
16982 | { (exit 1); exit 1; }; } | |
86da66b5 HPN |
16983 | # Do quote $f, to prevent DOS paths from being IFS'd. |
16984 | echo "$f";; | |
ba479fd2 | 16985 | *) # Relative |
86da66b5 HPN |
16986 | if test -f "$f"; then |
16987 | # Build tree | |
16988 | echo "$f" | |
16989 | elif test -f "$srcdir/$f"; then | |
16990 | # Source tree | |
16991 | echo "$srcdir/$f" | |
16992 | else | |
16993 | # /dev/null tree | |
16994 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
16995 | echo "$as_me: error: cannot find input file: $f" >&2;} |
16996 | { (exit 1); exit 1; }; } | |
86da66b5 | 16997 | fi;; |
ba479fd2 NN |
16998 | esac |
16999 | done` || { (exit 1); exit 1; } | |
17000 | # Remove the trailing spaces. | |
86da66b5 | 17001 | sed 's/[ ]*$//' $ac_file_inputs >$tmp/in |
ba479fd2 NN |
17002 | |
17003 | _ACEOF | |
17004 | ||
17005 | # Transform confdefs.h into two sed scripts, `conftest.defines' and | |
17006 | # `conftest.undefs', that substitutes the proper values into | |
17007 | # config.h.in to produce config.h. The first handles `#define' | |
17008 | # templates, and the second `#undef' templates. | |
17009 | # And first: Protect against being on the right side of a sed subst in | |
17010 | # config.status. Protect against being in an unquoted here document | |
17011 | # in config.status. | |
17012 | rm -f conftest.defines conftest.undefs | |
17013 | # Using a here document instead of a string reduces the quoting nightmare. | |
17014 | # Putting comments in sed scripts is not portable. | |
17015 | # | |
17016 | # `end' is used to avoid that the second main sed command (meant for | |
17017 | # 0-ary CPP macros) applies to n-ary macro definitions. | |
17018 | # See the Autoconf documentation for `clear'. | |
17019 | cat >confdef2sed.sed <<\_ACEOF | |
17020 | s/[\\&,]/\\&/g | |
17021 | s,[\\$`],\\&,g | |
17022 | t clear | |
17023 | : clear | |
86da66b5 | 17024 | s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp |
ba479fd2 | 17025 | t end |
86da66b5 | 17026 | s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp |
ba479fd2 NN |
17027 | : end |
17028 | _ACEOF | |
17029 | # If some macros were called several times there might be several times | |
17030 | # the same #defines, which is useless. Nevertheless, we may not want to | |
17031 | # sort them, since we want the *last* AC-DEFINE to be honored. | |
17032 | uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines | |
17033 | sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs | |
17034 | rm -f confdef2sed.sed | |
861bb6c1 JL |
17035 | |
17036 | # This sed command replaces #undef with comments. This is necessary, for | |
17037 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
17038 | # on some systems where configure will not decide to define it. | |
ba479fd2 | 17039 | cat >>conftest.undefs <<\_ACEOF |
86da66b5 | 17040 | s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, |
ba479fd2 NN |
17041 | _ACEOF |
17042 | ||
17043 | # Break up conftest.defines because some shells have a limit on the size | |
17044 | # of here documents, and old seds have small limits too (100 cmds). | |
17045 | echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS | |
86da66b5 | 17046 | echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS |
ba479fd2 NN |
17047 | echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS |
17048 | echo ' :' >>$CONFIG_STATUS | |
17049 | rm -f conftest.tail | |
17050 | while grep . conftest.defines >/dev/null | |
17051 | do | |
17052 | # Write a limited-size here document to $tmp/defines.sed. | |
17053 | echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS | |
17054 | # Speed up: don't consider the non `#define' lines. | |
86da66b5 | 17055 | echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
17056 | # Work around the forget-to-reset-the-flag bug. |
17057 | echo 't clr' >>$CONFIG_STATUS | |
17058 | echo ': clr' >>$CONFIG_STATUS | |
17059 | sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS | |
17060 | echo 'CEOF | |
17061 | sed -f $tmp/defines.sed $tmp/in >$tmp/out | |
17062 | rm -f $tmp/in | |
17063 | mv $tmp/out $tmp/in | |
17064 | ' >>$CONFIG_STATUS | |
17065 | sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail | |
17066 | rm -f conftest.defines | |
17067 | mv conftest.tail conftest.defines | |
17068 | done | |
17069 | rm -f conftest.defines | |
17070 | echo ' fi # grep' >>$CONFIG_STATUS | |
17071 | echo >>$CONFIG_STATUS | |
861bb6c1 | 17072 | |
ba479fd2 NN |
17073 | # Break up conftest.undefs because some shells have a limit on the size |
17074 | # of here documents, and old seds have small limits too (100 cmds). | |
17075 | echo ' # Handle all the #undef templates' >>$CONFIG_STATUS | |
861bb6c1 | 17076 | rm -f conftest.tail |
ba479fd2 | 17077 | while grep . conftest.undefs >/dev/null |
861bb6c1 | 17078 | do |
ba479fd2 NN |
17079 | # Write a limited-size here document to $tmp/undefs.sed. |
17080 | echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS | |
17081 | # Speed up: don't consider the non `#undef' | |
86da66b5 | 17082 | echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
17083 | # Work around the forget-to-reset-the-flag bug. |
17084 | echo 't clr' >>$CONFIG_STATUS | |
17085 | echo ': clr' >>$CONFIG_STATUS | |
17086 | sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS | |
861bb6c1 | 17087 | echo 'CEOF |
ba479fd2 NN |
17088 | sed -f $tmp/undefs.sed $tmp/in >$tmp/out |
17089 | rm -f $tmp/in | |
17090 | mv $tmp/out $tmp/in | |
17091 | ' >>$CONFIG_STATUS | |
17092 | sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail | |
17093 | rm -f conftest.undefs | |
17094 | mv conftest.tail conftest.undefs | |
861bb6c1 | 17095 | done |
ba479fd2 NN |
17096 | rm -f conftest.undefs |
17097 | ||
17098 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17099 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
17100 | # use $as_me), people would be surprised to read: | |
17101 | # /* config.h. Generated by config.status. */ | |
17102 | if test x"$ac_file" = x-; then | |
17103 | echo "/* Generated by configure. */" >$tmp/config.h | |
6e3f3080 | 17104 | else |
ba479fd2 | 17105 | echo "/* $ac_file. Generated by configure. */" >$tmp/config.h |
cafe096b | 17106 | fi |
ba479fd2 NN |
17107 | cat $tmp/in >>$tmp/config.h |
17108 | rm -f $tmp/in | |
17109 | if test x"$ac_file" != x-; then | |
17110 | if diff $ac_file $tmp/config.h >/dev/null 2>&1; then | |
17111 | { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 | |
17112 | echo "$as_me: $ac_file is unchanged" >&6;} | |
17113 | else | |
17114 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
17115 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17116 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
17117 | X"$ac_file" : 'X\(//\)$' \| \ | |
17118 | X"$ac_file" : 'X\(/\)' \| \ | |
17119 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17120 | echo X"$ac_file" | |
17121 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17122 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17123 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17124 | /^X\(\/\).*/{ s//\1/; q; } | |
17125 | s/.*/./; q'` | |
17126 | { if $as_mkdir_p; then | |
17127 | mkdir -p "$ac_dir" | |
17128 | else | |
17129 | as_dir="$ac_dir" | |
17130 | as_dirs= | |
17131 | while test ! -d "$as_dir"; do | |
17132 | as_dirs="$as_dir $as_dirs" | |
17133 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
17134 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17135 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
17136 | X"$as_dir" : 'X\(//\)$' \| \ | |
17137 | X"$as_dir" : 'X\(/\)' \| \ | |
17138 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17139 | echo X"$as_dir" | |
17140 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17141 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17142 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17143 | /^X\(\/\).*/{ s//\1/; q; } | |
17144 | s/.*/./; q'` | |
17145 | done | |
17146 | test ! -n "$as_dirs" || mkdir $as_dirs | |
17147 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
17148 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
17149 | { (exit 1); exit 1; }; }; } | |
63cf211a | 17150 | |
ba479fd2 NN |
17151 | rm -f $ac_file |
17152 | mv $tmp/config.h $ac_file | |
17153 | fi | |
17154 | else | |
17155 | cat $tmp/config.h | |
17156 | rm -f $tmp/config.h | |
17157 | fi | |
17158 | done | |
17159 | _ACEOF | |
17160 | cat >>$CONFIG_STATUS <<\_ACEOF | |
861bb6c1 | 17161 | |
ba479fd2 NN |
17162 | # |
17163 | # CONFIG_COMMANDS section. | |
17164 | # | |
17165 | for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue | |
17166 | ac_dest=`echo "$ac_file" | sed 's,:.*,,'` | |
17167 | ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
17168 | ac_dir=`(dirname "$ac_dest") 2>/dev/null || | |
17169 | $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17170 | X"$ac_dest" : 'X\(//\)[^/]' \| \ |
17171 | X"$ac_dest" : 'X\(//\)$' \| \ | |
17172 | X"$ac_dest" : 'X\(/\)' \| \ | |
17173 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17174 | echo X"$ac_dest" | |
17175 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17176 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17177 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17178 | /^X\(\/\).*/{ s//\1/; q; } | |
17179 | s/.*/./; q'` | |
86da66b5 HPN |
17180 | { if $as_mkdir_p; then |
17181 | mkdir -p "$ac_dir" | |
17182 | else | |
17183 | as_dir="$ac_dir" | |
17184 | as_dirs= | |
17185 | while test ! -d "$as_dir"; do | |
17186 | as_dirs="$as_dir $as_dirs" | |
17187 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
17188 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
17189 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
17190 | X"$as_dir" : 'X\(//\)$' \| \ | |
17191 | X"$as_dir" : 'X\(/\)' \| \ | |
17192 | . : '\(.\)' 2>/dev/null || | |
17193 | echo X"$as_dir" | | |
17194 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17195 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17196 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17197 | /^X\(\/\).*/{ s//\1/; q; } | |
17198 | s/.*/./; q'` | |
17199 | done | |
17200 | test ! -n "$as_dirs" || mkdir $as_dirs | |
17201 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
17202 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
17203 | { (exit 1); exit 1; }; }; } | |
17204 | ||
ba479fd2 NN |
17205 | ac_builddir=. |
17206 | ||
17207 | if test "$ac_dir" != .; then | |
17208 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
17209 | # A "../" for each directory in $ac_dir_suffix. | |
17210 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
17211 | else | |
17212 | ac_dir_suffix= ac_top_builddir= | |
17213 | fi | |
17214 | ||
17215 | case $srcdir in | |
17216 | .) # No --srcdir option. We are building in place. | |
17217 | ac_srcdir=. | |
17218 | if test -z "$ac_top_builddir"; then | |
17219 | ac_top_srcdir=. | |
17220 | else | |
17221 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
17222 | fi ;; | |
17223 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
17224 | ac_srcdir=$srcdir$ac_dir_suffix; | |
17225 | ac_top_srcdir=$srcdir ;; | |
17226 | *) # Relative path. | |
17227 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
17228 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
17229 | esac | |
8ab705be KC |
17230 | |
17231 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
17232 | # the directories may not exist. | |
17233 | case `pwd` in | |
17234 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 17235 | *) |
8ab705be KC |
17236 | case "$ac_dir" in |
17237 | .) ac_abs_builddir=`pwd`;; | |
17238 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
17239 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
17240 | esac;; |
17241 | esac | |
8ab705be | 17242 | case $ac_abs_builddir in |
86da66b5 HPN |
17243 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
17244 | *) | |
17245 | case ${ac_top_builddir}. in | |
8ab705be | 17246 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 17247 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 17248 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
17249 | esac;; |
17250 | esac | |
8ab705be | 17251 | case $ac_abs_builddir in |
86da66b5 HPN |
17252 | .) ac_abs_srcdir=$ac_srcdir;; |
17253 | *) | |
17254 | case $ac_srcdir in | |
8ab705be | 17255 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 17256 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 17257 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
17258 | esac;; |
17259 | esac | |
8ab705be | 17260 | case $ac_abs_builddir in |
86da66b5 HPN |
17261 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
17262 | *) | |
17263 | case $ac_top_srcdir in | |
8ab705be | 17264 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 17265 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 17266 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
17267 | esac;; |
17268 | esac | |
ba479fd2 NN |
17269 | |
17270 | ||
17271 | { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 | |
17272 | echo "$as_me: executing $ac_dest commands" >&6;} | |
17273 | case $ac_dest in | |
17274 | default ) | |
f1faaabd NN |
17275 | case ${CONFIG_HEADERS} in |
17276 | *auto-host.h:config.in*) | |
17277 | echo > cstamp-h ;; | |
861bb6c1 | 17278 | esac |
2ed26f6b | 17279 | # Make sure all the subdirs exist. |
3b620440 | 17280 | for d in $subdirs doc build |
2ed26f6b | 17281 | do |
2ed26f6b | 17282 | test -d $d || mkdir $d |
2ed26f6b | 17283 | done |
93cf819d BK |
17284 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
17285 | # bootstrapping and the installation procedure can still use | |
17286 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
17287 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
17288 | # This is virtually a duplicate of what happens in configure.lang; we do | |
17289 | # an extra check to make sure this only happens if ln -s can be used. | |
35f06ae4 PB |
17290 | case "$LN_S" in |
17291 | *-s*) | |
17292 | for d in ${subdirs} ; do | |
1e6347d8 | 17293 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e | 17294 | cd $d |
6a1b7268 | 17295 | for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include |
4e8a434e BK |
17296 | do |
17297 | rm -f $t | |
35f06ae4 | 17298 | $LN_S ../$t $t 2>/dev/null |
4e8a434e BK |
17299 | done |
17300 | cd $STARTDIR | |
35f06ae4 PB |
17301 | done |
17302 | ;; | |
17303 | esac | |
ba479fd2 NN |
17304 | ;; |
17305 | esac | |
17306 | done | |
17307 | _ACEOF | |
cafe096b | 17308 | |
ba479fd2 NN |
17309 | cat >>$CONFIG_STATUS <<\_ACEOF |
17310 | ||
17311 | { (exit 0); exit 0; } | |
17312 | _ACEOF | |
861bb6c1 | 17313 | chmod +x $CONFIG_STATUS |
ba479fd2 NN |
17314 | ac_clean_files=$ac_clean_files_save |
17315 | ||
17316 | ||
17317 | # configure is writing to config.log, and then calls config.status. | |
17318 | # config.status does its own redirection, appending to config.log. | |
17319 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
17320 | # by configure, so config.status won't be able to write to it; its | |
17321 | # output is simply discarded. So we exec the FD to /dev/null, | |
17322 | # effectively closing config.log, so it can be properly (re)opened and | |
17323 | # appended to by config.status. When coming back to configure, we | |
17324 | # need to make the FD available again. | |
17325 | if test "$no_create" != yes; then | |
17326 | ac_cs_success=: | |
17327 | ac_config_status_args= | |
17328 | test "$silent" = yes && | |
17329 | ac_config_status_args="$ac_config_status_args --quiet" | |
17330 | exec 5>/dev/null | |
17331 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
17332 | exec 5>>config.log | |
17333 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
17334 | # would make configure fail if this is the last instruction. | |
17335 | $ac_cs_success || { (exit 1); exit 1; } | |
17336 | fi | |
861bb6c1 | 17337 |