]>
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 | ||
643d3bd2 NN |
6167 | # Add -Wold-style-definition if it's accepted |
6168 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5 | |
6169 | echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6 | |
6170 | if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then | |
6171 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6172 | else | |
6173 | save_CFLAGS="$CFLAGS" | |
6174 | CFLAGS="-Wold-style-definition" | |
6175 | cat >conftest.$ac_ext <<_ACEOF | |
6176 | /* confdefs.h. */ | |
6177 | _ACEOF | |
6178 | cat confdefs.h >>conftest.$ac_ext | |
6179 | cat >>conftest.$ac_ext <<_ACEOF | |
6180 | /* end confdefs.h. */ | |
6181 | ||
6182 | _ACEOF | |
6183 | rm -f conftest.$ac_objext | |
6184 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6185 | (eval $ac_compile) 2>conftest.er1 | |
6186 | ac_status=$? | |
6187 | grep -v '^ *+' conftest.er1 >conftest.err | |
6188 | rm -f conftest.er1 | |
6189 | cat conftest.err >&5 | |
6190 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6191 | (exit $ac_status); } && | |
d7974fe6 KC |
6192 | { ac_try='test -z "$ac_c_werror_flag" |
6193 | || test ! -s conftest.err' | |
643d3bd2 NN |
6194 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6195 | (eval $ac_try) 2>&5 | |
6196 | ac_status=$? | |
6197 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6198 | (exit $ac_status); }; } && | |
6199 | { ac_try='test -s conftest.$ac_objext' | |
6200 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6201 | (eval $ac_try) 2>&5 | |
6202 | ac_status=$? | |
6203 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6204 | (exit $ac_status); }; }; then | |
6205 | ac_cv_prog_cc_w_old_style_definition=yes | |
6206 | else | |
6207 | echo "$as_me: failed program was:" >&5 | |
6208 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6209 | ||
6210 | ac_cv_prog_cc_w_old_style_definition=no | |
6211 | fi | |
6212 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6213 | CFLAGS="$save_CFLAGS" | |
6214 | ||
6215 | fi | |
6216 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5 | |
6217 | echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6 | |
6218 | if test $ac_cv_prog_cc_w_old_style_definition = yes ; then | |
6219 | strict1_warn="${strict1_warn} -Wold-style-definition" | |
6220 | fi | |
6221 | ||
ac0f3f39 KG |
6222 | # Add -Wmissing-format-attribute if it's accepted |
6223 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5 | |
6224 | echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6 | |
6225 | if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then | |
6226 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6227 | else | |
6228 | save_CFLAGS="$CFLAGS" | |
6229 | CFLAGS="-Wmissing-format-attribute" | |
6230 | cat >conftest.$ac_ext <<_ACEOF | |
6231 | /* confdefs.h. */ | |
6232 | _ACEOF | |
6233 | cat confdefs.h >>conftest.$ac_ext | |
6234 | cat >>conftest.$ac_ext <<_ACEOF | |
6235 | /* end confdefs.h. */ | |
6236 | ||
6237 | _ACEOF | |
6238 | rm -f conftest.$ac_objext | |
6239 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6240 | (eval $ac_compile) 2>conftest.er1 | |
6241 | ac_status=$? | |
6242 | grep -v '^ *+' conftest.er1 >conftest.err | |
6243 | rm -f conftest.er1 | |
6244 | cat conftest.err >&5 | |
6245 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6246 | (exit $ac_status); } && | |
6247 | { ac_try='test -z "$ac_c_werror_flag" | |
6248 | || test ! -s conftest.err' | |
6249 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6250 | (eval $ac_try) 2>&5 | |
6251 | ac_status=$? | |
6252 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6253 | (exit $ac_status); }; } && | |
6254 | { ac_try='test -s conftest.$ac_objext' | |
6255 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6256 | (eval $ac_try) 2>&5 | |
6257 | ac_status=$? | |
6258 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6259 | (exit $ac_status); }; }; then | |
6260 | ac_cv_prog_cc_w_missing_format_attribute=yes | |
6261 | else | |
6262 | echo "$as_me: failed program was:" >&5 | |
6263 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6264 | ||
6265 | ac_cv_prog_cc_w_missing_format_attribute=no | |
6266 | fi | |
6267 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6268 | CFLAGS="$save_CFLAGS" | |
6269 | ||
6270 | fi | |
6271 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5 | |
6272 | echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6 | |
6273 | if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then | |
6274 | strict1_warn="${strict1_warn} -Wmissing-format-attribute" | |
6275 | fi | |
6276 | ||
09a9c095 NN |
6277 | # Enable -Werror, period. |
6278 | # Check whether --enable-werror_always or --disable-werror_always was given. | |
6279 | if test "${enable_werror_always+set}" = set; then | |
6280 | enableval="$enable_werror_always" | |
6281 | ||
6282 | else | |
6283 | enable_werror_always=no | |
6284 | fi; | |
6285 | if test x${enable_werror_always} = xyes ; then | |
6286 | strict1_warn="${strict1_warn} -Werror" | |
6287 | WERROR=-Werror | |
6288 | fi | |
6289 | ||
ac0f3f39 KG |
6290 | |
6291 | ||
ba479fd2 | 6292 | # If the native compiler is GCC, we can enable warnings even in stage1. |
414d23ae HPN |
6293 | # That's useful for people building cross-compilers, or just running a |
6294 | # quick `make'. | |
6295 | warn_cflags= | |
6296 | if test "x$GCC" = "xyes"; then | |
6297 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
6298 | fi | |
6299 | ||
6300 | ||
dd859b8a | 6301 | # Enable -Werror in bootstrap stage2 and later. |
a1286ef5 ZW |
6302 | is_release= |
6303 | if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then | |
6304 | is_release=yes | |
6305 | fi | |
dd859b8a KG |
6306 | # Check whether --enable-werror or --disable-werror was given. |
6307 | if test "${enable_werror+set}" = set; then | |
6308 | enableval="$enable_werror" | |
ba479fd2 | 6309 | |
dd859b8a | 6310 | else |
06c37c96 NS |
6311 | if test x$is_release = x ; then |
6312 | # Default to "yes" on development branches. | |
dd859b8a | 6313 | enable_werror=yes |
06c37c96 NS |
6314 | else |
6315 | # Default to "no" on release branches. | |
6316 | enable_werror=no | |
6317 | fi | |
ba479fd2 | 6318 | fi; |
dd859b8a KG |
6319 | if test x$enable_werror = xyes ; then |
6320 | WERROR=-Werror | |
6321 | fi | |
6322 | ||
6323 | ||
414d23ae HPN |
6324 | # Enable expensive internal checks |
6325 | # Check whether --enable-checking or --disable-checking was given. | |
6326 | if test "${enable_checking+set}" = set; then | |
6327 | enableval="$enable_checking" | |
e1bbfc5c NS |
6328 | ac_checking_flags="${enableval}" |
6329 | else | |
6330 | ||
6331 | # Determine the default checks. | |
6332 | if test x$is_release = x ; then | |
6333 | ac_checking_flags=yes | |
6334 | else | |
6335 | ac_checking_flags=release | |
6336 | fi | |
6337 | fi; | |
6338 | ac_assert_checking=1 | |
6339 | ac_checking= | |
cdce5c16 NS |
6340 | ac_fold_checking= |
6341 | ac_gc_checking= | |
6342 | ac_gc_always_collect= | |
414d23ae HPN |
6343 | ac_rtl_checking= |
6344 | ac_rtlflag_checking= | |
b53ef395 | 6345 | ac_runtime_checking=1 |
cdce5c16 NS |
6346 | ac_tree_checking= |
6347 | ac_valgrind_checking= | |
e1bbfc5c NS |
6348 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," |
6349 | for check in $ac_checking_flags | |
6350 | do | |
6351 | case $check in | |
cdce5c16 | 6352 | # these set all the flags to specific states |
e1bbfc5c | 6353 | yes) ac_assert_checking=1 ; ac_checking=1 ; |
cdce5c16 NS |
6354 | ac_fold_checking= ; ac_gc_checking=1 ; |
6355 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 6356 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; |
cdce5c16 NS |
6357 | ac_tree_checking=1 ; ac_valgrind_checking= ;; |
6358 | no|none) ac_assert_checking= ; ac_checking= ; | |
6359 | ac_fold_checking= ; ac_gc_checking= ; | |
6360 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 6361 | ac_rtlflag_checking= ; ac_runtime_checking= ; |
cdce5c16 | 6362 | ac_tree_checking= ; ac_valgrind_checking= ;; |
e1bbfc5c | 6363 | all) ac_assert_checking=1 ; ac_checking=1 ; |
cdce5c16 NS |
6364 | ac_fold_checking=1 ; ac_gc_checking=1 ; |
6365 | ac_gc_always_collect=1 ; ac_rtl_checking=1 ; | |
6366 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; | |
6367 | ac_tree_checking=1 ; ac_valgrind_checking= ;; | |
6368 | release) ac_assert_checking=1 ; ac_checking= ; | |
6369 | ac_fold_checking= ; ac_gc_checking= ; | |
6370 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
6371 | ac_rtlflag_checking= ; ac_runtime_checking=1 ; | |
6372 | ac_tree_checking= ; ac_valgrind_checking= ;; | |
6373 | # these enable particular checks | |
e1bbfc5c NS |
6374 | assert) ac_assert_checking=1 ;; |
6375 | fold) ac_fold_checking=1 ;; | |
6376 | gc) ac_gc_checking=1 ;; | |
6377 | gcac) ac_gc_always_collect=1 ;; | |
6378 | misc) ac_checking=1 ;; | |
e1bbfc5c | 6379 | rtl) ac_rtl_checking=1 ;; |
cdce5c16 | 6380 | rtlflag) ac_rtlflag_checking=1 ;; |
b53ef395 | 6381 | runtime) ac_runtime_checking=1 ;; |
e1bbfc5c | 6382 | tree) ac_tree_checking=1 ;; |
cdce5c16 | 6383 | valgrind) ac_valgrind_checking=1 ;; |
e1bbfc5c | 6384 | *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 |
ba479fd2 NN |
6385 | echo "$as_me: error: unknown check category $check" >&2;} |
6386 | { (exit 1); exit 1; }; } ;; | |
e1bbfc5c NS |
6387 | esac |
6388 | done | |
6389 | IFS="$ac_save_IFS" | |
06c37c96 | 6390 | |
ba479fd2 NN |
6391 | nocommon_flag="" |
6392 | if test x$ac_checking != x ; then | |
6393 | ||
6394 | cat >>confdefs.h <<\_ACEOF | |
6395 | #define ENABLE_CHECKING 1 | |
6396 | _ACEOF | |
6397 | ||
6398 | nocommon_flag=-fno-common | |
6399 | fi | |
6400 | ||
06c37c96 NS |
6401 | if test x$ac_assert_checking != x ; then |
6402 | ||
6403 | cat >>confdefs.h <<\_ACEOF | |
6404 | #define ENABLE_ASSERT_CHECKING 1 | |
6405 | _ACEOF | |
6406 | ||
b53ef395 | 6407 | fi |
232b67d9 | 6408 | |
b53ef395 NS |
6409 | if test x$ac_runtime_checking != x ; then |
6410 | ||
6411 | cat >>confdefs.h <<\_ACEOF | |
6412 | #define ENABLE_RUNTIME_CHECKING 1 | |
6413 | _ACEOF | |
6414 | ||
06c37c96 | 6415 | fi |
ba479fd2 NN |
6416 | if test x$ac_tree_checking != x ; then |
6417 | ||
6418 | cat >>confdefs.h <<\_ACEOF | |
6419 | #define ENABLE_TREE_CHECKING 1 | |
6420 | _ACEOF | |
6421 | ||
13f05fd0 | 6422 | TREEBROWSER=tree-browser.o |
ba479fd2 | 6423 | fi |
13f05fd0 | 6424 | |
ba479fd2 NN |
6425 | if test x$ac_rtl_checking != x ; then |
6426 | ||
6427 | cat >>confdefs.h <<\_ACEOF | |
6428 | #define ENABLE_RTL_CHECKING 1 | |
6429 | _ACEOF | |
6430 | ||
6431 | fi | |
6432 | if test x$ac_rtlflag_checking != x ; then | |
6433 | ||
6434 | cat >>confdefs.h <<\_ACEOF | |
6435 | #define ENABLE_RTL_FLAG_CHECKING 1 | |
6436 | _ACEOF | |
6437 | ||
6438 | fi | |
6439 | if test x$ac_gc_checking != x ; then | |
6440 | ||
6441 | cat >>confdefs.h <<\_ACEOF | |
6442 | #define ENABLE_GC_CHECKING 1 | |
6443 | _ACEOF | |
6444 | ||
6445 | fi | |
6446 | if test x$ac_gc_always_collect != x ; then | |
6447 | ||
6448 | cat >>confdefs.h <<\_ACEOF | |
6449 | #define ENABLE_GC_ALWAYS_COLLECT 1 | |
6450 | _ACEOF | |
6451 | ||
6452 | fi | |
6453 | if test x$ac_fold_checking != x ; then | |
6454 | ||
6455 | cat >>confdefs.h <<\_ACEOF | |
6456 | #define ENABLE_FOLD_CHECKING 1 | |
6457 | _ACEOF | |
6458 | ||
6459 | fi | |
6460 | valgrind_path_defines= | |
6461 | valgrind_command= | |
6462 | ||
ba479fd2 NN |
6463 | if test "${ac_cv_header_valgrind_h+set}" = set; then |
6464 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
6465 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
6466 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
6467 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6468 | fi | |
6469 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 | |
6470 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
6471 | else | |
6472 | # Is the header compilable? | |
6473 | echo "$as_me:$LINENO: checking valgrind.h usability" >&5 | |
6474 | echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6 | |
6475 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6476 | /* confdefs.h. */ |
6477 | _ACEOF | |
6478 | cat confdefs.h >>conftest.$ac_ext | |
6479 | cat >>conftest.$ac_ext <<_ACEOF | |
6480 | /* end confdefs.h. */ | |
6481 | $ac_includes_default | |
63cf211a | 6482 | #include <valgrind.h> |
ba479fd2 NN |
6483 | _ACEOF |
6484 | rm -f conftest.$ac_objext | |
6485 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 6486 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 6487 | ac_status=$? |
86da66b5 HPN |
6488 | grep -v '^ *+' conftest.er1 >conftest.err |
6489 | rm -f conftest.er1 | |
6490 | cat conftest.err >&5 | |
ba479fd2 NN |
6491 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6492 | (exit $ac_status); } && | |
d7974fe6 KC |
6493 | { ac_try='test -z "$ac_c_werror_flag" |
6494 | || test ! -s conftest.err' | |
86da66b5 HPN |
6495 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6496 | (eval $ac_try) 2>&5 | |
6497 | ac_status=$? | |
6498 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6499 | (exit $ac_status); }; } && | |
6500 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
6501 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6502 | (eval $ac_try) 2>&5 | |
6503 | ac_status=$? | |
6504 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6505 | (exit $ac_status); }; }; then | |
6506 | ac_header_compiler=yes | |
6507 | else | |
6508 | echo "$as_me: failed program was:" >&5 | |
6509 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6510 | ||
6511 | ac_header_compiler=no | |
6512 | fi | |
86da66b5 | 6513 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
6514 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 |
6515 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
6516 | ||
6517 | # Is the header present? | |
6518 | echo "$as_me:$LINENO: checking valgrind.h presence" >&5 | |
6519 | echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6 | |
6520 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6521 | /* confdefs.h. */ |
6522 | _ACEOF | |
6523 | cat confdefs.h >>conftest.$ac_ext | |
6524 | cat >>conftest.$ac_ext <<_ACEOF | |
6525 | /* end confdefs.h. */ | |
6526 | #include <valgrind.h> | |
6527 | _ACEOF | |
6528 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6529 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6530 | ac_status=$? | |
6531 | grep -v '^ *+' conftest.er1 >conftest.err | |
6532 | rm -f conftest.er1 | |
6533 | cat conftest.err >&5 | |
6534 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6535 | (exit $ac_status); } >/dev/null; then | |
6536 | if test -s conftest.err; then | |
6537 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6538 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6539 | else |
6540 | ac_cpp_err= | |
6541 | fi | |
6542 | else | |
6543 | ac_cpp_err=yes | |
6544 | fi | |
6545 | if test -z "$ac_cpp_err"; then | |
6546 | ac_header_preproc=yes | |
6547 | else | |
6548 | echo "$as_me: failed program was:" >&5 | |
6549 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6550 | ||
6551 | ac_header_preproc=no | |
6552 | fi | |
6553 | rm -f conftest.err conftest.$ac_ext | |
6554 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
6555 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
6556 | ||
6557 | # So? What about this header? | |
86da66b5 HPN |
6558 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in |
6559 | yes:no: ) | |
ba479fd2 NN |
6560 | { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 |
6561 | echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
86da66b5 HPN |
6562 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5 |
6563 | echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;} | |
6564 | ac_header_preproc=yes | |
ba479fd2 | 6565 | ;; |
86da66b5 | 6566 | no:yes:* ) |
ba479fd2 NN |
6567 | { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 |
6568 | echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} | |
86da66b5 HPN |
6569 | { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 |
6570 | echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} | |
6571 | { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5 | |
6572 | echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;} | |
6573 | { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5 | |
6574 | echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;} | |
ba479fd2 NN |
6575 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 |
6576 | echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} | |
86da66b5 HPN |
6577 | { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 |
6578 | echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;} | |
ba479fd2 NN |
6579 | ( |
6580 | cat <<\_ASBOX | |
86da66b5 HPN |
6581 | ## ------------------------------------------ ## |
6582 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
6583 | ## ------------------------------------------ ## | |
ba479fd2 NN |
6584 | _ASBOX |
6585 | ) | | |
6586 | sed "s/^/$as_me: WARNING: /" >&2 | |
6587 | ;; | |
6588 | esac | |
6589 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
6590 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
6591 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
6592 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6593 | else | |
6594 | ac_cv_header_valgrind_h=$ac_header_preproc | |
6938ec6c | 6595 | fi |
ba479fd2 NN |
6596 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 |
6597 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
6598 | ||
6e3f3080 | 6599 | fi |
ba479fd2 | 6600 | if test $ac_cv_header_valgrind_h = yes; then |
6938ec6c NN |
6601 | have_valgrind_h=yes |
6602 | else | |
ba479fd2 | 6603 | have_valgrind_h=no |
6938ec6c NN |
6604 | fi |
6605 | ||
6606 | ||
ba479fd2 | 6607 | |
cdce5c16 | 6608 | if test x$ac_valgrind_checking != x ; then |
414d23ae HPN |
6609 | # It is certainly possible that there's valgrind but no valgrind.h. |
6610 | # GCC relies on making annotations so we must have both. | |
ba479fd2 NN |
6611 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 |
6612 | echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6 | |
6613 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6614 | /* confdefs.h. */ |
6615 | _ACEOF | |
6616 | cat confdefs.h >>conftest.$ac_ext | |
6617 | cat >>conftest.$ac_ext <<_ACEOF | |
6618 | /* end confdefs.h. */ | |
a207b594 | 6619 | #include <valgrind/memcheck.h> |
14011ca4 AJ |
6620 | #ifndef VALGRIND_DISCARD |
6621 | #error VALGRIND_DISCARD not defined | |
6622 | #endif | |
ba479fd2 NN |
6623 | _ACEOF |
6624 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6625 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6626 | ac_status=$? | |
6627 | grep -v '^ *+' conftest.er1 >conftest.err | |
6628 | rm -f conftest.er1 | |
6629 | cat conftest.err >&5 | |
6630 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6631 | (exit $ac_status); } >/dev/null; then | |
6632 | if test -s conftest.err; then | |
6633 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6634 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6635 | else |
6636 | ac_cpp_err= | |
6637 | fi | |
6638 | else | |
6639 | ac_cpp_err=yes | |
6640 | fi | |
6641 | if test -z "$ac_cpp_err"; then | |
a207b594 HPN |
6642 | gcc_cv_header_valgrind_memcheck_h=yes |
6643 | else | |
ba479fd2 NN |
6644 | echo "$as_me: failed program was:" >&5 |
6645 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6646 | ||
a207b594 HPN |
6647 | gcc_cv_header_valgrind_memcheck_h=no |
6648 | fi | |
ba479fd2 NN |
6649 | rm -f conftest.err conftest.$ac_ext |
6650 | echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5 | |
6651 | echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6 | |
6652 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 | |
6653 | echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6 | |
6654 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6655 | /* confdefs.h. */ |
6656 | _ACEOF | |
6657 | cat confdefs.h >>conftest.$ac_ext | |
6658 | cat >>conftest.$ac_ext <<_ACEOF | |
6659 | /* end confdefs.h. */ | |
a207b594 HPN |
6660 | #include <memcheck.h> |
6661 | #ifndef VALGRIND_DISCARD | |
6662 | #error VALGRIND_DISCARD not defined | |
6663 | #endif | |
ba479fd2 NN |
6664 | _ACEOF |
6665 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6666 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6667 | ac_status=$? | |
6668 | grep -v '^ *+' conftest.er1 >conftest.err | |
6669 | rm -f conftest.er1 | |
6670 | cat conftest.err >&5 | |
6671 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6672 | (exit $ac_status); } >/dev/null; then | |
6673 | if test -s conftest.err; then | |
6674 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6675 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6676 | else |
6677 | ac_cpp_err= | |
6678 | fi | |
6679 | else | |
6680 | ac_cpp_err=yes | |
6681 | fi | |
6682 | if test -z "$ac_cpp_err"; then | |
14011ca4 AJ |
6683 | gcc_cv_header_memcheck_h=yes |
6684 | else | |
ba479fd2 NN |
6685 | echo "$as_me: failed program was:" >&5 |
6686 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6687 | ||
cafe096b EC |
6688 | gcc_cv_header_memcheck_h=no |
6689 | fi | |
ba479fd2 NN |
6690 | rm -f conftest.err conftest.$ac_ext |
6691 | echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5 | |
6692 | echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6 | |
6693 | ||
56694dd9 ZW |
6694 | # Prepare PATH_SEPARATOR. |
6695 | # The user is always right. | |
6696 | if test "${PATH_SEPARATOR+set}" != set; then | |
6697 | echo "#! /bin/sh" >conf$$.sh | |
6698 | echo "exit 0" >>conf$$.sh | |
6699 | chmod +x conf$$.sh | |
6700 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6701 | PATH_SEPARATOR=';' | |
6702 | else | |
6703 | PATH_SEPARATOR=: | |
6704 | fi | |
6705 | rm -f conf$$.sh | |
6706 | fi | |
6707 | ||
6708 | # Find out how to test for executable files. Don't use a zero-byte file, | |
6709 | # as systems may use methods other than mode bits to determine executability. | |
6710 | cat >conf$$.file <<_ASEOF | |
6711 | #! /bin/sh | |
6712 | exit 0 | |
6713 | _ASEOF | |
6714 | chmod +x conf$$.file | |
6715 | if test -x conf$$.file >/dev/null 2>&1; then | |
6716 | ac_executable_p="test -x" | |
6717 | else | |
6718 | ac_executable_p="test -f" | |
6719 | fi | |
6720 | rm -f conf$$.file | |
6721 | ||
6722 | # Extract the first word of "valgrind", so it can be a program name with args. | |
414d23ae | 6723 | set dummy valgrind; ac_word=$2 |
ba479fd2 NN |
6724 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
6725 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
6726 | if test "${ac_cv_path_valgrind_path+set}" = set; then | |
6727 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
6728 | else |
6729 | case "$valgrind_path" in | |
56694dd9 ZW |
6730 | [\\/]* | ?:[\\/]*) |
6731 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
6732 | ;; | |
414d23ae | 6733 | *) |
56694dd9 ZW |
6734 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR |
6735 | for ac_dir in $PATH; do | |
6736 | IFS="$ac_save_IFS" | |
6737 | test -z "$ac_dir" && ac_dir=. | |
6738 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6739 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
6740 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
6741 | ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext" | |
6742 | break 2 | |
6743 | fi | |
6744 | fi | |
6745 | done | |
6746 | done | |
6747 | IFS="$ac_save_IFS" | |
6748 | ;; | |
414d23ae | 6749 | esac |
75e93faa | 6750 | fi |
414d23ae HPN |
6751 | valgrind_path="$ac_cv_path_valgrind_path" |
6752 | if test -n "$valgrind_path"; then | |
ba479fd2 NN |
6753 | echo "$as_me:$LINENO: result: $valgrind_path" >&5 |
6754 | echo "${ECHO_T}$valgrind_path" >&6 | |
414d23ae | 6755 | else |
ba479fd2 NN |
6756 | echo "$as_me:$LINENO: result: no" >&5 |
6757 | echo "${ECHO_T}no" >&6 | |
414d23ae HPN |
6758 | fi |
6759 | ||
a207b594 HPN |
6760 | if test "x$valgrind_path" = "x" \ |
6761 | || (test $have_valgrind_h = no \ | |
6762 | && test $gcc_cv_header_memcheck_h = no \ | |
6763 | && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
ba479fd2 NN |
6764 | { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5 |
6765 | echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;} | |
6766 | { (exit 1); exit 1; }; } | |
414d23ae HPN |
6767 | fi |
6768 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
6769 | valgrind_command="$valgrind_path -q" | |
ba479fd2 NN |
6770 | |
6771 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 6772 | #define ENABLE_VALGRIND_CHECKING 1 |
ba479fd2 | 6773 | _ACEOF |
75e93faa | 6774 | |
a207b594 | 6775 | if test $gcc_cv_header_valgrind_memcheck_h = yes; then |
ba479fd2 NN |
6776 | |
6777 | cat >>confdefs.h <<\_ACEOF | |
a207b594 | 6778 | #define HAVE_VALGRIND_MEMCHECK_H 1 |
ba479fd2 | 6779 | _ACEOF |
a207b594 HPN |
6780 | |
6781 | fi | |
14011ca4 | 6782 | if test $gcc_cv_header_memcheck_h = yes; then |
ba479fd2 NN |
6783 | |
6784 | cat >>confdefs.h <<\_ACEOF | |
14011ca4 | 6785 | #define HAVE_MEMCHECK_H 1 |
ba479fd2 | 6786 | _ACEOF |
14011ca4 AJ |
6787 | |
6788 | fi | |
414d23ae | 6789 | fi |
75e93faa | 6790 | |
75e93faa ZW |
6791 | |
6792 | ||
74ee1642 PB |
6793 | # Check whether --enable-mapped-location or --disable-mapped-location was given. |
6794 | if test "${enable_mapped_location+set}" = set; then | |
6795 | enableval="$enable_mapped_location" | |
6796 | ||
6797 | else | |
6798 | enable_mapped_location=no | |
6799 | fi; | |
6800 | ||
6801 | if test "$enable_mapped_location" = yes ; then | |
6802 | ||
6803 | cat >>confdefs.h <<\_ACEOF | |
6804 | #define USE_MAPPED_LOCATION 1 | |
6805 | _ACEOF | |
6806 | ||
6807 | fi | |
6808 | ||
414d23ae HPN |
6809 | # Enable code coverage collection |
6810 | # Check whether --enable-coverage or --disable-coverage was given. | |
6811 | if test "${enable_coverage+set}" = set; then | |
6812 | enableval="$enable_coverage" | |
6813 | case "${enableval}" in | |
6dd297da NN |
6814 | yes|noopt) |
6815 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" | |
6816 | ;; | |
6817 | opt) | |
6818 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" | |
6819 | ;; | |
6820 | no) | |
6821 | # a.k.a. --disable-coverage | |
6822 | coverage_flags="" | |
6823 | ;; | |
6824 | *) | |
6825 | { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5 | |
ba479fd2 NN |
6826 | echo "$as_me: error: unknown coverage setting $enableval" >&2;} |
6827 | { (exit 1); exit 1; }; } | |
6dd297da | 6828 | ;; |
414d23ae | 6829 | esac |
75e93faa | 6830 | else |
414d23ae | 6831 | coverage_flags="" |
ba479fd2 | 6832 | fi; |
5c3bc9fb | 6833 | |
414d23ae | 6834 | |
439a7e54 DN |
6835 | # Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given. |
6836 | if test "${enable_gather_detailed_mem_stats+set}" = set; then | |
6837 | enableval="$enable_gather_detailed_mem_stats" | |
ba479fd2 | 6838 | |
439a7e54 DN |
6839 | else |
6840 | enable_gather_detailed_mem_stats=no | |
ba479fd2 | 6841 | fi; |
439a7e54 | 6842 | if test x$enable_gather_detailed_mem_stats = xyes ; then |
ba479fd2 NN |
6843 | |
6844 | cat >>confdefs.h <<\_ACEOF | |
439a7e54 | 6845 | #define GATHER_STATISTICS 1 |
ba479fd2 | 6846 | _ACEOF |
439a7e54 DN |
6847 | |
6848 | fi | |
6849 | ||
73458fb7 NN |
6850 | # ------------------------------- |
6851 | # Miscenalleous configure options | |
6852 | # ------------------------------- | |
34a86c2b NN |
6853 | |
6854 | # With stabs | |
ba479fd2 | 6855 | |
34a86c2b NN |
6856 | # Check whether --with-stabs or --without-stabs was given. |
6857 | if test "${with_stabs+set}" = set; then | |
6858 | withval="$with_stabs" | |
6859 | stabs="$with_stabs" | |
6860 | else | |
6861 | stabs=no | |
ba479fd2 | 6862 | fi; |
cafe096b | 6863 | |
34a86c2b NN |
6864 | # Determine whether or not multilibs are enabled. |
6865 | # Check whether --enable-multilib or --disable-multilib was given. | |
6866 | if test "${enable_multilib+set}" = set; then | |
6867 | enableval="$enable_multilib" | |
ba479fd2 | 6868 | |
34a86c2b NN |
6869 | else |
6870 | enable_multilib=yes | |
ba479fd2 | 6871 | fi; |
75e93faa | 6872 | |
34a86c2b | 6873 | |
414d23ae HPN |
6874 | # Enable __cxa_atexit for C++. |
6875 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. | |
6876 | if test "${enable___cxa_atexit+set}" = set; then | |
6877 | enableval="$enable___cxa_atexit" | |
75e93faa | 6878 | |
ba479fd2 | 6879 | fi; |
75e93faa | 6880 | |
414d23ae HPN |
6881 | # Enable threads |
6882 | # Pass with no value to take the default | |
6883 | # Pass with a value to specify a thread package | |
6884 | # Check whether --enable-threads or --disable-threads was given. | |
6885 | if test "${enable_threads+set}" = set; then | |
6886 | enableval="$enable_threads" | |
ba479fd2 | 6887 | |
414d23ae HPN |
6888 | else |
6889 | enable_threads='' | |
ba479fd2 | 6890 | fi; |
414d23ae HPN |
6891 | |
6892 | # Check whether --enable-objc-gc or --disable-objc-gc was given. | |
6893 | if test "${enable_objc_gc+set}" = set; then | |
6894 | enableval="$enable_objc_gc" | |
6895 | if test x$enable_objc_gc = xno; then | |
6896 | objc_boehm_gc='' | |
6897 | else | |
6898 | objc_boehm_gc=1 | |
6899 | fi | |
6900 | else | |
6901 | objc_boehm_gc='' | |
ba479fd2 | 6902 | fi; |
75e93faa ZW |
6903 | |
6904 | ||
414d23ae HPN |
6905 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
6906 | if test "${with_dwarf2+set}" = set; then | |
6907 | withval="$with_dwarf2" | |
6908 | dwarf2="$with_dwarf2" | |
75e93faa | 6909 | else |
414d23ae | 6910 | dwarf2=no |
ba479fd2 | 6911 | fi; |
75e93faa | 6912 | |
414d23ae HPN |
6913 | # Check whether --enable-shared or --disable-shared was given. |
6914 | if test "${enable_shared+set}" = set; then | |
6915 | enableval="$enable_shared" | |
ba479fd2 | 6916 | |
414d23ae HPN |
6917 | case $enable_shared in |
6918 | yes | no) ;; | |
6919 | *) | |
6920 | enable_shared=no | |
6921 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
6922 | for pkg in $enableval; do | |
6923 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
6924 | enable_shared=yes | |
6925 | fi | |
6926 | done | |
6927 | IFS="$ac_save_ifs" | |
6928 | ;; | |
6929 | esac | |
6930 | ||
75e93faa | 6931 | else |
414d23ae | 6932 | enable_shared=yes |
ba479fd2 | 6933 | fi; |
75e93faa | 6934 | |
75e93faa | 6935 | |
75e93faa | 6936 | |
4977bab6 ZW |
6937 | # Check whether --with-sysroot or --without-sysroot was given. |
6938 | if test "${with_sysroot+set}" = set; then | |
6939 | withval="$with_sysroot" | |
ba479fd2 | 6940 | |
4977bab6 | 6941 | case ${with_sysroot} in |
caa55b1e | 6942 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; |
4977bab6 ZW |
6943 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
6944 | esac | |
ba479fd2 | 6945 | |
4977bab6 ZW |
6946 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
6947 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)' | |
6948 | ||
047d636f DJ |
6949 | if test "x$exec_prefix" = xNONE; then |
6950 | if test "x$prefix" = xNONE; then | |
6951 | test_prefix=/usr/local | |
6952 | else | |
6953 | test_prefix=$prefix | |
6954 | fi | |
6955 | else | |
6956 | test_prefix=$exec_prefix | |
6957 | fi | |
6958 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 AO |
6959 | "${test_prefix}"|"${test_prefix}/"*|\ |
6960 | '${exec_prefix}'|'${exec_prefix}/'*) | |
047d636f DJ |
6961 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
6962 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
6963 | ;; | |
6964 | esac | |
6965 | ||
4977bab6 | 6966 | else |
ba479fd2 | 6967 | |
4977bab6 | 6968 | TARGET_SYSTEM_ROOT= |
db720d9a | 6969 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
6970 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
6971 | ||
ba479fd2 | 6972 | fi; |
4977bab6 ZW |
6973 | |
6974 | ||
6975 | ||
6976 | ||
d1bd0ded | 6977 | # Build with intermodule optimisations |
d1bd0ded GK |
6978 | # Check whether --enable-intermodule or --disable-intermodule was given. |
6979 | if test "${enable_intermodule+set}" = set; then | |
6980 | enableval="$enable_intermodule" | |
0c46c5c7 KC |
6981 | case ${enable_intermodule} in |
6982 | yes) onestep="-onestep";; | |
6983 | *) onestep="";; | |
d1bd0ded | 6984 | esac |
0c46c5c7 KC |
6985 | else |
6986 | onestep="" | |
ba479fd2 | 6987 | fi; |
d1bd0ded GK |
6988 | |
6989 | ||
f3c9f174 NN |
6990 | # Sanity check enable_languages in case someone does not run the toplevel |
6991 | # configure # script. | |
6992 | # Check whether --enable-languages or --disable-languages was given. | |
6993 | if test "${enable_languages+set}" = set; then | |
6994 | enableval="$enable_languages" | |
6995 | case ,${enable_languages}, in | |
6996 | ,,|,yes,) | |
6997 | # go safe -- we cannot be much sure without the toplevel | |
6998 | # configure's | |
6999 | # analysis of which target libs are present and usable | |
7000 | enable_languages=c | |
7001 | ;; | |
7002 | *,all,*) | |
7003 | { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5 | |
7004 | echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;} | |
7005 | { (exit 1); exit 1; }; } | |
7006 | ;; | |
7007 | *,c,*) | |
7008 | ;; | |
7009 | *) | |
7010 | enable_languages=c,${enable_languages} | |
7011 | ;; | |
7012 | esac | |
7013 | else | |
7014 | enable_languages=c | |
7015 | fi; | |
7016 | ||
7017 | subdirs= | |
7018 | for lang in ${srcdir}/*/config-lang.in | |
7019 | do | |
7020 | case $lang in | |
7021 | # The odd quoting in the next line works around | |
7022 | # an apparent bug in bash 1.12 on linux. | |
7023 | ${srcdir}/[*]/config-lang.in) ;; | |
7024 | *) | |
7025 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
7026 | if test "x$lang_alias" = x | |
7027 | then | |
7028 | echo "$lang doesn't set \$language." 1>&2 | |
7029 | exit 1 | |
7030 | fi | |
7031 | case ",$enable_languages," in | |
7032 | *,$lang_alias,*) | |
7033 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;; | |
7034 | esac | |
7035 | ;; | |
7036 | esac | |
7037 | done | |
7038 | ||
7039 | ||
73458fb7 NN |
7040 | # ------------------------- |
7041 | # Checks for other programs | |
7042 | # ------------------------- | |
5b67ad6f | 7043 | |
ba479fd2 NN |
7044 | echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
7045 | echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 | |
86da66b5 | 7046 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` |
ba479fd2 NN |
7047 | if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then |
7048 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9a25f70 | 7049 | else |
ba479fd2 | 7050 | cat >conftest.make <<\_ACEOF |
e9a25f70 | 7051 | all: |
ba479fd2 NN |
7052 | @echo 'ac_maketemp="$(MAKE)"' |
7053 | _ACEOF | |
e9a25f70 | 7054 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
ba479fd2 | 7055 | eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` |
e9a25f70 JL |
7056 | if test -n "$ac_maketemp"; then |
7057 | eval ac_cv_prog_make_${ac_make}_set=yes | |
7058 | else | |
7059 | eval ac_cv_prog_make_${ac_make}_set=no | |
7060 | fi | |
ba479fd2 | 7061 | rm -f conftest.make |
e9a25f70 JL |
7062 | fi |
7063 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
ba479fd2 NN |
7064 | echo "$as_me:$LINENO: result: yes" >&5 |
7065 | echo "${ECHO_T}yes" >&6 | |
e9a25f70 JL |
7066 | SET_MAKE= |
7067 | else | |
ba479fd2 NN |
7068 | echo "$as_me:$LINENO: result: no" >&5 |
7069 | echo "${ECHO_T}no" >&6 | |
e9a25f70 JL |
7070 | SET_MAKE="MAKE=${MAKE-make}" |
7071 | fi | |
7072 | ||
7073 | ||
861bb6c1 | 7074 | # Find some useful tools |
ba479fd2 | 7075 | for ac_prog in gawk mawk nawk awk |
861bb6c1 | 7076 | do |
ba479fd2 | 7077 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 7078 | set dummy $ac_prog; ac_word=$2 |
ba479fd2 NN |
7079 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7080 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7081 | if test "${ac_cv_prog_AWK+set}" = set; then | |
7082 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7083 | else |
7084 | if test -n "$AWK"; then | |
7085 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7086 | else | |
ba479fd2 NN |
7087 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7088 | for as_dir in $PATH | |
7089 | do | |
7090 | IFS=$as_save_IFS | |
7091 | test -z "$as_dir" && as_dir=. | |
7092 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7093 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7094 | ac_cv_prog_AWK="$ac_prog" | |
7095 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7096 | break 2 | |
7097 | fi | |
7098 | done | |
7099 | done | |
7100 | ||
861bb6c1 JL |
7101 | fi |
7102 | fi | |
ba479fd2 | 7103 | AWK=$ac_cv_prog_AWK |
861bb6c1 | 7104 | if test -n "$AWK"; then |
ba479fd2 NN |
7105 | echo "$as_me:$LINENO: result: $AWK" >&5 |
7106 | echo "${ECHO_T}$AWK" >&6 | |
861bb6c1 | 7107 | else |
ba479fd2 NN |
7108 | echo "$as_me:$LINENO: result: no" >&5 |
7109 | echo "${ECHO_T}no" >&6 | |
861bb6c1 JL |
7110 | fi |
7111 | ||
ba479fd2 | 7112 | test -n "$AWK" && break |
861bb6c1 JL |
7113 | done |
7114 | ||
776dc15d | 7115 | # We need awk to create options.c and options.h. |
2c4902b9 NN |
7116 | # Bail out if it's missing. |
7117 | case ${AWK} in | |
ba479fd2 NN |
7118 | "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5 |
7119 | echo "$as_me: error: can't build without awk, bailing out" >&2;} | |
7120 | { (exit 1); exit 1; }; } ;; | |
2c4902b9 NN |
7121 | esac |
7122 | ||
ba479fd2 NN |
7123 | echo "$as_me:$LINENO: checking whether ln -s works" >&5 |
7124 | echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 | |
7125 | if test "${gcc_cv_prog_LN_S+set}" = set; then | |
7126 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7127 | else |
7128 | rm -f conftestdata_t | |
7129 | echo >conftestdata_f | |
7130 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
7131 | then | |
7132 | gcc_cv_prog_LN_S="ln -s" | |
7133 | else | |
7134 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7135 | then | |
7136 | gcc_cv_prog_LN_S=ln | |
7137 | else | |
35f06ae4 PB |
7138 | if cp -p conftestdata_f conftestdata_t 2>/dev/null |
7139 | then | |
06c3418c | 7140 | gcc_cv_prog_LN_S="cp -p" |
35f06ae4 PB |
7141 | else |
7142 | gcc_cv_prog_LN_S=cp | |
7143 | fi | |
0a4b6309 RL |
7144 | fi |
7145 | fi | |
7146 | rm -f conftestdata_f conftestdata_t | |
7147 | ||
7148 | fi | |
7149 | LN_S="$gcc_cv_prog_LN_S" | |
7150 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
ba479fd2 NN |
7151 | echo "$as_me:$LINENO: result: yes" >&5 |
7152 | echo "${ECHO_T}yes" >&6 | |
0a4b6309 RL |
7153 | else |
7154 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
ba479fd2 NN |
7155 | echo "$as_me:$LINENO: result: no, using ln" >&5 |
7156 | echo "${ECHO_T}no, using ln" >&6 | |
0a4b6309 | 7157 | else |
35f06ae4 PB |
7158 | echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5 |
7159 | echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6 | |
0a4b6309 RL |
7160 | fi |
7161 | fi | |
7162 | ||
41e622a8 AP |
7163 | echo "$as_me:$LINENO: checking whether ln works" >&5 |
7164 | echo $ECHO_N "checking whether ln works... $ECHO_C" >&6 | |
7165 | if test "${acx_cv_prog_LN+set}" = set; then | |
7166 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7167 | else | |
7168 | rm -f conftestdata_t | |
7169 | echo >conftestdata_f | |
7170 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7171 | then | |
7172 | acx_cv_prog_LN=ln | |
7173 | else | |
7174 | acx_cv_prog_LN=no | |
7175 | fi | |
7176 | rm -f conftestdata_f conftestdata_t | |
7177 | ||
7178 | fi | |
7179 | if test $acx_cv_prog_LN = no; then | |
7180 | LN="$LN_S" | |
7181 | echo "$as_me:$LINENO: result: no, using $LN" >&5 | |
7182 | echo "${ECHO_T}no, using $LN" >&6 | |
7183 | else | |
7184 | LN="$acx_cv_prog_LN" | |
7185 | echo "$as_me:$LINENO: result: yes" >&5 | |
7186 | echo "${ECHO_T}yes" >&6 | |
7187 | fi | |
7188 | ||
ba479fd2 NN |
7189 | if test -n "$ac_tool_prefix"; then |
7190 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7191 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
7192 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7193 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7194 | if test "${ac_cv_prog_RANLIB+set}" = set; then | |
7195 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7196 | else |
7197 | if test -n "$RANLIB"; then | |
7198 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7199 | else | |
ba479fd2 NN |
7200 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7201 | for as_dir in $PATH | |
7202 | do | |
7203 | IFS=$as_save_IFS | |
7204 | test -z "$as_dir" && as_dir=. | |
7205 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7206 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7207 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
7208 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7209 | break 2 | |
7210 | fi | |
7211 | done | |
7212 | done | |
7213 | ||
6e3f3080 NN |
7214 | fi |
7215 | fi | |
ba479fd2 | 7216 | RANLIB=$ac_cv_prog_RANLIB |
6e3f3080 | 7217 | if test -n "$RANLIB"; then |
ba479fd2 NN |
7218 | echo "$as_me:$LINENO: result: $RANLIB" >&5 |
7219 | echo "${ECHO_T}$RANLIB" >&6 | |
7220 | else | |
7221 | echo "$as_me:$LINENO: result: no" >&5 | |
7222 | echo "${ECHO_T}no" >&6 | |
7223 | fi | |
7224 | ||
7225 | fi | |
7226 | if test -z "$ac_cv_prog_RANLIB"; then | |
7227 | ac_ct_RANLIB=$RANLIB | |
7228 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7229 | set dummy ranlib; ac_word=$2 | |
7230 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7231 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7232 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then | |
7233 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7234 | else | |
7235 | if test -n "$ac_ct_RANLIB"; then | |
7236 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7237 | else | |
7238 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7239 | for as_dir in $PATH | |
7240 | do | |
7241 | IFS=$as_save_IFS | |
7242 | test -z "$as_dir" && as_dir=. | |
7243 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7244 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7245 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
7246 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7247 | break 2 | |
7248 | fi | |
7249 | done | |
7250 | done | |
7251 | ||
7252 | test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" | |
7253 | fi | |
7254 | fi | |
7255 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7256 | if test -n "$ac_ct_RANLIB"; then | |
7257 | echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 | |
7258 | echo "${ECHO_T}$ac_ct_RANLIB" >&6 | |
6e3f3080 | 7259 | else |
ba479fd2 NN |
7260 | echo "$as_me:$LINENO: result: no" >&5 |
7261 | echo "${ECHO_T}no" >&6 | |
7262 | fi | |
7263 | ||
7264 | RANLIB=$ac_ct_RANLIB | |
7265 | else | |
7266 | RANLIB="$ac_cv_prog_RANLIB" | |
861bb6c1 JL |
7267 | fi |
7268 | ||
343a6100 MM |
7269 | case "${host}" in |
7270 | *-*-darwin*) | |
7271 | # By default, the Darwin ranlib will not treat common symbols as | |
7272 | # definitions when building the archive table of contents. Other | |
7273 | # ranlibs do that; pass an option to the Darwin ranlib that makes | |
7274 | # it behave similarly. | |
7275 | ranlib_flags="-c" | |
7276 | ;; | |
7277 | *) | |
7278 | ranlib_flags="" | |
7279 | esac | |
7280 | ||
7281 | ||
0a4b6309 RL |
7282 | # Find a good install program. We prefer a C program (faster), |
7283 | # so one script is as good as another. But avoid the broken or | |
7284 | # incompatible versions: | |
7285 | # SysV /etc/install, /usr/sbin/install | |
7286 | # SunOS /usr/etc/install | |
7287 | # IRIX /sbin/install | |
7288 | # AIX /bin/install | |
7289 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7290 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7291 | # ./install, which can be erroneously created by make from ./install.sh. | |
ba479fd2 NN |
7292 | echo "$as_me:$LINENO: checking for a BSD compatible install" >&5 |
7293 | echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 | |
0a4b6309 | 7294 | if test -z "$INSTALL"; then |
ba479fd2 NN |
7295 | if test "${ac_cv_path_install+set}" = set; then |
7296 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7297 | else |
7298 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
7299 | for ac_dir in $PATH; do | |
7300 | # Account for people who put trailing slashes in PATH elements. | |
7301 | case "$ac_dir/" in | |
7302 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
7303 | *) | |
7304 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7305 | for ac_prog in ginstall scoinst install; do | |
7306 | if test -f $ac_dir/$ac_prog; then | |
7307 | if test $ac_prog = install && | |
7308 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
7309 | # AIX install. It has an incompatible calling convention. | |
7310 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
7311 | : | |
7312 | else | |
7313 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
7314 | break 2 | |
7315 | fi | |
7316 | fi | |
7317 | done | |
7318 | ;; | |
7319 | esac | |
7320 | done | |
7321 | IFS="$ac_save_IFS" | |
7322 | ||
7323 | fi | |
7324 | if test "${ac_cv_path_install+set}" = set; then | |
7325 | INSTALL="$ac_cv_path_install" | |
7326 | else | |
7327 | # As a last resort, use the slow shell script. We don't cache a | |
7328 | # path for INSTALL within a source directory, because that will | |
7329 | # break other packages using the cache if that directory is | |
7330 | # removed, or if the path is relative. | |
7331 | INSTALL="$ac_install_sh" | |
7332 | fi | |
7333 | fi | |
ba479fd2 NN |
7334 | echo "$as_me:$LINENO: result: $INSTALL" >&5 |
7335 | echo "${ECHO_T}$INSTALL" >&6 | |
0a4b6309 RL |
7336 | |
7337 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7338 | # It thinks the first close brace ends the variable substitution. | |
7339 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7340 | ||
7341 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
7342 | ||
861bb6c1 | 7343 | |
3a000df0 | 7344 | # See if cmp has --ignore-initial. |
ba479fd2 NN |
7345 | echo "$as_me:$LINENO: checking for cmp's capabilities" >&5 |
7346 | echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6 | |
7347 | if test "${gcc_cv_prog_cmp_skip+set}" = set; then | |
7348 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a000df0 KC |
7349 | else |
7350 | echo abfoo >t1 | |
7351 | echo cdfoo >t2 | |
269a7343 | 7352 | gcc_cv_prog_cmp_skip=slowcompare |
3a000df0 KC |
7353 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then |
7354 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
269a7343 | 7355 | : |
3a000df0 KC |
7356 | else |
7357 | gcc_cv_prog_cmp_skip=gnucompare | |
7358 | fi | |
269a7343 KG |
7359 | fi |
7360 | if test $gcc_cv_prog_cmp_skip = slowcompare ; then | |
7361 | if cmp t1 t2 2 2 > /dev/null 2>&1; then | |
7362 | if cmp t1 t2 1 1 > /dev/null 2>&1; then | |
7363 | : | |
7364 | else | |
7365 | gcc_cv_prog_cmp_skip=fastcompare | |
7366 | fi | |
7367 | fi | |
3a000df0 KC |
7368 | fi |
7369 | rm t1 t2 | |
7370 | ||
7371 | fi | |
ba479fd2 NN |
7372 | echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5 |
7373 | echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6 | |
3a000df0 KC |
7374 | make_compare_target=$gcc_cv_prog_cmp_skip |
7375 | ||
7376 | ||
7377 | ||
73458fb7 NN |
7378 | # See if we have the mktemp command. |
7379 | # Extract the first word of "mktemp", so it can be a program name with args. | |
7380 | set dummy mktemp; ac_word=$2 | |
ba479fd2 NN |
7381 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7382 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7383 | if test "${ac_cv_prog_have_mktemp_command+set}" = set; then | |
7384 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7385 | else |
7386 | if test -n "$have_mktemp_command"; then | |
7387 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
7388 | else | |
ba479fd2 NN |
7389 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7390 | for as_dir in $PATH | |
7391 | do | |
7392 | IFS=$as_save_IFS | |
7393 | test -z "$as_dir" && as_dir=. | |
7394 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7395 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7396 | ac_cv_prog_have_mktemp_command="yes" | |
7397 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7398 | break 2 | |
7399 | fi | |
7400 | done | |
7401 | done | |
7402 | ||
73458fb7 NN |
7403 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
7404 | fi | |
7405 | fi | |
ba479fd2 | 7406 | have_mktemp_command=$ac_cv_prog_have_mktemp_command |
73458fb7 | 7407 | if test -n "$have_mktemp_command"; then |
ba479fd2 NN |
7408 | echo "$as_me:$LINENO: result: $have_mktemp_command" >&5 |
7409 | echo "${ECHO_T}$have_mktemp_command" >&6 | |
73458fb7 | 7410 | else |
ba479fd2 NN |
7411 | echo "$as_me:$LINENO: result: no" >&5 |
7412 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7413 | fi |
7414 | ||
7415 | ||
7c27e184 PB |
7416 | MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing" |
7417 | ||
7418 | # See if makeinfo has been installed and is modern enough | |
7419 | # that we can use it. | |
9f18db39 PB |
7420 | |
7421 | ac_executable_extensions="$build_exeext" | |
7422 | ||
7c27e184 | 7423 | # Extract the first word of "makeinfo", so it can be a program name with args. |
73458fb7 | 7424 | set dummy makeinfo; ac_word=$2 |
ba479fd2 NN |
7425 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7426 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7427 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then | |
7428 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7429 | else |
7430 | if test -n "$MAKEINFO"; then | |
7431 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
7432 | else | |
ba479fd2 NN |
7433 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7434 | for as_dir in $PATH | |
7435 | do | |
7436 | IFS=$as_save_IFS | |
7437 | test -z "$as_dir" && as_dir=. | |
7438 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7439 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7440 | ac_cv_prog_MAKEINFO="makeinfo" | |
7441 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7442 | break 2 | |
7443 | fi | |
7444 | done | |
7445 | done | |
7446 | ||
73458fb7 NN |
7447 | fi |
7448 | fi | |
ba479fd2 | 7449 | MAKEINFO=$ac_cv_prog_MAKEINFO |
73458fb7 | 7450 | if test -n "$MAKEINFO"; then |
ba479fd2 NN |
7451 | echo "$as_me:$LINENO: result: $MAKEINFO" >&5 |
7452 | echo "${ECHO_T}$MAKEINFO" >&6 | |
73458fb7 | 7453 | else |
ba479fd2 NN |
7454 | echo "$as_me:$LINENO: result: no" >&5 |
7455 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7456 | fi |
7457 | ||
7458 | if test -n "$MAKEINFO"; then | |
7459 | # Found it, now check the version. | |
ba479fd2 NN |
7460 | echo "$as_me:$LINENO: checking for modern makeinfo" >&5 |
7461 | echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6 | |
7462 | if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then | |
7463 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7464 | else |
7465 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
7466 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
ac0f3f39 | 7467 | echo "configure:7467: version of makeinfo is $ac_prog_version" >&5 |
73458fb7 NN |
7468 | case $ac_prog_version in |
7469 | '') gcc_cv_prog_makeinfo_modern=no;; | |
7470 | 4.[2-9]*) | |
7471 | gcc_cv_prog_makeinfo_modern=yes;; | |
7472 | *) gcc_cv_prog_makeinfo_modern=no;; | |
7473 | esac | |
7474 | ||
7475 | fi | |
ba479fd2 NN |
7476 | echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5 |
7477 | echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6 | |
73458fb7 NN |
7478 | else |
7479 | gcc_cv_prog_makeinfo_modern=no | |
7480 | fi | |
7481 | ||
73458fb7 | 7482 | if test $gcc_cv_prog_makeinfo_modern = no; then |
7c27e184 | 7483 | MAKEINFO="$MISSING makeinfo" |
ba479fd2 NN |
7484 | { echo "$as_me:$LINENO: WARNING: |
7485 | *** Makeinfo is missing or too old. | |
7486 | *** Info documentation will not be built." >&5 | |
7487 | echo "$as_me: WARNING: | |
cafe096b | 7488 | *** Makeinfo is missing or too old. |
ba479fd2 | 7489 | *** Info documentation will not be built." >&2;} |
73458fb7 NN |
7490 | BUILD_INFO= |
7491 | else | |
ba479fd2 | 7492 | BUILD_INFO=info |
73458fb7 NN |
7493 | fi |
7494 | ||
7c27e184 | 7495 | |
73458fb7 | 7496 | # Is pod2man recent enough to regenerate manpages? |
ba479fd2 NN |
7497 | echo "$as_me:$LINENO: checking for recent Pod::Man" >&5 |
7498 | echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6 | |
73458fb7 | 7499 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
ba479fd2 NN |
7500 | echo "$as_me:$LINENO: result: yes" >&5 |
7501 | echo "${ECHO_T}yes" >&6 | |
7502 | GENERATED_MANPAGES=generated-manpages | |
73458fb7 | 7503 | else |
ba479fd2 NN |
7504 | echo "$as_me:$LINENO: result: no" >&5 |
7505 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7506 | GENERATED_MANPAGES= |
7507 | fi | |
7508 | ||
7c27e184 | 7509 | |
73458fb7 | 7510 | # How about lex? |
7c27e184 PB |
7511 | for ac_prog in flex |
7512 | do | |
7513 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7514 | set dummy $ac_prog; ac_word=$2 | |
ba479fd2 NN |
7515 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7516 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7517 | if test "${ac_cv_prog_FLEX+set}" = set; then | |
7518 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7519 | else |
7520 | if test -n "$FLEX"; then | |
7521 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
7522 | else | |
ba479fd2 NN |
7523 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7524 | for as_dir in $PATH | |
7525 | do | |
7526 | IFS=$as_save_IFS | |
7527 | test -z "$as_dir" && as_dir=. | |
7528 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7529 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7c27e184 | 7530 | ac_cv_prog_FLEX="$ac_prog" |
ba479fd2 NN |
7531 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7532 | break 2 | |
7533 | fi | |
7534 | done | |
7535 | done | |
7536 | ||
73458fb7 NN |
7537 | fi |
7538 | fi | |
ba479fd2 | 7539 | FLEX=$ac_cv_prog_FLEX |
73458fb7 | 7540 | if test -n "$FLEX"; then |
ba479fd2 NN |
7541 | echo "$as_me:$LINENO: result: $FLEX" >&5 |
7542 | echo "${ECHO_T}$FLEX" >&6 | |
73458fb7 | 7543 | else |
ba479fd2 NN |
7544 | echo "$as_me:$LINENO: result: no" >&5 |
7545 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7546 | fi |
7547 | ||
7c27e184 PB |
7548 | test -n "$FLEX" && break |
7549 | done | |
7550 | test -n "$FLEX" || FLEX="$MISSING flex" | |
7551 | ||
73458fb7 NN |
7552 | |
7553 | # Bison? | |
7c27e184 PB |
7554 | for ac_prog in bison |
7555 | do | |
7556 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7557 | set dummy $ac_prog; ac_word=$2 | |
ba479fd2 NN |
7558 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7559 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7560 | if test "${ac_cv_prog_BISON+set}" = set; then | |
7561 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7562 | else |
7563 | if test -n "$BISON"; then | |
7564 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
7565 | else | |
ba479fd2 NN |
7566 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7567 | for as_dir in $PATH | |
7568 | do | |
7569 | IFS=$as_save_IFS | |
7570 | test -z "$as_dir" && as_dir=. | |
7571 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7572 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7c27e184 | 7573 | ac_cv_prog_BISON="$ac_prog" |
ba479fd2 NN |
7574 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7575 | break 2 | |
7576 | fi | |
7577 | done | |
7578 | done | |
7579 | ||
73458fb7 NN |
7580 | fi |
7581 | fi | |
ba479fd2 | 7582 | BISON=$ac_cv_prog_BISON |
73458fb7 | 7583 | if test -n "$BISON"; then |
ba479fd2 NN |
7584 | echo "$as_me:$LINENO: result: $BISON" >&5 |
7585 | echo "${ECHO_T}$BISON" >&6 | |
73458fb7 | 7586 | else |
ba479fd2 NN |
7587 | echo "$as_me:$LINENO: result: no" >&5 |
7588 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7589 | fi |
7590 | ||
7c27e184 PB |
7591 | test -n "$BISON" && break |
7592 | done | |
7593 | test -n "$BISON" || BISON="$MISSING bison" | |
7594 | ||
7595 | ||
7596 | # Binutils are not build modules, unlike bison/flex/makeinfo. So we | |
7597 | # check for build == host before using them. | |
73458fb7 | 7598 | |
f6a874ac | 7599 | # NM |
414adbdd GK |
7600 | if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ |
7601 | && test -d ../binutils ; then | |
f6a874ac JW |
7602 | NM='$(objdir)/../binutils/nm-new' |
7603 | else | |
7604 | # Extract the first word of "nm", so it can be a program name with args. | |
7605 | set dummy nm; ac_word=$2 | |
7606 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7607 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7608 | if test "${ac_cv_prog_NM+set}" = set; then | |
7609 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7610 | else | |
7611 | if test -n "$NM"; then | |
7612 | ac_cv_prog_NM="$NM" # Let the user override the test. | |
7613 | else | |
7614 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7615 | for as_dir in $PATH | |
7616 | do | |
7617 | IFS=$as_save_IFS | |
7618 | test -z "$as_dir" && as_dir=. | |
7619 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7620 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7621 | ac_cv_prog_NM="nm" | |
7622 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7623 | break 2 | |
7624 | fi | |
7625 | done | |
7626 | done | |
7627 | ||
7628 | test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm" | |
7629 | fi | |
7630 | fi | |
7631 | NM=$ac_cv_prog_NM | |
7632 | if test -n "$NM"; then | |
7633 | echo "$as_me:$LINENO: result: $NM" >&5 | |
7634 | echo "${ECHO_T}$NM" >&6 | |
7635 | else | |
7636 | echo "$as_me:$LINENO: result: no" >&5 | |
7637 | echo "${ECHO_T}no" >&6 | |
7638 | fi | |
7639 | ||
7640 | fi | |
7641 | ||
7642 | # AR | |
414adbdd GK |
7643 | if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ |
7644 | && test -d ../binutils ; then | |
f6a874ac JW |
7645 | AR='$(objdir)/../binutils/ar' |
7646 | else | |
7647 | # Extract the first word of "ar", so it can be a program name with args. | |
7648 | set dummy ar; ac_word=$2 | |
7649 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7650 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7651 | if test "${ac_cv_prog_AR+set}" = set; then | |
7652 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7653 | else | |
7654 | if test -n "$AR"; then | |
7655 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7656 | else | |
7657 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7658 | for as_dir in $PATH | |
7659 | do | |
7660 | IFS=$as_save_IFS | |
7661 | test -z "$as_dir" && as_dir=. | |
7662 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7663 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7664 | ac_cv_prog_AR="ar" | |
7665 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7666 | break 2 | |
7667 | fi | |
7668 | done | |
7669 | done | |
7670 | ||
7671 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar" | |
7672 | fi | |
7673 | fi | |
7674 | AR=$ac_cv_prog_AR | |
7675 | if test -n "$AR"; then | |
7676 | echo "$as_me:$LINENO: result: $AR" >&5 | |
7677 | echo "${ECHO_T}$AR" >&6 | |
7678 | else | |
7679 | echo "$as_me:$LINENO: result: no" >&5 | |
7680 | echo "${ECHO_T}no" >&6 | |
7681 | fi | |
7682 | ||
7683 | fi | |
7684 | ||
7685 | ||
73458fb7 NN |
7686 | # -------------------- |
7687 | # Checks for C headers | |
7688 | # -------------------- | |
7689 | ||
ba479fd2 NN |
7690 | echo "$as_me:$LINENO: checking for GNU C library" >&5 |
7691 | echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6 | |
7692 | if test "${gcc_cv_glibc+set}" = set; then | |
7693 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7694 | else | |
7695 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7696 | /* confdefs.h. */ |
7697 | _ACEOF | |
7698 | cat confdefs.h >>conftest.$ac_ext | |
7699 | cat >>conftest.$ac_ext <<_ACEOF | |
7700 | /* end confdefs.h. */ | |
73458fb7 | 7701 | #include <features.h> |
ba479fd2 NN |
7702 | int |
7703 | main () | |
7704 | { | |
73458fb7 NN |
7705 | |
7706 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
7707 | #error Not a GNU C library system | |
7708 | #endif | |
ba479fd2 NN |
7709 | ; |
7710 | return 0; | |
7711 | } | |
7712 | _ACEOF | |
7713 | rm -f conftest.$ac_objext | |
7714 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7715 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7716 | ac_status=$? |
86da66b5 HPN |
7717 | grep -v '^ *+' conftest.er1 >conftest.err |
7718 | rm -f conftest.er1 | |
7719 | cat conftest.err >&5 | |
ba479fd2 NN |
7720 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7721 | (exit $ac_status); } && | |
d7974fe6 KC |
7722 | { ac_try='test -z "$ac_c_werror_flag" |
7723 | || test ! -s conftest.err' | |
86da66b5 HPN |
7724 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7725 | (eval $ac_try) 2>&5 | |
7726 | ac_status=$? | |
7727 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7728 | (exit $ac_status); }; } && | |
7729 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7730 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7731 | (eval $ac_try) 2>&5 | |
7732 | ac_status=$? | |
7733 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7734 | (exit $ac_status); }; }; then | |
73458fb7 NN |
7735 | gcc_cv_glibc=yes |
7736 | else | |
ba479fd2 NN |
7737 | echo "$as_me: failed program was:" >&5 |
7738 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7739 | ||
7740 | gcc_cv_glibc=no | |
73458fb7 | 7741 | fi |
86da66b5 | 7742 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
73458fb7 NN |
7743 | fi |
7744 | ||
ba479fd2 NN |
7745 | echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5 |
7746 | echo "${ECHO_T}$gcc_cv_glibc" >&6 | |
73458fb7 | 7747 | if test $gcc_cv_glibc = yes; then |
ba479fd2 NN |
7748 | |
7749 | cat >>confdefs.h <<\_ACEOF | |
73458fb7 | 7750 | #define _GNU_SOURCE 1 |
ba479fd2 | 7751 | _ACEOF |
73458fb7 NN |
7752 | |
7753 | fi | |
7754 | ||
ca9bc441 NN |
7755 | # Need to reject headers which give warnings, so that the -Werror bootstrap |
7756 | # works later. *sigh* This needs to come before all header checks. | |
7757 | ||
7758 | ac_c_preproc_warn_flag=yes | |
7759 | ||
ba479fd2 NN |
7760 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
7761 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
7762 | if test "${ac_cv_header_stdc+set}" = set; then | |
7763 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 7764 | else |
ba479fd2 | 7765 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7766 | /* confdefs.h. */ |
7767 | _ACEOF | |
7768 | cat confdefs.h >>conftest.$ac_ext | |
7769 | cat >>conftest.$ac_ext <<_ACEOF | |
7770 | /* end confdefs.h. */ | |
956d6950 JL |
7771 | #include <stdlib.h> |
7772 | #include <stdarg.h> | |
7773 | #include <string.h> | |
7774 | #include <float.h> | |
ba479fd2 NN |
7775 | |
7776 | int | |
7777 | main () | |
7778 | { | |
7779 | ||
7780 | ; | |
7781 | return 0; | |
7782 | } | |
7783 | _ACEOF | |
7784 | rm -f conftest.$ac_objext | |
7785 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7786 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7787 | ac_status=$? |
86da66b5 HPN |
7788 | grep -v '^ *+' conftest.er1 >conftest.err |
7789 | rm -f conftest.er1 | |
7790 | cat conftest.err >&5 | |
ba479fd2 NN |
7791 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7792 | (exit $ac_status); } && | |
d7974fe6 KC |
7793 | { ac_try='test -z "$ac_c_werror_flag" |
7794 | || test ! -s conftest.err' | |
86da66b5 HPN |
7795 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7796 | (eval $ac_try) 2>&5 | |
7797 | ac_status=$? | |
7798 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7799 | (exit $ac_status); }; } && | |
7800 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7801 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7802 | (eval $ac_try) 2>&5 | |
7803 | ac_status=$? | |
7804 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7805 | (exit $ac_status); }; }; then | |
956d6950 JL |
7806 | ac_cv_header_stdc=yes |
7807 | else | |
ba479fd2 NN |
7808 | echo "$as_me: failed program was:" >&5 |
7809 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7810 | ||
7811 | ac_cv_header_stdc=no | |
956d6950 | 7812 | fi |
86da66b5 | 7813 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
7814 | |
7815 | if test $ac_cv_header_stdc = yes; then | |
7816 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
ba479fd2 | 7817 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7818 | /* confdefs.h. */ |
7819 | _ACEOF | |
7820 | cat confdefs.h >>conftest.$ac_ext | |
7821 | cat >>conftest.$ac_ext <<_ACEOF | |
7822 | /* end confdefs.h. */ | |
956d6950 | 7823 | #include <string.h> |
ba479fd2 NN |
7824 | |
7825 | _ACEOF | |
956d6950 | 7826 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 7827 | $EGREP "memchr" >/dev/null 2>&1; then |
956d6950 JL |
7828 | : |
7829 | else | |
956d6950 JL |
7830 | ac_cv_header_stdc=no |
7831 | fi | |
7832 | rm -f conftest* | |
7833 | ||
7834 | fi | |
7835 | ||
7836 | if test $ac_cv_header_stdc = yes; then | |
7837 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
ba479fd2 | 7838 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7839 | /* confdefs.h. */ |
7840 | _ACEOF | |
7841 | cat confdefs.h >>conftest.$ac_ext | |
7842 | cat >>conftest.$ac_ext <<_ACEOF | |
7843 | /* end confdefs.h. */ | |
956d6950 | 7844 | #include <stdlib.h> |
ba479fd2 NN |
7845 | |
7846 | _ACEOF | |
956d6950 | 7847 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 7848 | $EGREP "free" >/dev/null 2>&1; then |
956d6950 JL |
7849 | : |
7850 | else | |
956d6950 JL |
7851 | ac_cv_header_stdc=no |
7852 | fi | |
7853 | rm -f conftest* | |
7854 | ||
7855 | fi | |
7856 | ||
7857 | if test $ac_cv_header_stdc = yes; then | |
7858 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
ba479fd2 | 7859 | if test "$cross_compiling" = yes; then |
956d6950 JL |
7860 | : |
7861 | else | |
ba479fd2 | 7862 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7863 | /* confdefs.h. */ |
7864 | _ACEOF | |
7865 | cat confdefs.h >>conftest.$ac_ext | |
7866 | cat >>conftest.$ac_ext <<_ACEOF | |
7867 | /* end confdefs.h. */ | |
956d6950 | 7868 | #include <ctype.h> |
ba479fd2 NN |
7869 | #if ((' ' & 0x0FF) == 0x020) |
7870 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
7871 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
7872 | #else | |
7873 | # define ISLOWER(c) \ | |
86da66b5 HPN |
7874 | (('a' <= (c) && (c) <= 'i') \ |
7875 | || ('j' <= (c) && (c) <= 'r') \ | |
7876 | || ('s' <= (c) && (c) <= 'z')) | |
ba479fd2 NN |
7877 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
7878 | #endif | |
63cf211a | 7879 | |
ba479fd2 NN |
7880 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
7881 | int | |
7882 | main () | |
7883 | { | |
7884 | int i; | |
7885 | for (i = 0; i < 256; i++) | |
7886 | if (XOR (islower (i), ISLOWER (i)) | |
86da66b5 | 7887 | || toupper (i) != TOUPPER (i)) |
ba479fd2 NN |
7888 | exit(2); |
7889 | exit (0); | |
7890 | } | |
7891 | _ACEOF | |
7892 | rm -f conftest$ac_exeext | |
7893 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7894 | (eval $ac_link) 2>&5 | |
7895 | ac_status=$? | |
7896 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7897 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
7898 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7899 | (eval $ac_try) 2>&5 | |
7900 | ac_status=$? | |
7901 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7902 | (exit $ac_status); }; }; then | |
956d6950 JL |
7903 | : |
7904 | else | |
ba479fd2 NN |
7905 | echo "$as_me: program exited with status $ac_status" >&5 |
7906 | echo "$as_me: failed program was:" >&5 | |
7907 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7908 | ||
7909 | ( exit $ac_status ) | |
7910 | ac_cv_header_stdc=no | |
956d6950 | 7911 | fi |
86da66b5 | 7912 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
956d6950 | 7913 | fi |
956d6950 JL |
7914 | fi |
7915 | fi | |
ba479fd2 NN |
7916 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 |
7917 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
63cf211a | 7918 | if test $ac_cv_header_stdc = yes; then |
ba479fd2 NN |
7919 | |
7920 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 7921 | #define STDC_HEADERS 1 |
ba479fd2 | 7922 | _ACEOF |
956d6950 JL |
7923 | |
7924 | fi | |
7925 | ||
ba479fd2 NN |
7926 | echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 |
7927 | echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 | |
7928 | if test "${ac_cv_header_time+set}" = set; then | |
7929 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 7930 | else |
ba479fd2 | 7931 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7932 | /* confdefs.h. */ |
7933 | _ACEOF | |
7934 | cat confdefs.h >>conftest.$ac_ext | |
7935 | cat >>conftest.$ac_ext <<_ACEOF | |
7936 | /* end confdefs.h. */ | |
956d6950 JL |
7937 | #include <sys/types.h> |
7938 | #include <sys/time.h> | |
7939 | #include <time.h> | |
ba479fd2 NN |
7940 | |
7941 | int | |
7942 | main () | |
7943 | { | |
7944 | if ((struct tm *) 0) | |
7945 | return 0; | |
7946 | ; | |
7947 | return 0; | |
7948 | } | |
7949 | _ACEOF | |
7950 | rm -f conftest.$ac_objext | |
7951 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7952 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7953 | ac_status=$? |
86da66b5 HPN |
7954 | grep -v '^ *+' conftest.er1 >conftest.err |
7955 | rm -f conftest.er1 | |
7956 | cat conftest.err >&5 | |
ba479fd2 NN |
7957 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7958 | (exit $ac_status); } && | |
d7974fe6 KC |
7959 | { ac_try='test -z "$ac_c_werror_flag" |
7960 | || test ! -s conftest.err' | |
86da66b5 HPN |
7961 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7962 | (eval $ac_try) 2>&5 | |
7963 | ac_status=$? | |
7964 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7965 | (exit $ac_status); }; } && | |
7966 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
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); }; }; then | |
956d6950 JL |
7972 | ac_cv_header_time=yes |
7973 | else | |
ba479fd2 NN |
7974 | echo "$as_me: failed program was:" >&5 |
7975 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7976 | ||
7977 | ac_cv_header_time=no | |
956d6950 | 7978 | fi |
86da66b5 | 7979 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 | 7980 | fi |
ba479fd2 NN |
7981 | echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 |
7982 | echo "${ECHO_T}$ac_cv_header_time" >&6 | |
63cf211a | 7983 | if test $ac_cv_header_time = yes; then |
ba479fd2 NN |
7984 | |
7985 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 7986 | #define TIME_WITH_SYS_TIME 1 |
ba479fd2 | 7987 | _ACEOF |
956d6950 JL |
7988 | |
7989 | fi | |
7990 | ||
41e622a8 AP |
7991 | echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 |
7992 | echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6 | |
7993 | if test "${gcc_cv_header_string+set}" = set; then | |
7994 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7995 | else | |
7996 | cat >conftest.$ac_ext <<_ACEOF | |
7997 | /* confdefs.h. */ | |
7998 | _ACEOF | |
7999 | cat confdefs.h >>conftest.$ac_ext | |
8000 | cat >>conftest.$ac_ext <<_ACEOF | |
8001 | /* end confdefs.h. */ | |
8002 | #include <string.h> | |
8003 | #include <strings.h> | |
8004 | int | |
8005 | main () | |
8006 | { | |
8007 | ||
8008 | ; | |
8009 | return 0; | |
8010 | } | |
8011 | _ACEOF | |
8012 | rm -f conftest.$ac_objext | |
8013 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8014 | (eval $ac_compile) 2>conftest.er1 | |
8015 | ac_status=$? | |
8016 | grep -v '^ *+' conftest.er1 >conftest.err | |
8017 | rm -f conftest.er1 | |
8018 | cat conftest.err >&5 | |
8019 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8020 | (exit $ac_status); } && | |
d7974fe6 KC |
8021 | { ac_try='test -z "$ac_c_werror_flag" |
8022 | || test ! -s conftest.err' | |
41e622a8 AP |
8023 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8024 | (eval $ac_try) 2>&5 | |
8025 | ac_status=$? | |
8026 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8027 | (exit $ac_status); }; } && | |
8028 | { ac_try='test -s conftest.$ac_objext' | |
8029 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8030 | (eval $ac_try) 2>&5 | |
8031 | ac_status=$? | |
8032 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8033 | (exit $ac_status); }; }; then | |
8034 | gcc_cv_header_string=yes | |
8035 | else | |
8036 | echo "$as_me: failed program was:" >&5 | |
8037 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8038 | ||
8039 | gcc_cv_header_string=no | |
8040 | fi | |
8041 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
8042 | fi | |
8043 | echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 | |
8044 | echo "${ECHO_T}$gcc_cv_header_string" >&6 | |
8045 | if test $gcc_cv_header_string = yes; then | |
8046 | ||
8047 | cat >>confdefs.h <<\_ACEOF | |
8048 | #define STRING_WITH_STRINGS 1 | |
8049 | _ACEOF | |
8050 | ||
8051 | fi | |
8052 | ||
ba479fd2 NN |
8053 | echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
8054 | echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 | |
8055 | if test "${ac_cv_header_sys_wait_h+set}" = set; then | |
8056 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9831ca0 | 8057 | else |
ba479fd2 | 8058 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8059 | /* confdefs.h. */ |
8060 | _ACEOF | |
8061 | cat confdefs.h >>conftest.$ac_ext | |
8062 | cat >>conftest.$ac_ext <<_ACEOF | |
8063 | /* end confdefs.h. */ | |
e9831ca0 KG |
8064 | #include <sys/types.h> |
8065 | #include <sys/wait.h> | |
8066 | #ifndef WEXITSTATUS | |
ba479fd2 | 8067 | # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
e9831ca0 KG |
8068 | #endif |
8069 | #ifndef WIFEXITED | |
ba479fd2 | 8070 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 8071 | #endif |
ba479fd2 NN |
8072 | |
8073 | int | |
8074 | main () | |
8075 | { | |
8076 | int s; | |
8077 | wait (&s); | |
8078 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
8079 | ; | |
8080 | return 0; | |
8081 | } | |
8082 | _ACEOF | |
8083 | rm -f conftest.$ac_objext | |
8084 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8085 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8086 | ac_status=$? |
86da66b5 HPN |
8087 | grep -v '^ *+' conftest.er1 >conftest.err |
8088 | rm -f conftest.er1 | |
8089 | cat conftest.err >&5 | |
ba479fd2 NN |
8090 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8091 | (exit $ac_status); } && | |
d7974fe6 KC |
8092 | { ac_try='test -z "$ac_c_werror_flag" |
8093 | || test ! -s conftest.err' | |
86da66b5 HPN |
8094 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8095 | (eval $ac_try) 2>&5 | |
8096 | ac_status=$? | |
8097 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8098 | (exit $ac_status); }; } && | |
8099 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8100 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8101 | (eval $ac_try) 2>&5 | |
8102 | ac_status=$? | |
8103 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8104 | (exit $ac_status); }; }; then | |
e9831ca0 KG |
8105 | ac_cv_header_sys_wait_h=yes |
8106 | else | |
ba479fd2 NN |
8107 | echo "$as_me: failed program was:" >&5 |
8108 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8109 | ||
8110 | ac_cv_header_sys_wait_h=no | |
e9831ca0 | 8111 | fi |
86da66b5 | 8112 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
e9831ca0 | 8113 | fi |
ba479fd2 NN |
8114 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 |
8115 | echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 | |
63cf211a | 8116 | if test $ac_cv_header_sys_wait_h = yes; then |
ba479fd2 NN |
8117 | |
8118 | cat >>confdefs.h <<\_ACEOF | |
e9831ca0 | 8119 | #define HAVE_SYS_WAIT_H 1 |
ba479fd2 | 8120 | _ACEOF |
6e3f3080 | 8121 | |
63cf211a | 8122 | fi |
6e3f3080 | 8123 | |
ba479fd2 NN |
8124 | |
8125 | ||
8126 | ||
8127 | ||
8128 | ||
8129 | ||
8130 | ||
8131 | ||
8132 | ||
8133 | ||
8134 | ||
8135 | ||
8136 | ||
8137 | ||
8138 | ||
8139 | ||
8140 | ||
8141 | ||
8142 | ||
8143 | ||
8144 | ||
dfb77e37 KC |
8145 | |
8146 | for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \ | |
1072ec3f | 8147 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 8148 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
56694dd9 | 8149 | direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h |
861bb6c1 | 8150 | do |
ba479fd2 | 8151 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
ca9bc441 | 8152 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
8153 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
8154 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
8155 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 8156 | else |
ca9bc441 | 8157 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8158 | /* confdefs.h. */ |
8159 | _ACEOF | |
8160 | cat confdefs.h >>conftest.$ac_ext | |
8161 | cat >>conftest.$ac_ext <<_ACEOF | |
8162 | /* end confdefs.h. */ | |
8163 | #include <$ac_header> | |
8164 | _ACEOF | |
8165 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8166 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8167 | ac_status=$? | |
8168 | grep -v '^ *+' conftest.er1 >conftest.err | |
8169 | rm -f conftest.er1 | |
8170 | cat conftest.err >&5 | |
8171 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8172 | (exit $ac_status); } >/dev/null; then | |
8173 | if test -s conftest.err; then | |
8174 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8175 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8176 | else |
8177 | ac_cpp_err= | |
8178 | fi | |
8179 | else | |
8180 | ac_cpp_err=yes | |
8181 | fi | |
8182 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 8183 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
8184 | else |
8185 | echo "$as_me: failed program was:" >&5 | |
8186 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8187 | ||
ca9bc441 | 8188 | eval "$as_ac_Header=no" |
ba479fd2 NN |
8189 | fi |
8190 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8191 | fi |
ba479fd2 NN |
8192 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
8193 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
8194 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
8195 | cat >>confdefs.h <<_ACEOF | |
8196 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8197 | _ACEOF | |
8198 | ||
956d6950 JL |
8199 | fi |
8200 | done | |
8201 | ||
8202 | ||
f24af81b | 8203 | # Check for thread headers. |
ca9bc441 | 8204 | echo "$as_me:$LINENO: checking for thread.h" >&5 |
ba479fd2 NN |
8205 | echo $ECHO_N "checking for thread.h... $ECHO_C" >&6 |
8206 | if test "${ac_cv_header_thread_h+set}" = set; then | |
8207 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 8208 | else |
ca9bc441 | 8209 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8210 | /* confdefs.h. */ |
8211 | _ACEOF | |
8212 | cat confdefs.h >>conftest.$ac_ext | |
8213 | cat >>conftest.$ac_ext <<_ACEOF | |
8214 | /* end confdefs.h. */ | |
8215 | #include <thread.h> | |
8216 | _ACEOF | |
8217 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8218 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8219 | ac_status=$? | |
8220 | grep -v '^ *+' conftest.er1 >conftest.err | |
8221 | rm -f conftest.er1 | |
8222 | cat conftest.err >&5 | |
8223 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8224 | (exit $ac_status); } >/dev/null; then | |
8225 | if test -s conftest.err; then | |
8226 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8227 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8228 | else |
8229 | ac_cpp_err= | |
8230 | fi | |
8231 | else | |
8232 | ac_cpp_err=yes | |
8233 | fi | |
8234 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 8235 | ac_cv_header_thread_h=yes |
ba479fd2 NN |
8236 | else |
8237 | echo "$as_me: failed program was:" >&5 | |
8238 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8239 | ||
ca9bc441 | 8240 | ac_cv_header_thread_h=no |
ba479fd2 NN |
8241 | fi |
8242 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8243 | fi |
ba479fd2 NN |
8244 | echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5 |
8245 | echo "${ECHO_T}$ac_cv_header_thread_h" >&6 | |
ba479fd2 | 8246 | if test $ac_cv_header_thread_h = yes; then |
f24af81b TT |
8247 | have_thread_h=yes |
8248 | else | |
ba479fd2 | 8249 | have_thread_h= |
f24af81b TT |
8250 | fi |
8251 | ||
ca9bc441 | 8252 | echo "$as_me:$LINENO: checking for pthread.h" >&5 |
ba479fd2 NN |
8253 | echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 |
8254 | if test "${ac_cv_header_pthread_h+set}" = set; then | |
8255 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f24af81b | 8256 | else |
ca9bc441 | 8257 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8258 | /* confdefs.h. */ |
8259 | _ACEOF | |
8260 | cat confdefs.h >>conftest.$ac_ext | |
8261 | cat >>conftest.$ac_ext <<_ACEOF | |
8262 | /* end confdefs.h. */ | |
8263 | #include <pthread.h> | |
8264 | _ACEOF | |
8265 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8266 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8267 | ac_status=$? | |
8268 | grep -v '^ *+' conftest.er1 >conftest.err | |
8269 | rm -f conftest.er1 | |
8270 | cat conftest.err >&5 | |
8271 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8272 | (exit $ac_status); } >/dev/null; then | |
8273 | if test -s conftest.err; then | |
8274 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8275 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8276 | else |
8277 | ac_cpp_err= | |
8278 | fi | |
8279 | else | |
8280 | ac_cpp_err=yes | |
8281 | fi | |
8282 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 8283 | ac_cv_header_pthread_h=yes |
ba479fd2 NN |
8284 | else |
8285 | echo "$as_me: failed program was:" >&5 | |
8286 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8287 | ||
ca9bc441 | 8288 | ac_cv_header_pthread_h=no |
ba479fd2 NN |
8289 | fi |
8290 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8291 | fi |
ba479fd2 NN |
8292 | echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 |
8293 | echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 | |
ba479fd2 | 8294 | if test $ac_cv_header_pthread_h = yes; then |
f24af81b TT |
8295 | have_pthread_h=yes |
8296 | else | |
ba479fd2 | 8297 | have_pthread_h= |
f24af81b TT |
8298 | fi |
8299 | ||
8300 | ||
84c041a1 | 8301 | # These tests can't be done till we know if we have limits.h. |
ba479fd2 NN |
8302 | echo "$as_me:$LINENO: checking for CHAR_BIT" >&5 |
8303 | echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6 | |
8304 | if test "${gcc_cv_decl_char_bit+set}" = set; then | |
8305 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8306 | else | |
8307 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8308 | /* confdefs.h. */ |
8309 | _ACEOF | |
8310 | cat confdefs.h >>conftest.$ac_ext | |
8311 | cat >>conftest.$ac_ext <<_ACEOF | |
8312 | /* end confdefs.h. */ | |
75e93faa ZW |
8313 | #ifdef HAVE_LIMITS_H |
8314 | #include <limits.h> | |
8315 | #endif | |
8316 | #ifdef CHAR_BIT | |
8317 | found | |
8318 | #endif | |
ba479fd2 | 8319 | _ACEOF |
75e93faa | 8320 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8321 | $EGREP "found" >/dev/null 2>&1; then |
75e93faa ZW |
8322 | gcc_cv_decl_char_bit=yes |
8323 | else | |
75e93faa ZW |
8324 | gcc_cv_decl_char_bit=no |
8325 | fi | |
8326 | rm -f conftest* | |
8327 | ||
8328 | ||
8329 | fi | |
ba479fd2 NN |
8330 | echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5 |
8331 | echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6 | |
75e93faa | 8332 | if test $gcc_cv_decl_char_bit = no; then |
ba479fd2 NN |
8333 | echo "$as_me:$LINENO: checking number of bits in a byte" >&5 |
8334 | echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6 | |
8335 | if test "${gcc_cv_c_nbby+set}" = set; then | |
8336 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa ZW |
8337 | else |
8338 | i=8 | |
8339 | gcc_cv_c_nbby= | |
8340 | while test $i -lt 65; do | |
ba479fd2 | 8341 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8342 | /* confdefs.h. */ |
8343 | _ACEOF | |
8344 | cat confdefs.h >>conftest.$ac_ext | |
8345 | cat >>conftest.$ac_ext <<_ACEOF | |
8346 | /* end confdefs.h. */ | |
8347 | ||
8348 | int | |
8349 | main () | |
8350 | { | |
4e70264f ZW |
8351 | switch(0) { |
8352 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
8353 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
8354 | ; } | |
ba479fd2 NN |
8355 | ; |
8356 | return 0; | |
8357 | } | |
8358 | _ACEOF | |
8359 | rm -f conftest.$ac_objext | |
8360 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8361 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8362 | ac_status=$? |
86da66b5 HPN |
8363 | grep -v '^ *+' conftest.er1 >conftest.err |
8364 | rm -f conftest.er1 | |
8365 | cat conftest.err >&5 | |
ba479fd2 NN |
8366 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8367 | (exit $ac_status); } && | |
d7974fe6 KC |
8368 | { ac_try='test -z "$ac_c_werror_flag" |
8369 | || test ! -s conftest.err' | |
86da66b5 HPN |
8370 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8371 | (eval $ac_try) 2>&5 | |
8372 | ac_status=$? | |
8373 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8374 | (exit $ac_status); }; } && | |
8375 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8376 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8377 | (eval $ac_try) 2>&5 | |
8378 | ac_status=$? | |
8379 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8380 | (exit $ac_status); }; }; then | |
4e70264f | 8381 | gcc_cv_c_nbby=$i; break |
75e93faa | 8382 | else |
ba479fd2 NN |
8383 | echo "$as_me: failed program was:" >&5 |
8384 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8385 | ||
75e93faa | 8386 | fi |
86da66b5 | 8387 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75e93faa ZW |
8388 | i=`expr $i + 1` |
8389 | done | |
8390 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
8391 | ||
8392 | fi | |
ba479fd2 NN |
8393 | echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5 |
8394 | echo "${ECHO_T}$gcc_cv_c_nbby" >&6 | |
75e93faa | 8395 | if test $gcc_cv_c_nbby = failed; then |
ba479fd2 NN |
8396 | { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5 |
8397 | echo "$as_me: error: cannot determine number of bits in a byte" >&2;} | |
8398 | { (exit 1); exit 1; }; } | |
75e93faa | 8399 | else |
ba479fd2 NN |
8400 | |
8401 | cat >>confdefs.h <<_ACEOF | |
75e93faa | 8402 | #define CHAR_BIT $gcc_cv_c_nbby |
ba479fd2 | 8403 | _ACEOF |
75e93faa ZW |
8404 | |
8405 | fi | |
8406 | fi | |
ba479fd2 NN |
8407 | echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 |
8408 | echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 | |
8409 | if test "${ac_cv_c_bigendian+set}" = set; then | |
8410 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
84c041a1 | 8411 | else |
9791c75c | 8412 | # See if sys/param.h defines the BYTE_ORDER macro. |
ba479fd2 | 8413 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8414 | /* confdefs.h. */ |
8415 | _ACEOF | |
8416 | cat confdefs.h >>conftest.$ac_ext | |
8417 | cat >>conftest.$ac_ext <<_ACEOF | |
8418 | /* end confdefs.h. */ | |
4977bab6 ZW |
8419 | #include <sys/types.h> |
8420 | #include <sys/param.h> | |
9791c75c | 8421 | |
ba479fd2 NN |
8422 | int |
8423 | main () | |
8424 | { | |
4977bab6 ZW |
8425 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
8426 | bogus endian macros | |
84c041a1 | 8427 | #endif |
9791c75c | 8428 | |
ba479fd2 NN |
8429 | ; |
8430 | return 0; | |
8431 | } | |
8432 | _ACEOF | |
8433 | rm -f conftest.$ac_objext | |
8434 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8435 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8436 | ac_status=$? |
86da66b5 HPN |
8437 | grep -v '^ *+' conftest.er1 >conftest.err |
8438 | rm -f conftest.er1 | |
8439 | cat conftest.err >&5 | |
ba479fd2 NN |
8440 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8441 | (exit $ac_status); } && | |
d7974fe6 KC |
8442 | { ac_try='test -z "$ac_c_werror_flag" |
8443 | || test ! -s conftest.err' | |
86da66b5 HPN |
8444 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8445 | (eval $ac_try) 2>&5 | |
8446 | ac_status=$? | |
8447 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8448 | (exit $ac_status); }; } && | |
8449 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8450 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8451 | (eval $ac_try) 2>&5 | |
8452 | ac_status=$? | |
8453 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8454 | (exit $ac_status); }; }; then | |
4977bab6 | 8455 | # It does; now see whether it defined to BIG_ENDIAN or not. |
ba479fd2 | 8456 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8457 | /* confdefs.h. */ |
8458 | _ACEOF | |
8459 | cat confdefs.h >>conftest.$ac_ext | |
8460 | cat >>conftest.$ac_ext <<_ACEOF | |
8461 | /* end confdefs.h. */ | |
4977bab6 ZW |
8462 | #include <sys/types.h> |
8463 | #include <sys/param.h> | |
9791c75c | 8464 | |
ba479fd2 NN |
8465 | int |
8466 | main () | |
8467 | { | |
4977bab6 ZW |
8468 | #if BYTE_ORDER != BIG_ENDIAN |
8469 | not big endian | |
84c041a1 | 8470 | #endif |
9791c75c | 8471 | |
ba479fd2 NN |
8472 | ; |
8473 | return 0; | |
8474 | } | |
8475 | _ACEOF | |
8476 | rm -f conftest.$ac_objext | |
8477 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8478 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8479 | ac_status=$? |
86da66b5 HPN |
8480 | grep -v '^ *+' conftest.er1 >conftest.err |
8481 | rm -f conftest.er1 | |
8482 | cat conftest.err >&5 | |
ba479fd2 NN |
8483 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8484 | (exit $ac_status); } && | |
d7974fe6 KC |
8485 | { ac_try='test -z "$ac_c_werror_flag" |
8486 | || test ! -s conftest.err' | |
86da66b5 HPN |
8487 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8488 | (eval $ac_try) 2>&5 | |
8489 | ac_status=$? | |
8490 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8491 | (exit $ac_status); }; } && | |
8492 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8493 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8494 | (eval $ac_try) 2>&5 | |
8495 | ac_status=$? | |
8496 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8497 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
8498 | ac_cv_c_bigendian=yes |
8499 | else | |
ba479fd2 NN |
8500 | echo "$as_me: failed program was:" >&5 |
8501 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8502 | ||
8503 | ac_cv_c_bigendian=no | |
4977bab6 | 8504 | fi |
86da66b5 | 8505 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 8506 | else |
ba479fd2 NN |
8507 | echo "$as_me: failed program was:" >&5 |
8508 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8509 | ||
9791c75c KC |
8510 | # It does not; compile a test program. |
8511 | if test "$cross_compiling" = yes; then | |
8512 | # try to guess the endianness by grepping values into an object file | |
8513 | ac_cv_c_bigendian=unknown | |
8514 | cat >conftest.$ac_ext <<_ACEOF | |
8515 | /* confdefs.h. */ | |
8516 | _ACEOF | |
8517 | cat confdefs.h >>conftest.$ac_ext | |
8518 | cat >>conftest.$ac_ext <<_ACEOF | |
8519 | /* end confdefs.h. */ | |
8520 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
8521 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
8522 | void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } | |
8523 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
8524 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
8525 | void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } | |
8526 | int | |
8527 | main () | |
8528 | { | |
8529 | _ascii (); _ebcdic (); | |
8530 | ; | |
8531 | return 0; | |
8532 | } | |
8533 | _ACEOF | |
8534 | rm -f conftest.$ac_objext | |
8535 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8536 | (eval $ac_compile) 2>conftest.er1 | |
8537 | ac_status=$? | |
8538 | grep -v '^ *+' conftest.er1 >conftest.err | |
8539 | rm -f conftest.er1 | |
8540 | cat conftest.err >&5 | |
8541 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8542 | (exit $ac_status); } && | |
d7974fe6 KC |
8543 | { ac_try='test -z "$ac_c_werror_flag" |
8544 | || test ! -s conftest.err' | |
9791c75c KC |
8545 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8546 | (eval $ac_try) 2>&5 | |
8547 | ac_status=$? | |
8548 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8549 | (exit $ac_status); }; } && | |
8550 | { ac_try='test -s conftest.$ac_objext' | |
8551 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8552 | (eval $ac_try) 2>&5 | |
8553 | ac_status=$? | |
8554 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8555 | (exit $ac_status); }; }; then | |
8556 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then | |
8557 | ac_cv_c_bigendian=yes | |
8558 | fi | |
8559 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
8560 | if test "$ac_cv_c_bigendian" = unknown; then | |
8561 | ac_cv_c_bigendian=no | |
8562 | else | |
8563 | # finding both strings is unlikely to happen, but who knows? | |
8564 | ac_cv_c_bigendian=unknown | |
8565 | fi | |
8566 | fi | |
8567 | else | |
8568 | echo "$as_me: failed program was:" >&5 | |
8569 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8570 | ||
4977bab6 | 8571 | fi |
86da66b5 | 8572 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
8573 | else |
8574 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8575 | /* confdefs.h. */ |
8576 | _ACEOF | |
8577 | cat confdefs.h >>conftest.$ac_ext | |
8578 | cat >>conftest.$ac_ext <<_ACEOF | |
8579 | /* end confdefs.h. */ | |
9791c75c KC |
8580 | int |
8581 | main () | |
8582 | { | |
4977bab6 ZW |
8583 | /* Are we little or big endian? From Harbison&Steele. */ |
8584 | union | |
8585 | { | |
8586 | long l; | |
8587 | char c[sizeof (long)]; | |
8588 | } u; | |
8589 | u.l = 1; | |
8590 | exit (u.c[sizeof (long) - 1] == 1); | |
8591 | } | |
ba479fd2 NN |
8592 | _ACEOF |
8593 | rm -f conftest$ac_exeext | |
8594 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8595 | (eval $ac_link) 2>&5 | |
8596 | ac_status=$? | |
8597 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8598 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
8599 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8600 | (eval $ac_try) 2>&5 | |
8601 | ac_status=$? | |
8602 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8603 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
8604 | ac_cv_c_bigendian=no |
8605 | else | |
ba479fd2 NN |
8606 | echo "$as_me: program exited with status $ac_status" >&5 |
8607 | echo "$as_me: failed program was:" >&5 | |
8608 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8609 | ||
8610 | ( exit $ac_status ) | |
8611 | ac_cv_c_bigendian=yes | |
4977bab6 | 8612 | fi |
86da66b5 | 8613 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
84c041a1 | 8614 | fi |
4977bab6 | 8615 | fi |
9791c75c | 8616 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 8617 | fi |
ba479fd2 NN |
8618 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 |
8619 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
9791c75c KC |
8620 | case $ac_cv_c_bigendian in |
8621 | yes) | |
ba479fd2 NN |
8622 | |
8623 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 8624 | #define WORDS_BIGENDIAN 1 |
ba479fd2 | 8625 | _ACEOF |
9791c75c KC |
8626 | ;; |
8627 | no) | |
8628 | ;; | |
8629 | *) | |
8630 | { { echo "$as_me:$LINENO: error: unknown endianness | |
8631 | presetting ac_cv_c_bigendian=no (or yes) will help" >&5 | |
8632 | echo "$as_me: error: unknown endianness | |
8633 | presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} | |
8634 | { (exit 1); exit 1; }; } ;; | |
8635 | esac | |
84c041a1 | 8636 | |
75e93faa | 8637 | |
73458fb7 NN |
8638 | # -------- |
8639 | # UNSORTED | |
8640 | # -------- | |
1e608388 | 8641 | |
73458fb7 NN |
8642 | # Stage specific cflags for build. |
8643 | stage1_cflags= | |
8644 | case $build in | |
8645 | vax-*-*) | |
8646 | if test x$GCC = xyes | |
8647 | then | |
8648 | stage1_cflags="-Wa,-J" | |
8649 | else | |
8650 | stage1_cflags="-J" | |
8651 | fi | |
8652 | ;; | |
8653 | powerpc-*-darwin*) | |
8654 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
8655 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
8656 | # Apple's GCC has bugs in designated initializer handling, so disable | |
8657 | # that too. | |
8658 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
8659 | ;; | |
8660 | esac | |
1e608388 | 8661 | |
1e608388 | 8662 | |
4e70264f ZW |
8663 | # These libraries may be used by collect2. |
8664 | # We may need a special search path to get them linked. | |
ba479fd2 NN |
8665 | echo "$as_me:$LINENO: checking for collect2 libraries" >&5 |
8666 | echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6 | |
8667 | if test "${gcc_cv_collect2_libs+set}" = set; then | |
8668 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4e70264f ZW |
8669 | else |
8670 | save_LIBS="$LIBS" | |
7f2749d4 | 8671 | for libs in '' -lld -lmld \ |
4e70264f ZW |
8672 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
8673 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
8674 | do | |
8675 | LIBS="$libs" | |
ba479fd2 | 8676 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8677 | /* confdefs.h. */ |
8678 | _ACEOF | |
8679 | cat confdefs.h >>conftest.$ac_ext | |
8680 | cat >>conftest.$ac_ext <<_ACEOF | |
8681 | /* end confdefs.h. */ | |
8682 | ||
4e70264f | 8683 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8684 | #ifdef __cplusplus |
8685 | extern "C" | |
8686 | #endif | |
4e70264f | 8687 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8688 | builtin and then its argument prototype would still apply. */ |
8689 | char ldopen (); | |
8690 | int | |
8691 | main () | |
8692 | { | |
8693 | ldopen (); | |
8694 | ; | |
8695 | return 0; | |
8696 | } | |
8697 | _ACEOF | |
8698 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8699 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8700 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8701 | ac_status=$? |
86da66b5 HPN |
8702 | grep -v '^ *+' conftest.er1 >conftest.err |
8703 | rm -f conftest.er1 | |
8704 | cat conftest.err >&5 | |
ba479fd2 NN |
8705 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8706 | (exit $ac_status); } && | |
d7974fe6 KC |
8707 | { ac_try='test -z "$ac_c_werror_flag" |
8708 | || test ! -s conftest.err' | |
86da66b5 HPN |
8709 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8710 | (eval $ac_try) 2>&5 | |
8711 | ac_status=$? | |
8712 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8713 | (exit $ac_status); }; } && | |
8714 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8715 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8716 | (eval $ac_try) 2>&5 | |
8717 | ac_status=$? | |
8718 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8719 | (exit $ac_status); }; }; then | |
4e70264f ZW |
8720 | gcc_cv_collect2_libs="$libs"; break |
8721 | else | |
ba479fd2 NN |
8722 | echo "$as_me: failed program was:" >&5 |
8723 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8724 | ||
4e70264f | 8725 | fi |
86da66b5 HPN |
8726 | rm -f conftest.err conftest.$ac_objext \ |
8727 | conftest$ac_exeext conftest.$ac_ext | |
4e70264f ZW |
8728 | done |
8729 | LIBS="$save_LIBS" | |
8730 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
8731 | fi | |
ba479fd2 NN |
8732 | echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5 |
8733 | echo "${ECHO_T}$gcc_cv_collect2_libs" >&6 | |
4e70264f ZW |
8734 | case $gcc_cv_collect2_libs in |
8735 | "none required") ;; | |
8736 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
8737 | esac | |
8738 | ||
8739 | ||
7f2749d4 RK |
8740 | # When building Ada code on Alpha, we need exc_resume which is usually in |
8741 | # -lexc. So test for it. | |
8742 | save_LIBS="$LIBS" | |
8743 | LIBS= | |
ba479fd2 NN |
8744 | echo "$as_me:$LINENO: checking for library containing exc_resume" >&5 |
8745 | echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6 | |
8746 | if test "${ac_cv_search_exc_resume+set}" = set; then | |
8747 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8748 | else | |
8749 | ac_func_search_save_LIBS=$LIBS | |
8750 | ac_cv_search_exc_resume=no | |
8751 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8752 | /* confdefs.h. */ |
8753 | _ACEOF | |
8754 | cat confdefs.h >>conftest.$ac_ext | |
8755 | cat >>conftest.$ac_ext <<_ACEOF | |
8756 | /* end confdefs.h. */ | |
7f2749d4 | 8757 | |
7f2749d4 | 8758 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8759 | #ifdef __cplusplus |
8760 | extern "C" | |
8761 | #endif | |
7f2749d4 | 8762 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8763 | builtin and then its argument prototype would still apply. */ |
8764 | char exc_resume (); | |
8765 | int | |
8766 | main () | |
8767 | { | |
8768 | exc_resume (); | |
8769 | ; | |
8770 | return 0; | |
8771 | } | |
8772 | _ACEOF | |
8773 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8774 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8775 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8776 | ac_status=$? |
86da66b5 HPN |
8777 | grep -v '^ *+' conftest.er1 >conftest.err |
8778 | rm -f conftest.er1 | |
8779 | cat conftest.err >&5 | |
ba479fd2 NN |
8780 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8781 | (exit $ac_status); } && | |
d7974fe6 KC |
8782 | { ac_try='test -z "$ac_c_werror_flag" |
8783 | || test ! -s conftest.err' | |
86da66b5 HPN |
8784 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8785 | (eval $ac_try) 2>&5 | |
8786 | ac_status=$? | |
8787 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8788 | (exit $ac_status); }; } && | |
8789 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8790 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8791 | (eval $ac_try) 2>&5 | |
8792 | ac_status=$? | |
8793 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8794 | (exit $ac_status); }; }; then | |
7f2749d4 RK |
8795 | ac_cv_search_exc_resume="none required" |
8796 | else | |
ba479fd2 NN |
8797 | echo "$as_me: failed program was:" >&5 |
8798 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8799 | ||
7f2749d4 | 8800 | fi |
86da66b5 HPN |
8801 | rm -f conftest.err conftest.$ac_objext \ |
8802 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
8803 | if test "$ac_cv_search_exc_resume" = no; then |
8804 | for ac_lib in exc; do | |
8805 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8806 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8807 | /* confdefs.h. */ |
8808 | _ACEOF | |
8809 | cat confdefs.h >>conftest.$ac_ext | |
8810 | cat >>conftest.$ac_ext <<_ACEOF | |
8811 | /* end confdefs.h. */ | |
8812 | ||
7f2749d4 | 8813 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8814 | #ifdef __cplusplus |
8815 | extern "C" | |
8816 | #endif | |
7f2749d4 | 8817 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8818 | builtin and then its argument prototype would still apply. */ |
8819 | char exc_resume (); | |
8820 | int | |
8821 | main () | |
8822 | { | |
8823 | exc_resume (); | |
8824 | ; | |
8825 | return 0; | |
8826 | } | |
8827 | _ACEOF | |
8828 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8829 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8830 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8831 | ac_status=$? |
86da66b5 HPN |
8832 | grep -v '^ *+' conftest.er1 >conftest.err |
8833 | rm -f conftest.er1 | |
8834 | cat conftest.err >&5 | |
ba479fd2 NN |
8835 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8836 | (exit $ac_status); } && | |
d7974fe6 KC |
8837 | { ac_try='test -z "$ac_c_werror_flag" |
8838 | || test ! -s conftest.err' | |
86da66b5 HPN |
8839 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8840 | (eval $ac_try) 2>&5 | |
8841 | ac_status=$? | |
8842 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8843 | (exit $ac_status); }; } && | |
8844 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8845 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8846 | (eval $ac_try) 2>&5 | |
8847 | ac_status=$? | |
8848 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8849 | (exit $ac_status); }; }; then | |
8850 | ac_cv_search_exc_resume="-l$ac_lib" | |
7f2749d4 RK |
8851 | break |
8852 | else | |
ba479fd2 NN |
8853 | echo "$as_me: failed program was:" >&5 |
8854 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8855 | ||
cafe096b | 8856 | fi |
86da66b5 HPN |
8857 | rm -f conftest.err conftest.$ac_objext \ |
8858 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 8859 | done |
6e3f3080 | 8860 | fi |
ba479fd2 NN |
8861 | LIBS=$ac_func_search_save_LIBS |
8862 | fi | |
8863 | echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5 | |
8864 | echo "${ECHO_T}$ac_cv_search_exc_resume" >&6 | |
8865 | if test "$ac_cv_search_exc_resume" != no; then | |
63cf211a | 8866 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" |
ba479fd2 | 8867 | |
7f2749d4 | 8868 | fi |
ba479fd2 | 8869 | |
7f2749d4 RK |
8870 | GNAT_LIBEXC="$LIBS" |
8871 | LIBS="$save_LIBS" | |
8872 | ||
8873 | ||
62c9aa5f ZW |
8874 | # Some systems put ldexp and frexp in libm instead of libc; assume |
8875 | # they're both in the same place. jcf-dump needs them. | |
8876 | save_LIBS="$LIBS" | |
8877 | LIBS= | |
ba479fd2 NN |
8878 | echo "$as_me:$LINENO: checking for library containing ldexp" >&5 |
8879 | echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6 | |
8880 | if test "${ac_cv_search_ldexp+set}" = set; then | |
8881 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8882 | else | |
8883 | ac_func_search_save_LIBS=$LIBS | |
8884 | ac_cv_search_ldexp=no | |
8885 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8886 | /* confdefs.h. */ |
8887 | _ACEOF | |
8888 | cat confdefs.h >>conftest.$ac_ext | |
8889 | cat >>conftest.$ac_ext <<_ACEOF | |
8890 | /* end confdefs.h. */ | |
62c9aa5f | 8891 | |
62c9aa5f | 8892 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8893 | #ifdef __cplusplus |
8894 | extern "C" | |
8895 | #endif | |
62c9aa5f | 8896 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8897 | builtin and then its argument prototype would still apply. */ |
8898 | char ldexp (); | |
8899 | int | |
8900 | main () | |
8901 | { | |
8902 | ldexp (); | |
8903 | ; | |
8904 | return 0; | |
8905 | } | |
8906 | _ACEOF | |
8907 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8908 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8909 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8910 | ac_status=$? |
86da66b5 HPN |
8911 | grep -v '^ *+' conftest.er1 >conftest.err |
8912 | rm -f conftest.er1 | |
8913 | cat conftest.err >&5 | |
ba479fd2 NN |
8914 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8915 | (exit $ac_status); } && | |
d7974fe6 KC |
8916 | { ac_try='test -z "$ac_c_werror_flag" |
8917 | || test ! -s conftest.err' | |
86da66b5 HPN |
8918 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8919 | (eval $ac_try) 2>&5 | |
8920 | ac_status=$? | |
8921 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8922 | (exit $ac_status); }; } && | |
8923 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8924 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8925 | (eval $ac_try) 2>&5 | |
8926 | ac_status=$? | |
8927 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8928 | (exit $ac_status); }; }; then | |
62c9aa5f ZW |
8929 | ac_cv_search_ldexp="none required" |
8930 | else | |
ba479fd2 NN |
8931 | echo "$as_me: failed program was:" >&5 |
8932 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8933 | ||
62c9aa5f | 8934 | fi |
86da66b5 HPN |
8935 | rm -f conftest.err conftest.$ac_objext \ |
8936 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
8937 | if test "$ac_cv_search_ldexp" = no; then |
8938 | for ac_lib in m; do | |
8939 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8940 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8941 | /* confdefs.h. */ |
8942 | _ACEOF | |
8943 | cat confdefs.h >>conftest.$ac_ext | |
8944 | cat >>conftest.$ac_ext <<_ACEOF | |
8945 | /* end confdefs.h. */ | |
8946 | ||
62c9aa5f | 8947 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8948 | #ifdef __cplusplus |
8949 | extern "C" | |
8950 | #endif | |
62c9aa5f | 8951 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8952 | builtin and then its argument prototype would still apply. */ |
8953 | char ldexp (); | |
8954 | int | |
8955 | main () | |
8956 | { | |
8957 | ldexp (); | |
8958 | ; | |
8959 | return 0; | |
8960 | } | |
8961 | _ACEOF | |
8962 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8963 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8964 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8965 | ac_status=$? |
86da66b5 HPN |
8966 | grep -v '^ *+' conftest.er1 >conftest.err |
8967 | rm -f conftest.er1 | |
8968 | cat conftest.err >&5 | |
ba479fd2 NN |
8969 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8970 | (exit $ac_status); } && | |
d7974fe6 KC |
8971 | { ac_try='test -z "$ac_c_werror_flag" |
8972 | || test ! -s conftest.err' | |
86da66b5 HPN |
8973 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8974 | (eval $ac_try) 2>&5 | |
8975 | ac_status=$? | |
8976 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8977 | (exit $ac_status); }; } && | |
8978 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8979 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8980 | (eval $ac_try) 2>&5 | |
8981 | ac_status=$? | |
8982 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8983 | (exit $ac_status); }; }; then | |
8984 | ac_cv_search_ldexp="-l$ac_lib" | |
62c9aa5f ZW |
8985 | break |
8986 | else | |
ba479fd2 NN |
8987 | echo "$as_me: failed program was:" >&5 |
8988 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8989 | ||
cafe096b | 8990 | fi |
86da66b5 HPN |
8991 | rm -f conftest.err conftest.$ac_objext \ |
8992 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 8993 | done |
6e3f3080 | 8994 | fi |
ba479fd2 NN |
8995 | LIBS=$ac_func_search_save_LIBS |
8996 | fi | |
8997 | echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5 | |
8998 | echo "${ECHO_T}$ac_cv_search_ldexp" >&6 | |
8999 | if test "$ac_cv_search_ldexp" != no; then | |
63cf211a | 9000 | test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" |
ba479fd2 | 9001 | |
62c9aa5f | 9002 | fi |
ba479fd2 | 9003 | |
62c9aa5f ZW |
9004 | LDEXP_LIB="$LIBS" |
9005 | LIBS="$save_LIBS" | |
9006 | ||
9007 | ||
956d6950 JL |
9008 | # Use <inttypes.h> only if it exists, |
9009 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
ba479fd2 NN |
9010 | echo "$as_me:$LINENO: checking for inttypes.h" >&5 |
9011 | echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 | |
9012 | if test "${gcc_cv_header_inttypes_h+set}" = set; then | |
9013 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9014 | else | |
9015 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9016 | /* confdefs.h. */ |
9017 | _ACEOF | |
9018 | cat confdefs.h >>conftest.$ac_ext | |
9019 | cat >>conftest.$ac_ext <<_ACEOF | |
9020 | /* end confdefs.h. */ | |
956d6950 JL |
9021 | #include <sys/types.h> |
9022 | #include <inttypes.h> | |
ba479fd2 NN |
9023 | int |
9024 | main () | |
9025 | { | |
956d6950 | 9026 | intmax_t i = -1; |
ba479fd2 NN |
9027 | ; |
9028 | return 0; | |
9029 | } | |
9030 | _ACEOF | |
9031 | rm -f conftest.$ac_objext | |
9032 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9033 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9034 | ac_status=$? |
86da66b5 HPN |
9035 | grep -v '^ *+' conftest.er1 >conftest.err |
9036 | rm -f conftest.er1 | |
9037 | cat conftest.err >&5 | |
ba479fd2 NN |
9038 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9039 | (exit $ac_status); } && | |
d7974fe6 KC |
9040 | { ac_try='test -z "$ac_c_werror_flag" |
9041 | || test ! -s conftest.err' | |
86da66b5 HPN |
9042 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9043 | (eval $ac_try) 2>&5 | |
9044 | ac_status=$? | |
9045 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9046 | (exit $ac_status); }; } && | |
9047 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9048 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9049 | (eval $ac_try) 2>&5 | |
9050 | ac_status=$? | |
9051 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9052 | (exit $ac_status); }; }; then | |
0056a9b5 | 9053 | gcc_cv_header_inttypes_h=yes |
956d6950 | 9054 | else |
ba479fd2 NN |
9055 | echo "$as_me: failed program was:" >&5 |
9056 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9057 | ||
9058 | gcc_cv_header_inttypes_h=no | |
956d6950 | 9059 | fi |
86da66b5 | 9060 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
9061 | fi |
9062 | ||
ba479fd2 NN |
9063 | echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5 |
9064 | echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6 | |
0056a9b5 | 9065 | if test $gcc_cv_header_inttypes_h = yes; then |
ba479fd2 NN |
9066 | |
9067 | cat >>confdefs.h <<\_ACEOF | |
0056a9b5 | 9068 | #define HAVE_INTTYPES_H 1 |
ba479fd2 | 9069 | _ACEOF |
0056a9b5 KG |
9070 | |
9071 | fi | |
956d6950 | 9072 | |
c149cc37 | 9073 | |
ba479fd2 NN |
9074 | |
9075 | ||
9076 | ||
9077 | ||
9078 | ||
9079 | ||
9080 | ||
9081 | ||
9082 | ||
9083 | ||
9084 | ||
9085 | ||
9086 | ||
9087 | ||
9088 | ||
9089 | ||
0d667716 KG |
9090 | |
9091 | ||
9092 | ||
9093 | ||
9094 | ||
9095 | ||
9096 | ||
9097 | ||
9098 | ||
9099 | ||
9100 | ||
9101 | ||
ba479fd2 NN |
9102 | |
9103 | ||
9104 | ||
9105 | ||
9106 | ||
9107 | ||
9108 | ||
9109 | ||
9110 | ||
6af8c740 | 9111 | for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \ |
0d667716 KG |
9112 | sysconf strsignal getrusage nl_langinfo scandir alphasort \ |
9113 | gettimeofday mbstowcs wcswidth mmap mincore setlocale \ | |
9114 | 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 | 9115 | do |
ba479fd2 NN |
9116 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
9117 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
9118 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
9119 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
9120 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9121 | else | |
9122 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9123 | /* confdefs.h. */ |
9124 | _ACEOF | |
9125 | cat confdefs.h >>conftest.$ac_ext | |
9126 | cat >>conftest.$ac_ext <<_ACEOF | |
9127 | /* end confdefs.h. */ | |
86da66b5 HPN |
9128 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
9129 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9130 | #define $ac_func innocuous_$ac_func | |
9131 | ||
956d6950 | 9132 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
9133 | which can conflict with char $ac_func (); below. |
9134 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9135 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 9136 | |
ba479fd2 NN |
9137 | #ifdef __STDC__ |
9138 | # include <limits.h> | |
9139 | #else | |
9140 | # include <assert.h> | |
9141 | #endif | |
86da66b5 HPN |
9142 | |
9143 | #undef $ac_func | |
9144 | ||
6e3f3080 | 9145 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9146 | #ifdef __cplusplus |
9147 | extern "C" | |
9148 | { | |
9149 | #endif | |
6e3f3080 | 9150 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9151 | builtin and then its argument prototype would still apply. */ |
9152 | char $ac_func (); | |
956d6950 JL |
9153 | /* The GNU C library defines this for functions which it implements |
9154 | to always fail with ENOSYS. Some functions are actually named | |
9155 | something starting with __ and the normal name is an alias. */ | |
9156 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
9157 | choke me | |
9158 | #else | |
ba479fd2 NN |
9159 | char (*f) () = $ac_func; |
9160 | #endif | |
9161 | #ifdef __cplusplus | |
9162 | } | |
956d6950 JL |
9163 | #endif |
9164 | ||
ba479fd2 NN |
9165 | int |
9166 | main () | |
9167 | { | |
9168 | return f != $ac_func; | |
9169 | ; | |
9170 | return 0; | |
9171 | } | |
9172 | _ACEOF | |
9173 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9174 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9175 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9176 | ac_status=$? |
86da66b5 HPN |
9177 | grep -v '^ *+' conftest.er1 >conftest.err |
9178 | rm -f conftest.er1 | |
9179 | cat conftest.err >&5 | |
ba479fd2 NN |
9180 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9181 | (exit $ac_status); } && | |
d7974fe6 KC |
9182 | { ac_try='test -z "$ac_c_werror_flag" |
9183 | || test ! -s conftest.err' | |
86da66b5 HPN |
9184 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9185 | (eval $ac_try) 2>&5 | |
9186 | ac_status=$? | |
9187 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9188 | (exit $ac_status); }; } && | |
9189 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9190 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9191 | (eval $ac_try) 2>&5 | |
9192 | ac_status=$? | |
9193 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9194 | (exit $ac_status); }; }; then | |
9195 | eval "$as_ac_var=yes" | |
9196 | else | |
9197 | echo "$as_me: failed program was:" >&5 | |
9198 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9199 | ||
9200 | eval "$as_ac_var=no" | |
9201 | fi | |
86da66b5 HPN |
9202 | rm -f conftest.err conftest.$ac_objext \ |
9203 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
9204 | fi |
9205 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
9206 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
9207 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
9208 | cat >>confdefs.h <<_ACEOF | |
9209 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9210 | _ACEOF | |
956d6950 | 9211 | |
956d6950 JL |
9212 | fi |
9213 | done | |
9214 | ||
6885fc87 | 9215 | |
39f6c4c8 | 9216 | if test x$ac_cv_func_mbstowcs = xyes; then |
ba479fd2 NN |
9217 | echo "$as_me:$LINENO: checking whether mbstowcs works" >&5 |
9218 | echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6 | |
9219 | if test "${gcc_cv_func_mbstowcs_works+set}" = set; then | |
9220 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
39f6c4c8 KW |
9221 | else |
9222 | if test "$cross_compiling" = yes; then | |
9223 | gcc_cv_func_mbstowcs_works=yes | |
9224 | else | |
ba479fd2 | 9225 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9226 | /* confdefs.h. */ |
9227 | _ACEOF | |
9228 | cat confdefs.h >>conftest.$ac_ext | |
9229 | cat >>conftest.$ac_ext <<_ACEOF | |
9230 | /* end confdefs.h. */ | |
39f6c4c8 KW |
9231 | #include <stdlib.h> |
9232 | int main() | |
9233 | { | |
9234 | mbstowcs(0, "", 0); | |
9235 | return 0; | |
9236 | } | |
ba479fd2 NN |
9237 | _ACEOF |
9238 | rm -f conftest$ac_exeext | |
9239 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9240 | (eval $ac_link) 2>&5 | |
9241 | ac_status=$? | |
9242 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9243 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9244 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9245 | (eval $ac_try) 2>&5 | |
9246 | ac_status=$? | |
9247 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9248 | (exit $ac_status); }; }; then | |
39f6c4c8 KW |
9249 | gcc_cv_func_mbstowcs_works=yes |
9250 | else | |
ba479fd2 NN |
9251 | echo "$as_me: program exited with status $ac_status" >&5 |
9252 | echo "$as_me: failed program was:" >&5 | |
9253 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9254 | ||
9255 | ( exit $ac_status ) | |
9256 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 9257 | fi |
86da66b5 | 9258 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
39f6c4c8 | 9259 | fi |
39f6c4c8 | 9260 | fi |
ba479fd2 NN |
9261 | echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5 |
9262 | echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6 | |
63cf211a | 9263 | if test x$gcc_cv_func_mbstowcs_works = xyes; then |
ba479fd2 NN |
9264 | |
9265 | cat >>confdefs.h <<\_ACEOF | |
39f6c4c8 | 9266 | #define HAVE_WORKING_MBSTOWCS 1 |
ba479fd2 | 9267 | _ACEOF |
39f6c4c8 KW |
9268 | |
9269 | fi | |
9270 | fi | |
9271 | ||
ba479fd2 NN |
9272 | echo "$as_me:$LINENO: checking for ssize_t" >&5 |
9273 | echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 | |
9274 | if test "${ac_cv_type_ssize_t+set}" = set; then | |
9275 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
63cf211a | 9276 | else |
ba479fd2 | 9277 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9278 | /* confdefs.h. */ |
9279 | _ACEOF | |
9280 | cat confdefs.h >>conftest.$ac_ext | |
9281 | cat >>conftest.$ac_ext <<_ACEOF | |
9282 | /* end confdefs.h. */ | |
8b4fc07a NN |
9283 | $ac_includes_default |
9284 | int | |
9285 | main () | |
9286 | { | |
9287 | if ((ssize_t *) 0) | |
9288 | return 0; | |
9289 | if (sizeof (ssize_t)) | |
9290 | return 0; | |
9291 | ; | |
9292 | return 0; | |
9293 | } | |
ba479fd2 | 9294 | _ACEOF |
8b4fc07a NN |
9295 | rm -f conftest.$ac_objext |
9296 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9297 | (eval $ac_compile) 2>conftest.er1 |
8b4fc07a | 9298 | ac_status=$? |
86da66b5 HPN |
9299 | grep -v '^ *+' conftest.er1 >conftest.err |
9300 | rm -f conftest.er1 | |
9301 | cat conftest.err >&5 | |
8b4fc07a NN |
9302 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9303 | (exit $ac_status); } && | |
d7974fe6 KC |
9304 | { ac_try='test -z "$ac_c_werror_flag" |
9305 | || test ! -s conftest.err' | |
86da66b5 HPN |
9306 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9307 | (eval $ac_try) 2>&5 | |
9308 | ac_status=$? | |
9309 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9310 | (exit $ac_status); }; } && | |
9311 | { ac_try='test -s conftest.$ac_objext' | |
8b4fc07a NN |
9312 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9313 | (eval $ac_try) 2>&5 | |
9314 | ac_status=$? | |
9315 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9316 | (exit $ac_status); }; }; then | |
cb65112a | 9317 | ac_cv_type_ssize_t=yes |
f12bc141 | 9318 | else |
8b4fc07a NN |
9319 | echo "$as_me: failed program was:" >&5 |
9320 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 9321 | |
8b4fc07a NN |
9322 | ac_cv_type_ssize_t=no |
9323 | fi | |
86da66b5 | 9324 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 9325 | fi |
ba479fd2 NN |
9326 | echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 |
9327 | echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 | |
8b4fc07a NN |
9328 | if test $ac_cv_type_ssize_t = yes; then |
9329 | : | |
9330 | else | |
ba479fd2 | 9331 | |
8b4fc07a | 9332 | cat >>confdefs.h <<_ACEOF |
f12bc141 | 9333 | #define ssize_t int |
ba479fd2 | 9334 | _ACEOF |
f12bc141 ZW |
9335 | |
9336 | fi | |
9337 | ||
0b9d02c6 | 9338 | |
e256b8b6 DA |
9339 | # Try to determine the array type of the second argument of getgroups |
9340 | # for the target system (int or gid_t). | |
ba479fd2 NN |
9341 | echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 |
9342 | echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 | |
9343 | if test "${ac_cv_type_uid_t+set}" = set; then | |
9344 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9345 | else | |
9346 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9347 | /* confdefs.h. */ |
9348 | _ACEOF | |
9349 | cat confdefs.h >>conftest.$ac_ext | |
9350 | cat >>conftest.$ac_ext <<_ACEOF | |
9351 | /* end confdefs.h. */ | |
e256b8b6 | 9352 | #include <sys/types.h> |
ba479fd2 NN |
9353 | |
9354 | _ACEOF | |
e256b8b6 | 9355 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9356 | $EGREP "uid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
9357 | ac_cv_type_uid_t=yes |
9358 | else | |
e256b8b6 DA |
9359 | ac_cv_type_uid_t=no |
9360 | fi | |
9361 | rm -f conftest* | |
9362 | ||
9363 | fi | |
ba479fd2 NN |
9364 | echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 |
9365 | echo "${ECHO_T}$ac_cv_type_uid_t" >&6 | |
63cf211a | 9366 | if test $ac_cv_type_uid_t = no; then |
ba479fd2 NN |
9367 | |
9368 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 9369 | #define uid_t int |
ba479fd2 | 9370 | _ACEOF |
cafe096b | 9371 | |
ba479fd2 NN |
9372 | |
9373 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 9374 | #define gid_t int |
ba479fd2 | 9375 | _ACEOF |
e256b8b6 DA |
9376 | |
9377 | fi | |
9378 | ||
ba479fd2 NN |
9379 | echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 |
9380 | echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 | |
9381 | if test "${ac_cv_type_getgroups+set}" = set; then | |
9382 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e256b8b6 DA |
9383 | else |
9384 | if test "$cross_compiling" = yes; then | |
9385 | ac_cv_type_getgroups=cross | |
9386 | else | |
ba479fd2 | 9387 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9388 | /* confdefs.h. */ |
9389 | _ACEOF | |
9390 | cat confdefs.h >>conftest.$ac_ext | |
9391 | cat >>conftest.$ac_ext <<_ACEOF | |
9392 | /* end confdefs.h. */ | |
e256b8b6 DA |
9393 | /* Thanks to Mike Rendell for this test. */ |
9394 | #include <sys/types.h> | |
9395 | #define NGID 256 | |
9396 | #undef MAX | |
9397 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
ba479fd2 NN |
9398 | |
9399 | int | |
9400 | main () | |
e256b8b6 DA |
9401 | { |
9402 | gid_t gidset[NGID]; | |
9403 | int i, n; | |
9404 | union { gid_t gval; long lval; } val; | |
9405 | ||
9406 | val.lval = -1; | |
9407 | for (i = 0; i < NGID; i++) | |
9408 | gidset[i] = val.gval; | |
9409 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
86da66b5 | 9410 | gidset); |
e256b8b6 DA |
9411 | /* Exit non-zero if getgroups seems to require an array of ints. This |
9412 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
9413 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
63cf211a | 9414 | } |
ba479fd2 NN |
9415 | _ACEOF |
9416 | rm -f conftest$ac_exeext | |
9417 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9418 | (eval $ac_link) 2>&5 | |
9419 | ac_status=$? | |
9420 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9421 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9422 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9423 | (eval $ac_try) 2>&5 | |
9424 | ac_status=$? | |
9425 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9426 | (exit $ac_status); }; }; then | |
9427 | ac_cv_type_getgroups=gid_t | |
63cf211a | 9428 | else |
ba479fd2 NN |
9429 | echo "$as_me: program exited with status $ac_status" >&5 |
9430 | echo "$as_me: failed program was:" >&5 | |
9431 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9432 | ||
9433 | ( exit $ac_status ) | |
9434 | ac_cv_type_getgroups=int | |
e256b8b6 | 9435 | fi |
86da66b5 | 9436 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
e256b8b6 | 9437 | fi |
e256b8b6 | 9438 | if test $ac_cv_type_getgroups = cross; then |
ba479fd2 | 9439 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9440 | /* confdefs.h. */ |
9441 | _ACEOF | |
9442 | cat confdefs.h >>conftest.$ac_ext | |
9443 | cat >>conftest.$ac_ext <<_ACEOF | |
9444 | /* end confdefs.h. */ | |
e256b8b6 | 9445 | #include <unistd.h> |
ba479fd2 NN |
9446 | |
9447 | _ACEOF | |
e256b8b6 | 9448 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9449 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
9450 | ac_cv_type_getgroups=gid_t |
9451 | else | |
e256b8b6 DA |
9452 | ac_cv_type_getgroups=int |
9453 | fi | |
9454 | rm -f conftest* | |
9455 | ||
9456 | fi | |
9457 | fi | |
ba479fd2 NN |
9458 | echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 |
9459 | echo "${ECHO_T}$ac_cv_type_getgroups" >&6 | |
e256b8b6 | 9460 | |
ba479fd2 | 9461 | cat >>confdefs.h <<_ACEOF |
e256b8b6 | 9462 | #define GETGROUPS_T $ac_cv_type_getgroups |
ba479fd2 | 9463 | _ACEOF |
e256b8b6 DA |
9464 | |
9465 | ||
9466 | if test "${target}" = "${build}"; then | |
9467 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
9468 | else | |
9469 | case "${target}" in | |
9470 | # This condition may need some tweaking. It should include all | |
9471 | # targets where the array type of the second argument of getgroups | |
9472 | # is int and the type of gid_t is not equivalent to int. | |
9473 | *-*-sunos* | *-*-ultrix*) | |
9474 | TARGET_GETGROUPS_T=int | |
9475 | ;; | |
9476 | *) | |
9477 | TARGET_GETGROUPS_T=gid_t | |
9478 | ;; | |
9479 | esac | |
9480 | fi | |
9481 | ||
9482 | ||
ba479fd2 NN |
9483 | echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5 |
9484 | echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6 | |
9485 | if test "${gcc_cv_func_printf_ptr+set}" = set; then | |
9486 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
9487 | else |
9488 | if test "$cross_compiling" = yes; then | |
9489 | gcc_cv_func_printf_ptr=no | |
9490 | else | |
ba479fd2 | 9491 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9492 | /* confdefs.h. */ |
9493 | _ACEOF | |
9494 | cat confdefs.h >>conftest.$ac_ext | |
9495 | cat >>conftest.$ac_ext <<_ACEOF | |
9496 | /* end confdefs.h. */ | |
0a4b6309 RL |
9497 | #include <stdio.h> |
9498 | ||
86cf1cbd | 9499 | int main() |
0a4b6309 RL |
9500 | { |
9501 | char buf[64]; | |
9502 | char *p = buf, *q = NULL; | |
9503 | sprintf(buf, "%p", p); | |
9504 | sscanf(buf, "%p", &q); | |
86cf1cbd | 9505 | return (p != q); |
0a4b6309 | 9506 | } |
ba479fd2 NN |
9507 | _ACEOF |
9508 | rm -f conftest$ac_exeext | |
9509 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9510 | (eval $ac_link) 2>&5 | |
9511 | ac_status=$? | |
9512 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9513 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9514 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9515 | (eval $ac_try) 2>&5 | |
9516 | ac_status=$? | |
9517 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9518 | (exit $ac_status); }; }; then | |
0a4b6309 RL |
9519 | gcc_cv_func_printf_ptr=yes |
9520 | else | |
ba479fd2 NN |
9521 | echo "$as_me: program exited with status $ac_status" >&5 |
9522 | echo "$as_me: failed program was:" >&5 | |
9523 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9524 | ||
9525 | ( exit $ac_status ) | |
9526 | gcc_cv_func_printf_ptr=no | |
0a4b6309 | 9527 | fi |
86da66b5 | 9528 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
0a4b6309 | 9529 | fi |
0a4b6309 RL |
9530 | rm -f core core.* *.core |
9531 | fi | |
ba479fd2 NN |
9532 | echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5 |
9533 | echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6 | |
63cf211a | 9534 | if test $gcc_cv_func_printf_ptr = yes ; then |
ba479fd2 NN |
9535 | |
9536 | cat >>confdefs.h <<\_ACEOF | |
0a4b6309 | 9537 | #define HAVE_PRINTF_PTR 1 |
ba479fd2 | 9538 | _ACEOF |
0a4b6309 RL |
9539 | |
9540 | fi | |
9541 | ||
3b0727a0 MR |
9542 | |
9543 | echo "$as_me:$LINENO: checking for sys/mman.h" >&5 | |
9544 | echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6 | |
9545 | if test "${ac_cv_header_sys_mman_h+set}" = set; then | |
9546 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9547 | else | |
9548 | cat >conftest.$ac_ext <<_ACEOF | |
9549 | /* confdefs.h. */ | |
9550 | _ACEOF | |
9551 | cat confdefs.h >>conftest.$ac_ext | |
9552 | cat >>conftest.$ac_ext <<_ACEOF | |
9553 | /* end confdefs.h. */ | |
9554 | #include <sys/mman.h> | |
9555 | _ACEOF | |
9556 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
9557 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
9558 | ac_status=$? | |
9559 | grep -v '^ *+' conftest.er1 >conftest.err | |
9560 | rm -f conftest.er1 | |
9561 | cat conftest.err >&5 | |
9562 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9563 | (exit $ac_status); } >/dev/null; then | |
9564 | if test -s conftest.err; then | |
9565 | ac_cpp_err=$ac_c_preproc_warn_flag | |
9566 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
9567 | else | |
9568 | ac_cpp_err= | |
9569 | fi | |
9570 | else | |
9571 | ac_cpp_err=yes | |
9572 | fi | |
9573 | if test -z "$ac_cpp_err"; then | |
9574 | ac_cv_header_sys_mman_h=yes | |
9575 | else | |
9576 | echo "$as_me: failed program was:" >&5 | |
9577 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9578 | ||
9579 | ac_cv_header_sys_mman_h=no | |
9580 | fi | |
9581 | rm -f conftest.err conftest.$ac_ext | |
9582 | fi | |
9583 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5 | |
9584 | echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6 | |
9585 | if test $ac_cv_header_sys_mman_h = yes; then | |
9586 | gcc_header_sys_mman_h=yes | |
9587 | else | |
9588 | gcc_header_sys_mman_h=no | |
9589 | fi | |
9590 | ||
9591 | echo "$as_me:$LINENO: checking for mmap" >&5 | |
9592 | echo $ECHO_N "checking for mmap... $ECHO_C" >&6 | |
9593 | if test "${ac_cv_func_mmap+set}" = set; then | |
9594 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9595 | else | |
9596 | cat >conftest.$ac_ext <<_ACEOF | |
9597 | /* confdefs.h. */ | |
9598 | _ACEOF | |
9599 | cat confdefs.h >>conftest.$ac_ext | |
9600 | cat >>conftest.$ac_ext <<_ACEOF | |
9601 | /* end confdefs.h. */ | |
9602 | /* Define mmap to an innocuous variant, in case <limits.h> declares mmap. | |
9603 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9604 | #define mmap innocuous_mmap | |
9605 | ||
9606 | /* System header to define __stub macros and hopefully few prototypes, | |
9607 | which can conflict with char mmap (); below. | |
9608 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9609 | <limits.h> exists even on freestanding compilers. */ | |
9610 | ||
9611 | #ifdef __STDC__ | |
9612 | # include <limits.h> | |
9613 | #else | |
9614 | # include <assert.h> | |
9615 | #endif | |
9616 | ||
9617 | #undef mmap | |
9618 | ||
9619 | /* Override any gcc2 internal prototype to avoid an error. */ | |
9620 | #ifdef __cplusplus | |
9621 | extern "C" | |
9622 | { | |
9623 | #endif | |
9624 | /* We use char because int might match the return type of a gcc2 | |
9625 | builtin and then its argument prototype would still apply. */ | |
9626 | char mmap (); | |
9627 | /* The GNU C library defines this for functions which it implements | |
9628 | to always fail with ENOSYS. Some functions are actually named | |
9629 | something starting with __ and the normal name is an alias. */ | |
9630 | #if defined (__stub_mmap) || defined (__stub___mmap) | |
9631 | choke me | |
9632 | #else | |
9633 | char (*f) () = mmap; | |
9634 | #endif | |
9635 | #ifdef __cplusplus | |
9636 | } | |
9637 | #endif | |
9638 | ||
9639 | int | |
9640 | main () | |
9641 | { | |
9642 | return f != mmap; | |
9643 | ; | |
9644 | return 0; | |
9645 | } | |
9646 | _ACEOF | |
9647 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9648 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9649 | (eval $ac_link) 2>conftest.er1 | |
9650 | ac_status=$? | |
9651 | grep -v '^ *+' conftest.er1 >conftest.err | |
9652 | rm -f conftest.er1 | |
9653 | cat conftest.err >&5 | |
9654 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9655 | (exit $ac_status); } && | |
d7974fe6 KC |
9656 | { ac_try='test -z "$ac_c_werror_flag" |
9657 | || test ! -s conftest.err' | |
3b0727a0 MR |
9658 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9659 | (eval $ac_try) 2>&5 | |
9660 | ac_status=$? | |
9661 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9662 | (exit $ac_status); }; } && | |
9663 | { ac_try='test -s conftest$ac_exeext' | |
9664 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9665 | (eval $ac_try) 2>&5 | |
9666 | ac_status=$? | |
9667 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9668 | (exit $ac_status); }; }; then | |
9669 | ac_cv_func_mmap=yes | |
9670 | else | |
9671 | echo "$as_me: failed program was:" >&5 | |
9672 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9673 | ||
9674 | ac_cv_func_mmap=no | |
9675 | fi | |
9676 | rm -f conftest.err conftest.$ac_objext \ | |
9677 | conftest$ac_exeext conftest.$ac_ext | |
9678 | fi | |
9679 | echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 | |
9680 | echo "${ECHO_T}$ac_cv_func_mmap" >&6 | |
9681 | if test $ac_cv_func_mmap = yes; then | |
9682 | gcc_func_mmap=yes | |
9683 | else | |
9684 | gcc_func_mmap=no | |
9685 | fi | |
9686 | ||
9687 | if test "$gcc_header_sys_mman_h" != yes \ | |
9688 | || test "$gcc_func_mmap" != yes; then | |
1072ec3f ZW |
9689 | gcc_cv_func_mmap_file=no |
9690 | gcc_cv_func_mmap_dev_zero=no | |
9691 | gcc_cv_func_mmap_anon=no | |
9692 | else | |
ba479fd2 NN |
9693 | echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5 |
9694 | echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6 | |
9695 | if test "${gcc_cv_func_mmap_file+set}" = set; then | |
9696 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f | 9697 | else |
ba479fd2 | 9698 | # Add a system to this blacklist if |
1072ec3f ZW |
9699 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a |
9700 | # memory area containing the same data that you'd get if you applied | |
9701 | # read() to the same fd. The only system known to have a problem here | |
9702 | # is VMS, where text files have record structure. | |
9703 | case "$host_os" in | |
ba479fd2 | 9704 | vms* | ultrix*) |
1072ec3f ZW |
9705 | gcc_cv_func_mmap_file=no ;; |
9706 | *) | |
9707 | gcc_cv_func_mmap_file=yes;; | |
9708 | esac | |
9709 | fi | |
ba479fd2 NN |
9710 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5 |
9711 | echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6 | |
9712 | echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5 | |
9713 | echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6 | |
9714 | if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then | |
9715 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
9716 | else |
9717 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
9718 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
9719 | # zeroed pages with both the following properties: | |
9720 | # 1. If you map N consecutive pages in with one call, and then | |
9721 | # unmap any subset of those pages, the pages that were not | |
9722 | # explicitly unmapped remain accessible. | |
9723 | # 2. If you map two adjacent blocks of memory and then unmap them | |
9724 | # both at once, they must both go away. | |
9725 | # Systems known to be in this category are Windows (all variants), | |
9726 | # VMS, and Darwin. | |
9727 | case "$host_os" in | |
2ce240d3 | 9728 | vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) |
1072ec3f ZW |
9729 | gcc_cv_func_mmap_dev_zero=no ;; |
9730 | *) | |
9731 | gcc_cv_func_mmap_dev_zero=yes;; | |
9732 | esac | |
9733 | fi | |
ba479fd2 NN |
9734 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5 |
9735 | echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6 | |
1072ec3f ZW |
9736 | |
9737 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
ba479fd2 NN |
9738 | echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5 |
9739 | echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6 | |
9740 | if test "${gcc_cv_decl_map_anon+set}" = set; then | |
9741 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9742 | else | |
9743 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9744 | /* confdefs.h. */ |
9745 | _ACEOF | |
9746 | cat confdefs.h >>conftest.$ac_ext | |
9747 | cat >>conftest.$ac_ext <<_ACEOF | |
9748 | /* end confdefs.h. */ | |
1072ec3f ZW |
9749 | #include <sys/types.h> |
9750 | #include <sys/mman.h> | |
9751 | #include <unistd.h> | |
9752 | ||
9753 | #ifndef MAP_ANONYMOUS | |
9754 | #define MAP_ANONYMOUS MAP_ANON | |
9755 | #endif | |
9756 | ||
ba479fd2 NN |
9757 | int |
9758 | main () | |
9759 | { | |
1072ec3f | 9760 | int n = MAP_ANONYMOUS; |
ba479fd2 NN |
9761 | ; |
9762 | return 0; | |
9763 | } | |
9764 | _ACEOF | |
9765 | rm -f conftest.$ac_objext | |
9766 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9767 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9768 | ac_status=$? |
86da66b5 HPN |
9769 | grep -v '^ *+' conftest.er1 >conftest.err |
9770 | rm -f conftest.er1 | |
9771 | cat conftest.err >&5 | |
ba479fd2 NN |
9772 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9773 | (exit $ac_status); } && | |
d7974fe6 KC |
9774 | { ac_try='test -z "$ac_c_werror_flag" |
9775 | || test ! -s conftest.err' | |
86da66b5 HPN |
9776 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9777 | (eval $ac_try) 2>&5 | |
9778 | ac_status=$? | |
9779 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9780 | (exit $ac_status); }; } && | |
9781 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9782 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9783 | (eval $ac_try) 2>&5 | |
9784 | ac_status=$? | |
9785 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9786 | (exit $ac_status); }; }; then | |
1072ec3f ZW |
9787 | gcc_cv_decl_map_anon=yes |
9788 | else | |
ba479fd2 NN |
9789 | echo "$as_me: failed program was:" >&5 |
9790 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9791 | ||
9792 | gcc_cv_decl_map_anon=no | |
1072ec3f | 9793 | fi |
86da66b5 | 9794 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
1072ec3f | 9795 | fi |
ba479fd2 NN |
9796 | echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5 |
9797 | echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6 | |
1072ec3f ZW |
9798 | |
9799 | if test $gcc_cv_decl_map_anon = no; then | |
9800 | gcc_cv_func_mmap_anon=no | |
9801 | else | |
ba479fd2 NN |
9802 | echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
9803 | echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6 | |
9804 | if test "${gcc_cv_func_mmap_anon+set}" = set; then | |
9805 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
9806 | else |
9807 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
9808 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
9809 | # doesn't give anonymous zeroed pages with the same properties listed | |
9810 | # above for use of /dev/zero. | |
9811 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
9812 | case "$host_os" in | |
9813 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
9814 | gcc_cv_func_mmap_anon=no ;; | |
9815 | *) | |
9816 | gcc_cv_func_mmap_anon=yes;; | |
9817 | esac | |
9818 | fi | |
ba479fd2 NN |
9819 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5 |
9820 | echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6 | |
1072ec3f ZW |
9821 | fi |
9822 | fi | |
9823 | ||
9824 | if test $gcc_cv_func_mmap_file = yes; then | |
ba479fd2 NN |
9825 | |
9826 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9827 | #define HAVE_MMAP_FILE 1 |
ba479fd2 | 9828 | _ACEOF |
1072ec3f ZW |
9829 | |
9830 | fi | |
9831 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
ba479fd2 NN |
9832 | |
9833 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9834 | #define HAVE_MMAP_DEV_ZERO 1 |
ba479fd2 | 9835 | _ACEOF |
1072ec3f ZW |
9836 | |
9837 | fi | |
9838 | if test $gcc_cv_func_mmap_anon = yes; then | |
ba479fd2 NN |
9839 | |
9840 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9841 | #define HAVE_MMAP_ANON 1 |
ba479fd2 | 9842 | _ACEOF |
1072ec3f ZW |
9843 | |
9844 | fi | |
9845 | ||
b27d2bd5 MK |
9846 | |
9847 | case "${host}" in | |
ee262b6f | 9848 | *-*-*vms*) |
ba479fd2 | 9849 | # Under VMS, vfork works very differently than on Unix. The standard test |
ee262b6f DR |
9850 | # won't work, and it isn't easily adaptable. It makes more sense to |
9851 | # just force it. | |
9852 | ac_cv_func_vfork_works=yes | |
9853 | ;; | |
b27d2bd5 | 9854 | esac |
ba479fd2 NN |
9855 | echo "$as_me:$LINENO: checking for pid_t" >&5 |
9856 | echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 | |
9857 | if test "${ac_cv_type_pid_t+set}" = set; then | |
9858 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9859 | else | |
9860 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9861 | /* confdefs.h. */ |
9862 | _ACEOF | |
9863 | cat confdefs.h >>conftest.$ac_ext | |
9864 | cat >>conftest.$ac_ext <<_ACEOF | |
9865 | /* end confdefs.h. */ | |
9866 | $ac_includes_default | |
9867 | int | |
9868 | main () | |
9869 | { | |
9870 | if ((pid_t *) 0) | |
9871 | return 0; | |
9872 | if (sizeof (pid_t)) | |
9873 | return 0; | |
9874 | ; | |
9875 | return 0; | |
9876 | } | |
9877 | _ACEOF | |
9878 | rm -f conftest.$ac_objext | |
9879 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9880 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9881 | ac_status=$? |
86da66b5 HPN |
9882 | grep -v '^ *+' conftest.er1 >conftest.err |
9883 | rm -f conftest.er1 | |
9884 | cat conftest.err >&5 | |
ba479fd2 NN |
9885 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9886 | (exit $ac_status); } && | |
d7974fe6 KC |
9887 | { ac_try='test -z "$ac_c_werror_flag" |
9888 | || test ! -s conftest.err' | |
86da66b5 HPN |
9889 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9890 | (eval $ac_try) 2>&5 | |
9891 | ac_status=$? | |
9892 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9893 | (exit $ac_status); }; } && | |
9894 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9895 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9896 | (eval $ac_try) 2>&5 | |
9897 | ac_status=$? | |
9898 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9899 | (exit $ac_status); }; }; then | |
cb65112a | 9900 | ac_cv_type_pid_t=yes |
c375c43b | 9901 | else |
ba479fd2 NN |
9902 | echo "$as_me: failed program was:" >&5 |
9903 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 9904 | |
ba479fd2 NN |
9905 | ac_cv_type_pid_t=no |
9906 | fi | |
86da66b5 | 9907 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 9908 | fi |
ba479fd2 NN |
9909 | echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 |
9910 | echo "${ECHO_T}$ac_cv_type_pid_t" >&6 | |
9911 | if test $ac_cv_type_pid_t = yes; then | |
9912 | : | |
9913 | else | |
9914 | ||
9915 | cat >>confdefs.h <<_ACEOF | |
c375c43b | 9916 | #define pid_t int |
ba479fd2 | 9917 | _ACEOF |
c375c43b KG |
9918 | |
9919 | fi | |
9920 | ||
ba479fd2 NN |
9921 | |
9922 | ||
9923 | for ac_header in unistd.h vfork.h | |
9924 | do | |
9925 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
ca9bc441 | 9926 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
9927 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
9928 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
9929 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 9930 | else |
ca9bc441 | 9931 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9932 | /* confdefs.h. */ |
9933 | _ACEOF | |
9934 | cat confdefs.h >>conftest.$ac_ext | |
9935 | cat >>conftest.$ac_ext <<_ACEOF | |
9936 | /* end confdefs.h. */ | |
9937 | #include <$ac_header> | |
9938 | _ACEOF | |
9939 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
9940 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
9941 | ac_status=$? | |
9942 | grep -v '^ *+' conftest.er1 >conftest.err | |
9943 | rm -f conftest.er1 | |
9944 | cat conftest.err >&5 | |
9945 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9946 | (exit $ac_status); } >/dev/null; then | |
9947 | if test -s conftest.err; then | |
9948 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 9949 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
9950 | else |
9951 | ac_cpp_err= | |
9952 | fi | |
093e61a6 | 9953 | else |
ba479fd2 NN |
9954 | ac_cpp_err=yes |
9955 | fi | |
9956 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 9957 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
9958 | else |
9959 | echo "$as_me: failed program was:" >&5 | |
9960 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9961 | ||
ca9bc441 | 9962 | eval "$as_ac_Header=no" |
ba479fd2 NN |
9963 | fi |
9964 | rm -f conftest.err conftest.$ac_ext | |
c375c43b | 9965 | fi |
ba479fd2 NN |
9966 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
9967 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
9968 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
9969 | cat >>confdefs.h <<_ACEOF | |
9970 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9971 | _ACEOF | |
6e3f3080 NN |
9972 | |
9973 | fi | |
ba479fd2 NN |
9974 | done |
9975 | ||
9976 | ||
9977 | ||
9978 | for ac_func in fork vfork | |
9979 | do | |
9980 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9981 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
9982 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
9983 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
9984 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9985 | else | |
9986 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9987 | /* confdefs.h. */ |
9988 | _ACEOF | |
9989 | cat confdefs.h >>conftest.$ac_ext | |
9990 | cat >>conftest.$ac_ext <<_ACEOF | |
9991 | /* end confdefs.h. */ | |
86da66b5 HPN |
9992 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
9993 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9994 | #define $ac_func innocuous_$ac_func | |
9995 | ||
c375c43b | 9996 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
9997 | which can conflict with char $ac_func (); below. |
9998 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9999 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 10000 | |
ba479fd2 NN |
10001 | #ifdef __STDC__ |
10002 | # include <limits.h> | |
10003 | #else | |
10004 | # include <assert.h> | |
10005 | #endif | |
86da66b5 HPN |
10006 | |
10007 | #undef $ac_func | |
10008 | ||
6e3f3080 | 10009 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
10010 | #ifdef __cplusplus |
10011 | extern "C" | |
10012 | { | |
10013 | #endif | |
6e3f3080 | 10014 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
10015 | builtin and then its argument prototype would still apply. */ |
10016 | char $ac_func (); | |
c375c43b KG |
10017 | /* The GNU C library defines this for functions which it implements |
10018 | to always fail with ENOSYS. Some functions are actually named | |
10019 | something starting with __ and the normal name is an alias. */ | |
ba479fd2 | 10020 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
c375c43b KG |
10021 | choke me |
10022 | #else | |
ba479fd2 NN |
10023 | char (*f) () = $ac_func; |
10024 | #endif | |
10025 | #ifdef __cplusplus | |
10026 | } | |
c375c43b KG |
10027 | #endif |
10028 | ||
ba479fd2 NN |
10029 | int |
10030 | main () | |
10031 | { | |
10032 | return f != $ac_func; | |
10033 | ; | |
10034 | return 0; | |
10035 | } | |
10036 | _ACEOF | |
10037 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10038 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 10039 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 10040 | ac_status=$? |
86da66b5 HPN |
10041 | grep -v '^ *+' conftest.er1 >conftest.err |
10042 | rm -f conftest.er1 | |
10043 | cat conftest.err >&5 | |
ba479fd2 NN |
10044 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10045 | (exit $ac_status); } && | |
d7974fe6 KC |
10046 | { ac_try='test -z "$ac_c_werror_flag" |
10047 | || test ! -s conftest.err' | |
86da66b5 HPN |
10048 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10049 | (eval $ac_try) 2>&5 | |
10050 | ac_status=$? | |
10051 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10052 | (exit $ac_status); }; } && | |
10053 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
10054 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10055 | (eval $ac_try) 2>&5 | |
10056 | ac_status=$? | |
10057 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10058 | (exit $ac_status); }; }; then | |
10059 | eval "$as_ac_var=yes" | |
10060 | else | |
10061 | echo "$as_me: failed program was:" >&5 | |
10062 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10063 | ||
10064 | eval "$as_ac_var=no" | |
10065 | fi | |
86da66b5 HPN |
10066 | rm -f conftest.err conftest.$ac_objext \ |
10067 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
10068 | fi |
10069 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
10070 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
10071 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
10072 | cat >>confdefs.h <<_ACEOF | |
10073 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10074 | _ACEOF | |
10075 | ||
c375c43b | 10076 | fi |
ba479fd2 | 10077 | done |
c375c43b | 10078 | |
ba479fd2 NN |
10079 | if test "x$ac_cv_func_fork" = xyes; then |
10080 | echo "$as_me:$LINENO: checking for working fork" >&5 | |
10081 | echo $ECHO_N "checking for working fork... $ECHO_C" >&6 | |
10082 | if test "${ac_cv_func_fork_works+set}" = set; then | |
10083 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10084 | else |
ba479fd2 NN |
10085 | if test "$cross_compiling" = yes; then |
10086 | ac_cv_func_fork_works=cross | |
10087 | else | |
10088 | cat >conftest.$ac_ext <<_ACEOF | |
10089 | /* By Ruediger Kuhlmann. */ | |
10090 | #include <sys/types.h> | |
10091 | #if HAVE_UNISTD_H | |
10092 | # include <unistd.h> | |
10093 | #endif | |
10094 | /* Some systems only have a dummy stub for fork() */ | |
10095 | int main () | |
10096 | { | |
86da66b5 HPN |
10097 | if (fork() < 0) |
10098 | exit (1); | |
10099 | exit (0); | |
ba479fd2 NN |
10100 | } |
10101 | _ACEOF | |
10102 | rm -f conftest$ac_exeext | |
10103 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10104 | (eval $ac_link) 2>&5 | |
10105 | ac_status=$? | |
10106 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10107 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
10108 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10109 | (eval $ac_try) 2>&5 | |
10110 | ac_status=$? | |
10111 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10112 | (exit $ac_status); }; }; then | |
10113 | ac_cv_func_fork_works=yes | |
10114 | else | |
10115 | echo "$as_me: program exited with status $ac_status" >&5 | |
10116 | echo "$as_me: failed program was:" >&5 | |
10117 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10118 | ||
10119 | ( exit $ac_status ) | |
10120 | ac_cv_func_fork_works=no | |
10121 | fi | |
86da66b5 | 10122 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
10123 | fi |
10124 | fi | |
10125 | echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 | |
10126 | echo "${ECHO_T}$ac_cv_func_fork_works" >&6 | |
10127 | ||
10128 | else | |
10129 | ac_cv_func_fork_works=$ac_cv_func_fork | |
10130 | fi | |
10131 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10132 | case $host in | |
10133 | *-*-amigaos* | *-*-msdosdjgpp*) | |
10134 | # Override, as these systems have only a dummy fork() stub | |
10135 | ac_cv_func_fork_works=no | |
10136 | ;; | |
10137 | *) | |
10138 | ac_cv_func_fork_works=yes | |
10139 | ;; | |
10140 | esac | |
10141 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
10142 | echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
c375c43b | 10143 | fi |
c375c43b | 10144 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
10145 | if test "x$ac_cv_func_vfork" = xyes; then |
10146 | echo "$as_me:$LINENO: checking for working vfork" >&5 | |
10147 | echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 | |
10148 | if test "${ac_cv_func_vfork_works+set}" = set; then | |
10149 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10150 | else |
ba479fd2 NN |
10151 | if test "$cross_compiling" = yes; then |
10152 | ac_cv_func_vfork_works=cross | |
10153 | else | |
10154 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10155 | /* confdefs.h. */ |
10156 | _ACEOF | |
10157 | cat confdefs.h >>conftest.$ac_ext | |
10158 | cat >>conftest.$ac_ext <<_ACEOF | |
10159 | /* end confdefs.h. */ | |
c375c43b KG |
10160 | /* Thanks to Paul Eggert for this test. */ |
10161 | #include <stdio.h> | |
ba479fd2 | 10162 | #include <stdlib.h> |
c375c43b KG |
10163 | #include <sys/types.h> |
10164 | #include <sys/stat.h> | |
ba479fd2 NN |
10165 | #include <sys/wait.h> |
10166 | #if HAVE_UNISTD_H | |
10167 | # include <unistd.h> | |
c375c43b | 10168 | #endif |
ba479fd2 NN |
10169 | #if HAVE_VFORK_H |
10170 | # include <vfork.h> | |
c375c43b KG |
10171 | #endif |
10172 | /* On some sparc systems, changes by the child to local and incoming | |
ba479fd2 NN |
10173 | argument registers are propagated back to the parent. The compiler |
10174 | is told about this with #include <vfork.h>, but some compilers | |
10175 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
10176 | static variable whose address is put into a register that is | |
10177 | clobbered by the vfork. */ | |
10178 | static void | |
c375c43b KG |
10179 | #ifdef __cplusplus |
10180 | sparc_address_test (int arg) | |
ba479fd2 | 10181 | # else |
c375c43b KG |
10182 | sparc_address_test (arg) int arg; |
10183 | #endif | |
10184 | { | |
10185 | static pid_t child; | |
10186 | if (!child) { | |
10187 | child = vfork (); | |
10188 | if (child < 0) { | |
10189 | perror ("vfork"); | |
10190 | _exit(2); | |
10191 | } | |
10192 | if (!child) { | |
10193 | arg = getpid(); | |
10194 | write(-1, "", 0); | |
10195 | _exit (arg); | |
10196 | } | |
10197 | } | |
10198 | } | |
ba479fd2 NN |
10199 | |
10200 | int | |
10201 | main () | |
10202 | { | |
c375c43b KG |
10203 | pid_t parent = getpid (); |
10204 | pid_t child; | |
10205 | ||
ba479fd2 | 10206 | sparc_address_test (0); |
c375c43b KG |
10207 | |
10208 | child = vfork (); | |
10209 | ||
10210 | if (child == 0) { | |
ba479fd2 NN |
10211 | /* Here is another test for sparc vfork register problems. This |
10212 | test uses lots of local variables, at least as many local | |
10213 | variables as main has allocated so far including compiler | |
10214 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
10215 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
10216 | reuse the register of parent for one of the local variables, | |
10217 | since it will think that parent can't possibly be used any more | |
10218 | in this routine. Assigning to the local variable will thus | |
10219 | munge parent in the parent process. */ | |
c375c43b KG |
10220 | pid_t |
10221 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
10222 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
10223 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
10224 | use the same hardware register for all 8 local variables. */ | |
10225 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10226 | || p != p5 || p != p6 || p != p7) | |
10227 | _exit(1); | |
10228 | ||
ba479fd2 NN |
10229 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
10230 | from child file descriptors. If the child closes a descriptor | |
10231 | before it execs or exits, this munges the parent's descriptor | |
10232 | as well. Test for this by closing stdout in the child. */ | |
c375c43b KG |
10233 | _exit(close(fileno(stdout)) != 0); |
10234 | } else { | |
10235 | int status; | |
10236 | struct stat st; | |
10237 | ||
10238 | while (wait(&status) != child) | |
10239 | ; | |
10240 | exit( | |
10241 | /* Was there some problem with vforking? */ | |
10242 | child < 0 | |
10243 | ||
10244 | /* Did the child fail? (This shouldn't happen.) */ | |
10245 | || status | |
10246 | ||
10247 | /* Did the vfork/compiler bug occur? */ | |
10248 | || parent != getpid() | |
10249 | ||
10250 | /* Did the file descriptor bug occur? */ | |
10251 | || fstat(fileno(stdout), &st) != 0 | |
10252 | ); | |
10253 | } | |
10254 | } | |
ba479fd2 NN |
10255 | _ACEOF |
10256 | rm -f conftest$ac_exeext | |
10257 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10258 | (eval $ac_link) 2>&5 | |
10259 | ac_status=$? | |
10260 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10261 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
10262 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10263 | (eval $ac_try) 2>&5 | |
10264 | ac_status=$? | |
10265 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10266 | (exit $ac_status); }; }; then | |
c375c43b KG |
10267 | ac_cv_func_vfork_works=yes |
10268 | else | |
ba479fd2 NN |
10269 | echo "$as_me: program exited with status $ac_status" >&5 |
10270 | echo "$as_me: failed program was:" >&5 | |
10271 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10272 | ||
10273 | ( exit $ac_status ) | |
10274 | ac_cv_func_vfork_works=no | |
cafe096b | 10275 | fi |
86da66b5 | 10276 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6e3f3080 | 10277 | fi |
ba479fd2 NN |
10278 | fi |
10279 | echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 | |
10280 | echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 | |
c375c43b | 10281 | |
ba479fd2 NN |
10282 | fi; |
10283 | if test "x$ac_cv_func_fork_works" = xcross; then | |
86da66b5 | 10284 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
10285 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
10286 | echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
c375c43b KG |
10287 | fi |
10288 | ||
ba479fd2 NN |
10289 | if test "x$ac_cv_func_vfork_works" = xyes; then |
10290 | ||
10291 | cat >>confdefs.h <<\_ACEOF | |
10292 | #define HAVE_WORKING_VFORK 1 | |
10293 | _ACEOF | |
10294 | ||
10295 | else | |
10296 | ||
10297 | cat >>confdefs.h <<\_ACEOF | |
c375c43b | 10298 | #define vfork fork |
ba479fd2 | 10299 | _ACEOF |
c375c43b KG |
10300 | |
10301 | fi | |
ba479fd2 NN |
10302 | if test "x$ac_cv_func_fork_works" = xyes; then |
10303 | ||
10304 | cat >>confdefs.h <<\_ACEOF | |
10305 | #define HAVE_WORKING_FORK 1 | |
10306 | _ACEOF | |
10307 | ||
10308 | fi | |
10309 | ||
c375c43b | 10310 | |
81bf3d9e | 10311 | |
dfb77e37 KC |
10312 | if test "X$prefix" = "XNONE"; then |
10313 | acl_final_prefix="$ac_default_prefix" | |
10314 | else | |
10315 | acl_final_prefix="$prefix" | |
10316 | fi | |
10317 | if test "X$exec_prefix" = "XNONE"; then | |
10318 | acl_final_exec_prefix='${prefix}' | |
10319 | else | |
10320 | acl_final_exec_prefix="$exec_prefix" | |
10321 | fi | |
10322 | acl_save_prefix="$prefix" | |
10323 | prefix="$acl_final_prefix" | |
10324 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
10325 | prefix="$acl_save_prefix" | |
f91abfce TT |
10326 | |
10327 | ||
dfb77e37 KC |
10328 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
10329 | if test "${with_gnu_ld+set}" = set; then | |
10330 | withval="$with_gnu_ld" | |
10331 | test "$withval" = no || with_gnu_ld=yes | |
ba479fd2 | 10332 | else |
dfb77e37 KC |
10333 | with_gnu_ld=no |
10334 | fi; | |
10335 | # Prepare PATH_SEPARATOR. | |
10336 | # The user is always right. | |
10337 | if test "${PATH_SEPARATOR+set}" != set; then | |
10338 | echo "#! /bin/sh" >conf$$.sh | |
10339 | echo "exit 0" >>conf$$.sh | |
10340 | chmod +x conf$$.sh | |
10341 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
10342 | PATH_SEPARATOR=';' | |
ba479fd2 | 10343 | else |
dfb77e37 | 10344 | PATH_SEPARATOR=: |
ba479fd2 | 10345 | fi |
dfb77e37 KC |
10346 | rm -f conf$$.sh |
10347 | fi | |
10348 | ac_prog=ld | |
10349 | if test "$GCC" = yes; then | |
10350 | # Check if gcc -print-prog-name=ld gives a path. | |
10351 | echo "$as_me:$LINENO: checking for ld used by GCC" >&5 | |
10352 | echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 | |
10353 | case $host in | |
10354 | *-*-mingw*) | |
10355 | # gcc leaves a trailing carriage return which upsets mingw | |
10356 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
10357 | *) | |
10358 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
10359 | esac | |
10360 | case $ac_prog in | |
10361 | # Accept absolute paths. | |
10362 | [\\/]* | [A-Za-z]:[\\/]*) | |
10363 | re_direlt='/[^/][^/]*/\.\./' | |
10364 | # Canonicalize the path of ld | |
10365 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
10366 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
10367 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
10368 | done | |
10369 | test -z "$LD" && LD="$ac_prog" | |
10370 | ;; | |
10371 | "") | |
10372 | # If it fails, then pretend we aren't using GCC. | |
10373 | ac_prog=ld | |
10374 | ;; | |
10375 | *) | |
10376 | # If it is relative, then search for the first ld in PATH. | |
10377 | with_gnu_ld=unknown | |
10378 | ;; | |
10379 | esac | |
10380 | elif test "$with_gnu_ld" = yes; then | |
10381 | echo "$as_me:$LINENO: checking for GNU ld" >&5 | |
10382 | echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 | |
ba479fd2 | 10383 | else |
dfb77e37 KC |
10384 | echo "$as_me:$LINENO: checking for non-GNU ld" >&5 |
10385 | echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 | |
ba479fd2 | 10386 | fi |
dfb77e37 KC |
10387 | if test "${acl_cv_path_LD+set}" = set; then |
10388 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 10389 | else |
dfb77e37 KC |
10390 | if test -z "$LD"; then |
10391 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
10392 | for ac_dir in $PATH; do | |
10393 | test -z "$ac_dir" && ac_dir=. | |
10394 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
10395 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
10396 | # Check to see if the program is GNU ld. I'd rather use --version, | |
10397 | # but apparently some GNU ld's only accept -v. | |
10398 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
10399 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
10400 | test "$with_gnu_ld" != no && break | |
10401 | else | |
10402 | test "$with_gnu_ld" != yes && break | |
10403 | fi | |
10404 | fi | |
10405 | done | |
10406 | IFS="$ac_save_ifs" | |
10407 | else | |
10408 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
10409 | fi | |
10410 | fi | |
ba479fd2 | 10411 | |
dfb77e37 KC |
10412 | LD="$acl_cv_path_LD" |
10413 | if test -n "$LD"; then | |
10414 | echo "$as_me:$LINENO: result: $LD" >&5 | |
10415 | echo "${ECHO_T}$LD" >&6 | |
10416 | else | |
10417 | echo "$as_me:$LINENO: result: no" >&5 | |
10418 | echo "${ECHO_T}no" >&6 | |
ba479fd2 | 10419 | fi |
dfb77e37 KC |
10420 | test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 |
10421 | echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} | |
10422 | { (exit 1); exit 1; }; } | |
10423 | echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 | |
10424 | echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 | |
10425 | if test "${acl_cv_prog_gnu_ld+set}" = set; then | |
10426 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10427 | else | |
10428 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
10429 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
10430 | acl_cv_prog_gnu_ld=yes | |
10431 | else | |
10432 | acl_cv_prog_gnu_ld=no | |
6e3f3080 | 10433 | fi |
dfb77e37 KC |
10434 | fi |
10435 | echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 | |
10436 | echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 | |
10437 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
10438 | ||
10439 | ||
10440 | ||
10441 | echo "$as_me:$LINENO: checking for shared library run path origin" >&5 | |
10442 | echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 | |
10443 | if test "${acl_cv_rpath+set}" = set; then | |
10444 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10445 | else | |
10446 | ||
10447 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
10448 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
10449 | . ./conftest.sh | |
10450 | rm -f ./conftest.sh | |
10451 | acl_cv_rpath=done | |
ba479fd2 | 10452 | |
eb158727 | 10453 | fi |
dfb77e37 KC |
10454 | echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 |
10455 | echo "${ECHO_T}$acl_cv_rpath" >&6 | |
10456 | wl="$acl_cv_wl" | |
10457 | libext="$acl_cv_libext" | |
10458 | shlibext="$acl_cv_shlibext" | |
10459 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
10460 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
10461 | hardcode_direct="$acl_cv_hardcode_direct" | |
10462 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
10463 | # Check whether --enable-rpath or --disable-rpath was given. | |
10464 | if test "${enable_rpath+set}" = set; then | |
10465 | enableval="$enable_rpath" | |
10466 | : | |
10467 | else | |
10468 | enable_rpath=yes | |
10469 | fi; | |
10470 | ||
10471 | ||
10472 | ||
10473 | ||
10474 | ||
10475 | ||
10476 | ||
10477 | use_additional=yes | |
10478 | ||
10479 | acl_save_prefix="$prefix" | |
10480 | prefix="$acl_final_prefix" | |
10481 | acl_save_exec_prefix="$exec_prefix" | |
10482 | exec_prefix="$acl_final_exec_prefix" | |
10483 | ||
10484 | eval additional_includedir=\"$includedir\" | |
10485 | eval additional_libdir=\"$libdir\" | |
10486 | ||
10487 | exec_prefix="$acl_save_exec_prefix" | |
10488 | prefix="$acl_save_prefix" | |
10489 | ||
10490 | ||
10491 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10492 | if test "${with_libiconv_prefix+set}" = set; then | |
10493 | withval="$with_libiconv_prefix" | |
10494 | ||
10495 | if test "X$withval" = "Xno"; then | |
10496 | use_additional=no | |
10497 | else | |
10498 | if test "X$withval" = "X"; then | |
10499 | ||
10500 | acl_save_prefix="$prefix" | |
10501 | prefix="$acl_final_prefix" | |
10502 | acl_save_exec_prefix="$exec_prefix" | |
10503 | exec_prefix="$acl_final_exec_prefix" | |
10504 | ||
10505 | eval additional_includedir=\"$includedir\" | |
10506 | eval additional_libdir=\"$libdir\" | |
10507 | ||
10508 | exec_prefix="$acl_save_exec_prefix" | |
10509 | prefix="$acl_save_prefix" | |
10510 | ||
10511 | else | |
10512 | additional_includedir="$withval/include" | |
10513 | additional_libdir="$withval/lib" | |
10514 | fi | |
10515 | fi | |
10516 | ||
10517 | fi; | |
10518 | LIBICONV= | |
10519 | LTLIBICONV= | |
10520 | INCICONV= | |
10521 | rpathdirs= | |
10522 | ltrpathdirs= | |
10523 | names_already_handled= | |
10524 | names_next_round='iconv ' | |
10525 | while test -n "$names_next_round"; do | |
10526 | names_this_round="$names_next_round" | |
10527 | names_next_round= | |
10528 | for name in $names_this_round; do | |
10529 | already_handled= | |
10530 | for n in $names_already_handled; do | |
10531 | if test "$n" = "$name"; then | |
10532 | already_handled=yes | |
10533 | break | |
10534 | fi | |
10535 | done | |
10536 | if test -z "$already_handled"; then | |
10537 | names_already_handled="$names_already_handled $name" | |
10538 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10539 | eval value=\"\$HAVE_LIB$uppername\" | |
10540 | if test -n "$value"; then | |
10541 | if test "$value" = yes; then | |
10542 | eval value=\"\$LIB$uppername\" | |
10543 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
10544 | eval value=\"\$LTLIB$uppername\" | |
10545 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
10546 | else | |
10547 | : | |
10548 | fi | |
10549 | else | |
10550 | found_dir= | |
10551 | found_la= | |
10552 | found_so= | |
10553 | found_a= | |
10554 | if test $use_additional = yes; then | |
10555 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
10556 | found_dir="$additional_libdir" | |
10557 | found_so="$additional_libdir/lib$name.$shlibext" | |
10558 | if test -f "$additional_libdir/lib$name.la"; then | |
10559 | found_la="$additional_libdir/lib$name.la" | |
10560 | fi | |
10561 | else | |
10562 | if test -f "$additional_libdir/lib$name.$libext"; then | |
10563 | found_dir="$additional_libdir" | |
10564 | found_a="$additional_libdir/lib$name.$libext" | |
10565 | if test -f "$additional_libdir/lib$name.la"; then | |
10566 | found_la="$additional_libdir/lib$name.la" | |
10567 | fi | |
10568 | fi | |
10569 | fi | |
10570 | fi | |
10571 | if test "X$found_dir" = "X"; then | |
10572 | for x in $LDFLAGS $LTLIBICONV; do | |
10573 | ||
10574 | acl_save_prefix="$prefix" | |
10575 | prefix="$acl_final_prefix" | |
10576 | acl_save_exec_prefix="$exec_prefix" | |
10577 | exec_prefix="$acl_final_exec_prefix" | |
10578 | eval x=\"$x\" | |
10579 | exec_prefix="$acl_save_exec_prefix" | |
10580 | prefix="$acl_save_prefix" | |
10581 | ||
10582 | case "$x" in | |
10583 | -L*) | |
10584 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10585 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
10586 | found_dir="$dir" | |
10587 | found_so="$dir/lib$name.$shlibext" | |
10588 | if test -f "$dir/lib$name.la"; then | |
10589 | found_la="$dir/lib$name.la" | |
10590 | fi | |
10591 | else | |
10592 | if test -f "$dir/lib$name.$libext"; then | |
10593 | found_dir="$dir" | |
10594 | found_a="$dir/lib$name.$libext" | |
10595 | if test -f "$dir/lib$name.la"; then | |
10596 | found_la="$dir/lib$name.la" | |
10597 | fi | |
10598 | fi | |
10599 | fi | |
10600 | ;; | |
10601 | esac | |
10602 | if test "X$found_dir" != "X"; then | |
10603 | break | |
10604 | fi | |
10605 | done | |
10606 | fi | |
10607 | if test "X$found_dir" != "X"; then | |
10608 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
10609 | if test "X$found_so" != "X"; then | |
10610 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10611 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10612 | else | |
10613 | haveit= | |
10614 | for x in $ltrpathdirs; do | |
10615 | if test "X$x" = "X$found_dir"; then | |
10616 | haveit=yes | |
10617 | break | |
10618 | fi | |
10619 | done | |
10620 | if test -z "$haveit"; then | |
10621 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10622 | fi | |
10623 | if test "$hardcode_direct" = yes; then | |
10624 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10625 | else | |
10626 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10627 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10628 | haveit= | |
10629 | for x in $rpathdirs; do | |
10630 | if test "X$x" = "X$found_dir"; then | |
10631 | haveit=yes | |
10632 | break | |
10633 | fi | |
10634 | done | |
10635 | if test -z "$haveit"; then | |
10636 | rpathdirs="$rpathdirs $found_dir" | |
10637 | fi | |
10638 | else | |
10639 | haveit= | |
10640 | for x in $LDFLAGS $LIBICONV; do | |
10641 | ||
10642 | acl_save_prefix="$prefix" | |
10643 | prefix="$acl_final_prefix" | |
10644 | acl_save_exec_prefix="$exec_prefix" | |
10645 | exec_prefix="$acl_final_exec_prefix" | |
10646 | eval x=\"$x\" | |
10647 | exec_prefix="$acl_save_exec_prefix" | |
10648 | prefix="$acl_save_prefix" | |
10649 | ||
10650 | if test "X$x" = "X-L$found_dir"; then | |
10651 | haveit=yes | |
10652 | break | |
10653 | fi | |
10654 | done | |
10655 | if test -z "$haveit"; then | |
10656 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
10657 | fi | |
10658 | if test "$hardcode_minus_L" != no; then | |
10659 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10660 | else | |
10661 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
10662 | fi | |
10663 | fi | |
10664 | fi | |
10665 | fi | |
10666 | else | |
10667 | if test "X$found_a" != "X"; then | |
10668 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
10669 | else | |
10670 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
10671 | fi | |
10672 | fi | |
10673 | additional_includedir= | |
10674 | case "$found_dir" in | |
10675 | */lib | */lib/) | |
10676 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10677 | additional_includedir="$basedir/include" | |
10678 | ;; | |
10679 | esac | |
10680 | if test "X$additional_includedir" != "X"; then | |
10681 | if test "X$additional_includedir" != "X/usr/include"; then | |
10682 | haveit= | |
10683 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10684 | if test -n "$GCC"; then | |
10685 | case $host_os in | |
10686 | linux*) haveit=yes;; | |
10687 | esac | |
10688 | fi | |
10689 | fi | |
10690 | if test -z "$haveit"; then | |
10691 | for x in $CPPFLAGS $INCICONV; do | |
10692 | ||
10693 | acl_save_prefix="$prefix" | |
10694 | prefix="$acl_final_prefix" | |
10695 | acl_save_exec_prefix="$exec_prefix" | |
10696 | exec_prefix="$acl_final_exec_prefix" | |
10697 | eval x=\"$x\" | |
10698 | exec_prefix="$acl_save_exec_prefix" | |
10699 | prefix="$acl_save_prefix" | |
10700 | ||
10701 | if test "X$x" = "X-I$additional_includedir"; then | |
10702 | haveit=yes | |
10703 | break | |
10704 | fi | |
10705 | done | |
10706 | if test -z "$haveit"; then | |
10707 | if test -d "$additional_includedir"; then | |
10708 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
10709 | fi | |
10710 | fi | |
10711 | fi | |
10712 | fi | |
10713 | fi | |
10714 | if test -n "$found_la"; then | |
10715 | save_libdir="$libdir" | |
10716 | case "$found_la" in | |
10717 | */* | *\\*) . "$found_la" ;; | |
10718 | *) . "./$found_la" ;; | |
10719 | esac | |
10720 | libdir="$save_libdir" | |
10721 | for dep in $dependency_libs; do | |
10722 | case "$dep" in | |
10723 | -L*) | |
10724 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10725 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10726 | haveit= | |
10727 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10728 | if test -n "$GCC"; then | |
10729 | case $host_os in | |
10730 | linux*) haveit=yes;; | |
10731 | esac | |
10732 | fi | |
10733 | fi | |
10734 | if test -z "$haveit"; then | |
10735 | haveit= | |
10736 | for x in $LDFLAGS $LIBICONV; do | |
10737 | ||
10738 | acl_save_prefix="$prefix" | |
10739 | prefix="$acl_final_prefix" | |
10740 | acl_save_exec_prefix="$exec_prefix" | |
10741 | exec_prefix="$acl_final_exec_prefix" | |
10742 | eval x=\"$x\" | |
10743 | exec_prefix="$acl_save_exec_prefix" | |
10744 | prefix="$acl_save_prefix" | |
10745 | ||
10746 | if test "X$x" = "X-L$additional_libdir"; then | |
10747 | haveit=yes | |
10748 | break | |
10749 | fi | |
10750 | done | |
10751 | if test -z "$haveit"; then | |
10752 | if test -d "$additional_libdir"; then | |
10753 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
10754 | fi | |
10755 | fi | |
10756 | haveit= | |
10757 | for x in $LDFLAGS $LTLIBICONV; do | |
10758 | ||
10759 | acl_save_prefix="$prefix" | |
10760 | prefix="$acl_final_prefix" | |
10761 | acl_save_exec_prefix="$exec_prefix" | |
10762 | exec_prefix="$acl_final_exec_prefix" | |
10763 | eval x=\"$x\" | |
10764 | exec_prefix="$acl_save_exec_prefix" | |
10765 | prefix="$acl_save_prefix" | |
10766 | ||
10767 | if test "X$x" = "X-L$additional_libdir"; then | |
10768 | haveit=yes | |
10769 | break | |
10770 | fi | |
10771 | done | |
10772 | if test -z "$haveit"; then | |
10773 | if test -d "$additional_libdir"; then | |
10774 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
10775 | fi | |
10776 | fi | |
10777 | fi | |
10778 | fi | |
10779 | ;; | |
10780 | -R*) | |
10781 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10782 | if test "$enable_rpath" != no; then | |
10783 | haveit= | |
10784 | for x in $rpathdirs; do | |
10785 | if test "X$x" = "X$dir"; then | |
10786 | haveit=yes | |
10787 | break | |
10788 | fi | |
10789 | done | |
10790 | if test -z "$haveit"; then | |
10791 | rpathdirs="$rpathdirs $dir" | |
10792 | fi | |
10793 | haveit= | |
10794 | for x in $ltrpathdirs; do | |
10795 | if test "X$x" = "X$dir"; then | |
10796 | haveit=yes | |
10797 | break | |
10798 | fi | |
10799 | done | |
10800 | if test -z "$haveit"; then | |
10801 | ltrpathdirs="$ltrpathdirs $dir" | |
10802 | fi | |
10803 | fi | |
10804 | ;; | |
10805 | -l*) | |
10806 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10807 | ;; | |
10808 | *.la) | |
10809 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10810 | ;; | |
10811 | *) | |
10812 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
10813 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
10814 | ;; | |
10815 | esac | |
10816 | done | |
10817 | fi | |
10818 | else | |
10819 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
10820 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
10821 | fi | |
10822 | fi | |
10823 | fi | |
10824 | done | |
10825 | done | |
10826 | if test "X$rpathdirs" != "X"; then | |
10827 | if test -n "$hardcode_libdir_separator"; then | |
10828 | alldirs= | |
10829 | for found_dir in $rpathdirs; do | |
10830 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10831 | done | |
10832 | acl_save_libdir="$libdir" | |
10833 | libdir="$alldirs" | |
10834 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10835 | libdir="$acl_save_libdir" | |
10836 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
10837 | else | |
10838 | for found_dir in $rpathdirs; do | |
10839 | acl_save_libdir="$libdir" | |
10840 | libdir="$found_dir" | |
10841 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10842 | libdir="$acl_save_libdir" | |
10843 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
10844 | done | |
10845 | fi | |
10846 | fi | |
10847 | if test "X$ltrpathdirs" != "X"; then | |
10848 | for found_dir in $ltrpathdirs; do | |
10849 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
10850 | done | |
10851 | fi | |
10852 | ||
10853 | ||
10854 | ||
10855 | ||
10856 | ||
10857 | ||
10858 | ||
10859 | am_save_CPPFLAGS="$CPPFLAGS" | |
10860 | ||
10861 | for element in $INCICONV; do | |
10862 | haveit= | |
10863 | for x in $CPPFLAGS; do | |
10864 | ||
10865 | acl_save_prefix="$prefix" | |
10866 | prefix="$acl_final_prefix" | |
10867 | acl_save_exec_prefix="$exec_prefix" | |
10868 | exec_prefix="$acl_final_exec_prefix" | |
10869 | eval x=\"$x\" | |
10870 | exec_prefix="$acl_save_exec_prefix" | |
10871 | prefix="$acl_save_prefix" | |
10872 | ||
10873 | if test "X$x" = "X$element"; then | |
10874 | haveit=yes | |
10875 | break | |
10876 | fi | |
10877 | done | |
10878 | if test -z "$haveit"; then | |
10879 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10880 | fi | |
10881 | done | |
eb158727 ZW |
10882 | |
10883 | ||
ba479fd2 NN |
10884 | echo "$as_me:$LINENO: checking for iconv" >&5 |
10885 | echo $ECHO_N "checking for iconv... $ECHO_C" >&6 | |
10886 | if test "${am_cv_func_iconv+set}" = set; then | |
10887 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 10888 | else |
ba479fd2 | 10889 | |
f91abfce TT |
10890 | am_cv_func_iconv="no, consider installing GNU libiconv" |
10891 | am_cv_lib_iconv=no | |
ba479fd2 | 10892 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10893 | /* confdefs.h. */ |
10894 | _ACEOF | |
10895 | cat confdefs.h >>conftest.$ac_ext | |
10896 | cat >>conftest.$ac_ext <<_ACEOF | |
10897 | /* end confdefs.h. */ | |
f91abfce TT |
10898 | #include <stdlib.h> |
10899 | #include <iconv.h> | |
ba479fd2 NN |
10900 | int |
10901 | main () | |
10902 | { | |
f91abfce TT |
10903 | iconv_t cd = iconv_open("",""); |
10904 | iconv(cd,NULL,NULL,NULL,NULL); | |
10905 | iconv_close(cd); | |
ba479fd2 NN |
10906 | ; |
10907 | return 0; | |
10908 | } | |
10909 | _ACEOF | |
10910 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10911 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 10912 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 10913 | ac_status=$? |
86da66b5 HPN |
10914 | grep -v '^ *+' conftest.er1 >conftest.err |
10915 | rm -f conftest.er1 | |
10916 | cat conftest.err >&5 | |
ba479fd2 NN |
10917 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10918 | (exit $ac_status); } && | |
d7974fe6 KC |
10919 | { ac_try='test -z "$ac_c_werror_flag" |
10920 | || test ! -s conftest.err' | |
86da66b5 HPN |
10921 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10922 | (eval $ac_try) 2>&5 | |
10923 | ac_status=$? | |
10924 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10925 | (exit $ac_status); }; } && | |
10926 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
10927 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10928 | (eval $ac_try) 2>&5 | |
10929 | ac_status=$? | |
10930 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10931 | (exit $ac_status); }; }; then | |
f91abfce TT |
10932 | am_cv_func_iconv=yes |
10933 | else | |
ba479fd2 NN |
10934 | echo "$as_me: failed program was:" >&5 |
10935 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10936 | ||
f91abfce | 10937 | fi |
86da66b5 HPN |
10938 | rm -f conftest.err conftest.$ac_objext \ |
10939 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
10940 | if test "$am_cv_func_iconv" != yes; then |
10941 | am_save_LIBS="$LIBS" | |
dfb77e37 | 10942 | LIBS="$LIBS $LIBICONV" |
ba479fd2 | 10943 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10944 | /* confdefs.h. */ |
10945 | _ACEOF | |
10946 | cat confdefs.h >>conftest.$ac_ext | |
10947 | cat >>conftest.$ac_ext <<_ACEOF | |
10948 | /* end confdefs.h. */ | |
f91abfce TT |
10949 | #include <stdlib.h> |
10950 | #include <iconv.h> | |
ba479fd2 NN |
10951 | int |
10952 | main () | |
10953 | { | |
f91abfce TT |
10954 | iconv_t cd = iconv_open("",""); |
10955 | iconv(cd,NULL,NULL,NULL,NULL); | |
10956 | iconv_close(cd); | |
ba479fd2 NN |
10957 | ; |
10958 | return 0; | |
10959 | } | |
10960 | _ACEOF | |
10961 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10962 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 10963 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 10964 | ac_status=$? |
86da66b5 HPN |
10965 | grep -v '^ *+' conftest.er1 >conftest.err |
10966 | rm -f conftest.er1 | |
10967 | cat conftest.err >&5 | |
ba479fd2 NN |
10968 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10969 | (exit $ac_status); } && | |
d7974fe6 KC |
10970 | { ac_try='test -z "$ac_c_werror_flag" |
10971 | || test ! -s conftest.err' | |
86da66b5 HPN |
10972 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10973 | (eval $ac_try) 2>&5 | |
10974 | ac_status=$? | |
10975 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10976 | (exit $ac_status); }; } && | |
10977 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
10978 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10979 | (eval $ac_try) 2>&5 | |
10980 | ac_status=$? | |
10981 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10982 | (exit $ac_status); }; }; then | |
f91abfce TT |
10983 | am_cv_lib_iconv=yes |
10984 | am_cv_func_iconv=yes | |
10985 | else | |
ba479fd2 NN |
10986 | echo "$as_me: failed program was:" >&5 |
10987 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10988 | ||
f91abfce | 10989 | fi |
86da66b5 HPN |
10990 | rm -f conftest.err conftest.$ac_objext \ |
10991 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
10992 | LIBS="$am_save_LIBS" |
10993 | fi | |
6e3f3080 | 10994 | |
ba479fd2 NN |
10995 | fi |
10996 | echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 | |
10997 | echo "${ECHO_T}$am_cv_func_iconv" >&6 | |
63cf211a | 10998 | if test "$am_cv_func_iconv" = yes; then |
ba479fd2 NN |
10999 | |
11000 | cat >>confdefs.h <<\_ACEOF | |
f91abfce | 11001 | #define HAVE_ICONV 1 |
ba479fd2 | 11002 | _ACEOF |
f91abfce | 11003 | |
dfb77e37 KC |
11004 | fi |
11005 | if test "$am_cv_lib_iconv" = yes; then | |
11006 | echo "$as_me:$LINENO: checking how to link with libiconv" >&5 | |
11007 | echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 | |
11008 | echo "$as_me:$LINENO: result: $LIBICONV" >&5 | |
11009 | echo "${ECHO_T}$LIBICONV" >&6 | |
11010 | else | |
11011 | CPPFLAGS="$am_save_CPPFLAGS" | |
11012 | LIBICONV= | |
11013 | LTLIBICONV= | |
11014 | fi | |
11015 | ||
11016 | ||
11017 | ||
11018 | if test "$am_cv_func_iconv" = yes; then | |
ba479fd2 NN |
11019 | echo "$as_me:$LINENO: checking for iconv declaration" >&5 |
11020 | echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 | |
11021 | if test "${am_cv_proto_iconv+set}" = set; then | |
11022 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 11023 | else |
ba479fd2 NN |
11024 | |
11025 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11026 | /* confdefs.h. */ |
11027 | _ACEOF | |
11028 | cat confdefs.h >>conftest.$ac_ext | |
11029 | cat >>conftest.$ac_ext <<_ACEOF | |
11030 | /* end confdefs.h. */ | |
f91abfce TT |
11031 | |
11032 | #include <stdlib.h> | |
11033 | #include <iconv.h> | |
11034 | extern | |
11035 | #ifdef __cplusplus | |
11036 | "C" | |
11037 | #endif | |
11038 | #if defined(__STDC__) || defined(__cplusplus) | |
11039 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
11040 | #else | |
11041 | size_t iconv(); | |
11042 | #endif | |
11043 | ||
ba479fd2 NN |
11044 | int |
11045 | main () | |
11046 | { | |
f91abfce | 11047 | |
ba479fd2 NN |
11048 | ; |
11049 | return 0; | |
11050 | } | |
11051 | _ACEOF | |
11052 | rm -f conftest.$ac_objext | |
11053 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11054 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11055 | ac_status=$? |
86da66b5 HPN |
11056 | grep -v '^ *+' conftest.er1 >conftest.err |
11057 | rm -f conftest.er1 | |
11058 | cat conftest.err >&5 | |
ba479fd2 NN |
11059 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11060 | (exit $ac_status); } && | |
d7974fe6 KC |
11061 | { ac_try='test -z "$ac_c_werror_flag" |
11062 | || test ! -s conftest.err' | |
86da66b5 HPN |
11063 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11064 | (eval $ac_try) 2>&5 | |
11065 | ac_status=$? | |
11066 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11067 | (exit $ac_status); }; } && | |
11068 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11069 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11070 | (eval $ac_try) 2>&5 | |
11071 | ac_status=$? | |
11072 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11073 | (exit $ac_status); }; }; then | |
f91abfce TT |
11074 | am_cv_proto_iconv_arg1="" |
11075 | else | |
ba479fd2 NN |
11076 | echo "$as_me: failed program was:" >&5 |
11077 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11078 | ||
11079 | am_cv_proto_iconv_arg1="const" | |
f91abfce | 11080 | fi |
86da66b5 | 11081 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
f91abfce TT |
11082 | 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);" |
11083 | fi | |
11084 | ||
11085 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
ba479fd2 NN |
11086 | echo "$as_me:$LINENO: result: ${ac_t:- |
11087 | }$am_cv_proto_iconv" >&5 | |
11088 | echo "${ECHO_T}${ac_t:- | |
11089 | }$am_cv_proto_iconv" >&6 | |
11090 | ||
11091 | cat >>confdefs.h <<_ACEOF | |
f91abfce | 11092 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
ba479fd2 | 11093 | _ACEOF |
f91abfce TT |
11094 | |
11095 | fi | |
f91abfce | 11096 | |
56694dd9 ZW |
11097 | # Until we have in-tree GNU iconv: |
11098 | LIBICONV_DEP= | |
11099 | ||
11100 | ||
11101 | ||
ba479fd2 NN |
11102 | echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 |
11103 | echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 | |
11104 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then | |
11105 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
56694dd9 | 11106 | else |
ba479fd2 | 11107 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11108 | /* confdefs.h. */ |
11109 | _ACEOF | |
11110 | cat confdefs.h >>conftest.$ac_ext | |
11111 | cat >>conftest.$ac_ext <<_ACEOF | |
11112 | /* end confdefs.h. */ | |
56694dd9 | 11113 | #include <locale.h> |
ba479fd2 NN |
11114 | int |
11115 | main () | |
11116 | { | |
56694dd9 | 11117 | return LC_MESSAGES |
ba479fd2 NN |
11118 | ; |
11119 | return 0; | |
11120 | } | |
11121 | _ACEOF | |
11122 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11123 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 11124 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 11125 | ac_status=$? |
86da66b5 HPN |
11126 | grep -v '^ *+' conftest.er1 >conftest.err |
11127 | rm -f conftest.er1 | |
11128 | cat conftest.err >&5 | |
ba479fd2 NN |
11129 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11130 | (exit $ac_status); } && | |
d7974fe6 KC |
11131 | { ac_try='test -z "$ac_c_werror_flag" |
11132 | || test ! -s conftest.err' | |
86da66b5 HPN |
11133 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11134 | (eval $ac_try) 2>&5 | |
11135 | ac_status=$? | |
11136 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11137 | (exit $ac_status); }; } && | |
11138 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
11139 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11140 | (eval $ac_try) 2>&5 | |
11141 | ac_status=$? | |
11142 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11143 | (exit $ac_status); }; }; then | |
56694dd9 ZW |
11144 | am_cv_val_LC_MESSAGES=yes |
11145 | else | |
ba479fd2 NN |
11146 | echo "$as_me: failed program was:" >&5 |
11147 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11148 | ||
11149 | am_cv_val_LC_MESSAGES=no | |
56694dd9 | 11150 | fi |
86da66b5 HPN |
11151 | rm -f conftest.err conftest.$ac_objext \ |
11152 | conftest$ac_exeext conftest.$ac_ext | |
56694dd9 | 11153 | fi |
ba479fd2 NN |
11154 | echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 |
11155 | echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 | |
63cf211a | 11156 | if test $am_cv_val_LC_MESSAGES = yes; then |
ba479fd2 NN |
11157 | |
11158 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 11159 | #define HAVE_LC_MESSAGES 1 |
ba479fd2 | 11160 | _ACEOF |
56694dd9 ZW |
11161 | |
11162 | fi | |
11163 | ||
f91abfce | 11164 | |
a03ea89b BM |
11165 | |
11166 | echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 | |
11167 | echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 | |
11168 | if test "${am_cv_langinfo_codeset+set}" = set; then | |
11169 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11170 | else | |
11171 | cat >conftest.$ac_ext <<_ACEOF | |
11172 | /* confdefs.h. */ | |
11173 | _ACEOF | |
11174 | cat confdefs.h >>conftest.$ac_ext | |
11175 | cat >>conftest.$ac_ext <<_ACEOF | |
11176 | /* end confdefs.h. */ | |
11177 | #include <langinfo.h> | |
11178 | int | |
11179 | main () | |
11180 | { | |
11181 | char* cs = nl_langinfo(CODESET); | |
11182 | ; | |
11183 | return 0; | |
11184 | } | |
11185 | _ACEOF | |
11186 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11187 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11188 | (eval $ac_link) 2>conftest.er1 | |
11189 | ac_status=$? | |
11190 | grep -v '^ *+' conftest.er1 >conftest.err | |
11191 | rm -f conftest.er1 | |
11192 | cat conftest.err >&5 | |
11193 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11194 | (exit $ac_status); } && | |
d7974fe6 KC |
11195 | { ac_try='test -z "$ac_c_werror_flag" |
11196 | || test ! -s conftest.err' | |
a03ea89b BM |
11197 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11198 | (eval $ac_try) 2>&5 | |
11199 | ac_status=$? | |
11200 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11201 | (exit $ac_status); }; } && | |
11202 | { ac_try='test -s conftest$ac_exeext' | |
11203 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11204 | (eval $ac_try) 2>&5 | |
11205 | ac_status=$? | |
11206 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11207 | (exit $ac_status); }; }; then | |
11208 | am_cv_langinfo_codeset=yes | |
11209 | else | |
11210 | echo "$as_me: failed program was:" >&5 | |
11211 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11212 | ||
11213 | am_cv_langinfo_codeset=no | |
11214 | fi | |
11215 | rm -f conftest.err conftest.$ac_objext \ | |
11216 | conftest$ac_exeext conftest.$ac_ext | |
11217 | ||
11218 | fi | |
11219 | echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 | |
11220 | echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 | |
11221 | if test $am_cv_langinfo_codeset = yes; then | |
11222 | ||
11223 | cat >>confdefs.h <<\_ACEOF | |
11224 | #define HAVE_LANGINFO_CODESET 1 | |
11225 | _ACEOF | |
11226 | ||
11227 | fi | |
11228 | ||
11229 | ||
86cf1cbd KG |
11230 | # We will need to find libiberty.h and ansidecl.h |
11231 | saved_CFLAGS="$CFLAGS" | |
11232 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
ad6717df PB |
11233 | |
11234 | ||
11235 | ||
11236 | ||
11237 | ||
11238 | ||
11239 | ||
11240 | ||
11241 | ||
11242 | ||
11243 | ||
11244 | ||
11245 | ||
11246 | ||
11247 | ||
11248 | ||
11249 | ||
11250 | ||
11251 | ||
11252 | ||
11253 | ||
6a257778 | 11254 | |
ad6717df PB |
11255 | |
11256 | ||
0d667716 KG |
11257 | |
11258 | ||
11259 | ||
11260 | ||
11261 | ||
11262 | ||
11263 | ||
11264 | ||
11265 | ||
11266 | ||
367e8319 | 11267 | |
0d667716 KG |
11268 | |
11269 | ||
7391b66c | 11270 | |
ed5b9f96 GK |
11271 | |
11272 | for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \ | |
11273 | strsignal strstr strverscmp \ | |
11274 | errno snprintf vsnprintf vasprintf malloc realloc calloc \ | |
367e8319 | 11275 | 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 | 11276 | do |
ad6717df | 11277 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11278 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11279 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11280 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11281 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11282 | else | |
11283 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11284 | /* confdefs.h. */ |
11285 | _ACEOF | |
11286 | cat confdefs.h >>conftest.$ac_ext | |
11287 | cat >>conftest.$ac_ext <<_ACEOF | |
11288 | /* end confdefs.h. */ | |
7afe8c41 KG |
11289 | #undef $ac_tr_decl |
11290 | #define $ac_tr_decl 1 | |
ba479fd2 | 11291 | |
d02af173 | 11292 | #include "ansidecl.h" |
86cf1cbd | 11293 | #include "system.h" |
f31e826b | 11294 | |
ba479fd2 NN |
11295 | int |
11296 | main () | |
11297 | { | |
86cf1cbd KG |
11298 | #ifndef $ac_func |
11299 | char *(*pfn) = (char *(*)) $ac_func ; | |
11300 | #endif | |
ba479fd2 NN |
11301 | ; |
11302 | return 0; | |
11303 | } | |
11304 | _ACEOF | |
11305 | rm -f conftest.$ac_objext | |
11306 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11307 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11308 | ac_status=$? |
86da66b5 HPN |
11309 | grep -v '^ *+' conftest.er1 >conftest.err |
11310 | rm -f conftest.er1 | |
11311 | cat conftest.err >&5 | |
ba479fd2 NN |
11312 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11313 | (exit $ac_status); } && | |
d7974fe6 KC |
11314 | { ac_try='test -z "$ac_c_werror_flag" |
11315 | || test ! -s conftest.err' | |
86da66b5 HPN |
11316 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11317 | (eval $ac_try) 2>&5 | |
11318 | ac_status=$? | |
11319 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11320 | (exit $ac_status); }; } && | |
11321 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11322 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11323 | (eval $ac_try) 2>&5 | |
11324 | ac_status=$? | |
11325 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11326 | (exit $ac_status); }; }; then | |
f31e826b | 11327 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 11328 | else |
ba479fd2 NN |
11329 | echo "$as_me: failed program was:" >&5 |
11330 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11331 | ||
11332 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 11333 | fi |
86da66b5 | 11334 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
11335 | fi |
11336 | ||
f31e826b | 11337 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
11338 | echo "$as_me:$LINENO: result: yes" >&5 |
11339 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 11340 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11341 | _ACEOF |
11342 | ||
81bf3d9e | 11343 | else |
ba479fd2 NN |
11344 | echo "$as_me:$LINENO: result: no" >&5 |
11345 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 11346 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11347 | _ACEOF |
11348 | ||
81bf3d9e RH |
11349 | fi |
11350 | ||
11351 | done | |
ba479fd2 | 11352 | |
ba479fd2 | 11353 | |
ba479fd2 | 11354 | |
81bf3d9e | 11355 | |
81bf3d9e RH |
11356 | |
11357 | for ac_func in getrlimit setrlimit getrusage | |
11358 | do | |
ad6717df | 11359 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11360 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11361 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11362 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11363 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11364 | else | |
11365 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11366 | /* confdefs.h. */ |
11367 | _ACEOF | |
11368 | cat confdefs.h >>conftest.$ac_ext | |
11369 | cat >>conftest.$ac_ext <<_ACEOF | |
11370 | /* end confdefs.h. */ | |
7afe8c41 KG |
11371 | #undef $ac_tr_decl |
11372 | #define $ac_tr_decl 1 | |
ba479fd2 | 11373 | |
d02af173 | 11374 | #include "ansidecl.h" |
86cf1cbd | 11375 | #include "system.h" |
81bf3d9e RH |
11376 | #ifdef HAVE_SYS_RESOURCE_H |
11377 | #include <sys/resource.h> | |
11378 | #endif | |
11379 | ||
f31e826b | 11380 | |
ba479fd2 NN |
11381 | int |
11382 | main () | |
11383 | { | |
86cf1cbd KG |
11384 | #ifndef $ac_func |
11385 | char *(*pfn) = (char *(*)) $ac_func ; | |
11386 | #endif | |
ba479fd2 NN |
11387 | ; |
11388 | return 0; | |
11389 | } | |
11390 | _ACEOF | |
11391 | rm -f conftest.$ac_objext | |
11392 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11393 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11394 | ac_status=$? |
86da66b5 HPN |
11395 | grep -v '^ *+' conftest.er1 >conftest.err |
11396 | rm -f conftest.er1 | |
11397 | cat conftest.err >&5 | |
ba479fd2 NN |
11398 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11399 | (exit $ac_status); } && | |
d7974fe6 KC |
11400 | { ac_try='test -z "$ac_c_werror_flag" |
11401 | || test ! -s conftest.err' | |
86da66b5 HPN |
11402 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11403 | (eval $ac_try) 2>&5 | |
11404 | ac_status=$? | |
11405 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11406 | (exit $ac_status); }; } && | |
11407 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11408 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11409 | (eval $ac_try) 2>&5 | |
11410 | ac_status=$? | |
11411 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11412 | (exit $ac_status); }; }; then | |
f31e826b | 11413 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 11414 | else |
ba479fd2 NN |
11415 | echo "$as_me: failed program was:" >&5 |
11416 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11417 | ||
11418 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 11419 | fi |
86da66b5 | 11420 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
11421 | fi |
11422 | ||
f31e826b | 11423 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
11424 | echo "$as_me:$LINENO: result: yes" >&5 |
11425 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 11426 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11427 | _ACEOF |
11428 | ||
81bf3d9e | 11429 | else |
ba479fd2 NN |
11430 | echo "$as_me:$LINENO: result: no" >&5 |
11431 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 11432 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11433 | _ACEOF |
11434 | ||
81bf3d9e RH |
11435 | fi |
11436 | ||
11437 | done | |
86cf1cbd | 11438 | |
81bf3d9e | 11439 | |
ba479fd2 | 11440 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11441 | /* confdefs.h. */ |
11442 | _ACEOF | |
11443 | cat confdefs.h >>conftest.$ac_ext | |
11444 | cat >>conftest.$ac_ext <<_ACEOF | |
11445 | /* end confdefs.h. */ | |
b2522d2b HPN |
11446 | |
11447 | #include "ansidecl.h" | |
11448 | #include "system.h" | |
11449 | #ifdef HAVE_SYS_RESOURCE_H | |
11450 | #include <sys/resource.h> | |
11451 | #endif | |
11452 | ||
ba479fd2 NN |
11453 | int |
11454 | main () | |
11455 | { | |
b2522d2b | 11456 | rlim_t l = 0; |
ba479fd2 NN |
11457 | ; |
11458 | return 0; | |
11459 | } | |
11460 | _ACEOF | |
11461 | rm -f conftest.$ac_objext | |
11462 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11463 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11464 | ac_status=$? |
86da66b5 HPN |
11465 | grep -v '^ *+' conftest.er1 >conftest.err |
11466 | rm -f conftest.er1 | |
11467 | cat conftest.err >&5 | |
ba479fd2 NN |
11468 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11469 | (exit $ac_status); } && | |
d7974fe6 KC |
11470 | { ac_try='test -z "$ac_c_werror_flag" |
11471 | || test ! -s conftest.err' | |
86da66b5 HPN |
11472 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11473 | (eval $ac_try) 2>&5 | |
11474 | ac_status=$? | |
11475 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11476 | (exit $ac_status); }; } && | |
11477 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11478 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11479 | (eval $ac_try) 2>&5 | |
11480 | ac_status=$? | |
11481 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11482 | (exit $ac_status); }; }; then | |
b2522d2b HPN |
11483 | : |
11484 | else | |
ba479fd2 NN |
11485 | echo "$as_me: failed program was:" >&5 |
11486 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11487 | ||
11488 | ||
11489 | cat >>confdefs.h <<\_ACEOF | |
b2522d2b | 11490 | #define rlim_t long |
ba479fd2 | 11491 | _ACEOF |
b2522d2b HPN |
11492 | |
11493 | fi | |
86da66b5 | 11494 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
b2522d2b | 11495 | |
2102b2fe RS |
11496 | # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible |
11497 | # FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname | |
11498 | # in collect2.c, <fcntl.h> isn't visible, but the configure test below needs | |
11499 | # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME. | |
ad6717df | 11500 | |
351df804 | 11501 | for ac_func in ldgetname |
c1800ec8 | 11502 | do |
ad6717df | 11503 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11504 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11505 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11506 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11507 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11508 | else | |
11509 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11510 | /* confdefs.h. */ |
11511 | _ACEOF | |
11512 | cat confdefs.h >>conftest.$ac_ext | |
11513 | cat >>conftest.$ac_ext <<_ACEOF | |
11514 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11515 | #undef $ac_tr_decl |
11516 | #define $ac_tr_decl 1 | |
ba479fd2 | 11517 | |
351df804 KG |
11518 | #include "ansidecl.h" |
11519 | #include "system.h" | |
11520 | #ifdef HAVE_LDFCN_H | |
2102b2fe RS |
11521 | #undef FREAD |
11522 | #undef FWRITE | |
351df804 KG |
11523 | #include <ldfcn.h> |
11524 | #endif | |
11525 | ||
11526 | ||
ba479fd2 NN |
11527 | int |
11528 | main () | |
11529 | { | |
351df804 KG |
11530 | #ifndef $ac_func |
11531 | char *(*pfn) = (char *(*)) $ac_func ; | |
11532 | #endif | |
ba479fd2 NN |
11533 | ; |
11534 | return 0; | |
11535 | } | |
11536 | _ACEOF | |
11537 | rm -f conftest.$ac_objext | |
11538 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11539 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11540 | ac_status=$? |
86da66b5 HPN |
11541 | grep -v '^ *+' conftest.er1 >conftest.err |
11542 | rm -f conftest.er1 | |
11543 | cat conftest.err >&5 | |
ba479fd2 NN |
11544 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11545 | (exit $ac_status); } && | |
d7974fe6 KC |
11546 | { ac_try='test -z "$ac_c_werror_flag" |
11547 | || test ! -s conftest.err' | |
86da66b5 HPN |
11548 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11549 | (eval $ac_try) 2>&5 | |
11550 | ac_status=$? | |
11551 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11552 | (exit $ac_status); }; } && | |
11553 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11554 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11555 | (eval $ac_try) 2>&5 | |
11556 | ac_status=$? | |
11557 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11558 | (exit $ac_status); }; }; then | |
351df804 KG |
11559 | eval "gcc_cv_have_decl_$ac_func=yes" |
11560 | else | |
ba479fd2 NN |
11561 | echo "$as_me: failed program was:" >&5 |
11562 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11563 | ||
11564 | eval "gcc_cv_have_decl_$ac_func=no" | |
351df804 | 11565 | fi |
86da66b5 | 11566 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
351df804 KG |
11567 | fi |
11568 | ||
11569 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
11570 | echo "$as_me:$LINENO: result: yes" >&5 |
11571 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 11572 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11573 | _ACEOF |
11574 | ||
351df804 | 11575 | else |
ba479fd2 NN |
11576 | echo "$as_me:$LINENO: result: no" >&5 |
11577 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 11578 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11579 | _ACEOF |
11580 | ||
351df804 KG |
11581 | fi |
11582 | ||
11583 | done | |
ba479fd2 | 11584 | |
351df804 KG |
11585 | |
11586 | ||
11587 | for ac_func in times | |
11588 | do | |
ad6717df | 11589 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11590 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11591 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11592 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11593 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11594 | else | |
11595 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11596 | /* confdefs.h. */ |
11597 | _ACEOF | |
11598 | cat confdefs.h >>conftest.$ac_ext | |
11599 | cat >>conftest.$ac_ext <<_ACEOF | |
11600 | /* end confdefs.h. */ | |
351df804 KG |
11601 | #undef $ac_tr_decl |
11602 | #define $ac_tr_decl 1 | |
ba479fd2 | 11603 | |
c1800ec8 ZW |
11604 | #include "ansidecl.h" |
11605 | #include "system.h" | |
11606 | #ifdef HAVE_SYS_TIMES_H | |
11607 | #include <sys/times.h> | |
11608 | #endif | |
11609 | ||
11610 | ||
ba479fd2 NN |
11611 | int |
11612 | main () | |
11613 | { | |
c1800ec8 ZW |
11614 | #ifndef $ac_func |
11615 | char *(*pfn) = (char *(*)) $ac_func ; | |
11616 | #endif | |
ba479fd2 NN |
11617 | ; |
11618 | return 0; | |
11619 | } | |
11620 | _ACEOF | |
11621 | rm -f conftest.$ac_objext | |
11622 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11623 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11624 | ac_status=$? |
86da66b5 HPN |
11625 | grep -v '^ *+' conftest.er1 >conftest.err |
11626 | rm -f conftest.er1 | |
11627 | cat conftest.err >&5 | |
ba479fd2 NN |
11628 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11629 | (exit $ac_status); } && | |
d7974fe6 KC |
11630 | { ac_try='test -z "$ac_c_werror_flag" |
11631 | || test ! -s conftest.err' | |
86da66b5 HPN |
11632 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11633 | (eval $ac_try) 2>&5 | |
11634 | ac_status=$? | |
11635 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11636 | (exit $ac_status); }; } && | |
11637 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11638 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11639 | (eval $ac_try) 2>&5 | |
11640 | ac_status=$? | |
11641 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11642 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11643 | eval "gcc_cv_have_decl_$ac_func=yes" |
11644 | else | |
ba479fd2 NN |
11645 | echo "$as_me: failed program was:" >&5 |
11646 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11647 | ||
11648 | eval "gcc_cv_have_decl_$ac_func=no" | |
c1800ec8 | 11649 | fi |
86da66b5 | 11650 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 ZW |
11651 | fi |
11652 | ||
11653 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
11654 | echo "$as_me:$LINENO: result: yes" >&5 |
11655 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 11656 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11657 | _ACEOF |
11658 | ||
c1800ec8 | 11659 | else |
ba479fd2 NN |
11660 | echo "$as_me:$LINENO: result: no" >&5 |
11661 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 11662 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11663 | _ACEOF |
11664 | ||
c1800ec8 ZW |
11665 | fi |
11666 | ||
11667 | done | |
c1800ec8 ZW |
11668 | |
11669 | ||
11670 | # More time-related stuff. | |
ba479fd2 NN |
11671 | echo "$as_me:$LINENO: checking for struct tms" >&5 |
11672 | echo $ECHO_N "checking for struct tms... $ECHO_C" >&6 | |
11673 | if test "${ac_cv_struct_tms+set}" = set; then | |
11674 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11675 | else | |
11676 | ||
11677 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11678 | /* confdefs.h. */ |
11679 | _ACEOF | |
11680 | cat confdefs.h >>conftest.$ac_ext | |
11681 | cat >>conftest.$ac_ext <<_ACEOF | |
11682 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11683 | |
11684 | #include "ansidecl.h" | |
11685 | #include "system.h" | |
11686 | #ifdef HAVE_SYS_TIMES_H | |
11687 | #include <sys/times.h> | |
11688 | #endif | |
11689 | ||
ba479fd2 NN |
11690 | int |
11691 | main () | |
11692 | { | |
c1800ec8 | 11693 | struct tms tms; |
ba479fd2 NN |
11694 | ; |
11695 | return 0; | |
11696 | } | |
11697 | _ACEOF | |
11698 | rm -f conftest.$ac_objext | |
11699 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11700 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11701 | ac_status=$? |
86da66b5 HPN |
11702 | grep -v '^ *+' conftest.er1 >conftest.err |
11703 | rm -f conftest.er1 | |
11704 | cat conftest.err >&5 | |
ba479fd2 NN |
11705 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11706 | (exit $ac_status); } && | |
d7974fe6 KC |
11707 | { ac_try='test -z "$ac_c_werror_flag" |
11708 | || test ! -s conftest.err' | |
86da66b5 HPN |
11709 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11710 | (eval $ac_try) 2>&5 | |
11711 | ac_status=$? | |
11712 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11713 | (exit $ac_status); }; } && | |
11714 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11715 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11716 | (eval $ac_try) 2>&5 | |
11717 | ac_status=$? | |
11718 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11719 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11720 | ac_cv_struct_tms=yes |
11721 | else | |
ba479fd2 NN |
11722 | echo "$as_me: failed program was:" >&5 |
11723 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11724 | ||
11725 | ac_cv_struct_tms=no | |
c1800ec8 | 11726 | fi |
86da66b5 | 11727 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 11728 | fi |
ba479fd2 NN |
11729 | echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 |
11730 | echo "${ECHO_T}$ac_cv_struct_tms" >&6 | |
63cf211a | 11731 | if test $ac_cv_struct_tms = yes; then |
ba479fd2 NN |
11732 | |
11733 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 11734 | #define HAVE_STRUCT_TMS 1 |
ba479fd2 | 11735 | _ACEOF |
c1800ec8 ZW |
11736 | |
11737 | fi | |
11738 | ||
11739 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
11740 | # revisit after autoconf 2.50. | |
ba479fd2 NN |
11741 | echo "$as_me:$LINENO: checking for clock_t" >&5 |
11742 | echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 | |
11743 | if test "${gcc_cv_type_clock_t+set}" = set; then | |
11744 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11745 | else | |
11746 | ||
11747 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11748 | /* confdefs.h. */ |
11749 | _ACEOF | |
11750 | cat confdefs.h >>conftest.$ac_ext | |
11751 | cat >>conftest.$ac_ext <<_ACEOF | |
11752 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11753 | |
11754 | #include "ansidecl.h" | |
11755 | #include "system.h" | |
11756 | ||
ba479fd2 NN |
11757 | int |
11758 | main () | |
11759 | { | |
c1800ec8 | 11760 | clock_t x; |
ba479fd2 NN |
11761 | ; |
11762 | return 0; | |
11763 | } | |
11764 | _ACEOF | |
11765 | rm -f conftest.$ac_objext | |
11766 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11767 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11768 | ac_status=$? |
86da66b5 HPN |
11769 | grep -v '^ *+' conftest.er1 >conftest.err |
11770 | rm -f conftest.er1 | |
11771 | cat conftest.err >&5 | |
ba479fd2 NN |
11772 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11773 | (exit $ac_status); } && | |
d7974fe6 KC |
11774 | { ac_try='test -z "$ac_c_werror_flag" |
11775 | || test ! -s conftest.err' | |
86da66b5 HPN |
11776 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11777 | (eval $ac_try) 2>&5 | |
11778 | ac_status=$? | |
11779 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11780 | (exit $ac_status); }; } && | |
11781 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11782 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11783 | (eval $ac_try) 2>&5 | |
11784 | ac_status=$? | |
11785 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11786 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11787 | gcc_cv_type_clock_t=yes |
11788 | else | |
ba479fd2 NN |
11789 | echo "$as_me: failed program was:" >&5 |
11790 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11791 | ||
11792 | gcc_cv_type_clock_t=no | |
c1800ec8 | 11793 | fi |
86da66b5 | 11794 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 11795 | fi |
ba479fd2 NN |
11796 | echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 |
11797 | echo "${ECHO_T}$gcc_cv_type_clock_t" >&6 | |
63cf211a | 11798 | if test $gcc_cv_type_clock_t = yes; then |
ba479fd2 NN |
11799 | |
11800 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 11801 | #define HAVE_CLOCK_T 1 |
ba479fd2 | 11802 | _ACEOF |
c1800ec8 ZW |
11803 | |
11804 | fi | |
11805 | ||
eb70d86d AS |
11806 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
11807 | CFLAGS="$saved_CFLAGS" | |
11808 | ||
07cf4226 DM |
11809 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
11810 | if test "${enable_initfini_array+set}" = set; then | |
11811 | enableval="$enable_initfini_array" | |
ba479fd2 | 11812 | |
07cf4226 | 11813 | else |
ba479fd2 NN |
11814 | |
11815 | echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5 | |
11816 | echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6 | |
11817 | if test "${gcc_cv_initfini_array+set}" = set; then | |
11818 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
07cf4226 | 11819 | else |
eb70d86d | 11820 | if test "$cross_compiling" = yes; then |
918c4fe4 | 11821 | gcc_cv_initfini_array=no |
eb70d86d | 11822 | else |
ba479fd2 | 11823 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11824 | /* confdefs.h. */ |
11825 | _ACEOF | |
11826 | cat confdefs.h >>conftest.$ac_ext | |
11827 | cat >>conftest.$ac_ext <<_ACEOF | |
11828 | /* end confdefs.h. */ | |
eb70d86d | 11829 | |
07cf4226 DM |
11830 | static int x = -1; |
11831 | int main (void) { return x; } | |
11832 | int foo (void) { x = 0; } | |
11833 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
ba479fd2 NN |
11834 | _ACEOF |
11835 | rm -f conftest$ac_exeext | |
11836 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11837 | (eval $ac_link) 2>&5 | |
11838 | ac_status=$? | |
11839 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11840 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
11841 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11842 | (eval $ac_try) 2>&5 | |
11843 | ac_status=$? | |
11844 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11845 | (exit $ac_status); }; }; then | |
918c4fe4 | 11846 | gcc_cv_initfini_array=yes |
eb70d86d | 11847 | else |
ba479fd2 NN |
11848 | echo "$as_me: program exited with status $ac_status" >&5 |
11849 | echo "$as_me: failed program was:" >&5 | |
11850 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11851 | ||
11852 | ( exit $ac_status ) | |
11853 | gcc_cv_initfini_array=no | |
eb70d86d | 11854 | fi |
86da66b5 | 11855 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
eb70d86d | 11856 | fi |
07cf4226 | 11857 | fi |
ba479fd2 NN |
11858 | echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5 |
11859 | echo "${ECHO_T}$gcc_cv_initfini_array" >&6 | |
eb70d86d | 11860 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 11861 | |
ba479fd2 | 11862 | fi; |
63cf211a | 11863 | if test $enable_initfini_array = yes; then |
ba479fd2 NN |
11864 | |
11865 | cat >>confdefs.h <<\_ACEOF | |
eb70d86d | 11866 | #define HAVE_INITFINI_ARRAY 1 |
ba479fd2 | 11867 | _ACEOF |
07cf4226 | 11868 | |
eb70d86d | 11869 | fi |
81bf3d9e | 11870 | |
ba479fd2 NN |
11871 | # mkdir takes a single argument on some systems. |
11872 | echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5 | |
11873 | echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6 | |
11874 | if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then | |
11875 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75923b2f | 11876 | else |
ba479fd2 | 11877 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11878 | /* confdefs.h. */ |
11879 | _ACEOF | |
11880 | cat confdefs.h >>conftest.$ac_ext | |
11881 | cat >>conftest.$ac_ext <<_ACEOF | |
11882 | /* end confdefs.h. */ | |
75923b2f MK |
11883 | |
11884 | #include <sys/types.h> | |
11885 | #ifdef HAVE_SYS_STAT_H | |
11886 | # include <sys/stat.h> | |
11887 | #endif | |
11888 | #ifdef HAVE_UNISTD_H | |
11889 | # include <unistd.h> | |
11890 | #endif | |
11891 | #ifdef HAVE_DIRECT_H | |
11892 | # include <direct.h> | |
11893 | #endif | |
ba479fd2 NN |
11894 | int |
11895 | main () | |
11896 | { | |
75923b2f | 11897 | mkdir ("foo", 0); |
ba479fd2 NN |
11898 | ; |
11899 | return 0; | |
11900 | } | |
11901 | _ACEOF | |
11902 | rm -f conftest.$ac_objext | |
11903 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11904 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11905 | ac_status=$? |
86da66b5 HPN |
11906 | grep -v '^ *+' conftest.er1 >conftest.err |
11907 | rm -f conftest.er1 | |
11908 | cat conftest.err >&5 | |
ba479fd2 NN |
11909 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11910 | (exit $ac_status); } && | |
d7974fe6 KC |
11911 | { ac_try='test -z "$ac_c_werror_flag" |
11912 | || test ! -s conftest.err' | |
86da66b5 HPN |
11913 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11914 | (eval $ac_try) 2>&5 | |
11915 | ac_status=$? | |
11916 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11917 | (exit $ac_status); }; } && | |
11918 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11919 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11920 | (eval $ac_try) 2>&5 | |
11921 | ac_status=$? | |
11922 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11923 | (exit $ac_status); }; }; then | |
75923b2f MK |
11924 | gcc_cv_mkdir_takes_one_arg=no |
11925 | else | |
ba479fd2 NN |
11926 | echo "$as_me: failed program was:" >&5 |
11927 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11928 | ||
11929 | gcc_cv_mkdir_takes_one_arg=yes | |
75923b2f | 11930 | fi |
86da66b5 | 11931 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75923b2f | 11932 | fi |
ba479fd2 NN |
11933 | echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5 |
11934 | echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6 | |
63cf211a | 11935 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then |
ba479fd2 NN |
11936 | |
11937 | cat >>confdefs.h <<\_ACEOF | |
75923b2f | 11938 | #define MKDIR_TAKES_ONE_ARG 1 |
ba479fd2 | 11939 | _ACEOF |
75923b2f MK |
11940 | |
11941 | fi | |
11942 | ||
11943 | ||
861bb6c1 JL |
11944 | # File extensions |
11945 | manext='.1' | |
11946 | objext='.o' | |
11947 | ||
11948 | ||
11949 | ||
4977bab6 ZW |
11950 | # With Setjmp/Longjmp based exception handling. |
11951 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
11952 | if test "${enable_sjlj_exceptions+set}" = set; then | |
11953 | enableval="$enable_sjlj_exceptions" | |
11954 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
63cf211a | 11955 | |
ba479fd2 NN |
11956 | cat >>confdefs.h <<_ACEOF |
11957 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
11958 | _ACEOF | |
4977bab6 | 11959 | |
ba479fd2 | 11960 | fi; |
4977bab6 | 11961 | |
443728bb L |
11962 | # For platforms with the unwind ABI which includes an unwind library, |
11963 | # libunwind, we can choose to use the system libunwind. | |
4977bab6 | 11964 | |
443728bb L |
11965 | # Check whether --with-system-libunwind or --without-system-libunwind was given. |
11966 | if test "${with_system_libunwind+set}" = set; then | |
11967 | withval="$with_system_libunwind" | |
4977bab6 | 11968 | |
ba479fd2 | 11969 | fi; |
4977bab6 | 11970 | |
34a86c2b NN |
11971 | # -------------------------------------------------------- |
11972 | # Build, host, and target specific configuration fragments | |
11973 | # -------------------------------------------------------- | |
11974 | ||
5b28c537 NN |
11975 | # Collect build-machine-specific information. |
11976 | . ${srcdir}/config.build | |
11977 | ||
a89ea0df NN |
11978 | # Collect host-machine-specific information. |
11979 | . ${srcdir}/config.host | |
11980 | ||
ef69da62 | 11981 | target_gtfiles= |
a89ea0df NN |
11982 | |
11983 | # Collect target-machine-specific information. | |
8ad9fb33 | 11984 | . ${srcdir}/config.gcc |
861bb6c1 JL |
11985 | |
11986 | extra_objs="${host_extra_objs} ${extra_objs}" | |
30500d84 | 11987 | extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}" |
861bb6c1 JL |
11988 | |
11989 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 11990 | if test x"$tm_file" = x |
861bb6c1 JL |
11991 | then tm_file=$cpu_type/$cpu_type.h; fi |
11992 | ||
6b2adea9 | 11993 | if test x"$extra_headers" = x |
861bb6c1 JL |
11994 | then extra_headers=; fi |
11995 | ||
75bffa71 | 11996 | if test x$md_file = x |
e98e406f | 11997 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 11998 | |
75bffa71 | 11999 | if test x$out_file = x |
861bb6c1 JL |
12000 | then out_file=$cpu_type/$cpu_type.c; fi |
12001 | ||
75bffa71 | 12002 | if test x"$tmake_file" = x |
861bb6c1 JL |
12003 | then tmake_file=$cpu_type/t-$cpu_type |
12004 | fi | |
12005 | ||
90e6a802 | 12006 | if test x"$dwarf2" = xyes |
756ee602 | 12007 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
12008 | fi |
12009 | ||
861bb6c1 | 12010 | # Say what files are being used for the output code and MD file. |
11642c3a | 12011 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
12012 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
12013 | ||
11642c3a | 12014 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
12015 | # about them and drop them. |
12016 | ||
11642c3a ZW |
12017 | bx= |
12018 | for x in $build_xm_file; do | |
12019 | if test -f $srcdir/config/$x | |
12020 | then bx="$bx $x" | |
ba479fd2 NN |
12021 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12022 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12023 | fi |
12024 | done | |
12025 | build_xm_file="$bx" | |
12026 | ||
12027 | hx= | |
12028 | for x in $host_xm_file; do | |
12029 | if test -f $srcdir/config/$x | |
12030 | then hx="$hx $x" | |
ba479fd2 NN |
12031 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12032 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12033 | fi |
12034 | done | |
12035 | host_xm_file="$hx" | |
12036 | ||
12037 | tx= | |
12038 | for x in $xm_file; do | |
12039 | if test -f $srcdir/config/$x | |
12040 | then tx="$tx $x" | |
ba479fd2 NN |
12041 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12042 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12043 | fi |
12044 | done | |
12045 | xm_file="$tx" | |
12046 | ||
861bb6c1 JL |
12047 | count=a |
12048 | for f in $tm_file; do | |
12049 | count=${count}x | |
12050 | done | |
75bffa71 | 12051 | if test $count = ax; then |
861bb6c1 JL |
12052 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
12053 | else | |
12054 | echo "Using the following target machine macro files:" | |
12055 | for f in $tm_file; do | |
12056 | echo " $srcdir/config/$f" | |
12057 | done | |
12058 | fi | |
12059 | ||
4977bab6 | 12060 | if test x$need_64bit_hwint = xyes; then |
ba479fd2 NN |
12061 | |
12062 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 12063 | #define NEED_64BIT_HOST_WIDE_INT 1 |
ba479fd2 | 12064 | _ACEOF |
4977bab6 ZW |
12065 | |
12066 | fi | |
12067 | ||
99fa8911 AP |
12068 | if test x$use_long_long_for_widest_fast_int = xyes; then |
12069 | ||
12070 | cat >>confdefs.h <<\_ACEOF | |
12071 | #define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1 | |
12072 | _ACEOF | |
12073 | ||
12074 | fi | |
12075 | ||
861bb6c1 JL |
12076 | count=a |
12077 | for f in $host_xm_file; do | |
12078 | count=${count}x | |
12079 | done | |
11642c3a ZW |
12080 | if test $count = a; then |
12081 | : | |
12082 | elif test $count = ax; then | |
861bb6c1 JL |
12083 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
12084 | else | |
12085 | echo "Using the following host machine macro files:" | |
12086 | for f in $host_xm_file; do | |
12087 | echo " $srcdir/config/$f" | |
12088 | done | |
12089 | fi | |
476d9098 | 12090 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 12091 | |
75bffa71 | 12092 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
12093 | count=a |
12094 | for f in $build_xm_file; do | |
12095 | count=${count}x | |
12096 | done | |
11642c3a ZW |
12097 | if test $count = a; then |
12098 | : | |
12099 | elif test $count = ax; then | |
861bb6c1 JL |
12100 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
12101 | else | |
12102 | echo "Using the following build machine macro files:" | |
12103 | for f in $build_xm_file; do | |
12104 | echo " $srcdir/config/$f" | |
12105 | done | |
12106 | fi | |
12107 | fi | |
12108 | ||
8bb915b6 NN |
12109 | # --------- |
12110 | # Threading | |
12111 | # --------- | |
12112 | ||
c2e494a8 | 12113 | # Check if a valid thread package |
615be2cf | 12114 | case ${enable_threads} in |
c2e494a8 NN |
12115 | "" | no) |
12116 | # No threads | |
12117 | target_thread_file='single' | |
12118 | ;; | |
12119 | yes) | |
12120 | # default | |
12121 | target_thread_file='single' | |
12122 | ;; | |
18167442 | 12123 | aix | dce | gnat | irix | posix | posix95 | rtems | \ |
769e49eb | 12124 | single | solaris | vxworks | win32 ) |
615be2cf | 12125 | target_thread_file=${enable_threads} |
c2e494a8 NN |
12126 | ;; |
12127 | *) | |
615be2cf | 12128 | echo "${enable_threads} is an unknown thread package" 1>&2 |
c2e494a8 NN |
12129 | exit 1 |
12130 | ;; | |
12131 | esac | |
12132 | ||
12133 | if test x${thread_file} = x; then | |
12134 | # No thread file set by target-specific clauses in config.gcc, | |
12135 | # so use file chosen by default logic above | |
12136 | thread_file=${target_thread_file} | |
861bb6c1 JL |
12137 | fi |
12138 | ||
8bb915b6 NN |
12139 | # Make gthr-default.h if we have a thread file. |
12140 | gthread_flags= | |
12141 | if test $thread_file != single; then | |
12142 | rm -f gthr-default.h | |
12143 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h | |
12144 | gthread_flags=-DHAVE_GTHR_DEFAULT | |
12145 | fi | |
12146 | ||
12147 | ||
12148 | # -------- | |
12149 | # UNSORTED | |
12150 | # -------- | |
12151 | ||
18fbf599 | 12152 | use_cxa_atexit=no |
2121a768 JT |
12153 | if test x$enable___cxa_atexit = xyes || \ |
12154 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
18fbf599 PB |
12155 | if test x$host = x$target; then |
12156 | echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 | |
354b7da5 DH |
12157 | echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6 |
12158 | if test "${ac_cv_func___cxa_atexit+set}" = set; then | |
12159 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12160 | else | |
12161 | cat >conftest.$ac_ext <<_ACEOF | |
354b7da5 DH |
12162 | /* confdefs.h. */ |
12163 | _ACEOF | |
12164 | cat confdefs.h >>conftest.$ac_ext | |
12165 | cat >>conftest.$ac_ext <<_ACEOF | |
12166 | /* end confdefs.h. */ | |
86da66b5 HPN |
12167 | /* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit. |
12168 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
12169 | #define __cxa_atexit innocuous___cxa_atexit | |
12170 | ||
354b7da5 DH |
12171 | /* System header to define __stub macros and hopefully few prototypes, |
12172 | which can conflict with char __cxa_atexit (); below. | |
12173 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
12174 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 12175 | |
354b7da5 DH |
12176 | #ifdef __STDC__ |
12177 | # include <limits.h> | |
12178 | #else | |
12179 | # include <assert.h> | |
12180 | #endif | |
86da66b5 HPN |
12181 | |
12182 | #undef __cxa_atexit | |
12183 | ||
354b7da5 DH |
12184 | /* Override any gcc2 internal prototype to avoid an error. */ |
12185 | #ifdef __cplusplus | |
12186 | extern "C" | |
12187 | { | |
12188 | #endif | |
12189 | /* We use char because int might match the return type of a gcc2 | |
12190 | builtin and then its argument prototype would still apply. */ | |
12191 | char __cxa_atexit (); | |
12192 | /* The GNU C library defines this for functions which it implements | |
12193 | to always fail with ENOSYS. Some functions are actually named | |
12194 | something starting with __ and the normal name is an alias. */ | |
12195 | #if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit) | |
12196 | choke me | |
12197 | #else | |
12198 | char (*f) () = __cxa_atexit; | |
12199 | #endif | |
12200 | #ifdef __cplusplus | |
12201 | } | |
12202 | #endif | |
12203 | ||
12204 | int | |
12205 | main () | |
12206 | { | |
12207 | return f != __cxa_atexit; | |
12208 | ; | |
12209 | return 0; | |
12210 | } | |
12211 | _ACEOF | |
12212 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12213 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12214 | (eval $ac_link) 2>conftest.er1 |
354b7da5 | 12215 | ac_status=$? |
86da66b5 HPN |
12216 | grep -v '^ *+' conftest.er1 >conftest.err |
12217 | rm -f conftest.er1 | |
12218 | cat conftest.err >&5 | |
354b7da5 DH |
12219 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12220 | (exit $ac_status); } && | |
d7974fe6 KC |
12221 | { ac_try='test -z "$ac_c_werror_flag" |
12222 | || test ! -s conftest.err' | |
86da66b5 HPN |
12223 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12224 | (eval $ac_try) 2>&5 | |
12225 | ac_status=$? | |
12226 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12227 | (exit $ac_status); }; } && | |
12228 | { ac_try='test -s conftest$ac_exeext' | |
354b7da5 DH |
12229 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12230 | (eval $ac_try) 2>&5 | |
12231 | ac_status=$? | |
12232 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12233 | (exit $ac_status); }; }; then | |
12234 | ac_cv_func___cxa_atexit=yes | |
12235 | else | |
12236 | echo "$as_me: failed program was:" >&5 | |
12237 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12238 | ||
12239 | ac_cv_func___cxa_atexit=no | |
12240 | fi | |
86da66b5 HPN |
12241 | rm -f conftest.err conftest.$ac_objext \ |
12242 | conftest$ac_exeext conftest.$ac_ext | |
354b7da5 DH |
12243 | fi |
12244 | echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5 | |
12245 | echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6 | |
12246 | if test $ac_cv_func___cxa_atexit = yes; then | |
18fbf599 PB |
12247 | use_cxa_atexit=yes |
12248 | else | |
12249 | echo "__cxa_atexit can't be enabled on this target" | |
12250 | fi | |
12251 | ||
12252 | else | |
12253 | # We can't check for __cxa_atexit when building a cross, so assume | |
12254 | # it is available | |
12255 | use_cxa_atexit=yes | |
12256 | fi | |
12257 | if test x$use_cxa_atexit = xyes; then | |
ba479fd2 NN |
12258 | |
12259 | cat >>confdefs.h <<\_ACEOF | |
2121a768 | 12260 | #define DEFAULT_USE_CXA_ATEXIT 1 |
ba479fd2 | 12261 | _ACEOF |
2121a768 | 12262 | |
18fbf599 | 12263 | fi |
2121a768 JT |
12264 | fi |
12265 | ||
a5381466 | 12266 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
12267 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
12268 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
ba479fd2 NN |
12269 | |
12270 | ||
12271 | cat >>confdefs.h <<_ACEOF | |
e22340b0 | 12272 | #define EXTRA_MODES_FILE "config/$extra_modes" |
ba479fd2 | 12273 | _ACEOF |
a5381466 ZW |
12274 | |
12275 | fi | |
12276 | ||
75685792 RS |
12277 | # Convert extra_options into a form suitable for Makefile use. |
12278 | extra_opt_files= | |
12279 | for f in $extra_options; do | |
12280 | extra_opt_files="$extra_opt_files \$(srcdir)/config/$f" | |
12281 | done | |
12282 | ||
12283 | ||
b7cb92ad | 12284 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 12285 | # the first file included by config.h. |
4977bab6 | 12286 | # If host=build, it is correct to have bconfig include auto-host.h |
ba479fd2 | 12287 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 12288 | # work to find out the build config parameters. |
75bffa71 | 12289 | if test x$host = x$build |
db81d74a | 12290 | then |
eaf4e618 | 12291 | build_auto=auto-host.h |
b7cb92ad JL |
12292 | else |
12293 | # We create a subdir, then run autoconf in the subdir. | |
12294 | # To prevent recursion we set host and build for the new | |
12295 | # invocation of configure to the build for this invocation | |
ba479fd2 | 12296 | # of configure. |
b7cb92ad JL |
12297 | tempdir=build.$$ |
12298 | rm -rf $tempdir | |
12299 | mkdir $tempdir | |
12300 | cd $tempdir | |
12301 | case ${srcdir} in | |
255b8a49 | 12302 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
12303 | *) realsrcdir=../${srcdir};; |
12304 | esac | |
d920e825 L |
12305 | saved_CFLAGS="${CFLAGS}" |
12306 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
12307 | ${realsrcdir}/configure \ | |
33e70558 | 12308 | --enable-languages=${enable_languages-all} \ |
534d0cc0 | 12309 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 12310 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
12311 | |
12312 | # We just finished tests for the build machine, so rename | |
12313 | # the file auto-build.h in the gcc directory. | |
12314 | mv auto-host.h ../auto-build.h | |
12315 | cd .. | |
12316 | rm -rf $tempdir | |
eaf4e618 | 12317 | build_auto=auto-build.h |
db81d74a RH |
12318 | fi |
12319 | ||
06f0b04c | 12320 | |
eaf4e618 | 12321 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
12322 | tm_p_file="${tm_p_file} tm-preds.h" |
12323 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
12324 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 12325 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 | 12326 | # put this back in temporarily. |
232b67d9 | 12327 | xm_file="auto-host.h ansidecl.h ${xm_file}" |
0056a9b5 | 12328 | |
34a86c2b NN |
12329 | # -------- |
12330 | # UNSORTED | |
12331 | # -------- | |
12332 | ||
cc1e60ea | 12333 | # Compile in configure arguments. |
8105825d | 12334 | if test -f configargs.h ; then |
cc1e60ea | 12335 | # Being re-configured. |
022dae81 | 12336 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
12337 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
12338 | else | |
12339 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
12340 | fi | |
eeae7b41 DJ |
12341 | |
12342 | # Double all backslashes and backslash all quotes to turn | |
12343 | # gcc_config_arguments into a C string. | |
12344 | sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out | |
12345 | $gcc_config_arguments | |
12346 | EOF | |
12347 | gcc_config_arguments_str=`cat conftest.out` | |
12348 | rm -f conftest.out | |
12349 | ||
cc1e60ea JM |
12350 | cat > configargs.h <<EOF |
12351 | /* Generated automatically. */ | |
eeae7b41 | 12352 | static const char configuration_arguments[] = "$gcc_config_arguments_str"; |
a6687d2b | 12353 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
12354 | |
12355 | static const struct { | |
12356 | const char *name, *value; | |
12357 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
12358 | EOF |
12359 | ||
ab87f8c8 | 12360 | # Internationalization |
56694dd9 ZW |
12361 | # If we haven't got the data from the intl directory, |
12362 | # assume NLS is disabled. | |
ba479fd2 NN |
12363 | USE_NLS=no |
12364 | LIBINTL= | |
12365 | LIBINTL_DEP= | |
12366 | INCINTL= | |
12367 | XGETTEXT= | |
12368 | GMSGFMT= | |
12369 | POSUB= | |
56694dd9 ZW |
12370 | if test -f ../intl/config.intl; then |
12371 | . ../intl/config.intl | |
093e61a6 | 12372 | fi |
ba479fd2 NN |
12373 | echo "$as_me:$LINENO: checking whether NLS is requested" >&5 |
12374 | echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 | |
56694dd9 | 12375 | if test x"$USE_NLS" != xyes; then |
ba479fd2 NN |
12376 | echo "$as_me:$LINENO: result: no" >&5 |
12377 | echo "${ECHO_T}no" >&6 | |
56694dd9 | 12378 | else |
ba479fd2 NN |
12379 | echo "$as_me:$LINENO: result: yes" >&5 |
12380 | echo "${ECHO_T}yes" >&6 | |
12381 | ||
12382 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 12383 | #define ENABLE_NLS 1 |
ba479fd2 | 12384 | _ACEOF |
56694dd9 | 12385 | |
093e61a6 | 12386 | |
ba479fd2 NN |
12387 | echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 |
12388 | echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 | |
56694dd9 | 12389 | # Look for .po and .gmo files in the source directory. |
ba479fd2 | 12390 | CATALOGS= |
56694dd9 ZW |
12391 | XLINGUAS= |
12392 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
12393 | # If there aren't any .gmo files the shell will give us the | |
12394 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
12395 | # weeded out. | |
12396 | case "$cat" in *\**) | |
12397 | continue;; | |
12398 | esac | |
12399 | # The quadruple backslash is collapsed to a double backslash | |
12400 | # by the backticks, then collapsed again by the double quotes, | |
12401 | # leaving us with one backslash in the sed expression (right | |
12402 | # before the dot that mustn't act as a wildcard). | |
12403 | cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"` | |
12404 | lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"` | |
12405 | # The user is allowed to set LINGUAS to a list of languages to | |
12406 | # install catalogs for. If it's empty that means "all of them." | |
12407 | if test "x$LINGUAS" = x; then | |
12408 | CATALOGS="$CATALOGS $cat" | |
12409 | XLINGUAS="$XLINGUAS $lang" | |
12410 | else | |
12411 | case "$LINGUAS" in *$lang*) | |
12412 | CATALOGS="$CATALOGS $cat" | |
12413 | XLINGUAS="$XLINGUAS $lang" | |
12414 | ;; | |
12415 | esac | |
12416 | fi | |
12417 | done | |
12418 | LINGUAS="$XLINGUAS" | |
ba479fd2 NN |
12419 | echo "$as_me:$LINENO: result: $LINGUAS" >&5 |
12420 | echo "${ECHO_T}$LINGUAS" >&6 | |
56694dd9 | 12421 | fi |
861bb6c1 | 12422 | |
56694dd9 ZW |
12423 | # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get |
12424 | # -liconv on the link line twice. | |
12425 | case "$LIBINTL" in *$LIBICONV*) | |
12426 | LIBICONV= ;; | |
12427 | esac | |
dc6746e7 | 12428 | |
7f970b70 AM |
12429 | # Check whether --enable-secureplt or --disable-secureplt was given. |
12430 | if test "${enable_secureplt+set}" = set; then | |
12431 | enableval="$enable_secureplt" | |
12432 | ||
12433 | fi; | |
12434 | ||
56694dd9 ZW |
12435 | # Windows32 Registry support for specifying GCC installation paths. |
12436 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
12437 | if test "${enable_win32_registry+set}" = set; then | |
12438 | enableval="$enable_win32_registry" | |
dc6746e7 | 12439 | |
ba479fd2 | 12440 | fi; |
ba479fd2 | 12441 | |
a1286ef5 ZW |
12442 | case $host_os in |
12443 | win32 | pe | cygwin* | mingw32* | uwin*) | |
12444 | if test "x$enable_win32_registry" != xno; then | |
12445 | echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5 | |
ba479fd2 NN |
12446 | echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6 |
12447 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then | |
12448 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12449 | else | |
12450 | ac_func_search_save_LIBS=$LIBS | |
12451 | ac_cv_search_RegOpenKeyExA=no | |
12452 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12453 | /* confdefs.h. */ |
12454 | _ACEOF | |
12455 | cat confdefs.h >>conftest.$ac_ext | |
12456 | cat >>conftest.$ac_ext <<_ACEOF | |
12457 | /* end confdefs.h. */ | |
861bb6c1 | 12458 | |
ab87f8c8 | 12459 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
12460 | #ifdef __cplusplus |
12461 | extern "C" | |
12462 | #endif | |
ab87f8c8 | 12463 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
12464 | builtin and then its argument prototype would still apply. */ |
12465 | char RegOpenKeyExA (); | |
12466 | int | |
12467 | main () | |
12468 | { | |
12469 | RegOpenKeyExA (); | |
12470 | ; | |
12471 | return 0; | |
12472 | } | |
12473 | _ACEOF | |
12474 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12475 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12476 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 12477 | ac_status=$? |
86da66b5 HPN |
12478 | grep -v '^ *+' conftest.er1 >conftest.err |
12479 | rm -f conftest.er1 | |
12480 | cat conftest.err >&5 | |
ba479fd2 NN |
12481 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12482 | (exit $ac_status); } && | |
d7974fe6 KC |
12483 | { ac_try='test -z "$ac_c_werror_flag" |
12484 | || test ! -s conftest.err' | |
86da66b5 HPN |
12485 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12486 | (eval $ac_try) 2>&5 | |
12487 | ac_status=$? | |
12488 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12489 | (exit $ac_status); }; } && | |
12490 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
12491 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12492 | (eval $ac_try) 2>&5 | |
12493 | ac_status=$? | |
12494 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12495 | (exit $ac_status); }; }; then | |
56694dd9 | 12496 | ac_cv_search_RegOpenKeyExA="none required" |
ab87f8c8 | 12497 | else |
ba479fd2 NN |
12498 | echo "$as_me: failed program was:" >&5 |
12499 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12500 | ||
861bb6c1 | 12501 | fi |
86da66b5 HPN |
12502 | rm -f conftest.err conftest.$ac_objext \ |
12503 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
12504 | if test "$ac_cv_search_RegOpenKeyExA" = no; then |
12505 | for ac_lib in advapi32; do | |
12506 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12507 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12508 | /* confdefs.h. */ |
12509 | _ACEOF | |
12510 | cat confdefs.h >>conftest.$ac_ext | |
12511 | cat >>conftest.$ac_ext <<_ACEOF | |
12512 | /* end confdefs.h. */ | |
12513 | ||
56694dd9 | 12514 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
12515 | #ifdef __cplusplus |
12516 | extern "C" | |
12517 | #endif | |
56694dd9 | 12518 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
12519 | builtin and then its argument prototype would still apply. */ |
12520 | char RegOpenKeyExA (); | |
12521 | int | |
12522 | main () | |
12523 | { | |
12524 | RegOpenKeyExA (); | |
12525 | ; | |
12526 | return 0; | |
12527 | } | |
12528 | _ACEOF | |
12529 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12530 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12531 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 12532 | ac_status=$? |
86da66b5 HPN |
12533 | grep -v '^ *+' conftest.er1 >conftest.err |
12534 | rm -f conftest.er1 | |
12535 | cat conftest.err >&5 | |
ba479fd2 NN |
12536 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12537 | (exit $ac_status); } && | |
d7974fe6 KC |
12538 | { ac_try='test -z "$ac_c_werror_flag" |
12539 | || test ! -s conftest.err' | |
86da66b5 HPN |
12540 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12541 | (eval $ac_try) 2>&5 | |
12542 | ac_status=$? | |
12543 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12544 | (exit $ac_status); }; } && | |
12545 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
12546 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12547 | (eval $ac_try) 2>&5 | |
12548 | ac_status=$? | |
12549 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12550 | (exit $ac_status); }; }; then | |
12551 | ac_cv_search_RegOpenKeyExA="-l$ac_lib" | |
56694dd9 | 12552 | break |
861bb6c1 | 12553 | else |
ba479fd2 NN |
12554 | echo "$as_me: failed program was:" >&5 |
12555 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12556 | ||
861bb6c1 | 12557 | fi |
86da66b5 HPN |
12558 | rm -f conftest.err conftest.$ac_objext \ |
12559 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 12560 | done |
6e3f3080 | 12561 | fi |
ba479fd2 NN |
12562 | LIBS=$ac_func_search_save_LIBS |
12563 | fi | |
12564 | echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5 | |
12565 | echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6 | |
12566 | if test "$ac_cv_search_RegOpenKeyExA" != no; then | |
63cf211a | 12567 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" |
ba479fd2 | 12568 | |
cafe096b | 12569 | else |
a1286ef5 | 12570 | enable_win32_registry=no |
093e61a6 | 12571 | fi |
ab87f8c8 | 12572 | |
a1286ef5 ZW |
12573 | fi |
12574 | ||
12575 | if test "x$enable_win32_registry" != xno; then | |
12576 | ||
12577 | cat >>confdefs.h <<\_ACEOF | |
12578 | #define ENABLE_WIN32_REGISTRY 1 | |
12579 | _ACEOF | |
ab87f8c8 | 12580 | |
a1286ef5 ZW |
12581 | |
12582 | if test "x$enable_win32_registry" != xyes \ | |
12583 | && test "x$enable_win32_registry" != x; then | |
ba479fd2 NN |
12584 | |
12585 | cat >>confdefs.h <<_ACEOF | |
a1286ef5 | 12586 | #define WIN32_REGISTRY_KEY "$enable_win32_registry" |
ba479fd2 | 12587 | _ACEOF |
cafe096b | 12588 | |
a1286ef5 ZW |
12589 | fi |
12590 | fi | |
12591 | ;; | |
56694dd9 | 12592 | esac |
ab87f8c8 | 12593 | |
56694dd9 ZW |
12594 | # Get an absolute path to the GCC top-level source directory |
12595 | holddir=`${PWDCMD-pwd}` | |
12596 | cd $srcdir | |
12597 | topdir=`${PWDCMD-pwd}` | |
12598 | cd $holddir | |
ab87f8c8 | 12599 | |
56694dd9 | 12600 | # Conditionalize the makefile for this host machine. |
2ed26f6b | 12601 | xmake_file= |
c406e779 | 12602 | for f in ${host_xmake_file} |
56694dd9 ZW |
12603 | do |
12604 | if test -f ${srcdir}/config/$f | |
12605 | then | |
2ed26f6b | 12606 | xmake_file="${xmake_file} \$(srcdir)/config/$f" |
56694dd9 ZW |
12607 | fi |
12608 | done | |
093e61a6 | 12609 | |
56694dd9 | 12610 | # Conditionalize the makefile for this target machine. |
2ed26f6b | 12611 | tmake_file_= |
c406e779 | 12612 | for f in ${tmake_file} |
56694dd9 ZW |
12613 | do |
12614 | if test -f ${srcdir}/config/$f | |
12615 | then | |
2ed26f6b | 12616 | tmake_file_="${tmake_file_} \$(srcdir)/config/$f" |
56694dd9 ZW |
12617 | fi |
12618 | done | |
2ed26f6b | 12619 | tmake_file="${tmake_file_}" |
71a94577 | 12620 | |
ab87f8c8 JL |
12621 | # If the host doesn't support symlinks, modify CC in |
12622 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
12623 | # Otherwise, we can use "CC=$(CC)". | |
12624 | rm -f symtest.tem | |
35f06ae4 PB |
12625 | case "$LN_S" in |
12626 | *-s*) | |
12627 | cc_set_by_configure="\$(CC)" | |
12628 | quoted_cc_set_by_configure="\$(CC)" | |
12629 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" | |
12630 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" | |
12631 | ;; | |
12632 | *) | |
12633 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
12634 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" | |
12635 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" | |
12636 | quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`" | |
12637 | ;; | |
12638 | esac | |
ab87f8c8 | 12639 | |
5395b47b NN |
12640 | # This is a terrible hack which will go away some day. |
12641 | host_cc_for_libada=${CC} | |
1e3fad21 NN |
12642 | |
12643 | ||
ab87f8c8 JL |
12644 | out_object_file=`basename $out_file .c`.o |
12645 | ||
75685792 RS |
12646 | tm_file_list="options.h" |
12647 | tm_include_list="options.h" | |
ab87f8c8 | 12648 | for f in $tm_file; do |
64ccbc99 | 12649 | case $f in |
d02af173 | 12650 | defaults.h ) |
e22340b0 ZW |
12651 | tm_file_list="${tm_file_list} \$(srcdir)/$f" |
12652 | tm_include_list="${tm_include_list} $f" | |
12653 | ;; | |
12654 | * ) | |
12655 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | |
12656 | tm_include_list="${tm_include_list} config/$f" | |
12657 | ;; | |
64ccbc99 | 12658 | esac |
ab87f8c8 JL |
12659 | done |
12660 | ||
11642c3a | 12661 | tm_p_file_list= |
e22340b0 | 12662 | tm_p_include_list= |
11642c3a | 12663 | for f in $tm_p_file; do |
4977bab6 ZW |
12664 | case $f in |
12665 | tm-preds.h ) | |
e22340b0 ZW |
12666 | tm_p_file_list="${tm_p_file_list} $f" |
12667 | tm_p_include_list="${tm_p_include_list} $f" | |
12668 | ;; | |
12669 | * ) | |
12670 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
12671 | tm_p_include_list="${tm_p_include_list} config/$f" | |
12672 | esac | |
12673 | done | |
12674 | ||
12675 | xm_file_list= | |
12676 | xm_include_list= | |
12677 | for f in $xm_file; do | |
12678 | case $f in | |
12679 | ansidecl.h ) | |
12680 | xm_file_list="${xm_file_list} \$(srcdir)/../include/$f" | |
12681 | xm_include_list="${xm_include_list} $f" | |
12682 | ;; | |
12683 | auto-host.h ) | |
12684 | xm_file_list="${xm_file_list} $f" | |
12685 | xm_include_list="${xm_include_list} $f" | |
12686 | ;; | |
12687 | * ) | |
12688 | xm_file_list="${xm_file_list} \$(srcdir)/config/$f" | |
12689 | xm_include_list="${xm_include_list} config/$f" | |
12690 | ;; | |
4977bab6 | 12691 | esac |
11642c3a ZW |
12692 | done |
12693 | ||
ab87f8c8 | 12694 | host_xm_file_list= |
e22340b0 | 12695 | host_xm_include_list= |
ab87f8c8 | 12696 | for f in $host_xm_file; do |
64ccbc99 | 12697 | case $f in |
d02af173 | 12698 | ansidecl.h ) |
e22340b0 ZW |
12699 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f" |
12700 | host_xm_include_list="${host_xm_include_list} $f" | |
12701 | ;; | |
e2500fed | 12702 | auto-host.h ) |
e22340b0 ZW |
12703 | host_xm_file_list="${host_xm_file_list} $f" |
12704 | host_xm_include_list="${host_xm_include_list} $f" | |
12705 | ;; | |
12706 | * ) | |
12707 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" | |
12708 | host_xm_include_list="${host_xm_include_list} config/$f" | |
12709 | ;; | |
64ccbc99 | 12710 | esac |
ab87f8c8 JL |
12711 | done |
12712 | ||
12713 | build_xm_file_list= | |
12714 | for f in $build_xm_file; do | |
64ccbc99 | 12715 | case $f in |
d02af173 | 12716 | ansidecl.h ) |
e22340b0 ZW |
12717 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f" |
12718 | build_xm_include_list="${build_xm_include_list} $f" | |
12719 | ;; | |
e2500fed | 12720 | auto-build.h | auto-host.h ) |
e22340b0 ZW |
12721 | build_xm_file_list="${build_xm_file_list} $f" |
12722 | build_xm_include_list="${build_xm_include_list} $f" | |
12723 | ;; | |
12724 | * ) | |
12725 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" | |
12726 | build_xm_include_list="${build_xm_include_list} config/$f" | |
12727 | ;; | |
64ccbc99 | 12728 | esac |
ab87f8c8 JL |
12729 | done |
12730 | ||
a078a589 ZW |
12731 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
12732 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
ba479fd2 NN |
12733 | CROSS= |
12734 | ALL=all.internal | |
12735 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
12736 | if test x$host != x$target |
12737 | then | |
a078a589 ZW |
12738 | CROSS="-DCROSS_COMPILE" |
12739 | ALL=all.cross | |
12740 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
343f59d9 | 12741 | case "$host","$target" in |
3a7e8b87 GK |
12742 | # Darwin crosses can use the host system's libraries and headers, |
12743 | # because of the fat library support. Of course, it must be the | |
12744 | # same version of Darwin on both sides. Allow the user to | |
12745 | # just say --target=foo-darwin without a version number to mean | |
12746 | # "the version on this system". | |
12747 | *-*-darwin*,*-*-darwin*) | |
12748 | hostos=`echo $host | sed 's/.*-darwin/darwin/'` | |
12749 | targetos=`echo $target | sed 's/.*-darwin/darwin/'` | |
12750 | if test $hostos = $targetos -o $targetos = darwin ; then | |
12751 | CROSS= | |
12752 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
12753 | with_headers=yes | |
12754 | fi | |
12755 | ;; | |
12756 | ||
343f59d9 AM |
12757 | i?86-*-*,x86_64-*-* \ |
12758 | | powerpc*-*-*,powerpc64*-*-*) | |
12759 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
12760 | esac | |
7a615b25 AO |
12761 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
12762 | # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR) | |
12763 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
12764 | fi |
12765 | ||
b39d221a EC |
12766 | # If this is a cross-compiler that does not |
12767 | # have its own set of headers then define | |
12768 | # inhibit_libc | |
12769 | ||
dc06db20 R |
12770 | # If this is using newlib, without having the headers available now, |
12771 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
12772 | # This prevents libgcc2 from containing any code which requires libc |
12773 | # support. | |
b39d221a | 12774 | inhibit_libc= |
dc06db20 R |
12775 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
12776 | test x$with_newlib = xyes ; } && | |
e50084fa | 12777 | { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then |
b39d221a | 12778 | inhibit_libc=-Dinhibit_libc |
b39d221a EC |
12779 | fi |
12780 | ||
12781 | ||
a078a589 ZW |
12782 | # When building gcc with a cross-compiler, we need to adjust things so |
12783 | # that the generator programs are still built with the native compiler. | |
12784 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
12785 | |
12786 | # These are the normal (build=host) settings: | |
ba479fd2 NN |
12787 | CC_FOR_BUILD='$(CC)' |
12788 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
ba479fd2 | 12789 | STMP_FIXINC=stmp-fixinc |
8ad9fb33 AP |
12790 | |
12791 | # Possibly disable fixproto, on a per-target basis. | |
12792 | case ${use_fixproto} in | |
12793 | no) | |
12794 | STMP_FIXPROTO= | |
12795 | ;; | |
12796 | yes) | |
12797 | STMP_FIXPROTO=stmp-fixproto | |
12798 | ;; | |
12799 | esac | |
12800 | ||
a078a589 | 12801 | |
83599948 NS |
12802 | # And these apply if build != host, or we are generating coverage data |
12803 | if test x$build != x$host || test "x$coverage_flags" != x | |
ab87f8c8 | 12804 | then |
b11e4747 | 12805 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' |
a078a589 | 12806 | |
7a615b25 | 12807 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
d8e5117d | 12808 | if test "x$STMP_FIXPROTO" != x; then |
de253ca4 GK |
12809 | STMP_FIXPROTO=stmp-install-fixproto |
12810 | fi | |
7a615b25 | 12811 | fi |
ab87f8c8 JL |
12812 | fi |
12813 | ||
12814 | # Expand extra_headers to include complete path. | |
12815 | # This substitutes for lots of t-* files. | |
12816 | extra_headers_list= | |
b1ef58c8 NN |
12817 | # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers. |
12818 | for file in ${extra_headers} ; do | |
12819 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" | |
12820 | done | |
ab87f8c8 | 12821 | |
c38f02df ILT |
12822 | # Define collect2 in Makefile. |
12823 | case $host_can_use_collect2 in | |
12824 | no) collect2= ;; | |
12825 | *) collect2='collect2$(exeext)' ;; | |
12826 | esac | |
12827 | ||
12828 | ||
ab87f8c8 | 12829 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
12830 | case $use_collect2 in |
12831 | no) use_collect2= ;; | |
12832 | "") ;; | |
ba479fd2 | 12833 | *) |
34a86c2b NN |
12834 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
12835 | xm_defines="${xm_defines} USE_COLLECT2" | |
c38f02df ILT |
12836 | case $host_can_use_collect2 in |
12837 | no) | |
12838 | { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5 | |
12839 | echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;} | |
12840 | { (exit 1); exit 1; }; } | |
12841 | ;; | |
12842 | esac | |
34a86c2b NN |
12843 | ;; |
12844 | esac | |
ab87f8c8 | 12845 | |
8bb915b6 NN |
12846 | # --------------------------- |
12847 | # Assembler & linker features | |
12848 | # --------------------------- | |
12849 | ||
d869a8c4 NN |
12850 | # Identify the assembler which will work hand-in-glove with the newly |
12851 | # built GCC, so that we can examine its features. This is the assembler | |
12852 | # which will be driven by the driver program. | |
12853 | # | |
12854 | # If build != host, and we aren't building gas in-tree, we identify a | |
12855 | # build->target assembler and hope that it will have the same features | |
12856 | # as the host->target assembler we'll be using. | |
34a86c2b | 12857 | in_tree_gas=no |
ab87f8c8 | 12858 | gcc_cv_as= |
981d4858 JM |
12859 | gcc_cv_gas_major_version= |
12860 | gcc_cv_gas_minor_version= | |
ab87f8c8 JL |
12861 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
12862 | if test -x "$DEFAULT_ASSEMBLER"; then | |
12863 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
34a86c2b | 12864 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
08d105fa AO |
12865 | && test -f ../gas/Makefile \ |
12866 | && test x$build = x$host; then | |
12867 | # Single tree build which includes gas. We want to prefer it | |
12868 | # over whatever linker top-level may have detected, since | |
12869 | # we'll use what we're building after installation anyway. | |
ad9c4d9f NN |
12870 | in_tree_gas=yes |
12871 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
12872 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
12873 | $gcc_cv_as_gas_srcdir/configure \ | |
12874 | $gcc_cv_as_gas_srcdir/configure.in \ | |
12875 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
58ea87a9 | 12876 | gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` |
ad9c4d9f NN |
12877 | if test x$gcc_cv_gas_version != x; then |
12878 | break | |
12879 | fi | |
12880 | done | |
12881 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
12882 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
12883 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
5aaaf0e8 NN |
12884 | case $gcc_cv_gas_patch_version in |
12885 | "") gcc_cv_gas_patch_version="0" ;; | |
12886 | esac | |
8ada417f ZW |
12887 | gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ |
12888 | + $gcc_cv_gas_minor_version \) \* 1000 \ | |
12889 | + $gcc_cv_gas_patch_version` | |
ad9c4d9f | 12890 | |
9f18db39 | 12891 | gcc_cv_as=../gas/as-new$build_exeext |
5408ac6c HPN |
12892 | in_tree_gas_is_elf=no |
12893 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
12894 | || (grep 'obj_format = multi' ../gas/Makefile \ | |
12895 | && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null | |
12896 | then | |
12897 | in_tree_gas_is_elf=yes | |
12898 | fi | |
9f18db39 PB |
12899 | elif test -x as$build_exeext; then |
12900 | # Build using assembler in the current directory. | |
12901 | gcc_cv_as=./as$build_exeext | |
08d105fa AO |
12902 | elif test -x "$AS_FOR_TARGET"; then |
12903 | gcc_cv_as="$AS_FOR_TARGET" | |
12904 | elif test -x "$AS" && test x$host = x$target; then | |
12905 | gcc_cv_as="$AS" | |
981d4858 | 12906 | fi |
9e423e6d | 12907 | |
a1286ef5 | 12908 | |
9f18db39 PB |
12909 | # When searching for the assembler or linker, search the same directories |
12910 | # that the installed compiler will search. Else we may find the wrong | |
12911 | # assembler or linker and lose. If we do not find a suitable binary, | |
12912 | # then try the user's path. | |
12913 | # | |
12914 | # Also note we have to check MD_EXEC_PREFIX before checking the user's path. | |
12915 | if test "x$exec_prefix" = xNONE; then | |
12916 | if test "x$prefix" = xNONE; then | |
12917 | gcc_cv_tool_prefix=/usr/local | |
779243f7 | 12918 | else |
9f18db39 | 12919 | gcc_cv_tool_prefix=$prefix |
779243f7 | 12920 | fi |
9f18db39 PB |
12921 | else |
12922 | gcc_cv_tool_prefix=$exec_prefix | |
12923 | fi | |
12924 | ||
12925 | if test x$host = x$build; then | |
12926 | gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version" | |
12927 | gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical" | |
12928 | gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical/$gcc_version" | |
12929 | gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR/usr/lib/gcc/$target_noncanonical" | |
12930 | gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version" | |
12931 | gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$gcc_cv_tool_prefix/$target_noncanonical/bin" | |
12932 | else | |
12933 | gcc_cv_tool_dirs= | |
12934 | fi | |
12935 | ||
12936 | if test x$build = x$target; then | |
12937 | # Rummage through tm_files looking for MD_EXEC_PREFIX | |
12938 | md_dirs= | |
12939 | for f in ${tm_file_list}; do | |
12940 | if test -f $f; then | |
12941 | if grep '^#[ ]*undef[ ]*MD_EXEC_PREFIX' $f > /dev/null; then | |
12942 | md_dirs= | |
12943 | fi | |
12944 | md_dirs="$md_dirs "`sed -n -e 's@^#[ ]*define[ ]*MD_EXEC_PREFIX[ ]*"\(.*\)/"@\1@p' < $f` | |
12945 | fi | |
12946 | done | |
12947 | for f in ${md_dirs}; do | |
12948 | gcc_cv_tool_dirs="$gcc_cv_tool_dirs$PATH_SEPARATOR$f" | |
12949 | done | |
12950 | fi | |
12951 | ||
12952 | ||
12953 | ||
12954 | ||
12955 | exec 6>/dev/null | |
a2eafc76 | 12956 | if test "x$gcc_cv_as" = x; then |
c42adccb PB |
12957 | # The AC_PATH_PROGS macro doesn't work properly when its 4th argument |
12958 | # is empty. | |
12959 | if test "x$gcc_cv_tool_dirs" = x; then | |
12960 | gcc_cv_as= | |
12961 | else | |
12962 | for ac_prog in as | |
9f18db39 PB |
12963 | do |
12964 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
12965 | set dummy $ac_prog; ac_word=$2 | |
12966 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
12967 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
12968 | if test "${ac_cv_path_gcc_cv_as+set}" = set; then | |
12969 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12970 | else | |
12971 | case $gcc_cv_as in | |
12972 | [\\/]* | ?:[\\/]*) | |
12973 | ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. | |
12974 | ;; | |
12975 | *) | |
12976 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12977 | for as_dir in $gcc_cv_tool_dirs | |
12978 | do | |
12979 | IFS=$as_save_IFS | |
12980 | test -z "$as_dir" && as_dir=. | |
12981 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12982 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
12983 | ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" | |
12984 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12985 | break 2 | |
12986 | fi | |
12987 | done | |
12988 | done | |
779243f7 | 12989 | |
9f18db39 PB |
12990 | ;; |
12991 | esac | |
12992 | fi | |
12993 | gcc_cv_as=$ac_cv_path_gcc_cv_as | |
12994 | ||
12995 | if test -n "$gcc_cv_as"; then | |
12996 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 | |
12997 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
12998 | else | |
12999 | echo "$as_me:$LINENO: result: no" >&5 | |
13000 | echo "${ECHO_T}no" >&6 | |
13001 | fi | |
13002 | ||
13003 | test -n "$gcc_cv_as" && break | |
13004 | done | |
13005 | ||
c42adccb | 13006 | fi |
a2eafc76 | 13007 | fi |
9f18db39 PB |
13008 | if test "x$gcc_cv_as" = x; then |
13009 | # If the loop above did not find a tool, then use whatever | |
b095fe2c | 13010 | # one we can find in the users's path. We are looking for a |
9f18db39 | 13011 | # ${build} -> ${target} tool. |
55a2ea2a | 13012 | if test "x$program_prefix" != xNONE; then |
9f18db39 | 13013 | default_tool_name=${program_prefix}as |
b095fe2c | 13014 | elif test x$build != x$host && test x$build != x$target; then |
9f18db39 | 13015 | default_tool_name=${target_noncanonical}-as |
55a2ea2a | 13016 | else |
9f18db39 | 13017 | default_tool_name=`echo as | sed "${program_transform_name}"` |
55a2ea2a | 13018 | fi |
9f18db39 PB |
13019 | for ac_prog in $default_tool_name |
13020 | do | |
13021 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
13022 | set dummy $ac_prog; ac_word=$2 | |
13023 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13024 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13025 | if test "${ac_cv_path_gcc_cv_as+set}" = set; then | |
13026 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13027 | else | |
13028 | case $gcc_cv_as in | |
13029 | [\\/]* | ?:[\\/]*) | |
13030 | ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. | |
13031 | ;; | |
13032 | *) | |
13033 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13034 | for as_dir in $PATH | |
13035 | do | |
13036 | IFS=$as_save_IFS | |
13037 | test -z "$as_dir" && as_dir=. | |
13038 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13039 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13040 | ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" | |
13041 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13042 | break 2 | |
13043 | fi | |
13044 | done | |
13045 | done | |
55a2ea2a | 13046 | |
9f18db39 PB |
13047 | ;; |
13048 | esac | |
13049 | fi | |
13050 | gcc_cv_as=$ac_cv_path_gcc_cv_as | |
55a2ea2a | 13051 | |
9f18db39 PB |
13052 | if test -n "$gcc_cv_as"; then |
13053 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 | |
13054 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
13055 | else | |
13056 | echo "$as_me:$LINENO: result: no" >&5 | |
13057 | echo "${ECHO_T}no" >&6 | |
13058 | fi | |
13059 | ||
13060 | test -n "$gcc_cv_as" && break | |
13061 | done | |
7fefc172 | 13062 | test -n "$gcc_cv_as" || gcc_cv_as="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext" |
779243f7 | 13063 | |
9e423e6d | 13064 | fi |
9f18db39 PB |
13065 | test "$silent" != yes && exec 6>&1 |
13066 | ||
13067 | ORIGINAL_AS_FOR_TARGET="$gcc_cv_as" | |
13068 | ||
13069 | echo "$as_me:$LINENO: checking what assembler to use" >&5 | |
13070 | echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 | |
34a86c2b NN |
13071 | case $in_tree_gas in |
13072 | yes) | |
ba479fd2 NN |
13073 | echo "$as_me:$LINENO: result: \"newly built gas\"" >&5 |
13074 | echo "${ECHO_T}\"newly built gas\"" >&6 | |
34a86c2b NN |
13075 | ;; |
13076 | no) | |
ba479fd2 NN |
13077 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 |
13078 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
34a86c2b NN |
13079 | ;; |
13080 | esac | |
981d4858 | 13081 | |
d869a8c4 NN |
13082 | # Identify the linker which will work hand-in-glove with the newly |
13083 | # built GCC, so that we can examine its features. This is the linker | |
13084 | # which will be driven by the driver program. | |
13085 | # | |
13086 | # If build != host, and we aren't building gas in-tree, we identify a | |
13087 | # build->target linker and hope that it will have the same features | |
13088 | # as the host->target linker we'll be using. | |
34a86c2b | 13089 | in_tree_ld=no |
275b60d6 JJ |
13090 | gcc_cv_ld= |
13091 | gcc_cv_gld_major_version= | |
13092 | gcc_cv_gld_minor_version= | |
13093 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
13094 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
13095 | if test -x "$DEFAULT_LINKER"; then | |
13096 | gcc_cv_ld="$DEFAULT_LINKER" | |
34a86c2b | 13097 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ |
08d105fa AO |
13098 | && test -f ../ld/Makefile \ |
13099 | && test x$build = x$host; then | |
13100 | # Single tree build which includes ld. We want to prefer it | |
13101 | # over whatever linker top-level may have detected, since | |
13102 | # we'll use what we're building after installation anyway. | |
34a86c2b | 13103 | in_tree_ld=yes |
5408ac6c HPN |
13104 | in_tree_ld_is_elf=no |
13105 | if (grep 'EMUL = .*elf' ../ld/Makefile \ | |
8a45d680 AN |
13106 | || grep 'EMUL = .*linux' ../ld/Makefile \ |
13107 | || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then | |
5408ac6c HPN |
13108 | in_tree_ld_is_elf=yes |
13109 | fi | |
275b60d6 JJ |
13110 | 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 |
13111 | do | |
58ea87a9 | 13112 | gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` |
275b60d6 JJ |
13113 | if test x$gcc_cv_gld_version != x; then |
13114 | break | |
13115 | fi | |
13116 | done | |
13117 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
13118 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
9f18db39 PB |
13119 | gcc_cv_ld=../ld/ld-new$build_exeext |
13120 | elif test -x collect-ld$build_exeext; then | |
13121 | # Build using linker in the current directory. | |
13122 | gcc_cv_ld=./collect-ld$build_exeext | |
08d105fa AO |
13123 | elif test -x "$LD_FOR_TARGET"; then |
13124 | gcc_cv_ld="$LD_FOR_TARGET" | |
13125 | elif test -x "$LD" && test x$host = x$target; then | |
13126 | gcc_cv_ld="$LD" | |
275b60d6 JJ |
13127 | fi |
13128 | ||
275b60d6 | 13129 | |
9f18db39 PB |
13130 | |
13131 | ||
13132 | ||
13133 | exec 6>/dev/null | |
a2eafc76 | 13134 | if test "x$gcc_cv_ld" = x; then |
c42adccb PB |
13135 | # The AC_PATH_PROGS macro doesn't work properly when its 4th argument |
13136 | # is empty. | |
13137 | if test "x$gcc_cv_tool_dirs" = x; then | |
13138 | gcc_cv_ld= | |
13139 | else | |
13140 | for ac_prog in ld | |
9f18db39 PB |
13141 | do |
13142 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
13143 | set dummy $ac_prog; ac_word=$2 | |
13144 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13145 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13146 | if test "${ac_cv_path_gcc_cv_ld+set}" = set; then | |
13147 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13148 | else | |
13149 | case $gcc_cv_ld in | |
13150 | [\\/]* | ?:[\\/]*) | |
13151 | ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. | |
13152 | ;; | |
13153 | *) | |
13154 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13155 | for as_dir in $gcc_cv_tool_dirs | |
13156 | do | |
13157 | IFS=$as_save_IFS | |
13158 | test -z "$as_dir" && as_dir=. | |
13159 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13160 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13161 | ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" | |
13162 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13163 | break 2 | |
13164 | fi | |
13165 | done | |
13166 | done | |
13167 | ||
13168 | ;; | |
13169 | esac | |
13170 | fi | |
13171 | gcc_cv_ld=$ac_cv_path_gcc_cv_ld | |
13172 | ||
13173 | if test -n "$gcc_cv_ld"; then | |
13174 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 | |
13175 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
13176 | else | |
13177 | echo "$as_me:$LINENO: result: no" >&5 | |
13178 | echo "${ECHO_T}no" >&6 | |
13179 | fi | |
13180 | ||
13181 | test -n "$gcc_cv_ld" && break | |
13182 | done | |
13183 | ||
c42adccb | 13184 | fi |
a2eafc76 | 13185 | fi |
9f18db39 PB |
13186 | if test "x$gcc_cv_ld" = x; then |
13187 | # If the loop above did not find a tool, then use whatever | |
b095fe2c | 13188 | # one we can find in the users's path. We are looking for a |
9f18db39 | 13189 | # ${build} -> ${target} tool. |
55a2ea2a | 13190 | if test "x$program_prefix" != xNONE; then |
9f18db39 | 13191 | default_tool_name=${program_prefix}ld |
b095fe2c | 13192 | elif test x$build != x$host && test x$build != x$target; then |
9f18db39 | 13193 | default_tool_name=${target_noncanonical}-ld |
55a2ea2a | 13194 | else |
9f18db39 | 13195 | default_tool_name=`echo ld | sed "${program_transform_name}"` |
55a2ea2a | 13196 | fi |
9f18db39 PB |
13197 | for ac_prog in $default_tool_name |
13198 | do | |
13199 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
13200 | set dummy $ac_prog; ac_word=$2 | |
13201 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13202 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13203 | if test "${ac_cv_path_gcc_cv_ld+set}" = set; then | |
13204 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13205 | else | |
13206 | case $gcc_cv_ld in | |
13207 | [\\/]* | ?:[\\/]*) | |
13208 | ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. | |
13209 | ;; | |
13210 | *) | |
13211 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13212 | for as_dir in $PATH | |
13213 | do | |
13214 | IFS=$as_save_IFS | |
13215 | test -z "$as_dir" && as_dir=. | |
13216 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13217 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13218 | ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" | |
13219 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13220 | break 2 | |
13221 | fi | |
13222 | done | |
13223 | done | |
55a2ea2a | 13224 | |
9f18db39 PB |
13225 | ;; |
13226 | esac | |
13227 | fi | |
13228 | gcc_cv_ld=$ac_cv_path_gcc_cv_ld | |
55a2ea2a | 13229 | |
9f18db39 PB |
13230 | if test -n "$gcc_cv_ld"; then |
13231 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 | |
13232 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
13233 | else | |
13234 | echo "$as_me:$LINENO: result: no" >&5 | |
13235 | echo "${ECHO_T}no" >&6 | |
13236 | fi | |
13237 | ||
13238 | test -n "$gcc_cv_ld" && break | |
13239 | done | |
7fefc172 | 13240 | test -n "$gcc_cv_ld" || gcc_cv_ld="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext" |
275b60d6 | 13241 | |
275b60d6 | 13242 | fi |
9f18db39 PB |
13243 | test "$silent" != yes && exec 6>&1 |
13244 | ||
13245 | ORIGINAL_LD_FOR_TARGET="$gcc_cv_ld" | |
13246 | ||
13247 | echo "$as_me:$LINENO: checking what linker to use" >&5 | |
13248 | echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 | |
34a86c2b NN |
13249 | case $in_tree_ld in |
13250 | yes) | |
ba479fd2 NN |
13251 | echo "$as_me:$LINENO: result: \"newly built ld\"" >&5 |
13252 | echo "${ECHO_T}\"newly built ld\"" >&6 | |
34a86c2b NN |
13253 | ;; |
13254 | no) | |
ba479fd2 NN |
13255 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 |
13256 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
34a86c2b NN |
13257 | ;; |
13258 | esac | |
275b60d6 | 13259 | |
981d4858 | 13260 | # Figure out what nm we will be using. |
f9c1196a | 13261 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils |
f9c1196a | 13262 | in_tree_nm=no |
9f18db39 PB |
13263 | gcc_cv_nm= |
13264 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
f9c1196a ZW |
13265 | && test -f ../binutils/Makefile; then |
13266 | # Single tree build which includes binutils. | |
13267 | in_tree_nm=yes | |
9f18db39 PB |
13268 | gcc_cv_nm=../binutils/nm-new$build_exeext |
13269 | elif test -x nm$build_exeext; then | |
57991eba | 13270 | gcc_cv_nm=./nm$build_exeext |
9f18db39 PB |
13271 | fi |
13272 | ||
13273 | ||
13274 | ||
13275 | ||
13276 | ||
13277 | exec 6>/dev/null | |
a2eafc76 | 13278 | if test "x$gcc_cv_nm" = x; then |
c42adccb PB |
13279 | # The AC_PATH_PROGS macro doesn't work properly when its 4th argument |
13280 | # is empty. | |
13281 | if test "x$gcc_cv_tool_dirs" = x; then | |
13282 | gcc_cv_nm= | |
13283 | else | |
13284 | for ac_prog in nm | |
9f18db39 PB |
13285 | do |
13286 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
13287 | set dummy $ac_prog; ac_word=$2 | |
13288 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13289 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13290 | if test "${ac_cv_path_gcc_cv_nm+set}" = set; then | |
13291 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
534d0cc0 | 13292 | else |
9f18db39 PB |
13293 | case $gcc_cv_nm in |
13294 | [\\/]* | ?:[\\/]*) | |
13295 | ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. | |
13296 | ;; | |
13297 | *) | |
13298 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13299 | for as_dir in $gcc_cv_tool_dirs | |
13300 | do | |
13301 | IFS=$as_save_IFS | |
13302 | test -z "$as_dir" && as_dir=. | |
13303 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13304 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13305 | ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" | |
13306 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13307 | break 2 | |
13308 | fi | |
13309 | done | |
13310 | done | |
13311 | ||
13312 | ;; | |
13313 | esac | |
981d4858 | 13314 | fi |
9f18db39 PB |
13315 | gcc_cv_nm=$ac_cv_path_gcc_cv_nm |
13316 | ||
13317 | if test -n "$gcc_cv_nm"; then | |
13318 | echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13319 | echo "${ECHO_T}$gcc_cv_nm" >&6 | |
13320 | else | |
13321 | echo "$as_me:$LINENO: result: no" >&5 | |
13322 | echo "${ECHO_T}no" >&6 | |
13323 | fi | |
13324 | ||
13325 | test -n "$gcc_cv_nm" && break | |
13326 | done | |
13327 | ||
c42adccb | 13328 | fi |
a2eafc76 | 13329 | fi |
9f18db39 PB |
13330 | if test "x$gcc_cv_nm" = x; then |
13331 | # If the loop above did not find a tool, then use whatever | |
13332 | # one we can find in the users's path. We are looking for a | |
13333 | # ${build} -> ${target} tool. | |
13334 | if test "x$program_prefix" != xNONE; then | |
13335 | default_tool_name=${program_prefix}nm | |
13336 | elif test x$build != x$host && test x$build != x$target; then | |
13337 | default_tool_name=${target_noncanonical}-nm | |
13338 | else | |
13339 | default_tool_name=`echo nm | sed "${program_transform_name}"` | |
13340 | fi | |
13341 | for ac_prog in $default_tool_name | |
13342 | do | |
13343 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
13344 | set dummy $ac_prog; ac_word=$2 | |
13345 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13346 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13347 | if test "${ac_cv_path_gcc_cv_nm+set}" = set; then | |
13348 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13349 | else | |
13350 | case $gcc_cv_nm in | |
13351 | [\\/]* | ?:[\\/]*) | |
13352 | ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. | |
13353 | ;; | |
13354 | *) | |
13355 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13356 | for as_dir in $PATH | |
13357 | do | |
13358 | IFS=$as_save_IFS | |
13359 | test -z "$as_dir" && as_dir=. | |
13360 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13361 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13362 | ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" | |
13363 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13364 | break 2 | |
13365 | fi | |
13366 | done | |
13367 | done | |
13368 | ||
13369 | ;; | |
13370 | esac | |
13371 | fi | |
13372 | gcc_cv_nm=$ac_cv_path_gcc_cv_nm | |
13373 | ||
13374 | if test -n "$gcc_cv_nm"; then | |
13375 | echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13376 | echo "${ECHO_T}$gcc_cv_nm" >&6 | |
13377 | else | |
13378 | echo "$as_me:$LINENO: result: no" >&5 | |
13379 | echo "${ECHO_T}no" >&6 | |
13380 | fi | |
13381 | ||
13382 | test -n "$gcc_cv_nm" && break | |
13383 | done | |
7fefc172 | 13384 | test -n "$gcc_cv_nm" || gcc_cv_nm="$gcc_cv_tool_prefix/bin/$default_tool_name$build_exeext" |
9f18db39 PB |
13385 | |
13386 | fi | |
13387 | test "$silent" != yes && exec 6>&1 | |
13388 | ||
13389 | ORIGINAL_NM_FOR_TARGET="$gcc_cv_nm" | |
13390 | ||
13391 | echo "$as_me:$LINENO: checking what nm to use" >&5 | |
13392 | echo $ECHO_N "checking what nm to use... $ECHO_C" >&6 | |
f9c1196a | 13393 | case $in_tree_nm in |
ba479fd2 NN |
13394 | yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5 |
13395 | echo "${ECHO_T}\"newly built nm\"" >&6 ;; | |
13396 | no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13397 | echo "${ECHO_T}$gcc_cv_nm" >&6 ;; | |
f9c1196a | 13398 | esac |
981d4858 | 13399 | |
3cae5780 | 13400 | # Figure out what objdump we will be using. |
ba479fd2 NN |
13401 | echo "$as_me:$LINENO: checking what objdump to use" >&5 |
13402 | echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6 | |
f9c1196a | 13403 | in_tree_objdump=no |
57991eba PB |
13404 | if test -x objdump$build_exeext; then |
13405 | gcc_cv_objdump=./objdump$build_exeext | |
f9c1196a ZW |
13406 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
13407 | && test -f ../binutils/Makefile; then | |
13408 | # Single tree build which includes binutils. | |
13409 | in_tree_objdump=yes | |
9f18db39 | 13410 | gcc_cv_objdump=../binutils/objdump$build_exeext |
534d0cc0 | 13411 | elif test "x$program_prefix" != xNONE; then |
57991eba | 13412 | gcc_cv_objdump=${program_prefix}objdump$build_exeext |
b095fe2c DJ |
13413 | elif test x$build != x$host && test x$build != x$target; then |
13414 | gcc_cv_objdump=${target_noncanonical}-objdump$build_exeext | |
534d0cc0 | 13415 | else |
f9c1196a | 13416 | gcc_cv_objdump=`echo objdump | \ |
57991eba | 13417 | sed "${program_transform_name}"`$build_exeext |
3cae5780 | 13418 | fi |
f9c1196a | 13419 | case $in_tree_objdump in |
ba479fd2 NN |
13420 | yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5 |
13421 | echo "${ECHO_T}\"newly built objdump\"" >&6 ;; | |
13422 | no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
13423 | echo "${ECHO_T}$gcc_cv_objdump" >&6 ;; | |
f9c1196a | 13424 | esac |
3cae5780 | 13425 | |
981d4858 | 13426 | # Figure out what assembler alignment features are present. |
ba479fd2 NN |
13427 | echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5 |
13428 | echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6 | |
13429 | if test "${gcc_cv_as_balign_and_p2align+set}" = set; then | |
13430 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13431 | else |
13432 | gcc_cv_as_balign_and_p2align=no | |
13433 | if test $in_tree_gas = yes; then | |
13434 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0` | |
13435 | then gcc_cv_as_balign_and_p2align=yes | |
13436 | fi | |
13437 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13438 | echo '.balign 4 |
8ada417f | 13439 | .p2align 2' > conftest.s |
ba479fd2 NN |
13440 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13441 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13442 | (eval $ac_try) 2>&5 | |
13443 | ac_status=$? | |
13444 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13445 | (exit $ac_status); }; } | |
8ada417f ZW |
13446 | then |
13447 | gcc_cv_as_balign_and_p2align=yes | |
13448 | else | |
13449 | echo "configure: failed program was" >&5 | |
13450 | cat conftest.s >&5 | |
13451 | fi | |
13452 | rm -f conftest.o conftest.s | |
13453 | fi | |
13454 | fi | |
ba479fd2 NN |
13455 | echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5 |
13456 | echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6 | |
63cf211a | 13457 | if test $gcc_cv_as_balign_and_p2align = yes; then |
ba479fd2 NN |
13458 | |
13459 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13460 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
ba479fd2 | 13461 | _ACEOF |
981d4858 | 13462 | |
ad9c4d9f NN |
13463 | fi |
13464 | ||
ba479fd2 NN |
13465 | echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5 |
13466 | echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6 | |
13467 | if test "${gcc_cv_as_max_skip_p2align+set}" = set; then | |
13468 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13469 | else |
13470 | gcc_cv_as_max_skip_p2align=no | |
13471 | if test $in_tree_gas = yes; then | |
13472 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
13473 | then gcc_cv_as_max_skip_p2align=yes | |
13474 | fi | |
13475 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13476 | echo '.p2align 4,,7' > conftest.s |
ba479fd2 NN |
13477 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13478 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13479 | (eval $ac_try) 2>&5 | |
13480 | ac_status=$? | |
13481 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13482 | (exit $ac_status); }; } | |
8ada417f ZW |
13483 | then |
13484 | gcc_cv_as_max_skip_p2align=yes | |
13485 | else | |
13486 | echo "configure: failed program was" >&5 | |
13487 | cat conftest.s >&5 | |
13488 | fi | |
13489 | rm -f conftest.o conftest.s | |
13490 | fi | |
ad9c4d9f | 13491 | fi |
ba479fd2 NN |
13492 | echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5 |
13493 | echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6 | |
63cf211a | 13494 | if test $gcc_cv_as_max_skip_p2align = yes; then |
ba479fd2 NN |
13495 | |
13496 | cat >>confdefs.h <<\_ACEOF | |
9e423e6d | 13497 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
ba479fd2 | 13498 | _ACEOF |
9e423e6d | 13499 | |
9e423e6d | 13500 | fi |
ad9c4d9f | 13501 | |
ba479fd2 NN |
13502 | echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5 |
13503 | echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6 | |
13504 | if test "${gcc_cv_as_subsection_m1+set}" = set; then | |
13505 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13506 | else |
13507 | gcc_cv_as_subsection_m1=no | |
13508 | if test $in_tree_gas = yes; then | |
13509 | if test $in_tree_gas_is_elf = yes \ | |
13510 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
13511 | then gcc_cv_as_subsection_m1=yes | |
ad9c4d9f | 13512 | fi |
8ada417f | 13513 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13514 | echo 'conftest_label1: .word 0 |
d1accaa3 JJ |
13515 | .subsection -1 |
13516 | conftest_label2: .word 0 | |
8ada417f | 13517 | .previous' > conftest.s |
ba479fd2 NN |
13518 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13519 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13520 | (eval $ac_try) 2>&5 | |
13521 | ac_status=$? | |
13522 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13523 | (exit $ac_status); }; } | |
8ada417f ZW |
13524 | then |
13525 | if test x$gcc_cv_nm != x; then | |
13526 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
13527 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
13528 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 | |
13529 | then : | |
13530 | else gcc_cv_as_subsection_m1=yes | |
13531 | fi | |
13532 | rm -f conftest.nm1 conftest.nm2 | |
13533 | fi | |
13534 | else | |
13535 | echo "configure: failed program was" >&5 | |
13536 | cat conftest.s >&5 | |
13537 | fi | |
13538 | rm -f conftest.o conftest.s | |
13539 | fi | |
981d4858 | 13540 | fi |
ba479fd2 NN |
13541 | echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5 |
13542 | echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6 | |
63cf211a | 13543 | if test $gcc_cv_as_subsection_m1 = yes; then |
ba479fd2 NN |
13544 | |
13545 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13546 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
ba479fd2 | 13547 | _ACEOF |
981d4858 | 13548 | |
d1accaa3 | 13549 | fi |
ad9c4d9f | 13550 | |
ba479fd2 NN |
13551 | echo "$as_me:$LINENO: checking assembler for .weak" >&5 |
13552 | echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6 | |
13553 | if test "${gcc_cv_as_weak+set}" = set; then | |
13554 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13555 | else |
13556 | gcc_cv_as_weak=no | |
13557 | if test $in_tree_gas = yes; then | |
13558 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0` | |
13559 | then gcc_cv_as_weak=yes | |
ad9c4d9f | 13560 | fi |
8ada417f | 13561 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13562 | echo ' .weak foobar' > conftest.s |
ba479fd2 NN |
13563 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13564 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13565 | (eval $ac_try) 2>&5 | |
13566 | ac_status=$? | |
13567 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13568 | (exit $ac_status); }; } | |
8ada417f ZW |
13569 | then |
13570 | gcc_cv_as_weak=yes | |
13571 | else | |
13572 | echo "configure: failed program was" >&5 | |
13573 | cat conftest.s >&5 | |
13574 | fi | |
13575 | rm -f conftest.o conftest.s | |
13576 | fi | |
981d4858 | 13577 | fi |
ba479fd2 NN |
13578 | echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5 |
13579 | echo "${ECHO_T}$gcc_cv_as_weak" >&6 | |
63cf211a | 13580 | if test $gcc_cv_as_weak = yes; then |
ba479fd2 NN |
13581 | |
13582 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13583 | #define HAVE_GAS_WEAK 1 |
ba479fd2 | 13584 | _ACEOF |
981d4858 | 13585 | |
12822146 | 13586 | fi |
ad9c4d9f | 13587 | |
e41f3691 JDA |
13588 | echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5 |
13589 | echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6 | |
13590 | if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then | |
13591 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13592 | else | |
13593 | gcc_cv_as_nsubspa_comdat=no | |
13594 | if test $in_tree_gas = yes; then | |
13595 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
13596 | then gcc_cv_as_nsubspa_comdat=yes | |
13597 | fi | |
13598 | elif test x$gcc_cv_as != x; then | |
13599 | echo ' .SPACE $TEXT$ | |
13600 | .NSUBSPA $CODE$,COMDAT' > conftest.s | |
13601 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
13602 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13603 | (eval $ac_try) 2>&5 | |
13604 | ac_status=$? | |
13605 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13606 | (exit $ac_status); }; } | |
13607 | then | |
13608 | gcc_cv_as_nsubspa_comdat=yes | |
13609 | else | |
13610 | echo "configure: failed program was" >&5 | |
13611 | cat conftest.s >&5 | |
13612 | fi | |
13613 | rm -f conftest.o conftest.s | |
13614 | fi | |
13615 | fi | |
13616 | echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5 | |
13617 | echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6 | |
13618 | if test $gcc_cv_as_nsubspa_comdat = yes; then | |
13619 | ||
13620 | cat >>confdefs.h <<\_ACEOF | |
13621 | #define HAVE_GAS_NSUBSPA_COMDAT 1 | |
13622 | _ACEOF | |
13623 | ||
13624 | fi | |
13625 | ||
8ada417f ZW |
13626 | # .hidden needs to be supported in both the assembler and the linker, |
13627 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
13628 | # This is irritatingly difficult to feature test for; we have to check the | |
13629 | # date string after the version number. If we've got an in-tree | |
13630 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
13631 | # to be safe. | |
13632 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
ba479fd2 NN |
13633 | echo "$as_me:$LINENO: checking assembler for .hidden" >&5 |
13634 | echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6 | |
13635 | if test "${gcc_cv_as_hidden+set}" = set; then | |
13636 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13637 | else |
13638 | gcc_cv_as_hidden=no | |
13639 | if test $in_tree_gas = yes; then | |
13640 | if test $in_tree_gas_is_elf = yes \ | |
13641 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0` | |
13642 | then gcc_cv_as_hidden=yes | |
13643 | fi | |
13644 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13645 | echo ' .hidden foobar |
8ada417f | 13646 | foobar:' > conftest.s |
ba479fd2 NN |
13647 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13648 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13649 | (eval $ac_try) 2>&5 | |
13650 | ac_status=$? | |
13651 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13652 | (exit $ac_status); }; } | |
8ada417f ZW |
13653 | then |
13654 | gcc_cv_as_hidden=yes | |
13655 | else | |
13656 | echo "configure: failed program was" >&5 | |
13657 | cat conftest.s >&5 | |
13658 | fi | |
13659 | rm -f conftest.o conftest.s | |
13660 | fi | |
13661 | fi | |
ba479fd2 NN |
13662 | echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5 |
13663 | echo "${ECHO_T}$gcc_cv_as_hidden" >&6 | |
63cf211a | 13664 | |
ad9c4d9f | 13665 | |
ba479fd2 NN |
13666 | echo "$as_me:$LINENO: checking linker for .hidden support" >&5 |
13667 | echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6 | |
13668 | if test "${gcc_cv_ld_hidden+set}" = set; then | |
13669 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13670 | else |
13671 | if test $in_tree_ld = yes ; then | |
13672 | gcc_cv_ld_hidden=no | |
13673 | 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 \ | |
13674 | && test $in_tree_ld_is_elf = yes; then | |
13675 | gcc_cv_ld_hidden=yes | |
13676 | fi | |
13677 | else | |
13678 | gcc_cv_ld_hidden=yes | |
bace148a | 13679 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` |
8ada417f ZW |
13680 | if echo "$ld_ver" | grep GNU > /dev/null; then |
13681 | ld_vers=`echo $ld_ver | sed -n \ | |
13682 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13683 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13684 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13685 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
13686 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
11176d2a JB |
13687 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ |
13688 | -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 | 13689 | 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 |
13690 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` |
13691 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
13692 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
8ada417f ZW |
13693 | if test 0"$ld_date" -lt 20020404; then |
13694 | if test -n "$ld_date"; then | |
13695 | # If there was date string, but was earlier than 2002-04-04, fail | |
13696 | gcc_cv_ld_hidden=no | |
13697 | elif test -z "$ld_vers"; then | |
13698 | # If there was no date string nor ld version number, something is wrong | |
13699 | gcc_cv_ld_hidden=no | |
13700 | else | |
8ada417f ZW |
13701 | test -z "$ld_vers_patch" && ld_vers_patch=0 |
13702 | if test "$ld_vers_major" -lt 2; then | |
13703 | gcc_cv_ld_hidden=no | |
13704 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
13705 | gcc_cv_ld_hidden="no" | |
13706 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then | |
13707 | gcc_cv_ld_hidden=no | |
c72931a6 | 13708 | fi |
8ada417f | 13709 | fi |
789b7de5 | 13710 | fi |
8ada417f | 13711 | else |
28690784 | 13712 | case "${target}" in |
b0fd7d27 | 13713 | hppa64*-*-hpux* | ia64*-*-hpux*) |
28690784 JDA |
13714 | gcc_cv_ld_hidden=yes |
13715 | ;; | |
13716 | *) | |
13717 | gcc_cv_ld_hidden=no | |
13718 | ;; | |
13719 | esac | |
8ada417f ZW |
13720 | fi |
13721 | fi | |
6d07784a | 13722 | fi |
ba479fd2 NN |
13723 | echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5 |
13724 | echo "${ECHO_T}$gcc_cv_ld_hidden" >&6 | |
8ada417f | 13725 | libgcc_visibility=no |
ad9c4d9f | 13726 | |
232b67d9 | 13727 | |
8e3940b2 | 13728 | if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then |
8ada417f | 13729 | libgcc_visibility=yes |
ba479fd2 NN |
13730 | |
13731 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 13732 | #define HAVE_GAS_HIDDEN 1 |
ba479fd2 | 13733 | _ACEOF |
ad9c4d9f NN |
13734 | |
13735 | fi | |
13736 | ||
8ada417f | 13737 | # Check if we have .[us]leb128, and support symbol arithmetic with it. |
ba479fd2 NN |
13738 | echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5 |
13739 | echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6 | |
13740 | if test "${gcc_cv_as_leb128+set}" = set; then | |
13741 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13742 | else |
13743 | gcc_cv_as_leb128=no | |
13744 | if test $in_tree_gas = yes; then | |
13745 | if test $in_tree_gas_is_elf = yes \ | |
13746 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
13747 | then gcc_cv_as_leb128=yes | |
13748 | fi | |
13749 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13750 | echo ' .data |
b7460f24 RH |
13751 | .uleb128 L2 - L1 |
13752 | L1: | |
13753 | .uleb128 1280 | |
13754 | .sleb128 -1010 | |
8ada417f | 13755 | L2:' > conftest.s |
ba479fd2 NN |
13756 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13757 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13758 | (eval $ac_try) 2>&5 | |
13759 | ac_status=$? | |
13760 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13761 | (exit $ac_status); }; } | |
8ada417f ZW |
13762 | then |
13763 | # GAS versions before 2.11 do not support uleb128, | |
13764 | # despite appearing to. | |
13765 | # ??? There exists an elf-specific test that will crash | |
13766 | # the assembler. Perhaps it's better to figure out whether | |
13767 | # arbitrary sections are supported and try the test. | |
bace148a | 13768 | as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` |
8ada417f ZW |
13769 | if echo "$as_ver" | grep GNU > /dev/null; then |
13770 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` | |
13771 | as_major=`echo $as_ver | sed 's/\..*//'` | |
13772 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` | |
13773 | if test $as_major -eq 2 && test $as_minor -lt 11 | |
13774 | then : | |
13775 | else gcc_cv_as_leb128=yes | |
13776 | fi | |
13777 | fi | |
13778 | else | |
13779 | echo "configure: failed program was" >&5 | |
13780 | cat conftest.s >&5 | |
13781 | fi | |
13782 | rm -f conftest.o conftest.s | |
13783 | fi | |
b7460f24 | 13784 | fi |
ba479fd2 NN |
13785 | echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5 |
13786 | echo "${ECHO_T}$gcc_cv_as_leb128" >&6 | |
63cf211a | 13787 | if test $gcc_cv_as_leb128 = yes; then |
ba479fd2 NN |
13788 | |
13789 | cat >>confdefs.h <<\_ACEOF | |
b7460f24 | 13790 | #define HAVE_AS_LEB128 1 |
ba479fd2 | 13791 | _ACEOF |
b7460f24 RH |
13792 | |
13793 | fi | |
ad9c4d9f | 13794 | |
8ada417f ZW |
13795 | # GAS versions up to and including 2.11.0 may mis-optimize |
13796 | # .eh_frame data. | |
ba479fd2 NN |
13797 | echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5 |
13798 | echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6 | |
13799 | if test "${gcc_cv_as_eh_frame+set}" = set; then | |
13800 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13801 | else |
13802 | gcc_cv_as_eh_frame=no | |
13803 | if test $in_tree_gas = yes; then | |
13804 | if test $in_tree_gas_is_elf = yes \ | |
13805 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
13806 | then gcc_cv_as_eh_frame=yes | |
ad9c4d9f | 13807 | fi |
8ada417f | 13808 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13809 | echo ' .text |
c64688ae RH |
13810 | .LFB1: |
13811 | .4byte 0 | |
13812 | .L1: | |
13813 | .4byte 0 | |
13814 | .LFE1: | |
13815 | .section .eh_frame,"aw",@progbits | |
13816 | __FRAME_BEGIN__: | |
13817 | .4byte .LECIE1-.LSCIE1 | |
13818 | .LSCIE1: | |
13819 | .4byte 0x0 | |
13820 | .byte 0x1 | |
13821 | .ascii "z\0" | |
13822 | .byte 0x1 | |
13823 | .byte 0x78 | |
13824 | .byte 0x1a | |
13825 | .byte 0x0 | |
13826 | .byte 0x4 | |
13827 | .4byte 1 | |
13828 | .p2align 1 | |
13829 | .LECIE1: | |
13830 | .LSFDE1: | |
13831 | .4byte .LEFDE1-.LASFDE1 | |
13832 | .LASFDE1: | |
13833 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
13834 | .4byte .LFB1 | |
13835 | .4byte .LFE1-.LFB1 | |
13836 | .byte 0x4 | |
13837 | .4byte .LFE1-.LFB1 | |
13838 | .byte 0x4 | |
13839 | .4byte .L1-.LFB1 | |
8ada417f | 13840 | .LEFDE1:' > conftest.s |
ba479fd2 NN |
13841 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13842 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13843 | (eval $ac_try) 2>&5 | |
13844 | ac_status=$? | |
13845 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13846 | (exit $ac_status); }; } | |
8ada417f ZW |
13847 | then |
13848 | cat > conftest.lit <<EOF | |
c64688ae RH |
13849 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
13850 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 13851 | 0020 08000000 04080000 0044 .........D |
01efb963 | 13852 | EOF |
ba479fd2 | 13853 | cat > conftest.big <<EOF |
01efb963 AS |
13854 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... |
13855 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 13856 | 0020 00000008 04000000 0844 .........D |
c64688ae | 13857 | EOF |
8ada417f ZW |
13858 | # If the assembler didn't choke, and we can objdump, |
13859 | # and we got the correct data, then succeed. | |
13860 | if test x$gcc_cv_objdump != x \ | |
13861 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
13862 | | tail -3 > conftest.got \ | |
13863 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ | |
13864 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
13865 | then | |
13866 | gcc_cv_as_eh_frame=yes | |
ba479fd2 NN |
13867 | elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null' |
13868 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13869 | (eval $ac_try) 2>&5 | |
13870 | ac_status=$? | |
13871 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13872 | (exit $ac_status); }; }; then | |
8ada417f ZW |
13873 | gcc_cv_as_eh_frame=buggy |
13874 | else | |
13875 | # Uh oh, what do we do now? | |
13876 | gcc_cv_as_eh_frame=no | |
13877 | fi | |
13878 | else | |
13879 | echo "configure: failed program was" >&5 | |
13880 | cat conftest.s >&5 | |
13881 | fi | |
13882 | rm -f conftest.o conftest.s | |
13883 | fi | |
c64688ae | 13884 | fi |
ba479fd2 NN |
13885 | echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5 |
13886 | echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6 | |
ad9c4d9f | 13887 | |
6e3f3080 | 13888 | |
63cf211a | 13889 | if test $gcc_cv_as_eh_frame = buggy; then |
ba479fd2 NN |
13890 | |
13891 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 13892 | #define USE_AS_TRADITIONAL_FORMAT 1 |
ba479fd2 | 13893 | _ACEOF |
ad9c4d9f NN |
13894 | |
13895 | fi | |
13896 | ||
ba479fd2 NN |
13897 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 |
13898 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
13899 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
13900 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13901 | else |
13902 | gcc_cv_as_shf_merge=no | |
13903 | if test $in_tree_gas = yes; then | |
13904 | if test $in_tree_gas_is_elf = yes \ | |
13905 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
13906 | then gcc_cv_as_shf_merge=yes | |
13907 | fi | |
13908 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13909 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s |
ba479fd2 NN |
13910 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' |
13911 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13912 | (eval $ac_try) 2>&5 | |
13913 | ac_status=$? | |
13914 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13915 | (exit $ac_status); }; } | |
8ada417f ZW |
13916 | then |
13917 | gcc_cv_as_shf_merge=yes | |
13918 | else | |
13919 | echo "configure: failed program was" >&5 | |
13920 | cat conftest.s >&5 | |
13921 | fi | |
13922 | rm -f conftest.o conftest.s | |
13923 | fi | |
201556f0 | 13924 | fi |
ba479fd2 NN |
13925 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 |
13926 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
8ada417f | 13927 | |
c18a5b6c MM |
13928 | if test $gcc_cv_as_shf_merge = no; then |
13929 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 | |
13930 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
13931 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
13932 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13933 | else | |
13934 | gcc_cv_as_shf_merge=no | |
13935 | if test $in_tree_gas = yes; then | |
13936 | if test $in_tree_gas_is_elf = yes \ | |
13937 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
13938 | then gcc_cv_as_shf_merge=yes | |
13939 | fi | |
13940 | elif test x$gcc_cv_as != x; then | |
13941 | echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s | |
13942 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
13943 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13944 | (eval $ac_try) 2>&5 | |
13945 | ac_status=$? | |
13946 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13947 | (exit $ac_status); }; } | |
13948 | then | |
13949 | gcc_cv_as_shf_merge=yes | |
13950 | else | |
13951 | echo "configure: failed program was" >&5 | |
13952 | cat conftest.s >&5 | |
13953 | fi | |
13954 | rm -f conftest.o conftest.s | |
13955 | fi | |
13956 | fi | |
13957 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 | |
13958 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
13959 | ||
13960 | fi | |
8ad9fb33 | 13961 | |
ba479fd2 | 13962 | cat >>confdefs.h <<_ACEOF |
8ad9fb33 | 13963 | #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 13964 | _ACEOF |
201556f0 | 13965 | |
201556f0 | 13966 | |
c18a5b6c MM |
13967 | echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 |
13968 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 | |
13969 | if test "${gcc_cv_as_comdat_group+set}" = set; then | |
13970 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13971 | else | |
13972 | gcc_cv_as_comdat_group=no | |
13973 | if test $in_tree_gas = yes; then | |
13974 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 13975 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
13976 | then gcc_cv_as_comdat_group=yes |
13977 | fi | |
13978 | elif test x$gcc_cv_as != x; then | |
13979 | echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s | |
13980 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
13981 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13982 | (eval $ac_try) 2>&5 | |
13983 | ac_status=$? | |
13984 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13985 | (exit $ac_status); }; } | |
13986 | then | |
13987 | gcc_cv_as_comdat_group=yes | |
13988 | else | |
13989 | echo "configure: failed program was" >&5 | |
13990 | cat conftest.s >&5 | |
13991 | fi | |
13992 | rm -f conftest.o conftest.s | |
13993 | fi | |
13994 | fi | |
13995 | echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5 | |
13996 | echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6 | |
13997 | ||
13998 | if test $gcc_cv_as_comdat_group = yes; then | |
13999 | gcc_cv_as_comdat_group_percent=no | |
14000 | else | |
14001 | echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 | |
14002 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 | |
14003 | if test "${gcc_cv_as_comdat_group_percent+set}" = set; then | |
14004 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14005 | else | |
14006 | gcc_cv_as_comdat_group_percent=no | |
14007 | if test $in_tree_gas = yes; then | |
14008 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 14009 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
14010 | then gcc_cv_as_comdat_group_percent=yes |
14011 | fi | |
14012 | elif test x$gcc_cv_as != x; then | |
14013 | echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s | |
14014 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14015 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14016 | (eval $ac_try) 2>&5 | |
14017 | ac_status=$? | |
14018 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14019 | (exit $ac_status); }; } | |
14020 | then | |
14021 | gcc_cv_as_comdat_group_percent=yes | |
14022 | else | |
14023 | echo "configure: failed program was" >&5 | |
14024 | cat conftest.s >&5 | |
14025 | fi | |
14026 | rm -f conftest.o conftest.s | |
14027 | fi | |
14028 | fi | |
14029 | echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5 | |
14030 | echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6 | |
14031 | ||
14032 | fi | |
11176d2a JB |
14033 | if test $in_tree_ld != yes && test x"$ld_vers" != x; then |
14034 | comdat_group=yes | |
14035 | if test 0"$ld_date" -lt 20050308; then | |
14036 | if test -n "$ld_date"; then | |
14037 | # If there was date string, but was earlier than 2005-03-08, fail | |
14038 | comdat_group=no | |
14039 | elif test "$ld_vers_major" -lt 2; then | |
14040 | comdat_group=no | |
14041 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then | |
14042 | comdat_group=no | |
14043 | fi | |
14044 | fi | |
14045 | if test $comdat_group = no; then | |
14046 | gcc_cv_as_comdat_group=no | |
14047 | gcc_cv_as_comdat_group_percent=no | |
14048 | fi | |
14049 | fi | |
c18a5b6c MM |
14050 | |
14051 | cat >>confdefs.h <<_ACEOF | |
11176d2a | 14052 | #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 |
14053 | _ACEOF |
14054 | ||
14055 | ||
8ada417f | 14056 | # Thread-local storage - the check is heavily parametrized. |
f996902d RH |
14057 | conftest_s= |
14058 | tls_first_major= | |
14059 | tls_first_minor= | |
9739c90c | 14060 | tls_as_opt= |
f996902d | 14061 | case "$target" in |
6f9b006d RH |
14062 | alpha*-*-*) |
14063 | conftest_s=' | |
14064 | .section ".tdata","awT",@progbits | |
14065 | foo: .long 25 | |
14066 | .text | |
14067 | ldq $27,__tls_get_addr($29) !literal!1 | |
14068 | lda $16,foo($29) !tlsgd!1 | |
14069 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
14070 | ldq $27,__tls_get_addr($29) !literal!2 | |
14071 | lda $16,foo($29) !tlsldm!2 | |
14072 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
14073 | ldq $1,foo($29) !gotdtprel | |
14074 | ldah $2,foo($29) !dtprelhi | |
14075 | lda $3,foo($2) !dtprello | |
14076 | lda $4,foo($29) !dtprel | |
14077 | ldq $1,foo($29) !gottprel | |
14078 | ldah $2,foo($29) !tprelhi | |
14079 | lda $3,foo($2) !tprello | |
14080 | lda $4,foo($29) !tprel' | |
14081 | tls_first_major=2 | |
14082 | tls_first_minor=13 | |
2f3321ca | 14083 | tls_as_opt=--fatal-warnings |
6f9b006d | 14084 | ;; |
e4dd71de AH |
14085 | frv*-*-*) |
14086 | conftest_s=' | |
14087 | .section ".tdata","awT",@progbits | |
14088 | x: .long 25 | |
14089 | .text | |
14090 | call #gettlsoff(x)' | |
14091 | tls_first_major=2 | |
14092 | tls_first_minor=14 | |
14093 | ;; | |
51076f96 RC |
14094 | hppa*-*-linux*) |
14095 | conftest_s=' | |
14096 | t1: .reg %r20 | |
14097 | t2: .reg %r21 | |
14098 | gp: .reg %r19 | |
14099 | .section ".tdata","awT",@progbits | |
14100 | foo: .long 25 | |
14101 | .text | |
14102 | .align 4 | |
14103 | addil LT%foo-$tls_gdidx$,gp | |
14104 | ldo RT%foo-$tls_gdidx$(%r1),%arg0 | |
14105 | b __tls_get_addr | |
14106 | nop | |
14107 | addil LT%foo-$tls_ldidx$,gp | |
14108 | b __tls_get_addr | |
14109 | ldo RT%foo-$tls_ldidx$(%r1),%arg0 | |
14110 | addil LR%foo-$tls_dtpoff$,%ret0 | |
14111 | ldo RR%foo-$tls_dtpoff$(%r1),%t1 | |
14112 | mfctl %cr27,%t1 | |
14113 | addil LT%foo-$tls_ieoff$,gp | |
14114 | ldw RT%foo-$tls_ieoff$(%r1),%t2 | |
14115 | add %t1,%t2,%t3 | |
14116 | mfctl %cr27,%t1 | |
14117 | addil LR%foo-$tls_leoff$,%t1 | |
14118 | ldo RR%foo-$tls_leoff$(%r1),%t2' | |
14119 | tls_first_major=2 | |
14120 | tls_first_minor=15 | |
14121 | tls_as_opt=--fatal-warnings | |
14122 | ;; | |
f996902d RH |
14123 | i[34567]86-*-*) |
14124 | conftest_s=' | |
14125 | .section ".tdata","awT",@progbits | |
14126 | foo: .long 25 | |
14127 | .text | |
14128 | movl %gs:0, %eax | |
14129 | leal foo@TLSGD(,%ebx,1), %eax | |
14130 | leal foo@TLSLDM(%ebx), %eax | |
14131 | leal foo@DTPOFF(%eax), %edx | |
14132 | movl foo@GOTTPOFF(%ebx), %eax | |
14133 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
14134 | addl foo@GOTNTPOFF(%ebx), %eax |
14135 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
14136 | movl $foo@TPOFF, %eax |
14137 | subl $foo@TPOFF, %eax | |
14138 | leal foo@NTPOFF(%ecx), %eax' | |
14139 | tls_first_major=2 | |
75d38379 | 14140 | tls_first_minor=14 |
2f3321ca | 14141 | tls_as_opt=--fatal-warnings |
75d38379 JJ |
14142 | ;; |
14143 | x86_64-*-*) | |
14144 | conftest_s=' | |
14145 | .section ".tdata","awT",@progbits | |
14146 | foo: .long 25 | |
14147 | .text | |
14148 | movq %fs:0, %rax | |
14149 | leaq foo@TLSGD(%rip), %rdi | |
14150 | leaq foo@TLSLD(%rip), %rdi | |
14151 | leaq foo@DTPOFF(%rax), %rdx | |
14152 | movq foo@GOTTPOFF(%rip), %rax | |
14153 | movq $foo@TPOFF, %rax' | |
14154 | tls_first_major=2 | |
14155 | tls_first_minor=14 | |
2f3321ca | 14156 | tls_as_opt=--fatal-warnings |
f996902d | 14157 | ;; |
7b6e506e RH |
14158 | ia64-*-*) |
14159 | conftest_s=' | |
14160 | .section ".tdata","awT",@progbits | |
14161 | foo: data8 25 | |
14162 | .text | |
14163 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
14164 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
14165 | addl r18 = @ltoff(@tprel(foo#)), gp | |
14166 | addl r19 = @dtprel(foo#), gp | |
14167 | adds r21 = @dtprel(foo#), r13 | |
14168 | movl r23 = @dtprel(foo#) | |
14169 | addl r20 = @tprel(foo#), gp | |
14170 | adds r22 = @tprel(foo#), r13 | |
14171 | movl r24 = @tprel(foo#)' | |
14172 | tls_first_major=2 | |
14173 | tls_first_minor=13 | |
2f3321ca | 14174 | tls_as_opt=--fatal-warnings |
7b6e506e | 14175 | ;; |
69229b81 DJ |
14176 | mips*-*-*) |
14177 | conftest_s=' | |
14178 | .section .tdata,"awT",@progbits | |
14179 | x: | |
14180 | .word 2 | |
14181 | .text | |
14182 | addiu $4, $28, %tlsgd(x) | |
14183 | addiu $4, $28, %tlsldm(x) | |
14184 | lui $4, %dtprel_hi(x) | |
14185 | addiu $4, $4, %dtprel_lo(x) | |
14186 | lw $4, %gottprel(x)($28) | |
14187 | lui $4, %tprel_hi(x) | |
14188 | addiu $4, $4, %tprel_lo(x)' | |
14189 | tls_first_major=2 | |
14190 | tls_first_minor=16 | |
14191 | tls_as_opt='-32 --fatal-warnings' | |
14192 | ;; | |
c4501e62 JJ |
14193 | powerpc-*-*) |
14194 | conftest_s=' | |
14195 | .section ".tdata","awT",@progbits | |
14196 | .align 2 | |
14197 | ld0: .space 4 | |
14198 | ld1: .space 4 | |
14199 | x1: .space 4 | |
14200 | x2: .space 4 | |
14201 | x3: .space 4 | |
14202 | .text | |
14203 | addi 3,31,ld0@got@tlsgd | |
14204 | bl __tls_get_addr | |
14205 | addi 3,31,x1@got@tlsld | |
14206 | bl __tls_get_addr | |
14207 | addi 9,3,x1@dtprel | |
14208 | addis 9,3,x2@dtprel@ha | |
14209 | addi 9,9,x2@dtprel@l | |
14210 | lwz 9,x3@got@tprel(31) | |
14211 | add 9,9,x@tls | |
14212 | addi 9,2,x1@tprel | |
14213 | addis 9,2,x2@tprel@ha | |
14214 | addi 9,9,x2@tprel@l' | |
14215 | tls_first_major=2 | |
14216 | tls_first_minor=14 | |
2f3321ca | 14217 | tls_as_opt="-a32 --fatal-warnings" |
c4501e62 JJ |
14218 | ;; |
14219 | powerpc64-*-*) | |
14220 | conftest_s=' | |
14221 | .section ".tdata","awT",@progbits | |
14222 | .align 3 | |
14223 | ld0: .space 8 | |
14224 | ld1: .space 8 | |
14225 | x1: .space 8 | |
14226 | x2: .space 8 | |
14227 | x3: .space 8 | |
14228 | .text | |
14229 | addi 3,2,ld0@got@tlsgd | |
14230 | bl .__tls_get_addr | |
14231 | nop | |
14232 | addi 3,2,ld1@toc | |
14233 | bl .__tls_get_addr | |
14234 | nop | |
14235 | addi 3,2,x1@got@tlsld | |
14236 | bl .__tls_get_addr | |
14237 | nop | |
14238 | addi 9,3,x1@dtprel | |
14239 | bl .__tls_get_addr | |
14240 | nop | |
14241 | addis 9,3,x2@dtprel@ha | |
14242 | addi 9,9,x2@dtprel@l | |
14243 | bl .__tls_get_addr | |
14244 | nop | |
14245 | ld 9,x3@got@dtprel(2) | |
14246 | add 9,9,3 | |
14247 | bl .__tls_get_addr | |
14248 | nop' | |
14249 | tls_first_major=2 | |
14250 | tls_first_minor=14 | |
2f3321ca | 14251 | tls_as_opt="-a64 --fatal-warnings" |
c4501e62 | 14252 | ;; |
fd3cd001 UW |
14253 | s390-*-*) |
14254 | conftest_s=' | |
14255 | .section ".tdata","awT",@progbits | |
14256 | foo: .long 25 | |
14257 | .text | |
14258 | .long foo@TLSGD | |
14259 | .long foo@TLSLDM | |
14260 | .long foo@DTPOFF | |
14261 | .long foo@NTPOFF | |
14262 | .long foo@GOTNTPOFF | |
14263 | .long foo@INDNTPOFF | |
14264 | l %r1,foo@GOTNTPOFF(%r12) | |
14265 | l %r1,0(%r1):tls_load:foo | |
14266 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
14267 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
14268 | tls_first_major=2 | |
14269 | tls_first_minor=14 | |
2f3321ca | 14270 | tls_as_opt="-m31 --fatal-warnings" |
fd3cd001 UW |
14271 | ;; |
14272 | s390x-*-*) | |
14273 | conftest_s=' | |
14274 | .section ".tdata","awT",@progbits | |
14275 | foo: .long 25 | |
14276 | .text | |
14277 | .quad foo@TLSGD | |
14278 | .quad foo@TLSLDM | |
14279 | .quad foo@DTPOFF | |
14280 | .quad foo@NTPOFF | |
14281 | .quad foo@GOTNTPOFF | |
14282 | lg %r1,foo@GOTNTPOFF(%r12) | |
14283 | larl %r1,foo@INDNTPOFF | |
14284 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
14285 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
14286 | tls_first_major=2 | |
14287 | tls_first_minor=14 | |
2f3321ca | 14288 | tls_as_opt="-m64 -Aesame --fatal-warnings" |
fd3cd001 | 14289 | ;; |
9ff13962 KK |
14290 | sh-*-* | sh[34]-*-*) |
14291 | conftest_s=' | |
14292 | .section ".tdata","awT",@progbits | |
14293 | foo: .long 25 | |
14294 | .text | |
14295 | .long foo@TLSGD | |
14296 | .long foo@TLSLDM | |
14297 | .long foo@DTPOFF | |
14298 | .long foo@GOTTPOFF | |
14299 | .long foo@TPOFF' | |
14300 | tls_first_major=2 | |
14301 | tls_first_minor=13 | |
2f3321ca | 14302 | tls_as_opt=--fatal-warnings |
9ff13962 | 14303 | ;; |
5751a10b | 14304 | sparc*-*-*) |
2f3321ca EB |
14305 | case "$target" in |
14306 | sparc*-sun-solaris2.*) | |
14307 | on_solaris=yes | |
14308 | ;; | |
14309 | *) | |
14310 | on_solaris=no | |
14311 | ;; | |
14312 | esac | |
14313 | if test x$on_solaris = xyes && test x$gas_flag = xno; then | |
14314 | conftest_s=' | |
14315 | .section ".tdata",#alloc,#write,#tls | |
14316 | foo: .long 25 | |
14317 | .text | |
14318 | sethi %tgd_hi22(foo), %o0 | |
14319 | add %o0, %tgd_lo10(foo), %o1 | |
14320 | add %l7, %o1, %o0, %tgd_add(foo) | |
14321 | call __tls_get_addr, %tgd_call(foo) | |
14322 | sethi %tldm_hi22(foo), %l1 | |
14323 | add %l1, %tldm_lo10(foo), %l2 | |
14324 | add %l7, %l2, %o0, %tldm_add(foo) | |
14325 | call __tls_get_addr, %tldm_call(foo) | |
14326 | sethi %tldo_hix22(foo), %l3 | |
14327 | xor %l3, %tldo_lox10(foo), %l4 | |
14328 | add %o0, %l4, %l5, %tldo_add(foo) | |
14329 | sethi %tie_hi22(foo), %o3 | |
14330 | add %o3, %tie_lo10(foo), %o3 | |
14331 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
14332 | add %g7, %o2, %o4, %tie_add(foo) | |
14333 | sethi %tle_hix22(foo), %l1 | |
14334 | xor %l1, %tle_lox10(foo), %o5 | |
14335 | ld [%g7 + %o5], %o1' | |
14336 | tls_first_major=0 | |
14337 | tls_first_minor=0 | |
14338 | else | |
14339 | conftest_s=' | |
5751a10b JJ |
14340 | .section ".tdata","awT",@progbits |
14341 | foo: .long 25 | |
14342 | .text | |
14343 | sethi %tgd_hi22(foo), %o0 | |
14344 | add %o0, %tgd_lo10(foo), %o1 | |
14345 | add %l7, %o1, %o0, %tgd_add(foo) | |
14346 | call __tls_get_addr, %tgd_call(foo) | |
14347 | sethi %tldm_hi22(foo), %l1 | |
14348 | add %l1, %tldm_lo10(foo), %l2 | |
14349 | add %l7, %l2, %o0, %tldm_add(foo) | |
14350 | call __tls_get_addr, %tldm_call(foo) | |
14351 | sethi %tldo_hix22(foo), %l3 | |
14352 | xor %l3, %tldo_lox10(foo), %l4 | |
14353 | add %o0, %l4, %l5, %tldo_add(foo) | |
14354 | sethi %tie_hi22(foo), %o3 | |
14355 | add %o3, %tie_lo10(foo), %o3 | |
14356 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
14357 | add %g7, %o2, %o4, %tie_add(foo) | |
14358 | sethi %tle_hix22(foo), %l1 | |
14359 | xor %l1, %tle_lox10(foo), %o5 | |
14360 | ld [%g7 + %o5], %o1' | |
14361 | tls_first_major=2 | |
14362 | tls_first_minor=14 | |
2f3321ca EB |
14363 | tls_as_opt="-32 --fatal-warnings" |
14364 | fi | |
5751a10b | 14365 | ;; |
f996902d RH |
14366 | esac |
14367 | if test -z "$tls_first_major"; then | |
8ada417f ZW |
14368 | : # If we don't have a check, assume no support. |
14369 | else | |
ba479fd2 NN |
14370 | echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5 |
14371 | echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6 | |
14372 | if test "${gcc_cv_as_tls+set}" = set; then | |
14373 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14374 | else |
14375 | gcc_cv_as_tls=no | |
14376 | if test $in_tree_gas = yes; then | |
14377 | if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0` | |
14378 | then gcc_cv_as_tls=yes | |
ad9c4d9f | 14379 | fi |
8ada417f | 14380 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14381 | echo "$conftest_s" > conftest.s |
2f3321ca | 14382 | if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5' |
ba479fd2 NN |
14383 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
14384 | (eval $ac_try) 2>&5 | |
14385 | ac_status=$? | |
14386 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14387 | (exit $ac_status); }; } | |
8ada417f ZW |
14388 | then |
14389 | gcc_cv_as_tls=yes | |
14390 | else | |
14391 | echo "configure: failed program was" >&5 | |
14392 | cat conftest.s >&5 | |
14393 | fi | |
14394 | rm -f conftest.o conftest.s | |
f996902d | 14395 | fi |
f996902d | 14396 | fi |
ba479fd2 NN |
14397 | echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5 |
14398 | echo "${ECHO_T}$gcc_cv_as_tls" >&6 | |
63cf211a | 14399 | if test $gcc_cv_as_tls = yes; then |
ba479fd2 NN |
14400 | |
14401 | cat >>confdefs.h <<\_ACEOF | |
f996902d | 14402 | #define HAVE_AS_TLS 1 |
ba479fd2 | 14403 | _ACEOF |
f996902d RH |
14404 | |
14405 | fi | |
8ada417f ZW |
14406 | fi |
14407 | ||
14408 | # Target-specific assembler checks. | |
f996902d | 14409 | |
7e9d8517 L |
14410 | echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5 |
14411 | echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6 | |
14412 | gcc_cv_ld_static_dynamic=no | |
14413 | if test $in_tree_ld = yes ; then | |
14414 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then | |
14415 | gcc_cv_ld_static_dynamic=yes | |
14416 | fi | |
14417 | elif test x$gcc_cv_ld != x; then | |
14418 | # Check if linker supports -Bstatic/-Bdynamic option | |
14419 | if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ | |
14420 | && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then | |
14421 | gcc_cv_ld_static_dynamic=yes | |
14422 | fi | |
14423 | fi | |
14424 | if test x"$gcc_cv_ld_static_dynamic" = xyes; then | |
14425 | ||
14426 | cat >>confdefs.h <<\_ACEOF | |
14427 | #define HAVE_LD_STATIC_DYNAMIC 1 | |
14428 | _ACEOF | |
14429 | ||
14430 | fi | |
14431 | echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5 | |
14432 | echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6 | |
14433 | ||
d594623a L |
14434 | if test x"$demangler_in_ld" = xyes; then |
14435 | echo "$as_me:$LINENO: checking linker --demangle support" >&5 | |
14436 | echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6 | |
14437 | gcc_cv_ld_demangle=no | |
14438 | if test $in_tree_ld = yes; then | |
14439 | 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 \ | |
14440 | gcc_cv_ld_demangle=yes | |
14441 | fi | |
14442 | elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then | |
14443 | # Check if the GNU linker supports --demangle option | |
14444 | if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then | |
14445 | gcc_cv_ld_demangle=yes | |
14446 | fi | |
14447 | fi | |
14448 | if test x"$gcc_cv_ld_demangle" = xyes; then | |
14449 | ||
14450 | cat >>confdefs.h <<\_ACEOF | |
14451 | #define HAVE_LD_DEMANGLE 1 | |
14452 | _ACEOF | |
14453 | ||
14454 | fi | |
14455 | echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5 | |
14456 | echo "${ECHO_T}$gcc_cv_ld_demangle" >&6 | |
14457 | fi | |
14458 | ||
3a37b08e RH |
14459 | case "$target" in |
14460 | # All TARGET_ABI_OSF targets. | |
14461 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
ba479fd2 NN |
14462 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
14463 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
14464 | if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then | |
14465 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a37b08e | 14466 | else |
8ada417f ZW |
14467 | gcc_cv_as_alpha_explicit_relocs=no |
14468 | if test $in_tree_gas = yes; then | |
14469 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14470 | then gcc_cv_as_alpha_explicit_relocs=yes | |
ad9c4d9f | 14471 | fi |
8ada417f | 14472 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14473 | echo ' .set nomacro |
3a37b08e RH |
14474 | .text |
14475 | extbl $3, $2, $3 !lituse_bytoff!1 | |
14476 | ldq $2, a($29) !literal!1 | |
14477 | ldq $4, b($29) !literal!2 | |
14478 | ldq_u $3, 0($2) !lituse_base!1 | |
14479 | ldq $27, f($29) !literal!5 | |
14480 | jsr $26, ($27), f !lituse_jsr!5 | |
14481 | ldah $29, 0($26) !gpdisp!3 | |
14482 | lda $0, c($29) !gprel | |
14483 | ldah $1, d($29) !gprelhigh | |
14484 | lda $1, d($1) !gprellow | |
8ada417f | 14485 | lda $29, 0($29) !gpdisp!3' > conftest.s |
ba479fd2 NN |
14486 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14487 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14488 | (eval $ac_try) 2>&5 | |
14489 | ac_status=$? | |
14490 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14491 | (exit $ac_status); }; } | |
8ada417f ZW |
14492 | then |
14493 | gcc_cv_as_alpha_explicit_relocs=yes | |
14494 | else | |
14495 | echo "configure: failed program was" >&5 | |
14496 | cat conftest.s >&5 | |
14497 | fi | |
14498 | rm -f conftest.o conftest.s | |
14499 | fi | |
cafe096b | 14500 | fi |
ba479fd2 NN |
14501 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5 |
14502 | echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6 | |
63cf211a | 14503 | if test $gcc_cv_as_alpha_explicit_relocs = yes; then |
ba479fd2 NN |
14504 | |
14505 | cat >>confdefs.h <<\_ACEOF | |
3a37b08e | 14506 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
ba479fd2 | 14507 | _ACEOF |
3a37b08e | 14508 | |
d006f5eb RH |
14509 | fi |
14510 | echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5 | |
14511 | echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6 | |
14512 | if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then | |
14513 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14514 | else | |
14515 | gcc_cv_as_alpha_jsrdirect_relocs=no | |
14516 | if test $in_tree_gas = yes; then | |
14517 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90` | |
14518 | then gcc_cv_as_alpha_jsrdirect_relocs=yes | |
14519 | fi | |
14520 | elif test x$gcc_cv_as != x; then | |
14521 | echo ' .set nomacro | |
14522 | .text | |
14523 | ldq $27, a($29) !literal!1 | |
14524 | jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s | |
14525 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14526 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14527 | (eval $ac_try) 2>&5 | |
14528 | ac_status=$? | |
14529 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14530 | (exit $ac_status); }; } | |
14531 | then | |
14532 | gcc_cv_as_alpha_jsrdirect_relocs=yes | |
14533 | else | |
14534 | echo "configure: failed program was" >&5 | |
14535 | cat conftest.s >&5 | |
14536 | fi | |
14537 | rm -f conftest.o conftest.s | |
14538 | fi | |
14539 | fi | |
14540 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5 | |
14541 | echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6 | |
14542 | if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then | |
14543 | ||
14544 | cat >>confdefs.h <<\_ACEOF | |
14545 | #define HAVE_AS_JSRDIRECT_RELOCS 1 | |
14546 | _ACEOF | |
14547 | ||
86da66b5 HPN |
14548 | fi |
14549 | ;; | |
14550 | ||
14551 | cris-*-*) | |
14552 | echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5 | |
14553 | echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6 | |
14554 | if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then | |
14555 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14556 | else | |
14557 | gcc_cv_as_cris_no_mul_bug=no | |
14558 | if test $in_tree_gas = yes; then | |
14559 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
14560 | then gcc_cv_as_cris_no_mul_bug=yes | |
14561 | fi | |
14562 | elif test x$gcc_cv_as != x; then | |
14563 | echo '.text' > conftest.s | |
14564 | if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5' | |
14565 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14566 | (eval $ac_try) 2>&5 | |
14567 | ac_status=$? | |
14568 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14569 | (exit $ac_status); }; } | |
14570 | then | |
14571 | gcc_cv_as_cris_no_mul_bug=yes | |
14572 | else | |
14573 | echo "configure: failed program was" >&5 | |
14574 | cat conftest.s >&5 | |
14575 | fi | |
14576 | rm -f conftest.o conftest.s | |
14577 | fi | |
14578 | fi | |
14579 | echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5 | |
14580 | echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6 | |
14581 | if test $gcc_cv_as_cris_no_mul_bug = yes; then | |
14582 | ||
14583 | cat >>confdefs.h <<\_ACEOF | |
14584 | #define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1 | |
14585 | _ACEOF | |
14586 | ||
8ada417f | 14587 | fi |
3a37b08e | 14588 | ;; |
8ada417f | 14589 | |
1cb36a98 | 14590 | sparc*-*-*) |
ba479fd2 NN |
14591 | echo "$as_me:$LINENO: checking assembler for .register" >&5 |
14592 | echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6 | |
14593 | if test "${gcc_cv_as_sparc_register_op+set}" = set; then | |
14594 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 14595 | else |
8ada417f ZW |
14596 | gcc_cv_as_sparc_register_op=no |
14597 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14598 | echo '.register %g2, #scratch' > conftest.s |
ba479fd2 NN |
14599 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14600 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14601 | (eval $ac_try) 2>&5 | |
14602 | ac_status=$? | |
14603 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14604 | (exit $ac_status); }; } | |
8ada417f ZW |
14605 | then |
14606 | gcc_cv_as_sparc_register_op=yes | |
14607 | else | |
14608 | echo "configure: failed program was" >&5 | |
14609 | cat conftest.s >&5 | |
14610 | fi | |
14611 | rm -f conftest.o conftest.s | |
14612 | fi | |
cafe096b | 14613 | fi |
ba479fd2 NN |
14614 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5 |
14615 | echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6 | |
63cf211a | 14616 | if test $gcc_cv_as_sparc_register_op = yes; then |
ba479fd2 NN |
14617 | |
14618 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 14619 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
ba479fd2 | 14620 | _ACEOF |
1cb36a98 | 14621 | |
8ada417f | 14622 | fi |
1cb36a98 | 14623 | |
ba479fd2 NN |
14624 | echo "$as_me:$LINENO: checking assembler for -relax option" >&5 |
14625 | echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6 | |
14626 | if test "${gcc_cv_as_sparc_relax+set}" = set; then | |
14627 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e95b1e6a | 14628 | else |
8ada417f ZW |
14629 | gcc_cv_as_sparc_relax=no |
14630 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14631 | echo '.text' > conftest.s |
ba479fd2 NN |
14632 | if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5' |
14633 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14634 | (eval $ac_try) 2>&5 | |
14635 | ac_status=$? | |
14636 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14637 | (exit $ac_status); }; } | |
8ada417f ZW |
14638 | then |
14639 | gcc_cv_as_sparc_relax=yes | |
14640 | else | |
14641 | echo "configure: failed program was" >&5 | |
14642 | cat conftest.s >&5 | |
14643 | fi | |
14644 | rm -f conftest.o conftest.s | |
14645 | fi | |
cafe096b | 14646 | fi |
ba479fd2 NN |
14647 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5 |
14648 | echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6 | |
63cf211a | 14649 | if test $gcc_cv_as_sparc_relax = yes; then |
ba479fd2 NN |
14650 | |
14651 | cat >>confdefs.h <<\_ACEOF | |
e95b1e6a | 14652 | #define HAVE_AS_RELAX_OPTION 1 |
ba479fd2 | 14653 | _ACEOF |
e95b1e6a | 14654 | |
8ada417f | 14655 | fi |
e95b1e6a | 14656 | |
ba479fd2 NN |
14657 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5 |
14658 | echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6 | |
14659 | if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then | |
14660 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
17e9e88c | 14661 | else |
8ada417f ZW |
14662 | gcc_cv_as_sparc_ua_pcrel=no |
14663 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14664 | echo '.text |
8ada417f ZW |
14665 | foo: |
14666 | nop | |
14667 | .data | |
14668 | .align 4 | |
14669 | .byte 0 | |
14670 | .uaword %r_disp32(foo)' > conftest.s | |
ba479fd2 NN |
14671 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
14672 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14673 | (eval $ac_try) 2>&5 | |
14674 | ac_status=$? | |
14675 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14676 | (exit $ac_status); }; } | |
8ada417f ZW |
14677 | then |
14678 | if test x$gcc_cv_ld != x \ | |
14679 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
14680 | gcc_cv_as_sparc_ua_pcrel=yes | |
14681 | fi | |
14682 | rm -f conftest | |
14683 | else | |
14684 | echo "configure: failed program was" >&5 | |
14685 | cat conftest.s >&5 | |
14686 | fi | |
14687 | rm -f conftest.o conftest.s | |
14688 | fi | |
cafe096b | 14689 | fi |
ba479fd2 NN |
14690 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5 |
14691 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6 | |
63cf211a | 14692 | if test $gcc_cv_as_sparc_ua_pcrel = yes; then |
ba479fd2 NN |
14693 | |
14694 | cat >>confdefs.h <<\_ACEOF | |
17e9e88c | 14695 | #define HAVE_AS_SPARC_UA_PCREL 1 |
ba479fd2 | 14696 | _ACEOF |
17e9e88c | 14697 | |
17e9e88c | 14698 | |
ba479fd2 NN |
14699 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 |
14700 | echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6 | |
14701 | if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then | |
14702 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cf7b8b0d | 14703 | else |
8ada417f ZW |
14704 | gcc_cv_as_sparc_ua_pcrel_hidden=no |
14705 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14706 | echo '.data |
8ada417f ZW |
14707 | .align 4 |
14708 | .byte 0x31 | |
14709 | .uaword %r_disp32(foo) | |
14710 | .byte 0x32, 0x33, 0x34 | |
14711 | .global foo | |
14712 | .hidden foo | |
14713 | foo: | |
14714 | .skip 4' > conftest.s | |
ba479fd2 NN |
14715 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
14716 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14717 | (eval $ac_try) 2>&5 | |
14718 | ac_status=$? | |
14719 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14720 | (exit $ac_status); }; } | |
8ada417f ZW |
14721 | then |
14722 | if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \ | |
14723 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
14724 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
14725 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
14726 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
14727 | | grep 'DISP32' > /dev/null 2>&1; then | |
14728 | : | |
14729 | else | |
14730 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
cf7b8b0d | 14731 | fi |
8ada417f ZW |
14732 | fi |
14733 | rm -f conftest | |
14734 | else | |
14735 | echo "configure: failed program was" >&5 | |
14736 | cat conftest.s >&5 | |
14737 | fi | |
14738 | rm -f conftest.o conftest.s | |
14739 | fi | |
cafe096b | 14740 | fi |
ba479fd2 NN |
14741 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5 |
14742 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6 | |
63cf211a | 14743 | if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then |
ba479fd2 NN |
14744 | |
14745 | cat >>confdefs.h <<\_ACEOF | |
cf7b8b0d | 14746 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
ba479fd2 | 14747 | _ACEOF |
cf7b8b0d | 14748 | |
8ada417f | 14749 | fi |
ba479fd2 | 14750 | |
8ada417f | 14751 | fi # unaligned pcrel relocs |
cf7b8b0d | 14752 | |
ba479fd2 NN |
14753 | echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5 |
14754 | echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6 | |
14755 | if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then | |
14756 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 14757 | else |
8ada417f ZW |
14758 | gcc_cv_as_sparc_offsetable_lo10=no |
14759 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14760 | echo '.text |
8ada417f ZW |
14761 | or %g1, %lo(ab) + 12, %g1 |
14762 | or %g1, %lo(ab + 12), %g1' > conftest.s | |
ba479fd2 NN |
14763 | if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5' |
14764 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14765 | (eval $ac_try) 2>&5 | |
14766 | ac_status=$? | |
14767 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14768 | (exit $ac_status); }; } | |
8ada417f ZW |
14769 | then |
14770 | if test x$gcc_cv_objdump != x \ | |
ecb0ccbc | 14771 | && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ |
8ada417f | 14772 | | grep ' 82106000 82106000' > /dev/null 2>&1; then |
1b5c0152 | 14773 | gcc_cv_as_sparc_offsetable_lo10=yes |
8ada417f ZW |
14774 | fi |
14775 | else | |
14776 | echo "configure: failed program was" >&5 | |
14777 | cat conftest.s >&5 | |
14778 | fi | |
14779 | rm -f conftest.o conftest.s | |
14780 | fi | |
cafe096b | 14781 | fi |
ba479fd2 NN |
14782 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5 |
14783 | echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6 | |
63cf211a | 14784 | if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then |
ba479fd2 NN |
14785 | |
14786 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 14787 | #define HAVE_AS_OFFSETABLE_LO10 1 |
ba479fd2 | 14788 | _ACEOF |
1cb36a98 | 14789 | |
8ada417f | 14790 | fi |
1cb36a98 RH |
14791 | ;; |
14792 | ||
c307e6dd | 14793 | i[34567]86-*-* | x86_64-*-*) |
d38bc601 BF |
14794 | case $target_os in |
14795 | cygwin* | pe | mingw32*) | |
14796 | # Used for DWARF 2 in PE | |
14797 | echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5 | |
14798 | echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6 | |
14799 | if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then | |
14800 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14801 | else | |
14802 | gcc_cv_as_ix86_pe_secrel32=no | |
14803 | if test $in_tree_gas = yes; then | |
14804 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
14805 | then gcc_cv_as_ix86_pe_secrel32=yes | |
14806 | fi | |
14807 | elif test x$gcc_cv_as != x; then | |
14808 | echo '.text | |
14809 | foo: nop | |
14810 | .data | |
14811 | .secrel32 foo' > conftest.s | |
14812 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14813 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14814 | (eval $ac_try) 2>&5 | |
14815 | ac_status=$? | |
14816 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14817 | (exit $ac_status); }; } | |
14818 | then | |
14819 | if test x$gcc_cv_ld != x \ | |
14820 | && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then | |
14821 | gcc_cv_as_ix86_pe_secrel32=yes | |
14822 | fi | |
14823 | rm -f conftest | |
14824 | else | |
14825 | echo "configure: failed program was" >&5 | |
14826 | cat conftest.s >&5 | |
14827 | fi | |
14828 | rm -f conftest.o conftest.s | |
14829 | fi | |
14830 | fi | |
14831 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5 | |
14832 | echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6 | |
14833 | if test $gcc_cv_as_ix86_pe_secrel32 = yes; then | |
14834 | ||
14835 | cat >>confdefs.h <<\_ACEOF | |
14836 | #define HAVE_GAS_PE_SECREL32_RELOC 1 | |
14837 | _ACEOF | |
14838 | ||
14839 | fi | |
14840 | ;; | |
14841 | esac | |
14842 | ||
ba479fd2 NN |
14843 | echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5 |
14844 | echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6 | |
14845 | if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then | |
14846 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14847 | else |
14848 | gcc_cv_as_ix86_filds_fists=no | |
14849 | if test $in_tree_gas = yes; then | |
14850 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
14851 | then gcc_cv_as_ix86_filds_fists=yes | |
ad9c4d9f | 14852 | fi |
8ada417f | 14853 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14854 | echo 'filds mem; fists mem' > conftest.s |
ba479fd2 NN |
14855 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14856 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14857 | (eval $ac_try) 2>&5 | |
14858 | ac_status=$? | |
14859 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14860 | (exit $ac_status); }; } | |
8ada417f ZW |
14861 | then |
14862 | gcc_cv_as_ix86_filds_fists=yes | |
14863 | else | |
14864 | echo "configure: failed program was" >&5 | |
14865 | cat conftest.s >&5 | |
981d4858 | 14866 | fi |
8ada417f ZW |
14867 | rm -f conftest.o conftest.s |
14868 | fi | |
14869 | fi | |
ba479fd2 NN |
14870 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5 |
14871 | echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6 | |
63cf211a | 14872 | if test $gcc_cv_as_ix86_filds_fists = yes; then |
ba479fd2 NN |
14873 | |
14874 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 14875 | #define HAVE_GAS_FILDS_FISTS 1 |
ba479fd2 | 14876 | _ACEOF |
ad9c4d9f | 14877 | |
f6f5dff2 RO |
14878 | fi |
14879 | ||
ba479fd2 NN |
14880 | echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5 |
14881 | echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6 | |
14882 | if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then | |
14883 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f6f5dff2 RO |
14884 | else |
14885 | gcc_cv_as_ix86_cmov_sun_syntax=no | |
14886 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14887 | echo 'cmovl.l %edx, %eax' > conftest.s |
ba479fd2 NN |
14888 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14889 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14890 | (eval $ac_try) 2>&5 | |
14891 | ac_status=$? | |
14892 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14893 | (exit $ac_status); }; } | |
f6f5dff2 RO |
14894 | then |
14895 | gcc_cv_as_ix86_cmov_sun_syntax=yes | |
14896 | else | |
14897 | echo "configure: failed program was" >&5 | |
14898 | cat conftest.s >&5 | |
14899 | fi | |
14900 | rm -f conftest.o conftest.s | |
14901 | fi | |
14902 | fi | |
ba479fd2 NN |
14903 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5 |
14904 | echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6 | |
63cf211a | 14905 | if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then |
ba479fd2 NN |
14906 | |
14907 | cat >>confdefs.h <<\_ACEOF | |
f6f5dff2 | 14908 | #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1 |
ba479fd2 | 14909 | _ACEOF |
f6f5dff2 | 14910 | |
ad9c4d9f NN |
14911 | fi |
14912 | ||
6f3ca281 ZW |
14913 | # This one is used unconditionally by i386.[ch]; it is to be defined |
14914 | # to 1 if the feature is present, 0 otherwise. | |
ba479fd2 NN |
14915 | echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5 |
14916 | echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6 | |
14917 | if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then | |
14918 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14919 | else |
14920 | gcc_cv_as_ix86_gotoff_in_data=no | |
14921 | if test $in_tree_gas = yes; then | |
14922 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
14923 | then gcc_cv_as_ix86_gotoff_in_data=yes | |
14924 | fi | |
14925 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14926 | echo ' .text |
f88c65f7 RH |
14927 | .L0: |
14928 | nop | |
14929 | .data | |
8ada417f | 14930 | .long .L0@GOTOFF' > conftest.s |
ba479fd2 NN |
14931 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14932 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14933 | (eval $ac_try) 2>&5 | |
14934 | ac_status=$? | |
14935 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14936 | (exit $ac_status); }; } | |
8ada417f ZW |
14937 | then |
14938 | gcc_cv_as_ix86_gotoff_in_data=yes | |
14939 | else | |
14940 | echo "configure: failed program was" >&5 | |
14941 | cat conftest.s >&5 | |
f88c65f7 | 14942 | fi |
8ada417f ZW |
14943 | rm -f conftest.o conftest.s |
14944 | fi | |
14945 | fi | |
ba479fd2 NN |
14946 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5 |
14947 | echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6 | |
8ada417f | 14948 | |
6f3ca281 | 14949 | |
ba479fd2 | 14950 | cat >>confdefs.h <<_ACEOF |
6f3ca281 | 14951 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 14952 | _ACEOF |
f88c65f7 | 14953 | |
1cb36a98 | 14954 | ;; |
ef1ecf87 RH |
14955 | |
14956 | ia64*-*-*) | |
ba479fd2 NN |
14957 | echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5 |
14958 | echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6 | |
14959 | if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then | |
14960 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ef1ecf87 | 14961 | else |
8ada417f ZW |
14962 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no |
14963 | if test $in_tree_gas = yes; then | |
14964 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
14965 | then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes | |
ad9c4d9f | 14966 | fi |
8ada417f | 14967 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14968 | echo ' .text |
ef1ecf87 RH |
14969 | addl r15 = @ltoffx(x#), gp |
14970 | ;; | |
cfa9ee99 | 14971 | ld8.mov r16 = [r15], x#' > conftest.s |
ba479fd2 NN |
14972 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14973 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14974 | (eval $ac_try) 2>&5 | |
14975 | ac_status=$? | |
14976 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14977 | (exit $ac_status); }; } | |
8ada417f | 14978 | then |
cfa9ee99 | 14979 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes |
8ada417f ZW |
14980 | else |
14981 | echo "configure: failed program was" >&5 | |
14982 | cat conftest.s >&5 | |
2c4a9cff | 14983 | fi |
8ada417f ZW |
14984 | rm -f conftest.o conftest.s |
14985 | fi | |
14986 | fi | |
ba479fd2 NN |
14987 | echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5 |
14988 | echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6 | |
63cf211a | 14989 | if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then |
ba479fd2 NN |
14990 | |
14991 | cat >>confdefs.h <<\_ACEOF | |
cfa9ee99 | 14992 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
ba479fd2 | 14993 | _ACEOF |
8ada417f | 14994 | |
cfa9ee99 | 14995 | fi |
8ada417f | 14996 | |
2c4a9cff | 14997 | ;; |
8ada417f | 14998 | |
2c4a9cff | 14999 | powerpc*-*-*) |
8ada417f | 15000 | case $target in |
432218ba DE |
15001 | *-*-aix*) conftest_s=' .machine "pwr5" |
15002 | .csect .text[PR] | |
6b37db3c | 15003 | mfcr 3,128';; |
8af4d362 PB |
15004 | *-*-darwin*) |
15005 | echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5 | |
15006 | echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6 | |
15007 | if test "${gcc_cv_as_machine_directive+set}" = set; then | |
15008 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15009 | else | |
15010 | gcc_cv_as_machine_directive=no | |
15011 | if test x$gcc_cv_as != x; then | |
15012 | echo ' .machine ppc7400' > conftest.s | |
15013 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15014 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15015 | (eval $ac_try) 2>&5 | |
15016 | ac_status=$? | |
15017 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15018 | (exit $ac_status); }; } | |
15019 | then | |
15020 | gcc_cv_as_machine_directive=yes | |
15021 | else | |
15022 | echo "configure: failed program was" >&5 | |
15023 | cat conftest.s >&5 | |
15024 | fi | |
15025 | rm -f conftest.o conftest.s | |
15026 | fi | |
15027 | fi | |
15028 | echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5 | |
15029 | echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6 | |
15030 | ||
15031 | if test x$gcc_cv_as_machine_directive != xyes; then | |
15032 | echo "*** This target requires an assembler supporting \".machine\"" >&2 | |
15033 | echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2 | |
15034 | test x$build = x$target && exit 1 | |
15035 | fi | |
15036 | conftest_s=' .text | |
6b37db3c | 15037 | mfcr r3,128';; |
4c67db14 | 15038 | *) conftest_s=' .machine power4 |
d2ab3e37 | 15039 | .text |
6b37db3c | 15040 | mfcr 3,128';; |
8ada417f | 15041 | esac |
8ada417f | 15042 | |
ba479fd2 NN |
15043 | echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5 |
15044 | echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6 | |
15045 | if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then | |
15046 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2c4a9cff | 15047 | else |
8ada417f ZW |
15048 | gcc_cv_as_powerpc_mfcrf=no |
15049 | if test $in_tree_gas = yes; then | |
15050 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15051 | then gcc_cv_as_powerpc_mfcrf=yes | |
2c4a9cff | 15052 | fi |
8ada417f | 15053 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15054 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
15055 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15056 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15057 | (eval $ac_try) 2>&5 | |
15058 | ac_status=$? | |
15059 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15060 | (exit $ac_status); }; } | |
8ada417f ZW |
15061 | then |
15062 | gcc_cv_as_powerpc_mfcrf=yes | |
15063 | else | |
15064 | echo "configure: failed program was" >&5 | |
15065 | cat conftest.s >&5 | |
15066 | fi | |
15067 | rm -f conftest.o conftest.s | |
15068 | fi | |
2c4a9cff | 15069 | fi |
ba479fd2 NN |
15070 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5 |
15071 | echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6 | |
63cf211a | 15072 | if test $gcc_cv_as_powerpc_mfcrf = yes; then |
ba479fd2 NN |
15073 | |
15074 | cat >>confdefs.h <<\_ACEOF | |
2c4a9cff | 15075 | #define HAVE_AS_MFCRF 1 |
ba479fd2 | 15076 | _ACEOF |
ef1ecf87 | 15077 | |
8ada417f | 15078 | fi |
432218ba DE |
15079 | |
15080 | case $target in | |
15081 | *-*-aix*) conftest_s=' .machine "pwr5" | |
15082 | .csect .text[PR] | |
15083 | popcntb 3,3';; | |
15084 | *) conftest_s=' .machine power5 | |
15085 | .text | |
15086 | popcntb 3,3';; | |
15087 | esac | |
15088 | ||
15089 | echo "$as_me:$LINENO: checking assembler for popcntb support" >&5 | |
15090 | echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6 | |
15091 | if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then | |
15092 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15093 | else | |
15094 | gcc_cv_as_powerpc_popcntb=no | |
15095 | if test $in_tree_gas = yes; then | |
15096 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15097 | then gcc_cv_as_powerpc_popcntb=yes | |
15098 | fi | |
15099 | elif test x$gcc_cv_as != x; then | |
15100 | echo "$conftest_s" > conftest.s | |
15101 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15102 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15103 | (eval $ac_try) 2>&5 | |
15104 | ac_status=$? | |
15105 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15106 | (exit $ac_status); }; } | |
15107 | then | |
15108 | gcc_cv_as_powerpc_popcntb=yes | |
15109 | else | |
15110 | echo "configure: failed program was" >&5 | |
15111 | cat conftest.s >&5 | |
15112 | fi | |
15113 | rm -f conftest.o conftest.s | |
15114 | fi | |
15115 | fi | |
15116 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5 | |
15117 | echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6 | |
15118 | if test $gcc_cv_as_powerpc_popcntb = yes; then | |
15119 | ||
15120 | cat >>confdefs.h <<\_ACEOF | |
15121 | #define HAVE_AS_POPCNTB 1 | |
15122 | _ACEOF | |
15123 | ||
15124 | fi | |
15125 | ||
7f970b70 AM |
15126 | case $target in |
15127 | *-*-aix*) conftest_s=' .csect .text[PR] | |
15128 | LCF..0: | |
15129 | addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';; | |
15130 | *-*-darwin*) | |
15131 | conftest_s=' .text | |
15132 | LCF0: | |
15133 | addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';; | |
15134 | *) conftest_s=' .text | |
15135 | .LCF0: | |
15136 | addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';; | |
15137 | esac | |
15138 | ||
15139 | echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5 | |
15140 | echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6 | |
15141 | if test "${gcc_cv_as_powerpc_rel16+set}" = set; then | |
15142 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15143 | else | |
15144 | gcc_cv_as_powerpc_rel16=no | |
15145 | if test $in_tree_gas = yes; then | |
15146 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15147 | then gcc_cv_as_powerpc_rel16=yes | |
15148 | fi | |
15149 | elif test x$gcc_cv_as != x; then | |
15150 | echo "$conftest_s" > conftest.s | |
15151 | if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5' | |
15152 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15153 | (eval $ac_try) 2>&5 | |
15154 | ac_status=$? | |
15155 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15156 | (exit $ac_status); }; } | |
15157 | then | |
15158 | gcc_cv_as_powerpc_rel16=yes | |
15159 | else | |
15160 | echo "configure: failed program was" >&5 | |
15161 | cat conftest.s >&5 | |
15162 | fi | |
15163 | rm -f conftest.o conftest.s | |
15164 | fi | |
15165 | fi | |
15166 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5 | |
15167 | echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6 | |
15168 | if test $gcc_cv_as_powerpc_rel16 = yes; then | |
15169 | ||
15170 | cat >>confdefs.h <<\_ACEOF | |
15171 | #define HAVE_AS_REL16 1 | |
15172 | _ACEOF | |
15173 | ||
15174 | fi | |
8ada417f ZW |
15175 | ;; |
15176 | ||
15177 | mips*-*-*) | |
ba479fd2 NN |
15178 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
15179 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
15180 | if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then | |
15181 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15182 | else |
15183 | gcc_cv_as_mips_explicit_relocs=no | |
15184 | if test $in_tree_gas = yes; then | |
15185 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15186 | then gcc_cv_as_mips_explicit_relocs=yes | |
15187 | fi | |
15188 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15189 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
ba479fd2 NN |
15190 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15191 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15192 | (eval $ac_try) 2>&5 | |
15193 | ac_status=$? | |
15194 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15195 | (exit $ac_status); }; } | |
8ada417f ZW |
15196 | then |
15197 | gcc_cv_as_mips_explicit_relocs=yes | |
15198 | else | |
15199 | echo "configure: failed program was" >&5 | |
15200 | cat conftest.s >&5 | |
ef1ecf87 | 15201 | fi |
8ada417f ZW |
15202 | rm -f conftest.o conftest.s |
15203 | fi | |
15204 | fi | |
ba479fd2 NN |
15205 | echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5 |
15206 | echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6 | |
8ada417f ZW |
15207 | if test $gcc_cv_as_mips_explicit_relocs = yes; then |
15208 | if test x$target_cpu_default = x | |
15209 | then target_cpu_default=MASK_EXPLICIT_RELOCS | |
15210 | else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" | |
15211 | fi | |
15212 | fi | |
15213 | ||
82563d35 RS |
15214 | if test x$gas_flag = xyes \ |
15215 | || test x"$host" != x"$build" \ | |
15216 | || test ! -x "$gcc_cv_as" \ | |
15217 | || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then | |
15218 | : | |
15219 | else | |
15220 | echo "*** This configuration requires the GNU assembler" >&2 | |
15221 | exit 1 | |
15222 | fi | |
ef1ecf87 | 15223 | ;; |
1cb36a98 | 15224 | esac |
9d147085 RH |
15225 | # ??? Not all targets support dwarf2 debug_line, even within a version |
15226 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
15227 | # info to the output file. So, as supported targets are added to gas 2.11, | |
15228 | # add some instruction here to (also) show we expect this might work. | |
15229 | # ??? Once 2.11 is released, probably need to add first known working | |
15230 | # version to the per-target configury. | |
15231 | case "$target" in | |
80486e06 | 15232 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
2853bc5a | 15233 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ |
d116bdf8 | 15234 | | xstormy16*-*-* | cris-*-* | xtensa-*-*) |
9d147085 RH |
15235 | insn="nop" |
15236 | ;; | |
57116d8d | 15237 | ia64*-*-* | s390*-*-*) |
9d147085 RH |
15238 | insn="nop 0" |
15239 | ;; | |
2853bc5a HPN |
15240 | mmix-*-*) |
15241 | insn="swym 0" | |
15242 | ;; | |
8ada417f ZW |
15243 | esac |
15244 | if test x"$insn" != x; then | |
15245 | conftest_s="\ | |
15246 | .file 1 \"conftest.s\" | |
15247 | .loc 1 3 0 | |
15248 | $insn" | |
ba479fd2 NN |
15249 | echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5 |
15250 | echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6 | |
15251 | if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then | |
15252 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15253 | else |
15254 | gcc_cv_as_dwarf2_debug_line=no | |
15255 | if test $in_tree_gas = yes; then | |
15256 | if test $in_tree_gas_is_elf = yes \ | |
15257 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15258 | then gcc_cv_as_dwarf2_debug_line=yes | |
15259 | fi | |
15260 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15261 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
15262 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15263 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15264 | (eval $ac_try) 2>&5 | |
15265 | ac_status=$? | |
15266 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15267 | (exit $ac_status); }; } | |
8ada417f | 15268 | then |
080a5bb0 EB |
15269 | if test x$gcc_cv_objdump != x \ |
15270 | && $gcc_cv_objdump -h conftest.o 2> /dev/null \ | |
15271 | | grep debug_line > /dev/null 2>&1; then | |
8ada417f ZW |
15272 | gcc_cv_as_dwarf2_debug_line=yes |
15273 | fi | |
15274 | else | |
15275 | echo "configure: failed program was" >&5 | |
15276 | cat conftest.s >&5 | |
15277 | fi | |
15278 | rm -f conftest.o conftest.s | |
15279 | fi | |
15280 | fi | |
ba479fd2 NN |
15281 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5 |
15282 | echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6 | |
ad9c4d9f | 15283 | |
ad9c4d9f | 15284 | |
8ada417f ZW |
15285 | # The .debug_line file table must be in the exact order that |
15286 | # we specified the files, since these indices are also used | |
15287 | # by DW_AT_decl_file. Approximate this test by testing if | |
15288 | # the assembler bitches if the same index is assigned twice. | |
ba479fd2 NN |
15289 | echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5 |
15290 | echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6 | |
15291 | if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then | |
15292 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15293 | else |
15294 | gcc_cv_as_dwarf2_file_buggy=no | |
15295 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15296 | echo ' .file 1 "foo.s" |
8ada417f | 15297 | .file 1 "bar.s"' > conftest.s |
ba479fd2 NN |
15298 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15299 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15300 | (eval $ac_try) 2>&5 | |
15301 | ac_status=$? | |
15302 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15303 | (exit $ac_status); }; } | |
8ada417f ZW |
15304 | then |
15305 | gcc_cv_as_dwarf2_file_buggy=yes | |
15306 | else | |
15307 | echo "configure: failed program was" >&5 | |
15308 | cat conftest.s >&5 | |
15309 | fi | |
15310 | rm -f conftest.o conftest.s | |
15311 | fi | |
ad9c4d9f | 15312 | fi |
ba479fd2 NN |
15313 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5 |
15314 | echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6 | |
8ada417f ZW |
15315 | |
15316 | ||
15317 | if test $gcc_cv_as_dwarf2_debug_line = yes \ | |
15318 | && test $gcc_cv_as_dwarf2_file_buggy = no; then | |
ba479fd2 NN |
15319 | |
15320 | cat >>confdefs.h <<\_ACEOF | |
9d147085 | 15321 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
ba479fd2 | 15322 | _ACEOF |
9d147085 | 15323 | |
8ada417f | 15324 | fi |
ad9c4d9f | 15325 | |
ba479fd2 NN |
15326 | echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5 |
15327 | echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6 | |
15328 | if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then | |
15329 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15330 | else |
15331 | gcc_cv_as_gdwarf2_flag=no | |
15332 | if test $in_tree_gas = yes; then | |
15333 | if test $in_tree_gas_is_elf = yes \ | |
15334 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15335 | then gcc_cv_as_gdwarf2_flag=yes | |
15336 | fi | |
15337 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15338 | echo "$insn" > conftest.s |
ba479fd2 NN |
15339 | if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5' |
15340 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15341 | (eval $ac_try) 2>&5 | |
15342 | ac_status=$? | |
15343 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15344 | (exit $ac_status); }; } | |
8ada417f ZW |
15345 | then |
15346 | gcc_cv_as_gdwarf2_flag=yes | |
15347 | else | |
15348 | echo "configure: failed program was" >&5 | |
15349 | cat conftest.s >&5 | |
15350 | fi | |
15351 | rm -f conftest.o conftest.s | |
15352 | fi | |
ad9c4d9f | 15353 | fi |
ba479fd2 NN |
15354 | echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5 |
15355 | echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6 | |
63cf211a | 15356 | if test $gcc_cv_as_gdwarf2_flag = yes; then |
ba479fd2 NN |
15357 | |
15358 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 15359 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
ba479fd2 | 15360 | _ACEOF |
5f0e9ea2 GK |
15361 | |
15362 | fi | |
ad9c4d9f | 15363 | |
ba479fd2 NN |
15364 | echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5 |
15365 | echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6 | |
15366 | if test "${gcc_cv_as_gstabs_flag+set}" = set; then | |
15367 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15368 | else |
15369 | gcc_cv_as_gstabs_flag=no | |
15370 | if test $in_tree_gas = yes; then | |
15371 | if test $in_tree_gas_is_elf = yes \ | |
15372 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15373 | then gcc_cv_as_gstabs_flag=yes | |
15374 | fi | |
15375 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15376 | echo "$insn" > conftest.s |
ba479fd2 NN |
15377 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5' |
15378 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15379 | (eval $ac_try) 2>&5 | |
15380 | ac_status=$? | |
15381 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15382 | (exit $ac_status); }; } | |
8ada417f ZW |
15383 | then |
15384 | # The native Solaris 9/Intel assembler doesn't understand --gstabs | |
15385 | # and warns about it, but still exits successfully. So check for | |
15386 | # this. | |
ba479fd2 NN |
15387 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null' |
15388 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15389 | (eval $ac_try) 2>&5 | |
15390 | ac_status=$? | |
15391 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15392 | (exit $ac_status); }; } | |
8ada417f ZW |
15393 | then : |
15394 | else gcc_cv_as_gstabs_flag=yes | |
15395 | fi | |
15396 | else | |
15397 | echo "configure: failed program was" >&5 | |
15398 | cat conftest.s >&5 | |
15399 | fi | |
15400 | rm -f conftest.o conftest.s | |
15401 | fi | |
ad9c4d9f | 15402 | fi |
ba479fd2 NN |
15403 | echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5 |
15404 | echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6 | |
63cf211a | 15405 | if test $gcc_cv_as_gstabs_flag = yes; then |
ba479fd2 NN |
15406 | |
15407 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 15408 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
ba479fd2 | 15409 | _ACEOF |
5f0e9ea2 GK |
15410 | |
15411 | fi | |
8ada417f | 15412 | fi |
5f0e9ea2 | 15413 | |
ba479fd2 NN |
15414 | echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5 |
15415 | echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6 | |
96d0f4dc | 15416 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 15417 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
15418 | 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 \ |
15419 | && test $in_tree_ld_is_elf = yes; then | |
96d0f4dc JJ |
15420 | gcc_cv_ld_ro_rw_mix=read-write |
15421 | fi | |
15422 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
15423 | echo '.section myfoosect, "a"' > conftest1.s |
15424 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 15425 | echo '.byte 1' >> conftest2.s |
90e145da | 15426 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 15427 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
15428 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
15429 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
15430 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 15431 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 15432 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 15433 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 15434 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
15435 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
15436 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
15437 | gcc_cv_ld_ro_rw_mix=read-only | |
15438 | else | |
15439 | gcc_cv_ld_ro_rw_mix=read-write | |
15440 | fi | |
15441 | fi | |
15442 | fi | |
15443 | rm -f conftest.* conftest[123].* | |
15444 | fi | |
15445 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
ba479fd2 NN |
15446 | |
15447 | cat >>confdefs.h <<\_ACEOF | |
96d0f4dc | 15448 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
ba479fd2 | 15449 | _ACEOF |
96d0f4dc JJ |
15450 | |
15451 | fi | |
ba479fd2 NN |
15452 | echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5 |
15453 | echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6 | |
96d0f4dc | 15454 | |
ba479fd2 NN |
15455 | echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5 |
15456 | echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6 | |
275b60d6 | 15457 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 15458 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
15459 | 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 \ |
15460 | && test $in_tree_ld_is_elf = yes; then | |
275b60d6 JJ |
15461 | gcc_cv_ld_eh_frame_hdr=yes |
15462 | fi | |
15463 | elif test x$gcc_cv_ld != x; then | |
15464 | # Check if linker supports --eh-frame-hdr option | |
15465 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
15466 | gcc_cv_ld_eh_frame_hdr=yes | |
15467 | fi | |
15468 | fi | |
232b67d9 | 15469 | |
275b60d6 | 15470 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then |
ba479fd2 NN |
15471 | |
15472 | cat >>confdefs.h <<\_ACEOF | |
275b60d6 | 15473 | #define HAVE_LD_EH_FRAME_HDR 1 |
ba479fd2 | 15474 | _ACEOF |
275b60d6 JJ |
15475 | |
15476 | fi | |
ba479fd2 NN |
15477 | echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5 |
15478 | echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6 | |
275b60d6 | 15479 | |
ba479fd2 NN |
15480 | echo "$as_me:$LINENO: checking linker position independent executable support" >&5 |
15481 | echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6 | |
24a4dd31 JJ |
15482 | gcc_cv_ld_pie=no |
15483 | if test $in_tree_ld = yes ; then | |
5408ac6c HPN |
15484 | 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 \ |
15485 | && test $in_tree_ld_is_elf = yes; then | |
24a4dd31 JJ |
15486 | gcc_cv_ld_pie=yes |
15487 | fi | |
15488 | elif test x$gcc_cv_ld != x; then | |
15489 | # Check if linker supports -pie option | |
15490 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
15491 | gcc_cv_ld_pie=yes | |
15492 | fi | |
15493 | fi | |
15494 | if test x"$gcc_cv_ld_pie" = xyes; then | |
ba479fd2 NN |
15495 | |
15496 | cat >>confdefs.h <<\_ACEOF | |
24a4dd31 | 15497 | #define HAVE_LD_PIE 1 |
ba479fd2 | 15498 | _ACEOF |
24a4dd31 JJ |
15499 | |
15500 | fi | |
ba479fd2 NN |
15501 | echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5 |
15502 | echo "${ECHO_T}$gcc_cv_ld_pie" >&6 | |
24a4dd31 | 15503 | |
8bb915b6 NN |
15504 | # -------- |
15505 | # UNSORTED | |
15506 | # -------- | |
15507 | ||
765f1bf9 AM |
15508 | echo "$as_me:$LINENO: checking linker --as-needed support" >&5 |
15509 | echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6 | |
82e923f6 RS |
15510 | if test "${gcc_cv_ld_as_needed+set}" = set; then |
15511 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15512 | else | |
15513 | gcc_cv_ld_as_needed=no | |
765f1bf9 AM |
15514 | if test $in_tree_ld = yes ; then |
15515 | 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 \ | |
15516 | && test $in_tree_ld_is_elf = yes; then | |
15517 | gcc_cv_ld_as_needed=yes | |
15518 | fi | |
15519 | elif test x$gcc_cv_ld != x; then | |
15520 | # Check if linker supports --as-needed and --no-as-needed options | |
15521 | if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then | |
15522 | gcc_cv_ld_as_needed=yes | |
15523 | fi | |
15524 | fi | |
82e923f6 RS |
15525 | |
15526 | fi | |
15527 | echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5 | |
15528 | echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6 | |
765f1bf9 AM |
15529 | if test x"$gcc_cv_ld_as_needed" = xyes; then |
15530 | ||
15531 | cat >>confdefs.h <<\_ACEOF | |
15532 | #define HAVE_LD_AS_NEEDED 1 | |
15533 | _ACEOF | |
15534 | ||
15535 | fi | |
765f1bf9 | 15536 | |
85b776df AM |
15537 | case "$target" in |
15538 | powerpc64*-*-linux*) | |
15539 | echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5 | |
15540 | echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6 | |
15541 | if test "${gcc_cv_ld_no_dot_syms+set}" = set; then | |
15542 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15543 | else | |
15544 | gcc_cv_ld_no_dot_syms=no | |
15545 | if test $in_tree_ld = yes ; then | |
15546 | 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 | |
15547 | gcc_cv_ld_no_dot_syms=yes | |
15548 | fi | |
15549 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then | |
15550 | cat > conftest1.s <<EOF | |
15551 | .text | |
15552 | bl .foo | |
15553 | EOF | |
15554 | cat > conftest2.s <<EOF | |
15555 | .section ".opd","aw" | |
15556 | .align 3 | |
15557 | .globl foo | |
15558 | .type foo,@function | |
15559 | foo: | |
15560 | .quad .LEfoo,.TOC.@tocbase,0 | |
15561 | .text | |
15562 | .LEfoo: | |
15563 | blr | |
15564 | .size foo,.-.LEfoo | |
15565 | EOF | |
15566 | if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \ | |
15567 | && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
15568 | && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then | |
15569 | gcc_cv_ld_no_dot_syms=yes | |
15570 | fi | |
15571 | rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s | |
15572 | fi | |
15573 | ||
15574 | fi | |
15575 | echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5 | |
15576 | echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6 | |
15577 | if test x"$gcc_cv_ld_no_dot_syms" = xyes; then | |
15578 | ||
15579 | cat >>confdefs.h <<\_ACEOF | |
15580 | #define HAVE_LD_NO_DOT_SYMS 1 | |
15581 | _ACEOF | |
15582 | ||
15583 | fi | |
15584 | ;; | |
15585 | esac | |
15586 | ||
380e5ca4 MM |
15587 | echo "$as_me:$LINENO: checking linker --sysroot support" >&5 |
15588 | echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6 | |
15589 | if test "${gcc_cv_ld_sysroot+set}" = set; then | |
15590 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15591 | else | |
15592 | gcc_cv_ld_sysroot=no | |
15593 | if test $in_tree_ld = yes ; then | |
15594 | 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 | 15595 | gcc_cv_ld_sysroot=yes |
380e5ca4 MM |
15596 | fi |
15597 | elif test x$gcc_cv_ld != x; then | |
15598 | if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then | |
15599 | gcc_cv_ld_sysroot=yes | |
15600 | fi | |
15601 | fi | |
15602 | fi | |
15603 | echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5 | |
15604 | echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6 | |
15605 | if test x"$gcc_cv_ld_sysroot" = xyes; then | |
15606 | ||
15607 | cat >>confdefs.h <<\_ACEOF | |
15608 | #define HAVE_LD_SYSROOT 1 | |
15609 | _ACEOF | |
15610 | ||
15611 | fi | |
15612 | ||
9fb28a67 | 15613 | if test x$with_sysroot = x && test x$host = x$target \ |
047d636f | 15614 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then |
ba479fd2 NN |
15615 | |
15616 | cat >>confdefs.h <<_ACEOF | |
793e9558 | 15617 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
ba479fd2 | 15618 | _ACEOF |
793e9558 PB |
15619 | |
15620 | fi | |
15621 | ||
77008252 JJ |
15622 | # Test for stack protector support in target C library. |
15623 | case "$target" in | |
15624 | *-*-linux*) | |
15625 | echo "$as_me:$LINENO: checking __stack_chk_fail in target GNU C library" >&5 | |
15626 | echo $ECHO_N "checking __stack_chk_fail in target GNU C library... $ECHO_C" >&6 | |
15627 | if test "${gcc_cv_libc_provides_ssp+set}" = set; then | |
15628 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15629 | else | |
15630 | gcc_cv_libc_provides_ssp=no | |
15631 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then | |
15632 | if test "x$with_sysroot" = x; then | |
15633 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
15634 | elif test "x$with_sysroot" = xyes; then | |
15635 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
15636 | else | |
15637 | glibc_header_dir="${with_sysroot}/usr/include" | |
15638 | fi | |
15639 | else | |
15640 | glibc_header_dir=/usr/include | |
15641 | fi | |
15642 | # glibc 2.4 and later provides __stack_chk_fail and | |
15643 | # either __stack_chk_guard, or TLS access to stack guard canary. | |
15644 | if test -f $glibc_header_dir/features.h \ | |
15645 | && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \ | |
15646 | $glibc_header_dir/features.h > /dev/null; then | |
15647 | if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \ | |
15648 | $glibc_header_dir/features.h > /dev/null; then | |
15649 | gcc_cv_libc_provides_ssp=yes | |
15650 | elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \ | |
15651 | $glibc_header_dir/features.h > /dev/null \ | |
15652 | && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \ | |
15653 | $glibc_header_dir/features.h > /dev/null; then | |
15654 | gcc_cv_libc_provides_ssp=yes | |
15655 | fi | |
15656 | fi | |
15657 | fi | |
15658 | echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5 | |
15659 | echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6 ;; | |
15660 | *) gcc_cv_libc_provides_ssp=no ;; | |
15661 | esac | |
15662 | if test x$gcc_cv_libc_provides_ssp = xyes; then | |
15663 | ||
15664 | cat >>confdefs.h <<\_ACEOF | |
15665 | #define TARGET_LIBC_PROVIDES_SSP 1 | |
15666 | _ACEOF | |
15667 | ||
15668 | fi | |
15669 | ||
81bf3d9e | 15670 | # Find out what GC implementation we want, or may, use. |
ba479fd2 | 15671 | |
81bf3d9e RH |
15672 | # Check whether --with-gc or --without-gc was given. |
15673 | if test "${with_gc+set}" = set; then | |
15674 | withval="$with_gc" | |
15675 | case "$withval" in | |
08cee789 | 15676 | page) |
81bf3d9e | 15677 | GGC=ggc-$withval |
08cee789 DJ |
15678 | ;; |
15679 | zone) | |
15680 | GGC=ggc-$withval | |
15681 | ||
15682 | cat >>confdefs.h <<\_ACEOF | |
15683 | #define GGC_ZONE 1 | |
15684 | _ACEOF | |
15685 | ||
81bf3d9e RH |
15686 | ;; |
15687 | *) | |
ba479fd2 NN |
15688 | { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5 |
15689 | echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;} | |
15690 | { (exit 1); exit 1; }; } | |
81bf3d9e RH |
15691 | ;; |
15692 | esac | |
15693 | else | |
005537df | 15694 | GGC=ggc-page |
ba479fd2 | 15695 | fi; |
81bf3d9e RH |
15696 | |
15697 | echo "Using $GGC for garbage collection." | |
15698 | ||
3c809ba4 | 15699 | # Use the system's zlib library. |
b8dad04b ZW |
15700 | zlibdir=-L../zlib |
15701 | zlibinc="-I\$(srcdir)/../zlib" | |
ba479fd2 | 15702 | |
3c809ba4 AG |
15703 | # Check whether --with-system-zlib or --without-system-zlib was given. |
15704 | if test "${with_system_zlib+set}" = set; then | |
15705 | withval="$with_system_zlib" | |
15706 | zlibdir= | |
15707 | zlibinc= | |
15708 | ||
ba479fd2 | 15709 | fi; |
3c809ba4 AG |
15710 | |
15711 | ||
15712 | ||
dc6746e7 | 15713 | |
ba479fd2 NN |
15714 | echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
15715 | echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 | |
dc6746e7 PT |
15716 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
15717 | if test "${enable_maintainer_mode+set}" = set; then | |
15718 | enableval="$enable_maintainer_mode" | |
15719 | maintainer_mode=$enableval | |
15720 | else | |
15721 | maintainer_mode=no | |
ba479fd2 | 15722 | fi; |
63cf211a | 15723 | |
ba479fd2 NN |
15724 | echo "$as_me:$LINENO: result: $maintainer_mode" >&5 |
15725 | echo "${ECHO_T}$maintainer_mode" >&6 | |
dc6746e7 PT |
15726 | |
15727 | if test "$maintainer_mode" = "yes"; then | |
15728 | MAINT='' | |
15729 | else | |
15730 | MAINT='#' | |
15731 | fi | |
15732 | ||
8bb915b6 NN |
15733 | # -------------- |
15734 | # Language hooks | |
15735 | # -------------- | |
15736 | ||
861bb6c1 JL |
15737 | # Make empty files to contain the specs and options for each language. |
15738 | # Then add #include lines to for a compiler that has specs and/or options. | |
15739 | ||
d7b42618 | 15740 | lang_opt_files= |
861bb6c1 | 15741 | lang_specs_files= |
3103b7db | 15742 | lang_tree_files= |
861bb6c1 JL |
15743 | for subdir in . $subdirs |
15744 | do | |
d7b42618 NB |
15745 | if test -f $srcdir/$subdir/lang.opt; then |
15746 | lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" | |
15747 | fi | |
75bffa71 | 15748 | if test -f $srcdir/$subdir/lang-specs.h; then |
0d24f4d1 | 15749 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" |
861bb6c1 | 15750 | fi |
3103b7db | 15751 | if test -f $srcdir/$subdir/$subdir-tree.def; then |
0d24f4d1 | 15752 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" |
3103b7db | 15753 | fi |
861bb6c1 JL |
15754 | done |
15755 | ||
15756 | # These (without "all_") are set in each config-lang.in. | |
15757 | # `language' must be a single word so is spelled singularly. | |
15758 | all_languages= | |
15759 | all_boot_languages= | |
15760 | all_compilers= | |
15761 | all_stagestuff= | |
53c7ffe7 | 15762 | all_outputs='Makefile gccbug mklibgcc libada-mk' |
861bb6c1 | 15763 | # List of language makefile fragments. |
2ed26f6b ZW |
15764 | all_lang_makefrags= |
15765 | # List of language subdirectory makefiles. Deprecated. | |
861bb6c1 | 15766 | all_lang_makefiles= |
e2500fed | 15767 | # Files for gengtype |
ef69da62 | 15768 | all_gtfiles="$target_gtfiles" |
8ac9d31f TJ |
15769 | # Files for gengtype with language |
15770 | all_gtfiles_files_langs= | |
15771 | all_gtfiles_files_files= | |
861bb6c1 JL |
15772 | |
15773 | # Add the language fragments. | |
15774 | # Languages are added via two mechanisms. Some information must be | |
15775 | # recorded in makefile variables, these are defined in config-lang.in. | |
15776 | # We accumulate them and plug them into the main Makefile. | |
15777 | # The other mechanism is a set of hooks for each of the main targets | |
15778 | # like `clean', `install', etc. | |
15779 | ||
861bb6c1 | 15780 | language_hooks="Make-hooks" |
861bb6c1 | 15781 | |
c406e779 | 15782 | for s in $subdirs |
861bb6c1 | 15783 | do |
861bb6c1 JL |
15784 | language= |
15785 | boot_language= | |
15786 | compilers= | |
15787 | stagestuff= | |
861bb6c1 | 15788 | outputs= |
e2500fed | 15789 | gtfiles= |
861bb6c1 | 15790 | . ${srcdir}/$s/config-lang.in |
75bffa71 | 15791 | if test "x$language" = x |
861bb6c1 JL |
15792 | then |
15793 | echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 | |
15794 | exit 1 | |
15795 | fi | |
2ed26f6b | 15796 | all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in" |
72aaffbd | 15797 | if test -f ${srcdir}/$s/Makefile.in |
2ed26f6b | 15798 | then all_lang_makefiles="$s/Makefile" |
72aaffbd | 15799 | fi |
861bb6c1 | 15800 | all_languages="$all_languages $language" |
75bffa71 | 15801 | if test "x$boot_language" = xyes |
861bb6c1 JL |
15802 | then |
15803 | all_boot_languages="$all_boot_languages $language" | |
15804 | fi | |
15805 | all_compilers="$all_compilers $compilers" | |
15806 | all_stagestuff="$all_stagestuff $stagestuff" | |
861bb6c1 | 15807 | all_outputs="$all_outputs $outputs" |
e2500fed | 15808 | all_gtfiles="$all_gtfiles $gtfiles" |
c406e779 | 15809 | for f in $gtfiles |
8ac9d31f | 15810 | do |
8ac9d31f TJ |
15811 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " |
15812 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8ac9d31f | 15813 | done |
861bb6c1 JL |
15814 | done |
15815 | ||
8ac9d31f TJ |
15816 | # Pick up gtfiles for c |
15817 | gtfiles= | |
15818 | s="c" | |
15819 | . ${srcdir}/c-config-lang.in | |
15820 | all_gtfiles="$all_gtfiles $gtfiles" | |
c406e779 | 15821 | for f in $gtfiles |
8ac9d31f | 15822 | do |
8ac9d31f TJ |
15823 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " |
15824 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8ac9d31f TJ |
15825 | done |
15826 | ||
cbc59f01 | 15827 | check_languages= |
c406e779 | 15828 | for language in $all_languages |
cbc59f01 | 15829 | do |
cbc59f01 | 15830 | check_languages="$check_languages check-$language" |
cbc59f01 DD |
15831 | done |
15832 | ||
62b81e45 MM |
15833 | # We link each language in with a set of hooks, reached indirectly via |
15834 | # lang.${target}. | |
861bb6c1 JL |
15835 | |
15836 | rm -f Make-hooks | |
15837 | touch Make-hooks | |
65ebbf81 | 15838 | target_list="all.build all.cross start.encap rest.encap tags \ |
a207b594 | 15839 | install-normal install-common install-man \ |
a541f69d | 15840 | uninstall info man srcextra srcman srcinfo \ |
a03ad584 | 15841 | mostlyclean clean distclean maintainer-clean \ |
8f231b5d | 15842 | stage1 stage2 stage3 stage4 stageprofile stagefeedback" |
861bb6c1 JL |
15843 | for t in $target_list |
15844 | do | |
15845 | x= | |
c406e779 | 15846 | for lang in $all_languages |
861bb6c1 | 15847 | do |
ab87f8c8 | 15848 | x="$x $lang.$t" |
861bb6c1 JL |
15849 | done |
15850 | echo "lang.$t: $x" >> Make-hooks | |
15851 | done | |
15852 | ||
8bb915b6 NN |
15853 | # -------- |
15854 | # UNSORTED | |
15855 | # -------- | |
15856 | ||
cc06d68c | 15857 | # Create .gdbinit. |
861bb6c1 | 15858 | |
cc06d68c GP |
15859 | echo "dir ." > .gdbinit |
15860 | echo "dir ${srcdir}" >> .gdbinit | |
15861 | if test x$gdb_needs_out_file_path = xyes | |
15862 | then | |
15863 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
15864 | fi | |
15865 | if test "x$subdirs" != x; then | |
15866 | for s in $subdirs | |
15867 | do | |
15868 | echo "dir ${srcdir}/$s" >> .gdbinit | |
15869 | done | |
861bb6c1 | 15870 | fi |
cc06d68c | 15871 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 15872 | |
8f8d3278 NC |
15873 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
15874 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
15875 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
15876 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
15877 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
15878 | # make and thus we'd get different behavior depending on where we built the | |
15879 | # sources. | |
5949a9fc | 15880 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
caa55b1e | 15881 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)' |
d062c304 | 15882 | else |
8f8d3278 NC |
15883 | # An explanation of the sed strings: |
15884 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
15885 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
15886 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 15887 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
15888 | # |
15889 | # (*) Note this pattern overwrites the first character of the string | |
15890 | # with a forward slash if one is not already present. This is not a | |
15891 | # problem because the exact names of the sub-directories concerned is | |
15892 | # unimportant, just the number of them matters. | |
15893 | # | |
15894 | # The practical upshot of these patterns is like this: | |
15895 | # | |
15896 | # prefix exec_prefix result | |
15897 | # ------ ----------- ------ | |
15898 | # /foo /foo/bar ../ | |
15899 | # /foo/ /foo/bar ../ | |
15900 | # /foo /foo/bar/ ../ | |
15901 | # /foo/ /foo/bar/ ../ | |
15902 | # /foo /foo/bar/ugg ../../ | |
15903 | # | |
4c112cda | 15904 | dollar='$$' |
caa55b1e | 15905 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)" |
d062c304 JL |
15906 | fi |
15907 | ||
15908 | ||
2ce3c6c6 | 15909 | |
2bbea3a6 RH |
15910 | # Find a directory in which to install a shared libgcc. |
15911 | ||
15912 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
15913 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
15914 | enableval="$enable_version_specific_runtime_libs" | |
ba479fd2 NN |
15915 | |
15916 | fi; | |
2bbea3a6 RH |
15917 | |
15918 | ||
5b15f277 RH |
15919 | # Check whether --with-slibdir or --without-slibdir was given. |
15920 | if test "${with_slibdir+set}" = set; then | |
15921 | withval="$with_slibdir" | |
15922 | slibdir="$with_slibdir" | |
15923 | else | |
15924 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 15925 | slibdir='$(libsubdir)' |
5b15f277 | 15926 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
15927 | slibdir='$(build_tooldir)/lib' |
15928 | else | |
5b15f277 | 15929 | slibdir='$(libdir)' |
2bbea3a6 | 15930 | fi |
ba479fd2 | 15931 | fi; |
2bbea3a6 RH |
15932 | |
15933 | ||
1e6347d8 | 15934 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
15935 | |
15936 | ||
861bb6c1 JL |
15937 | # Substitute configuration variables |
15938 | ||
15939 | ||
15940 | ||
15941 | ||
15942 | ||
15943 | ||
15944 | ||
15945 | ||
15946 | ||
15947 | ||
15948 | ||
15949 | ||
15950 | ||
15951 | ||
15952 | ||
15953 | ||
15954 | ||
15955 | ||
15956 | ||
15957 | ||
15958 | ||
15959 | ||
15960 | ||
15961 | ||
15962 | ||
15963 | ||
15964 | ||
15965 | ||
15966 | ||
15967 | ||
15968 | ||
15969 | ||
15970 | ||
15971 | ||
15972 | ||
15973 | ||
15974 | ||
15975 | ||
15976 | ||
15977 | ||
15978 | ||
15979 | ||
15980 | ||
15981 | ||
15982 | ||
15983 | ||
9b16d2c4 | 15984 | |
e9a25f70 | 15985 | |
6e26218f | 15986 | |
c8724862 | 15987 | |
e061d1ce | 15988 | |
d8bb17c8 | 15989 | |
11642c3a ZW |
15990 | |
15991 | ||
15992 | ||
15993 | ||
15994 | ||
15995 | ||
15996 | ||
3d9d2476 | 15997 | |
e2500fed | 15998 | |
51b9ff45 | 15999 | |
861bb6c1 | 16000 | |
6e3f3080 NN |
16001 | # Echo link setup. |
16002 | if test x${build} = x${host} ; then | |
16003 | if test x${host} = x${target} ; then | |
16004 | echo "Links are now set up to build a native compiler for ${target}." 1>&2 | |
16005 | else | |
16006 | echo "Links are now set up to build a cross-compiler" 1>&2 | |
16007 | echo " from ${host} to ${target}." 1>&2 | |
16008 | fi | |
16009 | else | |
16010 | if test x${host} = x${target} ; then | |
16011 | echo "Links are now set up to build (on ${build}) a native compiler" 1>&2 | |
16012 | echo " for ${target}." 1>&2 | |
16013 | else | |
16014 | echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2 | |
16015 | echo " from ${host} to ${target}." 1>&2 | |
16016 | fi | |
16017 | fi | |
16018 | ||
6de9cd9a DN |
16019 | |
16020 | ||
16021 | ||
6e3f3080 NN |
16022 | # Configure the subdirectories |
16023 | # AC_CONFIG_SUBDIRS($subdirs) | |
16024 | ||
16025 | # Create the Makefile | |
16026 | # and configure language subdirectories | |
ba479fd2 | 16027 | ac_config_files="$ac_config_files $all_outputs" |
914c5af7 NN |
16028 | |
16029 | ||
ba479fd2 | 16030 | ac_config_commands="$ac_config_commands default" |
914c5af7 | 16031 | |
ba479fd2 | 16032 | cat >confcache <<\_ACEOF |
6e3f3080 NN |
16033 | # This file is a shell script that caches the results of configure |
16034 | # tests run on this system so they can be shared between configure | |
ba479fd2 NN |
16035 | # scripts and configure runs, see configure's option --config-cache. |
16036 | # It is not useful on other systems. If it contains results you don't | |
16037 | # want to keep, you may remove or edit it. | |
6e3f3080 | 16038 | # |
ba479fd2 NN |
16039 | # config.status only pays attention to the cache file if you give it |
16040 | # the --recheck option to rerun configure. | |
6e3f3080 | 16041 | # |
ba479fd2 NN |
16042 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
16043 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
16044 | # following values. | |
16045 | ||
16046 | _ACEOF | |
16047 | ||
6e3f3080 NN |
16048 | # The following way of writing the cache mishandles newlines in values, |
16049 | # but we know of no workaround that is simple, portable, and efficient. | |
16050 | # So, don't put newlines in cache variables' values. | |
16051 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
16052 | # and sets the high bit in the cache file unless we assign to the vars. | |
ba479fd2 NN |
16053 | { |
16054 | (set) 2>&1 | | |
16055 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
16056 | *ac_space=\ *) | |
16057 | # `set' does not quote correctly, so add quotes (double-quote | |
16058 | # substitution turns \\\\ into \\, and sed turns \\ into \). | |
16059 | sed -n \ | |
86da66b5 HPN |
16060 | "s/'/'\\\\''/g; |
16061 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
ba479fd2 NN |
16062 | ;; |
16063 | *) | |
16064 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
16065 | sed -n \ | |
86da66b5 | 16066 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
ba479fd2 NN |
16067 | ;; |
16068 | esac; | |
16069 | } | | |
16070 | sed ' | |
16071 | t clear | |
16072 | : clear | |
16073 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
16074 | t end | |
16075 | /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
16076 | : end' >>confcache | |
16077 | if diff $cache_file confcache >/dev/null 2>&1; then :; else | |
6e3f3080 | 16078 | if test -w $cache_file; then |
ba479fd2 NN |
16079 | test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" |
16080 | cat confcache >$cache_file | |
6e3f3080 NN |
16081 | else |
16082 | echo "not updating unwritable cache $cache_file" | |
16083 | fi | |
16084 | fi | |
16085 | rm -f confcache | |
16086 | ||
16087 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
16088 | # Let make expand exec_prefix. | |
16089 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16090 | ||
ba479fd2 NN |
16091 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
16092 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
16093 | # trailing colons and then remove the whole line if VPATH becomes empty | |
16094 | # (actually we leave an empty line to preserve line numbers). | |
6e3f3080 | 16095 | if test "x$srcdir" = x.; then |
86da66b5 | 16096 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
ba479fd2 NN |
16097 | s/:*\$(srcdir):*/:/; |
16098 | s/:*\${srcdir}:*/:/; | |
16099 | s/:*@srcdir@:*/:/; | |
86da66b5 | 16100 | s/^\([^=]*=[ ]*\):*/\1/; |
ba479fd2 | 16101 | s/:*$//; |
86da66b5 | 16102 | s/^[^=]*=[ ]*$//; |
ba479fd2 | 16103 | }' |
6e3f3080 NN |
16104 | fi |
16105 | ||
63cf211a | 16106 | DEFS=-DHAVE_CONFIG_H |
6e3f3080 | 16107 | |
ba479fd2 NN |
16108 | ac_libobjs= |
16109 | ac_ltlibobjs= | |
16110 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
16111 | # 1. Remove the extension, and $U if already installed. | |
16112 | ac_i=`echo "$ac_i" | | |
86da66b5 | 16113 | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` |
ba479fd2 NN |
16114 | # 2. Add them. |
16115 | ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" | |
16116 | ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' | |
16117 | done | |
16118 | LIBOBJS=$ac_libobjs | |
63cf211a | 16119 | |
ba479fd2 NN |
16120 | LTLIBOBJS=$ac_ltlibobjs |
16121 | ||
16122 | ||
16123 | ||
16124 | : ${CONFIG_STATUS=./config.status} | |
16125 | ac_clean_files_save=$ac_clean_files | |
16126 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
16127 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | |
16128 | echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
16129 | cat >$CONFIG_STATUS <<_ACEOF | |
16130 | #! $SHELL | |
16131 | # Generated by $as_me. | |
6e3f3080 NN |
16132 | # Run this file to recreate the current configuration. |
16133 | # Compiler output produced by configure, useful for debugging | |
ba479fd2 | 16134 | # configure, is in config.log if it exists. |
6e3f3080 | 16135 | |
ba479fd2 NN |
16136 | debug=false |
16137 | ac_cs_recheck=false | |
16138 | ac_cs_silent=false | |
16139 | SHELL=\${CONFIG_SHELL-$SHELL} | |
16140 | _ACEOF | |
16141 | ||
16142 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16143 | ## --------------------- ## | |
16144 | ## M4sh Initialization. ## | |
16145 | ## --------------------- ## | |
16146 | ||
16147 | # Be Bourne compatible | |
16148 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
16149 | emulate sh | |
16150 | NULLCMD=: | |
16151 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
16152 | # is contrary to our usage. Disable this feature. | |
16153 | alias -g '${1+"$@"}'='"$@"' | |
16154 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
16155 | set -o posix | |
16156 | fi | |
86da66b5 | 16157 | DUALCASE=1; export DUALCASE # for MKS sh |
ba479fd2 NN |
16158 | |
16159 | # Support unset when possible. | |
86da66b5 | 16160 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then |
ba479fd2 NN |
16161 | as_unset=unset |
16162 | else | |
16163 | as_unset=false | |
16164 | fi | |
16165 | ||
16166 | ||
16167 | # Work around bugs in pre-3.0 UWIN ksh. | |
16168 | $as_unset ENV MAIL MAILPATH | |
16169 | PS1='$ ' | |
16170 | PS2='> ' | |
16171 | PS4='+ ' | |
16172 | ||
16173 | # NLS nuisances. | |
16174 | for as_var in \ | |
16175 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
16176 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
16177 | LC_TELEPHONE LC_TIME | |
6e3f3080 | 16178 | do |
86da66b5 | 16179 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
ba479fd2 NN |
16180 | eval $as_var=C; export $as_var |
16181 | else | |
16182 | $as_unset $as_var | |
16183 | fi | |
6e3f3080 NN |
16184 | done |
16185 | ||
ba479fd2 NN |
16186 | # Required to use basename. |
16187 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
16188 | as_expr=expr | |
16189 | else | |
16190 | as_expr=false | |
16191 | fi | |
6e3f3080 | 16192 | |
ba479fd2 NN |
16193 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then |
16194 | as_basename=basename | |
16195 | else | |
16196 | as_basename=false | |
16197 | fi | |
6e3f3080 NN |
16198 | |
16199 | ||
ba479fd2 NN |
16200 | # Name of the executable. |
16201 | as_me=`$as_basename "$0" || | |
16202 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
16203 | X"$0" : 'X\(//\)$' \| \ | |
16204 | X"$0" : 'X\(/\)$' \| \ | |
16205 | . : '\(.\)' 2>/dev/null || | |
16206 | echo X/"$0" | | |
16207 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | |
16208 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
16209 | /^X\/\(\/\).*/{ s//\1/; q; } | |
16210 | s/.*/./; q'` | |
16211 | ||
6e3f3080 | 16212 | |
ba479fd2 NN |
16213 | # PATH needs CR, and LINENO needs CR and PATH. |
16214 | # Avoid depending upon Character Ranges. | |
16215 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
16216 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
16217 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
16218 | as_cr_digits='0123456789' | |
16219 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
16220 | ||
16221 | # The user is always right. | |
16222 | if test "${PATH_SEPARATOR+set}" != set; then | |
16223 | echo "#! /bin/sh" >conf$$.sh | |
16224 | echo "exit 0" >>conf$$.sh | |
16225 | chmod +x conf$$.sh | |
16226 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
16227 | PATH_SEPARATOR=';' | |
6e3f3080 | 16228 | else |
ba479fd2 NN |
16229 | PATH_SEPARATOR=: |
16230 | fi | |
16231 | rm -f conf$$.sh | |
16232 | fi | |
16233 | ||
16234 | ||
16235 | as_lineno_1=$LINENO | |
16236 | as_lineno_2=$LINENO | |
16237 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
16238 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
16239 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
16240 | # Find who we are. Look in the path if we contain no path at all | |
16241 | # relative or not. | |
16242 | case $0 in | |
16243 | *[\\/]* ) as_myself=$0 ;; | |
16244 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16245 | for as_dir in $PATH | |
16246 | do | |
16247 | IFS=$as_save_IFS | |
16248 | test -z "$as_dir" && as_dir=. | |
16249 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
16250 | done | |
16251 | ||
16252 | ;; | |
16253 | esac | |
16254 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
16255 | # in which case we are not to be found in the path. | |
16256 | if test "x$as_myself" = x; then | |
16257 | as_myself=$0 | |
16258 | fi | |
16259 | if test ! -f "$as_myself"; then | |
16260 | { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 | |
16261 | echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} | |
16262 | { (exit 1); exit 1; }; } | |
6e3f3080 | 16263 | fi |
ba479fd2 NN |
16264 | case $CONFIG_SHELL in |
16265 | '') | |
16266 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16267 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
16268 | do | |
16269 | IFS=$as_save_IFS | |
16270 | test -z "$as_dir" && as_dir=. | |
16271 | for as_base in sh bash ksh sh5; do | |
16272 | case $as_dir in | |
16273 | /*) | |
16274 | if ("$as_dir/$as_base" -c ' | |
16275 | as_lineno_1=$LINENO | |
16276 | as_lineno_2=$LINENO | |
16277 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
16278 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
16279 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | |
16280 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
16281 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
16282 | CONFIG_SHELL=$as_dir/$as_base | |
16283 | export CONFIG_SHELL | |
16284 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
16285 | fi;; | |
16286 | esac | |
16287 | done | |
16288 | done | |
16289 | ;; | |
16290 | esac | |
16291 | ||
16292 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
16293 | # uniformly replaced by the line number. The first 'sed' inserts a | |
16294 | # line-number line before each line; the second 'sed' does the real | |
16295 | # work. The second script uses 'N' to pair each line-number line | |
16296 | # with the numbered line, and appends trailing '-' during | |
16297 | # substitution so that $LINENO is not a special case at line end. | |
16298 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | |
16299 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | |
16300 | sed '=' <$as_myself | | |
16301 | sed ' | |
16302 | N | |
16303 | s,$,-, | |
16304 | : loop | |
16305 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
16306 | t loop | |
16307 | s,-$,, | |
16308 | s,^['$as_cr_digits']*\n,, | |
16309 | ' >$as_me.lineno && | |
16310 | chmod +x $as_me.lineno || | |
16311 | { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 | |
16312 | echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} | |
16313 | { (exit 1); exit 1; }; } | |
16314 | ||
16315 | # Don't try to exec as it changes $[0], causing all sort of problems | |
16316 | # (the dirname of $[0] is not the place where we might find the | |
16317 | # original and so on. Autoconf is especially sensible to this). | |
16318 | . ./$as_me.lineno | |
16319 | # Exit status is that of the last command. | |
16320 | exit | |
16321 | } | |
16322 | ||
16323 | ||
16324 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | |
16325 | *c*,-n*) ECHO_N= ECHO_C=' | |
16326 | ' ECHO_T=' ' ;; | |
16327 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
16328 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
16329 | esac | |
16330 | ||
16331 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
16332 | as_expr=expr | |
16333 | else | |
16334 | as_expr=false | |
16335 | fi | |
16336 | ||
16337 | rm -f conf$$ conf$$.exe conf$$.file | |
16338 | echo >conf$$.file | |
16339 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
16340 | # We could just check for DJGPP; but this test a) works b) is more generic | |
16341 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
16342 | if test -f conf$$.exe; then | |
16343 | # Don't use ln at all; we don't have any links | |
16344 | as_ln_s='cp -p' | |
6e3f3080 | 16345 | else |
ba479fd2 | 16346 | as_ln_s='ln -s' |
6e3f3080 | 16347 | fi |
ba479fd2 NN |
16348 | elif ln conf$$.file conf$$ 2>/dev/null; then |
16349 | as_ln_s=ln | |
16350 | else | |
16351 | as_ln_s='cp -p' | |
16352 | fi | |
16353 | rm -f conf$$ conf$$.exe conf$$.file | |
16354 | ||
16355 | if mkdir -p . 2>/dev/null; then | |
16356 | as_mkdir_p=: | |
16357 | else | |
86da66b5 | 16358 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
16359 | as_mkdir_p=false |
16360 | fi | |
16361 | ||
16362 | as_executable_p="test -f" | |
16363 | ||
16364 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 16365 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
16366 | |
16367 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 16368 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
16369 | |
16370 | ||
16371 | # IFS | |
16372 | # We need space, tab and new line, in precisely that order. | |
16373 | as_nl=' | |
16374 | ' | |
16375 | IFS=" $as_nl" | |
16376 | ||
16377 | # CDPATH. | |
16378 | $as_unset CDPATH | |
16379 | ||
16380 | exec 6>&1 | |
16381 | ||
16382 | # Open the log real soon, to keep \$[0] and so on meaningful, and to | |
16383 | # report actual input values of CONFIG_FILES etc. instead of their | |
16384 | # values after options handling. Logging --version etc. is OK. | |
16385 | exec 5>>config.log | |
16386 | { | |
16387 | echo | |
16388 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
16389 | ## Running $as_me. ## | |
16390 | _ASBOX | |
16391 | } >&5 | |
16392 | cat >&5 <<_CSEOF | |
16393 | ||
16394 | This file was extended by $as_me, which was | |
8ab705be | 16395 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
16396 | |
16397 | CONFIG_FILES = $CONFIG_FILES | |
16398 | CONFIG_HEADERS = $CONFIG_HEADERS | |
16399 | CONFIG_LINKS = $CONFIG_LINKS | |
16400 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
16401 | $ $0 $@ | |
16402 | ||
16403 | _CSEOF | |
16404 | echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 | |
16405 | echo >&5 | |
16406 | _ACEOF | |
16407 | ||
16408 | # Files that config.status was made for. | |
16409 | if test -n "$ac_config_files"; then | |
16410 | echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS | |
16411 | fi | |
16412 | ||
16413 | if test -n "$ac_config_headers"; then | |
16414 | echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS | |
16415 | fi | |
16416 | ||
16417 | if test -n "$ac_config_links"; then | |
16418 | echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS | |
16419 | fi | |
16420 | ||
16421 | if test -n "$ac_config_commands"; then | |
16422 | echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS | |
16423 | fi | |
16424 | ||
16425 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16426 | ||
16427 | ac_cs_usage="\ | |
16428 | \`$as_me' instantiates files from templates according to the | |
16429 | current configuration. | |
16430 | ||
16431 | Usage: $0 [OPTIONS] [FILE]... | |
16432 | ||
16433 | -h, --help print this help, then exit | |
16434 | -V, --version print version number, then exit | |
16435 | -q, --quiet do not print progress messages | |
16436 | -d, --debug don't remove temporary files | |
16437 | --recheck update $as_me by reconfiguring in the same conditions | |
16438 | --file=FILE[:TEMPLATE] | |
86da66b5 | 16439 | instantiate the configuration file FILE |
ba479fd2 | 16440 | --header=FILE[:TEMPLATE] |
86da66b5 | 16441 | instantiate the configuration header FILE |
ba479fd2 NN |
16442 | |
16443 | Configuration files: | |
16444 | $config_files | |
16445 | ||
16446 | Configuration headers: | |
16447 | $config_headers | |
16448 | ||
16449 | Configuration commands: | |
16450 | $config_commands | |
16451 | ||
16452 | Report bugs to <bug-autoconf@gnu.org>." | |
16453 | _ACEOF | |
16454 | ||
16455 | cat >>$CONFIG_STATUS <<_ACEOF | |
16456 | ac_cs_version="\\ | |
16457 | config.status | |
8ab705be | 16458 | configured by $0, generated by GNU Autoconf 2.59, |
ba479fd2 NN |
16459 | with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" |
16460 | ||
86da66b5 | 16461 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
16462 | This config.status script is free software; the Free Software Foundation |
16463 | gives unlimited permission to copy, distribute and modify it." | |
16464 | srcdir=$srcdir | |
16465 | _ACEOF | |
16466 | ||
16467 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16468 | # If no file are specified by the user, then we need to provide default | |
16469 | # value. By we need to know if files were specified by the user. | |
16470 | ac_need_defaults=: | |
16471 | while test $# != 0 | |
16472 | do | |
16473 | case $1 in | |
16474 | --*=*) | |
16475 | ac_option=`expr "x$1" : 'x\([^=]*\)='` | |
16476 | ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` | |
16477 | ac_shift=: | |
16478 | ;; | |
16479 | -*) | |
16480 | ac_option=$1 | |
16481 | ac_optarg=$2 | |
16482 | ac_shift=shift | |
16483 | ;; | |
16484 | *) # This is not an option, so the user has probably given explicit | |
16485 | # arguments. | |
16486 | ac_option=$1 | |
16487 | ac_need_defaults=false;; | |
16488 | esac | |
16489 | ||
16490 | case $ac_option in | |
16491 | # Handling of the options. | |
16492 | _ACEOF | |
16493 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16494 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
16495 | ac_cs_recheck=: ;; | |
16496 | --version | --vers* | -V ) | |
16497 | echo "$ac_cs_version"; exit 0 ;; | |
16498 | --he | --h) | |
16499 | # Conflict between --help and --header | |
16500 | { { echo "$as_me:$LINENO: error: ambiguous option: $1 | |
16501 | Try \`$0 --help' for more information." >&5 | |
16502 | echo "$as_me: error: ambiguous option: $1 | |
16503 | Try \`$0 --help' for more information." >&2;} | |
16504 | { (exit 1); exit 1; }; };; | |
16505 | --help | --hel | -h ) | |
16506 | echo "$ac_cs_usage"; exit 0 ;; | |
16507 | --debug | --d* | -d ) | |
16508 | debug=: ;; | |
16509 | --file | --fil | --fi | --f ) | |
16510 | $ac_shift | |
16511 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" | |
16512 | ac_need_defaults=false;; | |
16513 | --header | --heade | --head | --hea ) | |
16514 | $ac_shift | |
16515 | CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | |
16516 | ac_need_defaults=false;; | |
16517 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
16518 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
16519 | ac_cs_silent=: ;; | |
16520 | ||
16521 | # This is an error. | |
16522 | -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 | |
16523 | Try \`$0 --help' for more information." >&5 | |
16524 | echo "$as_me: error: unrecognized option: $1 | |
16525 | Try \`$0 --help' for more information." >&2;} | |
16526 | { (exit 1); exit 1; }; } ;; | |
16527 | ||
16528 | *) ac_config_targets="$ac_config_targets $1" ;; | |
16529 | ||
16530 | esac | |
16531 | shift | |
6e3f3080 | 16532 | done |
ba479fd2 NN |
16533 | |
16534 | ac_configure_extra_args= | |
16535 | ||
16536 | if $ac_cs_silent; then | |
16537 | exec 6>/dev/null | |
16538 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
861bb6c1 JL |
16539 | fi |
16540 | ||
ba479fd2 NN |
16541 | _ACEOF |
16542 | cat >>$CONFIG_STATUS <<_ACEOF | |
16543 | if \$ac_cs_recheck; then | |
16544 | echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 | |
16545 | exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
16546 | fi | |
861bb6c1 | 16547 | |
ba479fd2 NN |
16548 | _ACEOF |
16549 | ||
16550 | cat >>$CONFIG_STATUS <<_ACEOF | |
16551 | # | |
16552 | # INIT-COMMANDS section. | |
16553 | # | |
16554 | ||
16555 | subdirs='$subdirs' | |
ba479fd2 NN |
16556 | |
16557 | _ACEOF | |
16558 | ||
16559 | ||
16560 | ||
16561 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16562 | for ac_config_target in $ac_config_targets | |
16563 | do | |
16564 | case "$ac_config_target" in | |
16565 | # Handling of arguments. | |
16566 | "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; | |
16567 | "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
16568 | "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; | |
16569 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 | |
16570 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | |
16571 | { (exit 1); exit 1; }; };; | |
861bb6c1 | 16572 | esac |
ba479fd2 NN |
16573 | done |
16574 | ||
16575 | # If the user did not use the arguments to specify the items to instantiate, | |
16576 | # then the envvar interface is used. Set only those that are not. | |
16577 | # We use the long form for the default assignment because of an extremely | |
16578 | # bizarre bug on SunOS 4.1.3. | |
16579 | if $ac_need_defaults; then | |
16580 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
16581 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
16582 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
16583 | fi | |
16584 | ||
16585 | # Have a temporary directory for convenience. Make it in the build tree | |
16586 | # simply because there is no reason to put it here, and in addition, | |
16587 | # creating and moving files from /tmp can sometimes cause problems. | |
16588 | # Create a temporary directory, and hook for its removal unless debugging. | |
16589 | $debug || | |
16590 | { | |
16591 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 | |
16592 | trap '{ (exit 1); exit 1; }' 1 2 13 15 | |
16593 | } | |
861bb6c1 | 16594 | |
ba479fd2 | 16595 | # Create a (secure) tmp directory for tmp files. |
6e3f3080 | 16596 | |
ba479fd2 NN |
16597 | { |
16598 | tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && | |
16599 | test -n "$tmp" && test -d "$tmp" | |
16600 | } || | |
16601 | { | |
16602 | tmp=./confstat$$-$RANDOM | |
16603 | (umask 077 && mkdir $tmp) | |
16604 | } || | |
16605 | { | |
16606 | echo "$me: cannot create a temporary directory in ." >&2 | |
16607 | { (exit 1); exit 1; } | |
16608 | } | |
16609 | ||
16610 | _ACEOF | |
16611 | ||
16612 | cat >>$CONFIG_STATUS <<_ACEOF | |
16613 | ||
16614 | # | |
16615 | # CONFIG_FILES section. | |
16616 | # | |
16617 | ||
16618 | # No need to generate the scripts if there are no CONFIG_FILES. | |
16619 | # This happens for instance when ./config.status config.h | |
16620 | if test -n "\$CONFIG_FILES"; then | |
16621 | # Protect against being on the right side of a sed subst in config.status. | |
16622 | sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; | |
16623 | s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF | |
16624 | s,@SHELL@,$SHELL,;t t | |
16625 | s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t | |
16626 | s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t | |
16627 | s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t | |
16628 | s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t | |
16629 | s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t | |
16630 | s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t | |
16631 | s,@exec_prefix@,$exec_prefix,;t t | |
16632 | s,@prefix@,$prefix,;t t | |
16633 | s,@program_transform_name@,$program_transform_name,;t t | |
16634 | s,@bindir@,$bindir,;t t | |
16635 | s,@sbindir@,$sbindir,;t t | |
16636 | s,@libexecdir@,$libexecdir,;t t | |
16637 | s,@datadir@,$datadir,;t t | |
16638 | s,@sysconfdir@,$sysconfdir,;t t | |
16639 | s,@sharedstatedir@,$sharedstatedir,;t t | |
16640 | s,@localstatedir@,$localstatedir,;t t | |
16641 | s,@libdir@,$libdir,;t t | |
16642 | s,@includedir@,$includedir,;t t | |
16643 | s,@oldincludedir@,$oldincludedir,;t t | |
16644 | s,@infodir@,$infodir,;t t | |
16645 | s,@mandir@,$mandir,;t t | |
16646 | s,@build_alias@,$build_alias,;t t | |
16647 | s,@host_alias@,$host_alias,;t t | |
16648 | s,@target_alias@,$target_alias,;t t | |
16649 | s,@DEFS@,$DEFS,;t t | |
16650 | s,@ECHO_C@,$ECHO_C,;t t | |
16651 | s,@ECHO_N@,$ECHO_N,;t t | |
16652 | s,@ECHO_T@,$ECHO_T,;t t | |
16653 | s,@LIBS@,$LIBS,;t t | |
16654 | s,@build@,$build,;t t | |
16655 | s,@build_cpu@,$build_cpu,;t t | |
16656 | s,@build_vendor@,$build_vendor,;t t | |
16657 | s,@build_os@,$build_os,;t t | |
16658 | s,@host@,$host,;t t | |
16659 | s,@host_cpu@,$host_cpu,;t t | |
16660 | s,@host_vendor@,$host_vendor,;t t | |
16661 | s,@host_os@,$host_os,;t t | |
16662 | s,@target@,$target,;t t | |
16663 | s,@target_cpu@,$target_cpu,;t t | |
16664 | s,@target_vendor@,$target_vendor,;t t | |
16665 | s,@target_os@,$target_os,;t t | |
8f1529e6 | 16666 | s,@target_noncanonical@,$target_noncanonical,;t t |
ba479fd2 NN |
16667 | s,@build_subdir@,$build_subdir,;t t |
16668 | s,@host_subdir@,$host_subdir,;t t | |
16669 | s,@target_subdir@,$target_subdir,;t t | |
03787dfd | 16670 | s,@GENINSRC@,$GENINSRC,;t t |
ba479fd2 NN |
16671 | s,@CC@,$CC,;t t |
16672 | s,@CFLAGS@,$CFLAGS,;t t | |
16673 | s,@LDFLAGS@,$LDFLAGS,;t t | |
16674 | s,@CPPFLAGS@,$CPPFLAGS,;t t | |
16675 | s,@ac_ct_CC@,$ac_ct_CC,;t t | |
16676 | s,@EXEEXT@,$EXEEXT,;t t | |
16677 | s,@OBJEXT@,$OBJEXT,;t t | |
16678 | s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t | |
16679 | s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t | |
16680 | s,@CPP@,$CPP,;t t | |
bf3b7cd3 | 16681 | s,@EGREP@,$EGREP,;t t |
ba479fd2 NN |
16682 | s,@strict1_warn@,$strict1_warn,;t t |
16683 | s,@warn_cflags@,$warn_cflags,;t t | |
16684 | s,@WERROR@,$WERROR,;t t | |
16685 | s,@nocommon_flag@,$nocommon_flag,;t t | |
13f05fd0 | 16686 | s,@TREEBROWSER@,$TREEBROWSER,;t t |
ba479fd2 NN |
16687 | s,@valgrind_path@,$valgrind_path,;t t |
16688 | s,@valgrind_path_defines@,$valgrind_path_defines,;t t | |
16689 | s,@valgrind_command@,$valgrind_command,;t t | |
16690 | s,@coverage_flags@,$coverage_flags,;t t | |
16691 | s,@enable_multilib@,$enable_multilib,;t t | |
16692 | s,@enable_shared@,$enable_shared,;t t | |
16693 | s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t | |
16694 | s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t | |
16695 | s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t | |
16696 | s,@onestep@,$onestep,;t t | |
16697 | s,@SET_MAKE@,$SET_MAKE,;t t | |
16698 | s,@AWK@,$AWK,;t t | |
ba479fd2 | 16699 | s,@LN_S@,$LN_S,;t t |
41e622a8 | 16700 | s,@LN@,$LN,;t t |
ba479fd2 NN |
16701 | s,@RANLIB@,$RANLIB,;t t |
16702 | s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | |
343a6100 | 16703 | s,@ranlib_flags@,$ranlib_flags,;t t |
ba479fd2 NN |
16704 | s,@INSTALL@,$INSTALL,;t t |
16705 | s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t | |
16706 | s,@INSTALL_DATA@,$INSTALL_DATA,;t t | |
16707 | s,@make_compare_target@,$make_compare_target,;t t | |
16708 | s,@have_mktemp_command@,$have_mktemp_command,;t t | |
16709 | s,@MAKEINFO@,$MAKEINFO,;t t | |
16710 | s,@BUILD_INFO@,$BUILD_INFO,;t t | |
16711 | s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t | |
16712 | s,@FLEX@,$FLEX,;t t | |
16713 | s,@BISON@,$BISON,;t t | |
f6a874ac JW |
16714 | s,@NM@,$NM,;t t |
16715 | s,@AR@,$AR,;t t | |
ba479fd2 NN |
16716 | s,@stage1_cflags@,$stage1_cflags,;t t |
16717 | s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t | |
16718 | s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t | |
16719 | s,@LDEXP_LIB@,$LDEXP_LIB,;t t | |
16720 | s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t | |
16721 | s,@LIBICONV@,$LIBICONV,;t t | |
dfb77e37 | 16722 | s,@LTLIBICONV@,$LTLIBICONV,;t t |
ba479fd2 NN |
16723 | s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t |
16724 | s,@manext@,$manext,;t t | |
16725 | s,@objext@,$objext,;t t | |
8bb915b6 | 16726 | s,@gthread_flags@,$gthread_flags,;t t |
ba479fd2 | 16727 | s,@extra_modes_file@,$extra_modes_file,;t t |
75685792 | 16728 | s,@extra_opt_files@,$extra_opt_files,;t t |
ba479fd2 NN |
16729 | s,@USE_NLS@,$USE_NLS,;t t |
16730 | s,@LIBINTL@,$LIBINTL,;t t | |
16731 | s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t | |
16732 | s,@INCINTL@,$INCINTL,;t t | |
16733 | s,@XGETTEXT@,$XGETTEXT,;t t | |
16734 | s,@GMSGFMT@,$GMSGFMT,;t t | |
16735 | s,@POSUB@,$POSUB,;t t | |
16736 | s,@CATALOGS@,$CATALOGS,;t t | |
5395b47b | 16737 | s,@host_cc_for_libada@,$host_cc_for_libada,;t t |
ba479fd2 NN |
16738 | s,@CROSS@,$CROSS,;t t |
16739 | s,@ALL@,$ALL,;t t | |
16740 | s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t | |
16741 | s,@inhibit_libc@,$inhibit_libc,;t t | |
ba479fd2 NN |
16742 | s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t |
16743 | s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t | |
16744 | s,@STMP_FIXINC@,$STMP_FIXINC,;t t | |
16745 | s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t | |
c38f02df | 16746 | s,@collect2@,$collect2,;t t |
9f18db39 PB |
16747 | s,@gcc_cv_as@,$gcc_cv_as,;t t |
16748 | s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t | |
16749 | s,@gcc_cv_ld@,$gcc_cv_ld,;t t | |
16750 | s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t | |
16751 | s,@gcc_cv_nm@,$gcc_cv_nm,;t t | |
16752 | s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t | |
ba479fd2 | 16753 | s,@libgcc_visibility@,$libgcc_visibility,;t t |
ba479fd2 NN |
16754 | s,@GGC@,$GGC,;t t |
16755 | s,@zlibdir@,$zlibdir,;t t | |
16756 | s,@zlibinc@,$zlibinc,;t t | |
16757 | s,@MAINT@,$MAINT,;t t | |
16758 | s,@gcc_tooldir@,$gcc_tooldir,;t t | |
16759 | s,@dollar@,$dollar,;t t | |
16760 | s,@slibdir@,$slibdir,;t t | |
16761 | s,@objdir@,$objdir,;t t | |
16762 | s,@subdirs@,$subdirs,;t t | |
16763 | s,@srcdir@,$srcdir,;t t | |
ba479fd2 NN |
16764 | s,@all_boot_languages@,$all_boot_languages,;t t |
16765 | s,@all_compilers@,$all_compilers,;t t | |
16766 | s,@all_gtfiles@,$all_gtfiles,;t t | |
16767 | s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t | |
16768 | s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t | |
16769 | s,@all_lang_makefrags@,$all_lang_makefrags,;t t | |
16770 | s,@all_lang_makefiles@,$all_lang_makefiles,;t t | |
16771 | s,@all_languages@,$all_languages,;t t | |
16772 | s,@all_stagestuff@,$all_stagestuff,;t t | |
16773 | s,@build_exeext@,$build_exeext,;t t | |
16774 | s,@build_install_headers_dir@,$build_install_headers_dir,;t t | |
16775 | s,@build_xm_file_list@,$build_xm_file_list,;t t | |
16776 | s,@build_xm_include_list@,$build_xm_include_list,;t t | |
16777 | s,@build_xm_defines@,$build_xm_defines,;t t | |
16778 | s,@check_languages@,$check_languages,;t t | |
16779 | s,@cc_set_by_configure@,$cc_set_by_configure,;t t | |
16780 | s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t | |
16781 | s,@cpp_install_dir@,$cpp_install_dir,;t t | |
16782 | s,@xmake_file@,$xmake_file,;t t | |
16783 | s,@tmake_file@,$tmake_file,;t t | |
30500d84 | 16784 | s,@extra_gcc_objs@,$extra_gcc_objs,;t t |
ba479fd2 NN |
16785 | s,@extra_headers_list@,$extra_headers_list,;t t |
16786 | s,@extra_objs@,$extra_objs,;t t | |
16787 | s,@extra_parts@,$extra_parts,;t t | |
16788 | s,@extra_passes@,$extra_passes,;t t | |
16789 | s,@extra_programs@,$extra_programs,;t t | |
16790 | s,@float_h_file@,$float_h_file,;t t | |
16791 | s,@gcc_config_arguments@,$gcc_config_arguments,;t t | |
16792 | s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t | |
16793 | s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t | |
ba479fd2 | 16794 | s,@host_exeext@,$host_exeext,;t t |
ba479fd2 NN |
16795 | s,@host_xm_file_list@,$host_xm_file_list,;t t |
16796 | s,@host_xm_include_list@,$host_xm_include_list,;t t | |
16797 | s,@host_xm_defines@,$host_xm_defines,;t t | |
16798 | s,@out_host_hook_obj@,$out_host_hook_obj,;t t | |
16799 | s,@install@,$install,;t t | |
16800 | s,@lang_opt_files@,$lang_opt_files,;t t | |
16801 | s,@lang_specs_files@,$lang_specs_files,;t t | |
16802 | s,@lang_tree_files@,$lang_tree_files,;t t | |
16803 | s,@local_prefix@,$local_prefix,;t t | |
16804 | s,@md_file@,$md_file,;t t | |
16805 | s,@objc_boehm_gc@,$objc_boehm_gc,;t t | |
16806 | s,@out_file@,$out_file,;t t | |
16807 | s,@out_object_file@,$out_object_file,;t t | |
16808 | s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t | |
16809 | s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t | |
ba479fd2 NN |
16810 | s,@thread_file@,$thread_file,;t t |
16811 | s,@tm_file_list@,$tm_file_list,;t t | |
16812 | s,@tm_include_list@,$tm_include_list,;t t | |
16813 | s,@tm_defines@,$tm_defines,;t t | |
16814 | s,@tm_p_file_list@,$tm_p_file_list,;t t | |
16815 | s,@tm_p_include_list@,$tm_p_include_list,;t t | |
16816 | s,@xm_file_list@,$xm_file_list,;t t | |
16817 | s,@xm_include_list@,$xm_include_list,;t t | |
16818 | s,@xm_defines@,$xm_defines,;t t | |
ba479fd2 NN |
16819 | s,@c_target_objs@,$c_target_objs,;t t |
16820 | s,@cxx_target_objs@,$cxx_target_objs,;t t | |
16821 | s,@target_cpu_default@,$target_cpu_default,;t t | |
6de9cd9a DN |
16822 | s,@GMPLIBS@,$GMPLIBS,;t t |
16823 | s,@GMPINC@,$GMPINC,;t t | |
ba479fd2 NN |
16824 | s,@LIBOBJS@,$LIBOBJS,;t t |
16825 | s,@LTLIBOBJS@,$LTLIBOBJS,;t t | |
16826 | /@language_hooks@/r $language_hooks | |
16827 | s,@language_hooks@,,;t t | |
16828 | CEOF | |
16829 | ||
16830 | _ACEOF | |
16831 | ||
16832 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16833 | # Split the substitutions into bite-sized pieces for seds with | |
16834 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
16835 | ac_max_sed_lines=48 | |
16836 | ac_sed_frag=1 # Number of current file. | |
16837 | ac_beg=1 # First line for current file. | |
16838 | ac_end=$ac_max_sed_lines # Line after last line for current file. | |
16839 | ac_more_lines=: | |
16840 | ac_sed_cmds= | |
16841 | while $ac_more_lines; do | |
16842 | if test $ac_beg -gt 1; then | |
16843 | sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
16844 | else | |
16845 | sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
16846 | fi | |
16847 | if test ! -s $tmp/subs.frag; then | |
16848 | ac_more_lines=false | |
16849 | else | |
16850 | # The purpose of the label and of the branching condition is to | |
16851 | # speed up the sed processing (if there are no `@' at all, there | |
16852 | # is no need to browse any of the substitutions). | |
16853 | # These are the two extra sed commands mentioned above. | |
16854 | (echo ':t | |
16855 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed | |
16856 | if test -z "$ac_sed_cmds"; then | |
86da66b5 | 16857 | ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 | 16858 | else |
86da66b5 | 16859 | ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 NN |
16860 | fi |
16861 | ac_sed_frag=`expr $ac_sed_frag + 1` | |
16862 | ac_beg=$ac_end | |
16863 | ac_end=`expr $ac_end + $ac_max_sed_lines` | |
16864 | fi | |
16865 | done | |
16866 | if test -z "$ac_sed_cmds"; then | |
16867 | ac_sed_cmds=cat | |
63cf211a | 16868 | fi |
ba479fd2 | 16869 | fi # test -n "$CONFIG_FILES" |
cafe096b | 16870 | |
ba479fd2 NN |
16871 | _ACEOF |
16872 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16873 | for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue | |
16874 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
16875 | case $ac_file in | |
16876 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
16877 | cat >$tmp/stdin |
16878 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
16879 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 16880 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 16881 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 16882 | * ) ac_file_in=$ac_file.in ;; |
63cf211a | 16883 | esac |
cafe096b | 16884 | |
ba479fd2 NN |
16885 | # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. |
16886 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
16887 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
16888 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
16889 | X"$ac_file" : 'X\(//\)$' \| \ | |
16890 | X"$ac_file" : 'X\(/\)' \| \ | |
16891 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
16892 | echo X"$ac_file" | |
16893 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
16894 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
16895 | /^X\(\/\/\)$/{ s//\1/; q; } | |
16896 | /^X\(\/\).*/{ s//\1/; q; } | |
16897 | s/.*/./; q'` | |
16898 | { if $as_mkdir_p; then | |
16899 | mkdir -p "$ac_dir" | |
16900 | else | |
16901 | as_dir="$ac_dir" | |
16902 | as_dirs= | |
16903 | while test ! -d "$as_dir"; do | |
16904 | as_dirs="$as_dir $as_dirs" | |
16905 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
16906 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
16907 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
16908 | X"$as_dir" : 'X\(//\)$' \| \ | |
16909 | X"$as_dir" : 'X\(/\)' \| \ | |
16910 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
16911 | echo X"$as_dir" | |
16912 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
16913 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
16914 | /^X\(\/\/\)$/{ s//\1/; q; } | |
16915 | /^X\(\/\).*/{ s//\1/; q; } | |
16916 | s/.*/./; q'` | |
16917 | done | |
16918 | test ! -n "$as_dirs" || mkdir $as_dirs | |
16919 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
16920 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
16921 | { (exit 1); exit 1; }; }; } | |
6e3f3080 | 16922 | |
ba479fd2 NN |
16923 | ac_builddir=. |
16924 | ||
16925 | if test "$ac_dir" != .; then | |
16926 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
16927 | # A "../" for each directory in $ac_dir_suffix. | |
16928 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
16929 | else | |
16930 | ac_dir_suffix= ac_top_builddir= | |
16931 | fi | |
16932 | ||
16933 | case $srcdir in | |
16934 | .) # No --srcdir option. We are building in place. | |
16935 | ac_srcdir=. | |
16936 | if test -z "$ac_top_builddir"; then | |
16937 | ac_top_srcdir=. | |
16938 | else | |
16939 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
16940 | fi ;; | |
16941 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
16942 | ac_srcdir=$srcdir$ac_dir_suffix; | |
16943 | ac_top_srcdir=$srcdir ;; | |
16944 | *) # Relative path. | |
16945 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
16946 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
16947 | esac | |
8ab705be KC |
16948 | |
16949 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
16950 | # the directories may not exist. | |
16951 | case `pwd` in | |
16952 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 16953 | *) |
8ab705be KC |
16954 | case "$ac_dir" in |
16955 | .) ac_abs_builddir=`pwd`;; | |
16956 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
16957 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
16958 | esac;; |
16959 | esac | |
8ab705be | 16960 | case $ac_abs_builddir in |
86da66b5 HPN |
16961 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
16962 | *) | |
16963 | case ${ac_top_builddir}. in | |
8ab705be | 16964 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 16965 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 16966 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
16967 | esac;; |
16968 | esac | |
8ab705be | 16969 | case $ac_abs_builddir in |
86da66b5 HPN |
16970 | .) ac_abs_srcdir=$ac_srcdir;; |
16971 | *) | |
16972 | case $ac_srcdir in | |
8ab705be | 16973 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 16974 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 16975 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
16976 | esac;; |
16977 | esac | |
8ab705be | 16978 | case $ac_abs_builddir in |
86da66b5 HPN |
16979 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
16980 | *) | |
16981 | case $ac_top_srcdir in | |
8ab705be | 16982 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 16983 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 16984 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
16985 | esac;; |
16986 | esac | |
ba479fd2 NN |
16987 | |
16988 | ||
16989 | ||
d7974fe6 KC |
16990 | if test x"$ac_file" != x-; then |
16991 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
16992 | echo "$as_me: creating $ac_file" >&6;} | |
16993 | rm -f "$ac_file" | |
16994 | fi | |
ba479fd2 NN |
16995 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
16996 | # use $as_me), people would be surprised to read: | |
16997 | # /* config.h. Generated by config.status. */ | |
16998 | if test x"$ac_file" = x-; then | |
16999 | configure_input= | |
17000 | else | |
17001 | configure_input="$ac_file. " | |
17002 | fi | |
17003 | configure_input=$configure_input"Generated from `echo $ac_file_in | | |
86da66b5 | 17004 | sed 's,.*/,,'` by configure." |
ba479fd2 NN |
17005 | |
17006 | # First look for the input files in the build tree, otherwise in the | |
17007 | # src tree. | |
17008 | ac_file_inputs=`IFS=: | |
17009 | for f in $ac_file_in; do | |
17010 | case $f in | |
17011 | -) echo $tmp/stdin ;; | |
17012 | [\\/$]*) | |
86da66b5 HPN |
17013 | # Absolute (can't be DOS-style, as IFS=:) |
17014 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17015 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17016 | { (exit 1); exit 1; }; } | |
86da66b5 | 17017 | echo "$f";; |
ba479fd2 | 17018 | *) # Relative |
86da66b5 HPN |
17019 | if test -f "$f"; then |
17020 | # Build tree | |
17021 | echo "$f" | |
17022 | elif test -f "$srcdir/$f"; then | |
17023 | # Source tree | |
17024 | echo "$srcdir/$f" | |
17025 | else | |
17026 | # /dev/null tree | |
17027 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17028 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17029 | { (exit 1); exit 1; }; } | |
86da66b5 | 17030 | fi;; |
ba479fd2 NN |
17031 | esac |
17032 | done` || { (exit 1); exit 1; } | |
17033 | _ACEOF | |
17034 | cat >>$CONFIG_STATUS <<_ACEOF | |
17035 | sed "$ac_vpsub | |
17036 | $extrasub | |
17037 | _ACEOF | |
17038 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17039 | :t | |
17040 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
17041 | s,@configure_input@,$configure_input,;t t | |
17042 | s,@srcdir@,$ac_srcdir,;t t | |
17043 | s,@abs_srcdir@,$ac_abs_srcdir,;t t | |
17044 | s,@top_srcdir@,$ac_top_srcdir,;t t | |
17045 | s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t | |
17046 | s,@builddir@,$ac_builddir,;t t | |
17047 | s,@abs_builddir@,$ac_abs_builddir,;t t | |
17048 | s,@top_builddir@,$ac_top_builddir,;t t | |
17049 | s,@abs_top_builddir@,$ac_abs_top_builddir,;t t | |
17050 | " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out | |
17051 | rm -f $tmp/stdin | |
17052 | if test x"$ac_file" != x-; then | |
17053 | mv $tmp/out $ac_file | |
17054 | else | |
17055 | cat $tmp/out | |
17056 | rm -f $tmp/out | |
17057 | fi | |
17058 | ||
17059 | done | |
17060 | _ACEOF | |
17061 | cat >>$CONFIG_STATUS <<\_ACEOF | |
6e3f3080 | 17062 | |
ba479fd2 NN |
17063 | # |
17064 | # CONFIG_HEADER section. | |
17065 | # | |
861bb6c1 JL |
17066 | |
17067 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
17068 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
17069 | # | |
17070 | # ac_d sets the value in "#define NAME VALUE" lines. | |
86da66b5 HPN |
17071 | ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
17072 | ac_dB='[ ].*$,\1#\2' | |
ba479fd2 NN |
17073 | ac_dC=' ' |
17074 | ac_dD=',;t' | |
17075 | # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
86da66b5 | 17076 | ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
ba479fd2 | 17077 | ac_uB='$,\1#\2define\3' |
861bb6c1 | 17078 | ac_uC=' ' |
ba479fd2 NN |
17079 | ac_uD=',;t' |
17080 | ||
17081 | for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue | |
861bb6c1 | 17082 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
ba479fd2 NN |
17083 | case $ac_file in |
17084 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
17085 | cat >$tmp/stdin |
17086 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
17087 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 17088 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 17089 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 17090 | * ) ac_file_in=$ac_file.in ;; |
861bb6c1 JL |
17091 | esac |
17092 | ||
ba479fd2 NN |
17093 | test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 |
17094 | echo "$as_me: creating $ac_file" >&6;} | |
17095 | ||
17096 | # First look for the input files in the build tree, otherwise in the | |
17097 | # src tree. | |
17098 | ac_file_inputs=`IFS=: | |
17099 | for f in $ac_file_in; do | |
17100 | case $f in | |
17101 | -) echo $tmp/stdin ;; | |
17102 | [\\/$]*) | |
86da66b5 HPN |
17103 | # Absolute (can't be DOS-style, as IFS=:) |
17104 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17105 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17106 | { (exit 1); exit 1; }; } | |
86da66b5 HPN |
17107 | # Do quote $f, to prevent DOS paths from being IFS'd. |
17108 | echo "$f";; | |
ba479fd2 | 17109 | *) # Relative |
86da66b5 HPN |
17110 | if test -f "$f"; then |
17111 | # Build tree | |
17112 | echo "$f" | |
17113 | elif test -f "$srcdir/$f"; then | |
17114 | # Source tree | |
17115 | echo "$srcdir/$f" | |
17116 | else | |
17117 | # /dev/null tree | |
17118 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17119 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17120 | { (exit 1); exit 1; }; } | |
86da66b5 | 17121 | fi;; |
ba479fd2 NN |
17122 | esac |
17123 | done` || { (exit 1); exit 1; } | |
17124 | # Remove the trailing spaces. | |
86da66b5 | 17125 | sed 's/[ ]*$//' $ac_file_inputs >$tmp/in |
ba479fd2 NN |
17126 | |
17127 | _ACEOF | |
17128 | ||
17129 | # Transform confdefs.h into two sed scripts, `conftest.defines' and | |
17130 | # `conftest.undefs', that substitutes the proper values into | |
17131 | # config.h.in to produce config.h. The first handles `#define' | |
17132 | # templates, and the second `#undef' templates. | |
17133 | # And first: Protect against being on the right side of a sed subst in | |
17134 | # config.status. Protect against being in an unquoted here document | |
17135 | # in config.status. | |
17136 | rm -f conftest.defines conftest.undefs | |
17137 | # Using a here document instead of a string reduces the quoting nightmare. | |
17138 | # Putting comments in sed scripts is not portable. | |
17139 | # | |
17140 | # `end' is used to avoid that the second main sed command (meant for | |
17141 | # 0-ary CPP macros) applies to n-ary macro definitions. | |
17142 | # See the Autoconf documentation for `clear'. | |
17143 | cat >confdef2sed.sed <<\_ACEOF | |
17144 | s/[\\&,]/\\&/g | |
17145 | s,[\\$`],\\&,g | |
17146 | t clear | |
17147 | : clear | |
86da66b5 | 17148 | s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp |
ba479fd2 | 17149 | t end |
86da66b5 | 17150 | s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp |
ba479fd2 NN |
17151 | : end |
17152 | _ACEOF | |
17153 | # If some macros were called several times there might be several times | |
17154 | # the same #defines, which is useless. Nevertheless, we may not want to | |
17155 | # sort them, since we want the *last* AC-DEFINE to be honored. | |
17156 | uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines | |
17157 | sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs | |
17158 | rm -f confdef2sed.sed | |
861bb6c1 JL |
17159 | |
17160 | # This sed command replaces #undef with comments. This is necessary, for | |
17161 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
17162 | # on some systems where configure will not decide to define it. | |
ba479fd2 | 17163 | cat >>conftest.undefs <<\_ACEOF |
86da66b5 | 17164 | s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, |
ba479fd2 NN |
17165 | _ACEOF |
17166 | ||
17167 | # Break up conftest.defines because some shells have a limit on the size | |
17168 | # of here documents, and old seds have small limits too (100 cmds). | |
17169 | echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS | |
86da66b5 | 17170 | echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS |
ba479fd2 NN |
17171 | echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS |
17172 | echo ' :' >>$CONFIG_STATUS | |
17173 | rm -f conftest.tail | |
17174 | while grep . conftest.defines >/dev/null | |
17175 | do | |
17176 | # Write a limited-size here document to $tmp/defines.sed. | |
17177 | echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS | |
17178 | # Speed up: don't consider the non `#define' lines. | |
86da66b5 | 17179 | echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
17180 | # Work around the forget-to-reset-the-flag bug. |
17181 | echo 't clr' >>$CONFIG_STATUS | |
17182 | echo ': clr' >>$CONFIG_STATUS | |
17183 | sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS | |
17184 | echo 'CEOF | |
17185 | sed -f $tmp/defines.sed $tmp/in >$tmp/out | |
17186 | rm -f $tmp/in | |
17187 | mv $tmp/out $tmp/in | |
17188 | ' >>$CONFIG_STATUS | |
17189 | sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail | |
17190 | rm -f conftest.defines | |
17191 | mv conftest.tail conftest.defines | |
17192 | done | |
17193 | rm -f conftest.defines | |
17194 | echo ' fi # grep' >>$CONFIG_STATUS | |
17195 | echo >>$CONFIG_STATUS | |
861bb6c1 | 17196 | |
ba479fd2 NN |
17197 | # Break up conftest.undefs because some shells have a limit on the size |
17198 | # of here documents, and old seds have small limits too (100 cmds). | |
17199 | echo ' # Handle all the #undef templates' >>$CONFIG_STATUS | |
861bb6c1 | 17200 | rm -f conftest.tail |
ba479fd2 | 17201 | while grep . conftest.undefs >/dev/null |
861bb6c1 | 17202 | do |
ba479fd2 NN |
17203 | # Write a limited-size here document to $tmp/undefs.sed. |
17204 | echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS | |
17205 | # Speed up: don't consider the non `#undef' | |
86da66b5 | 17206 | echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
17207 | # Work around the forget-to-reset-the-flag bug. |
17208 | echo 't clr' >>$CONFIG_STATUS | |
17209 | echo ': clr' >>$CONFIG_STATUS | |
17210 | sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS | |
861bb6c1 | 17211 | echo 'CEOF |
ba479fd2 NN |
17212 | sed -f $tmp/undefs.sed $tmp/in >$tmp/out |
17213 | rm -f $tmp/in | |
17214 | mv $tmp/out $tmp/in | |
17215 | ' >>$CONFIG_STATUS | |
17216 | sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail | |
17217 | rm -f conftest.undefs | |
17218 | mv conftest.tail conftest.undefs | |
861bb6c1 | 17219 | done |
ba479fd2 NN |
17220 | rm -f conftest.undefs |
17221 | ||
17222 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17223 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
17224 | # use $as_me), people would be surprised to read: | |
17225 | # /* config.h. Generated by config.status. */ | |
17226 | if test x"$ac_file" = x-; then | |
17227 | echo "/* Generated by configure. */" >$tmp/config.h | |
6e3f3080 | 17228 | else |
ba479fd2 | 17229 | echo "/* $ac_file. Generated by configure. */" >$tmp/config.h |
cafe096b | 17230 | fi |
ba479fd2 NN |
17231 | cat $tmp/in >>$tmp/config.h |
17232 | rm -f $tmp/in | |
17233 | if test x"$ac_file" != x-; then | |
17234 | if diff $ac_file $tmp/config.h >/dev/null 2>&1; then | |
17235 | { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 | |
17236 | echo "$as_me: $ac_file is unchanged" >&6;} | |
17237 | else | |
17238 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
17239 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17240 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
17241 | X"$ac_file" : 'X\(//\)$' \| \ | |
17242 | X"$ac_file" : 'X\(/\)' \| \ | |
17243 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17244 | echo X"$ac_file" | |
17245 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17246 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17247 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17248 | /^X\(\/\).*/{ s//\1/; q; } | |
17249 | s/.*/./; q'` | |
17250 | { if $as_mkdir_p; then | |
17251 | mkdir -p "$ac_dir" | |
17252 | else | |
17253 | as_dir="$ac_dir" | |
17254 | as_dirs= | |
17255 | while test ! -d "$as_dir"; do | |
17256 | as_dirs="$as_dir $as_dirs" | |
17257 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
17258 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17259 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
17260 | X"$as_dir" : 'X\(//\)$' \| \ | |
17261 | X"$as_dir" : 'X\(/\)' \| \ | |
17262 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17263 | echo X"$as_dir" | |
17264 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17265 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17266 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17267 | /^X\(\/\).*/{ s//\1/; q; } | |
17268 | s/.*/./; q'` | |
17269 | done | |
17270 | test ! -n "$as_dirs" || mkdir $as_dirs | |
17271 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
17272 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
17273 | { (exit 1); exit 1; }; }; } | |
63cf211a | 17274 | |
ba479fd2 NN |
17275 | rm -f $ac_file |
17276 | mv $tmp/config.h $ac_file | |
17277 | fi | |
17278 | else | |
17279 | cat $tmp/config.h | |
17280 | rm -f $tmp/config.h | |
17281 | fi | |
17282 | done | |
17283 | _ACEOF | |
17284 | cat >>$CONFIG_STATUS <<\_ACEOF | |
861bb6c1 | 17285 | |
ba479fd2 NN |
17286 | # |
17287 | # CONFIG_COMMANDS section. | |
17288 | # | |
17289 | for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue | |
17290 | ac_dest=`echo "$ac_file" | sed 's,:.*,,'` | |
17291 | ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
17292 | ac_dir=`(dirname "$ac_dest") 2>/dev/null || | |
17293 | $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17294 | X"$ac_dest" : 'X\(//\)[^/]' \| \ |
17295 | X"$ac_dest" : 'X\(//\)$' \| \ | |
17296 | X"$ac_dest" : 'X\(/\)' \| \ | |
17297 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17298 | echo X"$ac_dest" | |
17299 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17300 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17301 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17302 | /^X\(\/\).*/{ s//\1/; q; } | |
17303 | s/.*/./; q'` | |
86da66b5 HPN |
17304 | { if $as_mkdir_p; then |
17305 | mkdir -p "$ac_dir" | |
17306 | else | |
17307 | as_dir="$ac_dir" | |
17308 | as_dirs= | |
17309 | while test ! -d "$as_dir"; do | |
17310 | as_dirs="$as_dir $as_dirs" | |
17311 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
17312 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
17313 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
17314 | X"$as_dir" : 'X\(//\)$' \| \ | |
17315 | X"$as_dir" : 'X\(/\)' \| \ | |
17316 | . : '\(.\)' 2>/dev/null || | |
17317 | echo X"$as_dir" | | |
17318 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17319 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17320 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17321 | /^X\(\/\).*/{ s//\1/; q; } | |
17322 | s/.*/./; q'` | |
17323 | done | |
17324 | test ! -n "$as_dirs" || mkdir $as_dirs | |
17325 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
17326 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
17327 | { (exit 1); exit 1; }; }; } | |
17328 | ||
ba479fd2 NN |
17329 | ac_builddir=. |
17330 | ||
17331 | if test "$ac_dir" != .; then | |
17332 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
17333 | # A "../" for each directory in $ac_dir_suffix. | |
17334 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
17335 | else | |
17336 | ac_dir_suffix= ac_top_builddir= | |
17337 | fi | |
17338 | ||
17339 | case $srcdir in | |
17340 | .) # No --srcdir option. We are building in place. | |
17341 | ac_srcdir=. | |
17342 | if test -z "$ac_top_builddir"; then | |
17343 | ac_top_srcdir=. | |
17344 | else | |
17345 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
17346 | fi ;; | |
17347 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
17348 | ac_srcdir=$srcdir$ac_dir_suffix; | |
17349 | ac_top_srcdir=$srcdir ;; | |
17350 | *) # Relative path. | |
17351 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
17352 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
17353 | esac | |
8ab705be KC |
17354 | |
17355 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
17356 | # the directories may not exist. | |
17357 | case `pwd` in | |
17358 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 17359 | *) |
8ab705be KC |
17360 | case "$ac_dir" in |
17361 | .) ac_abs_builddir=`pwd`;; | |
17362 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
17363 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
17364 | esac;; |
17365 | esac | |
8ab705be | 17366 | case $ac_abs_builddir in |
86da66b5 HPN |
17367 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
17368 | *) | |
17369 | case ${ac_top_builddir}. in | |
8ab705be | 17370 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 17371 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 17372 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
17373 | esac;; |
17374 | esac | |
8ab705be | 17375 | case $ac_abs_builddir in |
86da66b5 HPN |
17376 | .) ac_abs_srcdir=$ac_srcdir;; |
17377 | *) | |
17378 | case $ac_srcdir in | |
8ab705be | 17379 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 17380 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 17381 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
17382 | esac;; |
17383 | esac | |
8ab705be | 17384 | case $ac_abs_builddir in |
86da66b5 HPN |
17385 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
17386 | *) | |
17387 | case $ac_top_srcdir in | |
8ab705be | 17388 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 17389 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 17390 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
17391 | esac;; |
17392 | esac | |
ba479fd2 NN |
17393 | |
17394 | ||
17395 | { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 | |
17396 | echo "$as_me: executing $ac_dest commands" >&6;} | |
17397 | case $ac_dest in | |
17398 | default ) | |
f1faaabd NN |
17399 | case ${CONFIG_HEADERS} in |
17400 | *auto-host.h:config.in*) | |
17401 | echo > cstamp-h ;; | |
861bb6c1 | 17402 | esac |
2ed26f6b | 17403 | # Make sure all the subdirs exist. |
3b620440 | 17404 | for d in $subdirs doc build |
2ed26f6b | 17405 | do |
2ed26f6b | 17406 | test -d $d || mkdir $d |
2ed26f6b | 17407 | done |
93cf819d BK |
17408 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
17409 | # bootstrapping and the installation procedure can still use | |
17410 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
17411 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
17412 | # This is virtually a duplicate of what happens in configure.lang; we do | |
17413 | # an extra check to make sure this only happens if ln -s can be used. | |
35f06ae4 PB |
17414 | case "$LN_S" in |
17415 | *-s*) | |
17416 | for d in ${subdirs} ; do | |
1e6347d8 | 17417 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e | 17418 | cd $d |
6a1b7268 | 17419 | for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include |
4e8a434e BK |
17420 | do |
17421 | rm -f $t | |
35f06ae4 | 17422 | $LN_S ../$t $t 2>/dev/null |
4e8a434e BK |
17423 | done |
17424 | cd $STARTDIR | |
35f06ae4 PB |
17425 | done |
17426 | ;; | |
17427 | esac | |
ba479fd2 NN |
17428 | ;; |
17429 | esac | |
17430 | done | |
17431 | _ACEOF | |
cafe096b | 17432 | |
ba479fd2 NN |
17433 | cat >>$CONFIG_STATUS <<\_ACEOF |
17434 | ||
17435 | { (exit 0); exit 0; } | |
17436 | _ACEOF | |
861bb6c1 | 17437 | chmod +x $CONFIG_STATUS |
ba479fd2 NN |
17438 | ac_clean_files=$ac_clean_files_save |
17439 | ||
17440 | ||
17441 | # configure is writing to config.log, and then calls config.status. | |
17442 | # config.status does its own redirection, appending to config.log. | |
17443 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
17444 | # by configure, so config.status won't be able to write to it; its | |
17445 | # output is simply discarded. So we exec the FD to /dev/null, | |
17446 | # effectively closing config.log, so it can be properly (re)opened and | |
17447 | # appended to by config.status. When coming back to configure, we | |
17448 | # need to make the FD available again. | |
17449 | if test "$no_create" != yes; then | |
17450 | ac_cs_success=: | |
17451 | ac_config_status_args= | |
17452 | test "$silent" = yes && | |
17453 | ac_config_status_args="$ac_config_status_args --quiet" | |
17454 | exec 5>/dev/null | |
17455 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
17456 | exec 5>>config.log | |
17457 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
17458 | # would make configure fail if this is the last instruction. | |
17459 | $ac_cs_success || { (exit 1); exit 1; } | |
17460 | fi | |
861bb6c1 | 17461 |