]>
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 | ||
9f18db39 | 312 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' |
ba479fd2 | 313 | ac_subst_files='language_hooks' |
861bb6c1 JL |
314 | |
315 | # Initialize some variables set by options. | |
ba479fd2 NN |
316 | ac_init_help= |
317 | ac_init_version=false | |
861bb6c1 JL |
318 | # The variables have the same names as the options, with |
319 | # dashes changed to underlines. | |
ba479fd2 | 320 | cache_file=/dev/null |
861bb6c1 | 321 | exec_prefix=NONE |
861bb6c1 | 322 | no_create= |
861bb6c1 JL |
323 | no_recursion= |
324 | prefix=NONE | |
325 | program_prefix=NONE | |
326 | program_suffix=NONE | |
327 | program_transform_name=s,x,x, | |
328 | silent= | |
329 | site= | |
330 | srcdir= | |
861bb6c1 JL |
331 | verbose= |
332 | x_includes=NONE | |
333 | x_libraries=NONE | |
ba479fd2 NN |
334 | |
335 | # Installation directory options. | |
336 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
337 | # and all the variables that are supposed to be based on exec_prefix | |
338 | # by default will actually change. | |
339 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
861bb6c1 JL |
340 | bindir='${exec_prefix}/bin' |
341 | sbindir='${exec_prefix}/sbin' | |
342 | libexecdir='${exec_prefix}/libexec' | |
343 | datadir='${prefix}/share' | |
344 | sysconfdir='${prefix}/etc' | |
345 | sharedstatedir='${prefix}/com' | |
346 | localstatedir='${prefix}/var' | |
347 | libdir='${exec_prefix}/lib' | |
348 | includedir='${prefix}/include' | |
349 | oldincludedir='/usr/include' | |
350 | infodir='${prefix}/info' | |
351 | mandir='${prefix}/man' | |
352 | ||
861bb6c1 JL |
353 | ac_prev= |
354 | for ac_option | |
355 | do | |
861bb6c1 JL |
356 | # If the previous option needs an argument, assign it. |
357 | if test -n "$ac_prev"; then | |
358 | eval "$ac_prev=\$ac_option" | |
359 | ac_prev= | |
360 | continue | |
361 | fi | |
362 | ||
ba479fd2 | 363 | ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` |
861bb6c1 JL |
364 | |
365 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
366 | ||
ba479fd2 | 367 | case $ac_option in |
861bb6c1 JL |
368 | |
369 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
370 | ac_prev=bindir ;; | |
371 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
ba479fd2 | 372 | bindir=$ac_optarg ;; |
861bb6c1 JL |
373 | |
374 | -build | --build | --buil | --bui | --bu) | |
ba479fd2 | 375 | ac_prev=build_alias ;; |
861bb6c1 | 376 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
ba479fd2 | 377 | build_alias=$ac_optarg ;; |
861bb6c1 JL |
378 | |
379 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
380 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
381 | ac_prev=cache_file ;; | |
382 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
383 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
ba479fd2 NN |
384 | cache_file=$ac_optarg ;; |
385 | ||
386 | --config-cache | -C) | |
387 | cache_file=config.cache ;; | |
861bb6c1 JL |
388 | |
389 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
390 | ac_prev=datadir ;; | |
391 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
392 | | --da=*) | |
ba479fd2 | 393 | datadir=$ac_optarg ;; |
861bb6c1 JL |
394 | |
395 | -disable-* | --disable-*) | |
ba479fd2 | 396 | ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
861bb6c1 | 397 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
398 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && |
399 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 | |
400 | { (exit 1); exit 1; }; } | |
401 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` | |
402 | eval "enable_$ac_feature=no" ;; | |
861bb6c1 JL |
403 | |
404 | -enable-* | --enable-*) | |
ba479fd2 | 405 | ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
861bb6c1 | 406 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
407 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && |
408 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 | |
409 | { (exit 1); exit 1; }; } | |
410 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` | |
411 | case $ac_option in | |
412 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | |
861bb6c1 JL |
413 | *) ac_optarg=yes ;; |
414 | esac | |
ba479fd2 | 415 | eval "enable_$ac_feature='$ac_optarg'" ;; |
861bb6c1 JL |
416 | |
417 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
418 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
419 | | --exec | --exe | --ex) | |
420 | ac_prev=exec_prefix ;; | |
421 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
422 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
423 | | --exec=* | --exe=* | --ex=*) | |
ba479fd2 | 424 | exec_prefix=$ac_optarg ;; |
861bb6c1 JL |
425 | |
426 | -gas | --gas | --ga | --g) | |
427 | # Obsolete; use --with-gas. | |
428 | with_gas=yes ;; | |
429 | ||
ba479fd2 NN |
430 | -help | --help | --hel | --he | -h) |
431 | ac_init_help=long ;; | |
432 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
433 | ac_init_help=recursive ;; | |
434 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
435 | ac_init_help=short ;; | |
861bb6c1 JL |
436 | |
437 | -host | --host | --hos | --ho) | |
ba479fd2 | 438 | ac_prev=host_alias ;; |
861bb6c1 | 439 | -host=* | --host=* | --hos=* | --ho=*) |
ba479fd2 | 440 | host_alias=$ac_optarg ;; |
861bb6c1 JL |
441 | |
442 | -includedir | --includedir | --includedi | --included | --include \ | |
443 | | --includ | --inclu | --incl | --inc) | |
444 | ac_prev=includedir ;; | |
445 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
446 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
ba479fd2 | 447 | includedir=$ac_optarg ;; |
861bb6c1 JL |
448 | |
449 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
450 | ac_prev=infodir ;; | |
451 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
ba479fd2 | 452 | infodir=$ac_optarg ;; |
861bb6c1 JL |
453 | |
454 | -libdir | --libdir | --libdi | --libd) | |
455 | ac_prev=libdir ;; | |
456 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
ba479fd2 | 457 | libdir=$ac_optarg ;; |
861bb6c1 JL |
458 | |
459 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
460 | | --libexe | --libex | --libe) | |
461 | ac_prev=libexecdir ;; | |
462 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
463 | | --libexe=* | --libex=* | --libe=*) | |
ba479fd2 | 464 | libexecdir=$ac_optarg ;; |
861bb6c1 JL |
465 | |
466 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
467 | | --localstate | --localstat | --localsta | --localst \ | |
468 | | --locals | --local | --loca | --loc | --lo) | |
469 | ac_prev=localstatedir ;; | |
470 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
471 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
472 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
ba479fd2 | 473 | localstatedir=$ac_optarg ;; |
861bb6c1 JL |
474 | |
475 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
476 | ac_prev=mandir ;; | |
477 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
ba479fd2 | 478 | mandir=$ac_optarg ;; |
861bb6c1 JL |
479 | |
480 | -nfp | --nfp | --nf) | |
481 | # Obsolete; use --without-fp. | |
482 | with_fp=no ;; | |
483 | ||
484 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
ba479fd2 | 485 | | --no-cr | --no-c | -n) |
861bb6c1 JL |
486 | no_create=yes ;; |
487 | ||
488 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
489 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
490 | no_recursion=yes ;; | |
491 | ||
492 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
493 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
494 | | --oldin | --oldi | --old | --ol | --o) | |
495 | ac_prev=oldincludedir ;; | |
496 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
497 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
498 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
ba479fd2 | 499 | oldincludedir=$ac_optarg ;; |
861bb6c1 JL |
500 | |
501 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
502 | ac_prev=prefix ;; | |
503 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
ba479fd2 | 504 | prefix=$ac_optarg ;; |
861bb6c1 JL |
505 | |
506 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
507 | | --program-pre | --program-pr | --program-p) | |
508 | ac_prev=program_prefix ;; | |
509 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
510 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
ba479fd2 | 511 | program_prefix=$ac_optarg ;; |
861bb6c1 JL |
512 | |
513 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
514 | | --program-suf | --program-su | --program-s) | |
515 | ac_prev=program_suffix ;; | |
516 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
517 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
ba479fd2 | 518 | program_suffix=$ac_optarg ;; |
861bb6c1 JL |
519 | |
520 | -program-transform-name | --program-transform-name \ | |
521 | | --program-transform-nam | --program-transform-na \ | |
522 | | --program-transform-n | --program-transform- \ | |
523 | | --program-transform | --program-transfor \ | |
524 | | --program-transfo | --program-transf \ | |
525 | | --program-trans | --program-tran \ | |
526 | | --progr-tra | --program-tr | --program-t) | |
527 | ac_prev=program_transform_name ;; | |
528 | -program-transform-name=* | --program-transform-name=* \ | |
529 | | --program-transform-nam=* | --program-transform-na=* \ | |
530 | | --program-transform-n=* | --program-transform-=* \ | |
531 | | --program-transform=* | --program-transfor=* \ | |
532 | | --program-transfo=* | --program-transf=* \ | |
533 | | --program-trans=* | --program-tran=* \ | |
534 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
ba479fd2 | 535 | program_transform_name=$ac_optarg ;; |
861bb6c1 JL |
536 | |
537 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
538 | | -silent | --silent | --silen | --sile | --sil) | |
539 | silent=yes ;; | |
540 | ||
541 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
542 | ac_prev=sbindir ;; | |
543 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
544 | | --sbi=* | --sb=*) | |
ba479fd2 | 545 | sbindir=$ac_optarg ;; |
861bb6c1 JL |
546 | |
547 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
548 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
549 | | --sharedst | --shareds | --shared | --share | --shar \ | |
550 | | --sha | --sh) | |
551 | ac_prev=sharedstatedir ;; | |
552 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
553 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
554 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
555 | | --sha=* | --sh=*) | |
ba479fd2 | 556 | sharedstatedir=$ac_optarg ;; |
861bb6c1 JL |
557 | |
558 | -site | --site | --sit) | |
559 | ac_prev=site ;; | |
560 | -site=* | --site=* | --sit=*) | |
ba479fd2 | 561 | site=$ac_optarg ;; |
861bb6c1 JL |
562 | |
563 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
564 | ac_prev=srcdir ;; | |
565 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
ba479fd2 | 566 | srcdir=$ac_optarg ;; |
861bb6c1 JL |
567 | |
568 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
569 | | --syscon | --sysco | --sysc | --sys | --sy) | |
570 | ac_prev=sysconfdir ;; | |
571 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
572 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
ba479fd2 | 573 | sysconfdir=$ac_optarg ;; |
861bb6c1 JL |
574 | |
575 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
ba479fd2 | 576 | ac_prev=target_alias ;; |
861bb6c1 | 577 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
ba479fd2 | 578 | target_alias=$ac_optarg ;; |
861bb6c1 JL |
579 | |
580 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
581 | verbose=yes ;; | |
582 | ||
ba479fd2 NN |
583 | -version | --version | --versio | --versi | --vers | -V) |
584 | ac_init_version=: ;; | |
861bb6c1 JL |
585 | |
586 | -with-* | --with-*) | |
ba479fd2 | 587 | ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
861bb6c1 | 588 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
589 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && |
590 | { echo "$as_me: error: invalid package name: $ac_package" >&2 | |
591 | { (exit 1); exit 1; }; } | |
861bb6c1 | 592 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
ba479fd2 NN |
593 | case $ac_option in |
594 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | |
861bb6c1 JL |
595 | *) ac_optarg=yes ;; |
596 | esac | |
ba479fd2 | 597 | eval "with_$ac_package='$ac_optarg'" ;; |
861bb6c1 JL |
598 | |
599 | -without-* | --without-*) | |
ba479fd2 | 600 | ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
861bb6c1 | 601 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
602 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && |
603 | { echo "$as_me: error: invalid package name: $ac_package" >&2 | |
604 | { (exit 1); exit 1; }; } | |
605 | ac_package=`echo $ac_package | sed 's/-/_/g'` | |
606 | eval "with_$ac_package=no" ;; | |
861bb6c1 JL |
607 | |
608 | --x) | |
609 | # Obsolete; use --with-x. | |
610 | with_x=yes ;; | |
611 | ||
612 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
613 | | --x-incl | --x-inc | --x-in | --x-i) | |
614 | ac_prev=x_includes ;; | |
615 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
616 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
ba479fd2 | 617 | x_includes=$ac_optarg ;; |
861bb6c1 JL |
618 | |
619 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
620 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
621 | ac_prev=x_libraries ;; | |
622 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
623 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
ba479fd2 | 624 | x_libraries=$ac_optarg ;; |
861bb6c1 | 625 | |
ba479fd2 NN |
626 | -*) { echo "$as_me: error: unrecognized option: $ac_option |
627 | Try \`$0 --help' for more information." >&2 | |
628 | { (exit 1); exit 1; }; } | |
861bb6c1 JL |
629 | ;; |
630 | ||
ba479fd2 NN |
631 | *=*) |
632 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
633 | # Reject names that are not valid shell variable names. | |
634 | expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && | |
635 | { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 | |
636 | { (exit 1); exit 1; }; } | |
637 | ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` | |
638 | eval "$ac_envvar='$ac_optarg'" | |
639 | export $ac_envvar ;; | |
640 | ||
861bb6c1 | 641 | *) |
ba479fd2 NN |
642 | # FIXME: should be removed in autoconf 3.0. |
643 | echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
644 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
645 | echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
646 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} | |
861bb6c1 JL |
647 | ;; |
648 | ||
649 | esac | |
650 | done | |
651 | ||
652 | if test -n "$ac_prev"; then | |
ba479fd2 NN |
653 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
654 | { echo "$as_me: error: missing argument to $ac_option" >&2 | |
655 | { (exit 1); exit 1; }; } | |
63cf211a | 656 | fi |
63cf211a | 657 | |
ba479fd2 NN |
658 | # Be sure to have absolute paths. |
659 | for ac_var in exec_prefix prefix | |
660 | do | |
661 | eval ac_val=$`echo $ac_var` | |
662 | case $ac_val in | |
663 | [\\/$]* | ?:[\\/]* | NONE | '' ) ;; | |
664 | *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | |
665 | { (exit 1); exit 1; }; };; | |
666 | esac | |
667 | done | |
093e61a6 | 668 | |
ba479fd2 NN |
669 | # Be sure to have absolute paths. |
670 | for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ | |
86da66b5 | 671 | localstatedir libdir includedir oldincludedir infodir mandir |
861bb6c1 | 672 | do |
ba479fd2 NN |
673 | eval ac_val=$`echo $ac_var` |
674 | case $ac_val in | |
675 | [\\/$]* | ?:[\\/]* ) ;; | |
676 | *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | |
677 | { (exit 1); exit 1; }; };; | |
861bb6c1 JL |
678 | esac |
679 | done | |
680 | ||
ba479fd2 NN |
681 | # There might be people who depend on the old broken behavior: `$host' |
682 | # used to hold the argument of --host etc. | |
683 | # FIXME: To remove some day. | |
684 | build=$build_alias | |
685 | host=$host_alias | |
686 | target=$target_alias | |
687 | ||
688 | # FIXME: To remove some day. | |
689 | if test "x$host_alias" != x; then | |
690 | if test "x$build_alias" = x; then | |
691 | cross_compiling=maybe | |
692 | echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. | |
693 | If a cross compiler is detected then cross compile mode will be used." >&2 | |
694 | elif test "x$build_alias" != "x$host_alias"; then | |
695 | cross_compiling=yes | |
696 | fi | |
697 | fi | |
6e3f3080 | 698 | |
ba479fd2 NN |
699 | ac_tool_prefix= |
700 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
701 | ||
702 | test "$silent" = yes && exec 6>/dev/null | |
861bb6c1 | 703 | |
861bb6c1 JL |
704 | |
705 | # Find the source files, if location was not specified. | |
706 | if test -z "$srcdir"; then | |
707 | ac_srcdir_defaulted=yes | |
708 | # Try the directory containing this script, then its parent. | |
ba479fd2 NN |
709 | ac_confdir=`(dirname "$0") 2>/dev/null || |
710 | $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
711 | X"$0" : 'X\(//\)[^/]' \| \ |
712 | X"$0" : 'X\(//\)$' \| \ | |
713 | X"$0" : 'X\(/\)' \| \ | |
714 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
715 | echo X"$0" | |
716 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
717 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
718 | /^X\(\/\/\)$/{ s//\1/; q; } | |
719 | /^X\(\/\).*/{ s//\1/; q; } | |
720 | s/.*/./; q'` | |
861bb6c1 JL |
721 | srcdir=$ac_confdir |
722 | if test ! -r $srcdir/$ac_unique_file; then | |
723 | srcdir=.. | |
724 | fi | |
725 | else | |
726 | ac_srcdir_defaulted=no | |
727 | fi | |
728 | if test ! -r $srcdir/$ac_unique_file; then | |
729 | if test "$ac_srcdir_defaulted" = yes; then | |
ba479fd2 NN |
730 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 |
731 | { (exit 1); exit 1; }; } | |
63cf211a | 732 | else |
ba479fd2 NN |
733 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 |
734 | { (exit 1); exit 1; }; } | |
63cf211a NN |
735 | fi |
736 | fi | |
ba479fd2 NN |
737 | (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || |
738 | { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 | |
739 | { (exit 1); exit 1; }; } | |
740 | srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` | |
741 | ac_env_build_alias_set=${build_alias+set} | |
742 | ac_env_build_alias_value=$build_alias | |
743 | ac_cv_env_build_alias_set=${build_alias+set} | |
744 | ac_cv_env_build_alias_value=$build_alias | |
745 | ac_env_host_alias_set=${host_alias+set} | |
746 | ac_env_host_alias_value=$host_alias | |
747 | ac_cv_env_host_alias_set=${host_alias+set} | |
748 | ac_cv_env_host_alias_value=$host_alias | |
749 | ac_env_target_alias_set=${target_alias+set} | |
750 | ac_env_target_alias_value=$target_alias | |
751 | ac_cv_env_target_alias_set=${target_alias+set} | |
752 | ac_cv_env_target_alias_value=$target_alias | |
753 | ac_env_CC_set=${CC+set} | |
754 | ac_env_CC_value=$CC | |
755 | ac_cv_env_CC_set=${CC+set} | |
756 | ac_cv_env_CC_value=$CC | |
757 | ac_env_CFLAGS_set=${CFLAGS+set} | |
758 | ac_env_CFLAGS_value=$CFLAGS | |
759 | ac_cv_env_CFLAGS_set=${CFLAGS+set} | |
760 | ac_cv_env_CFLAGS_value=$CFLAGS | |
761 | ac_env_LDFLAGS_set=${LDFLAGS+set} | |
762 | ac_env_LDFLAGS_value=$LDFLAGS | |
763 | ac_cv_env_LDFLAGS_set=${LDFLAGS+set} | |
764 | ac_cv_env_LDFLAGS_value=$LDFLAGS | |
765 | ac_env_CPPFLAGS_set=${CPPFLAGS+set} | |
766 | ac_env_CPPFLAGS_value=$CPPFLAGS | |
767 | ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} | |
768 | ac_cv_env_CPPFLAGS_value=$CPPFLAGS | |
769 | ac_env_CPP_set=${CPP+set} | |
770 | ac_env_CPP_value=$CPP | |
771 | ac_cv_env_CPP_set=${CPP+set} | |
772 | ac_cv_env_CPP_value=$CPP | |
6de9cd9a DN |
773 | ac_env_GMPLIBS_set=${GMPLIBS+set} |
774 | ac_env_GMPLIBS_value=$GMPLIBS | |
775 | ac_cv_env_GMPLIBS_set=${GMPLIBS+set} | |
776 | ac_cv_env_GMPLIBS_value=$GMPLIBS | |
777 | ac_env_GMPINC_set=${GMPINC+set} | |
778 | ac_env_GMPINC_value=$GMPINC | |
779 | ac_cv_env_GMPINC_set=${GMPINC+set} | |
780 | ac_cv_env_GMPINC_value=$GMPINC | |
63cf211a | 781 | |
ba479fd2 NN |
782 | # |
783 | # Report the --help message. | |
784 | # | |
785 | if test "$ac_init_help" = "long"; then | |
786 | # Omit some internal or obsolete options to make the list less imposing. | |
787 | # This message is too long to be a string in the A/UX 3.1 sh. | |
788 | cat <<_ACEOF | |
789 | \`configure' configures this package to adapt to many kinds of systems. | |
861bb6c1 | 790 | |
ba479fd2 | 791 | Usage: $0 [OPTION]... [VAR=VALUE]... |
861bb6c1 | 792 | |
ba479fd2 NN |
793 | To assign environment variables (e.g., CC, CFLAGS...), specify them as |
794 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
861bb6c1 | 795 | |
ba479fd2 | 796 | Defaults for the options are specified in brackets. |
861bb6c1 | 797 | |
ba479fd2 NN |
798 | Configuration: |
799 | -h, --help display this help and exit | |
800 | --help=short display options specific to this package | |
801 | --help=recursive display the short help of all the included packages | |
802 | -V, --version display version information and exit | |
803 | -q, --quiet, --silent do not print \`checking...' messages | |
804 | --cache-file=FILE cache test results in FILE [disabled] | |
805 | -C, --config-cache alias for \`--cache-file=config.cache' | |
806 | -n, --no-create do not create output files | |
807 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
808 | ||
809 | _ACEOF | |
810 | ||
811 | cat <<_ACEOF | |
812 | Installation directories: | |
813 | --prefix=PREFIX install architecture-independent files in PREFIX | |
86da66b5 | 814 | [$ac_default_prefix] |
ba479fd2 | 815 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
86da66b5 | 816 | [PREFIX] |
861bb6c1 | 817 | |
ba479fd2 NN |
818 | By default, \`make install' will install all the files in |
819 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
820 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
821 | for instance \`--prefix=\$HOME'. | |
13c22933 | 822 | |
ba479fd2 | 823 | For better control, use the options below. |
13c22933 | 824 | |
ba479fd2 NN |
825 | Fine tuning of the installation directories: |
826 | --bindir=DIR user executables [EPREFIX/bin] | |
827 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
828 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
829 | --datadir=DIR read-only architecture-independent data [PREFIX/share] | |
830 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
831 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
832 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
833 | --libdir=DIR object code libraries [EPREFIX/lib] | |
834 | --includedir=DIR C header files [PREFIX/include] | |
835 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
836 | --infodir=DIR info documentation [PREFIX/info] | |
837 | --mandir=DIR man documentation [PREFIX/man] | |
838 | _ACEOF | |
13c22933 | 839 | |
ba479fd2 | 840 | cat <<\_ACEOF |
13c22933 | 841 | |
ba479fd2 NN |
842 | Program names: |
843 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
844 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
845 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
13c22933 | 846 | |
ba479fd2 NN |
847 | System types: |
848 | --build=BUILD configure for building on BUILD [guessed] | |
849 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
850 | --target=TARGET configure for building compilers for TARGET [HOST] | |
851 | _ACEOF | |
13c22933 JJ |
852 | fi |
853 | ||
ba479fd2 | 854 | if test -n "$ac_init_help"; then |
13c22933 | 855 | |
ba479fd2 | 856 | cat <<\_ACEOF |
13c22933 | 857 | |
ba479fd2 NN |
858 | Optional Features: |
859 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
860 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
03787dfd KC |
861 | --enable-generated-files-in-srcdir |
862 | put copies of generated files in source dir | |
863 | intended for creating source tarballs for users | |
864 | without texinfo bison or flex. | |
09a9c095 | 865 | --enable-werror-always enable -Werror always |
ba479fd2 NN |
866 | --enable-werror enable -Werror in bootstrap stage2 and later |
867 | --enable-checking=LIST | |
868 | enable expensive run-time checks. With LIST, | |
869 | enable only specific categories of checks. | |
cdce5c16 NS |
870 | Categories are: yes,no,all,none,release. |
871 | Flags are: assert,fold,gc,gcac,misc, | |
872 | rtlflag,rtl,runtime,tree,valgrind. | |
74ee1642 | 873 | --enable-mapped-location location_t is fileline integer cookie |
ba479fd2 | 874 | --enable-coverage=LEVEL |
fb38008e | 875 | enable compiler's code coverage collection. |
ba479fd2 NN |
876 | Use to measure compiler performance and locate |
877 | unused parts of the compiler. With LEVEL, specify | |
878 | optimization. Values are opt, noopt, | |
879 | default is noopt | |
880 | --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering | |
881 | --enable-multilib enable library support for multiple ABIs | |
882 | --enable-__cxa_atexit enable __cxa_atexit for C++ | |
883 | --enable-threads enable thread usage for target GCC | |
884 | --enable-threads=LIB use LIB thread package for target GCC | |
885 | --enable-objc-gc enable the use of Boehm's garbage collector with | |
886 | the GNU Objective-C runtime | |
887 | --disable-shared don't provide a shared libgcc | |
888 | --enable-intermodule build the compiler in one step | |
f3c9f174 | 889 | --enable-languages=LIST specify which front-ends to build |
dfb77e37 | 890 | --disable-rpath do not hardcode runtime library paths |
ba479fd2 NN |
891 | --enable-initfini-array use .init_array/.fini_array sections |
892 | --enable-sjlj-exceptions | |
893 | arrange to use setjmp/longjmp exception handling | |
7f970b70 | 894 | --enable-secureplt enable -msecure-plt by default for PowerPC |
ba479fd2 NN |
895 | --disable-win32-registry |
896 | disable lookup of installation paths in the | |
897 | Registry on Windows hosts | |
898 | --enable-win32-registry enable registry lookup (default) | |
899 | --enable-win32-registry=KEY | |
900 | use KEY instead of GCC version as the last portion | |
901 | of the registry key | |
902 | --enable-maintainer-mode | |
903 | enable make rules and dependencies not useful | |
904 | (and sometimes confusing) to the casual installer | |
905 | --enable-version-specific-runtime-libs | |
906 | specify that runtime libraries should be | |
907 | installed in a compiler-specific directory | |
093e61a6 | 908 | |
ba479fd2 NN |
909 | Optional Packages: |
910 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
911 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
912 | --with-local-prefix=DIR specifies directory to put local include | |
913 | --with-gxx-include-dir=DIR | |
914 | specifies directory to put g++ header files | |
915 | --with-cpp-install-dir=DIR | |
916 | install the user visible C preprocessor in DIR | |
917 | (relative to PREFIX) as well as PREFIX/bin | |
918 | --with-gnu-ld arrange to work with GNU ld. | |
919 | --with-ld arrange to use the specified ld (full pathname) | |
d594623a | 920 | --with-demangler-in-ld try to use demangler in GNU ld. |
ba479fd2 NN |
921 | --with-gnu-as arrange to work with GNU as |
922 | --with-as arrange to use the specified as (full pathname) | |
923 | --with-stabs arrange to use stabs instead of host debug format | |
924 | --with-dwarf2 force the default debug format to be DWARF 2 | |
925 | --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR. | |
dfb77e37 KC |
926 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
927 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
928 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
443728bb | 929 | --with-system-libunwind use installed libunwind |
59415997 | 930 | --with-gc={page,zone} choose the garbage collection mechanism to use |
ba479fd2 NN |
931 | with the compiler |
932 | --with-system-zlib use installed libz | |
933 | --with-slibdir=DIR shared libraries in DIR LIBDIR | |
13c22933 | 934 | |
ba479fd2 NN |
935 | Some influential environment variables: |
936 | CC C compiler command | |
937 | CFLAGS C compiler flags | |
938 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
939 | nonstandard directory <lib dir> | |
940 | CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have | |
941 | headers in a nonstandard directory <include dir> | |
942 | CPP C preprocessor | |
6de9cd9a DN |
943 | GMPLIBS How to link GMP |
944 | GMPINC How to find GMP include files | |
13c22933 | 945 | |
ba479fd2 NN |
946 | Use these variables to override the choices made by `configure' or to help |
947 | it to find libraries and programs with nonstandard names/locations. | |
73458fb7 | 948 | |
ba479fd2 NN |
949 | _ACEOF |
950 | fi | |
6e3f3080 | 951 | |
ba479fd2 NN |
952 | if test "$ac_init_help" = "recursive"; then |
953 | # If there are subdirs, report their specific --help. | |
954 | ac_popdir=`pwd` | |
955 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
956 | test -d $ac_dir || continue | |
957 | ac_builddir=. | |
958 | ||
959 | if test "$ac_dir" != .; then | |
960 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
961 | # A "../" for each directory in $ac_dir_suffix. | |
962 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
963 | else | |
964 | ac_dir_suffix= ac_top_builddir= | |
965 | fi | |
966 | ||
967 | case $srcdir in | |
968 | .) # No --srcdir option. We are building in place. | |
969 | ac_srcdir=. | |
970 | if test -z "$ac_top_builddir"; then | |
971 | ac_top_srcdir=. | |
972 | else | |
973 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
974 | fi ;; | |
975 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
976 | ac_srcdir=$srcdir$ac_dir_suffix; | |
977 | ac_top_srcdir=$srcdir ;; | |
978 | *) # Relative path. | |
979 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
980 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
981 | esac | |
8ab705be KC |
982 | |
983 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
984 | # the directories may not exist. | |
985 | case `pwd` in | |
986 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 987 | *) |
8ab705be KC |
988 | case "$ac_dir" in |
989 | .) ac_abs_builddir=`pwd`;; | |
990 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
991 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
992 | esac;; |
993 | esac | |
8ab705be | 994 | case $ac_abs_builddir in |
86da66b5 HPN |
995 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
996 | *) | |
997 | case ${ac_top_builddir}. in | |
8ab705be | 998 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 999 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 1000 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
1001 | esac;; |
1002 | esac | |
8ab705be | 1003 | case $ac_abs_builddir in |
86da66b5 HPN |
1004 | .) ac_abs_srcdir=$ac_srcdir;; |
1005 | *) | |
1006 | case $ac_srcdir in | |
8ab705be | 1007 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 1008 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 1009 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
1010 | esac;; |
1011 | esac | |
8ab705be | 1012 | case $ac_abs_builddir in |
86da66b5 HPN |
1013 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
1014 | *) | |
1015 | case $ac_top_srcdir in | |
8ab705be | 1016 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 1017 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 1018 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
1019 | esac;; |
1020 | esac | |
ba479fd2 NN |
1021 | |
1022 | cd $ac_dir | |
1023 | # Check for guested configure; otherwise get Cygnus style configure. | |
1024 | if test -f $ac_srcdir/configure.gnu; then | |
1025 | echo | |
1026 | $SHELL $ac_srcdir/configure.gnu --help=recursive | |
1027 | elif test -f $ac_srcdir/configure; then | |
1028 | echo | |
1029 | $SHELL $ac_srcdir/configure --help=recursive | |
1030 | elif test -f $ac_srcdir/configure.ac || | |
86da66b5 | 1031 | test -f $ac_srcdir/configure.in; then |
ba479fd2 NN |
1032 | echo |
1033 | $ac_configure --help | |
1034 | else | |
1035 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
1036 | fi | |
d7974fe6 | 1037 | cd $ac_popdir |
ba479fd2 NN |
1038 | done |
1039 | fi | |
1040 | ||
1041 | test -n "$ac_init_help" && exit 0 | |
1042 | if $ac_init_version; then | |
1043 | cat <<\_ACEOF | |
1044 | ||
86da66b5 | 1045 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
1046 | This configure script is free software; the Free Software Foundation |
1047 | gives unlimited permission to copy, distribute and modify it. | |
1048 | _ACEOF | |
1049 | exit 0 | |
1050 | fi | |
1051 | exec 5>config.log | |
1052 | cat >&5 <<_ACEOF | |
1053 | This file contains any messages produced by compilers while | |
1054 | running configure, to aid debugging if configure makes a mistake. | |
1055 | ||
1056 | It was created by $as_me, which was | |
8ab705be | 1057 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
1058 | |
1059 | $ $0 $@ | |
1060 | ||
1061 | _ACEOF | |
1062 | { | |
1063 | cat <<_ASUNAME | |
1064 | ## --------- ## | |
1065 | ## Platform. ## | |
1066 | ## --------- ## | |
1067 | ||
1068 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
1069 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1070 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1071 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1072 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1073 | ||
1074 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
1075 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
1076 | ||
1077 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
1078 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
1079 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
1080 | hostinfo = `(hostinfo) 2>/dev/null || echo unknown` | |
1081 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
1082 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
1083 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
1084 | ||
1085 | _ASUNAME | |
1086 | ||
1087 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1088 | for as_dir in $PATH | |
1089 | do | |
1090 | IFS=$as_save_IFS | |
1091 | test -z "$as_dir" && as_dir=. | |
1092 | echo "PATH: $as_dir" | |
1093 | done | |
1094 | ||
1095 | } >&5 | |
1096 | ||
1097 | cat >&5 <<_ACEOF | |
1098 | ||
1099 | ||
1100 | ## ----------- ## | |
1101 | ## Core tests. ## | |
1102 | ## ----------- ## | |
1103 | ||
1104 | _ACEOF | |
1105 | ||
1106 | ||
1107 | # Keep a trace of the command line. | |
1108 | # Strip out --no-create and --no-recursion so they do not pile up. | |
1109 | # Strip out --silent because we don't want to record it for future runs. | |
1110 | # Also quote any args containing shell meta-characters. | |
1111 | # Make two passes to allow for proper duplicate-argument suppression. | |
1112 | ac_configure_args= | |
1113 | ac_configure_args0= | |
1114 | ac_configure_args1= | |
1115 | ac_sep= | |
1116 | ac_must_keep_next=false | |
1117 | for ac_pass in 1 2 | |
1118 | do | |
1119 | for ac_arg | |
1120 | do | |
1121 | case $ac_arg in | |
1122 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
1123 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1124 | | -silent | --silent | --silen | --sile | --sil) | |
1125 | continue ;; | |
1126 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1127 | ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1128 | esac | |
1129 | case $ac_pass in | |
1130 | 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; | |
1131 | 2) | |
1132 | ac_configure_args1="$ac_configure_args1 '$ac_arg'" | |
1133 | if test $ac_must_keep_next = true; then | |
86da66b5 | 1134 | ac_must_keep_next=false # Got value, back to normal. |
ba479fd2 | 1135 | else |
86da66b5 HPN |
1136 | case $ac_arg in |
1137 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
1138 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
1139 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
1140 | | -with-* | --with-* | -without-* | --without-* | --x) | |
1141 | case "$ac_configure_args0 " in | |
1142 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
1143 | esac | |
1144 | ;; | |
1145 | -* ) ac_must_keep_next=true ;; | |
1146 | esac | |
ba479fd2 NN |
1147 | fi |
1148 | ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" | |
1149 | # Get rid of the leading space. | |
1150 | ac_sep=" " | |
1151 | ;; | |
1152 | esac | |
1153 | done | |
1154 | done | |
1155 | $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } | |
1156 | $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } | |
1157 | ||
1158 | # When interrupted or exit'd, cleanup temporary files, and complete | |
1159 | # config.log. We remove comments because anyway the quotes in there | |
1160 | # would cause problems or look ugly. | |
1161 | # WARNING: Be sure not to use single quotes in there, as some shells, | |
1162 | # such as our DU 5.0 friend, will then `close' the trap. | |
1163 | trap 'exit_status=$? | |
1164 | # Save into config.log some information that might help in debugging. | |
1165 | { | |
1166 | echo | |
1167 | ||
1168 | cat <<\_ASBOX | |
1169 | ## ---------------- ## | |
1170 | ## Cache variables. ## | |
1171 | ## ---------------- ## | |
1172 | _ASBOX | |
1173 | echo | |
1174 | # The following way of writing the cache mishandles newlines in values, | |
1175 | { | |
1176 | (set) 2>&1 | | |
1177 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in | |
1178 | *ac_space=\ *) | |
1179 | sed -n \ | |
86da66b5 HPN |
1180 | "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; |
1181 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" | |
ba479fd2 NN |
1182 | ;; |
1183 | *) | |
1184 | sed -n \ | |
86da66b5 | 1185 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
ba479fd2 NN |
1186 | ;; |
1187 | esac; | |
1188 | } | |
1189 | echo | |
1190 | ||
1191 | cat <<\_ASBOX | |
1192 | ## ----------------- ## | |
1193 | ## Output variables. ## | |
1194 | ## ----------------- ## | |
1195 | _ASBOX | |
1196 | echo | |
1197 | for ac_var in $ac_subst_vars | |
1198 | do | |
1199 | eval ac_val=$`echo $ac_var` | |
1200 | echo "$ac_var='"'"'$ac_val'"'"'" | |
1201 | done | sort | |
1202 | echo | |
1203 | ||
1204 | if test -n "$ac_subst_files"; then | |
1205 | cat <<\_ASBOX | |
1206 | ## ------------- ## | |
1207 | ## Output files. ## | |
1208 | ## ------------- ## | |
1209 | _ASBOX | |
1210 | echo | |
1211 | for ac_var in $ac_subst_files | |
1212 | do | |
1213 | eval ac_val=$`echo $ac_var` | |
86da66b5 | 1214 | echo "$ac_var='"'"'$ac_val'"'"'" |
ba479fd2 NN |
1215 | done | sort |
1216 | echo | |
1217 | fi | |
1218 | ||
1219 | if test -s confdefs.h; then | |
1220 | cat <<\_ASBOX | |
1221 | ## ----------- ## | |
1222 | ## confdefs.h. ## | |
1223 | ## ----------- ## | |
1224 | _ASBOX | |
1225 | echo | |
1226 | sed "/^$/d" confdefs.h | sort | |
1227 | echo | |
1228 | fi | |
1229 | test "$ac_signal" != 0 && | |
1230 | echo "$as_me: caught signal $ac_signal" | |
1231 | echo "$as_me: exit $exit_status" | |
1232 | } >&5 | |
86da66b5 | 1233 | rm -f core *.core && |
ba479fd2 NN |
1234 | rm -rf conftest* confdefs* conf$$* $ac_clean_files && |
1235 | exit $exit_status | |
1236 | ' 0 | |
1237 | for ac_signal in 1 2 13 15; do | |
1238 | trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal | |
1239 | done | |
1240 | ac_signal=0 | |
1241 | ||
1242 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
1243 | rm -rf conftest* confdefs.h | |
1244 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
1245 | echo >confdefs.h | |
1246 | ||
1247 | # Predefined preprocessor variables. | |
1248 | ||
1249 | cat >>confdefs.h <<_ACEOF | |
1250 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
1251 | _ACEOF | |
1252 | ||
1253 | ||
1254 | cat >>confdefs.h <<_ACEOF | |
1255 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
1256 | _ACEOF | |
1257 | ||
1258 | ||
1259 | cat >>confdefs.h <<_ACEOF | |
1260 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
1261 | _ACEOF | |
1262 | ||
1263 | ||
1264 | cat >>confdefs.h <<_ACEOF | |
1265 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
1266 | _ACEOF | |
1267 | ||
1268 | ||
1269 | cat >>confdefs.h <<_ACEOF | |
1270 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
1271 | _ACEOF | |
1272 | ||
1273 | ||
1274 | # Let the site file select an alternate cache file if it wants to. | |
1275 | # Prefer explicitly selected file to automatically selected ones. | |
1276 | if test -z "$CONFIG_SITE"; then | |
1277 | if test "x$prefix" != xNONE; then | |
1278 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
1279 | else | |
1280 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
1281 | fi | |
1282 | fi | |
1283 | for ac_site_file in $CONFIG_SITE; do | |
1284 | if test -r "$ac_site_file"; then | |
1285 | { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 | |
1286 | echo "$as_me: loading site script $ac_site_file" >&6;} | |
1287 | sed 's/^/| /' "$ac_site_file" >&5 | |
1288 | . "$ac_site_file" | |
1289 | fi | |
1290 | done | |
1291 | ||
1292 | if test -r "$cache_file"; then | |
1293 | # Some versions of bash will fail to source /dev/null (special | |
1294 | # files actually), so we avoid doing that. | |
1295 | if test -f "$cache_file"; then | |
1296 | { echo "$as_me:$LINENO: loading cache $cache_file" >&5 | |
1297 | echo "$as_me: loading cache $cache_file" >&6;} | |
1298 | case $cache_file in | |
1299 | [\\/]* | ?:[\\/]* ) . $cache_file;; | |
1300 | *) . ./$cache_file;; | |
1301 | esac | |
1302 | fi | |
1303 | else | |
1304 | { echo "$as_me:$LINENO: creating cache $cache_file" >&5 | |
1305 | echo "$as_me: creating cache $cache_file" >&6;} | |
1306 | >$cache_file | |
1307 | fi | |
1308 | ||
1309 | # Check that the precious variables saved in the cache have kept the same | |
1310 | # value. | |
1311 | ac_cache_corrupted=false | |
1312 | for ac_var in `(set) 2>&1 | | |
86da66b5 | 1313 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do |
ba479fd2 NN |
1314 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
1315 | eval ac_new_set=\$ac_env_${ac_var}_set | |
1316 | eval ac_old_val="\$ac_cv_env_${ac_var}_value" | |
1317 | eval ac_new_val="\$ac_env_${ac_var}_value" | |
1318 | case $ac_old_set,$ac_new_set in | |
1319 | set,) | |
1320 | { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
1321 | echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
1322 | ac_cache_corrupted=: ;; | |
1323 | ,set) | |
1324 | { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 | |
1325 | echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
1326 | ac_cache_corrupted=: ;; | |
1327 | ,);; | |
1328 | *) | |
1329 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
86da66b5 | 1330 | { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 |
ba479fd2 | 1331 | echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} |
86da66b5 | 1332 | { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 |
ba479fd2 | 1333 | echo "$as_me: former value: $ac_old_val" >&2;} |
86da66b5 | 1334 | { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 |
ba479fd2 | 1335 | echo "$as_me: current value: $ac_new_val" >&2;} |
86da66b5 | 1336 | ac_cache_corrupted=: |
ba479fd2 NN |
1337 | fi;; |
1338 | esac | |
1339 | # Pass precious variables to config.status. | |
1340 | if test "$ac_new_set" = set; then | |
1341 | case $ac_new_val in | |
1342 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1343 | ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1344 | *) ac_arg=$ac_var=$ac_new_val ;; | |
1345 | esac | |
1346 | case " $ac_configure_args " in | |
1347 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
1348 | *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
1349 | esac | |
1350 | fi | |
1351 | done | |
1352 | if $ac_cache_corrupted; then | |
1353 | { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 | |
1354 | echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
1355 | { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 | |
1356 | echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} | |
1357 | { (exit 1); exit 1; }; } | |
1358 | fi | |
1359 | ||
1360 | ac_ext=c | |
1361 | ac_cpp='$CPP $CPPFLAGS' | |
1362 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1363 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1364 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1365 | ||
1366 | ||
1367 | ||
1368 | ||
1369 | ||
1370 | ||
1371 | ||
1372 | ||
1373 | ||
1374 | ||
1375 | ||
1376 | ||
1377 | ||
1378 | ||
1379 | ||
1380 | ||
1381 | ||
1382 | ||
1383 | ||
914c5af7 | 1384 | |
ba479fd2 NN |
1385 | ac_config_headers="$ac_config_headers auto-host.h:config.in" |
1386 | ||
1387 | ||
9f18db39 PB |
1388 | gcc_version=`cat $srcdir/BASE-VER` |
1389 | ||
ba479fd2 NN |
1390 | # Determine the host, build, and target systems |
1391 | ac_aux_dir= | |
1392 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
1393 | if test -f $ac_dir/install-sh; then | |
1394 | ac_aux_dir=$ac_dir | |
1395 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1396 | break | |
1397 | elif test -f $ac_dir/install.sh; then | |
1398 | ac_aux_dir=$ac_dir | |
1399 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1400 | break | |
1401 | elif test -f $ac_dir/shtool; then | |
1402 | ac_aux_dir=$ac_dir | |
1403 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
1404 | break | |
1405 | fi | |
1406 | done | |
1407 | if test -z "$ac_aux_dir"; then | |
1408 | { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 | |
1409 | echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} | |
1410 | { (exit 1); exit 1; }; } | |
1411 | fi | |
1412 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" | |
1413 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" | |
1414 | ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. | |
1415 | ||
1416 | # Make sure we can run config.sub. | |
1417 | $ac_config_sub sun4 >/dev/null 2>&1 || | |
1418 | { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 | |
1419 | echo "$as_me: error: cannot run $ac_config_sub" >&2;} | |
1420 | { (exit 1); exit 1; }; } | |
1421 | ||
1422 | echo "$as_me:$LINENO: checking build system type" >&5 | |
1423 | echo $ECHO_N "checking build system type... $ECHO_C" >&6 | |
1424 | if test "${ac_cv_build+set}" = set; then | |
1425 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1426 | else | |
1427 | ac_cv_build_alias=$build_alias | |
1428 | test -z "$ac_cv_build_alias" && | |
1429 | ac_cv_build_alias=`$ac_config_guess` | |
1430 | test -z "$ac_cv_build_alias" && | |
1431 | { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 | |
1432 | echo "$as_me: error: cannot guess build type; you must specify one" >&2;} | |
1433 | { (exit 1); exit 1; }; } | |
1434 | ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || | |
1435 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 | |
1436 | echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} | |
1437 | { (exit 1); exit 1; }; } | |
1438 | ||
1439 | fi | |
1440 | echo "$as_me:$LINENO: result: $ac_cv_build" >&5 | |
1441 | echo "${ECHO_T}$ac_cv_build" >&6 | |
1442 | build=$ac_cv_build | |
1443 | build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1444 | build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1445 | build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1446 | ||
1447 | ||
1448 | echo "$as_me:$LINENO: checking host system type" >&5 | |
1449 | echo $ECHO_N "checking host system type... $ECHO_C" >&6 | |
1450 | if test "${ac_cv_host+set}" = set; then | |
1451 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1452 | else | |
1453 | ac_cv_host_alias=$host_alias | |
1454 | test -z "$ac_cv_host_alias" && | |
1455 | ac_cv_host_alias=$ac_cv_build_alias | |
1456 | ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || | |
1457 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 | |
1458 | echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} | |
1459 | { (exit 1); exit 1; }; } | |
1460 | ||
1461 | fi | |
1462 | echo "$as_me:$LINENO: result: $ac_cv_host" >&5 | |
1463 | echo "${ECHO_T}$ac_cv_host" >&6 | |
1464 | host=$ac_cv_host | |
1465 | host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1466 | host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1467 | host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1468 | ||
1469 | ||
1470 | echo "$as_me:$LINENO: checking target system type" >&5 | |
1471 | echo $ECHO_N "checking target system type... $ECHO_C" >&6 | |
1472 | if test "${ac_cv_target+set}" = set; then | |
1473 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1474 | else | |
1475 | ac_cv_target_alias=$target_alias | |
1476 | test "x$ac_cv_target_alias" = "x" && | |
1477 | ac_cv_target_alias=$ac_cv_host_alias | |
1478 | ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || | |
1479 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 | |
1480 | echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} | |
1481 | { (exit 1); exit 1; }; } | |
1482 | ||
1483 | fi | |
1484 | echo "$as_me:$LINENO: result: $ac_cv_target" >&5 | |
1485 | echo "${ECHO_T}$ac_cv_target" >&6 | |
1486 | target=$ac_cv_target | |
1487 | target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1488 | target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1489 | target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1490 | ||
1491 | ||
1492 | # The aliases save the names the user supplied, while $host etc. | |
1493 | # will get canonicalized. | |
1494 | test -n "$target_alias" && | |
1495 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1496 | NONENONEs,x,x, && | |
1497 | program_prefix=${target_alias}- | |
1498 | ||
1499 | # Determine the noncanonical target name, for directory use. | |
1500 | case ${build_alias} in | |
1501 | "") build_noncanonical=${build} ;; | |
6e3f3080 NN |
1502 | *) build_noncanonical=${build_alias} ;; |
1503 | esac | |
73458fb7 | 1504 | |
4665e56c NN |
1505 | case ${host_alias} in |
1506 | "") host_noncanonical=${build_noncanonical} ;; | |
1507 | *) host_noncanonical=${host_alias} ;; | |
1508 | esac | |
73458fb7 | 1509 | |
4665e56c NN |
1510 | case ${target_alias} in |
1511 | "") target_noncanonical=${host_noncanonical} ;; | |
1512 | *) target_noncanonical=${target_alias} ;; | |
1513 | esac | |
093e61a6 | 1514 | |
8f1529e6 L |
1515 | |
1516 | ||
1517 | ||
1518 | # Determine the target- and build-specific subdirectories | |
4665e56c NN |
1519 | # Prefix 'build-' so this never conflicts with target_subdir. |
1520 | build_subdir="build-${build_noncanonical}" | |
215c351a PB |
1521 | # --srcdir=. covers the toplevel, while "test -d" covers the subdirectories |
1522 | if ( test $srcdir = . && test -d gcc ) \ | |
1523 | || test -d $srcdir/../host-${host_noncanonical}; then | |
1524 | host_subdir="host-${host_noncanonical}" | |
1525 | else | |
1526 | host_subdir=. | |
1527 | fi | |
4665e56c NN |
1528 | # No prefix. |
1529 | target_subdir=${target_noncanonical} | |
ba479fd2 | 1530 | |
73458fb7 | 1531 | |
093e61a6 | 1532 | # Set program_transform_name |
13c22933 | 1533 | test "$program_prefix" != NONE && |
ba479fd2 | 1534 | program_transform_name="s,^,$program_prefix,;$program_transform_name" |
13c22933 JJ |
1535 | # Use a double $ so make ignores it. |
1536 | test "$program_suffix" != NONE && | |
ba479fd2 NN |
1537 | program_transform_name="s,\$,$program_suffix,;$program_transform_name" |
1538 | # Double any \ or $. echo might interpret backslashes. | |
1539 | # By default was `s,x,x', remove it if useless. | |
1540 | cat <<\_ACEOF >conftest.sed | |
1541 | s/[\\$]/&&/g;s/;s,x,x,$// | |
1542 | _ACEOF | |
1543 | program_transform_name=`echo $program_transform_name | sed -f conftest.sed` | |
1544 | rm conftest.sed | |
13c22933 JJ |
1545 | |
1546 | ||
34a86c2b NN |
1547 | # Check for bogus environment variables. |
1548 | # Test if LIBRARY_PATH contains the notation for the current directory | |
1549 | # since this would lead to problems installing/building glibc. | |
1550 | # LIBRARY_PATH contains the current directory if one of the following | |
1551 | # is true: | |
1552 | # - one of the terminals (":" and ";") is the first or last sign | |
1553 | # - two terminals occur directly after each other | |
1554 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1555 | echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5 |
1556 | echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6 | |
34a86c2b NN |
1557 | case ${LIBRARY_PATH} in |
1558 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1559 | library_path_setting="contains current directory" | |
1560 | ;; | |
1561 | *) | |
1562 | library_path_setting="ok" | |
1563 | ;; | |
1564 | esac | |
ba479fd2 NN |
1565 | echo "$as_me:$LINENO: result: $library_path_setting" >&5 |
1566 | echo "${ECHO_T}$library_path_setting" >&6 | |
34a86c2b | 1567 | if test "$library_path_setting" != "ok"; then |
ba479fd2 | 1568 | { { echo "$as_me:$LINENO: error: |
34a86c2b NN |
1569 | *** LIBRARY_PATH shouldn't contain the current directory when |
1570 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1571 | *** and run configure again." >&5 |
1572 | echo "$as_me: error: | |
1573 | *** LIBRARY_PATH shouldn't contain the current directory when | |
1574 | *** building gcc. Please change the environment variable | |
1575 | *** and run configure again." >&2;} | |
1576 | { (exit 1); exit 1; }; } | |
e9a25f70 JL |
1577 | fi |
1578 | ||
34a86c2b NN |
1579 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
1580 | # since this would lead to problems installing/building glibc. | |
1581 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
1582 | # is true: | |
1583 | # - one of the terminals (":" and ";") is the first or last sign | |
1584 | # - two terminals occur directly after each other | |
1585 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1586 | echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5 |
1587 | echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6 | |
34a86c2b NN |
1588 | case ${GCC_EXEC_PREFIX} in |
1589 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1590 | gcc_exec_prefix_setting="contains current directory" | |
1591 | ;; | |
1592 | *) | |
1593 | gcc_exec_prefix_setting="ok" | |
1594 | ;; | |
1595 | esac | |
ba479fd2 NN |
1596 | echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5 |
1597 | echo "${ECHO_T}$gcc_exec_prefix_setting" >&6 | |
34a86c2b | 1598 | if test "$gcc_exec_prefix_setting" != "ok"; then |
ba479fd2 NN |
1599 | { { echo "$as_me:$LINENO: error: |
1600 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
1601 | *** building gcc. Please change the environment variable | |
1602 | *** and run configure again." >&5 | |
1603 | echo "$as_me: error: | |
cafe096b EC |
1604 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
1605 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1606 | *** and run configure again." >&2;} |
1607 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1608 | fi |
1609 | ||
1610 | # ----------- | |
1611 | # Directories | |
1612 | # ----------- | |
1613 | ||
1614 | # Specify the local prefix | |
1615 | local_prefix= | |
ba479fd2 | 1616 | |
34a86c2b NN |
1617 | # Check whether --with-local-prefix or --without-local-prefix was given. |
1618 | if test "${with_local_prefix+set}" = set; then | |
1619 | withval="$with_local_prefix" | |
1620 | case "${withval}" in | |
ba479fd2 NN |
1621 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5 |
1622 | echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;} | |
1623 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1624 | no) ;; |
1625 | *) local_prefix=$with_local_prefix ;; | |
1626 | esac | |
ba479fd2 | 1627 | fi; |
34a86c2b NN |
1628 | |
1629 | # Default local prefix if it is empty | |
1630 | if test x$local_prefix = x; then | |
1631 | local_prefix=/usr/local | |
1632 | fi | |
1633 | ||
1634 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
1635 | # passed in by the toplevel make and thus we'd get different behavior | |
1636 | # depending on where we built the sources. | |
1637 | gcc_gxx_include_dir= | |
1638 | # Specify the g++ header file directory | |
ba479fd2 | 1639 | |
34a86c2b NN |
1640 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. |
1641 | if test "${with_gxx_include_dir+set}" = set; then | |
1642 | withval="$with_gxx_include_dir" | |
1643 | case "${withval}" in | |
ba479fd2 NN |
1644 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5 |
1645 | echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;} | |
1646 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1647 | no) ;; |
1648 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
1649 | esac | |
ba479fd2 | 1650 | fi; |
34a86c2b NN |
1651 | |
1652 | if test x${gcc_gxx_include_dir} = x; then | |
1653 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
1654 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
1655 | else | |
a1286ef5 | 1656 | libstdcxx_incdir='c++/$(version)' |
34a86c2b NN |
1657 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} |
1658 | fi | |
1659 | fi | |
1660 | ||
ba479fd2 | 1661 | |
34a86c2b NN |
1662 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. |
1663 | if test "${with_cpp_install_dir+set}" = set; then | |
1664 | withval="$with_cpp_install_dir" | |
1665 | if test x$withval = xyes; then | |
ba479fd2 NN |
1666 | { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5 |
1667 | echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;} | |
1668 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1669 | elif test x$withval != xno; then |
1670 | cpp_install_dir=$withval | |
1671 | fi | |
ba479fd2 | 1672 | fi; |
34a86c2b | 1673 | |
51b9ff45 | 1674 | # We would like to our source tree to be readonly. However when releases or |
ba479fd2 | 1675 | # pre-releases are generated, the flex/bison generated files as well as the |
51b9ff45 | 1676 | # various formats of manuals need to be included along with the rest of the |
ba479fd2 | 1677 | # sources. Therefore we have --enable-generated-files-in-srcdir to do |
51b9ff45 KC |
1678 | # just that. |
1679 | ||
03787dfd KC |
1680 | echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5 |
1681 | echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6 | |
1682 | # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given. | |
51b9ff45 KC |
1683 | if test "${enable_generated_files_in_srcdir+set}" = set; then |
1684 | enableval="$enable_generated_files_in_srcdir" | |
03787dfd | 1685 | generated_files_in_srcdir=$enableval |
51b9ff45 | 1686 | else |
03787dfd | 1687 | generated_files_in_srcdir=no |
ba479fd2 | 1688 | fi; |
51b9ff45 | 1689 | |
03787dfd KC |
1690 | echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5 |
1691 | echo "${ECHO_T}$generated_files_in_srcdir" >&6 | |
1692 | ||
1693 | if test "$generated_files_in_srcdir" = "yes"; then | |
1694 | GENINSRC='' | |
03787dfd KC |
1695 | else |
1696 | GENINSRC='#' | |
03787dfd KC |
1697 | fi |
1698 | ||
1699 | ||
34a86c2b NN |
1700 | # ------------------- |
1701 | # Find default linker | |
1702 | # ------------------- | |
1703 | ||
1704 | # With GNU ld | |
ba479fd2 | 1705 | |
34a86c2b NN |
1706 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
1707 | if test "${with_gnu_ld+set}" = set; then | |
1708 | withval="$with_gnu_ld" | |
1709 | gnu_ld_flag="$with_gnu_ld" | |
1710 | else | |
1711 | gnu_ld_flag=no | |
ba479fd2 | 1712 | fi; |
6e3f3080 | 1713 | |
63cf211a | 1714 | # With pre-defined ld |
ba479fd2 | 1715 | |
34a86c2b NN |
1716 | # Check whether --with-ld or --without-ld was given. |
1717 | if test "${with_ld+set}" = set; then | |
1718 | withval="$with_ld" | |
1719 | DEFAULT_LINKER="$with_ld" | |
ba479fd2 | 1720 | fi; |
34a86c2b NN |
1721 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1722 | if test ! -x "$DEFAULT_LINKER"; then | |
99c012a8 BE |
1723 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5 |
1724 | echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;} | |
1725 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1726 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1727 | gnu_ld_flag=yes | |
1728 | fi | |
ba479fd2 NN |
1729 | |
1730 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1731 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
ba479fd2 | 1732 | _ACEOF |
34a86c2b NN |
1733 | |
1734 | fi | |
1735 | ||
ba479fd2 NN |
1736 | echo "$as_me:$LINENO: checking whether a default linker was specified" >&5 |
1737 | echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1738 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1739 | if test x"$gnu_ld_flag" = x"no"; then | |
ba479fd2 NN |
1740 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5 |
1741 | echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6 | |
34a86c2b | 1742 | else |
ba479fd2 NN |
1743 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5 |
1744 | echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6 | |
34a86c2b NN |
1745 | fi |
1746 | else | |
ba479fd2 NN |
1747 | echo "$as_me:$LINENO: result: no" >&5 |
1748 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1749 | fi |
1750 | ||
d594623a L |
1751 | # With demangler in GNU ld |
1752 | ||
1753 | # Check whether --with-demangler-in-ld or --without-demangler-in-ld was given. | |
1754 | if test "${with_demangler_in_ld+set}" = set; then | |
1755 | withval="$with_demangler_in_ld" | |
1756 | demangler_in_ld="$with_demangler_in_ld" | |
1757 | else | |
1758 | demangler_in_ld=no | |
1759 | fi; | |
1760 | ||
34a86c2b NN |
1761 | # ---------------------- |
1762 | # Find default assembler | |
1763 | # ---------------------- | |
1764 | ||
1765 | # With GNU as | |
ba479fd2 | 1766 | |
34a86c2b NN |
1767 | # Check whether --with-gnu-as or --without-gnu-as was given. |
1768 | if test "${with_gnu_as+set}" = set; then | |
1769 | withval="$with_gnu_as" | |
1770 | gas_flag="$with_gnu_as" | |
1771 | else | |
1772 | gas_flag=no | |
ba479fd2 | 1773 | fi; |
34a86c2b NN |
1774 | |
1775 | ||
1776 | # Check whether --with-as or --without-as was given. | |
1777 | if test "${with_as+set}" = set; then | |
1778 | withval="$with_as" | |
1779 | DEFAULT_ASSEMBLER="$with_as" | |
ba479fd2 | 1780 | fi; |
34a86c2b NN |
1781 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1782 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
99c012a8 BE |
1783 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5 |
1784 | echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;} | |
1785 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1786 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1787 | gas_flag=yes | |
1788 | fi | |
ba479fd2 NN |
1789 | |
1790 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1791 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
ba479fd2 | 1792 | _ACEOF |
34a86c2b NN |
1793 | |
1794 | fi | |
1795 | ||
ba479fd2 NN |
1796 | echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5 |
1797 | echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1798 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1799 | if test x"$gas_flag" = x"no"; then | |
ba479fd2 NN |
1800 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5 |
1801 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6 | |
34a86c2b | 1802 | else |
ba479fd2 NN |
1803 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 |
1804 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6 | |
34a86c2b NN |
1805 | fi |
1806 | else | |
ba479fd2 NN |
1807 | echo "$as_me:$LINENO: result: no" >&5 |
1808 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1809 | fi |
1810 | ||
1811 | # --------------- | |
1812 | # Find C compiler | |
1813 | # --------------- | |
1814 | ||
426ca3ca RO |
1815 | # If a non-executable a.out is present (e.g. created by GNU as above even if |
1816 | # invoked with -v only), the IRIX 6 native ld just overwrites the existing | |
1817 | # file, even when creating an executable, so an execution test fails. | |
1818 | # Remove possible default executable files to avoid this. | |
1819 | # | |
1820 | # FIXME: This really belongs into AC_PROG_CC and can be removed once | |
1821 | # Autoconf includes it. | |
1822 | rm -f a.out a.exe b.out | |
1823 | ||
34a86c2b | 1824 | # Find the native compiler |
ba479fd2 NN |
1825 | ac_ext=c |
1826 | ac_cpp='$CPP $CPPFLAGS' | |
1827 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1828 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1829 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1830 | if test -n "$ac_tool_prefix"; then | |
1831 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
1832 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
1833 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1834 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1835 | if test "${ac_cv_prog_CC+set}" = set; then | |
1836 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1837 | else | |
1838 | if test -n "$CC"; then | |
1839 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1840 | else | |
1841 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1842 | for as_dir in $PATH | |
1843 | do | |
1844 | IFS=$as_save_IFS | |
1845 | test -z "$as_dir" && as_dir=. | |
1846 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1847 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1848 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
1849 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1850 | break 2 | |
1851 | fi | |
1852 | done | |
1853 | done | |
1854 | ||
1855 | fi | |
1856 | fi | |
1857 | CC=$ac_cv_prog_CC | |
1858 | if test -n "$CC"; then | |
1859 | echo "$as_me:$LINENO: result: $CC" >&5 | |
1860 | echo "${ECHO_T}$CC" >&6 | |
1861 | else | |
1862 | echo "$as_me:$LINENO: result: no" >&5 | |
1863 | echo "${ECHO_T}no" >&6 | |
1864 | fi | |
1865 | ||
1866 | fi | |
1867 | if test -z "$ac_cv_prog_CC"; then | |
1868 | ac_ct_CC=$CC | |
1869 | # Extract the first word of "gcc", so it can be a program name with args. | |
6e3f3080 | 1870 | set dummy gcc; ac_word=$2 |
ba479fd2 NN |
1871 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1872 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1873 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1874 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1875 | else | |
1876 | if test -n "$ac_ct_CC"; then | |
1877 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1878 | else | |
1879 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1880 | for as_dir in $PATH | |
1881 | do | |
1882 | IFS=$as_save_IFS | |
1883 | test -z "$as_dir" && as_dir=. | |
1884 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1885 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1886 | ac_cv_prog_ac_ct_CC="gcc" | |
1887 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1888 | break 2 | |
1889 | fi | |
1890 | done | |
1891 | done | |
1892 | ||
1893 | fi | |
1894 | fi | |
1895 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1896 | if test -n "$ac_ct_CC"; then | |
1897 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1898 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1899 | else | |
1900 | echo "$as_me:$LINENO: result: no" >&5 | |
1901 | echo "${ECHO_T}no" >&6 | |
1902 | fi | |
1903 | ||
1904 | CC=$ac_ct_CC | |
1905 | else | |
1906 | CC="$ac_cv_prog_CC" | |
1907 | fi | |
1908 | ||
1909 | if test -z "$CC"; then | |
1910 | if test -n "$ac_tool_prefix"; then | |
1911 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
1912 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
1913 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1914 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1915 | if test "${ac_cv_prog_CC+set}" = set; then | |
1916 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cd9e5e7c MK |
1917 | else |
1918 | if test -n "$CC"; then | |
1919 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1920 | else | |
ba479fd2 NN |
1921 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1922 | for as_dir in $PATH | |
1923 | do | |
1924 | IFS=$as_save_IFS | |
1925 | test -z "$as_dir" && as_dir=. | |
1926 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1927 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1928 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
1929 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1930 | break 2 | |
1931 | fi | |
1932 | done | |
1933 | done | |
1934 | ||
cd9e5e7c MK |
1935 | fi |
1936 | fi | |
ba479fd2 | 1937 | CC=$ac_cv_prog_CC |
cd9e5e7c | 1938 | if test -n "$CC"; then |
ba479fd2 NN |
1939 | echo "$as_me:$LINENO: result: $CC" >&5 |
1940 | echo "${ECHO_T}$CC" >&6 | |
1941 | else | |
1942 | echo "$as_me:$LINENO: result: no" >&5 | |
1943 | echo "${ECHO_T}no" >&6 | |
1944 | fi | |
1945 | ||
1946 | fi | |
1947 | if test -z "$ac_cv_prog_CC"; then | |
1948 | ac_ct_CC=$CC | |
1949 | # Extract the first word of "cc", so it can be a program name with args. | |
1950 | set dummy cc; ac_word=$2 | |
1951 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1952 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1953 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1954 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1955 | else | |
1956 | if test -n "$ac_ct_CC"; then | |
1957 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1958 | else | |
1959 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1960 | for as_dir in $PATH | |
1961 | do | |
1962 | IFS=$as_save_IFS | |
1963 | test -z "$as_dir" && as_dir=. | |
1964 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1965 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1966 | ac_cv_prog_ac_ct_CC="cc" | |
1967 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1968 | break 2 | |
1969 | fi | |
1970 | done | |
1971 | done | |
1972 | ||
1973 | fi | |
1974 | fi | |
1975 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1976 | if test -n "$ac_ct_CC"; then | |
1977 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1978 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1979 | else | |
1980 | echo "$as_me:$LINENO: result: no" >&5 | |
1981 | echo "${ECHO_T}no" >&6 | |
1982 | fi | |
1983 | ||
1984 | CC=$ac_ct_CC | |
cd9e5e7c | 1985 | else |
ba479fd2 | 1986 | CC="$ac_cv_prog_CC" |
e9a25f70 | 1987 | fi |
6e3f3080 | 1988 | |
ba479fd2 | 1989 | fi |
6e3f3080 NN |
1990 | if test -z "$CC"; then |
1991 | # Extract the first word of "cc", so it can be a program name with args. | |
1992 | set dummy cc; ac_word=$2 | |
ba479fd2 NN |
1993 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1994 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1995 | if test "${ac_cv_prog_CC+set}" = set; then | |
1996 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6e3f3080 NN |
1997 | else |
1998 | if test -n "$CC"; then | |
1999 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2000 | else | |
2001 | ac_prog_rejected=no | |
ba479fd2 NN |
2002 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2003 | for as_dir in $PATH | |
2004 | do | |
2005 | IFS=$as_save_IFS | |
2006 | test -z "$as_dir" && as_dir=. | |
2007 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2008 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2009 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2010 | ac_prog_rejected=yes | |
2011 | continue | |
2012 | fi | |
2013 | ac_cv_prog_CC="cc" | |
2014 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2015 | break 2 | |
2016 | fi | |
2017 | done | |
2018 | done | |
2019 | ||
6e3f3080 NN |
2020 | if test $ac_prog_rejected = yes; then |
2021 | # We found a bogon in the path, so make sure we never use it. | |
2022 | set dummy $ac_cv_prog_CC | |
2023 | shift | |
ba479fd2 | 2024 | if test $# != 0; then |
6e3f3080 NN |
2025 | # We chose a different compiler from the bogus one. |
2026 | # However, it has the same basename, so the bogon will be chosen | |
2027 | # first if we set CC to just the basename; use the full file name. | |
2028 | shift | |
ba479fd2 | 2029 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
e9a25f70 | 2030 | fi |
6e3f3080 NN |
2031 | fi |
2032 | fi | |
2033 | fi | |
ba479fd2 | 2034 | CC=$ac_cv_prog_CC |
6e3f3080 | 2035 | if test -n "$CC"; then |
ba479fd2 NN |
2036 | echo "$as_me:$LINENO: result: $CC" >&5 |
2037 | echo "${ECHO_T}$CC" >&6 | |
e9a25f70 | 2038 | else |
ba479fd2 NN |
2039 | echo "$as_me:$LINENO: result: no" >&5 |
2040 | echo "${ECHO_T}no" >&6 | |
e9a25f70 | 2041 | fi |
6e3f3080 | 2042 | |
ba479fd2 NN |
2043 | fi |
2044 | if test -z "$CC"; then | |
2045 | if test -n "$ac_tool_prefix"; then | |
2046 | for ac_prog in cl | |
2047 | do | |
2048 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2049 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
2050 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2051 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2052 | if test "${ac_cv_prog_CC+set}" = set; then | |
2053 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
093e61a6 | 2054 | else |
6e3f3080 NN |
2055 | if test -n "$CC"; then |
2056 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2057 | else | |
ba479fd2 NN |
2058 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2059 | for as_dir in $PATH | |
2060 | do | |
2061 | IFS=$as_save_IFS | |
2062 | test -z "$as_dir" && as_dir=. | |
2063 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2064 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2065 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
2066 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2067 | break 2 | |
2068 | fi | |
2069 | done | |
2070 | done | |
2071 | ||
093e61a6 | 2072 | fi |
6e3f3080 | 2073 | fi |
ba479fd2 | 2074 | CC=$ac_cv_prog_CC |
6e3f3080 | 2075 | if test -n "$CC"; then |
ba479fd2 NN |
2076 | echo "$as_me:$LINENO: result: $CC" >&5 |
2077 | echo "${ECHO_T}$CC" >&6 | |
6e3f3080 | 2078 | else |
ba479fd2 NN |
2079 | echo "$as_me:$LINENO: result: no" >&5 |
2080 | echo "${ECHO_T}no" >&6 | |
093e61a6 | 2081 | fi |
cafe096b | 2082 | |
ba479fd2 NN |
2083 | test -n "$CC" && break |
2084 | done | |
2085 | fi | |
2086 | if test -z "$CC"; then | |
2087 | ac_ct_CC=$CC | |
2088 | for ac_prog in cl | |
2089 | do | |
2090 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2091 | set dummy $ac_prog; ac_word=$2 | |
2092 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2093 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2094 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
2095 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2096 | else | |
2097 | if test -n "$ac_ct_CC"; then | |
2098 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2099 | else | |
2100 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2101 | for as_dir in $PATH | |
2102 | do | |
2103 | IFS=$as_save_IFS | |
2104 | test -z "$as_dir" && as_dir=. | |
2105 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2106 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2107 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
2108 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2109 | break 2 | |
2110 | fi | |
2111 | done | |
2112 | done | |
6e3f3080 | 2113 | |
ba479fd2 NN |
2114 | fi |
2115 | fi | |
2116 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2117 | if test -n "$ac_ct_CC"; then | |
2118 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
2119 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
2120 | else | |
2121 | echo "$as_me:$LINENO: result: no" >&5 | |
2122 | echo "${ECHO_T}no" >&6 | |
2123 | fi | |
6e3f3080 | 2124 | |
ba479fd2 NN |
2125 | test -n "$ac_ct_CC" && break |
2126 | done | |
63cf211a | 2127 | |
ba479fd2 NN |
2128 | CC=$ac_ct_CC |
2129 | fi | |
2130 | ||
2131 | fi | |
2132 | ||
2133 | ||
2134 | test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH | |
2135 | See \`config.log' for more details." >&5 | |
2136 | echo "$as_me: error: no acceptable C compiler found in \$PATH | |
2137 | See \`config.log' for more details." >&2;} | |
2138 | { (exit 1); exit 1; }; } | |
2139 | ||
2140 | # Provide some information about the compiler. | |
2141 | echo "$as_me:$LINENO:" \ | |
2142 | "checking for C compiler version" >&5 | |
2143 | ac_compiler=`set X $ac_compile; echo $2` | |
2144 | { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 | |
2145 | (eval $ac_compiler --version </dev/null >&5) 2>&5 | |
2146 | ac_status=$? | |
2147 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2148 | (exit $ac_status); } | |
2149 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 | |
2150 | (eval $ac_compiler -v </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 | ||
2160 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2161 | /* confdefs.h. */ |
2162 | _ACEOF | |
2163 | cat confdefs.h >>conftest.$ac_ext | |
2164 | cat >>conftest.$ac_ext <<_ACEOF | |
2165 | /* end confdefs.h. */ | |
2166 | ||
2167 | int | |
2168 | main () | |
2169 | { | |
63cf211a | 2170 | |
ba479fd2 NN |
2171 | ; |
2172 | return 0; | |
2173 | } | |
2174 | _ACEOF | |
2175 | ac_clean_files_save=$ac_clean_files | |
2176 | ac_clean_files="$ac_clean_files a.out a.exe b.out" | |
2177 | # Try to create an executable without -o first, disregard a.out. | |
2178 | # It will help us diagnose broken compilers, and finding out an intuition | |
2179 | # of exeext. | |
86da66b5 HPN |
2180 | echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 |
2181 | echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 | |
ba479fd2 NN |
2182 | ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
2183 | if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 | |
2184 | (eval $ac_link_default) 2>&5 | |
2185 | ac_status=$? | |
2186 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2187 | (exit $ac_status); }; then | |
2188 | # Find the output, starting from the most likely. This scheme is | |
2189 | # not robust to junk in `.', hence go to wildcards (a.*) only as a last | |
2190 | # resort. | |
2191 | ||
2192 | # Be careful to initialize this variable, since it used to be cached. | |
2193 | # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. | |
2194 | ac_cv_exeext= | |
2195 | # b.out is created by i960 compilers. | |
2196 | for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out | |
2197 | do | |
2198 | test -f "$ac_file" || continue | |
2199 | case $ac_file in | |
2200 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) | |
86da66b5 | 2201 | ;; |
ba479fd2 | 2202 | conftest.$ac_ext ) |
86da66b5 HPN |
2203 | # This is the source file. |
2204 | ;; | |
ba479fd2 | 2205 | [ab].out ) |
86da66b5 HPN |
2206 | # We found the default executable, but exeext='' is most |
2207 | # certainly right. | |
2208 | break;; | |
ba479fd2 | 2209 | *.* ) |
86da66b5 HPN |
2210 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
2211 | # FIXME: I believe we export ac_cv_exeext for Libtool, | |
2212 | # but it would be cool to find out if it's true. Does anybody | |
2213 | # maintain Libtool? --akim. | |
2214 | export ac_cv_exeext | |
2215 | break;; | |
ba479fd2 | 2216 | * ) |
86da66b5 | 2217 | break;; |
ba479fd2 NN |
2218 | esac |
2219 | done | |
2220 | else | |
2221 | echo "$as_me: failed program was:" >&5 | |
2222 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2223 | ||
2224 | { { echo "$as_me:$LINENO: error: C compiler cannot create executables | |
2225 | See \`config.log' for more details." >&5 | |
2226 | echo "$as_me: error: C compiler cannot create executables | |
2227 | See \`config.log' for more details." >&2;} | |
2228 | { (exit 77); exit 77; }; } | |
2229 | fi | |
2230 | ||
2231 | ac_exeext=$ac_cv_exeext | |
2232 | echo "$as_me:$LINENO: result: $ac_file" >&5 | |
2233 | echo "${ECHO_T}$ac_file" >&6 | |
2234 | ||
2235 | # Check the compiler produces executables we can run. If not, either | |
2236 | # the compiler is broken, or we cross compile. | |
2237 | echo "$as_me:$LINENO: checking whether the C compiler works" >&5 | |
2238 | echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 | |
2239 | # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 | |
2240 | # If not cross compiling, check that we can run a simple program. | |
2241 | if test "$cross_compiling" != yes; then | |
2242 | if { ac_try='./$ac_file' | |
2243 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2244 | (eval $ac_try) 2>&5 | |
2245 | ac_status=$? | |
2246 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2247 | (exit $ac_status); }; }; then | |
2248 | cross_compiling=no | |
6e3f3080 | 2249 | else |
ba479fd2 NN |
2250 | if test "$cross_compiling" = maybe; then |
2251 | cross_compiling=yes | |
2252 | else | |
2253 | { { echo "$as_me:$LINENO: error: cannot run C compiled programs. | |
2254 | If you meant to cross compile, use \`--host'. | |
2255 | See \`config.log' for more details." >&5 | |
2256 | echo "$as_me: error: cannot run C compiled programs. | |
2257 | If you meant to cross compile, use \`--host'. | |
2258 | See \`config.log' for more details." >&2;} | |
2259 | { (exit 1); exit 1; }; } | |
2260 | fi | |
6e3f3080 NN |
2261 | fi |
2262 | fi | |
ba479fd2 NN |
2263 | echo "$as_me:$LINENO: result: yes" >&5 |
2264 | echo "${ECHO_T}yes" >&6 | |
2265 | ||
2266 | rm -f a.out a.exe conftest$ac_cv_exeext b.out | |
2267 | ac_clean_files=$ac_clean_files_save | |
2268 | # Check the compiler produces executables we can run. If not, either | |
2269 | # the compiler is broken, or we cross compile. | |
2270 | echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 | |
2271 | echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 | |
2272 | echo "$as_me:$LINENO: result: $cross_compiling" >&5 | |
2273 | echo "${ECHO_T}$cross_compiling" >&6 | |
2274 | ||
2275 | echo "$as_me:$LINENO: checking for suffix of executables" >&5 | |
2276 | echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 | |
2277 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
2278 | (eval $ac_link) 2>&5 | |
2279 | ac_status=$? | |
2280 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2281 | (exit $ac_status); }; then | |
2282 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
2283 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
2284 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
2285 | # `rm'. | |
2286 | for ac_file in conftest.exe conftest conftest.*; do | |
2287 | test -f "$ac_file" || continue | |
2288 | case $ac_file in | |
2289 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; | |
2290 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
86da66b5 HPN |
2291 | export ac_cv_exeext |
2292 | break;; | |
ba479fd2 NN |
2293 | * ) break;; |
2294 | esac | |
2295 | done | |
e9a25f70 | 2296 | else |
ba479fd2 NN |
2297 | { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link |
2298 | See \`config.log' for more details." >&5 | |
2299 | echo "$as_me: error: cannot compute suffix of executables: cannot compile and link | |
2300 | See \`config.log' for more details." >&2;} | |
2301 | { (exit 1); exit 1; }; } | |
2302 | fi | |
2303 | ||
2304 | rm -f conftest$ac_cv_exeext | |
2305 | echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 | |
2306 | echo "${ECHO_T}$ac_cv_exeext" >&6 | |
2307 | ||
2308 | rm -f conftest.$ac_ext | |
2309 | EXEEXT=$ac_cv_exeext | |
2310 | ac_exeext=$EXEEXT | |
2311 | echo "$as_me:$LINENO: checking for suffix of object files" >&5 | |
2312 | echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 | |
2313 | if test "${ac_cv_objext+set}" = set; then | |
2314 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2315 | else | |
2316 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2317 | /* confdefs.h. */ |
2318 | _ACEOF | |
2319 | cat confdefs.h >>conftest.$ac_ext | |
2320 | cat >>conftest.$ac_ext <<_ACEOF | |
2321 | /* end confdefs.h. */ | |
2322 | ||
2323 | int | |
2324 | main () | |
2325 | { | |
6e3f3080 | 2326 | |
ba479fd2 NN |
2327 | ; |
2328 | return 0; | |
2329 | } | |
2330 | _ACEOF | |
2331 | rm -f conftest.o conftest.obj | |
2332 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2333 | (eval $ac_compile) 2>&5 | |
2334 | ac_status=$? | |
2335 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2336 | (exit $ac_status); }; then | |
2337 | for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do | |
2338 | case $ac_file in | |
2339 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; | |
2340 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
2341 | break;; | |
2342 | esac | |
2343 | done | |
63cf211a | 2344 | else |
ba479fd2 NN |
2345 | echo "$as_me: failed program was:" >&5 |
2346 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2347 | ||
2348 | { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile | |
2349 | See \`config.log' for more details." >&5 | |
2350 | echo "$as_me: error: cannot compute suffix of object files: cannot compile | |
2351 | See \`config.log' for more details." >&2;} | |
2352 | { (exit 1); exit 1; }; } | |
2353 | fi | |
2354 | ||
2355 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
2356 | fi | |
2357 | echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 | |
2358 | echo "${ECHO_T}$ac_cv_objext" >&6 | |
2359 | OBJEXT=$ac_cv_objext | |
2360 | ac_objext=$OBJEXT | |
2361 | echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 | |
2362 | echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 | |
2363 | if test "${ac_cv_c_compiler_gnu+set}" = set; then | |
2364 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2365 | else | |
2366 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2367 | /* confdefs.h. */ |
2368 | _ACEOF | |
2369 | cat confdefs.h >>conftest.$ac_ext | |
2370 | cat >>conftest.$ac_ext <<_ACEOF | |
2371 | /* end confdefs.h. */ | |
2372 | ||
2373 | int | |
2374 | main () | |
2375 | { | |
2376 | #ifndef __GNUC__ | |
2377 | choke me | |
2378 | #endif | |
6e3f3080 | 2379 | |
ba479fd2 NN |
2380 | ; |
2381 | return 0; | |
2382 | } | |
2383 | _ACEOF | |
2384 | rm -f conftest.$ac_objext | |
2385 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2386 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2387 | ac_status=$? |
86da66b5 HPN |
2388 | grep -v '^ *+' conftest.er1 >conftest.err |
2389 | rm -f conftest.er1 | |
2390 | cat conftest.err >&5 | |
ba479fd2 NN |
2391 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2392 | (exit $ac_status); } && | |
d7974fe6 KC |
2393 | { ac_try='test -z "$ac_c_werror_flag" |
2394 | || test ! -s conftest.err' | |
86da66b5 HPN |
2395 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2396 | (eval $ac_try) 2>&5 | |
2397 | ac_status=$? | |
2398 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2399 | (exit $ac_status); }; } && | |
2400 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2401 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2402 | (eval $ac_try) 2>&5 | |
2403 | ac_status=$? | |
2404 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2405 | (exit $ac_status); }; }; then | |
2406 | ac_compiler_gnu=yes | |
2407 | else | |
2408 | echo "$as_me: failed program was:" >&5 | |
2409 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2410 | ||
2411 | ac_compiler_gnu=no | |
2412 | fi | |
86da66b5 | 2413 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2414 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
2415 | ||
2416 | fi | |
2417 | echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 | |
2418 | echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 | |
2419 | GCC=`test $ac_compiler_gnu = yes && echo yes` | |
2420 | ac_test_CFLAGS=${CFLAGS+set} | |
2421 | ac_save_CFLAGS=$CFLAGS | |
2422 | CFLAGS="-g" | |
2423 | echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 | |
2424 | echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 | |
2425 | if test "${ac_cv_prog_cc_g+set}" = set; then | |
2426 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2427 | else | |
2428 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2429 | /* confdefs.h. */ |
2430 | _ACEOF | |
2431 | cat confdefs.h >>conftest.$ac_ext | |
2432 | cat >>conftest.$ac_ext <<_ACEOF | |
2433 | /* end confdefs.h. */ | |
2434 | ||
2435 | int | |
2436 | main () | |
2437 | { | |
2438 | ||
2439 | ; | |
2440 | return 0; | |
2441 | } | |
2442 | _ACEOF | |
2443 | rm -f conftest.$ac_objext | |
2444 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2445 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2446 | ac_status=$? |
86da66b5 HPN |
2447 | grep -v '^ *+' conftest.er1 >conftest.err |
2448 | rm -f conftest.er1 | |
2449 | cat conftest.err >&5 | |
ba479fd2 NN |
2450 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2451 | (exit $ac_status); } && | |
d7974fe6 KC |
2452 | { ac_try='test -z "$ac_c_werror_flag" |
2453 | || test ! -s conftest.err' | |
86da66b5 HPN |
2454 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2455 | (eval $ac_try) 2>&5 | |
2456 | ac_status=$? | |
2457 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2458 | (exit $ac_status); }; } && | |
2459 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2460 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2461 | (eval $ac_try) 2>&5 | |
2462 | ac_status=$? | |
2463 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2464 | (exit $ac_status); }; }; then | |
6e3f3080 NN |
2465 | ac_cv_prog_cc_g=yes |
2466 | else | |
ba479fd2 NN |
2467 | echo "$as_me: failed program was:" >&5 |
2468 | sed 's/^/| /' conftest.$ac_ext >&5 | |
63cf211a | 2469 | |
ba479fd2 | 2470 | ac_cv_prog_cc_g=no |
6e3f3080 | 2471 | fi |
86da66b5 | 2472 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2473 | fi |
2474 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 | |
2475 | echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 | |
cd9e5e7c | 2476 | if test "$ac_test_CFLAGS" = set; then |
ba479fd2 | 2477 | CFLAGS=$ac_save_CFLAGS |
cd9e5e7c MK |
2478 | elif test $ac_cv_prog_cc_g = yes; then |
2479 | if test "$GCC" = yes; then | |
e9a25f70 JL |
2480 | CFLAGS="-g -O2" |
2481 | else | |
cd9e5e7c | 2482 | CFLAGS="-g" |
81814e35 | 2483 | fi |
3723cad9 | 2484 | else |
cd9e5e7c MK |
2485 | if test "$GCC" = yes; then |
2486 | CFLAGS="-O2" | |
2487 | else | |
2488 | CFLAGS= | |
2489 | fi | |
e9a25f70 | 2490 | fi |
ba479fd2 NN |
2491 | echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 |
2492 | echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 | |
2493 | if test "${ac_cv_prog_cc_stdc+set}" = set; then | |
2494 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2495 | else | |
2496 | ac_cv_prog_cc_stdc=no | |
2497 | ac_save_CC=$CC | |
2498 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2499 | /* confdefs.h. */ |
2500 | _ACEOF | |
2501 | cat confdefs.h >>conftest.$ac_ext | |
2502 | cat >>conftest.$ac_ext <<_ACEOF | |
2503 | /* end confdefs.h. */ | |
2504 | #include <stdarg.h> | |
2505 | #include <stdio.h> | |
2506 | #include <sys/types.h> | |
2507 | #include <sys/stat.h> | |
2508 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
2509 | struct buf { int x; }; | |
2510 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
2511 | static char *e (p, i) | |
2512 | char **p; | |
2513 | int i; | |
2514 | { | |
2515 | return p[i]; | |
2516 | } | |
2517 | static char *f (char * (*g) (char **, int), char **p, ...) | |
2518 | { | |
2519 | char *s; | |
2520 | va_list v; | |
2521 | va_start (v,p); | |
2522 | s = g (p, va_arg (v,int)); | |
2523 | va_end (v); | |
2524 | return s; | |
2525 | } | |
86da66b5 HPN |
2526 | |
2527 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
2528 | function prototypes and stuff, but not '\xHH' hex character constants. | |
2529 | These don't provoke an error unfortunately, instead are silently treated | |
2530 | as 'x'. The following induces an error, until -std1 is added to get | |
2531 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
2532 | array size at least. It's necessary to write '\x00'==0 to get something | |
2533 | that's true only with -std1. */ | |
2534 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
2535 | ||
ba479fd2 NN |
2536 | int test (int i, double x); |
2537 | struct s1 {int (*f) (int a);}; | |
2538 | struct s2 {int (*f) (double a);}; | |
2539 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
2540 | int argc; | |
2541 | char **argv; | |
2542 | int | |
2543 | main () | |
2544 | { | |
2545 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
2546 | ; | |
2547 | return 0; | |
2548 | } | |
2549 | _ACEOF | |
2550 | # Don't try gcc -ansi; that turns off useful extensions and | |
2551 | # breaks some systems' header files. | |
2552 | # AIX -qlanglvl=ansi | |
2553 | # Ultrix and OSF/1 -std1 | |
2554 | # HP-UX 10.20 and later -Ae | |
2555 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
2556 | # SVR4 -Xc -D__EXTENSIONS__ | |
2557 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
2558 | do | |
2559 | CC="$ac_save_CC $ac_arg" | |
2560 | rm -f conftest.$ac_objext | |
2561 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2562 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2563 | ac_status=$? |
86da66b5 HPN |
2564 | grep -v '^ *+' conftest.er1 >conftest.err |
2565 | rm -f conftest.er1 | |
2566 | cat conftest.err >&5 | |
ba479fd2 NN |
2567 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2568 | (exit $ac_status); } && | |
d7974fe6 KC |
2569 | { ac_try='test -z "$ac_c_werror_flag" |
2570 | || test ! -s conftest.err' | |
86da66b5 HPN |
2571 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2572 | (eval $ac_try) 2>&5 | |
2573 | ac_status=$? | |
2574 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2575 | (exit $ac_status); }; } && | |
2576 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2577 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2578 | (eval $ac_try) 2>&5 | |
2579 | ac_status=$? | |
2580 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2581 | (exit $ac_status); }; }; then | |
2582 | ac_cv_prog_cc_stdc=$ac_arg | |
2583 | break | |
2584 | else | |
2585 | echo "$as_me: failed program was:" >&5 | |
2586 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 2587 | |
ba479fd2 | 2588 | fi |
86da66b5 | 2589 | rm -f conftest.err conftest.$ac_objext |
ba479fd2 NN |
2590 | done |
2591 | rm -f conftest.$ac_ext conftest.$ac_objext | |
2592 | CC=$ac_save_CC | |
2593 | ||
2594 | fi | |
2595 | ||
2596 | case "x$ac_cv_prog_cc_stdc" in | |
2597 | x|xno) | |
2598 | echo "$as_me:$LINENO: result: none needed" >&5 | |
2599 | echo "${ECHO_T}none needed" >&6 ;; | |
2600 | *) | |
2601 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 | |
2602 | echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 | |
2603 | CC="$CC $ac_cv_prog_cc_stdc" ;; | |
2604 | esac | |
2605 | ||
2606 | # Some people use a C++ compiler to compile C. Since we use `exit', | |
2607 | # in C++ we need to declare it. In case someone uses the same compiler | |
2608 | # for both compiling C and C++ we need to have the C++ compiler decide | |
2609 | # the declaration of exit, since it's the most demanding environment. | |
2610 | cat >conftest.$ac_ext <<_ACEOF | |
2611 | #ifndef __cplusplus | |
2612 | choke me | |
2613 | #endif | |
2614 | _ACEOF | |
2615 | rm -f conftest.$ac_objext | |
2616 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2617 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2618 | ac_status=$? |
86da66b5 HPN |
2619 | grep -v '^ *+' conftest.er1 >conftest.err |
2620 | rm -f conftest.er1 | |
2621 | cat conftest.err >&5 | |
ba479fd2 NN |
2622 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2623 | (exit $ac_status); } && | |
d7974fe6 KC |
2624 | { ac_try='test -z "$ac_c_werror_flag" |
2625 | || test ! -s conftest.err' | |
86da66b5 HPN |
2626 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2627 | (eval $ac_try) 2>&5 | |
2628 | ac_status=$? | |
2629 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2630 | (exit $ac_status); }; } && | |
2631 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2632 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2633 | (eval $ac_try) 2>&5 | |
2634 | ac_status=$? | |
2635 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2636 | (exit $ac_status); }; }; then | |
2637 | for ac_declaration in \ | |
86da66b5 | 2638 | '' \ |
ba479fd2 NN |
2639 | 'extern "C" void std::exit (int) throw (); using std::exit;' \ |
2640 | 'extern "C" void std::exit (int); using std::exit;' \ | |
2641 | 'extern "C" void exit (int) throw ();' \ | |
2642 | 'extern "C" void exit (int);' \ | |
2643 | 'void exit (int);' | |
2644 | do | |
2645 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2646 | /* confdefs.h. */ |
2647 | _ACEOF | |
2648 | cat confdefs.h >>conftest.$ac_ext | |
2649 | cat >>conftest.$ac_ext <<_ACEOF | |
2650 | /* end confdefs.h. */ | |
33e70558 | 2651 | $ac_declaration |
86da66b5 | 2652 | #include <stdlib.h> |
ba479fd2 NN |
2653 | int |
2654 | main () | |
2655 | { | |
2656 | exit (42); | |
2657 | ; | |
2658 | return 0; | |
2659 | } | |
2660 | _ACEOF | |
2661 | rm -f conftest.$ac_objext | |
2662 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2663 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2664 | ac_status=$? |
86da66b5 HPN |
2665 | grep -v '^ *+' conftest.er1 >conftest.err |
2666 | rm -f conftest.er1 | |
2667 | cat conftest.err >&5 | |
ba479fd2 NN |
2668 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2669 | (exit $ac_status); } && | |
d7974fe6 KC |
2670 | { ac_try='test -z "$ac_c_werror_flag" |
2671 | || 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); } && | |
d7974fe6 KC |
2715 | { ac_try='test -z "$ac_c_werror_flag" |
2716 | || test ! -s conftest.err' | |
86da66b5 HPN |
2717 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2718 | (eval $ac_try) 2>&5 | |
2719 | ac_status=$? | |
2720 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2721 | (exit $ac_status); }; } && | |
2722 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2723 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2724 | (eval $ac_try) 2>&5 | |
2725 | ac_status=$? | |
2726 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2727 | (exit $ac_status); }; }; then | |
2728 | break | |
3ec83fc2 | 2729 | else |
ba479fd2 NN |
2730 | echo "$as_me: failed program was:" >&5 |
2731 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2732 | ||
6e3f3080 | 2733 | fi |
86da66b5 | 2734 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2735 | done |
2736 | rm -f conftest* | |
2737 | if test -n "$ac_declaration"; then | |
2738 | echo '#ifdef __cplusplus' >>confdefs.h | |
2739 | echo $ac_declaration >>confdefs.h | |
2740 | echo '#endif' >>confdefs.h | |
2741 | fi | |
2742 | ||
3ec83fc2 | 2743 | else |
ba479fd2 NN |
2744 | echo "$as_me: failed program was:" >&5 |
2745 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2746 | ||
2747 | fi | |
86da66b5 | 2748 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2749 | ac_ext=c |
2750 | ac_cpp='$CPP $CPPFLAGS' | |
2751 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2752 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2753 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2754 | ||
2755 | if test "x$CC" != xcc; then | |
2756 | echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 | |
2757 | echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 | |
2758 | else | |
2759 | echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 | |
2760 | echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 | |
2761 | fi | |
2762 | set dummy $CC; ac_cc=`echo $2 | | |
2763 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2764 | if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then | |
2765 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2766 | else | |
2767 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2768 | /* confdefs.h. */ |
2769 | _ACEOF | |
2770 | cat confdefs.h >>conftest.$ac_ext | |
2771 | cat >>conftest.$ac_ext <<_ACEOF | |
2772 | /* end confdefs.h. */ | |
2773 | ||
2774 | int | |
2775 | main () | |
2776 | { | |
2777 | ||
2778 | ; | |
2779 | return 0; | |
2780 | } | |
2781 | _ACEOF | |
3ec83fc2 RH |
2782 | # Make sure it works both with $CC and with simple cc. |
2783 | # We do the test twice because some compilers refuse to overwrite an | |
2784 | # existing .o file with -o, though they will create one. | |
ba479fd2 NN |
2785 | ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' |
2786 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2787 | (eval $ac_try) 2>&5 | |
2788 | ac_status=$? | |
2789 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2790 | (exit $ac_status); } && | |
2791 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2792 | (eval $ac_try) 2>&5 | |
2793 | ac_status=$? | |
2794 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2795 | (exit $ac_status); }; | |
3ec83fc2 RH |
2796 | then |
2797 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
2798 | if test "x$CC" != xcc; then | |
2799 | # Test first that cc exists at all. | |
ba479fd2 NN |
2800 | if { ac_try='cc -c conftest.$ac_ext >&5' |
2801 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2802 | (eval $ac_try) 2>&5 | |
2803 | ac_status=$? | |
2804 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2805 | (exit $ac_status); }; }; then | |
2806 | ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' | |
2807 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2808 | (eval $ac_try) 2>&5 | |
2809 | ac_status=$? | |
2810 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2811 | (exit $ac_status); } && | |
2812 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2813 | (eval $ac_try) 2>&5 | |
2814 | ac_status=$? | |
2815 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2816 | (exit $ac_status); }; | |
3ec83fc2 | 2817 | then |
86da66b5 HPN |
2818 | # cc works too. |
2819 | : | |
3ec83fc2 | 2820 | else |
86da66b5 HPN |
2821 | # cc exists but doesn't like -o. |
2822 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3ec83fc2 RH |
2823 | fi |
2824 | fi | |
2825 | fi | |
2826 | else | |
2827 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
2828 | fi | |
2829 | rm -f conftest* | |
2830 | ||
2831 | fi | |
2832 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
ba479fd2 NN |
2833 | echo "$as_me:$LINENO: result: yes" >&5 |
2834 | echo "${ECHO_T}yes" >&6 | |
3ec83fc2 | 2835 | else |
ba479fd2 NN |
2836 | echo "$as_me:$LINENO: result: no" >&5 |
2837 | echo "${ECHO_T}no" >&6 | |
2838 | ||
2839 | cat >>confdefs.h <<\_ACEOF | |
3ec83fc2 | 2840 | #define NO_MINUS_C_MINUS_O 1 |
ba479fd2 | 2841 | _ACEOF |
3ec83fc2 RH |
2842 | |
2843 | fi | |
2844 | ||
3b620440 KC |
2845 | # expand $ac_aux_dir to an absolute path |
2846 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
2847 | ||
2848 | # FIXME: we rely on the cache variable name because | |
2849 | # there is no other way. | |
2850 | set dummy $CC | |
2851 | ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2852 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then | |
2853 | # Losing compiler, so override with the script. | |
2854 | # FIXME: It is wrong to rewrite CC. | |
2855 | # But if we don't then we get into trouble of one sort or another. | |
2856 | # A longer-term fix would be to have automake use am__CC in this case, | |
2857 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
2858 | CC="$am_aux_dir/compile $CC" | |
2859 | fi | |
2860 | ||
414d23ae HPN |
2861 | # autoconf is lame and doesn't give us any substitution variable for this. |
2862 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
2863 | NO_MINUS_C_MINUS_O=yes | |
2864 | else | |
2865 | OUTPUT_OPTION='-o $@' | |
2866 | fi | |
2867 | ||
2868 | ||
2869 | ||
73458fb7 NN |
2870 | # ------------------------- |
2871 | # Check C compiler features | |
2872 | # ------------------------- | |
2873 | ||
ba479fd2 NN |
2874 | ac_ext=c |
2875 | ac_cpp='$CPP $CPPFLAGS' | |
2876 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2877 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2878 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2879 | echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 | |
2880 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 | |
84c041a1 ZW |
2881 | # On Suns, sometimes $CPP names a directory. |
2882 | if test -n "$CPP" && test -d "$CPP"; then | |
2883 | CPP= | |
2884 | fi | |
2885 | if test -z "$CPP"; then | |
ba479fd2 NN |
2886 | if test "${ac_cv_prog_CPP+set}" = set; then |
2887 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2888 | else | |
2889 | # Double quotes because CPP needs to be expanded | |
2890 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
2891 | do | |
2892 | ac_preproc_ok=false | |
2893 | for ac_c_preproc_warn_flag in '' yes | |
2894 | do | |
2895 | # Use a header file that comes with gcc, so configuring glibc | |
2896 | # with a fresh cross-compiler works. | |
2897 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2898 | # <limits.h> exists even on freestanding compilers. | |
84c041a1 | 2899 | # On the NeXT, cc -E runs the code through the compiler's parser, |
ba479fd2 NN |
2900 | # not just through cpp. "Syntax error" is here to catch this case. |
2901 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2902 | /* confdefs.h. */ |
2903 | _ACEOF | |
2904 | cat confdefs.h >>conftest.$ac_ext | |
2905 | cat >>conftest.$ac_ext <<_ACEOF | |
2906 | /* end confdefs.h. */ | |
2907 | #ifdef __STDC__ | |
2908 | # include <limits.h> | |
2909 | #else | |
2910 | # include <assert.h> | |
2911 | #endif | |
86da66b5 | 2912 | Syntax error |
ba479fd2 NN |
2913 | _ACEOF |
2914 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2915 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2916 | ac_status=$? | |
2917 | grep -v '^ *+' conftest.er1 >conftest.err | |
2918 | rm -f conftest.er1 | |
2919 | cat conftest.err >&5 | |
2920 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2921 | (exit $ac_status); } >/dev/null; then | |
2922 | if test -s conftest.err; then | |
2923 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2924 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2925 | else |
2926 | ac_cpp_err= | |
2927 | fi | |
2928 | else | |
2929 | ac_cpp_err=yes | |
2930 | fi | |
2931 | if test -z "$ac_cpp_err"; then | |
093e61a6 | 2932 | : |
cafe096b | 2933 | else |
ba479fd2 NN |
2934 | echo "$as_me: failed program was:" >&5 |
2935 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2936 | ||
2937 | # Broken: fails on valid input. | |
2938 | continue | |
2939 | fi | |
2940 | rm -f conftest.err conftest.$ac_ext | |
2941 | ||
2942 | # OK, works on sane cases. Now check whether non-existent headers | |
2943 | # can be detected and how. | |
2944 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2945 | /* confdefs.h. */ |
2946 | _ACEOF | |
2947 | cat confdefs.h >>conftest.$ac_ext | |
2948 | cat >>conftest.$ac_ext <<_ACEOF | |
2949 | /* end confdefs.h. */ | |
2950 | #include <ac_nonexistent.h> | |
2951 | _ACEOF | |
2952 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2953 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2954 | ac_status=$? | |
2955 | grep -v '^ *+' conftest.er1 >conftest.err | |
2956 | rm -f conftest.er1 | |
2957 | cat conftest.err >&5 | |
2958 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2959 | (exit $ac_status); } >/dev/null; then | |
2960 | if test -s conftest.err; then | |
2961 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2962 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2963 | else |
2964 | ac_cpp_err= | |
2965 | fi | |
2966 | else | |
2967 | ac_cpp_err=yes | |
2968 | fi | |
2969 | if test -z "$ac_cpp_err"; then | |
2970 | # Broken: success on invalid input. | |
2971 | continue | |
2972 | else | |
2973 | echo "$as_me: failed program was:" >&5 | |
2974 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2975 | ||
2976 | # Passes both tests. | |
2977 | ac_preproc_ok=: | |
2978 | break | |
2979 | fi | |
2980 | rm -f conftest.err conftest.$ac_ext | |
2981 | ||
2982 | done | |
2983 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2984 | rm -f conftest.err conftest.$ac_ext | |
2985 | if $ac_preproc_ok; then | |
2986 | break | |
2987 | fi | |
2988 | ||
2989 | done | |
2990 | ac_cv_prog_CPP=$CPP | |
2991 | ||
2992 | fi | |
2993 | CPP=$ac_cv_prog_CPP | |
2994 | else | |
2995 | ac_cv_prog_CPP=$CPP | |
2996 | fi | |
2997 | echo "$as_me:$LINENO: result: $CPP" >&5 | |
2998 | echo "${ECHO_T}$CPP" >&6 | |
2999 | ac_preproc_ok=false | |
3000 | for ac_c_preproc_warn_flag in '' yes | |
3001 | do | |
3002 | # Use a header file that comes with gcc, so configuring glibc | |
3003 | # with a fresh cross-compiler works. | |
3004 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3005 | # <limits.h> exists even on freestanding compilers. | |
3006 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3007 | # not just through cpp. "Syntax error" is here to catch this case. | |
3008 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3009 | /* confdefs.h. */ |
3010 | _ACEOF | |
3011 | cat confdefs.h >>conftest.$ac_ext | |
3012 | cat >>conftest.$ac_ext <<_ACEOF | |
3013 | /* end confdefs.h. */ | |
3014 | #ifdef __STDC__ | |
3015 | # include <limits.h> | |
3016 | #else | |
3017 | # include <assert.h> | |
3018 | #endif | |
86da66b5 | 3019 | Syntax error |
ba479fd2 NN |
3020 | _ACEOF |
3021 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3022 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3023 | ac_status=$? | |
3024 | grep -v '^ *+' conftest.er1 >conftest.err | |
3025 | rm -f conftest.er1 | |
3026 | cat conftest.err >&5 | |
3027 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3028 | (exit $ac_status); } >/dev/null; then | |
3029 | if test -s conftest.err; then | |
3030 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 3031 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
3032 | else |
3033 | ac_cpp_err= | |
3034 | fi | |
3035 | else | |
3036 | ac_cpp_err=yes | |
3037 | fi | |
3038 | if test -z "$ac_cpp_err"; then | |
6e3f3080 | 3039 | : |
414d23ae | 3040 | else |
ba479fd2 NN |
3041 | echo "$as_me: failed program was:" >&5 |
3042 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3043 | ||
3044 | # Broken: fails on valid input. | |
3045 | continue | |
3046 | fi | |
3047 | rm -f conftest.err conftest.$ac_ext | |
3048 | ||
3049 | # OK, works on sane cases. Now check whether non-existent headers | |
3050 | # can be detected and how. | |
3051 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3052 | /* confdefs.h. */ |
3053 | _ACEOF | |
3054 | cat confdefs.h >>conftest.$ac_ext | |
3055 | cat >>conftest.$ac_ext <<_ACEOF | |
3056 | /* end confdefs.h. */ | |
3057 | #include <ac_nonexistent.h> | |
3058 | _ACEOF | |
3059 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3060 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3061 | ac_status=$? | |
3062 | grep -v '^ *+' conftest.er1 >conftest.err | |
3063 | rm -f conftest.er1 | |
3064 | cat conftest.err >&5 | |
3065 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3066 | (exit $ac_status); } >/dev/null; then | |
3067 | if test -s conftest.err; then | |
3068 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 3069 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
3070 | else |
3071 | ac_cpp_err= | |
3072 | fi | |
6e3f3080 | 3073 | else |
ba479fd2 | 3074 | ac_cpp_err=yes |
63cf211a | 3075 | fi |
ba479fd2 NN |
3076 | if test -z "$ac_cpp_err"; then |
3077 | # Broken: success on invalid input. | |
3078 | continue | |
3079 | else | |
3080 | echo "$as_me: failed program was:" >&5 | |
3081 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3082 | ||
3083 | # Passes both tests. | |
3084 | ac_preproc_ok=: | |
3085 | break | |
63cf211a | 3086 | fi |
ba479fd2 NN |
3087 | rm -f conftest.err conftest.$ac_ext |
3088 | ||
3089 | done | |
3090 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3091 | rm -f conftest.err conftest.$ac_ext | |
3092 | if $ac_preproc_ok; then | |
3093 | : | |
6e3f3080 | 3094 | else |
ba479fd2 NN |
3095 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check |
3096 | See \`config.log' for more details." >&5 | |
3097 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check | |
3098 | See \`config.log' for more details." >&2;} | |
3099 | { (exit 1); exit 1; }; } | |
6e3f3080 NN |
3100 | fi |
3101 | ||
ba479fd2 NN |
3102 | ac_ext=c |
3103 | ac_cpp='$CPP $CPPFLAGS' | |
3104 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3105 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3106 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3107 | ||
b5472e1d | 3108 | |
ba479fd2 NN |
3109 | echo "$as_me:$LINENO: checking for inline" >&5 |
3110 | echo $ECHO_N "checking for inline... $ECHO_C" >&6 | |
3111 | if test "${ac_cv_c_inline+set}" = set; then | |
3112 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
3113 | else |
3114 | ac_cv_c_inline=no | |
3115 | for ac_kw in inline __inline__ __inline; do | |
ba479fd2 | 3116 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3117 | /* confdefs.h. */ |
3118 | _ACEOF | |
3119 | cat confdefs.h >>conftest.$ac_ext | |
3120 | cat >>conftest.$ac_ext <<_ACEOF | |
3121 | /* end confdefs.h. */ | |
3122 | #ifndef __cplusplus | |
3123 | typedef int foo_t; | |
3124 | static $ac_kw foo_t static_foo () {return 0; } | |
3125 | $ac_kw foo_t foo () {return 0; } | |
3126 | #endif | |
414d23ae | 3127 | |
ba479fd2 NN |
3128 | _ACEOF |
3129 | rm -f conftest.$ac_objext | |
3130 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3131 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3132 | ac_status=$? |
86da66b5 HPN |
3133 | grep -v '^ *+' conftest.er1 >conftest.err |
3134 | rm -f conftest.er1 | |
3135 | cat conftest.err >&5 | |
ba479fd2 NN |
3136 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3137 | (exit $ac_status); } && | |
d7974fe6 KC |
3138 | { ac_try='test -z "$ac_c_werror_flag" |
3139 | || test ! -s conftest.err' | |
86da66b5 HPN |
3140 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3141 | (eval $ac_try) 2>&5 | |
3142 | ac_status=$? | |
3143 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3144 | (exit $ac_status); }; } && | |
3145 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3146 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3147 | (eval $ac_try) 2>&5 | |
3148 | ac_status=$? | |
3149 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3150 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3151 | ac_cv_c_inline=$ac_kw; break |
3152 | else | |
ba479fd2 NN |
3153 | echo "$as_me: failed program was:" >&5 |
3154 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3155 | ||
414d23ae | 3156 | fi |
86da66b5 | 3157 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3158 | done |
3159 | ||
3160 | fi | |
ba479fd2 NN |
3161 | echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 |
3162 | echo "${ECHO_T}$ac_cv_c_inline" >&6 | |
86da66b5 HPN |
3163 | |
3164 | ||
ba479fd2 | 3165 | case $ac_cv_c_inline in |
414d23ae | 3166 | inline | yes) ;; |
86da66b5 HPN |
3167 | *) |
3168 | case $ac_cv_c_inline in | |
3169 | no) ac_val=;; | |
3170 | *) ac_val=$ac_cv_c_inline;; | |
3171 | esac | |
3172 | cat >>confdefs.h <<_ACEOF | |
3173 | #ifndef __cplusplus | |
3174 | #define inline $ac_val | |
3175 | #endif | |
ba479fd2 | 3176 | _ACEOF |
86da66b5 | 3177 | ;; |
414d23ae HPN |
3178 | esac |
3179 | ||
414d23ae | 3180 | |
414d23ae | 3181 | # sizeof(char) is 1 by definition. |
bf3b7cd3 JD |
3182 | |
3183 | echo "$as_me:$LINENO: checking for egrep" >&5 | |
3184 | echo $ECHO_N "checking for egrep... $ECHO_C" >&6 | |
3185 | if test "${ac_cv_prog_egrep+set}" = set; then | |
3186 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3187 | else | |
3188 | if echo a | (grep -E '(a|b)') >/dev/null 2>&1 | |
3189 | then ac_cv_prog_egrep='grep -E' | |
3190 | else ac_cv_prog_egrep='egrep' | |
3191 | fi | |
3192 | fi | |
3193 | echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 | |
3194 | echo "${ECHO_T}$ac_cv_prog_egrep" >&6 | |
3195 | EGREP=$ac_cv_prog_egrep | |
3196 | ||
3197 | ||
3198 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 | |
3199 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
3200 | if test "${ac_cv_header_stdc+set}" = set; then | |
3201 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3202 | else | |
3203 | cat >conftest.$ac_ext <<_ACEOF | |
3204 | /* confdefs.h. */ | |
3205 | _ACEOF | |
3206 | cat confdefs.h >>conftest.$ac_ext | |
3207 | cat >>conftest.$ac_ext <<_ACEOF | |
3208 | /* end confdefs.h. */ | |
3209 | #include <stdlib.h> | |
3210 | #include <stdarg.h> | |
3211 | #include <string.h> | |
3212 | #include <float.h> | |
3213 | ||
3214 | int | |
3215 | main () | |
3216 | { | |
3217 | ||
3218 | ; | |
3219 | return 0; | |
3220 | } | |
3221 | _ACEOF | |
3222 | rm -f conftest.$ac_objext | |
3223 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3224 | (eval $ac_compile) 2>conftest.er1 | |
3225 | ac_status=$? | |
3226 | grep -v '^ *+' conftest.er1 >conftest.err | |
3227 | rm -f conftest.er1 | |
3228 | cat conftest.err >&5 | |
3229 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3230 | (exit $ac_status); } && | |
d7974fe6 KC |
3231 | { ac_try='test -z "$ac_c_werror_flag" |
3232 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3233 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3234 | (eval $ac_try) 2>&5 | |
3235 | ac_status=$? | |
3236 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3237 | (exit $ac_status); }; } && | |
3238 | { ac_try='test -s conftest.$ac_objext' | |
3239 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3240 | (eval $ac_try) 2>&5 | |
3241 | ac_status=$? | |
3242 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3243 | (exit $ac_status); }; }; then | |
3244 | ac_cv_header_stdc=yes | |
3245 | else | |
3246 | echo "$as_me: failed program was:" >&5 | |
3247 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3248 | ||
3249 | ac_cv_header_stdc=no | |
3250 | fi | |
3251 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3252 | ||
3253 | if test $ac_cv_header_stdc = yes; then | |
3254 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3255 | cat >conftest.$ac_ext <<_ACEOF | |
3256 | /* confdefs.h. */ | |
3257 | _ACEOF | |
3258 | cat confdefs.h >>conftest.$ac_ext | |
3259 | cat >>conftest.$ac_ext <<_ACEOF | |
3260 | /* end confdefs.h. */ | |
3261 | #include <string.h> | |
3262 | ||
3263 | _ACEOF | |
3264 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3265 | $EGREP "memchr" >/dev/null 2>&1; then | |
3266 | : | |
3267 | else | |
3268 | ac_cv_header_stdc=no | |
3269 | fi | |
3270 | rm -f conftest* | |
3271 | ||
3272 | fi | |
3273 | ||
3274 | if test $ac_cv_header_stdc = yes; then | |
3275 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3276 | cat >conftest.$ac_ext <<_ACEOF | |
3277 | /* confdefs.h. */ | |
3278 | _ACEOF | |
3279 | cat confdefs.h >>conftest.$ac_ext | |
3280 | cat >>conftest.$ac_ext <<_ACEOF | |
3281 | /* end confdefs.h. */ | |
3282 | #include <stdlib.h> | |
3283 | ||
3284 | _ACEOF | |
3285 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3286 | $EGREP "free" >/dev/null 2>&1; then | |
3287 | : | |
3288 | else | |
3289 | ac_cv_header_stdc=no | |
3290 | fi | |
3291 | rm -f conftest* | |
3292 | ||
3293 | fi | |
3294 | ||
3295 | if test $ac_cv_header_stdc = yes; then | |
3296 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3297 | if test "$cross_compiling" = yes; then | |
3298 | : | |
3299 | else | |
3300 | cat >conftest.$ac_ext <<_ACEOF | |
3301 | /* confdefs.h. */ | |
3302 | _ACEOF | |
3303 | cat confdefs.h >>conftest.$ac_ext | |
3304 | cat >>conftest.$ac_ext <<_ACEOF | |
3305 | /* end confdefs.h. */ | |
3306 | #include <ctype.h> | |
3307 | #if ((' ' & 0x0FF) == 0x020) | |
3308 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3309 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3310 | #else | |
3311 | # define ISLOWER(c) \ | |
3312 | (('a' <= (c) && (c) <= 'i') \ | |
3313 | || ('j' <= (c) && (c) <= 'r') \ | |
3314 | || ('s' <= (c) && (c) <= 'z')) | |
3315 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
3316 | #endif | |
3317 | ||
3318 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3319 | int | |
3320 | main () | |
3321 | { | |
3322 | int i; | |
3323 | for (i = 0; i < 256; i++) | |
3324 | if (XOR (islower (i), ISLOWER (i)) | |
3325 | || toupper (i) != TOUPPER (i)) | |
3326 | exit(2); | |
3327 | exit (0); | |
3328 | } | |
3329 | _ACEOF | |
3330 | rm -f conftest$ac_exeext | |
3331 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3332 | (eval $ac_link) 2>&5 | |
3333 | ac_status=$? | |
3334 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3335 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
3336 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3337 | (eval $ac_try) 2>&5 | |
3338 | ac_status=$? | |
3339 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3340 | (exit $ac_status); }; }; then | |
3341 | : | |
3342 | else | |
3343 | echo "$as_me: program exited with status $ac_status" >&5 | |
3344 | echo "$as_me: failed program was:" >&5 | |
3345 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3346 | ||
3347 | ( exit $ac_status ) | |
3348 | ac_cv_header_stdc=no | |
3349 | fi | |
3350 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
3351 | fi | |
3352 | fi | |
3353 | fi | |
3354 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 | |
3355 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
3356 | if test $ac_cv_header_stdc = yes; then | |
3357 | ||
3358 | cat >>confdefs.h <<\_ACEOF | |
3359 | #define STDC_HEADERS 1 | |
3360 | _ACEOF | |
3361 | ||
3362 | fi | |
3363 | ||
3364 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
3365 | ||
3366 | ||
3367 | ||
3368 | ||
3369 | ||
3370 | ||
3371 | ||
3372 | ||
3373 | ||
3374 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
3375 | inttypes.h stdint.h unistd.h | |
3376 | do | |
3377 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
3378 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
3379 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
3380 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
3381 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3382 | else | |
3383 | cat >conftest.$ac_ext <<_ACEOF | |
3384 | /* confdefs.h. */ | |
3385 | _ACEOF | |
3386 | cat confdefs.h >>conftest.$ac_ext | |
3387 | cat >>conftest.$ac_ext <<_ACEOF | |
3388 | /* end confdefs.h. */ | |
3389 | $ac_includes_default | |
3390 | ||
3391 | #include <$ac_header> | |
3392 | _ACEOF | |
3393 | rm -f conftest.$ac_objext | |
3394 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3395 | (eval $ac_compile) 2>conftest.er1 | |
3396 | ac_status=$? | |
3397 | grep -v '^ *+' conftest.er1 >conftest.err | |
3398 | rm -f conftest.er1 | |
3399 | cat conftest.err >&5 | |
3400 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3401 | (exit $ac_status); } && | |
d7974fe6 KC |
3402 | { ac_try='test -z "$ac_c_werror_flag" |
3403 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3404 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3405 | (eval $ac_try) 2>&5 | |
3406 | ac_status=$? | |
3407 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3408 | (exit $ac_status); }; } && | |
3409 | { ac_try='test -s conftest.$ac_objext' | |
3410 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3411 | (eval $ac_try) 2>&5 | |
3412 | ac_status=$? | |
3413 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3414 | (exit $ac_status); }; }; then | |
3415 | eval "$as_ac_Header=yes" | |
3416 | else | |
3417 | echo "$as_me: failed program was:" >&5 | |
3418 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3419 | ||
3420 | eval "$as_ac_Header=no" | |
3421 | fi | |
3422 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3423 | fi | |
3424 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
3425 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
3426 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
3427 | cat >>confdefs.h <<_ACEOF | |
3428 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
3429 | _ACEOF | |
3430 | ||
3431 | fi | |
3432 | ||
3433 | done | |
3434 | ||
3435 | ||
3436 | echo "$as_me:$LINENO: checking for void *" >&5 | |
3437 | echo $ECHO_N "checking for void *... $ECHO_C" >&6 | |
3438 | if test "${ac_cv_type_void_p+set}" = set; then | |
3439 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3440 | else | |
3441 | cat >conftest.$ac_ext <<_ACEOF | |
3442 | /* confdefs.h. */ | |
3443 | _ACEOF | |
3444 | cat confdefs.h >>conftest.$ac_ext | |
3445 | cat >>conftest.$ac_ext <<_ACEOF | |
3446 | /* end confdefs.h. */ | |
3447 | $ac_includes_default | |
3448 | int | |
3449 | main () | |
3450 | { | |
3451 | if ((void * *) 0) | |
3452 | return 0; | |
3453 | if (sizeof (void *)) | |
3454 | return 0; | |
3455 | ; | |
3456 | return 0; | |
3457 | } | |
3458 | _ACEOF | |
3459 | rm -f conftest.$ac_objext | |
3460 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3461 | (eval $ac_compile) 2>conftest.er1 | |
3462 | ac_status=$? | |
3463 | grep -v '^ *+' conftest.er1 >conftest.err | |
3464 | rm -f conftest.er1 | |
3465 | cat conftest.err >&5 | |
3466 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3467 | (exit $ac_status); } && | |
d7974fe6 KC |
3468 | { ac_try='test -z "$ac_c_werror_flag" |
3469 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3470 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3471 | (eval $ac_try) 2>&5 | |
3472 | ac_status=$? | |
3473 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3474 | (exit $ac_status); }; } && | |
3475 | { ac_try='test -s conftest.$ac_objext' | |
3476 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3477 | (eval $ac_try) 2>&5 | |
3478 | ac_status=$? | |
3479 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3480 | (exit $ac_status); }; }; then | |
3481 | ac_cv_type_void_p=yes | |
3482 | else | |
3483 | echo "$as_me: failed program was:" >&5 | |
3484 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3485 | ||
3486 | ac_cv_type_void_p=no | |
3487 | fi | |
3488 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3489 | fi | |
3490 | echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 | |
3491 | echo "${ECHO_T}$ac_cv_type_void_p" >&6 | |
3492 | ||
ba479fd2 NN |
3493 | echo "$as_me:$LINENO: checking size of void *" >&5 |
3494 | echo $ECHO_N "checking size of void *... $ECHO_C" >&6 | |
3495 | if test "${ac_cv_sizeof_void_p+set}" = set; then | |
3496 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75b6f3fd | 3497 | else |
bf3b7cd3 JD |
3498 | if test "$ac_cv_type_void_p" = yes; then |
3499 | # The cast to unsigned long works around a bug in the HP C Compiler | |
3500 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
3501 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
3502 | # This bug is HP SR number 8606223364. | |
3503 | if test "$cross_compiling" = yes; then | |
3504 | # Depending upon the size, compute the lo and hi bounds. | |
3505 | cat >conftest.$ac_ext <<_ACEOF | |
3506 | /* confdefs.h. */ | |
3507 | _ACEOF | |
3508 | cat confdefs.h >>conftest.$ac_ext | |
3509 | cat >>conftest.$ac_ext <<_ACEOF | |
3510 | /* end confdefs.h. */ | |
3511 | $ac_includes_default | |
3512 | int | |
3513 | main () | |
3514 | { | |
3515 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)]; | |
3516 | test_array [0] = 0 | |
3517 | ||
3518 | ; | |
3519 | return 0; | |
3520 | } | |
3521 | _ACEOF | |
3522 | rm -f conftest.$ac_objext | |
3523 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3524 | (eval $ac_compile) 2>conftest.er1 | |
3525 | ac_status=$? | |
3526 | grep -v '^ *+' conftest.er1 >conftest.err | |
3527 | rm -f conftest.er1 | |
3528 | cat conftest.err >&5 | |
3529 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3530 | (exit $ac_status); } && | |
d7974fe6 KC |
3531 | { ac_try='test -z "$ac_c_werror_flag" |
3532 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
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); }; } && | |
3538 | { ac_try='test -s conftest.$ac_objext' | |
3539 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3540 | (eval $ac_try) 2>&5 | |
3541 | ac_status=$? | |
3542 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3543 | (exit $ac_status); }; }; then | |
3544 | ac_lo=0 ac_mid=0 | |
3545 | while :; do | |
3546 | cat >conftest.$ac_ext <<_ACEOF | |
3547 | /* confdefs.h. */ | |
3548 | _ACEOF | |
3549 | cat confdefs.h >>conftest.$ac_ext | |
3550 | cat >>conftest.$ac_ext <<_ACEOF | |
3551 | /* end confdefs.h. */ | |
3552 | $ac_includes_default | |
3553 | int | |
3554 | main () | |
3555 | { | |
3556 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; | |
3557 | test_array [0] = 0 | |
3558 | ||
3559 | ; | |
3560 | return 0; | |
3561 | } | |
3562 | _ACEOF | |
3563 | rm -f conftest.$ac_objext | |
3564 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3565 | (eval $ac_compile) 2>conftest.er1 | |
3566 | ac_status=$? | |
3567 | grep -v '^ *+' conftest.er1 >conftest.err | |
3568 | rm -f conftest.er1 | |
3569 | cat conftest.err >&5 | |
3570 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3571 | (exit $ac_status); } && | |
d7974fe6 KC |
3572 | { ac_try='test -z "$ac_c_werror_flag" |
3573 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3574 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3575 | (eval $ac_try) 2>&5 | |
3576 | ac_status=$? | |
3577 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3578 | (exit $ac_status); }; } && | |
3579 | { ac_try='test -s conftest.$ac_objext' | |
3580 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3581 | (eval $ac_try) 2>&5 | |
3582 | ac_status=$? | |
3583 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3584 | (exit $ac_status); }; }; then | |
3585 | ac_hi=$ac_mid; break | |
3586 | else | |
3587 | echo "$as_me: failed program was:" >&5 | |
3588 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3589 | ||
3590 | ac_lo=`expr $ac_mid + 1` | |
3591 | if test $ac_lo -le $ac_mid; then | |
3592 | ac_lo= ac_hi= | |
3593 | break | |
3594 | fi | |
3595 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
3596 | fi | |
3597 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3598 | done | |
3599 | else | |
3600 | echo "$as_me: failed program was:" >&5 | |
3601 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3602 | ||
3603 | cat >conftest.$ac_ext <<_ACEOF | |
3604 | /* confdefs.h. */ | |
3605 | _ACEOF | |
3606 | cat confdefs.h >>conftest.$ac_ext | |
3607 | cat >>conftest.$ac_ext <<_ACEOF | |
3608 | /* end confdefs.h. */ | |
3609 | $ac_includes_default | |
3610 | int | |
3611 | main () | |
3612 | { | |
3613 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)]; | |
3614 | test_array [0] = 0 | |
3615 | ||
3616 | ; | |
3617 | return 0; | |
3618 | } | |
3619 | _ACEOF | |
3620 | rm -f conftest.$ac_objext | |
3621 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3622 | (eval $ac_compile) 2>conftest.er1 | |
3623 | ac_status=$? | |
3624 | grep -v '^ *+' conftest.er1 >conftest.err | |
3625 | rm -f conftest.er1 | |
3626 | cat conftest.err >&5 | |
3627 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3628 | (exit $ac_status); } && | |
d7974fe6 KC |
3629 | { ac_try='test -z "$ac_c_werror_flag" |
3630 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3631 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3632 | (eval $ac_try) 2>&5 | |
3633 | ac_status=$? | |
3634 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3635 | (exit $ac_status); }; } && | |
3636 | { ac_try='test -s conftest.$ac_objext' | |
3637 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3638 | (eval $ac_try) 2>&5 | |
3639 | ac_status=$? | |
3640 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3641 | (exit $ac_status); }; }; then | |
3642 | ac_hi=-1 ac_mid=-1 | |
3643 | while :; do | |
3644 | cat >conftest.$ac_ext <<_ACEOF | |
3645 | /* confdefs.h. */ | |
3646 | _ACEOF | |
3647 | cat confdefs.h >>conftest.$ac_ext | |
3648 | cat >>conftest.$ac_ext <<_ACEOF | |
3649 | /* end confdefs.h. */ | |
3650 | $ac_includes_default | |
3651 | int | |
3652 | main () | |
3653 | { | |
3654 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)]; | |
3655 | test_array [0] = 0 | |
3656 | ||
3657 | ; | |
3658 | return 0; | |
3659 | } | |
3660 | _ACEOF | |
3661 | rm -f conftest.$ac_objext | |
3662 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3663 | (eval $ac_compile) 2>conftest.er1 | |
3664 | ac_status=$? | |
3665 | grep -v '^ *+' conftest.er1 >conftest.err | |
3666 | rm -f conftest.er1 | |
3667 | cat conftest.err >&5 | |
3668 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3669 | (exit $ac_status); } && | |
d7974fe6 KC |
3670 | { ac_try='test -z "$ac_c_werror_flag" |
3671 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3672 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3673 | (eval $ac_try) 2>&5 | |
3674 | ac_status=$? | |
3675 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3676 | (exit $ac_status); }; } && | |
3677 | { ac_try='test -s conftest.$ac_objext' | |
3678 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3679 | (eval $ac_try) 2>&5 | |
3680 | ac_status=$? | |
3681 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3682 | (exit $ac_status); }; }; then | |
3683 | ac_lo=$ac_mid; break | |
3684 | else | |
3685 | echo "$as_me: failed program was:" >&5 | |
3686 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3687 | ||
3688 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
3689 | if test $ac_mid -le $ac_hi; then | |
3690 | ac_lo= ac_hi= | |
3691 | break | |
3692 | fi | |
3693 | ac_mid=`expr 2 '*' $ac_mid` | |
3694 | fi | |
3695 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3696 | done | |
3697 | else | |
3698 | echo "$as_me: failed program was:" >&5 | |
3699 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3700 | ||
3701 | ac_lo= ac_hi= | |
3702 | fi | |
3703 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3704 | fi | |
3705 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3706 | # Binary search between lo and hi bounds. | |
3707 | while test "x$ac_lo" != "x$ac_hi"; do | |
3708 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
3709 | cat >conftest.$ac_ext <<_ACEOF | |
3710 | /* confdefs.h. */ | |
3711 | _ACEOF | |
3712 | cat confdefs.h >>conftest.$ac_ext | |
3713 | cat >>conftest.$ac_ext <<_ACEOF | |
3714 | /* end confdefs.h. */ | |
3715 | $ac_includes_default | |
3716 | int | |
3717 | main () | |
3718 | { | |
3719 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; | |
3720 | test_array [0] = 0 | |
3721 | ||
3722 | ; | |
3723 | return 0; | |
3724 | } | |
3725 | _ACEOF | |
3726 | rm -f conftest.$ac_objext | |
3727 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3728 | (eval $ac_compile) 2>conftest.er1 | |
3729 | ac_status=$? | |
3730 | grep -v '^ *+' conftest.er1 >conftest.err | |
3731 | rm -f conftest.er1 | |
3732 | cat conftest.err >&5 | |
3733 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3734 | (exit $ac_status); } && | |
d7974fe6 KC |
3735 | { ac_try='test -z "$ac_c_werror_flag" |
3736 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3737 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3738 | (eval $ac_try) 2>&5 | |
3739 | ac_status=$? | |
3740 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3741 | (exit $ac_status); }; } && | |
3742 | { ac_try='test -s conftest.$ac_objext' | |
3743 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3744 | (eval $ac_try) 2>&5 | |
3745 | ac_status=$? | |
3746 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3747 | (exit $ac_status); }; }; then | |
3748 | ac_hi=$ac_mid | |
3749 | else | |
3750 | echo "$as_me: failed program was:" >&5 | |
3751 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3752 | ||
3753 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
3754 | fi | |
3755 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3756 | done | |
3757 | case $ac_lo in | |
3758 | ?*) ac_cv_sizeof_void_p=$ac_lo;; | |
3759 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 | |
3760 | See \`config.log' for more details." >&5 | |
3761 | echo "$as_me: error: cannot compute sizeof (void *), 77 | |
3762 | See \`config.log' for more details." >&2;} | |
3763 | { (exit 1); exit 1; }; } ;; | |
3764 | esac | |
3765 | else | |
3766 | if test "$cross_compiling" = yes; then | |
d7974fe6 KC |
3767 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
3768 | See \`config.log' for more details." >&5 | |
3769 | echo "$as_me: error: cannot run test program while cross compiling | |
3770 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
3771 | { (exit 1); exit 1; }; } |
3772 | else | |
3773 | cat >conftest.$ac_ext <<_ACEOF | |
3774 | /* confdefs.h. */ | |
3775 | _ACEOF | |
3776 | cat confdefs.h >>conftest.$ac_ext | |
3777 | cat >>conftest.$ac_ext <<_ACEOF | |
3778 | /* end confdefs.h. */ | |
3779 | $ac_includes_default | |
3780 | long longval () { return (long) (sizeof (void *)); } | |
3781 | unsigned long ulongval () { return (long) (sizeof (void *)); } | |
3782 | #include <stdio.h> | |
3783 | #include <stdlib.h> | |
3784 | int | |
3785 | main () | |
3786 | { | |
3787 | ||
3788 | FILE *f = fopen ("conftest.val", "w"); | |
3789 | if (! f) | |
3790 | exit (1); | |
3791 | if (((long) (sizeof (void *))) < 0) | |
3792 | { | |
3793 | long i = longval (); | |
3794 | if (i != ((long) (sizeof (void *)))) | |
3795 | exit (1); | |
3796 | fprintf (f, "%ld\n", i); | |
3797 | } | |
3798 | else | |
3799 | { | |
3800 | unsigned long i = ulongval (); | |
3801 | if (i != ((long) (sizeof (void *)))) | |
3802 | exit (1); | |
3803 | fprintf (f, "%lu\n", i); | |
3804 | } | |
3805 | exit (ferror (f) || fclose (f) != 0); | |
3806 | ||
3807 | ; | |
3808 | return 0; | |
3809 | } | |
3810 | _ACEOF | |
3811 | rm -f conftest$ac_exeext | |
3812 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3813 | (eval $ac_link) 2>&5 | |
3814 | ac_status=$? | |
3815 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3816 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
3817 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3818 | (eval $ac_try) 2>&5 | |
3819 | ac_status=$? | |
3820 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3821 | (exit $ac_status); }; }; then | |
3822 | ac_cv_sizeof_void_p=`cat conftest.val` | |
3823 | else | |
3824 | echo "$as_me: program exited with status $ac_status" >&5 | |
3825 | echo "$as_me: failed program was:" >&5 | |
3826 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3827 | ||
3828 | ( exit $ac_status ) | |
3829 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 | |
3830 | See \`config.log' for more details." >&5 | |
3831 | echo "$as_me: error: cannot compute sizeof (void *), 77 | |
3832 | See \`config.log' for more details." >&2;} | |
3833 | { (exit 1); exit 1; }; } | |
3834 | fi | |
3835 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
3836 | fi | |
3837 | fi | |
3838 | rm -f conftest.val | |
3839 | else | |
3840 | ac_cv_sizeof_void_p=0 | |
3841 | fi | |
3842 | fi | |
3843 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 | |
3844 | echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 | |
3845 | cat >>confdefs.h <<_ACEOF | |
3846 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p | |
3847 | _ACEOF | |
3848 | ||
3849 | ||
3850 | echo "$as_me:$LINENO: checking for short" >&5 | |
3851 | echo $ECHO_N "checking for short... $ECHO_C" >&6 | |
3852 | if test "${ac_cv_type_short+set}" = set; then | |
3853 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3854 | else | |
3855 | cat >conftest.$ac_ext <<_ACEOF | |
3856 | /* confdefs.h. */ | |
3857 | _ACEOF | |
3858 | cat confdefs.h >>conftest.$ac_ext | |
3859 | cat >>conftest.$ac_ext <<_ACEOF | |
3860 | /* end confdefs.h. */ | |
3861 | $ac_includes_default | |
3862 | int | |
3863 | main () | |
3864 | { | |
3865 | if ((short *) 0) | |
3866 | return 0; | |
3867 | if (sizeof (short)) | |
3868 | return 0; | |
3869 | ; | |
3870 | return 0; | |
3871 | } | |
3872 | _ACEOF | |
3873 | rm -f conftest.$ac_objext | |
3874 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3875 | (eval $ac_compile) 2>conftest.er1 | |
3876 | ac_status=$? | |
3877 | grep -v '^ *+' conftest.er1 >conftest.err | |
3878 | rm -f conftest.er1 | |
3879 | cat conftest.err >&5 | |
3880 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3881 | (exit $ac_status); } && | |
d7974fe6 KC |
3882 | { ac_try='test -z "$ac_c_werror_flag" |
3883 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3884 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3885 | (eval $ac_try) 2>&5 | |
3886 | ac_status=$? | |
3887 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3888 | (exit $ac_status); }; } && | |
3889 | { ac_try='test -s conftest.$ac_objext' | |
3890 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3891 | (eval $ac_try) 2>&5 | |
3892 | ac_status=$? | |
3893 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3894 | (exit $ac_status); }; }; then | |
3895 | ac_cv_type_short=yes | |
3896 | else | |
3897 | echo "$as_me: failed program was:" >&5 | |
3898 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3899 | ||
3900 | ac_cv_type_short=no | |
3901 | fi | |
3902 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3903 | fi | |
3904 | echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 | |
3905 | echo "${ECHO_T}$ac_cv_type_short" >&6 | |
3906 | ||
3907 | echo "$as_me:$LINENO: checking size of short" >&5 | |
3908 | echo $ECHO_N "checking size of short... $ECHO_C" >&6 | |
3909 | if test "${ac_cv_sizeof_short+set}" = set; then | |
3910 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3911 | else | |
3912 | if test "$ac_cv_type_short" = yes; then | |
3913 | # The cast to unsigned long works around a bug in the HP C Compiler | |
3914 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
3915 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
3916 | # This bug is HP SR number 8606223364. | |
3917 | if test "$cross_compiling" = yes; then | |
3918 | # Depending upon the size, compute the lo and hi bounds. | |
3919 | cat >conftest.$ac_ext <<_ACEOF | |
3920 | /* confdefs.h. */ | |
3921 | _ACEOF | |
3922 | cat confdefs.h >>conftest.$ac_ext | |
3923 | cat >>conftest.$ac_ext <<_ACEOF | |
3924 | /* end confdefs.h. */ | |
3925 | $ac_includes_default | |
3926 | int | |
3927 | main () | |
3928 | { | |
3929 | static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; | |
3930 | test_array [0] = 0 | |
3931 | ||
3932 | ; | |
3933 | return 0; | |
3934 | } | |
3935 | _ACEOF | |
3936 | rm -f conftest.$ac_objext | |
3937 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3938 | (eval $ac_compile) 2>conftest.er1 | |
3939 | ac_status=$? | |
3940 | grep -v '^ *+' conftest.er1 >conftest.err | |
3941 | rm -f conftest.er1 | |
3942 | cat conftest.err >&5 | |
3943 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3944 | (exit $ac_status); } && | |
d7974fe6 KC |
3945 | { ac_try='test -z "$ac_c_werror_flag" |
3946 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3947 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3948 | (eval $ac_try) 2>&5 | |
3949 | ac_status=$? | |
3950 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3951 | (exit $ac_status); }; } && | |
3952 | { ac_try='test -s conftest.$ac_objext' | |
3953 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3954 | (eval $ac_try) 2>&5 | |
3955 | ac_status=$? | |
3956 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3957 | (exit $ac_status); }; }; then | |
3958 | ac_lo=0 ac_mid=0 | |
3959 | while :; do | |
3960 | cat >conftest.$ac_ext <<_ACEOF | |
3961 | /* confdefs.h. */ | |
3962 | _ACEOF | |
3963 | cat confdefs.h >>conftest.$ac_ext | |
3964 | cat >>conftest.$ac_ext <<_ACEOF | |
3965 | /* end confdefs.h. */ | |
3966 | $ac_includes_default | |
3967 | int | |
3968 | main () | |
3969 | { | |
3970 | static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; | |
3971 | test_array [0] = 0 | |
3972 | ||
3973 | ; | |
3974 | return 0; | |
3975 | } | |
3976 | _ACEOF | |
3977 | rm -f conftest.$ac_objext | |
3978 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3979 | (eval $ac_compile) 2>conftest.er1 | |
3980 | ac_status=$? | |
3981 | grep -v '^ *+' conftest.er1 >conftest.err | |
3982 | rm -f conftest.er1 | |
3983 | cat conftest.err >&5 | |
3984 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3985 | (exit $ac_status); } && | |
d7974fe6 KC |
3986 | { ac_try='test -z "$ac_c_werror_flag" |
3987 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3988 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3989 | (eval $ac_try) 2>&5 | |
3990 | ac_status=$? | |
3991 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3992 | (exit $ac_status); }; } && | |
3993 | { ac_try='test -s conftest.$ac_objext' | |
3994 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3995 | (eval $ac_try) 2>&5 | |
3996 | ac_status=$? | |
3997 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3998 | (exit $ac_status); }; }; then | |
3999 | ac_hi=$ac_mid; break | |
4000 | else | |
4001 | echo "$as_me: failed program was:" >&5 | |
4002 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4003 | ||
4004 | ac_lo=`expr $ac_mid + 1` | |
4005 | if test $ac_lo -le $ac_mid; then | |
4006 | ac_lo= ac_hi= | |
4007 | break | |
4008 | fi | |
4009 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4010 | fi | |
4011 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4012 | done | |
4013 | else | |
4014 | echo "$as_me: failed program was:" >&5 | |
4015 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4016 | ||
4017 | cat >conftest.$ac_ext <<_ACEOF | |
4018 | /* confdefs.h. */ | |
4019 | _ACEOF | |
4020 | cat confdefs.h >>conftest.$ac_ext | |
4021 | cat >>conftest.$ac_ext <<_ACEOF | |
4022 | /* end confdefs.h. */ | |
4023 | $ac_includes_default | |
4024 | int | |
4025 | main () | |
4026 | { | |
4027 | static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; | |
4028 | test_array [0] = 0 | |
4029 | ||
4030 | ; | |
4031 | return 0; | |
4032 | } | |
4033 | _ACEOF | |
4034 | rm -f conftest.$ac_objext | |
4035 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4036 | (eval $ac_compile) 2>conftest.er1 | |
4037 | ac_status=$? | |
4038 | grep -v '^ *+' conftest.er1 >conftest.err | |
4039 | rm -f conftest.er1 | |
4040 | cat conftest.err >&5 | |
4041 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4042 | (exit $ac_status); } && | |
d7974fe6 KC |
4043 | { ac_try='test -z "$ac_c_werror_flag" |
4044 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4045 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4046 | (eval $ac_try) 2>&5 | |
4047 | ac_status=$? | |
4048 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4049 | (exit $ac_status); }; } && | |
4050 | { ac_try='test -s conftest.$ac_objext' | |
4051 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4052 | (eval $ac_try) 2>&5 | |
4053 | ac_status=$? | |
4054 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4055 | (exit $ac_status); }; }; then | |
4056 | ac_hi=-1 ac_mid=-1 | |
4057 | while :; do | |
4058 | cat >conftest.$ac_ext <<_ACEOF | |
4059 | /* confdefs.h. */ | |
4060 | _ACEOF | |
4061 | cat confdefs.h >>conftest.$ac_ext | |
4062 | cat >>conftest.$ac_ext <<_ACEOF | |
4063 | /* end confdefs.h. */ | |
4064 | $ac_includes_default | |
4065 | int | |
4066 | main () | |
4067 | { | |
4068 | static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; | |
4069 | test_array [0] = 0 | |
4070 | ||
4071 | ; | |
4072 | return 0; | |
4073 | } | |
4074 | _ACEOF | |
4075 | rm -f conftest.$ac_objext | |
4076 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4077 | (eval $ac_compile) 2>conftest.er1 | |
4078 | ac_status=$? | |
4079 | grep -v '^ *+' conftest.er1 >conftest.err | |
4080 | rm -f conftest.er1 | |
4081 | cat conftest.err >&5 | |
4082 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4083 | (exit $ac_status); } && | |
d7974fe6 KC |
4084 | { ac_try='test -z "$ac_c_werror_flag" |
4085 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4086 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4087 | (eval $ac_try) 2>&5 | |
4088 | ac_status=$? | |
4089 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4090 | (exit $ac_status); }; } && | |
4091 | { ac_try='test -s conftest.$ac_objext' | |
4092 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4093 | (eval $ac_try) 2>&5 | |
4094 | ac_status=$? | |
4095 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4096 | (exit $ac_status); }; }; then | |
4097 | ac_lo=$ac_mid; break | |
4098 | else | |
4099 | echo "$as_me: failed program was:" >&5 | |
4100 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4101 | ||
4102 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4103 | if test $ac_mid -le $ac_hi; then | |
4104 | ac_lo= ac_hi= | |
4105 | break | |
4106 | fi | |
4107 | ac_mid=`expr 2 '*' $ac_mid` | |
4108 | fi | |
4109 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4110 | done | |
4111 | else | |
4112 | echo "$as_me: failed program was:" >&5 | |
4113 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4114 | ||
4115 | ac_lo= ac_hi= | |
4116 | fi | |
4117 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4118 | fi | |
4119 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4120 | # Binary search between lo and hi bounds. | |
4121 | while test "x$ac_lo" != "x$ac_hi"; do | |
4122 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4123 | cat >conftest.$ac_ext <<_ACEOF | |
4124 | /* confdefs.h. */ | |
4125 | _ACEOF | |
4126 | cat confdefs.h >>conftest.$ac_ext | |
4127 | cat >>conftest.$ac_ext <<_ACEOF | |
4128 | /* end confdefs.h. */ | |
4129 | $ac_includes_default | |
4130 | int | |
4131 | main () | |
4132 | { | |
4133 | static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; | |
4134 | test_array [0] = 0 | |
4135 | ||
4136 | ; | |
4137 | return 0; | |
4138 | } | |
4139 | _ACEOF | |
4140 | rm -f conftest.$ac_objext | |
4141 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4142 | (eval $ac_compile) 2>conftest.er1 | |
4143 | ac_status=$? | |
4144 | grep -v '^ *+' conftest.er1 >conftest.err | |
4145 | rm -f conftest.er1 | |
4146 | cat conftest.err >&5 | |
4147 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4148 | (exit $ac_status); } && | |
d7974fe6 KC |
4149 | { ac_try='test -z "$ac_c_werror_flag" |
4150 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4151 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4152 | (eval $ac_try) 2>&5 | |
4153 | ac_status=$? | |
4154 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4155 | (exit $ac_status); }; } && | |
4156 | { ac_try='test -s conftest.$ac_objext' | |
4157 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4158 | (eval $ac_try) 2>&5 | |
4159 | ac_status=$? | |
4160 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4161 | (exit $ac_status); }; }; then | |
4162 | ac_hi=$ac_mid | |
4163 | else | |
4164 | echo "$as_me: failed program was:" >&5 | |
4165 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4166 | ||
4167 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4168 | fi | |
4169 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4170 | done | |
4171 | case $ac_lo in | |
4172 | ?*) ac_cv_sizeof_short=$ac_lo;; | |
4173 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 | |
4174 | See \`config.log' for more details." >&5 | |
4175 | echo "$as_me: error: cannot compute sizeof (short), 77 | |
4176 | See \`config.log' for more details." >&2;} | |
4177 | { (exit 1); exit 1; }; } ;; | |
4178 | esac | |
4179 | else | |
4180 | if test "$cross_compiling" = yes; then | |
d7974fe6 KC |
4181 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
4182 | See \`config.log' for more details." >&5 | |
4183 | echo "$as_me: error: cannot run test program while cross compiling | |
4184 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
4185 | { (exit 1); exit 1; }; } |
4186 | else | |
4187 | cat >conftest.$ac_ext <<_ACEOF | |
4188 | /* confdefs.h. */ | |
4189 | _ACEOF | |
4190 | cat confdefs.h >>conftest.$ac_ext | |
4191 | cat >>conftest.$ac_ext <<_ACEOF | |
4192 | /* end confdefs.h. */ | |
4193 | $ac_includes_default | |
4194 | long longval () { return (long) (sizeof (short)); } | |
4195 | unsigned long ulongval () { return (long) (sizeof (short)); } | |
4196 | #include <stdio.h> | |
4197 | #include <stdlib.h> | |
4198 | int | |
4199 | main () | |
4200 | { | |
4201 | ||
4202 | FILE *f = fopen ("conftest.val", "w"); | |
4203 | if (! f) | |
4204 | exit (1); | |
4205 | if (((long) (sizeof (short))) < 0) | |
4206 | { | |
4207 | long i = longval (); | |
4208 | if (i != ((long) (sizeof (short)))) | |
4209 | exit (1); | |
4210 | fprintf (f, "%ld\n", i); | |
4211 | } | |
4212 | else | |
4213 | { | |
4214 | unsigned long i = ulongval (); | |
4215 | if (i != ((long) (sizeof (short)))) | |
4216 | exit (1); | |
4217 | fprintf (f, "%lu\n", i); | |
4218 | } | |
4219 | exit (ferror (f) || fclose (f) != 0); | |
4220 | ||
4221 | ; | |
4222 | return 0; | |
4223 | } | |
4224 | _ACEOF | |
4225 | rm -f conftest$ac_exeext | |
4226 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4227 | (eval $ac_link) 2>&5 | |
4228 | ac_status=$? | |
4229 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4230 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4231 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4232 | (eval $ac_try) 2>&5 | |
4233 | ac_status=$? | |
4234 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4235 | (exit $ac_status); }; }; then | |
4236 | ac_cv_sizeof_short=`cat conftest.val` | |
4237 | else | |
4238 | echo "$as_me: program exited with status $ac_status" >&5 | |
4239 | echo "$as_me: failed program was:" >&5 | |
4240 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4241 | ||
4242 | ( exit $ac_status ) | |
4243 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 | |
4244 | See \`config.log' for more details." >&5 | |
4245 | echo "$as_me: error: cannot compute sizeof (short), 77 | |
4246 | See \`config.log' for more details." >&2;} | |
4247 | { (exit 1); exit 1; }; } | |
4248 | fi | |
4249 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
4250 | fi | |
4251 | fi | |
4252 | rm -f conftest.val | |
4253 | else | |
4254 | ac_cv_sizeof_short=0 | |
4255 | fi | |
4256 | fi | |
4257 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 | |
4258 | echo "${ECHO_T}$ac_cv_sizeof_short" >&6 | |
4259 | cat >>confdefs.h <<_ACEOF | |
4260 | #define SIZEOF_SHORT $ac_cv_sizeof_short | |
4261 | _ACEOF | |
4262 | ||
4263 | ||
4264 | echo "$as_me:$LINENO: checking for int" >&5 | |
4265 | echo $ECHO_N "checking for int... $ECHO_C" >&6 | |
4266 | if test "${ac_cv_type_int+set}" = set; then | |
4267 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4268 | else | |
4269 | cat >conftest.$ac_ext <<_ACEOF | |
4270 | /* confdefs.h. */ | |
4271 | _ACEOF | |
4272 | cat confdefs.h >>conftest.$ac_ext | |
4273 | cat >>conftest.$ac_ext <<_ACEOF | |
4274 | /* end confdefs.h. */ | |
4275 | $ac_includes_default | |
4276 | int | |
4277 | main () | |
4278 | { | |
4279 | if ((int *) 0) | |
4280 | return 0; | |
4281 | if (sizeof (int)) | |
4282 | return 0; | |
4283 | ; | |
4284 | return 0; | |
4285 | } | |
4286 | _ACEOF | |
4287 | rm -f conftest.$ac_objext | |
4288 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4289 | (eval $ac_compile) 2>conftest.er1 | |
4290 | ac_status=$? | |
4291 | grep -v '^ *+' conftest.er1 >conftest.err | |
4292 | rm -f conftest.er1 | |
4293 | cat conftest.err >&5 | |
4294 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4295 | (exit $ac_status); } && | |
d7974fe6 KC |
4296 | { ac_try='test -z "$ac_c_werror_flag" |
4297 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4298 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4299 | (eval $ac_try) 2>&5 | |
4300 | ac_status=$? | |
4301 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4302 | (exit $ac_status); }; } && | |
4303 | { ac_try='test -s conftest.$ac_objext' | |
4304 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4305 | (eval $ac_try) 2>&5 | |
4306 | ac_status=$? | |
4307 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4308 | (exit $ac_status); }; }; then | |
4309 | ac_cv_type_int=yes | |
4310 | else | |
4311 | echo "$as_me: failed program was:" >&5 | |
4312 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4313 | ||
4314 | ac_cv_type_int=no | |
4315 | fi | |
4316 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4317 | fi | |
4318 | echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 | |
4319 | echo "${ECHO_T}$ac_cv_type_int" >&6 | |
4320 | ||
4321 | echo "$as_me:$LINENO: checking size of int" >&5 | |
4322 | echo $ECHO_N "checking size of int... $ECHO_C" >&6 | |
4323 | if test "${ac_cv_sizeof_int+set}" = set; then | |
4324 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4325 | else | |
4326 | if test "$ac_cv_type_int" = yes; then | |
4327 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4328 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4329 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4330 | # This bug is HP SR number 8606223364. | |
4331 | if test "$cross_compiling" = yes; then | |
4332 | # Depending upon the size, compute the lo and hi bounds. | |
4333 | cat >conftest.$ac_ext <<_ACEOF | |
4334 | /* confdefs.h. */ | |
4335 | _ACEOF | |
4336 | cat confdefs.h >>conftest.$ac_ext | |
4337 | cat >>conftest.$ac_ext <<_ACEOF | |
4338 | /* end confdefs.h. */ | |
4339 | $ac_includes_default | |
4340 | int | |
4341 | main () | |
4342 | { | |
4343 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; | |
4344 | test_array [0] = 0 | |
4345 | ||
4346 | ; | |
4347 | return 0; | |
4348 | } | |
4349 | _ACEOF | |
4350 | rm -f conftest.$ac_objext | |
4351 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4352 | (eval $ac_compile) 2>conftest.er1 | |
4353 | ac_status=$? | |
4354 | grep -v '^ *+' conftest.er1 >conftest.err | |
4355 | rm -f conftest.er1 | |
4356 | cat conftest.err >&5 | |
4357 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4358 | (exit $ac_status); } && | |
d7974fe6 KC |
4359 | { ac_try='test -z "$ac_c_werror_flag" |
4360 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4361 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4362 | (eval $ac_try) 2>&5 | |
4363 | ac_status=$? | |
4364 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4365 | (exit $ac_status); }; } && | |
4366 | { ac_try='test -s conftest.$ac_objext' | |
4367 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4368 | (eval $ac_try) 2>&5 | |
4369 | ac_status=$? | |
4370 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4371 | (exit $ac_status); }; }; then | |
4372 | ac_lo=0 ac_mid=0 | |
4373 | while :; do | |
4374 | cat >conftest.$ac_ext <<_ACEOF | |
4375 | /* confdefs.h. */ | |
4376 | _ACEOF | |
4377 | cat confdefs.h >>conftest.$ac_ext | |
4378 | cat >>conftest.$ac_ext <<_ACEOF | |
4379 | /* end confdefs.h. */ | |
4380 | $ac_includes_default | |
4381 | int | |
4382 | main () | |
4383 | { | |
4384 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; | |
4385 | test_array [0] = 0 | |
4386 | ||
4387 | ; | |
4388 | return 0; | |
4389 | } | |
4390 | _ACEOF | |
4391 | rm -f conftest.$ac_objext | |
4392 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4393 | (eval $ac_compile) 2>conftest.er1 | |
4394 | ac_status=$? | |
4395 | grep -v '^ *+' conftest.er1 >conftest.err | |
4396 | rm -f conftest.er1 | |
4397 | cat conftest.err >&5 | |
4398 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4399 | (exit $ac_status); } && | |
d7974fe6 KC |
4400 | { ac_try='test -z "$ac_c_werror_flag" |
4401 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4402 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4403 | (eval $ac_try) 2>&5 | |
4404 | ac_status=$? | |
4405 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4406 | (exit $ac_status); }; } && | |
4407 | { ac_try='test -s conftest.$ac_objext' | |
4408 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4409 | (eval $ac_try) 2>&5 | |
4410 | ac_status=$? | |
4411 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4412 | (exit $ac_status); }; }; then | |
4413 | ac_hi=$ac_mid; break | |
4414 | else | |
4415 | echo "$as_me: failed program was:" >&5 | |
4416 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4417 | ||
4418 | ac_lo=`expr $ac_mid + 1` | |
4419 | if test $ac_lo -le $ac_mid; then | |
4420 | ac_lo= ac_hi= | |
4421 | break | |
4422 | fi | |
4423 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4424 | fi | |
4425 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4426 | done | |
4427 | else | |
4428 | echo "$as_me: failed program was:" >&5 | |
4429 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4430 | ||
4431 | cat >conftest.$ac_ext <<_ACEOF | |
4432 | /* confdefs.h. */ | |
4433 | _ACEOF | |
4434 | cat confdefs.h >>conftest.$ac_ext | |
4435 | cat >>conftest.$ac_ext <<_ACEOF | |
4436 | /* end confdefs.h. */ | |
4437 | $ac_includes_default | |
4438 | int | |
4439 | main () | |
4440 | { | |
4441 | static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; | |
4442 | test_array [0] = 0 | |
4443 | ||
4444 | ; | |
4445 | return 0; | |
4446 | } | |
4447 | _ACEOF | |
4448 | rm -f conftest.$ac_objext | |
4449 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4450 | (eval $ac_compile) 2>conftest.er1 | |
4451 | ac_status=$? | |
4452 | grep -v '^ *+' conftest.er1 >conftest.err | |
4453 | rm -f conftest.er1 | |
4454 | cat conftest.err >&5 | |
4455 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4456 | (exit $ac_status); } && | |
d7974fe6 KC |
4457 | { ac_try='test -z "$ac_c_werror_flag" |
4458 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4459 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4460 | (eval $ac_try) 2>&5 | |
4461 | ac_status=$? | |
4462 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4463 | (exit $ac_status); }; } && | |
4464 | { ac_try='test -s conftest.$ac_objext' | |
4465 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4466 | (eval $ac_try) 2>&5 | |
4467 | ac_status=$? | |
4468 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4469 | (exit $ac_status); }; }; then | |
4470 | ac_hi=-1 ac_mid=-1 | |
4471 | while :; do | |
4472 | cat >conftest.$ac_ext <<_ACEOF | |
4473 | /* confdefs.h. */ | |
4474 | _ACEOF | |
4475 | cat confdefs.h >>conftest.$ac_ext | |
4476 | cat >>conftest.$ac_ext <<_ACEOF | |
4477 | /* end confdefs.h. */ | |
4478 | $ac_includes_default | |
4479 | int | |
4480 | main () | |
4481 | { | |
4482 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; | |
4483 | test_array [0] = 0 | |
4484 | ||
4485 | ; | |
4486 | return 0; | |
4487 | } | |
4488 | _ACEOF | |
4489 | rm -f conftest.$ac_objext | |
4490 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4491 | (eval $ac_compile) 2>conftest.er1 | |
4492 | ac_status=$? | |
4493 | grep -v '^ *+' conftest.er1 >conftest.err | |
4494 | rm -f conftest.er1 | |
4495 | cat conftest.err >&5 | |
4496 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4497 | (exit $ac_status); } && | |
d7974fe6 KC |
4498 | { ac_try='test -z "$ac_c_werror_flag" |
4499 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4500 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4501 | (eval $ac_try) 2>&5 | |
4502 | ac_status=$? | |
4503 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4504 | (exit $ac_status); }; } && | |
4505 | { ac_try='test -s conftest.$ac_objext' | |
4506 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4507 | (eval $ac_try) 2>&5 | |
4508 | ac_status=$? | |
4509 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4510 | (exit $ac_status); }; }; then | |
4511 | ac_lo=$ac_mid; break | |
4512 | else | |
4513 | echo "$as_me: failed program was:" >&5 | |
4514 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4515 | ||
4516 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4517 | if test $ac_mid -le $ac_hi; then | |
4518 | ac_lo= ac_hi= | |
4519 | break | |
4520 | fi | |
4521 | ac_mid=`expr 2 '*' $ac_mid` | |
4522 | fi | |
4523 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4524 | done | |
4525 | else | |
4526 | echo "$as_me: failed program was:" >&5 | |
4527 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4528 | ||
4529 | ac_lo= ac_hi= | |
4530 | fi | |
4531 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4532 | fi | |
4533 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4534 | # Binary search between lo and hi bounds. | |
4535 | while test "x$ac_lo" != "x$ac_hi"; do | |
4536 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4537 | cat >conftest.$ac_ext <<_ACEOF | |
4538 | /* confdefs.h. */ | |
4539 | _ACEOF | |
4540 | cat confdefs.h >>conftest.$ac_ext | |
4541 | cat >>conftest.$ac_ext <<_ACEOF | |
4542 | /* end confdefs.h. */ | |
4543 | $ac_includes_default | |
4544 | int | |
4545 | main () | |
4546 | { | |
4547 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; | |
4548 | test_array [0] = 0 | |
4549 | ||
4550 | ; | |
4551 | return 0; | |
4552 | } | |
4553 | _ACEOF | |
4554 | rm -f conftest.$ac_objext | |
4555 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4556 | (eval $ac_compile) 2>conftest.er1 | |
4557 | ac_status=$? | |
4558 | grep -v '^ *+' conftest.er1 >conftest.err | |
4559 | rm -f conftest.er1 | |
4560 | cat conftest.err >&5 | |
4561 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4562 | (exit $ac_status); } && | |
d7974fe6 KC |
4563 | { ac_try='test -z "$ac_c_werror_flag" |
4564 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4565 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4566 | (eval $ac_try) 2>&5 | |
4567 | ac_status=$? | |
4568 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4569 | (exit $ac_status); }; } && | |
4570 | { ac_try='test -s conftest.$ac_objext' | |
4571 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4572 | (eval $ac_try) 2>&5 | |
4573 | ac_status=$? | |
4574 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4575 | (exit $ac_status); }; }; then | |
4576 | ac_hi=$ac_mid | |
4577 | else | |
4578 | echo "$as_me: failed program was:" >&5 | |
4579 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4580 | ||
4581 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4582 | fi | |
4583 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4584 | done | |
4585 | case $ac_lo in | |
4586 | ?*) ac_cv_sizeof_int=$ac_lo;; | |
4587 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 | |
4588 | See \`config.log' for more details." >&5 | |
4589 | echo "$as_me: error: cannot compute sizeof (int), 77 | |
4590 | See \`config.log' for more details." >&2;} | |
4591 | { (exit 1); exit 1; }; } ;; | |
4592 | esac | |
4593 | else | |
4594 | if test "$cross_compiling" = yes; then | |
d7974fe6 KC |
4595 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
4596 | See \`config.log' for more details." >&5 | |
4597 | echo "$as_me: error: cannot run test program while cross compiling | |
4598 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
4599 | { (exit 1); exit 1; }; } |
4600 | else | |
4601 | cat >conftest.$ac_ext <<_ACEOF | |
4602 | /* confdefs.h. */ | |
4603 | _ACEOF | |
4604 | cat confdefs.h >>conftest.$ac_ext | |
4605 | cat >>conftest.$ac_ext <<_ACEOF | |
4606 | /* end confdefs.h. */ | |
4607 | $ac_includes_default | |
4608 | long longval () { return (long) (sizeof (int)); } | |
4609 | unsigned long ulongval () { return (long) (sizeof (int)); } | |
4610 | #include <stdio.h> | |
4611 | #include <stdlib.h> | |
4612 | int | |
4613 | main () | |
4614 | { | |
4615 | ||
4616 | FILE *f = fopen ("conftest.val", "w"); | |
4617 | if (! f) | |
4618 | exit (1); | |
4619 | if (((long) (sizeof (int))) < 0) | |
4620 | { | |
4621 | long i = longval (); | |
4622 | if (i != ((long) (sizeof (int)))) | |
4623 | exit (1); | |
4624 | fprintf (f, "%ld\n", i); | |
4625 | } | |
4626 | else | |
4627 | { | |
4628 | unsigned long i = ulongval (); | |
4629 | if (i != ((long) (sizeof (int)))) | |
4630 | exit (1); | |
4631 | fprintf (f, "%lu\n", i); | |
4632 | } | |
4633 | exit (ferror (f) || fclose (f) != 0); | |
4634 | ||
4635 | ; | |
4636 | return 0; | |
4637 | } | |
4638 | _ACEOF | |
4639 | rm -f conftest$ac_exeext | |
4640 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4641 | (eval $ac_link) 2>&5 | |
4642 | ac_status=$? | |
4643 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4644 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4645 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4646 | (eval $ac_try) 2>&5 | |
4647 | ac_status=$? | |
4648 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4649 | (exit $ac_status); }; }; then | |
4650 | ac_cv_sizeof_int=`cat conftest.val` | |
4651 | else | |
4652 | echo "$as_me: program exited with status $ac_status" >&5 | |
4653 | echo "$as_me: failed program was:" >&5 | |
4654 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4655 | ||
4656 | ( exit $ac_status ) | |
4657 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 | |
4658 | See \`config.log' for more details." >&5 | |
4659 | echo "$as_me: error: cannot compute sizeof (int), 77 | |
4660 | See \`config.log' for more details." >&2;} | |
4661 | { (exit 1); exit 1; }; } | |
4662 | fi | |
4663 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
4664 | fi | |
4665 | fi | |
4666 | rm -f conftest.val | |
4667 | else | |
4668 | ac_cv_sizeof_int=0 | |
4669 | fi | |
4670 | fi | |
4671 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 | |
4672 | echo "${ECHO_T}$ac_cv_sizeof_int" >&6 | |
4673 | cat >>confdefs.h <<_ACEOF | |
4674 | #define SIZEOF_INT $ac_cv_sizeof_int | |
4675 | _ACEOF | |
4676 | ||
4677 | ||
4678 | echo "$as_me:$LINENO: checking for long" >&5 | |
4679 | echo $ECHO_N "checking for long... $ECHO_C" >&6 | |
4680 | if test "${ac_cv_type_long+set}" = set; then | |
4681 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4682 | else | |
4683 | cat >conftest.$ac_ext <<_ACEOF | |
4684 | /* confdefs.h. */ | |
4685 | _ACEOF | |
4686 | cat confdefs.h >>conftest.$ac_ext | |
4687 | cat >>conftest.$ac_ext <<_ACEOF | |
4688 | /* end confdefs.h. */ | |
4689 | $ac_includes_default | |
4690 | int | |
4691 | main () | |
4692 | { | |
4693 | if ((long *) 0) | |
4694 | return 0; | |
4695 | if (sizeof (long)) | |
4696 | return 0; | |
4697 | ; | |
4698 | return 0; | |
4699 | } | |
4700 | _ACEOF | |
4701 | rm -f conftest.$ac_objext | |
4702 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4703 | (eval $ac_compile) 2>conftest.er1 | |
4704 | ac_status=$? | |
4705 | grep -v '^ *+' conftest.er1 >conftest.err | |
4706 | rm -f conftest.er1 | |
4707 | cat conftest.err >&5 | |
4708 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4709 | (exit $ac_status); } && | |
d7974fe6 KC |
4710 | { ac_try='test -z "$ac_c_werror_flag" |
4711 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4712 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4713 | (eval $ac_try) 2>&5 | |
4714 | ac_status=$? | |
4715 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4716 | (exit $ac_status); }; } && | |
4717 | { ac_try='test -s conftest.$ac_objext' | |
4718 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4719 | (eval $ac_try) 2>&5 | |
4720 | ac_status=$? | |
4721 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4722 | (exit $ac_status); }; }; then | |
4723 | ac_cv_type_long=yes | |
4724 | else | |
4725 | echo "$as_me: failed program was:" >&5 | |
4726 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4727 | ||
4728 | ac_cv_type_long=no | |
4729 | fi | |
4730 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4731 | fi | |
4732 | echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 | |
4733 | echo "${ECHO_T}$ac_cv_type_long" >&6 | |
4734 | ||
4735 | echo "$as_me:$LINENO: checking size of long" >&5 | |
4736 | echo $ECHO_N "checking size of long... $ECHO_C" >&6 | |
4737 | if test "${ac_cv_sizeof_long+set}" = set; then | |
4738 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4739 | else | |
4740 | if test "$ac_cv_type_long" = yes; then | |
4741 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4742 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4743 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4744 | # This bug is HP SR number 8606223364. | |
4745 | if test "$cross_compiling" = yes; then | |
4746 | # Depending upon the size, compute the lo and hi bounds. | |
4747 | cat >conftest.$ac_ext <<_ACEOF | |
4748 | /* confdefs.h. */ | |
4749 | _ACEOF | |
4750 | cat confdefs.h >>conftest.$ac_ext | |
4751 | cat >>conftest.$ac_ext <<_ACEOF | |
4752 | /* end confdefs.h. */ | |
4753 | $ac_includes_default | |
4754 | int | |
4755 | main () | |
4756 | { | |
4757 | static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; | |
4758 | test_array [0] = 0 | |
4759 | ||
4760 | ; | |
4761 | return 0; | |
4762 | } | |
4763 | _ACEOF | |
4764 | rm -f conftest.$ac_objext | |
4765 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4766 | (eval $ac_compile) 2>conftest.er1 | |
4767 | ac_status=$? | |
4768 | grep -v '^ *+' conftest.er1 >conftest.err | |
4769 | rm -f conftest.er1 | |
4770 | cat conftest.err >&5 | |
4771 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4772 | (exit $ac_status); } && | |
d7974fe6 KC |
4773 | { ac_try='test -z "$ac_c_werror_flag" |
4774 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4775 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4776 | (eval $ac_try) 2>&5 | |
4777 | ac_status=$? | |
4778 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4779 | (exit $ac_status); }; } && | |
4780 | { ac_try='test -s conftest.$ac_objext' | |
4781 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4782 | (eval $ac_try) 2>&5 | |
4783 | ac_status=$? | |
4784 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4785 | (exit $ac_status); }; }; then | |
4786 | ac_lo=0 ac_mid=0 | |
4787 | while :; do | |
4788 | cat >conftest.$ac_ext <<_ACEOF | |
4789 | /* confdefs.h. */ | |
4790 | _ACEOF | |
4791 | cat confdefs.h >>conftest.$ac_ext | |
4792 | cat >>conftest.$ac_ext <<_ACEOF | |
4793 | /* end confdefs.h. */ | |
4794 | $ac_includes_default | |
4795 | int | |
4796 | main () | |
4797 | { | |
4798 | static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; | |
4799 | test_array [0] = 0 | |
4800 | ||
4801 | ; | |
4802 | return 0; | |
4803 | } | |
4804 | _ACEOF | |
4805 | rm -f conftest.$ac_objext | |
4806 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4807 | (eval $ac_compile) 2>conftest.er1 | |
4808 | ac_status=$? | |
4809 | grep -v '^ *+' conftest.er1 >conftest.err | |
4810 | rm -f conftest.er1 | |
4811 | cat conftest.err >&5 | |
4812 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4813 | (exit $ac_status); } && | |
d7974fe6 KC |
4814 | { ac_try='test -z "$ac_c_werror_flag" |
4815 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4816 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4817 | (eval $ac_try) 2>&5 | |
4818 | ac_status=$? | |
4819 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4820 | (exit $ac_status); }; } && | |
4821 | { ac_try='test -s conftest.$ac_objext' | |
4822 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4823 | (eval $ac_try) 2>&5 | |
4824 | ac_status=$? | |
4825 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4826 | (exit $ac_status); }; }; then | |
4827 | ac_hi=$ac_mid; break | |
4828 | else | |
4829 | echo "$as_me: failed program was:" >&5 | |
4830 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4831 | ||
4832 | ac_lo=`expr $ac_mid + 1` | |
4833 | if test $ac_lo -le $ac_mid; then | |
4834 | ac_lo= ac_hi= | |
4835 | break | |
4836 | fi | |
4837 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4838 | fi | |
4839 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4840 | done | |
4841 | else | |
4842 | echo "$as_me: failed program was:" >&5 | |
4843 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4844 | ||
4845 | cat >conftest.$ac_ext <<_ACEOF | |
4846 | /* confdefs.h. */ | |
4847 | _ACEOF | |
4848 | cat confdefs.h >>conftest.$ac_ext | |
4849 | cat >>conftest.$ac_ext <<_ACEOF | |
4850 | /* end confdefs.h. */ | |
4851 | $ac_includes_default | |
4852 | int | |
4853 | main () | |
4854 | { | |
4855 | static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; | |
4856 | test_array [0] = 0 | |
4857 | ||
4858 | ; | |
4859 | return 0; | |
4860 | } | |
4861 | _ACEOF | |
4862 | rm -f conftest.$ac_objext | |
4863 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4864 | (eval $ac_compile) 2>conftest.er1 | |
4865 | ac_status=$? | |
4866 | grep -v '^ *+' conftest.er1 >conftest.err | |
4867 | rm -f conftest.er1 | |
4868 | cat conftest.err >&5 | |
4869 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4870 | (exit $ac_status); } && | |
d7974fe6 KC |
4871 | { ac_try='test -z "$ac_c_werror_flag" |
4872 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4873 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4874 | (eval $ac_try) 2>&5 | |
4875 | ac_status=$? | |
4876 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4877 | (exit $ac_status); }; } && | |
4878 | { ac_try='test -s conftest.$ac_objext' | |
4879 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4880 | (eval $ac_try) 2>&5 | |
4881 | ac_status=$? | |
4882 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4883 | (exit $ac_status); }; }; then | |
4884 | ac_hi=-1 ac_mid=-1 | |
4885 | while :; do | |
4886 | cat >conftest.$ac_ext <<_ACEOF | |
4887 | /* confdefs.h. */ | |
4888 | _ACEOF | |
4889 | cat confdefs.h >>conftest.$ac_ext | |
4890 | cat >>conftest.$ac_ext <<_ACEOF | |
4891 | /* end confdefs.h. */ | |
4892 | $ac_includes_default | |
4893 | int | |
4894 | main () | |
4895 | { | |
4896 | static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; | |
4897 | test_array [0] = 0 | |
4898 | ||
4899 | ; | |
4900 | return 0; | |
4901 | } | |
4902 | _ACEOF | |
4903 | rm -f conftest.$ac_objext | |
4904 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4905 | (eval $ac_compile) 2>conftest.er1 | |
4906 | ac_status=$? | |
4907 | grep -v '^ *+' conftest.er1 >conftest.err | |
4908 | rm -f conftest.er1 | |
4909 | cat conftest.err >&5 | |
4910 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4911 | (exit $ac_status); } && | |
d7974fe6 KC |
4912 | { ac_try='test -z "$ac_c_werror_flag" |
4913 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4914 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4915 | (eval $ac_try) 2>&5 | |
4916 | ac_status=$? | |
4917 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4918 | (exit $ac_status); }; } && | |
4919 | { ac_try='test -s conftest.$ac_objext' | |
4920 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4921 | (eval $ac_try) 2>&5 | |
4922 | ac_status=$? | |
4923 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4924 | (exit $ac_status); }; }; then | |
4925 | ac_lo=$ac_mid; break | |
4926 | else | |
4927 | echo "$as_me: failed program was:" >&5 | |
4928 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4929 | ||
4930 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4931 | if test $ac_mid -le $ac_hi; then | |
4932 | ac_lo= ac_hi= | |
4933 | break | |
4934 | fi | |
4935 | ac_mid=`expr 2 '*' $ac_mid` | |
4936 | fi | |
4937 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4938 | done | |
4939 | else | |
4940 | echo "$as_me: failed program was:" >&5 | |
4941 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4942 | ||
4943 | ac_lo= ac_hi= | |
4944 | fi | |
4945 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4946 | fi | |
4947 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4948 | # Binary search between lo and hi bounds. | |
4949 | while test "x$ac_lo" != "x$ac_hi"; do | |
4950 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4951 | cat >conftest.$ac_ext <<_ACEOF | |
4952 | /* confdefs.h. */ | |
4953 | _ACEOF | |
4954 | cat confdefs.h >>conftest.$ac_ext | |
4955 | cat >>conftest.$ac_ext <<_ACEOF | |
4956 | /* end confdefs.h. */ | |
4957 | $ac_includes_default | |
4958 | int | |
4959 | main () | |
4960 | { | |
4961 | static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; | |
4962 | test_array [0] = 0 | |
4963 | ||
4964 | ; | |
4965 | return 0; | |
4966 | } | |
4967 | _ACEOF | |
4968 | rm -f conftest.$ac_objext | |
4969 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4970 | (eval $ac_compile) 2>conftest.er1 | |
4971 | ac_status=$? | |
4972 | grep -v '^ *+' conftest.er1 >conftest.err | |
4973 | rm -f conftest.er1 | |
4974 | cat conftest.err >&5 | |
4975 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4976 | (exit $ac_status); } && | |
d7974fe6 KC |
4977 | { ac_try='test -z "$ac_c_werror_flag" |
4978 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4979 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4980 | (eval $ac_try) 2>&5 | |
4981 | ac_status=$? | |
4982 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4983 | (exit $ac_status); }; } && | |
4984 | { ac_try='test -s conftest.$ac_objext' | |
4985 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4986 | (eval $ac_try) 2>&5 | |
4987 | ac_status=$? | |
4988 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4989 | (exit $ac_status); }; }; then | |
4990 | ac_hi=$ac_mid | |
4991 | else | |
4992 | echo "$as_me: failed program was:" >&5 | |
4993 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4994 | ||
4995 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4996 | fi | |
4997 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4998 | done | |
4999 | case $ac_lo in | |
5000 | ?*) ac_cv_sizeof_long=$ac_lo;; | |
5001 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 | |
5002 | See \`config.log' for more details." >&5 | |
5003 | echo "$as_me: error: cannot compute sizeof (long), 77 | |
5004 | See \`config.log' for more details." >&2;} | |
5005 | { (exit 1); exit 1; }; } ;; | |
5006 | esac | |
5007 | else | |
5008 | if test "$cross_compiling" = yes; then | |
d7974fe6 KC |
5009 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
5010 | See \`config.log' for more details." >&5 | |
5011 | echo "$as_me: error: cannot run test program while cross compiling | |
5012 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
5013 | { (exit 1); exit 1; }; } |
5014 | else | |
5015 | cat >conftest.$ac_ext <<_ACEOF | |
5016 | /* confdefs.h. */ | |
5017 | _ACEOF | |
5018 | cat confdefs.h >>conftest.$ac_ext | |
5019 | cat >>conftest.$ac_ext <<_ACEOF | |
5020 | /* end confdefs.h. */ | |
5021 | $ac_includes_default | |
5022 | long longval () { return (long) (sizeof (long)); } | |
5023 | unsigned long ulongval () { return (long) (sizeof (long)); } | |
5024 | #include <stdio.h> | |
5025 | #include <stdlib.h> | |
5026 | int | |
5027 | main () | |
5028 | { | |
5029 | ||
5030 | FILE *f = fopen ("conftest.val", "w"); | |
5031 | if (! f) | |
5032 | exit (1); | |
5033 | if (((long) (sizeof (long))) < 0) | |
5034 | { | |
5035 | long i = longval (); | |
5036 | if (i != ((long) (sizeof (long)))) | |
5037 | exit (1); | |
5038 | fprintf (f, "%ld\n", i); | |
5039 | } | |
5040 | else | |
5041 | { | |
5042 | unsigned long i = ulongval (); | |
5043 | if (i != ((long) (sizeof (long)))) | |
5044 | exit (1); | |
5045 | fprintf (f, "%lu\n", i); | |
5046 | } | |
5047 | exit (ferror (f) || fclose (f) != 0); | |
5048 | ||
5049 | ; | |
5050 | return 0; | |
5051 | } | |
5052 | _ACEOF | |
5053 | rm -f conftest$ac_exeext | |
5054 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5055 | (eval $ac_link) 2>&5 | |
5056 | ac_status=$? | |
5057 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5058 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5059 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5060 | (eval $ac_try) 2>&5 | |
5061 | ac_status=$? | |
5062 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5063 | (exit $ac_status); }; }; then | |
5064 | ac_cv_sizeof_long=`cat conftest.val` | |
5065 | else | |
5066 | echo "$as_me: program exited with status $ac_status" >&5 | |
5067 | echo "$as_me: failed program was:" >&5 | |
5068 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5069 | ||
5070 | ( exit $ac_status ) | |
5071 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 | |
5072 | See \`config.log' for more details." >&5 | |
5073 | echo "$as_me: error: cannot compute sizeof (long), 77 | |
5074 | See \`config.log' for more details." >&2;} | |
5075 | { (exit 1); exit 1; }; } | |
5076 | fi | |
5077 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
5078 | fi | |
5079 | fi | |
5080 | rm -f conftest.val | |
5081 | else | |
5082 | ac_cv_sizeof_long=0 | |
5083 | fi | |
5084 | fi | |
5085 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 | |
5086 | echo "${ECHO_T}$ac_cv_sizeof_long" >&6 | |
5087 | cat >>confdefs.h <<_ACEOF | |
5088 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5089 | _ACEOF | |
5090 | ||
5091 | ||
5ec1c5e6 KC |
5092 | echo "$as_me:$LINENO: checking for long long" >&5 |
5093 | echo $ECHO_N "checking for long long... $ECHO_C" >&6 | |
5094 | if test "${ac_cv_type_long_long+set}" = set; then | |
5095 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5096 | else | |
5097 | cat >conftest.$ac_ext <<_ACEOF | |
5098 | /* confdefs.h. */ | |
5099 | _ACEOF | |
5100 | cat confdefs.h >>conftest.$ac_ext | |
5101 | cat >>conftest.$ac_ext <<_ACEOF | |
5102 | /* end confdefs.h. */ | |
5103 | $ac_includes_default | |
5104 | int | |
5105 | main () | |
5106 | { | |
5107 | if ((long long *) 0) | |
5108 | return 0; | |
5109 | if (sizeof (long long)) | |
5110 | return 0; | |
5111 | ; | |
5112 | return 0; | |
5113 | } | |
5114 | _ACEOF | |
5115 | rm -f conftest.$ac_objext | |
5116 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5117 | (eval $ac_compile) 2>conftest.er1 | |
5118 | ac_status=$? | |
5119 | grep -v '^ *+' conftest.er1 >conftest.err | |
5120 | rm -f conftest.er1 | |
5121 | cat conftest.err >&5 | |
5122 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5123 | (exit $ac_status); } && | |
5124 | { ac_try='test -z "$ac_c_werror_flag" | |
5125 | || test ! -s conftest.err' | |
5126 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5127 | (eval $ac_try) 2>&5 | |
5128 | ac_status=$? | |
5129 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5130 | (exit $ac_status); }; } && | |
5131 | { ac_try='test -s conftest.$ac_objext' | |
5132 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5133 | (eval $ac_try) 2>&5 | |
5134 | ac_status=$? | |
5135 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5136 | (exit $ac_status); }; }; then | |
5137 | ac_cv_type_long_long=yes | |
5138 | else | |
5139 | echo "$as_me: failed program was:" >&5 | |
5140 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5141 | ||
5142 | ac_cv_type_long_long=no | |
5143 | fi | |
5144 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5145 | fi | |
5146 | echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 | |
5147 | echo "${ECHO_T}$ac_cv_type_long_long" >&6 | |
5148 | if test $ac_cv_type_long_long = yes; then | |
5149 | ||
5150 | cat >>confdefs.h <<_ACEOF | |
5151 | #define HAVE_LONG_LONG 1 | |
5152 | _ACEOF | |
5153 | ||
5154 | echo "$as_me:$LINENO: checking for long long" >&5 | |
bf3b7cd3 JD |
5155 | echo $ECHO_N "checking for long long... $ECHO_C" >&6 |
5156 | if test "${ac_cv_type_long_long+set}" = set; then | |
5157 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5158 | else | |
5159 | cat >conftest.$ac_ext <<_ACEOF | |
5160 | /* confdefs.h. */ | |
5161 | _ACEOF | |
5162 | cat confdefs.h >>conftest.$ac_ext | |
5163 | cat >>conftest.$ac_ext <<_ACEOF | |
5164 | /* end confdefs.h. */ | |
5165 | $ac_includes_default | |
5166 | int | |
5167 | main () | |
5168 | { | |
5169 | if ((long long *) 0) | |
5170 | return 0; | |
5171 | if (sizeof (long long)) | |
5172 | return 0; | |
5173 | ; | |
5174 | return 0; | |
5175 | } | |
5176 | _ACEOF | |
5177 | rm -f conftest.$ac_objext | |
5178 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5179 | (eval $ac_compile) 2>conftest.er1 | |
5180 | ac_status=$? | |
5181 | grep -v '^ *+' conftest.er1 >conftest.err | |
5182 | rm -f conftest.er1 | |
5183 | cat conftest.err >&5 | |
5184 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5185 | (exit $ac_status); } && | |
d7974fe6 KC |
5186 | { ac_try='test -z "$ac_c_werror_flag" |
5187 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5188 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5189 | (eval $ac_try) 2>&5 | |
5190 | ac_status=$? | |
5191 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5192 | (exit $ac_status); }; } && | |
5193 | { ac_try='test -s conftest.$ac_objext' | |
5194 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5195 | (eval $ac_try) 2>&5 | |
5196 | ac_status=$? | |
5197 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5198 | (exit $ac_status); }; }; then | |
5199 | ac_cv_type_long_long=yes | |
5200 | else | |
5201 | echo "$as_me: failed program was:" >&5 | |
5202 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5203 | ||
5204 | ac_cv_type_long_long=no | |
5205 | fi | |
5206 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5207 | fi | |
5208 | echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 | |
5209 | echo "${ECHO_T}$ac_cv_type_long_long" >&6 | |
5210 | ||
5211 | echo "$as_me:$LINENO: checking size of long long" >&5 | |
5212 | echo $ECHO_N "checking size of long long... $ECHO_C" >&6 | |
5213 | if test "${ac_cv_sizeof_long_long+set}" = set; then | |
5214 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5215 | else | |
5216 | if test "$ac_cv_type_long_long" = yes; then | |
5217 | # The cast to unsigned long works around a bug in the HP C Compiler | |
5218 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5219 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5220 | # This bug is HP SR number 8606223364. | |
5221 | if test "$cross_compiling" = yes; then | |
5222 | # Depending upon the size, compute the lo and hi bounds. | |
5223 | cat >conftest.$ac_ext <<_ACEOF | |
5224 | /* confdefs.h. */ | |
5225 | _ACEOF | |
5226 | cat confdefs.h >>conftest.$ac_ext | |
5227 | cat >>conftest.$ac_ext <<_ACEOF | |
5228 | /* end confdefs.h. */ | |
5229 | $ac_includes_default | |
5230 | int | |
5231 | main () | |
5232 | { | |
5233 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; | |
5234 | test_array [0] = 0 | |
5235 | ||
5236 | ; | |
5237 | return 0; | |
5238 | } | |
5239 | _ACEOF | |
5240 | rm -f conftest.$ac_objext | |
5241 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5242 | (eval $ac_compile) 2>conftest.er1 | |
5243 | ac_status=$? | |
5244 | grep -v '^ *+' conftest.er1 >conftest.err | |
5245 | rm -f conftest.er1 | |
5246 | cat conftest.err >&5 | |
5247 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5248 | (exit $ac_status); } && | |
d7974fe6 KC |
5249 | { ac_try='test -z "$ac_c_werror_flag" |
5250 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5251 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5252 | (eval $ac_try) 2>&5 | |
5253 | ac_status=$? | |
5254 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5255 | (exit $ac_status); }; } && | |
5256 | { ac_try='test -s conftest.$ac_objext' | |
5257 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5258 | (eval $ac_try) 2>&5 | |
5259 | ac_status=$? | |
5260 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5261 | (exit $ac_status); }; }; then | |
5262 | ac_lo=0 ac_mid=0 | |
5263 | while :; do | |
5264 | cat >conftest.$ac_ext <<_ACEOF | |
5265 | /* confdefs.h. */ | |
5266 | _ACEOF | |
5267 | cat confdefs.h >>conftest.$ac_ext | |
5268 | cat >>conftest.$ac_ext <<_ACEOF | |
5269 | /* end confdefs.h. */ | |
5270 | $ac_includes_default | |
5271 | int | |
5272 | main () | |
5273 | { | |
5274 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; | |
5275 | test_array [0] = 0 | |
5276 | ||
5277 | ; | |
5278 | return 0; | |
5279 | } | |
5280 | _ACEOF | |
5281 | rm -f conftest.$ac_objext | |
5282 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5283 | (eval $ac_compile) 2>conftest.er1 | |
5284 | ac_status=$? | |
5285 | grep -v '^ *+' conftest.er1 >conftest.err | |
5286 | rm -f conftest.er1 | |
5287 | cat conftest.err >&5 | |
5288 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5289 | (exit $ac_status); } && | |
d7974fe6 KC |
5290 | { ac_try='test -z "$ac_c_werror_flag" |
5291 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5292 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5293 | (eval $ac_try) 2>&5 | |
5294 | ac_status=$? | |
5295 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5296 | (exit $ac_status); }; } && | |
5297 | { ac_try='test -s conftest.$ac_objext' | |
5298 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5299 | (eval $ac_try) 2>&5 | |
5300 | ac_status=$? | |
5301 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5302 | (exit $ac_status); }; }; then | |
5303 | ac_hi=$ac_mid; break | |
5304 | else | |
5305 | echo "$as_me: failed program was:" >&5 | |
5306 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5307 | ||
5308 | ac_lo=`expr $ac_mid + 1` | |
5309 | if test $ac_lo -le $ac_mid; then | |
5310 | ac_lo= ac_hi= | |
5311 | break | |
5312 | fi | |
5313 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
5314 | fi | |
5315 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5316 | done | |
5317 | else | |
5318 | echo "$as_me: failed program was:" >&5 | |
5319 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5320 | ||
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))) < 0)]; | |
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); } && | |
d7974fe6 KC |
5347 | { ac_try='test -z "$ac_c_werror_flag" |
5348 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5349 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5350 | (eval $ac_try) 2>&5 | |
5351 | ac_status=$? | |
5352 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5353 | (exit $ac_status); }; } && | |
5354 | { ac_try='test -s conftest.$ac_objext' | |
5355 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5356 | (eval $ac_try) 2>&5 | |
5357 | ac_status=$? | |
5358 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5359 | (exit $ac_status); }; }; then | |
5360 | ac_hi=-1 ac_mid=-1 | |
5361 | while :; do | |
5362 | cat >conftest.$ac_ext <<_ACEOF | |
5363 | /* confdefs.h. */ | |
5364 | _ACEOF | |
5365 | cat confdefs.h >>conftest.$ac_ext | |
5366 | cat >>conftest.$ac_ext <<_ACEOF | |
5367 | /* end confdefs.h. */ | |
5368 | $ac_includes_default | |
5369 | int | |
5370 | main () | |
5371 | { | |
5372 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; | |
5373 | test_array [0] = 0 | |
5374 | ||
5375 | ; | |
5376 | return 0; | |
5377 | } | |
5378 | _ACEOF | |
5379 | rm -f conftest.$ac_objext | |
5380 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5381 | (eval $ac_compile) 2>conftest.er1 | |
5382 | ac_status=$? | |
5383 | grep -v '^ *+' conftest.er1 >conftest.err | |
5384 | rm -f conftest.er1 | |
5385 | cat conftest.err >&5 | |
5386 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5387 | (exit $ac_status); } && | |
d7974fe6 KC |
5388 | { ac_try='test -z "$ac_c_werror_flag" |
5389 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5390 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5391 | (eval $ac_try) 2>&5 | |
5392 | ac_status=$? | |
5393 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5394 | (exit $ac_status); }; } && | |
5395 | { ac_try='test -s conftest.$ac_objext' | |
5396 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5397 | (eval $ac_try) 2>&5 | |
5398 | ac_status=$? | |
5399 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5400 | (exit $ac_status); }; }; then | |
5401 | ac_lo=$ac_mid; break | |
5402 | else | |
5403 | echo "$as_me: failed program was:" >&5 | |
5404 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5405 | ||
5406 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
5407 | if test $ac_mid -le $ac_hi; then | |
5408 | ac_lo= ac_hi= | |
5409 | break | |
5410 | fi | |
5411 | ac_mid=`expr 2 '*' $ac_mid` | |
5412 | fi | |
5413 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5414 | done | |
5415 | else | |
5416 | echo "$as_me: failed program was:" >&5 | |
5417 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5418 | ||
5419 | ac_lo= ac_hi= | |
5420 | fi | |
5421 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5422 | fi | |
5423 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5424 | # Binary search between lo and hi bounds. | |
5425 | while test "x$ac_lo" != "x$ac_hi"; do | |
5426 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
5427 | cat >conftest.$ac_ext <<_ACEOF | |
5428 | /* confdefs.h. */ | |
5429 | _ACEOF | |
5430 | cat confdefs.h >>conftest.$ac_ext | |
5431 | cat >>conftest.$ac_ext <<_ACEOF | |
5432 | /* end confdefs.h. */ | |
5433 | $ac_includes_default | |
5434 | int | |
5435 | main () | |
5436 | { | |
5437 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; | |
5438 | test_array [0] = 0 | |
5439 | ||
5440 | ; | |
5441 | return 0; | |
5442 | } | |
5443 | _ACEOF | |
5444 | rm -f conftest.$ac_objext | |
5445 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5446 | (eval $ac_compile) 2>conftest.er1 | |
5447 | ac_status=$? | |
5448 | grep -v '^ *+' conftest.er1 >conftest.err | |
5449 | rm -f conftest.er1 | |
5450 | cat conftest.err >&5 | |
5451 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5452 | (exit $ac_status); } && | |
d7974fe6 KC |
5453 | { ac_try='test -z "$ac_c_werror_flag" |
5454 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5455 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5456 | (eval $ac_try) 2>&5 | |
5457 | ac_status=$? | |
5458 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5459 | (exit $ac_status); }; } && | |
5460 | { ac_try='test -s conftest.$ac_objext' | |
5461 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5462 | (eval $ac_try) 2>&5 | |
5463 | ac_status=$? | |
5464 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5465 | (exit $ac_status); }; }; then | |
5466 | ac_hi=$ac_mid | |
5467 | else | |
5468 | echo "$as_me: failed program was:" >&5 | |
5469 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5470 | ||
5471 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
5472 | fi | |
5473 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5474 | done | |
5475 | case $ac_lo in | |
5476 | ?*) ac_cv_sizeof_long_long=$ac_lo;; | |
5477 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 | |
5478 | See \`config.log' for more details." >&5 | |
5479 | echo "$as_me: error: cannot compute sizeof (long long), 77 | |
5480 | See \`config.log' for more details." >&2;} | |
5481 | { (exit 1); exit 1; }; } ;; | |
5482 | esac | |
5483 | else | |
5484 | if test "$cross_compiling" = yes; then | |
d7974fe6 KC |
5485 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
5486 | See \`config.log' for more details." >&5 | |
5487 | echo "$as_me: error: cannot run test program while cross compiling | |
5488 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
5489 | { (exit 1); exit 1; }; } |
5490 | else | |
5491 | cat >conftest.$ac_ext <<_ACEOF | |
5492 | /* confdefs.h. */ | |
5493 | _ACEOF | |
5494 | cat confdefs.h >>conftest.$ac_ext | |
5495 | cat >>conftest.$ac_ext <<_ACEOF | |
5496 | /* end confdefs.h. */ | |
5497 | $ac_includes_default | |
5498 | long longval () { return (long) (sizeof (long long)); } | |
5499 | unsigned long ulongval () { return (long) (sizeof (long long)); } | |
5500 | #include <stdio.h> | |
5501 | #include <stdlib.h> | |
5502 | int | |
5503 | main () | |
5504 | { | |
5505 | ||
5506 | FILE *f = fopen ("conftest.val", "w"); | |
5507 | if (! f) | |
5508 | exit (1); | |
5509 | if (((long) (sizeof (long long))) < 0) | |
5510 | { | |
5511 | long i = longval (); | |
5512 | if (i != ((long) (sizeof (long long)))) | |
5513 | exit (1); | |
5514 | fprintf (f, "%ld\n", i); | |
5515 | } | |
5516 | else | |
5517 | { | |
5518 | unsigned long i = ulongval (); | |
5519 | if (i != ((long) (sizeof (long long)))) | |
5520 | exit (1); | |
5521 | fprintf (f, "%lu\n", i); | |
5522 | } | |
5523 | exit (ferror (f) || fclose (f) != 0); | |
5524 | ||
5525 | ; | |
5526 | return 0; | |
5527 | } | |
5528 | _ACEOF | |
5529 | rm -f conftest$ac_exeext | |
5530 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5531 | (eval $ac_link) 2>&5 | |
5532 | ac_status=$? | |
5533 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5534 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5535 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5536 | (eval $ac_try) 2>&5 | |
5537 | ac_status=$? | |
5538 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5539 | (exit $ac_status); }; }; then | |
5540 | ac_cv_sizeof_long_long=`cat conftest.val` | |
5541 | else | |
5542 | echo "$as_me: program exited with status $ac_status" >&5 | |
5543 | echo "$as_me: failed program was:" >&5 | |
5544 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5545 | ||
5546 | ( exit $ac_status ) | |
5547 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 | |
5548 | See \`config.log' for more details." >&5 | |
5549 | echo "$as_me: error: cannot compute sizeof (long long), 77 | |
5550 | See \`config.log' for more details." >&2;} | |
5551 | { (exit 1); exit 1; }; } | |
5552 | fi | |
5553 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
5554 | fi | |
5555 | fi | |
5556 | rm -f conftest.val | |
5557 | else | |
5558 | ac_cv_sizeof_long_long=0 | |
5559 | fi | |
5560 | fi | |
5561 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 | |
5562 | echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 | |
5563 | cat >>confdefs.h <<_ACEOF | |
5564 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
5565 | _ACEOF | |
5566 | ||
5567 | ||
5568 | fi | |
5ec1c5e6 KC |
5569 | |
5570 | echo "$as_me:$LINENO: checking for __int64" >&5 | |
5571 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 | |
5572 | if test "${ac_cv_type___int64+set}" = set; then | |
5573 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5574 | else | |
5575 | cat >conftest.$ac_ext <<_ACEOF | |
5576 | /* confdefs.h. */ | |
5577 | _ACEOF | |
5578 | cat confdefs.h >>conftest.$ac_ext | |
5579 | cat >>conftest.$ac_ext <<_ACEOF | |
5580 | /* end confdefs.h. */ | |
5581 | $ac_includes_default | |
5582 | int | |
5583 | main () | |
5584 | { | |
5585 | if ((__int64 *) 0) | |
5586 | return 0; | |
5587 | if (sizeof (__int64)) | |
5588 | return 0; | |
5589 | ; | |
5590 | return 0; | |
5591 | } | |
5592 | _ACEOF | |
5593 | rm -f conftest.$ac_objext | |
5594 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5595 | (eval $ac_compile) 2>conftest.er1 | |
5596 | ac_status=$? | |
5597 | grep -v '^ *+' conftest.er1 >conftest.err | |
5598 | rm -f conftest.er1 | |
5599 | cat conftest.err >&5 | |
5600 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5601 | (exit $ac_status); } && | |
5602 | { ac_try='test -z "$ac_c_werror_flag" | |
5603 | || test ! -s conftest.err' | |
5604 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5605 | (eval $ac_try) 2>&5 | |
5606 | ac_status=$? | |
5607 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5608 | (exit $ac_status); }; } && | |
5609 | { ac_try='test -s conftest.$ac_objext' | |
5610 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5611 | (eval $ac_try) 2>&5 | |
5612 | ac_status=$? | |
5613 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5614 | (exit $ac_status); }; }; then | |
5615 | ac_cv_type___int64=yes | |
5616 | else | |
5617 | echo "$as_me: failed program was:" >&5 | |
5618 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5619 | ||
5620 | ac_cv_type___int64=no | |
5621 | fi | |
5622 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5623 | fi | |
5624 | echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 | |
5625 | echo "${ECHO_T}$ac_cv_type___int64" >&6 | |
5626 | if test $ac_cv_type___int64 = yes; then | |
5627 | ||
5628 | cat >>confdefs.h <<_ACEOF | |
5629 | #define HAVE___INT64 1 | |
5630 | _ACEOF | |
5631 | ||
5632 | echo "$as_me:$LINENO: checking for __int64" >&5 | |
bf3b7cd3 JD |
5633 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 |
5634 | if test "${ac_cv_type___int64+set}" = set; then | |
5635 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5636 | else | |
ba479fd2 | 5637 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5638 | /* confdefs.h. */ |
5639 | _ACEOF | |
5640 | cat confdefs.h >>conftest.$ac_ext | |
5641 | cat >>conftest.$ac_ext <<_ACEOF | |
5642 | /* end confdefs.h. */ | |
bf3b7cd3 | 5643 | $ac_includes_default |
ba479fd2 NN |
5644 | int |
5645 | main () | |
5646 | { | |
bf3b7cd3 JD |
5647 | if ((__int64 *) 0) |
5648 | return 0; | |
5649 | if (sizeof (__int64)) | |
5650 | return 0; | |
ba479fd2 NN |
5651 | ; |
5652 | return 0; | |
5653 | } | |
5654 | _ACEOF | |
5655 | rm -f conftest.$ac_objext | |
5656 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5657 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5658 | ac_status=$? |
86da66b5 HPN |
5659 | grep -v '^ *+' conftest.er1 >conftest.err |
5660 | rm -f conftest.er1 | |
5661 | cat conftest.err >&5 | |
ba479fd2 NN |
5662 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5663 | (exit $ac_status); } && | |
d7974fe6 KC |
5664 | { ac_try='test -z "$ac_c_werror_flag" |
5665 | || test ! -s conftest.err' | |
86da66b5 HPN |
5666 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5667 | (eval $ac_try) 2>&5 | |
5668 | ac_status=$? | |
5669 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5670 | (exit $ac_status); }; } && | |
5671 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5672 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5673 | (eval $ac_try) 2>&5 | |
5674 | ac_status=$? | |
5675 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5676 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5677 | ac_cv_type___int64=yes |
75b6f3fd | 5678 | else |
ba479fd2 NN |
5679 | echo "$as_me: failed program was:" >&5 |
5680 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5681 | ||
bf3b7cd3 | 5682 | ac_cv_type___int64=no |
75b6f3fd | 5683 | fi |
86da66b5 | 5684 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75b6f3fd | 5685 | fi |
bf3b7cd3 JD |
5686 | echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 |
5687 | echo "${ECHO_T}$ac_cv_type___int64" >&6 | |
75b6f3fd | 5688 | |
bf3b7cd3 JD |
5689 | echo "$as_me:$LINENO: checking size of __int64" >&5 |
5690 | echo $ECHO_N "checking size of __int64... $ECHO_C" >&6 | |
5691 | if test "${ac_cv_sizeof___int64+set}" = set; then | |
ba479fd2 | 5692 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
414d23ae | 5693 | else |
bf3b7cd3 JD |
5694 | if test "$ac_cv_type___int64" = yes; then |
5695 | # The cast to unsigned long works around a bug in the HP C Compiler | |
5696 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5697 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5698 | # This bug is HP SR number 8606223364. | |
5699 | if test "$cross_compiling" = yes; then | |
5700 | # Depending upon the size, compute the lo and hi bounds. | |
5701 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5702 | /* confdefs.h. */ |
5703 | _ACEOF | |
5704 | cat confdefs.h >>conftest.$ac_ext | |
5705 | cat >>conftest.$ac_ext <<_ACEOF | |
5706 | /* end confdefs.h. */ | |
bf3b7cd3 | 5707 | $ac_includes_default |
ba479fd2 NN |
5708 | int |
5709 | main () | |
5710 | { | |
bf3b7cd3 JD |
5711 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)]; |
5712 | test_array [0] = 0 | |
5713 | ||
ba479fd2 NN |
5714 | ; |
5715 | return 0; | |
5716 | } | |
5717 | _ACEOF | |
5718 | rm -f conftest.$ac_objext | |
5719 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5720 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5721 | ac_status=$? |
86da66b5 HPN |
5722 | grep -v '^ *+' conftest.er1 >conftest.err |
5723 | rm -f conftest.er1 | |
5724 | cat conftest.err >&5 | |
ba479fd2 NN |
5725 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5726 | (exit $ac_status); } && | |
d7974fe6 KC |
5727 | { ac_try='test -z "$ac_c_werror_flag" |
5728 | || test ! -s conftest.err' | |
86da66b5 HPN |
5729 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5730 | (eval $ac_try) 2>&5 | |
5731 | ac_status=$? | |
5732 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5733 | (exit $ac_status); }; } && | |
5734 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5735 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5736 | (eval $ac_try) 2>&5 | |
5737 | ac_status=$? | |
5738 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5739 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5740 | ac_lo=0 ac_mid=0 |
5741 | while :; do | |
5742 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5743 | /* confdefs.h. */ |
5744 | _ACEOF | |
5745 | cat confdefs.h >>conftest.$ac_ext | |
5746 | cat >>conftest.$ac_ext <<_ACEOF | |
5747 | /* end confdefs.h. */ | |
bf3b7cd3 | 5748 | $ac_includes_default |
ba479fd2 NN |
5749 | int |
5750 | main () | |
5751 | { | |
bf3b7cd3 JD |
5752 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; |
5753 | test_array [0] = 0 | |
5754 | ||
ba479fd2 NN |
5755 | ; |
5756 | return 0; | |
5757 | } | |
5758 | _ACEOF | |
5759 | rm -f conftest.$ac_objext | |
5760 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5761 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5762 | ac_status=$? |
86da66b5 HPN |
5763 | grep -v '^ *+' conftest.er1 >conftest.err |
5764 | rm -f conftest.er1 | |
5765 | cat conftest.err >&5 | |
ba479fd2 NN |
5766 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5767 | (exit $ac_status); } && | |
d7974fe6 KC |
5768 | { ac_try='test -z "$ac_c_werror_flag" |
5769 | || test ! -s conftest.err' | |
86da66b5 HPN |
5770 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5771 | (eval $ac_try) 2>&5 | |
5772 | ac_status=$? | |
5773 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5774 | (exit $ac_status); }; } && | |
5775 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5776 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5777 | (eval $ac_try) 2>&5 | |
5778 | ac_status=$? | |
5779 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5780 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5781 | ac_hi=$ac_mid; break |
75e93faa | 5782 | else |
ba479fd2 NN |
5783 | echo "$as_me: failed program was:" >&5 |
5784 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5785 | ||
bf3b7cd3 JD |
5786 | ac_lo=`expr $ac_mid + 1` |
5787 | if test $ac_lo -le $ac_mid; then | |
5788 | ac_lo= ac_hi= | |
5789 | break | |
5790 | fi | |
5791 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
75e93faa | 5792 | fi |
86da66b5 | 5793 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 5794 | done |
75e93faa | 5795 | else |
bf3b7cd3 JD |
5796 | echo "$as_me: failed program was:" >&5 |
5797 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5798 | ||
5799 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5800 | /* confdefs.h. */ |
5801 | _ACEOF | |
5802 | cat confdefs.h >>conftest.$ac_ext | |
5803 | cat >>conftest.$ac_ext <<_ACEOF | |
5804 | /* end confdefs.h. */ | |
bf3b7cd3 | 5805 | $ac_includes_default |
ba479fd2 NN |
5806 | int |
5807 | main () | |
5808 | { | |
bf3b7cd3 JD |
5809 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)]; |
5810 | test_array [0] = 0 | |
5811 | ||
ba479fd2 NN |
5812 | ; |
5813 | return 0; | |
5814 | } | |
5815 | _ACEOF | |
5816 | rm -f conftest.$ac_objext | |
5817 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5818 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5819 | ac_status=$? |
86da66b5 HPN |
5820 | grep -v '^ *+' conftest.er1 >conftest.err |
5821 | rm -f conftest.er1 | |
5822 | cat conftest.err >&5 | |
ba479fd2 NN |
5823 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5824 | (exit $ac_status); } && | |
d7974fe6 KC |
5825 | { ac_try='test -z "$ac_c_werror_flag" |
5826 | || test ! -s conftest.err' | |
86da66b5 HPN |
5827 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5828 | (eval $ac_try) 2>&5 | |
5829 | ac_status=$? | |
5830 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5831 | (exit $ac_status); }; } && | |
5832 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5833 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5834 | (eval $ac_try) 2>&5 | |
5835 | ac_status=$? | |
5836 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5837 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5838 | ac_hi=-1 ac_mid=-1 |
5839 | while :; do | |
5840 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5841 | /* confdefs.h. */ |
5842 | _ACEOF | |
5843 | cat confdefs.h >>conftest.$ac_ext | |
5844 | cat >>conftest.$ac_ext <<_ACEOF | |
5845 | /* end confdefs.h. */ | |
bf3b7cd3 | 5846 | $ac_includes_default |
ba479fd2 NN |
5847 | int |
5848 | main () | |
5849 | { | |
bf3b7cd3 JD |
5850 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)]; |
5851 | test_array [0] = 0 | |
5852 | ||
ba479fd2 NN |
5853 | ; |
5854 | return 0; | |
5855 | } | |
5856 | _ACEOF | |
5857 | rm -f conftest.$ac_objext | |
5858 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5859 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5860 | ac_status=$? |
86da66b5 HPN |
5861 | grep -v '^ *+' conftest.er1 >conftest.err |
5862 | rm -f conftest.er1 | |
5863 | cat conftest.err >&5 | |
ba479fd2 NN |
5864 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5865 | (exit $ac_status); } && | |
d7974fe6 KC |
5866 | { ac_try='test -z "$ac_c_werror_flag" |
5867 | || test ! -s conftest.err' | |
86da66b5 HPN |
5868 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5869 | (eval $ac_try) 2>&5 | |
5870 | ac_status=$? | |
5871 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5872 | (exit $ac_status); }; } && | |
5873 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5874 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5875 | (eval $ac_try) 2>&5 | |
5876 | ac_status=$? | |
5877 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5878 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5879 | ac_lo=$ac_mid; break |
04cabffc | 5880 | else |
ba479fd2 NN |
5881 | echo "$as_me: failed program was:" >&5 |
5882 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5883 | ||
bf3b7cd3 JD |
5884 | ac_hi=`expr '(' $ac_mid ')' - 1` |
5885 | if test $ac_mid -le $ac_hi; then | |
5886 | ac_lo= ac_hi= | |
5887 | break | |
5888 | fi | |
5889 | ac_mid=`expr 2 '*' $ac_mid` | |
04cabffc | 5890 | fi |
86da66b5 | 5891 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5892 | done |
5893 | else | |
5894 | echo "$as_me: failed program was:" >&5 | |
5895 | sed 's/^/| /' conftest.$ac_ext >&5 | |
04cabffc | 5896 | |
bf3b7cd3 | 5897 | ac_lo= ac_hi= |
414d23ae | 5898 | fi |
bf3b7cd3 | 5899 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 5900 | fi |
bf3b7cd3 JD |
5901 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
5902 | # Binary search between lo and hi bounds. | |
5903 | while test "x$ac_lo" != "x$ac_hi"; do | |
5904 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
ba479fd2 | 5905 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5906 | /* confdefs.h. */ |
5907 | _ACEOF | |
5908 | cat confdefs.h >>conftest.$ac_ext | |
5909 | cat >>conftest.$ac_ext <<_ACEOF | |
5910 | /* end confdefs.h. */ | |
bf3b7cd3 | 5911 | $ac_includes_default |
ba479fd2 NN |
5912 | int |
5913 | main () | |
5914 | { | |
bf3b7cd3 JD |
5915 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; |
5916 | test_array [0] = 0 | |
5917 | ||
ba479fd2 NN |
5918 | ; |
5919 | return 0; | |
5920 | } | |
5921 | _ACEOF | |
5922 | rm -f conftest.$ac_objext | |
5923 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5924 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5925 | ac_status=$? |
86da66b5 HPN |
5926 | grep -v '^ *+' conftest.er1 >conftest.err |
5927 | rm -f conftest.er1 | |
5928 | cat conftest.err >&5 | |
ba479fd2 NN |
5929 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5930 | (exit $ac_status); } && | |
d7974fe6 KC |
5931 | { ac_try='test -z "$ac_c_werror_flag" |
5932 | || test ! -s conftest.err' | |
86da66b5 HPN |
5933 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5934 | (eval $ac_try) 2>&5 | |
5935 | ac_status=$? | |
5936 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5937 | (exit $ac_status); }; } && | |
5938 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5939 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5940 | (eval $ac_try) 2>&5 | |
5941 | ac_status=$? | |
5942 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5943 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5944 | ac_hi=$ac_mid |
75e93faa | 5945 | else |
ba479fd2 NN |
5946 | echo "$as_me: failed program was:" >&5 |
5947 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5948 | ||
bf3b7cd3 | 5949 | ac_lo=`expr '(' $ac_mid ')' + 1` |
75e93faa | 5950 | fi |
86da66b5 | 5951 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 5952 | done |
bf3b7cd3 JD |
5953 | case $ac_lo in |
5954 | ?*) ac_cv_sizeof___int64=$ac_lo;; | |
5955 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 | |
5956 | See \`config.log' for more details." >&5 | |
5957 | echo "$as_me: error: cannot compute sizeof (__int64), 77 | |
5958 | See \`config.log' for more details." >&2;} | |
5959 | { (exit 1); exit 1; }; } ;; | |
5960 | esac | |
5961 | else | |
5962 | if test "$cross_compiling" = yes; then | |
d7974fe6 KC |
5963 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
5964 | See \`config.log' for more details." >&5 | |
5965 | echo "$as_me: error: cannot run test program while cross compiling | |
5966 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
5967 | { (exit 1); exit 1; }; } |
5968 | else | |
5969 | cat >conftest.$ac_ext <<_ACEOF | |
5970 | /* confdefs.h. */ | |
5971 | _ACEOF | |
5972 | cat confdefs.h >>conftest.$ac_ext | |
5973 | cat >>conftest.$ac_ext <<_ACEOF | |
5974 | /* end confdefs.h. */ | |
5975 | $ac_includes_default | |
5976 | long longval () { return (long) (sizeof (__int64)); } | |
5977 | unsigned long ulongval () { return (long) (sizeof (__int64)); } | |
5978 | #include <stdio.h> | |
5979 | #include <stdlib.h> | |
5980 | int | |
5981 | main () | |
5982 | { | |
414d23ae | 5983 | |
bf3b7cd3 JD |
5984 | FILE *f = fopen ("conftest.val", "w"); |
5985 | if (! f) | |
5986 | exit (1); | |
5987 | if (((long) (sizeof (__int64))) < 0) | |
5988 | { | |
5989 | long i = longval (); | |
5990 | if (i != ((long) (sizeof (__int64)))) | |
5991 | exit (1); | |
5992 | fprintf (f, "%ld\n", i); | |
5993 | } | |
5994 | else | |
5995 | { | |
5996 | unsigned long i = ulongval (); | |
5997 | if (i != ((long) (sizeof (__int64)))) | |
5998 | exit (1); | |
5999 | fprintf (f, "%lu\n", i); | |
6000 | } | |
6001 | exit (ferror (f) || fclose (f) != 0); | |
6002 | ||
6003 | ; | |
6004 | return 0; | |
6005 | } | |
6006 | _ACEOF | |
6007 | rm -f conftest$ac_exeext | |
6008 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6009 | (eval $ac_link) 2>&5 | |
6010 | ac_status=$? | |
6011 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6012 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6013 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6014 | (eval $ac_try) 2>&5 | |
6015 | ac_status=$? | |
6016 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6017 | (exit $ac_status); }; }; then | |
6018 | ac_cv_sizeof___int64=`cat conftest.val` | |
6019 | else | |
6020 | echo "$as_me: program exited with status $ac_status" >&5 | |
6021 | echo "$as_me: failed program was:" >&5 | |
6022 | sed 's/^/| /' conftest.$ac_ext >&5 | |
75e93faa | 6023 | |
bf3b7cd3 JD |
6024 | ( exit $ac_status ) |
6025 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 | |
6026 | See \`config.log' for more details." >&5 | |
6027 | echo "$as_me: error: cannot compute sizeof (__int64), 77 | |
6028 | See \`config.log' for more details." >&2;} | |
ba479fd2 | 6029 | { (exit 1); exit 1; }; } |
414d23ae | 6030 | fi |
bf3b7cd3 JD |
6031 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6032 | fi | |
6033 | fi | |
6034 | rm -f conftest.val | |
6035 | else | |
6036 | ac_cv_sizeof___int64=0 | |
6037 | fi | |
6038 | fi | |
ba479fd2 NN |
6039 | echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 |
6040 | echo "${ECHO_T}$ac_cv_sizeof___int64" >&6 | |
ba479fd2 | 6041 | cat >>confdefs.h <<_ACEOF |
414d23ae | 6042 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
ba479fd2 | 6043 | _ACEOF |
414d23ae | 6044 | |
cafe096b | 6045 | |
414d23ae HPN |
6046 | fi |
6047 | ||
5ec1c5e6 | 6048 | |
34a86c2b NN |
6049 | # --------------------- |
6050 | # Warnings and checking | |
6051 | # --------------------- | |
6052 | ||
b5472e1d NN |
6053 | # Check $CC warning features (if it's GCC). |
6054 | # We want to use -pedantic, but we don't want warnings about | |
6055 | # * 'long long' | |
6056 | # * variadic macros | |
6057 | # So, we only use -pedantic if we can disable those warnings. | |
6058 | ||
6059 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5 | |
6060 | echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6 | |
6061 | if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then | |
6062 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6063 | else | |
6064 | save_CFLAGS="$CFLAGS" | |
6065 | CFLAGS="-Wno-long-long" | |
6066 | cat >conftest.$ac_ext <<_ACEOF | |
6067 | /* confdefs.h. */ | |
6068 | _ACEOF | |
6069 | cat confdefs.h >>conftest.$ac_ext | |
6070 | cat >>conftest.$ac_ext <<_ACEOF | |
6071 | /* end confdefs.h. */ | |
6072 | ||
6073 | _ACEOF | |
6074 | rm -f conftest.$ac_objext | |
6075 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6076 | (eval $ac_compile) 2>conftest.er1 | |
6077 | ac_status=$? | |
6078 | grep -v '^ *+' conftest.er1 >conftest.err | |
6079 | rm -f conftest.er1 | |
6080 | cat conftest.err >&5 | |
6081 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6082 | (exit $ac_status); } && | |
d7974fe6 KC |
6083 | { ac_try='test -z "$ac_c_werror_flag" |
6084 | || test ! -s conftest.err' | |
b5472e1d NN |
6085 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6086 | (eval $ac_try) 2>&5 | |
6087 | ac_status=$? | |
6088 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6089 | (exit $ac_status); }; } && | |
6090 | { ac_try='test -s conftest.$ac_objext' | |
6091 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6092 | (eval $ac_try) 2>&5 | |
6093 | ac_status=$? | |
6094 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6095 | (exit $ac_status); }; }; then | |
6096 | ac_cv_prog_cc_w_no_long_long=yes | |
6097 | else | |
6098 | echo "$as_me: failed program was:" >&5 | |
6099 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6100 | ||
6101 | ac_cv_prog_cc_w_no_long_long=no | |
6102 | fi | |
6103 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6104 | CFLAGS="$save_CFLAGS" | |
6105 | ||
6106 | fi | |
6107 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5 | |
6108 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6 | |
6109 | ||
6110 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5 | |
6111 | echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6 | |
6112 | if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then | |
6113 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6114 | else | |
6115 | save_CFLAGS="$CFLAGS" | |
6116 | CFLAGS="-Wno-variadic-macros" | |
6117 | cat >conftest.$ac_ext <<_ACEOF | |
6118 | /* confdefs.h. */ | |
6119 | _ACEOF | |
6120 | cat confdefs.h >>conftest.$ac_ext | |
6121 | cat >>conftest.$ac_ext <<_ACEOF | |
6122 | /* end confdefs.h. */ | |
6123 | ||
6124 | _ACEOF | |
6125 | rm -f conftest.$ac_objext | |
6126 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6127 | (eval $ac_compile) 2>conftest.er1 | |
6128 | ac_status=$? | |
6129 | grep -v '^ *+' conftest.er1 >conftest.err | |
6130 | rm -f conftest.er1 | |
6131 | cat conftest.err >&5 | |
6132 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6133 | (exit $ac_status); } && | |
d7974fe6 KC |
6134 | { ac_try='test -z "$ac_c_werror_flag" |
6135 | || test ! -s conftest.err' | |
b5472e1d NN |
6136 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6137 | (eval $ac_try) 2>&5 | |
6138 | ac_status=$? | |
6139 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6140 | (exit $ac_status); }; } && | |
6141 | { ac_try='test -s conftest.$ac_objext' | |
6142 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6143 | (eval $ac_try) 2>&5 | |
6144 | ac_status=$? | |
6145 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6146 | (exit $ac_status); }; }; then | |
6147 | ac_cv_prog_cc_w_no_variadic_macros=yes | |
6148 | else | |
6149 | echo "$as_me: failed program was:" >&5 | |
6150 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6151 | ||
6152 | ac_cv_prog_cc_w_no_variadic_macros=no | |
6153 | fi | |
6154 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6155 | CFLAGS="$save_CFLAGS" | |
6156 | ||
6157 | fi | |
6158 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5 | |
6159 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6 | |
6160 | ||
34a86c2b | 6161 | strict1_warn= |
b5472e1d NN |
6162 | if test $ac_cv_prog_cc_w_no_long_long = yes \ |
6163 | && test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then | |
6164 | strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros" | |
34a86c2b NN |
6165 | fi |
6166 | ||
6167 | ||
643d3bd2 NN |
6168 | # Add -Wold-style-definition if it's accepted |
6169 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5 | |
6170 | echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6 | |
6171 | if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then | |
6172 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6173 | else | |
6174 | save_CFLAGS="$CFLAGS" | |
6175 | CFLAGS="-Wold-style-definition" | |
6176 | cat >conftest.$ac_ext <<_ACEOF | |
6177 | /* confdefs.h. */ | |
6178 | _ACEOF | |
6179 | cat confdefs.h >>conftest.$ac_ext | |
6180 | cat >>conftest.$ac_ext <<_ACEOF | |
6181 | /* end confdefs.h. */ | |
6182 | ||
6183 | _ACEOF | |
6184 | rm -f conftest.$ac_objext | |
6185 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6186 | (eval $ac_compile) 2>conftest.er1 | |
6187 | ac_status=$? | |
6188 | grep -v '^ *+' conftest.er1 >conftest.err | |
6189 | rm -f conftest.er1 | |
6190 | cat conftest.err >&5 | |
6191 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6192 | (exit $ac_status); } && | |
d7974fe6 KC |
6193 | { ac_try='test -z "$ac_c_werror_flag" |
6194 | || test ! -s conftest.err' | |
643d3bd2 NN |
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); }; } && | |
6200 | { ac_try='test -s conftest.$ac_objext' | |
6201 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6202 | (eval $ac_try) 2>&5 | |
6203 | ac_status=$? | |
6204 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6205 | (exit $ac_status); }; }; then | |
6206 | ac_cv_prog_cc_w_old_style_definition=yes | |
6207 | else | |
6208 | echo "$as_me: failed program was:" >&5 | |
6209 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6210 | ||
6211 | ac_cv_prog_cc_w_old_style_definition=no | |
6212 | fi | |
6213 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6214 | CFLAGS="$save_CFLAGS" | |
6215 | ||
6216 | fi | |
6217 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5 | |
6218 | echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6 | |
6219 | if test $ac_cv_prog_cc_w_old_style_definition = yes ; then | |
6220 | strict1_warn="${strict1_warn} -Wold-style-definition" | |
6221 | fi | |
6222 | ||
09a9c095 NN |
6223 | # Enable -Werror, period. |
6224 | # Check whether --enable-werror_always or --disable-werror_always was given. | |
6225 | if test "${enable_werror_always+set}" = set; then | |
6226 | enableval="$enable_werror_always" | |
6227 | ||
6228 | else | |
6229 | enable_werror_always=no | |
6230 | fi; | |
6231 | if test x${enable_werror_always} = xyes ; then | |
6232 | strict1_warn="${strict1_warn} -Werror" | |
6233 | WERROR=-Werror | |
6234 | fi | |
6235 | ||
ba479fd2 | 6236 | # If the native compiler is GCC, we can enable warnings even in stage1. |
414d23ae HPN |
6237 | # That's useful for people building cross-compilers, or just running a |
6238 | # quick `make'. | |
6239 | warn_cflags= | |
6240 | if test "x$GCC" = "xyes"; then | |
6241 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
6242 | fi | |
6243 | ||
6244 | ||
dd859b8a | 6245 | # Enable -Werror in bootstrap stage2 and later. |
a1286ef5 ZW |
6246 | is_release= |
6247 | if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then | |
6248 | is_release=yes | |
6249 | fi | |
dd859b8a KG |
6250 | # Check whether --enable-werror or --disable-werror was given. |
6251 | if test "${enable_werror+set}" = set; then | |
6252 | enableval="$enable_werror" | |
ba479fd2 | 6253 | |
dd859b8a | 6254 | else |
06c37c96 NS |
6255 | if test x$is_release = x ; then |
6256 | # Default to "yes" on development branches. | |
dd859b8a | 6257 | enable_werror=yes |
06c37c96 NS |
6258 | else |
6259 | # Default to "no" on release branches. | |
6260 | enable_werror=no | |
6261 | fi | |
ba479fd2 | 6262 | fi; |
dd859b8a KG |
6263 | if test x$enable_werror = xyes ; then |
6264 | WERROR=-Werror | |
6265 | fi | |
6266 | ||
6267 | ||
414d23ae HPN |
6268 | # Enable expensive internal checks |
6269 | # Check whether --enable-checking or --disable-checking was given. | |
6270 | if test "${enable_checking+set}" = set; then | |
6271 | enableval="$enable_checking" | |
e1bbfc5c NS |
6272 | ac_checking_flags="${enableval}" |
6273 | else | |
6274 | ||
6275 | # Determine the default checks. | |
6276 | if test x$is_release = x ; then | |
6277 | ac_checking_flags=yes | |
6278 | else | |
6279 | ac_checking_flags=release | |
6280 | fi | |
6281 | fi; | |
6282 | ac_assert_checking=1 | |
6283 | ac_checking= | |
cdce5c16 NS |
6284 | ac_fold_checking= |
6285 | ac_gc_checking= | |
6286 | ac_gc_always_collect= | |
414d23ae HPN |
6287 | ac_rtl_checking= |
6288 | ac_rtlflag_checking= | |
b53ef395 | 6289 | ac_runtime_checking=1 |
cdce5c16 NS |
6290 | ac_tree_checking= |
6291 | ac_valgrind_checking= | |
e1bbfc5c NS |
6292 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," |
6293 | for check in $ac_checking_flags | |
6294 | do | |
6295 | case $check in | |
cdce5c16 | 6296 | # these set all the flags to specific states |
e1bbfc5c | 6297 | yes) ac_assert_checking=1 ; ac_checking=1 ; |
cdce5c16 NS |
6298 | ac_fold_checking= ; ac_gc_checking=1 ; |
6299 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 6300 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; |
cdce5c16 NS |
6301 | ac_tree_checking=1 ; ac_valgrind_checking= ;; |
6302 | no|none) ac_assert_checking= ; ac_checking= ; | |
6303 | ac_fold_checking= ; ac_gc_checking= ; | |
6304 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 6305 | ac_rtlflag_checking= ; ac_runtime_checking= ; |
cdce5c16 | 6306 | ac_tree_checking= ; ac_valgrind_checking= ;; |
e1bbfc5c | 6307 | all) ac_assert_checking=1 ; ac_checking=1 ; |
cdce5c16 NS |
6308 | ac_fold_checking=1 ; ac_gc_checking=1 ; |
6309 | ac_gc_always_collect=1 ; ac_rtl_checking=1 ; | |
6310 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; | |
6311 | ac_tree_checking=1 ; ac_valgrind_checking= ;; | |
6312 | release) ac_assert_checking=1 ; ac_checking= ; | |
6313 | ac_fold_checking= ; ac_gc_checking= ; | |
6314 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
6315 | ac_rtlflag_checking= ; ac_runtime_checking=1 ; | |
6316 | ac_tree_checking= ; ac_valgrind_checking= ;; | |
6317 | # these enable particular checks | |
e1bbfc5c NS |
6318 | assert) ac_assert_checking=1 ;; |
6319 | fold) ac_fold_checking=1 ;; | |
6320 | gc) ac_gc_checking=1 ;; | |
6321 | gcac) ac_gc_always_collect=1 ;; | |
6322 | misc) ac_checking=1 ;; | |
e1bbfc5c | 6323 | rtl) ac_rtl_checking=1 ;; |
cdce5c16 | 6324 | rtlflag) ac_rtlflag_checking=1 ;; |
b53ef395 | 6325 | runtime) ac_runtime_checking=1 ;; |
e1bbfc5c | 6326 | tree) ac_tree_checking=1 ;; |
cdce5c16 | 6327 | valgrind) ac_valgrind_checking=1 ;; |
e1bbfc5c | 6328 | *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 |
ba479fd2 NN |
6329 | echo "$as_me: error: unknown check category $check" >&2;} |
6330 | { (exit 1); exit 1; }; } ;; | |
e1bbfc5c NS |
6331 | esac |
6332 | done | |
6333 | IFS="$ac_save_IFS" | |
06c37c96 | 6334 | |
ba479fd2 NN |
6335 | nocommon_flag="" |
6336 | if test x$ac_checking != x ; then | |
6337 | ||
6338 | cat >>confdefs.h <<\_ACEOF | |
6339 | #define ENABLE_CHECKING 1 | |
6340 | _ACEOF | |
6341 | ||
6342 | nocommon_flag=-fno-common | |
6343 | fi | |
6344 | ||
06c37c96 NS |
6345 | if test x$ac_assert_checking != x ; then |
6346 | ||
6347 | cat >>confdefs.h <<\_ACEOF | |
6348 | #define ENABLE_ASSERT_CHECKING 1 | |
6349 | _ACEOF | |
6350 | ||
b53ef395 | 6351 | fi |
232b67d9 | 6352 | |
b53ef395 NS |
6353 | if test x$ac_runtime_checking != x ; then |
6354 | ||
6355 | cat >>confdefs.h <<\_ACEOF | |
6356 | #define ENABLE_RUNTIME_CHECKING 1 | |
6357 | _ACEOF | |
6358 | ||
06c37c96 | 6359 | fi |
ba479fd2 NN |
6360 | if test x$ac_tree_checking != x ; then |
6361 | ||
6362 | cat >>confdefs.h <<\_ACEOF | |
6363 | #define ENABLE_TREE_CHECKING 1 | |
6364 | _ACEOF | |
6365 | ||
13f05fd0 | 6366 | TREEBROWSER=tree-browser.o |
ba479fd2 | 6367 | fi |
13f05fd0 | 6368 | |
ba479fd2 NN |
6369 | if test x$ac_rtl_checking != x ; then |
6370 | ||
6371 | cat >>confdefs.h <<\_ACEOF | |
6372 | #define ENABLE_RTL_CHECKING 1 | |
6373 | _ACEOF | |
6374 | ||
6375 | fi | |
6376 | if test x$ac_rtlflag_checking != x ; then | |
6377 | ||
6378 | cat >>confdefs.h <<\_ACEOF | |
6379 | #define ENABLE_RTL_FLAG_CHECKING 1 | |
6380 | _ACEOF | |
6381 | ||
6382 | fi | |
6383 | if test x$ac_gc_checking != x ; then | |
6384 | ||
6385 | cat >>confdefs.h <<\_ACEOF | |
6386 | #define ENABLE_GC_CHECKING 1 | |
6387 | _ACEOF | |
6388 | ||
6389 | fi | |
6390 | if test x$ac_gc_always_collect != x ; then | |
6391 | ||
6392 | cat >>confdefs.h <<\_ACEOF | |
6393 | #define ENABLE_GC_ALWAYS_COLLECT 1 | |
6394 | _ACEOF | |
6395 | ||
6396 | fi | |
6397 | if test x$ac_fold_checking != x ; then | |
6398 | ||
6399 | cat >>confdefs.h <<\_ACEOF | |
6400 | #define ENABLE_FOLD_CHECKING 1 | |
6401 | _ACEOF | |
6402 | ||
6403 | fi | |
6404 | valgrind_path_defines= | |
6405 | valgrind_command= | |
6406 | ||
ba479fd2 NN |
6407 | if test "${ac_cv_header_valgrind_h+set}" = set; then |
6408 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
6409 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
6410 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
6411 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6412 | fi | |
6413 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 | |
6414 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
6415 | else | |
6416 | # Is the header compilable? | |
6417 | echo "$as_me:$LINENO: checking valgrind.h usability" >&5 | |
6418 | echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6 | |
6419 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6420 | /* confdefs.h. */ |
6421 | _ACEOF | |
6422 | cat confdefs.h >>conftest.$ac_ext | |
6423 | cat >>conftest.$ac_ext <<_ACEOF | |
6424 | /* end confdefs.h. */ | |
6425 | $ac_includes_default | |
63cf211a | 6426 | #include <valgrind.h> |
ba479fd2 NN |
6427 | _ACEOF |
6428 | rm -f conftest.$ac_objext | |
6429 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 6430 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 6431 | ac_status=$? |
86da66b5 HPN |
6432 | grep -v '^ *+' conftest.er1 >conftest.err |
6433 | rm -f conftest.er1 | |
6434 | cat conftest.err >&5 | |
ba479fd2 NN |
6435 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6436 | (exit $ac_status); } && | |
d7974fe6 KC |
6437 | { ac_try='test -z "$ac_c_werror_flag" |
6438 | || test ! -s conftest.err' | |
86da66b5 HPN |
6439 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6440 | (eval $ac_try) 2>&5 | |
6441 | ac_status=$? | |
6442 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6443 | (exit $ac_status); }; } && | |
6444 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
6445 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6446 | (eval $ac_try) 2>&5 | |
6447 | ac_status=$? | |
6448 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6449 | (exit $ac_status); }; }; then | |
6450 | ac_header_compiler=yes | |
6451 | else | |
6452 | echo "$as_me: failed program was:" >&5 | |
6453 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6454 | ||
6455 | ac_header_compiler=no | |
6456 | fi | |
86da66b5 | 6457 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
6458 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 |
6459 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
6460 | ||
6461 | # Is the header present? | |
6462 | echo "$as_me:$LINENO: checking valgrind.h presence" >&5 | |
6463 | echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6 | |
6464 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6465 | /* confdefs.h. */ |
6466 | _ACEOF | |
6467 | cat confdefs.h >>conftest.$ac_ext | |
6468 | cat >>conftest.$ac_ext <<_ACEOF | |
6469 | /* end confdefs.h. */ | |
6470 | #include <valgrind.h> | |
6471 | _ACEOF | |
6472 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6473 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6474 | ac_status=$? | |
6475 | grep -v '^ *+' conftest.er1 >conftest.err | |
6476 | rm -f conftest.er1 | |
6477 | cat conftest.err >&5 | |
6478 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6479 | (exit $ac_status); } >/dev/null; then | |
6480 | if test -s conftest.err; then | |
6481 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6482 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6483 | else |
6484 | ac_cpp_err= | |
6485 | fi | |
6486 | else | |
6487 | ac_cpp_err=yes | |
6488 | fi | |
6489 | if test -z "$ac_cpp_err"; then | |
6490 | ac_header_preproc=yes | |
6491 | else | |
6492 | echo "$as_me: failed program was:" >&5 | |
6493 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6494 | ||
6495 | ac_header_preproc=no | |
6496 | fi | |
6497 | rm -f conftest.err conftest.$ac_ext | |
6498 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
6499 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
6500 | ||
6501 | # So? What about this header? | |
86da66b5 HPN |
6502 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in |
6503 | yes:no: ) | |
ba479fd2 NN |
6504 | { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 |
6505 | echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
86da66b5 HPN |
6506 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5 |
6507 | echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;} | |
6508 | ac_header_preproc=yes | |
ba479fd2 | 6509 | ;; |
86da66b5 | 6510 | no:yes:* ) |
ba479fd2 NN |
6511 | { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 |
6512 | echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} | |
86da66b5 HPN |
6513 | { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 |
6514 | echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} | |
6515 | { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5 | |
6516 | echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;} | |
6517 | { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5 | |
6518 | echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;} | |
ba479fd2 NN |
6519 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 |
6520 | echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} | |
86da66b5 HPN |
6521 | { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 |
6522 | echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;} | |
ba479fd2 NN |
6523 | ( |
6524 | cat <<\_ASBOX | |
86da66b5 HPN |
6525 | ## ------------------------------------------ ## |
6526 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
6527 | ## ------------------------------------------ ## | |
ba479fd2 NN |
6528 | _ASBOX |
6529 | ) | | |
6530 | sed "s/^/$as_me: WARNING: /" >&2 | |
6531 | ;; | |
6532 | esac | |
6533 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
6534 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
6535 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
6536 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6537 | else | |
6538 | ac_cv_header_valgrind_h=$ac_header_preproc | |
6938ec6c | 6539 | fi |
ba479fd2 NN |
6540 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 |
6541 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
6542 | ||
6e3f3080 | 6543 | fi |
ba479fd2 | 6544 | if test $ac_cv_header_valgrind_h = yes; then |
6938ec6c NN |
6545 | have_valgrind_h=yes |
6546 | else | |
ba479fd2 | 6547 | have_valgrind_h=no |
6938ec6c NN |
6548 | fi |
6549 | ||
6550 | ||
ba479fd2 | 6551 | |
cdce5c16 | 6552 | if test x$ac_valgrind_checking != x ; then |
414d23ae HPN |
6553 | # It is certainly possible that there's valgrind but no valgrind.h. |
6554 | # GCC relies on making annotations so we must have both. | |
ba479fd2 NN |
6555 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 |
6556 | echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6 | |
6557 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6558 | /* confdefs.h. */ |
6559 | _ACEOF | |
6560 | cat confdefs.h >>conftest.$ac_ext | |
6561 | cat >>conftest.$ac_ext <<_ACEOF | |
6562 | /* end confdefs.h. */ | |
a207b594 | 6563 | #include <valgrind/memcheck.h> |
14011ca4 AJ |
6564 | #ifndef VALGRIND_DISCARD |
6565 | #error VALGRIND_DISCARD not defined | |
6566 | #endif | |
ba479fd2 NN |
6567 | _ACEOF |
6568 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6569 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6570 | ac_status=$? | |
6571 | grep -v '^ *+' conftest.er1 >conftest.err | |
6572 | rm -f conftest.er1 | |
6573 | cat conftest.err >&5 | |
6574 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6575 | (exit $ac_status); } >/dev/null; then | |
6576 | if test -s conftest.err; then | |
6577 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6578 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6579 | else |
6580 | ac_cpp_err= | |
6581 | fi | |
6582 | else | |
6583 | ac_cpp_err=yes | |
6584 | fi | |
6585 | if test -z "$ac_cpp_err"; then | |
a207b594 HPN |
6586 | gcc_cv_header_valgrind_memcheck_h=yes |
6587 | else | |
ba479fd2 NN |
6588 | echo "$as_me: failed program was:" >&5 |
6589 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6590 | ||
a207b594 HPN |
6591 | gcc_cv_header_valgrind_memcheck_h=no |
6592 | fi | |
ba479fd2 NN |
6593 | rm -f conftest.err conftest.$ac_ext |
6594 | echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5 | |
6595 | echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6 | |
6596 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 | |
6597 | echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6 | |
6598 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6599 | /* confdefs.h. */ |
6600 | _ACEOF | |
6601 | cat confdefs.h >>conftest.$ac_ext | |
6602 | cat >>conftest.$ac_ext <<_ACEOF | |
6603 | /* end confdefs.h. */ | |
a207b594 HPN |
6604 | #include <memcheck.h> |
6605 | #ifndef VALGRIND_DISCARD | |
6606 | #error VALGRIND_DISCARD not defined | |
6607 | #endif | |
ba479fd2 NN |
6608 | _ACEOF |
6609 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6610 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6611 | ac_status=$? | |
6612 | grep -v '^ *+' conftest.er1 >conftest.err | |
6613 | rm -f conftest.er1 | |
6614 | cat conftest.err >&5 | |
6615 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6616 | (exit $ac_status); } >/dev/null; then | |
6617 | if test -s conftest.err; then | |
6618 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6619 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6620 | else |
6621 | ac_cpp_err= | |
6622 | fi | |
6623 | else | |
6624 | ac_cpp_err=yes | |
6625 | fi | |
6626 | if test -z "$ac_cpp_err"; then | |
14011ca4 AJ |
6627 | gcc_cv_header_memcheck_h=yes |
6628 | else | |
ba479fd2 NN |
6629 | echo "$as_me: failed program was:" >&5 |
6630 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6631 | ||
cafe096b EC |
6632 | gcc_cv_header_memcheck_h=no |
6633 | fi | |
ba479fd2 NN |
6634 | rm -f conftest.err conftest.$ac_ext |
6635 | echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5 | |
6636 | echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6 | |
6637 | ||
56694dd9 ZW |
6638 | # Prepare PATH_SEPARATOR. |
6639 | # The user is always right. | |
6640 | if test "${PATH_SEPARATOR+set}" != set; then | |
6641 | echo "#! /bin/sh" >conf$$.sh | |
6642 | echo "exit 0" >>conf$$.sh | |
6643 | chmod +x conf$$.sh | |
6644 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6645 | PATH_SEPARATOR=';' | |
6646 | else | |
6647 | PATH_SEPARATOR=: | |
6648 | fi | |
6649 | rm -f conf$$.sh | |
6650 | fi | |
6651 | ||
6652 | # Find out how to test for executable files. Don't use a zero-byte file, | |
6653 | # as systems may use methods other than mode bits to determine executability. | |
6654 | cat >conf$$.file <<_ASEOF | |
6655 | #! /bin/sh | |
6656 | exit 0 | |
6657 | _ASEOF | |
6658 | chmod +x conf$$.file | |
6659 | if test -x conf$$.file >/dev/null 2>&1; then | |
6660 | ac_executable_p="test -x" | |
6661 | else | |
6662 | ac_executable_p="test -f" | |
6663 | fi | |
6664 | rm -f conf$$.file | |
6665 | ||
6666 | # Extract the first word of "valgrind", so it can be a program name with args. | |
414d23ae | 6667 | set dummy valgrind; ac_word=$2 |
ba479fd2 NN |
6668 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
6669 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
6670 | if test "${ac_cv_path_valgrind_path+set}" = set; then | |
6671 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
6672 | else |
6673 | case "$valgrind_path" in | |
56694dd9 ZW |
6674 | [\\/]* | ?:[\\/]*) |
6675 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
6676 | ;; | |
414d23ae | 6677 | *) |
56694dd9 ZW |
6678 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR |
6679 | for ac_dir in $PATH; do | |
6680 | IFS="$ac_save_IFS" | |
6681 | test -z "$ac_dir" && ac_dir=. | |
6682 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6683 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
6684 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
6685 | ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext" | |
6686 | break 2 | |
6687 | fi | |
6688 | fi | |
6689 | done | |
6690 | done | |
6691 | IFS="$ac_save_IFS" | |
6692 | ;; | |
414d23ae | 6693 | esac |
75e93faa | 6694 | fi |
414d23ae HPN |
6695 | valgrind_path="$ac_cv_path_valgrind_path" |
6696 | if test -n "$valgrind_path"; then | |
ba479fd2 NN |
6697 | echo "$as_me:$LINENO: result: $valgrind_path" >&5 |
6698 | echo "${ECHO_T}$valgrind_path" >&6 | |
414d23ae | 6699 | else |
ba479fd2 NN |
6700 | echo "$as_me:$LINENO: result: no" >&5 |
6701 | echo "${ECHO_T}no" >&6 | |
414d23ae HPN |
6702 | fi |
6703 | ||
a207b594 HPN |
6704 | if test "x$valgrind_path" = "x" \ |
6705 | || (test $have_valgrind_h = no \ | |
6706 | && test $gcc_cv_header_memcheck_h = no \ | |
6707 | && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
ba479fd2 NN |
6708 | { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5 |
6709 | echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;} | |
6710 | { (exit 1); exit 1; }; } | |
414d23ae HPN |
6711 | fi |
6712 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
6713 | valgrind_command="$valgrind_path -q" | |
ba479fd2 NN |
6714 | |
6715 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 6716 | #define ENABLE_VALGRIND_CHECKING 1 |
ba479fd2 | 6717 | _ACEOF |
75e93faa | 6718 | |
a207b594 | 6719 | if test $gcc_cv_header_valgrind_memcheck_h = yes; then |
ba479fd2 NN |
6720 | |
6721 | cat >>confdefs.h <<\_ACEOF | |
a207b594 | 6722 | #define HAVE_VALGRIND_MEMCHECK_H 1 |
ba479fd2 | 6723 | _ACEOF |
a207b594 HPN |
6724 | |
6725 | fi | |
14011ca4 | 6726 | if test $gcc_cv_header_memcheck_h = yes; then |
ba479fd2 NN |
6727 | |
6728 | cat >>confdefs.h <<\_ACEOF | |
14011ca4 | 6729 | #define HAVE_MEMCHECK_H 1 |
ba479fd2 | 6730 | _ACEOF |
14011ca4 AJ |
6731 | |
6732 | fi | |
414d23ae | 6733 | fi |
75e93faa | 6734 | |
75e93faa ZW |
6735 | |
6736 | ||
74ee1642 PB |
6737 | # Check whether --enable-mapped-location or --disable-mapped-location was given. |
6738 | if test "${enable_mapped_location+set}" = set; then | |
6739 | enableval="$enable_mapped_location" | |
6740 | ||
6741 | else | |
6742 | enable_mapped_location=no | |
6743 | fi; | |
6744 | ||
6745 | if test "$enable_mapped_location" = yes ; then | |
6746 | ||
6747 | cat >>confdefs.h <<\_ACEOF | |
6748 | #define USE_MAPPED_LOCATION 1 | |
6749 | _ACEOF | |
6750 | ||
6751 | fi | |
6752 | ||
414d23ae HPN |
6753 | # Enable code coverage collection |
6754 | # Check whether --enable-coverage or --disable-coverage was given. | |
6755 | if test "${enable_coverage+set}" = set; then | |
6756 | enableval="$enable_coverage" | |
6757 | case "${enableval}" in | |
6dd297da NN |
6758 | yes|noopt) |
6759 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" | |
6760 | ;; | |
6761 | opt) | |
6762 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" | |
6763 | ;; | |
6764 | no) | |
6765 | # a.k.a. --disable-coverage | |
6766 | coverage_flags="" | |
6767 | ;; | |
6768 | *) | |
6769 | { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5 | |
ba479fd2 NN |
6770 | echo "$as_me: error: unknown coverage setting $enableval" >&2;} |
6771 | { (exit 1); exit 1; }; } | |
6dd297da | 6772 | ;; |
414d23ae | 6773 | esac |
75e93faa | 6774 | else |
414d23ae | 6775 | coverage_flags="" |
ba479fd2 | 6776 | fi; |
5c3bc9fb | 6777 | |
414d23ae | 6778 | |
439a7e54 DN |
6779 | # Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given. |
6780 | if test "${enable_gather_detailed_mem_stats+set}" = set; then | |
6781 | enableval="$enable_gather_detailed_mem_stats" | |
ba479fd2 | 6782 | |
439a7e54 DN |
6783 | else |
6784 | enable_gather_detailed_mem_stats=no | |
ba479fd2 | 6785 | fi; |
439a7e54 | 6786 | if test x$enable_gather_detailed_mem_stats = xyes ; then |
ba479fd2 NN |
6787 | |
6788 | cat >>confdefs.h <<\_ACEOF | |
439a7e54 | 6789 | #define GATHER_STATISTICS 1 |
ba479fd2 | 6790 | _ACEOF |
439a7e54 DN |
6791 | |
6792 | fi | |
6793 | ||
73458fb7 NN |
6794 | # ------------------------------- |
6795 | # Miscenalleous configure options | |
6796 | # ------------------------------- | |
34a86c2b NN |
6797 | |
6798 | # With stabs | |
ba479fd2 | 6799 | |
34a86c2b NN |
6800 | # Check whether --with-stabs or --without-stabs was given. |
6801 | if test "${with_stabs+set}" = set; then | |
6802 | withval="$with_stabs" | |
6803 | stabs="$with_stabs" | |
6804 | else | |
6805 | stabs=no | |
ba479fd2 | 6806 | fi; |
cafe096b | 6807 | |
34a86c2b NN |
6808 | # Determine whether or not multilibs are enabled. |
6809 | # Check whether --enable-multilib or --disable-multilib was given. | |
6810 | if test "${enable_multilib+set}" = set; then | |
6811 | enableval="$enable_multilib" | |
ba479fd2 | 6812 | |
34a86c2b NN |
6813 | else |
6814 | enable_multilib=yes | |
ba479fd2 | 6815 | fi; |
75e93faa | 6816 | |
34a86c2b | 6817 | |
414d23ae HPN |
6818 | # Enable __cxa_atexit for C++. |
6819 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. | |
6820 | if test "${enable___cxa_atexit+set}" = set; then | |
6821 | enableval="$enable___cxa_atexit" | |
75e93faa | 6822 | |
ba479fd2 | 6823 | fi; |
75e93faa | 6824 | |
414d23ae HPN |
6825 | # Enable threads |
6826 | # Pass with no value to take the default | |
6827 | # Pass with a value to specify a thread package | |
6828 | # Check whether --enable-threads or --disable-threads was given. | |
6829 | if test "${enable_threads+set}" = set; then | |
6830 | enableval="$enable_threads" | |
ba479fd2 | 6831 | |
414d23ae HPN |
6832 | else |
6833 | enable_threads='' | |
ba479fd2 | 6834 | fi; |
414d23ae HPN |
6835 | |
6836 | # Check whether --enable-objc-gc or --disable-objc-gc was given. | |
6837 | if test "${enable_objc_gc+set}" = set; then | |
6838 | enableval="$enable_objc_gc" | |
6839 | if test x$enable_objc_gc = xno; then | |
6840 | objc_boehm_gc='' | |
6841 | else | |
6842 | objc_boehm_gc=1 | |
6843 | fi | |
6844 | else | |
6845 | objc_boehm_gc='' | |
ba479fd2 | 6846 | fi; |
75e93faa ZW |
6847 | |
6848 | ||
414d23ae HPN |
6849 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
6850 | if test "${with_dwarf2+set}" = set; then | |
6851 | withval="$with_dwarf2" | |
6852 | dwarf2="$with_dwarf2" | |
75e93faa | 6853 | else |
414d23ae | 6854 | dwarf2=no |
ba479fd2 | 6855 | fi; |
75e93faa | 6856 | |
414d23ae HPN |
6857 | # Check whether --enable-shared or --disable-shared was given. |
6858 | if test "${enable_shared+set}" = set; then | |
6859 | enableval="$enable_shared" | |
ba479fd2 | 6860 | |
414d23ae HPN |
6861 | case $enable_shared in |
6862 | yes | no) ;; | |
6863 | *) | |
6864 | enable_shared=no | |
6865 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
6866 | for pkg in $enableval; do | |
6867 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
6868 | enable_shared=yes | |
6869 | fi | |
6870 | done | |
6871 | IFS="$ac_save_ifs" | |
6872 | ;; | |
6873 | esac | |
6874 | ||
75e93faa | 6875 | else |
414d23ae | 6876 | enable_shared=yes |
ba479fd2 | 6877 | fi; |
75e93faa | 6878 | |
75e93faa | 6879 | |
75e93faa | 6880 | |
4977bab6 ZW |
6881 | # Check whether --with-sysroot or --without-sysroot was given. |
6882 | if test "${with_sysroot+set}" = set; then | |
6883 | withval="$with_sysroot" | |
ba479fd2 | 6884 | |
4977bab6 | 6885 | case ${with_sysroot} in |
caa55b1e | 6886 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; |
4977bab6 ZW |
6887 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
6888 | esac | |
ba479fd2 | 6889 | |
4977bab6 ZW |
6890 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
6891 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)' | |
6892 | ||
047d636f DJ |
6893 | if test "x$exec_prefix" = xNONE; then |
6894 | if test "x$prefix" = xNONE; then | |
6895 | test_prefix=/usr/local | |
6896 | else | |
6897 | test_prefix=$prefix | |
6898 | fi | |
6899 | else | |
6900 | test_prefix=$exec_prefix | |
6901 | fi | |
6902 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 AO |
6903 | "${test_prefix}"|"${test_prefix}/"*|\ |
6904 | '${exec_prefix}'|'${exec_prefix}/'*) | |
047d636f DJ |
6905 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
6906 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
6907 | ;; | |
6908 | esac | |
6909 | ||
4977bab6 | 6910 | else |
ba479fd2 | 6911 | |
4977bab6 | 6912 | TARGET_SYSTEM_ROOT= |
db720d9a | 6913 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
6914 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
6915 | ||
ba479fd2 | 6916 | fi; |
4977bab6 ZW |
6917 | |
6918 | ||
6919 | ||
6920 | ||
d1bd0ded | 6921 | # Build with intermodule optimisations |
d1bd0ded GK |
6922 | # Check whether --enable-intermodule or --disable-intermodule was given. |
6923 | if test "${enable_intermodule+set}" = set; then | |
6924 | enableval="$enable_intermodule" | |
0c46c5c7 KC |
6925 | case ${enable_intermodule} in |
6926 | yes) onestep="-onestep";; | |
6927 | *) onestep="";; | |
d1bd0ded | 6928 | esac |
0c46c5c7 KC |
6929 | else |
6930 | onestep="" | |
ba479fd2 | 6931 | fi; |
d1bd0ded GK |
6932 | |
6933 | ||
f3c9f174 NN |
6934 | # Sanity check enable_languages in case someone does not run the toplevel |
6935 | # configure # script. | |
6936 | # Check whether --enable-languages or --disable-languages was given. | |
6937 | if test "${enable_languages+set}" = set; then | |
6938 | enableval="$enable_languages" | |
6939 | case ,${enable_languages}, in | |
6940 | ,,|,yes,) | |
6941 | # go safe -- we cannot be much sure without the toplevel | |
6942 | # configure's | |
6943 | # analysis of which target libs are present and usable | |
6944 | enable_languages=c | |
6945 | ;; | |
6946 | *,all,*) | |
6947 | { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5 | |
6948 | echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;} | |
6949 | { (exit 1); exit 1; }; } | |
6950 | ;; | |
6951 | *,c,*) | |
6952 | ;; | |
6953 | *) | |
6954 | enable_languages=c,${enable_languages} | |
6955 | ;; | |
6956 | esac | |
6957 | else | |
6958 | enable_languages=c | |
6959 | fi; | |
6960 | ||
6961 | subdirs= | |
6962 | for lang in ${srcdir}/*/config-lang.in | |
6963 | do | |
6964 | case $lang in | |
6965 | # The odd quoting in the next line works around | |
6966 | # an apparent bug in bash 1.12 on linux. | |
6967 | ${srcdir}/[*]/config-lang.in) ;; | |
6968 | *) | |
6969 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
6970 | if test "x$lang_alias" = x | |
6971 | then | |
6972 | echo "$lang doesn't set \$language." 1>&2 | |
6973 | exit 1 | |
6974 | fi | |
6975 | case ",$enable_languages," in | |
6976 | *,$lang_alias,*) | |
6977 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;; | |
6978 | esac | |
6979 | ;; | |
6980 | esac | |
6981 | done | |
6982 | ||
6983 | ||
73458fb7 NN |
6984 | # ------------------------- |
6985 | # Checks for other programs | |
6986 | # ------------------------- | |
5b67ad6f | 6987 | |
ba479fd2 NN |
6988 | echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
6989 | echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 | |
86da66b5 | 6990 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` |
ba479fd2 NN |
6991 | if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then |
6992 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9a25f70 | 6993 | else |
ba479fd2 | 6994 | cat >conftest.make <<\_ACEOF |
e9a25f70 | 6995 | all: |
ba479fd2 NN |
6996 | @echo 'ac_maketemp="$(MAKE)"' |
6997 | _ACEOF | |
e9a25f70 | 6998 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
ba479fd2 | 6999 | eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` |
e9a25f70 JL |
7000 | if test -n "$ac_maketemp"; then |
7001 | eval ac_cv_prog_make_${ac_make}_set=yes | |
7002 | else | |
7003 | eval ac_cv_prog_make_${ac_make}_set=no | |
7004 | fi | |
ba479fd2 | 7005 | rm -f conftest.make |
e9a25f70 JL |
7006 | fi |
7007 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
ba479fd2 NN |
7008 | echo "$as_me:$LINENO: result: yes" >&5 |
7009 | echo "${ECHO_T}yes" >&6 | |
e9a25f70 JL |
7010 | SET_MAKE= |
7011 | else | |
ba479fd2 NN |
7012 | echo "$as_me:$LINENO: result: no" >&5 |
7013 | echo "${ECHO_T}no" >&6 | |
e9a25f70 JL |
7014 | SET_MAKE="MAKE=${MAKE-make}" |
7015 | fi | |
7016 | ||
7017 | ||
861bb6c1 | 7018 | # Find some useful tools |
ba479fd2 | 7019 | for ac_prog in gawk mawk nawk awk |
861bb6c1 | 7020 | do |
ba479fd2 | 7021 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 7022 | set dummy $ac_prog; ac_word=$2 |
ba479fd2 NN |
7023 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7024 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7025 | if test "${ac_cv_prog_AWK+set}" = set; then | |
7026 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7027 | else |
7028 | if test -n "$AWK"; then | |
7029 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7030 | else | |
ba479fd2 NN |
7031 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7032 | for as_dir in $PATH | |
7033 | do | |
7034 | IFS=$as_save_IFS | |
7035 | test -z "$as_dir" && as_dir=. | |
7036 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7037 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7038 | ac_cv_prog_AWK="$ac_prog" | |
7039 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7040 | break 2 | |
7041 | fi | |
7042 | done | |
7043 | done | |
7044 | ||
861bb6c1 JL |
7045 | fi |
7046 | fi | |
ba479fd2 | 7047 | AWK=$ac_cv_prog_AWK |
861bb6c1 | 7048 | if test -n "$AWK"; then |
ba479fd2 NN |
7049 | echo "$as_me:$LINENO: result: $AWK" >&5 |
7050 | echo "${ECHO_T}$AWK" >&6 | |
861bb6c1 | 7051 | else |
ba479fd2 NN |
7052 | echo "$as_me:$LINENO: result: no" >&5 |
7053 | echo "${ECHO_T}no" >&6 | |
861bb6c1 JL |
7054 | fi |
7055 | ||
ba479fd2 | 7056 | test -n "$AWK" && break |
861bb6c1 JL |
7057 | done |
7058 | ||
776dc15d | 7059 | # We need awk to create options.c and options.h. |
2c4902b9 NN |
7060 | # Bail out if it's missing. |
7061 | case ${AWK} in | |
ba479fd2 NN |
7062 | "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5 |
7063 | echo "$as_me: error: can't build without awk, bailing out" >&2;} | |
7064 | { (exit 1); exit 1; }; } ;; | |
2c4902b9 NN |
7065 | esac |
7066 | ||
ba479fd2 NN |
7067 | echo "$as_me:$LINENO: checking whether ln -s works" >&5 |
7068 | echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 | |
7069 | if test "${gcc_cv_prog_LN_S+set}" = set; then | |
7070 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7071 | else |
7072 | rm -f conftestdata_t | |
7073 | echo >conftestdata_f | |
7074 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
7075 | then | |
7076 | gcc_cv_prog_LN_S="ln -s" | |
7077 | else | |
7078 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7079 | then | |
7080 | gcc_cv_prog_LN_S=ln | |
7081 | else | |
35f06ae4 PB |
7082 | if cp -p conftestdata_f conftestdata_t 2>/dev/null |
7083 | then | |
06c3418c | 7084 | gcc_cv_prog_LN_S="cp -p" |
35f06ae4 PB |
7085 | else |
7086 | gcc_cv_prog_LN_S=cp | |
7087 | fi | |
0a4b6309 RL |
7088 | fi |
7089 | fi | |
7090 | rm -f conftestdata_f conftestdata_t | |
7091 | ||
7092 | fi | |
7093 | LN_S="$gcc_cv_prog_LN_S" | |
7094 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
ba479fd2 NN |
7095 | echo "$as_me:$LINENO: result: yes" >&5 |
7096 | echo "${ECHO_T}yes" >&6 | |
0a4b6309 RL |
7097 | else |
7098 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
ba479fd2 NN |
7099 | echo "$as_me:$LINENO: result: no, using ln" >&5 |
7100 | echo "${ECHO_T}no, using ln" >&6 | |
0a4b6309 | 7101 | else |
35f06ae4 PB |
7102 | echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5 |
7103 | echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6 | |
0a4b6309 RL |
7104 | fi |
7105 | fi | |
7106 | ||
41e622a8 AP |
7107 | echo "$as_me:$LINENO: checking whether ln works" >&5 |
7108 | echo $ECHO_N "checking whether ln works... $ECHO_C" >&6 | |
7109 | if test "${acx_cv_prog_LN+set}" = set; then | |
7110 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7111 | else | |
7112 | rm -f conftestdata_t | |
7113 | echo >conftestdata_f | |
7114 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7115 | then | |
7116 | acx_cv_prog_LN=ln | |
7117 | else | |
7118 | acx_cv_prog_LN=no | |
7119 | fi | |
7120 | rm -f conftestdata_f conftestdata_t | |
7121 | ||
7122 | fi | |
7123 | if test $acx_cv_prog_LN = no; then | |
7124 | LN="$LN_S" | |
7125 | echo "$as_me:$LINENO: result: no, using $LN" >&5 | |
7126 | echo "${ECHO_T}no, using $LN" >&6 | |
7127 | else | |
7128 | LN="$acx_cv_prog_LN" | |
7129 | echo "$as_me:$LINENO: result: yes" >&5 | |
7130 | echo "${ECHO_T}yes" >&6 | |
7131 | fi | |
7132 | ||
ba479fd2 NN |
7133 | if test -n "$ac_tool_prefix"; then |
7134 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7135 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
7136 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7137 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7138 | if test "${ac_cv_prog_RANLIB+set}" = set; then | |
7139 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7140 | else |
7141 | if test -n "$RANLIB"; then | |
7142 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7143 | else | |
ba479fd2 NN |
7144 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7145 | for as_dir in $PATH | |
7146 | do | |
7147 | IFS=$as_save_IFS | |
7148 | test -z "$as_dir" && as_dir=. | |
7149 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7150 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7151 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
7152 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7153 | break 2 | |
7154 | fi | |
7155 | done | |
7156 | done | |
7157 | ||
6e3f3080 NN |
7158 | fi |
7159 | fi | |
ba479fd2 | 7160 | RANLIB=$ac_cv_prog_RANLIB |
6e3f3080 | 7161 | if test -n "$RANLIB"; then |
ba479fd2 NN |
7162 | echo "$as_me:$LINENO: result: $RANLIB" >&5 |
7163 | echo "${ECHO_T}$RANLIB" >&6 | |
7164 | else | |
7165 | echo "$as_me:$LINENO: result: no" >&5 | |
7166 | echo "${ECHO_T}no" >&6 | |
7167 | fi | |
7168 | ||
7169 | fi | |
7170 | if test -z "$ac_cv_prog_RANLIB"; then | |
7171 | ac_ct_RANLIB=$RANLIB | |
7172 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7173 | set dummy ranlib; ac_word=$2 | |
7174 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7175 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7176 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then | |
7177 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7178 | else | |
7179 | if test -n "$ac_ct_RANLIB"; then | |
7180 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7181 | else | |
7182 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7183 | for as_dir in $PATH | |
7184 | do | |
7185 | IFS=$as_save_IFS | |
7186 | test -z "$as_dir" && as_dir=. | |
7187 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7188 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7189 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
7190 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7191 | break 2 | |
7192 | fi | |
7193 | done | |
7194 | done | |
7195 | ||
7196 | test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" | |
7197 | fi | |
7198 | fi | |
7199 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7200 | if test -n "$ac_ct_RANLIB"; then | |
7201 | echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 | |
7202 | echo "${ECHO_T}$ac_ct_RANLIB" >&6 | |
6e3f3080 | 7203 | else |
ba479fd2 NN |
7204 | echo "$as_me:$LINENO: result: no" >&5 |
7205 | echo "${ECHO_T}no" >&6 | |
7206 | fi | |
7207 | ||
7208 | RANLIB=$ac_ct_RANLIB | |
7209 | else | |
7210 | RANLIB="$ac_cv_prog_RANLIB" | |
861bb6c1 JL |
7211 | fi |
7212 | ||
343a6100 MM |
7213 | case "${host}" in |
7214 | *-*-darwin*) | |
7215 | # By default, the Darwin ranlib will not treat common symbols as | |
7216 | # definitions when building the archive table of contents. Other | |
7217 | # ranlibs do that; pass an option to the Darwin ranlib that makes | |
7218 | # it behave similarly. | |
7219 | ranlib_flags="-c" | |
7220 | ;; | |
7221 | *) | |
7222 | ranlib_flags="" | |
7223 | esac | |
7224 | ||
7225 | ||
0a4b6309 RL |
7226 | # Find a good install program. We prefer a C program (faster), |
7227 | # so one script is as good as another. But avoid the broken or | |
7228 | # incompatible versions: | |
7229 | # SysV /etc/install, /usr/sbin/install | |
7230 | # SunOS /usr/etc/install | |
7231 | # IRIX /sbin/install | |
7232 | # AIX /bin/install | |
7233 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7234 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7235 | # ./install, which can be erroneously created by make from ./install.sh. | |
ba479fd2 NN |
7236 | echo "$as_me:$LINENO: checking for a BSD compatible install" >&5 |
7237 | echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 | |
0a4b6309 | 7238 | if test -z "$INSTALL"; then |
ba479fd2 NN |
7239 | if test "${ac_cv_path_install+set}" = set; then |
7240 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7241 | else |
7242 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
7243 | for ac_dir in $PATH; do | |
7244 | # Account for people who put trailing slashes in PATH elements. | |
7245 | case "$ac_dir/" in | |
7246 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
7247 | *) | |
7248 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7249 | for ac_prog in ginstall scoinst install; do | |
7250 | if test -f $ac_dir/$ac_prog; then | |
7251 | if test $ac_prog = install && | |
7252 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
7253 | # AIX install. It has an incompatible calling convention. | |
7254 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
7255 | : | |
7256 | else | |
7257 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
7258 | break 2 | |
7259 | fi | |
7260 | fi | |
7261 | done | |
7262 | ;; | |
7263 | esac | |
7264 | done | |
7265 | IFS="$ac_save_IFS" | |
7266 | ||
7267 | fi | |
7268 | if test "${ac_cv_path_install+set}" = set; then | |
7269 | INSTALL="$ac_cv_path_install" | |
7270 | else | |
7271 | # As a last resort, use the slow shell script. We don't cache a | |
7272 | # path for INSTALL within a source directory, because that will | |
7273 | # break other packages using the cache if that directory is | |
7274 | # removed, or if the path is relative. | |
7275 | INSTALL="$ac_install_sh" | |
7276 | fi | |
7277 | fi | |
ba479fd2 NN |
7278 | echo "$as_me:$LINENO: result: $INSTALL" >&5 |
7279 | echo "${ECHO_T}$INSTALL" >&6 | |
0a4b6309 RL |
7280 | |
7281 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7282 | # It thinks the first close brace ends the variable substitution. | |
7283 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7284 | ||
7285 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
7286 | ||
861bb6c1 | 7287 | |
3a000df0 | 7288 | # See if cmp has --ignore-initial. |
ba479fd2 NN |
7289 | echo "$as_me:$LINENO: checking for cmp's capabilities" >&5 |
7290 | echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6 | |
7291 | if test "${gcc_cv_prog_cmp_skip+set}" = set; then | |
7292 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a000df0 KC |
7293 | else |
7294 | echo abfoo >t1 | |
7295 | echo cdfoo >t2 | |
269a7343 | 7296 | gcc_cv_prog_cmp_skip=slowcompare |
3a000df0 KC |
7297 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then |
7298 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
269a7343 | 7299 | : |
3a000df0 KC |
7300 | else |
7301 | gcc_cv_prog_cmp_skip=gnucompare | |
7302 | fi | |
269a7343 KG |
7303 | fi |
7304 | if test $gcc_cv_prog_cmp_skip = slowcompare ; then | |
7305 | if cmp t1 t2 2 2 > /dev/null 2>&1; then | |
7306 | if cmp t1 t2 1 1 > /dev/null 2>&1; then | |
7307 | : | |
7308 | else | |
7309 | gcc_cv_prog_cmp_skip=fastcompare | |
7310 | fi | |
7311 | fi | |
3a000df0 KC |
7312 | fi |
7313 | rm t1 t2 | |
7314 | ||
7315 | fi | |
ba479fd2 NN |
7316 | echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5 |
7317 | echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6 | |
3a000df0 KC |
7318 | make_compare_target=$gcc_cv_prog_cmp_skip |
7319 | ||
7320 | ||
7321 | ||
73458fb7 NN |
7322 | # See if we have the mktemp command. |
7323 | # Extract the first word of "mktemp", so it can be a program name with args. | |
7324 | set dummy mktemp; ac_word=$2 | |
ba479fd2 NN |
7325 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7326 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7327 | if test "${ac_cv_prog_have_mktemp_command+set}" = set; then | |
7328 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7329 | else |
7330 | if test -n "$have_mktemp_command"; then | |
7331 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
7332 | else | |
ba479fd2 NN |
7333 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7334 | for as_dir in $PATH | |
7335 | do | |
7336 | IFS=$as_save_IFS | |
7337 | test -z "$as_dir" && as_dir=. | |
7338 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7339 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7340 | ac_cv_prog_have_mktemp_command="yes" | |
7341 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7342 | break 2 | |
7343 | fi | |
7344 | done | |
7345 | done | |
7346 | ||
73458fb7 NN |
7347 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
7348 | fi | |
7349 | fi | |
ba479fd2 | 7350 | have_mktemp_command=$ac_cv_prog_have_mktemp_command |
73458fb7 | 7351 | if test -n "$have_mktemp_command"; then |
ba479fd2 NN |
7352 | echo "$as_me:$LINENO: result: $have_mktemp_command" >&5 |
7353 | echo "${ECHO_T}$have_mktemp_command" >&6 | |
73458fb7 | 7354 | else |
ba479fd2 NN |
7355 | echo "$as_me:$LINENO: result: no" >&5 |
7356 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7357 | fi |
7358 | ||
7359 | ||
7c27e184 PB |
7360 | MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing" |
7361 | ||
7362 | # See if makeinfo has been installed and is modern enough | |
7363 | # that we can use it. | |
9f18db39 PB |
7364 | |
7365 | ac_executable_extensions="$build_exeext" | |
7366 | ||
7c27e184 | 7367 | # Extract the first word of "makeinfo", so it can be a program name with args. |
73458fb7 | 7368 | set dummy makeinfo; ac_word=$2 |
ba479fd2 NN |
7369 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7370 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7371 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then | |
7372 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7373 | else |
7374 | if test -n "$MAKEINFO"; then | |
7375 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
7376 | else | |
ba479fd2 NN |
7377 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7378 | for as_dir in $PATH | |
7379 | do | |
7380 | IFS=$as_save_IFS | |
7381 | test -z "$as_dir" && as_dir=. | |
7382 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7383 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7384 | ac_cv_prog_MAKEINFO="makeinfo" | |
7385 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7386 | break 2 | |
7387 | fi | |
7388 | done | |
7389 | done | |
7390 | ||
73458fb7 NN |
7391 | fi |
7392 | fi | |
ba479fd2 | 7393 | MAKEINFO=$ac_cv_prog_MAKEINFO |
73458fb7 | 7394 | if test -n "$MAKEINFO"; then |
ba479fd2 NN |
7395 | echo "$as_me:$LINENO: result: $MAKEINFO" >&5 |
7396 | echo "${ECHO_T}$MAKEINFO" >&6 | |
73458fb7 | 7397 | else |
ba479fd2 NN |
7398 | echo "$as_me:$LINENO: result: no" >&5 |
7399 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7400 | fi |
7401 | ||
7402 | if test -n "$MAKEINFO"; then | |
7403 | # Found it, now check the version. | |
ba479fd2 NN |
7404 | echo "$as_me:$LINENO: checking for modern makeinfo" >&5 |
7405 | echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6 | |
7406 | if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then | |
7407 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7408 | else |
7409 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
7410 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
9f18db39 | 7411 | echo "configure:7411: version of makeinfo is $ac_prog_version" >&5 |
73458fb7 NN |
7412 | case $ac_prog_version in |
7413 | '') gcc_cv_prog_makeinfo_modern=no;; | |
7414 | 4.[2-9]*) | |
7415 | gcc_cv_prog_makeinfo_modern=yes;; | |
7416 | *) gcc_cv_prog_makeinfo_modern=no;; | |
7417 | esac | |
7418 | ||
7419 | fi | |
ba479fd2 NN |
7420 | echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5 |
7421 | echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6 | |
73458fb7 NN |
7422 | else |
7423 | gcc_cv_prog_makeinfo_modern=no | |
7424 | fi | |
7425 | ||
73458fb7 | 7426 | if test $gcc_cv_prog_makeinfo_modern = no; then |
7c27e184 | 7427 | MAKEINFO="$MISSING makeinfo" |
ba479fd2 NN |
7428 | { echo "$as_me:$LINENO: WARNING: |
7429 | *** Makeinfo is missing or too old. | |
7430 | *** Info documentation will not be built." >&5 | |
7431 | echo "$as_me: WARNING: | |
cafe096b | 7432 | *** Makeinfo is missing or too old. |
ba479fd2 | 7433 | *** Info documentation will not be built." >&2;} |
73458fb7 NN |
7434 | BUILD_INFO= |
7435 | else | |
ba479fd2 | 7436 | BUILD_INFO=info |
73458fb7 NN |
7437 | fi |
7438 | ||
7c27e184 | 7439 | |
73458fb7 | 7440 | # Is pod2man recent enough to regenerate manpages? |
ba479fd2 NN |
7441 | echo "$as_me:$LINENO: checking for recent Pod::Man" >&5 |
7442 | echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6 | |
73458fb7 | 7443 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
ba479fd2 NN |
7444 | echo "$as_me:$LINENO: result: yes" >&5 |
7445 | echo "${ECHO_T}yes" >&6 | |
7446 | GENERATED_MANPAGES=generated-manpages | |
73458fb7 | 7447 | else |
ba479fd2 NN |
7448 | echo "$as_me:$LINENO: result: no" >&5 |
7449 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7450 | GENERATED_MANPAGES= |
7451 | fi | |
7452 | ||
7c27e184 | 7453 | |
73458fb7 | 7454 | # How about lex? |
7c27e184 PB |
7455 | for ac_prog in flex |
7456 | do | |
7457 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7458 | set dummy $ac_prog; ac_word=$2 | |
ba479fd2 NN |
7459 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7460 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7461 | if test "${ac_cv_prog_FLEX+set}" = set; then | |
7462 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7463 | else |
7464 | if test -n "$FLEX"; then | |
7465 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
7466 | else | |
ba479fd2 NN |
7467 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7468 | for as_dir in $PATH | |
7469 | do | |
7470 | IFS=$as_save_IFS | |
7471 | test -z "$as_dir" && as_dir=. | |
7472 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7473 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7c27e184 | 7474 | ac_cv_prog_FLEX="$ac_prog" |
ba479fd2 NN |
7475 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7476 | break 2 | |
7477 | fi | |
7478 | done | |
7479 | done | |
7480 | ||
73458fb7 NN |
7481 | fi |
7482 | fi | |
ba479fd2 | 7483 | FLEX=$ac_cv_prog_FLEX |
73458fb7 | 7484 | if test -n "$FLEX"; then |
ba479fd2 NN |
7485 | echo "$as_me:$LINENO: result: $FLEX" >&5 |
7486 | echo "${ECHO_T}$FLEX" >&6 | |
73458fb7 | 7487 | else |
ba479fd2 NN |
7488 | echo "$as_me:$LINENO: result: no" >&5 |
7489 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7490 | fi |
7491 | ||
7c27e184 PB |
7492 | test -n "$FLEX" && break |
7493 | done | |
7494 | test -n "$FLEX" || FLEX="$MISSING flex" | |
7495 | ||
73458fb7 NN |
7496 | |
7497 | # Bison? | |
7c27e184 PB |
7498 | for ac_prog in bison |
7499 | do | |
7500 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7501 | set dummy $ac_prog; ac_word=$2 | |
ba479fd2 NN |
7502 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7503 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7504 | if test "${ac_cv_prog_BISON+set}" = set; then | |
7505 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7506 | else |
7507 | if test -n "$BISON"; then | |
7508 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
7509 | else | |
ba479fd2 NN |
7510 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7511 | for as_dir in $PATH | |
7512 | do | |
7513 | IFS=$as_save_IFS | |
7514 | test -z "$as_dir" && as_dir=. | |
7515 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7516 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7c27e184 | 7517 | ac_cv_prog_BISON="$ac_prog" |
ba479fd2 NN |
7518 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7519 | break 2 | |
7520 | fi | |
7521 | done | |
7522 | done | |
7523 | ||
73458fb7 NN |
7524 | fi |
7525 | fi | |
ba479fd2 | 7526 | BISON=$ac_cv_prog_BISON |
73458fb7 | 7527 | if test -n "$BISON"; then |
ba479fd2 NN |
7528 | echo "$as_me:$LINENO: result: $BISON" >&5 |
7529 | echo "${ECHO_T}$BISON" >&6 | |
73458fb7 | 7530 | else |
ba479fd2 NN |
7531 | echo "$as_me:$LINENO: result: no" >&5 |
7532 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7533 | fi |
7534 | ||
7c27e184 PB |
7535 | test -n "$BISON" && break |
7536 | done | |
7537 | test -n "$BISON" || BISON="$MISSING bison" | |
7538 | ||
7539 | ||
7540 | # Binutils are not build modules, unlike bison/flex/makeinfo. So we | |
7541 | # check for build == host before using them. | |
73458fb7 | 7542 | |
f6a874ac | 7543 | # NM |
414adbdd GK |
7544 | if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ |
7545 | && test -d ../binutils ; then | |
f6a874ac JW |
7546 | NM='$(objdir)/../binutils/nm-new' |
7547 | else | |
7548 | # Extract the first word of "nm", so it can be a program name with args. | |
7549 | set dummy nm; ac_word=$2 | |
7550 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7551 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7552 | if test "${ac_cv_prog_NM+set}" = set; then | |
7553 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7554 | else | |
7555 | if test -n "$NM"; then | |
7556 | ac_cv_prog_NM="$NM" # Let the user override the test. | |
7557 | else | |
7558 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7559 | for as_dir in $PATH | |
7560 | do | |
7561 | IFS=$as_save_IFS | |
7562 | test -z "$as_dir" && as_dir=. | |
7563 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7564 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7565 | ac_cv_prog_NM="nm" | |
7566 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7567 | break 2 | |
7568 | fi | |
7569 | done | |
7570 | done | |
7571 | ||
7572 | test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm" | |
7573 | fi | |
7574 | fi | |
7575 | NM=$ac_cv_prog_NM | |
7576 | if test -n "$NM"; then | |
7577 | echo "$as_me:$LINENO: result: $NM" >&5 | |
7578 | echo "${ECHO_T}$NM" >&6 | |
7579 | else | |
7580 | echo "$as_me:$LINENO: result: no" >&5 | |
7581 | echo "${ECHO_T}no" >&6 | |
7582 | fi | |
7583 | ||
7584 | fi | |
7585 | ||
7586 | # AR | |
414adbdd GK |
7587 | if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ |
7588 | && test -d ../binutils ; then | |
f6a874ac JW |
7589 | AR='$(objdir)/../binutils/ar' |
7590 | else | |
7591 | # Extract the first word of "ar", so it can be a program name with args. | |
7592 | set dummy ar; ac_word=$2 | |
7593 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7594 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7595 | if test "${ac_cv_prog_AR+set}" = set; then | |
7596 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7597 | else | |
7598 | if test -n "$AR"; then | |
7599 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7600 | else | |
7601 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7602 | for as_dir in $PATH | |
7603 | do | |
7604 | IFS=$as_save_IFS | |
7605 | test -z "$as_dir" && as_dir=. | |
7606 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7607 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7608 | ac_cv_prog_AR="ar" | |
7609 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7610 | break 2 | |
7611 | fi | |
7612 | done | |
7613 | done | |
7614 | ||
7615 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar" | |
7616 | fi | |
7617 | fi | |
7618 | AR=$ac_cv_prog_AR | |
7619 | if test -n "$AR"; then | |
7620 | echo "$as_me:$LINENO: result: $AR" >&5 | |
7621 | echo "${ECHO_T}$AR" >&6 | |
7622 | else | |
7623 | echo "$as_me:$LINENO: result: no" >&5 | |
7624 | echo "${ECHO_T}no" >&6 | |
7625 | fi | |
7626 | ||
7627 | fi | |
7628 | ||
7629 | ||
73458fb7 NN |
7630 | # -------------------- |
7631 | # Checks for C headers | |
7632 | # -------------------- | |
7633 | ||
ba479fd2 NN |
7634 | echo "$as_me:$LINENO: checking for GNU C library" >&5 |
7635 | echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6 | |
7636 | if test "${gcc_cv_glibc+set}" = set; then | |
7637 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7638 | else | |
7639 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7640 | /* confdefs.h. */ |
7641 | _ACEOF | |
7642 | cat confdefs.h >>conftest.$ac_ext | |
7643 | cat >>conftest.$ac_ext <<_ACEOF | |
7644 | /* end confdefs.h. */ | |
73458fb7 | 7645 | #include <features.h> |
ba479fd2 NN |
7646 | int |
7647 | main () | |
7648 | { | |
73458fb7 NN |
7649 | |
7650 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
7651 | #error Not a GNU C library system | |
7652 | #endif | |
ba479fd2 NN |
7653 | ; |
7654 | return 0; | |
7655 | } | |
7656 | _ACEOF | |
7657 | rm -f conftest.$ac_objext | |
7658 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7659 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7660 | ac_status=$? |
86da66b5 HPN |
7661 | grep -v '^ *+' conftest.er1 >conftest.err |
7662 | rm -f conftest.er1 | |
7663 | cat conftest.err >&5 | |
ba479fd2 NN |
7664 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7665 | (exit $ac_status); } && | |
d7974fe6 KC |
7666 | { ac_try='test -z "$ac_c_werror_flag" |
7667 | || test ! -s conftest.err' | |
86da66b5 HPN |
7668 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7669 | (eval $ac_try) 2>&5 | |
7670 | ac_status=$? | |
7671 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7672 | (exit $ac_status); }; } && | |
7673 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7674 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7675 | (eval $ac_try) 2>&5 | |
7676 | ac_status=$? | |
7677 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7678 | (exit $ac_status); }; }; then | |
73458fb7 NN |
7679 | gcc_cv_glibc=yes |
7680 | else | |
ba479fd2 NN |
7681 | echo "$as_me: failed program was:" >&5 |
7682 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7683 | ||
7684 | gcc_cv_glibc=no | |
73458fb7 | 7685 | fi |
86da66b5 | 7686 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
73458fb7 NN |
7687 | fi |
7688 | ||
ba479fd2 NN |
7689 | echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5 |
7690 | echo "${ECHO_T}$gcc_cv_glibc" >&6 | |
73458fb7 | 7691 | if test $gcc_cv_glibc = yes; then |
ba479fd2 NN |
7692 | |
7693 | cat >>confdefs.h <<\_ACEOF | |
73458fb7 | 7694 | #define _GNU_SOURCE 1 |
ba479fd2 | 7695 | _ACEOF |
73458fb7 NN |
7696 | |
7697 | fi | |
7698 | ||
ca9bc441 NN |
7699 | # Need to reject headers which give warnings, so that the -Werror bootstrap |
7700 | # works later. *sigh* This needs to come before all header checks. | |
7701 | ||
7702 | ac_c_preproc_warn_flag=yes | |
7703 | ||
ba479fd2 NN |
7704 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
7705 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
7706 | if test "${ac_cv_header_stdc+set}" = set; then | |
7707 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 7708 | else |
ba479fd2 | 7709 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7710 | /* confdefs.h. */ |
7711 | _ACEOF | |
7712 | cat confdefs.h >>conftest.$ac_ext | |
7713 | cat >>conftest.$ac_ext <<_ACEOF | |
7714 | /* end confdefs.h. */ | |
956d6950 JL |
7715 | #include <stdlib.h> |
7716 | #include <stdarg.h> | |
7717 | #include <string.h> | |
7718 | #include <float.h> | |
ba479fd2 NN |
7719 | |
7720 | int | |
7721 | main () | |
7722 | { | |
7723 | ||
7724 | ; | |
7725 | return 0; | |
7726 | } | |
7727 | _ACEOF | |
7728 | rm -f conftest.$ac_objext | |
7729 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7730 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7731 | ac_status=$? |
86da66b5 HPN |
7732 | grep -v '^ *+' conftest.er1 >conftest.err |
7733 | rm -f conftest.er1 | |
7734 | cat conftest.err >&5 | |
ba479fd2 NN |
7735 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7736 | (exit $ac_status); } && | |
d7974fe6 KC |
7737 | { ac_try='test -z "$ac_c_werror_flag" |
7738 | || test ! -s conftest.err' | |
86da66b5 HPN |
7739 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7740 | (eval $ac_try) 2>&5 | |
7741 | ac_status=$? | |
7742 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7743 | (exit $ac_status); }; } && | |
7744 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7745 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7746 | (eval $ac_try) 2>&5 | |
7747 | ac_status=$? | |
7748 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7749 | (exit $ac_status); }; }; then | |
956d6950 JL |
7750 | ac_cv_header_stdc=yes |
7751 | else | |
ba479fd2 NN |
7752 | echo "$as_me: failed program was:" >&5 |
7753 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7754 | ||
7755 | ac_cv_header_stdc=no | |
956d6950 | 7756 | fi |
86da66b5 | 7757 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
7758 | |
7759 | if test $ac_cv_header_stdc = yes; then | |
7760 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
ba479fd2 | 7761 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7762 | /* confdefs.h. */ |
7763 | _ACEOF | |
7764 | cat confdefs.h >>conftest.$ac_ext | |
7765 | cat >>conftest.$ac_ext <<_ACEOF | |
7766 | /* end confdefs.h. */ | |
956d6950 | 7767 | #include <string.h> |
ba479fd2 NN |
7768 | |
7769 | _ACEOF | |
956d6950 | 7770 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 7771 | $EGREP "memchr" >/dev/null 2>&1; then |
956d6950 JL |
7772 | : |
7773 | else | |
956d6950 JL |
7774 | ac_cv_header_stdc=no |
7775 | fi | |
7776 | rm -f conftest* | |
7777 | ||
7778 | fi | |
7779 | ||
7780 | if test $ac_cv_header_stdc = yes; then | |
7781 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
ba479fd2 | 7782 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7783 | /* confdefs.h. */ |
7784 | _ACEOF | |
7785 | cat confdefs.h >>conftest.$ac_ext | |
7786 | cat >>conftest.$ac_ext <<_ACEOF | |
7787 | /* end confdefs.h. */ | |
956d6950 | 7788 | #include <stdlib.h> |
ba479fd2 NN |
7789 | |
7790 | _ACEOF | |
956d6950 | 7791 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 7792 | $EGREP "free" >/dev/null 2>&1; then |
956d6950 JL |
7793 | : |
7794 | else | |
956d6950 JL |
7795 | ac_cv_header_stdc=no |
7796 | fi | |
7797 | rm -f conftest* | |
7798 | ||
7799 | fi | |
7800 | ||
7801 | if test $ac_cv_header_stdc = yes; then | |
7802 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
ba479fd2 | 7803 | if test "$cross_compiling" = yes; then |
956d6950 JL |
7804 | : |
7805 | else | |
ba479fd2 | 7806 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7807 | /* confdefs.h. */ |
7808 | _ACEOF | |
7809 | cat confdefs.h >>conftest.$ac_ext | |
7810 | cat >>conftest.$ac_ext <<_ACEOF | |
7811 | /* end confdefs.h. */ | |
956d6950 | 7812 | #include <ctype.h> |
ba479fd2 NN |
7813 | #if ((' ' & 0x0FF) == 0x020) |
7814 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
7815 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
7816 | #else | |
7817 | # define ISLOWER(c) \ | |
86da66b5 HPN |
7818 | (('a' <= (c) && (c) <= 'i') \ |
7819 | || ('j' <= (c) && (c) <= 'r') \ | |
7820 | || ('s' <= (c) && (c) <= 'z')) | |
ba479fd2 NN |
7821 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
7822 | #endif | |
63cf211a | 7823 | |
ba479fd2 NN |
7824 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
7825 | int | |
7826 | main () | |
7827 | { | |
7828 | int i; | |
7829 | for (i = 0; i < 256; i++) | |
7830 | if (XOR (islower (i), ISLOWER (i)) | |
86da66b5 | 7831 | || toupper (i) != TOUPPER (i)) |
ba479fd2 NN |
7832 | exit(2); |
7833 | exit (0); | |
7834 | } | |
7835 | _ACEOF | |
7836 | rm -f conftest$ac_exeext | |
7837 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7838 | (eval $ac_link) 2>&5 | |
7839 | ac_status=$? | |
7840 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7841 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
7842 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7843 | (eval $ac_try) 2>&5 | |
7844 | ac_status=$? | |
7845 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7846 | (exit $ac_status); }; }; then | |
956d6950 JL |
7847 | : |
7848 | else | |
ba479fd2 NN |
7849 | echo "$as_me: program exited with status $ac_status" >&5 |
7850 | echo "$as_me: failed program was:" >&5 | |
7851 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7852 | ||
7853 | ( exit $ac_status ) | |
7854 | ac_cv_header_stdc=no | |
956d6950 | 7855 | fi |
86da66b5 | 7856 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
956d6950 | 7857 | fi |
956d6950 JL |
7858 | fi |
7859 | fi | |
ba479fd2 NN |
7860 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 |
7861 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
63cf211a | 7862 | if test $ac_cv_header_stdc = yes; then |
ba479fd2 NN |
7863 | |
7864 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 7865 | #define STDC_HEADERS 1 |
ba479fd2 | 7866 | _ACEOF |
956d6950 JL |
7867 | |
7868 | fi | |
7869 | ||
ba479fd2 NN |
7870 | echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 |
7871 | echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 | |
7872 | if test "${ac_cv_header_time+set}" = set; then | |
7873 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 7874 | else |
ba479fd2 | 7875 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7876 | /* confdefs.h. */ |
7877 | _ACEOF | |
7878 | cat confdefs.h >>conftest.$ac_ext | |
7879 | cat >>conftest.$ac_ext <<_ACEOF | |
7880 | /* end confdefs.h. */ | |
956d6950 JL |
7881 | #include <sys/types.h> |
7882 | #include <sys/time.h> | |
7883 | #include <time.h> | |
ba479fd2 NN |
7884 | |
7885 | int | |
7886 | main () | |
7887 | { | |
7888 | if ((struct tm *) 0) | |
7889 | return 0; | |
7890 | ; | |
7891 | return 0; | |
7892 | } | |
7893 | _ACEOF | |
7894 | rm -f conftest.$ac_objext | |
7895 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7896 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7897 | ac_status=$? |
86da66b5 HPN |
7898 | grep -v '^ *+' conftest.er1 >conftest.err |
7899 | rm -f conftest.er1 | |
7900 | cat conftest.err >&5 | |
ba479fd2 NN |
7901 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7902 | (exit $ac_status); } && | |
d7974fe6 KC |
7903 | { ac_try='test -z "$ac_c_werror_flag" |
7904 | || test ! -s conftest.err' | |
86da66b5 HPN |
7905 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7906 | (eval $ac_try) 2>&5 | |
7907 | ac_status=$? | |
7908 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7909 | (exit $ac_status); }; } && | |
7910 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7911 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7912 | (eval $ac_try) 2>&5 | |
7913 | ac_status=$? | |
7914 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7915 | (exit $ac_status); }; }; then | |
956d6950 JL |
7916 | ac_cv_header_time=yes |
7917 | else | |
ba479fd2 NN |
7918 | echo "$as_me: failed program was:" >&5 |
7919 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7920 | ||
7921 | ac_cv_header_time=no | |
956d6950 | 7922 | fi |
86da66b5 | 7923 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 | 7924 | fi |
ba479fd2 NN |
7925 | echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 |
7926 | echo "${ECHO_T}$ac_cv_header_time" >&6 | |
63cf211a | 7927 | if test $ac_cv_header_time = yes; then |
ba479fd2 NN |
7928 | |
7929 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 7930 | #define TIME_WITH_SYS_TIME 1 |
ba479fd2 | 7931 | _ACEOF |
956d6950 JL |
7932 | |
7933 | fi | |
7934 | ||
41e622a8 AP |
7935 | echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 |
7936 | echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6 | |
7937 | if test "${gcc_cv_header_string+set}" = set; then | |
7938 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7939 | else | |
7940 | cat >conftest.$ac_ext <<_ACEOF | |
7941 | /* confdefs.h. */ | |
7942 | _ACEOF | |
7943 | cat confdefs.h >>conftest.$ac_ext | |
7944 | cat >>conftest.$ac_ext <<_ACEOF | |
7945 | /* end confdefs.h. */ | |
7946 | #include <string.h> | |
7947 | #include <strings.h> | |
7948 | int | |
7949 | main () | |
7950 | { | |
7951 | ||
7952 | ; | |
7953 | return 0; | |
7954 | } | |
7955 | _ACEOF | |
7956 | rm -f conftest.$ac_objext | |
7957 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7958 | (eval $ac_compile) 2>conftest.er1 | |
7959 | ac_status=$? | |
7960 | grep -v '^ *+' conftest.er1 >conftest.err | |
7961 | rm -f conftest.er1 | |
7962 | cat conftest.err >&5 | |
7963 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7964 | (exit $ac_status); } && | |
d7974fe6 KC |
7965 | { ac_try='test -z "$ac_c_werror_flag" |
7966 | || test ! -s conftest.err' | |
41e622a8 AP |
7967 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7968 | (eval $ac_try) 2>&5 | |
7969 | ac_status=$? | |
7970 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7971 | (exit $ac_status); }; } && | |
7972 | { ac_try='test -s conftest.$ac_objext' | |
7973 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7974 | (eval $ac_try) 2>&5 | |
7975 | ac_status=$? | |
7976 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7977 | (exit $ac_status); }; }; then | |
7978 | gcc_cv_header_string=yes | |
7979 | else | |
7980 | echo "$as_me: failed program was:" >&5 | |
7981 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7982 | ||
7983 | gcc_cv_header_string=no | |
7984 | fi | |
7985 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7986 | fi | |
7987 | echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 | |
7988 | echo "${ECHO_T}$gcc_cv_header_string" >&6 | |
7989 | if test $gcc_cv_header_string = yes; then | |
7990 | ||
7991 | cat >>confdefs.h <<\_ACEOF | |
7992 | #define STRING_WITH_STRINGS 1 | |
7993 | _ACEOF | |
7994 | ||
7995 | fi | |
7996 | ||
ba479fd2 NN |
7997 | echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
7998 | echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 | |
7999 | if test "${ac_cv_header_sys_wait_h+set}" = set; then | |
8000 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9831ca0 | 8001 | else |
ba479fd2 | 8002 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8003 | /* confdefs.h. */ |
8004 | _ACEOF | |
8005 | cat confdefs.h >>conftest.$ac_ext | |
8006 | cat >>conftest.$ac_ext <<_ACEOF | |
8007 | /* end confdefs.h. */ | |
e9831ca0 KG |
8008 | #include <sys/types.h> |
8009 | #include <sys/wait.h> | |
8010 | #ifndef WEXITSTATUS | |
ba479fd2 | 8011 | # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
e9831ca0 KG |
8012 | #endif |
8013 | #ifndef WIFEXITED | |
ba479fd2 | 8014 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 8015 | #endif |
ba479fd2 NN |
8016 | |
8017 | int | |
8018 | main () | |
8019 | { | |
8020 | int s; | |
8021 | wait (&s); | |
8022 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
8023 | ; | |
8024 | return 0; | |
8025 | } | |
8026 | _ACEOF | |
8027 | rm -f conftest.$ac_objext | |
8028 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8029 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8030 | ac_status=$? |
86da66b5 HPN |
8031 | grep -v '^ *+' conftest.er1 >conftest.err |
8032 | rm -f conftest.er1 | |
8033 | cat conftest.err >&5 | |
ba479fd2 NN |
8034 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8035 | (exit $ac_status); } && | |
d7974fe6 KC |
8036 | { ac_try='test -z "$ac_c_werror_flag" |
8037 | || test ! -s conftest.err' | |
86da66b5 HPN |
8038 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8039 | (eval $ac_try) 2>&5 | |
8040 | ac_status=$? | |
8041 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8042 | (exit $ac_status); }; } && | |
8043 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8044 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8045 | (eval $ac_try) 2>&5 | |
8046 | ac_status=$? | |
8047 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8048 | (exit $ac_status); }; }; then | |
e9831ca0 KG |
8049 | ac_cv_header_sys_wait_h=yes |
8050 | else | |
ba479fd2 NN |
8051 | echo "$as_me: failed program was:" >&5 |
8052 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8053 | ||
8054 | ac_cv_header_sys_wait_h=no | |
e9831ca0 | 8055 | fi |
86da66b5 | 8056 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
e9831ca0 | 8057 | fi |
ba479fd2 NN |
8058 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 |
8059 | echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 | |
63cf211a | 8060 | if test $ac_cv_header_sys_wait_h = yes; then |
ba479fd2 NN |
8061 | |
8062 | cat >>confdefs.h <<\_ACEOF | |
e9831ca0 | 8063 | #define HAVE_SYS_WAIT_H 1 |
ba479fd2 | 8064 | _ACEOF |
6e3f3080 | 8065 | |
63cf211a | 8066 | fi |
6e3f3080 | 8067 | |
ba479fd2 NN |
8068 | |
8069 | ||
8070 | ||
8071 | ||
8072 | ||
8073 | ||
8074 | ||
8075 | ||
8076 | ||
8077 | ||
8078 | ||
8079 | ||
8080 | ||
8081 | ||
8082 | ||
8083 | ||
8084 | ||
8085 | ||
8086 | ||
8087 | ||
8088 | ||
dfb77e37 KC |
8089 | |
8090 | for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \ | |
1072ec3f | 8091 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 8092 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
56694dd9 | 8093 | direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h |
861bb6c1 | 8094 | do |
ba479fd2 | 8095 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
ca9bc441 | 8096 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
8097 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
8098 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
8099 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 8100 | else |
ca9bc441 | 8101 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8102 | /* confdefs.h. */ |
8103 | _ACEOF | |
8104 | cat confdefs.h >>conftest.$ac_ext | |
8105 | cat >>conftest.$ac_ext <<_ACEOF | |
8106 | /* end confdefs.h. */ | |
8107 | #include <$ac_header> | |
8108 | _ACEOF | |
8109 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8110 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8111 | ac_status=$? | |
8112 | grep -v '^ *+' conftest.er1 >conftest.err | |
8113 | rm -f conftest.er1 | |
8114 | cat conftest.err >&5 | |
8115 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8116 | (exit $ac_status); } >/dev/null; then | |
8117 | if test -s conftest.err; then | |
8118 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8119 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8120 | else |
8121 | ac_cpp_err= | |
8122 | fi | |
8123 | else | |
8124 | ac_cpp_err=yes | |
8125 | fi | |
8126 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 8127 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
8128 | else |
8129 | echo "$as_me: failed program was:" >&5 | |
8130 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8131 | ||
ca9bc441 | 8132 | eval "$as_ac_Header=no" |
ba479fd2 NN |
8133 | fi |
8134 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8135 | fi |
ba479fd2 NN |
8136 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
8137 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
8138 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
8139 | cat >>confdefs.h <<_ACEOF | |
8140 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8141 | _ACEOF | |
8142 | ||
956d6950 JL |
8143 | fi |
8144 | done | |
8145 | ||
8146 | ||
f24af81b | 8147 | # Check for thread headers. |
ca9bc441 | 8148 | echo "$as_me:$LINENO: checking for thread.h" >&5 |
ba479fd2 NN |
8149 | echo $ECHO_N "checking for thread.h... $ECHO_C" >&6 |
8150 | if test "${ac_cv_header_thread_h+set}" = set; then | |
8151 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 8152 | else |
ca9bc441 | 8153 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8154 | /* confdefs.h. */ |
8155 | _ACEOF | |
8156 | cat confdefs.h >>conftest.$ac_ext | |
8157 | cat >>conftest.$ac_ext <<_ACEOF | |
8158 | /* end confdefs.h. */ | |
8159 | #include <thread.h> | |
8160 | _ACEOF | |
8161 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8162 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8163 | ac_status=$? | |
8164 | grep -v '^ *+' conftest.er1 >conftest.err | |
8165 | rm -f conftest.er1 | |
8166 | cat conftest.err >&5 | |
8167 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8168 | (exit $ac_status); } >/dev/null; then | |
8169 | if test -s conftest.err; then | |
8170 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8171 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8172 | else |
8173 | ac_cpp_err= | |
8174 | fi | |
8175 | else | |
8176 | ac_cpp_err=yes | |
8177 | fi | |
8178 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 8179 | ac_cv_header_thread_h=yes |
ba479fd2 NN |
8180 | else |
8181 | echo "$as_me: failed program was:" >&5 | |
8182 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8183 | ||
ca9bc441 | 8184 | ac_cv_header_thread_h=no |
ba479fd2 NN |
8185 | fi |
8186 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8187 | fi |
ba479fd2 NN |
8188 | echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5 |
8189 | echo "${ECHO_T}$ac_cv_header_thread_h" >&6 | |
ba479fd2 | 8190 | if test $ac_cv_header_thread_h = yes; then |
f24af81b TT |
8191 | have_thread_h=yes |
8192 | else | |
ba479fd2 | 8193 | have_thread_h= |
f24af81b TT |
8194 | fi |
8195 | ||
ca9bc441 | 8196 | echo "$as_me:$LINENO: checking for pthread.h" >&5 |
ba479fd2 NN |
8197 | echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 |
8198 | if test "${ac_cv_header_pthread_h+set}" = set; then | |
8199 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f24af81b | 8200 | else |
ca9bc441 | 8201 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8202 | /* confdefs.h. */ |
8203 | _ACEOF | |
8204 | cat confdefs.h >>conftest.$ac_ext | |
8205 | cat >>conftest.$ac_ext <<_ACEOF | |
8206 | /* end confdefs.h. */ | |
8207 | #include <pthread.h> | |
8208 | _ACEOF | |
8209 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8210 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8211 | ac_status=$? | |
8212 | grep -v '^ *+' conftest.er1 >conftest.err | |
8213 | rm -f conftest.er1 | |
8214 | cat conftest.err >&5 | |
8215 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8216 | (exit $ac_status); } >/dev/null; then | |
8217 | if test -s conftest.err; then | |
8218 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8219 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8220 | else |
8221 | ac_cpp_err= | |
8222 | fi | |
8223 | else | |
8224 | ac_cpp_err=yes | |
8225 | fi | |
8226 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 8227 | ac_cv_header_pthread_h=yes |
ba479fd2 NN |
8228 | else |
8229 | echo "$as_me: failed program was:" >&5 | |
8230 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8231 | ||
ca9bc441 | 8232 | ac_cv_header_pthread_h=no |
ba479fd2 NN |
8233 | fi |
8234 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8235 | fi |
ba479fd2 NN |
8236 | echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 |
8237 | echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 | |
ba479fd2 | 8238 | if test $ac_cv_header_pthread_h = yes; then |
f24af81b TT |
8239 | have_pthread_h=yes |
8240 | else | |
ba479fd2 | 8241 | have_pthread_h= |
f24af81b TT |
8242 | fi |
8243 | ||
8244 | ||
84c041a1 | 8245 | # These tests can't be done till we know if we have limits.h. |
ba479fd2 NN |
8246 | echo "$as_me:$LINENO: checking for CHAR_BIT" >&5 |
8247 | echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6 | |
8248 | if test "${gcc_cv_decl_char_bit+set}" = set; then | |
8249 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8250 | else | |
8251 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8252 | /* confdefs.h. */ |
8253 | _ACEOF | |
8254 | cat confdefs.h >>conftest.$ac_ext | |
8255 | cat >>conftest.$ac_ext <<_ACEOF | |
8256 | /* end confdefs.h. */ | |
75e93faa ZW |
8257 | #ifdef HAVE_LIMITS_H |
8258 | #include <limits.h> | |
8259 | #endif | |
8260 | #ifdef CHAR_BIT | |
8261 | found | |
8262 | #endif | |
ba479fd2 | 8263 | _ACEOF |
75e93faa | 8264 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8265 | $EGREP "found" >/dev/null 2>&1; then |
75e93faa ZW |
8266 | gcc_cv_decl_char_bit=yes |
8267 | else | |
75e93faa ZW |
8268 | gcc_cv_decl_char_bit=no |
8269 | fi | |
8270 | rm -f conftest* | |
8271 | ||
8272 | ||
8273 | fi | |
ba479fd2 NN |
8274 | echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5 |
8275 | echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6 | |
75e93faa | 8276 | if test $gcc_cv_decl_char_bit = no; then |
ba479fd2 NN |
8277 | echo "$as_me:$LINENO: checking number of bits in a byte" >&5 |
8278 | echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6 | |
8279 | if test "${gcc_cv_c_nbby+set}" = set; then | |
8280 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa ZW |
8281 | else |
8282 | i=8 | |
8283 | gcc_cv_c_nbby= | |
8284 | while test $i -lt 65; do | |
ba479fd2 | 8285 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8286 | /* confdefs.h. */ |
8287 | _ACEOF | |
8288 | cat confdefs.h >>conftest.$ac_ext | |
8289 | cat >>conftest.$ac_ext <<_ACEOF | |
8290 | /* end confdefs.h. */ | |
8291 | ||
8292 | int | |
8293 | main () | |
8294 | { | |
4e70264f ZW |
8295 | switch(0) { |
8296 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
8297 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
8298 | ; } | |
ba479fd2 NN |
8299 | ; |
8300 | return 0; | |
8301 | } | |
8302 | _ACEOF | |
8303 | rm -f conftest.$ac_objext | |
8304 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8305 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8306 | ac_status=$? |
86da66b5 HPN |
8307 | grep -v '^ *+' conftest.er1 >conftest.err |
8308 | rm -f conftest.er1 | |
8309 | cat conftest.err >&5 | |
ba479fd2 NN |
8310 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8311 | (exit $ac_status); } && | |
d7974fe6 KC |
8312 | { ac_try='test -z "$ac_c_werror_flag" |
8313 | || test ! -s conftest.err' | |
86da66b5 HPN |
8314 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8315 | (eval $ac_try) 2>&5 | |
8316 | ac_status=$? | |
8317 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8318 | (exit $ac_status); }; } && | |
8319 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8320 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8321 | (eval $ac_try) 2>&5 | |
8322 | ac_status=$? | |
8323 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8324 | (exit $ac_status); }; }; then | |
4e70264f | 8325 | gcc_cv_c_nbby=$i; break |
75e93faa | 8326 | else |
ba479fd2 NN |
8327 | echo "$as_me: failed program was:" >&5 |
8328 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8329 | ||
75e93faa | 8330 | fi |
86da66b5 | 8331 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75e93faa ZW |
8332 | i=`expr $i + 1` |
8333 | done | |
8334 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
8335 | ||
8336 | fi | |
ba479fd2 NN |
8337 | echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5 |
8338 | echo "${ECHO_T}$gcc_cv_c_nbby" >&6 | |
75e93faa | 8339 | if test $gcc_cv_c_nbby = failed; then |
ba479fd2 NN |
8340 | { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5 |
8341 | echo "$as_me: error: cannot determine number of bits in a byte" >&2;} | |
8342 | { (exit 1); exit 1; }; } | |
75e93faa | 8343 | else |
ba479fd2 NN |
8344 | |
8345 | cat >>confdefs.h <<_ACEOF | |
75e93faa | 8346 | #define CHAR_BIT $gcc_cv_c_nbby |
ba479fd2 | 8347 | _ACEOF |
75e93faa ZW |
8348 | |
8349 | fi | |
8350 | fi | |
ba479fd2 NN |
8351 | echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 |
8352 | echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 | |
8353 | if test "${ac_cv_c_bigendian+set}" = set; then | |
8354 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
84c041a1 | 8355 | else |
9791c75c | 8356 | # See if sys/param.h defines the BYTE_ORDER macro. |
ba479fd2 | 8357 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8358 | /* confdefs.h. */ |
8359 | _ACEOF | |
8360 | cat confdefs.h >>conftest.$ac_ext | |
8361 | cat >>conftest.$ac_ext <<_ACEOF | |
8362 | /* end confdefs.h. */ | |
4977bab6 ZW |
8363 | #include <sys/types.h> |
8364 | #include <sys/param.h> | |
9791c75c | 8365 | |
ba479fd2 NN |
8366 | int |
8367 | main () | |
8368 | { | |
4977bab6 ZW |
8369 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
8370 | bogus endian macros | |
84c041a1 | 8371 | #endif |
9791c75c | 8372 | |
ba479fd2 NN |
8373 | ; |
8374 | return 0; | |
8375 | } | |
8376 | _ACEOF | |
8377 | rm -f conftest.$ac_objext | |
8378 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8379 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8380 | ac_status=$? |
86da66b5 HPN |
8381 | grep -v '^ *+' conftest.er1 >conftest.err |
8382 | rm -f conftest.er1 | |
8383 | cat conftest.err >&5 | |
ba479fd2 NN |
8384 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8385 | (exit $ac_status); } && | |
d7974fe6 KC |
8386 | { ac_try='test -z "$ac_c_werror_flag" |
8387 | || test ! -s conftest.err' | |
86da66b5 HPN |
8388 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8389 | (eval $ac_try) 2>&5 | |
8390 | ac_status=$? | |
8391 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8392 | (exit $ac_status); }; } && | |
8393 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8394 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8395 | (eval $ac_try) 2>&5 | |
8396 | ac_status=$? | |
8397 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8398 | (exit $ac_status); }; }; then | |
4977bab6 | 8399 | # It does; now see whether it defined to BIG_ENDIAN or not. |
ba479fd2 | 8400 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8401 | /* confdefs.h. */ |
8402 | _ACEOF | |
8403 | cat confdefs.h >>conftest.$ac_ext | |
8404 | cat >>conftest.$ac_ext <<_ACEOF | |
8405 | /* end confdefs.h. */ | |
4977bab6 ZW |
8406 | #include <sys/types.h> |
8407 | #include <sys/param.h> | |
9791c75c | 8408 | |
ba479fd2 NN |
8409 | int |
8410 | main () | |
8411 | { | |
4977bab6 ZW |
8412 | #if BYTE_ORDER != BIG_ENDIAN |
8413 | not big endian | |
84c041a1 | 8414 | #endif |
9791c75c | 8415 | |
ba479fd2 NN |
8416 | ; |
8417 | return 0; | |
8418 | } | |
8419 | _ACEOF | |
8420 | rm -f conftest.$ac_objext | |
8421 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8422 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8423 | ac_status=$? |
86da66b5 HPN |
8424 | grep -v '^ *+' conftest.er1 >conftest.err |
8425 | rm -f conftest.er1 | |
8426 | cat conftest.err >&5 | |
ba479fd2 NN |
8427 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8428 | (exit $ac_status); } && | |
d7974fe6 KC |
8429 | { ac_try='test -z "$ac_c_werror_flag" |
8430 | || test ! -s conftest.err' | |
86da66b5 HPN |
8431 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8432 | (eval $ac_try) 2>&5 | |
8433 | ac_status=$? | |
8434 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8435 | (exit $ac_status); }; } && | |
8436 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8437 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8438 | (eval $ac_try) 2>&5 | |
8439 | ac_status=$? | |
8440 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8441 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
8442 | ac_cv_c_bigendian=yes |
8443 | else | |
ba479fd2 NN |
8444 | echo "$as_me: failed program was:" >&5 |
8445 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8446 | ||
8447 | ac_cv_c_bigendian=no | |
4977bab6 | 8448 | fi |
86da66b5 | 8449 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 8450 | else |
ba479fd2 NN |
8451 | echo "$as_me: failed program was:" >&5 |
8452 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8453 | ||
9791c75c KC |
8454 | # It does not; compile a test program. |
8455 | if test "$cross_compiling" = yes; then | |
8456 | # try to guess the endianness by grepping values into an object file | |
8457 | ac_cv_c_bigendian=unknown | |
8458 | cat >conftest.$ac_ext <<_ACEOF | |
8459 | /* confdefs.h. */ | |
8460 | _ACEOF | |
8461 | cat confdefs.h >>conftest.$ac_ext | |
8462 | cat >>conftest.$ac_ext <<_ACEOF | |
8463 | /* end confdefs.h. */ | |
8464 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
8465 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
8466 | void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } | |
8467 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
8468 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
8469 | void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } | |
8470 | int | |
8471 | main () | |
8472 | { | |
8473 | _ascii (); _ebcdic (); | |
8474 | ; | |
8475 | return 0; | |
8476 | } | |
8477 | _ACEOF | |
8478 | rm -f conftest.$ac_objext | |
8479 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8480 | (eval $ac_compile) 2>conftest.er1 | |
8481 | ac_status=$? | |
8482 | grep -v '^ *+' conftest.er1 >conftest.err | |
8483 | rm -f conftest.er1 | |
8484 | cat conftest.err >&5 | |
8485 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8486 | (exit $ac_status); } && | |
d7974fe6 KC |
8487 | { ac_try='test -z "$ac_c_werror_flag" |
8488 | || test ! -s conftest.err' | |
9791c75c KC |
8489 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8490 | (eval $ac_try) 2>&5 | |
8491 | ac_status=$? | |
8492 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8493 | (exit $ac_status); }; } && | |
8494 | { ac_try='test -s conftest.$ac_objext' | |
8495 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8496 | (eval $ac_try) 2>&5 | |
8497 | ac_status=$? | |
8498 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8499 | (exit $ac_status); }; }; then | |
8500 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then | |
8501 | ac_cv_c_bigendian=yes | |
8502 | fi | |
8503 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
8504 | if test "$ac_cv_c_bigendian" = unknown; then | |
8505 | ac_cv_c_bigendian=no | |
8506 | else | |
8507 | # finding both strings is unlikely to happen, but who knows? | |
8508 | ac_cv_c_bigendian=unknown | |
8509 | fi | |
8510 | fi | |
8511 | else | |
8512 | echo "$as_me: failed program was:" >&5 | |
8513 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8514 | ||
4977bab6 | 8515 | fi |
86da66b5 | 8516 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
8517 | else |
8518 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8519 | /* confdefs.h. */ |
8520 | _ACEOF | |
8521 | cat confdefs.h >>conftest.$ac_ext | |
8522 | cat >>conftest.$ac_ext <<_ACEOF | |
8523 | /* end confdefs.h. */ | |
9791c75c KC |
8524 | int |
8525 | main () | |
8526 | { | |
4977bab6 ZW |
8527 | /* Are we little or big endian? From Harbison&Steele. */ |
8528 | union | |
8529 | { | |
8530 | long l; | |
8531 | char c[sizeof (long)]; | |
8532 | } u; | |
8533 | u.l = 1; | |
8534 | exit (u.c[sizeof (long) - 1] == 1); | |
8535 | } | |
ba479fd2 NN |
8536 | _ACEOF |
8537 | rm -f conftest$ac_exeext | |
8538 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8539 | (eval $ac_link) 2>&5 | |
8540 | ac_status=$? | |
8541 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8542 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
8543 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8544 | (eval $ac_try) 2>&5 | |
8545 | ac_status=$? | |
8546 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8547 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
8548 | ac_cv_c_bigendian=no |
8549 | else | |
ba479fd2 NN |
8550 | echo "$as_me: program exited with status $ac_status" >&5 |
8551 | echo "$as_me: failed program was:" >&5 | |
8552 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8553 | ||
8554 | ( exit $ac_status ) | |
8555 | ac_cv_c_bigendian=yes | |
4977bab6 | 8556 | fi |
86da66b5 | 8557 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
84c041a1 | 8558 | fi |
4977bab6 | 8559 | fi |
9791c75c | 8560 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 8561 | fi |
ba479fd2 NN |
8562 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 |
8563 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
9791c75c KC |
8564 | case $ac_cv_c_bigendian in |
8565 | yes) | |
ba479fd2 NN |
8566 | |
8567 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 8568 | #define WORDS_BIGENDIAN 1 |
ba479fd2 | 8569 | _ACEOF |
9791c75c KC |
8570 | ;; |
8571 | no) | |
8572 | ;; | |
8573 | *) | |
8574 | { { echo "$as_me:$LINENO: error: unknown endianness | |
8575 | presetting ac_cv_c_bigendian=no (or yes) will help" >&5 | |
8576 | echo "$as_me: error: unknown endianness | |
8577 | presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} | |
8578 | { (exit 1); exit 1; }; } ;; | |
8579 | esac | |
84c041a1 | 8580 | |
75e93faa | 8581 | |
73458fb7 NN |
8582 | # -------- |
8583 | # UNSORTED | |
8584 | # -------- | |
1e608388 | 8585 | |
73458fb7 NN |
8586 | # Stage specific cflags for build. |
8587 | stage1_cflags= | |
8588 | case $build in | |
8589 | vax-*-*) | |
8590 | if test x$GCC = xyes | |
8591 | then | |
8592 | stage1_cflags="-Wa,-J" | |
8593 | else | |
8594 | stage1_cflags="-J" | |
8595 | fi | |
8596 | ;; | |
8597 | powerpc-*-darwin*) | |
8598 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
8599 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
8600 | # Apple's GCC has bugs in designated initializer handling, so disable | |
8601 | # that too. | |
8602 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
8603 | ;; | |
8604 | esac | |
1e608388 | 8605 | |
1e608388 | 8606 | |
4e70264f ZW |
8607 | # These libraries may be used by collect2. |
8608 | # We may need a special search path to get them linked. | |
ba479fd2 NN |
8609 | echo "$as_me:$LINENO: checking for collect2 libraries" >&5 |
8610 | echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6 | |
8611 | if test "${gcc_cv_collect2_libs+set}" = set; then | |
8612 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4e70264f ZW |
8613 | else |
8614 | save_LIBS="$LIBS" | |
7f2749d4 | 8615 | for libs in '' -lld -lmld \ |
4e70264f ZW |
8616 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
8617 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
8618 | do | |
8619 | LIBS="$libs" | |
ba479fd2 | 8620 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8621 | /* confdefs.h. */ |
8622 | _ACEOF | |
8623 | cat confdefs.h >>conftest.$ac_ext | |
8624 | cat >>conftest.$ac_ext <<_ACEOF | |
8625 | /* end confdefs.h. */ | |
8626 | ||
4e70264f | 8627 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8628 | #ifdef __cplusplus |
8629 | extern "C" | |
8630 | #endif | |
4e70264f | 8631 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8632 | builtin and then its argument prototype would still apply. */ |
8633 | char ldopen (); | |
8634 | int | |
8635 | main () | |
8636 | { | |
8637 | ldopen (); | |
8638 | ; | |
8639 | return 0; | |
8640 | } | |
8641 | _ACEOF | |
8642 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8643 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8644 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8645 | ac_status=$? |
86da66b5 HPN |
8646 | grep -v '^ *+' conftest.er1 >conftest.err |
8647 | rm -f conftest.er1 | |
8648 | cat conftest.err >&5 | |
ba479fd2 NN |
8649 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8650 | (exit $ac_status); } && | |
d7974fe6 KC |
8651 | { ac_try='test -z "$ac_c_werror_flag" |
8652 | || test ! -s conftest.err' | |
86da66b5 HPN |
8653 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8654 | (eval $ac_try) 2>&5 | |
8655 | ac_status=$? | |
8656 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8657 | (exit $ac_status); }; } && | |
8658 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8659 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8660 | (eval $ac_try) 2>&5 | |
8661 | ac_status=$? | |
8662 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8663 | (exit $ac_status); }; }; then | |
4e70264f ZW |
8664 | gcc_cv_collect2_libs="$libs"; break |
8665 | else | |
ba479fd2 NN |
8666 | echo "$as_me: failed program was:" >&5 |
8667 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8668 | ||
4e70264f | 8669 | fi |
86da66b5 HPN |
8670 | rm -f conftest.err conftest.$ac_objext \ |
8671 | conftest$ac_exeext conftest.$ac_ext | |
4e70264f ZW |
8672 | done |
8673 | LIBS="$save_LIBS" | |
8674 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
8675 | fi | |
ba479fd2 NN |
8676 | echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5 |
8677 | echo "${ECHO_T}$gcc_cv_collect2_libs" >&6 | |
4e70264f ZW |
8678 | case $gcc_cv_collect2_libs in |
8679 | "none required") ;; | |
8680 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
8681 | esac | |
8682 | ||
8683 | ||
7f2749d4 RK |
8684 | # When building Ada code on Alpha, we need exc_resume which is usually in |
8685 | # -lexc. So test for it. | |
8686 | save_LIBS="$LIBS" | |
8687 | LIBS= | |
ba479fd2 NN |
8688 | echo "$as_me:$LINENO: checking for library containing exc_resume" >&5 |
8689 | echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6 | |
8690 | if test "${ac_cv_search_exc_resume+set}" = set; then | |
8691 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8692 | else | |
8693 | ac_func_search_save_LIBS=$LIBS | |
8694 | ac_cv_search_exc_resume=no | |
8695 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8696 | /* confdefs.h. */ |
8697 | _ACEOF | |
8698 | cat confdefs.h >>conftest.$ac_ext | |
8699 | cat >>conftest.$ac_ext <<_ACEOF | |
8700 | /* end confdefs.h. */ | |
7f2749d4 | 8701 | |
7f2749d4 | 8702 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8703 | #ifdef __cplusplus |
8704 | extern "C" | |
8705 | #endif | |
7f2749d4 | 8706 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8707 | builtin and then its argument prototype would still apply. */ |
8708 | char exc_resume (); | |
8709 | int | |
8710 | main () | |
8711 | { | |
8712 | exc_resume (); | |
8713 | ; | |
8714 | return 0; | |
8715 | } | |
8716 | _ACEOF | |
8717 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8718 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8719 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8720 | ac_status=$? |
86da66b5 HPN |
8721 | grep -v '^ *+' conftest.er1 >conftest.err |
8722 | rm -f conftest.er1 | |
8723 | cat conftest.err >&5 | |
ba479fd2 NN |
8724 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8725 | (exit $ac_status); } && | |
d7974fe6 KC |
8726 | { ac_try='test -z "$ac_c_werror_flag" |
8727 | || test ! -s conftest.err' | |
86da66b5 HPN |
8728 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8729 | (eval $ac_try) 2>&5 | |
8730 | ac_status=$? | |
8731 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8732 | (exit $ac_status); }; } && | |
8733 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8734 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8735 | (eval $ac_try) 2>&5 | |
8736 | ac_status=$? | |
8737 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8738 | (exit $ac_status); }; }; then | |
7f2749d4 RK |
8739 | ac_cv_search_exc_resume="none required" |
8740 | else | |
ba479fd2 NN |
8741 | echo "$as_me: failed program was:" >&5 |
8742 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8743 | ||
7f2749d4 | 8744 | fi |
86da66b5 HPN |
8745 | rm -f conftest.err conftest.$ac_objext \ |
8746 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
8747 | if test "$ac_cv_search_exc_resume" = no; then |
8748 | for ac_lib in exc; do | |
8749 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8750 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8751 | /* confdefs.h. */ |
8752 | _ACEOF | |
8753 | cat confdefs.h >>conftest.$ac_ext | |
8754 | cat >>conftest.$ac_ext <<_ACEOF | |
8755 | /* end confdefs.h. */ | |
8756 | ||
7f2749d4 | 8757 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8758 | #ifdef __cplusplus |
8759 | extern "C" | |
8760 | #endif | |
7f2749d4 | 8761 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8762 | builtin and then its argument prototype would still apply. */ |
8763 | char exc_resume (); | |
8764 | int | |
8765 | main () | |
8766 | { | |
8767 | exc_resume (); | |
8768 | ; | |
8769 | return 0; | |
8770 | } | |
8771 | _ACEOF | |
8772 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8773 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8774 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8775 | ac_status=$? |
86da66b5 HPN |
8776 | grep -v '^ *+' conftest.er1 >conftest.err |
8777 | rm -f conftest.er1 | |
8778 | cat conftest.err >&5 | |
ba479fd2 NN |
8779 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8780 | (exit $ac_status); } && | |
d7974fe6 KC |
8781 | { ac_try='test -z "$ac_c_werror_flag" |
8782 | || test ! -s conftest.err' | |
86da66b5 HPN |
8783 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8784 | (eval $ac_try) 2>&5 | |
8785 | ac_status=$? | |
8786 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8787 | (exit $ac_status); }; } && | |
8788 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8789 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8790 | (eval $ac_try) 2>&5 | |
8791 | ac_status=$? | |
8792 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8793 | (exit $ac_status); }; }; then | |
8794 | ac_cv_search_exc_resume="-l$ac_lib" | |
7f2749d4 RK |
8795 | break |
8796 | else | |
ba479fd2 NN |
8797 | echo "$as_me: failed program was:" >&5 |
8798 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8799 | ||
cafe096b | 8800 | fi |
86da66b5 HPN |
8801 | rm -f conftest.err conftest.$ac_objext \ |
8802 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 8803 | done |
6e3f3080 | 8804 | fi |
ba479fd2 NN |
8805 | LIBS=$ac_func_search_save_LIBS |
8806 | fi | |
8807 | echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5 | |
8808 | echo "${ECHO_T}$ac_cv_search_exc_resume" >&6 | |
8809 | if test "$ac_cv_search_exc_resume" != no; then | |
63cf211a | 8810 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" |
ba479fd2 | 8811 | |
7f2749d4 | 8812 | fi |
ba479fd2 | 8813 | |
7f2749d4 RK |
8814 | GNAT_LIBEXC="$LIBS" |
8815 | LIBS="$save_LIBS" | |
8816 | ||
8817 | ||
62c9aa5f ZW |
8818 | # Some systems put ldexp and frexp in libm instead of libc; assume |
8819 | # they're both in the same place. jcf-dump needs them. | |
8820 | save_LIBS="$LIBS" | |
8821 | LIBS= | |
ba479fd2 NN |
8822 | echo "$as_me:$LINENO: checking for library containing ldexp" >&5 |
8823 | echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6 | |
8824 | if test "${ac_cv_search_ldexp+set}" = set; then | |
8825 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8826 | else | |
8827 | ac_func_search_save_LIBS=$LIBS | |
8828 | ac_cv_search_ldexp=no | |
8829 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8830 | /* confdefs.h. */ |
8831 | _ACEOF | |
8832 | cat confdefs.h >>conftest.$ac_ext | |
8833 | cat >>conftest.$ac_ext <<_ACEOF | |
8834 | /* end confdefs.h. */ | |
62c9aa5f | 8835 | |
62c9aa5f | 8836 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8837 | #ifdef __cplusplus |
8838 | extern "C" | |
8839 | #endif | |
62c9aa5f | 8840 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8841 | builtin and then its argument prototype would still apply. */ |
8842 | char ldexp (); | |
8843 | int | |
8844 | main () | |
8845 | { | |
8846 | ldexp (); | |
8847 | ; | |
8848 | return 0; | |
8849 | } | |
8850 | _ACEOF | |
8851 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8852 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8853 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8854 | ac_status=$? |
86da66b5 HPN |
8855 | grep -v '^ *+' conftest.er1 >conftest.err |
8856 | rm -f conftest.er1 | |
8857 | cat conftest.err >&5 | |
ba479fd2 NN |
8858 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8859 | (exit $ac_status); } && | |
d7974fe6 KC |
8860 | { ac_try='test -z "$ac_c_werror_flag" |
8861 | || test ! -s conftest.err' | |
86da66b5 HPN |
8862 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8863 | (eval $ac_try) 2>&5 | |
8864 | ac_status=$? | |
8865 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8866 | (exit $ac_status); }; } && | |
8867 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8868 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8869 | (eval $ac_try) 2>&5 | |
8870 | ac_status=$? | |
8871 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8872 | (exit $ac_status); }; }; then | |
62c9aa5f ZW |
8873 | ac_cv_search_ldexp="none required" |
8874 | else | |
ba479fd2 NN |
8875 | echo "$as_me: failed program was:" >&5 |
8876 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8877 | ||
62c9aa5f | 8878 | fi |
86da66b5 HPN |
8879 | rm -f conftest.err conftest.$ac_objext \ |
8880 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
8881 | if test "$ac_cv_search_ldexp" = no; then |
8882 | for ac_lib in m; do | |
8883 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8884 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8885 | /* confdefs.h. */ |
8886 | _ACEOF | |
8887 | cat confdefs.h >>conftest.$ac_ext | |
8888 | cat >>conftest.$ac_ext <<_ACEOF | |
8889 | /* end confdefs.h. */ | |
8890 | ||
62c9aa5f | 8891 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8892 | #ifdef __cplusplus |
8893 | extern "C" | |
8894 | #endif | |
62c9aa5f | 8895 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8896 | builtin and then its argument prototype would still apply. */ |
8897 | char ldexp (); | |
8898 | int | |
8899 | main () | |
8900 | { | |
8901 | ldexp (); | |
8902 | ; | |
8903 | return 0; | |
8904 | } | |
8905 | _ACEOF | |
8906 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8907 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8908 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8909 | ac_status=$? |
86da66b5 HPN |
8910 | grep -v '^ *+' conftest.er1 >conftest.err |
8911 | rm -f conftest.er1 | |
8912 | cat conftest.err >&5 | |
ba479fd2 NN |
8913 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8914 | (exit $ac_status); } && | |
d7974fe6 KC |
8915 | { ac_try='test -z "$ac_c_werror_flag" |
8916 | || test ! -s conftest.err' | |
86da66b5 HPN |
8917 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8918 | (eval $ac_try) 2>&5 | |
8919 | ac_status=$? | |
8920 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8921 | (exit $ac_status); }; } && | |
8922 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8923 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8924 | (eval $ac_try) 2>&5 | |
8925 | ac_status=$? | |
8926 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8927 | (exit $ac_status); }; }; then | |
8928 | ac_cv_search_ldexp="-l$ac_lib" | |
62c9aa5f ZW |
8929 | break |
8930 | else | |
ba479fd2 NN |
8931 | echo "$as_me: failed program was:" >&5 |
8932 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8933 | ||
cafe096b | 8934 | fi |
86da66b5 HPN |
8935 | rm -f conftest.err conftest.$ac_objext \ |
8936 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 8937 | done |
6e3f3080 | 8938 | fi |
ba479fd2 NN |
8939 | LIBS=$ac_func_search_save_LIBS |
8940 | fi | |
8941 | echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5 | |
8942 | echo "${ECHO_T}$ac_cv_search_ldexp" >&6 | |
8943 | if test "$ac_cv_search_ldexp" != no; then | |
63cf211a | 8944 | test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" |
ba479fd2 | 8945 | |
62c9aa5f | 8946 | fi |
ba479fd2 | 8947 | |
62c9aa5f ZW |
8948 | LDEXP_LIB="$LIBS" |
8949 | LIBS="$save_LIBS" | |
8950 | ||
8951 | ||
956d6950 JL |
8952 | # Use <inttypes.h> only if it exists, |
8953 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
ba479fd2 NN |
8954 | echo "$as_me:$LINENO: checking for inttypes.h" >&5 |
8955 | echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 | |
8956 | if test "${gcc_cv_header_inttypes_h+set}" = set; then | |
8957 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8958 | else | |
8959 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8960 | /* confdefs.h. */ |
8961 | _ACEOF | |
8962 | cat confdefs.h >>conftest.$ac_ext | |
8963 | cat >>conftest.$ac_ext <<_ACEOF | |
8964 | /* end confdefs.h. */ | |
956d6950 JL |
8965 | #include <sys/types.h> |
8966 | #include <inttypes.h> | |
ba479fd2 NN |
8967 | int |
8968 | main () | |
8969 | { | |
956d6950 | 8970 | intmax_t i = -1; |
ba479fd2 NN |
8971 | ; |
8972 | return 0; | |
8973 | } | |
8974 | _ACEOF | |
8975 | rm -f conftest.$ac_objext | |
8976 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8977 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8978 | ac_status=$? |
86da66b5 HPN |
8979 | grep -v '^ *+' conftest.er1 >conftest.err |
8980 | rm -f conftest.er1 | |
8981 | cat conftest.err >&5 | |
ba479fd2 NN |
8982 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8983 | (exit $ac_status); } && | |
d7974fe6 KC |
8984 | { ac_try='test -z "$ac_c_werror_flag" |
8985 | || test ! -s conftest.err' | |
86da66b5 HPN |
8986 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8987 | (eval $ac_try) 2>&5 | |
8988 | ac_status=$? | |
8989 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8990 | (exit $ac_status); }; } && | |
8991 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8992 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8993 | (eval $ac_try) 2>&5 | |
8994 | ac_status=$? | |
8995 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8996 | (exit $ac_status); }; }; then | |
0056a9b5 | 8997 | gcc_cv_header_inttypes_h=yes |
956d6950 | 8998 | else |
ba479fd2 NN |
8999 | echo "$as_me: failed program was:" >&5 |
9000 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9001 | ||
9002 | gcc_cv_header_inttypes_h=no | |
956d6950 | 9003 | fi |
86da66b5 | 9004 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
9005 | fi |
9006 | ||
ba479fd2 NN |
9007 | echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5 |
9008 | echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6 | |
0056a9b5 | 9009 | if test $gcc_cv_header_inttypes_h = yes; then |
ba479fd2 NN |
9010 | |
9011 | cat >>confdefs.h <<\_ACEOF | |
0056a9b5 | 9012 | #define HAVE_INTTYPES_H 1 |
ba479fd2 | 9013 | _ACEOF |
0056a9b5 KG |
9014 | |
9015 | fi | |
956d6950 | 9016 | |
c149cc37 | 9017 | |
ba479fd2 NN |
9018 | |
9019 | ||
9020 | ||
9021 | ||
9022 | ||
9023 | ||
9024 | ||
9025 | ||
9026 | ||
9027 | ||
9028 | ||
9029 | ||
9030 | ||
9031 | ||
9032 | ||
9033 | ||
0d667716 KG |
9034 | |
9035 | ||
9036 | ||
9037 | ||
9038 | ||
9039 | ||
9040 | ||
9041 | ||
9042 | ||
9043 | ||
9044 | ||
9045 | ||
ba479fd2 NN |
9046 | |
9047 | ||
9048 | ||
9049 | ||
9050 | ||
9051 | ||
9052 | ||
9053 | ||
9054 | ||
6af8c740 | 9055 | for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \ |
0d667716 KG |
9056 | sysconf strsignal getrusage nl_langinfo scandir alphasort \ |
9057 | gettimeofday mbstowcs wcswidth mmap mincore setlocale \ | |
9058 | 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 | 9059 | do |
ba479fd2 NN |
9060 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
9061 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
9062 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
9063 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
9064 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9065 | else | |
9066 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9067 | /* confdefs.h. */ |
9068 | _ACEOF | |
9069 | cat confdefs.h >>conftest.$ac_ext | |
9070 | cat >>conftest.$ac_ext <<_ACEOF | |
9071 | /* end confdefs.h. */ | |
86da66b5 HPN |
9072 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
9073 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9074 | #define $ac_func innocuous_$ac_func | |
9075 | ||
956d6950 | 9076 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
9077 | which can conflict with char $ac_func (); below. |
9078 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9079 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 9080 | |
ba479fd2 NN |
9081 | #ifdef __STDC__ |
9082 | # include <limits.h> | |
9083 | #else | |
9084 | # include <assert.h> | |
9085 | #endif | |
86da66b5 HPN |
9086 | |
9087 | #undef $ac_func | |
9088 | ||
6e3f3080 | 9089 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9090 | #ifdef __cplusplus |
9091 | extern "C" | |
9092 | { | |
9093 | #endif | |
6e3f3080 | 9094 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9095 | builtin and then its argument prototype would still apply. */ |
9096 | char $ac_func (); | |
956d6950 JL |
9097 | /* The GNU C library defines this for functions which it implements |
9098 | to always fail with ENOSYS. Some functions are actually named | |
9099 | something starting with __ and the normal name is an alias. */ | |
9100 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
9101 | choke me | |
9102 | #else | |
ba479fd2 NN |
9103 | char (*f) () = $ac_func; |
9104 | #endif | |
9105 | #ifdef __cplusplus | |
9106 | } | |
956d6950 JL |
9107 | #endif |
9108 | ||
ba479fd2 NN |
9109 | int |
9110 | main () | |
9111 | { | |
9112 | return f != $ac_func; | |
9113 | ; | |
9114 | return 0; | |
9115 | } | |
9116 | _ACEOF | |
9117 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9118 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9119 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9120 | ac_status=$? |
86da66b5 HPN |
9121 | grep -v '^ *+' conftest.er1 >conftest.err |
9122 | rm -f conftest.er1 | |
9123 | cat conftest.err >&5 | |
ba479fd2 NN |
9124 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9125 | (exit $ac_status); } && | |
d7974fe6 KC |
9126 | { ac_try='test -z "$ac_c_werror_flag" |
9127 | || test ! -s conftest.err' | |
86da66b5 HPN |
9128 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9129 | (eval $ac_try) 2>&5 | |
9130 | ac_status=$? | |
9131 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9132 | (exit $ac_status); }; } && | |
9133 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9134 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9135 | (eval $ac_try) 2>&5 | |
9136 | ac_status=$? | |
9137 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9138 | (exit $ac_status); }; }; then | |
9139 | eval "$as_ac_var=yes" | |
9140 | else | |
9141 | echo "$as_me: failed program was:" >&5 | |
9142 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9143 | ||
9144 | eval "$as_ac_var=no" | |
9145 | fi | |
86da66b5 HPN |
9146 | rm -f conftest.err conftest.$ac_objext \ |
9147 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
9148 | fi |
9149 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
9150 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
9151 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
9152 | cat >>confdefs.h <<_ACEOF | |
9153 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9154 | _ACEOF | |
956d6950 | 9155 | |
956d6950 JL |
9156 | fi |
9157 | done | |
9158 | ||
6885fc87 | 9159 | |
39f6c4c8 | 9160 | if test x$ac_cv_func_mbstowcs = xyes; then |
ba479fd2 NN |
9161 | echo "$as_me:$LINENO: checking whether mbstowcs works" >&5 |
9162 | echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6 | |
9163 | if test "${gcc_cv_func_mbstowcs_works+set}" = set; then | |
9164 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
39f6c4c8 KW |
9165 | else |
9166 | if test "$cross_compiling" = yes; then | |
9167 | gcc_cv_func_mbstowcs_works=yes | |
9168 | else | |
ba479fd2 | 9169 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9170 | /* confdefs.h. */ |
9171 | _ACEOF | |
9172 | cat confdefs.h >>conftest.$ac_ext | |
9173 | cat >>conftest.$ac_ext <<_ACEOF | |
9174 | /* end confdefs.h. */ | |
39f6c4c8 KW |
9175 | #include <stdlib.h> |
9176 | int main() | |
9177 | { | |
9178 | mbstowcs(0, "", 0); | |
9179 | return 0; | |
9180 | } | |
ba479fd2 NN |
9181 | _ACEOF |
9182 | rm -f conftest$ac_exeext | |
9183 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9184 | (eval $ac_link) 2>&5 | |
9185 | ac_status=$? | |
9186 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9187 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9188 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9189 | (eval $ac_try) 2>&5 | |
9190 | ac_status=$? | |
9191 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9192 | (exit $ac_status); }; }; then | |
39f6c4c8 KW |
9193 | gcc_cv_func_mbstowcs_works=yes |
9194 | else | |
ba479fd2 NN |
9195 | echo "$as_me: program exited with status $ac_status" >&5 |
9196 | echo "$as_me: failed program was:" >&5 | |
9197 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9198 | ||
9199 | ( exit $ac_status ) | |
9200 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 9201 | fi |
86da66b5 | 9202 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
39f6c4c8 | 9203 | fi |
39f6c4c8 | 9204 | fi |
ba479fd2 NN |
9205 | echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5 |
9206 | echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6 | |
63cf211a | 9207 | if test x$gcc_cv_func_mbstowcs_works = xyes; then |
ba479fd2 NN |
9208 | |
9209 | cat >>confdefs.h <<\_ACEOF | |
39f6c4c8 | 9210 | #define HAVE_WORKING_MBSTOWCS 1 |
ba479fd2 | 9211 | _ACEOF |
39f6c4c8 KW |
9212 | |
9213 | fi | |
9214 | fi | |
9215 | ||
ba479fd2 NN |
9216 | echo "$as_me:$LINENO: checking for ssize_t" >&5 |
9217 | echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 | |
9218 | if test "${ac_cv_type_ssize_t+set}" = set; then | |
9219 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
63cf211a | 9220 | else |
ba479fd2 | 9221 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9222 | /* confdefs.h. */ |
9223 | _ACEOF | |
9224 | cat confdefs.h >>conftest.$ac_ext | |
9225 | cat >>conftest.$ac_ext <<_ACEOF | |
9226 | /* end confdefs.h. */ | |
8b4fc07a NN |
9227 | $ac_includes_default |
9228 | int | |
9229 | main () | |
9230 | { | |
9231 | if ((ssize_t *) 0) | |
9232 | return 0; | |
9233 | if (sizeof (ssize_t)) | |
9234 | return 0; | |
9235 | ; | |
9236 | return 0; | |
9237 | } | |
ba479fd2 | 9238 | _ACEOF |
8b4fc07a NN |
9239 | rm -f conftest.$ac_objext |
9240 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9241 | (eval $ac_compile) 2>conftest.er1 |
8b4fc07a | 9242 | ac_status=$? |
86da66b5 HPN |
9243 | grep -v '^ *+' conftest.er1 >conftest.err |
9244 | rm -f conftest.er1 | |
9245 | cat conftest.err >&5 | |
8b4fc07a NN |
9246 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9247 | (exit $ac_status); } && | |
d7974fe6 KC |
9248 | { ac_try='test -z "$ac_c_werror_flag" |
9249 | || test ! -s conftest.err' | |
86da66b5 HPN |
9250 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9251 | (eval $ac_try) 2>&5 | |
9252 | ac_status=$? | |
9253 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9254 | (exit $ac_status); }; } && | |
9255 | { ac_try='test -s conftest.$ac_objext' | |
8b4fc07a NN |
9256 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9257 | (eval $ac_try) 2>&5 | |
9258 | ac_status=$? | |
9259 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9260 | (exit $ac_status); }; }; then | |
cb65112a | 9261 | ac_cv_type_ssize_t=yes |
f12bc141 | 9262 | else |
8b4fc07a NN |
9263 | echo "$as_me: failed program was:" >&5 |
9264 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 9265 | |
8b4fc07a NN |
9266 | ac_cv_type_ssize_t=no |
9267 | fi | |
86da66b5 | 9268 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 9269 | fi |
ba479fd2 NN |
9270 | echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 |
9271 | echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 | |
8b4fc07a NN |
9272 | if test $ac_cv_type_ssize_t = yes; then |
9273 | : | |
9274 | else | |
ba479fd2 | 9275 | |
8b4fc07a | 9276 | cat >>confdefs.h <<_ACEOF |
f12bc141 | 9277 | #define ssize_t int |
ba479fd2 | 9278 | _ACEOF |
f12bc141 ZW |
9279 | |
9280 | fi | |
9281 | ||
0b9d02c6 | 9282 | |
e256b8b6 DA |
9283 | # Try to determine the array type of the second argument of getgroups |
9284 | # for the target system (int or gid_t). | |
ba479fd2 NN |
9285 | echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 |
9286 | echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 | |
9287 | if test "${ac_cv_type_uid_t+set}" = set; then | |
9288 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9289 | else | |
9290 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9291 | /* confdefs.h. */ |
9292 | _ACEOF | |
9293 | cat confdefs.h >>conftest.$ac_ext | |
9294 | cat >>conftest.$ac_ext <<_ACEOF | |
9295 | /* end confdefs.h. */ | |
e256b8b6 | 9296 | #include <sys/types.h> |
ba479fd2 NN |
9297 | |
9298 | _ACEOF | |
e256b8b6 | 9299 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9300 | $EGREP "uid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
9301 | ac_cv_type_uid_t=yes |
9302 | else | |
e256b8b6 DA |
9303 | ac_cv_type_uid_t=no |
9304 | fi | |
9305 | rm -f conftest* | |
9306 | ||
9307 | fi | |
ba479fd2 NN |
9308 | echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 |
9309 | echo "${ECHO_T}$ac_cv_type_uid_t" >&6 | |
63cf211a | 9310 | if test $ac_cv_type_uid_t = no; then |
ba479fd2 NN |
9311 | |
9312 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 9313 | #define uid_t int |
ba479fd2 | 9314 | _ACEOF |
cafe096b | 9315 | |
ba479fd2 NN |
9316 | |
9317 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 9318 | #define gid_t int |
ba479fd2 | 9319 | _ACEOF |
e256b8b6 DA |
9320 | |
9321 | fi | |
9322 | ||
ba479fd2 NN |
9323 | echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 |
9324 | echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 | |
9325 | if test "${ac_cv_type_getgroups+set}" = set; then | |
9326 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e256b8b6 DA |
9327 | else |
9328 | if test "$cross_compiling" = yes; then | |
9329 | ac_cv_type_getgroups=cross | |
9330 | else | |
ba479fd2 | 9331 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9332 | /* confdefs.h. */ |
9333 | _ACEOF | |
9334 | cat confdefs.h >>conftest.$ac_ext | |
9335 | cat >>conftest.$ac_ext <<_ACEOF | |
9336 | /* end confdefs.h. */ | |
e256b8b6 DA |
9337 | /* Thanks to Mike Rendell for this test. */ |
9338 | #include <sys/types.h> | |
9339 | #define NGID 256 | |
9340 | #undef MAX | |
9341 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
ba479fd2 NN |
9342 | |
9343 | int | |
9344 | main () | |
e256b8b6 DA |
9345 | { |
9346 | gid_t gidset[NGID]; | |
9347 | int i, n; | |
9348 | union { gid_t gval; long lval; } val; | |
9349 | ||
9350 | val.lval = -1; | |
9351 | for (i = 0; i < NGID; i++) | |
9352 | gidset[i] = val.gval; | |
9353 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
86da66b5 | 9354 | gidset); |
e256b8b6 DA |
9355 | /* Exit non-zero if getgroups seems to require an array of ints. This |
9356 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
9357 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
63cf211a | 9358 | } |
ba479fd2 NN |
9359 | _ACEOF |
9360 | rm -f conftest$ac_exeext | |
9361 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9362 | (eval $ac_link) 2>&5 | |
9363 | ac_status=$? | |
9364 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9365 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9366 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9367 | (eval $ac_try) 2>&5 | |
9368 | ac_status=$? | |
9369 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9370 | (exit $ac_status); }; }; then | |
9371 | ac_cv_type_getgroups=gid_t | |
63cf211a | 9372 | else |
ba479fd2 NN |
9373 | echo "$as_me: program exited with status $ac_status" >&5 |
9374 | echo "$as_me: failed program was:" >&5 | |
9375 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9376 | ||
9377 | ( exit $ac_status ) | |
9378 | ac_cv_type_getgroups=int | |
e256b8b6 | 9379 | fi |
86da66b5 | 9380 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
e256b8b6 | 9381 | fi |
e256b8b6 | 9382 | if test $ac_cv_type_getgroups = cross; then |
ba479fd2 | 9383 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9384 | /* confdefs.h. */ |
9385 | _ACEOF | |
9386 | cat confdefs.h >>conftest.$ac_ext | |
9387 | cat >>conftest.$ac_ext <<_ACEOF | |
9388 | /* end confdefs.h. */ | |
e256b8b6 | 9389 | #include <unistd.h> |
ba479fd2 NN |
9390 | |
9391 | _ACEOF | |
e256b8b6 | 9392 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9393 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
9394 | ac_cv_type_getgroups=gid_t |
9395 | else | |
e256b8b6 DA |
9396 | ac_cv_type_getgroups=int |
9397 | fi | |
9398 | rm -f conftest* | |
9399 | ||
9400 | fi | |
9401 | fi | |
ba479fd2 NN |
9402 | echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 |
9403 | echo "${ECHO_T}$ac_cv_type_getgroups" >&6 | |
e256b8b6 | 9404 | |
ba479fd2 | 9405 | cat >>confdefs.h <<_ACEOF |
e256b8b6 | 9406 | #define GETGROUPS_T $ac_cv_type_getgroups |
ba479fd2 | 9407 | _ACEOF |
e256b8b6 DA |
9408 | |
9409 | ||
9410 | if test "${target}" = "${build}"; then | |
9411 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
9412 | else | |
9413 | case "${target}" in | |
9414 | # This condition may need some tweaking. It should include all | |
9415 | # targets where the array type of the second argument of getgroups | |
9416 | # is int and the type of gid_t is not equivalent to int. | |
9417 | *-*-sunos* | *-*-ultrix*) | |
9418 | TARGET_GETGROUPS_T=int | |
9419 | ;; | |
9420 | *) | |
9421 | TARGET_GETGROUPS_T=gid_t | |
9422 | ;; | |
9423 | esac | |
9424 | fi | |
9425 | ||
9426 | ||
ba479fd2 NN |
9427 | echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5 |
9428 | echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6 | |
9429 | if test "${gcc_cv_func_printf_ptr+set}" = set; then | |
9430 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
9431 | else |
9432 | if test "$cross_compiling" = yes; then | |
9433 | gcc_cv_func_printf_ptr=no | |
9434 | else | |
ba479fd2 | 9435 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9436 | /* confdefs.h. */ |
9437 | _ACEOF | |
9438 | cat confdefs.h >>conftest.$ac_ext | |
9439 | cat >>conftest.$ac_ext <<_ACEOF | |
9440 | /* end confdefs.h. */ | |
0a4b6309 RL |
9441 | #include <stdio.h> |
9442 | ||
86cf1cbd | 9443 | int main() |
0a4b6309 RL |
9444 | { |
9445 | char buf[64]; | |
9446 | char *p = buf, *q = NULL; | |
9447 | sprintf(buf, "%p", p); | |
9448 | sscanf(buf, "%p", &q); | |
86cf1cbd | 9449 | return (p != q); |
0a4b6309 | 9450 | } |
ba479fd2 NN |
9451 | _ACEOF |
9452 | rm -f conftest$ac_exeext | |
9453 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9454 | (eval $ac_link) 2>&5 | |
9455 | ac_status=$? | |
9456 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9457 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9458 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9459 | (eval $ac_try) 2>&5 | |
9460 | ac_status=$? | |
9461 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9462 | (exit $ac_status); }; }; then | |
0a4b6309 RL |
9463 | gcc_cv_func_printf_ptr=yes |
9464 | else | |
ba479fd2 NN |
9465 | echo "$as_me: program exited with status $ac_status" >&5 |
9466 | echo "$as_me: failed program was:" >&5 | |
9467 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9468 | ||
9469 | ( exit $ac_status ) | |
9470 | gcc_cv_func_printf_ptr=no | |
0a4b6309 | 9471 | fi |
86da66b5 | 9472 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
0a4b6309 | 9473 | fi |
0a4b6309 RL |
9474 | rm -f core core.* *.core |
9475 | fi | |
ba479fd2 NN |
9476 | echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5 |
9477 | echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6 | |
63cf211a | 9478 | if test $gcc_cv_func_printf_ptr = yes ; then |
ba479fd2 NN |
9479 | |
9480 | cat >>confdefs.h <<\_ACEOF | |
0a4b6309 | 9481 | #define HAVE_PRINTF_PTR 1 |
ba479fd2 | 9482 | _ACEOF |
0a4b6309 RL |
9483 | |
9484 | fi | |
9485 | ||
3b0727a0 MR |
9486 | |
9487 | echo "$as_me:$LINENO: checking for sys/mman.h" >&5 | |
9488 | echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6 | |
9489 | if test "${ac_cv_header_sys_mman_h+set}" = set; then | |
9490 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9491 | else | |
9492 | cat >conftest.$ac_ext <<_ACEOF | |
9493 | /* confdefs.h. */ | |
9494 | _ACEOF | |
9495 | cat confdefs.h >>conftest.$ac_ext | |
9496 | cat >>conftest.$ac_ext <<_ACEOF | |
9497 | /* end confdefs.h. */ | |
9498 | #include <sys/mman.h> | |
9499 | _ACEOF | |
9500 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
9501 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
9502 | ac_status=$? | |
9503 | grep -v '^ *+' conftest.er1 >conftest.err | |
9504 | rm -f conftest.er1 | |
9505 | cat conftest.err >&5 | |
9506 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9507 | (exit $ac_status); } >/dev/null; then | |
9508 | if test -s conftest.err; then | |
9509 | ac_cpp_err=$ac_c_preproc_warn_flag | |
9510 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
9511 | else | |
9512 | ac_cpp_err= | |
9513 | fi | |
9514 | else | |
9515 | ac_cpp_err=yes | |
9516 | fi | |
9517 | if test -z "$ac_cpp_err"; then | |
9518 | ac_cv_header_sys_mman_h=yes | |
9519 | else | |
9520 | echo "$as_me: failed program was:" >&5 | |
9521 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9522 | ||
9523 | ac_cv_header_sys_mman_h=no | |
9524 | fi | |
9525 | rm -f conftest.err conftest.$ac_ext | |
9526 | fi | |
9527 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5 | |
9528 | echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6 | |
9529 | if test $ac_cv_header_sys_mman_h = yes; then | |
9530 | gcc_header_sys_mman_h=yes | |
9531 | else | |
9532 | gcc_header_sys_mman_h=no | |
9533 | fi | |
9534 | ||
9535 | echo "$as_me:$LINENO: checking for mmap" >&5 | |
9536 | echo $ECHO_N "checking for mmap... $ECHO_C" >&6 | |
9537 | if test "${ac_cv_func_mmap+set}" = set; then | |
9538 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9539 | else | |
9540 | cat >conftest.$ac_ext <<_ACEOF | |
9541 | /* confdefs.h. */ | |
9542 | _ACEOF | |
9543 | cat confdefs.h >>conftest.$ac_ext | |
9544 | cat >>conftest.$ac_ext <<_ACEOF | |
9545 | /* end confdefs.h. */ | |
9546 | /* Define mmap to an innocuous variant, in case <limits.h> declares mmap. | |
9547 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9548 | #define mmap innocuous_mmap | |
9549 | ||
9550 | /* System header to define __stub macros and hopefully few prototypes, | |
9551 | which can conflict with char mmap (); below. | |
9552 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9553 | <limits.h> exists even on freestanding compilers. */ | |
9554 | ||
9555 | #ifdef __STDC__ | |
9556 | # include <limits.h> | |
9557 | #else | |
9558 | # include <assert.h> | |
9559 | #endif | |
9560 | ||
9561 | #undef mmap | |
9562 | ||
9563 | /* Override any gcc2 internal prototype to avoid an error. */ | |
9564 | #ifdef __cplusplus | |
9565 | extern "C" | |
9566 | { | |
9567 | #endif | |
9568 | /* We use char because int might match the return type of a gcc2 | |
9569 | builtin and then its argument prototype would still apply. */ | |
9570 | char mmap (); | |
9571 | /* The GNU C library defines this for functions which it implements | |
9572 | to always fail with ENOSYS. Some functions are actually named | |
9573 | something starting with __ and the normal name is an alias. */ | |
9574 | #if defined (__stub_mmap) || defined (__stub___mmap) | |
9575 | choke me | |
9576 | #else | |
9577 | char (*f) () = mmap; | |
9578 | #endif | |
9579 | #ifdef __cplusplus | |
9580 | } | |
9581 | #endif | |
9582 | ||
9583 | int | |
9584 | main () | |
9585 | { | |
9586 | return f != mmap; | |
9587 | ; | |
9588 | return 0; | |
9589 | } | |
9590 | _ACEOF | |
9591 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9592 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9593 | (eval $ac_link) 2>conftest.er1 | |
9594 | ac_status=$? | |
9595 | grep -v '^ *+' conftest.er1 >conftest.err | |
9596 | rm -f conftest.er1 | |
9597 | cat conftest.err >&5 | |
9598 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9599 | (exit $ac_status); } && | |
d7974fe6 KC |
9600 | { ac_try='test -z "$ac_c_werror_flag" |
9601 | || test ! -s conftest.err' | |
3b0727a0 MR |
9602 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9603 | (eval $ac_try) 2>&5 | |
9604 | ac_status=$? | |
9605 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9606 | (exit $ac_status); }; } && | |
9607 | { ac_try='test -s conftest$ac_exeext' | |
9608 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9609 | (eval $ac_try) 2>&5 | |
9610 | ac_status=$? | |
9611 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9612 | (exit $ac_status); }; }; then | |
9613 | ac_cv_func_mmap=yes | |
9614 | else | |
9615 | echo "$as_me: failed program was:" >&5 | |
9616 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9617 | ||
9618 | ac_cv_func_mmap=no | |
9619 | fi | |
9620 | rm -f conftest.err conftest.$ac_objext \ | |
9621 | conftest$ac_exeext conftest.$ac_ext | |
9622 | fi | |
9623 | echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 | |
9624 | echo "${ECHO_T}$ac_cv_func_mmap" >&6 | |
9625 | if test $ac_cv_func_mmap = yes; then | |
9626 | gcc_func_mmap=yes | |
9627 | else | |
9628 | gcc_func_mmap=no | |
9629 | fi | |
9630 | ||
9631 | if test "$gcc_header_sys_mman_h" != yes \ | |
9632 | || test "$gcc_func_mmap" != yes; then | |
1072ec3f ZW |
9633 | gcc_cv_func_mmap_file=no |
9634 | gcc_cv_func_mmap_dev_zero=no | |
9635 | gcc_cv_func_mmap_anon=no | |
9636 | else | |
ba479fd2 NN |
9637 | echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5 |
9638 | echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6 | |
9639 | if test "${gcc_cv_func_mmap_file+set}" = set; then | |
9640 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f | 9641 | else |
ba479fd2 | 9642 | # Add a system to this blacklist if |
1072ec3f ZW |
9643 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a |
9644 | # memory area containing the same data that you'd get if you applied | |
9645 | # read() to the same fd. The only system known to have a problem here | |
9646 | # is VMS, where text files have record structure. | |
9647 | case "$host_os" in | |
ba479fd2 | 9648 | vms* | ultrix*) |
1072ec3f ZW |
9649 | gcc_cv_func_mmap_file=no ;; |
9650 | *) | |
9651 | gcc_cv_func_mmap_file=yes;; | |
9652 | esac | |
9653 | fi | |
ba479fd2 NN |
9654 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5 |
9655 | echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6 | |
9656 | echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5 | |
9657 | echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6 | |
9658 | if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then | |
9659 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
9660 | else |
9661 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
9662 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
9663 | # zeroed pages with both the following properties: | |
9664 | # 1. If you map N consecutive pages in with one call, and then | |
9665 | # unmap any subset of those pages, the pages that were not | |
9666 | # explicitly unmapped remain accessible. | |
9667 | # 2. If you map two adjacent blocks of memory and then unmap them | |
9668 | # both at once, they must both go away. | |
9669 | # Systems known to be in this category are Windows (all variants), | |
9670 | # VMS, and Darwin. | |
9671 | case "$host_os" in | |
2ce240d3 | 9672 | vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) |
1072ec3f ZW |
9673 | gcc_cv_func_mmap_dev_zero=no ;; |
9674 | *) | |
9675 | gcc_cv_func_mmap_dev_zero=yes;; | |
9676 | esac | |
9677 | fi | |
ba479fd2 NN |
9678 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5 |
9679 | echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6 | |
1072ec3f ZW |
9680 | |
9681 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
ba479fd2 NN |
9682 | echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5 |
9683 | echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6 | |
9684 | if test "${gcc_cv_decl_map_anon+set}" = set; then | |
9685 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9686 | else | |
9687 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9688 | /* confdefs.h. */ |
9689 | _ACEOF | |
9690 | cat confdefs.h >>conftest.$ac_ext | |
9691 | cat >>conftest.$ac_ext <<_ACEOF | |
9692 | /* end confdefs.h. */ | |
1072ec3f ZW |
9693 | #include <sys/types.h> |
9694 | #include <sys/mman.h> | |
9695 | #include <unistd.h> | |
9696 | ||
9697 | #ifndef MAP_ANONYMOUS | |
9698 | #define MAP_ANONYMOUS MAP_ANON | |
9699 | #endif | |
9700 | ||
ba479fd2 NN |
9701 | int |
9702 | main () | |
9703 | { | |
1072ec3f | 9704 | int n = MAP_ANONYMOUS; |
ba479fd2 NN |
9705 | ; |
9706 | return 0; | |
9707 | } | |
9708 | _ACEOF | |
9709 | rm -f conftest.$ac_objext | |
9710 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9711 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9712 | ac_status=$? |
86da66b5 HPN |
9713 | grep -v '^ *+' conftest.er1 >conftest.err |
9714 | rm -f conftest.er1 | |
9715 | cat conftest.err >&5 | |
ba479fd2 NN |
9716 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9717 | (exit $ac_status); } && | |
d7974fe6 KC |
9718 | { ac_try='test -z "$ac_c_werror_flag" |
9719 | || test ! -s conftest.err' | |
86da66b5 HPN |
9720 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9721 | (eval $ac_try) 2>&5 | |
9722 | ac_status=$? | |
9723 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9724 | (exit $ac_status); }; } && | |
9725 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9726 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9727 | (eval $ac_try) 2>&5 | |
9728 | ac_status=$? | |
9729 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9730 | (exit $ac_status); }; }; then | |
1072ec3f ZW |
9731 | gcc_cv_decl_map_anon=yes |
9732 | else | |
ba479fd2 NN |
9733 | echo "$as_me: failed program was:" >&5 |
9734 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9735 | ||
9736 | gcc_cv_decl_map_anon=no | |
1072ec3f | 9737 | fi |
86da66b5 | 9738 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
1072ec3f | 9739 | fi |
ba479fd2 NN |
9740 | echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5 |
9741 | echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6 | |
1072ec3f ZW |
9742 | |
9743 | if test $gcc_cv_decl_map_anon = no; then | |
9744 | gcc_cv_func_mmap_anon=no | |
9745 | else | |
ba479fd2 NN |
9746 | echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
9747 | echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6 | |
9748 | if test "${gcc_cv_func_mmap_anon+set}" = set; then | |
9749 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
9750 | else |
9751 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
9752 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
9753 | # doesn't give anonymous zeroed pages with the same properties listed | |
9754 | # above for use of /dev/zero. | |
9755 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
9756 | case "$host_os" in | |
9757 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
9758 | gcc_cv_func_mmap_anon=no ;; | |
9759 | *) | |
9760 | gcc_cv_func_mmap_anon=yes;; | |
9761 | esac | |
9762 | fi | |
ba479fd2 NN |
9763 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5 |
9764 | echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6 | |
1072ec3f ZW |
9765 | fi |
9766 | fi | |
9767 | ||
9768 | if test $gcc_cv_func_mmap_file = yes; then | |
ba479fd2 NN |
9769 | |
9770 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9771 | #define HAVE_MMAP_FILE 1 |
ba479fd2 | 9772 | _ACEOF |
1072ec3f ZW |
9773 | |
9774 | fi | |
9775 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
ba479fd2 NN |
9776 | |
9777 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9778 | #define HAVE_MMAP_DEV_ZERO 1 |
ba479fd2 | 9779 | _ACEOF |
1072ec3f ZW |
9780 | |
9781 | fi | |
9782 | if test $gcc_cv_func_mmap_anon = yes; then | |
ba479fd2 NN |
9783 | |
9784 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9785 | #define HAVE_MMAP_ANON 1 |
ba479fd2 | 9786 | _ACEOF |
1072ec3f ZW |
9787 | |
9788 | fi | |
9789 | ||
b27d2bd5 MK |
9790 | |
9791 | case "${host}" in | |
ee262b6f | 9792 | *-*-*vms*) |
ba479fd2 | 9793 | # Under VMS, vfork works very differently than on Unix. The standard test |
ee262b6f DR |
9794 | # won't work, and it isn't easily adaptable. It makes more sense to |
9795 | # just force it. | |
9796 | ac_cv_func_vfork_works=yes | |
9797 | ;; | |
b27d2bd5 | 9798 | esac |
ba479fd2 NN |
9799 | echo "$as_me:$LINENO: checking for pid_t" >&5 |
9800 | echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 | |
9801 | if test "${ac_cv_type_pid_t+set}" = set; then | |
9802 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9803 | else | |
9804 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9805 | /* confdefs.h. */ |
9806 | _ACEOF | |
9807 | cat confdefs.h >>conftest.$ac_ext | |
9808 | cat >>conftest.$ac_ext <<_ACEOF | |
9809 | /* end confdefs.h. */ | |
9810 | $ac_includes_default | |
9811 | int | |
9812 | main () | |
9813 | { | |
9814 | if ((pid_t *) 0) | |
9815 | return 0; | |
9816 | if (sizeof (pid_t)) | |
9817 | return 0; | |
9818 | ; | |
9819 | return 0; | |
9820 | } | |
9821 | _ACEOF | |
9822 | rm -f conftest.$ac_objext | |
9823 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9824 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9825 | ac_status=$? |
86da66b5 HPN |
9826 | grep -v '^ *+' conftest.er1 >conftest.err |
9827 | rm -f conftest.er1 | |
9828 | cat conftest.err >&5 | |
ba479fd2 NN |
9829 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9830 | (exit $ac_status); } && | |
d7974fe6 KC |
9831 | { ac_try='test -z "$ac_c_werror_flag" |
9832 | || test ! -s conftest.err' | |
86da66b5 HPN |
9833 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9834 | (eval $ac_try) 2>&5 | |
9835 | ac_status=$? | |
9836 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9837 | (exit $ac_status); }; } && | |
9838 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9839 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9840 | (eval $ac_try) 2>&5 | |
9841 | ac_status=$? | |
9842 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9843 | (exit $ac_status); }; }; then | |
cb65112a | 9844 | ac_cv_type_pid_t=yes |
c375c43b | 9845 | else |
ba479fd2 NN |
9846 | echo "$as_me: failed program was:" >&5 |
9847 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 9848 | |
ba479fd2 NN |
9849 | ac_cv_type_pid_t=no |
9850 | fi | |
86da66b5 | 9851 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 9852 | fi |
ba479fd2 NN |
9853 | echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 |
9854 | echo "${ECHO_T}$ac_cv_type_pid_t" >&6 | |
9855 | if test $ac_cv_type_pid_t = yes; then | |
9856 | : | |
9857 | else | |
9858 | ||
9859 | cat >>confdefs.h <<_ACEOF | |
c375c43b | 9860 | #define pid_t int |
ba479fd2 | 9861 | _ACEOF |
c375c43b KG |
9862 | |
9863 | fi | |
9864 | ||
ba479fd2 NN |
9865 | |
9866 | ||
9867 | for ac_header in unistd.h vfork.h | |
9868 | do | |
9869 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
ca9bc441 | 9870 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
9871 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
9872 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
9873 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 9874 | else |
ca9bc441 | 9875 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9876 | /* confdefs.h. */ |
9877 | _ACEOF | |
9878 | cat confdefs.h >>conftest.$ac_ext | |
9879 | cat >>conftest.$ac_ext <<_ACEOF | |
9880 | /* end confdefs.h. */ | |
9881 | #include <$ac_header> | |
9882 | _ACEOF | |
9883 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
9884 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
9885 | ac_status=$? | |
9886 | grep -v '^ *+' conftest.er1 >conftest.err | |
9887 | rm -f conftest.er1 | |
9888 | cat conftest.err >&5 | |
9889 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9890 | (exit $ac_status); } >/dev/null; then | |
9891 | if test -s conftest.err; then | |
9892 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 9893 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
9894 | else |
9895 | ac_cpp_err= | |
9896 | fi | |
093e61a6 | 9897 | else |
ba479fd2 NN |
9898 | ac_cpp_err=yes |
9899 | fi | |
9900 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 9901 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
9902 | else |
9903 | echo "$as_me: failed program was:" >&5 | |
9904 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9905 | ||
ca9bc441 | 9906 | eval "$as_ac_Header=no" |
ba479fd2 NN |
9907 | fi |
9908 | rm -f conftest.err conftest.$ac_ext | |
c375c43b | 9909 | fi |
ba479fd2 NN |
9910 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
9911 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
9912 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
9913 | cat >>confdefs.h <<_ACEOF | |
9914 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9915 | _ACEOF | |
6e3f3080 NN |
9916 | |
9917 | fi | |
ba479fd2 NN |
9918 | done |
9919 | ||
9920 | ||
9921 | ||
9922 | for ac_func in fork vfork | |
9923 | do | |
9924 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9925 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
9926 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
9927 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
9928 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9929 | else | |
9930 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9931 | /* confdefs.h. */ |
9932 | _ACEOF | |
9933 | cat confdefs.h >>conftest.$ac_ext | |
9934 | cat >>conftest.$ac_ext <<_ACEOF | |
9935 | /* end confdefs.h. */ | |
86da66b5 HPN |
9936 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
9937 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9938 | #define $ac_func innocuous_$ac_func | |
9939 | ||
c375c43b | 9940 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
9941 | which can conflict with char $ac_func (); below. |
9942 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9943 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 9944 | |
ba479fd2 NN |
9945 | #ifdef __STDC__ |
9946 | # include <limits.h> | |
9947 | #else | |
9948 | # include <assert.h> | |
9949 | #endif | |
86da66b5 HPN |
9950 | |
9951 | #undef $ac_func | |
9952 | ||
6e3f3080 | 9953 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9954 | #ifdef __cplusplus |
9955 | extern "C" | |
9956 | { | |
9957 | #endif | |
6e3f3080 | 9958 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9959 | builtin and then its argument prototype would still apply. */ |
9960 | char $ac_func (); | |
c375c43b KG |
9961 | /* The GNU C library defines this for functions which it implements |
9962 | to always fail with ENOSYS. Some functions are actually named | |
9963 | something starting with __ and the normal name is an alias. */ | |
ba479fd2 | 9964 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
c375c43b KG |
9965 | choke me |
9966 | #else | |
ba479fd2 NN |
9967 | char (*f) () = $ac_func; |
9968 | #endif | |
9969 | #ifdef __cplusplus | |
9970 | } | |
c375c43b KG |
9971 | #endif |
9972 | ||
ba479fd2 NN |
9973 | int |
9974 | main () | |
9975 | { | |
9976 | return f != $ac_func; | |
9977 | ; | |
9978 | return 0; | |
9979 | } | |
9980 | _ACEOF | |
9981 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9982 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9983 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9984 | ac_status=$? |
86da66b5 HPN |
9985 | grep -v '^ *+' conftest.er1 >conftest.err |
9986 | rm -f conftest.er1 | |
9987 | cat conftest.err >&5 | |
ba479fd2 NN |
9988 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9989 | (exit $ac_status); } && | |
d7974fe6 KC |
9990 | { ac_try='test -z "$ac_c_werror_flag" |
9991 | || test ! -s conftest.err' | |
86da66b5 HPN |
9992 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9993 | (eval $ac_try) 2>&5 | |
9994 | ac_status=$? | |
9995 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9996 | (exit $ac_status); }; } && | |
9997 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9998 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9999 | (eval $ac_try) 2>&5 | |
10000 | ac_status=$? | |
10001 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10002 | (exit $ac_status); }; }; then | |
10003 | eval "$as_ac_var=yes" | |
10004 | else | |
10005 | echo "$as_me: failed program was:" >&5 | |
10006 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10007 | ||
10008 | eval "$as_ac_var=no" | |
10009 | fi | |
86da66b5 HPN |
10010 | rm -f conftest.err conftest.$ac_objext \ |
10011 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
10012 | fi |
10013 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
10014 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
10015 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
10016 | cat >>confdefs.h <<_ACEOF | |
10017 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10018 | _ACEOF | |
10019 | ||
c375c43b | 10020 | fi |
ba479fd2 | 10021 | done |
c375c43b | 10022 | |
ba479fd2 NN |
10023 | if test "x$ac_cv_func_fork" = xyes; then |
10024 | echo "$as_me:$LINENO: checking for working fork" >&5 | |
10025 | echo $ECHO_N "checking for working fork... $ECHO_C" >&6 | |
10026 | if test "${ac_cv_func_fork_works+set}" = set; then | |
10027 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10028 | else |
ba479fd2 NN |
10029 | if test "$cross_compiling" = yes; then |
10030 | ac_cv_func_fork_works=cross | |
10031 | else | |
10032 | cat >conftest.$ac_ext <<_ACEOF | |
10033 | /* By Ruediger Kuhlmann. */ | |
10034 | #include <sys/types.h> | |
10035 | #if HAVE_UNISTD_H | |
10036 | # include <unistd.h> | |
10037 | #endif | |
10038 | /* Some systems only have a dummy stub for fork() */ | |
10039 | int main () | |
10040 | { | |
86da66b5 HPN |
10041 | if (fork() < 0) |
10042 | exit (1); | |
10043 | exit (0); | |
ba479fd2 NN |
10044 | } |
10045 | _ACEOF | |
10046 | rm -f conftest$ac_exeext | |
10047 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10048 | (eval $ac_link) 2>&5 | |
10049 | ac_status=$? | |
10050 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10051 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
10052 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10053 | (eval $ac_try) 2>&5 | |
10054 | ac_status=$? | |
10055 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10056 | (exit $ac_status); }; }; then | |
10057 | ac_cv_func_fork_works=yes | |
10058 | else | |
10059 | echo "$as_me: program exited with status $ac_status" >&5 | |
10060 | echo "$as_me: failed program was:" >&5 | |
10061 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10062 | ||
10063 | ( exit $ac_status ) | |
10064 | ac_cv_func_fork_works=no | |
10065 | fi | |
86da66b5 | 10066 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
10067 | fi |
10068 | fi | |
10069 | echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 | |
10070 | echo "${ECHO_T}$ac_cv_func_fork_works" >&6 | |
10071 | ||
10072 | else | |
10073 | ac_cv_func_fork_works=$ac_cv_func_fork | |
10074 | fi | |
10075 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10076 | case $host in | |
10077 | *-*-amigaos* | *-*-msdosdjgpp*) | |
10078 | # Override, as these systems have only a dummy fork() stub | |
10079 | ac_cv_func_fork_works=no | |
10080 | ;; | |
10081 | *) | |
10082 | ac_cv_func_fork_works=yes | |
10083 | ;; | |
10084 | esac | |
10085 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
10086 | echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
c375c43b | 10087 | fi |
c375c43b | 10088 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
10089 | if test "x$ac_cv_func_vfork" = xyes; then |
10090 | echo "$as_me:$LINENO: checking for working vfork" >&5 | |
10091 | echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 | |
10092 | if test "${ac_cv_func_vfork_works+set}" = set; then | |
10093 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10094 | else |
ba479fd2 NN |
10095 | if test "$cross_compiling" = yes; then |
10096 | ac_cv_func_vfork_works=cross | |
10097 | else | |
10098 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10099 | /* confdefs.h. */ |
10100 | _ACEOF | |
10101 | cat confdefs.h >>conftest.$ac_ext | |
10102 | cat >>conftest.$ac_ext <<_ACEOF | |
10103 | /* end confdefs.h. */ | |
c375c43b KG |
10104 | /* Thanks to Paul Eggert for this test. */ |
10105 | #include <stdio.h> | |
ba479fd2 | 10106 | #include <stdlib.h> |
c375c43b KG |
10107 | #include <sys/types.h> |
10108 | #include <sys/stat.h> | |
ba479fd2 NN |
10109 | #include <sys/wait.h> |
10110 | #if HAVE_UNISTD_H | |
10111 | # include <unistd.h> | |
c375c43b | 10112 | #endif |
ba479fd2 NN |
10113 | #if HAVE_VFORK_H |
10114 | # include <vfork.h> | |
c375c43b KG |
10115 | #endif |
10116 | /* On some sparc systems, changes by the child to local and incoming | |
ba479fd2 NN |
10117 | argument registers are propagated back to the parent. The compiler |
10118 | is told about this with #include <vfork.h>, but some compilers | |
10119 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
10120 | static variable whose address is put into a register that is | |
10121 | clobbered by the vfork. */ | |
10122 | static void | |
c375c43b KG |
10123 | #ifdef __cplusplus |
10124 | sparc_address_test (int arg) | |
ba479fd2 | 10125 | # else |
c375c43b KG |
10126 | sparc_address_test (arg) int arg; |
10127 | #endif | |
10128 | { | |
10129 | static pid_t child; | |
10130 | if (!child) { | |
10131 | child = vfork (); | |
10132 | if (child < 0) { | |
10133 | perror ("vfork"); | |
10134 | _exit(2); | |
10135 | } | |
10136 | if (!child) { | |
10137 | arg = getpid(); | |
10138 | write(-1, "", 0); | |
10139 | _exit (arg); | |
10140 | } | |
10141 | } | |
10142 | } | |
ba479fd2 NN |
10143 | |
10144 | int | |
10145 | main () | |
10146 | { | |
c375c43b KG |
10147 | pid_t parent = getpid (); |
10148 | pid_t child; | |
10149 | ||
ba479fd2 | 10150 | sparc_address_test (0); |
c375c43b KG |
10151 | |
10152 | child = vfork (); | |
10153 | ||
10154 | if (child == 0) { | |
ba479fd2 NN |
10155 | /* Here is another test for sparc vfork register problems. This |
10156 | test uses lots of local variables, at least as many local | |
10157 | variables as main has allocated so far including compiler | |
10158 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
10159 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
10160 | reuse the register of parent for one of the local variables, | |
10161 | since it will think that parent can't possibly be used any more | |
10162 | in this routine. Assigning to the local variable will thus | |
10163 | munge parent in the parent process. */ | |
c375c43b KG |
10164 | pid_t |
10165 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
10166 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
10167 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
10168 | use the same hardware register for all 8 local variables. */ | |
10169 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10170 | || p != p5 || p != p6 || p != p7) | |
10171 | _exit(1); | |
10172 | ||
ba479fd2 NN |
10173 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
10174 | from child file descriptors. If the child closes a descriptor | |
10175 | before it execs or exits, this munges the parent's descriptor | |
10176 | as well. Test for this by closing stdout in the child. */ | |
c375c43b KG |
10177 | _exit(close(fileno(stdout)) != 0); |
10178 | } else { | |
10179 | int status; | |
10180 | struct stat st; | |
10181 | ||
10182 | while (wait(&status) != child) | |
10183 | ; | |
10184 | exit( | |
10185 | /* Was there some problem with vforking? */ | |
10186 | child < 0 | |
10187 | ||
10188 | /* Did the child fail? (This shouldn't happen.) */ | |
10189 | || status | |
10190 | ||
10191 | /* Did the vfork/compiler bug occur? */ | |
10192 | || parent != getpid() | |
10193 | ||
10194 | /* Did the file descriptor bug occur? */ | |
10195 | || fstat(fileno(stdout), &st) != 0 | |
10196 | ); | |
10197 | } | |
10198 | } | |
ba479fd2 NN |
10199 | _ACEOF |
10200 | rm -f conftest$ac_exeext | |
10201 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10202 | (eval $ac_link) 2>&5 | |
10203 | ac_status=$? | |
10204 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10205 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
10206 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10207 | (eval $ac_try) 2>&5 | |
10208 | ac_status=$? | |
10209 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10210 | (exit $ac_status); }; }; then | |
c375c43b KG |
10211 | ac_cv_func_vfork_works=yes |
10212 | else | |
ba479fd2 NN |
10213 | echo "$as_me: program exited with status $ac_status" >&5 |
10214 | echo "$as_me: failed program was:" >&5 | |
10215 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10216 | ||
10217 | ( exit $ac_status ) | |
10218 | ac_cv_func_vfork_works=no | |
cafe096b | 10219 | fi |
86da66b5 | 10220 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6e3f3080 | 10221 | fi |
ba479fd2 NN |
10222 | fi |
10223 | echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 | |
10224 | echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 | |
c375c43b | 10225 | |
ba479fd2 NN |
10226 | fi; |
10227 | if test "x$ac_cv_func_fork_works" = xcross; then | |
86da66b5 | 10228 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
10229 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
10230 | echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
c375c43b KG |
10231 | fi |
10232 | ||
ba479fd2 NN |
10233 | if test "x$ac_cv_func_vfork_works" = xyes; then |
10234 | ||
10235 | cat >>confdefs.h <<\_ACEOF | |
10236 | #define HAVE_WORKING_VFORK 1 | |
10237 | _ACEOF | |
10238 | ||
10239 | else | |
10240 | ||
10241 | cat >>confdefs.h <<\_ACEOF | |
c375c43b | 10242 | #define vfork fork |
ba479fd2 | 10243 | _ACEOF |
c375c43b KG |
10244 | |
10245 | fi | |
ba479fd2 NN |
10246 | if test "x$ac_cv_func_fork_works" = xyes; then |
10247 | ||
10248 | cat >>confdefs.h <<\_ACEOF | |
10249 | #define HAVE_WORKING_FORK 1 | |
10250 | _ACEOF | |
10251 | ||
10252 | fi | |
10253 | ||
c375c43b | 10254 | |
81bf3d9e | 10255 | |
dfb77e37 KC |
10256 | if test "X$prefix" = "XNONE"; then |
10257 | acl_final_prefix="$ac_default_prefix" | |
10258 | else | |
10259 | acl_final_prefix="$prefix" | |
10260 | fi | |
10261 | if test "X$exec_prefix" = "XNONE"; then | |
10262 | acl_final_exec_prefix='${prefix}' | |
10263 | else | |
10264 | acl_final_exec_prefix="$exec_prefix" | |
10265 | fi | |
10266 | acl_save_prefix="$prefix" | |
10267 | prefix="$acl_final_prefix" | |
10268 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
10269 | prefix="$acl_save_prefix" | |
f91abfce TT |
10270 | |
10271 | ||
dfb77e37 KC |
10272 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
10273 | if test "${with_gnu_ld+set}" = set; then | |
10274 | withval="$with_gnu_ld" | |
10275 | test "$withval" = no || with_gnu_ld=yes | |
ba479fd2 | 10276 | else |
dfb77e37 KC |
10277 | with_gnu_ld=no |
10278 | fi; | |
10279 | # Prepare PATH_SEPARATOR. | |
10280 | # The user is always right. | |
10281 | if test "${PATH_SEPARATOR+set}" != set; then | |
10282 | echo "#! /bin/sh" >conf$$.sh | |
10283 | echo "exit 0" >>conf$$.sh | |
10284 | chmod +x conf$$.sh | |
10285 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
10286 | PATH_SEPARATOR=';' | |
ba479fd2 | 10287 | else |
dfb77e37 | 10288 | PATH_SEPARATOR=: |
ba479fd2 | 10289 | fi |
dfb77e37 KC |
10290 | rm -f conf$$.sh |
10291 | fi | |
10292 | ac_prog=ld | |
10293 | if test "$GCC" = yes; then | |
10294 | # Check if gcc -print-prog-name=ld gives a path. | |
10295 | echo "$as_me:$LINENO: checking for ld used by GCC" >&5 | |
10296 | echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 | |
10297 | case $host in | |
10298 | *-*-mingw*) | |
10299 | # gcc leaves a trailing carriage return which upsets mingw | |
10300 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
10301 | *) | |
10302 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
10303 | esac | |
10304 | case $ac_prog in | |
10305 | # Accept absolute paths. | |
10306 | [\\/]* | [A-Za-z]:[\\/]*) | |
10307 | re_direlt='/[^/][^/]*/\.\./' | |
10308 | # Canonicalize the path of ld | |
10309 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
10310 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
10311 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
10312 | done | |
10313 | test -z "$LD" && LD="$ac_prog" | |
10314 | ;; | |
10315 | "") | |
10316 | # If it fails, then pretend we aren't using GCC. | |
10317 | ac_prog=ld | |
10318 | ;; | |
10319 | *) | |
10320 | # If it is relative, then search for the first ld in PATH. | |
10321 | with_gnu_ld=unknown | |
10322 | ;; | |
10323 | esac | |
10324 | elif test "$with_gnu_ld" = yes; then | |
10325 | echo "$as_me:$LINENO: checking for GNU ld" >&5 | |
10326 | echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 | |
ba479fd2 | 10327 | else |
dfb77e37 KC |
10328 | echo "$as_me:$LINENO: checking for non-GNU ld" >&5 |
10329 | echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 | |
ba479fd2 | 10330 | fi |
dfb77e37 KC |
10331 | if test "${acl_cv_path_LD+set}" = set; then |
10332 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 10333 | else |
dfb77e37 KC |
10334 | if test -z "$LD"; then |
10335 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
10336 | for ac_dir in $PATH; do | |
10337 | test -z "$ac_dir" && ac_dir=. | |
10338 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
10339 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
10340 | # Check to see if the program is GNU ld. I'd rather use --version, | |
10341 | # but apparently some GNU ld's only accept -v. | |
10342 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
10343 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
10344 | test "$with_gnu_ld" != no && break | |
10345 | else | |
10346 | test "$with_gnu_ld" != yes && break | |
10347 | fi | |
10348 | fi | |
10349 | done | |
10350 | IFS="$ac_save_ifs" | |
10351 | else | |
10352 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
10353 | fi | |
10354 | fi | |
ba479fd2 | 10355 | |
dfb77e37 KC |
10356 | LD="$acl_cv_path_LD" |
10357 | if test -n "$LD"; then | |
10358 | echo "$as_me:$LINENO: result: $LD" >&5 | |
10359 | echo "${ECHO_T}$LD" >&6 | |
10360 | else | |
10361 | echo "$as_me:$LINENO: result: no" >&5 | |
10362 | echo "${ECHO_T}no" >&6 | |
ba479fd2 | 10363 | fi |
dfb77e37 KC |
10364 | test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 |
10365 | echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} | |
10366 | { (exit 1); exit 1; }; } | |
10367 | echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 | |
10368 | echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 | |
10369 | if test "${acl_cv_prog_gnu_ld+set}" = set; then | |
10370 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10371 | else | |
10372 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
10373 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
10374 | acl_cv_prog_gnu_ld=yes | |
10375 | else | |
10376 | acl_cv_prog_gnu_ld=no | |
6e3f3080 | 10377 | fi |
dfb77e37 KC |
10378 | fi |
10379 | echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 | |
10380 | echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 | |
10381 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
10382 | ||
10383 | ||
10384 | ||
10385 | echo "$as_me:$LINENO: checking for shared library run path origin" >&5 | |
10386 | echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 | |
10387 | if test "${acl_cv_rpath+set}" = set; then | |
10388 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10389 | else | |
10390 | ||
10391 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
10392 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
10393 | . ./conftest.sh | |
10394 | rm -f ./conftest.sh | |
10395 | acl_cv_rpath=done | |
ba479fd2 | 10396 | |
eb158727 | 10397 | fi |
dfb77e37 KC |
10398 | echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 |
10399 | echo "${ECHO_T}$acl_cv_rpath" >&6 | |
10400 | wl="$acl_cv_wl" | |
10401 | libext="$acl_cv_libext" | |
10402 | shlibext="$acl_cv_shlibext" | |
10403 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
10404 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
10405 | hardcode_direct="$acl_cv_hardcode_direct" | |
10406 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
10407 | # Check whether --enable-rpath or --disable-rpath was given. | |
10408 | if test "${enable_rpath+set}" = set; then | |
10409 | enableval="$enable_rpath" | |
10410 | : | |
10411 | else | |
10412 | enable_rpath=yes | |
10413 | fi; | |
10414 | ||
10415 | ||
10416 | ||
10417 | ||
10418 | ||
10419 | ||
10420 | ||
10421 | use_additional=yes | |
10422 | ||
10423 | acl_save_prefix="$prefix" | |
10424 | prefix="$acl_final_prefix" | |
10425 | acl_save_exec_prefix="$exec_prefix" | |
10426 | exec_prefix="$acl_final_exec_prefix" | |
10427 | ||
10428 | eval additional_includedir=\"$includedir\" | |
10429 | eval additional_libdir=\"$libdir\" | |
10430 | ||
10431 | exec_prefix="$acl_save_exec_prefix" | |
10432 | prefix="$acl_save_prefix" | |
10433 | ||
10434 | ||
10435 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10436 | if test "${with_libiconv_prefix+set}" = set; then | |
10437 | withval="$with_libiconv_prefix" | |
10438 | ||
10439 | if test "X$withval" = "Xno"; then | |
10440 | use_additional=no | |
10441 | else | |
10442 | if test "X$withval" = "X"; then | |
10443 | ||
10444 | acl_save_prefix="$prefix" | |
10445 | prefix="$acl_final_prefix" | |
10446 | acl_save_exec_prefix="$exec_prefix" | |
10447 | exec_prefix="$acl_final_exec_prefix" | |
10448 | ||
10449 | eval additional_includedir=\"$includedir\" | |
10450 | eval additional_libdir=\"$libdir\" | |
10451 | ||
10452 | exec_prefix="$acl_save_exec_prefix" | |
10453 | prefix="$acl_save_prefix" | |
10454 | ||
10455 | else | |
10456 | additional_includedir="$withval/include" | |
10457 | additional_libdir="$withval/lib" | |
10458 | fi | |
10459 | fi | |
10460 | ||
10461 | fi; | |
10462 | LIBICONV= | |
10463 | LTLIBICONV= | |
10464 | INCICONV= | |
10465 | rpathdirs= | |
10466 | ltrpathdirs= | |
10467 | names_already_handled= | |
10468 | names_next_round='iconv ' | |
10469 | while test -n "$names_next_round"; do | |
10470 | names_this_round="$names_next_round" | |
10471 | names_next_round= | |
10472 | for name in $names_this_round; do | |
10473 | already_handled= | |
10474 | for n in $names_already_handled; do | |
10475 | if test "$n" = "$name"; then | |
10476 | already_handled=yes | |
10477 | break | |
10478 | fi | |
10479 | done | |
10480 | if test -z "$already_handled"; then | |
10481 | names_already_handled="$names_already_handled $name" | |
10482 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10483 | eval value=\"\$HAVE_LIB$uppername\" | |
10484 | if test -n "$value"; then | |
10485 | if test "$value" = yes; then | |
10486 | eval value=\"\$LIB$uppername\" | |
10487 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
10488 | eval value=\"\$LTLIB$uppername\" | |
10489 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
10490 | else | |
10491 | : | |
10492 | fi | |
10493 | else | |
10494 | found_dir= | |
10495 | found_la= | |
10496 | found_so= | |
10497 | found_a= | |
10498 | if test $use_additional = yes; then | |
10499 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
10500 | found_dir="$additional_libdir" | |
10501 | found_so="$additional_libdir/lib$name.$shlibext" | |
10502 | if test -f "$additional_libdir/lib$name.la"; then | |
10503 | found_la="$additional_libdir/lib$name.la" | |
10504 | fi | |
10505 | else | |
10506 | if test -f "$additional_libdir/lib$name.$libext"; then | |
10507 | found_dir="$additional_libdir" | |
10508 | found_a="$additional_libdir/lib$name.$libext" | |
10509 | if test -f "$additional_libdir/lib$name.la"; then | |
10510 | found_la="$additional_libdir/lib$name.la" | |
10511 | fi | |
10512 | fi | |
10513 | fi | |
10514 | fi | |
10515 | if test "X$found_dir" = "X"; then | |
10516 | for x in $LDFLAGS $LTLIBICONV; do | |
10517 | ||
10518 | acl_save_prefix="$prefix" | |
10519 | prefix="$acl_final_prefix" | |
10520 | acl_save_exec_prefix="$exec_prefix" | |
10521 | exec_prefix="$acl_final_exec_prefix" | |
10522 | eval x=\"$x\" | |
10523 | exec_prefix="$acl_save_exec_prefix" | |
10524 | prefix="$acl_save_prefix" | |
10525 | ||
10526 | case "$x" in | |
10527 | -L*) | |
10528 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10529 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
10530 | found_dir="$dir" | |
10531 | found_so="$dir/lib$name.$shlibext" | |
10532 | if test -f "$dir/lib$name.la"; then | |
10533 | found_la="$dir/lib$name.la" | |
10534 | fi | |
10535 | else | |
10536 | if test -f "$dir/lib$name.$libext"; then | |
10537 | found_dir="$dir" | |
10538 | found_a="$dir/lib$name.$libext" | |
10539 | if test -f "$dir/lib$name.la"; then | |
10540 | found_la="$dir/lib$name.la" | |
10541 | fi | |
10542 | fi | |
10543 | fi | |
10544 | ;; | |
10545 | esac | |
10546 | if test "X$found_dir" != "X"; then | |
10547 | break | |
10548 | fi | |
10549 | done | |
10550 | fi | |
10551 | if test "X$found_dir" != "X"; then | |
10552 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
10553 | if test "X$found_so" != "X"; then | |
10554 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10555 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10556 | else | |
10557 | haveit= | |
10558 | for x in $ltrpathdirs; do | |
10559 | if test "X$x" = "X$found_dir"; then | |
10560 | haveit=yes | |
10561 | break | |
10562 | fi | |
10563 | done | |
10564 | if test -z "$haveit"; then | |
10565 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10566 | fi | |
10567 | if test "$hardcode_direct" = yes; then | |
10568 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10569 | else | |
10570 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10571 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10572 | haveit= | |
10573 | for x in $rpathdirs; do | |
10574 | if test "X$x" = "X$found_dir"; then | |
10575 | haveit=yes | |
10576 | break | |
10577 | fi | |
10578 | done | |
10579 | if test -z "$haveit"; then | |
10580 | rpathdirs="$rpathdirs $found_dir" | |
10581 | fi | |
10582 | else | |
10583 | haveit= | |
10584 | for x in $LDFLAGS $LIBICONV; do | |
10585 | ||
10586 | acl_save_prefix="$prefix" | |
10587 | prefix="$acl_final_prefix" | |
10588 | acl_save_exec_prefix="$exec_prefix" | |
10589 | exec_prefix="$acl_final_exec_prefix" | |
10590 | eval x=\"$x\" | |
10591 | exec_prefix="$acl_save_exec_prefix" | |
10592 | prefix="$acl_save_prefix" | |
10593 | ||
10594 | if test "X$x" = "X-L$found_dir"; then | |
10595 | haveit=yes | |
10596 | break | |
10597 | fi | |
10598 | done | |
10599 | if test -z "$haveit"; then | |
10600 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
10601 | fi | |
10602 | if test "$hardcode_minus_L" != no; then | |
10603 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10604 | else | |
10605 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
10606 | fi | |
10607 | fi | |
10608 | fi | |
10609 | fi | |
10610 | else | |
10611 | if test "X$found_a" != "X"; then | |
10612 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
10613 | else | |
10614 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
10615 | fi | |
10616 | fi | |
10617 | additional_includedir= | |
10618 | case "$found_dir" in | |
10619 | */lib | */lib/) | |
10620 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10621 | additional_includedir="$basedir/include" | |
10622 | ;; | |
10623 | esac | |
10624 | if test "X$additional_includedir" != "X"; then | |
10625 | if test "X$additional_includedir" != "X/usr/include"; then | |
10626 | haveit= | |
10627 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10628 | if test -n "$GCC"; then | |
10629 | case $host_os in | |
10630 | linux*) haveit=yes;; | |
10631 | esac | |
10632 | fi | |
10633 | fi | |
10634 | if test -z "$haveit"; then | |
10635 | for x in $CPPFLAGS $INCICONV; do | |
10636 | ||
10637 | acl_save_prefix="$prefix" | |
10638 | prefix="$acl_final_prefix" | |
10639 | acl_save_exec_prefix="$exec_prefix" | |
10640 | exec_prefix="$acl_final_exec_prefix" | |
10641 | eval x=\"$x\" | |
10642 | exec_prefix="$acl_save_exec_prefix" | |
10643 | prefix="$acl_save_prefix" | |
10644 | ||
10645 | if test "X$x" = "X-I$additional_includedir"; then | |
10646 | haveit=yes | |
10647 | break | |
10648 | fi | |
10649 | done | |
10650 | if test -z "$haveit"; then | |
10651 | if test -d "$additional_includedir"; then | |
10652 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
10653 | fi | |
10654 | fi | |
10655 | fi | |
10656 | fi | |
10657 | fi | |
10658 | if test -n "$found_la"; then | |
10659 | save_libdir="$libdir" | |
10660 | case "$found_la" in | |
10661 | */* | *\\*) . "$found_la" ;; | |
10662 | *) . "./$found_la" ;; | |
10663 | esac | |
10664 | libdir="$save_libdir" | |
10665 | for dep in $dependency_libs; do | |
10666 | case "$dep" in | |
10667 | -L*) | |
10668 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10669 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10670 | haveit= | |
10671 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10672 | if test -n "$GCC"; then | |
10673 | case $host_os in | |
10674 | linux*) haveit=yes;; | |
10675 | esac | |
10676 | fi | |
10677 | fi | |
10678 | if test -z "$haveit"; then | |
10679 | haveit= | |
10680 | for x in $LDFLAGS $LIBICONV; do | |
10681 | ||
10682 | acl_save_prefix="$prefix" | |
10683 | prefix="$acl_final_prefix" | |
10684 | acl_save_exec_prefix="$exec_prefix" | |
10685 | exec_prefix="$acl_final_exec_prefix" | |
10686 | eval x=\"$x\" | |
10687 | exec_prefix="$acl_save_exec_prefix" | |
10688 | prefix="$acl_save_prefix" | |
10689 | ||
10690 | if test "X$x" = "X-L$additional_libdir"; then | |
10691 | haveit=yes | |
10692 | break | |
10693 | fi | |
10694 | done | |
10695 | if test -z "$haveit"; then | |
10696 | if test -d "$additional_libdir"; then | |
10697 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
10698 | fi | |
10699 | fi | |
10700 | haveit= | |
10701 | for x in $LDFLAGS $LTLIBICONV; do | |
10702 | ||
10703 | acl_save_prefix="$prefix" | |
10704 | prefix="$acl_final_prefix" | |
10705 | acl_save_exec_prefix="$exec_prefix" | |
10706 | exec_prefix="$acl_final_exec_prefix" | |
10707 | eval x=\"$x\" | |
10708 | exec_prefix="$acl_save_exec_prefix" | |
10709 | prefix="$acl_save_prefix" | |
10710 | ||
10711 | if test "X$x" = "X-L$additional_libdir"; then | |
10712 | haveit=yes | |
10713 | break | |
10714 | fi | |
10715 | done | |
10716 | if test -z "$haveit"; then | |
10717 | if test -d "$additional_libdir"; then | |
10718 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
10719 | fi | |
10720 | fi | |
10721 | fi | |
10722 | fi | |
10723 | ;; | |
10724 | -R*) | |
10725 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10726 | if test "$enable_rpath" != no; then | |
10727 | haveit= | |
10728 | for x in $rpathdirs; do | |
10729 | if test "X$x" = "X$dir"; then | |
10730 | haveit=yes | |
10731 | break | |
10732 | fi | |
10733 | done | |
10734 | if test -z "$haveit"; then | |
10735 | rpathdirs="$rpathdirs $dir" | |
10736 | fi | |
10737 | haveit= | |
10738 | for x in $ltrpathdirs; do | |
10739 | if test "X$x" = "X$dir"; then | |
10740 | haveit=yes | |
10741 | break | |
10742 | fi | |
10743 | done | |
10744 | if test -z "$haveit"; then | |
10745 | ltrpathdirs="$ltrpathdirs $dir" | |
10746 | fi | |
10747 | fi | |
10748 | ;; | |
10749 | -l*) | |
10750 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10751 | ;; | |
10752 | *.la) | |
10753 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10754 | ;; | |
10755 | *) | |
10756 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
10757 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
10758 | ;; | |
10759 | esac | |
10760 | done | |
10761 | fi | |
10762 | else | |
10763 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
10764 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
10765 | fi | |
10766 | fi | |
10767 | fi | |
10768 | done | |
10769 | done | |
10770 | if test "X$rpathdirs" != "X"; then | |
10771 | if test -n "$hardcode_libdir_separator"; then | |
10772 | alldirs= | |
10773 | for found_dir in $rpathdirs; do | |
10774 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10775 | done | |
10776 | acl_save_libdir="$libdir" | |
10777 | libdir="$alldirs" | |
10778 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10779 | libdir="$acl_save_libdir" | |
10780 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
10781 | else | |
10782 | for found_dir in $rpathdirs; do | |
10783 | acl_save_libdir="$libdir" | |
10784 | libdir="$found_dir" | |
10785 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10786 | libdir="$acl_save_libdir" | |
10787 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
10788 | done | |
10789 | fi | |
10790 | fi | |
10791 | if test "X$ltrpathdirs" != "X"; then | |
10792 | for found_dir in $ltrpathdirs; do | |
10793 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
10794 | done | |
10795 | fi | |
10796 | ||
10797 | ||
10798 | ||
10799 | ||
10800 | ||
10801 | ||
10802 | ||
10803 | am_save_CPPFLAGS="$CPPFLAGS" | |
10804 | ||
10805 | for element in $INCICONV; do | |
10806 | haveit= | |
10807 | for x in $CPPFLAGS; do | |
10808 | ||
10809 | acl_save_prefix="$prefix" | |
10810 | prefix="$acl_final_prefix" | |
10811 | acl_save_exec_prefix="$exec_prefix" | |
10812 | exec_prefix="$acl_final_exec_prefix" | |
10813 | eval x=\"$x\" | |
10814 | exec_prefix="$acl_save_exec_prefix" | |
10815 | prefix="$acl_save_prefix" | |
10816 | ||
10817 | if test "X$x" = "X$element"; then | |
10818 | haveit=yes | |
10819 | break | |
10820 | fi | |
10821 | done | |
10822 | if test -z "$haveit"; then | |
10823 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10824 | fi | |
10825 | done | |
eb158727 ZW |
10826 | |
10827 | ||
ba479fd2 NN |
10828 | echo "$as_me:$LINENO: checking for iconv" >&5 |
10829 | echo $ECHO_N "checking for iconv... $ECHO_C" >&6 | |
10830 | if test "${am_cv_func_iconv+set}" = set; then | |
10831 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 10832 | else |
ba479fd2 | 10833 | |
f91abfce TT |
10834 | am_cv_func_iconv="no, consider installing GNU libiconv" |
10835 | am_cv_lib_iconv=no | |
ba479fd2 | 10836 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10837 | /* confdefs.h. */ |
10838 | _ACEOF | |
10839 | cat confdefs.h >>conftest.$ac_ext | |
10840 | cat >>conftest.$ac_ext <<_ACEOF | |
10841 | /* end confdefs.h. */ | |
f91abfce TT |
10842 | #include <stdlib.h> |
10843 | #include <iconv.h> | |
ba479fd2 NN |
10844 | int |
10845 | main () | |
10846 | { | |
f91abfce TT |
10847 | iconv_t cd = iconv_open("",""); |
10848 | iconv(cd,NULL,NULL,NULL,NULL); | |
10849 | iconv_close(cd); | |
ba479fd2 NN |
10850 | ; |
10851 | return 0; | |
10852 | } | |
10853 | _ACEOF | |
10854 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10855 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 10856 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 10857 | ac_status=$? |
86da66b5 HPN |
10858 | grep -v '^ *+' conftest.er1 >conftest.err |
10859 | rm -f conftest.er1 | |
10860 | cat conftest.err >&5 | |
ba479fd2 NN |
10861 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10862 | (exit $ac_status); } && | |
d7974fe6 KC |
10863 | { ac_try='test -z "$ac_c_werror_flag" |
10864 | || test ! -s conftest.err' | |
86da66b5 HPN |
10865 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10866 | (eval $ac_try) 2>&5 | |
10867 | ac_status=$? | |
10868 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10869 | (exit $ac_status); }; } && | |
10870 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
10871 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10872 | (eval $ac_try) 2>&5 | |
10873 | ac_status=$? | |
10874 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10875 | (exit $ac_status); }; }; then | |
f91abfce TT |
10876 | am_cv_func_iconv=yes |
10877 | else | |
ba479fd2 NN |
10878 | echo "$as_me: failed program was:" >&5 |
10879 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10880 | ||
f91abfce | 10881 | fi |
86da66b5 HPN |
10882 | rm -f conftest.err conftest.$ac_objext \ |
10883 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
10884 | if test "$am_cv_func_iconv" != yes; then |
10885 | am_save_LIBS="$LIBS" | |
dfb77e37 | 10886 | LIBS="$LIBS $LIBICONV" |
ba479fd2 | 10887 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10888 | /* confdefs.h. */ |
10889 | _ACEOF | |
10890 | cat confdefs.h >>conftest.$ac_ext | |
10891 | cat >>conftest.$ac_ext <<_ACEOF | |
10892 | /* end confdefs.h. */ | |
f91abfce TT |
10893 | #include <stdlib.h> |
10894 | #include <iconv.h> | |
ba479fd2 NN |
10895 | int |
10896 | main () | |
10897 | { | |
f91abfce TT |
10898 | iconv_t cd = iconv_open("",""); |
10899 | iconv(cd,NULL,NULL,NULL,NULL); | |
10900 | iconv_close(cd); | |
ba479fd2 NN |
10901 | ; |
10902 | return 0; | |
10903 | } | |
10904 | _ACEOF | |
10905 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10906 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 10907 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 10908 | ac_status=$? |
86da66b5 HPN |
10909 | grep -v '^ *+' conftest.er1 >conftest.err |
10910 | rm -f conftest.er1 | |
10911 | cat conftest.err >&5 | |
ba479fd2 NN |
10912 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10913 | (exit $ac_status); } && | |
d7974fe6 KC |
10914 | { ac_try='test -z "$ac_c_werror_flag" |
10915 | || test ! -s conftest.err' | |
86da66b5 HPN |
10916 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10917 | (eval $ac_try) 2>&5 | |
10918 | ac_status=$? | |
10919 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10920 | (exit $ac_status); }; } && | |
10921 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
10922 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10923 | (eval $ac_try) 2>&5 | |
10924 | ac_status=$? | |
10925 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10926 | (exit $ac_status); }; }; then | |
f91abfce TT |
10927 | am_cv_lib_iconv=yes |
10928 | am_cv_func_iconv=yes | |
10929 | else | |
ba479fd2 NN |
10930 | echo "$as_me: failed program was:" >&5 |
10931 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10932 | ||
f91abfce | 10933 | fi |
86da66b5 HPN |
10934 | rm -f conftest.err conftest.$ac_objext \ |
10935 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
10936 | LIBS="$am_save_LIBS" |
10937 | fi | |
6e3f3080 | 10938 | |
ba479fd2 NN |
10939 | fi |
10940 | echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 | |
10941 | echo "${ECHO_T}$am_cv_func_iconv" >&6 | |
63cf211a | 10942 | if test "$am_cv_func_iconv" = yes; then |
ba479fd2 NN |
10943 | |
10944 | cat >>confdefs.h <<\_ACEOF | |
f91abfce | 10945 | #define HAVE_ICONV 1 |
ba479fd2 | 10946 | _ACEOF |
f91abfce | 10947 | |
dfb77e37 KC |
10948 | fi |
10949 | if test "$am_cv_lib_iconv" = yes; then | |
10950 | echo "$as_me:$LINENO: checking how to link with libiconv" >&5 | |
10951 | echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 | |
10952 | echo "$as_me:$LINENO: result: $LIBICONV" >&5 | |
10953 | echo "${ECHO_T}$LIBICONV" >&6 | |
10954 | else | |
10955 | CPPFLAGS="$am_save_CPPFLAGS" | |
10956 | LIBICONV= | |
10957 | LTLIBICONV= | |
10958 | fi | |
10959 | ||
10960 | ||
10961 | ||
10962 | if test "$am_cv_func_iconv" = yes; then | |
ba479fd2 NN |
10963 | echo "$as_me:$LINENO: checking for iconv declaration" >&5 |
10964 | echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 | |
10965 | if test "${am_cv_proto_iconv+set}" = set; then | |
10966 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 10967 | else |
ba479fd2 NN |
10968 | |
10969 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10970 | /* confdefs.h. */ |
10971 | _ACEOF | |
10972 | cat confdefs.h >>conftest.$ac_ext | |
10973 | cat >>conftest.$ac_ext <<_ACEOF | |
10974 | /* end confdefs.h. */ | |
f91abfce TT |
10975 | |
10976 | #include <stdlib.h> | |
10977 | #include <iconv.h> | |
10978 | extern | |
10979 | #ifdef __cplusplus | |
10980 | "C" | |
10981 | #endif | |
10982 | #if defined(__STDC__) || defined(__cplusplus) | |
10983 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10984 | #else | |
10985 | size_t iconv(); | |
10986 | #endif | |
10987 | ||
ba479fd2 NN |
10988 | int |
10989 | main () | |
10990 | { | |
f91abfce | 10991 | |
ba479fd2 NN |
10992 | ; |
10993 | return 0; | |
10994 | } | |
10995 | _ACEOF | |
10996 | rm -f conftest.$ac_objext | |
10997 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 10998 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 10999 | ac_status=$? |
86da66b5 HPN |
11000 | grep -v '^ *+' conftest.er1 >conftest.err |
11001 | rm -f conftest.er1 | |
11002 | cat conftest.err >&5 | |
ba479fd2 NN |
11003 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11004 | (exit $ac_status); } && | |
d7974fe6 KC |
11005 | { ac_try='test -z "$ac_c_werror_flag" |
11006 | || test ! -s conftest.err' | |
86da66b5 HPN |
11007 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11008 | (eval $ac_try) 2>&5 | |
11009 | ac_status=$? | |
11010 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11011 | (exit $ac_status); }; } && | |
11012 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11013 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11014 | (eval $ac_try) 2>&5 | |
11015 | ac_status=$? | |
11016 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11017 | (exit $ac_status); }; }; then | |
f91abfce TT |
11018 | am_cv_proto_iconv_arg1="" |
11019 | else | |
ba479fd2 NN |
11020 | echo "$as_me: failed program was:" >&5 |
11021 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11022 | ||
11023 | am_cv_proto_iconv_arg1="const" | |
f91abfce | 11024 | fi |
86da66b5 | 11025 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
f91abfce TT |
11026 | 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);" |
11027 | fi | |
11028 | ||
11029 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
ba479fd2 NN |
11030 | echo "$as_me:$LINENO: result: ${ac_t:- |
11031 | }$am_cv_proto_iconv" >&5 | |
11032 | echo "${ECHO_T}${ac_t:- | |
11033 | }$am_cv_proto_iconv" >&6 | |
11034 | ||
11035 | cat >>confdefs.h <<_ACEOF | |
f91abfce | 11036 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
ba479fd2 | 11037 | _ACEOF |
f91abfce TT |
11038 | |
11039 | fi | |
f91abfce | 11040 | |
56694dd9 ZW |
11041 | # Until we have in-tree GNU iconv: |
11042 | LIBICONV_DEP= | |
11043 | ||
11044 | ||
11045 | ||
ba479fd2 NN |
11046 | echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 |
11047 | echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 | |
11048 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then | |
11049 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
56694dd9 | 11050 | else |
ba479fd2 | 11051 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11052 | /* confdefs.h. */ |
11053 | _ACEOF | |
11054 | cat confdefs.h >>conftest.$ac_ext | |
11055 | cat >>conftest.$ac_ext <<_ACEOF | |
11056 | /* end confdefs.h. */ | |
56694dd9 | 11057 | #include <locale.h> |
ba479fd2 NN |
11058 | int |
11059 | main () | |
11060 | { | |
56694dd9 | 11061 | return LC_MESSAGES |
ba479fd2 NN |
11062 | ; |
11063 | return 0; | |
11064 | } | |
11065 | _ACEOF | |
11066 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11067 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 11068 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 11069 | ac_status=$? |
86da66b5 HPN |
11070 | grep -v '^ *+' conftest.er1 >conftest.err |
11071 | rm -f conftest.er1 | |
11072 | cat conftest.err >&5 | |
ba479fd2 NN |
11073 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11074 | (exit $ac_status); } && | |
d7974fe6 KC |
11075 | { ac_try='test -z "$ac_c_werror_flag" |
11076 | || test ! -s conftest.err' | |
86da66b5 HPN |
11077 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11078 | (eval $ac_try) 2>&5 | |
11079 | ac_status=$? | |
11080 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11081 | (exit $ac_status); }; } && | |
11082 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
11083 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11084 | (eval $ac_try) 2>&5 | |
11085 | ac_status=$? | |
11086 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11087 | (exit $ac_status); }; }; then | |
56694dd9 ZW |
11088 | am_cv_val_LC_MESSAGES=yes |
11089 | else | |
ba479fd2 NN |
11090 | echo "$as_me: failed program was:" >&5 |
11091 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11092 | ||
11093 | am_cv_val_LC_MESSAGES=no | |
56694dd9 | 11094 | fi |
86da66b5 HPN |
11095 | rm -f conftest.err conftest.$ac_objext \ |
11096 | conftest$ac_exeext conftest.$ac_ext | |
56694dd9 | 11097 | fi |
ba479fd2 NN |
11098 | echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 |
11099 | echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 | |
63cf211a | 11100 | if test $am_cv_val_LC_MESSAGES = yes; then |
ba479fd2 NN |
11101 | |
11102 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 11103 | #define HAVE_LC_MESSAGES 1 |
ba479fd2 | 11104 | _ACEOF |
56694dd9 ZW |
11105 | |
11106 | fi | |
11107 | ||
f91abfce | 11108 | |
a03ea89b BM |
11109 | |
11110 | echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 | |
11111 | echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 | |
11112 | if test "${am_cv_langinfo_codeset+set}" = set; then | |
11113 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11114 | else | |
11115 | cat >conftest.$ac_ext <<_ACEOF | |
11116 | /* confdefs.h. */ | |
11117 | _ACEOF | |
11118 | cat confdefs.h >>conftest.$ac_ext | |
11119 | cat >>conftest.$ac_ext <<_ACEOF | |
11120 | /* end confdefs.h. */ | |
11121 | #include <langinfo.h> | |
11122 | int | |
11123 | main () | |
11124 | { | |
11125 | char* cs = nl_langinfo(CODESET); | |
11126 | ; | |
11127 | return 0; | |
11128 | } | |
11129 | _ACEOF | |
11130 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11131 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11132 | (eval $ac_link) 2>conftest.er1 | |
11133 | ac_status=$? | |
11134 | grep -v '^ *+' conftest.er1 >conftest.err | |
11135 | rm -f conftest.er1 | |
11136 | cat conftest.err >&5 | |
11137 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11138 | (exit $ac_status); } && | |
d7974fe6 KC |
11139 | { ac_try='test -z "$ac_c_werror_flag" |
11140 | || test ! -s conftest.err' | |
a03ea89b BM |
11141 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11142 | (eval $ac_try) 2>&5 | |
11143 | ac_status=$? | |
11144 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11145 | (exit $ac_status); }; } && | |
11146 | { ac_try='test -s conftest$ac_exeext' | |
11147 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11148 | (eval $ac_try) 2>&5 | |
11149 | ac_status=$? | |
11150 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11151 | (exit $ac_status); }; }; then | |
11152 | am_cv_langinfo_codeset=yes | |
11153 | else | |
11154 | echo "$as_me: failed program was:" >&5 | |
11155 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11156 | ||
11157 | am_cv_langinfo_codeset=no | |
11158 | fi | |
11159 | rm -f conftest.err conftest.$ac_objext \ | |
11160 | conftest$ac_exeext conftest.$ac_ext | |
11161 | ||
11162 | fi | |
11163 | echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 | |
11164 | echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 | |
11165 | if test $am_cv_langinfo_codeset = yes; then | |
11166 | ||
11167 | cat >>confdefs.h <<\_ACEOF | |
11168 | #define HAVE_LANGINFO_CODESET 1 | |
11169 | _ACEOF | |
11170 | ||
11171 | fi | |
11172 | ||
11173 | ||
86cf1cbd KG |
11174 | # We will need to find libiberty.h and ansidecl.h |
11175 | saved_CFLAGS="$CFLAGS" | |
11176 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
ad6717df PB |
11177 | |
11178 | ||
11179 | ||
11180 | ||
11181 | ||
11182 | ||
11183 | ||
11184 | ||
11185 | ||
11186 | ||
11187 | ||
11188 | ||
11189 | ||
11190 | ||
11191 | ||
11192 | ||
11193 | ||
11194 | ||
11195 | ||
11196 | ||
11197 | ||
6a257778 | 11198 | |
ad6717df PB |
11199 | |
11200 | ||
0d667716 KG |
11201 | |
11202 | ||
11203 | ||
11204 | ||
11205 | ||
11206 | ||
11207 | ||
11208 | ||
11209 | ||
11210 | ||
367e8319 | 11211 | |
0d667716 KG |
11212 | |
11213 | ||
7391b66c GDR |
11214 | |
11215 | for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd strsignal \ | |
367e8319 EB |
11216 | strstr errno snprintf vsnprintf vasprintf malloc realloc calloc \ |
11217 | 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 | 11218 | do |
ad6717df | 11219 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11220 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11221 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11222 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11223 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11224 | else | |
11225 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11226 | /* confdefs.h. */ |
11227 | _ACEOF | |
11228 | cat confdefs.h >>conftest.$ac_ext | |
11229 | cat >>conftest.$ac_ext <<_ACEOF | |
11230 | /* end confdefs.h. */ | |
7afe8c41 KG |
11231 | #undef $ac_tr_decl |
11232 | #define $ac_tr_decl 1 | |
ba479fd2 | 11233 | |
d02af173 | 11234 | #include "ansidecl.h" |
86cf1cbd | 11235 | #include "system.h" |
f31e826b | 11236 | |
ba479fd2 NN |
11237 | int |
11238 | main () | |
11239 | { | |
86cf1cbd KG |
11240 | #ifndef $ac_func |
11241 | char *(*pfn) = (char *(*)) $ac_func ; | |
11242 | #endif | |
ba479fd2 NN |
11243 | ; |
11244 | return 0; | |
11245 | } | |
11246 | _ACEOF | |
11247 | rm -f conftest.$ac_objext | |
11248 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11249 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11250 | ac_status=$? |
86da66b5 HPN |
11251 | grep -v '^ *+' conftest.er1 >conftest.err |
11252 | rm -f conftest.er1 | |
11253 | cat conftest.err >&5 | |
ba479fd2 NN |
11254 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11255 | (exit $ac_status); } && | |
d7974fe6 KC |
11256 | { ac_try='test -z "$ac_c_werror_flag" |
11257 | || test ! -s conftest.err' | |
86da66b5 HPN |
11258 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11259 | (eval $ac_try) 2>&5 | |
11260 | ac_status=$? | |
11261 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11262 | (exit $ac_status); }; } && | |
11263 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11264 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11265 | (eval $ac_try) 2>&5 | |
11266 | ac_status=$? | |
11267 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11268 | (exit $ac_status); }; }; then | |
f31e826b | 11269 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 11270 | else |
ba479fd2 NN |
11271 | echo "$as_me: failed program was:" >&5 |
11272 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11273 | ||
11274 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 11275 | fi |
86da66b5 | 11276 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
11277 | fi |
11278 | ||
f31e826b | 11279 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
11280 | echo "$as_me:$LINENO: result: yes" >&5 |
11281 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 11282 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11283 | _ACEOF |
11284 | ||
81bf3d9e | 11285 | else |
ba479fd2 NN |
11286 | echo "$as_me:$LINENO: result: no" >&5 |
11287 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 11288 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11289 | _ACEOF |
11290 | ||
81bf3d9e RH |
11291 | fi |
11292 | ||
11293 | done | |
ba479fd2 | 11294 | |
ba479fd2 | 11295 | |
ba479fd2 | 11296 | |
81bf3d9e | 11297 | |
81bf3d9e RH |
11298 | |
11299 | for ac_func in getrlimit setrlimit getrusage | |
11300 | do | |
ad6717df | 11301 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11302 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11303 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11304 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11305 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11306 | else | |
11307 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11308 | /* confdefs.h. */ |
11309 | _ACEOF | |
11310 | cat confdefs.h >>conftest.$ac_ext | |
11311 | cat >>conftest.$ac_ext <<_ACEOF | |
11312 | /* end confdefs.h. */ | |
7afe8c41 KG |
11313 | #undef $ac_tr_decl |
11314 | #define $ac_tr_decl 1 | |
ba479fd2 | 11315 | |
d02af173 | 11316 | #include "ansidecl.h" |
86cf1cbd | 11317 | #include "system.h" |
81bf3d9e RH |
11318 | #ifdef HAVE_SYS_RESOURCE_H |
11319 | #include <sys/resource.h> | |
11320 | #endif | |
11321 | ||
f31e826b | 11322 | |
ba479fd2 NN |
11323 | int |
11324 | main () | |
11325 | { | |
86cf1cbd KG |
11326 | #ifndef $ac_func |
11327 | char *(*pfn) = (char *(*)) $ac_func ; | |
11328 | #endif | |
ba479fd2 NN |
11329 | ; |
11330 | return 0; | |
11331 | } | |
11332 | _ACEOF | |
11333 | rm -f conftest.$ac_objext | |
11334 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11335 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11336 | ac_status=$? |
86da66b5 HPN |
11337 | grep -v '^ *+' conftest.er1 >conftest.err |
11338 | rm -f conftest.er1 | |
11339 | cat conftest.err >&5 | |
ba479fd2 NN |
11340 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11341 | (exit $ac_status); } && | |
d7974fe6 KC |
11342 | { ac_try='test -z "$ac_c_werror_flag" |
11343 | || test ! -s conftest.err' | |
86da66b5 HPN |
11344 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11345 | (eval $ac_try) 2>&5 | |
11346 | ac_status=$? | |
11347 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11348 | (exit $ac_status); }; } && | |
11349 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11350 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11351 | (eval $ac_try) 2>&5 | |
11352 | ac_status=$? | |
11353 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11354 | (exit $ac_status); }; }; then | |
f31e826b | 11355 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 11356 | else |
ba479fd2 NN |
11357 | echo "$as_me: failed program was:" >&5 |
11358 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11359 | ||
11360 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 11361 | fi |
86da66b5 | 11362 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
11363 | fi |
11364 | ||
f31e826b | 11365 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
11366 | echo "$as_me:$LINENO: result: yes" >&5 |
11367 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 11368 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11369 | _ACEOF |
11370 | ||
81bf3d9e | 11371 | else |
ba479fd2 NN |
11372 | echo "$as_me:$LINENO: result: no" >&5 |
11373 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 11374 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11375 | _ACEOF |
11376 | ||
81bf3d9e RH |
11377 | fi |
11378 | ||
11379 | done | |
86cf1cbd | 11380 | |
81bf3d9e | 11381 | |
ba479fd2 | 11382 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11383 | /* confdefs.h. */ |
11384 | _ACEOF | |
11385 | cat confdefs.h >>conftest.$ac_ext | |
11386 | cat >>conftest.$ac_ext <<_ACEOF | |
11387 | /* end confdefs.h. */ | |
b2522d2b HPN |
11388 | |
11389 | #include "ansidecl.h" | |
11390 | #include "system.h" | |
11391 | #ifdef HAVE_SYS_RESOURCE_H | |
11392 | #include <sys/resource.h> | |
11393 | #endif | |
11394 | ||
ba479fd2 NN |
11395 | int |
11396 | main () | |
11397 | { | |
b2522d2b | 11398 | rlim_t l = 0; |
ba479fd2 NN |
11399 | ; |
11400 | return 0; | |
11401 | } | |
11402 | _ACEOF | |
11403 | rm -f conftest.$ac_objext | |
11404 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11405 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11406 | ac_status=$? |
86da66b5 HPN |
11407 | grep -v '^ *+' conftest.er1 >conftest.err |
11408 | rm -f conftest.er1 | |
11409 | cat conftest.err >&5 | |
ba479fd2 NN |
11410 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11411 | (exit $ac_status); } && | |
d7974fe6 KC |
11412 | { ac_try='test -z "$ac_c_werror_flag" |
11413 | || test ! -s conftest.err' | |
86da66b5 HPN |
11414 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11415 | (eval $ac_try) 2>&5 | |
11416 | ac_status=$? | |
11417 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11418 | (exit $ac_status); }; } && | |
11419 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11420 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11421 | (eval $ac_try) 2>&5 | |
11422 | ac_status=$? | |
11423 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11424 | (exit $ac_status); }; }; then | |
b2522d2b HPN |
11425 | : |
11426 | else | |
ba479fd2 NN |
11427 | echo "$as_me: failed program was:" >&5 |
11428 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11429 | ||
11430 | ||
11431 | cat >>confdefs.h <<\_ACEOF | |
b2522d2b | 11432 | #define rlim_t long |
ba479fd2 | 11433 | _ACEOF |
b2522d2b HPN |
11434 | |
11435 | fi | |
86da66b5 | 11436 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
b2522d2b | 11437 | |
2102b2fe RS |
11438 | # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible |
11439 | # FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname | |
11440 | # in collect2.c, <fcntl.h> isn't visible, but the configure test below needs | |
11441 | # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME. | |
ad6717df | 11442 | |
351df804 | 11443 | for ac_func in ldgetname |
c1800ec8 | 11444 | do |
ad6717df | 11445 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11446 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11447 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11448 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11449 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11450 | else | |
11451 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11452 | /* confdefs.h. */ |
11453 | _ACEOF | |
11454 | cat confdefs.h >>conftest.$ac_ext | |
11455 | cat >>conftest.$ac_ext <<_ACEOF | |
11456 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11457 | #undef $ac_tr_decl |
11458 | #define $ac_tr_decl 1 | |
ba479fd2 | 11459 | |
351df804 KG |
11460 | #include "ansidecl.h" |
11461 | #include "system.h" | |
11462 | #ifdef HAVE_LDFCN_H | |
2102b2fe RS |
11463 | #undef FREAD |
11464 | #undef FWRITE | |
351df804 KG |
11465 | #include <ldfcn.h> |
11466 | #endif | |
11467 | ||
11468 | ||
ba479fd2 NN |
11469 | int |
11470 | main () | |
11471 | { | |
351df804 KG |
11472 | #ifndef $ac_func |
11473 | char *(*pfn) = (char *(*)) $ac_func ; | |
11474 | #endif | |
ba479fd2 NN |
11475 | ; |
11476 | return 0; | |
11477 | } | |
11478 | _ACEOF | |
11479 | rm -f conftest.$ac_objext | |
11480 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11481 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11482 | ac_status=$? |
86da66b5 HPN |
11483 | grep -v '^ *+' conftest.er1 >conftest.err |
11484 | rm -f conftest.er1 | |
11485 | cat conftest.err >&5 | |
ba479fd2 NN |
11486 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11487 | (exit $ac_status); } && | |
d7974fe6 KC |
11488 | { ac_try='test -z "$ac_c_werror_flag" |
11489 | || test ! -s conftest.err' | |
86da66b5 HPN |
11490 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11491 | (eval $ac_try) 2>&5 | |
11492 | ac_status=$? | |
11493 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11494 | (exit $ac_status); }; } && | |
11495 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11496 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11497 | (eval $ac_try) 2>&5 | |
11498 | ac_status=$? | |
11499 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11500 | (exit $ac_status); }; }; then | |
351df804 KG |
11501 | eval "gcc_cv_have_decl_$ac_func=yes" |
11502 | else | |
ba479fd2 NN |
11503 | echo "$as_me: failed program was:" >&5 |
11504 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11505 | ||
11506 | eval "gcc_cv_have_decl_$ac_func=no" | |
351df804 | 11507 | fi |
86da66b5 | 11508 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
351df804 KG |
11509 | fi |
11510 | ||
11511 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
11512 | echo "$as_me:$LINENO: result: yes" >&5 |
11513 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 11514 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11515 | _ACEOF |
11516 | ||
351df804 | 11517 | else |
ba479fd2 NN |
11518 | echo "$as_me:$LINENO: result: no" >&5 |
11519 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 11520 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11521 | _ACEOF |
11522 | ||
351df804 KG |
11523 | fi |
11524 | ||
11525 | done | |
ba479fd2 | 11526 | |
351df804 KG |
11527 | |
11528 | ||
11529 | for ac_func in times | |
11530 | do | |
ad6717df | 11531 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11532 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11533 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11534 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11535 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11536 | else | |
11537 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11538 | /* confdefs.h. */ |
11539 | _ACEOF | |
11540 | cat confdefs.h >>conftest.$ac_ext | |
11541 | cat >>conftest.$ac_ext <<_ACEOF | |
11542 | /* end confdefs.h. */ | |
351df804 KG |
11543 | #undef $ac_tr_decl |
11544 | #define $ac_tr_decl 1 | |
ba479fd2 | 11545 | |
c1800ec8 ZW |
11546 | #include "ansidecl.h" |
11547 | #include "system.h" | |
11548 | #ifdef HAVE_SYS_TIMES_H | |
11549 | #include <sys/times.h> | |
11550 | #endif | |
11551 | ||
11552 | ||
ba479fd2 NN |
11553 | int |
11554 | main () | |
11555 | { | |
c1800ec8 ZW |
11556 | #ifndef $ac_func |
11557 | char *(*pfn) = (char *(*)) $ac_func ; | |
11558 | #endif | |
ba479fd2 NN |
11559 | ; |
11560 | return 0; | |
11561 | } | |
11562 | _ACEOF | |
11563 | rm -f conftest.$ac_objext | |
11564 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11565 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11566 | ac_status=$? |
86da66b5 HPN |
11567 | grep -v '^ *+' conftest.er1 >conftest.err |
11568 | rm -f conftest.er1 | |
11569 | cat conftest.err >&5 | |
ba479fd2 NN |
11570 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11571 | (exit $ac_status); } && | |
d7974fe6 KC |
11572 | { ac_try='test -z "$ac_c_werror_flag" |
11573 | || test ! -s conftest.err' | |
86da66b5 HPN |
11574 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11575 | (eval $ac_try) 2>&5 | |
11576 | ac_status=$? | |
11577 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11578 | (exit $ac_status); }; } && | |
11579 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11580 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11581 | (eval $ac_try) 2>&5 | |
11582 | ac_status=$? | |
11583 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11584 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11585 | eval "gcc_cv_have_decl_$ac_func=yes" |
11586 | else | |
ba479fd2 NN |
11587 | echo "$as_me: failed program was:" >&5 |
11588 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11589 | ||
11590 | eval "gcc_cv_have_decl_$ac_func=no" | |
c1800ec8 | 11591 | fi |
86da66b5 | 11592 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 ZW |
11593 | fi |
11594 | ||
11595 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
11596 | echo "$as_me:$LINENO: result: yes" >&5 |
11597 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 11598 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11599 | _ACEOF |
11600 | ||
c1800ec8 | 11601 | else |
ba479fd2 NN |
11602 | echo "$as_me:$LINENO: result: no" >&5 |
11603 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 11604 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11605 | _ACEOF |
11606 | ||
c1800ec8 ZW |
11607 | fi |
11608 | ||
11609 | done | |
c1800ec8 ZW |
11610 | |
11611 | ||
11612 | # More time-related stuff. | |
ba479fd2 NN |
11613 | echo "$as_me:$LINENO: checking for struct tms" >&5 |
11614 | echo $ECHO_N "checking for struct tms... $ECHO_C" >&6 | |
11615 | if test "${ac_cv_struct_tms+set}" = set; then | |
11616 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11617 | else | |
11618 | ||
11619 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11620 | /* confdefs.h. */ |
11621 | _ACEOF | |
11622 | cat confdefs.h >>conftest.$ac_ext | |
11623 | cat >>conftest.$ac_ext <<_ACEOF | |
11624 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11625 | |
11626 | #include "ansidecl.h" | |
11627 | #include "system.h" | |
11628 | #ifdef HAVE_SYS_TIMES_H | |
11629 | #include <sys/times.h> | |
11630 | #endif | |
11631 | ||
ba479fd2 NN |
11632 | int |
11633 | main () | |
11634 | { | |
c1800ec8 | 11635 | struct tms tms; |
ba479fd2 NN |
11636 | ; |
11637 | return 0; | |
11638 | } | |
11639 | _ACEOF | |
11640 | rm -f conftest.$ac_objext | |
11641 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11642 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11643 | ac_status=$? |
86da66b5 HPN |
11644 | grep -v '^ *+' conftest.er1 >conftest.err |
11645 | rm -f conftest.er1 | |
11646 | cat conftest.err >&5 | |
ba479fd2 NN |
11647 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11648 | (exit $ac_status); } && | |
d7974fe6 KC |
11649 | { ac_try='test -z "$ac_c_werror_flag" |
11650 | || test ! -s conftest.err' | |
86da66b5 HPN |
11651 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11652 | (eval $ac_try) 2>&5 | |
11653 | ac_status=$? | |
11654 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11655 | (exit $ac_status); }; } && | |
11656 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11657 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11658 | (eval $ac_try) 2>&5 | |
11659 | ac_status=$? | |
11660 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11661 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11662 | ac_cv_struct_tms=yes |
11663 | else | |
ba479fd2 NN |
11664 | echo "$as_me: failed program was:" >&5 |
11665 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11666 | ||
11667 | ac_cv_struct_tms=no | |
c1800ec8 | 11668 | fi |
86da66b5 | 11669 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 11670 | fi |
ba479fd2 NN |
11671 | echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 |
11672 | echo "${ECHO_T}$ac_cv_struct_tms" >&6 | |
63cf211a | 11673 | if test $ac_cv_struct_tms = yes; then |
ba479fd2 NN |
11674 | |
11675 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 11676 | #define HAVE_STRUCT_TMS 1 |
ba479fd2 | 11677 | _ACEOF |
c1800ec8 ZW |
11678 | |
11679 | fi | |
11680 | ||
11681 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
11682 | # revisit after autoconf 2.50. | |
ba479fd2 NN |
11683 | echo "$as_me:$LINENO: checking for clock_t" >&5 |
11684 | echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 | |
11685 | if test "${gcc_cv_type_clock_t+set}" = set; then | |
11686 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11687 | else | |
11688 | ||
11689 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11690 | /* confdefs.h. */ |
11691 | _ACEOF | |
11692 | cat confdefs.h >>conftest.$ac_ext | |
11693 | cat >>conftest.$ac_ext <<_ACEOF | |
11694 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11695 | |
11696 | #include "ansidecl.h" | |
11697 | #include "system.h" | |
11698 | ||
ba479fd2 NN |
11699 | int |
11700 | main () | |
11701 | { | |
c1800ec8 | 11702 | clock_t x; |
ba479fd2 NN |
11703 | ; |
11704 | return 0; | |
11705 | } | |
11706 | _ACEOF | |
11707 | rm -f conftest.$ac_objext | |
11708 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11709 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11710 | ac_status=$? |
86da66b5 HPN |
11711 | grep -v '^ *+' conftest.er1 >conftest.err |
11712 | rm -f conftest.er1 | |
11713 | cat conftest.err >&5 | |
ba479fd2 NN |
11714 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11715 | (exit $ac_status); } && | |
d7974fe6 KC |
11716 | { ac_try='test -z "$ac_c_werror_flag" |
11717 | || test ! -s conftest.err' | |
86da66b5 HPN |
11718 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11719 | (eval $ac_try) 2>&5 | |
11720 | ac_status=$? | |
11721 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11722 | (exit $ac_status); }; } && | |
11723 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11724 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11725 | (eval $ac_try) 2>&5 | |
11726 | ac_status=$? | |
11727 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11728 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11729 | gcc_cv_type_clock_t=yes |
11730 | else | |
ba479fd2 NN |
11731 | echo "$as_me: failed program was:" >&5 |
11732 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11733 | ||
11734 | gcc_cv_type_clock_t=no | |
c1800ec8 | 11735 | fi |
86da66b5 | 11736 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 11737 | fi |
ba479fd2 NN |
11738 | echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 |
11739 | echo "${ECHO_T}$gcc_cv_type_clock_t" >&6 | |
63cf211a | 11740 | if test $gcc_cv_type_clock_t = yes; then |
ba479fd2 NN |
11741 | |
11742 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 11743 | #define HAVE_CLOCK_T 1 |
ba479fd2 | 11744 | _ACEOF |
c1800ec8 ZW |
11745 | |
11746 | fi | |
11747 | ||
eb70d86d AS |
11748 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
11749 | CFLAGS="$saved_CFLAGS" | |
11750 | ||
07cf4226 DM |
11751 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
11752 | if test "${enable_initfini_array+set}" = set; then | |
11753 | enableval="$enable_initfini_array" | |
ba479fd2 | 11754 | |
07cf4226 | 11755 | else |
ba479fd2 NN |
11756 | |
11757 | echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5 | |
11758 | echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6 | |
11759 | if test "${gcc_cv_initfini_array+set}" = set; then | |
11760 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
07cf4226 | 11761 | else |
eb70d86d | 11762 | if test "$cross_compiling" = yes; then |
918c4fe4 | 11763 | gcc_cv_initfini_array=no |
eb70d86d | 11764 | else |
ba479fd2 | 11765 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11766 | /* confdefs.h. */ |
11767 | _ACEOF | |
11768 | cat confdefs.h >>conftest.$ac_ext | |
11769 | cat >>conftest.$ac_ext <<_ACEOF | |
11770 | /* end confdefs.h. */ | |
eb70d86d | 11771 | |
07cf4226 DM |
11772 | static int x = -1; |
11773 | int main (void) { return x; } | |
11774 | int foo (void) { x = 0; } | |
11775 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
ba479fd2 NN |
11776 | _ACEOF |
11777 | rm -f conftest$ac_exeext | |
11778 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11779 | (eval $ac_link) 2>&5 | |
11780 | ac_status=$? | |
11781 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11782 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
11783 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11784 | (eval $ac_try) 2>&5 | |
11785 | ac_status=$? | |
11786 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11787 | (exit $ac_status); }; }; then | |
918c4fe4 | 11788 | gcc_cv_initfini_array=yes |
eb70d86d | 11789 | else |
ba479fd2 NN |
11790 | echo "$as_me: program exited with status $ac_status" >&5 |
11791 | echo "$as_me: failed program was:" >&5 | |
11792 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11793 | ||
11794 | ( exit $ac_status ) | |
11795 | gcc_cv_initfini_array=no | |
eb70d86d | 11796 | fi |
86da66b5 | 11797 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
eb70d86d | 11798 | fi |
07cf4226 | 11799 | fi |
ba479fd2 NN |
11800 | echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5 |
11801 | echo "${ECHO_T}$gcc_cv_initfini_array" >&6 | |
eb70d86d | 11802 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 11803 | |
ba479fd2 | 11804 | fi; |
63cf211a | 11805 | if test $enable_initfini_array = yes; then |
ba479fd2 NN |
11806 | |
11807 | cat >>confdefs.h <<\_ACEOF | |
eb70d86d | 11808 | #define HAVE_INITFINI_ARRAY 1 |
ba479fd2 | 11809 | _ACEOF |
07cf4226 | 11810 | |
eb70d86d | 11811 | fi |
81bf3d9e | 11812 | |
ba479fd2 NN |
11813 | # mkdir takes a single argument on some systems. |
11814 | echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5 | |
11815 | echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6 | |
11816 | if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then | |
11817 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75923b2f | 11818 | else |
ba479fd2 | 11819 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11820 | /* confdefs.h. */ |
11821 | _ACEOF | |
11822 | cat confdefs.h >>conftest.$ac_ext | |
11823 | cat >>conftest.$ac_ext <<_ACEOF | |
11824 | /* end confdefs.h. */ | |
75923b2f MK |
11825 | |
11826 | #include <sys/types.h> | |
11827 | #ifdef HAVE_SYS_STAT_H | |
11828 | # include <sys/stat.h> | |
11829 | #endif | |
11830 | #ifdef HAVE_UNISTD_H | |
11831 | # include <unistd.h> | |
11832 | #endif | |
11833 | #ifdef HAVE_DIRECT_H | |
11834 | # include <direct.h> | |
11835 | #endif | |
ba479fd2 NN |
11836 | int |
11837 | main () | |
11838 | { | |
75923b2f | 11839 | mkdir ("foo", 0); |
ba479fd2 NN |
11840 | ; |
11841 | return 0; | |
11842 | } | |
11843 | _ACEOF | |
11844 | rm -f conftest.$ac_objext | |
11845 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11846 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11847 | ac_status=$? |
86da66b5 HPN |
11848 | grep -v '^ *+' conftest.er1 >conftest.err |
11849 | rm -f conftest.er1 | |
11850 | cat conftest.err >&5 | |
ba479fd2 NN |
11851 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11852 | (exit $ac_status); } && | |
d7974fe6 KC |
11853 | { ac_try='test -z "$ac_c_werror_flag" |
11854 | || test ! -s conftest.err' | |
86da66b5 HPN |
11855 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11856 | (eval $ac_try) 2>&5 | |
11857 | ac_status=$? | |
11858 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11859 | (exit $ac_status); }; } && | |
11860 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11861 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11862 | (eval $ac_try) 2>&5 | |
11863 | ac_status=$? | |
11864 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11865 | (exit $ac_status); }; }; then | |
75923b2f MK |
11866 | gcc_cv_mkdir_takes_one_arg=no |
11867 | else | |
ba479fd2 NN |
11868 | echo "$as_me: failed program was:" >&5 |
11869 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11870 | ||
11871 | gcc_cv_mkdir_takes_one_arg=yes | |
75923b2f | 11872 | fi |
86da66b5 | 11873 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75923b2f | 11874 | fi |
ba479fd2 NN |
11875 | echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5 |
11876 | echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6 | |
63cf211a | 11877 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then |
ba479fd2 NN |
11878 | |
11879 | cat >>confdefs.h <<\_ACEOF | |
75923b2f | 11880 | #define MKDIR_TAKES_ONE_ARG 1 |
ba479fd2 | 11881 | _ACEOF |
75923b2f MK |
11882 | |
11883 | fi | |
11884 | ||
11885 | ||
861bb6c1 JL |
11886 | # File extensions |
11887 | manext='.1' | |
11888 | objext='.o' | |
11889 | ||
11890 | ||
11891 | ||
4977bab6 ZW |
11892 | # With Setjmp/Longjmp based exception handling. |
11893 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
11894 | if test "${enable_sjlj_exceptions+set}" = set; then | |
11895 | enableval="$enable_sjlj_exceptions" | |
11896 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
63cf211a | 11897 | |
ba479fd2 NN |
11898 | cat >>confdefs.h <<_ACEOF |
11899 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
11900 | _ACEOF | |
4977bab6 | 11901 | |
ba479fd2 | 11902 | fi; |
4977bab6 | 11903 | |
443728bb L |
11904 | # For platforms with the unwind ABI which includes an unwind library, |
11905 | # libunwind, we can choose to use the system libunwind. | |
4977bab6 | 11906 | |
443728bb L |
11907 | # Check whether --with-system-libunwind or --without-system-libunwind was given. |
11908 | if test "${with_system_libunwind+set}" = set; then | |
11909 | withval="$with_system_libunwind" | |
4977bab6 | 11910 | |
ba479fd2 | 11911 | fi; |
4977bab6 | 11912 | |
34a86c2b NN |
11913 | # -------------------------------------------------------- |
11914 | # Build, host, and target specific configuration fragments | |
11915 | # -------------------------------------------------------- | |
11916 | ||
5b28c537 NN |
11917 | # Collect build-machine-specific information. |
11918 | . ${srcdir}/config.build | |
11919 | ||
a89ea0df NN |
11920 | # Collect host-machine-specific information. |
11921 | . ${srcdir}/config.host | |
11922 | ||
ef69da62 | 11923 | target_gtfiles= |
a89ea0df NN |
11924 | |
11925 | # Collect target-machine-specific information. | |
8ad9fb33 | 11926 | . ${srcdir}/config.gcc |
861bb6c1 JL |
11927 | |
11928 | extra_objs="${host_extra_objs} ${extra_objs}" | |
30500d84 | 11929 | extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}" |
861bb6c1 JL |
11930 | |
11931 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 11932 | if test x"$tm_file" = x |
861bb6c1 JL |
11933 | then tm_file=$cpu_type/$cpu_type.h; fi |
11934 | ||
6b2adea9 | 11935 | if test x"$extra_headers" = x |
861bb6c1 JL |
11936 | then extra_headers=; fi |
11937 | ||
75bffa71 | 11938 | if test x$md_file = x |
e98e406f | 11939 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 11940 | |
75bffa71 | 11941 | if test x$out_file = x |
861bb6c1 JL |
11942 | then out_file=$cpu_type/$cpu_type.c; fi |
11943 | ||
75bffa71 | 11944 | if test x"$tmake_file" = x |
861bb6c1 JL |
11945 | then tmake_file=$cpu_type/t-$cpu_type |
11946 | fi | |
11947 | ||
90e6a802 | 11948 | if test x"$dwarf2" = xyes |
756ee602 | 11949 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
11950 | fi |
11951 | ||
861bb6c1 | 11952 | # Say what files are being used for the output code and MD file. |
11642c3a | 11953 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
11954 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
11955 | ||
11642c3a | 11956 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
11957 | # about them and drop them. |
11958 | ||
11642c3a ZW |
11959 | bx= |
11960 | for x in $build_xm_file; do | |
11961 | if test -f $srcdir/config/$x | |
11962 | then bx="$bx $x" | |
ba479fd2 NN |
11963 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
11964 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
11965 | fi |
11966 | done | |
11967 | build_xm_file="$bx" | |
11968 | ||
11969 | hx= | |
11970 | for x in $host_xm_file; do | |
11971 | if test -f $srcdir/config/$x | |
11972 | then hx="$hx $x" | |
ba479fd2 NN |
11973 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
11974 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
11975 | fi |
11976 | done | |
11977 | host_xm_file="$hx" | |
11978 | ||
11979 | tx= | |
11980 | for x in $xm_file; do | |
11981 | if test -f $srcdir/config/$x | |
11982 | then tx="$tx $x" | |
ba479fd2 NN |
11983 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
11984 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
11985 | fi |
11986 | done | |
11987 | xm_file="$tx" | |
11988 | ||
861bb6c1 JL |
11989 | count=a |
11990 | for f in $tm_file; do | |
11991 | count=${count}x | |
11992 | done | |
75bffa71 | 11993 | if test $count = ax; then |
861bb6c1 JL |
11994 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
11995 | else | |
11996 | echo "Using the following target machine macro files:" | |
11997 | for f in $tm_file; do | |
11998 | echo " $srcdir/config/$f" | |
11999 | done | |
12000 | fi | |
12001 | ||
4977bab6 | 12002 | if test x$need_64bit_hwint = xyes; then |
ba479fd2 NN |
12003 | |
12004 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 12005 | #define NEED_64BIT_HOST_WIDE_INT 1 |
ba479fd2 | 12006 | _ACEOF |
4977bab6 ZW |
12007 | |
12008 | fi | |
12009 | ||
99fa8911 AP |
12010 | if test x$use_long_long_for_widest_fast_int = xyes; then |
12011 | ||
12012 | cat >>confdefs.h <<\_ACEOF | |
12013 | #define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1 | |
12014 | _ACEOF | |
12015 | ||
12016 | fi | |
12017 | ||
861bb6c1 JL |
12018 | count=a |
12019 | for f in $host_xm_file; do | |
12020 | count=${count}x | |
12021 | done | |
11642c3a ZW |
12022 | if test $count = a; then |
12023 | : | |
12024 | elif test $count = ax; then | |
861bb6c1 JL |
12025 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
12026 | else | |
12027 | echo "Using the following host machine macro files:" | |
12028 | for f in $host_xm_file; do | |
12029 | echo " $srcdir/config/$f" | |
12030 | done | |
12031 | fi | |
476d9098 | 12032 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 12033 | |
75bffa71 | 12034 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
12035 | count=a |
12036 | for f in $build_xm_file; do | |
12037 | count=${count}x | |
12038 | done | |
11642c3a ZW |
12039 | if test $count = a; then |
12040 | : | |
12041 | elif test $count = ax; then | |
861bb6c1 JL |
12042 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
12043 | else | |
12044 | echo "Using the following build machine macro files:" | |
12045 | for f in $build_xm_file; do | |
12046 | echo " $srcdir/config/$f" | |
12047 | done | |
12048 | fi | |
12049 | fi | |
12050 | ||
8bb915b6 NN |
12051 | # --------- |
12052 | # Threading | |
12053 | # --------- | |
12054 | ||
c2e494a8 | 12055 | # Check if a valid thread package |
615be2cf | 12056 | case ${enable_threads} in |
c2e494a8 NN |
12057 | "" | no) |
12058 | # No threads | |
12059 | target_thread_file='single' | |
12060 | ;; | |
12061 | yes) | |
12062 | # default | |
12063 | target_thread_file='single' | |
12064 | ;; | |
18167442 | 12065 | aix | dce | gnat | irix | posix | posix95 | rtems | \ |
769e49eb | 12066 | single | solaris | vxworks | win32 ) |
615be2cf | 12067 | target_thread_file=${enable_threads} |
c2e494a8 NN |
12068 | ;; |
12069 | *) | |
615be2cf | 12070 | echo "${enable_threads} is an unknown thread package" 1>&2 |
c2e494a8 NN |
12071 | exit 1 |
12072 | ;; | |
12073 | esac | |
12074 | ||
12075 | if test x${thread_file} = x; then | |
12076 | # No thread file set by target-specific clauses in config.gcc, | |
12077 | # so use file chosen by default logic above | |
12078 | thread_file=${target_thread_file} | |
861bb6c1 JL |
12079 | fi |
12080 | ||
8bb915b6 NN |
12081 | # Make gthr-default.h if we have a thread file. |
12082 | gthread_flags= | |
12083 | if test $thread_file != single; then | |
12084 | rm -f gthr-default.h | |
12085 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h | |
12086 | gthread_flags=-DHAVE_GTHR_DEFAULT | |
12087 | fi | |
12088 | ||
12089 | ||
12090 | # -------- | |
12091 | # UNSORTED | |
12092 | # -------- | |
12093 | ||
18fbf599 | 12094 | use_cxa_atexit=no |
2121a768 JT |
12095 | if test x$enable___cxa_atexit = xyes || \ |
12096 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
18fbf599 PB |
12097 | if test x$host = x$target; then |
12098 | echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 | |
354b7da5 DH |
12099 | echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6 |
12100 | if test "${ac_cv_func___cxa_atexit+set}" = set; then | |
12101 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12102 | else | |
12103 | cat >conftest.$ac_ext <<_ACEOF | |
354b7da5 DH |
12104 | /* confdefs.h. */ |
12105 | _ACEOF | |
12106 | cat confdefs.h >>conftest.$ac_ext | |
12107 | cat >>conftest.$ac_ext <<_ACEOF | |
12108 | /* end confdefs.h. */ | |
86da66b5 HPN |
12109 | /* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit. |
12110 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
12111 | #define __cxa_atexit innocuous___cxa_atexit | |
12112 | ||
354b7da5 DH |
12113 | /* System header to define __stub macros and hopefully few prototypes, |
12114 | which can conflict with char __cxa_atexit (); below. | |
12115 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
12116 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 12117 | |
354b7da5 DH |
12118 | #ifdef __STDC__ |
12119 | # include <limits.h> | |
12120 | #else | |
12121 | # include <assert.h> | |
12122 | #endif | |
86da66b5 HPN |
12123 | |
12124 | #undef __cxa_atexit | |
12125 | ||
354b7da5 DH |
12126 | /* Override any gcc2 internal prototype to avoid an error. */ |
12127 | #ifdef __cplusplus | |
12128 | extern "C" | |
12129 | { | |
12130 | #endif | |
12131 | /* We use char because int might match the return type of a gcc2 | |
12132 | builtin and then its argument prototype would still apply. */ | |
12133 | char __cxa_atexit (); | |
12134 | /* The GNU C library defines this for functions which it implements | |
12135 | to always fail with ENOSYS. Some functions are actually named | |
12136 | something starting with __ and the normal name is an alias. */ | |
12137 | #if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit) | |
12138 | choke me | |
12139 | #else | |
12140 | char (*f) () = __cxa_atexit; | |
12141 | #endif | |
12142 | #ifdef __cplusplus | |
12143 | } | |
12144 | #endif | |
12145 | ||
12146 | int | |
12147 | main () | |
12148 | { | |
12149 | return f != __cxa_atexit; | |
12150 | ; | |
12151 | return 0; | |
12152 | } | |
12153 | _ACEOF | |
12154 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12155 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12156 | (eval $ac_link) 2>conftest.er1 |
354b7da5 | 12157 | ac_status=$? |
86da66b5 HPN |
12158 | grep -v '^ *+' conftest.er1 >conftest.err |
12159 | rm -f conftest.er1 | |
12160 | cat conftest.err >&5 | |
354b7da5 DH |
12161 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12162 | (exit $ac_status); } && | |
d7974fe6 KC |
12163 | { ac_try='test -z "$ac_c_werror_flag" |
12164 | || test ! -s conftest.err' | |
86da66b5 HPN |
12165 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12166 | (eval $ac_try) 2>&5 | |
12167 | ac_status=$? | |
12168 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12169 | (exit $ac_status); }; } && | |
12170 | { ac_try='test -s conftest$ac_exeext' | |
354b7da5 DH |
12171 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12172 | (eval $ac_try) 2>&5 | |
12173 | ac_status=$? | |
12174 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12175 | (exit $ac_status); }; }; then | |
12176 | ac_cv_func___cxa_atexit=yes | |
12177 | else | |
12178 | echo "$as_me: failed program was:" >&5 | |
12179 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12180 | ||
12181 | ac_cv_func___cxa_atexit=no | |
12182 | fi | |
86da66b5 HPN |
12183 | rm -f conftest.err conftest.$ac_objext \ |
12184 | conftest$ac_exeext conftest.$ac_ext | |
354b7da5 DH |
12185 | fi |
12186 | echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5 | |
12187 | echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6 | |
12188 | if test $ac_cv_func___cxa_atexit = yes; then | |
18fbf599 PB |
12189 | use_cxa_atexit=yes |
12190 | else | |
12191 | echo "__cxa_atexit can't be enabled on this target" | |
12192 | fi | |
12193 | ||
12194 | else | |
12195 | # We can't check for __cxa_atexit when building a cross, so assume | |
12196 | # it is available | |
12197 | use_cxa_atexit=yes | |
12198 | fi | |
12199 | if test x$use_cxa_atexit = xyes; then | |
ba479fd2 NN |
12200 | |
12201 | cat >>confdefs.h <<\_ACEOF | |
2121a768 | 12202 | #define DEFAULT_USE_CXA_ATEXIT 1 |
ba479fd2 | 12203 | _ACEOF |
2121a768 | 12204 | |
18fbf599 | 12205 | fi |
2121a768 JT |
12206 | fi |
12207 | ||
a5381466 | 12208 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
12209 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
12210 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
ba479fd2 NN |
12211 | |
12212 | ||
12213 | cat >>confdefs.h <<_ACEOF | |
e22340b0 | 12214 | #define EXTRA_MODES_FILE "config/$extra_modes" |
ba479fd2 | 12215 | _ACEOF |
a5381466 ZW |
12216 | |
12217 | fi | |
12218 | ||
75685792 RS |
12219 | # Convert extra_options into a form suitable for Makefile use. |
12220 | extra_opt_files= | |
12221 | for f in $extra_options; do | |
12222 | extra_opt_files="$extra_opt_files \$(srcdir)/config/$f" | |
12223 | done | |
12224 | ||
12225 | ||
b7cb92ad | 12226 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 12227 | # the first file included by config.h. |
4977bab6 | 12228 | # If host=build, it is correct to have bconfig include auto-host.h |
ba479fd2 | 12229 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 12230 | # work to find out the build config parameters. |
75bffa71 | 12231 | if test x$host = x$build |
db81d74a | 12232 | then |
eaf4e618 | 12233 | build_auto=auto-host.h |
b7cb92ad JL |
12234 | else |
12235 | # We create a subdir, then run autoconf in the subdir. | |
12236 | # To prevent recursion we set host and build for the new | |
12237 | # invocation of configure to the build for this invocation | |
ba479fd2 | 12238 | # of configure. |
b7cb92ad JL |
12239 | tempdir=build.$$ |
12240 | rm -rf $tempdir | |
12241 | mkdir $tempdir | |
12242 | cd $tempdir | |
12243 | case ${srcdir} in | |
255b8a49 | 12244 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
12245 | *) realsrcdir=../${srcdir};; |
12246 | esac | |
d920e825 L |
12247 | saved_CFLAGS="${CFLAGS}" |
12248 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
12249 | ${realsrcdir}/configure \ | |
33e70558 | 12250 | --enable-languages=${enable_languages-all} \ |
534d0cc0 | 12251 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 12252 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
12253 | |
12254 | # We just finished tests for the build machine, so rename | |
12255 | # the file auto-build.h in the gcc directory. | |
12256 | mv auto-host.h ../auto-build.h | |
12257 | cd .. | |
12258 | rm -rf $tempdir | |
eaf4e618 | 12259 | build_auto=auto-build.h |
db81d74a RH |
12260 | fi |
12261 | ||
06f0b04c | 12262 | |
eaf4e618 | 12263 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
12264 | tm_p_file="${tm_p_file} tm-preds.h" |
12265 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
12266 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 12267 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 | 12268 | # put this back in temporarily. |
232b67d9 | 12269 | xm_file="auto-host.h ansidecl.h ${xm_file}" |
0056a9b5 | 12270 | |
34a86c2b NN |
12271 | # -------- |
12272 | # UNSORTED | |
12273 | # -------- | |
12274 | ||
cc1e60ea | 12275 | # Compile in configure arguments. |
8105825d | 12276 | if test -f configargs.h ; then |
cc1e60ea | 12277 | # Being re-configured. |
022dae81 | 12278 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
12279 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
12280 | else | |
12281 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
12282 | fi | |
eeae7b41 DJ |
12283 | |
12284 | # Double all backslashes and backslash all quotes to turn | |
12285 | # gcc_config_arguments into a C string. | |
12286 | sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out | |
12287 | $gcc_config_arguments | |
12288 | EOF | |
12289 | gcc_config_arguments_str=`cat conftest.out` | |
12290 | rm -f conftest.out | |
12291 | ||
cc1e60ea JM |
12292 | cat > configargs.h <<EOF |
12293 | /* Generated automatically. */ | |
eeae7b41 | 12294 | static const char configuration_arguments[] = "$gcc_config_arguments_str"; |
a6687d2b | 12295 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
12296 | |
12297 | static const struct { | |
12298 | const char *name, *value; | |
12299 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
12300 | EOF |
12301 | ||
ab87f8c8 | 12302 | # Internationalization |
56694dd9 ZW |
12303 | # If we haven't got the data from the intl directory, |
12304 | # assume NLS is disabled. | |
ba479fd2 NN |
12305 | USE_NLS=no |
12306 | LIBINTL= | |
12307 | LIBINTL_DEP= | |
12308 | INCINTL= | |
12309 | XGETTEXT= | |
12310 | GMSGFMT= | |
12311 | POSUB= | |
56694dd9 ZW |
12312 | if test -f ../intl/config.intl; then |
12313 | . ../intl/config.intl | |
093e61a6 | 12314 | fi |
ba479fd2 NN |
12315 | echo "$as_me:$LINENO: checking whether NLS is requested" >&5 |
12316 | echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 | |
56694dd9 | 12317 | if test x"$USE_NLS" != xyes; then |
ba479fd2 NN |
12318 | echo "$as_me:$LINENO: result: no" >&5 |
12319 | echo "${ECHO_T}no" >&6 | |
56694dd9 | 12320 | else |
ba479fd2 NN |
12321 | echo "$as_me:$LINENO: result: yes" >&5 |
12322 | echo "${ECHO_T}yes" >&6 | |
12323 | ||
12324 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 12325 | #define ENABLE_NLS 1 |
ba479fd2 | 12326 | _ACEOF |
56694dd9 | 12327 | |
093e61a6 | 12328 | |
ba479fd2 NN |
12329 | echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 |
12330 | echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 | |
56694dd9 | 12331 | # Look for .po and .gmo files in the source directory. |
ba479fd2 | 12332 | CATALOGS= |
56694dd9 ZW |
12333 | XLINGUAS= |
12334 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
12335 | # If there aren't any .gmo files the shell will give us the | |
12336 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
12337 | # weeded out. | |
12338 | case "$cat" in *\**) | |
12339 | continue;; | |
12340 | esac | |
12341 | # The quadruple backslash is collapsed to a double backslash | |
12342 | # by the backticks, then collapsed again by the double quotes, | |
12343 | # leaving us with one backslash in the sed expression (right | |
12344 | # before the dot that mustn't act as a wildcard). | |
12345 | cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"` | |
12346 | lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"` | |
12347 | # The user is allowed to set LINGUAS to a list of languages to | |
12348 | # install catalogs for. If it's empty that means "all of them." | |
12349 | if test "x$LINGUAS" = x; then | |
12350 | CATALOGS="$CATALOGS $cat" | |
12351 | XLINGUAS="$XLINGUAS $lang" | |
12352 | else | |
12353 | case "$LINGUAS" in *$lang*) | |
12354 | CATALOGS="$CATALOGS $cat" | |
12355 | XLINGUAS="$XLINGUAS $lang" | |
12356 | ;; | |
12357 | esac | |
12358 | fi | |
12359 | done | |
12360 | LINGUAS="$XLINGUAS" | |
ba479fd2 NN |
12361 | echo "$as_me:$LINENO: result: $LINGUAS" >&5 |
12362 | echo "${ECHO_T}$LINGUAS" >&6 | |
56694dd9 | 12363 | fi |
861bb6c1 | 12364 | |
56694dd9 ZW |
12365 | # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get |
12366 | # -liconv on the link line twice. | |
12367 | case "$LIBINTL" in *$LIBICONV*) | |
12368 | LIBICONV= ;; | |
12369 | esac | |
dc6746e7 | 12370 | |
7f970b70 AM |
12371 | # Check whether --enable-secureplt or --disable-secureplt was given. |
12372 | if test "${enable_secureplt+set}" = set; then | |
12373 | enableval="$enable_secureplt" | |
12374 | ||
12375 | fi; | |
12376 | ||
56694dd9 ZW |
12377 | # Windows32 Registry support for specifying GCC installation paths. |
12378 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
12379 | if test "${enable_win32_registry+set}" = set; then | |
12380 | enableval="$enable_win32_registry" | |
dc6746e7 | 12381 | |
ba479fd2 | 12382 | fi; |
ba479fd2 | 12383 | |
a1286ef5 ZW |
12384 | case $host_os in |
12385 | win32 | pe | cygwin* | mingw32* | uwin*) | |
12386 | if test "x$enable_win32_registry" != xno; then | |
12387 | echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5 | |
ba479fd2 NN |
12388 | echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6 |
12389 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then | |
12390 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12391 | else | |
12392 | ac_func_search_save_LIBS=$LIBS | |
12393 | ac_cv_search_RegOpenKeyExA=no | |
12394 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12395 | /* confdefs.h. */ |
12396 | _ACEOF | |
12397 | cat confdefs.h >>conftest.$ac_ext | |
12398 | cat >>conftest.$ac_ext <<_ACEOF | |
12399 | /* end confdefs.h. */ | |
861bb6c1 | 12400 | |
ab87f8c8 | 12401 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
12402 | #ifdef __cplusplus |
12403 | extern "C" | |
12404 | #endif | |
ab87f8c8 | 12405 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
12406 | builtin and then its argument prototype would still apply. */ |
12407 | char RegOpenKeyExA (); | |
12408 | int | |
12409 | main () | |
12410 | { | |
12411 | RegOpenKeyExA (); | |
12412 | ; | |
12413 | return 0; | |
12414 | } | |
12415 | _ACEOF | |
12416 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12417 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12418 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 12419 | ac_status=$? |
86da66b5 HPN |
12420 | grep -v '^ *+' conftest.er1 >conftest.err |
12421 | rm -f conftest.er1 | |
12422 | cat conftest.err >&5 | |
ba479fd2 NN |
12423 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12424 | (exit $ac_status); } && | |
d7974fe6 KC |
12425 | { ac_try='test -z "$ac_c_werror_flag" |
12426 | || test ! -s conftest.err' | |
86da66b5 HPN |
12427 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12428 | (eval $ac_try) 2>&5 | |
12429 | ac_status=$? | |
12430 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12431 | (exit $ac_status); }; } && | |
12432 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
12433 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12434 | (eval $ac_try) 2>&5 | |
12435 | ac_status=$? | |
12436 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12437 | (exit $ac_status); }; }; then | |
56694dd9 | 12438 | ac_cv_search_RegOpenKeyExA="none required" |
ab87f8c8 | 12439 | else |
ba479fd2 NN |
12440 | echo "$as_me: failed program was:" >&5 |
12441 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12442 | ||
861bb6c1 | 12443 | fi |
86da66b5 HPN |
12444 | rm -f conftest.err conftest.$ac_objext \ |
12445 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
12446 | if test "$ac_cv_search_RegOpenKeyExA" = no; then |
12447 | for ac_lib in advapi32; do | |
12448 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12449 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12450 | /* confdefs.h. */ |
12451 | _ACEOF | |
12452 | cat confdefs.h >>conftest.$ac_ext | |
12453 | cat >>conftest.$ac_ext <<_ACEOF | |
12454 | /* end confdefs.h. */ | |
12455 | ||
56694dd9 | 12456 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
12457 | #ifdef __cplusplus |
12458 | extern "C" | |
12459 | #endif | |
56694dd9 | 12460 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
12461 | builtin and then its argument prototype would still apply. */ |
12462 | char RegOpenKeyExA (); | |
12463 | int | |
12464 | main () | |
12465 | { | |
12466 | RegOpenKeyExA (); | |
12467 | ; | |
12468 | return 0; | |
12469 | } | |
12470 | _ACEOF | |
12471 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12472 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12473 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 12474 | ac_status=$? |
86da66b5 HPN |
12475 | grep -v '^ *+' conftest.er1 >conftest.err |
12476 | rm -f conftest.er1 | |
12477 | cat conftest.err >&5 | |
ba479fd2 NN |
12478 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12479 | (exit $ac_status); } && | |
d7974fe6 KC |
12480 | { ac_try='test -z "$ac_c_werror_flag" |
12481 | || test ! -s conftest.err' | |
86da66b5 HPN |
12482 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12483 | (eval $ac_try) 2>&5 | |
12484 | ac_status=$? | |
12485 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12486 | (exit $ac_status); }; } && | |
12487 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
12488 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12489 | (eval $ac_try) 2>&5 | |
12490 | ac_status=$? | |
12491 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12492 | (exit $ac_status); }; }; then | |
12493 | ac_cv_search_RegOpenKeyExA="-l$ac_lib" | |
56694dd9 | 12494 | break |
861bb6c1 | 12495 | else |
ba479fd2 NN |
12496 | echo "$as_me: failed program was:" >&5 |
12497 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12498 | ||
861bb6c1 | 12499 | fi |
86da66b5 HPN |
12500 | rm -f conftest.err conftest.$ac_objext \ |
12501 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 12502 | done |
6e3f3080 | 12503 | fi |
ba479fd2 NN |
12504 | LIBS=$ac_func_search_save_LIBS |
12505 | fi | |
12506 | echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5 | |
12507 | echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6 | |
12508 | if test "$ac_cv_search_RegOpenKeyExA" != no; then | |
63cf211a | 12509 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" |
ba479fd2 | 12510 | |
cafe096b | 12511 | else |
a1286ef5 | 12512 | enable_win32_registry=no |
093e61a6 | 12513 | fi |
ab87f8c8 | 12514 | |
a1286ef5 ZW |
12515 | fi |
12516 | ||
12517 | if test "x$enable_win32_registry" != xno; then | |
12518 | ||
12519 | cat >>confdefs.h <<\_ACEOF | |
12520 | #define ENABLE_WIN32_REGISTRY 1 | |
12521 | _ACEOF | |
ab87f8c8 | 12522 | |
a1286ef5 ZW |
12523 | |
12524 | if test "x$enable_win32_registry" != xyes \ | |
12525 | && test "x$enable_win32_registry" != x; then | |
ba479fd2 NN |
12526 | |
12527 | cat >>confdefs.h <<_ACEOF | |
a1286ef5 | 12528 | #define WIN32_REGISTRY_KEY "$enable_win32_registry" |
ba479fd2 | 12529 | _ACEOF |
cafe096b | 12530 | |
a1286ef5 ZW |
12531 | fi |
12532 | fi | |
12533 | ;; | |
56694dd9 | 12534 | esac |
ab87f8c8 | 12535 | |
56694dd9 ZW |
12536 | # Get an absolute path to the GCC top-level source directory |
12537 | holddir=`${PWDCMD-pwd}` | |
12538 | cd $srcdir | |
12539 | topdir=`${PWDCMD-pwd}` | |
12540 | cd $holddir | |
ab87f8c8 | 12541 | |
56694dd9 | 12542 | # Conditionalize the makefile for this host machine. |
2ed26f6b | 12543 | xmake_file= |
c406e779 | 12544 | for f in ${host_xmake_file} |
56694dd9 ZW |
12545 | do |
12546 | if test -f ${srcdir}/config/$f | |
12547 | then | |
2ed26f6b | 12548 | xmake_file="${xmake_file} \$(srcdir)/config/$f" |
56694dd9 ZW |
12549 | fi |
12550 | done | |
093e61a6 | 12551 | |
56694dd9 | 12552 | # Conditionalize the makefile for this target machine. |
2ed26f6b | 12553 | tmake_file_= |
c406e779 | 12554 | for f in ${tmake_file} |
56694dd9 ZW |
12555 | do |
12556 | if test -f ${srcdir}/config/$f | |
12557 | then | |
2ed26f6b | 12558 | tmake_file_="${tmake_file_} \$(srcdir)/config/$f" |
56694dd9 ZW |
12559 | fi |
12560 | done | |
2ed26f6b | 12561 | tmake_file="${tmake_file_}" |
71a94577 | 12562 | |
ab87f8c8 JL |
12563 | # If the host doesn't support symlinks, modify CC in |
12564 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
12565 | # Otherwise, we can use "CC=$(CC)". | |
12566 | rm -f symtest.tem | |
35f06ae4 PB |
12567 | case "$LN_S" in |
12568 | *-s*) | |
12569 | cc_set_by_configure="\$(CC)" | |
12570 | quoted_cc_set_by_configure="\$(CC)" | |
12571 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" | |
12572 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" | |
12573 | ;; | |
12574 | *) | |
12575 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
12576 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" | |
12577 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" | |
12578 | quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`" | |
12579 | ;; | |
12580 | esac | |
ab87f8c8 | 12581 | |
5395b47b NN |
12582 | # This is a terrible hack which will go away some day. |
12583 | host_cc_for_libada=${CC} | |
1e3fad21 NN |
12584 | |
12585 | ||
ab87f8c8 JL |
12586 | out_object_file=`basename $out_file .c`.o |
12587 | ||
75685792 RS |
12588 | tm_file_list="options.h" |
12589 | tm_include_list="options.h" | |
ab87f8c8 | 12590 | for f in $tm_file; do |
64ccbc99 | 12591 | case $f in |
d02af173 | 12592 | defaults.h ) |
e22340b0 ZW |
12593 | tm_file_list="${tm_file_list} \$(srcdir)/$f" |
12594 | tm_include_list="${tm_include_list} $f" | |
12595 | ;; | |
12596 | * ) | |
12597 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | |
12598 | tm_include_list="${tm_include_list} config/$f" | |
12599 | ;; | |
64ccbc99 | 12600 | esac |
ab87f8c8 JL |
12601 | done |
12602 | ||
11642c3a | 12603 | tm_p_file_list= |
e22340b0 | 12604 | tm_p_include_list= |
11642c3a | 12605 | for f in $tm_p_file; do |
4977bab6 ZW |
12606 | case $f in |
12607 | tm-preds.h ) | |
e22340b0 ZW |
12608 | tm_p_file_list="${tm_p_file_list} $f" |
12609 | tm_p_include_list="${tm_p_include_list} $f" | |
12610 | ;; | |
12611 | * ) | |
12612 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
12613 | tm_p_include_list="${tm_p_include_list} config/$f" | |
12614 | esac | |
12615 | done | |
12616 | ||
12617 | xm_file_list= | |
12618 | xm_include_list= | |
12619 | for f in $xm_file; do | |
12620 | case $f in | |
12621 | ansidecl.h ) | |
12622 | xm_file_list="${xm_file_list} \$(srcdir)/../include/$f" | |
12623 | xm_include_list="${xm_include_list} $f" | |
12624 | ;; | |
12625 | auto-host.h ) | |
12626 | xm_file_list="${xm_file_list} $f" | |
12627 | xm_include_list="${xm_include_list} $f" | |
12628 | ;; | |
12629 | * ) | |
12630 | xm_file_list="${xm_file_list} \$(srcdir)/config/$f" | |
12631 | xm_include_list="${xm_include_list} config/$f" | |
12632 | ;; | |
4977bab6 | 12633 | esac |
11642c3a ZW |
12634 | done |
12635 | ||
ab87f8c8 | 12636 | host_xm_file_list= |
e22340b0 | 12637 | host_xm_include_list= |
ab87f8c8 | 12638 | for f in $host_xm_file; do |
64ccbc99 | 12639 | case $f in |
d02af173 | 12640 | ansidecl.h ) |
e22340b0 ZW |
12641 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f" |
12642 | host_xm_include_list="${host_xm_include_list} $f" | |
12643 | ;; | |
e2500fed | 12644 | auto-host.h ) |
e22340b0 ZW |
12645 | host_xm_file_list="${host_xm_file_list} $f" |
12646 | host_xm_include_list="${host_xm_include_list} $f" | |
12647 | ;; | |
12648 | * ) | |
12649 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" | |
12650 | host_xm_include_list="${host_xm_include_list} config/$f" | |
12651 | ;; | |
64ccbc99 | 12652 | esac |
ab87f8c8 JL |
12653 | done |
12654 | ||
12655 | build_xm_file_list= | |
12656 | for f in $build_xm_file; do | |
64ccbc99 | 12657 | case $f in |
d02af173 | 12658 | ansidecl.h ) |
e22340b0 ZW |
12659 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f" |
12660 | build_xm_include_list="${build_xm_include_list} $f" | |
12661 | ;; | |
e2500fed | 12662 | auto-build.h | auto-host.h ) |
e22340b0 ZW |
12663 | build_xm_file_list="${build_xm_file_list} $f" |
12664 | build_xm_include_list="${build_xm_include_list} $f" | |
12665 | ;; | |
12666 | * ) | |
12667 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" | |
12668 | build_xm_include_list="${build_xm_include_list} config/$f" | |
12669 | ;; | |
64ccbc99 | 12670 | esac |
ab87f8c8 JL |
12671 | done |
12672 | ||
a078a589 ZW |
12673 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
12674 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
ba479fd2 NN |
12675 | CROSS= |
12676 | ALL=all.internal | |
12677 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
12678 | if test x$host != x$target |
12679 | then | |
a078a589 ZW |
12680 | CROSS="-DCROSS_COMPILE" |
12681 | ALL=all.cross | |
12682 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
343f59d9 | 12683 | case "$host","$target" in |
3a7e8b87 GK |
12684 | # Darwin crosses can use the host system's libraries and headers, |
12685 | # because of the fat library support. Of course, it must be the | |
12686 | # same version of Darwin on both sides. Allow the user to | |
12687 | # just say --target=foo-darwin without a version number to mean | |
12688 | # "the version on this system". | |
12689 | *-*-darwin*,*-*-darwin*) | |
12690 | hostos=`echo $host | sed 's/.*-darwin/darwin/'` | |
12691 | targetos=`echo $target | sed 's/.*-darwin/darwin/'` | |
12692 | if test $hostos = $targetos -o $targetos = darwin ; then | |
12693 | CROSS= | |
12694 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
12695 | with_headers=yes | |
12696 | fi | |
12697 | ;; | |
12698 | ||
343f59d9 AM |
12699 | i?86-*-*,x86_64-*-* \ |
12700 | | powerpc*-*-*,powerpc64*-*-*) | |
12701 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
12702 | esac | |
7a615b25 AO |
12703 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
12704 | # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR) | |
12705 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
12706 | fi |
12707 | ||
b39d221a EC |
12708 | # If this is a cross-compiler that does not |
12709 | # have its own set of headers then define | |
12710 | # inhibit_libc | |
12711 | ||
dc06db20 R |
12712 | # If this is using newlib, without having the headers available now, |
12713 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
12714 | # This prevents libgcc2 from containing any code which requires libc |
12715 | # support. | |
b39d221a | 12716 | inhibit_libc= |
dc06db20 R |
12717 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
12718 | test x$with_newlib = xyes ; } && | |
e50084fa | 12719 | { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then |
b39d221a | 12720 | inhibit_libc=-Dinhibit_libc |
b39d221a EC |
12721 | fi |
12722 | ||
12723 | ||
a078a589 ZW |
12724 | # When building gcc with a cross-compiler, we need to adjust things so |
12725 | # that the generator programs are still built with the native compiler. | |
12726 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
12727 | |
12728 | # These are the normal (build=host) settings: | |
ba479fd2 NN |
12729 | CC_FOR_BUILD='$(CC)' |
12730 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
ba479fd2 | 12731 | STMP_FIXINC=stmp-fixinc |
8ad9fb33 AP |
12732 | |
12733 | # Possibly disable fixproto, on a per-target basis. | |
12734 | case ${use_fixproto} in | |
12735 | no) | |
12736 | STMP_FIXPROTO= | |
12737 | ;; | |
12738 | yes) | |
12739 | STMP_FIXPROTO=stmp-fixproto | |
12740 | ;; | |
12741 | esac | |
12742 | ||
a078a589 | 12743 | |
83599948 NS |
12744 | # And these apply if build != host, or we are generating coverage data |
12745 | if test x$build != x$host || test "x$coverage_flags" != x | |
ab87f8c8 | 12746 | then |
b11e4747 | 12747 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' |
a078a589 | 12748 | |
7a615b25 | 12749 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
d8e5117d | 12750 | if test "x$STMP_FIXPROTO" != x; then |
de253ca4 GK |
12751 | STMP_FIXPROTO=stmp-install-fixproto |
12752 | fi | |
7a615b25 | 12753 | fi |
ab87f8c8 JL |
12754 | fi |
12755 | ||
12756 | # Expand extra_headers to include complete path. | |
12757 | # This substitutes for lots of t-* files. | |
12758 | extra_headers_list= | |
b1ef58c8 NN |
12759 | # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers. |
12760 | for file in ${extra_headers} ; do | |
12761 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" | |
12762 | done | |
ab87f8c8 | 12763 | |
c38f02df ILT |
12764 | # Define collect2 in Makefile. |
12765 | case $host_can_use_collect2 in | |
12766 | no) collect2= ;; | |
12767 | *) collect2='collect2$(exeext)' ;; | |
12768 | esac | |
12769 | ||
12770 | ||
ab87f8c8 | 12771 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
12772 | case $use_collect2 in |
12773 | no) use_collect2= ;; | |
12774 | "") ;; | |
ba479fd2 | 12775 | *) |
34a86c2b NN |
12776 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
12777 | xm_defines="${xm_defines} USE_COLLECT2" | |
c38f02df ILT |
12778 | case $host_can_use_collect2 in |
12779 | no) | |
12780 | { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5 | |
12781 | echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;} | |
12782 | { (exit 1); exit 1; }; } | |
12783 | ;; | |
12784 | esac | |
34a86c2b NN |
12785 | ;; |
12786 | esac | |
ab87f8c8 | 12787 | |
8bb915b6 NN |
12788 | # --------------------------- |
12789 | # Assembler & linker features | |
12790 | # --------------------------- | |
12791 | ||
d869a8c4 NN |
12792 | # Identify the assembler which will work hand-in-glove with the newly |
12793 | # built GCC, so that we can examine its features. This is the assembler | |
12794 | # which will be driven by the driver program. | |
12795 | # | |
12796 | # If build != host, and we aren't building gas in-tree, we identify a | |
12797 | # build->target assembler and hope that it will have the same features | |
12798 | # as the host->target assembler we'll be using. | |
34a86c2b | 12799 | in_tree_gas=no |
ab87f8c8 | 12800 | gcc_cv_as= |
981d4858 JM |
12801 | gcc_cv_gas_major_version= |
12802 | gcc_cv_gas_minor_version= | |
ab87f8c8 JL |
12803 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
12804 | if test -x "$DEFAULT_ASSEMBLER"; then | |
12805 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
34a86c2b | 12806 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
08d105fa AO |
12807 | && test -f ../gas/Makefile \ |
12808 | && test x$build = x$host; then | |
12809 | # Single tree build which includes gas. We want to prefer it | |
12810 | # over whatever linker top-level may have detected, since | |
12811 | # we'll use what we're building after installation anyway. | |
ad9c4d9f NN |
12812 | in_tree_gas=yes |
12813 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
12814 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
12815 | $gcc_cv_as_gas_srcdir/configure \ | |
12816 | $gcc_cv_as_gas_srcdir/configure.in \ | |
12817 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
58ea87a9 | 12818 | gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` |
ad9c4d9f NN |
12819 | if test x$gcc_cv_gas_version != x; then |
12820 | break | |
12821 | fi | |
12822 | done | |
12823 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
12824 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
12825 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
5aaaf0e8 NN |
12826 | case $gcc_cv_gas_patch_version in |
12827 | "") gcc_cv_gas_patch_version="0" ;; | |
12828 | esac | |
8ada417f ZW |
12829 | gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ |
12830 | + $gcc_cv_gas_minor_version \) \* 1000 \ | |
12831 | + $gcc_cv_gas_patch_version` | |
ad9c4d9f | 12832 | |
9f18db39 | 12833 | gcc_cv_as=../gas/as-new$build_exeext |
5408ac6c HPN |
12834 | in_tree_gas_is_elf=no |
12835 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
12836 | || (grep 'obj_format = multi' ../gas/Makefile \ | |
12837 | && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null | |
12838 | then | |
12839 | in_tree_gas_is_elf=yes | |
12840 | fi | |
9f18db39 PB |
12841 | elif test -x as$build_exeext; then |
12842 | # Build using assembler in the current directory. | |
12843 | gcc_cv_as=./as$build_exeext | |
08d105fa AO |
12844 | elif test -x "$AS_FOR_TARGET"; then |
12845 | gcc_cv_as="$AS_FOR_TARGET" | |
12846 | elif test -x "$AS" && test x$host = x$target; then | |
12847 | gcc_cv_as="$AS" | |
981d4858 | 12848 | fi |
9e423e6d | 12849 | |
a1286ef5 | 12850 | |
9f18db39 PB |
12851 | # When searching for the assembler or linker, search the same directories |
12852 | # that the installed compiler will search. Else we may find the wrong | |
12853 | # assembler or linker and lose. If we do not find a suitable binary, | |
12854 | # then try the user's path. | |
12855 | # | |
12856 | # Also note we have to check MD_EXEC_PREFIX before checking the user's path. | |
12857 | if test "x$exec_prefix" = xNONE; then | |
12858 | if test "x$prefix" = xNONE; then | |
12859 | gcc_cv_tool_prefix=/usr/local | |
779243f7 | 12860 | else |
9f18db39 | 12861 | gcc_cv_tool_prefix=$prefix |
779243f7 | 12862 | fi |
9f18db39 PB |
12863 | else |
12864 | gcc_cv_tool_prefix=$exec_prefix | |
12865 | fi | |
12866 | ||
12867 | if test x$host = x$build; then | |
12868 | gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version" | |
12869 | gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical" | |
12870 | gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical/$gcc_version" | |
12871 | gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical" | |
12872 | gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version" | |
12873 | gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin" | |
12874 | else | |
12875 | gcc_cv_tool_dirs= | |
12876 | fi | |
12877 | ||
12878 | if test x$build = x$target; then | |
12879 | # Rummage through tm_files looking for MD_EXEC_PREFIX | |
12880 | md_dirs= | |
12881 | for f in ${tm_file_list}; do | |
12882 | if test -f $f; then | |
12883 | if grep '^#[ ]*undef[ ]*MD_EXEC_PREFIX' $f > /dev/null; then | |
12884 | md_dirs= | |
12885 | fi | |
12886 | md_dirs="$md_dirs "`sed -n -e 's@^#[ ]*define[ ]*MD_EXEC_PREFIX[ ]*"\(.*\)/"@\1@p' < $f` | |
12887 | fi | |
12888 | done | |
12889 | for f in ${md_dirs}; do | |
12890 | gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$f" | |
12891 | done | |
12892 | fi | |
12893 | ||
12894 | ||
12895 | ||
12896 | ||
12897 | exec 6>/dev/null | |
a2eafc76 PB |
12898 | if test "x$gcc_cv_as" = x; then |
12899 | for ac_prog in as | |
9f18db39 PB |
12900 | do |
12901 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
12902 | set dummy $ac_prog; ac_word=$2 | |
12903 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
12904 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
12905 | if test "${ac_cv_path_gcc_cv_as+set}" = set; then | |
12906 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12907 | else | |
12908 | case $gcc_cv_as in | |
12909 | [\\/]* | ?:[\\/]*) | |
12910 | ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. | |
12911 | ;; | |
12912 | *) | |
12913 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12914 | for as_dir in $gcc_cv_tool_dirs | |
12915 | do | |
12916 | IFS=$as_save_IFS | |
12917 | test -z "$as_dir" && as_dir=. | |
12918 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12919 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
12920 | ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" | |
12921 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12922 | break 2 | |
12923 | fi | |
12924 | done | |
12925 | done | |
779243f7 | 12926 | |
9f18db39 PB |
12927 | ;; |
12928 | esac | |
12929 | fi | |
12930 | gcc_cv_as=$ac_cv_path_gcc_cv_as | |
12931 | ||
12932 | if test -n "$gcc_cv_as"; then | |
12933 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 | |
12934 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
12935 | else | |
12936 | echo "$as_me:$LINENO: result: no" >&5 | |
12937 | echo "${ECHO_T}no" >&6 | |
12938 | fi | |
12939 | ||
12940 | test -n "$gcc_cv_as" && break | |
12941 | done | |
12942 | ||
a2eafc76 | 12943 | fi |
9f18db39 PB |
12944 | if test "x$gcc_cv_as" = x; then |
12945 | # If the loop above did not find a tool, then use whatever | |
b095fe2c | 12946 | # one we can find in the users's path. We are looking for a |
9f18db39 | 12947 | # ${build} -> ${target} tool. |
55a2ea2a | 12948 | if test "x$program_prefix" != xNONE; then |
9f18db39 | 12949 | default_tool_name=${program_prefix}as |
b095fe2c | 12950 | elif test x$build != x$host && test x$build != x$target; then |
9f18db39 | 12951 | default_tool_name=${target_noncanonical}-as |
55a2ea2a | 12952 | else |
9f18db39 | 12953 | default_tool_name=`echo as | sed "${program_transform_name}"` |
55a2ea2a | 12954 | fi |
9f18db39 PB |
12955 | for ac_prog in $default_tool_name |
12956 | do | |
12957 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
12958 | set dummy $ac_prog; ac_word=$2 | |
12959 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
12960 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
12961 | if test "${ac_cv_path_gcc_cv_as+set}" = set; then | |
12962 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12963 | else | |
12964 | case $gcc_cv_as in | |
12965 | [\\/]* | ?:[\\/]*) | |
12966 | ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. | |
12967 | ;; | |
12968 | *) | |
12969 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12970 | for as_dir in $PATH | |
12971 | do | |
12972 | IFS=$as_save_IFS | |
12973 | test -z "$as_dir" && as_dir=. | |
12974 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12975 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
12976 | ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" | |
12977 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12978 | break 2 | |
12979 | fi | |
12980 | done | |
12981 | done | |
55a2ea2a | 12982 | |
9f18db39 PB |
12983 | ;; |
12984 | esac | |
12985 | fi | |
12986 | gcc_cv_as=$ac_cv_path_gcc_cv_as | |
55a2ea2a | 12987 | |
9f18db39 PB |
12988 | if test -n "$gcc_cv_as"; then |
12989 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 | |
12990 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
12991 | else | |
12992 | echo "$as_me:$LINENO: result: no" >&5 | |
12993 | echo "${ECHO_T}no" >&6 | |
12994 | fi | |
12995 | ||
12996 | test -n "$gcc_cv_as" && break | |
12997 | done | |
12998 | test -n "$gcc_cv_as" || gcc_cv_as="$gcc_cv_tool_prefix/$default_tool_name$build_exeext" | |
779243f7 | 12999 | |
9e423e6d | 13000 | fi |
9f18db39 PB |
13001 | test "$silent" != yes && exec 6>&1 |
13002 | ||
13003 | ORIGINAL_AS_FOR_TARGET="$gcc_cv_as" | |
13004 | ||
13005 | echo "$as_me:$LINENO: checking what assembler to use" >&5 | |
13006 | echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 | |
34a86c2b NN |
13007 | case $in_tree_gas in |
13008 | yes) | |
ba479fd2 NN |
13009 | echo "$as_me:$LINENO: result: \"newly built gas\"" >&5 |
13010 | echo "${ECHO_T}\"newly built gas\"" >&6 | |
34a86c2b NN |
13011 | ;; |
13012 | no) | |
ba479fd2 NN |
13013 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 |
13014 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
34a86c2b NN |
13015 | ;; |
13016 | esac | |
981d4858 | 13017 | |
d869a8c4 NN |
13018 | # Identify the linker which will work hand-in-glove with the newly |
13019 | # built GCC, so that we can examine its features. This is the linker | |
13020 | # which will be driven by the driver program. | |
13021 | # | |
13022 | # If build != host, and we aren't building gas in-tree, we identify a | |
13023 | # build->target linker and hope that it will have the same features | |
13024 | # as the host->target linker we'll be using. | |
34a86c2b | 13025 | in_tree_ld=no |
275b60d6 JJ |
13026 | gcc_cv_ld= |
13027 | gcc_cv_gld_major_version= | |
13028 | gcc_cv_gld_minor_version= | |
13029 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
13030 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
13031 | if test -x "$DEFAULT_LINKER"; then | |
13032 | gcc_cv_ld="$DEFAULT_LINKER" | |
34a86c2b | 13033 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ |
08d105fa AO |
13034 | && test -f ../ld/Makefile \ |
13035 | && test x$build = x$host; then | |
13036 | # Single tree build which includes ld. We want to prefer it | |
13037 | # over whatever linker top-level may have detected, since | |
13038 | # we'll use what we're building after installation anyway. | |
34a86c2b | 13039 | in_tree_ld=yes |
5408ac6c HPN |
13040 | in_tree_ld_is_elf=no |
13041 | if (grep 'EMUL = .*elf' ../ld/Makefile \ | |
8a45d680 AN |
13042 | || grep 'EMUL = .*linux' ../ld/Makefile \ |
13043 | || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then | |
5408ac6c HPN |
13044 | in_tree_ld_is_elf=yes |
13045 | fi | |
275b60d6 JJ |
13046 | 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 |
13047 | do | |
58ea87a9 | 13048 | gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` |
275b60d6 JJ |
13049 | if test x$gcc_cv_gld_version != x; then |
13050 | break | |
13051 | fi | |
13052 | done | |
13053 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
13054 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
9f18db39 PB |
13055 | gcc_cv_ld=../ld/ld-new$build_exeext |
13056 | elif test -x collect-ld$build_exeext; then | |
13057 | # Build using linker in the current directory. | |
13058 | gcc_cv_ld=./collect-ld$build_exeext | |
08d105fa AO |
13059 | elif test -x "$LD_FOR_TARGET"; then |
13060 | gcc_cv_ld="$LD_FOR_TARGET" | |
13061 | elif test -x "$LD" && test x$host = x$target; then | |
13062 | gcc_cv_ld="$LD" | |
275b60d6 JJ |
13063 | fi |
13064 | ||
275b60d6 | 13065 | |
9f18db39 PB |
13066 | |
13067 | ||
13068 | ||
13069 | exec 6>/dev/null | |
a2eafc76 PB |
13070 | if test "x$gcc_cv_ld" = x; then |
13071 | for ac_prog in ld | |
9f18db39 PB |
13072 | do |
13073 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
13074 | set dummy $ac_prog; ac_word=$2 | |
13075 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13076 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13077 | if test "${ac_cv_path_gcc_cv_ld+set}" = set; then | |
13078 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13079 | else | |
13080 | case $gcc_cv_ld in | |
13081 | [\\/]* | ?:[\\/]*) | |
13082 | ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. | |
13083 | ;; | |
13084 | *) | |
13085 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13086 | for as_dir in $gcc_cv_tool_dirs | |
13087 | do | |
13088 | IFS=$as_save_IFS | |
13089 | test -z "$as_dir" && as_dir=. | |
13090 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13091 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13092 | ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" | |
13093 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13094 | break 2 | |
13095 | fi | |
13096 | done | |
13097 | done | |
13098 | ||
13099 | ;; | |
13100 | esac | |
13101 | fi | |
13102 | gcc_cv_ld=$ac_cv_path_gcc_cv_ld | |
13103 | ||
13104 | if test -n "$gcc_cv_ld"; then | |
13105 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 | |
13106 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
13107 | else | |
13108 | echo "$as_me:$LINENO: result: no" >&5 | |
13109 | echo "${ECHO_T}no" >&6 | |
13110 | fi | |
13111 | ||
13112 | test -n "$gcc_cv_ld" && break | |
13113 | done | |
13114 | ||
a2eafc76 | 13115 | fi |
9f18db39 PB |
13116 | if test "x$gcc_cv_ld" = x; then |
13117 | # If the loop above did not find a tool, then use whatever | |
b095fe2c | 13118 | # one we can find in the users's path. We are looking for a |
9f18db39 | 13119 | # ${build} -> ${target} tool. |
55a2ea2a | 13120 | if test "x$program_prefix" != xNONE; then |
9f18db39 | 13121 | default_tool_name=${program_prefix}ld |
b095fe2c | 13122 | elif test x$build != x$host && test x$build != x$target; then |
9f18db39 | 13123 | default_tool_name=${target_noncanonical}-ld |
55a2ea2a | 13124 | else |
9f18db39 | 13125 | default_tool_name=`echo ld | sed "${program_transform_name}"` |
55a2ea2a | 13126 | fi |
9f18db39 PB |
13127 | for ac_prog in $default_tool_name |
13128 | do | |
13129 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
13130 | set dummy $ac_prog; ac_word=$2 | |
13131 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13132 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13133 | if test "${ac_cv_path_gcc_cv_ld+set}" = set; then | |
13134 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13135 | else | |
13136 | case $gcc_cv_ld in | |
13137 | [\\/]* | ?:[\\/]*) | |
13138 | ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. | |
13139 | ;; | |
13140 | *) | |
13141 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13142 | for as_dir in $PATH | |
13143 | do | |
13144 | IFS=$as_save_IFS | |
13145 | test -z "$as_dir" && as_dir=. | |
13146 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13147 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13148 | ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" | |
13149 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13150 | break 2 | |
13151 | fi | |
13152 | done | |
13153 | done | |
55a2ea2a | 13154 | |
9f18db39 PB |
13155 | ;; |
13156 | esac | |
13157 | fi | |
13158 | gcc_cv_ld=$ac_cv_path_gcc_cv_ld | |
55a2ea2a | 13159 | |
9f18db39 PB |
13160 | if test -n "$gcc_cv_ld"; then |
13161 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 | |
13162 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
13163 | else | |
13164 | echo "$as_me:$LINENO: result: no" >&5 | |
13165 | echo "${ECHO_T}no" >&6 | |
13166 | fi | |
13167 | ||
13168 | test -n "$gcc_cv_ld" && break | |
13169 | done | |
13170 | test -n "$gcc_cv_ld" || gcc_cv_ld="$gcc_cv_tool_prefix/$default_tool_name$build_exeext" | |
275b60d6 | 13171 | |
275b60d6 | 13172 | fi |
9f18db39 PB |
13173 | test "$silent" != yes && exec 6>&1 |
13174 | ||
13175 | ORIGINAL_LD_FOR_TARGET="$gcc_cv_ld" | |
13176 | ||
13177 | echo "$as_me:$LINENO: checking what linker to use" >&5 | |
13178 | echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 | |
34a86c2b NN |
13179 | case $in_tree_ld in |
13180 | yes) | |
ba479fd2 NN |
13181 | echo "$as_me:$LINENO: result: \"newly built ld\"" >&5 |
13182 | echo "${ECHO_T}\"newly built ld\"" >&6 | |
34a86c2b NN |
13183 | ;; |
13184 | no) | |
ba479fd2 NN |
13185 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 |
13186 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
34a86c2b NN |
13187 | ;; |
13188 | esac | |
275b60d6 | 13189 | |
981d4858 | 13190 | # Figure out what nm we will be using. |
f9c1196a | 13191 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils |
f9c1196a | 13192 | in_tree_nm=no |
9f18db39 PB |
13193 | gcc_cv_nm= |
13194 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
f9c1196a ZW |
13195 | && test -f ../binutils/Makefile; then |
13196 | # Single tree build which includes binutils. | |
13197 | in_tree_nm=yes | |
9f18db39 PB |
13198 | gcc_cv_nm=../binutils/nm-new$build_exeext |
13199 | elif test -x nm$build_exeext; then | |
57991eba | 13200 | gcc_cv_nm=./nm$build_exeext |
9f18db39 PB |
13201 | fi |
13202 | ||
13203 | ||
13204 | ||
13205 | ||
13206 | ||
13207 | exec 6>/dev/null | |
a2eafc76 PB |
13208 | if test "x$gcc_cv_nm" = x; then |
13209 | for ac_prog in nm | |
9f18db39 PB |
13210 | do |
13211 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
13212 | set dummy $ac_prog; ac_word=$2 | |
13213 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13214 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13215 | if test "${ac_cv_path_gcc_cv_nm+set}" = set; then | |
13216 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
534d0cc0 | 13217 | else |
9f18db39 PB |
13218 | case $gcc_cv_nm in |
13219 | [\\/]* | ?:[\\/]*) | |
13220 | ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. | |
13221 | ;; | |
13222 | *) | |
13223 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13224 | for as_dir in $gcc_cv_tool_dirs | |
13225 | do | |
13226 | IFS=$as_save_IFS | |
13227 | test -z "$as_dir" && as_dir=. | |
13228 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13229 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13230 | ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" | |
13231 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13232 | break 2 | |
13233 | fi | |
13234 | done | |
13235 | done | |
13236 | ||
13237 | ;; | |
13238 | esac | |
981d4858 | 13239 | fi |
9f18db39 PB |
13240 | gcc_cv_nm=$ac_cv_path_gcc_cv_nm |
13241 | ||
13242 | if test -n "$gcc_cv_nm"; then | |
13243 | echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13244 | echo "${ECHO_T}$gcc_cv_nm" >&6 | |
13245 | else | |
13246 | echo "$as_me:$LINENO: result: no" >&5 | |
13247 | echo "${ECHO_T}no" >&6 | |
13248 | fi | |
13249 | ||
13250 | test -n "$gcc_cv_nm" && break | |
13251 | done | |
13252 | ||
a2eafc76 | 13253 | fi |
9f18db39 PB |
13254 | if test "x$gcc_cv_nm" = x; then |
13255 | # If the loop above did not find a tool, then use whatever | |
13256 | # one we can find in the users's path. We are looking for a | |
13257 | # ${build} -> ${target} tool. | |
13258 | if test "x$program_prefix" != xNONE; then | |
13259 | default_tool_name=${program_prefix}nm | |
13260 | elif test x$build != x$host && test x$build != x$target; then | |
13261 | default_tool_name=${target_noncanonical}-nm | |
13262 | else | |
13263 | default_tool_name=`echo nm | sed "${program_transform_name}"` | |
13264 | fi | |
13265 | for ac_prog in $default_tool_name | |
13266 | do | |
13267 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
13268 | set dummy $ac_prog; ac_word=$2 | |
13269 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13270 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13271 | if test "${ac_cv_path_gcc_cv_nm+set}" = set; then | |
13272 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13273 | else | |
13274 | case $gcc_cv_nm in | |
13275 | [\\/]* | ?:[\\/]*) | |
13276 | ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. | |
13277 | ;; | |
13278 | *) | |
13279 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13280 | for as_dir in $PATH | |
13281 | do | |
13282 | IFS=$as_save_IFS | |
13283 | test -z "$as_dir" && as_dir=. | |
13284 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13285 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13286 | ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" | |
13287 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13288 | break 2 | |
13289 | fi | |
13290 | done | |
13291 | done | |
13292 | ||
13293 | ;; | |
13294 | esac | |
13295 | fi | |
13296 | gcc_cv_nm=$ac_cv_path_gcc_cv_nm | |
13297 | ||
13298 | if test -n "$gcc_cv_nm"; then | |
13299 | echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13300 | echo "${ECHO_T}$gcc_cv_nm" >&6 | |
13301 | else | |
13302 | echo "$as_me:$LINENO: result: no" >&5 | |
13303 | echo "${ECHO_T}no" >&6 | |
13304 | fi | |
13305 | ||
13306 | test -n "$gcc_cv_nm" && break | |
13307 | done | |
13308 | test -n "$gcc_cv_nm" || gcc_cv_nm="$gcc_cv_tool_prefix/$default_tool_name$build_exeext" | |
13309 | ||
13310 | fi | |
13311 | test "$silent" != yes && exec 6>&1 | |
13312 | ||
13313 | ORIGINAL_NM_FOR_TARGET="$gcc_cv_nm" | |
13314 | ||
13315 | echo "$as_me:$LINENO: checking what nm to use" >&5 | |
13316 | echo $ECHO_N "checking what nm to use... $ECHO_C" >&6 | |
f9c1196a | 13317 | case $in_tree_nm in |
ba479fd2 NN |
13318 | yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5 |
13319 | echo "${ECHO_T}\"newly built nm\"" >&6 ;; | |
13320 | no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13321 | echo "${ECHO_T}$gcc_cv_nm" >&6 ;; | |
f9c1196a | 13322 | esac |
981d4858 | 13323 | |
3cae5780 | 13324 | # Figure out what objdump we will be using. |
ba479fd2 NN |
13325 | echo "$as_me:$LINENO: checking what objdump to use" >&5 |
13326 | echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6 | |
f9c1196a | 13327 | in_tree_objdump=no |
57991eba PB |
13328 | if test -x objdump$build_exeext; then |
13329 | gcc_cv_objdump=./objdump$build_exeext | |
f9c1196a ZW |
13330 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
13331 | && test -f ../binutils/Makefile; then | |
13332 | # Single tree build which includes binutils. | |
13333 | in_tree_objdump=yes | |
9f18db39 | 13334 | gcc_cv_objdump=../binutils/objdump$build_exeext |
534d0cc0 | 13335 | elif test "x$program_prefix" != xNONE; then |
57991eba | 13336 | gcc_cv_objdump=${program_prefix}objdump$build_exeext |
b095fe2c DJ |
13337 | elif test x$build != x$host && test x$build != x$target; then |
13338 | gcc_cv_objdump=${target_noncanonical}-objdump$build_exeext | |
534d0cc0 | 13339 | else |
f9c1196a | 13340 | gcc_cv_objdump=`echo objdump | \ |
57991eba | 13341 | sed "${program_transform_name}"`$build_exeext |
3cae5780 | 13342 | fi |
f9c1196a | 13343 | case $in_tree_objdump in |
ba479fd2 NN |
13344 | yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5 |
13345 | echo "${ECHO_T}\"newly built objdump\"" >&6 ;; | |
13346 | no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
13347 | echo "${ECHO_T}$gcc_cv_objdump" >&6 ;; | |
f9c1196a | 13348 | esac |
3cae5780 | 13349 | |
981d4858 | 13350 | # Figure out what assembler alignment features are present. |
ba479fd2 NN |
13351 | echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5 |
13352 | echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6 | |
13353 | if test "${gcc_cv_as_balign_and_p2align+set}" = set; then | |
13354 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13355 | else |
13356 | gcc_cv_as_balign_and_p2align=no | |
13357 | if test $in_tree_gas = yes; then | |
13358 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0` | |
13359 | then gcc_cv_as_balign_and_p2align=yes | |
13360 | fi | |
13361 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13362 | echo '.balign 4 |
8ada417f | 13363 | .p2align 2' > conftest.s |
ba479fd2 NN |
13364 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13365 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13366 | (eval $ac_try) 2>&5 | |
13367 | ac_status=$? | |
13368 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13369 | (exit $ac_status); }; } | |
8ada417f ZW |
13370 | then |
13371 | gcc_cv_as_balign_and_p2align=yes | |
13372 | else | |
13373 | echo "configure: failed program was" >&5 | |
13374 | cat conftest.s >&5 | |
13375 | fi | |
13376 | rm -f conftest.o conftest.s | |
13377 | fi | |
13378 | fi | |
ba479fd2 NN |
13379 | echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5 |
13380 | echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6 | |
63cf211a | 13381 | if test $gcc_cv_as_balign_and_p2align = yes; then |
ba479fd2 NN |
13382 | |
13383 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13384 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
ba479fd2 | 13385 | _ACEOF |
981d4858 | 13386 | |
ad9c4d9f NN |
13387 | fi |
13388 | ||
ba479fd2 NN |
13389 | echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5 |
13390 | echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6 | |
13391 | if test "${gcc_cv_as_max_skip_p2align+set}" = set; then | |
13392 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13393 | else |
13394 | gcc_cv_as_max_skip_p2align=no | |
13395 | if test $in_tree_gas = yes; then | |
13396 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
13397 | then gcc_cv_as_max_skip_p2align=yes | |
13398 | fi | |
13399 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13400 | echo '.p2align 4,,7' > conftest.s |
ba479fd2 NN |
13401 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13402 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13403 | (eval $ac_try) 2>&5 | |
13404 | ac_status=$? | |
13405 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13406 | (exit $ac_status); }; } | |
8ada417f ZW |
13407 | then |
13408 | gcc_cv_as_max_skip_p2align=yes | |
13409 | else | |
13410 | echo "configure: failed program was" >&5 | |
13411 | cat conftest.s >&5 | |
13412 | fi | |
13413 | rm -f conftest.o conftest.s | |
13414 | fi | |
ad9c4d9f | 13415 | fi |
ba479fd2 NN |
13416 | echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5 |
13417 | echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6 | |
63cf211a | 13418 | if test $gcc_cv_as_max_skip_p2align = yes; then |
ba479fd2 NN |
13419 | |
13420 | cat >>confdefs.h <<\_ACEOF | |
9e423e6d | 13421 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
ba479fd2 | 13422 | _ACEOF |
9e423e6d | 13423 | |
9e423e6d | 13424 | fi |
ad9c4d9f | 13425 | |
ba479fd2 NN |
13426 | echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5 |
13427 | echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6 | |
13428 | if test "${gcc_cv_as_subsection_m1+set}" = set; then | |
13429 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13430 | else |
13431 | gcc_cv_as_subsection_m1=no | |
13432 | if test $in_tree_gas = yes; then | |
13433 | if test $in_tree_gas_is_elf = yes \ | |
13434 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
13435 | then gcc_cv_as_subsection_m1=yes | |
ad9c4d9f | 13436 | fi |
8ada417f | 13437 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13438 | echo 'conftest_label1: .word 0 |
d1accaa3 JJ |
13439 | .subsection -1 |
13440 | conftest_label2: .word 0 | |
8ada417f | 13441 | .previous' > conftest.s |
ba479fd2 NN |
13442 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13443 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13444 | (eval $ac_try) 2>&5 | |
13445 | ac_status=$? | |
13446 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13447 | (exit $ac_status); }; } | |
8ada417f ZW |
13448 | then |
13449 | if test x$gcc_cv_nm != x; then | |
13450 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
13451 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
13452 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 | |
13453 | then : | |
13454 | else gcc_cv_as_subsection_m1=yes | |
13455 | fi | |
13456 | rm -f conftest.nm1 conftest.nm2 | |
13457 | fi | |
13458 | else | |
13459 | echo "configure: failed program was" >&5 | |
13460 | cat conftest.s >&5 | |
13461 | fi | |
13462 | rm -f conftest.o conftest.s | |
13463 | fi | |
981d4858 | 13464 | fi |
ba479fd2 NN |
13465 | echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5 |
13466 | echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6 | |
63cf211a | 13467 | if test $gcc_cv_as_subsection_m1 = yes; then |
ba479fd2 NN |
13468 | |
13469 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13470 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
ba479fd2 | 13471 | _ACEOF |
981d4858 | 13472 | |
d1accaa3 | 13473 | fi |
ad9c4d9f | 13474 | |
ba479fd2 NN |
13475 | echo "$as_me:$LINENO: checking assembler for .weak" >&5 |
13476 | echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6 | |
13477 | if test "${gcc_cv_as_weak+set}" = set; then | |
13478 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13479 | else |
13480 | gcc_cv_as_weak=no | |
13481 | if test $in_tree_gas = yes; then | |
13482 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0` | |
13483 | then gcc_cv_as_weak=yes | |
ad9c4d9f | 13484 | fi |
8ada417f | 13485 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13486 | echo ' .weak foobar' > conftest.s |
ba479fd2 NN |
13487 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13488 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13489 | (eval $ac_try) 2>&5 | |
13490 | ac_status=$? | |
13491 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13492 | (exit $ac_status); }; } | |
8ada417f ZW |
13493 | then |
13494 | gcc_cv_as_weak=yes | |
13495 | else | |
13496 | echo "configure: failed program was" >&5 | |
13497 | cat conftest.s >&5 | |
13498 | fi | |
13499 | rm -f conftest.o conftest.s | |
13500 | fi | |
981d4858 | 13501 | fi |
ba479fd2 NN |
13502 | echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5 |
13503 | echo "${ECHO_T}$gcc_cv_as_weak" >&6 | |
63cf211a | 13504 | if test $gcc_cv_as_weak = yes; then |
ba479fd2 NN |
13505 | |
13506 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13507 | #define HAVE_GAS_WEAK 1 |
ba479fd2 | 13508 | _ACEOF |
981d4858 | 13509 | |
12822146 | 13510 | fi |
ad9c4d9f | 13511 | |
e41f3691 JDA |
13512 | echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5 |
13513 | echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6 | |
13514 | if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then | |
13515 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13516 | else | |
13517 | gcc_cv_as_nsubspa_comdat=no | |
13518 | if test $in_tree_gas = yes; then | |
13519 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
13520 | then gcc_cv_as_nsubspa_comdat=yes | |
13521 | fi | |
13522 | elif test x$gcc_cv_as != x; then | |
13523 | echo ' .SPACE $TEXT$ | |
13524 | .NSUBSPA $CODE$,COMDAT' > conftest.s | |
13525 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
13526 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13527 | (eval $ac_try) 2>&5 | |
13528 | ac_status=$? | |
13529 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13530 | (exit $ac_status); }; } | |
13531 | then | |
13532 | gcc_cv_as_nsubspa_comdat=yes | |
13533 | else | |
13534 | echo "configure: failed program was" >&5 | |
13535 | cat conftest.s >&5 | |
13536 | fi | |
13537 | rm -f conftest.o conftest.s | |
13538 | fi | |
13539 | fi | |
13540 | echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5 | |
13541 | echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6 | |
13542 | if test $gcc_cv_as_nsubspa_comdat = yes; then | |
13543 | ||
13544 | cat >>confdefs.h <<\_ACEOF | |
13545 | #define HAVE_GAS_NSUBSPA_COMDAT 1 | |
13546 | _ACEOF | |
13547 | ||
13548 | fi | |
13549 | ||
8ada417f ZW |
13550 | # .hidden needs to be supported in both the assembler and the linker, |
13551 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
13552 | # This is irritatingly difficult to feature test for; we have to check the | |
13553 | # date string after the version number. If we've got an in-tree | |
13554 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
13555 | # to be safe. | |
13556 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
ba479fd2 NN |
13557 | echo "$as_me:$LINENO: checking assembler for .hidden" >&5 |
13558 | echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6 | |
13559 | if test "${gcc_cv_as_hidden+set}" = set; then | |
13560 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13561 | else |
13562 | gcc_cv_as_hidden=no | |
13563 | if test $in_tree_gas = yes; then | |
13564 | if test $in_tree_gas_is_elf = yes \ | |
13565 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0` | |
13566 | then gcc_cv_as_hidden=yes | |
13567 | fi | |
13568 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13569 | echo ' .hidden foobar |
8ada417f | 13570 | foobar:' > conftest.s |
ba479fd2 NN |
13571 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13572 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13573 | (eval $ac_try) 2>&5 | |
13574 | ac_status=$? | |
13575 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13576 | (exit $ac_status); }; } | |
8ada417f ZW |
13577 | then |
13578 | gcc_cv_as_hidden=yes | |
13579 | else | |
13580 | echo "configure: failed program was" >&5 | |
13581 | cat conftest.s >&5 | |
13582 | fi | |
13583 | rm -f conftest.o conftest.s | |
13584 | fi | |
13585 | fi | |
ba479fd2 NN |
13586 | echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5 |
13587 | echo "${ECHO_T}$gcc_cv_as_hidden" >&6 | |
63cf211a | 13588 | |
ad9c4d9f | 13589 | |
ba479fd2 NN |
13590 | echo "$as_me:$LINENO: checking linker for .hidden support" >&5 |
13591 | echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6 | |
13592 | if test "${gcc_cv_ld_hidden+set}" = set; then | |
13593 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13594 | else |
13595 | if test $in_tree_ld = yes ; then | |
13596 | gcc_cv_ld_hidden=no | |
13597 | 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 \ | |
13598 | && test $in_tree_ld_is_elf = yes; then | |
13599 | gcc_cv_ld_hidden=yes | |
13600 | fi | |
13601 | else | |
13602 | gcc_cv_ld_hidden=yes | |
bace148a | 13603 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` |
8ada417f ZW |
13604 | if echo "$ld_ver" | grep GNU > /dev/null; then |
13605 | ld_vers=`echo $ld_ver | sed -n \ | |
13606 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13607 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13608 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13609 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
13610 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
11176d2a JB |
13611 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ |
13612 | -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 | 13613 | 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 |
13614 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` |
13615 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
13616 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
8ada417f ZW |
13617 | if test 0"$ld_date" -lt 20020404; then |
13618 | if test -n "$ld_date"; then | |
13619 | # If there was date string, but was earlier than 2002-04-04, fail | |
13620 | gcc_cv_ld_hidden=no | |
13621 | elif test -z "$ld_vers"; then | |
13622 | # If there was no date string nor ld version number, something is wrong | |
13623 | gcc_cv_ld_hidden=no | |
13624 | else | |
8ada417f ZW |
13625 | test -z "$ld_vers_patch" && ld_vers_patch=0 |
13626 | if test "$ld_vers_major" -lt 2; then | |
13627 | gcc_cv_ld_hidden=no | |
13628 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
13629 | gcc_cv_ld_hidden="no" | |
13630 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then | |
13631 | gcc_cv_ld_hidden=no | |
c72931a6 | 13632 | fi |
8ada417f | 13633 | fi |
789b7de5 | 13634 | fi |
8ada417f | 13635 | else |
28690784 | 13636 | case "${target}" in |
b0fd7d27 | 13637 | hppa64*-*-hpux* | ia64*-*-hpux*) |
28690784 JDA |
13638 | gcc_cv_ld_hidden=yes |
13639 | ;; | |
13640 | *) | |
13641 | gcc_cv_ld_hidden=no | |
13642 | ;; | |
13643 | esac | |
8ada417f ZW |
13644 | fi |
13645 | fi | |
6d07784a | 13646 | fi |
ba479fd2 NN |
13647 | echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5 |
13648 | echo "${ECHO_T}$gcc_cv_ld_hidden" >&6 | |
8ada417f | 13649 | libgcc_visibility=no |
ad9c4d9f | 13650 | |
232b67d9 | 13651 | |
8e3940b2 | 13652 | if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then |
8ada417f | 13653 | libgcc_visibility=yes |
ba479fd2 NN |
13654 | |
13655 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 13656 | #define HAVE_GAS_HIDDEN 1 |
ba479fd2 | 13657 | _ACEOF |
ad9c4d9f NN |
13658 | |
13659 | fi | |
13660 | ||
8ada417f | 13661 | # Check if we have .[us]leb128, and support symbol arithmetic with it. |
ba479fd2 NN |
13662 | echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5 |
13663 | echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6 | |
13664 | if test "${gcc_cv_as_leb128+set}" = set; then | |
13665 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13666 | else |
13667 | gcc_cv_as_leb128=no | |
13668 | if test $in_tree_gas = yes; then | |
13669 | if test $in_tree_gas_is_elf = yes \ | |
13670 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
13671 | then gcc_cv_as_leb128=yes | |
13672 | fi | |
13673 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13674 | echo ' .data |
b7460f24 RH |
13675 | .uleb128 L2 - L1 |
13676 | L1: | |
13677 | .uleb128 1280 | |
13678 | .sleb128 -1010 | |
8ada417f | 13679 | L2:' > conftest.s |
ba479fd2 NN |
13680 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13681 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13682 | (eval $ac_try) 2>&5 | |
13683 | ac_status=$? | |
13684 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13685 | (exit $ac_status); }; } | |
8ada417f ZW |
13686 | then |
13687 | # GAS versions before 2.11 do not support uleb128, | |
13688 | # despite appearing to. | |
13689 | # ??? There exists an elf-specific test that will crash | |
13690 | # the assembler. Perhaps it's better to figure out whether | |
13691 | # arbitrary sections are supported and try the test. | |
bace148a | 13692 | as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` |
8ada417f ZW |
13693 | if echo "$as_ver" | grep GNU > /dev/null; then |
13694 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` | |
13695 | as_major=`echo $as_ver | sed 's/\..*//'` | |
13696 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` | |
13697 | if test $as_major -eq 2 && test $as_minor -lt 11 | |
13698 | then : | |
13699 | else gcc_cv_as_leb128=yes | |
13700 | fi | |
13701 | fi | |
13702 | else | |
13703 | echo "configure: failed program was" >&5 | |
13704 | cat conftest.s >&5 | |
13705 | fi | |
13706 | rm -f conftest.o conftest.s | |
13707 | fi | |
b7460f24 | 13708 | fi |
ba479fd2 NN |
13709 | echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5 |
13710 | echo "${ECHO_T}$gcc_cv_as_leb128" >&6 | |
63cf211a | 13711 | if test $gcc_cv_as_leb128 = yes; then |
ba479fd2 NN |
13712 | |
13713 | cat >>confdefs.h <<\_ACEOF | |
b7460f24 | 13714 | #define HAVE_AS_LEB128 1 |
ba479fd2 | 13715 | _ACEOF |
b7460f24 RH |
13716 | |
13717 | fi | |
ad9c4d9f | 13718 | |
8ada417f ZW |
13719 | # GAS versions up to and including 2.11.0 may mis-optimize |
13720 | # .eh_frame data. | |
ba479fd2 NN |
13721 | echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5 |
13722 | echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6 | |
13723 | if test "${gcc_cv_as_eh_frame+set}" = set; then | |
13724 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13725 | else |
13726 | gcc_cv_as_eh_frame=no | |
13727 | if test $in_tree_gas = yes; then | |
13728 | if test $in_tree_gas_is_elf = yes \ | |
13729 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
13730 | then gcc_cv_as_eh_frame=yes | |
ad9c4d9f | 13731 | fi |
8ada417f | 13732 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13733 | echo ' .text |
c64688ae RH |
13734 | .LFB1: |
13735 | .4byte 0 | |
13736 | .L1: | |
13737 | .4byte 0 | |
13738 | .LFE1: | |
13739 | .section .eh_frame,"aw",@progbits | |
13740 | __FRAME_BEGIN__: | |
13741 | .4byte .LECIE1-.LSCIE1 | |
13742 | .LSCIE1: | |
13743 | .4byte 0x0 | |
13744 | .byte 0x1 | |
13745 | .ascii "z\0" | |
13746 | .byte 0x1 | |
13747 | .byte 0x78 | |
13748 | .byte 0x1a | |
13749 | .byte 0x0 | |
13750 | .byte 0x4 | |
13751 | .4byte 1 | |
13752 | .p2align 1 | |
13753 | .LECIE1: | |
13754 | .LSFDE1: | |
13755 | .4byte .LEFDE1-.LASFDE1 | |
13756 | .LASFDE1: | |
13757 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
13758 | .4byte .LFB1 | |
13759 | .4byte .LFE1-.LFB1 | |
13760 | .byte 0x4 | |
13761 | .4byte .LFE1-.LFB1 | |
13762 | .byte 0x4 | |
13763 | .4byte .L1-.LFB1 | |
8ada417f | 13764 | .LEFDE1:' > conftest.s |
ba479fd2 NN |
13765 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13766 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13767 | (eval $ac_try) 2>&5 | |
13768 | ac_status=$? | |
13769 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13770 | (exit $ac_status); }; } | |
8ada417f ZW |
13771 | then |
13772 | cat > conftest.lit <<EOF | |
c64688ae RH |
13773 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
13774 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 13775 | 0020 08000000 04080000 0044 .........D |
01efb963 | 13776 | EOF |
ba479fd2 | 13777 | cat > conftest.big <<EOF |
01efb963 AS |
13778 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... |
13779 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 13780 | 0020 00000008 04000000 0844 .........D |
c64688ae | 13781 | EOF |
8ada417f ZW |
13782 | # If the assembler didn't choke, and we can objdump, |
13783 | # and we got the correct data, then succeed. | |
13784 | if test x$gcc_cv_objdump != x \ | |
13785 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
13786 | | tail -3 > conftest.got \ | |
13787 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ | |
13788 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
13789 | then | |
13790 | gcc_cv_as_eh_frame=yes | |
ba479fd2 NN |
13791 | elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null' |
13792 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13793 | (eval $ac_try) 2>&5 | |
13794 | ac_status=$? | |
13795 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13796 | (exit $ac_status); }; }; then | |
8ada417f ZW |
13797 | gcc_cv_as_eh_frame=buggy |
13798 | else | |
13799 | # Uh oh, what do we do now? | |
13800 | gcc_cv_as_eh_frame=no | |
13801 | fi | |
13802 | else | |
13803 | echo "configure: failed program was" >&5 | |
13804 | cat conftest.s >&5 | |
13805 | fi | |
13806 | rm -f conftest.o conftest.s | |
13807 | fi | |
c64688ae | 13808 | fi |
ba479fd2 NN |
13809 | echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5 |
13810 | echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6 | |
ad9c4d9f | 13811 | |
6e3f3080 | 13812 | |
63cf211a | 13813 | if test $gcc_cv_as_eh_frame = buggy; then |
ba479fd2 NN |
13814 | |
13815 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 13816 | #define USE_AS_TRADITIONAL_FORMAT 1 |
ba479fd2 | 13817 | _ACEOF |
ad9c4d9f NN |
13818 | |
13819 | fi | |
13820 | ||
ba479fd2 NN |
13821 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 |
13822 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
13823 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
13824 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13825 | else |
13826 | gcc_cv_as_shf_merge=no | |
13827 | if test $in_tree_gas = yes; then | |
13828 | if test $in_tree_gas_is_elf = yes \ | |
13829 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
13830 | then gcc_cv_as_shf_merge=yes | |
13831 | fi | |
13832 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13833 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s |
ba479fd2 NN |
13834 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' |
13835 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13836 | (eval $ac_try) 2>&5 | |
13837 | ac_status=$? | |
13838 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13839 | (exit $ac_status); }; } | |
8ada417f ZW |
13840 | then |
13841 | gcc_cv_as_shf_merge=yes | |
13842 | else | |
13843 | echo "configure: failed program was" >&5 | |
13844 | cat conftest.s >&5 | |
13845 | fi | |
13846 | rm -f conftest.o conftest.s | |
13847 | fi | |
201556f0 | 13848 | fi |
ba479fd2 NN |
13849 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 |
13850 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
8ada417f | 13851 | |
c18a5b6c MM |
13852 | if test $gcc_cv_as_shf_merge = no; then |
13853 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 | |
13854 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
13855 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
13856 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13857 | else | |
13858 | gcc_cv_as_shf_merge=no | |
13859 | if test $in_tree_gas = yes; then | |
13860 | if test $in_tree_gas_is_elf = yes \ | |
13861 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
13862 | then gcc_cv_as_shf_merge=yes | |
13863 | fi | |
13864 | elif test x$gcc_cv_as != x; then | |
13865 | echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s | |
13866 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
13867 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13868 | (eval $ac_try) 2>&5 | |
13869 | ac_status=$? | |
13870 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13871 | (exit $ac_status); }; } | |
13872 | then | |
13873 | gcc_cv_as_shf_merge=yes | |
13874 | else | |
13875 | echo "configure: failed program was" >&5 | |
13876 | cat conftest.s >&5 | |
13877 | fi | |
13878 | rm -f conftest.o conftest.s | |
13879 | fi | |
13880 | fi | |
13881 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 | |
13882 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
13883 | ||
13884 | fi | |
8ad9fb33 | 13885 | |
ba479fd2 | 13886 | cat >>confdefs.h <<_ACEOF |
8ad9fb33 | 13887 | #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 13888 | _ACEOF |
201556f0 | 13889 | |
201556f0 | 13890 | |
c18a5b6c MM |
13891 | echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 |
13892 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 | |
13893 | if test "${gcc_cv_as_comdat_group+set}" = set; then | |
13894 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13895 | else | |
13896 | gcc_cv_as_comdat_group=no | |
13897 | if test $in_tree_gas = yes; then | |
13898 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 13899 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
13900 | then gcc_cv_as_comdat_group=yes |
13901 | fi | |
13902 | elif test x$gcc_cv_as != x; then | |
13903 | echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s | |
13904 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
13905 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13906 | (eval $ac_try) 2>&5 | |
13907 | ac_status=$? | |
13908 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13909 | (exit $ac_status); }; } | |
13910 | then | |
13911 | gcc_cv_as_comdat_group=yes | |
13912 | else | |
13913 | echo "configure: failed program was" >&5 | |
13914 | cat conftest.s >&5 | |
13915 | fi | |
13916 | rm -f conftest.o conftest.s | |
13917 | fi | |
13918 | fi | |
13919 | echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5 | |
13920 | echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6 | |
13921 | ||
13922 | if test $gcc_cv_as_comdat_group = yes; then | |
13923 | gcc_cv_as_comdat_group_percent=no | |
13924 | else | |
13925 | echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 | |
13926 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 | |
13927 | if test "${gcc_cv_as_comdat_group_percent+set}" = set; then | |
13928 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13929 | else | |
13930 | gcc_cv_as_comdat_group_percent=no | |
13931 | if test $in_tree_gas = yes; then | |
13932 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 13933 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
13934 | then gcc_cv_as_comdat_group_percent=yes |
13935 | fi | |
13936 | elif test x$gcc_cv_as != x; then | |
13937 | echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s | |
13938 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
13939 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13940 | (eval $ac_try) 2>&5 | |
13941 | ac_status=$? | |
13942 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13943 | (exit $ac_status); }; } | |
13944 | then | |
13945 | gcc_cv_as_comdat_group_percent=yes | |
13946 | else | |
13947 | echo "configure: failed program was" >&5 | |
13948 | cat conftest.s >&5 | |
13949 | fi | |
13950 | rm -f conftest.o conftest.s | |
13951 | fi | |
13952 | fi | |
13953 | echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5 | |
13954 | echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6 | |
13955 | ||
13956 | fi | |
11176d2a JB |
13957 | if test $in_tree_ld != yes && test x"$ld_vers" != x; then |
13958 | comdat_group=yes | |
13959 | if test 0"$ld_date" -lt 20050308; then | |
13960 | if test -n "$ld_date"; then | |
13961 | # If there was date string, but was earlier than 2005-03-08, fail | |
13962 | comdat_group=no | |
13963 | elif test "$ld_vers_major" -lt 2; then | |
13964 | comdat_group=no | |
13965 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then | |
13966 | comdat_group=no | |
13967 | fi | |
13968 | fi | |
13969 | if test $comdat_group = no; then | |
13970 | gcc_cv_as_comdat_group=no | |
13971 | gcc_cv_as_comdat_group_percent=no | |
13972 | fi | |
13973 | fi | |
c18a5b6c MM |
13974 | |
13975 | cat >>confdefs.h <<_ACEOF | |
11176d2a | 13976 | #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 |
13977 | _ACEOF |
13978 | ||
13979 | ||
8ada417f | 13980 | # Thread-local storage - the check is heavily parametrized. |
f996902d RH |
13981 | conftest_s= |
13982 | tls_first_major= | |
13983 | tls_first_minor= | |
9739c90c | 13984 | tls_as_opt= |
f996902d | 13985 | case "$target" in |
6f9b006d RH |
13986 | alpha*-*-*) |
13987 | conftest_s=' | |
13988 | .section ".tdata","awT",@progbits | |
13989 | foo: .long 25 | |
13990 | .text | |
13991 | ldq $27,__tls_get_addr($29) !literal!1 | |
13992 | lda $16,foo($29) !tlsgd!1 | |
13993 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
13994 | ldq $27,__tls_get_addr($29) !literal!2 | |
13995 | lda $16,foo($29) !tlsldm!2 | |
13996 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
13997 | ldq $1,foo($29) !gotdtprel | |
13998 | ldah $2,foo($29) !dtprelhi | |
13999 | lda $3,foo($2) !dtprello | |
14000 | lda $4,foo($29) !dtprel | |
14001 | ldq $1,foo($29) !gottprel | |
14002 | ldah $2,foo($29) !tprelhi | |
14003 | lda $3,foo($2) !tprello | |
14004 | lda $4,foo($29) !tprel' | |
14005 | tls_first_major=2 | |
14006 | tls_first_minor=13 | |
2f3321ca | 14007 | tls_as_opt=--fatal-warnings |
6f9b006d | 14008 | ;; |
e4dd71de AH |
14009 | frv*-*-*) |
14010 | conftest_s=' | |
14011 | .section ".tdata","awT",@progbits | |
14012 | x: .long 25 | |
14013 | .text | |
14014 | call #gettlsoff(x)' | |
14015 | tls_first_major=2 | |
14016 | tls_first_minor=14 | |
14017 | ;; | |
f996902d RH |
14018 | i[34567]86-*-*) |
14019 | conftest_s=' | |
14020 | .section ".tdata","awT",@progbits | |
14021 | foo: .long 25 | |
14022 | .text | |
14023 | movl %gs:0, %eax | |
14024 | leal foo@TLSGD(,%ebx,1), %eax | |
14025 | leal foo@TLSLDM(%ebx), %eax | |
14026 | leal foo@DTPOFF(%eax), %edx | |
14027 | movl foo@GOTTPOFF(%ebx), %eax | |
14028 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
14029 | addl foo@GOTNTPOFF(%ebx), %eax |
14030 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
14031 | movl $foo@TPOFF, %eax |
14032 | subl $foo@TPOFF, %eax | |
14033 | leal foo@NTPOFF(%ecx), %eax' | |
14034 | tls_first_major=2 | |
75d38379 | 14035 | tls_first_minor=14 |
2f3321ca | 14036 | tls_as_opt=--fatal-warnings |
75d38379 JJ |
14037 | ;; |
14038 | x86_64-*-*) | |
14039 | conftest_s=' | |
14040 | .section ".tdata","awT",@progbits | |
14041 | foo: .long 25 | |
14042 | .text | |
14043 | movq %fs:0, %rax | |
14044 | leaq foo@TLSGD(%rip), %rdi | |
14045 | leaq foo@TLSLD(%rip), %rdi | |
14046 | leaq foo@DTPOFF(%rax), %rdx | |
14047 | movq foo@GOTTPOFF(%rip), %rax | |
14048 | movq $foo@TPOFF, %rax' | |
14049 | tls_first_major=2 | |
14050 | tls_first_minor=14 | |
2f3321ca | 14051 | tls_as_opt=--fatal-warnings |
f996902d | 14052 | ;; |
7b6e506e RH |
14053 | ia64-*-*) |
14054 | conftest_s=' | |
14055 | .section ".tdata","awT",@progbits | |
14056 | foo: data8 25 | |
14057 | .text | |
14058 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
14059 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
14060 | addl r18 = @ltoff(@tprel(foo#)), gp | |
14061 | addl r19 = @dtprel(foo#), gp | |
14062 | adds r21 = @dtprel(foo#), r13 | |
14063 | movl r23 = @dtprel(foo#) | |
14064 | addl r20 = @tprel(foo#), gp | |
14065 | adds r22 = @tprel(foo#), r13 | |
14066 | movl r24 = @tprel(foo#)' | |
14067 | tls_first_major=2 | |
14068 | tls_first_minor=13 | |
2f3321ca | 14069 | tls_as_opt=--fatal-warnings |
7b6e506e | 14070 | ;; |
69229b81 DJ |
14071 | mips*-*-*) |
14072 | conftest_s=' | |
14073 | .section .tdata,"awT",@progbits | |
14074 | x: | |
14075 | .word 2 | |
14076 | .text | |
14077 | addiu $4, $28, %tlsgd(x) | |
14078 | addiu $4, $28, %tlsldm(x) | |
14079 | lui $4, %dtprel_hi(x) | |
14080 | addiu $4, $4, %dtprel_lo(x) | |
14081 | lw $4, %gottprel(x)($28) | |
14082 | lui $4, %tprel_hi(x) | |
14083 | addiu $4, $4, %tprel_lo(x)' | |
14084 | tls_first_major=2 | |
14085 | tls_first_minor=16 | |
14086 | tls_as_opt='-32 --fatal-warnings' | |
14087 | ;; | |
c4501e62 JJ |
14088 | powerpc-*-*) |
14089 | conftest_s=' | |
14090 | .section ".tdata","awT",@progbits | |
14091 | .align 2 | |
14092 | ld0: .space 4 | |
14093 | ld1: .space 4 | |
14094 | x1: .space 4 | |
14095 | x2: .space 4 | |
14096 | x3: .space 4 | |
14097 | .text | |
14098 | addi 3,31,ld0@got@tlsgd | |
14099 | bl __tls_get_addr | |
14100 | addi 3,31,x1@got@tlsld | |
14101 | bl __tls_get_addr | |
14102 | addi 9,3,x1@dtprel | |
14103 | addis 9,3,x2@dtprel@ha | |
14104 | addi 9,9,x2@dtprel@l | |
14105 | lwz 9,x3@got@tprel(31) | |
14106 | add 9,9,x@tls | |
14107 | addi 9,2,x1@tprel | |
14108 | addis 9,2,x2@tprel@ha | |
14109 | addi 9,9,x2@tprel@l' | |
14110 | tls_first_major=2 | |
14111 | tls_first_minor=14 | |
2f3321ca | 14112 | tls_as_opt="-a32 --fatal-warnings" |
c4501e62 JJ |
14113 | ;; |
14114 | powerpc64-*-*) | |
14115 | conftest_s=' | |
14116 | .section ".tdata","awT",@progbits | |
14117 | .align 3 | |
14118 | ld0: .space 8 | |
14119 | ld1: .space 8 | |
14120 | x1: .space 8 | |
14121 | x2: .space 8 | |
14122 | x3: .space 8 | |
14123 | .text | |
14124 | addi 3,2,ld0@got@tlsgd | |
14125 | bl .__tls_get_addr | |
14126 | nop | |
14127 | addi 3,2,ld1@toc | |
14128 | bl .__tls_get_addr | |
14129 | nop | |
14130 | addi 3,2,x1@got@tlsld | |
14131 | bl .__tls_get_addr | |
14132 | nop | |
14133 | addi 9,3,x1@dtprel | |
14134 | bl .__tls_get_addr | |
14135 | nop | |
14136 | addis 9,3,x2@dtprel@ha | |
14137 | addi 9,9,x2@dtprel@l | |
14138 | bl .__tls_get_addr | |
14139 | nop | |
14140 | ld 9,x3@got@dtprel(2) | |
14141 | add 9,9,3 | |
14142 | bl .__tls_get_addr | |
14143 | nop' | |
14144 | tls_first_major=2 | |
14145 | tls_first_minor=14 | |
2f3321ca | 14146 | tls_as_opt="-a64 --fatal-warnings" |
c4501e62 | 14147 | ;; |
fd3cd001 UW |
14148 | s390-*-*) |
14149 | conftest_s=' | |
14150 | .section ".tdata","awT",@progbits | |
14151 | foo: .long 25 | |
14152 | .text | |
14153 | .long foo@TLSGD | |
14154 | .long foo@TLSLDM | |
14155 | .long foo@DTPOFF | |
14156 | .long foo@NTPOFF | |
14157 | .long foo@GOTNTPOFF | |
14158 | .long foo@INDNTPOFF | |
14159 | l %r1,foo@GOTNTPOFF(%r12) | |
14160 | l %r1,0(%r1):tls_load:foo | |
14161 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
14162 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
14163 | tls_first_major=2 | |
14164 | tls_first_minor=14 | |
2f3321ca | 14165 | tls_as_opt="-m31 --fatal-warnings" |
fd3cd001 UW |
14166 | ;; |
14167 | s390x-*-*) | |
14168 | conftest_s=' | |
14169 | .section ".tdata","awT",@progbits | |
14170 | foo: .long 25 | |
14171 | .text | |
14172 | .quad foo@TLSGD | |
14173 | .quad foo@TLSLDM | |
14174 | .quad foo@DTPOFF | |
14175 | .quad foo@NTPOFF | |
14176 | .quad foo@GOTNTPOFF | |
14177 | lg %r1,foo@GOTNTPOFF(%r12) | |
14178 | larl %r1,foo@INDNTPOFF | |
14179 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
14180 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
14181 | tls_first_major=2 | |
14182 | tls_first_minor=14 | |
2f3321ca | 14183 | tls_as_opt="-m64 -Aesame --fatal-warnings" |
fd3cd001 | 14184 | ;; |
9ff13962 KK |
14185 | sh-*-* | sh[34]-*-*) |
14186 | conftest_s=' | |
14187 | .section ".tdata","awT",@progbits | |
14188 | foo: .long 25 | |
14189 | .text | |
14190 | .long foo@TLSGD | |
14191 | .long foo@TLSLDM | |
14192 | .long foo@DTPOFF | |
14193 | .long foo@GOTTPOFF | |
14194 | .long foo@TPOFF' | |
14195 | tls_first_major=2 | |
14196 | tls_first_minor=13 | |
2f3321ca | 14197 | tls_as_opt=--fatal-warnings |
9ff13962 | 14198 | ;; |
5751a10b | 14199 | sparc*-*-*) |
2f3321ca EB |
14200 | case "$target" in |
14201 | sparc*-sun-solaris2.*) | |
14202 | on_solaris=yes | |
14203 | ;; | |
14204 | *) | |
14205 | on_solaris=no | |
14206 | ;; | |
14207 | esac | |
14208 | if test x$on_solaris = xyes && test x$gas_flag = xno; then | |
14209 | conftest_s=' | |
14210 | .section ".tdata",#alloc,#write,#tls | |
14211 | foo: .long 25 | |
14212 | .text | |
14213 | sethi %tgd_hi22(foo), %o0 | |
14214 | add %o0, %tgd_lo10(foo), %o1 | |
14215 | add %l7, %o1, %o0, %tgd_add(foo) | |
14216 | call __tls_get_addr, %tgd_call(foo) | |
14217 | sethi %tldm_hi22(foo), %l1 | |
14218 | add %l1, %tldm_lo10(foo), %l2 | |
14219 | add %l7, %l2, %o0, %tldm_add(foo) | |
14220 | call __tls_get_addr, %tldm_call(foo) | |
14221 | sethi %tldo_hix22(foo), %l3 | |
14222 | xor %l3, %tldo_lox10(foo), %l4 | |
14223 | add %o0, %l4, %l5, %tldo_add(foo) | |
14224 | sethi %tie_hi22(foo), %o3 | |
14225 | add %o3, %tie_lo10(foo), %o3 | |
14226 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
14227 | add %g7, %o2, %o4, %tie_add(foo) | |
14228 | sethi %tle_hix22(foo), %l1 | |
14229 | xor %l1, %tle_lox10(foo), %o5 | |
14230 | ld [%g7 + %o5], %o1' | |
14231 | tls_first_major=0 | |
14232 | tls_first_minor=0 | |
14233 | else | |
14234 | conftest_s=' | |
5751a10b JJ |
14235 | .section ".tdata","awT",@progbits |
14236 | foo: .long 25 | |
14237 | .text | |
14238 | sethi %tgd_hi22(foo), %o0 | |
14239 | add %o0, %tgd_lo10(foo), %o1 | |
14240 | add %l7, %o1, %o0, %tgd_add(foo) | |
14241 | call __tls_get_addr, %tgd_call(foo) | |
14242 | sethi %tldm_hi22(foo), %l1 | |
14243 | add %l1, %tldm_lo10(foo), %l2 | |
14244 | add %l7, %l2, %o0, %tldm_add(foo) | |
14245 | call __tls_get_addr, %tldm_call(foo) | |
14246 | sethi %tldo_hix22(foo), %l3 | |
14247 | xor %l3, %tldo_lox10(foo), %l4 | |
14248 | add %o0, %l4, %l5, %tldo_add(foo) | |
14249 | sethi %tie_hi22(foo), %o3 | |
14250 | add %o3, %tie_lo10(foo), %o3 | |
14251 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
14252 | add %g7, %o2, %o4, %tie_add(foo) | |
14253 | sethi %tle_hix22(foo), %l1 | |
14254 | xor %l1, %tle_lox10(foo), %o5 | |
14255 | ld [%g7 + %o5], %o1' | |
14256 | tls_first_major=2 | |
14257 | tls_first_minor=14 | |
2f3321ca EB |
14258 | tls_as_opt="-32 --fatal-warnings" |
14259 | fi | |
5751a10b | 14260 | ;; |
f996902d RH |
14261 | esac |
14262 | if test -z "$tls_first_major"; then | |
8ada417f ZW |
14263 | : # If we don't have a check, assume no support. |
14264 | else | |
ba479fd2 NN |
14265 | echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5 |
14266 | echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6 | |
14267 | if test "${gcc_cv_as_tls+set}" = set; then | |
14268 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14269 | else |
14270 | gcc_cv_as_tls=no | |
14271 | if test $in_tree_gas = yes; then | |
14272 | if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0` | |
14273 | then gcc_cv_as_tls=yes | |
ad9c4d9f | 14274 | fi |
8ada417f | 14275 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14276 | echo "$conftest_s" > conftest.s |
2f3321ca | 14277 | if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5' |
ba479fd2 NN |
14278 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
14279 | (eval $ac_try) 2>&5 | |
14280 | ac_status=$? | |
14281 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14282 | (exit $ac_status); }; } | |
8ada417f ZW |
14283 | then |
14284 | gcc_cv_as_tls=yes | |
14285 | else | |
14286 | echo "configure: failed program was" >&5 | |
14287 | cat conftest.s >&5 | |
14288 | fi | |
14289 | rm -f conftest.o conftest.s | |
f996902d | 14290 | fi |
f996902d | 14291 | fi |
ba479fd2 NN |
14292 | echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5 |
14293 | echo "${ECHO_T}$gcc_cv_as_tls" >&6 | |
63cf211a | 14294 | if test $gcc_cv_as_tls = yes; then |
ba479fd2 NN |
14295 | |
14296 | cat >>confdefs.h <<\_ACEOF | |
f996902d | 14297 | #define HAVE_AS_TLS 1 |
ba479fd2 | 14298 | _ACEOF |
f996902d RH |
14299 | |
14300 | fi | |
8ada417f ZW |
14301 | fi |
14302 | ||
14303 | # Target-specific assembler checks. | |
f996902d | 14304 | |
7e9d8517 L |
14305 | echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5 |
14306 | echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6 | |
14307 | gcc_cv_ld_static_dynamic=no | |
14308 | if test $in_tree_ld = yes ; then | |
14309 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then | |
14310 | gcc_cv_ld_static_dynamic=yes | |
14311 | fi | |
14312 | elif test x$gcc_cv_ld != x; then | |
14313 | # Check if linker supports -Bstatic/-Bdynamic option | |
14314 | if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ | |
14315 | && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then | |
14316 | gcc_cv_ld_static_dynamic=yes | |
14317 | fi | |
14318 | fi | |
14319 | if test x"$gcc_cv_ld_static_dynamic" = xyes; then | |
14320 | ||
14321 | cat >>confdefs.h <<\_ACEOF | |
14322 | #define HAVE_LD_STATIC_DYNAMIC 1 | |
14323 | _ACEOF | |
14324 | ||
14325 | fi | |
14326 | echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5 | |
14327 | echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6 | |
14328 | ||
d594623a L |
14329 | if test x"$demangler_in_ld" = xyes; then |
14330 | echo "$as_me:$LINENO: checking linker --demangle support" >&5 | |
14331 | echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6 | |
14332 | gcc_cv_ld_demangle=no | |
14333 | if test $in_tree_ld = yes; then | |
14334 | 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 \ | |
14335 | gcc_cv_ld_demangle=yes | |
14336 | fi | |
14337 | elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then | |
14338 | # Check if the GNU linker supports --demangle option | |
14339 | if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then | |
14340 | gcc_cv_ld_demangle=yes | |
14341 | fi | |
14342 | fi | |
14343 | if test x"$gcc_cv_ld_demangle" = xyes; then | |
14344 | ||
14345 | cat >>confdefs.h <<\_ACEOF | |
14346 | #define HAVE_LD_DEMANGLE 1 | |
14347 | _ACEOF | |
14348 | ||
14349 | fi | |
14350 | echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5 | |
14351 | echo "${ECHO_T}$gcc_cv_ld_demangle" >&6 | |
14352 | fi | |
14353 | ||
3a37b08e RH |
14354 | case "$target" in |
14355 | # All TARGET_ABI_OSF targets. | |
14356 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
ba479fd2 NN |
14357 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
14358 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
14359 | if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then | |
14360 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a37b08e | 14361 | else |
8ada417f ZW |
14362 | gcc_cv_as_alpha_explicit_relocs=no |
14363 | if test $in_tree_gas = yes; then | |
14364 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14365 | then gcc_cv_as_alpha_explicit_relocs=yes | |
ad9c4d9f | 14366 | fi |
8ada417f | 14367 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14368 | echo ' .set nomacro |
3a37b08e RH |
14369 | .text |
14370 | extbl $3, $2, $3 !lituse_bytoff!1 | |
14371 | ldq $2, a($29) !literal!1 | |
14372 | ldq $4, b($29) !literal!2 | |
14373 | ldq_u $3, 0($2) !lituse_base!1 | |
14374 | ldq $27, f($29) !literal!5 | |
14375 | jsr $26, ($27), f !lituse_jsr!5 | |
14376 | ldah $29, 0($26) !gpdisp!3 | |
14377 | lda $0, c($29) !gprel | |
14378 | ldah $1, d($29) !gprelhigh | |
14379 | lda $1, d($1) !gprellow | |
8ada417f | 14380 | lda $29, 0($29) !gpdisp!3' > conftest.s |
ba479fd2 NN |
14381 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14382 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14383 | (eval $ac_try) 2>&5 | |
14384 | ac_status=$? | |
14385 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14386 | (exit $ac_status); }; } | |
8ada417f ZW |
14387 | then |
14388 | gcc_cv_as_alpha_explicit_relocs=yes | |
14389 | else | |
14390 | echo "configure: failed program was" >&5 | |
14391 | cat conftest.s >&5 | |
14392 | fi | |
14393 | rm -f conftest.o conftest.s | |
14394 | fi | |
cafe096b | 14395 | fi |
ba479fd2 NN |
14396 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5 |
14397 | echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6 | |
63cf211a | 14398 | if test $gcc_cv_as_alpha_explicit_relocs = yes; then |
ba479fd2 NN |
14399 | |
14400 | cat >>confdefs.h <<\_ACEOF | |
3a37b08e | 14401 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
ba479fd2 | 14402 | _ACEOF |
3a37b08e | 14403 | |
d006f5eb RH |
14404 | fi |
14405 | echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5 | |
14406 | echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6 | |
14407 | if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then | |
14408 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14409 | else | |
14410 | gcc_cv_as_alpha_jsrdirect_relocs=no | |
14411 | if test $in_tree_gas = yes; then | |
14412 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90` | |
14413 | then gcc_cv_as_alpha_jsrdirect_relocs=yes | |
14414 | fi | |
14415 | elif test x$gcc_cv_as != x; then | |
14416 | echo ' .set nomacro | |
14417 | .text | |
14418 | ldq $27, a($29) !literal!1 | |
14419 | jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s | |
14420 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14421 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14422 | (eval $ac_try) 2>&5 | |
14423 | ac_status=$? | |
14424 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14425 | (exit $ac_status); }; } | |
14426 | then | |
14427 | gcc_cv_as_alpha_jsrdirect_relocs=yes | |
14428 | else | |
14429 | echo "configure: failed program was" >&5 | |
14430 | cat conftest.s >&5 | |
14431 | fi | |
14432 | rm -f conftest.o conftest.s | |
14433 | fi | |
14434 | fi | |
14435 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5 | |
14436 | echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6 | |
14437 | if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then | |
14438 | ||
14439 | cat >>confdefs.h <<\_ACEOF | |
14440 | #define HAVE_AS_JSRDIRECT_RELOCS 1 | |
14441 | _ACEOF | |
14442 | ||
86da66b5 HPN |
14443 | fi |
14444 | ;; | |
14445 | ||
14446 | cris-*-*) | |
14447 | echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5 | |
14448 | echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6 | |
14449 | if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then | |
14450 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14451 | else | |
14452 | gcc_cv_as_cris_no_mul_bug=no | |
14453 | if test $in_tree_gas = yes; then | |
14454 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
14455 | then gcc_cv_as_cris_no_mul_bug=yes | |
14456 | fi | |
14457 | elif test x$gcc_cv_as != x; then | |
14458 | echo '.text' > conftest.s | |
14459 | if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5' | |
14460 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14461 | (eval $ac_try) 2>&5 | |
14462 | ac_status=$? | |
14463 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14464 | (exit $ac_status); }; } | |
14465 | then | |
14466 | gcc_cv_as_cris_no_mul_bug=yes | |
14467 | else | |
14468 | echo "configure: failed program was" >&5 | |
14469 | cat conftest.s >&5 | |
14470 | fi | |
14471 | rm -f conftest.o conftest.s | |
14472 | fi | |
14473 | fi | |
14474 | echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5 | |
14475 | echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6 | |
14476 | if test $gcc_cv_as_cris_no_mul_bug = yes; then | |
14477 | ||
14478 | cat >>confdefs.h <<\_ACEOF | |
14479 | #define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1 | |
14480 | _ACEOF | |
14481 | ||
8ada417f | 14482 | fi |
3a37b08e | 14483 | ;; |
8ada417f | 14484 | |
1cb36a98 | 14485 | sparc*-*-*) |
ba479fd2 NN |
14486 | echo "$as_me:$LINENO: checking assembler for .register" >&5 |
14487 | echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6 | |
14488 | if test "${gcc_cv_as_sparc_register_op+set}" = set; then | |
14489 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 14490 | else |
8ada417f ZW |
14491 | gcc_cv_as_sparc_register_op=no |
14492 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14493 | echo '.register %g2, #scratch' > conftest.s |
ba479fd2 NN |
14494 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14495 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14496 | (eval $ac_try) 2>&5 | |
14497 | ac_status=$? | |
14498 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14499 | (exit $ac_status); }; } | |
8ada417f ZW |
14500 | then |
14501 | gcc_cv_as_sparc_register_op=yes | |
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_register_op" >&5 |
14510 | echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6 | |
63cf211a | 14511 | if test $gcc_cv_as_sparc_register_op = yes; then |
ba479fd2 NN |
14512 | |
14513 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 14514 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
ba479fd2 | 14515 | _ACEOF |
1cb36a98 | 14516 | |
8ada417f | 14517 | fi |
1cb36a98 | 14518 | |
ba479fd2 NN |
14519 | echo "$as_me:$LINENO: checking assembler for -relax option" >&5 |
14520 | echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6 | |
14521 | if test "${gcc_cv_as_sparc_relax+set}" = set; then | |
14522 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e95b1e6a | 14523 | else |
8ada417f ZW |
14524 | gcc_cv_as_sparc_relax=no |
14525 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14526 | echo '.text' > conftest.s |
ba479fd2 NN |
14527 | if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5' |
14528 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14529 | (eval $ac_try) 2>&5 | |
14530 | ac_status=$? | |
14531 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14532 | (exit $ac_status); }; } | |
8ada417f ZW |
14533 | then |
14534 | gcc_cv_as_sparc_relax=yes | |
14535 | else | |
14536 | echo "configure: failed program was" >&5 | |
14537 | cat conftest.s >&5 | |
14538 | fi | |
14539 | rm -f conftest.o conftest.s | |
14540 | fi | |
cafe096b | 14541 | fi |
ba479fd2 NN |
14542 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5 |
14543 | echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6 | |
63cf211a | 14544 | if test $gcc_cv_as_sparc_relax = yes; then |
ba479fd2 NN |
14545 | |
14546 | cat >>confdefs.h <<\_ACEOF | |
e95b1e6a | 14547 | #define HAVE_AS_RELAX_OPTION 1 |
ba479fd2 | 14548 | _ACEOF |
e95b1e6a | 14549 | |
8ada417f | 14550 | fi |
e95b1e6a | 14551 | |
ba479fd2 NN |
14552 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5 |
14553 | echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6 | |
14554 | if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then | |
14555 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
17e9e88c | 14556 | else |
8ada417f ZW |
14557 | gcc_cv_as_sparc_ua_pcrel=no |
14558 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14559 | echo '.text |
8ada417f ZW |
14560 | foo: |
14561 | nop | |
14562 | .data | |
14563 | .align 4 | |
14564 | .byte 0 | |
14565 | .uaword %r_disp32(foo)' > conftest.s | |
ba479fd2 NN |
14566 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
14567 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14568 | (eval $ac_try) 2>&5 | |
14569 | ac_status=$? | |
14570 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14571 | (exit $ac_status); }; } | |
8ada417f ZW |
14572 | then |
14573 | if test x$gcc_cv_ld != x \ | |
14574 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
14575 | gcc_cv_as_sparc_ua_pcrel=yes | |
14576 | fi | |
14577 | rm -f conftest | |
14578 | else | |
14579 | echo "configure: failed program was" >&5 | |
14580 | cat conftest.s >&5 | |
14581 | fi | |
14582 | rm -f conftest.o conftest.s | |
14583 | fi | |
cafe096b | 14584 | fi |
ba479fd2 NN |
14585 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5 |
14586 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6 | |
63cf211a | 14587 | if test $gcc_cv_as_sparc_ua_pcrel = yes; then |
ba479fd2 NN |
14588 | |
14589 | cat >>confdefs.h <<\_ACEOF | |
17e9e88c | 14590 | #define HAVE_AS_SPARC_UA_PCREL 1 |
ba479fd2 | 14591 | _ACEOF |
17e9e88c | 14592 | |
17e9e88c | 14593 | |
ba479fd2 NN |
14594 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 |
14595 | echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6 | |
14596 | if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then | |
14597 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cf7b8b0d | 14598 | else |
8ada417f ZW |
14599 | gcc_cv_as_sparc_ua_pcrel_hidden=no |
14600 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14601 | echo '.data |
8ada417f ZW |
14602 | .align 4 |
14603 | .byte 0x31 | |
14604 | .uaword %r_disp32(foo) | |
14605 | .byte 0x32, 0x33, 0x34 | |
14606 | .global foo | |
14607 | .hidden foo | |
14608 | foo: | |
14609 | .skip 4' > conftest.s | |
ba479fd2 NN |
14610 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
14611 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14612 | (eval $ac_try) 2>&5 | |
14613 | ac_status=$? | |
14614 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14615 | (exit $ac_status); }; } | |
8ada417f ZW |
14616 | then |
14617 | if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \ | |
14618 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
14619 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
14620 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
14621 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
14622 | | grep 'DISP32' > /dev/null 2>&1; then | |
14623 | : | |
14624 | else | |
14625 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
cf7b8b0d | 14626 | fi |
8ada417f ZW |
14627 | fi |
14628 | rm -f conftest | |
14629 | else | |
14630 | echo "configure: failed program was" >&5 | |
14631 | cat conftest.s >&5 | |
14632 | fi | |
14633 | rm -f conftest.o conftest.s | |
14634 | fi | |
cafe096b | 14635 | fi |
ba479fd2 NN |
14636 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5 |
14637 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6 | |
63cf211a | 14638 | if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then |
ba479fd2 NN |
14639 | |
14640 | cat >>confdefs.h <<\_ACEOF | |
cf7b8b0d | 14641 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
ba479fd2 | 14642 | _ACEOF |
cf7b8b0d | 14643 | |
8ada417f | 14644 | fi |
ba479fd2 | 14645 | |
8ada417f | 14646 | fi # unaligned pcrel relocs |
cf7b8b0d | 14647 | |
ba479fd2 NN |
14648 | echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5 |
14649 | echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6 | |
14650 | if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then | |
14651 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 14652 | else |
8ada417f ZW |
14653 | gcc_cv_as_sparc_offsetable_lo10=no |
14654 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14655 | echo '.text |
8ada417f ZW |
14656 | or %g1, %lo(ab) + 12, %g1 |
14657 | or %g1, %lo(ab + 12), %g1' > conftest.s | |
ba479fd2 NN |
14658 | if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5' |
14659 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14660 | (eval $ac_try) 2>&5 | |
14661 | ac_status=$? | |
14662 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14663 | (exit $ac_status); }; } | |
8ada417f ZW |
14664 | then |
14665 | if test x$gcc_cv_objdump != x \ | |
ecb0ccbc | 14666 | && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ |
8ada417f | 14667 | | grep ' 82106000 82106000' > /dev/null 2>&1; then |
1b5c0152 | 14668 | gcc_cv_as_sparc_offsetable_lo10=yes |
8ada417f ZW |
14669 | fi |
14670 | else | |
14671 | echo "configure: failed program was" >&5 | |
14672 | cat conftest.s >&5 | |
14673 | fi | |
14674 | rm -f conftest.o conftest.s | |
14675 | fi | |
cafe096b | 14676 | fi |
ba479fd2 NN |
14677 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5 |
14678 | echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6 | |
63cf211a | 14679 | if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then |
ba479fd2 NN |
14680 | |
14681 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 14682 | #define HAVE_AS_OFFSETABLE_LO10 1 |
ba479fd2 | 14683 | _ACEOF |
1cb36a98 | 14684 | |
8ada417f | 14685 | fi |
1cb36a98 RH |
14686 | ;; |
14687 | ||
c307e6dd | 14688 | i[34567]86-*-* | x86_64-*-*) |
d38bc601 BF |
14689 | case $target_os in |
14690 | cygwin* | pe | mingw32*) | |
14691 | # Used for DWARF 2 in PE | |
14692 | echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5 | |
14693 | echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6 | |
14694 | if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then | |
14695 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14696 | else | |
14697 | gcc_cv_as_ix86_pe_secrel32=no | |
14698 | if test $in_tree_gas = yes; then | |
14699 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
14700 | then gcc_cv_as_ix86_pe_secrel32=yes | |
14701 | fi | |
14702 | elif test x$gcc_cv_as != x; then | |
14703 | echo '.text | |
14704 | foo: nop | |
14705 | .data | |
14706 | .secrel32 foo' > conftest.s | |
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); }; } | |
14713 | then | |
14714 | if test x$gcc_cv_ld != x \ | |
14715 | && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then | |
14716 | gcc_cv_as_ix86_pe_secrel32=yes | |
14717 | fi | |
14718 | rm -f conftest | |
14719 | else | |
14720 | echo "configure: failed program was" >&5 | |
14721 | cat conftest.s >&5 | |
14722 | fi | |
14723 | rm -f conftest.o conftest.s | |
14724 | fi | |
14725 | fi | |
14726 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5 | |
14727 | echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6 | |
14728 | if test $gcc_cv_as_ix86_pe_secrel32 = yes; then | |
14729 | ||
14730 | cat >>confdefs.h <<\_ACEOF | |
14731 | #define HAVE_GAS_PE_SECREL32_RELOC 1 | |
14732 | _ACEOF | |
14733 | ||
14734 | fi | |
14735 | ;; | |
14736 | esac | |
14737 | ||
ba479fd2 NN |
14738 | echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5 |
14739 | echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6 | |
14740 | if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then | |
14741 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14742 | else |
14743 | gcc_cv_as_ix86_filds_fists=no | |
14744 | if test $in_tree_gas = yes; then | |
14745 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
14746 | then gcc_cv_as_ix86_filds_fists=yes | |
ad9c4d9f | 14747 | fi |
8ada417f | 14748 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14749 | echo 'filds mem; fists mem' > 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_filds_fists=yes | |
14758 | else | |
14759 | echo "configure: failed program was" >&5 | |
14760 | cat conftest.s >&5 | |
981d4858 | 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_filds_fists" >&5 |
14766 | echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6 | |
63cf211a | 14767 | if test $gcc_cv_as_ix86_filds_fists = yes; then |
ba479fd2 NN |
14768 | |
14769 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 14770 | #define HAVE_GAS_FILDS_FISTS 1 |
ba479fd2 | 14771 | _ACEOF |
ad9c4d9f | 14772 | |
f6f5dff2 RO |
14773 | fi |
14774 | ||
ba479fd2 NN |
14775 | echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5 |
14776 | echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6 | |
14777 | if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then | |
14778 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f6f5dff2 RO |
14779 | else |
14780 | gcc_cv_as_ix86_cmov_sun_syntax=no | |
14781 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14782 | echo 'cmovl.l %edx, %eax' > conftest.s |
ba479fd2 NN |
14783 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14784 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14785 | (eval $ac_try) 2>&5 | |
14786 | ac_status=$? | |
14787 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14788 | (exit $ac_status); }; } | |
f6f5dff2 RO |
14789 | then |
14790 | gcc_cv_as_ix86_cmov_sun_syntax=yes | |
14791 | else | |
14792 | echo "configure: failed program was" >&5 | |
14793 | cat conftest.s >&5 | |
14794 | fi | |
14795 | rm -f conftest.o conftest.s | |
14796 | fi | |
14797 | fi | |
ba479fd2 NN |
14798 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5 |
14799 | echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6 | |
63cf211a | 14800 | if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then |
ba479fd2 NN |
14801 | |
14802 | cat >>confdefs.h <<\_ACEOF | |
f6f5dff2 | 14803 | #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1 |
ba479fd2 | 14804 | _ACEOF |
f6f5dff2 | 14805 | |
ad9c4d9f NN |
14806 | fi |
14807 | ||
6f3ca281 ZW |
14808 | # This one is used unconditionally by i386.[ch]; it is to be defined |
14809 | # to 1 if the feature is present, 0 otherwise. | |
ba479fd2 NN |
14810 | echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5 |
14811 | echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6 | |
14812 | if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then | |
14813 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14814 | else |
14815 | gcc_cv_as_ix86_gotoff_in_data=no | |
14816 | if test $in_tree_gas = yes; then | |
14817 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
14818 | then gcc_cv_as_ix86_gotoff_in_data=yes | |
14819 | fi | |
14820 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14821 | echo ' .text |
f88c65f7 RH |
14822 | .L0: |
14823 | nop | |
14824 | .data | |
8ada417f | 14825 | .long .L0@GOTOFF' > conftest.s |
ba479fd2 NN |
14826 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14827 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14828 | (eval $ac_try) 2>&5 | |
14829 | ac_status=$? | |
14830 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14831 | (exit $ac_status); }; } | |
8ada417f ZW |
14832 | then |
14833 | gcc_cv_as_ix86_gotoff_in_data=yes | |
14834 | else | |
14835 | echo "configure: failed program was" >&5 | |
14836 | cat conftest.s >&5 | |
f88c65f7 | 14837 | fi |
8ada417f ZW |
14838 | rm -f conftest.o conftest.s |
14839 | fi | |
14840 | fi | |
ba479fd2 NN |
14841 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5 |
14842 | echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6 | |
8ada417f | 14843 | |
6f3ca281 | 14844 | |
ba479fd2 | 14845 | cat >>confdefs.h <<_ACEOF |
6f3ca281 | 14846 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 14847 | _ACEOF |
f88c65f7 | 14848 | |
1cb36a98 | 14849 | ;; |
ef1ecf87 RH |
14850 | |
14851 | ia64*-*-*) | |
ba479fd2 NN |
14852 | echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5 |
14853 | echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6 | |
14854 | if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then | |
14855 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ef1ecf87 | 14856 | else |
8ada417f ZW |
14857 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no |
14858 | if test $in_tree_gas = yes; then | |
14859 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
14860 | then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes | |
ad9c4d9f | 14861 | fi |
8ada417f | 14862 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14863 | echo ' .text |
ef1ecf87 RH |
14864 | addl r15 = @ltoffx(x#), gp |
14865 | ;; | |
cfa9ee99 | 14866 | ld8.mov r16 = [r15], x#' > conftest.s |
ba479fd2 NN |
14867 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14868 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14869 | (eval $ac_try) 2>&5 | |
14870 | ac_status=$? | |
14871 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14872 | (exit $ac_status); }; } | |
8ada417f | 14873 | then |
cfa9ee99 | 14874 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes |
8ada417f ZW |
14875 | else |
14876 | echo "configure: failed program was" >&5 | |
14877 | cat conftest.s >&5 | |
2c4a9cff | 14878 | fi |
8ada417f ZW |
14879 | rm -f conftest.o conftest.s |
14880 | fi | |
14881 | fi | |
ba479fd2 NN |
14882 | echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5 |
14883 | echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6 | |
63cf211a | 14884 | if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then |
ba479fd2 NN |
14885 | |
14886 | cat >>confdefs.h <<\_ACEOF | |
cfa9ee99 | 14887 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
ba479fd2 | 14888 | _ACEOF |
8ada417f | 14889 | |
cfa9ee99 | 14890 | fi |
8ada417f | 14891 | |
2c4a9cff | 14892 | ;; |
8ada417f | 14893 | |
2c4a9cff | 14894 | powerpc*-*-*) |
8ada417f | 14895 | case $target in |
432218ba DE |
14896 | *-*-aix*) conftest_s=' .machine "pwr5" |
14897 | .csect .text[PR] | |
6b37db3c | 14898 | mfcr 3,128';; |
8af4d362 PB |
14899 | *-*-darwin*) |
14900 | echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5 | |
14901 | echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6 | |
14902 | if test "${gcc_cv_as_machine_directive+set}" = set; then | |
14903 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14904 | else | |
14905 | gcc_cv_as_machine_directive=no | |
14906 | if test x$gcc_cv_as != x; then | |
14907 | echo ' .machine ppc7400' > conftest.s | |
14908 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14909 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14910 | (eval $ac_try) 2>&5 | |
14911 | ac_status=$? | |
14912 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14913 | (exit $ac_status); }; } | |
14914 | then | |
14915 | gcc_cv_as_machine_directive=yes | |
14916 | else | |
14917 | echo "configure: failed program was" >&5 | |
14918 | cat conftest.s >&5 | |
14919 | fi | |
14920 | rm -f conftest.o conftest.s | |
14921 | fi | |
14922 | fi | |
14923 | echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5 | |
14924 | echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6 | |
14925 | ||
14926 | if test x$gcc_cv_as_machine_directive != xyes; then | |
14927 | echo "*** This target requires an assembler supporting \".machine\"" >&2 | |
14928 | echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2 | |
14929 | test x$build = x$target && exit 1 | |
14930 | fi | |
14931 | conftest_s=' .text | |
6b37db3c | 14932 | mfcr r3,128';; |
4c67db14 | 14933 | *) conftest_s=' .machine power4 |
d2ab3e37 | 14934 | .text |
6b37db3c | 14935 | mfcr 3,128';; |
8ada417f | 14936 | esac |
8ada417f | 14937 | |
ba479fd2 NN |
14938 | echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5 |
14939 | echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6 | |
14940 | if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then | |
14941 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2c4a9cff | 14942 | else |
8ada417f ZW |
14943 | gcc_cv_as_powerpc_mfcrf=no |
14944 | if test $in_tree_gas = yes; then | |
14945 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
14946 | then gcc_cv_as_powerpc_mfcrf=yes | |
2c4a9cff | 14947 | fi |
8ada417f | 14948 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14949 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
14950 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14951 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14952 | (eval $ac_try) 2>&5 | |
14953 | ac_status=$? | |
14954 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14955 | (exit $ac_status); }; } | |
8ada417f ZW |
14956 | then |
14957 | gcc_cv_as_powerpc_mfcrf=yes | |
14958 | else | |
14959 | echo "configure: failed program was" >&5 | |
14960 | cat conftest.s >&5 | |
14961 | fi | |
14962 | rm -f conftest.o conftest.s | |
14963 | fi | |
2c4a9cff | 14964 | fi |
ba479fd2 NN |
14965 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5 |
14966 | echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6 | |
63cf211a | 14967 | if test $gcc_cv_as_powerpc_mfcrf = yes; then |
ba479fd2 NN |
14968 | |
14969 | cat >>confdefs.h <<\_ACEOF | |
2c4a9cff | 14970 | #define HAVE_AS_MFCRF 1 |
ba479fd2 | 14971 | _ACEOF |
ef1ecf87 | 14972 | |
8ada417f | 14973 | fi |
432218ba DE |
14974 | |
14975 | case $target in | |
14976 | *-*-aix*) conftest_s=' .machine "pwr5" | |
14977 | .csect .text[PR] | |
14978 | popcntb 3,3';; | |
14979 | *) conftest_s=' .machine power5 | |
14980 | .text | |
14981 | popcntb 3,3';; | |
14982 | esac | |
14983 | ||
14984 | echo "$as_me:$LINENO: checking assembler for popcntb support" >&5 | |
14985 | echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6 | |
14986 | if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then | |
14987 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14988 | else | |
14989 | gcc_cv_as_powerpc_popcntb=no | |
14990 | if test $in_tree_gas = yes; then | |
14991 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
14992 | then gcc_cv_as_powerpc_popcntb=yes | |
14993 | fi | |
14994 | elif test x$gcc_cv_as != x; then | |
14995 | echo "$conftest_s" > conftest.s | |
14996 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14997 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14998 | (eval $ac_try) 2>&5 | |
14999 | ac_status=$? | |
15000 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15001 | (exit $ac_status); }; } | |
15002 | then | |
15003 | gcc_cv_as_powerpc_popcntb=yes | |
15004 | else | |
15005 | echo "configure: failed program was" >&5 | |
15006 | cat conftest.s >&5 | |
15007 | fi | |
15008 | rm -f conftest.o conftest.s | |
15009 | fi | |
15010 | fi | |
15011 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5 | |
15012 | echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6 | |
15013 | if test $gcc_cv_as_powerpc_popcntb = yes; then | |
15014 | ||
15015 | cat >>confdefs.h <<\_ACEOF | |
15016 | #define HAVE_AS_POPCNTB 1 | |
15017 | _ACEOF | |
15018 | ||
15019 | fi | |
15020 | ||
7f970b70 AM |
15021 | case $target in |
15022 | *-*-aix*) conftest_s=' .csect .text[PR] | |
15023 | LCF..0: | |
15024 | addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';; | |
15025 | *-*-darwin*) | |
15026 | conftest_s=' .text | |
15027 | LCF0: | |
15028 | addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';; | |
15029 | *) conftest_s=' .text | |
15030 | .LCF0: | |
15031 | addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';; | |
15032 | esac | |
15033 | ||
15034 | echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5 | |
15035 | echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6 | |
15036 | if test "${gcc_cv_as_powerpc_rel16+set}" = set; then | |
15037 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15038 | else | |
15039 | gcc_cv_as_powerpc_rel16=no | |
15040 | if test $in_tree_gas = yes; then | |
15041 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15042 | then gcc_cv_as_powerpc_rel16=yes | |
15043 | fi | |
15044 | elif test x$gcc_cv_as != x; then | |
15045 | echo "$conftest_s" > conftest.s | |
15046 | if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5' | |
15047 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15048 | (eval $ac_try) 2>&5 | |
15049 | ac_status=$? | |
15050 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15051 | (exit $ac_status); }; } | |
15052 | then | |
15053 | gcc_cv_as_powerpc_rel16=yes | |
15054 | else | |
15055 | echo "configure: failed program was" >&5 | |
15056 | cat conftest.s >&5 | |
15057 | fi | |
15058 | rm -f conftest.o conftest.s | |
15059 | fi | |
15060 | fi | |
15061 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5 | |
15062 | echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6 | |
15063 | if test $gcc_cv_as_powerpc_rel16 = yes; then | |
15064 | ||
15065 | cat >>confdefs.h <<\_ACEOF | |
15066 | #define HAVE_AS_REL16 1 | |
15067 | _ACEOF | |
15068 | ||
15069 | fi | |
8ada417f ZW |
15070 | ;; |
15071 | ||
15072 | mips*-*-*) | |
ba479fd2 NN |
15073 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
15074 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
15075 | if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then | |
15076 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15077 | else |
15078 | gcc_cv_as_mips_explicit_relocs=no | |
15079 | if test $in_tree_gas = yes; then | |
15080 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15081 | then gcc_cv_as_mips_explicit_relocs=yes | |
15082 | fi | |
15083 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15084 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
ba479fd2 NN |
15085 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15086 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15087 | (eval $ac_try) 2>&5 | |
15088 | ac_status=$? | |
15089 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15090 | (exit $ac_status); }; } | |
8ada417f ZW |
15091 | then |
15092 | gcc_cv_as_mips_explicit_relocs=yes | |
15093 | else | |
15094 | echo "configure: failed program was" >&5 | |
15095 | cat conftest.s >&5 | |
ef1ecf87 | 15096 | fi |
8ada417f ZW |
15097 | rm -f conftest.o conftest.s |
15098 | fi | |
15099 | fi | |
ba479fd2 NN |
15100 | echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5 |
15101 | echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6 | |
8ada417f ZW |
15102 | if test $gcc_cv_as_mips_explicit_relocs = yes; then |
15103 | if test x$target_cpu_default = x | |
15104 | then target_cpu_default=MASK_EXPLICIT_RELOCS | |
15105 | else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" | |
15106 | fi | |
15107 | fi | |
15108 | ||
82563d35 RS |
15109 | if test x$gas_flag = xyes \ |
15110 | || test x"$host" != x"$build" \ | |
15111 | || test ! -x "$gcc_cv_as" \ | |
15112 | || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then | |
15113 | : | |
15114 | else | |
15115 | echo "*** This configuration requires the GNU assembler" >&2 | |
15116 | exit 1 | |
15117 | fi | |
ef1ecf87 | 15118 | ;; |
1cb36a98 | 15119 | esac |
9d147085 RH |
15120 | # ??? Not all targets support dwarf2 debug_line, even within a version |
15121 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
15122 | # info to the output file. So, as supported targets are added to gas 2.11, | |
15123 | # add some instruction here to (also) show we expect this might work. | |
15124 | # ??? Once 2.11 is released, probably need to add first known working | |
15125 | # version to the per-target configury. | |
15126 | case "$target" in | |
80486e06 | 15127 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
2853bc5a | 15128 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ |
d116bdf8 | 15129 | | xstormy16*-*-* | cris-*-* | xtensa-*-*) |
9d147085 RH |
15130 | insn="nop" |
15131 | ;; | |
57116d8d | 15132 | ia64*-*-* | s390*-*-*) |
9d147085 RH |
15133 | insn="nop 0" |
15134 | ;; | |
2853bc5a HPN |
15135 | mmix-*-*) |
15136 | insn="swym 0" | |
15137 | ;; | |
8ada417f ZW |
15138 | esac |
15139 | if test x"$insn" != x; then | |
15140 | conftest_s="\ | |
15141 | .file 1 \"conftest.s\" | |
15142 | .loc 1 3 0 | |
15143 | $insn" | |
ba479fd2 NN |
15144 | echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5 |
15145 | echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6 | |
15146 | if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then | |
15147 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15148 | else |
15149 | gcc_cv_as_dwarf2_debug_line=no | |
15150 | if test $in_tree_gas = yes; then | |
15151 | if test $in_tree_gas_is_elf = yes \ | |
15152 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15153 | then gcc_cv_as_dwarf2_debug_line=yes | |
15154 | fi | |
15155 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15156 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
15157 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15158 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15159 | (eval $ac_try) 2>&5 | |
15160 | ac_status=$? | |
15161 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15162 | (exit $ac_status); }; } | |
8ada417f | 15163 | then |
080a5bb0 EB |
15164 | if test x$gcc_cv_objdump != x \ |
15165 | && $gcc_cv_objdump -h conftest.o 2> /dev/null \ | |
15166 | | grep debug_line > /dev/null 2>&1; then | |
8ada417f ZW |
15167 | gcc_cv_as_dwarf2_debug_line=yes |
15168 | fi | |
15169 | else | |
15170 | echo "configure: failed program was" >&5 | |
15171 | cat conftest.s >&5 | |
15172 | fi | |
15173 | rm -f conftest.o conftest.s | |
15174 | fi | |
15175 | fi | |
ba479fd2 NN |
15176 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5 |
15177 | echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6 | |
ad9c4d9f | 15178 | |
ad9c4d9f | 15179 | |
8ada417f ZW |
15180 | # The .debug_line file table must be in the exact order that |
15181 | # we specified the files, since these indices are also used | |
15182 | # by DW_AT_decl_file. Approximate this test by testing if | |
15183 | # the assembler bitches if the same index is assigned twice. | |
ba479fd2 NN |
15184 | echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5 |
15185 | echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6 | |
15186 | if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then | |
15187 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15188 | else |
15189 | gcc_cv_as_dwarf2_file_buggy=no | |
15190 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15191 | echo ' .file 1 "foo.s" |
8ada417f | 15192 | .file 1 "bar.s"' > conftest.s |
ba479fd2 NN |
15193 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15194 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15195 | (eval $ac_try) 2>&5 | |
15196 | ac_status=$? | |
15197 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15198 | (exit $ac_status); }; } | |
8ada417f ZW |
15199 | then |
15200 | gcc_cv_as_dwarf2_file_buggy=yes | |
15201 | else | |
15202 | echo "configure: failed program was" >&5 | |
15203 | cat conftest.s >&5 | |
15204 | fi | |
15205 | rm -f conftest.o conftest.s | |
15206 | fi | |
ad9c4d9f | 15207 | fi |
ba479fd2 NN |
15208 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5 |
15209 | echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6 | |
8ada417f ZW |
15210 | |
15211 | ||
15212 | if test $gcc_cv_as_dwarf2_debug_line = yes \ | |
15213 | && test $gcc_cv_as_dwarf2_file_buggy = no; then | |
ba479fd2 NN |
15214 | |
15215 | cat >>confdefs.h <<\_ACEOF | |
9d147085 | 15216 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
ba479fd2 | 15217 | _ACEOF |
9d147085 | 15218 | |
8ada417f | 15219 | fi |
ad9c4d9f | 15220 | |
ba479fd2 NN |
15221 | echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5 |
15222 | echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6 | |
15223 | if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then | |
15224 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15225 | else |
15226 | gcc_cv_as_gdwarf2_flag=no | |
15227 | if test $in_tree_gas = yes; then | |
15228 | if test $in_tree_gas_is_elf = yes \ | |
15229 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15230 | then gcc_cv_as_gdwarf2_flag=yes | |
15231 | fi | |
15232 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15233 | echo "$insn" > conftest.s |
ba479fd2 NN |
15234 | if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5' |
15235 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15236 | (eval $ac_try) 2>&5 | |
15237 | ac_status=$? | |
15238 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15239 | (exit $ac_status); }; } | |
8ada417f ZW |
15240 | then |
15241 | gcc_cv_as_gdwarf2_flag=yes | |
15242 | else | |
15243 | echo "configure: failed program was" >&5 | |
15244 | cat conftest.s >&5 | |
15245 | fi | |
15246 | rm -f conftest.o conftest.s | |
15247 | fi | |
ad9c4d9f | 15248 | fi |
ba479fd2 NN |
15249 | echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5 |
15250 | echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6 | |
63cf211a | 15251 | if test $gcc_cv_as_gdwarf2_flag = yes; then |
ba479fd2 NN |
15252 | |
15253 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 15254 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
ba479fd2 | 15255 | _ACEOF |
5f0e9ea2 GK |
15256 | |
15257 | fi | |
ad9c4d9f | 15258 | |
ba479fd2 NN |
15259 | echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5 |
15260 | echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6 | |
15261 | if test "${gcc_cv_as_gstabs_flag+set}" = set; then | |
15262 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15263 | else |
15264 | gcc_cv_as_gstabs_flag=no | |
15265 | if test $in_tree_gas = yes; then | |
15266 | if test $in_tree_gas_is_elf = yes \ | |
15267 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15268 | then gcc_cv_as_gstabs_flag=yes | |
15269 | fi | |
15270 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15271 | echo "$insn" > conftest.s |
ba479fd2 NN |
15272 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5' |
15273 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15274 | (eval $ac_try) 2>&5 | |
15275 | ac_status=$? | |
15276 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15277 | (exit $ac_status); }; } | |
8ada417f ZW |
15278 | then |
15279 | # The native Solaris 9/Intel assembler doesn't understand --gstabs | |
15280 | # and warns about it, but still exits successfully. So check for | |
15281 | # this. | |
ba479fd2 NN |
15282 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null' |
15283 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15284 | (eval $ac_try) 2>&5 | |
15285 | ac_status=$? | |
15286 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15287 | (exit $ac_status); }; } | |
8ada417f ZW |
15288 | then : |
15289 | else gcc_cv_as_gstabs_flag=yes | |
15290 | fi | |
15291 | else | |
15292 | echo "configure: failed program was" >&5 | |
15293 | cat conftest.s >&5 | |
15294 | fi | |
15295 | rm -f conftest.o conftest.s | |
15296 | fi | |
ad9c4d9f | 15297 | fi |
ba479fd2 NN |
15298 | echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5 |
15299 | echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6 | |
63cf211a | 15300 | if test $gcc_cv_as_gstabs_flag = yes; then |
ba479fd2 NN |
15301 | |
15302 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 15303 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
ba479fd2 | 15304 | _ACEOF |
5f0e9ea2 GK |
15305 | |
15306 | fi | |
8ada417f | 15307 | fi |
5f0e9ea2 | 15308 | |
ba479fd2 NN |
15309 | echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5 |
15310 | echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6 | |
96d0f4dc | 15311 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 15312 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
15313 | 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 \ |
15314 | && test $in_tree_ld_is_elf = yes; then | |
96d0f4dc JJ |
15315 | gcc_cv_ld_ro_rw_mix=read-write |
15316 | fi | |
15317 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
15318 | echo '.section myfoosect, "a"' > conftest1.s |
15319 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 15320 | echo '.byte 1' >> conftest2.s |
90e145da | 15321 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 15322 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
15323 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
15324 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
15325 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 15326 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 15327 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 15328 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 15329 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
15330 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
15331 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
15332 | gcc_cv_ld_ro_rw_mix=read-only | |
15333 | else | |
15334 | gcc_cv_ld_ro_rw_mix=read-write | |
15335 | fi | |
15336 | fi | |
15337 | fi | |
15338 | rm -f conftest.* conftest[123].* | |
15339 | fi | |
15340 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
ba479fd2 NN |
15341 | |
15342 | cat >>confdefs.h <<\_ACEOF | |
96d0f4dc | 15343 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
ba479fd2 | 15344 | _ACEOF |
96d0f4dc JJ |
15345 | |
15346 | fi | |
ba479fd2 NN |
15347 | echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5 |
15348 | echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6 | |
96d0f4dc | 15349 | |
ba479fd2 NN |
15350 | echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5 |
15351 | echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6 | |
275b60d6 | 15352 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 15353 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
15354 | 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 \ |
15355 | && test $in_tree_ld_is_elf = yes; then | |
275b60d6 JJ |
15356 | gcc_cv_ld_eh_frame_hdr=yes |
15357 | fi | |
15358 | elif test x$gcc_cv_ld != x; then | |
15359 | # Check if linker supports --eh-frame-hdr option | |
15360 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
15361 | gcc_cv_ld_eh_frame_hdr=yes | |
15362 | fi | |
15363 | fi | |
232b67d9 | 15364 | |
275b60d6 | 15365 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then |
ba479fd2 NN |
15366 | |
15367 | cat >>confdefs.h <<\_ACEOF | |
275b60d6 | 15368 | #define HAVE_LD_EH_FRAME_HDR 1 |
ba479fd2 | 15369 | _ACEOF |
275b60d6 JJ |
15370 | |
15371 | fi | |
ba479fd2 NN |
15372 | echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5 |
15373 | echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6 | |
275b60d6 | 15374 | |
ba479fd2 NN |
15375 | echo "$as_me:$LINENO: checking linker position independent executable support" >&5 |
15376 | echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6 | |
24a4dd31 JJ |
15377 | gcc_cv_ld_pie=no |
15378 | if test $in_tree_ld = yes ; then | |
5408ac6c HPN |
15379 | 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 \ |
15380 | && test $in_tree_ld_is_elf = yes; then | |
24a4dd31 JJ |
15381 | gcc_cv_ld_pie=yes |
15382 | fi | |
15383 | elif test x$gcc_cv_ld != x; then | |
15384 | # Check if linker supports -pie option | |
15385 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
15386 | gcc_cv_ld_pie=yes | |
15387 | fi | |
15388 | fi | |
15389 | if test x"$gcc_cv_ld_pie" = xyes; then | |
ba479fd2 NN |
15390 | |
15391 | cat >>confdefs.h <<\_ACEOF | |
24a4dd31 | 15392 | #define HAVE_LD_PIE 1 |
ba479fd2 | 15393 | _ACEOF |
24a4dd31 JJ |
15394 | |
15395 | fi | |
ba479fd2 NN |
15396 | echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5 |
15397 | echo "${ECHO_T}$gcc_cv_ld_pie" >&6 | |
24a4dd31 | 15398 | |
8bb915b6 NN |
15399 | # -------- |
15400 | # UNSORTED | |
15401 | # -------- | |
15402 | ||
765f1bf9 AM |
15403 | echo "$as_me:$LINENO: checking linker --as-needed support" >&5 |
15404 | echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6 | |
82e923f6 RS |
15405 | if test "${gcc_cv_ld_as_needed+set}" = set; then |
15406 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15407 | else | |
15408 | gcc_cv_ld_as_needed=no | |
765f1bf9 AM |
15409 | if test $in_tree_ld = yes ; then |
15410 | 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 \ | |
15411 | && test $in_tree_ld_is_elf = yes; then | |
15412 | gcc_cv_ld_as_needed=yes | |
15413 | fi | |
15414 | elif test x$gcc_cv_ld != x; then | |
15415 | # Check if linker supports --as-needed and --no-as-needed options | |
15416 | if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then | |
15417 | gcc_cv_ld_as_needed=yes | |
15418 | fi | |
15419 | fi | |
82e923f6 RS |
15420 | |
15421 | fi | |
15422 | echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5 | |
15423 | echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6 | |
765f1bf9 AM |
15424 | if test x"$gcc_cv_ld_as_needed" = xyes; then |
15425 | ||
15426 | cat >>confdefs.h <<\_ACEOF | |
15427 | #define HAVE_LD_AS_NEEDED 1 | |
15428 | _ACEOF | |
15429 | ||
15430 | fi | |
765f1bf9 | 15431 | |
85b776df AM |
15432 | case "$target" in |
15433 | powerpc64*-*-linux*) | |
15434 | echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5 | |
15435 | echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6 | |
15436 | if test "${gcc_cv_ld_no_dot_syms+set}" = set; then | |
15437 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15438 | else | |
15439 | gcc_cv_ld_no_dot_syms=no | |
15440 | if test $in_tree_ld = yes ; then | |
15441 | 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 | |
15442 | gcc_cv_ld_no_dot_syms=yes | |
15443 | fi | |
15444 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then | |
15445 | cat > conftest1.s <<EOF | |
15446 | .text | |
15447 | bl .foo | |
15448 | EOF | |
15449 | cat > conftest2.s <<EOF | |
15450 | .section ".opd","aw" | |
15451 | .align 3 | |
15452 | .globl foo | |
15453 | .type foo,@function | |
15454 | foo: | |
15455 | .quad .LEfoo,.TOC.@tocbase,0 | |
15456 | .text | |
15457 | .LEfoo: | |
15458 | blr | |
15459 | .size foo,.-.LEfoo | |
15460 | EOF | |
15461 | if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \ | |
15462 | && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
15463 | && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then | |
15464 | gcc_cv_ld_no_dot_syms=yes | |
15465 | fi | |
15466 | rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s | |
15467 | fi | |
15468 | ||
15469 | fi | |
15470 | echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5 | |
15471 | echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6 | |
15472 | if test x"$gcc_cv_ld_no_dot_syms" = xyes; then | |
15473 | ||
15474 | cat >>confdefs.h <<\_ACEOF | |
15475 | #define HAVE_LD_NO_DOT_SYMS 1 | |
15476 | _ACEOF | |
15477 | ||
15478 | fi | |
15479 | ;; | |
15480 | esac | |
15481 | ||
380e5ca4 MM |
15482 | echo "$as_me:$LINENO: checking linker --sysroot support" >&5 |
15483 | echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6 | |
15484 | if test "${gcc_cv_ld_sysroot+set}" = set; then | |
15485 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15486 | else | |
15487 | gcc_cv_ld_sysroot=no | |
15488 | if test $in_tree_ld = yes ; then | |
15489 | 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 | 15490 | gcc_cv_ld_sysroot=yes |
380e5ca4 MM |
15491 | fi |
15492 | elif test x$gcc_cv_ld != x; then | |
15493 | if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then | |
15494 | gcc_cv_ld_sysroot=yes | |
15495 | fi | |
15496 | fi | |
15497 | fi | |
15498 | echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5 | |
15499 | echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6 | |
15500 | if test x"$gcc_cv_ld_sysroot" = xyes; then | |
15501 | ||
15502 | cat >>confdefs.h <<\_ACEOF | |
15503 | #define HAVE_LD_SYSROOT 1 | |
15504 | _ACEOF | |
15505 | ||
15506 | fi | |
15507 | ||
9fb28a67 | 15508 | if test x$with_sysroot = x && test x$host = x$target \ |
047d636f | 15509 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then |
ba479fd2 NN |
15510 | |
15511 | cat >>confdefs.h <<_ACEOF | |
793e9558 | 15512 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
ba479fd2 | 15513 | _ACEOF |
793e9558 PB |
15514 | |
15515 | fi | |
15516 | ||
77008252 JJ |
15517 | # Test for stack protector support in target C library. |
15518 | case "$target" in | |
15519 | *-*-linux*) | |
15520 | echo "$as_me:$LINENO: checking __stack_chk_fail in target GNU C library" >&5 | |
15521 | echo $ECHO_N "checking __stack_chk_fail in target GNU C library... $ECHO_C" >&6 | |
15522 | if test "${gcc_cv_libc_provides_ssp+set}" = set; then | |
15523 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15524 | else | |
15525 | gcc_cv_libc_provides_ssp=no | |
15526 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then | |
15527 | if test "x$with_sysroot" = x; then | |
15528 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
15529 | elif test "x$with_sysroot" = xyes; then | |
15530 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
15531 | else | |
15532 | glibc_header_dir="${with_sysroot}/usr/include" | |
15533 | fi | |
15534 | else | |
15535 | glibc_header_dir=/usr/include | |
15536 | fi | |
15537 | # glibc 2.4 and later provides __stack_chk_fail and | |
15538 | # either __stack_chk_guard, or TLS access to stack guard canary. | |
15539 | if test -f $glibc_header_dir/features.h \ | |
15540 | && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \ | |
15541 | $glibc_header_dir/features.h > /dev/null; then | |
15542 | if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \ | |
15543 | $glibc_header_dir/features.h > /dev/null; then | |
15544 | gcc_cv_libc_provides_ssp=yes | |
15545 | elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \ | |
15546 | $glibc_header_dir/features.h > /dev/null \ | |
15547 | && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \ | |
15548 | $glibc_header_dir/features.h > /dev/null; then | |
15549 | gcc_cv_libc_provides_ssp=yes | |
15550 | fi | |
15551 | fi | |
15552 | fi | |
15553 | echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5 | |
15554 | echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6 ;; | |
15555 | *) gcc_cv_libc_provides_ssp=no ;; | |
15556 | esac | |
15557 | if test x$gcc_cv_libc_provides_ssp = xyes; then | |
15558 | ||
15559 | cat >>confdefs.h <<\_ACEOF | |
15560 | #define TARGET_LIBC_PROVIDES_SSP 1 | |
15561 | _ACEOF | |
15562 | ||
15563 | fi | |
15564 | ||
81bf3d9e | 15565 | # Find out what GC implementation we want, or may, use. |
ba479fd2 | 15566 | |
81bf3d9e RH |
15567 | # Check whether --with-gc or --without-gc was given. |
15568 | if test "${with_gc+set}" = set; then | |
15569 | withval="$with_gc" | |
15570 | case "$withval" in | |
08cee789 | 15571 | page) |
81bf3d9e | 15572 | GGC=ggc-$withval |
08cee789 DJ |
15573 | ;; |
15574 | zone) | |
15575 | GGC=ggc-$withval | |
15576 | ||
15577 | cat >>confdefs.h <<\_ACEOF | |
15578 | #define GGC_ZONE 1 | |
15579 | _ACEOF | |
15580 | ||
81bf3d9e RH |
15581 | ;; |
15582 | *) | |
ba479fd2 NN |
15583 | { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5 |
15584 | echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;} | |
15585 | { (exit 1); exit 1; }; } | |
81bf3d9e RH |
15586 | ;; |
15587 | esac | |
15588 | else | |
005537df | 15589 | GGC=ggc-page |
ba479fd2 | 15590 | fi; |
81bf3d9e RH |
15591 | |
15592 | echo "Using $GGC for garbage collection." | |
15593 | ||
3c809ba4 | 15594 | # Use the system's zlib library. |
b8dad04b ZW |
15595 | zlibdir=-L../zlib |
15596 | zlibinc="-I\$(srcdir)/../zlib" | |
ba479fd2 | 15597 | |
3c809ba4 AG |
15598 | # Check whether --with-system-zlib or --without-system-zlib was given. |
15599 | if test "${with_system_zlib+set}" = set; then | |
15600 | withval="$with_system_zlib" | |
15601 | zlibdir= | |
15602 | zlibinc= | |
15603 | ||
ba479fd2 | 15604 | fi; |
3c809ba4 AG |
15605 | |
15606 | ||
15607 | ||
dc6746e7 | 15608 | |
ba479fd2 NN |
15609 | echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
15610 | echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 | |
dc6746e7 PT |
15611 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
15612 | if test "${enable_maintainer_mode+set}" = set; then | |
15613 | enableval="$enable_maintainer_mode" | |
15614 | maintainer_mode=$enableval | |
15615 | else | |
15616 | maintainer_mode=no | |
ba479fd2 | 15617 | fi; |
63cf211a | 15618 | |
ba479fd2 NN |
15619 | echo "$as_me:$LINENO: result: $maintainer_mode" >&5 |
15620 | echo "${ECHO_T}$maintainer_mode" >&6 | |
dc6746e7 PT |
15621 | |
15622 | if test "$maintainer_mode" = "yes"; then | |
15623 | MAINT='' | |
15624 | else | |
15625 | MAINT='#' | |
15626 | fi | |
15627 | ||
8bb915b6 NN |
15628 | # -------------- |
15629 | # Language hooks | |
15630 | # -------------- | |
15631 | ||
861bb6c1 JL |
15632 | # Make empty files to contain the specs and options for each language. |
15633 | # Then add #include lines to for a compiler that has specs and/or options. | |
15634 | ||
d7b42618 | 15635 | lang_opt_files= |
861bb6c1 | 15636 | lang_specs_files= |
3103b7db | 15637 | lang_tree_files= |
861bb6c1 JL |
15638 | for subdir in . $subdirs |
15639 | do | |
d7b42618 NB |
15640 | if test -f $srcdir/$subdir/lang.opt; then |
15641 | lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" | |
15642 | fi | |
75bffa71 | 15643 | if test -f $srcdir/$subdir/lang-specs.h; then |
0d24f4d1 | 15644 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" |
861bb6c1 | 15645 | fi |
3103b7db | 15646 | if test -f $srcdir/$subdir/$subdir-tree.def; then |
0d24f4d1 | 15647 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" |
3103b7db | 15648 | fi |
861bb6c1 JL |
15649 | done |
15650 | ||
15651 | # These (without "all_") are set in each config-lang.in. | |
15652 | # `language' must be a single word so is spelled singularly. | |
15653 | all_languages= | |
15654 | all_boot_languages= | |
15655 | all_compilers= | |
15656 | all_stagestuff= | |
53c7ffe7 | 15657 | all_outputs='Makefile gccbug mklibgcc libada-mk' |
861bb6c1 | 15658 | # List of language makefile fragments. |
2ed26f6b ZW |
15659 | all_lang_makefrags= |
15660 | # List of language subdirectory makefiles. Deprecated. | |
861bb6c1 | 15661 | all_lang_makefiles= |
e2500fed | 15662 | # Files for gengtype |
ef69da62 | 15663 | all_gtfiles="$target_gtfiles" |
8ac9d31f TJ |
15664 | # Files for gengtype with language |
15665 | all_gtfiles_files_langs= | |
15666 | all_gtfiles_files_files= | |
861bb6c1 JL |
15667 | |
15668 | # Add the language fragments. | |
15669 | # Languages are added via two mechanisms. Some information must be | |
15670 | # recorded in makefile variables, these are defined in config-lang.in. | |
15671 | # We accumulate them and plug them into the main Makefile. | |
15672 | # The other mechanism is a set of hooks for each of the main targets | |
15673 | # like `clean', `install', etc. | |
15674 | ||
861bb6c1 | 15675 | language_hooks="Make-hooks" |
861bb6c1 | 15676 | |
c406e779 | 15677 | for s in $subdirs |
861bb6c1 | 15678 | do |
861bb6c1 JL |
15679 | language= |
15680 | boot_language= | |
15681 | compilers= | |
15682 | stagestuff= | |
861bb6c1 | 15683 | outputs= |
e2500fed | 15684 | gtfiles= |
861bb6c1 | 15685 | . ${srcdir}/$s/config-lang.in |
75bffa71 | 15686 | if test "x$language" = x |
861bb6c1 JL |
15687 | then |
15688 | echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 | |
15689 | exit 1 | |
15690 | fi | |
2ed26f6b | 15691 | all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in" |
72aaffbd | 15692 | if test -f ${srcdir}/$s/Makefile.in |
2ed26f6b | 15693 | then all_lang_makefiles="$s/Makefile" |
72aaffbd | 15694 | fi |
861bb6c1 | 15695 | all_languages="$all_languages $language" |
75bffa71 | 15696 | if test "x$boot_language" = xyes |
861bb6c1 JL |
15697 | then |
15698 | all_boot_languages="$all_boot_languages $language" | |
15699 | fi | |
15700 | all_compilers="$all_compilers $compilers" | |
15701 | all_stagestuff="$all_stagestuff $stagestuff" | |
861bb6c1 | 15702 | all_outputs="$all_outputs $outputs" |
e2500fed | 15703 | all_gtfiles="$all_gtfiles $gtfiles" |
c406e779 | 15704 | for f in $gtfiles |
8ac9d31f | 15705 | do |
8ac9d31f TJ |
15706 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " |
15707 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8ac9d31f | 15708 | done |
861bb6c1 JL |
15709 | done |
15710 | ||
8ac9d31f TJ |
15711 | # Pick up gtfiles for c |
15712 | gtfiles= | |
15713 | s="c" | |
15714 | . ${srcdir}/c-config-lang.in | |
15715 | all_gtfiles="$all_gtfiles $gtfiles" | |
c406e779 | 15716 | for f in $gtfiles |
8ac9d31f | 15717 | do |
8ac9d31f TJ |
15718 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " |
15719 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8ac9d31f TJ |
15720 | done |
15721 | ||
cbc59f01 | 15722 | check_languages= |
c406e779 | 15723 | for language in $all_languages |
cbc59f01 | 15724 | do |
cbc59f01 | 15725 | check_languages="$check_languages check-$language" |
cbc59f01 DD |
15726 | done |
15727 | ||
62b81e45 MM |
15728 | # We link each language in with a set of hooks, reached indirectly via |
15729 | # lang.${target}. | |
861bb6c1 JL |
15730 | |
15731 | rm -f Make-hooks | |
15732 | touch Make-hooks | |
65ebbf81 | 15733 | target_list="all.build all.cross start.encap rest.encap tags \ |
a207b594 | 15734 | install-normal install-common install-man \ |
a541f69d | 15735 | uninstall info man srcextra srcman srcinfo \ |
a03ad584 | 15736 | mostlyclean clean distclean maintainer-clean \ |
8f231b5d | 15737 | stage1 stage2 stage3 stage4 stageprofile stagefeedback" |
861bb6c1 JL |
15738 | for t in $target_list |
15739 | do | |
15740 | x= | |
c406e779 | 15741 | for lang in $all_languages |
861bb6c1 | 15742 | do |
ab87f8c8 | 15743 | x="$x $lang.$t" |
861bb6c1 JL |
15744 | done |
15745 | echo "lang.$t: $x" >> Make-hooks | |
15746 | done | |
15747 | ||
8bb915b6 NN |
15748 | # -------- |
15749 | # UNSORTED | |
15750 | # -------- | |
15751 | ||
cc06d68c | 15752 | # Create .gdbinit. |
861bb6c1 | 15753 | |
cc06d68c GP |
15754 | echo "dir ." > .gdbinit |
15755 | echo "dir ${srcdir}" >> .gdbinit | |
15756 | if test x$gdb_needs_out_file_path = xyes | |
15757 | then | |
15758 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
15759 | fi | |
15760 | if test "x$subdirs" != x; then | |
15761 | for s in $subdirs | |
15762 | do | |
15763 | echo "dir ${srcdir}/$s" >> .gdbinit | |
15764 | done | |
861bb6c1 | 15765 | fi |
cc06d68c | 15766 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 15767 | |
8f8d3278 NC |
15768 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
15769 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
15770 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
15771 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
15772 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
15773 | # make and thus we'd get different behavior depending on where we built the | |
15774 | # sources. | |
5949a9fc | 15775 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
caa55b1e | 15776 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)' |
d062c304 | 15777 | else |
8f8d3278 NC |
15778 | # An explanation of the sed strings: |
15779 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
15780 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
15781 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 15782 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
15783 | # |
15784 | # (*) Note this pattern overwrites the first character of the string | |
15785 | # with a forward slash if one is not already present. This is not a | |
15786 | # problem because the exact names of the sub-directories concerned is | |
15787 | # unimportant, just the number of them matters. | |
15788 | # | |
15789 | # The practical upshot of these patterns is like this: | |
15790 | # | |
15791 | # prefix exec_prefix result | |
15792 | # ------ ----------- ------ | |
15793 | # /foo /foo/bar ../ | |
15794 | # /foo/ /foo/bar ../ | |
15795 | # /foo /foo/bar/ ../ | |
15796 | # /foo/ /foo/bar/ ../ | |
15797 | # /foo /foo/bar/ugg ../../ | |
15798 | # | |
4c112cda | 15799 | dollar='$$' |
caa55b1e | 15800 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)" |
d062c304 JL |
15801 | fi |
15802 | ||
15803 | ||
2ce3c6c6 | 15804 | |
2bbea3a6 RH |
15805 | # Find a directory in which to install a shared libgcc. |
15806 | ||
15807 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
15808 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
15809 | enableval="$enable_version_specific_runtime_libs" | |
ba479fd2 NN |
15810 | |
15811 | fi; | |
2bbea3a6 RH |
15812 | |
15813 | ||
5b15f277 RH |
15814 | # Check whether --with-slibdir or --without-slibdir was given. |
15815 | if test "${with_slibdir+set}" = set; then | |
15816 | withval="$with_slibdir" | |
15817 | slibdir="$with_slibdir" | |
15818 | else | |
15819 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 15820 | slibdir='$(libsubdir)' |
5b15f277 | 15821 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
15822 | slibdir='$(build_tooldir)/lib' |
15823 | else | |
5b15f277 | 15824 | slibdir='$(libdir)' |
2bbea3a6 | 15825 | fi |
ba479fd2 | 15826 | fi; |
2bbea3a6 RH |
15827 | |
15828 | ||
1e6347d8 | 15829 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
15830 | |
15831 | ||
861bb6c1 JL |
15832 | # Substitute configuration variables |
15833 | ||
15834 | ||
15835 | ||
15836 | ||
15837 | ||
15838 | ||
15839 | ||
15840 | ||
15841 | ||
15842 | ||
15843 | ||
15844 | ||
15845 | ||
15846 | ||
15847 | ||
15848 | ||
15849 | ||
15850 | ||
15851 | ||
15852 | ||
15853 | ||
15854 | ||
15855 | ||
15856 | ||
15857 | ||
15858 | ||
15859 | ||
15860 | ||
15861 | ||
15862 | ||
15863 | ||
15864 | ||
15865 | ||
15866 | ||
15867 | ||
15868 | ||
15869 | ||
15870 | ||
15871 | ||
15872 | ||
15873 | ||
15874 | ||
15875 | ||
15876 | ||
15877 | ||
15878 | ||
9b16d2c4 | 15879 | |
e9a25f70 | 15880 | |
6e26218f | 15881 | |
c8724862 | 15882 | |
e061d1ce | 15883 | |
d8bb17c8 | 15884 | |
11642c3a ZW |
15885 | |
15886 | ||
15887 | ||
15888 | ||
15889 | ||
15890 | ||
15891 | ||
3d9d2476 | 15892 | |
e2500fed | 15893 | |
51b9ff45 | 15894 | |
861bb6c1 | 15895 | |
6e3f3080 NN |
15896 | # Echo link setup. |
15897 | if test x${build} = x${host} ; then | |
15898 | if test x${host} = x${target} ; then | |
15899 | echo "Links are now set up to build a native compiler for ${target}." 1>&2 | |
15900 | else | |
15901 | echo "Links are now set up to build a cross-compiler" 1>&2 | |
15902 | echo " from ${host} to ${target}." 1>&2 | |
15903 | fi | |
15904 | else | |
15905 | if test x${host} = x${target} ; then | |
15906 | echo "Links are now set up to build (on ${build}) a native compiler" 1>&2 | |
15907 | echo " for ${target}." 1>&2 | |
15908 | else | |
15909 | echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2 | |
15910 | echo " from ${host} to ${target}." 1>&2 | |
15911 | fi | |
15912 | fi | |
15913 | ||
6de9cd9a DN |
15914 | |
15915 | ||
15916 | ||
6e3f3080 NN |
15917 | # Configure the subdirectories |
15918 | # AC_CONFIG_SUBDIRS($subdirs) | |
15919 | ||
15920 | # Create the Makefile | |
15921 | # and configure language subdirectories | |
ba479fd2 | 15922 | ac_config_files="$ac_config_files $all_outputs" |
914c5af7 NN |
15923 | |
15924 | ||
ba479fd2 | 15925 | ac_config_commands="$ac_config_commands default" |
914c5af7 | 15926 | |
ba479fd2 | 15927 | cat >confcache <<\_ACEOF |
6e3f3080 NN |
15928 | # This file is a shell script that caches the results of configure |
15929 | # tests run on this system so they can be shared between configure | |
ba479fd2 NN |
15930 | # scripts and configure runs, see configure's option --config-cache. |
15931 | # It is not useful on other systems. If it contains results you don't | |
15932 | # want to keep, you may remove or edit it. | |
6e3f3080 | 15933 | # |
ba479fd2 NN |
15934 | # config.status only pays attention to the cache file if you give it |
15935 | # the --recheck option to rerun configure. | |
6e3f3080 | 15936 | # |
ba479fd2 NN |
15937 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
15938 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
15939 | # following values. | |
15940 | ||
15941 | _ACEOF | |
15942 | ||
6e3f3080 NN |
15943 | # The following way of writing the cache mishandles newlines in values, |
15944 | # but we know of no workaround that is simple, portable, and efficient. | |
15945 | # So, don't put newlines in cache variables' values. | |
15946 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
15947 | # and sets the high bit in the cache file unless we assign to the vars. | |
ba479fd2 NN |
15948 | { |
15949 | (set) 2>&1 | | |
15950 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
15951 | *ac_space=\ *) | |
15952 | # `set' does not quote correctly, so add quotes (double-quote | |
15953 | # substitution turns \\\\ into \\, and sed turns \\ into \). | |
15954 | sed -n \ | |
86da66b5 HPN |
15955 | "s/'/'\\\\''/g; |
15956 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
ba479fd2 NN |
15957 | ;; |
15958 | *) | |
15959 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
15960 | sed -n \ | |
86da66b5 | 15961 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
ba479fd2 NN |
15962 | ;; |
15963 | esac; | |
15964 | } | | |
15965 | sed ' | |
15966 | t clear | |
15967 | : clear | |
15968 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
15969 | t end | |
15970 | /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
15971 | : end' >>confcache | |
15972 | if diff $cache_file confcache >/dev/null 2>&1; then :; else | |
6e3f3080 | 15973 | if test -w $cache_file; then |
ba479fd2 NN |
15974 | test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" |
15975 | cat confcache >$cache_file | |
6e3f3080 NN |
15976 | else |
15977 | echo "not updating unwritable cache $cache_file" | |
15978 | fi | |
15979 | fi | |
15980 | rm -f confcache | |
15981 | ||
15982 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
15983 | # Let make expand exec_prefix. | |
15984 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
15985 | ||
ba479fd2 NN |
15986 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
15987 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
15988 | # trailing colons and then remove the whole line if VPATH becomes empty | |
15989 | # (actually we leave an empty line to preserve line numbers). | |
6e3f3080 | 15990 | if test "x$srcdir" = x.; then |
86da66b5 | 15991 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
ba479fd2 NN |
15992 | s/:*\$(srcdir):*/:/; |
15993 | s/:*\${srcdir}:*/:/; | |
15994 | s/:*@srcdir@:*/:/; | |
86da66b5 | 15995 | s/^\([^=]*=[ ]*\):*/\1/; |
ba479fd2 | 15996 | s/:*$//; |
86da66b5 | 15997 | s/^[^=]*=[ ]*$//; |
ba479fd2 | 15998 | }' |
6e3f3080 NN |
15999 | fi |
16000 | ||
63cf211a | 16001 | DEFS=-DHAVE_CONFIG_H |
6e3f3080 | 16002 | |
ba479fd2 NN |
16003 | ac_libobjs= |
16004 | ac_ltlibobjs= | |
16005 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
16006 | # 1. Remove the extension, and $U if already installed. | |
16007 | ac_i=`echo "$ac_i" | | |
86da66b5 | 16008 | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` |
ba479fd2 NN |
16009 | # 2. Add them. |
16010 | ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" | |
16011 | ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' | |
16012 | done | |
16013 | LIBOBJS=$ac_libobjs | |
63cf211a | 16014 | |
ba479fd2 NN |
16015 | LTLIBOBJS=$ac_ltlibobjs |
16016 | ||
16017 | ||
16018 | ||
16019 | : ${CONFIG_STATUS=./config.status} | |
16020 | ac_clean_files_save=$ac_clean_files | |
16021 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
16022 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | |
16023 | echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
16024 | cat >$CONFIG_STATUS <<_ACEOF | |
16025 | #! $SHELL | |
16026 | # Generated by $as_me. | |
6e3f3080 NN |
16027 | # Run this file to recreate the current configuration. |
16028 | # Compiler output produced by configure, useful for debugging | |
ba479fd2 | 16029 | # configure, is in config.log if it exists. |
6e3f3080 | 16030 | |
ba479fd2 NN |
16031 | debug=false |
16032 | ac_cs_recheck=false | |
16033 | ac_cs_silent=false | |
16034 | SHELL=\${CONFIG_SHELL-$SHELL} | |
16035 | _ACEOF | |
16036 | ||
16037 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16038 | ## --------------------- ## | |
16039 | ## M4sh Initialization. ## | |
16040 | ## --------------------- ## | |
16041 | ||
16042 | # Be Bourne compatible | |
16043 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
16044 | emulate sh | |
16045 | NULLCMD=: | |
16046 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
16047 | # is contrary to our usage. Disable this feature. | |
16048 | alias -g '${1+"$@"}'='"$@"' | |
16049 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
16050 | set -o posix | |
16051 | fi | |
86da66b5 | 16052 | DUALCASE=1; export DUALCASE # for MKS sh |
ba479fd2 NN |
16053 | |
16054 | # Support unset when possible. | |
86da66b5 | 16055 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then |
ba479fd2 NN |
16056 | as_unset=unset |
16057 | else | |
16058 | as_unset=false | |
16059 | fi | |
16060 | ||
16061 | ||
16062 | # Work around bugs in pre-3.0 UWIN ksh. | |
16063 | $as_unset ENV MAIL MAILPATH | |
16064 | PS1='$ ' | |
16065 | PS2='> ' | |
16066 | PS4='+ ' | |
16067 | ||
16068 | # NLS nuisances. | |
16069 | for as_var in \ | |
16070 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
16071 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
16072 | LC_TELEPHONE LC_TIME | |
6e3f3080 | 16073 | do |
86da66b5 | 16074 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
ba479fd2 NN |
16075 | eval $as_var=C; export $as_var |
16076 | else | |
16077 | $as_unset $as_var | |
16078 | fi | |
6e3f3080 NN |
16079 | done |
16080 | ||
ba479fd2 NN |
16081 | # Required to use basename. |
16082 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
16083 | as_expr=expr | |
16084 | else | |
16085 | as_expr=false | |
16086 | fi | |
6e3f3080 | 16087 | |
ba479fd2 NN |
16088 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then |
16089 | as_basename=basename | |
16090 | else | |
16091 | as_basename=false | |
16092 | fi | |
6e3f3080 NN |
16093 | |
16094 | ||
ba479fd2 NN |
16095 | # Name of the executable. |
16096 | as_me=`$as_basename "$0" || | |
16097 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
16098 | X"$0" : 'X\(//\)$' \| \ | |
16099 | X"$0" : 'X\(/\)$' \| \ | |
16100 | . : '\(.\)' 2>/dev/null || | |
16101 | echo X/"$0" | | |
16102 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | |
16103 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
16104 | /^X\/\(\/\).*/{ s//\1/; q; } | |
16105 | s/.*/./; q'` | |
16106 | ||
6e3f3080 | 16107 | |
ba479fd2 NN |
16108 | # PATH needs CR, and LINENO needs CR and PATH. |
16109 | # Avoid depending upon Character Ranges. | |
16110 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
16111 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
16112 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
16113 | as_cr_digits='0123456789' | |
16114 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
16115 | ||
16116 | # The user is always right. | |
16117 | if test "${PATH_SEPARATOR+set}" != set; then | |
16118 | echo "#! /bin/sh" >conf$$.sh | |
16119 | echo "exit 0" >>conf$$.sh | |
16120 | chmod +x conf$$.sh | |
16121 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
16122 | PATH_SEPARATOR=';' | |
6e3f3080 | 16123 | else |
ba479fd2 NN |
16124 | PATH_SEPARATOR=: |
16125 | fi | |
16126 | rm -f conf$$.sh | |
16127 | fi | |
16128 | ||
16129 | ||
16130 | as_lineno_1=$LINENO | |
16131 | as_lineno_2=$LINENO | |
16132 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
16133 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
16134 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
16135 | # Find who we are. Look in the path if we contain no path at all | |
16136 | # relative or not. | |
16137 | case $0 in | |
16138 | *[\\/]* ) as_myself=$0 ;; | |
16139 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16140 | for as_dir in $PATH | |
16141 | do | |
16142 | IFS=$as_save_IFS | |
16143 | test -z "$as_dir" && as_dir=. | |
16144 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
16145 | done | |
16146 | ||
16147 | ;; | |
16148 | esac | |
16149 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
16150 | # in which case we are not to be found in the path. | |
16151 | if test "x$as_myself" = x; then | |
16152 | as_myself=$0 | |
16153 | fi | |
16154 | if test ! -f "$as_myself"; then | |
16155 | { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 | |
16156 | echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} | |
16157 | { (exit 1); exit 1; }; } | |
6e3f3080 | 16158 | fi |
ba479fd2 NN |
16159 | case $CONFIG_SHELL in |
16160 | '') | |
16161 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16162 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
16163 | do | |
16164 | IFS=$as_save_IFS | |
16165 | test -z "$as_dir" && as_dir=. | |
16166 | for as_base in sh bash ksh sh5; do | |
16167 | case $as_dir in | |
16168 | /*) | |
16169 | if ("$as_dir/$as_base" -c ' | |
16170 | as_lineno_1=$LINENO | |
16171 | as_lineno_2=$LINENO | |
16172 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
16173 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
16174 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | |
16175 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
16176 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
16177 | CONFIG_SHELL=$as_dir/$as_base | |
16178 | export CONFIG_SHELL | |
16179 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
16180 | fi;; | |
16181 | esac | |
16182 | done | |
16183 | done | |
16184 | ;; | |
16185 | esac | |
16186 | ||
16187 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
16188 | # uniformly replaced by the line number. The first 'sed' inserts a | |
16189 | # line-number line before each line; the second 'sed' does the real | |
16190 | # work. The second script uses 'N' to pair each line-number line | |
16191 | # with the numbered line, and appends trailing '-' during | |
16192 | # substitution so that $LINENO is not a special case at line end. | |
16193 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | |
16194 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | |
16195 | sed '=' <$as_myself | | |
16196 | sed ' | |
16197 | N | |
16198 | s,$,-, | |
16199 | : loop | |
16200 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
16201 | t loop | |
16202 | s,-$,, | |
16203 | s,^['$as_cr_digits']*\n,, | |
16204 | ' >$as_me.lineno && | |
16205 | chmod +x $as_me.lineno || | |
16206 | { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 | |
16207 | echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} | |
16208 | { (exit 1); exit 1; }; } | |
16209 | ||
16210 | # Don't try to exec as it changes $[0], causing all sort of problems | |
16211 | # (the dirname of $[0] is not the place where we might find the | |
16212 | # original and so on. Autoconf is especially sensible to this). | |
16213 | . ./$as_me.lineno | |
16214 | # Exit status is that of the last command. | |
16215 | exit | |
16216 | } | |
16217 | ||
16218 | ||
16219 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | |
16220 | *c*,-n*) ECHO_N= ECHO_C=' | |
16221 | ' ECHO_T=' ' ;; | |
16222 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
16223 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
16224 | esac | |
16225 | ||
16226 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
16227 | as_expr=expr | |
16228 | else | |
16229 | as_expr=false | |
16230 | fi | |
16231 | ||
16232 | rm -f conf$$ conf$$.exe conf$$.file | |
16233 | echo >conf$$.file | |
16234 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
16235 | # We could just check for DJGPP; but this test a) works b) is more generic | |
16236 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
16237 | if test -f conf$$.exe; then | |
16238 | # Don't use ln at all; we don't have any links | |
16239 | as_ln_s='cp -p' | |
6e3f3080 | 16240 | else |
ba479fd2 | 16241 | as_ln_s='ln -s' |
6e3f3080 | 16242 | fi |
ba479fd2 NN |
16243 | elif ln conf$$.file conf$$ 2>/dev/null; then |
16244 | as_ln_s=ln | |
16245 | else | |
16246 | as_ln_s='cp -p' | |
16247 | fi | |
16248 | rm -f conf$$ conf$$.exe conf$$.file | |
16249 | ||
16250 | if mkdir -p . 2>/dev/null; then | |
16251 | as_mkdir_p=: | |
16252 | else | |
86da66b5 | 16253 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
16254 | as_mkdir_p=false |
16255 | fi | |
16256 | ||
16257 | as_executable_p="test -f" | |
16258 | ||
16259 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 16260 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
16261 | |
16262 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 16263 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
16264 | |
16265 | ||
16266 | # IFS | |
16267 | # We need space, tab and new line, in precisely that order. | |
16268 | as_nl=' | |
16269 | ' | |
16270 | IFS=" $as_nl" | |
16271 | ||
16272 | # CDPATH. | |
16273 | $as_unset CDPATH | |
16274 | ||
16275 | exec 6>&1 | |
16276 | ||
16277 | # Open the log real soon, to keep \$[0] and so on meaningful, and to | |
16278 | # report actual input values of CONFIG_FILES etc. instead of their | |
16279 | # values after options handling. Logging --version etc. is OK. | |
16280 | exec 5>>config.log | |
16281 | { | |
16282 | echo | |
16283 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
16284 | ## Running $as_me. ## | |
16285 | _ASBOX | |
16286 | } >&5 | |
16287 | cat >&5 <<_CSEOF | |
16288 | ||
16289 | This file was extended by $as_me, which was | |
8ab705be | 16290 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
16291 | |
16292 | CONFIG_FILES = $CONFIG_FILES | |
16293 | CONFIG_HEADERS = $CONFIG_HEADERS | |
16294 | CONFIG_LINKS = $CONFIG_LINKS | |
16295 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
16296 | $ $0 $@ | |
16297 | ||
16298 | _CSEOF | |
16299 | echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 | |
16300 | echo >&5 | |
16301 | _ACEOF | |
16302 | ||
16303 | # Files that config.status was made for. | |
16304 | if test -n "$ac_config_files"; then | |
16305 | echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS | |
16306 | fi | |
16307 | ||
16308 | if test -n "$ac_config_headers"; then | |
16309 | echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS | |
16310 | fi | |
16311 | ||
16312 | if test -n "$ac_config_links"; then | |
16313 | echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS | |
16314 | fi | |
16315 | ||
16316 | if test -n "$ac_config_commands"; then | |
16317 | echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS | |
16318 | fi | |
16319 | ||
16320 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16321 | ||
16322 | ac_cs_usage="\ | |
16323 | \`$as_me' instantiates files from templates according to the | |
16324 | current configuration. | |
16325 | ||
16326 | Usage: $0 [OPTIONS] [FILE]... | |
16327 | ||
16328 | -h, --help print this help, then exit | |
16329 | -V, --version print version number, then exit | |
16330 | -q, --quiet do not print progress messages | |
16331 | -d, --debug don't remove temporary files | |
16332 | --recheck update $as_me by reconfiguring in the same conditions | |
16333 | --file=FILE[:TEMPLATE] | |
86da66b5 | 16334 | instantiate the configuration file FILE |
ba479fd2 | 16335 | --header=FILE[:TEMPLATE] |
86da66b5 | 16336 | instantiate the configuration header FILE |
ba479fd2 NN |
16337 | |
16338 | Configuration files: | |
16339 | $config_files | |
16340 | ||
16341 | Configuration headers: | |
16342 | $config_headers | |
16343 | ||
16344 | Configuration commands: | |
16345 | $config_commands | |
16346 | ||
16347 | Report bugs to <bug-autoconf@gnu.org>." | |
16348 | _ACEOF | |
16349 | ||
16350 | cat >>$CONFIG_STATUS <<_ACEOF | |
16351 | ac_cs_version="\\ | |
16352 | config.status | |
8ab705be | 16353 | configured by $0, generated by GNU Autoconf 2.59, |
ba479fd2 NN |
16354 | with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" |
16355 | ||
86da66b5 | 16356 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
16357 | This config.status script is free software; the Free Software Foundation |
16358 | gives unlimited permission to copy, distribute and modify it." | |
16359 | srcdir=$srcdir | |
16360 | _ACEOF | |
16361 | ||
16362 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16363 | # If no file are specified by the user, then we need to provide default | |
16364 | # value. By we need to know if files were specified by the user. | |
16365 | ac_need_defaults=: | |
16366 | while test $# != 0 | |
16367 | do | |
16368 | case $1 in | |
16369 | --*=*) | |
16370 | ac_option=`expr "x$1" : 'x\([^=]*\)='` | |
16371 | ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` | |
16372 | ac_shift=: | |
16373 | ;; | |
16374 | -*) | |
16375 | ac_option=$1 | |
16376 | ac_optarg=$2 | |
16377 | ac_shift=shift | |
16378 | ;; | |
16379 | *) # This is not an option, so the user has probably given explicit | |
16380 | # arguments. | |
16381 | ac_option=$1 | |
16382 | ac_need_defaults=false;; | |
16383 | esac | |
16384 | ||
16385 | case $ac_option in | |
16386 | # Handling of the options. | |
16387 | _ACEOF | |
16388 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16389 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
16390 | ac_cs_recheck=: ;; | |
16391 | --version | --vers* | -V ) | |
16392 | echo "$ac_cs_version"; exit 0 ;; | |
16393 | --he | --h) | |
16394 | # Conflict between --help and --header | |
16395 | { { echo "$as_me:$LINENO: error: ambiguous option: $1 | |
16396 | Try \`$0 --help' for more information." >&5 | |
16397 | echo "$as_me: error: ambiguous option: $1 | |
16398 | Try \`$0 --help' for more information." >&2;} | |
16399 | { (exit 1); exit 1; }; };; | |
16400 | --help | --hel | -h ) | |
16401 | echo "$ac_cs_usage"; exit 0 ;; | |
16402 | --debug | --d* | -d ) | |
16403 | debug=: ;; | |
16404 | --file | --fil | --fi | --f ) | |
16405 | $ac_shift | |
16406 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" | |
16407 | ac_need_defaults=false;; | |
16408 | --header | --heade | --head | --hea ) | |
16409 | $ac_shift | |
16410 | CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | |
16411 | ac_need_defaults=false;; | |
16412 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
16413 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
16414 | ac_cs_silent=: ;; | |
16415 | ||
16416 | # This is an error. | |
16417 | -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 | |
16418 | Try \`$0 --help' for more information." >&5 | |
16419 | echo "$as_me: error: unrecognized option: $1 | |
16420 | Try \`$0 --help' for more information." >&2;} | |
16421 | { (exit 1); exit 1; }; } ;; | |
16422 | ||
16423 | *) ac_config_targets="$ac_config_targets $1" ;; | |
16424 | ||
16425 | esac | |
16426 | shift | |
6e3f3080 | 16427 | done |
ba479fd2 NN |
16428 | |
16429 | ac_configure_extra_args= | |
16430 | ||
16431 | if $ac_cs_silent; then | |
16432 | exec 6>/dev/null | |
16433 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
861bb6c1 JL |
16434 | fi |
16435 | ||
ba479fd2 NN |
16436 | _ACEOF |
16437 | cat >>$CONFIG_STATUS <<_ACEOF | |
16438 | if \$ac_cs_recheck; then | |
16439 | echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 | |
16440 | exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
16441 | fi | |
861bb6c1 | 16442 | |
ba479fd2 NN |
16443 | _ACEOF |
16444 | ||
16445 | cat >>$CONFIG_STATUS <<_ACEOF | |
16446 | # | |
16447 | # INIT-COMMANDS section. | |
16448 | # | |
16449 | ||
16450 | subdirs='$subdirs' | |
ba479fd2 NN |
16451 | |
16452 | _ACEOF | |
16453 | ||
16454 | ||
16455 | ||
16456 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16457 | for ac_config_target in $ac_config_targets | |
16458 | do | |
16459 | case "$ac_config_target" in | |
16460 | # Handling of arguments. | |
16461 | "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; | |
16462 | "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
16463 | "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; | |
16464 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 | |
16465 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | |
16466 | { (exit 1); exit 1; }; };; | |
861bb6c1 | 16467 | esac |
ba479fd2 NN |
16468 | done |
16469 | ||
16470 | # If the user did not use the arguments to specify the items to instantiate, | |
16471 | # then the envvar interface is used. Set only those that are not. | |
16472 | # We use the long form for the default assignment because of an extremely | |
16473 | # bizarre bug on SunOS 4.1.3. | |
16474 | if $ac_need_defaults; then | |
16475 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
16476 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
16477 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
16478 | fi | |
16479 | ||
16480 | # Have a temporary directory for convenience. Make it in the build tree | |
16481 | # simply because there is no reason to put it here, and in addition, | |
16482 | # creating and moving files from /tmp can sometimes cause problems. | |
16483 | # Create a temporary directory, and hook for its removal unless debugging. | |
16484 | $debug || | |
16485 | { | |
16486 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 | |
16487 | trap '{ (exit 1); exit 1; }' 1 2 13 15 | |
16488 | } | |
861bb6c1 | 16489 | |
ba479fd2 | 16490 | # Create a (secure) tmp directory for tmp files. |
6e3f3080 | 16491 | |
ba479fd2 NN |
16492 | { |
16493 | tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && | |
16494 | test -n "$tmp" && test -d "$tmp" | |
16495 | } || | |
16496 | { | |
16497 | tmp=./confstat$$-$RANDOM | |
16498 | (umask 077 && mkdir $tmp) | |
16499 | } || | |
16500 | { | |
16501 | echo "$me: cannot create a temporary directory in ." >&2 | |
16502 | { (exit 1); exit 1; } | |
16503 | } | |
16504 | ||
16505 | _ACEOF | |
16506 | ||
16507 | cat >>$CONFIG_STATUS <<_ACEOF | |
16508 | ||
16509 | # | |
16510 | # CONFIG_FILES section. | |
16511 | # | |
16512 | ||
16513 | # No need to generate the scripts if there are no CONFIG_FILES. | |
16514 | # This happens for instance when ./config.status config.h | |
16515 | if test -n "\$CONFIG_FILES"; then | |
16516 | # Protect against being on the right side of a sed subst in config.status. | |
16517 | sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; | |
16518 | s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF | |
16519 | s,@SHELL@,$SHELL,;t t | |
16520 | s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t | |
16521 | s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t | |
16522 | s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t | |
16523 | s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t | |
16524 | s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t | |
16525 | s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t | |
16526 | s,@exec_prefix@,$exec_prefix,;t t | |
16527 | s,@prefix@,$prefix,;t t | |
16528 | s,@program_transform_name@,$program_transform_name,;t t | |
16529 | s,@bindir@,$bindir,;t t | |
16530 | s,@sbindir@,$sbindir,;t t | |
16531 | s,@libexecdir@,$libexecdir,;t t | |
16532 | s,@datadir@,$datadir,;t t | |
16533 | s,@sysconfdir@,$sysconfdir,;t t | |
16534 | s,@sharedstatedir@,$sharedstatedir,;t t | |
16535 | s,@localstatedir@,$localstatedir,;t t | |
16536 | s,@libdir@,$libdir,;t t | |
16537 | s,@includedir@,$includedir,;t t | |
16538 | s,@oldincludedir@,$oldincludedir,;t t | |
16539 | s,@infodir@,$infodir,;t t | |
16540 | s,@mandir@,$mandir,;t t | |
16541 | s,@build_alias@,$build_alias,;t t | |
16542 | s,@host_alias@,$host_alias,;t t | |
16543 | s,@target_alias@,$target_alias,;t t | |
16544 | s,@DEFS@,$DEFS,;t t | |
16545 | s,@ECHO_C@,$ECHO_C,;t t | |
16546 | s,@ECHO_N@,$ECHO_N,;t t | |
16547 | s,@ECHO_T@,$ECHO_T,;t t | |
16548 | s,@LIBS@,$LIBS,;t t | |
16549 | s,@build@,$build,;t t | |
16550 | s,@build_cpu@,$build_cpu,;t t | |
16551 | s,@build_vendor@,$build_vendor,;t t | |
16552 | s,@build_os@,$build_os,;t t | |
16553 | s,@host@,$host,;t t | |
16554 | s,@host_cpu@,$host_cpu,;t t | |
16555 | s,@host_vendor@,$host_vendor,;t t | |
16556 | s,@host_os@,$host_os,;t t | |
16557 | s,@target@,$target,;t t | |
16558 | s,@target_cpu@,$target_cpu,;t t | |
16559 | s,@target_vendor@,$target_vendor,;t t | |
16560 | s,@target_os@,$target_os,;t t | |
8f1529e6 | 16561 | s,@target_noncanonical@,$target_noncanonical,;t t |
ba479fd2 NN |
16562 | s,@build_subdir@,$build_subdir,;t t |
16563 | s,@host_subdir@,$host_subdir,;t t | |
16564 | s,@target_subdir@,$target_subdir,;t t | |
03787dfd | 16565 | s,@GENINSRC@,$GENINSRC,;t t |
ba479fd2 NN |
16566 | s,@CC@,$CC,;t t |
16567 | s,@CFLAGS@,$CFLAGS,;t t | |
16568 | s,@LDFLAGS@,$LDFLAGS,;t t | |
16569 | s,@CPPFLAGS@,$CPPFLAGS,;t t | |
16570 | s,@ac_ct_CC@,$ac_ct_CC,;t t | |
16571 | s,@EXEEXT@,$EXEEXT,;t t | |
16572 | s,@OBJEXT@,$OBJEXT,;t t | |
16573 | s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t | |
16574 | s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t | |
16575 | s,@CPP@,$CPP,;t t | |
bf3b7cd3 | 16576 | s,@EGREP@,$EGREP,;t t |
ba479fd2 NN |
16577 | s,@strict1_warn@,$strict1_warn,;t t |
16578 | s,@warn_cflags@,$warn_cflags,;t t | |
16579 | s,@WERROR@,$WERROR,;t t | |
16580 | s,@nocommon_flag@,$nocommon_flag,;t t | |
13f05fd0 | 16581 | s,@TREEBROWSER@,$TREEBROWSER,;t t |
ba479fd2 NN |
16582 | s,@valgrind_path@,$valgrind_path,;t t |
16583 | s,@valgrind_path_defines@,$valgrind_path_defines,;t t | |
16584 | s,@valgrind_command@,$valgrind_command,;t t | |
16585 | s,@coverage_flags@,$coverage_flags,;t t | |
16586 | s,@enable_multilib@,$enable_multilib,;t t | |
16587 | s,@enable_shared@,$enable_shared,;t t | |
16588 | s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t | |
16589 | s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t | |
16590 | s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t | |
16591 | s,@onestep@,$onestep,;t t | |
16592 | s,@SET_MAKE@,$SET_MAKE,;t t | |
16593 | s,@AWK@,$AWK,;t t | |
ba479fd2 | 16594 | s,@LN_S@,$LN_S,;t t |
41e622a8 | 16595 | s,@LN@,$LN,;t t |
ba479fd2 NN |
16596 | s,@RANLIB@,$RANLIB,;t t |
16597 | s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | |
343a6100 | 16598 | s,@ranlib_flags@,$ranlib_flags,;t t |
ba479fd2 NN |
16599 | s,@INSTALL@,$INSTALL,;t t |
16600 | s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t | |
16601 | s,@INSTALL_DATA@,$INSTALL_DATA,;t t | |
16602 | s,@make_compare_target@,$make_compare_target,;t t | |
16603 | s,@have_mktemp_command@,$have_mktemp_command,;t t | |
16604 | s,@MAKEINFO@,$MAKEINFO,;t t | |
16605 | s,@BUILD_INFO@,$BUILD_INFO,;t t | |
16606 | s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t | |
16607 | s,@FLEX@,$FLEX,;t t | |
16608 | s,@BISON@,$BISON,;t t | |
f6a874ac JW |
16609 | s,@NM@,$NM,;t t |
16610 | s,@AR@,$AR,;t t | |
ba479fd2 NN |
16611 | s,@stage1_cflags@,$stage1_cflags,;t t |
16612 | s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t | |
16613 | s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t | |
16614 | s,@LDEXP_LIB@,$LDEXP_LIB,;t t | |
16615 | s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t | |
16616 | s,@LIBICONV@,$LIBICONV,;t t | |
dfb77e37 | 16617 | s,@LTLIBICONV@,$LTLIBICONV,;t t |
ba479fd2 NN |
16618 | s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t |
16619 | s,@manext@,$manext,;t t | |
16620 | s,@objext@,$objext,;t t | |
8bb915b6 | 16621 | s,@gthread_flags@,$gthread_flags,;t t |
ba479fd2 | 16622 | s,@extra_modes_file@,$extra_modes_file,;t t |
75685792 | 16623 | s,@extra_opt_files@,$extra_opt_files,;t t |
ba479fd2 NN |
16624 | s,@USE_NLS@,$USE_NLS,;t t |
16625 | s,@LIBINTL@,$LIBINTL,;t t | |
16626 | s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t | |
16627 | s,@INCINTL@,$INCINTL,;t t | |
16628 | s,@XGETTEXT@,$XGETTEXT,;t t | |
16629 | s,@GMSGFMT@,$GMSGFMT,;t t | |
16630 | s,@POSUB@,$POSUB,;t t | |
16631 | s,@CATALOGS@,$CATALOGS,;t t | |
5395b47b | 16632 | s,@host_cc_for_libada@,$host_cc_for_libada,;t t |
ba479fd2 NN |
16633 | s,@CROSS@,$CROSS,;t t |
16634 | s,@ALL@,$ALL,;t t | |
16635 | s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t | |
16636 | s,@inhibit_libc@,$inhibit_libc,;t t | |
ba479fd2 NN |
16637 | s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t |
16638 | s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t | |
16639 | s,@STMP_FIXINC@,$STMP_FIXINC,;t t | |
16640 | s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t | |
c38f02df | 16641 | s,@collect2@,$collect2,;t t |
9f18db39 PB |
16642 | s,@gcc_cv_as@,$gcc_cv_as,;t t |
16643 | s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t | |
16644 | s,@gcc_cv_ld@,$gcc_cv_ld,;t t | |
16645 | s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t | |
16646 | s,@gcc_cv_nm@,$gcc_cv_nm,;t t | |
16647 | s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t | |
ba479fd2 | 16648 | s,@libgcc_visibility@,$libgcc_visibility,;t t |
ba479fd2 NN |
16649 | s,@GGC@,$GGC,;t t |
16650 | s,@zlibdir@,$zlibdir,;t t | |
16651 | s,@zlibinc@,$zlibinc,;t t | |
16652 | s,@MAINT@,$MAINT,;t t | |
16653 | s,@gcc_tooldir@,$gcc_tooldir,;t t | |
16654 | s,@dollar@,$dollar,;t t | |
16655 | s,@slibdir@,$slibdir,;t t | |
16656 | s,@objdir@,$objdir,;t t | |
16657 | s,@subdirs@,$subdirs,;t t | |
16658 | s,@srcdir@,$srcdir,;t t | |
ba479fd2 NN |
16659 | s,@all_boot_languages@,$all_boot_languages,;t t |
16660 | s,@all_compilers@,$all_compilers,;t t | |
16661 | s,@all_gtfiles@,$all_gtfiles,;t t | |
16662 | s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t | |
16663 | s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t | |
16664 | s,@all_lang_makefrags@,$all_lang_makefrags,;t t | |
16665 | s,@all_lang_makefiles@,$all_lang_makefiles,;t t | |
16666 | s,@all_languages@,$all_languages,;t t | |
16667 | s,@all_stagestuff@,$all_stagestuff,;t t | |
16668 | s,@build_exeext@,$build_exeext,;t t | |
16669 | s,@build_install_headers_dir@,$build_install_headers_dir,;t t | |
16670 | s,@build_xm_file_list@,$build_xm_file_list,;t t | |
16671 | s,@build_xm_include_list@,$build_xm_include_list,;t t | |
16672 | s,@build_xm_defines@,$build_xm_defines,;t t | |
16673 | s,@check_languages@,$check_languages,;t t | |
16674 | s,@cc_set_by_configure@,$cc_set_by_configure,;t t | |
16675 | s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t | |
16676 | s,@cpp_install_dir@,$cpp_install_dir,;t t | |
16677 | s,@xmake_file@,$xmake_file,;t t | |
16678 | s,@tmake_file@,$tmake_file,;t t | |
30500d84 | 16679 | s,@extra_gcc_objs@,$extra_gcc_objs,;t t |
ba479fd2 NN |
16680 | s,@extra_headers_list@,$extra_headers_list,;t t |
16681 | s,@extra_objs@,$extra_objs,;t t | |
16682 | s,@extra_parts@,$extra_parts,;t t | |
16683 | s,@extra_passes@,$extra_passes,;t t | |
16684 | s,@extra_programs@,$extra_programs,;t t | |
16685 | s,@float_h_file@,$float_h_file,;t t | |
16686 | s,@gcc_config_arguments@,$gcc_config_arguments,;t t | |
16687 | s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t | |
16688 | s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t | |
ba479fd2 | 16689 | s,@host_exeext@,$host_exeext,;t t |
ba479fd2 NN |
16690 | s,@host_xm_file_list@,$host_xm_file_list,;t t |
16691 | s,@host_xm_include_list@,$host_xm_include_list,;t t | |
16692 | s,@host_xm_defines@,$host_xm_defines,;t t | |
16693 | s,@out_host_hook_obj@,$out_host_hook_obj,;t t | |
16694 | s,@install@,$install,;t t | |
16695 | s,@lang_opt_files@,$lang_opt_files,;t t | |
16696 | s,@lang_specs_files@,$lang_specs_files,;t t | |
16697 | s,@lang_tree_files@,$lang_tree_files,;t t | |
16698 | s,@local_prefix@,$local_prefix,;t t | |
16699 | s,@md_file@,$md_file,;t t | |
16700 | s,@objc_boehm_gc@,$objc_boehm_gc,;t t | |
16701 | s,@out_file@,$out_file,;t t | |
16702 | s,@out_object_file@,$out_object_file,;t t | |
16703 | s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t | |
16704 | s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t | |
ba479fd2 NN |
16705 | s,@thread_file@,$thread_file,;t t |
16706 | s,@tm_file_list@,$tm_file_list,;t t | |
16707 | s,@tm_include_list@,$tm_include_list,;t t | |
16708 | s,@tm_defines@,$tm_defines,;t t | |
16709 | s,@tm_p_file_list@,$tm_p_file_list,;t t | |
16710 | s,@tm_p_include_list@,$tm_p_include_list,;t t | |
16711 | s,@xm_file_list@,$xm_file_list,;t t | |
16712 | s,@xm_include_list@,$xm_include_list,;t t | |
16713 | s,@xm_defines@,$xm_defines,;t t | |
ba479fd2 NN |
16714 | s,@c_target_objs@,$c_target_objs,;t t |
16715 | s,@cxx_target_objs@,$cxx_target_objs,;t t | |
16716 | s,@target_cpu_default@,$target_cpu_default,;t t | |
6de9cd9a DN |
16717 | s,@GMPLIBS@,$GMPLIBS,;t t |
16718 | s,@GMPINC@,$GMPINC,;t t | |
ba479fd2 NN |
16719 | s,@LIBOBJS@,$LIBOBJS,;t t |
16720 | s,@LTLIBOBJS@,$LTLIBOBJS,;t t | |
16721 | /@language_hooks@/r $language_hooks | |
16722 | s,@language_hooks@,,;t t | |
16723 | CEOF | |
16724 | ||
16725 | _ACEOF | |
16726 | ||
16727 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16728 | # Split the substitutions into bite-sized pieces for seds with | |
16729 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
16730 | ac_max_sed_lines=48 | |
16731 | ac_sed_frag=1 # Number of current file. | |
16732 | ac_beg=1 # First line for current file. | |
16733 | ac_end=$ac_max_sed_lines # Line after last line for current file. | |
16734 | ac_more_lines=: | |
16735 | ac_sed_cmds= | |
16736 | while $ac_more_lines; do | |
16737 | if test $ac_beg -gt 1; then | |
16738 | sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
16739 | else | |
16740 | sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
16741 | fi | |
16742 | if test ! -s $tmp/subs.frag; then | |
16743 | ac_more_lines=false | |
16744 | else | |
16745 | # The purpose of the label and of the branching condition is to | |
16746 | # speed up the sed processing (if there are no `@' at all, there | |
16747 | # is no need to browse any of the substitutions). | |
16748 | # These are the two extra sed commands mentioned above. | |
16749 | (echo ':t | |
16750 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed | |
16751 | if test -z "$ac_sed_cmds"; then | |
86da66b5 | 16752 | ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 | 16753 | else |
86da66b5 | 16754 | ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 NN |
16755 | fi |
16756 | ac_sed_frag=`expr $ac_sed_frag + 1` | |
16757 | ac_beg=$ac_end | |
16758 | ac_end=`expr $ac_end + $ac_max_sed_lines` | |
16759 | fi | |
16760 | done | |
16761 | if test -z "$ac_sed_cmds"; then | |
16762 | ac_sed_cmds=cat | |
63cf211a | 16763 | fi |
ba479fd2 | 16764 | fi # test -n "$CONFIG_FILES" |
cafe096b | 16765 | |
ba479fd2 NN |
16766 | _ACEOF |
16767 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16768 | for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue | |
16769 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
16770 | case $ac_file in | |
16771 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
16772 | cat >$tmp/stdin |
16773 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
16774 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 16775 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 16776 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 16777 | * ) ac_file_in=$ac_file.in ;; |
63cf211a | 16778 | esac |
cafe096b | 16779 | |
ba479fd2 NN |
16780 | # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. |
16781 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
16782 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
16783 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
16784 | X"$ac_file" : 'X\(//\)$' \| \ | |
16785 | X"$ac_file" : 'X\(/\)' \| \ | |
16786 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
16787 | echo X"$ac_file" | |
16788 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
16789 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
16790 | /^X\(\/\/\)$/{ s//\1/; q; } | |
16791 | /^X\(\/\).*/{ s//\1/; q; } | |
16792 | s/.*/./; q'` | |
16793 | { if $as_mkdir_p; then | |
16794 | mkdir -p "$ac_dir" | |
16795 | else | |
16796 | as_dir="$ac_dir" | |
16797 | as_dirs= | |
16798 | while test ! -d "$as_dir"; do | |
16799 | as_dirs="$as_dir $as_dirs" | |
16800 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
16801 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
16802 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
16803 | X"$as_dir" : 'X\(//\)$' \| \ | |
16804 | X"$as_dir" : 'X\(/\)' \| \ | |
16805 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
16806 | echo X"$as_dir" | |
16807 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
16808 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
16809 | /^X\(\/\/\)$/{ s//\1/; q; } | |
16810 | /^X\(\/\).*/{ s//\1/; q; } | |
16811 | s/.*/./; q'` | |
16812 | done | |
16813 | test ! -n "$as_dirs" || mkdir $as_dirs | |
16814 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
16815 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
16816 | { (exit 1); exit 1; }; }; } | |
6e3f3080 | 16817 | |
ba479fd2 NN |
16818 | ac_builddir=. |
16819 | ||
16820 | if test "$ac_dir" != .; then | |
16821 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
16822 | # A "../" for each directory in $ac_dir_suffix. | |
16823 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
16824 | else | |
16825 | ac_dir_suffix= ac_top_builddir= | |
16826 | fi | |
16827 | ||
16828 | case $srcdir in | |
16829 | .) # No --srcdir option. We are building in place. | |
16830 | ac_srcdir=. | |
16831 | if test -z "$ac_top_builddir"; then | |
16832 | ac_top_srcdir=. | |
16833 | else | |
16834 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
16835 | fi ;; | |
16836 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
16837 | ac_srcdir=$srcdir$ac_dir_suffix; | |
16838 | ac_top_srcdir=$srcdir ;; | |
16839 | *) # Relative path. | |
16840 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
16841 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
16842 | esac | |
8ab705be KC |
16843 | |
16844 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
16845 | # the directories may not exist. | |
16846 | case `pwd` in | |
16847 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 16848 | *) |
8ab705be KC |
16849 | case "$ac_dir" in |
16850 | .) ac_abs_builddir=`pwd`;; | |
16851 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
16852 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
16853 | esac;; |
16854 | esac | |
8ab705be | 16855 | case $ac_abs_builddir in |
86da66b5 HPN |
16856 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
16857 | *) | |
16858 | case ${ac_top_builddir}. in | |
8ab705be | 16859 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 16860 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 16861 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
16862 | esac;; |
16863 | esac | |
8ab705be | 16864 | case $ac_abs_builddir in |
86da66b5 HPN |
16865 | .) ac_abs_srcdir=$ac_srcdir;; |
16866 | *) | |
16867 | case $ac_srcdir in | |
8ab705be | 16868 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 16869 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 16870 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
16871 | esac;; |
16872 | esac | |
8ab705be | 16873 | case $ac_abs_builddir in |
86da66b5 HPN |
16874 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
16875 | *) | |
16876 | case $ac_top_srcdir in | |
8ab705be | 16877 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 16878 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 16879 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
16880 | esac;; |
16881 | esac | |
ba479fd2 NN |
16882 | |
16883 | ||
16884 | ||
d7974fe6 KC |
16885 | if test x"$ac_file" != x-; then |
16886 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
16887 | echo "$as_me: creating $ac_file" >&6;} | |
16888 | rm -f "$ac_file" | |
16889 | fi | |
ba479fd2 NN |
16890 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
16891 | # use $as_me), people would be surprised to read: | |
16892 | # /* config.h. Generated by config.status. */ | |
16893 | if test x"$ac_file" = x-; then | |
16894 | configure_input= | |
16895 | else | |
16896 | configure_input="$ac_file. " | |
16897 | fi | |
16898 | configure_input=$configure_input"Generated from `echo $ac_file_in | | |
86da66b5 | 16899 | sed 's,.*/,,'` by configure." |
ba479fd2 NN |
16900 | |
16901 | # First look for the input files in the build tree, otherwise in the | |
16902 | # src tree. | |
16903 | ac_file_inputs=`IFS=: | |
16904 | for f in $ac_file_in; do | |
16905 | case $f in | |
16906 | -) echo $tmp/stdin ;; | |
16907 | [\\/$]*) | |
86da66b5 HPN |
16908 | # Absolute (can't be DOS-style, as IFS=:) |
16909 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
16910 | echo "$as_me: error: cannot find input file: $f" >&2;} |
16911 | { (exit 1); exit 1; }; } | |
86da66b5 | 16912 | echo "$f";; |
ba479fd2 | 16913 | *) # Relative |
86da66b5 HPN |
16914 | if test -f "$f"; then |
16915 | # Build tree | |
16916 | echo "$f" | |
16917 | elif test -f "$srcdir/$f"; then | |
16918 | # Source tree | |
16919 | echo "$srcdir/$f" | |
16920 | else | |
16921 | # /dev/null tree | |
16922 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
16923 | echo "$as_me: error: cannot find input file: $f" >&2;} |
16924 | { (exit 1); exit 1; }; } | |
86da66b5 | 16925 | fi;; |
ba479fd2 NN |
16926 | esac |
16927 | done` || { (exit 1); exit 1; } | |
16928 | _ACEOF | |
16929 | cat >>$CONFIG_STATUS <<_ACEOF | |
16930 | sed "$ac_vpsub | |
16931 | $extrasub | |
16932 | _ACEOF | |
16933 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16934 | :t | |
16935 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
16936 | s,@configure_input@,$configure_input,;t t | |
16937 | s,@srcdir@,$ac_srcdir,;t t | |
16938 | s,@abs_srcdir@,$ac_abs_srcdir,;t t | |
16939 | s,@top_srcdir@,$ac_top_srcdir,;t t | |
16940 | s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t | |
16941 | s,@builddir@,$ac_builddir,;t t | |
16942 | s,@abs_builddir@,$ac_abs_builddir,;t t | |
16943 | s,@top_builddir@,$ac_top_builddir,;t t | |
16944 | s,@abs_top_builddir@,$ac_abs_top_builddir,;t t | |
16945 | " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out | |
16946 | rm -f $tmp/stdin | |
16947 | if test x"$ac_file" != x-; then | |
16948 | mv $tmp/out $ac_file | |
16949 | else | |
16950 | cat $tmp/out | |
16951 | rm -f $tmp/out | |
16952 | fi | |
16953 | ||
16954 | done | |
16955 | _ACEOF | |
16956 | cat >>$CONFIG_STATUS <<\_ACEOF | |
6e3f3080 | 16957 | |
ba479fd2 NN |
16958 | # |
16959 | # CONFIG_HEADER section. | |
16960 | # | |
861bb6c1 JL |
16961 | |
16962 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
16963 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
16964 | # | |
16965 | # ac_d sets the value in "#define NAME VALUE" lines. | |
86da66b5 HPN |
16966 | ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
16967 | ac_dB='[ ].*$,\1#\2' | |
ba479fd2 NN |
16968 | ac_dC=' ' |
16969 | ac_dD=',;t' | |
16970 | # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
86da66b5 | 16971 | ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
ba479fd2 | 16972 | ac_uB='$,\1#\2define\3' |
861bb6c1 | 16973 | ac_uC=' ' |
ba479fd2 NN |
16974 | ac_uD=',;t' |
16975 | ||
16976 | for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue | |
861bb6c1 | 16977 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
ba479fd2 NN |
16978 | case $ac_file in |
16979 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
16980 | cat >$tmp/stdin |
16981 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
16982 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 16983 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 16984 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 16985 | * ) ac_file_in=$ac_file.in ;; |
861bb6c1 JL |
16986 | esac |
16987 | ||
ba479fd2 NN |
16988 | test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 |
16989 | echo "$as_me: creating $ac_file" >&6;} | |
16990 | ||
16991 | # First look for the input files in the build tree, otherwise in the | |
16992 | # src tree. | |
16993 | ac_file_inputs=`IFS=: | |
16994 | for f in $ac_file_in; do | |
16995 | case $f in | |
16996 | -) echo $tmp/stdin ;; | |
16997 | [\\/$]*) | |
86da66b5 HPN |
16998 | # Absolute (can't be DOS-style, as IFS=:) |
16999 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17000 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17001 | { (exit 1); exit 1; }; } | |
86da66b5 HPN |
17002 | # Do quote $f, to prevent DOS paths from being IFS'd. |
17003 | echo "$f";; | |
ba479fd2 | 17004 | *) # Relative |
86da66b5 HPN |
17005 | if test -f "$f"; then |
17006 | # Build tree | |
17007 | echo "$f" | |
17008 | elif test -f "$srcdir/$f"; then | |
17009 | # Source tree | |
17010 | echo "$srcdir/$f" | |
17011 | else | |
17012 | # /dev/null tree | |
17013 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17014 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17015 | { (exit 1); exit 1; }; } | |
86da66b5 | 17016 | fi;; |
ba479fd2 NN |
17017 | esac |
17018 | done` || { (exit 1); exit 1; } | |
17019 | # Remove the trailing spaces. | |
86da66b5 | 17020 | sed 's/[ ]*$//' $ac_file_inputs >$tmp/in |
ba479fd2 NN |
17021 | |
17022 | _ACEOF | |
17023 | ||
17024 | # Transform confdefs.h into two sed scripts, `conftest.defines' and | |
17025 | # `conftest.undefs', that substitutes the proper values into | |
17026 | # config.h.in to produce config.h. The first handles `#define' | |
17027 | # templates, and the second `#undef' templates. | |
17028 | # And first: Protect against being on the right side of a sed subst in | |
17029 | # config.status. Protect against being in an unquoted here document | |
17030 | # in config.status. | |
17031 | rm -f conftest.defines conftest.undefs | |
17032 | # Using a here document instead of a string reduces the quoting nightmare. | |
17033 | # Putting comments in sed scripts is not portable. | |
17034 | # | |
17035 | # `end' is used to avoid that the second main sed command (meant for | |
17036 | # 0-ary CPP macros) applies to n-ary macro definitions. | |
17037 | # See the Autoconf documentation for `clear'. | |
17038 | cat >confdef2sed.sed <<\_ACEOF | |
17039 | s/[\\&,]/\\&/g | |
17040 | s,[\\$`],\\&,g | |
17041 | t clear | |
17042 | : clear | |
86da66b5 | 17043 | s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp |
ba479fd2 | 17044 | t end |
86da66b5 | 17045 | s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp |
ba479fd2 NN |
17046 | : end |
17047 | _ACEOF | |
17048 | # If some macros were called several times there might be several times | |
17049 | # the same #defines, which is useless. Nevertheless, we may not want to | |
17050 | # sort them, since we want the *last* AC-DEFINE to be honored. | |
17051 | uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines | |
17052 | sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs | |
17053 | rm -f confdef2sed.sed | |
861bb6c1 JL |
17054 | |
17055 | # This sed command replaces #undef with comments. This is necessary, for | |
17056 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
17057 | # on some systems where configure will not decide to define it. | |
ba479fd2 | 17058 | cat >>conftest.undefs <<\_ACEOF |
86da66b5 | 17059 | s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, |
ba479fd2 NN |
17060 | _ACEOF |
17061 | ||
17062 | # Break up conftest.defines because some shells have a limit on the size | |
17063 | # of here documents, and old seds have small limits too (100 cmds). | |
17064 | echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS | |
86da66b5 | 17065 | echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS |
ba479fd2 NN |
17066 | echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS |
17067 | echo ' :' >>$CONFIG_STATUS | |
17068 | rm -f conftest.tail | |
17069 | while grep . conftest.defines >/dev/null | |
17070 | do | |
17071 | # Write a limited-size here document to $tmp/defines.sed. | |
17072 | echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS | |
17073 | # Speed up: don't consider the non `#define' lines. | |
86da66b5 | 17074 | echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
17075 | # Work around the forget-to-reset-the-flag bug. |
17076 | echo 't clr' >>$CONFIG_STATUS | |
17077 | echo ': clr' >>$CONFIG_STATUS | |
17078 | sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS | |
17079 | echo 'CEOF | |
17080 | sed -f $tmp/defines.sed $tmp/in >$tmp/out | |
17081 | rm -f $tmp/in | |
17082 | mv $tmp/out $tmp/in | |
17083 | ' >>$CONFIG_STATUS | |
17084 | sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail | |
17085 | rm -f conftest.defines | |
17086 | mv conftest.tail conftest.defines | |
17087 | done | |
17088 | rm -f conftest.defines | |
17089 | echo ' fi # grep' >>$CONFIG_STATUS | |
17090 | echo >>$CONFIG_STATUS | |
861bb6c1 | 17091 | |
ba479fd2 NN |
17092 | # Break up conftest.undefs because some shells have a limit on the size |
17093 | # of here documents, and old seds have small limits too (100 cmds). | |
17094 | echo ' # Handle all the #undef templates' >>$CONFIG_STATUS | |
861bb6c1 | 17095 | rm -f conftest.tail |
ba479fd2 | 17096 | while grep . conftest.undefs >/dev/null |
861bb6c1 | 17097 | do |
ba479fd2 NN |
17098 | # Write a limited-size here document to $tmp/undefs.sed. |
17099 | echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS | |
17100 | # Speed up: don't consider the non `#undef' | |
86da66b5 | 17101 | echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
17102 | # Work around the forget-to-reset-the-flag bug. |
17103 | echo 't clr' >>$CONFIG_STATUS | |
17104 | echo ': clr' >>$CONFIG_STATUS | |
17105 | sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS | |
861bb6c1 | 17106 | echo 'CEOF |
ba479fd2 NN |
17107 | sed -f $tmp/undefs.sed $tmp/in >$tmp/out |
17108 | rm -f $tmp/in | |
17109 | mv $tmp/out $tmp/in | |
17110 | ' >>$CONFIG_STATUS | |
17111 | sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail | |
17112 | rm -f conftest.undefs | |
17113 | mv conftest.tail conftest.undefs | |
861bb6c1 | 17114 | done |
ba479fd2 NN |
17115 | rm -f conftest.undefs |
17116 | ||
17117 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17118 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
17119 | # use $as_me), people would be surprised to read: | |
17120 | # /* config.h. Generated by config.status. */ | |
17121 | if test x"$ac_file" = x-; then | |
17122 | echo "/* Generated by configure. */" >$tmp/config.h | |
6e3f3080 | 17123 | else |
ba479fd2 | 17124 | echo "/* $ac_file. Generated by configure. */" >$tmp/config.h |
cafe096b | 17125 | fi |
ba479fd2 NN |
17126 | cat $tmp/in >>$tmp/config.h |
17127 | rm -f $tmp/in | |
17128 | if test x"$ac_file" != x-; then | |
17129 | if diff $ac_file $tmp/config.h >/dev/null 2>&1; then | |
17130 | { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 | |
17131 | echo "$as_me: $ac_file is unchanged" >&6;} | |
17132 | else | |
17133 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
17134 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17135 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
17136 | X"$ac_file" : 'X\(//\)$' \| \ | |
17137 | X"$ac_file" : 'X\(/\)' \| \ | |
17138 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17139 | echo X"$ac_file" | |
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 | { if $as_mkdir_p; then | |
17146 | mkdir -p "$ac_dir" | |
17147 | else | |
17148 | as_dir="$ac_dir" | |
17149 | as_dirs= | |
17150 | while test ! -d "$as_dir"; do | |
17151 | as_dirs="$as_dir $as_dirs" | |
17152 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
17153 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17154 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
17155 | X"$as_dir" : 'X\(//\)$' \| \ | |
17156 | X"$as_dir" : 'X\(/\)' \| \ | |
17157 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17158 | echo X"$as_dir" | |
17159 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17160 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17161 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17162 | /^X\(\/\).*/{ s//\1/; q; } | |
17163 | s/.*/./; q'` | |
17164 | done | |
17165 | test ! -n "$as_dirs" || mkdir $as_dirs | |
17166 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
17167 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
17168 | { (exit 1); exit 1; }; }; } | |
63cf211a | 17169 | |
ba479fd2 NN |
17170 | rm -f $ac_file |
17171 | mv $tmp/config.h $ac_file | |
17172 | fi | |
17173 | else | |
17174 | cat $tmp/config.h | |
17175 | rm -f $tmp/config.h | |
17176 | fi | |
17177 | done | |
17178 | _ACEOF | |
17179 | cat >>$CONFIG_STATUS <<\_ACEOF | |
861bb6c1 | 17180 | |
ba479fd2 NN |
17181 | # |
17182 | # CONFIG_COMMANDS section. | |
17183 | # | |
17184 | for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue | |
17185 | ac_dest=`echo "$ac_file" | sed 's,:.*,,'` | |
17186 | ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
17187 | ac_dir=`(dirname "$ac_dest") 2>/dev/null || | |
17188 | $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17189 | X"$ac_dest" : 'X\(//\)[^/]' \| \ |
17190 | X"$ac_dest" : 'X\(//\)$' \| \ | |
17191 | X"$ac_dest" : 'X\(/\)' \| \ | |
17192 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17193 | echo X"$ac_dest" | |
17194 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17195 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17196 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17197 | /^X\(\/\).*/{ s//\1/; q; } | |
17198 | s/.*/./; q'` | |
86da66b5 HPN |
17199 | { if $as_mkdir_p; then |
17200 | mkdir -p "$ac_dir" | |
17201 | else | |
17202 | as_dir="$ac_dir" | |
17203 | as_dirs= | |
17204 | while test ! -d "$as_dir"; do | |
17205 | as_dirs="$as_dir $as_dirs" | |
17206 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
17207 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
17208 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
17209 | X"$as_dir" : 'X\(//\)$' \| \ | |
17210 | X"$as_dir" : 'X\(/\)' \| \ | |
17211 | . : '\(.\)' 2>/dev/null || | |
17212 | echo X"$as_dir" | | |
17213 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17214 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17215 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17216 | /^X\(\/\).*/{ s//\1/; q; } | |
17217 | s/.*/./; q'` | |
17218 | done | |
17219 | test ! -n "$as_dirs" || mkdir $as_dirs | |
17220 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
17221 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
17222 | { (exit 1); exit 1; }; }; } | |
17223 | ||
ba479fd2 NN |
17224 | ac_builddir=. |
17225 | ||
17226 | if test "$ac_dir" != .; then | |
17227 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
17228 | # A "../" for each directory in $ac_dir_suffix. | |
17229 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
17230 | else | |
17231 | ac_dir_suffix= ac_top_builddir= | |
17232 | fi | |
17233 | ||
17234 | case $srcdir in | |
17235 | .) # No --srcdir option. We are building in place. | |
17236 | ac_srcdir=. | |
17237 | if test -z "$ac_top_builddir"; then | |
17238 | ac_top_srcdir=. | |
17239 | else | |
17240 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
17241 | fi ;; | |
17242 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
17243 | ac_srcdir=$srcdir$ac_dir_suffix; | |
17244 | ac_top_srcdir=$srcdir ;; | |
17245 | *) # Relative path. | |
17246 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
17247 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
17248 | esac | |
8ab705be KC |
17249 | |
17250 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
17251 | # the directories may not exist. | |
17252 | case `pwd` in | |
17253 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 17254 | *) |
8ab705be KC |
17255 | case "$ac_dir" in |
17256 | .) ac_abs_builddir=`pwd`;; | |
17257 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
17258 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
17259 | esac;; |
17260 | esac | |
8ab705be | 17261 | case $ac_abs_builddir in |
86da66b5 HPN |
17262 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
17263 | *) | |
17264 | case ${ac_top_builddir}. in | |
8ab705be | 17265 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 17266 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 17267 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
17268 | esac;; |
17269 | esac | |
8ab705be | 17270 | case $ac_abs_builddir in |
86da66b5 HPN |
17271 | .) ac_abs_srcdir=$ac_srcdir;; |
17272 | *) | |
17273 | case $ac_srcdir in | |
8ab705be | 17274 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 17275 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 17276 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
17277 | esac;; |
17278 | esac | |
8ab705be | 17279 | case $ac_abs_builddir in |
86da66b5 HPN |
17280 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
17281 | *) | |
17282 | case $ac_top_srcdir in | |
8ab705be | 17283 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 17284 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 17285 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
17286 | esac;; |
17287 | esac | |
ba479fd2 NN |
17288 | |
17289 | ||
17290 | { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 | |
17291 | echo "$as_me: executing $ac_dest commands" >&6;} | |
17292 | case $ac_dest in | |
17293 | default ) | |
f1faaabd NN |
17294 | case ${CONFIG_HEADERS} in |
17295 | *auto-host.h:config.in*) | |
17296 | echo > cstamp-h ;; | |
861bb6c1 | 17297 | esac |
2ed26f6b | 17298 | # Make sure all the subdirs exist. |
3b620440 | 17299 | for d in $subdirs doc build |
2ed26f6b | 17300 | do |
2ed26f6b | 17301 | test -d $d || mkdir $d |
2ed26f6b | 17302 | done |
93cf819d BK |
17303 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
17304 | # bootstrapping and the installation procedure can still use | |
17305 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
17306 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
17307 | # This is virtually a duplicate of what happens in configure.lang; we do | |
17308 | # an extra check to make sure this only happens if ln -s can be used. | |
35f06ae4 PB |
17309 | case "$LN_S" in |
17310 | *-s*) | |
17311 | for d in ${subdirs} ; do | |
1e6347d8 | 17312 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e | 17313 | cd $d |
6a1b7268 | 17314 | for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include |
4e8a434e BK |
17315 | do |
17316 | rm -f $t | |
35f06ae4 | 17317 | $LN_S ../$t $t 2>/dev/null |
4e8a434e BK |
17318 | done |
17319 | cd $STARTDIR | |
35f06ae4 PB |
17320 | done |
17321 | ;; | |
17322 | esac | |
ba479fd2 NN |
17323 | ;; |
17324 | esac | |
17325 | done | |
17326 | _ACEOF | |
cafe096b | 17327 | |
ba479fd2 NN |
17328 | cat >>$CONFIG_STATUS <<\_ACEOF |
17329 | ||
17330 | { (exit 0); exit 0; } | |
17331 | _ACEOF | |
861bb6c1 | 17332 | chmod +x $CONFIG_STATUS |
ba479fd2 NN |
17333 | ac_clean_files=$ac_clean_files_save |
17334 | ||
17335 | ||
17336 | # configure is writing to config.log, and then calls config.status. | |
17337 | # config.status does its own redirection, appending to config.log. | |
17338 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
17339 | # by configure, so config.status won't be able to write to it; its | |
17340 | # output is simply discarded. So we exec the FD to /dev/null, | |
17341 | # effectively closing config.log, so it can be properly (re)opened and | |
17342 | # appended to by config.status. When coming back to configure, we | |
17343 | # need to make the FD available again. | |
17344 | if test "$no_create" != yes; then | |
17345 | ac_cs_success=: | |
17346 | ac_config_status_args= | |
17347 | test "$silent" = yes && | |
17348 | ac_config_status_args="$ac_config_status_args --quiet" | |
17349 | exec 5>/dev/null | |
17350 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
17351 | exec 5>>config.log | |
17352 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
17353 | # would make configure fail if this is the last instruction. | |
17354 | $ac_cs_success || { (exit 1); exit 1; } | |
17355 | fi | |
861bb6c1 | 17356 |